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

Repetition: [*n], [->n] and [=n]

Puzzle 5
property
assert property (@(posedge clk) go |-> busy[*3] ##1 done);
0123456clkgobusydone

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

Show answer

Answer B: Fails at tick 3

With |->, busy[*3] starts in the tick of go, so busy must be high at ticks 1, 2 and 3. It drops at tick 3, so the attempt fails there — long before anyone looks at done. The high pulse at tick 4 is irrelevant: [*3] means three consecutive ticks.

Puzzle 6
property
assert property (@(posedge clk) cmd |=> beat[->2] ##0 last);
0123456clkcmdbeatlast

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

Show answer

Answer A: Passes

beat[->2] waits — any number of ticks — for the second beat and ends exactly on it (tick 5). ##0 last then requires last in that same tick, which holds. The first beat (tick 3) needs nothing, and gaps without beats are allowed. In words: "the second beat after a command is the last one."

Puzzle 7
property
assert property (@(posedge clk) cmd |=> beat[=2] ##1 done);
01234567clkcmdbeatdone

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

Show answer

Answer A: Passes

Non-consecutive repetition beat[=2] matches two beats (ticks 2 and 4) and may then continue through ticks where beat stays low. So it can end at tick 4, 5 or 6… A match ending at tick 5 followed by done at tick 6 satisfies the property.

Puzzle 8
property
assert property (@(posedge clk) cmd |=> beat[->2] ##1 done);
01234567clkcmdbeatdone

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

Show answer

Answer B: Fails at tick 5

Same trace, but goto repetition. beat[->2] ends exactly on the second beat (tick 4), so done must be high at tick 5. It is not; the assertion fails at tick 5. Puzzles 7 and 8 differ in one character — and that is the whole difference between [=n] and [->n].

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.