Part 2 · Phases & Lifecycle · Intermediate
Objection Leak Triage: Hangs and Premature Ends
Diagnosing simulation hangs (objection never drops), instant pass (never raised), and drain_time side effects.
Two failure modes
Hang — simulation never ends
An objection was raised and never dropped. The phase objection count stays above zero forever. run_phase or a runtime sub-phase never completes.
Instant pass — test ends at time 0
No objection was raised, so run_phase ends immediately. Stimulus never runs. Often reports PASS if no check_phase guard exists.
[PHASE][UVM] objection count timeline
healthy:
raise(count=1) → ... work ... → drop(count=0) → phase ends
hang:
raise(count=1) → ... error path ... → (no drop) → count=1 forever
instant pass:
(no raise) → count=0 at time 0 → phase ends immediatelyTriage procedure
Run +UVM_OBJECTION_TRACE.
For hangs: find the last RAISE with no matching DROP — note component and reason string.
For instant pass: confirm zero RAISE entries before first phase END.
Check error/timeout branches for skipped drop_objection.
Verify drain_time is not unexpectedly large (adds delay but should still end).
// BUG: drop skipped on error path
task run_phase(uvm_phase phase);
phase.raise_objection(this);
if (!do_work()) begin
`uvm_error("RUN", "work failed")
return; // DROP SKIPPED — hang
end
phase.drop_objection(this);
endtask// FIX: drop on all paths (or use fork/join + final block pattern)
task run_phase(uvm_phase phase);
phase.raise_objection(this);
fork
do_work();
join
phase.drop_objection(this); // always reached
endtaskKey takeaways
OBJECTION_TRACE finds the exact component and reason for leaks.
Every raise must have a matching drop on all code paths.
Instant pass = missing raise; add check_phase zero-txn guard.
Common pitfalls
raise in fork without drop in parent — child objection lifecycle unclear.
Sequence starting_phase objection disabled and no manual raise.
Debugging hang with arbitrary timeout instead of fixing drop.
Propagation reminder
Child objections propagate to parent. Dropping at child does not end the phase if parent or sibling still objects. Trace the global count, not just the local component.
[PHASE][UVM] propagated objection tree
test.raise → env inherits → agent inherits
all must drop (or drain) before phase ends