Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Build a reloadable countdown timer

Hardware interview practice

Build a reloadable countdown timer

MediumRTL DesignSystemVerilog

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.

Try it in the question bankReason first. Then compare.

Keep this exact question selected while you check your answer and review the full solution.

Practice this question →
Reviewed example

Work through one case

Input
load value 3, observe three countdown edges; later load value 0
Expected output
busy during the first two countdown edges and expired pulses on the third; zero load pulses expired immediately and remains idle

A 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

  1. Loading has priority over counting.
  2. A value N expires after N active countdown edges.
  3. expired is a pulse, not a permanent idle indicator.
  4. A zero load expires immediately and leaves the timer idle.
asic.fyi · Learn silicon end to end.info@asic.fyi