How to Build a Strong Verification Plan: From Spec to Sign-Off
In short: A verification plan is the full strategy for proving a design works. It covers which features to verify and how important each one is (high, medium, low), the testbench architecture, the stimulus, the checkers, the assertions, the coverage model, the tests, the sign-off criteria and how the work moves through its P1, P2 and P3 phases. The test plan is just one section of it. In this lesson you build a complete verification plan for an 8-bit counter, then a UVM bench that reports against it. A first test passes on a design with three hidden bugs. The plan shows it never touched five of the eight features, and the bench built from the plan catches all three bugs.
What is the difference between a verification plan and a test plan?
People mix these up all the time, including in interviews. A test plan answers “which tests will we run?” A verification plan answers “how will we prove this design works, and how will we know we are done?”
| Verification plan | Test plan | |
|---|---|---|
| Question it answers | How do we prove the design works, and when are we done? | Which tests do we run? |
| Scope | Features, priorities, testbench architecture, stimulus, checkers, assertions, coverage, tests, sign-off, schedule, risks | A list of tests and what each one does |
| Written by | The verification lead, reviewed with design and architecture | Usually the engineers writing the tests |
| Used for | Planning, tracking and sign-off of the whole effort | Running and tracking the tests |
| Relationship | Contains the test plan | One section of the verification plan |
A test plan on its own can be fully green while whole features were never checked, because nobody wrote down that they had to be. The verification plan is where that gets written down.
In lesson 1 you turned a spec into scenarios. In lesson 2 you learned the habits that find them. This lesson builds the document that holds all of it together.
The picture: a flight plan, not just a checklist
Before a long flight, a pilot runs a pre-flight checklist. But the checklist is only one part of the flight plan. The full plan also says:
- The route and its priorities: where we are going, and which parts of the route are the riskiest. (Your feature list, ranked high, medium, low.)
- The aircraft and its instruments: what we are flying, and what tells us something is wrong. (Your testbench architecture, checkers and assertions.)
- Fuel and position tracking: how we know how far we have come. (Your coverage model.)
- Go and no-go rules: the weather and fuel limits that decide whether we take off or land. (Your sign-off criteria.)
- Who flies each leg, and when: (your execution plan and schedule.)
- The pre-flight checklist itself: (your test plan.)
No pilot would take off with only the checklist. No chip should tape out with only a test plan.
What will you learn in this lesson?
By the end of this lesson you will be able to:
- Explain the difference between a verification plan and a test plan.
- List the sections of a complete verification plan and what goes in each one.
- Rank features by priority, plan the P1, P2 and P3 execution phases, and set sign-off criteria.
- Turn a short spec into a full verification plan, including the checkers, assertions and coverage plans.
- Read a plan status report and decide whether a design is ready to sign off.
What goes into a verification plan?
A full verification plan has eleven sections. Small blocks get a short version of each; an SoC gets a document of many pages. The sections stay the same.
| # | Section | What it holds |
|---|---|---|
| 1 | Scope and references | What is being verified, at which level (block, subsystem, SoC), which spec version, and what is out of scope |
| 2 | Feature list with priorities | Every behaviour the spec promises, one testable sentence each, ranked high, medium or low |
| 3 | Testbench architecture | The UVM components, their connections and what each one does |
| 4 | Stimulus strategy | Directed, constrained random or formal for each feature, and the constraints and weights |
| 5 | Checkers plan | What compares outputs to the expected result: scoreboards, reference models, protocol checkers |
| 6 | Assertions plan | Rules that must hold in every cycle, written as SVA, and where they live |
| 7 | Coverage plan | Functional coverage (covergroups, crosses, bins) per feature, and the code coverage targets |
| 8 | Test plan | The list of tests, which features each one targets, seeds and run counts |
| 9 | Sign-off criteria | The exact conditions that mean “done”, per priority |
| 10 | Execution plan | Phases (P1 sanity, P2 tests coded, P3 closure), regressions, owners, tracking and reviews |
| 11 | Risks, assumptions and open questions | What could go wrong, what we assumed, and what the designer must answer |
The test plan is row 8. Everything else is what makes its results mean something.
How do you rank features by priority?
Ask two things: how likely is a bug here, and how bad would it be if it reached silicon?
- High: must close before sign-off. Anything software or the system relies on, rules where two controls interact, and corners such as the top value or a wrap.
- Medium: should close before sign-off. Normal behaviour that is important but simpler, or already well exercised by other features.
- Low: close if time allows, or waive with a reason. Low-risk behaviour, debug features, or modes the product does not use.
The priority decides what blocks sign-off, so it has to be agreed with the designer and the architect, not picked alone.
How do checkers, assertions and coverage split the work?
They answer different questions, and a strong plan uses all three.
| Question it answers | Good at | Example on the counter | |
|---|---|---|---|
| Checker (scoreboard + reference model) | Was the result right? | Data and end-to-end behaviour | cnt and ovf match the model every cycle |
| Assertion (SVA) | Did a rule ever break, in any cycle? | Timing rules and things that must never happen | ovf is never high two cycles in a row |
| Coverage | Did we actually exercise it? | Proving the stimulus reached each feature | Every feature hit, load values 0, 254 and 255 seen |
Coverage without checks proves nothing worked. Checks without coverage prove nothing was tried. See coverage in SystemVerilog and assertions and their advantages for the building blocks.
What are sign-off criteria?
Sign-off criteria are the written, measurable conditions that mean verification is done. A typical set:
- Every high and medium priority feature is closed: checked at least as often as its goal, with zero failures.
- Every low priority feature is closed or waived, with a written reason.
- Functional coverage is 100% of the planned bins, or every hole is waived.
- Code coverage meets the agreed targets, and every uncovered line is reviewed.
- Zero assertion failures and zero open high or medium priority bugs.
- The full regression passes on enough seeds, several times in a row.
If you cannot measure a criterion, it is not a criterion.
What goes into the execution plan, and what are P1, P2 and P3?
The execution plan says how the work runs from an empty bench to sign-off. Most teams split it into phases, each with clear entry and exit criteria. A common split is P1, P2 and P3:
| Phase | Goal | What must be true to exit |
|---|---|---|
| P1: sanity clean | The bench works end to end | All testbench components are built and connected. Basic tests pass cleanly. Coverage is not the focus yet, and not all tests are coded. |
| P2: tests coded | Breadth | Almost all tests in the test plan are coded and running in regression. Functional coverage is at least 80%. |
| P3: closure | Sign-off | Coverage is closed (100%, or every hole waived). All critical scenarios have been checked by eyeballing their waveforms, not only by the checkers. The sign-off criteria are met. |
Around the phases, the execution plan also names who owns which features, how often regressions run and on how many seeds, how bugs and coverage are tracked, and when the plan is reviewed. Choices from directed vs constraint random verification feed straight into it.
A note on names. These labels are not standard. Some companies use P1, P2 and P3 for execution phases, as here. Others use the same letters for feature priority, or call the phases V0.5, V0.8 and V1.0, alpha, beta and final, or bring-up, feature-complete and sign-off. In this lesson, P1, P2 and P3 are phases, and feature priority is high, medium or low. When you join a team, ask which one they mean.
Is the plan ever finished?
No. Add a feature row when a bug escapes, a spec changes or a review finds a gap. Re-check the priorities at each milestone. A plan that never changes is a plan nobody reads.
What does a full verification plan look like for a real design?
Here is a complete verification plan for a small design, section by section. It is short because the design is small, but nothing is skipped.
1. Scope and references
- Design: tav_counter8, an 8-bit counter. Block-level verification.
- Spec: controls are synchronous with priority clr > ld > en. clr sets the count to 0. ld loads ld_val. en counts up by 1; from 255 it wraps to 0 and ovf is 1 for exactly that cycle. With no control the count holds, and ovf is 0 in every other cycle. rst_n (asynchronous, active low) sets count and ovf to 0.
- Out of scope: gate-level simulation, timing and power.
2. Feature list with priorities
| ID | Feature (one testable sentence) | Priority | Closure goal |
|---|---|---|---|
| F1 | Reset sets count and ovf to 0 | High | 1 check per reset |
| F2 | en counts up by 1 below 255 | Medium | 20 checks |
| F3 | With no control, count holds | Low | 10 checks |
| F4 | ld loads ld_val | High | 5 checks, values 0, 254 and 255 seen |
| F5 | ld beats en | High | 5 checks |
| F6 | From 255, en wraps to 0 and ovf is 1 for one cycle | High | 2 checks |
| F7 | clr sets count to 0 | Medium | 3 checks |
| F8 | clr beats ld | High | 2 checks |
F5, F6 and F8 are high priority because two rules meet there, or a corner sits there. That is where bugs hide.
3. Testbench architecture
A standard UVM 1.2 bench, one agent:
- Sequence item: one clock cycle of controls (en, ld, clr, ld_val).
- Sequences: a reset sequence, a no-plan baseline and the plan’s directed and random sequences.
- Driver: drives the controls on the falling edge.
- Monitor: samples every cycle through a clocking block, just before the rising edge.
- Scoreboard: the reference model, the checkers, the coverage and the plan status report.
- Interface: carries the three assertions, next to the signals they watch.
- Test: resets, runs a phase, prints the plan status and the sign-off verdict.

4. Stimulus strategy
| Feature | Directed | Constrained random |
|---|---|---|
| F4 | Load 0, 254 and 255 | ld 10% of cycles; ld_val weighted to 0, 254 and 255 |
| F5 | ld and en together, including ld_val = 255 | Falls out of ld 10% with en 80% |
| F6 | Load 250, then 8 enables | Loads of 254 and 255 followed by en |
| F7, F8 | clr alone; clr with ld; clr with ld and en | clr 3% of cycles |
| F1, F2, F3 | Reset before each phase | en 80%, idle 20% |
5. Checkers plan
One scoreboard, with a reference model written from the spec, not from the RTL. Every cycle it compares cnt and ovf to the model, and books the check against the feature the previous cycle exercised. On a mismatch it reports the feature, then resyncs to the design so the next check is judged on its own.
6. Assertions plan
| Assertion | Rule | Protects |
|---|---|---|
| A_OVF_ONE_CYCLE | ovf is never high two cycles in a row | F6 |
| A_OVF_AT_ZERO | When ovf is high, cnt is 0 | F6 |
| A_NO_X | After reset, cnt and ovf are never X | F1 and all |
The scoreboard catches wrong values. The assertions catch broken rules the moment they happen, even in cycles nobody was looking at closely.
7. Coverage plan
- Functional: a covergroup with one bin per feature (F1 to F8), and a load-value coverpoint with bins for 0, 1 to 253, 254 and 255. Goal: 100%.
- Code coverage: line, branch and toggle at 100% for a block this small. Not measured in this demo; on a real project it is part of sign-off.
8. Test plan
| Test | What it runs | Targets |
|---|---|---|
| Phase A, no plan | 300 cycles of random en only | A baseline: what a first test usually looks like |
| Phase B, from the plan | Directed corners for F4 to F8, then 2,000 weighted random cycles | Every feature |
| Bug runs | The same test with +BUG=1, +BUG=2 and +BUG=3 | Proves the checks can fail |
9. Sign-off criteria
- Every high and medium priority feature MET: goal reached, zero failures.
- Low priority features MET or waived with a reason.
- Zero assertion failures.
- Functional coverage 100%.
The bench prints a SIGNOFF line that applies exactly these rules, and a PHASES line that says which of P1, P2 and P3 each run reached. The waveform review in P3 is done by eye, so the bench cannot tick that part for you.
10. Execution plan
| Phase | Exit condition for this counter |
|---|---|
| P1: sanity clean | All components built. Phase A runs with zero errors. Coverage not tracked yet. |
| P2: tests coded | Every directed and random sequence in the test plan is coded. Functional coverage at least 80%. |
| P3: closure | Phase B shows SIGN-OFF MET: every high and medium feature MET, zero assertion failures, 100% coverage. Wrap, load with enable, and clear with load checked by eye in the waveform. All four bug runs caught. |
11. Risks, assumptions and open questions
- Assumption: ld_val is ignored when ld is 0. The spec does not say so; ask the designer.
- Gap: reset in the middle of counting is not tested yet.
- Gap: ld or clr arriving exactly when the count is 255 with en is only hit by random traffic. (See the AI review and the practice challenge.)
- Gap: code coverage is not measured in this demo.
The code
One file, UVM 1.2. Every name I define starts with tav_, short for The Art of Verification. The plan above is built into the bench: the feature list, priorities and goals are data in the scoreboard, the assertions sit in the interface, and the sign-off rules are applied at the end of each phase.
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_plan_counter_uvm.sv : a verification plan built into the bench, on an 8-bit counter (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 two things:
// Phase A: a "first test" written without a plan (random enable only, 300 cycles)
// Phase B: tests written from the plan (directed corners + 2000 constrained-random cycles)
// After each phase the scoreboard prints the plan status: every feature (F1 to F8), its
// priority (High, Med, Low), checks, failures and MET, HOLE or FAIL, then the sign-off verdict.
// Checks come from two places, as the plan says: a scoreboard (reference model) and
// three assertions (SVA) in the interface.
//
// Run options (one per run):
// (none) the clean design
// +BUG=1 load is ignored when enable is high at the same time
// +BUG=2 ovf fires one count early (at 254 -> 255 instead of 255 -> 0)
// +BUG=3 load beats clear when both are high
//
// Spec:
// 8-bit counter, synchronous controls, priority clr > ld > en.
// clr: count goes to 0. ld: count takes ld_val.
// en: count goes up by 1; from 255 it wraps to 0 and ovf is 1 for exactly that one cycle.
// No control: count holds. ovf is 0 in every cycle except the wrap.
// rst_n (async, active low): count = 0, ovf = 0.
`timescale 1ns/1ns
`include "uvm_macros.svh"
import uvm_pkg::*;
// ---------------------------------------------------------------------------
// The design
// ---------------------------------------------------------------------------
module tav_counter8 (input logic clk, rst_n,
input logic en, ld, clr,
input logic [7:0] ld_val,
output logic [7:0] cnt,
output logic ovf,
input int bug);
always_ff @(posedge clk or negedge rst_n) begin
if (!rst_n) begin
cnt <= 0; ovf <= 0;
end else begin
ovf <= 0;
if (clr && !(bug == 3 && ld)) // BUG=3
cnt <= 0;
else if (ld && !(bug == 1 && en)) // BUG=1
cnt <= ld_val;
else if (en) begin
if (cnt == 8'd255) begin
cnt <= 0;
ovf <= (bug != 2); // BUG=2
end else begin
cnt <= cnt + 1;
if (bug == 2 && cnt == 8'd254) ovf <= 1; // BUG=2
end
end
end
end
endmodule
// ---------------------------------------------------------------------------
// Interface: the monitor samples just before each rising edge
// ---------------------------------------------------------------------------
interface tav_counter_if (input logic clk);
logic rst_n, en, ld, clr;
logic [7:0] ld_val, cnt;
logic ovf;
clocking mon_cb @(posedge clk);
default input #1step;
input rst_n, en, ld, clr, ld_val, cnt, ovf;
endclocking
// Assertions plan: rules that must hold in every cycle, checked where the signals live
A_OVF_ONE_CYCLE: assert property (@(posedge clk) disable iff (!rst_n) ovf |=> !ovf)
else `uvm_error("SVA", "A_OVF_ONE_CYCLE: ovf was high for more than one cycle")
A_OVF_AT_ZERO: assert property (@(posedge clk) disable iff (!rst_n) ovf |-> cnt == 8'd0)
else `uvm_error("SVA", $sformatf("A_OVF_AT_ZERO: ovf is high but cnt=%0d", $sampled(cnt)))
A_NO_X: assert property (@(posedge clk) disable iff (!rst_n) !$isunknown({cnt, ovf}))
else `uvm_error("SVA", "A_NO_X: cnt or ovf is X after reset")
endinterface
// ---------------------------------------------------------------------------
// The verification plan's feature list, as data: one entry per feature
// ---------------------------------------------------------------------------
typedef enum int {F_NONE, F1_RESET, F2_COUNT, F3_HOLD, F4_LOAD, F5_LOAD_EN,
F6_WRAP, F7_CLEAR, F8_CLEAR_LD} tav_feature_e;
// Coverage plan: which features were exercised, and which load values
covergroup tav_plan_cg with function sample(int op, bit [7:0] v, bit is_load);
option.per_instance = 1;
cp_op: coverpoint op {
bins reset = {F1_RESET};
bins count = {F2_COUNT};
bins hold = {F3_HOLD};
bins load = {F4_LOAD};
bins load_en = {F5_LOAD_EN};
bins wrap = {F6_WRAP};
bins clear = {F7_CLEAR};
bins clear_ld = {F8_CLEAR_LD};
}
cp_ld_val: coverpoint v iff (is_load) {
bins zero = {0};
bins mid = {[1:253]};
bins near_max = {254};
bins max = {255};
}
endgroup
// ---------------------------------------------------------------------------
// Transaction: one clock cycle at the counter pins
// ---------------------------------------------------------------------------
class tav_counter_item extends uvm_sequence_item;
rand bit en, ld, clr;
rand bit [7:0] ld_val;
bit rst; // 1 = pulse reset instead
// filled in by the monitor
logic [7:0] cnt;
logic ovf;
`uvm_object_utils(tav_counter_item)
function new(string name = "tav_counter_item");
super.new(name);
endfunction
endclass
// ---------------------------------------------------------------------------
// Sequences
// ---------------------------------------------------------------------------
class tav_counter_base_seq extends uvm_sequence #(tav_counter_item);
`uvm_object_utils(tav_counter_base_seq)
function new(string name = "tav_counter_base_seq");
super.new(name);
endfunction
task cyc(bit en, bit ld, bit clr, bit [7:0] v = 0);
req = tav_counter_item::type_id::create("req");
start_item(req);
req.en = en; req.ld = ld; req.clr = clr; req.ld_val = v;
finish_item(req);
endtask
endclass
class tav_reset_seq extends tav_counter_base_seq;
`uvm_object_utils(tav_reset_seq)
function new(string name = "tav_reset_seq");
super.new(name);
endfunction
task body();
req = tav_counter_item::type_id::create("req");
start_item(req);
req.rst = 1;
finish_item(req);
endtask
endclass
// Phase A: what a first test often looks like. Random enable, nothing else.
class tav_no_plan_seq extends tav_counter_base_seq;
`uvm_object_utils(tav_no_plan_seq)
function new(string name = "tav_no_plan_seq");
super.new(name);
endfunction
task body();
repeat (300) begin
req = tav_counter_item::type_id::create("req");
start_item(req);
if (!req.randomize() with { ld == 0; clr == 0; })
`uvm_fatal("RAND", "randomize failed")
finish_item(req);
end
endtask
endclass
// Phase B: the test plan's tests. Directed corners first, then weighted random.
class tav_plan_seq extends tav_counter_base_seq;
`uvm_object_utils(tav_plan_seq)
function new(string name = "tav_plan_seq");
super.new(name);
endfunction
task body();
// F4: load the corner values
cyc(0, 1, 0, 8'd0); cyc(0, 1, 0, 8'd254); cyc(0, 1, 0, 8'd255);
// F6: load 250, then count through the wrap
cyc(0, 1, 0, 8'd250);
repeat (8) cyc(1, 0, 0);
// F5: load and enable together, also at the top value
cyc(1, 1, 0, 8'd100); cyc(1, 1, 0, 8'd255); cyc(1, 0, 0);
// F7 and F8: clear alone, and clear together with load
cyc(1, 0, 0); cyc(0, 0, 1);
cyc(0, 1, 1, 8'd77); cyc(1, 1, 1, 8'd200);
// F3: hold
repeat (3) cyc(0, 0, 0);
// Weighted random for the mixes nobody listed
repeat (2000) begin
req = tav_counter_item::type_id::create("req");
start_item(req);
if (!req.randomize() with {
clr dist {1 := 3, 0 := 97};
ld dist {1 := 10, 0 := 90};
en dist {1 := 80, 0 := 20};
ld_val dist {255 := 10, 254 := 10, 0 := 10, [1:253] := 70}; })
`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_counter_driver extends uvm_driver #(tav_counter_item);
`uvm_component_utils(tav_counter_driver)
virtual tav_counter_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_counter_if)::get(this, "", "vif", vif))
`uvm_fatal("NOVIF", "no virtual interface")
endfunction
task run_phase(uvm_phase phase);
vif.rst_n <= 0; vif.en <= 0; vif.ld <= 0; vif.clr <= 0; vif.ld_val <= 0;
forever begin
seq_item_port.try_next_item(req);
if (req == null) begin
@(negedge vif.clk);
vif.en <= 0; vif.ld <= 0; vif.clr <= 0;
end else begin
if (req.rst) begin
@(negedge vif.clk);
vif.rst_n <= 0; vif.en <= 0; vif.ld <= 0; vif.clr <= 0;
@(negedge vif.clk);
vif.rst_n <= 1;
end else begin
@(negedge vif.clk);
vif.en <= req.en; vif.ld <= req.ld; vif.clr <= req.clr; vif.ld_val <= req.ld_val;
end
seq_item_port.item_done();
end
end
endtask
endclass
// ---------------------------------------------------------------------------
// Monitor: one transaction per clock, sampled just before the edge
// ---------------------------------------------------------------------------
class tav_counter_monitor extends uvm_monitor;
`uvm_component_utils(tav_counter_monitor)
virtual tav_counter_if vif;
uvm_analysis_port #(tav_counter_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_counter_if)::get(this, "", "vif", vif))
`uvm_fatal("NOVIF", "no virtual interface")
endfunction
task run_phase(uvm_phase phase);
forever begin
tav_counter_item t;
@(vif.mon_cb);
t = tav_counter_item::type_id::create("t");
t.rst = (vif.mon_cb.rst_n !== 1'b1);
t.en = vif.mon_cb.en;
t.ld = vif.mon_cb.ld;
t.clr = vif.mon_cb.clr;
t.ld_val = vif.mon_cb.ld_val;
t.cnt = vif.mon_cb.cnt;
t.ovf = vif.mon_cb.ovf;
ap.write(t);
end
endtask
endclass
// ---------------------------------------------------------------------------
// Scoreboard: checkers plan (reference model from the spec), plan status and sign-off
// ---------------------------------------------------------------------------
class tav_counter_scoreboard extends uvm_scoreboard;
`uvm_component_utils(tav_counter_scoreboard)
uvm_analysis_imp #(tav_counter_item, tav_counter_scoreboard) imp;
string item_name [tav_feature_e];
string prio [tav_feature_e];
int goal [tav_feature_e];
int checks [tav_feature_e];
int fails [tav_feature_e];
bit [7:0] m_cnt;
bit m_ovf;
tav_feature_e prev;
int shown, total_fails, sva_at_start;
tav_plan_cg cg;
function new(string name, uvm_component parent);
super.new(name, parent);
imp = new("imp", this);
item_name[F1_RESET] = "F1 reset clears count and ovf"; prio[F1_RESET] = "High"; goal[F1_RESET] = 1;
item_name[F2_COUNT] = "F2 enable counts up by 1"; prio[F2_COUNT] = "Med"; goal[F2_COUNT] = 20;
item_name[F3_HOLD] = "F3 no control: count holds"; prio[F3_HOLD] = "Low"; goal[F3_HOLD] = 10;
item_name[F4_LOAD] = "F4 load takes ld_val"; prio[F4_LOAD] = "High"; goal[F4_LOAD] = 5;
item_name[F5_LOAD_EN] = "F5 load beats enable"; prio[F5_LOAD_EN] = "High"; goal[F5_LOAD_EN] = 5;
item_name[F6_WRAP] = "F6 wrap 255->0, ovf one cycle"; prio[F6_WRAP] = "High"; goal[F6_WRAP] = 2;
item_name[F7_CLEAR] = "F7 clear sets count to 0"; prio[F7_CLEAR] = "Med"; goal[F7_CLEAR] = 3;
item_name[F8_CLEAR_LD] = "F8 clear beats load"; prio[F8_CLEAR_LD] = "High"; goal[F8_CLEAR_LD] = 2;
endfunction
function void start_phase(string name);
`uvm_info("PHASE", name, UVM_NONE)
foreach (item_name[i]) begin checks[i] = 0; fails[i] = 0; end
prev = F_NONE; shown = 0;
sva_at_start = uvm_report_server::get_server().get_id_count("SVA");
cg = new();
endfunction
function void write(tav_counter_item t);
tav_feature_e op;
if (t.rst) begin
m_cnt = 0; m_ovf = 0; prev = F1_RESET;
if (cg != null) cg.sample(F1_RESET, 0, 0);
return;
end
// 1. Check the outputs: they show the result of the previous cycle's operation
if (prev != F_NONE) begin
checks[prev]++;
if (t.cnt !== m_cnt || t.ovf !== m_ovf) begin
fails[prev]++;
if (shown < 2) begin
shown++;
`uvm_error("MISMATCH", $sformatf("after %s: cnt=%0d(exp %0d) ovf=%b(exp %b)",
item_name[prev], t.cnt, m_cnt, t.ovf, m_ovf))
end
m_cnt = t.cnt; m_ovf = t.ovf; // resync, so the next check is judged on its own
end
end
// 2. Predict this cycle's result from the spec: clr > ld > en
m_ovf = 0;
if (t.clr) begin
op = t.ld ? F8_CLEAR_LD : F7_CLEAR;
m_cnt = 0;
end else if (t.ld) begin
op = t.en ? F5_LOAD_EN : F4_LOAD;
m_cnt = t.ld_val;
end else if (t.en) begin
if (m_cnt == 8'd255) begin
op = F6_WRAP; m_cnt = 0; m_ovf = 1;
end else begin
op = F2_COUNT; m_cnt = m_cnt + 1;
end
end else begin
op = F3_HOLD;
end
cg.sample(op, t.ld_val, t.ld && !t.clr);
prev = op;
endfunction
function void end_phase(string name);
int met, holes, failed, f, sva, hm_open;
real cov;
foreach (item_name[i]) begin
string status;
if (fails[i] > 0) begin status = "FAIL"; failed++; end
else if (checks[i] < goal[i]) begin status = "HOLE"; holes++; end
else begin status = "MET"; met++; end
if (status != "MET" && prio[i] != "Low") hm_open++;
f += fails[i];
`uvm_info("PLAN", $sformatf("%-30s %-4s checks=%5d goal=%3d fails=%4d %s",
item_name[i], prio[i], checks[i], goal[i], fails[i], status), UVM_NONE)
end
total_fails += f;
sva = uvm_report_server::get_server().get_id_count("SVA") - sva_at_start;
cov = cg.get_inst_coverage();
`uvm_info("VERDICT", $sformatf("%s: %0d MET, %0d HOLE, %0d FAIL, assertion fails=%0d, coverage=%.2f%%",
name, met, holes, failed, sva, cov), UVM_NONE)
`uvm_info("SIGNOFF", $sformatf("%s: high/medium open=%0d, assertion fails=%0d, coverage=%.2f%% -> %s",
name, hm_open, sva, cov,
(hm_open == 0 && sva == 0 && cov >= 100.0) ? "SIGN-OFF MET" : "NOT READY"), UVM_NONE)
// Execution phases from the plan: P1 sanity clean, P2 coverage >= 80%, P3 closure
// (P3 also needs a waveform review of the critical scenarios, which is done by eye, not here)
`uvm_info("PHASES", $sformatf("%s: P1 sanity clean=%s, P2 coverage>=80%%=%s, P3 closure=%s",
name, (f == 0 && sva == 0) ? "yes" : "no", (cov >= 80.0) ? "yes" : "no",
(hm_open == 0 && sva == 0 && cov >= 100.0) ? "yes" : "no"), UVM_NONE)
endfunction
function void report_phase(uvm_phase phase);
`uvm_info("SUMMARY", $sformatf("total_fails=%0d assertion_fails=%0d", total_fails,
uvm_report_server::get_server().get_id_count("SVA")), UVM_NONE)
endfunction
endclass
// ---------------------------------------------------------------------------
// Agent and environment
// ---------------------------------------------------------------------------
class tav_counter_agent extends uvm_agent;
`uvm_component_utils(tav_counter_agent)
uvm_sequencer #(tav_counter_item) sqr;
tav_counter_driver drv;
tav_counter_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_counter_item)::type_id::create("sqr", this);
drv = tav_counter_driver::type_id::create("drv", this);
mon = tav_counter_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_counter_env extends uvm_env;
`uvm_component_utils(tav_counter_env)
tav_counter_agent agt;
tav_counter_scoreboard scb;
function new(string name, uvm_component parent);
super.new(name, parent);
endfunction
function void build_phase(uvm_phase phase);
agt = tav_counter_agent::type_id::create("agt", this);
scb = tav_counter_scoreboard::type_id::create("scb", this);
endfunction
function void connect_phase(uvm_phase phase);
agt.mon.ap.connect(scb.imp);
endfunction
endclass
// ---------------------------------------------------------------------------
// Test: phase A without a plan, phase B from the plan
// ---------------------------------------------------------------------------
class tav_plan_test extends uvm_test;
`uvm_component_utils(tav_plan_test)
tav_counter_env env;
virtual tav_counter_if vif;
function new(string name, uvm_component parent);
super.new(name, parent);
endfunction
function void build_phase(uvm_phase phase);
env = tav_counter_env::type_id::create("env", this);
if (!uvm_config_db#(virtual tav_counter_if)::get(this, "", "vif", vif))
`uvm_fatal("NOVIF", "no virtual interface")
endfunction
task run_one(string name, tav_counter_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("Phase A, no plan", tav_no_plan_seq::type_id::create("a"));
run_one("Phase B, from plan", tav_plan_seq::type_id::create("b"));
phase.drop_objection(this);
endtask
endclass
// ---------------------------------------------------------------------------
// Top
// ---------------------------------------------------------------------------
module tav_top;
logic clk = 0;
int BUG = 0;
always #5 clk = ~clk;
tav_counter_if vif (clk);
tav_counter8 dut (.clk(clk), .rst_n(vif.rst_n), .en(vif.en), .ld(vif.ld), .clr(vif.clr),
.ld_val(vif.ld_val), .cnt(vif.cnt), .ovf(vif.ovf), .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_counter_if)::set(null, "uvm_test_top", "vif", vif);
uvm_config_db#(virtual tav_counter_if)::set(null, "uvm_test_top.env.agt.*", "vif", vif);
run_test("tav_plan_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 plan lines):
[PHASE] Phase A, no plan
[PLAN] F1 reset clears count and ovf High checks= 1 goal= 1 fails= 0 MET
[PLAN] F2 enable counts up by 1 Med checks= 138 goal= 20 fails= 0 MET
[PLAN] F3 no control: count holds Low checks= 163 goal= 10 fails= 0 MET
[PLAN] F4 load takes ld_val High checks= 0 goal= 5 fails= 0 HOLE
[PLAN] F5 load beats enable High checks= 0 goal= 5 fails= 0 HOLE
[PLAN] F6 wrap 255->0, ovf one cycle High checks= 0 goal= 2 fails= 0 HOLE
[PLAN] F7 clear sets count to 0 Med checks= 0 goal= 3 fails= 0 HOLE
[PLAN] F8 clear beats load High checks= 0 goal= 2 fails= 0 HOLE
[VERDICT] Phase A, no plan: 3 MET, 5 HOLE, 0 FAIL, assertion fails=0, coverage=18.75%
[SIGNOFF] Phase A, no plan: high/medium open=5, assertion fails=0, coverage=18.75% -> NOT READY
[PHASES] Phase A, no plan: P1 sanity clean=yes, P2 coverage>=80%= no, P3 closure= no
[PHASE] Phase B, from plan
[PLAN] F1 reset clears count and ovf High checks= 1 goal= 1 fails= 0 MET
[PLAN] F2 enable counts up by 1 Med checks= 1468 goal= 20 fails= 0 MET
[PLAN] F3 no control: count holds Low checks= 307 goal= 10 fails= 0 MET
[PLAN] F4 load takes ld_val High checks= 35 goal= 5 fails= 0 MET
[PLAN] F5 load beats enable High checks= 125 goal= 5 fails= 0 MET
[PLAN] F6 wrap 255->0, ovf one cycle High checks= 6 goal= 2 fails= 0 MET
[PLAN] F7 clear sets count to 0 Med checks= 75 goal= 3 fails= 0 MET
[PLAN] F8 clear beats load High checks= 7 goal= 2 fails= 0 MET
[VERDICT] Phase B, from plan: 8 MET, 0 HOLE, 0 FAIL, assertion fails=0, coverage=100.00%
[SIGNOFF] Phase B, from plan: high/medium open=0, assertion fails=0, coverage=100.00% -> SIGN-OFF MET
[PHASES] Phase B, from plan: P1 sanity clean=yes, P2 coverage>=80%=yes, P3 closure=yes
Read Phase A again. Zero errors, a clean P1. A test plan with only this test would report green. The verification plan shows five of eight features never checked, coverage at 18.75%, and NOT READY.
Now the bugs. Same four runs, real VCS results:
| Run | Phase A (no plan) | Phase B features | Phase B assertion fails | Phase B sign-off |
|---|---|---|---|---|
| No bug | 0 errors, 5 HOLE, 18.75%, NOT READY | 8 of 8 MET | 0 | SIGN-OFF MET (P3) |
| +BUG=1 (load ignored when en is high) | Identical to no bug | F5 FAIL: 125 of 125 checks | 0 | NOT READY |
| +BUG=2 (ovf one count early) | Identical to no bug | F2 FAIL (6), F6 FAIL (6) | 6 (A_OVF_AT_ZERO) | NOT READY |
| +BUG=3 (load beats clear) | Identical to no bug | F8 FAIL: 7 of 7 checks | 0 | NOT READY |

Three things to notice:
- Phase A is word for word the same in all four runs. A test with no plan cannot tell a broken design from a working one here. Only the plan’s holes warn you.
- The plan names the broken feature. You do not get “something failed”; you get “F8, clear beats load, failed 7 of 7 checks”. That points the designer straight at the priority logic.
- Checkers and assertions catch different bugs. BUG=2 is a timing rule, so the assertion fires the moment ovf rises on the wrong cycle. BUG=1 and BUG=3 are data bugs: every rule holds, but the value is wrong, so only the scoreboard sees them. That is why the plan has both.
The BUG=2 log shows both checks firing on the same cycle:
UVM_ERROR @ 3165: uvm_test_top.env.scb [MISMATCH] after F2 enable counts up by 1: cnt=255(exp 255) ovf=1(exp 0)
"testbench.sv", 79: tav_top.vif.A_OVF_AT_ZERO: started at 3165ns failed at 3165ns
Offending '(cnt == 8'b0)'
UVM_ERROR @ 3165: reporter [SVA] A_OVF_AT_ZERO: ovf is high but cnt=255
UVM_ERROR @ 3175: uvm_test_top.env.scb [MISMATCH] after F6 wrap 255->0, ovf one cycle: cnt=0(exp 0) ovf=0(exp 1)
At 3165 ns ovf rises while the count is still 255, one cycle too early. The scoreboard and the assertion both flag it on that same cycle. One cycle later, at the real wrap, ovf is 0 when it should be 1, so F6 fails too.
The exact check counts in Phase B come from the random seed, so yours may differ a little. Which features MET, HOLE or FAIL will not.
What are the most common verification plan mistakes?
| Mistake | What it looks like | Fix |
|---|---|---|
| A test plan called a verification plan | A list of tests, with no architecture, checkers, assertions, coverage or sign-off | Write all eleven sections, even if some are short |
| No priorities | Every feature treated the same, so the hard ones get the same time as the easy ones | Rank features high, medium or low with the designer, and let the high ones drive the schedule |
| Features as headings | “Test the counter” | One testable sentence per feature, with a closure goal |
| Coverage without checks | 100% coverage, but nothing compared the outputs | Every feature needs a checker or an assertion, as well as coverage |
| Checks without coverage | Tests pass, but nobody knows what was hit | Map every feature to a coverage bin or a counted check |
| Missing interaction features | clr, ld and en each tested alone, never together | Add a feature for every priority rule in the spec |
| Vague sign-off | “Done when regressions are clean” | Measurable criteria per priority, written before the work starts |
| A plan written once | The spec changed in month 3, the plan did not | Review the plan at every milestone and after every escaped bug |
How do you debug a plan that says HOLE or NOT READY?
A HOLE means the item was never exercised often enough. Ask in this order:
- Is there stimulus for it at all? In Phase A there is no load or clear, so F4, F5, F7 and F8 cannot be hit.
- Is the stimulus too rare? A wrap needs 255 counts in a row. Random enable alone almost never gets there. Load 250 or 254 first.
- Is the item reachable? If not, write down why, and get it signed off as not applicable.
A FAIL is a different problem: the item was hit and the check disagreed. Start from the first mismatch, as in lesson 2, and see the practical verification debug guide for the full method.
Can AI help you write a verification plan?
Yes, as a fast first draft and a second reviewer. It is good at filling in sections and listing features. It cannot set priorities for your product, and it knows nothing your spec leaves out.
Task: draft a full verification plan for the 8-bit counter, all eleven sections, then compare it with mine.
Tool: Claude, in Anthropic’s Cowork app, 24 Nov 2026.
Prompt:
You are a senior design verification lead.
Spec for an 8-bit counter, tav_counter8:
- synchronous controls, priority clr > ld > en
- clr: count = 0. ld: count = ld_val.
- en: count + 1; from 255 it wraps to 0 and ovf = 1 for exactly that cycle
- no control: count holds; ovf = 0 in every other cycle
- rst_n async active low: count = 0, ovf = 0
Write a block-level verification plan with these sections:
scope, feature list with P0/P1/P2 priorities, UVM testbench architecture,
stimulus strategy, checkers plan, assertions plan (SVA), coverage plan,
test plan, sign-off criteria, execution plan, risks and open questions.
Only use behaviour stated in the spec. Mark anything you assumed with ASSUMED.
Output (excerpt, trimmed to the parts that differ from mine):
Features (extra rows):
F-x ovf = 0 in every cycle except a wrap P0
F-y ld at count 255 with en: no wrap, no ovf P0
F-z clr at count 255 with en: no ovf P0
F-r reset in the middle of counting P1
Assertions (extra):
ovf |-> $past(cnt) == 255 && $past(en) && !$past(ld) && !$past(clr)
$rose(rst_n) |-> cnt == 0 && !ovf
Coverage (extra):
cross of {clr, ld, en} with count in {0, 254, 255, other}
Sign-off: ... code coverage line 100%, branch 100%, toggle 100% on cnt and ovf
Risks:
ASSUMED: ld_val is ignored when ld = 0
ASSUMED: no X on inputs after reset
How I validated it: I mapped every section to my plan. Scope, architecture, stimulus, checkers, test plan and execution plan matched mine in substance. Five things go further, and four of them are worth taking:
- Two new high-priority features (F-y and F-z): a load or clear that arrives exactly when the count is 255 must stop the wrap. My plan lists this as a gap; the AI made it a feature. That is the better call, and it is the practice challenge below.
- A stronger assertion: ovf only when the previous cycle was a pure wrap. My A_OVF_AT_ZERO is weaker. I would add it.
- A cross coverpoint of controls against count corners. It would have forced F-y and F-z to be hit. Worth adding.
- Reset mid-count (F-r): already in my risks list as a gap. Agreed.
- Code coverage targets: fine as a goal, but I cannot measure them in this demo, so I kept them as a written gap rather than a criterion the bench pretends to check.
Both ASSUMED lines are real gaps in the spec, so they are questions for the designer. Nothing in the answer contradicted the spec.
Where it tends to fail:
- It gives every feature a priority, but it does not know your product. Priorities are your call, agreed with the designer. Notice it also used P0 and P1 for priority: yet another naming habit.
- It invents goals (“1,000 cycles”) without a reason. A goal should come from risk, not habit.
- It writes sign-off criteria nobody can measure, such as “verification is thorough”. Every criterion needs a number.
- It cannot see the spec you did not paste. Missing context gives a confident, incomplete plan.
Use it to find features, assertions and coverage you forgot. Do not let it decide what matters or when you are done.
Interview questions on verification planning
- What is the difference between a verification plan and a test plan? The verification plan is the whole strategy: features and priorities, testbench architecture, stimulus, checkers, assertions, coverage, tests, sign-off criteria and execution. The test plan is one section of it, the list of tests.
- What sections does a verification plan have? Scope, feature list with priorities, testbench architecture, stimulus strategy, checkers plan, assertions plan, coverage plan, test plan, sign-off criteria, execution plan, and risks and open questions.
- What do P1, P2 and P3 mean in a verification plan? In many teams they are execution phases. P1 is sanity clean: the bench is built and basic tests pass, coverage not yet the focus. P2 means almost all tests are coded and coverage is at least 80%. P3 is closure: full coverage, critical scenarios checked in the waveforms, sign-off met. Some companies use the same labels for feature priority, so ask which one is meant.
- What are your sign-off criteria for a block? All high and medium priority features closed with zero failures, low priority closed or waived, functional coverage at 100% or holes waived, code coverage targets met and reviewed, zero assertion failures, zero open high-priority bugs, and a clean regression over many seeds.
- Why do you need checkers, assertions and coverage? Isn’t one enough? No. Checkers prove results are right, assertions prove rules never break in any cycle, and coverage proves you actually exercised the feature. Each misses what the others catch.
- All tests pass. Are you done? Only if the sign-off criteria are met. Passing tests with coverage holes means some features were never tried.
- When do you update the plan? When the spec changes, when a bug escapes and when a review finds a gap. Every escaped bug should become a new feature row, a new check and a new coverage bin.
Practice challenge
Close the two gaps the AI review found.
- Add two high-priority features to the plan: F9 ld at count 255 with en (no wrap, no ovf) and F10 clr at count 255 with en (no ovf).
- Add them to the feature enum, the covergroup and the scoreboard’s feature table, with a goal of 3 checks each.
- Add the AI’s stronger assertion: ovf only when the previous cycle was a pure wrap.
- Run the clean design. Is the SIGNOFF line still MET, or did F9 and F10 open as HOLE?
- If HOLE, add a short directed sequence: load 254, enable once, then ld or clr together with en.
- Add a BUG=4 that sets ovf when ld and en arrive at count 255. Which catches it first: the scoreboard, the new assertion, or both?
Frequently asked questions
What is a verification plan?
A verification plan is the document that says how a design will be proven to work and when verification is done. It holds the feature list with priorities, the testbench architecture, the stimulus strategy, the checkers, assertions and coverage plans, the test plan, the sign-off criteria and the execution schedule.
How do I write a verification plan?
Start from the spec and turn every promise into a testable feature, ranked high, medium or low. Then decide the testbench architecture, and for each feature how you will drive it, check it (checker or assertion) and cover it. Finish with the test plan, measurable sign-off criteria and an execution plan with milestones.
What is the difference between a verification plan and a test plan?
A test plan lists the tests you will run. A verification plan is the whole strategy, and the test plan is one of its sections. A green test plan with no verification plan behind it cannot tell you which features were never checked.
How do you know when verification is complete?
When the sign-off criteria in the verification plan are met: every high and medium priority feature closed with zero failures, low priority closed or waived, coverage goals reached, zero assertion failures and no open high-priority bugs. Coverage alone is not enough, because it shows what was hit, not whether it was right.
Should coverage be linked to the verification plan?
Yes. Each feature should map to a coverage bin and to a checker or assertion, so the bench can report the plan’s status and the sign-off verdict directly. That is what the bench in this lesson does.
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
- Previous lesson: The Thought Process Behind Great Verification: 5 Habits That Find Real Bugs
- Next lesson: Different Stages of IP Verification
- How to Think Like a Verification Engineer: From Spec to Scenarios
- Coverage in SystemVerilog
- Directed Testing vs Constraint Random Verification
- Formal Verification vs Functional Verification
- Assertions and their advantages
- The Practical Verification Debug Guide
Part of the learning path Verification fundamentals
