DescriptionQ296
Q296DesignDVASIC interview problem
Build a reloadable countdown timer
TechniquesCounterPulsePriorityBFM
DifficultyEasy
TopicRTL Design
LanguageSystemVerilog
Requirements4 checkpoints
01
Problem
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.
Example input and output
Use this case to check your interpretationInput
load value 3, observe three countdown edges; later load value 0Output
busy during the first two countdown edges and expired pulses on the third; zero load pulses expired immediately and remains idleExplanation
A nonzero N expires after exactly N active edges, while load priority and the zero special case each produce one-cycle pulses.
02
Requirements (4)
- 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.
