Module 6: Production Environments | Intermediate UVM

Reset Verification

Verify reset behavior at the DUT interface, transaction, register, and verification-environment levels.

Learning objectives

  • Explain what a reset test must verify beyond simply asserting and deasserting a reset signal.
  • Distinguish reset assertion, reset duration, reset release, and post-reset recovery.
  • Define what happens to transactions that are in progress when reset occurs.
  • Design reset-aware behavior for monitors, predictors, scoreboards, and register models.
  • Verify register reset values through the register abstraction introduced in Lesson 56.
  • Handle reset during an otherwise active test scenario.
  • Diagnose failures caused by incorrect DUT reset behavior versus stale verification-environment state.

Why reset deserves its own verification strategy

Reset is often treated as testbench initialization: assert reset, wait, deassert reset, and begin the real test. Production verification cannot stop there.

Reset changes the state of the DUT and usually changes the state of the verification environment as well. Transactions may be abandoned, register values may return to defaults, protocol monitors may see incomplete transfers, and scoreboards may contain expectations that are no longer valid.

A useful reset strategy therefore answers four questions:

  1. Did the DUT enter the required reset state?
  2. Did reset remain asserted for the required conditions?
  3. Did the DUT recover correctly after reset was released?
  4. Did the verification environment discard or preserve state according to the specification?
Important: Reset verification is not just checking reset == 0 or reset == 1. It verifies the observable state transition and the behavior surrounding that transition.

Step 1: Define the reset sequence

Before writing a reset test, describe the expected reset behavior in terms of observable events.

Normal operation
  |
  | reset asserted
  v


+------------------+
| Reset state      |
|                  |
| outputs defined  |
| state initialized|
+------------------+
|
| reset released
v
+------------------+
| Recovery state   |
|                  |
| interfaces ready |
| registers reset  |
+------------------+
|
v
Normal operation

The exact requirements depend on the DUT. For example, the specification may require outputs to become inactive immediately, or only on a clock edge. Some interfaces may be unavailable during reset while others remain operational.

Do not assume that every reset is synchronous or asynchronous simply because the signal is named reset_n. Determine the timing behavior from the specification.

Step 2: Verify assertion and release separately

Reset has at least two important edges: assertion and release. They should not automatically be treated as one event.

Reset phase Typical questions
Before reset Was the DUT operating normally before reset?
Assertion Do required outputs and internal state enter reset behavior?
While asserted Do outputs remain within their specified reset behavior?
Release Does the DUT leave reset according to the required timing?
Recovery Can the DUT accept valid traffic and produce correct results again?

A DUT can pass a simple reset-value test while still having a reset-release bug, such as accepting traffic one cycle too early or leaving an output in an invalid state.

Step 3: Generate reset explicitly

A reset sequence should make the intended timing visible rather than hiding it behind arbitrary delays.

task automatic apply_reset(


virtual reset_if vif,
int unsigned cycles
);
vif.reset_n <= 1'b0;

repeat (cycles)
@(posedge vif.clk);

vif.reset_n <= 1'b1;
endtask

This example assumes an active-low reset and a clocked reset duration. The actual implementation must match the DUT's reset specification.

Step 4: Verify reset with assertions

Assertions are useful for checking properties that must hold continuously or at precise clock boundaries.

ap_idle_during_reset:


assert property (
@(posedge clk)
!reset_n |-> !busy
)
else
`uvm_error("RESET", "busy asserted during reset");

The exact property must match the DUT specification. If busy is allowed to remain high for one cycle after reset assertion, the property above would be too strict.

This illustrates an important reset-verification principle: the checker must encode the specified reset behavior, not an assumption about what reset behavior “usually” looks like.

Step 5: Verify register reset values

Lesson 56 introduced the register model. Reset verification provides one of its first useful applications.

Suppose CTRL.enable is specified to reset to zero and CTRL.mode is specified to reset to zero.

uvm_status_e status;


uvm_reg_data_t value;

reg_model.CTRL.read(
status,
value,
UVM_FRONTDOOR
);

if (status != UVM_IS_OK) begin
`uvm_error("RESET_REG", "Could not read CTRL after reset")
end
else if (value != 'h0) begin
  `uvm_error(
"RESET_REG",
$sformatf(
"CTRL reset value mismatch: expected 0x00000000, got 0x%08h",
value
)
)
end

This checks the externally visible register value through the normal bus path. It therefore exercises more than simply inspecting an internal RTL variable.

For registers with reserved bits, write-one-to-clear behavior, volatile fields, or implementation-defined values, the comparison must follow the register specification. A blanket comparison against zero is not always correct.

Step 6: Decide what happens to in-flight transactions

One of the most important intermediate-level reset questions is what happens when reset interrupts an operation already in progress.

Request 0 accepted
   |
   v


Request 1 accepted
|
v
RESET ASSERTED
|
+---- Request 0?
|
+---- Request 1?
|
v
Post-reset traffic

The answer must come from the protocol and DUT specification. Possible policies include:

  • all outstanding operations are discarded,
  • the current operation completes before reset takes effect,
  • some classes of operations survive reset,
  • the interface returns an error response for interrupted operations.

The scoreboard must implement the specified policy rather than automatically treating every transaction seen before reset as an expectation that must eventually complete.

Step 7: Make the scoreboard reset-aware

Consider an out-of-order scoreboard from Lesson 25. It may contain expected transactions indexed by transaction ID.

typedef int unsigned id_t;


packet expected_by_id[id_t];

function void handle_reset();
expected_by_id.delete();

`uvm_info(
"SB_RESET",
"Cleared outstanding expectations at reset",
UVM_MEDIUM
)
endfunction

Clearing expectations is appropriate only if the DUT specification says that outstanding operations are invalidated by reset.

If the protocol requires some transactions to survive reset, the scoreboard needs a more specific policy. The important point is that reset must be an explicit state transition for the checker.

Step 8: Reset the predictor and model state

Stateful predictors and reference models can become incorrect after reset if they retain state from before reset.

class packet_predictor extends uvm_component;


`uvm_component_utils(packet_predictor)

function void reset_model();
// Restore model state to its specified reset state.
model.reset();


`uvm_info(
  "PRED_RESET",
  "Reference-model state reset",
  UVM_HIGH
)


endfunction
endclass

This is especially important for models that track counters, queues, configuration state, credits, sequence numbers, or protocol state machines.

Resetting the predictor is not necessarily the same as resetting the UVM component itself. The component may continue to exist while its modeled DUT state is reinitialized.

Step 9: Make the monitor reset-aware

Reset can occur in the middle of a physical transfer. A monitor must know whether a partial observation should be discarded, completed, or published as a reset-interrupted event.

if (!vif.reset_n) begin


collecting = 0;
current_item = null;
return;
end

The correct behavior depends on the protocol. For a transaction reconstructed over multiple cycles, it is often necessary to discard the partial transaction when reset invalidates it.

Do not publish incomplete transactions accidentally. A scoreboard receiving a partially collected pre-reset transaction may report a data mismatch that is actually a monitor-reset bug.

Step 10: Coordinate reset across the environment

A production environment may contain several agents and checking components. Reset handling should therefore be coordinated rather than implemented as unrelated local reactions.

                    reset controller
                       |
      +----------------+----------------+
      |                |                |
      v                v                v
  bus agent       interrupt agent    register model
      |                |                |
      v                v                v
   monitor          monitor          state
      |                |                |
      +----------------+----------------+
                       |
                       v
              scoreboard / predictor
                       |
                       v
                reset policy

The environment can provide a reset event or another explicit synchronization mechanism so that components agree on when a reset epoch begins and ends.

Avoid relying on accidental simulator scheduling order such as “the monitor will probably process reset before the scoreboard callback.” If ordering matters, make the relationship explicit.

Step 11: Test reset during normal traffic

A useful reset test does not always begin with reset. Inject reset at different points in otherwise valid activity.

1. Apply initial reset.


2. Wait for normal operation.
3. Start several transactions.
4. Assert reset while traffic is active.
5. Hold reset for the required interval.
6. Release reset.
7. Verify reset-state behavior.
8. Verify register reset values.
9. Resume normal traffic.
10. Verify post-reset operation.

This exposes bugs that a simple power-on-reset test may never encounter.

Reset scenarios worth testing

Scenario What it stresses
Reset at startup Initial DUT and environment initialization
Minimum reset duration Reset timing requirements
Extended reset Behavior while reset remains asserted
Reset during idle Clean state transition
Reset during a transfer In-flight transaction handling
Reset with outstanding requests Scoreboard/predictor cleanup
Reset after configuration Register and configuration state restoration
Repeated reset Recovery and state-machine robustness
Traffic immediately after release Reset-release and recovery timing

Debugging reset failures

Reset failures often produce secondary errors. A disciplined debug process identifies the first meaningful divergence rather than fixing every later scoreboard error.

  1. Confirm the reset waveform: Did assertion and release occur when expected?
  2. Check reset duration: Was the required number of cycles or time interval satisfied?
  3. Check DUT outputs: Did required reset-state values appear?
  4. Check monitor state: Did it discard or preserve partial transactions correctly?
  5. Check predictor state: Was pre-reset modeled state cleared or preserved correctly?
  6. Check scoreboard state: Were outstanding expectations handled according to the reset policy?
  7. Check register state: Do frontdoor reads after reset match the specification?
  8. Check post-reset traffic: Can the environment resume normal operation?

Reset epochs

For complex environments, it can be useful to think of simulation activity as belonging to a reset epoch.

Epoch 0


transactions
expectations
state
|
| reset
v
Epoch 1
fresh state
new transactions
new expectations

A transaction ID may even be reused after reset. If the scoreboard treats IDs as globally unique when the protocol only guarantees uniqueness within one reset epoch, it can correlate a post-reset response with stale pre-reset state.

In such designs, diagnostic or internal correlation state can include a reset epoch in addition to the protocol-defined transaction ID.

Exercise 1: Define a reset policy

Consider a bus with multiple outstanding requests. Reset can occur at any time. Write a policy for:

  • requests accepted before reset,
  • responses arriving during reset,
  • responses arriving after reset,
  • partial transactions observed by the monitor,
  • predictor state,
  • scoreboard expectations.

State explicitly whether each item is discarded, preserved, converted into an error, or handled in another protocol-defined way.

Exercise 2: Reset the register model correctly

Extend the register environment from Lesson 56. After reset:

  1. read the CTRL register through the frontdoor,
  2. check its specified reset value,
  3. read the STATUS register,
  4. verify its reset-state fields,
  5. perform a normal configuration write,
  6. apply reset again,
  7. verify that the configuration was restored to its reset state.

Explain why this test verifies more than the initial power-on sequence.

Challenge: Mid-transaction reset

Build a test in which several transactions are active when reset is asserted. Your environment should explicitly implement the DUT's reset policy.

Your solution should:

  • generate reset while normal traffic is active,
  • record which transactions were accepted before reset,
  • handle partial monitor transactions correctly,
  • reset predictor/reference-model state as required,
  • flush or preserve scoreboard expectations according to the specification,
  • verify register reset values after reset,
  • resume normal traffic after reset release,
  • produce a diagnostic message if an invalid pre-reset response appears afterward.

As an advanced extension, repeat the scenario with different reset points: during idle, during a request, while multiple requests are outstanding, and immediately after a response.

Knowledge check

  1. Why is reset verification more than checking a reset signal?
  2. What is the difference between reset assertion and reset recovery?
  3. Why should reset duration normally be expressed in terms of the specification?
  4. What should a scoreboard do with outstanding expectations when reset occurs?
  5. Why must the monitor handle partially collected transactions during reset?
  6. Why can a stateful predictor become incorrect after reset even when the DUT is correct?
  7. Why is a frontdoor register read useful for reset verification?
  8. What is a reset epoch, and when might it help transaction correlation?
  9. Why can one reset bug produce several apparently unrelated scoreboard failures?

Production checklist

  • Is reset behavior defined for assertion, duration, release, and recovery?
  • Are synchronous and asynchronous timing assumptions explicitly documented?
  • Is reset tested during both idle and active traffic?
  • Is the policy for in-flight transactions explicit?
  • Does the monitor correctly handle partial transactions?
  • Does the predictor/reference model return to the correct reset state?
  • Does the scoreboard clear or preserve expectations according to the DUT specification?
  • Are register reset values checked through the appropriate access path?
  • Can the environment resume normal traffic after reset?
  • Are reset-related diagnostics distinguishable from ordinary transaction mismatches?

Key takeaways

  • Reset is a system-level state transition, not merely testbench initialization.
  • Good reset verification covers assertion, time in reset, release, and post-reset recovery.
  • Transactions interrupted by reset need an explicit protocol-defined policy.
  • Monitors, predictors, scoreboards, and register models may all need reset-aware state handling.
  • Frontdoor register reads provide an effective way to verify externally visible reset values.
  • Reset epochs can prevent stale correlation state from leaking across reset boundaries.
  • Debug the first reset-state divergence before interpreting secondary scoreboard, timeout, or drain failures.

Next lesson

In Lesson 58: Interrupt Verification, we build on reset and multi-interface verification by examining interrupt behavior. Interrupts often depend on register configuration, status conditions, reset state, timing, and software-visible side effects, making them a natural next step toward production-level subsystem verification.