SystemVerilog · Easy · SystemVerilog

Simulation Timeout Watchdog

Prevent a hung test from running forever.

Task

Fork the main test and a watchdog. The watchdog must call $fatal if done is not observed within 1000 clock cycles.

Examples

Constraints

What this problem is testing

The interviewer is usually testing language semantics as much as syntax: driver intent, scheduling, type behavior, interface directionality, and whether the construct communicates hardware intent clearly.

Interview habit: before coding, state reset behavior, the state that must be stored, and the conditions that update each output.

Verification plan

Common mistakes

Interview follow-up questions

Concepts to review

testbench, timeout, watchdog

Open Simulation Timeout Watchdog in the HDLForge interactive editor.

Related problems

Explore the SystemVerilog Practice & Interview Preparation hub.

Continue practising