VLSI DV Interview Puzzles · All levels
Wrong Phase: Starting Traffic in shutdown_phase
Interview log: 'late_shutdown_seq waiting for grant' forever. The same sequence works in run_phase. Why does this version stall?
Puzzle
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?
Code
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
endclassHint
Check which components are still actively driving sequence items in this phase.
Step-by-step solution
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
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).
Why candidates get it wrong
People chase arbitration settings, but this is phase alignment, not priority.
Interviewer follow-up
What diagnostics would you add to fail fast if a sequence starts in an incompatible phase?