Parallel Counter Block Diagram File Problem
When creating a 4-bit parallel counter block diagram file with shortened sequence (mod 10 decade) using Quartus Prime Lite 18.0 (see attached), have found what seems to be an inconsistent behavior. University program VWF functional simulation of the counter indicates correct operation (e.g. count from 0000 - 1001). When downloading and programming DE10Lite FPGA board (MAX10 based) with this code using debounced switch input (KEY[0] or KEY[1]), counter does not count in the same sequence (0000 - 0111 and reset or other mod-8 sequence). If the counter is allowed to count its full sequence (0000 - 1111) by removal of NAND gate on clear lines, or if the inputs to the NAND gate are changed to other MOD-numbers (e.g. MOD-12, etc.) with this same input, no error is seen in simulation or in testing with download to hardware. Use of internal clock on this board with divider (50 MHz and MOD 50000000 LPM_count) with MSB as input to provide 1 Hz clock input to this counter in place of the momentary debounced switch provided same results in both cases (e.g. incorrect count of MOD-10, but correct count for MOD-12).
Has anyone had a similar experience? Is it possible that this is a schematic problem based on connections in BDF creation?
Thanks