Forum Discussion
Altera_Forum
Honored Contributor
14 years agoThe code compiles correctly in Quartus. I don't see a problem, that can be expected to cause problems in max+plus2.
Apart from this point, som design details seems questionable in the code: - why are counting input events mutual exlusive (using else if). - do you intend to count 0 to 10, as the code does, or 0 to 9? - do you want to count negative edges or sample low state? - assuming the inputs are unrelated to CLK, synchronizing would be required to avoid wrong counting