【正文】
tor(3 downto 0))。 end if。 jingwei cout : out std_logic_vector(3 downto 0))。 p2 : process(q) begin if(q=9) then ca=en。 begin p1 : process(en,en2,clk,res) begin if(clk39。 end if。event and clk=39。039。 begin p1 : process(en,clk,res) begin if(clk39。 更多論文 7 when others=q=0000000。 DISP 模塊的設(shè)計(jì) 即七段譯碼器,如圖 14所示,對(duì)于輸入的 4位 BCD碼進(jìn)行譯碼,輸出 7位 , Q0~Q6分別外接數(shù)碼管 a~g段顯示。 use 。 architecture rtl of 6 is signal q : std_logic_vector(2 downto 0)。此數(shù)字鐘具有時(shí),分,秒計(jì)數(shù)顯示功能,以 24 小時(shí)為計(jì)數(shù)循環(huán);能實(shí)現(xiàn) 清零,調(diào)節(jié)小時(shí),分鐘 以及整點(diǎn)報(bào)時(shí)的功能。 entity 6 is port(res,clk : in std_logic。 end rtl。 q =cout。 when 0111=q=0100111。 更多論文 8 cout : out std_logic_vector(3 downto 0))。 end process p1。 end。 p2 : process(q) begin if(q=5) then ca=en。 jingwei cout : out std_logic_vector(3 downto 0))。 end if。 entity t61 is output minitute39。) then if(q=5) then q=0000。 use 。139。 end if。 elsif(clk39。 end process p2。039。 CNT61模塊的設(shè)計(jì) 六進(jìn)制計(jì)數(shù)器,輸出分的各位。139。 圖 18 library ieee。) then if(q=5) then q=0000。 圖 17 library ieee。139。如圖 16所示。 when 0001=q=0000110。 when 001=cout:=b。) then if(q=5) then q=000。兩者設(shè)計(jì)方式,功能實(shí)現(xiàn)方面都差不多,作品中選擇的是方案一。 方案二也采用自頂向下的設(shè)計(jì)方法,它由秒計(jì)數(shù)模塊,分計(jì)數(shù)模塊,小時(shí)計(jì)數(shù)模塊,報(bào)警模塊,秒分時(shí)設(shè)置模塊和譯碼模塊六部分組成。139。 begin case sel is when 000=cout:=a。 architecture one of disp is begin process(d) begin case d is when 0000=q=0111111。 CLK為秒信號(hào); RES是復(fù)位信號(hào),與 CLK同步; EN為選通信號(hào); COUT