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

正文內(nèi)容

基于fpga的計(jì)數(shù)器的程序設(shè)計(jì)方案(編輯修改稿)

2025-06-02 00:19 本頁面
 

【文章內(nèi)容簡介】 ,這種計(jì)數(shù)器有許多實(shí)際的用處。如果rst為“1”,將對時(shí)鐘清零;如果為1,且有clk信號,則允許計(jì)數(shù)器就數(shù),若計(jì)數(shù)器小于9,計(jì)數(shù)器加1,否則清零。第二個(gè)if語句功能是當(dāng)計(jì)數(shù)器cqi的只達(dá)到9時(shí)產(chǎn)生進(jìn)位溢出信號。library ieee。use 。use 。entity t10 is port (rst,clk,ena:in std_logic。 cout: out std_logic。 outy :out std_logic_vector(3 downto 0))。end t10。architecture behv of t10 isbeginprocess (rst,ena,clk)variable cqi :std_logic_vector(3 downto 0)。beginif rst=39。139。 then cqi :=(others =39。039。)。elsif clk39。event and clk=39。139。 thenif ena =39。139。 thenif cqi 9 then cqi:=cqi+1。cout=39。039。elsif cqi=9 thencqi :=(others =39。039。)。cout=39。139。end if。elsif ena=39。039。 then cqi:=(others =39。039。)。end if。end if。outy =cqi。end process。end behv。圖4 十進(jìn)制計(jì)數(shù)器仿真波形(2)四位計(jì)數(shù)器下面是一含計(jì)數(shù)使能、異步復(fù)位功能的4位計(jì)數(shù)器, rst是異步清信號,高電平有效。library ieee。use 。entity t10_4 isport(clkk,rst,ena:in std_logic。 d:out std_logic_vector(15 downto 0))。end entity。architecture one of t10_4 isponent t10 port (rst,clk,ena:in std_logic。 cout: out std_logic。 outy :out std_logic_vector(3 downto 0))。end ponent。signal e:std_logic_vector(3 downto 0)。beginu1:t10 port map(clk=clkk,rst=rst,ena=ena,cout=e(0),outy=d(3 downto 0))。u2:t10 port map(clk=e(0),rst=rst,ena=ena,cout=e(1),outy=d(7 downto 4))。u3:t10 port map(clk=e(1),rst=rst,ena=ena,cout=e(2),outy=d(11 downto 8))。u4:t10 port map(clk=e(2),rst=rst,ena=ena,cout=e(3),outy=d(15 downto 12))。end architecture one。 鎖存器設(shè)計(jì) 鎖存器及其應(yīng)用所謂鎖存器,就是輸出端的狀態(tài)不會(huì)隨輸入端的狀態(tài)變化而變化,僅在有鎖存信號時(shí)輸入的狀態(tài)被保存到輸出,直到下一個(gè)鎖存信號到來時(shí)才改變。典型的鎖存器邏輯電路是D 觸發(fā)器電路。在LED和數(shù)碼管顯示方面,要維持一個(gè)數(shù)據(jù)的顯示,往往要持續(xù)的快速的刷新。尤其是在四段八位數(shù)碼管等這些要選通的顯示設(shè)備上。在人類能夠接受的刷新頻率之內(nèi),大概每三十毫秒就要刷新一次。這就大大占用了處理器的處理時(shí)間,消耗了處理器的處理能力,還浪費(fèi)了處理器的功耗。鎖存器的使用可以大大的緩解處理器在這方面的壓力。當(dāng)處理器把數(shù)據(jù)傳輸?shù)芥i存器并將其鎖存后,鎖存器的輸出引腳便會(huì)一直保持?jǐn)?shù)據(jù)狀態(tài)直到下一次鎖存新的數(shù)據(jù)為止。這樣在數(shù)碼管的顯示內(nèi)容不變之前,處理器的處理時(shí)間和IO引腳便可以釋放??梢钥闯觯幚砥魈幚淼臅r(shí)間僅限于顯示內(nèi)容發(fā)生變化的時(shí)候,這在整個(gè)顯示時(shí)間上只是非常少的一個(gè)部分。而處理器在處理完后可以有更多的時(shí)間來執(zhí)行其他的任務(wù)。這就是鎖存器在LED和數(shù)碼管顯示方面的作用:節(jié)省了寶貴的MCU時(shí)間。 16位鎖存器源程序及其仿真波形library ieee。use 。use 。entity reg16b is port (load: in std_logic。 din: in std_logic_vector(15 downto 0)。 dout: out std_logic_vector(15 downto 0))。end reg16b。architecture art of reg16b isbegin process(load,din) begin if load39。event and load=
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1