Module 7: Debug and Regression | Intermediate UVM

Verbosity and Message Control

Control UVM diagnostic detail so normal regressions stay readable while targeted debug exposes the information needed to find failures.

Learning objectives

  • Explain how UVM verbosity affects informational messages.
  • Distinguish verbosity from severity, report ID, and report action.
  • Assign useful verbosity levels to driver, monitor, scoreboard, and environment diagnostics.
  • Control messages globally and selectively for individual report IDs or components.
  • Use verbosity to debug a failing transaction without flooding the regression log.
  • Recognize configurations that accidentally hide important verification evidence.

Why message control matters

A production UVM environment can generate thousands of diagnostic messages during a single test. A driver may report every transfer, a monitor may print every observed transaction, a scoreboard may print matching information, and protocol components may generate detailed state transitions.

Printing everything all the time makes failures harder to find. Printing almost nothing makes failures harder to understand.

Verbosity provides a controlled way to expose diagnostic detail without changing the fundamental severity of verification results.

Key distinction: verbosity primarily controls the visibility of informational reports. It is not a substitute for severity configuration. A real UVM_ERROR should not be converted into a low-verbosity INFO message simply to make a regression quieter.

Lesson 61 introduced the UVM report infrastructure and report server. This lesson goes one level deeper: how an engineer controls the amount of information that reaches the normal debug log.

Step 1: Understand UVM verbosity levels

UVM defines standard verbosity levels for informational messages:

Level Typical use Example
UVM_NONE Message should not require a verbosity threshold Critical informational notification
UVM_LOW Useful normal diagnostic information Test configuration or major phase transition
UVM_MEDIUM Detailed but still commonly useful debug Important transaction information
UVM_HIGH Detailed transaction or protocol tracing Driver/monitor transfer details
UVM_FULL Very detailed diagnostics Internal state or extensive object dumps
UVM_DEBUG Maximum diagnostic detail Deep investigation of a difficult failure

The message's verbosity is compared with the reporting object's configured verbosity threshold. In practical terms, a test running at UVM_LOW should not normally display messages tagged UVM_HIGH.

The exact threshold behavior is easiest to remember as:

message verbosity <= configured verbosity threshold
    |
    +--> informational message is eligible for reporting


message verbosity > configured verbosity threshold
|
+--> informational message is filtered

Step 2: Assign verbosity intentionally

Consider a bus driver that reports three different kinds of information:

`uvm_info("DRIVER_CFG",


$sformatf("Configured for %0d outstanding transactions",
max_outstanding),
UVM_LOW)

`uvm_info("DRIVER_TX",
$sformatf("Sending id=%0d addr=0x%0h",
req.id, req.addr),
UVM_HIGH)

`uvm_info("DRIVER_INTERNAL",
$sformatf("State=%s retry_count=%0d",
state.name(), retry_count),
UVM_DEBUG)

This gives the environment a useful hierarchy of detail:

  • LOW: information that is useful in normal debugging.
  • HIGH: transaction-level tracing when investigating a failure.
  • DEBUG: internal implementation details needed only for deep debugging.

This is more useful than assigning UVM_LOW to every message. If all messages have the same verbosity, the engineer cannot selectively increase the diagnostic detail.

Step 3: Understand the default verbosity threshold

UVM components inherit report configuration through the UVM reporting infrastructure. A component can also have its own reporting configuration.

A test can establish a default verbosity policy during test setup:

class smoke_test extends uvm_test;


`uvm_component_utils(smoke_test)

function new(string name = "smoke_test",
uvm_component parent = null);
super.new(name, parent);
endfunction

function void build_phase(uvm_phase phase);
super.build_phase(phase);


uvm_top.set_report_verbosity_level(UVM_LOW);


endfunction
endclass

With a low normal threshold, high-detail informational messages remain available in the source code but do not overwhelm every regression run.

Design principle: Keep useful diagnostics in reusable components. Use report configuration to decide how much of that information is exposed for a particular run.

Step 4: Raise verbosity for a targeted debug session

When a test fails, the first useful question is often not "How do I print everything?" but "Which component needs more detail?"

For example, if the scoreboard reports:

UVM_ERROR ... [SB_MISMATCH]


id=37 expected=0x55 actual=0x5d

the next step might be to expose transaction traces from the bus monitor and driver around transaction ID 37.

// Example targeted configuration


uvm_top.set_report_verbosity_level_hier(UVM_HIGH);

This is useful when the failure is difficult to reproduce and the extra detail is needed across the hierarchy.

However, global high verbosity can still create enormous logs. Prefer narrower configuration when the failure has already been localized.

Step 5: Control verbosity by report ID

Report IDs provide a useful classification mechanism. Suppose a monitor uses several diagnostic categories:

`uvm_info("BUS_TX",


$sformatf("Observed transfer id=%0d", item.id),
UVM_HIGH)

`uvm_info("BUS_STATE",
$sformatf("Monitor state=%s", state.name()),
UVM_FULL)

`uvm_info("BUS_CONFIG",
"Monitor configuration complete",
UVM_LOW)

Instead of globally increasing every component's verbosity, a debug session can selectively enable a particular report ID:

uvm_top.set_report_id_verbosity(


"BUS_TX",
UVM_HIGH
);

This is particularly useful when the environment contains multiple protocol agents. You can keep unrelated traffic quiet while exposing the transaction stream relevant to the failing scenario.

Be precise about what this does: an ID-specific verbosity setting is useful for informational messages carrying that ID. It does not turn an error into an informational message and should not be used as a mechanism for suppressing scoreboard failures.

Step 6: Control verbosity at a component

Sometimes the problem is isolated to one component instance. In that case, component-level configuration can be more useful than changing the entire hierarchy.

uvm_component monitor;


monitor = env.bus_agent.monitor;

monitor.set_report_verbosity_level(UVM_HIGH);

Now the monitor can expose high-detail diagnostics while unrelated components remain at their normal regression verbosity.

This becomes especially valuable in environments containing several instances of the same agent:

system_env


|
+-- bus_agent_0
|     +-- monitor
|
+-- bus_agent_1
|     +-- monitor
|
+-- bus_agent_2
+-- monitor

If only bus_agent_1 is involved in the failing scenario, raising verbosity only for that instance reduces log noise significantly.

Step 7: Use the command line when supported by the simulator flow

A practical regression environment should make debug controls accessible without requiring source-code edits for every investigation.

UVM supports command-line configuration mechanisms for report verbosity and report behavior. A commonly used form is:

+UVM_VERBOSITY=UVM_HIGH

This is useful because the same compiled test can be run at different diagnostic levels:

# Normal regression


simv +UVM_TESTNAME=smoke_test

# Debug run

simv +UVM_TESTNAME=smoke_test +UVM_VERBOSITY=UVM_HIGH

The exact simulator command and additional command-line options depend on the simulator and regression infrastructure. Keep project-specific command syntax outside reusable UVM components when possible.

Practical rule: If an engineer needs to edit a reusable monitor just to increase diagnostic verbosity for one failing seed, the debug workflow is unnecessarily expensive. Make normal verbosity configuration easy to override.

Step 8: Do not confuse verbosity with severity

This distinction is one of the most important concepts in the lesson.

// Detailed informational trace


`uvm_info("MONITOR_TX",
$sformatf("Observed %s", item.sprint()),
UVM_HIGH)

// Real verification failure
`uvm_error("SB_MISMATCH",
$sformatf("id=%0d expected=%s actual=%s",
id, expected.sprint(), actual.sprint()))

Increasing or decreasing the verbosity threshold controls the informational trace. The scoreboard mismatch remains an error.

Question Concept
How serious is this report? Severity
How much informational detail should I see? Verbosity
What category does this report belong to? Report ID
What should UVM do with this report? Report action

Step 9: Build a useful verbosity policy

A reusable agent should have a predictable diagnostic hierarchy. For example:

Component LOW HIGH DEBUG/FULL
Driver major state/configuration events transactions being driven internal driver state
Monitor monitor startup/configuration observed transactions sampling/state-machine details
Scoreboard major comparison milestones matching/debug context internal queues and prediction state
Coverage coverage milestones sample details when debugging rarely needed

The goal is not to force every project into this exact scheme. The goal is to establish a consistent meaning for each verbosity level so that an engineer knows what increasing the threshold will reveal.

Step 10: Control logs without hiding failures

Consider a failing AXI-Lite test where the scoreboard reports an incorrect read response. The debug engineer wants:

  • the failing transaction,
  • the corresponding monitor observation,
  • the driver's request,
  • the scoreboard's expected value,
  • and the original test seed.

A poor approach is to globally suppress all driver and monitor output. Another poor approach is to enable maximum debug output from every component.

A better workflow is:

  1. Run the regression with concise normal output.
  2. Identify the first useful error report.
  3. Determine which component owns the missing context.
  4. Increase verbosity only for the relevant component or report ID.
  5. Re-run the exact seed.
  6. Compare the additional trace with the original failure.

Debugging workflow: from mismatch to useful trace

Scoreboard mismatch
   |
   v


What context is missing?
|
+---- request missing?
|        |
|        v
|   increase driver trace
|
+---- observed response missing?
|        |
|        v
|   increase monitor trace
|
+---- prediction unclear?
|
v
increase predictor trace
|
v
Re-run exact seed
|
v
Compare first divergent event

This is more effective than simply increasing global verbosity because the debug output follows the causal path of the failure.

Common mistakes

Mistake Why it causes problems Better approach
Everything is UVM_LOW There is no useful distinction between normal and deep debug output Assign levels based on diagnostic importance
Everything is UVM_HIGH Normal regressions become noisy and slow to inspect Reserve high levels for targeted detail
Changing ERROR to INFO Real verification failures can disappear from regression results Keep severity aligned with verification meaning
Increasing global verbosity immediately Thousands of irrelevant messages obscure the failure First identify the component or report ID that needs more detail
Using inconsistent report IDs Selective message control becomes difficult Define stable IDs such as BUS_TX, BUS_STATE, and SB_MISMATCH
Embedding debug switches throughout the driver Debug configuration becomes difficult to maintain Use UVM reporting configuration for diagnostic visibility
Assuming verbosity fixes missing evidence The component may never have generated the transaction or report Verify execution, connections, and transaction flow first

Try it yourself

  1. Create three informational messages in a monitor using UVM_LOW, UVM_HIGH, and UVM_DEBUG.
  2. Run the same test at low and high verbosity and record which messages become visible.
  3. Create two high-verbosity messages with different report IDs.
  4. Enable one ID selectively and verify that unrelated diagnostics remain quiet.
  5. Generate a real scoreboard UVM_ERROR and confirm that changing informational verbosity does not change its verification meaning.
  6. Repeat a failing seed with targeted monitor verbosity rather than maximum global verbosity.

Challenge: debug one failing transaction

Imagine that a regression reports:

UVM_ERROR [SB_MISMATCH]


stream=1 id=42 expected=0xA5 actual=0xA1

The normal regression log does not contain enough information to determine whether the driver sent the wrong request or the monitor observed the wrong response.

Design a debug plan that:

  1. preserves the original seed and test configuration,
  2. increases verbosity only where useful,
  3. exposes the request and response transaction traces,
  4. keeps unrelated agents quiet,
  5. and leaves the scoreboard mismatch as a real verification error.

Then explain which additional message would establish the first divergence: the driver request, DUT response, monitor observation, predictor expectation, or scoreboard comparison.

Knowledge check

  1. What does verbosity control?
    Primarily the visibility of informational reports according to their configured verbosity level and the reporting object's threshold.
  2. Is UVM_HIGH more severe than UVM_LOW?
    No. They are verbosity levels, not severity levels.
  3. What should happen to a real scoreboard mismatch when verbosity is lowered?
    It should remain a verification error. Lowering informational verbosity should not redefine the mismatch.
  4. Why use stable report IDs?
    They allow diagnostics to be classified, searched, and selectively configured.
  5. Why is targeted verbosity often better than global verbosity?
    It exposes the needed context while reducing unrelated log volume.
  6. What should you do if increasing verbosity produces no useful trace?
    Check whether the relevant component actually executed, whether the expected transaction was generated/observed, and whether the report ID and reporting configuration are correct.

Key takeaways

  • Verbosity is a diagnostic-detail control, not a replacement for severity.
  • Use low verbosity for normal regression information and higher levels for targeted debugging.
  • Stable report IDs make selective message control practical in large environments.
  • Component-level or ID-level control can be much more useful than globally enabling maximum verbosity.
  • Never use verbosity or report suppression to hide a real verification failure.
  • A good debug workflow increases detail along the causal path of the failure.
  • Reusable components should contain useful diagnostics without forcing every regression to print them.

Where this lesson goes next

Lesson 61 established how UVM reporting is processed. This lesson established how to control diagnostic detail without destroying regression signal.

Next, Lesson 63: Waveform Debug Strategy moves from textual evidence to temporal evidence. The same principle applies: do not dump everything blindly. Select the interfaces, transactions, internal state, and time window that can explain the first divergence.