【正文】
14。end process。 _ when others=null。 8 when 9=d=1101111。 6 when 7=d=0000111。 4 when 5=d=1101101。 2 when 3=d=1001111。 0 when 1=d=0000110。 sel=w。 end case。 when 111=n=h1。 when 101=n=10。 when 011=n=m0。 when 001=n=s1。 end if。 else w=w+1。139。數(shù)碼管位選weixuan:process(clk,w) isbegin if clk39。 end case。 when 1001=num=9。 when 0111=num=7。 when 0101=num=5。 when 0011=num=3。 when 0001=num=1。 end process。 when others =null。 when 20 to 23 =h1=2。 when 10 to 19 =h1=1。 case h is when 0 to 9 =h1=0。 end if。 then if h=23 then h=0。event and c3=39。 end process。 end if。139。 end if。 c3=39。139。 then if m1=5 then m1=0。 then if en=39。event and c2=39。 end process。 end if。139。 end if。 c2=39。139。 then if m0=9 then m0=0。 then if en=39。event and c1=39。 end process。 end if。139。 end if。 c1=39。139。 then if s1=5 then s1=0。 then if en=39。event and c0=39。 end process。 end if。139。 end if。 c0=39。139。 then if s0=9 then s0=0。 then if en=39。event and t=39。 end process。 end if。139。 begin if clk39。 進位信號signal w:std_logic_vector(2 downto 0)。秒,分,時signal h:integer range 0 to 23。置數(shù)值signal n:integer range 0 to 10。architecture behaver of dzb issignal t: