Part 10 · Advanced Topics · Intermediate

Built-in UVM Plusargs: First-Class Runtime Controls

Using standard UVM command-line arguments for test selection, verbosity, and deterministic run behavior.

Use built-ins before custom knobs

Built-in plusargs are understood by tools, tutorials, and most DV engineers. They reduce cognitive load and avoid re-implementing behavior that UVM already supports.

At minimum, every regression flow should standardize +UVM_TESTNAME, +UVM_VERBOSITY, and your simulator's seed control option.

bash
# Typical runtime entry point
simv +UVM_TESTNAME=axi_burst_test \
     +UVM_VERBOSITY=UVM_MEDIUM \
     +ntb_random_seed=12345
  • +UVM_TESTNAME chooses test class when run_test() has no explicit argument.

  • +UVM_VERBOSITY sets global threshold; per-component tuning can refine it.

  • Pair with explicit seed control for deterministic replay.


Built-in controls cheat sheet

diagram
[UVM] built-in plusarg table

  Plusarg                      Purpose                                   Common usage
  ---------------------------------------------------------------------------------------------
  +UVM_TESTNAME=<class>        Select test class at runtime             matrix over tests
  +UVM_VERBOSITY=<level>       Set global verbosity threshold           quiet farm / loud debug
  +uvm_set_verbosity=...       Targeted verbosity by path/ID/phase      focused debug logging
  +uvm_set_config_int=...      Inject integer config_db value            timeout, depth, enables
  +uvm_set_config_string=...   Inject string config_db value             mode names, file paths
  +uvm_set_default_sequence=...Set phase default sequence                directed smoke bring-up

Standardize a project CLI guide so engineers do not guess syntax. Most runtime bugs are not logic bugs; they are malformed argument strings.

diagram
[ADV] malformed argument examples

  Intended: +UVM_TESTNAME=my_test
  Mistyped: +UVM_TEST=my_test            # silently ignored by UVM

  Intended: +UVM_VERBOSITY=UVM_HIGH
  Mistyped: +UVM_VERBOSITY=HIGH          # may map unexpectedly or fail parsing

Verbosity control strategies

Global verbosity is blunt; targeted verbosity is scalable. Keep farm runs quiet and turn on depth only for the component and report ID under investigation.

bash
# Quiet default regression
simv +UVM_TESTNAME=smoke_test +UVM_VERBOSITY=UVM_LOW

# Focused scoreboard debug for run phase
simv +UVM_TESTNAME=smoke_test \
     +UVM_VERBOSITY=UVM_LOW \
     +uvm_set_verbosity=uvm_test_top.env.scb,SCB,UVM_HIGH,run
diagram
[UVM] verbosity plan

  Environment scale         Recommended global default
  ------------------------------------------------------------
  Local bring-up            UVM_MEDIUM
  Nightly regressions       UVM_LOW
  Debug replay              UVM_LOW + targeted overrides
  Deep protocol triage      targeted UVM_HIGH/UVM_FULL only
  • Do not run whole regressions at UVM_FULL; it destroys throughput.

  • Keep report IDs stable so targeted verbosity commands remain reusable.

  • Document known useful debug presets in scripts.


Built-in adoption checklist

A mature CLI flow uses built-ins consistently across all projects and scripts. That consistency is a force multiplier when teams share infrastructure.

  1. All tests launched through run_test() with CLI-selected class names.

  2. Seed source recorded in every run log at UVM_NONE or equivalent always-on level.

  3. Global verbosity kept low; targeted verbosity wrappers available in scripts.

  4. Common built-in argument examples versioned in regression docs.

  5. CI validates malformed built-in args fail fast or are explicitly reported.

diagram
[ADV] readiness scorecard

  Criterion                                           Status
  ----------------------------------------------------------
  Built-in test selection standardized                [ ]
  Built-in verbosity policy documented                [ ]
  Seed logging always on                              [ ]
  Targeted verbosity recipes available                [ ]
  CLI typo detection in wrapper scripts               [ ]

Key takeaways

  • Built-in plusargs are stable, shareable, and easier to support than custom flags.

  • Use global verbosity sparingly and targeted overrides aggressively.

  • CLI typo prevention and logging are as important as parsing itself.

Common pitfalls

  • Inventing custom replacements for existing built-in controls.

  • Relying on global high verbosity instead of targeted report-path tuning.

  • Not logging seed and resolved test identity in final reports.