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.
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
endclassDecide who owns end-of-test lifetime while seq is running.
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: 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).
Candidates confuse this with scoreboard deadlock; the real issue is phase lifetime ownership.
When would you prefer automatic objections on the sequence versus explicit objections in the test?