freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于可編程邏輯器件的dds設(shè)計畢業(yè)設(shè)計論文任務(wù)書(編輯修改稿)

2024-07-24 20:33 本頁面
 

【文章內(nèi)容簡介】 BEGINPROCESS (iclk) BEGIN IF iclk39。EVENT AND iclk=39。139。 THEN IF count =key THEN count =0000。 clk_i= not clk_i。 ELSE count = count +1。 END IF。 END IF。END PROCESS。 oclk= clk_i。END one。13生成的模塊如圖 41:圖 41注:ICLK ;輸入基準(zhǔn)頻率,OCLK:輸出頻率,KEY:按鍵控制分頻,為四位二進(jìn)制數(shù)。仿真的時序圖如圖 :圖 42說明:當(dāng)按鍵顯示為 0001 時,輸出頻率是基準(zhǔn)頻率的二分之一,實現(xiàn)二分頻。當(dāng)為 0010時,頻率為基準(zhǔn)的三分之一,實現(xiàn)三分頻。以此按鍵就能實現(xiàn)分頻了,直至十六分頻為止。 頻率采集原理為了采集即時頻率,本文專門產(chǎn)生一個秒信號,用來計錄脈沖個數(shù)。脈沖計數(shù)用八位十進(jìn)制計數(shù)器,計數(shù)器在 START 置一時,秒信號的計數(shù)脈沖數(shù)清零同時計數(shù)器清零,當(dāng)STARE 置零時秒信號與計數(shù)器同時開始工作。當(dāng)一秒時間到時(STOP 為 1 )計數(shù)器把數(shù)據(jù)送出去以供顯示。具體實現(xiàn)程序如下,頻率采集程序:14library ieee。use 。use 。entity selec is port(num1,num2,num3,num4,num5,num6,num7,num8:out std_logic_vector(3 downto 0)。stop:in std_logic。start: in std_logic。reset: in std_logic。clk:in std_logic)。end selec。architecture dacc of selec issignal q1,q2,q3,q4,q5,q6,q7,q8: std_logic_vector(3 downto 0)。signal tem1,tem2,tem3,tem4,tem5,tem6,tem7,tem8: std_logic_vector(3 downto 0)。beginprocess(clk,start,reset) begin if start=39。139。or reset = 39。139。 then q1=0000。q2=0000。q3=0000。q4=0000。q5=0000。q6=0000。q7=0000。 elsif clk39。event and clk=39。139。 then if q1=1001 then q1=0000。 if q2=1001 then q2=0000。 if q3=1001 then q3=0000。 if q4=1001 then q4=0000。 if q5=1001 then q5=0000。 if q6=1001 then q6=0000。 if q7=1001 then q7=0000。 if q8=1001 then q8=0000。 else q8=q8+1。 end if。 else q7=q7+1。 end if。 else q6=q6+1。 end if。 else q5=q5+1。 end if。 else q4=q4+1。 end if。 else q3=q3+1。 end if。 else q2=q2+1。 end if。 else q1=q1+1。 end if。 end if。end process。process(stop)beginif stop=39。139。thentem1=q1。tem2=q2。tem3=q3。tem4=q4。tem5=q5。tem6=q6。tem7=q7。tem8=q8。end if。end process。num1=tem1。num2=tem2。num3=tem3。num4=tem4。num5=tem5。num6=tem6。num7=tem7。num8=tem8。end dacc。15程序說明:當(dāng) reset 或 start 為 1 時,計數(shù)器 q1q8 清零,然后開始計數(shù),當(dāng)秒信號計數(shù)結(jié)束標(biāo)志位 stop 為 1 時停止計數(shù),此時把當(dāng)前的計數(shù)值保存到寄存器中,以備顯示用。秒信號產(chǎn)生程序:use library ieee。use 。use 。entity second is port(clk : in std_logic。start : in std_logic。reset :in std_logic。stop : out std_logic)。end second。architecture dacc of second issignal q: integer range 0 to 100。signal tem: std_logic。beginprocess(clk,reset,start)beginif (reset=39。139。)or(reset=39。039。and start=39。139。) thenq=0。elsif clk39。event and clk=39。139。then if q=100 thentem=39。139。elseq=q+1。tem=39。039。end if。end if。end process。stop=tem。end architecture。程序說明:reset 為復(fù)位信號, start 為另一次秒信號的開始標(biāo)志。當(dāng) reset 為 1 或者當(dāng)start 為 1 時計數(shù)信號清零。開始秒信號的計數(shù),當(dāng)計數(shù)個數(shù)到達(dá)預(yù)定的 100 時使 stop(秒結(jié)束標(biāo)志位)信號置 1。再重新開始計數(shù)。程序生成模塊下圖所示 43:生成的頻率采集模塊: 生成的秒信號模塊: 圖 43頻率采集模塊時序仿真圖如圖 44:16圖 44 A說明:由圖可知,當(dāng) stop 置 1 時,num1 至 num8 就會把脈沖個數(shù)送進(jìn)寄存器,而當(dāng) stop為 0 時,內(nèi)部計數(shù),此時寄存器內(nèi)保存的是上一個秒內(nèi)的計數(shù)值。秒信號時序仿真圖如圖 45:圖 44B分析:上圖顯示的是 reset(復(fù)位信號)為 1 時,q(計數(shù)信號) 清零,即重新開始計數(shù)。直到reset 或 start 為 1 停止計數(shù)。17圖 44C說明:stop 信號為秒計數(shù)結(jié)束信號,置 1 時,表示計時到,當(dāng)計數(shù)信號計數(shù)到預(yù)定個數(shù)(根據(jù)基準(zhǔn)頻率而定),此仿真圖為了檢測程序的正確,以 1100011 為例進(jìn)行仿真,stop 信號值 1,此時應(yīng)該使記當(dāng)前頻率時鐘脈沖個數(shù)的計數(shù)器停止計數(shù)。并采集當(dāng)前計數(shù)值。圖 44D說明:當(dāng) start 信號為 1 時,開始下一秒的計數(shù),并重新開始采集頻率個數(shù)。 數(shù)碼顯示數(shù)據(jù)處理數(shù)碼顯示的數(shù)據(jù)為采集的頻率值。采集的是十進(jìn)制數(shù),所以需要把它們轉(zhuǎn)換成段顯信號。由于設(shè)計中采用了閃爍點亮二極管的方式,所以還需要對位選進(jìn)行處理。 數(shù)碼位選信號數(shù)碼位選信號是用對當(dāng)前工作數(shù)碼管與當(dāng)前顯示數(shù)據(jù)進(jìn)行選擇,由于本文采用八位數(shù)碼管,所以需要產(chǎn)生三位二進(jìn)制數(shù)。具體實現(xiàn)程序如下:library ieee。use 。use 。entity regist is port(num1,num2,num3,num4,num5,num6,num7,num8:in std_logic_vector(3 downto 0)。start: out std_logic。stop: in std_logic。numb:out std_logic_vector(3 downto 0)。 sec:in std_logic_vector(2 downto 0))。end。architecture dacc of regist issignal temp: std_logic_vector(3 downto 0)。signal tem: std_logic。beginprocess(sec,stop) 18beginif stop = 39。139。thentem=39。139。case sec iswhen 000 =temp=num1。when 001 =temp=num2。when 010 =temp=num3。when 011 =temp=num4。when 100 =temp=num5。when 101 =temp=num6。when 110 =temp=num7。when 111 =temp=num8。 when others=null。end case。else temp=0000。tem=39。039。end if。end process。numb=temp。start=tem。end dacc。生成模塊如圖 45:圖 45時序仿真結(jié)果如圖 46 所示。圖 46說明:隨著脈沖的到來,可以實現(xiàn)位選信號 sec 從 0 到 7 的變化,sec 的變化經(jīng)譯碼器可產(chǎn)生只有一位為零的低電平信號。 譯碼19由于我們采集的頻率值為十進(jìn)制數(shù)所以我們需要把十進(jìn)制數(shù)轉(zhuǎn)換為二進(jìn)制段顯信號。具體轉(zhuǎn)換見程序如下所示:library ieee。use 。use 。use 。entity chang is port(a: in std_logic_vector(0 to 3)。xianshishuzi dp:out std_logic_vector(7 downto 0))。end。architecture dacc of chang issignal tem: std_logic_vector(7 downto 0)。beginprocess(a)begin case a iswhen 0000 =tem=11000000。when 0001 =tem=11111001。when 0010 =tem=10100100。when 0011 =tem=10110000。when 0100 =tem=10011001。when 0101 =tem=10010010。when 0110 =tem=10000011。when 0111 =tem=11111000。when 1000 =tem=10000000。when 1001 =tem=10011000。when others=null。 end case。end process。dp=tem。end architecture。生成模塊如圖 47 所示:圖 47注:譯碼的作用是把四位二進(jìn)制數(shù)譯成與數(shù)碼管相適應(yīng)的段顯碼。時序仿真圖如圖 48:20圖 48說明:當(dāng)輸入四進(jìn)制 0111 時,輸進(jìn)數(shù)碼管里為 00000111,段顯就是 7 正弦波信號我們本次設(shè)計所產(chǎn)生的信號以正弦波信號為例,我們正弦波的產(chǎn)生根據(jù)信號相位的增加查表產(chǎn)生。 相位累加器相位累加器實現(xiàn)對待產(chǎn)生波形的信號相位累加,根據(jù)相位查表產(chǎn)生所需要的相位、幅度。相位累加程序library ieee。use 。use 。use 。entity xiaweiadd is port(clk:in std_logic。 q:out integer range 63 downto 0)。end。architecture dacc of xiaweiadd issignal qq: integer range 63 downto 0。beginprocess(clk)beginif (clk39。event and clk=39。139。) thenqq=qq+1。 end if。 end process。q=qq。end archi
點擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1