JacquesKleynhans
Member level 2
Counter help needed
I get latches in my synplify because the following counter is not created with a clock. I have tried to use the conventional clock with an enable to generate a counter as described here, but it still doesn't work. It works in pre synth but latches up in post synth. Can some please help me solve this issue.
or maybe suggest a better way of toggling between states and then when number is reached proceeding to next state. I need to use the scheme to add delays and generate clock for my async nand interface.
kindest regards
I get latches in my synplify because the following counter is not created with a clock. I have tried to use the conventional clock with an enable to generate a counter as described here, but it still doesn't work. It works in pre synth but latches up in post synth. Can some please help me solve this issue.
Code:
...
signal counter : std_logic_vector(10 downto 0);
...
when state 1 =>
counter <= std_logic_vector(unsigned (counter) + 1 );
state_next <=state 2;
when state 2 =>
if unsigned(counter) = 1057 then
state_next <= state 3;
count <= (others => '0');
else
state_next <= state 2;
end if;
when state 3 =>
state_next <= idle;
or maybe suggest a better way of toggling between states and then when number is reached proceeding to next state. I need to use the scheme to add delays and generate clock for my async nand interface.
kindest regards