怎样分析下面的程序?
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 分频! ( CLK_IN' event and CLK_IN = '1' and CLK_CS = '0' )
门控时钟,不太好吧! 哦!那怎样菜是好点的呢》一般的!谢谢了! if ( CLK_IN' event and CLK_IN = '1' )then
if( CLK_CS = '0') then
..... 好,谢谢了!
页:
[1]