Forum Discussion
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- Thanks Kaz, any logical tips on how the code should look, but what is strange is it counts from 0 to 12, even after i tried to modify the code. Is there something else that may be influencing the count? --- Quote End --- I don't expect a counter code like yours to count 0~12. The only connection is that 12 = 1100 and 799 = 1100011111 I have never used record type like you are doing and you may better avoid it as we are more familiar with say unsigned or integer type. so remove the record type and declare two counters as integers 0 ~ 799 or whatever and let us see. additionally avoid using multiple libraries. use numeric_std instead. I believe your counting logic is so wrong that most of it is optimised away givimg unexpected results.