Stress Verification in UVM: Finding the Bugs Normal Random Testing Misses
In short: Stress verification pushes a design hard on purpose: traffic with no gaps, receivers that stall for a long time, buffers kept near full, and resets in the middle of traffic. Normal random tests rarely get there, so bugs that only appear under load slip through. In this lesson a valid/ready FIFO passes 1,000 cycles of normal random traffic with three hidden bugs. Three kinds of stress find all three, and one kind finds nothing at all.
Stress finds bugs that only appear under load, and some of those only appear on a few seeds. How to Solve a Complex Verification Issue shows how to turn a rare failure into a test that fails every time.
Why can a design pass normal random tests and still fail in the chip?
Because normal random traffic is polite. Valid comes and goes, ready is high most of the time, and the buffers stay half empty. The design never runs out of room, never waits long, and never gets reset while it is busy.
A real chip is not polite. A memory controller stalls for hundreds of cycles. A DMA fires bursts with no gaps. Software resets a block while traffic is still flowing. The bugs that live in those moments, such as a dropped word when a buffer is full, a handshake that never recovers, or a pointer that a reset forgets, are invisible to a test that never goes there.
In lesson 4, stress testing came late in the flow, after sanity and feature verification. This lesson shows what it is, how to do it in UVM, and what it finds that nothing else does.
The picture: testing a new bridge
Before a new bridge opens, engineers do not just drive one car across it.
- They park heavy trucks bumper to bumper. (Throughput: no gaps.)
- They block the far end and let traffic pile up. (Back-pressure: the receiver stalls.)
- They keep it loaded near its limit for hours. (Squeeze: running near full.)
- They close and reopen lanes while traffic is moving. (Reset in the middle of traffic.)
They are not trying to break it for fun. They want to find where it bends while it is still safe to fix. One car crossing on a sunny day proves the road is there. It proves nothing about rush hour.
What will you learn in this lesson?
By the end of this lesson you will be able to:
- Explain what stress verification is and how it differs from normal constrained random testing.
- Name the main kinds of stress and the bugs each one tends to expose.
- Write UVM sequences for throughput, back-pressure, squeeze and reset-during-traffic stress.
- Add stress corners to your coverage, so you can prove the stress actually happened.
- Read stress results and debug a failure that only appears under load.
What is stress verification?
Stress verification drives a design with traffic chosen to push it to its limits: full rate, long stalls, buffers at the edge of full, and disruptions such as resets or errors in the middle of activity. The checks stay the same as in any other test. What changes is where the stimulus takes the design.
How is it different from normal constrained random testing?
| Normal constrained random | Stress | |
|---|---|---|
| Goal | Cover the features in the plan | Find the limits and break the design |
| Typical traffic | Valid and ready vary freely, often at moderate rates | Extreme rates: 100% valid, long runs of ready low |
| Where the design spends its time | Half-empty buffers, short waits | Full buffers, long waits, collisions |
| What it finds | Logic bugs in named features | Overflow, lost data, deadlock, recovery bugs |
| When in the flow | Feature verification (P2) | Late feature work and closure (P3), then every regression |
Stress is not a different bench. It is the same bench with different sequences and constraints, plus coverage that proves the stress really happened.
What kinds of stress should you apply?
| Kind | What you do | What it tends to expose |
|---|---|---|
| Throughput | Back-to-back transactions, no idle cycles | Bandwidth limits, pipeline bubbles |
| Back-pressure | The receiver stalls for long stretches | Lost data when full, handshakes that do not recover, deadlock |
| Squeeze | Heavy input with slow output, so buffers live near full | Full-and-busy collisions, off-by-one on full |
| Reset during traffic | Reset while data is in flight | State that reset forgets, stale pointers |
| Error injection | Bad packets, parity or CRC errors, illegal requests | Weak error handling and recovery |
| Contention | Many requesters at once | Arbitration, starvation, ordering |
The first four are in this lesson’s demo. Error injection and contention follow the same pattern.
Why is high coverage not enough on its own?
Coverage tells you a bin was hit at least once. It does not tell you the design was under pressure when it was hit. A FIFO can show 100% coverage of full and empty while never having been full for more than one cycle, or full while a read and a write arrive together. Stress coverage asks those harder questions: how long was it full, did push and pop collide at full, was it reset with data inside? See coverage in SystemVerilog for the building blocks.
How do you know the stress actually happened?
Count it. Every stress test should come with stress corners in the coverage model: cycles spent full, push and pop together at full, the longest stall, resets with data in flight. If those counters are zero, the test did not stress anything, whatever its name says.
Where does stress fit in the verification flow?
After the features work in normal conditions, and before sign-off. Run it once the bench and the basic features are stable, so a failure points to a load problem and not a basic bug. Then keep it in the nightly regression for good. The stages of IP verification lesson shows the full flow.
How does stress find bugs that normal random misses?
Let’s stress a small IP on a real UVM bench and watch which kind of stress finds which bug.
The IP: a 4-entry valid/ready FIFO
- in_ready is 1 when fewer than 4 entries are stored, or when the FIFO is full and out_ready is 1, so a full FIFO can take a new word in the same cycle one leaves.
- A push happens when in_valid and in_ready are both 1. A pop happens when out_valid and out_ready are both 1.
- out_valid is 1 when at least one entry is stored, and out_data is the oldest one.
- Data leaves in the order it came in. Nothing is lost or repeated.
- An asynchronous reset empties the FIFO.
Valid/ready buffers like this sit between almost every pair of blocks in a chip, so this is exactly where stress bugs hurt.
The three bugs
- +BUG=1: when the FIFO is full, a push and a pop in the same cycle loses the pushed word.
- +BUG=2: after 4 cycles of being full, in_ready sticks low until the next reset. The input side locks up.
- +BUG=3: a reset that arrives while data is stored does not clear the write pointer.
None of these is exotic. Each one is a real kind of bug that shows up in valid/ready buffers.
The five phases in the bench
| Phase | Traffic | Kind |
|---|---|---|
| A | 1,000 cycles, in_valid 40%, out_ready 90% | Normal random, the way a first test usually looks |
| B1 | 300 cycles, in_valid and out_ready both always 1 | Throughput |
| B2 | out_ready low for 20 cycles, then high for 20, five times, in_valid always 1 | Back-pressure |
| B3 | 500 cycles, in_valid 90%, out_ready 50% | Squeeze |
| B4 | 30 busy cycles then a reset, five times | Reset during traffic |
The bench resets before each phase. The scoreboard compares every handshake and every word against a queue model written from the spec, and counts four stress corners: cycles spent full, push and pop together at full, stalls of 10 cycles or more, and resets with data inside. Three assertions in the interface check the rules that must hold every cycle: an empty FIFO must be ready, a stalled output must hold its data, and nothing is X.

The code
This file, with its expected output, is also on GitHub in the course repo: tav-verification-basics, 05-stress-verification.
One file, UVM 1.2, every name starting with tav_. Paste it into EDA Playground, pick Synopsys VCS with UVM 1.2, set the top module to tav_top, and run. Add +BUG=1, +BUG=2 or +BUG=3 to switch a bug on.
// tav_stress_fifo_uvm.sv : normal random passes, stress finds the bugs, on a valid/ready FIFO (UVM 1.2)
// Run on Synopsys VCS X-2025.06-SP1 with UVM 1.2 (EDA Playground), 24 Nov 2026.
// The Art of Verification | theartofverification.com
//
// EDA Playground: Synopsys VCS, UVM 1.2, top module "tav_top".
// Paste this whole file into testbench.sv and leave design.sv empty.
//
// One run does five phases, with a reset before each:
// A normal random: 1,000 cycles, in_valid 40%, out_ready 90%
// B1 stress, throughput: 300 cycles at full rate in and out
// B2 stress, back-pressure: the receiver stalls for 20 cycles, five times
// B3 stress, squeeze: 500 cycles, in_valid 90%, out_ready 50%
// B4 stress, reset mid-flow: resets while data is still in the FIFO
// After each phase the scoreboard prints pushes, pops, mismatches, assertion fails,
// the longest stall and which stress corners were hit.
//
// Run options (one per run):
// (none) the clean design
// +BUG=1 when full, a push and a pop in the same cycle loses the pushed data
// +BUG=2 after 4 cycles of being full, in_ready sticks low until the next reset
// +BUG=3 a reset that arrives while data is stored does not clear the write pointer
//
// Spec (4-entry FIFO, valid/ready on both sides):
// in_ready = 1 when fewer than 4 entries are stored, or when full and out_ready is 1
// push = in_valid and in_ready. pop = out_valid and out_ready
// out_valid = 1 when at least 1 entry is stored. out_data is the oldest entry.
// Data leaves in the order it came in, none lost, none repeated.
// rst_n (async, active low) empties the FIFO.
`timescale 1ns/1ns
`include "uvm_macros.svh"
import uvm_pkg::*;
// ---------------------------------------------------------------------------
// The design
// ---------------------------------------------------------------------------
module tav_vr_fifo (input logic clk, rst_n,
input logic in_valid,
input logic [7:0] in_data,
output logic in_ready,
output logic out_valid,
output logic [7:0] out_data,
input logic out_ready,
input int bug);
logic [7:0] mem [4];
logic [1:0] wp, rp;
logic [2:0] count;
logic stuck, dirty;
logic [2:0] full_run;
logic push, pop, full;
assign full = (count == 3'd4);
assign out_valid = (count != 0);
assign out_data = mem[rp];
assign in_ready = stuck ? 1'b0 : (!full || out_ready); // BUG=2 uses stuck
assign push = in_valid && in_ready;
assign pop = out_valid && out_ready;
always_ff @(posedge clk or negedge rst_n) begin
if (!rst_n) begin
rp <= 0; count <= 0; stuck <= 0; full_run <= 0;
// BUG=3: if data was stored when reset arrived, the write pointer keeps its value
if (bug == 3 && (count != 0) === 1'b1) dirty <= 1'b1;
if (!(bug == 3 && ((count != 0) === 1'b1 || dirty === 1'b1))) wp <= 0;
end else begin
dirty <= 1'b0;
if (push && !(bug == 1 && full && pop)) begin // BUG=1
mem[wp] <= in_data;
wp <= wp + 1;
end
if (pop) rp <= rp + 1;
count <= count + push - pop;
full_run <= full ? ((full_run == 3'd7) ? full_run : full_run + 1) : 3'd0;
if (bug == 2 && full_run >= 3'd4) stuck <= 1'b1; // BUG=2
end
end
endmodule
// ---------------------------------------------------------------------------
// Interface: the monitor samples just before each rising edge; assertions live here
// ---------------------------------------------------------------------------
interface tav_fifo_if (input logic clk);
logic rst_n, in_valid, in_ready, out_valid, out_ready;
logic [7:0] in_data, out_data;
clocking mon_cb @(posedge clk);
default input #1step;
input rst_n, in_valid, in_ready, in_data, out_valid, out_ready, out_data;
endclocking
A_EMPTY_READY: assert property (@(posedge clk) disable iff (!rst_n) !out_valid |-> in_ready)
else `uvm_error("SVA", "A_EMPTY_READY: FIFO is empty but in_ready is low")
A_HOLD_OUT: assert property (@(posedge clk) disable iff (!rst_n)
(out_valid && !out_ready) |=> (out_valid && $stable(out_data)))
else `uvm_error("SVA", "A_HOLD_OUT: out_valid dropped or out_data changed while stalled")
A_NO_X: assert property (@(posedge clk) disable iff (!rst_n) !$isunknown({in_ready, out_valid}))
else `uvm_error("SVA", "A_NO_X: in_ready or out_valid is X")
endinterface
// ---------------------------------------------------------------------------
// Transaction: one clock cycle at the FIFO pins
// ---------------------------------------------------------------------------
class tav_fifo_item extends uvm_sequence_item;
rand bit in_valid, out_ready;
bit [7:0] in_data;
bit rst; // 1 = pulse reset instead
// filled in by the monitor
logic in_ready, out_valid;
logic [7:0] out_data;
`uvm_object_utils(tav_fifo_item)
function new(string name = "tav_fifo_item");
super.new(name);
endfunction
endclass
// ---------------------------------------------------------------------------
// Sequences
// ---------------------------------------------------------------------------
class tav_fifo_base_seq extends uvm_sequence #(tav_fifo_item);
`uvm_object_utils(tav_fifo_base_seq)
bit [7:0] next_data = 1;
function new(string name = "tav_fifo_base_seq");
super.new(name);
endfunction
// One cycle with fixed valid/ready
task cyc(bit v, bit r, int n = 1);
repeat (n) begin
req = tav_fifo_item::type_id::create("req");
start_item(req);
req.in_valid = v; req.out_ready = r; req.in_data = next_data++;
finish_item(req);
end
endtask
// n cycles with random valid/ready at the given percentages
task rnd(int n, int v_pct, int r_pct);
repeat (n) begin
req = tav_fifo_item::type_id::create("req");
start_item(req);
if (!req.randomize() with { in_valid dist {1 := v_pct, 0 := 100 - v_pct};
out_ready dist {1 := r_pct, 0 := 100 - r_pct}; })
`uvm_fatal("RAND", "randomize failed")
req.in_data = next_data++;
finish_item(req);
end
endtask
task reset_pulse();
req = tav_fifo_item::type_id::create("req");
start_item(req);
req.rst = 1;
finish_item(req);
endtask
endclass
class tav_reset_seq extends tav_fifo_base_seq;
`uvm_object_utils(tav_reset_seq)
function new(string name = "tav_reset_seq");
super.new(name);
endfunction
task body();
reset_pulse();
endtask
endclass
// Phase A: the kind of random traffic most first tests use
class tav_normal_seq extends tav_fifo_base_seq;
`uvm_object_utils(tav_normal_seq)
function new(string name = "tav_normal_seq");
super.new(name);
endfunction
task body();
rnd(1000, 40, 90);
endtask
endclass
// Phase B1, throughput: full rate in and out, no gaps
class tav_throughput_seq extends tav_fifo_base_seq;
`uvm_object_utils(tav_throughput_seq)
function new(string name = "tav_throughput_seq");
super.new(name);
endfunction
task body();
cyc(1, 1, 300);
endtask
endclass
// Phase B2, back-pressure: the receiver stalls for 20 cycles at a time
class tav_backpressure_seq extends tav_fifo_base_seq;
`uvm_object_utils(tav_backpressure_seq)
function new(string name = "tav_backpressure_seq");
super.new(name);
endfunction
task body();
repeat (5) begin
cyc(1, 0, 20);
cyc(1, 1, 20);
end
endtask
endclass
// Phase B3, squeeze: heavy input, slow output, the FIFO lives near full
class tav_squeeze_seq extends tav_fifo_base_seq;
`uvm_object_utils(tav_squeeze_seq)
function new(string name = "tav_squeeze_seq");
super.new(name);
endfunction
task body();
rnd(500, 90, 50);
endtask
endclass
// Phase B4, reset in the middle of traffic
class tav_reset_traffic_seq extends tav_fifo_base_seq;
`uvm_object_utils(tav_reset_traffic_seq)
function new(string name = "tav_reset_traffic_seq");
super.new(name);
endfunction
task body();
repeat (5) begin
rnd(30, 90, 50);
reset_pulse();
end
rnd(30, 90, 50);
endtask
endclass
// ---------------------------------------------------------------------------
// Driver: drives on the falling edge, idles when there is no item
// ---------------------------------------------------------------------------
class tav_fifo_driver extends uvm_driver #(tav_fifo_item);
`uvm_component_utils(tav_fifo_driver)
virtual tav_fifo_if vif;
function new(string name, uvm_component parent);
super.new(name, parent);
endfunction
function void build_phase(uvm_phase phase);
if (!uvm_config_db#(virtual tav_fifo_if)::get(this, "", "vif", vif))
`uvm_fatal("NOVIF", "no virtual interface")
endfunction
task run_phase(uvm_phase phase);
vif.rst_n <= 0; vif.in_valid <= 0; vif.out_ready <= 0; vif.in_data <= 0;
forever begin
seq_item_port.try_next_item(req);
if (req == null) begin
@(negedge vif.clk);
vif.in_valid <= 0; vif.out_ready <= 1;
end else begin
if (req.rst) begin
@(negedge vif.clk);
vif.rst_n <= 0; vif.in_valid <= 0; vif.out_ready <= 0;
@(negedge vif.clk);
vif.rst_n <= 1;
end else begin
@(negedge vif.clk);
vif.in_valid <= req.in_valid; vif.out_ready <= req.out_ready; vif.in_data <= req.in_data;
end
seq_item_port.item_done();
end
end
endtask
endclass
// ---------------------------------------------------------------------------
// Monitor: one transaction per clock, sampled just before the edge
// ---------------------------------------------------------------------------
class tav_fifo_monitor extends uvm_monitor;
`uvm_component_utils(tav_fifo_monitor)
virtual tav_fifo_if vif;
uvm_analysis_port #(tav_fifo_item) ap;
function new(string name, uvm_component parent);
super.new(name, parent);
ap = new("ap", this);
endfunction
function void build_phase(uvm_phase phase);
if (!uvm_config_db#(virtual tav_fifo_if)::get(this, "", "vif", vif))
`uvm_fatal("NOVIF", "no virtual interface")
endfunction
task run_phase(uvm_phase phase);
forever begin
tav_fifo_item t;
@(vif.mon_cb);
t = tav_fifo_item::type_id::create("t");
t.rst = (vif.mon_cb.rst_n !== 1'b1);
t.in_valid = vif.mon_cb.in_valid;
t.in_ready = vif.mon_cb.in_ready;
t.in_data = vif.mon_cb.in_data;
t.out_valid = vif.mon_cb.out_valid;
t.out_ready = vif.mon_cb.out_ready;
t.out_data = vif.mon_cb.out_data;
ap.write(t);
end
endtask
endclass
// ---------------------------------------------------------------------------
// Scoreboard: queue model from the spec, stall watchdog, stress corners
// ---------------------------------------------------------------------------
class tav_fifo_scoreboard extends uvm_scoreboard;
`uvm_component_utils(tav_fifo_scoreboard)
uvm_analysis_imp #(tav_fifo_item, tav_fifo_scoreboard) imp;
bit [7:0] q[$];
int pushes, pops, mismatches, shown, stall, max_stall, bp_run, sva_at_start;
int c_full, c_full_push_pop, c_long_bp, c_reset_data;
function new(string name, uvm_component parent);
super.new(name, parent);
imp = new("imp", this);
endfunction
function void start_phase(string name);
`uvm_info("PHASE", name, UVM_NONE)
pushes = 0; pops = 0; mismatches = 0; shown = 0; stall = 0; max_stall = 0; bp_run = 0;
c_full = 0; c_full_push_pop = 0; c_long_bp = 0; c_reset_data = 0;
sva_at_start = uvm_report_server::get_server().get_id_count("SVA");
endfunction
function void err(string msg);
mismatches++;
if (shown < 2) begin
shown++;
`uvm_error("MISMATCH", msg)
end
endfunction
function void write(tav_fifo_item t);
bit e_ready, e_valid, push, pop;
if (t.rst) begin
if (q.size() > 0) c_reset_data++;
q.delete(); stall = 0; bp_run = 0;
return;
end
// Expected handshake signals, from the spec
e_valid = (q.size() > 0);
e_ready = (q.size() < 4) || t.out_ready;
if (t.out_valid !== e_valid)
err($sformatf("out_valid=%b, expected %b with %0d stored", t.out_valid, e_valid, q.size()));
if (t.in_ready !== e_ready)
err($sformatf("in_ready=%b, expected %b with %0d stored, out_ready=%b", t.in_ready, e_ready, q.size(), t.out_ready));
// Stress corners
if (q.size() == 4) c_full++;
push = t.in_valid && t.in_ready;
pop = t.out_valid && t.out_ready;
if (q.size() == 4 && push && pop) c_full_push_pop++;
if (t.out_valid && !t.out_ready) bp_run++; else bp_run = 0;
if (bp_run == 10) c_long_bp++;
// Stall watchdog: how long has valid input waited without being accepted?
if (t.in_valid && !t.in_ready) stall++; else stall = 0;
if (stall > max_stall) max_stall = stall;
// Data: pop first, then push, as the hardware does at the edge
if (pop) begin
pops++;
if (q.size() == 0) err($sformatf("popped data=%0d but nothing was stored", t.out_data));
else if (t.out_data !== q[0]) err($sformatf("popped data=%0d, expected %0d", t.out_data, q[0]));
if (q.size() > 0) void'(q.pop_front());
end
if (push) begin
pushes++;
q.push_back(t.in_data);
end
endfunction
function void end_phase(string name);
int sva, corners;
sva = uvm_report_server::get_server().get_id_count("SVA") - sva_at_start;
corners = (c_full > 0) + (c_full_push_pop > 0) + (c_long_bp > 0) + (c_reset_data > 0);
`uvm_info("RESULT", $sformatf("%s: pushes=%0d pops=%0d mismatches=%0d assertion_fails=%0d max_stall=%0d -> %s",
name, pushes, pops, mismatches, sva, max_stall,
(mismatches == 0 && sva == 0) ? "PASS" : "FAIL"), UVM_NONE)
`uvm_info("CORNERS", $sformatf("%s: full=%0d full_push_pop=%0d long_backpressure=%0d reset_with_data=%0d (%0d of 4 stress corners hit)",
name, c_full, c_full_push_pop, c_long_bp, c_reset_data, corners), UVM_NONE)
endfunction
endclass
// ---------------------------------------------------------------------------
// Agent and environment
// ---------------------------------------------------------------------------
class tav_fifo_agent extends uvm_agent;
`uvm_component_utils(tav_fifo_agent)
uvm_sequencer #(tav_fifo_item) sqr;
tav_fifo_driver drv;
tav_fifo_monitor mon;
function new(string name, uvm_component parent);
super.new(name, parent);
endfunction
function void build_phase(uvm_phase phase);
sqr = uvm_sequencer#(tav_fifo_item)::type_id::create("sqr", this);
drv = tav_fifo_driver::type_id::create("drv", this);
mon = tav_fifo_monitor::type_id::create("mon", this);
endfunction
function void connect_phase(uvm_phase phase);
drv.seq_item_port.connect(sqr.seq_item_export);
endfunction
endclass
class tav_fifo_env extends uvm_env;
`uvm_component_utils(tav_fifo_env)
tav_fifo_agent agt;
tav_fifo_scoreboard scb;
function new(string name, uvm_component parent);
super.new(name, parent);
endfunction
function void build_phase(uvm_phase phase);
agt = tav_fifo_agent::type_id::create("agt", this);
scb = tav_fifo_scoreboard::type_id::create("scb", this);
endfunction
function void connect_phase(uvm_phase phase);
agt.mon.ap.connect(scb.imp);
endfunction
endclass
// ---------------------------------------------------------------------------
// Test: normal random first, then four kinds of stress
// ---------------------------------------------------------------------------
class tav_stress_test extends uvm_test;
`uvm_component_utils(tav_stress_test)
tav_fifo_env env;
virtual tav_fifo_if vif;
function new(string name, uvm_component parent);
super.new(name, parent);
endfunction
function void build_phase(uvm_phase phase);
env = tav_fifo_env::type_id::create("env", this);
if (!uvm_config_db#(virtual tav_fifo_if)::get(this, "", "vif", vif))
`uvm_fatal("NOVIF", "no virtual interface")
endfunction
task run_one(string name, tav_fifo_base_seq s);
tav_reset_seq r = tav_reset_seq::type_id::create("r");
env.scb.start_phase(name);
r.start(env.agt.sqr);
s.start(env.agt.sqr);
repeat (2) @(vif.mon_cb); // let the monitor see the last cycle
#1;
env.scb.end_phase(name);
endtask
task run_phase(uvm_phase phase);
phase.raise_objection(this);
run_one("A normal random", tav_normal_seq::type_id::create("a"));
run_one("B1 stress: throughput", tav_throughput_seq::type_id::create("b1"));
run_one("B2 stress: back-pressure", tav_backpressure_seq::type_id::create("b2"));
run_one("B3 stress: squeeze", tav_squeeze_seq::type_id::create("b3"));
run_one("B4 stress: reset mid-flow", tav_reset_traffic_seq::type_id::create("b4"));
phase.drop_objection(this);
endtask
endclass
// ---------------------------------------------------------------------------
// Top
// ---------------------------------------------------------------------------
module tav_top;
logic clk = 0;
int BUG = 0;
always #5 clk = ~clk;
tav_fifo_if vif (clk);
tav_vr_fifo dut (.clk(clk), .rst_n(vif.rst_n), .in_valid(vif.in_valid), .in_data(vif.in_data),
.in_ready(vif.in_ready), .out_valid(vif.out_valid), .out_data(vif.out_data),
.out_ready(vif.out_ready), .bug(BUG));
initial begin
void'($value$plusargs("BUG=%d", BUG));
`uvm_info("TOP", $sformatf("Running with BUG=%0d", BUG), UVM_NONE)
uvm_config_db#(virtual tav_fifo_if)::set(null, "uvm_test_top", "vif", vif);
uvm_config_db#(virtual tav_fifo_if)::set(null, "uvm_test_top.env.agt.*", "vif", vif);
run_test("tav_stress_test");
end
endmodule
What output should you expect?
With no bug switched on, this is the real log from Synopsys VCS X-2025.06-SP1 with UVM 1.2 (trimmed to the result lines):
[RESULT] A normal random: pushes=380 pops=380 mismatches=0 assertion_fails=0 max_stall=0 -> PASS
[CORNERS] A normal random: full=0 full_push_pop=0 long_backpressure=0 reset_with_data=0 (0 of 4 stress corners hit)
[RESULT] B1 stress: throughput: pushes=300 pops=300 mismatches=0 assertion_fails=0 max_stall=0 -> PASS
[CORNERS] B1 stress: throughput: full=0 full_push_pop=0 long_backpressure=0 reset_with_data=0 (0 of 4 stress corners hit)
[RESULT] B2 stress: back-pressure: pushes=104 pops=101 mismatches=0 assertion_fails=0 max_stall=20 -> PASS
[CORNERS] B2 stress: back-pressure: full=197 full_push_pop=100 long_backpressure=5 reset_with_data=0 (3 of 4 stress corners hit)
[RESULT] B3 stress: squeeze: pushes=246 pops=244 mismatches=0 assertion_fails=0 max_stall=10 -> PASS
[CORNERS] B3 stress: squeeze: full=441 full_push_pop=190 long_backpressure=1 reset_with_data=1 (4 of 4 stress corners hit)
[RESULT] B4 stress: reset mid-flow: pushes=111 pops=89 mismatches=0 assertion_fails=0 max_stall=5 -> PASS
[CORNERS] B4 stress: reset mid-flow: full=108 full_push_pop=50 long_backpressure=0 reset_with_data=6 (3 of 4 stress corners hit)
Read the CORNERS lines before the PASS. Normal random ran 1,000 cycles and the FIFO was not full for a single one of them. Throughput moved 300 words at full rate and the FIFO was never full either: every word went straight through. Both phases pass, and both prove nothing about the hard cases. B2 to B4 keep the FIFO full for 197, 441 and 108 cycles, push and pop together at full 100, 190 and 50 times, and B4 resets six times with data inside (five on purpose, plus the reset at the start of the phase).
Now the bugs, same bench, real VCS results:
| Run | A normal | B1 throughput | B2 back-pressure | B3 squeeze | B4 reset mid-flow |
|---|---|---|---|---|---|
| No bug | PASS | PASS | PASS | PASS | PASS |
| +BUG=1 (lost word when full) | PASS | PASS | FAIL: 97 mismatches | FAIL: 226 mismatches, 6 assertion fails | FAIL: 40 mismatches, 1 assertion fail |
| +BUG=2 (in_ready sticks low) | PASS | PASS | FAIL: 181 mismatches, 177 assertion fails, max stall 196 | FAIL: 489 mismatches, 481 assertion fails | FAIL: 92 mismatches, 61 assertion fails |
| +BUG=3 (reset keeps write pointer) | PASS | PASS | PASS | PASS | FAIL: 73 mismatches, 8 assertion fails |

The bold cell is the first phase that caught each bug:
- BUG=1 needs a push and a pop in the same cycle while the FIFO is full. A and B1 never fill it, so the bug cannot fire. B2 fills it during the stall, and the moment the receiver wakes up is exactly that collision. In B3 and B4 the assertion A_HOLD_OUT fires too: after a lost word the write pointer is out of step with the count, so a later push can overwrite the word waiting at the output while the receiver is stalled.
- BUG=2 needs the FIFO full for 4 cycles in a row. B2 holds it full for most of each 20-cycle stall, and the input side locks. B2 accepts 4 words instead of 104, the watchdog sees the sender wait 196 cycles, and once the FIFO drains, A_EMPTY_READY fires on every cycle it sits empty with in_ready low. The scoreboard and the assertion flag the same lock-up from two sides. The reset at the start of each phase clears the stuck flag, so B3 and B4 fill, lock and fail again.
- BUG=3 needs a reset while data is stored, and only B4 resets in the middle of traffic. B3 shows something worth noticing: its CORNERS line counts one reset with data (the reset at the start of B3, with 3 words left over from B2), yet B3 passes with the bug on. After 104 pushes in B2, the write pointer had wrapped back to 0, the value reset would have given it anyway. The corner was hit, but the bug had nothing to break. That is why B4 resets five times at random fill levels, and why the AI’s idea further down, a reset at every fill level, is worth adding.
This is the first mismatch from the BUG=1 run:
UVM_ERROR @ 13355: uvm_test_top.env.scb [MISMATCH] popped data=1, expected 21
The bench numbers every word it offers, one per cycle, including the words the full FIFO refused during the stall, so 21 is the first word offered when the receiver came back. It arrived while the FIFO was full and a pop happened in the same cycle, so it was dropped. So was every word after it while the FIFO stayed full and draining, and the FIFO handed back its old contents instead: the second error line reads popped data=2, expected 22. The other mismatches in B2 are echoes of those lost writes. As always, debug from the first line, then shrink it to a short directed test: fill to 4, then push and pop together once. The counts may differ on another simulator or seed.
What are the most common stress verification mistakes?
| Mistake | What it looks like | Fix |
|---|---|---|
| Calling full throughput “stress” | 100% valid and 100% ready, so the buffer never fills | Stall the receiver too: stress needs both pressure and blockage |
| No proof the stress happened | A test named stress_test with no stress counters | Count cycles full, collisions at full, long stalls, resets with data |
| Only checking data at the end | A final count matches, but order or timing broke along the way | Check every handshake and every word, every cycle |
| No watchdog | A deadlock just makes the test time out, hours later | Track the longest stall and flag any wait beyond the spec |
| Resetting only when idle | Every reset happens between tests, never with data inside | Reset in the middle of traffic, on purpose |
| Running stress too early | Basic bugs flood the stress results | Run stress once sanity and feature tests are clean |
| Running stress once | One seed passes and stress is ticked off | Keep stress in the nightly regression on many seeds |
How do you debug a failure that only appears under stress?
- Find the first error, not the last. Under stress one bug causes a flood of later errors.
- Look at the state at that moment. How many entries were stored? Was the receiver stalled? Had there just been a reset?
- Look at the stress counters. If the failure appears only in phases where a corner is hit, that corner is your suspect.
- Shrink it. Write the shortest directed sequence that reproduces it, for example: fill to 4, then push and pop together once.
- Keep that sequence forever as a regression test.
For the full method, see the practical verification debug guide.
Can AI help you design stress tests?
Yes, for brainstorming what to stress. It is good at listing the ways a protocol can be pushed. It cannot know your buffer sizes, your latencies or which corners your bench already hits, so you still decide what matters.
Task: list stress scenarios for the valid/ready FIFO and compare them with my four phases.
Tool: Claude, in Anthropic’s Cowork app, 24 Nov 2026.
Prompt:
You are a senior design verification engineer.
IP: 4-entry FIFO with valid/ready on both sides.
- in_ready = 1 when fewer than 4 stored, or when full and out_ready = 1
- push = in_valid && in_ready; pop = out_valid && out_ready
- out_valid = 1 when anything is stored; out_data is the oldest entry
- async active-low reset empties the FIFO
List stress scenarios for this IP. For each, give the stimulus, the bug it
would expose and a coverage item that proves the scenario happened.
Only use behaviour stated in the spec. Mark anything you assumed with ASSUMED.
Output (excerpt):
1. Full-rate pass-through (valid=1, ready=1): checks no bubbles.
Cover: consecutive pushes with no idle cycle.
2. Fill then hold: ready=0 for many cycles, valid=1. Checks in_ready drops
at exactly 4 and that no word is accepted while full and stalled.
Cover: cycles full, longest stall.
3. Release from full: ready goes 0 -> 1 while valid=1. Push and pop in the
same cycle at full. Cover: push && pop && count==4.
4. Ready toggling every cycle while full. Cover: ready transitions at full.
5. Reset with 1, 2, 3 and 4 entries stored. Cover: reset x occupancy.
6. Valid dropped while not ready (source gives up). ASSUMED: the source may
withdraw valid before it is accepted.
7. Empty to full to empty repeatedly at random rates. Cover: occupancy x
push x pop.
How I validated it: I mapped each item to my phases. Items 1 to 3 match B1, B2 and the collisions in B3. Three are worth taking:
- Item 4, ready toggling at full, is a sharper version of my squeeze and would hit the BUG=1 collision more often.
- Item 5, reset at each occupancy level, is better than my random mid-flow resets. It makes sure resets with 1, 2, 3 and 4 entries all happen.
- Item 7’s occupancy cross is a better stress coverage model than my four counters.
Item 6 is correctly marked ASSUMED. Many valid/ready protocols, such as AXI, forbid dropping valid before it is accepted, so this needs the spec owner’s answer before it becomes a test. Nothing in the answer contradicted the spec.
Where it tends to fail:
- It does not know your real numbers: how deep the buffers are, how long a real receiver stalls. Stress that is too gentle proves nothing.
- It can suggest scenarios your protocol forbids. Always check them against the spec.
- It cannot tell whether your bench reached a corner. Only your coverage can.
- Every scenario sounds equally important. Rank them by what the real system will do.
Interview questions on stress verification
- What is stress verification? Driving the design with traffic chosen to push its limits, such as full rate, long stalls, buffers near full and resets during traffic, to find bugs that only appear under load.
- How is it different from constrained random testing? Same bench and checks, different goal. Normal random covers features at ordinary rates. Stress deliberately drives the design to its extremes and stays there.
- You run 100% valid and 100% ready on a FIFO. Is that a stress test? Not a strong one. The FIFO passes data straight through and never fills. Real stress also needs the receiver to stall.
- How do you know your stress test actually stressed the design? Coverage on stress corners: cycles full, push and pop together at full, the longest stall, resets with data inside. If they are zero, nothing was stressed.
- How do you detect a deadlock in simulation? A watchdog that tracks how long a valid request waits without being accepted, and flags any wait beyond what the spec allows, instead of waiting for a global timeout.
- Why reset in the middle of traffic? Because reset is the one moment every state element must return to a known value at once. Logic that is only ever reset when idle can hide state that reset forgets.
- When in the flow do you run stress tests? After sanity and feature verification are clean, so failures point to load problems. Then in every regression.
Practice challenge
Take the AI’s two best ideas and see if they find bugs faster.
- Add a B5 phase that fills the FIFO, then toggles out_ready every cycle for 100 cycles with in_valid held at 1.
- Add a B6 phase that resets the FIFO with exactly 1, 2, 3 and then 4 entries stored.
- Add a covergroup crossing occupancy (0 to 4) with push and pop, and report it per phase.
- Run +BUG=1 and +BUG=3. Does each bug appear sooner, measured in cycles, in your new phases than in B3 and B4?
Frequently asked questions
What is stress verification in VLSI?
Stress verification drives a design with extreme traffic, such as full rate, long receiver stalls, buffers near full and resets during traffic, to find bugs that only appear under load and that normal random tests rarely reach.
What is back-pressure in verification?
Back-pressure is when the receiver of data is not ready, so data backs up into the sender. Testing it means holding ready low for long stretches and checking that nothing is lost, nothing is accepted that should not be, and the interface recovers when ready returns.
Is stress testing the same as constrained random testing?
No. Both use random stimulus, but constrained random aims to cover features at ordinary rates, while stress testing deliberately pushes the design to its limits and stays there.
How do you measure stress coverage?
Add coverage for the extreme conditions themselves: how long a buffer stayed full, whether push and pop collided at full, the longest stall, and whether resets happened with data inside. Ordinary feature coverage does not measure these.
When should stress tests run?
After sanity and feature tests are clean, and then in every regression on many seeds. Running stress before the basics work only buries real load bugs under basic failures.
References and related lessons
References
- Accellera UVM standard downloads: the UVM library this bench uses.
- EDA Playground: run the demo in your browser with Synopsys VCS.
Related lessons
- Full course: Verification Basics, all 8 lessons in order
- Previous lesson: The Stages of IP Verification: From Plan to Sign-Off
- Next lesson: Debugging in Verification: The Art and Science of Finding the Real Bug
- How to Build a Strong Verification Plan
- The Thought Process Behind Great Verification: a 16-deep FIFO with three bugs
- Async FIFO Verification, Part 1
- Coverage in SystemVerilog
- Assertions and their advantages
- The Practical Verification Debug Guide
Part of the learning path Verification fundamentals
