wr_next <= '1';
address_next <= '0' & std_logic_vector(unsigned(s_cnt_int) - 1);
data_in_next <= (others => '0');
- s_cnt_next <= std_logic_vector(unsigned(s_cnt_int) - 1);
+ if unsigned(s_cnt_int) /= 0 then
+ s_cnt_next <= std_logic_vector(unsigned(s_cnt_int) - 1);
+ end if;
when S_S_FIN =>
finished_next <= '1';
s_cnt_next <= (0 => '1', others => '0');