Difficulty: Medium · Puzzle 3 of 6 · Topic: Testbench Debug Puzzles: Why Did the Test Hang?
Interview log: 'late_shutdown_seq waiting for grant' forever. The same sequence works in run_phase. Why does this version stall?
class late_test extends uvm_test;
\`uvm_component_utils(late_test)
virtual task shutdown_phase(uvm_phase phase);
late_shutdown_seq seq;
phase.raise_objection(this);
seq = late_shutdown_seq::type_id::create("seq");
seq.start(env.agent.seqr); // hangs
phase.drop_objection(this);
endtask
endclassCheck which components are still actively driving sequence items in this phase.
1) Print phase callbacks for sequencer and driver to see active phases per component.
2) Verify driver traffic loop is implemented in run/main and has already quiesced by shutdown.
3) Observe sequence waiting for grant because no consumer side is alive.
4) Move traffic sequence to run/main phase or keep driver active in matching phase domain.
5) Add a phase-compatibility check before starting traffic sequences.Answer: Bug: sequence is launched in shutdown_phase after driver traffic loop has ended. Fix: start it in the same active phase domain as the driver (typically run/main).
People chase arbitration settings, but this is phase alignment, not priority.
What diagnostics would you add to fail fast if a sequence starts in an incompatible phase?