【正文】
確性。四.頂層圖及相關(guān)模塊說明: 1. 頂層圖:說明:程序下載后自動(dòng)進(jìn)入計(jì)時(shí)狀態(tài),sa,sb,sc可分別調(diào)時(shí),分,秒。:(1)進(jìn)制模塊: : library ieee。use 。use 。entity ls160 is port ( data : in std_logic_vector(3 downto 0)。 clk,ld,p,t,clr : in std_logic。 count : buffer std_logic_vector(3 downto 0)。 tc:out std_logic)。end ls architecture behavior of ls160 isbegintc=39。139。 when (count =1001 and p=39。139。 and t=39。139。 and ld=39。139。 and clr=39。139。) else 39。039。cale: process(clk,clr,p,t,ld) begin if(rising_edge(clk)) then if(clk=39。139。) then if(ld=39。139。) then if(p=39。139。) then if(t=39。139。) then if(count=1001) then count=0000。 else count=count+1。 end if。 else count=count。 end if。 else count=count。 end if。 else count=data。 end if。 else count=0000。 end if。 end if。 end process cale。end be