Module 4: Stimulus and Drivers | Lesson 37

Reset Sequences

Learn how to model reset as a reusable UVM scenario, coordinate reset timing with the DUT, and verify that the design returns to a known and correct state.

Learning objectives

  • Explain why reset is a critical part of verification.
  • Distinguish reset generation from reset verification.
  • Understand synchronous and asynchronous reset behavior.
  • Create a reusable UVM reset sequence.
  • Use a virtual interface to control and observe reset signals.
  • Coordinate reset with normal stimulus and the UVM phase system.
  • Identify common reset-sequencing mistakes and debug them systematically.

Step 1: Understand why reset matters

Reset is often the first operation performed on a DUT, but it is much more than a setup step. Reset establishes the initial state from which the rest of the verification environment operates.

A good verification environment should answer questions such as:

  • Does the DUT enter the specified reset state?
  • Do registers receive their required reset values?
  • Does reset remain asserted for the required duration?
  • Does the DUT behave correctly when reset is released?
  • Can reset occur while other activity is taking place?
  • Can the environment safely resume normal stimulus after reset?
Core idea: Reset is part of the DUT behavior being verified, not merely something the testbench does before the "real" test begins.

Step 2: Reset is a scenario

UVM sequences are useful for describing reusable scenarios. Reset fits this model very well.

Instead of putting reset logic directly into every test, create a reusable reset sequence that describes:

  1. When reset starts.
  2. How long reset remains active.
  3. When reset is released.
  4. What should happen immediately afterward.

Then different tests can reuse the same reset behavior.

Test


|
+----> Reset sequence
|
+----> Normal stimulus sequence
|
+----> Checking

This is preferable to duplicating reset code throughout many tests.

Step 3: Know your reset protocol

Before writing a reset sequence, determine how the DUT defines reset. Two common styles are synchronous and asynchronous reset.

Reset type Typical behavior
Synchronous The DUT responds to reset on an active clock edge.
Asynchronous The DUT can respond to reset independently of the clock edge.

The sequence must match the actual DUT specification. Do not assume that every reset should simply be asserted for a fixed number of nanoseconds.

Verification rule: Reset timing belongs to the DUT specification. The sequence should implement that specification rather than inventing its own reset behavior.

Step 4: Create a reset interface

Suppose our DUT has an active-high synchronous reset. The testbench interface might contain:

interface bus_if(input logic clk);

logic        reset;
logic        valid;
logic        ready;
logic        write;
logic [7:0]  addr;
logic [7:0]  data;


endinterface

The reset signal is now available through the same virtual interface used by the driver and monitor.

virtual bus_if vif;

The sequence can then access the interface through an appropriate handle if the architecture intentionally gives the sequence access to it.

Step 5: Understand an important architectural choice

There are several ways to implement reset in a UVM environment. For a beginner environment, the important distinction is between:

  • Test/sequence-controlled reset: the test explicitly starts a reset scenario.
  • Driver-controlled protocol: the driver handles transaction-level protocol details.
  • Dedicated reset agent: larger environments may isolate reset behavior into its own reusable component.

Do not automatically put reset into the normal bus driver. A bus driver's primary responsibility is normally bus transaction protocol. Reset may have different ownership and timing rules.

Architecture principle: Keep reset ownership explicit. A reset signal that affects the entire DUT should not become hidden inside an unrelated transaction driver.

Step 6: Build a simple reset sequence

For a simple synchronous reset, a sequence can control the reset signal through a virtual interface.

class reset_sequence extends uvm_sequence #(uvm_sequence_item);

`uvm_object_utils(reset_sequence)

virtual bus_if vif;

function new(string name = "reset_sequence");
    super.new(name);
endfunction

task body();

    vif.reset <= 1'b1;

    repeat (5) begin
        @(posedge vif.clk);
    end

    vif.reset <= 1'b0;

    @(posedge vif.clk);

    `uvm_info(
        "RESET",
        "Reset sequence completed",
        UVM_MEDIUM
    )

endtask


endclass

This sequence does not generate a normal bus transaction. Its job is to control a reset scenario.

Notice that the reset remains asserted for five clock cycles before being released.

Step 7: Why reset timing should use the clock when appropriate

For a synchronous reset, clock-relative timing is usually clearer than arbitrary delays.

Prefer:

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

over a value such as:

#50ns;

when the specification is expressed in clock cycles.

Clock-based timing communicates the intent directly: keep reset asserted for five clock cycles.

Step 8: Verify reset release correctly

Releasing reset is just as important as asserting it. The DUT should have a defined behavior after reset deassertion.

vif.reset <= 1'b0;


@(posedge vif.clk);

`uvm_info(
"RESET",
"Reset released; DUT may begin normal operation",
UVM_MEDIUM
)

Depending on the DUT specification, you may need to wait additional cycles before starting normal traffic.

That requirement belongs in the reset scenario or in a reusable startup sequence rather than being randomly duplicated across tests.

Step 9: Combine reset with normal stimulus

A common test structure is:

Reset


|
v
Wait for reset release
|
v
Normal stimulus
|
v
Check results

A test might conceptually do:

task run_phase(uvm_phase phase);

reset_sequence reset_seq;
bus_sequence   bus_seq;

phase.raise_objection(this);

reset_seq = reset_sequence::type_id::create("reset_seq");
reset_seq.vif = env.agent.driver.vif;
reset_seq.start(null);

bus_seq = bus_sequence::type_id::create("bus_seq");
bus_seq.start(env.agent.sequencer);

phase.drop_objection(this);


endtask

The exact architecture can vary, but the important concept is that reset happens before normal traffic when the test requires a clean startup state.

Step 10: Be careful with sequence interfaces

The previous example directly assigns a virtual interface to the reset sequence for simplicity. In a larger environment, you may prefer a dedicated reset agent or a configuration object containing reset resources.

The important architectural lesson is not the exact mechanism. It is that reset access should be explicit, reusable, and easy to configure.

Beginner rule: First make reset behavior clear and correct. Then refactor it into a more sophisticated reset architecture when the environment grows.

Step 11: Reset should affect the whole environment

Reset is not only a signal driven into the DUT. Other verification components may need to react to it.

For example:

  • A driver may need to stop or discard in-flight activity.
  • A monitor may need to ignore invalid traffic during reset.
  • A scoreboard may need to clear its expected-transaction queue.
  • Coverage collectors may need to recognize reset boundaries.
  • The test may need to wait for the DUT to become operational again.

This is why reset is an environment-wide verification concern rather than simply another bus transaction.

Step 12: Reset-aware driver behavior

A driver may need to avoid driving normal traffic while reset is active. For example:

task run_phase(uvm_phase phase);

forever begin

    wait (vif.reset == 1'b0);

    seq_item_port.get_next_item(req);

    drive_transfer(req);

    seq_item_port.item_done();

end


endtask

This is only an example. The correct behavior depends on the DUT protocol. Some environments allow transactions to be queued during reset; others require the driver to flush or reject them.

Do not guess: Whether pending transactions survive reset is a design specification question, not a universal UVM rule.

Step 13: Reset-aware monitor and scoreboard behavior

A monitor may explicitly recognize reset:

if (vif.reset) begin

// Ignore normal protocol sampling during reset.


end
else if (vif.valid && vif.ready) begin


// Reconstruct a normal transaction.


end

A scoreboard may also need to clear state when reset occurs.

function void reset_expected_state();

expected_queue.delete();
error_count = 0;


endfunction

In a production environment, reset handling must be coordinated carefully so that stale transactions from before reset do not get compared with transactions generated after reset.

Step 14: Reset testing should include more than startup

Once basic reset works, reset can become a powerful verification scenario.

Useful scenarios include:

  • Reset at time zero.
  • Reset after normal startup.
  • Reset during idle operation.
  • Reset while transactions are being generated.
  • Multiple reset cycles.
  • Different reset durations.
  • Back-to-back reset and normal-operation scenarios.
  • Reset immediately before or after a protocol transaction.

These scenarios help expose state-management bugs that a single startup reset may never find.

Step 15: Common reset-sequence mistakes

Mistake 1: Treating reset as an ordinary bus transaction

Reset often affects the entire DUT and verification environment, so it may need different ownership and synchronization rules.

Mistake 2: Using arbitrary delays

If the reset requirement is defined in clock cycles, use clock edges rather than arbitrary time delays.

Mistake 3: Starting traffic before reset is released

Normal sequences may begin before the DUT has reached its operational state. Make the startup ordering explicit.

Mistake 4: Ignoring reset in the monitor

The monitor may interpret reset activity as normal protocol activity and send invalid transactions to the scoreboard.

Mistake 5: Keeping stale scoreboard state

If reset clears DUT state but the scoreboard keeps old expected data, correct post-reset behavior may appear to be a failure.

Mistake 6: Forgetting asynchronous reset behavior

An asynchronous reset cannot always be modeled as "wait for the next clock." The sequence and checking strategy must match the DUT's actual reset semantics.

Step 16: Debug a reset failure systematically

When reset behavior is wrong, trace it in a fixed order.

  1. Was reset generated?
  2. Did the virtual interface point to the correct interface?
  3. Was reset asserted for the required duration?
  4. Did the DUT observe the reset?
  5. Did DUT outputs/registers reach their specified reset values?
  6. Was reset released at the correct time?
  7. Did the driver wait until normal operation was allowed?
  8. Did the monitor ignore or correctly interpret reset activity?
  9. Did the scoreboard clear or update its state?
  10. Did normal stimulus begin only after reset completion?

A waveform is especially useful for reset debugging because you can compare the reset signal, clock, DUT state, and transaction activity on the same timeline.

Step 17: A useful reset timeline

Clock:   _|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_|‾|_


Reset:   ‾‾‾‾‾‾‾‾‾‾‾‾‾‾___________
<-- reset active -->

Driver:  idle idle idle idle idle idle
|
+-- normal traffic

DUT:     RESET STATE     |  NORMAL STATE

Monitor: ignore/reset    |  observe transactions

Scoreboard:
clear state     |  check normal activity

The exact waveform depends on the design, but this timeline illustrates the key concept: reset establishes a boundary between DUT states and verification activity.

Step 18: Reset sequence mental model

              RESET SCENARIO

                |
                v
         Assert reset
                |
                v
        Wait required time
                |
                v
      Verify reset state
                |
                v
        Release reset
                |
                v
     Wait for normal operation
                |
                v
       Start normal traffic
                |
                v
          Check results

The strongest reset environments do not merely drive reset. They also establish evidence that the DUT entered and exited reset correctly.

Try it yourself

Create a reusable reset sequence for a DUT with an active-high, synchronous reset.

  1. Create a bus_if containing clk and reset.
  2. Create a reset_sequence.
  3. Assert reset.
  4. Hold reset for five positive clock edges.
  5. Release reset.
  6. Print a UVM message when reset is complete.
  7. Start a normal bus sequence only after reset finishes.

Challenge: Modify the test so that reset occurs a second time after several normal transactions. Make sure the scoreboard and monitor do not treat stale pre-reset activity as valid post-reset behavior.

Key takeaways

  • Reset establishes the initial state from which normal verification begins.
  • A reset sequence turns reset behavior into a reusable UVM scenario.
  • Reset timing must match the DUT specification, including synchronous or asynchronous behavior.
  • Clock-based reset timing is preferable when the specification is expressed in clock cycles.
  • Virtual interfaces provide access to reset signals from class-based UVM code.
  • Reset may affect the driver, monitor, scoreboard, coverage, and test—not just the DUT.
  • Do not automatically hide reset behavior inside an unrelated protocol driver.
  • Reset testing should eventually include reset during normal operation, not just startup.
  • When debugging reset, trace generation → interface → DUT state → release → monitor → scoreboard → normal traffic.