|
div: process ( CLK_RST,CLK_IN,CLK_CS )
begin
if ( CLK_RST = '0' ) then
CLK_CLK <= '1';
CLK_CNT <= ( others => '0' );
elsif ( CLK_IN' event and CLK_IN = '1' and CLK_CS = '0' ) then
if ( CLK_CNT = CLK_NUM ) then
CLK_CLK <= not CLK_CLK;
CLK_CNT <= ( others => '0' );
end if;
CLK_CNT <= CLK_CNT + 1;
end if;
end process div;
和
div: process ( CLK_RST,CLK_IN,CLK_CS )
begin
if ( CLK_RST = '0' ) then
CLK_CLK <= '1';
CLK_CNT <= ( others => '0' );
elsif ( CLK_IN' event and CLK_IN = '1' and CLK_CS = '0' ) then
CLK_CNT <= CLK_CNT + 1;
if ( CLK_CNT = CLK_NUM ) then
CLK_CLK <= not CLK_CLK;
CLK_CNT <= ( others => '0' );
end if;
end if;
end process div;
第一个好像是进行512分频,第个个才进行CLK_NUM 分频! |
阿莫论坛20周年了!感谢大家的支持与爱护!!
一只鸟敢站在脆弱的枝条上歇脚,它依仗的不是枝条不会断,而是自己有翅膀,会飞。
|