Forum Discussion
a_x_h_75
Contributor
7 years agoRefer to your other post (please don't duplicate questions...)
https://forums.intel.com/s/question/0D50P000041tK2gSAE/how-to-print-counter-output-in-nios-console-
This behaviour is entirely expected. Your 'printf' statement will take thousands of clock cycles to complete. Meanwhile your 8-bit counter has wrapped many times giving you the appearance of a random output.
Increase your verilog counter size to 32-bit (along with your PIO input) and see what you get.
Cheers,
Alex