counter0pro:process(reset,clk)--counter0为分频计数器,counter0=x"09"表示分频数为(9+1)即10分频 begin if reset='1'then counter0<=x"00"; elsif clk'event and clk='1'then if counterO=x"09"then counter0<=x"00"; else counter0<=counter0+1; end if; end if; end process;