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 restrict does in simulation and in formal, and how it differs from assume.
  • 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.

Static Formal: No Stimulus, Every InputThe tool builds a checker circuit from each assertion. The solver drives every input and searches for a trace that makes a checker fire.
  • DUT
  • Property
  • Engine
  • Result
  • Data
  • Control
call: who calls whomdata: where the transaction goes
Static formal: no stimulus, every inputThe tool builds a checker circuit from each assertion. The solver drives every input and searches for a trace that makes a checker fire. dut RTL the design property assertions assert, assume,restrict, cover property checker circuits flops and gates perproperty engine solver every input, everystep result verdict PASS, FAIL with atrace, UNKNOWN synthesisedmodelmodelsearch
  1. property assertionsassert, assume, restrict, cover
    • synthesised → checker circuits
  2. property checker circuitsflops and gates per property
    • model → solver
  3. dut RTLthe design
    • model → solver
  4. engine solverevery input, every step
    • search → verdict
  5. result verdictPASS, FAIL with a trace, UNKNOWN
  1. Synthesis

    Each property becomes a small circuit: flops for its delays, gates for its Booleans, and one output that fires on a failure.

  2. Search

    The solver drives every input of the design and the checkers, within the assumptions and restrictions.

  3. 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 13VerdictWhat it means
bmc, depth 10PASSno failure in the first steps only
bmc, depth 20FAIL at step 13a real counterexample
prove, depth 4UNKNOWNthe 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.

RUNVerilator · simulator service
Edit the code, then run it
Expected: fails=0

Check Yourself

Predict the outputThe counter with assert cnt != 12, mode bmc, depth 10. The verdict is:
module top(input clk, output reg [3:0] cnt = 0);
  // A free-running counter: 0, 1, 2, ... 15, 0, ...
  always @(posedge clk) cnt <= cnt + 4'd1;
endmodule
Read included file: props.sv
never12: assert property (@(posedge clk) cnt != 4'd12);
Spot the bugThe bench breaks the rule !mode at 15. Which directive reports nothing in simulation?
ConceptHow do assume and restrict differ in a formal run?
ConceptA prove run reports UNKNOWN. What does it mean?
ConceptWhat checker circuit does a tool build for req |=> ack?

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 property constrains formal runs only; simulators ignore it, and it has no action block.
  • In formal, restrict and assume narrow inputs alike; only assume is 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.

Practice

Report a problem with this page