Formal Verification · All levels

Debugging Failing Assertions Effectively: Theory Deep Dive

Theory Deep Dive for Debugging Failing Assertions Effectively.

Foundational theory

Debugging Failing Assertions Effectively is a core topic in SystemVerilog Assertions (SVA). Treat each proof result as evidence under a modeled world, not a context-free truth statement.

Core concepts explained

  • Debug starts by classifying failure type: antecedent misuse, vacuity, sampling mismatch, reset masking, or real RTL bug. Instrument properties with action blocks and local variables where useful, for example `assert property (p_req_gnt) else $error("REQ->GNT timeout req_id=%0d t=%0t", req_id, $time);`. Inspect waveform at sampled clock edges, not combinational transitions between edges, and confirm whether the antecedent fired using coverage (`cover property`) before trusting a passing result. For deep failures, split one large property into staged checks (`p_req_seen`, `p_latency_bound`, `p_data_stable`) to localize first divergence quickly and eliminate false blame on downstream logic.

  • Primary metric: non-vacuous closure rate, counterexample turnaround time, and requirement-level residual risk trend

  • Primary artifact: formal closure packet: assumptions audit, proof status matrix, counterexample classification, and requirement traceability

  • Owners: formal verification owner, rtl owner, verification lead

  • Proof quality includes vacuity and reachability, not pass/fail status only.

  • Assumption discipline is part of design correctness, not tool setup.

Why this matters in formal signoff

SVA quality comes from temporal precision, correct sampling semantics, and disciplined vacuity control. Teams that formalize this posture reduce false passes and late-stage surprises.

Mental model

diagram
ASSERTION TIMING (|-> implication)

clk      : _|^|_|^|_|^|_|^|_
req      : __/---\___________
gnt      : ________/---\_____
property : req |-> ##[1:2] gnt

Meaning: whenever req rises, gnt must appear in 1-2 cycles.

Worked intuition

  1. Define requirement slice and property intent class (safety, liveness, or reachability).

  2. Audit assumptions and reset model before trusting any status outcome.

  3. Track movement in non-vacuous closure rate, counterexample turnaround time, and requirement-level residual risk trend with requirement-level ownership.

  4. Collect formal closure packet: assumptions audit, proof status matrix, counterexample classification, and requirement traceability before signoff or waiver decisions.

  5. Apply one bounded model or RTL change per debug hypothesis.

  6. Publish closure with residual risk and rollback conditions.

Common misconceptions

  • Green proof status always means silicon-safe behavior.

  • Faster convergence always means better model quality.

  • Unreachable cover goals are acceptable if safety assertions pass.

  • Bounded depth is equivalent to full proof unless a failure appears.

Formal deep dive

SVA scales when temporal intent, clock sampling, and reset gating are precise enough to be replayed and reviewed.

Concept diagram

diagram
SVA INTENT CHAIN

timing contract -> sequence composition -> property implication -> sampled failure trace

Metric graph

diagram
ASSERTION QUALITY SIGNALS

non-vacuous hit rate    ████████
clock/reset mismatches  ████
false-positive churn    ███

Metrics and artifacts to collect

  • assertion trigger hit-rate

  • implication timing mismatch bucket

  • reset-window noise ratio

  • assertion decomposition quality score

Mini case study

A protocol failure vanished after correcting `|->` vs `|=>` semantics and reset masking boundaries.

Debug branches

  • Confirm antecedent trigger at sampled clock edges.

  • Verify implication operator matches protocol timing contract.

  • Split monolithic properties into stage-local checks.

Senior review question

Ask: which requirement intent is proven, under which assumptions, and what residual risk remains?

Key takeaways

  • Tie each proof claim to assumption boundaries and reachability evidence.

  • Prefer minimal reversible fixes and preserve legal behavior visibility.

Common pitfalls

  • Treating runtime reduction as proof-quality improvement without audits.

  • Declaring closure while critical covers remain unreachable.

  • Using broad waivers instead of first-divergence root-cause ownership.

Theory reinforcement

Theory matters only when it predicts observed traces and closure movement.

Use precise terminology for safety, liveness, boundedness, and vacuity.