Forum Discussion
Altera_Forum
Honored Contributor
9 years agoBasic example of lpm_counter1 disabled when in overflow
Hi all I need to have a counter that when overflows is set to a predefined value and stops counting. Then only an external signal of clear can restart (from 0) the counter. I thought to use the c...
Altera_Forum
Honored Contributor
9 years agocarry_out (the overflow) never goes high because you're clearing the counter before it ever has a chance to, at least in the simulation waveform you show here. Since you're using it as the clock for the dff (a big no-no since you're creating a gated clock; put it on clock enable for the dff instead), the output of the dff is dictated only by the A_clear signal.