Cover image: The Stages of IP Verification: From Plan to Sign-Off | The Art of Verification

The Stages of IP Verification: From Plan to Sign-Off (With a UVM Example)

In short: IP verification moves through stages: plan, testbench bring-up, sanity, feature verification, coverage closure, regression and sign-off, then release and integration support. Each stage has its own goal and catches a different kind of bug. Sanity finds plumbing bugs, feature verification finds logic bugs, and closure finds the rare corner bugs. In this lesson a round-robin arbiter IP hides three bugs, and each one is caught at a different stage on a real UVM bench.

Why does IP verification happen in stages?

Because you cannot do everything at once, and you should not try. On day one there is no testbench. Running 2,000 random cycles on a bench that cannot even drive one request is a waste of compute and of your time. On the last day, a bench that only runs one request per port proves almost nothing.

Stages give the work an order. Each one has a clear goal, a clear exit condition and a different kind of bug it is good at finding. Skip one and a whole class of bugs walks past you to the next stage, where it costs more to find.

In lesson 3 you wrote a verification plan, with P1, P2 and P3 execution phases. This lesson zooms in on how that plan plays out on a real IP, stage by stage.

The picture: opening a new restaurant

Nobody opens a restaurant by throwing the doors open on a Friday night and hoping.

  • The menu and the kitchen plan come first. (The verification plan.)
  • The kitchen is fitted out and the stoves light. (Testbench bring-up.)
  • Each dish is cooked once and tasted. (Sanity: does each basic path work?)
  • The whole menu runs with the full staff, many orders at once. (Feature verification.)
  • A packed Friday night is rehearsed, with odd orders and allergies. (Coverage closure: the rare combinations.)
  • Every night runs the same way for weeks, and the inspector signs off. (Regression and sign-off.)
  • Guests arrive, and the kitchen still helps when a guest asks for something new. (Release and integration support.)

A dish that is wrong on the first tasting should never reach the Friday rehearsal. A problem that only shows on a packed Friday will never show in a single tasting. That is why both stages exist.

What will you learn in this lesson?

By the end of this lesson you will be able to:

  • Name the stages of IP verification and the goal of each one.
  • Say what each stage hands to the next, and when a stage is finished.
  • Explain which kind of bug each stage is best at finding.
  • Tell IP-level verification apart from subsystem, SoC and post-silicon verification.
  • Walk a small IP through sanity, feature and closure on a UVM bench and read the results.

What are the stages of IP verification?

Names differ between companies, but almost every IP team goes through these seven stages, in this order:

#StageGoalExit conditionBugs it is best at
1Spec review and verification planAgree what must be provenPlan reviewed by design and architectureSpec holes and contradictions
2Testbench bring-upA bench that compiles and drives one transactionAll components built and connectedBench bugs, interface mismatches
3Sanity (P1)Each basic path works onceBasic tests pass cleanlyPlumbing: reset, connections, the obvious
4Feature verification (P2)Every feature in the plan exercised and checkedAlmost all tests coded, coverage about 80%Logic bugs in named features
5Coverage closure (P3)Every coverage goal reachedCoverage closed or waived; critical waveforms reviewedRare combinations and corners
6Regression and sign-offResults that stay green, run after runSign-off criteria met over many seedsIntermittent and seed-dependent bugs
7Release and integration supportThe IP works inside someone else’s chipIP delivered; SoC team questions answeredIntegration and configuration bugs

P1, P2 and P3 are the execution phases from lesson 3. Some teams use other names for them.

Diagram: the seven stages of IP verification, plan, bring-up, sanity (P1), feature (P2), closure (P3), regression and sign-off, release and integration, each labelled with the kind of bug it finds. A bug found at any stage means fix, rerun sanity, and add the case to regression.
Each stage catches a different kind of bug. Skip one and that kind walks into the next stage.

What happens in spec review and planning?

You read the spec until you could explain every feature to someone else, and you write the verification plan: features with priorities, testbench architecture, checkers, assertions, coverage and sign-off criteria. Questions you cannot answer go back to the designer now, not in week ten.

What is testbench bring-up?

You build the UVM components (interface, agent, scoreboard, environment, test) and get one transaction through the design and back to the checker. Nothing is being verified yet. The goal is a bench you can trust, because every later result depends on it.

What is a sanity stage, and why is it so short?

Sanity runs the simplest possible traffic: each port once, reset, idle. It should take minutes, not days. It catches the bugs that would make every other test fail for a boring reason, such as a swapped wire or a reset that never releases. It is also the first thing you rerun after every new RTL drop.

What happens in feature verification?

This is the bulk of the work. You go through the plan feature by feature with directed tests for the named cases and constrained random for the mixes. Checkers and assertions are on for every run. Most logic bugs are found here.

What is coverage closure?

You look at what the coverage model says was never hit, then write or weight stimulus until it is hit, or write down why it cannot be. This is where the rare corners live: three requests at once with an unusual history, a full FIFO with a reset, a burst that crosses a boundary. You also review the waveforms of the critical scenarios by eye.

What does regression and sign-off involve?

Everything runs, every night, on many seeds. A test that passed once is not trusted until it passes again and again. Sign-off is the moment the criteria in the plan are all met and reviewed. See the stress verification lesson for pushing the design harder at this stage.

Is the IP done after sign-off?

No. The IP now goes into a subsystem or an SoC, often configured in ways you did not test. Expect questions, waveforms and bug reports from the integration team. Keeping your bench and plan ready for them is part of the job.

How is IP-level verification different from SoC-level verification?

They answer different questions, at different levels:

LevelWhat is verifiedTypical benchMain question
UnitOne small block inside the IP, such as a FIFO or an arbiterSmall, often directed or formalDoes this piece work on its own?
IPThe whole IP, in each configuration that will shipFull UVM bench, constrained randomDoes the IP meet its spec, every feature?
SubsystemA few IPs connected togetherIP agents reused, some passiveDo these IPs work together?
SoCThe full chip, with CPU and softwareSoftware tests plus reused agentsDoes the chip work as a product?
Post-siliconReal silicon in the labSoftware and lab equipmentDoes it work in real life?
Diagram: verification levels from unit to IP to subsystem to SoC to post-silicon, each with what is verified, the bench used and the question it answers. IP level is highlighted, with a note that IP agents switch from active to passive for reuse at higher levels.
Each level asks a bigger question. A good IP bench is built to be reused above it.

The best IP benches are built for reuse: agents that can switch from active (driving) to passive (only watching) so the same monitors, checkers and coverage keep working at subsystem and SoC level.

What about IP bought from a vendor?

If you buy an IP, someone else ran stages 1 to 6. Your job starts at stage 7: verify it in the configuration you chose, connected the way your chip connects it. A vendor that has shipped the IP in many chips has seen more corner cases than one that has shipped it in a few, but your configuration may still be new. Treat it as a fresh plan, not a formality.

How do the stages play out on a real IP?

Let’s take one small IP through stages 3, 4 and 5 on a real UVM bench, and watch each stage catch a different bug.

The IP: a 4-way round-robin arbiter

Four requesters share one resource. Each cycle the arbiter grants at most one of them.

  • gnt is one-hot or zero, and gnt[i] is 1 only if req[i] is 1.
  • If any request is high, exactly one grant is given.
  • The search starts just after the last requester that won, so a request that stays high waits at most 3 cycles.
  • After reset, requester 0 has first priority.

Arbiters sit inside almost every interconnect, DMA and memory controller, so this is a real IP block, just a small one.

The plan in one table

IDFeaturePriorityChecked by
F1Reset gives requester 0 first priorityHighScoreboard
F2One grant at most, only to a requesterHighAssertions A_ONE_HOT, A_GNT_REQ
F3Any request gets a grantHighAssertion A_NO_IDLE
F4Round-robin order from the last winnerHighScoreboard reference model
F5Fairness: no wait longer than 3 cyclesHighScoreboard wait counters
F6Every request pattern after every winnerMediumCoverage: 16 patterns x 4 last winners = 64 bins

The three stages in the bench

StageStimulusWhat it is for
Stage 1, sanityEach requester alone, with idle cycles between (8 cycles)Does the basic path work?
Stage 2, featureFull rotation with all four requesting, the pairs, then 300 random cycles with at most two requestersDoes each named feature work?
Stage 3, closure2,000 dense random cycles, each requester high 70% of the timeHave we seen every pattern?

The bench resets before each stage and prints one RESULT line per stage: checks, mismatches, assertion failures, the longest wait seen, fairness violations and pattern coverage.

Diagram: UVM testbench architecture for the round-robin arbiter. tav_ip_stages_test runs sanity, feature and closure. The agent's driver drives req and its monitor samples req and gnt through tav_arb_if, which carries three SVA assertions. The scoreboard holds the round-robin reference model, checkers, fairness wait counters, pattern coverage and the stage report.
The same UVM structure as lesson 3, now with a fairness check and pattern coverage.

The three bugs

  • +BUG=1: the pointer does not move after granting requester 2, so requester 2 keeps winning and the others starve.
  • +BUG=2: with no request at all, the arbiter still grants the last winner.
  • +BUG=3: only when requests are 1101 and the last winner was 3, it grants requester 2 instead of 0.

The code

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_ip_stages_uvm.sv : one IP, three verification stages, three bugs, each found at a different stage (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 walks the IP through three stages, with a reset before each:
//   Stage 1, sanity:   each requester alone, with idle cycles in between (8 cycles)
//   Stage 2, feature:  directed rotation and pair patterns, then 300 random cycles
//                      with at most two requesters at a time
//   Stage 3, closure:  2,000 dense random cycles, chasing every request pattern
// After each stage the scoreboard prints checks, mismatches, assertion fails,
// the longest wait seen and the request-pattern coverage.
//
// Run options (one per run):
//   (none)    the clean design
//   +BUG=1    the pointer does not move after granting requester 2 (starvation)
//   +BUG=2    with no request at all, the arbiter still grants the last winner
//   +BUG=3    with requests 1101 and last winner 3, it grants requester 2 instead of 0
//
// Spec (4 requesters, round robin):
//   gnt is one-hot or zero. gnt[i] is 1 only if req[i] is 1.
//   If any request is high, exactly one grant is given.
//   The search starts just after the last requester that was granted, so a request
//   that stays high is granted within 4 cycles (it waits at most 3).
//   After reset the last winner is 3, so requester 0 has first priority.

`timescale 1ns/1ns
`include "uvm_macros.svh"
import uvm_pkg::*;

// ---------------------------------------------------------------------------
// The design: a 4-way round-robin arbiter
// ---------------------------------------------------------------------------
module tav_rr_arbiter (input  logic       clk, rst_n,
                       input  logic [3:0] req,
                       output logic [3:0] gnt,
                       input  int         bug);
  logic [1:0] last;

  always_comb begin
    gnt = '0;
    for (int k = 1; k <= 4; k++) begin
      int idx;
      idx = (last + k) % 4;
      if (req[idx] && gnt == 0) gnt[idx] = 1'b1;
    end
    if (bug == 2 && req == 4'b0000) gnt = 4'b0001 << last;                 // BUG=2
    if (bug == 3 && req == 4'b1101 && last == 2'd3) gnt = 4'b0100;         // BUG=3
  end

  always_ff @(posedge clk or negedge rst_n) begin
    if (!rst_n)
      last <= 2'd3;
    else if (gnt != 0 && !(bug == 1 && gnt[2]))                          // BUG=1
      for (int i = 0; i < 4; i++) if (gnt[i]) last <= i;
  end
endmodule

// ---------------------------------------------------------------------------
// Interface: the monitor samples just before each rising edge; assertions live here
// ---------------------------------------------------------------------------
interface tav_arb_if (input logic clk);
  logic       rst_n;
  logic [3:0] req, gnt;
  clocking mon_cb @(posedge clk);
    default input #1step;
    input rst_n, req, gnt;
  endclocking

  A_ONE_HOT:   assert property (@(posedge clk) disable iff (!rst_n) $onehot0(gnt))
    else `uvm_error("SVA", $sformatf("A_ONE_HOT: gnt=%b", $sampled(gnt)))
  A_GNT_REQ:   assert property (@(posedge clk) disable iff (!rst_n) (gnt & ~req) == 4'b0000)
    else `uvm_error("SVA", $sformatf("A_GNT_REQ: gnt=%b without req=%b", $sampled(gnt), $sampled(req)))
  A_NO_IDLE:   assert property (@(posedge clk) disable iff (!rst_n) (req != 0) |-> (gnt != 0))
    else `uvm_error("SVA", $sformatf("A_NO_IDLE: req=%b but no grant", $sampled(req)))
endinterface

// Coverage: every request pattern against every last winner (16 x 4 = 64 bins)
covergroup tav_arb_cg with function sample(bit [3:0] req, bit [1:0] last);
  option.per_instance = 1;
  cp_req:  coverpoint req  { bins r[] = {[0:15]}; }
  cp_last: coverpoint last { bins l[] = {[0:3]}; }
  x_req_last: cross cp_req, cp_last;
endgroup

// ---------------------------------------------------------------------------
// Transaction: one clock cycle at the arbiter pins
// ---------------------------------------------------------------------------
class tav_arb_item extends uvm_sequence_item;
  rand bit [3:0] req;
  bit            rst;            // 1 = pulse reset instead
  logic [3:0]    gnt;            // filled in by the monitor
  `uvm_object_utils(tav_arb_item)
  function new(string name = "tav_arb_item");
    super.new(name);
  endfunction
endclass

// ---------------------------------------------------------------------------
// Sequences: one per stage
// ---------------------------------------------------------------------------
class tav_arb_base_seq extends uvm_sequence #(tav_arb_item);
  `uvm_object_utils(tav_arb_base_seq)
  function new(string name = "tav_arb_base_seq");
    super.new(name);
  endfunction
  task cyc(bit [3:0] r, int n = 1);
    repeat (n) begin
      req = tav_arb_item::type_id::create("req");
      start_item(req);
      req.req = r;
      finish_item(req);
    end
  endtask
endclass

class tav_reset_seq extends tav_arb_base_seq;
  `uvm_object_utils(tav_reset_seq)
  function new(string name = "tav_reset_seq");
    super.new(name);
  endfunction
  task body();
    req = tav_arb_item::type_id::create("req");
    start_item(req);
    req.rst = 1;
    finish_item(req);
  endtask
endclass

// Stage 1, sanity: does the plumbing work at all?
class tav_sanity_seq extends tav_arb_base_seq;
  `uvm_object_utils(tav_sanity_seq)
  function new(string name = "tav_sanity_seq");
    super.new(name);
  endfunction
  task body();
    cyc(4'b0001); cyc(4'b0000);
    cyc(4'b0010); cyc(4'b0000);
    cyc(4'b0100); cyc(4'b0000);
    cyc(4'b1000); cyc(4'b0000);
  endtask
endclass

// Stage 2, feature: the behaviour the spec names, plus random light traffic
class tav_feature_seq extends tav_arb_base_seq;
  `uvm_object_utils(tav_feature_seq)
  function new(string name = "tav_feature_seq");
    super.new(name);
  endfunction
  task body();
    cyc(4'b1111, 8);                       // full rotation, twice
    cyc(4'b0101, 4); cyc(4'b1010, 4);      // pairs
    cyc(4'b0110, 4); cyc(4'b1001, 4);
    repeat (300) begin
      req = tav_arb_item::type_id::create("req");
      start_item(req);
      if (!req.randomize() with { $countones(req) <= 2; })
        `uvm_fatal("RAND", "randomize failed")
      finish_item(req);
    end
  endtask
endclass

// Stage 3, closure: dense random traffic until every pattern is seen
class tav_closure_seq extends tav_arb_base_seq;
  `uvm_object_utils(tav_closure_seq)
  function new(string name = "tav_closure_seq");
    super.new(name);
  endfunction
  task body();
    repeat (2000) begin
      req = tav_arb_item::type_id::create("req");
      start_item(req);
      if (!req.randomize() with {
            req[0] dist {1 := 70, 0 := 30};
            req[1] dist {1 := 70, 0 := 30};
            req[2] dist {1 := 70, 0 := 30};
            req[3] dist {1 := 70, 0 := 30}; })
        `uvm_fatal("RAND", "randomize failed")
      finish_item(req);
    end
  endtask
endclass

// ---------------------------------------------------------------------------
// Driver: drives on the falling edge, idles when there is no item
// ---------------------------------------------------------------------------
class tav_arb_driver extends uvm_driver #(tav_arb_item);
  `uvm_component_utils(tav_arb_driver)
  virtual tav_arb_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_arb_if)::get(this, "", "vif", vif))
      `uvm_fatal("NOVIF", "no virtual interface")
  endfunction
  task run_phase(uvm_phase phase);
    vif.rst_n <= 0; vif.req <= 0;
    forever begin
      seq_item_port.try_next_item(req);
      if (req == null) begin
        @(negedge vif.clk);
        vif.req <= 0;
      end else begin
        if (req.rst) begin
          @(negedge vif.clk);
          vif.rst_n <= 0; vif.req <= 0;
          @(negedge vif.clk);
          vif.rst_n <= 1;
        end else begin
          @(negedge vif.clk);
          vif.req <= req.req;
        end
        seq_item_port.item_done();
      end
    end
  endtask
endclass

// ---------------------------------------------------------------------------
// Monitor: one transaction per clock, sampled just before the edge
// ---------------------------------------------------------------------------
class tav_arb_monitor extends uvm_monitor;
  `uvm_component_utils(tav_arb_monitor)
  virtual tav_arb_if vif;
  uvm_analysis_port #(tav_arb_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_arb_if)::get(this, "", "vif", vif))
      `uvm_fatal("NOVIF", "no virtual interface")
  endfunction
  task run_phase(uvm_phase phase);
    forever begin
      tav_arb_item t;
      @(vif.mon_cb);
      t = tav_arb_item::type_id::create("t");
      t.rst = (vif.mon_cb.rst_n !== 1'b1);
      t.req = vif.mon_cb.req;
      t.gnt = vif.mon_cb.gnt;
      ap.write(t);
    end
  endtask
endclass

// ---------------------------------------------------------------------------
// Scoreboard: reference model from the spec, fairness check, stage report
// ---------------------------------------------------------------------------
class tav_arb_scoreboard extends uvm_scoreboard;
  `uvm_component_utils(tav_arb_scoreboard)
  uvm_analysis_imp #(tav_arb_item, tav_arb_scoreboard) imp;

  bit [1:0]  m_last;
  int        wait_cyc [4];
  int        checks, mismatches, shown, max_wait, unfair, sva_at_start;
  tav_arb_cg cg;

  function new(string name, uvm_component parent);
    super.new(name, parent);
    imp = new("imp", this);
  endfunction

  // Round robin, written from the spec: search from the requester after the last winner
  function bit [3:0] expected(bit [3:0] r, bit [1:0] last);
    for (int k = 1; k <= 4; k++) begin
      int idx;
      idx = (last + k) % 4;
      if (r[idx]) return 4'b0001 << idx;
    end
    return 4'b0000;
  endfunction

  function void start_stage(string name);
    `uvm_info("STAGE", name, UVM_NONE)
    checks = 0; mismatches = 0; shown = 0; max_wait = 0; unfair = 0;
    foreach (wait_cyc[i]) wait_cyc[i] = 0;
    sva_at_start = uvm_report_server::get_server().get_id_count("SVA");
    cg = new();
  endfunction

  function void write(tav_arb_item t);
    bit [3:0] e;
    if (t.rst) begin
      m_last = 2'd3;
      foreach (wait_cyc[i]) wait_cyc[i] = 0;
      return;
    end
    e = expected(t.req, m_last);
    checks++;
    if (cg != null) cg.sample(t.req, m_last);
    if (t.gnt !== e) begin
      mismatches++;
      if (shown < 2) begin
        shown++;
        `uvm_error("MISMATCH", $sformatf("req=%b last=%0d: gnt=%b (exp %b)", t.req, m_last, t.gnt, e))
      end
    end
    // Fairness: how long has each requester waited, using what the design really did
    for (int i = 0; i < 4; i++) begin
      if (t.req[i] && !t.gnt[i]) wait_cyc[i]++;
      else                       wait_cyc[i] = 0;
      if (wait_cyc[i] > max_wait) max_wait = wait_cyc[i];
      if (wait_cyc[i] == 4) unfair++;            // waited longer than the spec allows
    end
    // Follow the spec: the last winner is whoever the spec says should have won
    if (e != 0)
      for (int i = 0; i < 4; i++) if (e[i]) m_last = i;
  endfunction

  function void end_stage(string name);
    int  sva;
    real cov;
    sva = uvm_report_server::get_server().get_id_count("SVA") - sva_at_start;
    cov = cg.x_req_last.get_inst_coverage();
    `uvm_info("RESULT", $sformatf("%s: checks=%0d mismatches=%0d assertion_fails=%0d max_wait=%0d (limit 3) fairness_violations=%0d pattern_coverage=%.2f%% -> %s",
              name, checks, mismatches, sva, max_wait, unfair, cov,
              (mismatches == 0 && sva == 0 && unfair == 0) ? "PASS" : "FAIL"), UVM_NONE)
  endfunction
endclass

// ---------------------------------------------------------------------------
// Agent and environment
// ---------------------------------------------------------------------------
class tav_arb_agent extends uvm_agent;
  `uvm_component_utils(tav_arb_agent)
  uvm_sequencer #(tav_arb_item) sqr;
  tav_arb_driver  drv;
  tav_arb_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_arb_item)::type_id::create("sqr", this);
    drv = tav_arb_driver::type_id::create("drv", this);
    mon = tav_arb_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_arb_env extends uvm_env;
  `uvm_component_utils(tav_arb_env)
  tav_arb_agent      agt;
  tav_arb_scoreboard scb;
  function new(string name, uvm_component parent);
    super.new(name, parent);
  endfunction
  function void build_phase(uvm_phase phase);
    agt = tav_arb_agent::type_id::create("agt", this);
    scb = tav_arb_scoreboard::type_id::create("scb", this);
  endfunction
  function void connect_phase(uvm_phase phase);
    agt.mon.ap.connect(scb.imp);
  endfunction
endclass

// ---------------------------------------------------------------------------
// Test: reset, run one stage, report, three times
// ---------------------------------------------------------------------------
class tav_ip_stages_test extends uvm_test;
  `uvm_component_utils(tav_ip_stages_test)
  tav_arb_env env;
  virtual tav_arb_if vif;
  function new(string name, uvm_component parent);
    super.new(name, parent);
  endfunction
  function void build_phase(uvm_phase phase);
    env = tav_arb_env::type_id::create("env", this);
    if (!uvm_config_db#(virtual tav_arb_if)::get(this, "", "vif", vif))
      `uvm_fatal("NOVIF", "no virtual interface")
  endfunction

  task run_one(string name, tav_arb_base_seq s);
    tav_reset_seq r = tav_reset_seq::type_id::create("r");
    env.scb.start_stage(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_stage(name);
  endtask

  task run_phase(uvm_phase phase);
    phase.raise_objection(this);
    run_one("Stage 1, sanity",  tav_sanity_seq::type_id::create("s1"));
    run_one("Stage 2, feature", tav_feature_seq::type_id::create("s2"));
    run_one("Stage 3, closure", tav_closure_seq::type_id::create("s3"));
    phase.drop_objection(this);
  endtask
endclass

// ---------------------------------------------------------------------------
// Top
// ---------------------------------------------------------------------------
module tav_top;
  logic clk = 0;
  int   BUG = 0;
  always #5 clk = ~clk;

  tav_arb_if vif (clk);
  tav_rr_arbiter dut (.clk(clk), .rst_n(vif.rst_n), .req(vif.req), .gnt(vif.gnt), .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_arb_if)::set(null, "uvm_test_top", "vif", vif);
    uvm_config_db#(virtual tav_arb_if)::set(null, "uvm_test_top.env.agt.*", "vif", vif);
    run_test("tav_ip_stages_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 stage lines):

[STAGE] Stage 1, sanity
[RESULT] Stage 1, sanity: checks=10 mismatches=0 assertion_fails=0 max_wait=0 (limit 3) fairness_violations=0 pattern_coverage=12.50% -> PASS
[STAGE] Stage 2, feature
[RESULT] Stage 2, feature: checks=327 mismatches=0 assertion_fails=0 max_wait=3 (limit 3) fairness_violations=0 pattern_coverage=75.00% -> PASS
[STAGE] Stage 3, closure
[RESULT] Stage 3, closure: checks=2003 mismatches=0 assertion_fails=0 max_wait=3 (limit 3) fairness_violations=0 pattern_coverage=100.00% -> PASS

Look at the coverage column. Sanity sees 12.5% of the request patterns, feature 75% and closure 100%. Each stage reaches parts of the design the one before it never touched.

Now the bugs, same bench, real VCS results:

RunStage 1, sanityStage 2, featureStage 3, closure
No bugPASSPASSPASS
+BUG=2 (grant with no request)FAIL: 6 mismatches, 6 assertion failsFAILFAIL
+BUG=1 (starvation)PASSFAIL: 29 mismatches, max wait 11, 4 fairness violationsFAIL
+BUG=3 (one rare pattern)PASSPASSFAIL: 187 mismatches, max wait 7
Diagram: results grid for the arbiter IP across three stages and four runs. With no bug all stages pass. BUG=2 is first caught at sanity, BUG=1 at feature, and BUG=3 only at closure. Pattern coverage rises from 12.5% at sanity to 75% at feature and 100% at closure.
Plumbing bugs fall at sanity, logic bugs at feature, corner bugs only at closure.

The bold cell is the first stage that caught each bug:

  • BUG=2 is a plumbing bug. Sanity has idle cycles, so it catches it in the first 25 ns. Both the scoreboard and the assertion A_GNT_REQ fire.
  • BUG=1 is a logic bug. Sanity sends one request at a time, so a pointer that fails to move never matters. Feature verification holds all four requests and catches it at once: requester 2 wins again and again, and the others wait up to 11 cycles against a limit of 3.
  • BUG=3 is a corner bug. It needs three requesters at once, right after requester 3 won. Feature tests never use more than two random requesters, so they pass. Only closure, chasing every pattern, gets there.

This is the first mismatch from the BUG=3 run:

UVM_ERROR @ 3625: uvm_test_top.env.scb [MISMATCH] req=1101 last=3: gnt=0100 (exp 0001)

The exact pattern and history from the bug description, found in the closure stage. The 187 mismatches after it are echoes: one wrong grant puts the design’s pointer out of step with the model. As always, debug from the first line. The random counts may differ a little on your run; which stage fails will not.

What are the most common mistakes at each stage?

StageMistakeFix
PlanningStarting to code the bench before the spec questions are answeredSend the open questions to the designer in week one
Bring-upTrusting the bench before checking it can failPlant a bug on purpose and make sure the checker catches it
SanityMaking sanity long and randomKeep it short and directed, and rerun it on every RTL drop
FeatureTesting features one at a time onlyAdd tests where features meet: two requests at once, reset during traffic
ClosureCalling 95% “good enough” without looking at the 5%Every hole is hit, or waived with a written reason
RegressionOne passing seed treated as proofRun many seeds, every night, and track any test that fails once
IntegrationThrowing the IP over the wallKeep agents reusable in passive mode, and keep the plan and bench ready for questions

How do you debug a failure, depending on the stage?

  • Fails in sanity: suspect the bench and the connections first. Check reset, clocks and that the interface pins go where you think.
  • Fails in feature: go to the first mismatch and compare the reference model and the RTL line by line for that feature. The plan tells you which feature it is.
  • Fails only in closure: the bug lives in a rare combination. Print the exact inputs and history at the first mismatch, then write a short directed test that reproduces it, and keep that test forever.
  • Fails only on some seeds: record the seed, rerun it, and look for an ordering or timing dependency.

For the full method, see the practical verification debug guide.

Where can AI help across the stages?

AI is most useful at the two ends: listing tests per stage at the start, and suggesting stimulus for coverage holes near the end. It is least useful in the middle, where you need to know exactly what your RTL and bench are doing.

Task: split the arbiter’s tests into sanity, feature and closure stages, and compare the split with mine.

Tool: Claude, in Anthropic’s Cowork app, 24 Nov 2026.

Prompt:

You are a senior design verification engineer.
IP: 4-way round-robin arbiter.
- gnt is one-hot or zero; gnt[i] only if req[i]
- any request gets exactly one grant
- search starts after the last winner; a held request waits at most 3 cycles
- after reset, requester 0 has first priority

Split the verification into three stages: sanity, feature, closure.
For each stage list the tests, the exit condition and the kind of bug it is
most likely to catch. Name the coverage model needed for closure.
Only use behaviour stated in the spec. Mark anything you assumed with ASSUMED.

Output (excerpt):

Sanity: reset then idle (no grant); each requester alone; one back-to-back
  pair. Exit: all pass, no assertion fires. Catches: wiring, reset, idle grant.
Feature: all four held (rotation order 0,1,2,3,0...); every pair held;
  request dropped while waiting; new request arriving mid-rotation;
  reset during traffic. Exit: every feature checked, waits <= 3.
  Catches: pointer update, priority order, starvation.
Closure: covergroup = req pattern (16) x last winner (4), plus
  wait length (0..3) per requester. Dense random weighted to 3-4 requesters.
  Exit: 100% or waived. Catches: pattern-specific logic, rare histories.
ASSUMED: requests can change every cycle (no protocol holding them).
ASSUMED: reset is synchronous to the clock.

How I validated it: I mapped it to my bench. The three stages and their exit conditions match mine. Three things are worth taking:

  • Reset during traffic is missing from my stages. It belongs in feature verification.
  • Wait-length coverage per requester is a better fairness measure than my single max-wait number, because it proves waits of 1, 2 and 3 cycles all happened.
  • Weighting closure toward three and four requesters is exactly what finds BUG=3, which only appears with three requesters.

One line is wrong for my design: my reset is asynchronous. The AI marked it ASSUMED, which is why the ASSUMED rule in the prompt matters. The first ASSUMED line is correct for my bench.

Where it tends to fail:

  • It lists tests but cannot know which already exist in your bench. Check for duplicates.
  • It cannot see your coverage report. Suggestions for closing holes are only as good as the holes you paste in.
  • It cannot debug a mismatch without the waveform, the log and the RTL. In the middle stages, you are faster.
  • It sounds equally sure about every stage, including steps your team does differently. Your plan decides the stages, not the tool.

Interview questions on IP verification stages

  1. Walk me through the stages of verifying an IP. Spec review and verification plan, testbench bring-up, sanity, feature verification, coverage closure, regression and sign-off, then release and integration support. Each has its own exit condition.
  2. What is the difference between sanity and feature verification? Sanity checks that the basic paths work once, quickly, with simple directed traffic. Feature verification exercises every feature in the plan, with directed and random stimulus and full checking.
  3. Why not run full random traffic from day one? A broken bench or a basic bug makes every random test fail for the same boring reason, and you waste compute and time. Sanity first removes those.
  4. Which bugs does coverage closure find that feature tests miss? Bugs that only appear in rare combinations of inputs and history, such as one request pattern after one particular winner.
  5. How is IP-level verification different from SoC-level? IP level proves the IP meets its spec in every configuration, with a full UVM bench. SoC level proves the chip works as a product, usually with software tests and reused IP agents in passive mode.
  6. What makes an IP bench reusable at SoC level? Agents that can run passive, checkers and coverage that only rely on monitored signals, and configuration through the config database rather than hard-coded values.
  7. You bought an IP from a vendor. What do you still verify? Your configuration of it, connected as your chip connects it, plus the integration: clocks, resets, interrupts and the interfaces to your other blocks.

Practice challenge

Add the stage the AI said was missing.

  1. Add a reset-during-traffic test to stage 2: hold all four requests, and assert reset for one cycle in the middle of the rotation.
  2. Update the scoreboard so a reset in the middle of a stage resets the expected last winner and the wait counters.
  3. Add a wait-length coverpoint per requester (0, 1, 2, 3 cycles) and report it at closure.
  4. Add a BUG=4: after reset, priority starts at requester 1 instead of 0. Which stage catches it now, and which caught it before your new test?

Frequently asked questions

What are the stages of IP verification?

Spec review and verification plan, testbench bring-up, sanity, feature verification, coverage closure, regression and sign-off, and release with integration support. Each stage has a goal, an exit condition and a kind of bug it finds best.

What is sanity testing in verification?

A short set of simple, directed tests that check each basic path works once: reset, idle, each port alone. It finds wiring and reset bugs quickly, and it is rerun on every new RTL drop.

What is coverage closure?

The stage where you find every coverage goal that was never hit and either hit it with new or re-weighted stimulus, or waive it with a written reason. It is where rare corner bugs are found.

What is the difference between IP verification and SoC verification?

IP verification proves one block meets its spec in every configuration, using a dedicated UVM bench. SoC verification proves the whole chip works as a product, usually with software-driven tests and reused IP agents.

Do I still need to verify an IP I bought?

Yes. You verify your configuration of it and how it connects to the rest of your chip. The vendor verified the IP; only you can verify your use of it.

References and related lessons

References

Related lessons