Part 11 · Senior Prep · Intermediate
Interview Q&A: Sequence Debug Triage
Model answers on hang classification, finish_item vs start_item stalls, objection leaks, sequencer verbosity, and minimal reproducers.
Hang classification
Q: Simulation hangs — is it sequence, driver, or objection?
[INT][SENIOR][UVM] MODEL ANSWER
Q: Hang triage — sequence vs driver vs objection?
A:
MECHANISM: Objection leak → run_phase never ends. finish_item hang → driver
missing item_done. start_item hang → lock/arbitration block.
MOTIVATION: Three different root causes — same symptom, different first moves.
WHEN: Any UVM hang — classify before opening waves.
STEPS: 1) phase.phase_done.display_objections(). 2) Last UVM_INFO before hang.
3) If finish_item: driver get_next_item/item_done logs. 4) If start_item: lock audit.
PITFALL: Waveform-first debug on UVM hang — wastes 30+ minutes routinely.
EXAMPLE: display_objections shows vseq fork branch still holding — not driver bug.Q: Sequence blocks at finish_item — your debug steps?
[INT][SENIOR][UVM] MODEL ANSWER
Q: Blocked at finish_item?
A:
MECHANISM: finish_item waits for item_done from driver on current item.
MOTIVATION: Driver not running, not pulling, or stuck in drive task without completing.
STEPS: 1) Confirm run_phase active (objections raised). 2) Driver: last log before hang.
3) vif assigned? reset done? 4) Protocol ready wait infinite? 5) item_done on all paths?
PITFALL: Assuming sequencer bug — usually driver or vif/config issue.
EXAMPLE: Driver stuck on wait(vif.pready) — DUT never ready; finish_item forever.Q: Sequence blocks at start_item — causes?
[INT][SENIOR][UVM] MODEL ANSWER
Q: Blocked at start_item?
A:
MECHANISM: start_item waits for sequencer grant — blocked by lock, grab, or
arbitration never selecting this sequence.
MOTIVATION: Different from finish_item — arbitration layer, not driver layer.
STEPS: 1) UVM_FULL sequencer print — lock holder? 2) Audit unlock on all paths.
3) Priority/arb mode starving seq? 4) Driver still processing prior item?
PITFALL: Debugging driver when prog_seq holds lock from 500 cycles ago.
EXAMPLE: Forgotten unlock in prog_seq break branch — bg_seq stuck at start_item.[INT][SENIOR][UVM] hang decision tree
Hang?
├─ run_phase never ends → display_objections (objection leak)
├─ finish_item block → driver item_done / vif / reset
└─ start_item block → lock / arbitration / priorityKey takeaways
Classify hang location first: objection vs finish_item vs start_item.
finish_item → driver path; start_item → sequencer arbitration path.
display_objections before waves — senior interview expectation.
Common pitfalls
Timeout increase masking missing item_done — fixes symptom not cause.
Assuming one cause — forked vseq can hold objection while driver idle.
Minimal repro and verbosity
Q: How do you build a minimal sequence reproducer?
[INT][SENIOR][UVM] MODEL ANSWER
Q: Minimal sequence repro?
A:
MECHANISM: Strip to one sequence, one item, same seed+plusargs, disable bg traffic.
MOTIVATION: Isolates handshake from arbitration and multi-agent noise.
WHEN: Nightly random fail — repro locally before filing bug.
STEPS: 1) Same seed. 2) Disable seq_lib → single directed seq. 3) Kill bg seq.
4) UVM_VERBOSITY=UVM_HIGH on driver+sequencer. 5) Shrink item count to 1.
PITFALL: Repro with different cfg (is_active, clock) — false negative.
EXAMPLE: axi_rand fail seed 4099 → axi_single_wr_seq only, seed 4099, reproduces hang.Q: What verbosity helps sequence debug?
[INT][SENIOR][UVM] MODEL ANSWER
Q: Verbosity for sequence debug?
A:
MECHANISM: UVM_HIGH on driver for get_next_item/item_done; UVM_FULL on sequencer
for arbitration/lock; phase objection display API.
MOTIVATION: Structured logs localize stall to layer in minutes.
WHEN: Any hang triage; +uvm_set_verbosity for targeted components.
PITFALL: UVM_NONE everywhere in regression — zero triage data on failure.
EXAMPLE: +uvm_set_verbosity=*,uvm_sequencer,UVM,500,UVM_FULL shows lock holder name.Q: Virtual sequence fork caused hang — debug approach?
[INT][SENIOR][UVM] MODEL ANSWER
Q: Vseq fork hang?
A:
MECHANISM: fork/join waits for branches; join_none + early drop_objection kills
branches; one branch hung at finish_item blocks join forever.
MOTIVATION: Multi-agent hangs need per-branch classification.
STEPS: 1) Identify which branch last logged. 2) disable fork branches one-by-one.
3) Check join vs join_none vs objection timing. 4) Per-branch finish_item probe.
PITFALL: drop_objection in test while vseq fork/join still running — partial scenario.
EXAMPLE: axi branch hung on finish_item; apb branch done — join waits on axi driver bug.Q: How do you prevent sequence hangs in code review?
[INT][SENIOR][UVM] MODEL ANSWER
Q: Code review — sequence hang prevention?
A:
MECHANISM: Checklist: item_done all paths, unlock all paths, objection pairing,
no seq.start before run_phase, fork/join matches objection scope.
MOTIVATION: Most hangs are review-catchable — not exotic simulator bugs.
WHEN: Every sequence PR; VIP integration reviews.
PITFALL: Reviewing randomization only — handshake/lifecycle ignored.
EXAMPLE: Reviewer flags: driver wait(pready) has no timeout — reject until bounded.Key takeaways
Minimal repro: same seed, one seq, one item, bg traffic off.
Layer-specific verbosity: sequencer for start_item, driver for finish_item.
Vseq fork hangs — isolate branch, check join vs objection timing.
Common pitfalls
Reproducing with different plusargs — false 'cannot reproduce'.
Killing fork with join_none without documenting objection ownership.