Processes | |
FREQ_DIVIDE | ( reset , clk ) |
Signals | |
lcnt | std_logic_vector ( integer ( log2 ( real ( clk_frequency ) ) ) downto 0 ) |
lcnt (1ms間隔) |
freqdiv.vhd の 33 行で定義されています。
FREQ_DIVIDE | ( | reset , |
clk ) |
1KHzに分周する
freqdiv.vhd の 38 行で定義されています。
00038 FREQ_DIVIDE : process(reset, clk) begin -- Lighting frequency is 1KHz 00039 if reset='1' then 00040 lcnt <= (others => '0'); 00041 elsif clk'event and clk='1' then 00042 if lcnt = conv_std_logic_vector(clk_frequency, integer(log2(real(clk_frequency)))+1) then 00043 lcnt <= (others => '0'); 00044 else 00045 lcnt <= lcnt + 1; 00046 end if; 00047 end if; 00048 end process FREQ_DIVIDE;