Skip to the selected question
ASIC.FYI

ASIC Question Bank

1,000+ hardware interview questions
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 interpretation
Input
load value 3, observe three countdown edges; later load value 0
Output
busy during the first two countdown edges and expired pulses on the third; zero load pulses expired immediately and remains idle
Explanation

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.