Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Resettable progress watchdog

Hardware interview practice

Resettable progress watchdog

MediumTemporal ChecksSystemVerilog

Start a cycle-based watchdog that raises a fatal error after timeout_cycles sampled clock edges without progress. The testbench increments a monotonic progress counter whenever useful work completes.

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
timeout_cycles=5; progress_count increments at cycles 3 and 7, then stays unchanged through cycles 8..12
Expected output
each increment restarts the window; fatal timeout occurs after the five quiet samples at cycles 8..12

The checker samples after nonblocking assignments. An increment visible on the fifth sample is legal; otherwise that sample completes the timeout window.

What to cover

Requirements

  1. Run without blocking the caller.
  2. Initialize the monotonic progress counter before the watchdog starts.
  3. Treat timeout_cycles equal to zero as an immediate timeout without sampling a clock edge.
  4. Restart the full window whenever the sampled progress counter changes.
  5. Sample after nonblocking assignments so progress visible on the final allowed edge prevents a timeout.
asic.fyi · Learn silicon end to end.info@asic.fyi