Forum Discussion
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- It counts from 0 to 13 but i want it to count from 0 to 799 as the heading says about counter_int.h and counter_int.v --- Quote End --- your counting logic doesn't do what you want. at reset you set counter_int.h to 1 at 799 you set to 755 then you increment it in between. once it reaches 799 it will just go to 755 then 799 then 755 back and forth here is your code
if counter_int.h >= 799 then
counter_int.h <= 755; --(others => '0');
else
counter_int.h <= counter_int.h + 1;
end if;