【文章內(nèi)容簡介】
VHDL,模擬器對編輯后的程序進(jìn)行模擬,如果達(dá)不到設(shè)計要求,則可以重新修改程序,直到通過功能模擬。 (3) 邏輯綜合與優(yōu)化 將通過功能模擬的程序放到 VHDL 編譯器中,進(jìn)行邏輯綜合與優(yōu)化。 (4) 門級模擬對電路用 VHDL。仿真器仿真??蓪﹂T級電路的延時、定時狀態(tài)、驅(qū)動能力等進(jìn)行仿真 。如不符合要求,可重復(fù)步驟 (3),再門級模擬,直到符合要求止。 (5) 版圖生成 用相應(yīng)的軟件處理后,就可以拿去制版。 第 三 章 數(shù)字 電子鐘的工作原理 系統(tǒng)設(shè)計方案 頂層原理圖 秒和分鐘計數(shù)器 功 能: 60 進(jìn)制計數(shù)器 接 口: clk 時鐘輸入 qout1個位 BCD 輸出 qout2十位 BCD 輸出 carry進(jìn)位信號輸出 library ieee。 use 。 use 。 use 。 entity fen60 is port (clk : in std_logic。 rst : in std_logic。 qout1 : out std_logic_vector(3 downto 0)。 qout2 : out std_logic_vector(3 downto 0)。 carry : out std_logic )。 end fen60。 architecture behave of fen60 is signal tem1:std_logic_vector(3 downto 0)。 signal tem2:std_logic_vector(3 downto 0)。 begin process(clk,rst) begin if(rst=39。039。)then tem1=0000。 tem2=0000。 elsif clk39。event and clk=39。139。 then if tem1=1001 then tem1=0000。 if tem2=0101 then tem2=0000。 carry=39。139。 else tem2=tem2+1。 carry=39。039。 end if。 else tem1=tem1+1。 end if。 end if。 qout1=tem1。 qout2=tem2。 end process。 end behave。 小時計數(shù)器 實(shí)體名: fen24 功 能: 24 進(jìn)制計數(shù)器 接 口: clk 時鐘輸入 qout1個位 BCD 輸出 qout2十位 BCD 輸出 carry進(jìn)位信號輸出 library ieee。 use 。 use 。 use 。 entity fen24 is port (clk : in std_logic。 rst : in std_logic。 qout1 : out std_logic_vector(3 downto 0)。 qout2 : out std_logic_vector(3 downto 0)。 carry : out std_logic )。 end fen24。 architecture behave of fen24 is signal tem1:std_logic_vector(3 downto 0)。 signal tem2:std_logic_vector(3 downto 0)。 begin process(clk,rst) begin if(rst=39。039。)then tem1=0010。 tem2=0001。 elsif clk39。event and clk=39。139。 then if (tem2=0010 and tem1=0011) then tem1=0000。 tem2=0000。 carry=39。139。 else carry=39。039。 if tem1=1001 then tem1=0000。 if tem2=1001 then tem2=0000。 else tem2=tem2+1。 end if。 else tem1=tem1+1。 end if。 end if。 end if。 qout1=tem1。 qout2=tem2。 end process。 end behave。 六選一的控制電路 實(shí)體名: sel 功 能:實(shí)現(xiàn)六個數(shù)碼顯示管掃描顯示 接 口: clk 時鐘輸入 qin1第一個數(shù)碼顯示管要顯示內(nèi)容