Skip to content

Dropping an objection that was never raised is a fatal, not a no-op

objectionsUVM · runs take about 2 minutes

raise_objection() and drop_objection() drive a counter that decides when a phase may end, so every raise needs exactly one drop. Drop more than you raised and UVM reports UVM_FATAL (OBJTN_ZERO) rather than clamping the count at zero.

run_phase does its work (recorded = 42;) correctly, then drops an objection it never raised.

Right nowrecorded becomes 42, then a UVM_FATAL fires.

Fix run_phase so no UVM_FATAL occurs.

Source on GitHub

uvm_objection_never_raised.sv