Restrict, and Assertions in Static Formal
Use restrict to narrow a formal run without touching simulation. Read bounded and unbounded verdicts, and see an assertion as a checker circuit.
You Will Be Able To
- Say what
restrictdoes in simulation and in formal, and how it differs fromassume. - Read a bounded pass, a bounded failure and an unknown proof correctly.
- Translate a concurrent assertion into its checker circuit.
- Explain why a passing simulation is not a proof.
- Lesson
- A9.2
- Time
- 30 min
- Runs on
- Verilator
- Check
- 5 questions
A directed test of an arbiter passes every run. Formal finds two grants at once in two steps. The test never drove both requests together; the solver tries every input. Formal adds directives that simulation never needs, such as restrict.
- DUT
- Property
- Engine
- Result
- Data
- Control
- Synthesis
Each property becomes a small circuit: flops for its delays, gates for its Booleans, and one output that fires on a failure.
- Search
The solver drives every input of the design and the checkers, within the assumptions and restrictions.
- Verdict
A trace that fires a checker is a FAIL. No such trace within the depth is a bounded PASS. A closed induction is a proof.
Read the diagram as text
- RTL: the design
- assertions: assert, assume, restrict, cover
- checker circuits: flops and gates per property
- solver: every input, every step
- verdict: PASS, FAIL with a trace, UNKNOWN
- assertions → checker circuits: synthesised
- RTL → solver: model
- checker circuits → solver: model
- solver → verdict: search
SVA-FC 2.5-2.6; IEEE 1800-2023 16.14.
Restrict Property in Simulation
restrict property states a condition for formal tools only. A simulator does not check it, and it has no action block.
Restrict in Formal
In formal, restrict narrows the inputs exactly like assume. The difference is intent. An assumption is a promise of the environment: simulation checks it, and the neighbour must prove it. A restriction only cuts the run down, for example to one mode at a time.
The Static Formal Flow
Bounded model checking (bmc) searches traces up to a depth: a PASS says only that no failure exists within it. A proof (prove) uses induction to cover every depth; when the induction does not close, the verdict is UNKNOWN.
| Run on a counter that reaches 12 at step 13 | Verdict | What it means |
|---|---|---|
bmc, depth 10 | PASS | no failure in the first steps only |
bmc, depth 20 | FAIL at step 13 | a real counterexample |
prove, depth 4 | UNKNOWN | the induction did not close; no claim either way |
Measured with the formal engine v1 (smtbmc yices), 2026-11-12.
Assertion Synthesis: The Property as a Circuit
A formal tool turns each property into a checker circuit. req |=> ack needs one flop to remember last cycle's req, and an immediate check of ack when that flop is set.
The property
assert property (@(posedge clk)
req |=> ack);
What the engineer writes.
Its checker circuit
reg req_q = 0;
always @(posedge clk) begin
req_q <= req;
if (req_q) assert(ack);
end
What the tool builds: one flop and one check.
Simulation Against Formal
A simulation checks the traces its stimulus makes. A proof covers every trace the assumptions allow. The same property can pass one and fail the other.
Try It
The simulation passes: its stimulus never raises both requests. Formal on the same arbiter fails at step 2, unless an assumption or a restriction removes that input.
Add one cycle with both requests high to the test and predict the new count.
fails=0Check Yourself
Common Mistakes
Wrong Read a bounded PASS as a proof.
It covers only traces up to the depth; a deeper failure is still possible.
Fix Use prove, or state the bound and why it is enough.
Wrong Use restrict for a promise the environment must keep.
Simulation never checks a restriction, so a bench that breaks it goes unnoticed.
Fix Write environment promises as assume; keep restrict for narrowing a formal run.
Wrong Treat a passing directed simulation as evidence that a rule always holds.
The stimulus may never reach the failing input.
Fix Run the rule in formal, or add covers that show the corner was reached.
Remember
restrict propertyconstrains formal runs only; simulators ignore it, and it has no action block.- In formal,
restrictandassumenarrow inputs alike; onlyassumeis a checked promise. - A bounded PASS covers the depth only; UNKNOWN claims nothing; only a closed proof covers all depths.
- Each property becomes a checker circuit of flops and gates; formal searches every input against it.