Module 7: Debug and Regression | Intermediate UVM

Nightly Regressions

Learn how to structure repeatable overnight UVM regressions, preserve failure context, and turn regression results into actionable debug information.

Learning objectives

  • Explain the purpose of a nightly regression and how it differs from a smoke regression.
  • Design a regression command that preserves the test name, seed, configuration, and result status.
  • Organize regression results so failures can be reproduced and triaged efficiently.
  • Identify the first useful failure instead of treating the total failure count as the diagnosis.

Step 1: Understand the concept

A nightly regression is a repeatable collection of tests executed automatically, typically with multiple seeds and configurations. Its purpose is broader than proving that one test passes: it provides regular evidence that recent design and verification changes have not introduced new failures.

A useful regression answers four questions:

  • What ran? Test name, test variant, configuration, and simulator options.
  • How did it run? Seed, timeout, compile version, and relevant environment information.
  • What happened? Pass, fail, timeout, or infrastructure error.
  • Can we reproduce it? Enough information to rerun the same scenario.

Think of the nightly regression as a verification pipeline, not simply a long list of tests. The runner selects tests, launches simulations, records metadata, collects results, and identifies failures for follow-up.

Key idea: A regression report saying “7 tests failed” is useful, but a report containing the exact test, seed, configuration, and first meaningful error is actionable.

Step 2: Study the example

Consider a simple regression launcher. Each simulation receives an explicit test name and seed, while the log records enough information to reproduce a failure.

class regression_job;


string test_name;
int unsigned seed;
string config_name;

function new(
string test_name,
int unsigned seed,
string config_name
);
this.test_name   = test_name;
this.seed        = seed;
this.config_name = config_name;
endfunction

function void report_start();
`uvm_info("REGRESSION",
$sformatf(
"START test=%s seed=%0d config=%s",
test_name, seed, config_name
),
UVM_LOW)
endfunction

function void report_failure(string reason);
`uvm_error("REGRESSION",
$sformatf(
"FAIL test=%s seed=%0d config=%s reason=%s",
test_name, seed, config_name, reason
))
endfunction
endclass

The important idea is not the helper class itself. The important idea is that every regression job carries its identity and execution context with it.

For example, if a scoreboard reports a mismatch, the regression log should allow you to connect that mismatch back to something like:

test=burst_error_test


seed=38192417
config=low_power
failure=expected response 0x55, observed 0x15

That information is much more valuable than a generic message such as TEST FAILED.

Nightly regression versus smoke regression

Smoke regression Nightly regression
Small and fast Broader test and configuration matrix
Used for quick feedback Used for deeper periodic coverage
Often deterministic Usually includes multiple seeds
Runs frequently during development Runs on a scheduled basis

Step 3: Build the regression in small pieces

  1. Start with a small test list. Select a few representative tests covering basic traffic, error handling, reset behavior, and one important protocol scenario.
  2. Make every run reproducible. Record the test name, seed, configuration, and simulator command or equivalent launch information.
  3. Add multiple seeds deliberately. Use different seeds to increase stimulus diversity, but retain every seed associated with a failure.
  4. Separate test failures from infrastructure failures. A DUT mismatch, simulator crash, compilation failure, and timeout should not all be reported as the same type of failure.
  5. Collect a concise result. Record pass/fail status, runtime, seed, and the first useful failure message for each test.
  6. Re-run failures before changing the environment. First determine whether the failure reproduces with the recorded seed and configuration.
Common mistake: treating every failing test as an independent bug. Several tests may fail because of one underlying defect. Group failures by first error, affected component, signature, and reproduction conditions before opening multiple debug investigations.

Step 4: Triage the nightly results

Do not begin debug by opening every waveform. Start with the regression summary and identify the highest-value failure.

  1. Check infrastructure first. Confirm that compilation, simulator startup, licenses, and required files were available.
  2. Find the first meaningful UVM error. Later errors may be secondary effects of the original failure.
  3. Group similar failures. Compare test names, seeds, configurations, components, and error signatures.
  4. Reproduce one representative failure. Use the recorded command, test, seed, and configuration.
  5. Only then inspect waveforms. Start around the transaction, assertion, or scoreboard mismatch that identified the failure.

This creates a useful progression:

Nightly regression
   ↓


Failure summary
↓
Failure signature
↓
Reproduction
↓
Focused waveform / log debug
↓
Root cause

Try it yourself

Create a small nightly regression matrix with at least three tests and two seeds per test.

For every run, record:

  • test name
  • seed
  • configuration
  • pass/fail status
  • first useful failure message

Then introduce one intentional scoreboard mismatch. Confirm that the regression identifies the failing test and preserves enough information to rerun the same scenario.

Challenge: Add a second failure with the same root cause but a different seed. Decide which fields should be used to recognize that the two failures are probably related.

Verification checkpoint

You understand nightly regressions when you can explain why each piece of metadata matters and reproduce a failed test without guessing the original execution conditions.

  • Can you distinguish a smoke run from a nightly regression?
  • Can you identify the seed and configuration for a failed test?
  • Can you separate infrastructure failures from DUT or test failures?
  • Can you identify the first useful failure in a noisy log?
  • Can you rerun a failure using the recorded regression information?

Key takeaways

  • A nightly regression provides repeatable evidence across tests, seeds, and configurations.
  • Every regression result should preserve enough metadata to reproduce a failure.
  • Separate infrastructure problems, test failures, timeouts, and DUT failures during triage.
  • Group related failures before assuming that each failed test represents a different bug.
  • Use regression logs to narrow the problem before opening detailed waveforms.
  • A good regression system turns failures into reproducible debug cases rather than anonymous red results.