【文章內(nèi)容簡介】
。公里計數(shù)器signal m1:std_logic_vector(2 downto 0)。分的十位計數(shù)器 signal m0:std_logic_vector(3 downto 0)。分的個位計數(shù)器signal en1,en0,f:std_logic。 使能信號 beginfenpin:process(clk_256,start) 分頻器模塊begin if clk_25639。event and clk_256=39。139。 then if start=39。039。 then q_16=0。q16=0。f_16=39。039。f16=39。039。f_1=39。039。f=39。039。 else if q_16=15 then q_16=0。f_16=39。139。 此if語句得到頻率為16Hz的信號 else q_16=q_16+1。f_16=39。039。 end if。 if q16=15 then q16=0。f16=39。139。 此if語句得到另一個頻率為16Hz的信號 else q16=q16+1。f16=39。039。 end if。 if q_1=255 then q_1=0。f_1=39。139。此if語句得到頻率為1Hz的信號 else q_1=q_1+1。f_1=39。039。 end if。 if en1=39。139。 then f=f_16。 此if語句得到計費脈沖f elsif en0=39。139。 then f=f16。 else f=39。039。 end if。 end if。 end if。end process。process(f_1) 等待計時模塊begin if f_139。event and f_1=39。139。 then if start=39。039。 then w=0。en1=39。039。en0=39。039。m1=000。m0=0000。k1=0000。k0=0000。 elsif stop=39。139。 then 等待計時模塊 if w=59 then w=0。 此if語句完成等待計時 if m0=1001 then m0=0000。 此if語句完成分計數(shù) if m1=101 then m1=000。 else m1=