Hardware interview practice
Build a reloadable countdown timer
Design a parameterized countdown timer with load, load_value, busy, and a one-cycle expired pulse. Add a BFM task that starts a nonzero delay and waits for expiry.
Reviewed example
Work through one case
Input
load value 3, observe three countdown edges; later load value 0Expected output
busy during the first two countdown edges and expired pulses on the third; zero load pulses expired immediately and remains idleA nonzero N expires after exactly N active edges, while load priority and the zero special case each produce one-cycle pulses.
What to cover
Requirements
- Loading has priority over counting.
- A value N expires after N active countdown edges.
- expired is a pulse, not a permanent idle indicator.
- A zero load expires immediately and leaves the timer idle.
