我是看别人的代码中有这样一个进程,有点疑问:
process(TXCLK,reset,busy,SAMPLE)
begin
if(falling_edge(TXCLK)) then
if(reset = '1') then
i_counter <= (others => '0');
start <= '1';
elsif(busy = '0') then
i_counter <= i_counter + '1';
start <= '1';
IF(SAMPLE = "110") THEN -- 96K
if(i_counter = "0011110") then -- 30
i_counter <= i_counter;
elsif(i_counter = "0011101") then -- 29
i_ping_pong <= not i_ping_pong;
end if;
ELSE
if(i_counter = "1000010") then --66
i_counter <= i_counter;
elsif(i_counter = "1000001") then --65
i_ping_pong <= not i_ping_pong;
end if;
END IF;
else
start <= '0';
end if;
end if;
end process;
按这种写法的话,当i_counter=66时,前面的语句是执行+1操作,后面的是进行了保持的操作,请问这样有问题吗?求解释。谢谢! |