Multiple Switch Debouncer in VHDL

Issue List
OUT OF RANGE vars #1
Closed jdoin opened this issue about 8 years ago— assigned to: jdoinBug
jdoin commented about 8 years ago

It was detected that simulation for Altera Quartus 11.0 + Modelsim 6.6d, the simulator reports "out of range" errors in the internal counter variables (cnt_next, cnt_reg).

This error was reported by Clive Bolton.

In Xilinx toolchain this aspect was not reported as an error.

jdoin was assigned about 8 years ago
jdoin commented about 8 years ago

This issue was corrected by declaring the range as <b>(CNT_VAL+1)</b> for the counter registers.<br/> In Xilinx ISE13.x, the cnt_next counter output flips over to 0 at the same clock cycle that the comparison <b>cnt_reg = CNT_VAL</b>, and the counter is reset at that same clock cycle.<br/> Probably the Xilinx tools resolve the overrange by static analysis, but Modelsim 6.6d fails to do so.<br/>

jdoin closed this about 8 years ago