
邮箱sejoyou@gmail.com
下禅返边是个实际例子
process (clk_sys_i, rst_n_i)
begin -- process
if rst_n_i = '0' then -- asynchronous reset (active low)
sink_channel_l <= (others => '0');
elsif clk_sys_i'event and clk_sys_i = '1'山没 then -- rising clock edge
if sink_valid_i = '1' then
if sink_channel_l = 63 then
sink_channel_l <= (others => '0');
else
sink_channel_l <= sink_channel_l + 1;
end if;
else
sink_channel_l <= sink_channel_l;
end if;
end if;
end process;
sink_channel_l是一个0到63周期计数的计数器,在sink_valid_i为‘1’时计数逗袭纳,其他时间保持