【正文】
if t4=clki/8 then t4:=0。 sys_clk4=not sys_clk4。 end if。 if t64=clki/128 then t64:=0。 sys_clk64=not sys_clk64。 end if。 if t500=clki/1000 then t500:=0。 sys_clk500=not sys_clk500。 end if。 if t1k=clki/2000 then t1k:=0。 sys_clk1k=not sys_clk1k。 end if。 end if。 end process p_sys_clk。 p_c:process(SAc,SBc,SCc,SDc) begin if SAc=39。139。 and SDc=39。039。 then clk_h=sys_clk4。 else clk_h=c_m。 end if。 if SAc=39。139。 and SDc=39。139。 then sys_clk4_NL_h=sys_clk4。 else sys_clk4_NL_h=39。039。 end if。 if SBc=39。139。 and SDc=39。039。then clk_m=sys_clk4。 else clk_m=c_s。 end if。 if SBc=39。139。 and SDc=39。139。then sys_clk4_NL_m=sys_clk4。 else sys_clk4_NL_m=39。039。 end if。 if SDc=39。039。 then dout(7 downto 0)=reg_s。 dout(15 downto 8)=reg_m。 dout(23 downto 16)=reg_h。 else dout(7 downto 0)=ZZZZZZZZ。 dout(15 downto 8)=NL_reg_m。 dout(23 downto 16)=NL_reg_h。 end if。 end process p_c。P_ring:process(reg_m,reg_s,sys_clk1k)variable clk_ring_t:std_logic。variable t:std_logic_vector(3 downto 0)。begin if reg_m=X59 and (reg_s=X50 or reg_s=X52 or reg_s=X54 or reg_s=X56 or reg_s=X58) then clk_ring_t:=sys_clk500。 elsif reg_m=X00 and reg_s=X00 then clk_ring_t:=sys_clk1k。 else clk_ring_t:=39。Z39。 end if。 if NL_ring=39。139。 then clk_ring_t:=sys_clk1k。 end if。 if sys_clk1k 39。event and sys_clk1k=39。139。 then t:=t+1。 end if。 if t1 then mh=39。139。 end if。 clk_ring=clk_ring_t。end process p_ring。end rtl。12 / 1