Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

Counter Bug

Hi all,

I am currently doing watchdog timer for my project. It consists of an 8 bit counter which reloads the user's value automatically when in timer mode, or stays at zero (in watchdog mode) when countdown is completed. It will also generate an underflow(Opposite of overflow I suppose?) signal when the counter has finished counting.

The problem that I have is about reloading the counter. When the counter counts down to zero, for a brief moment it goes up to FF, then loads the user's reload value. I want the counter to reload the user's value only, and not the FF. Furthermore, the underflow signal is only generated when the counter briefly loads the FF value, rather than zero.

Can anyone suggest the cause of this behaviour? I tried looking all over my code but I don't seem to find anything wrong. I've attached a screenshot of the problem. The counter value = 5 and the underflow is signal is represented by underrun_pulse_ff_in.

11 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Do you have an email address perhaps? I can't send a PM since my posts count is under 10......