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.

diagram
[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 immediately

Triage procedure

  1. Run +UVM_OBJECTION_TRACE.

  2. For hangs: find the last RAISE with no matching DROP — note component and reason string.

  3. For instant pass: confirm zero RAISE entries before first phase END.

  4. Check error/timeout branches for skipped drop_objection.

  5. Verify drain_time is not unexpectedly large (adds delay but should still end).

systemverilog
// 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
systemverilog
// 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
endtask

Key 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.

diagram
[PHASE][UVM] propagated objection tree

test.raise  env inherits  agent inherits
all must drop (or drain) before phase ends