|
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周年了!感谢大家的支持与爱护!!
知道什么是神吗?其实神本来也是人,只不过神做了人做不到的事情 所以才成了神。 (头文字D, 杜汶泽)
|