Design Verification Fundamentals: Planning, Architectures & Closure
The Verification Bottleneck: Why DV Consumes 70% of Silicon R&D
In modern multimillion-gate System-on-Chip (SoC) engineering, design verification (DV) accounts for upwards of 65% to 75% of total project engineering hours. A single escaped functional bug that bypasses pre-silicon verification and reaches foundry fabrication costs upwards of $10M–$25M in mask re-spins, 6–9 months of schedule slippage, and catastrophic brand erosion.
| Verification Paradigm | Core Mechanism | Primary Advantage | Inherent Limitation |
|---|---|---|---|
| Directed Testing | Engineer writes hand-crafted input vectors targeting explicit scenarios. | Fast bring-up, simple to debug, verifies known happy-path functionality. | Cannot uncover unforeseen corner cases ("unknown-unknowns"); prohibitive effort. |
| Constrained-Random (CRV) | Solver generates randomized transactions bounded by legal protocol constraints. | Explores billions of corner-case combinations automatically; high stress density. | Requires self-checking scoreboards, complex testbenches, and functional coverage models. |
| Formal Property Checking | Mathematical engines prove whether assertions hold across all reachable states. | Exhaustive mathematical proof; discovers deep corner-case bugs in cycles. | State-space explosion on large arithmetic datapaths; requires expert property authoring. |
Verification Planning: Converting Specs to a Golden vPlan
A Verification Plan (vPlan) is the contract between system architects, RTL designers, and verification engineers. Claude accelerates planning by extracting features, boundary conditions, and error injection modes from technical specifications:
# Feature 1: Asynchronous FIFO Depth & Full/Empty Flag Assertions
- Spec Ref: Section 3.2.1 (Dual-Clock FIFO Interface)
- Stimulus Scenarios:
* TC_01: Single-write followed by single-read (sanity).
* TC_02: Continuous write stream until `full` asserts; verify write drop on overflow attempt.
* TC_03: Continuous read stream until `empty` asserts; verify invalid read data on underflow attempt.
* TC_04: Simultaneous write and read at maximum clock frequency ratio (4:1 and 1:4).
* TC_05: Randomized backpressure toggling `winc` and `rinc` concurrently.
- Checkers & Assertions:
* SVA_FIFO_01: No write when `full` is asserted (`winc && full |-> !w_accepted`).
* SVA_FIFO_02: No read when `empty` is asserted (`rinc && empty |-> !r_valid`).
- Functional Coverage Goals:
* CP_FIFO_DEPTH: Bins for depth 0, 1, 2..N-1, N (Full).
* CP_CROSS_CLKS: Cross product of write clock frequencies (100MHz-500MHz) x read clock (50MHz-200MHz).
SystemVerilog for Verification: OOP, Virtual Interfaces & Scheduling
Object-Oriented Programming (OOP) in Verification
Unlike synthesizable RTL (which models static spatial hardware structures), verification environments are dynamic software systems written in SystemVerilog (IEEE 1800). Key OOP concepts include:
- Encapsulation: Grouping data members (`rand bit [31:0] addr;`) with methods (`function void print();`) and using `protected` or `local` visibility to guard internal state.
- Inheritance (`extends`): Deriving specialized transaction classes from base classes (e.g. `axi_error_transaction extends axi_transaction`).
- Polymorphism (`virtual` methods): Allowing testbenches to handle specialized objects via base class handles, dynamically binding method calls at runtime.
- Deep Copy vs. Shallow Copy: Built-in object assignment (`b = new a;`) performs a shallow copy, duplicating primitive values but copying only pointers to sub-objects. Testbench objects must implement custom `do_copy()` methods to perform true deep copies of sub-handles.
Eliminating Simulation Race Conditions with Clocking Blocks
A common bug in naive SystemVerilog testbenches is the Read/Write race condition, where the testbench samples a DUT output in the same simulation delta-cycle that the DUT updates it. SystemVerilog solves this using the Stratified Event Queue and Clocking Blocks:
| Event Region | Execution Timing | Testbench Activity |
|---|---|---|
| Preponed | Before any events in the current time step occur. | Input Sampling: Clocking blocks sample DUT inputs with #1step skew, capturing stable values prior to the active clock edge. |
| Active / NBA | DUT clock triggers sequential logic update. | DUT non-blocking assignments (<=) evaluate and update registers. |
| Observed | After active and NBA regions settle. | Concurrent SystemVerilog Assertions (SVA) evaluate properties. |
| Re-NBA | Following Observed region. | Output Driving: Clocking blocks drive output pins to the DUT (with #0 or output skew), guaranteeing zero race conditions. |
interface apb_if(input logic PCLK, input logic PRESETn);
logic [31:0] PADDR;
logic PSEL;
logic PENABLE;
logic PWRITE;
logic [31:0] PWDATA;
logic [31:0] PRDATA;
logic PREADY;
logic PSLVERR;
// Master Clocking Block: Sample in Preponed (#1step), Drive in Re-NBA (#1ns)
clocking mck @(posedge PCLK);
default input #1step output #1ns;
output PADDR, PSEL, PENABLE, PWRITE, PWDATA;
input PRDATA, PREADY, PSLVERR;
endclocking
// Passive Monitor Clocking Block: Sample all signals without driving
clocking mon_ck @(posedge PCLK);
default input #1step;
input PADDR, PSEL, PENABLE, PWRITE, PWDATA, PRDATA, PREADY, PSLVERR;
endclocking
modport MASTER (clocking mck, input PCLK, PRESETn);
modport MONITOR (clocking mon_ck, input PCLK, PRESETn);
endinterface
UVM Architecture: Phasing, Factory, ConfigDB & Transaction Flow
The Complete UVM 1.2 Component Hierarchy
The Universal Verification Methodology (UVM) standardizes testbench construction across semiconductor companies worldwide. Below is the structural transaction pipeline from stimulus creation to verification closure:
| Component | Base Class | Primary Architectural Role | Key Methods / Ports |
|---|---|---|---|
| Sequence Item | uvm_sequence_item |
Encapsulates pin-level transactions into high-level randomized packets. | do_copy, do_compare, do_print, convert2string |
| Sequence | uvm_sequence |
Defines procedural stimulus flow and transaction generation patterns. | body(), `uvm_do, start_item, finish_item |
| Sequencer | uvm_sequencer |
Arbitrates between concurrent sequences and connects to the driver. | seq_item_export |
| Driver | uvm_driver |
Consumes sequence items and translates them into physical pin signals. | seq_item_port.get_next_item(req), item_done() |
| Monitor | uvm_monitor |
Passively samples pin signals, reconstructs packets, and broadcasts. | uvm_analysis_port #(T) ap |
| Scoreboard | uvm_scoreboard |
Compares actual DUT outputs from monitor against reference model predictions. | uvm_analysis_imp, uvm_tlm_analysis_fifo |
| Agent | uvm_agent |
Encapsulates driver, monitor, and sequencer into a reusable protocol block. | is_active == UVM_ACTIVE / UVM_PASSIVE |
| Environment | uvm_env |
Integrates multiple agents, scoreboards, coverage collectors, and virtual sequencers. | build_phase(), connect_phase() |
| Test | uvm_test |
Root of the verification component tree; configures environment and starts sequences. | run_phase(), phase.raise_objection() |
UVM Phasing & Objection Handling
UVM components execute through standardized phases. The non-time-consuming phases (`build_phase`, `connect_phase`, `end_of_elaboration`) execute in zero simulation time. The `run_phase` is a time-consuming task where clock edges and transactions occur.
UVM Testbench Development: Building Reusable Agents & Scoreboards
Complete Production UVM Driver & Monitor Implementation
Below is a complete, syntactically verified UVM 1.2 driver for an APB4 protocol, demonstrating correct virtual interface usage, clocking block synchronization, and non-blocking transaction fetching:
class apb_driver extends uvm_driver #(apb_seq_item);
`uvm_component_utils(apb_driver)
virtual apb_if.MASTER vif;
function new(string name = "apb_driver", uvm_component parent = null);
super.new(name, parent);
endfunction
function void build_phase(uvm_phase phase);
super.build_phase(phase);
if (!uvm_config_db#(virtual apb_if.MASTER)::get(this, "", "vif", vif)) begin
`uvm_fatal("NO_VIF", {"Virtual interface must be set for: ", get_full_name(), ".vif"})
end
endfunction
task run_phase(uvm_phase phase);
// Reset bus signals to idle
vif.mck.PSEL <= 1'b0;
vif.mck.PENABLE <= 1'b0;
vif.mck.PWRITE <= 1'b0;
vif.mck.PADDR <= '0;
vif.mck.PWDATA <= '0;
wait(vif.PRESETn === 1'b1);
@(vif.mck);
forever begin
seq_item_port.get_next_item(req);
drive_transfer(req);
seq_item_port.item_done();
end
endtask
task drive_transfer(apb_seq_item item);
// APB Setup Phase: Assert PSEL, drive Address and Write Control
@(vif.mck);
vif.mck.PADDR <= item.addr;
vif.mck.PWRITE <= item.write;
vif.mck.PSEL <= 1'b1;
vif.mck.PENABLE <= 1'b0;
if (item.write) vif.mck.PWDATA <= item.data;
// APB Access Phase: Assert PENABLE
@(vif.mck);
vif.mck.PENABLE <= 1'b1;
// Wait for Slave PREADY
while (!vif.mck.PREADY) @(vif.mck);
// Capture Read Data if Read Transfer
if (!item.write) item.data = vif.mck.PRDATA;
item.slverr = vif.mck.PSLVERR;
// Return to Idle
@(vif.mck);
vif.mck.PSEL <= 1'b0;
vif.mck.PENABLE <= 1'b0;
endtask
endclass
Constrained Random Verification: Solvers, Distributions & Soft Constraints
Advanced SystemVerilog Constraint Techniques
Constrained-Random Verification (CRV) allows engineers to specify the legal envelope of stimulus using mathematical constraints, letting the simulator's random solver generate millions of unexpected, corner-case input permutations.
| Constraint Construct | Syntax Example | Engineering Purpose |
|---|---|---|
inside |
addr inside {[32'h0:32'hFFF], [32'h4000:32'h4FFF]}; |
Restricts variables to discrete values or continuous ranges. |
dist (Weighting) |
length dist {1 := 50, [2:16] :/ 40, 64 := 10}; |
:= assigns weight to each value; :/ divides weight across the range. |
Implication (->) |
is_burst -> (burst_len > 1); |
Conditional constraint: if antecedent is true, consequent is enforced. |
solve ... before |
solve trans_type before payload_size; |
Guides the solver's variable elimination order to prevent distribution distortion. |
soft Constraints |
constraint c_delay { soft delay == 0; } |
Default constraint that can be overridden inline using randomize() with {}. |
class axi_packet extends uvm_sequence_item;
typedef enum bit [1:0] {FIXED = 2'b00, INCR = 2'b01, WRAP = 2'b10} burst_e;
typedef enum bit [2:0] {BYTE = 3'b000, HALF = 3'b001, WORD = 3'b010, QUAD = 3'b011} size_e;
rand bit [31:0] addr;
rand bit [7:0] len;
rand size_e size;
rand burst_e burst;
rand bit [31:0] data_payload[];
// 1. Solve burst type before address to ensure wrap alignment
constraint c_order { solve burst before addr; }
// 2. Wrap burst length must be 2, 4, 8, or 16
constraint c_wrap_len {
if (burst == WRAP) {
len inside {1, 3, 7, 15}; // AxLEN = burst_length - 1
}
}
// 3. Address alignment for wrapping bursts
constraint c_wrap_align {
if (burst == WRAP) {
(addr % (1 << size)) == 0;
}
}
// 4. Payload size must match burst length
constraint c_payload_size {
data_payload.size() == (len + 1);
}
// 5. Soft default: prefer word-aligned transfers
constraint c_default_size {
soft size == WORD;
}
`uvm_object_utils_begin(axi_packet)
`uvm_field_int(addr, UVM_ALL_ON)
`uvm_field_int(len, UVM_ALL_ON)
`uvm_field_enum(size_e, size, UVM_ALL_ON)
`uvm_field_enum(burst_e, burst, UVM_ALL_ON)
`uvm_field_array_int(data_payload, UVM_ALL_ON)
`uvm_object_utils_end
function new(string name = "axi_packet"); super.new(name); endfunction
endclass
SystemVerilog Assertions: Concurrent Checks, Temporal Logic & Protocols
Immediate vs. Concurrent Assertions
SystemVerilog Assertions (SVA) provide mathematically rigorous runtime and formal checking embedded directly into interfaces and RTL:
- Immediate Assertions (`assert (condition)`): Evaluated procedurally in the active region like an `if` statement. Subject to simulation glitching if inputs toggle mid-cycle.
- Concurrent Assertions (`assert property (@(posedge clk) ...)`): Evaluated based on clock edges. Signals are sampled in the Preponed region and evaluated in the Observed region, completely free of simulation race conditions.
| SVA Operator | Syntax | Meaning | Common Engineering Trap |
|---|---|---|---|
| Overlapping Implication | A |-> B |
If antecedent $A$ is true, consequent $B$ must hold in the same clock cycle. | Using |-> when a 1-cycle pipeline delay was intended. |
| Non-Overlapping Implication | A |=> B |
If antecedent $A$ is true, consequent $B$ must hold in the next clock cycle ($+1$). | Equivalent to A |-> ##1 B. |
| Consecutive Repetition | sig [*N] |
Signal must remain asserted continuously for $N$ consecutive cycles. | Large ranges like [*1:1000] cause state-space explosion in formal tools. |
| Past Sampling | $past(sig, N) |
Samples the value of signal $N$ clock cycles in the past. | Undefined at time zero unless guarded by reset. |
| One-Hot Functions | $onehot(sig) |
Returns true if exactly one bit in vector is active high. | Use $onehot0 if all-zero state is also legally permitted. |
module handshake_sva #(parameter WIDTH = 32) (
input logic clk,
input logic rst_n,
input logic valid,
input logic ready,
input logic [WIDTH-1:0] data
);
// Property 1: Stability Rule - Once VALID is asserted, VALID and DATA must remain
// stable until READY is asserted by the receiver.
property p_valid_stability;
@(posedge clk) disable iff (!rst_n)
(valid && !ready) |=> (valid && $stable(data));
endproperty
a_valid_stability: assert property(p_valid_stability)
else $error("[SVA_ERR] VALID dropped or DATA mutated while waiting for READY!");
// Property 2: No X/Z on Handshake Signals during Active Operation
property p_no_unknown_handshake;
@(posedge clk) disable iff (!rst_n)
!$isunknown(valid) && (valid |-> !$isunknown(data));
endproperty
a_no_unknown_handshake: assert property(p_no_unknown_handshake)
else $error("[SVA_ERR] X or Z state detected on VALID or DATA payload!");
// Cover Property: Observe full handshake transfer
c_handshake_transfer: cover property(
@(posedge clk) disable iff (!rst_n)
valid && ready
);
endmodule
Functional Coverage Closure: Covergroups, Crosses & Hole Triage
Code Coverage vs. Functional Coverage: The Verification Reality
A common trap for junior engineers is conflating 100% line or toggle coverage with verification closure. Code coverage (line, branch, condition, FSM state/arc, toggle) measures only what RTL structures were activated during simulation; it provides zero insight into whether the design implements the specification correctly. A completely unverified mode or missing error-handling logic may achieve 100% code coverage simply because the lines that do exist were executed.
Functional coverage is user-defined and specification-driven. It answers: "Have all functional scenarios, corner-case combinations, protocol states, and boundary conditions outlined in the verification plan been triggered and observed?"
| Metric Type | Source of Truth | EDA Tool Instrumentation | Sign-Off Requirement |
|---|---|---|---|
| Line & Branch Coverage | RTL source code | VCS -cm line+cond+branch, Xcelium -coverage b:c:e |
100% (or waivers formally reviewed with design leads) |
| Toggle Coverage | Netlist / RTL ports and internal nets | VCS -cm tgl, Questa coverage save -onexit |
>95% on primary I/O, internal control registers |
| FSM State & Transition | Synthesizable state machine encodings | Automated FSM extraction in EDA compiler | 100% of reachable states and legal transitions |
| Functional Coverage | Verification Plan (vPlan) derived from Spec | SystemVerilog covergroup, coverpoint, cross |
100% mandatory for tape-out sign-off |
| Assertion Coverage | SVA cover property statements |
VCS -cm assert, Questa assert cover |
100% of defined legal protocol sequences observed |
SystemVerilog Covergroup Construction: Bins, Transitions & Crosses
Modern functional coverage models leverage explicit bins, wildcard bins, state transition bins, conditional sampling, and multidimensional crosses. Below is a production-grade covergroup for an AXI4 memory controller interface capturing burst lengths, address boundaries, and write response crosses.
class axi4_coverage_subscriber extends uvm_subscriber #(axi4_transaction);
`uvm_component_utils(axi4_coverage_subscriber)
axi4_transaction tr_queue[$];
axi4_transaction cur_tr;
// Covergroup definition with sampling argument
covergroup axi4_cg with function sample(axi4_transaction tr);
option.per_instance = 1;
option.comment = "AXI4 Protocol & Boundary Coverage Model";
option.goal = 100;
// Coverpoint 1: Burst Lengths (AxLEN: 0=1 beat, 255=256 beats)
cp_burst_len: coverpoint tr.len {
bins single_beat = {0};
bins short_burst = {[1:7]};
bins medium_burst = {[8:63]};
bins max_burst_axi3 = {15}; // AXI3 legacy limit
bins max_burst_axi4 = {255}; // AXI4 full limit
bins unaligned_lengths = {[64:254]};
}
// Coverpoint 2: Burst Type (FIXED, INCR, WRAP)
cp_burst_type: coverpoint tr.burst {
bins fixed = {2'b00};
bins incr = {2'b01};
bins wrap = {2'b10};
illegal_bins reserved = {2'b11};
}
// Coverpoint 3: 4KB Boundary Crossing Address Analysis
// AXI spec strictly forbids bursts crossing 4KB page boundaries!
cp_addr_alignment: coverpoint (tr.addr[11:0]) {
bins page_start = {12'h000};
bins near_4k_page_end = {[12'hFE0:12'hFFF]};
bins mid_page = default;
}
// Coverpoint 4: Response Status (OKAY, EXOKAY, SLVERR, DECERR)
cp_resp: coverpoint tr.resp {
bins okay = {2'b00};
bins exokay = {2'b01};
bins slverr = {2'b10};
bins decerr = {2'b11};
}
// Coverpoint 5: Transition Bins (Back-to-back response transitions)
cp_resp_transition: coverpoint tr.resp {
bins okay_to_slverr = (2'b00 => 2'b10);
bins slverr_to_okay = (2'b10 => 2'b00);
bins decerr_recovery = (2'b11 => 2'b00);
}
// Cross Coverage: Burst Type X Burst Length
cross_burst_type_len: cross cp_burst_type, cp_burst_len {
// WRAP bursts must have length 2, 4, 8, or 16 according to ARM AXI Spec!
ignore_bins illegal_wrap_len = binsof(cp_burst_type.wrap) &&
!binsof(cp_burst_len) intersect {1, 3, 7, 15};
}
// Cross Coverage: Address Boundary X Burst Length
cross_page_crossing: cross cp_addr_alignment, cp_burst_len;
endgroup
function new(string name, uvm_component parent);
super.new(name, parent);
axi4_cg = new();
endfunction
virtual function void write(axi4_transaction t);
cur_tr = t;
axi4_cg.sample(cur_tr);
endfunction
endclass
Triage Workflow: Analyzing Coverage Holes with Claude Code
When EDA coverage reports (e.g., Synopsys VCS urgReport or Cadence imc) indicate 92% coverage with persistent unhit bins, engineers face a time-consuming debug cycle. Unhit bins typically stem from one of four root causes:
- Over-Constrained Testbench: Conflicting or overly rigid
constraintblocks preventing random stimulus from ever generating the target values. - Missing Test Sequences: No sequence written to trigger rare fault scenarios (e.g., ECC double-bit error injection, arbitration starvation under backpressure).
- Unreachable / Dead Code: Configuration parameter static binds (e.g.,
CACHE_ENABLED=0) rendering certain hardware states physically unreachable in this SoC variant (requires formal waiver). - DUT Functional Bug: DUT state machine hangs or drops transactions before the coverage sampling point is reached.
Debugging and Waveform Analysis: UVM Errors, Hangs & X-Propagation
Anatomy of a Verification Hang: Objection Leaks & Deadlocks
Simulation hangs are among the most frustrating issues in DV. A simulation runs indefinitely until terminated by an EDA watchdog or UVM phase timeout:
UVM_FATAL @ 10000000000 ps: reporter [PH_TIMEOUT] Default timeout of 10000000000 ps hit
--- UVM Report catcher summary ---
Total objections outstanding: 1
+-----------------------------------------------------------------------------------------+
| Object | Count | Description |
+-----------------------------------------------------------------------------------------+
| uvm_test_top.env.axi_agent.sequencer.vseq | 1 | axi4_random_traffic_vseq |
+-----------------------------------------------------------------------------------------+
| Hang Signature | Underlying Root Cause | EDA Debug Tool Strategy | Claude Code Assistance Method |
|---|---|---|---|
| Objection Leak | raise_objection invoked in sequence/fork without matched drop_objection in exception path. |
VCS +UVM_OBJECTION_TRACE, Xcelium +uvm_set_verbosity=*,_ALL_,UVM_HIGH |
Inspect sequence body and fork/join_any exception branches for unbalanced drops. |
| TLM FIFO Starvation | Driver calls seq_item_port.get_next_item(req) but sequencer yields no item due to constraint failure. |
Verdi transaction browser, inspect sequencer active thread queue. | Analyze sequence constraint solver failures and item arbitration weights. |
| Circular Handshake Deadlock | DUT waits for testbench ready; testbench driver waits for DUT valid before asserting ready. |
Verdi active process browser; dump FSDB and trace wait states. | Review interface protocol logic against AMBA spec causality rules. |
| X-Propagation Latch | Uninitialized flop propagates 'X' into FSM transition branch; next-state logic becomes unknown. |
VCS -xprop=tmerge / -xprop=fmerge, JasperGold X-Analysis. |
Identify reset omissions in RTL always_ff blocks or clock domain crossing synchronizers. |
Waveform Debugging Workflow with Claude: From Signal Traces to Bug Localization
While Claude cannot open graphical GUI tools like Synopsys Verdi or Cadence SimVision directly, Claude excels at parsing signal transition dumps, tabular printouts, and VCD/FSDB text excerpts.
Protocol Verification: AMBA APB4, AXI4/AXI-Lite & Streaming Interfaces
AMBA Interconnect Landscape in Modern SoCs
Protocol verification represents over 50% of the verification IP (VIP) deployed on high-performance SoCs. Understanding the handshake rules, transfer phases, and concurrency semantics of ARM AMBA protocols is critical for building robust verification environments.
| Protocol | Architecture | Max Throughput | Key Verification Hazards |
|---|---|---|---|
| APB4 (Peripheral Bus) | Non-pipelined, 2-phase (SETUP, ACCESS), single master, low power. | 1 transfer per 2 clock cycles minimum. | Master changing address during ACCESS phase before PREADY asserted; ignoring PSLVERR. |
| AHB5 (High-perf Bus) | Pipelined address & data phases, burst transfers, single shared bus. | 1 transfer per cycle sustained in burst. | Pipelined address/data phase decoupling; wait states inserted by HREADYOUT; cancel on error response. |
| AXI4 (System Interconnect) | 5 independent parallel channels (AW, W, B, AR, R), full duplex, burst-based. | Multiple concurrent read/write transactions per clock. | Out-of-order data interleaving across transaction IDs; deadlocks from circular VALID/READY dependencies; 4KB page crossing. |
| AXI4-Stream | Point-to-point streaming data packet transfers, no address channel. | Variable byte width line-rate streaming. | Backpressure deadlock; TLAST dropped prematurely; byte strobe TKEEP / TSTRB mismatch. |
AXI4 Two-Way Handshake Causality Rules: SVA Verification
The ARM AMBA AXI4 specification defines strict rules regarding dependency between VALID and READY signals to guarantee deadlock-free architectures:
- Rule 1 (Master Independence): A transmitting master MUST NOT wait for the receiver to assert
READYbefore assertingVALID.VALIDmust be asserted unconditionally once payload data is valid. - Rule 2 (Receiver Freedom): A receiving slave CAN wait for
VALIDbefore assertingREADY, OR it may assertREADYspeculatively beforeVALIDarrives. - Rule 3 (Stability Rule): Once a master asserts
VALID, it MUST keepVALIDhigh and retain the exact payload data until the handshake completes (VALID && READY).
module axi4_channel_sva #(parameter WIDTH = 64) (
input logic clk,
input logic rst_n,
input logic valid,
input logic ready,
input logic [WIDTH-1:0] data
);
// Property: Stability until acknowledged
property p_handshake_stability;
@(posedge clk) disable iff (!rst_n)
(valid && !ready) |=> (valid && $stable(data));
endproperty
assert_handshake_stability: assert property(p_handshake_stability)
else $error("[AXI_ERR_01] Master modified data or de-asserted VALID before READY was high!");
// Property: No combinational loop (READY must not depend combinatorially on VALID in Master)
// Verified formally in JasperGold or with strict timing assertions
property p_valid_no_x;
@(posedge clk) disable iff (!rst_n)
!$isunknown(valid);
endproperty
assert_valid_no_x: assert property(p_valid_no_x)
else $error("[AXI_ERR_02] VALID signal contains X or Z!");
// Coverage: Measure handshake latency distribution
cover_zero_wait: cover property(
@(posedge clk) disable iff (!rst_n)
valid && ready
);
cover_slave_backpressure: cover property(
@(posedge clk) disable iff (!rst_n)
valid && !ready [*3] ##1 (valid && ready)
);
endmodule
Regression Automation, Failure Clustering & Log Analysis
Enterprise Regression Farms: Scale & Failure Clustering
In tier-1 semiconductor companies (Intel, AMD, Qualcomm, NVIDIA, Apple), overnight regressions execute between 50,000 and 200,000 random seeds across server farms (LSF, Slurm, Sun Grid Engine). If 1,200 runs fail, engineers cannot manually open 1,200 log files.
Modern DV teams deploy automated failure clustering engines. By hashing regex signatures extracted from simulation logs (UVM error strings, assertion names, source file line numbers, call stacks), 1,200 failures typically collapse into 3 or 4 root-cause clusters:
| Failure Cluster Signature | Failed Seeds Count | True Underlying Root Cause | Action Plan |
|---|---|---|---|
UVM_ERROR /tb/sb/axi_sb.sv(142) [EXP_DATA_MISMATCH] |
840 tests | RTL FIFO read-pointer Gray-code CDC synchronizer glitch under backpressure. | Assign to Front-End RTL Designer for CDC fix; file Jira critical bug. |
*E,ASSERT [a_valid_stability] /tb/sva/axi_sva.sv(28) |
280 tests | Testbench driver deasserted WVALID on random cycle without waiting for WREADY. |
Fix UVM VIP driver state machine; rerun cluster seeds. |
UVM_FATAL [PH_TIMEOUT] Default timeout of 10ms hit |
68 tests | Sequence objection raised in fork branch without drop_objection on error abort. |
Fix virtual sequence objection balancing. |
Segmentation Fault (core dumped) in libvcs.so |
12 tests | Queue index out-of-bounds in custom scoreboarding model. | Add array bounds check before accessing tr_history[id]. |
Production Python Regression Parser & Cluster Script
Here is a complete, standalone Python utility that can be executed directly or invoked by Claude Code to scan simulation logs, cluster failures by signature, extract random seeds, and generate clean Markdown reports.
#!/usr/bin/env python3
"""
regression_cluster.py - ASIC Regression Log Analyzer & Failure Classifier
Usage: python regression_cluster.py --log-dir ./sim_results --out report.md
"""
import os
import re
import sys
import argparse
from collections import defaultdict
ERROR_PATTERNS = [
re.compile(r"(UVM_FATAL\s+.*)", re.MULTILINE),
re.compile(r"(UVM_ERROR\s+.*?:\s+\[(.*?)\]\s+(.*))", re.MULTILINE),
re.compile(r"(\*E,ASSERT\s+.*)", re.MULTILINE),
re.compile(r"(Assertion\s+`.*?'\s+failed.*)", re.MULTILINE),
re.compile(r"(Segmentation fault.*)", re.MULTILINE),
re.compile(r"(PH_TIMEOUT\s+.*)", re.MULTILINE)
]
SEED_PATTERN = re.compile(r"(?:-seed|\+ntb_random_seed=|\+seed=)\s*(\d+)", re.IGNORECASE)
def parse_log(filepath):
"""Scans a single simulation log file for errors and seed."""
with open(filepath, 'r', errors='ignore') as f:
content = f.read()
seed = "Unknown"
seed_match = SEED_PATTERN.search(content)
if seed_match:
seed = seed_match.group(1)
# Check for passed status
if "TEST PASSED" in content or "UVM_TEST_TOP: PASSED" in content:
return "PASS", seed, None
# Search for error signatures
for pattern in ERROR_PATTERNS:
match = pattern.search(content)
if match:
# Normalize error signature to remove variable time/memory addresses
sig = match.group(0).strip()
sig = re.sub(r"@\s*\d+\s*(?:ps|ns|fs)", "@
Formal Property Verification (FPV) vs. Dynamic Simulation & UPF Power-Aware DV
Formal Verification: Mathematical Proof vs. Monte Carlo Simulation
Dynamic simulation (SystemVerilog/UVM) is inherently incomplete: even a 100-million cycle regression samples only an infinitesimal fraction of an SoC's $2^{2000}$ possible state space. Formal Property Verification (FPV) leverages mathematical algorithms (SAT/SMT solvers, Bounded Model Checking, Craig Interpolation, k-induction) to prove that an assertion holds across all possible stimulus combinations for infinite cycles, or it returns a precise counterexample trace demonstrating the failure.
| Dimension | Dynamic Simulation (VCS / Xcelium) | Formal Verification (VC Formal / JasperGold) |
|---|---|---|
| Stimulus Generation | Testbench sequences, random seeds, constraints. | Exhaustive mathematical solver searches all legal inputs. |
| Completeness | Statistical confidence bounded by functional coverage. | 100% mathematical proof within bounded/unbounded domain. |
| Corner Case Reachability | Requires explicit random sequences or directed tests. | Uncovers deep, obscure multi-cycle bugs in minutes. |
| Primary Failure Mode | Simulation hang, objection leak, coverage deficit. | State-space explosion (memory/time limit reached). |
| Optimal Use Cases | End-to-end SoC data path, firmware boot, mixed-signal. | Arbiters, FIFO controllers, credit bridges, protocol decoders, security firewalls. |
Low-Power Power-Aware Simulation with IEEE 1801 (UPF 3.0)
Modern battery-powered SoCs feature dynamic voltage and frequency scaling (DVFS), power gating, multiple voltage domains, and retention flip-flops. Simulating pure RTL does not account for power state transitions—when a domain powers off, its outputs float to unknown states ('X'), corrupting always-on logic unless protected by isolation cells.
UPF (Unified Power Format) Simulation couples power architectural intent with SystemVerilog simulation:
- Isolation Cells: Clamps powered-down domain outputs to safe logic '0' or '1' before reaching active domains.
- Level Shifters: Translates signals traversing different voltage islands (e.g., 0.75V core logic to 1.8V I/O domain).
- Retention Registers: Preserves state machine register contents during deep sleep using a secondary always-on backup rail.
- Power State Table (PST): Defines legal operational modes (ACTIVE, SLEEP, DEEP_SLEEP, SHUTDOWN).
Verification Optimization & Engineering Judgment: The Human-in-the-Loop Imperative
Simulation Runtime Acceleration Techniques
When regression turnaround takes 18 hours instead of 6 hours, engineering velocity drops precipitously. Optimizing SystemVerilog and UVM testbenches delivers up to 3x to 5x simulation speedup without modifying RTL:
| Optimization Area | Sub-Optimal Practice (Slow) | Engineered Solution (High-Performance) | Impact |
|---|---|---|---|
| Object Allocation | Constructing new uvm_sequence_item instances inside a 1,000,000-cycle loop. |
Reuse a single pre-allocated transaction object; call tr.randomize() repeatedly. |
35% to 50% CPU time reduction, massive reduction in garbage collection overhead. |
| String Formatting | Excessive $sformatf() invocations inside low-level driver or monitor loops regardless of verbosity. |
Guard logging with if (uvm_report_enabled(UVM_HIGH)) before evaluating $sformatf. |
20% speedup in high-throughput streaming environments. |
| Waveform Dumping | Dumping full-hierarchy FSDB/VCD from time 0 across entire chip ($fsdbDumpvars(0, tb_top)). |
Targeted dumping: only dump error windows via trigger callbacks ($fsdbDumpvars("+mda", "+all") only after failure window). |
4x disk I/O reduction, 2x faster execution time. |
| Coverage Sampling | Sampling complex cross-coverage groups on every clock cycle. | Sample only on active transaction completion events in the monitor. | 15% simulation speedup. |
What Claude Can and Cannot Do in ASIC Verification
Claude Code is an extraordinary amplifier for verification productivity, but semiconductor design is high-stakes physical engineering. Knowing precisely where AI excels and where human engineering sign-off is mandatory prevents costly errors:
| Verification Capability | Claude Code Capability | Commercial Simulator (VCS / Xcelium / Questa) | Human Engineer Sign-Off Responsibility |
|---|---|---|---|
| UVM Component Scaffolding | Instant Generation Accurately generates agents, drivers, monitors, sequences, and scoreboards. | Compiles and elaborates SystemVerilog classes. | Reviews architectural fit and protocol edge cases. |
| SVA Property Formulation | High Proficiency Formulates complex sequence operators, stability checks, and reset disables. | Evaluates assertions cycle-by-cycle during simulation or formal proof. | Validates property correctness against microarchitecture specification. |
| Simulation Execution | Cannot Run Directly Does not execute EDA simulator kernels or generate proprietary binary databases. | Authoritative Engine executes RTL simulation, solves event queues, dumps waveforms. | Configures simulator options, licenses, and regression queues. |
| Log & Failure Triage | Exceptional Parses logs, extracts error call stacks, clusters regression seeds, diagnoses root causes. | Outputs raw text logs and VCD/FSDB dumps. | Approves bug fixes and commits code to repository. |
| Tape-Out Sign-Off | Zero Authority Cannot formally sign off verification completeness. | Produces final mathematical coverage database (urg/imc). | Mandatory Human Sign-Off: Principal DV Architect reviews waivers and holes. |
15 Reusable Claude Code Skills for Design Verification Engineers
Automating Verification Workflows with Claude Code Skills
Claude Code skills are specialized, repeatable prompt engineering and workflow automation manifests placed in your project's .claude/skills/<skill-name>/SKILL.md directory. When activated in the terminal via slash commands (e.g., /uvm-testbench-generator or /sva-assertion-generator), Claude automatically adopts the domain-expert role, parses required files, executes rigorous step-by-step verification audits, and formats outputs against strict ASIC standards.
Explore all 15 production-grade DV skills below. You can copy individual skills or download the entire configured skill pack as a single ZIP archive.
Download Complete DV Skills Pack (15 Skills)
Includes all 15 ready-to-use SKILL.md files structured in .claude/skills/ hierarchy for instant installation.
Production-grade Claude Code skill for automated execution. Run directly in terminal via /sv-code-reviewer or reference in prompt instructions.
---
name: sv-code-reviewer
description: Audits SystemVerilog verification code for OOP correctness, race conditions, memory leaks, shallow copy bugs, virtual interface usage, and randomization pitfalls.
---
# SystemVerilog Code Reviewer Skill
## Purpose
Reviews SystemVerilog verification classes, interfaces, packages, and testbench modules to identify subtle OOP anti-patterns, simulation race conditions, uninitialized handles, shallow-versus-deep copy bugs, and suboptimal array structures.
## When to Activate
Activate during code reviews of testbench infrastructure, verification component authoring, or refactoring legacy SystemVerilog testbenches.
## Required Input Files
- SystemVerilog class files (`.sv`, `.svh`)
- Interface definitions (`interface ... endinterface`)
- Package declarations (`package ... endpackage`)
## Step-by-Step Analysis Workflow
1. **OOP & Memory Management Audit:**
- Check class constructors (`function new`): Ensure `super.new` is called correctly.
- Detect shallow copy pitfalls: Check if objects containing sub-handles implement custom deep-copy methods rather than relying on built-in `new` shallow copy.
- Audit object lifecycle: Ensure transient transaction objects are properly unreferenced to allow garbage collection.
2. **Race Condition & Scheduling Semantics:**
- Verify non-blocking assignments (`<=`) vs blocking assignments (`=`) in sequential vs combinational verification routines.
- Inspect interface clocking blocks: Verify input skew `#1step` (Sampled in Preponed region) and output skew `#0` / `#1ns` (Driven in Re-NBA / Observed region) to eliminate race conditions with the DUT.
3. **Data Structure Suitability:**
- Check usage of queues (`[$]`), dynamic arrays (`[]`), and associative arrays (`[*]`). Ensure unbounded associative arrays do not consume unbounded host memory during long regressions.
4. **Randomization & Encapsulation:**
- Verify `rand` and `randc` fields have appropriate `protected` or `local` visibility with accessor methods.
- Verify `post_randomize()` methods maintain consistency without overriding constrained variables.
## Example Prompt
```text
Review this SystemVerilog driver class for potential memory leaks, race conditions with the DUT clock, and improper virtual interface usage:
[paste SV driver code]
```
## Expected Output
- **OOP Architecture Review:** Class hierarchy, constructor validity, deep copy compliance.
- **Race Condition Vulnerabilities:** Interface clocking skew and sampling region audit.
- **Identified Bugs & Anti-Patterns:** Line-by-line defect list with severity rating.
- **Refined SystemVerilog Code:** Corrected, synthesizable/verifiable SV code blocks.
## Limitations
- Code review cannot execute simulator event scheduling; always compile with Synopsys VCS, Cadence Xcelium, or Siemens Questa to confirm zero lint/elaboration errors.
## Verification Checklist
- [ ] Virtual interface initialized and checked with `assert(vif != null)`.
- [ ] Clocking block used for all DUT signal sampling and driving.
- [ ] Custom `copy()`, `clone()`, and `compare()` methods correctly implemented.
Production-grade Claude Code skill for automated execution. Run directly in terminal via /uvm-testbench-generator or reference in prompt instructions.
---
name: uvm-testbench-generator
description: Generates modular, standard UVM 1.2 compliant testbench components including sequence items, drivers, monitors, sequencers, agents, scoreboards, and environments.
---
# UVM Testbench Generator Skill
## Purpose
Accelerates the development of standard, reusable Universal Verification Methodology (UVM 1.2 / IEEE 1800.2) testbench hierarchies from interface specifications, creating complete transaction-level modeling (TLM) pipelines.
## When to Activate
Activate when bringing up verification environments for new IP blocks, creating VIP (Verification IP) agents, or building modular testbenches for DUTs.
## Required Input Files
- Interface pinout and protocol specification (signal names, directions, timing diagrams)
- Transaction parameters (payload widths, burst types, address ranges)
- DUT interface definition (`interface <name>_if`)
## Step-by-Step Generation Workflow
1. **Sequence Item (`uvm_sequence_item`):**
- Define randomized fields (`rand bit [31:0] addr, data;`).
- Implement UVM field macros or explicit core methods: `do_copy`, `do_compare`, `do_print`, `do_record`, `convert2string`.
- Add sensible protocol constraint blocks.
2. **Driver (`uvm_driver #(item_t)`):**
- Connect via virtual interface (`virtual <name>_if.DRV vif`).
- Implement `run_phase`: Fetch items using `seq_item_port.get_next_item(req)`, drive pin signals according to protocol clocking block, call `seq_item_port.item_done()`.
3. **Monitor (`uvm_monitor`):**
- Passively sample signals using clocking block (`vif.mon_cb`).
- Reconstruct transactions and broadcast via `uvm_analysis_port #(item_t) ap`.
4. **Sequencer & Agent (`uvm_agent`):**
- Encapsulate driver, monitor, and sequencer.
- Support `is_active == UVM_ACTIVE` (instantiates driver + sequencer) vs `UVM_PASSIVE` (monitor only).
5. **Environment & Scoreboard:**
- Instantiate agents and scoreboards, connecting analysis ports to scoreboard analysis exports or TLM fifos (`uvm_tlm_analysis_fifo`).
## Example Prompt
```text
Generate a complete, reusable UVM agent for an APB4 slave interface (PCLK, PRESETn, PADDR[31:0], PSEL, PENABLE, PWRITE, PWDATA[31:0], PRDATA[31:0], PREADY, PSLVERR). Include sequence_item, driver, monitor, sequencer, and agent classes.
```
## Expected Output
- Logically complete SystemVerilog files adhering to UVM factory registration (`uvm_component_utils`, `uvm_object_utils`).
- Explicit phase definitions (`build_phase`, `connect_phase`, `run_phase`).
- Zero syntax omissions or disconnected placeholders.
## Limitations
- Generated code must be compiled within your simulation environment with the official UVM library. Claude cannot execute simulator compiles.
## Verification Checklist
- [ ] Factory registration macros included on all classes.
- [ ] `seq_item_port.item_done()` called for every `get_next_item()`.
- [ ] Analysis ports connected in `connect_phase` using `connect()`.
Production-grade Claude Code skill for automated execution. Run directly in terminal via /uvm-debug-assistant or reference in prompt instructions.
---
name: uvm-debug-assistant
description: Diagnoses UVM simulation hangs, objection leaks, phase drop issues, factory override failures, config_db lookup mismatches, and null handle dereferences.
---
# UVM Debug Assistant Skill
## Purpose
Pinpoints the root causes of UVM testbench runtime failures, deadlock hangs where simulations run indefinitely at time zero or mid-test, configuration database silent misses, and objection mismanagement.
## When to Activate
Activate when a UVM simulation fails with `UVM_FATAL`, `UVM_ERROR`, silent hangs where the simulation does not terminate, or factory overrides that fail to take effect.
## Diagnostic Decision Tree
1. **Simulation Hangs at Time Zero:**
- *Check:* Are any components waiting for an event before it is triggered? Is an objection raised in `pre_body()` or `body()` of a sequence that is blocked by an unstarted clock?
- *Check:* Is the reset sequence waiting for `reset_n == 1` while the reset generator is uninstantiated?
2. **Simulation Hangs at End of Test (Run Phase Does Not Exit):**
- *Check:* Objection leak. Did a component call `phase.raise_objection()` without a matching `phase.drop_objection()`?
- *Action:* Recommend `+UVM_OBJECTION_TRACE` simulator switch to trace every objection raise/drop with component path.
3. **`uvm_config_db` Silent Failures:**
- *Check:* Mismatched context (e.g. `this` vs `null`), mismatched field name strings (case sensitive), or type mismatch (e.g., passing virtual interface wrapper vs raw interface).
- *Action:* Recommend `+UVM_CONFIG_DB_TRACE` to inspect all get/set queries.
4. **Factory Override Does Not Apply:**
- *Check:* Was the component created with `create()` or directly with `new()`? Direct `new()` bypasses the factory table!
- *Check:* Did the override call occur in `build_phase` *before* the component was created?
## Limitations
- Requires simulation transcript logs and relevant UVM component source code.
## Verification Checklist
- [ ] All components created via `type_id::create()`.
- [ ] Objection trace clean with net zero active objections at test termination.
- [ ] Virtual interface successfully retrieved in `build_phase` of agent.
Production-grade Claude Code skill for automated execution. Run directly in terminal via /sva-assertion-generator or reference in prompt instructions.
---
name: sva-assertion-generator
description: Converts protocol and design specifications into formal and simulation-ready SystemVerilog Assertions (SVA) with concurrent properties, sequences, and coverage directives.
---
# SystemVerilog Assertion (SVA) Generator Skill
## Purpose
Translates plain-English interface rules, timing diagrams, and protocol requirements into mathematically precise, robust SystemVerilog Assertions (`assert property`, `cover property`, `assume property`).
## When to Activate
Activate when defining interface protocols, capturing bus handshakes (AXI, APB, Wishbone), FIFO status checks, arbiter fairness, or state machine reachability.
## SVA Architecture & Guidelines
1. **Clocking & Resets:**
- Always specify explicit clock edge: `property p_rule; @(posedge clk) disable iff (!rst_n) ...`
- Use `disable iff` with asynchronous resets to prevent false glitch violations during reset assertion.
2. **Implication Selection:**
- Overlapping implication (`|->`): Consequent evaluates in the *same cycle* as the antecedent.
- Non-overlapping implication (`|=>`): Consequent evaluates in the *next cycle* ($+1$ cycle).
3. **Temporal Operators:**
- Consecutive repetition: `req ##[1:5] ack`.
- Past sampling: `$past(signal, 1)` to verify signal stability.
- Edge detection: `$rose(signal)`, `$fell(signal)`, `$stable(signal)`.
- Vector checks: `$onehot(grant_vector)`, `$onehot0(vector)`.
## Example Prompt
```text
Write a concurrent SVA property for an AXI4 write address channel: When AWVALID is asserted, AWADDR, AWBURST, and AWLEN must remain stable until AWREADY is asserted by the slave.
```
## Expected Output
```systemverilog
property p_axi_awvalid_stability;
@(posedge ACLK) disable iff (!ARESETn)
(AWVALID && !AWREADY) |=> (AWVALID && $stable(AWADDR) && $stable(AWBURST) && $stable(AWLEN));
endproperty
a_axi_awvalid_stability: assert property(p_axi_awvalid_stability)
else $error("[SVA_ERR] AXI AWVALID or payload mutated while AWREADY is deasserted!");
c_axi_awvalid_handshake: cover property(p_axi_awvalid_stability);
```
## Limitations
- Claude cannot guarantee that an assertion suite provides 100% formal property coverage. Formal model checkers (JasperGold, VC Formal) are required for complete mathematical proof.
## Verification Checklist
- [ ] Explicit clock and asynchronous reset disable defined.
- [ ] Vacuous pass scenarios analyzed (antecedent can be triggered).
- [ ] Cover property included alongside assertion property.
Production-grade Claude Code skill for automated execution. Run directly in terminal via /constraint-reviewer or reference in prompt instructions.
---
name: constraint-reviewer
description: Audits SystemVerilog constraint blocks for solver conflicts, contradiction deadlocks, distribution skew, solve-before order dependencies, and performance bottlenecks.
---
# SystemVerilog Constraint Reviewer Skill
## Purpose
Diagnoses randomized constraint failures, solver timeouts, over-constrained contradictions (`randomization failed`), and under-constrained edge cases in transaction stimulus generators.
## Analysis Methodology
1. **Contradiction Detection:**
- Identify conflicting equality or range constraints (e.g., `c1: addr inside {[0:100]}; c2: addr > 200;`).
2. **Implication & Conditional Logic:**
- Review `if (cond) ... else ...` and implication `A -> B` constraints.
- Remember that if antecedent $A$ is false, consequent $B$ is unconstrained! Use bidirectional or explicit `else` when mutual exclusivity is required.
3. **Distribution & Weighting (`dist`):**
- Check distribution weights: `:=` (equal weight to each value in range) vs `:/` (weight divided across range).
4. **`solve ... before ...` Order Dependencies:**
- Check whether dependent variables require explicit solver ordering to achieve uniform probability distribution rather than skewed outcomes.
## Limitations
- Solver algorithms differ slightly across commercial engines (VCS, Xcelium, Questa). Recommendations adhere strictly to IEEE 1800-2023 LRM standard behavior.
## Verification Checklist
- [ ] Randomization tested with multiple random seeds (`+ntb_random_seed=random` or `-sv_seed`).
- [ ] Soft constraints (`soft`) used appropriately for default values that sequences can override.
- [ ] No cyclic dependencies in `solve-before` declarations.
Production-grade Claude Code skill for automated execution. Run directly in terminal via /functional-coverage-analyzer or reference in prompt instructions.
---
name: functional-coverage-analyzer
description: Evaluates SystemVerilog covergroups, coverpoints, cross coverage, and coverage reports to identify coverage holes, redundant bins, and prescribe missing test scenarios.
---
# Functional Coverage Analyzer Skill
## Purpose
Analyzes functional coverage models and simulation coverage transcripts (`urgReport`, `imc`, `coverage.rpt`), identifying un-exercised corner cases, missing cross-products, and illegal bin definitions.
## Key Audit Focus Areas
1. **Covergroup Structure:**
- Verify sampling event (e.g. `@(posedge clk)` or explicit `sample()` method called from monitor).
- Check option settings: `option.per_instance = 1;`, `option.goal = 100;`.
2. **Bin Quality & Density:**
- Flag auto-generated bins on wide 32-bit variables (`auto[64]` creates superficial 64 bins across 4 billion values).
- Ensure explicit bins target boundary values: 0, 1, max-1, max, power-of-two boundaries.
3. **Cross Coverage Feasibility:**
- Review `cross` definitions. Check `ignore_bins` to filter out physically impossible combinations that prevent reaching 100% coverage closure.
4. **Transition Coverage:**
- Verify state transitions: `bins b_idle2active = (IDLE => ACTIVE => EXEC);`.
## Limitations
- High coverage percentages do not prove RTL correctness if coverpoints fail to observe DUT output reactions. Claude distinguishes stimulus coverage from response coverage.
## Verification Checklist
- [ ] All coverpoints have dedicated engineering intent.
- [ ] Impossible operational modes filtered with `ignore_bins`.
- [ ] Explicit sampling call verified in passive UVM monitor.
Production-grade Claude Code skill for automated execution. Run directly in terminal via /scoreboard-reviewer or reference in prompt instructions.
---
name: scoreboard-reviewer
description: Reviews UVM scoreboards, reference models, and in-order/out-of-order transaction checkers for race conditions, dropped packets, and memory leaks.
---
# UVM Scoreboard Reviewer Skill
## Purpose
Audits self-checking UVM scoreboard architectures, comparing actual DUT output transactions against golden reference model predictions to detect silent data corruption and transaction drops.
## Analysis Methodology
1. **TLM Connectivity & Interfaces:**
- Verify `uvm_analysis_imp` or `uvm_tlm_analysis_fifo` declarations.
- For scoreboards monitoring multiple streams, verify unique imp declarations using `` `uvm_analysis_imp_decl(_<suffix>) ``.
2. **Order Modeling (In-Order vs Out-of-Order):**
- In-order: Uses queues (`item_t expected_q[$]`) and pops on actual match.
- Out-of-order: Uses associative arrays indexed by transaction ID / tag (`item_t pending_table[int]`).
3. **Phase Cleanup & Drain Audit:**
- In `check_phase`, verify that comparison queues or pending tables are completely empty. Any remaining items indicate dropped packets or hung transactions!
## Limitations
- Golden reference model logic must be verified against official architectural specifications.
## Verification Checklist
- [ ] `` `uvm_analysis_imp_decl `` used for multiple input ports.
- [ ] `check_phase` asserts that internal comparison buffers are empty.
- [ ] Deep comparison implemented using transaction `compare()` or custom fields.
Production-grade Claude Code skill for automated execution. Run directly in terminal via /verification-plan-generator or reference in prompt instructions.
---
name: verification-plan-generator
description: Transforms microarchitectural specifications and interface requirements into structured verification plans with features, test scenarios, assertions, and coverage goals.
---
# Verification Plan Generator Skill
## Purpose
Converts engineering specifications and hardware architecture documents (PRD / MAS) into structured, traceable Verification Plans (vPlans) mapped to stimulus scenarios, SVA checkers, and functional coverage models.
## Structure of Generated Verification Plan
1. **Feature Extraction:** Breaks design into verifiable units (e.g., Flow Control, Buffer Management, Error Handling).
2. **Corner Cases & Boundary Conditions:** Identifies maximum depths, minimum delays, concurrent assertions, backpressure scenarios.
3. **Test Scenarios Matrix:**
- Directed sanity tests.
- Constrained random stress tests.
- Negative tests (illegal protocol injection, parity errors, aborts).
4. **Coverage & Checkers Mapping:** Links each scenario to specific SVA properties and functional covergroups for coverage closure tracking.
## Limitations
- Generated plans require engineering review to validate microarchitectural subtleties and third-party IP integration boundaries.
## Verification Checklist
- [ ] Every feature has at least one positive, negative, and stress test scenario.
- [ ] Traceability matrix maps features directly to covergroups.
Production-grade Claude Code skill for automated execution. Run directly in terminal via /protocol-verification-reviewer or reference in prompt instructions.
---
name: protocol-verification-reviewer
description: Evaluates verification environments for standard bus protocols (AXI4, APB4, AHB5, PCIe, Ethernet) for compliance checking, backpressure stress, and error responses.
---
# Protocol Verification Reviewer Skill
## Purpose
Validates protocol compliance testbenches, ensuring verification environments thoroughly stress protocol edge cases: out-of-order completion, burst wrapping, backpressure stalling, credit starvation, and bus aborts.
## Supported Protocol Domains
- **AMBA AXI4 / AXI4-Lite:** Outstanding transactions, write interleaving, burst types (INCR, WRAP, FIXED), response codes (OKAY, EXOKAY, SLVERR, DECERR), handshake independence rules.
- **AMBA APB4:** Setup phase, access phase, wait states (`PREADY == 0`), error signaling (`PSLVERR`).
- **FIFO / Stream Interfaces:** Ready/Valid backpressure, bubble insertion, credit counters, almost-full thresholds.
## Analysis Checklist
1. Are valid signals permitted to drop before ready is asserted? (Illegal in AXI/Ready-Valid!).
2. Are ready signals allowed to depend combinationally on valid signals?
3. Does the testbench test maximum outstanding transactions without deadlock?
## Limitations
- Cannot replace official ARM AXI Protocol Checkers (VIP). Claude reviews custom logic against AMBA specification rules.
## Verification Checklist
- [ ] Protocol stability rules enforced via SVA.
- [ ] Backpressure exercised with randomized wait states.
Production-grade Claude Code skill for automated execution. Run directly in terminal via /waveform-debug-assistant or reference in prompt instructions.
---
name: waveform-debug-assistant
description: Guides root-cause debugging of simulation waveform traces (VCD, FSDB), log files, signal timing anomalies, and unexpected X-propagation.
---
# Waveform Debug Assistant Skill
## Purpose
Helps engineers trace waveform glitches, unknown logic states (`X` or `Z`), handshake deadlocks, and transaction mismatches from signal dump descriptions, value change dump (VCD) excerpts, and simulator logs.
## Step-by-Step Debugging Workflow
1. **Symptom Characterization:**
- Timestamp of failure, exact signal name, expected vs observed logic state.
2. **Backwards Causal Tracing:**
- Identify the driving gate or procedural block driving the failing signal.
- Trace back one clock cycle ($T - 1$) to evaluate input states and control enables.
3. **X-Propagation Root Cause:**
- Differentiate uninitialized registers on reset vs bus contention (multiple active drivers) vs timing violations in gate-level simulation.
4. **Protocol Handshake Lockup:**
- Check if master waits for slave `READY`, while slave waits for master `VALID` (circular combinational dependency).
## Limitations
- Claude cannot view graphical waveform viewers directly. The user must provide signal state transitions, ASCII waveforms, or simulator trace logs.
## Verification Checklist
- [ ] Driving procedural block identified.
- [ ] Reset assertion and deassertion timing verified.
Production-grade Claude Code skill for automated execution. Run directly in terminal via /regression-log-analyzer or reference in prompt instructions.
---
name: regression-log-analyzer
description: Parses large nightly regression test suites, clustering simulation failures, detecting seed-dependent bugs, and generating executive verification dashboards.
---
# Regression Log Analyzer Skill
## Purpose
Automates the triage of hundreds of simulation log files across overnight regression runs, extracting `UVM_FATAL`, `UVM_ERROR`, assertion failures, and timeout hangs, clustering them by common failure signatures.
## Analysis Methodology
1. **Failure Extraction:** Regex parsing of simulator exit codes and UVM error messages.
2. **Clustering & Signature Matching:**
- Group failures by common error strings (e.g. `Scoreboard mismatch on channel 2`, `SVA: a_axi_handshake failed`).
- Distinguish testbench bugs from true RTL defects.
3. **Seed Correlation:**
- Identify tests that fail on specific random seeds vs fail deterministically across all seeds.
4. **Summary Dashboard Generation:**
- Tabulate Total Tests, Passed, Failed, Pass Rate %, Top 5 Failure Signatures.
## Limitations
- Requires representative log snippets or consolidated regression output text files.
## Verification Checklist
- [ ] All failed tests matched to a distinct failure cluster.
- [ ] Seeds recorded for immediate local reproduction.
Production-grade Claude Code skill for automated execution. Run directly in terminal via /simulation-failure-classifier or reference in prompt instructions.
---
name: simulation-failure-classifier
description: Categorizes simulation errors into distinct buckets (RTL bug, testbench error, constraint conflict, timeout hang, reset race) for systematic team assignment.
---
# Simulation Failure Classifier Skill
## Purpose
Provides fast triage of failing tests, assigning responsibility to RTL designers, verification engineers, or environment maintainers based on error pathology.
## Failure Taxonomy
- **Category 1: RTL Functional Bug:** Scoreboard detects data payload mismatch, or SVA fires on valid input stimulus.
- **Category 2: Testbench Modeling Bug:** Null pointer dereference, incorrect reference model computation, race condition in driver.
- **Category 3: Solver Contradiction:** Randomization failure due to conflicting constraint additions.
- **Category 4: Environment Timeout:** Simulation killed by watchdog timer due to dropped packet or missing interrupt.
- **Category 5: Reset / Initialization Race:** Failure occurs during the first 100 ns of simulation.
## Expected Output
- Ranked categorization with recommended team assignee and debug priority.
## Limitations
- Rule-based heuristics require log file context and relevant source code lines.
## Verification Checklist
- [ ] Classification verified with test transcript analysis.
Production-grade Claude Code skill for automated execution. Run directly in terminal via /formal-property-reviewer or reference in prompt instructions.
---
name: formal-property-reviewer
description: Evaluates formal verification properties, assumptions, and cover statements for bounded model checking (BMC) and formal property verification (FPV).
---
# Formal Property Reviewer Skill
## Purpose
Audits SystemVerilog Assertions intended for Formal Verification tools (Synopsys VC Formal, Cadence JasperGold, Siemens FormalPro), ensuring properties are formulated to avoid proof timeouts, state-space explosion, and over-constrained vacuity.
## Key Formal Verification Audits
1. **`assert` vs `assume` Balance:**
- Ensure environment inputs are constrained with `assume property`.
- Verify assumptions do not over-constrain the formal tool, causing vacuous proofs (where the proof passes simply because inputs are impossible).
2. **State-Space Complexity:**
- Flag unbounded temporal delays (`##[1:$]` or huge delays `##1000`). Bounded delays (`##[1:8]`) must be used for formal tractability.
3. **Reset State Formulation:**
- Confirm reset properties allow the formal engine to initialize the design into legal reachable states.
## Limitations
- Formal engines perform exhaustive mathematical exploration. Claude provides syntactic and architectural review of properties, not formal mathematical proof.
## Verification Checklist
- [ ] Vacuity checks performed (`cover property` on antecedent).
- [ ] Large arithmetic operators abstracted or bounded.
Production-grade Claude Code skill for automated execution. Run directly in terminal via /low-power-verification-reviewer or reference in prompt instructions.
---
name: low-power-verification-reviewer
description: Reviews UPF 3.0 / IEEE 1801 power intent verification, power switch behavior, isolation clamping, level shifter rules, and state retention simulation.
---
# Low-Power Verification Reviewer Skill
## Purpose
Audits low-power testbench setups and UPF specifications, ensuring power-aware simulation models correctly simulate power domain power-down, isolation clamping, level shifting, and state retention during sleep modes.
## Audit Focus Areas
1. **Isolation Verification:**
- Verify isolation cells clamp outputs to defined static values (0, 1, or latch) when source domain is powered OFF.
- Detect floating inputs in always-on domains that could cause simulation `X` or physical crowbar current.
2. **Level Shifter Verification:**
- Ensure signals crossing between different voltage domains (e.g. 0.75V to 1.05V) have appropriate level shifter strategy specified in UPF.
3. **Retention Sequence:**
- Verify save signal asserts before power-down, and restore signal asserts after power is restored.
## Limitations
- Power-aware simulation requires simulator-specific UPF compilation (`-upf` flag).
## Verification Checklist
- [ ] Power state table (PST) covered in functional test suite.
- [ ] Isolation rules active and verified during domain shutdown.
Production-grade Claude Code skill for automated execution. Run directly in terminal via /verification-coverage-closure or reference in prompt instructions.
---
name: verification-coverage-closure
description: Orchestrates verification closure strategy, analyzing code coverage (line, branch, condition, FSM, toggle) and functional coverage to achieve signoff criteria.
---
# Verification Coverage Closure Skill
## Purpose
Guides verification leads through the final 10% of verification closure — closing stubborn coverage holes, evaluating un-hit FSM states, analyzing un-exercised condition branches, and writing targeted directed tests.
## Closure Workflow
1. **Coverage Analysis:**
- Correlate Code Coverage (Line, Branch, Condition, FSM State, Toggle) with Functional Coverage.
- Identify unreachable code: Dead state transitions, un-drivable error traps, parameter-disabled configurations.
2. **Waiver Justification:**
- Document formal engineering justification for unwaivered code coverage holes (e.g., tie-off signals, redundant safety logic).
3. **Targeted Stimulus Strategy:**
- Prescribe specific randomized constraint modifications or directed test sequences to hit stubborn corner bins without disturbing closed bins.
## Limitations
- Coverage closure decisions must be approved by the Lead Verification Architect and SoC Signoff Board.
## Verification Checklist
- [ ] 100% functional coverage goal achieved or formally waived.
- [ ] All code coverage exclusions peer-reviewed and documented in vPlan.
Five End-to-End Practical Verification Projects
Build a Self-Checking Testbench for an APB Slave
Objective: Develop an object-oriented, self-checking SystemVerilog testbench to verify a synthesizable 32-bit APB4 memory slave without requiring full UVM infrastructure. This project demonstrates clean OOP separation: interface with clocking block, transaction class with constraints, non-blocking driver, monitor, and associative-array scoreboard.
// Project 1: Complete Self-Checking APB Testbench
`timescale 1ns/1ps
// 1. APB Interface with Clocking Block
interface apb_if(input logic pclk);
logic preset_n;
logic [31:0] paddr;
logic psel;
logic penable;
logic pwrite;
logic [31:0] pwdata;
logic [3:0] pstrb;
logic [31:0] prdata;
logic pready;
logic pslverr;
// Master Clocking Block to eliminate race conditions
clocking mck @(posedge pclk);
default input #1step output #1ns;
output paddr, psel, penable, pwrite, pwdata, pstrb;
input prdata, pready, pslverr;
endclocking
endinterface
// 2. Transaction Class with Constraints
class apb_trans;
rand bit [31:0] addr;
rand bit [31:0] data;
rand bit write;
rand bit [3:0] strb;
bit [31:0] rdata;
bit slverr;
constraint c_addr_aligned { addr[1:0] == 2'b00; }
constraint c_addr_range { addr < 32'h0000_1000; }
constraint c_strb_valid { strb inside {4'b1111, 4'b0011, 4'b1100, 4'b0001}; }
endclass
// 3. Scoreboard Class using Associative Memory Model
class apb_scoreboard;
bit [31:0] mem[int];
int match_count = 0;
int error_count = 0;
function void check_write(bit [31:0] addr, bit [31:0] data);
mem[addr] = data;
$display("[SB_WRITE] Stored Addr: 0x%08h | Data: 0x%08h", addr, data);
endfunction
function void check_read(bit [31:0] addr, bit [31:0] actual_data);
if (!mem.exists(addr)) begin
$display("[SB_WARN] Read from unwritten addr 0x%08h!", addr);
end else if (mem[addr] === actual_data) begin
match_count++;
$display("[SB_PASS] Match @ 0x%08h: Exp=0x%08h, Act=0x%08h", addr, mem[addr], actual_data);
end else begin
error_count++;
$error("[SB_FAIL] Mismatch @ 0x%08h: Exp=0x%08h, Act=0x%08h", addr, mem[addr], actual_data);
end
endfunction
function void report();
$display("========================================");
$display("SCOREBOARD REPORT: Matches=%0d, Errors=%0d", match_count, error_count);
$display("========================================");
endfunction
endclass
// 4. Testbench Environment
program automatic apb_test(apb_if vif);
apb_scoreboard sb = new();
task automatic drive_write(apb_trans tr);
@(vif.mck);
vif.mck.psel <= 1'b1;
vif.mck.pwrite <= 1'b1;
vif.mck.paddr <= tr.addr;
vif.mck.pwdata <= tr.data;
vif.mck.pstrb <= tr.strb;
vif.mck.penable <= 1'b0;
@(vif.mck);
vif.mck.penable <= 1'b1;
while (!vif.mck.pready) @(vif.mck);
sb.check_write(tr.addr, tr.data);
@(vif.mck);
vif.mck.psel <= 1'b0;
vif.mck.penable <= 1'b0;
endtask
task automatic drive_read(apb_trans tr);
@(vif.mck);
vif.mck.psel <= 1'b1;
vif.mck.pwrite <= 1'b0;
vif.mck.paddr <= tr.addr;
vif.mck.penable <= 1'b0;
@(vif.mck);
vif.mck.penable <= 1'b1;
while (!vif.mck.pready) @(vif.mck);
tr.rdata = vif.mck.prdata;
sb.check_read(tr.addr, tr.rdata);
@(vif.mck);
vif.mck.psel <= 1'b0;
vif.mck.penable <= 1'b0;
endtask
initial begin
apb_trans tr = new();
vif.preset_n <= 1'b0;
repeat (5) @(vif.mck);
vif.preset_n <= 1'b1;
// Run 50 randomized write-read verification cycles
for (int i = 0; i < 50; i++) begin
assert(tr.randomize());
drive_write(tr);
drive_read(tr);
end
sb.report();
$finish;
end
endprogram
Build a Reusable UVM Verification IP (VIP) Agent
Objective: Implement a production-grade, encapsulated UVM Agent containing a sequencer, driver, monitor, configuration object, and TLM analysis port. This project enforces active/passive configurability and clean virtual interface binding via uvm_config_db.
`include "uvm_macros.svh"
import uvm_pkg::*;
// Agent Configuration Object
class protocol_agent_config extends uvm_object;
`uvm_object_utils(protocol_agent_config)
uvm_active_passive_enum is_active = UVM_ACTIVE;
virtual protocol_if vif;
function new(string name = "protocol_agent_config");
super.new(name);
endfunction
endclass
// Driver Component
class protocol_driver extends uvm_driver #(protocol_seq_item);
`uvm_component_utils(protocol_driver)
virtual protocol_if vif;
function new(string name, uvm_component parent);
super.new(name, parent);
endfunction
virtual task run_phase(uvm_phase phase);
protocol_seq_item req;
forever begin
seq_item_port.get_next_item(req);
drive_transfer(req);
seq_item_port.item_done();
end
endtask
virtual task drive_transfer(protocol_seq_item req);
@(vif.drv_cb);
vif.drv_cb.valid <= 1'b1;
vif.drv_cb.data <= req.data;
do begin
@(vif.drv_cb);
end while (!vif.drv_cb.ready);
vif.drv_cb.valid <= 1'b0;
endtask
endclass
// Monitor Component with TLM Analysis Port
class protocol_monitor extends uvm_monitor;
`uvm_component_utils(protocol_monitor)
virtual protocol_if vif;
uvm_analysis_port #(protocol_seq_item) item_collected_port;
function new(string name, uvm_component parent);
super.new(name, parent);
item_collected_port = new("item_collected_port", this);
endfunction
virtual task run_phase(uvm_phase phase);
protocol_seq_item tr;
forever begin
@(vif.mon_cb);
if (vif.mon_cb.valid && vif.mon_cb.ready) begin
tr = protocol_seq_item::type_id::create("tr");
tr.data = vif.mon_cb.data;
item_collected_port.write(tr);
end
end
endtask
endclass
// Sequencer Typedef
typedef uvm_sequencer #(protocol_seq_item) protocol_sequencer;
// Reusable Agent Encapsulation
class protocol_agent extends uvm_agent;
`uvm_component_utils(protocol_agent)
protocol_driver driver;
protocol_monitor monitor;
protocol_sequencer sequencer;
protocol_agent_config cfg;
uvm_analysis_port #(protocol_seq_item) item_collected_port;
function new(string name, uvm_component parent);
super.new(name, parent);
endfunction
virtual function void build_phase(uvm_phase phase);
super.build_phase(phase);
if (!uvm_config_db#(protocol_agent_config)::get(this, "", "cfg", cfg))
`uvm_fatal("NOCFG", "Agent config not found in uvm_config_db!")
monitor = protocol_monitor::type_id::create("monitor", this);
monitor.vif = cfg.vif;
if (cfg.is_active == UVM_ACTIVE) begin
driver = protocol_driver::type_id::create("driver", this);
sequencer = protocol_sequencer::type_id::create("sequencer", this);
driver.vif = cfg.vif;
end
endfunction
virtual function void connect_phase(uvm_phase phase);
super.connect_phase(phase);
item_collected_port = monitor.item_collected_port;
if (cfg.is_active == UVM_ACTIVE) begin
driver.seq_item_port.connect(sequencer.seq_item_export);
end
endfunction
endclass
Create a FIFO Scoreboard & Generate Bursty Concurrent Traffic
Objective: Construct an in-order queue-based UVM Scoreboard with twin uvm_analysis_imp ports. Generate simultaneous back-to-back push and pop transactions to rigorously verify asynchronous FIFO corner cases (almost full, almost empty, simultaneous push/pop at boundary).
`uvm_analysis_imp_decl(_push)
`uvm_analysis_imp_decl(_pop)
class fifo_scoreboard #(type T = fifo_item) extends uvm_scoreboard;
`uvm_component_param_utils(fifo_scoreboard #(T))
uvm_analysis_imp_push #(T, fifo_scoreboard #(T)) push_export;
uvm_analysis_imp_pop #(T, fifo_scoreboard #(T)) pop_export;
T expected_queue[$];
int match_count = 0;
int mismatch_count = 0;
function new(string name, uvm_component parent);
super.new(name, parent);
push_export = new("push_export", this);
pop_export = new("pop_export", this);
endfunction
virtual function void write_push(T item);
T cloned_item;
$cast(cloned_item, item.clone());
expected_queue.push_back(cloned_item);
`uvm_info("SB_PUSH", $sformatf("Enqueued item. Queue depth: %0d", expected_queue.size()), UVM_HIGH)
endfunction
virtual function void write_pop(T act_item);
if (expected_queue.size() == 0) begin
mismatch_count++;
`uvm_error("SB_UNDERFLOW", "Pop received from DUT when expected queue was empty!")
return;
end
T exp_item = expected_queue.pop_front();
if (exp_item.compare(act_item)) begin
match_count++;
`uvm_info("SB_MATCH", "FIFO data packet matched golden model successfully", UVM_HIGH)
end else begin
mismatch_count++;
`uvm_error("SB_MISMATCH", $sformatf("Data mismatch!
Expected: %s
Actual: %s",
exp_item.sprint(), act_item.sprint()))
end
endfunction
virtual function void check_phase(uvm_phase phase);
super.check_phase(phase);
if (expected_queue.size() != 0) begin
`uvm_error("SB_LEAK", $sformatf("Simulation ended with %0d unconsumed items left in FIFO queue!",
expected_queue.size()))
end else begin
`uvm_info("SB_CLEAN", $sformatf("Scoreboard clean sign-off: %0d matched transfers verified.", match_count), UVM_LOW)
end
endfunction
endclass
Write SVA Handshake Properties for Ready/Valid Interfaces
Objective: Formulate mathematical SystemVerilog Assertions (SVA) and functional cover properties for an AMBA/Streaming ready-valid channel. Ensure properties are compliant with both dynamic simulation (Synopsys VCS / Cadence Xcelium) and Formal Property Verification (Cadence JasperGold / Synopsys VC Formal).
module ready_valid_sva #(
parameter WIDTH = 64,
parameter MAX_WAIT = 16
)(
input logic clk,
input logic rst_n,
input logic valid,
input logic ready,
input logic [WIDTH-1:0] data
);
// Property 1: Stability Rule - Data and Valid cannot change while stalled
property p_stability;
@(posedge clk) disable iff (!rst_n)
(valid && !ready) |=> (valid && $stable(data));
endproperty
assert_stability: assert property(p_stability)
else $error("[SVA_STABILITY_FAIL] VALID dropped or DATA changed while waiting for READY!");
// Property 2: Liveness Rule - Receiver must assert READY within MAX_WAIT cycles
property p_liveness;
@(posedge clk) disable iff (!rst_n)
valid |=> ##[0:MAX_WAIT] ready;
endproperty
assert_liveness: assert property(p_liveness)
else $error("[SVA_LIVENESS_FAIL] READY was not asserted within %0d cycles of VALID!", MAX_WAIT);
// Property 3: No Unknowns (X/Z) on payload during transfer
property p_no_x_on_valid;
@(posedge clk) disable iff (!rst_n)
valid |-> !$isunknown(data);
endproperty
assert_no_x: assert property(p_no_x_on_valid)
else $error("[SVA_X_DETECTED] Payload contains unknown state (X/Z) while VALID is asserted!");
// Property 4: Reset Deassertion - VALID must be 0 immediately upon reset
property p_reset_state;
@(posedge clk)
!rst_n |-> (valid == 1'b0);
endproperty
assert_reset: assert property(p_reset_state)
else $error("[SVA_RST_FAIL] VALID asserted during active reset!");
// Cover Properties: Confirm testbench exercises boundary scenarios
cover_zero_latency_transfer: cover property(
@(posedge clk) disable iff (!rst_n)
valid && ready
);
cover_backpressure_burst: cover property(
@(posedge clk) disable iff (!rst_n)
valid && !ready [*4] ##1 (valid && ready)
);
endmodule
Analyze Simulation Regression Logs & Classify Failures with Python
Objective: Build a production regression triage script in Python that parses thousands of simulation logs, clusters failures by regex error signature, extracts failing random seeds, and produces executive summaries in Markdown and JSON.
#!/usr/bin/env python3
"""
dv_log_triage.py - ASIC Regression Log Analyzer & Failure Clustering Engine
"""
import os
import re
import sys
import json
from collections import defaultdict
REGEX_PATTERNS = {
"UVM_ERROR": re.compile(r"UVM_ERROR\s+(?:(?:\S+)\((\d+)\))?\s*:\s*(?:reporter|[\w\.]+)\s*\[(.*?)\]\s*(.*)"),
"UVM_FATAL": re.compile(r"UVM_FATAL\s+(?:(?:\S+)\((\d+)\))?\s*:\s*(?:reporter|[\w\.]+)\s*\[(.*?)\]\s*(.*)"),
"SVA_ASSERT": re.compile(r"\*E,ASSERT\s+\((\w+)\):\s+(.*)"),
"SIM_CRASH": re.compile(r"(Segmentation fault|Internal compiler error|core dumped)"),
}
SEED_RE = re.compile(r"(?:-seed|\+ntb_random_seed=|\+seed=)\s*(\d+)")
def triage_log(filepath):
with open(filepath, 'r', errors='ignore') as f:
content = f.read()
seed = "0"
sm = SEED_RE.search(content)
if sm:
seed = sm.group(1)
if "UVM_TEST_TOP: PASSED" in content or "TEST PASSED" in content:
return "PASS", seed, None
for err_type, pat in REGEX_PATTERNS.items():
m = pat.search(content)
if m:
raw_sig = m.group(0).strip()
# Normalize timestamps, pointers and random line numbers
norm_sig = re.sub(r"@\s*\d+\s*(?:ps|ns)", "@
Practical Claude Prompts Library: 40 Production Verification Prompts
Interactive Filterable Prompt Library for DV Engineers
Browse 40 highly targeted, production-ready prompts spanning SystemVerilog OOP, UVM testbench architectures, constrained random generation, SVA assertions, functional coverage, scoreboards, AMBA protocols, simulation debugging, regression triage, and formal property proofs.
Generate a synthesizable-compliant SystemVerilog transaction item with packed fields, deep copy methods, and realistic burst constraints.
Create a race-condition-free SystemVerilog interface with input/output clocking skews for an APB4 peripheral bus.
Generate an OOP driver and generator connected through SystemVerilog parameterized mailboxes with semaphores.
Develop a polymorphic scoreboard class capable of storing and matching multi-threaded transaction streams using associative arrays.
Generate full SystemVerilog code for a complete UVM agent: sequence item, driver, monitor, sequencer, config, and agent class.
Generate a complete UVM RAL register block, registers with field access policies (RW, RO, W1C), and adapter class.
Construct a thread-safe UVM scoreboard using analysis FIFOs to decouple producer and consumer rate differences.
Develop a coordinated multi-agent virtual sequence orchestrating traffic across CPU, DMA, and memory controllers.
Generate realistic SystemVerilog constraints with boundary stress weighting, illegal state prevention, and soft defaults.
Analyze a complex constraint solver conflict report and provide corrected bidirectional constraint formulations.
Design a permutation sequence ensuring non-repeating random addresses across multiple loop iterations without solver penalty.
Structure complex multi-variable constraints with solve-before directives to achieve uniform probability distribution.
Create a reusable SystemVerilog assertion checker for AXI handshake compliance, stability, and backpressure liveness.
Write temporal SVA properties verifying internal FIFO pointer operations, empty/full flags, and memory overrun protection.
Write SVA properties for pulse synchronizers and request-acknowledge handshakes across asynchronous clock domains.
Translate an ambiguous microarchitectural specification into rigorous, non-overlapping concurrent SVA properties.
Construct an exhaustive SystemVerilog covergroup capturing burst lengths, response statuses, 4KB page bounds, and crosses.
Diagnose persistent zero-hit functional coverage bins from an EDA coverage report and formulate targeted stimulus.
Create an automated covergroup sampling every writable bit and illegal configuration combination across SoC CSRs.
Formulate a formal coverage exclusion waiver file and justify unreachable RTL code constructs for management review.
Construct an out-of-order transaction scoreboard for PCIe/AXI using associative arrays and unique transaction IDs.
Connect a bit-accurate C/C++ algorithmic compression model into a UVM scoreboard using the SystemVerilog Direct Programming Interface.
Triage and fix simulation errors where transactions remain unconsumed in scoreboard queues at run_phase termination.
Construct a verification component measuring packet latency distributions, buffer occupancy, and bandwidth utilization.
Construct verification sequences and checks for unaligned address transfers, narrow transfers, and byte strobe generation.
Develop a SystemVerilog verification model for PCIe Transaction Layer Packets (TLP) and credit-based flow control.
Create a robust verification environment for credit-return flow control with round-trip pipeline delays.
Formulate a verification strategy for APB4 secure transactions, privilege levels, and slave error signaling.
Analyze simulation log and UVM component code to identify missing drop_objection calls and un-terminated fork processes.
Investigate simulation waveforms showing unknown 'X' states propagating through pipeline registers following reset.
Resolve subtle timing race condition where monitor samples old data due to improper clocking block event regions.
Inspect text-based signal values around a transient glitch that triggered an illegal protocol violation.
Create a high-speed Python regression execution engine that parallelizes simulation runs across CPU cores with randomized seeds.
Develop an automated failure triaging script that groups thousands of failing simulation logs into actionable root-cause buckets.
Construct an automated GitHub Actions YAML workflow that compiles SystemVerilog, runs linter checks, and executes unit tests on PR.
Write a shell/Makefile automation script to reproduce an overnight regression failure with interactive Verdi waveform dumping.
Write complete mathematical properties (assumes, asserts, covers) to formally prove starvation-freedom in an arbiter.
Diagnose reasons for JasperGold or VC Formal solver timeouts and apply formal abstractions and cut-points.
Formulate verification checks for low-power power-aware simulations, isolation cell clamping, and retention flops.
Design constraints and cut-point strategies for Synopsys Formality or Cadence Conformal Logic Equivalence Checking.
Claude vs. Commercial Verification EDA Engines Matrix
Complementary Roles: Large Language Models and Deterministic EDA Engines
A rigorous engineering team maintains absolute clarity regarding the boundary between generative AI capabilities and deterministic electronic design automation (EDA) engines. Claude operates as a cognitive amplifier—authoring code, explaining complex protocol interactions, extracting log signatures, and formulating formal properties. Commercial EDA software (Synopsys VCS, Cadence Xcelium, Siemens Questa, Cadence JasperGold) remains the authoritative physical and mathematical execution engine required for silicon sign-off.
| Capability Dimension | Claude Code & Claude 3.5 Sonnet | Dynamic Simulators (VCS / Xcelium / Questa) | Formal Engines (VC Formal / JasperGold) |
|---|---|---|---|
| Compilation & Elaboration | Audits code syntax and OOP hierarchy; identifies lint-level errors. | Compiles SystemVerilog into high-speed optimized binary simulator kernels. | Synthesizes RTL into formal Boolean state-transition formulas. |
| Event Scheduling & Simulation | Cannot execute time-based simulation or event queues. | Executes Stratified Event Scheduling (Active, Observed, Reactive, NBA regions). | Non-simulation; evaluates reachability mathematically. |
| Constraint Solving (CRV) | Analyzes constraint contradictions and suggests solve-before ordering. |
Built-in SMT/SAT Solver generates pseudo-random bits for millions of cycles. | Analyzes constraint consistency mathematically. |
| SVA Assertion Evaluation | Writes correct concurrent SVA properties with complex temporal sequences. | Evaluates assertions cycle-by-cycle against simulation history. | Proves assertions mathematically across all infinite possible cycles. |
| Waveform & Signal Tracing | Analyzes tabular printouts, text signal dumps, and VCD snippets. | Dumps full-hierarchy FSDB/VCD databases with multi-gigabyte transaction histories. | Generates exact cycle-by-cycle counterexample traces on assertion failure. |
| Failure Triage & Clustering | World-Class: Instantly clusters thousands of failures by regex signature and diagnoses root causes. | Outputs raw text logs and return codes. | Reports proof status (Proven, Falsified, Inconclusive, Vacuous). |
| Tape-Out Sign-Off Authority | Zero legal or contractual sign-off authority. | Generates signed, certifiable code & functional coverage databases. | Generates formal mathematical proof sign-off certificates. |
Security, Intellectual Property & Production Safety in ASIC Verification
Protecting Proprietary RTL, Verification IP & Test Vectors
Semiconductor RTL source code, proprietary bus architectures, memory controllers, and security engines constitute mission-critical corporate trade secrets. Inadvertently pasting un-anonymized SystemVerilog code, proprietary register offsets, or internal codenames into public web portals violates corporate non-disclosure agreements (NDAs) and risks intellectual property leaks.
| Deployment Model | Data Retention Policy | IP Risk Profile | Recommended Corporate Use Case |
|---|---|---|---|
| Public Web Chat | Standard cloud logging, potential training telemetry. | High Risk Prohibited for proprietary RTL. | Generic language syntax questions, public open-source verification. |
| Enterprise Claude Code (ZDR) | Zero Data Retention (ZDR): No customer code stored or used for model training. | Enterprise Compliant High safety boundary. | Daily ASIC verification engineering, local command-line automation. |
| Private Cloud (AWS Bedrock / GCP Vertex) | VPC-peered, SOC2/ISO 27001 compliant, isolated virtual boundary. | Silicon Sign-Off Safe Maximum control. | Top-secret cryptographic cores, defense/aerospace semiconductor DV. |
Production RTL & Testbench Sanitization Script
Before querying Claude with proprietary verification testbenches, engineering teams should execute an automated sanitization pre-processor. This script strips confidential project identifiers, hashes module names, and cleans internal comments:
#!/usr/bin/env python3
"""
sanitize_dv_code.py - Anonymizes proprietary ASIC IP and SystemVerilog code
"""
import re
import sys
# Replace proprietary codenames with generic engineering identifiers
SUBSTITUTIONS = [
(r"project_titan", "soc_top"),
(r"secure_vault_crypto", "security_engine"),
(r"nvidia_\w+", "custom_ip"),
(r"qualcomm_\w+", "custom_ip"),
(r"0x[0-9a-fA-F]{8,}", "0x1000_0000"), # Anonymize proprietary base addresses
]
def sanitize(code_text):
# 1. Strip multi-line and single-line internal comments
code_text = re.sub(r"/\*[\s\S]*?\*/", "", code_text)
code_text = re.sub(r"//.*", "", code_text)
# 2. Perform identifier replacements
for pattern, replacement in SUBSTITUTIONS:
code_text = re.sub(pattern, replacement, code_text, flags=re.IGNORECASE)
# 3. Clean trailing whitespace
lines = [line.rstrip() for line in code_text.splitlines() if line.strip()]
return "
".join(lines)
if __name__ == "__main__":
if len(sys.argv) < 2:
print("Usage: python sanitize_dv_code.py ")
sys.exit(1)
with open(sys.argv[1], 'r') as f:
sanitized = sanitize(f.read())
print(sanitized)
Design Verification Engineering FAQ
Can Claude directly simulate SystemVerilog or run UVM testbenches?
No. Claude is an LLM with no discrete-event simulation kernel, no constraint solver engine (such as those in Synopsys VCS, Cadence Xcelium, or Siemens Questa), and no waveform dump facility. Claude functions as an intelligent copilot that authors clean SystemVerilog/UVM components, generates SVA assertions, audits constraint distribution, and diagnoses simulation failure logs for execution by commercial simulators.
How does Claude help build modular UVM testbenches?
Claude constructs complete, structurally sound UVM 1.2 hierarchies: sequence items, drivers with virtual interface clocking block handshakes, monitors with analysis ports, sequencers, agents, scoreboards, and environment configurations. It enforces strict UVM factory registration and standard phasing rules.
Can Claude generate mathematically sound SystemVerilog Assertions (SVA)?
Yes. Claude translates English specifications and timing diagrams into concurrent assertions with explicit clocking, asynchronous reset disabling, temporal operators ($past, $rose, $fell, $stable), and proper implication operators (|-> vs |=>). It also provides corresponding cover properties to verify non-vacuous triggering.
How does Claude diagnose UVM simulation hangs and objection issues?
Claude analyzes simulation transcript logs and UVM component code to identify objection leaks (raise without matching drop), deadlocks in handshake loops where driver and DUT circular-wait, uninitialized virtual interfaces, and silent uvm_config_db lookup mismatches.
Can Claude analyze functional coverage reports and close coverage holes?
Yes. When provided with coverage summary reports (such as urgReport or coverage.rpt), Claude identifies un-exercised coverpoints, cross-product voids, and illegal state combinations. It recommends targeted constrained-random stimulus modifications or directed test sequences to achieve 100% coverage closure.
Is it safe to share proprietary ASIC testbenches, RTL, and verification plans with Claude?
Proprietary RTL source code, testbench verification IP, and microarchitectural specifications are confidential trade secrets. Engineering teams must never paste raw IP into public AI portals. Teams must operate under enterprise Zero Data Retention (ZDR) agreements, private cloud deployments, or use automated sanitization scripts to anonymize signal names and module identifiers.
What are the 15 Claude Code DV skills included in this masterclass?
The 15 skills are standardized SKILL.md packages covering: sv-code-reviewer, uvm-testbench-generator, uvm-debug-assistant, sva-assertion-generator, constraint-reviewer, functional-coverage-analyzer, scoreboard-reviewer, verification-plan-generator, protocol-verification-reviewer, waveform-debug-assistant, regression-log-analyzer, simulation-failure-classifier, formal-property-reviewer, low-power-verification-reviewer, and verification-coverage-closure.
How does Claude differentiate simulation, formal verification, and equivalence checking?
Simulation exercises a finite subset of temporal test vectors using dynamic event schedulers. Formal Property Verification (FPV) uses mathematical solvers to prove whether an assertion holds across all possible reachable states. Equivalence Checking (LEC) mathematically verifies that two structural netlists (e.g. RTL vs synthesized netlist) implement identical combinational Boolean logic.