Forum Discussion
Altera_Forum
Honored Contributor
11 years agoHelp with reseting counet
Hey, I've written a simple counter code When the cnt = 5 the signal std_logic_vector Inc +'1' Now I want you end this process when It's equal to "1111"; Everytime I try to end this I ...
Altera_Forum
Honored Contributor
11 years ago --- Quote Start --- Tried what? I dont see any new code. Have you tried this:
Process (clk)
Begin
If clk 'event and clk=' 1' then
Cnt<=cnt+1;
if f_out /= "1111" then
If cnt=5 then
F_Out<=f_out+'1';
Cnt<=0;
Elsif cnt=5 then
If f_out="1111" then
F_F_out<="1111"
Cnt<=0;
End if;
End if;
end if;
End if;
End process;
--- Quote End --- Thanks man! It worked I don't know how I didn't think about "/=" inequality