Assertion Debugging
A systematic workflow for determining whether an assertion failure is a real DUT violation, a property problem, or a verification-environment issue.
Learning objectives
- Interpret an SVA failure at the clock-cycle level.
- Debug antecedent and consequent timing using waveforms.
- Distinguish a real DUT failure from an incorrect assertion.
- Recognize vacuous success, incorrect sampling, reset effects, and overlapping assertion attempts.
- Correlate assertion failures with UVM monitor transactions and scoreboard results.
- Debug assertions that appear not to trigger when expected.
- Build a repeatable assertion-debugging workflow suitable for regression failures.
- Improve assertion diagnostics without turning properties into transaction-level checkers.
Step 1: Start with the right question
An assertion failure tells you that a property evaluated to false. It does not automatically tell you that the DUT is wrong.
At least four things may be wrong:
- the DUT violated the specification;
- the assertion does not represent the specification correctly;
- the assertion samples the wrong signal or clock;
- the testbench is observing or driving the interface differently from what the assertion assumes.
Therefore, assertion debugging starts with:
Assertion failure
|
v
Did the property evaluate as intended?
|
+---- No ----> Debug the assertion
|
+---- Yes --->
Did the DUT violate the requirement?
|
+---- No ----> Debug environment/specification interpretation
|
+---- Yes ---> Debug the DUT
Step 2: Read the property as a timeline
Consider this property:
assert property (
@(posedge clk)
disable iff (!rst_n)
req |=> ack
)
else $error("REQ_ACK: acknowledgement missing");
Do not read this as simply "request implies acknowledgement." Read it in terms of clock samples.
Clock edge: C0 C1 C2 C3
req: 0 1 0 0
^
|
antecedent
ack: 0 0 1 0
^
|
consequent checked here
Because the property uses |=>, an antecedent sampled at C1 starts a consequent check at C2.
If ack is still low at C2, that assertion attempt fails.
This timeline-based interpretation is the foundation of assertion debugging.
Step 3: Verify the sampling clock first
An assertion can be perfectly written and still produce confusing results if it uses the wrong clock.
assert property (
@(posedge clk)
req |=> ack
);
Ask:
- Is
clkthe protocol's actual sampling clock? - Does the interface define acceptance on this clock?
- Are the signals synchronous to this clock?
- Does the monitor sample the same event?
- Is another clock domain involved?
If the monitor considers a transaction accepted on one clock while the assertion samples another, their observations may appear inconsistent even though both are behaving exactly as implemented.
Step 4: Inspect the antecedent before inspecting the failure
For an implication property:
A |-> B
or:
A |=> B
the first debugging question is: Did A actually occur at the sampling event?
For example:
assert property (
@(posedge clk)
valid && !ready |=> $stable(data)
);
Before investigating why $stable(data) failed, confirm that
valid && !ready was actually true on the relevant clock edge.
This sounds obvious, but it prevents a large class of debugging mistakes.
Step 5: Understand vacuous success
Assertions can also be misleading when they do not fail.
assert property (
@(posedge clk)
req |=> ack
);
If req never occurs, there is no assertion attempt requiring ack.
The property can therefore pass without demonstrating that the request/acknowledgement scenario was
exercised.
This is called vacuous success.
Functional coverage can complement the assertion:
Assertion:
Did every observed request receive the required acknowledgement?
Coverage:
Did the test actually generate requests?
This is one reason Lessons 31–36 and Lessons 37–40 belong together. Coverage tells you whether important scenarios occurred; assertions tell you whether temporal rules held when they were exercised.
Step 6: Check reset behavior
Reset is one of the most common reasons for apparently unexpected assertion behavior.
assert property (
@(posedge clk)
disable iff (!rst_n)
req |=> ack
);
During active reset, the property is disabled.
When debugging, inspect:
- the reset signal at the relevant clock edges;
- when reset is asserted and deasserted;
- whether a property attempt began immediately before reset;
- whether the protocol specification permits activity during reset;
- whether the UVM monitor also suppresses or flushes transactions during reset.
The assertion and the UVM environment should have compatible reset assumptions.
Step 7: Check the implication operator
A surprisingly common source of failures is using the wrong implication operator.
| Operator | Meaning |
|---|---|
|-> |
Overlapped implication; the consequent starts in the same sampling cycle. |
|=> |
Non-overlapped implication; the consequent starts in the next sampling cycle. |
Compare:
// Same-cycle acknowledgement
req |-> ack
// Next-cycle acknowledgement
req |=> ack
If the protocol specifies that acknowledgement may occur on the following cycle, using
|-> can create a false failure.
Conversely, using |=> when same-cycle acknowledgement is required can allow an invalid
design to pass.
Step 8: Debug delayed and multi-cycle properties
Consider:
assert property (
@(posedge clk)
req |-> ##2 ack
);
The assertion expects ack two sampling cycles after the request.
Cycle: C0 C1 C2 C3
req: 1 0 0 0
^
|
start
ack: 0 0 1 0
^
|
expected here
When debugging a delayed property, write the expected timeline explicitly. Do not rely on an intuitive interpretation of the English requirement.
Step 9: Debug $past and $stable
Sampled-value functions are powerful but easy to misinterpret.
Using $past
assert property (
@(posedge clk)
ack |-> data == $past(expected_data)
);
Ask:
- What signal is being sampled?
- At which clock edge is
$pastreferring to? - Has the required history actually been established?
- Does reset affect the historical context?
Using $stable
assert property (
@(posedge clk)
valid && !ready |=> $stable(data)
);
Check the waveform at the sampled clock edges rather than looking at arbitrary signal transitions between those edges.
SVA evaluates sampled values according to its clocking semantics. A waveform viewer may display signal changes between sampling events that are irrelevant to this particular property.
Step 10: Look for overlapping assertion attempts
A single assertion statement can have multiple active attempts.
assert property (
@(posedge clk)
req |=> ack
);
If req occurs on several consecutive cycles, several checks can be active simultaneously.
Cycle: C0 C1 C2 C3
req: 1 1 1 0
| | |
v v v
A1 A2 A3
\ \
\ \ +--> ack at C4
\ +--------> ack at C3
+-------------> ack at C2
This matters when debugging properties involving delays, repetitions, or sequences. A failure at one clock edge may belong to an assertion attempt that began several cycles earlier.
Always identify:
- the failing attempt;
- the clock edge where it started;
- the expected consequent timing;
- the actual sampled values.
Step 11: Separate a bad property from a bad DUT
Suppose this assertion fails:
assert property (
@(posedge clk)
valid && !ready |=> $stable(data)
);
The waveform shows that data changed.
There are still several possibilities:
| Observation | Possible diagnosis |
|---|---|
| Data really changes while stalled | DUT protocol violation |
| Interface specification permits data changes | Assertion is too strict |
| Assertion uses the wrong clock | Sampling problem |
| Signals are from the wrong interface instance | Bind/integration problem |
| Reset or enable assumptions are wrong | Checker configuration problem |
This classification prevents the common mistake of immediately opening the RTL and searching for a bug.
Step 12: Compare assertion timing with the UVM monitor
The monitor and assertion may observe the same interface at different abstraction levels.
Clock edge
|
+----> SVA samples signals
|
+----> UVM monitor samples/reconstructs transaction
|
+----> Scoreboard receives transaction
When debugging a failure, compare their boundaries.
For a ready/valid interface, a transaction is commonly accepted when:
valid && ready
on the active clock edge.
If the monitor publishes a transaction before that acceptance point while the assertion reasons about acceptance at the clock edge, apparent discrepancies can occur.
This connects directly to Lesson 34's coverage-sampling architecture and Lesson 39's assertion/UVM integration.
Step 13: Use transaction context without moving transaction logic into SVA
Assertion debugging often benefits from transaction context such as an ID or address. That does not mean the assertion should become a scoreboard.
A good diagnostic workflow is:
SVA failure
|
+--> property + time + sampled signals
|
v
Waveform
|
v
UVM monitor transaction
|
+--> ID
+--> address
+--> operation
+--> stream/channel
|
v
Scoreboard / predictor state
Keep the SVA focused on the temporal rule. Use the UVM transaction stream to answer higher-level questions about which transaction was active.
Step 14: Improve assertion diagnostics
A generic message such as:
$error("Assertion failed");
is rarely sufficient in a large regression.
Prefer a stable property identifier and useful sampled context:
assert property (
@(posedge clk)
disable iff (!rst_n)
valid && !ready |=> $stable(data)
)
else $error(
"RV_DATA_STABLE: time=%0t valid=%0b ready=%0b data=%0h",
$time,
valid,
ready,
data
);
A stable identifier such as RV_DATA_STABLE helps regression triage and log searches.
Do not put enormous amounts of information into every failure. Record enough information to locate the relevant waveform and transaction.
Step 15: Debug an assertion that never fails
"The assertion never fails" can mean either that the DUT is correct or that the property is not actually checking what you think it is checking.
Use this checklist:
- Does the checker exist in the elaborated design?
- Was the checker bound to the intended instance?
- Are its ports connected to the intended signals?
- Is the assertion enabled?
- Is reset permanently disabling it?
- Does the antecedent ever occur?
- Is the sampling clock active?
- Is the property too weak?
- Could the property be passing vacuously?
- Has an intentionally illegal test been created to prove that the property can fail?
Step 16: Build a regression debugging workflow
In a large regression, do not debug an assertion failure from the final log line backward without structure.
1. Identify assertion
|
v
2. Locate failure time / clock edge
|
v
3. Determine antecedent start
|
v
4. Check reset and enable
|
v
5. Inspect expected temporal relationship
|
v
6. Inspect waveform
|
v
7. Find corresponding UVM transaction
|
v
8. Check predictor / scoreboard state
|
v
9. Determine root-cause layer
|
v
10. Reproduce with the same seed/configuration
The objective is not merely to make the assertion stop failing. The objective is to establish why it failed.
Step 17: Classify the root cause
Once the evidence has been collected, classify the failure.
| Root-cause category | Typical evidence |
|---|---|
| DUT defect | Property correctly represents the requirement and waveform violates it. |
| Assertion defect | Property does not match the specification or intended timing. |
| Sampling defect | Wrong clock or sampling boundary produces the failure. |
| Bind/integration defect | Checker observes the wrong DUT instance or signal. |
| Reset/enable defect | Checker is active or disabled at the wrong time. |
| Monitor/testbench defect | UVM transaction interpretation conflicts with the actual interface behavior. |
| Specification ambiguity | Different parts of the environment interpret the requirement differently. |
This classification is particularly valuable in regression triage because not every assertion failure should result in an RTL bug.
Common mistakes
- Assuming every assertion failure is a DUT bug. Validate the property and sampling first.
- Looking only at the failure cycle. For temporal properties, find the cycle where the assertion attempt started.
- Ignoring vacuous success. A passing implication property may not have been exercised.
-
Forgetting reset.
Check whether
disable iffchanges property behavior around reset. - Using the wrong implication operator. Same-cycle and next-cycle requirements are different.
- Ignoring overlapping attempts. A failure may correspond to an earlier trigger.
- Debugging only with UVM transactions. SVA is sampled at signal/clock level, so waveform evidence is essential.
- Debugging only with waveforms. UVM transaction context can reveal IDs, addresses, predicted values, and stream relationships that are difficult to infer from raw signals.
- Weakening the property to remove failures. First determine whether the property or DUT is wrong.
- Disabling a failing assertion without documenting why. A disabled check can hide a real regression defect.
Try it yourself
Debug the following property against a waveform:
assert property (
@(posedge clk)
disable iff (!rst_n)
req |=> ack
);
Create at least four scenarios:
- request followed by acknowledgement on the correct cycle;
- request with no acknowledgement;
- request while reset is active;
- no request at all.
For each scenario, determine whether the property should:
- pass normally;
- fail;
- be disabled by reset;
- pass without actually exercising the property.
Practical debugging exercise
Build a small UVM environment with:
- a ready/valid driver;
- a monitor publishing accepted transactions;
- a bound SVA checker;
- a simple scoreboard;
- transaction recording or useful UVM diagnostics.
Introduce an intentional protocol violation where the payload changes while the interface is stalled.
Your debugging report should identify:
- the assertion property name;
- the failure clock edge;
- the antecedent clock edge;
- the sampled signal values;
- the corresponding monitor transaction, if any;
- whether the scoreboard also reported a failure;
- the final root-cause classification.
Advanced challenge: Debug a false assertion failure
Modify the protocol specification so that the payload is allowed to change while
valid && !ready.
The existing checker still contains:
valid && !ready |=> $stable(data)
Determine:
- Why the assertion fails.
- Whether the DUT is actually violating the new specification.
- How the property should be changed or removed.
- How the coverage model and monitor should be reviewed after changing the requirement.
Goal: demonstrate that assertion debugging includes validating the checker itself, not simply searching RTL for a defect.
Knowledge check
-
What should you inspect first after an assertion failure?
Confirm the property, sampling clock, antecedent, reset state, and expected timing before concluding that the DUT is wrong. -
What is vacuous success?
A property passes because its antecedent never occurs, so no meaningful assertion attempt is required. -
Why is the failure cycle sometimes not enough?
A temporal property may have started its assertion attempt several cycles earlier. -
Why can
|->versus|=>cause a false failure?
They place the beginning of the consequent in different sampling cycles. -
Why should reset be part of assertion debugging?
Reset can disable properties and can also change the state assumptions of the DUT, monitor, and scoreboard. -
Why compare assertion timing with the UVM monitor?
It verifies that signal-level checking and transaction-level observation use compatible sampling and acceptance boundaries. -
What are the main root-cause categories?
DUT defect, assertion defect, sampling problem, bind/integration problem, reset/enable problem, testbench/monitor problem, or specification ambiguity. -
How can you prove that an assertion is actually capable of detecting a violation?
Run a controlled negative scenario that deliberately violates the property.
Key takeaways
- An assertion failure is evidence to investigate, not automatic proof of an RTL defect.
- Debug SVA as a clocked timeline: identify the trigger, expected consequence, and sampled values.
- Always verify the sampling clock, reset, enable conditions, and implication timing.
- Watch for vacuous success when an assertion passes without its antecedent ever occurring.
- Temporal properties can have multiple overlapping attempts; identify which attempt failed.
- Use waveforms for signal-level timing and UVM transactions for higher-level context.
- Keep SVA focused on temporal/protocol rules instead of turning assertions into scoreboards.
- Classify failures as DUT, checker, sampling, integration, reset, testbench, or specification problems.
- Prove important assertions with intentional negative tests.
- A good assertion-debugging workflow should work both interactively and during regression triage.
Module 4 complete
Lessons 31–40 have now built a complete coverage-and-assertion workflow:
31 Functional Coverage Planning
↓
32 Coverpoints and Bins
↓
33 Cross Coverage
↓
34 Coverage Sampling Architecture
↓
35 Coverage Analysis
↓
36 Coverage Closure
↓
37 SystemVerilog Assertions
↓
38 Assertion Binding
↓
39 Assertion and UVM Integration
↓
40 Assertion Debugging
The learner should now be able to move from a verification requirement to a coverage model or temporal property, integrate reusable checkers into a UVM environment, and investigate the resulting evidence when something fails.
The next module changes focus from coverage/checking into configuration and extension architecture. Lesson 41 begins with configuration database patterns, building on the reusable UVM environment and multiple-agent architectures developed earlier in the course.