【正文】
end case。 gewei=a。end architecture rtl。use 。entity minute is port(clk,rst:in std_logic。 mshiwei:out std_logic_vector(3 downto 0)。end entity minute。signal c:std_logic_vector(7 downto 0)。m。139。 n=0000。039。event and clk=39。)then m=m+1。 n=n+1。 end if。 m=0000。 case c is when 01011001=enhour=39。 when others=enhour=null。 end process。 mshiwei=n。其模塊仿真圖為: 時(shí)計(jì)數(shù)模塊library ieee。use 。 hshiwei:out std_logic_vector(3 downto 0)。end entity hour。 begin process(clk,rst) begin if(rst=39。)then p=0000。 elsif(clk39。139。 if(p=1001)then p=0000。 end if。 if(q=0010 and p=0100)then p=0000。 end if。 hgewei=p。end architecture rtl。use 。entity set isport(sel:in std_logic。 key:in std_logic。end entity set。beginprocess(sel)is begincase