VLSI DV Interview Puzzles · All levels

Missing run_phase Objection in Test

Some seeds appear as 'hangs' in CI because no PASS banner is printed and the harness waits. Simulation ends quickly, but traffic sequence did not complete. Identify the testbench bug.

Puzzle

Difficulty: Easy · Puzzle 2 of 6 · Topic: Testbench Debug Puzzles: Why Did the Test Hang?

Some seeds appear as 'hangs' in CI because no PASS banner is printed and the harness waits. Simulation ends quickly, but traffic sequence did not complete. Identify the testbench bug.

Code

systemverilog
class smoke_test extends uvm_test;
  \`uvm_component_utils(smoke_test)
  virtual task run_phase(uvm_phase phase);
    sanity_seq seq;
    seq = sanity_seq::type_id::create("seq");
    seq.start(env.agent.seqr);
    \`uvm_info("TEST", "run_phase done", UVM_LOW)
  endtask
endclass

Hint

Decide who owns end-of-test lifetime while seq is running.

Step-by-step solution

diagram
1) Check phase timeline and see run_phase can complete before downstream monitors/scoreboard finish.
2) Confirm no raise_objection/drop_objection around the sequence body.
3) Add explicit objection in test run_phase or use sequence automatic phase objections intentionally.
4) Re-run and verify test exits only after completion criteria is satisfied.
5) Add a guard log that prints objection count at run_phase entry/exit.

Answer

Answer: Bug: test run_phase has no objection ownership, so runtime can end before intended completion flow. Fix: bracket seq.start with phase.raise_objection/drop_objection (or equivalent sequence objection policy).

Why candidates get it wrong

Candidates confuse this with scoreboard deadlock; the real issue is phase lifetime ownership.

Interviewer follow-up

When would you prefer automatic objections on the sequence versus explicit objections in the test?

Related topics