FVO — Formal Verification Online
Lesson 15.5 · Waveform Problems: Pass or Fail?

Liveness, vacuity and matching the spec

Puzzle 17
property
assert property (@(posedge clk) req |-> ##[1:$] gnt);
01234567clkreqgnt

A formal tool tries to prove this assertion on a design where gnt may never come. What is the result?

Show answer

Answer B: It can never fail: the unbounded delay is weak

In an assertion, ##[1:$] gnt is a weak sequence: every finite trace could still be extended so that gnt arrives later, so no finite counterexample exists — and formal tools report a pass. To require that gnt really comes, write req |-> s_eventually gnt (liveness) or a bounded version such as req |-> ##[1:16] gnt.

Puzzle 18
property
assert property (@(posedge clk) req |-> s_eventually gnt);
0123456789looploopclkreqgntstateIDLEWAITCHKWAITCHKWAITCHKWAITCHKWAIT

The tool returns this counterexample and says the trace loops from tick 4 back to tick 3 forever. What does it show?

Show answer

Answer B: gnt never comes: the design can stay in the WAIT/CHK loop forever

Liveness counterexamples are lassos: a prefix, then a loop of states that can repeat forever without the good event. Next, check whether the loop is the design's fault or an environment that is unfair (for example, a consumer that is never ready). If the environment is to blame, add a fairness assumption such as assume property (s_eventually ready) and run again.

Puzzle 19
012345clkreqack

The spec says: "ack is high exactly two ticks after req". The trace shows correct behaviour. Which assertion matches the spec?

Show answer

Answer A: req |-> ##2 ack

req |-> ##2 ack checks tick 1 + 2 = tick 3 — correct. Option B checks tick 4 (one extra tick from |=>). Option C also accepts ack at tick 1 or 2, so it is too weak. Option D checks tick 2. When translating a spec, count ticks on a drawing like this one.

Puzzle 20
property
a_done_irq: assert property (@(posedge clk) state == DONE |=> irq);
// tool: PROVEN in 2 s
// later: an assumption makes state == DONE unreachable

What is the real status of a_done_irq?

Show answer

Answer B: Vacuously proven: it checks nothing until DONE is reachable

If the antecedent can never be true, every attempt passes vacuously and the proof says nothing about the design. The defence is a cover of the antecedent, cover property (state == DONE), and reading the tool's vacuity report. Then find the over-constraining assumption (Chapter 9).

Chapter takeaways

Discussion

No comments yet.

Was this page helpful?

Tip: select any text on the page before clicking Report and it will be quoted in your report.