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

How to read the puzzles; implication timing

How to read these waveforms

  • Each column is one clock tick, numbered at the top. The value drawn in a column is the value the assertion samples at that tick.
  • Every property is clocked on posedge clk and has no reset unless shown.
  • The assertion starts a new attempt at every tick. "Fails at tick N" means the first tick where some attempt is certain to fail.
  • Answer each puzzle before opening the explanation. Your answers are remembered in this browser.
Puzzle 1
property
assert property (@(posedge clk) req |=> ack);
0123456clkreqack

What does a formal tool report for this assertion on this trace?

Show answer

Answer D: Fails at tick 5

The attempt that starts at tick 1 needs ack at tick 2 — it is there. The attempt that starts at tick 4 needs ack at tick 5. ack is high at tick 4, the same tick as req, which would satisfy |-> but not |=>. At tick 5 it is low, so the assertion fails at tick 5.

Puzzle 2
property
assert property (@(posedge clk) req |-> ack);
0123456clkreqack

What does a formal tool report for this assertion on this trace?

Show answer

Answer B: Fails at tick 1

Same trace, overlapping implication. Now ack must be high in the same tick as req. At tick 1 it is low, so the first attempt fails immediately at tick 1. (The attempt at tick 4 would pass.) Puzzles 1 and 2 together are the classic interview question "what is the difference between |-> and |=>?".

Puzzle 3
property
assert property (@(posedge clk) start |-> ##[1:3] done);
01234567clkstartdone

What does a formal tool report for this assertion on this trace?

Show answer

Answer A: Passes

The attempt from tick 1 has a window of ticks 2–4; done arrives at tick 4, the last allowed tick. The attempt from tick 5 has a window of ticks 6–8; done at tick 7 satisfies it, so tick 8 does not matter. Both attempts pass.

Puzzle 4
property
assert property (@(posedge clk) a ##1 b |=> c);
0123456clkabc

What does a formal tool report for this assertion on this trace?

Show answer

Answer C: Fails at tick 4

The antecedent a ##1 b matches twice: a@1 with b@2 (ends at tick 2), and a@2 with b@3 (ends at tick 3). The first match requires c at tick 3 — present. The second requires c at tick 4 — missing. Overlapping antecedent matches are independent attempts, and it is easy to forget the second one.

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.