【正文】
t1+1。 if t1=n1/2 then f1=39。039。 else f1=39。139。 end if。 if t1=n11 then t1=0。 end if。 end if。 end process。 end architecture getsec。 計(jì)數(shù)器模塊 cout 的 VHDL 語(yǔ)言程序代碼: library ieee。 use 。 use 。 entity cout is port(clk:in std_logic。 1,2,3,4:out std_logic_vector(3 downto 0))。 end 。 architecture c10 of cout is signal temp1,temp2,temp3,temp4:std_logic_vector(3 downto 0)。 signal g,s,b:std_logic。 begin p1:process(clk) begin if( clk39。event and clk=39。139。 )then if temp11001then temp1=temp1+1。g=39。039。 else temp1=0000。g=39。139。 end if。 end if。 end process p1。 p2:process(g) begin if( g39。event and g=39。139。 )then if temp21001then temp2=temp2+1。s=39。039。