Part 8 · Checking & Coverage · Intermediate

Severities and Actions

uvm_info, uvm_warning, uvm_error, uvm_fatal — behavior, counting, and action flags.

Four severities

systemverilog
`uvm_info("SCB", "matched id=0x42", UVM_HIGH)    // verbosity-gated
`uvm_warning("CFG", "default timeout used")           // always prints, no count
`uvm_error("SCB_MISMATCH", "addr 0x1000 exp=FF act=00") // always prints, counts
`uvm_fatal("NOVIF_APB", "vif not set in config_db")    // prints, counts, stops sim
diagram
Legend: [UVM]

  SEVERITY DECISION TREE — which macro to use?

  Is the condition a test failure?
       │
       ├─ NO ── Is it informational debug output?
       │           ├─ YES  `uvm_info("ID", msg, UVM_HIGH)
       │           └─ NO   `uvm_warning("ID", msg)
       │
       └─ YES ── Can simulation continue meaningfully?
                   ├─ YES  `uvm_error("ID", msg)   ← counts toward FAIL
                   └─ NO   `uvm_fatal("ID", msg)   ← counts + stops sim

  Rule of thumb:
  • uvm_info    — debug visibility, no impact on PASS/FAIL
  • uvm_warning — unexpected but non-fatal (missing config default)
  • uvm_error   — check failure, sim continues, test will FAIL
  • uvm_fatal   — unrecoverable (no vif, null pointer), sim stops

Action flags and counting behavior

Action flags

diagram
Action Flag     Effect
──────────────────────────────────────────────────────
UVM_DISPLAY     Print message to stdout (sim log)
UVM_LOG         Write message to report log file
UVM_COUNT       Increment severity counter on report server
UVM_EXIT        Stop simulation immediately (fatal default)
UVM_STOP        Stop simulation after current delta cycle

Default actions by severity:
  uvm_info     DISPLAY | LOG
  uvm_warning  DISPLAY | LOG | COUNT  (warning count tracked)
  uvm_error    DISPLAY | LOG | COUNT
  uvm_fatal    DISPLAY | LOG | COUNT | EXIT

Severity comparison table

diagram
Severity      Verbosity-gated?  Counts?   Stops sim?  Use for
──────────────────────────────────────────────────────────────────────
UVM_INFO      YES               NO        NO        debug visibility
UVM_WARNING   NO                YES*      NO        unexpected non-fatal
UVM_ERROR     NO                YES       NO        check failures
UVM_FATAL     NO                YES       YES       unrecoverable errors

* warning count tracked but typically not used for PASS/FAIL
systemverilog
// Override action for a component — suppress display, keep count
set_report_severity_action(UVM_ERROR, UVM_LOG | UVM_COUNT);

// Max quit count — stop after N errors (avoid log explosion)
set_report_max_quit_count(50);
// Or via plusarg: simv +UVM_MAX_QUIT_COUNT=100

Key takeaways

  • Only uvm_info is verbosity-gated; errors and fatals always print and count.

  • Use uvm_error for check failures; uvm_fatal only when sim cannot continue.

  • set_report_max_quit_count prevents runaway error loops in broken tests.

Common pitfalls

  • uvm_info for check failures — test passes even when condition is wrong.

  • uvm_fatal for recoverable mismatches — stops sim before check_phase drain.

  • uvm_warning for real bugs — warnings do not fail the test.