In reply to raku:
At every clocking event, there is an attempt in evaluating the assertion. If the attempt is successful, then a thread is started. Every attempt has no correlation to other (previous) or future attempts. Thus, in this example, assume that dist_value is stable all the time (for simplicity and discussion), and assume that $fell(a) is true in the following cycles: 2, 5, 7, 10, 25
assert property (@(posedge clk) disable iff (!reset_n)
first_match($fell(a) ##[1:$] $fell(a)) |-> $stable(dist_value));
@cycle 2 attempt is successful, must wait for a 2nd $fell(a). // thread@t2 started
@cycle 5 attempt is successful, must wait for a 2nd $fell(a). // thread@t5 started
$fell(a)==1, antecedent for thread@t2 is true, assertion for thread@t2 passes
@cycle 7 attempt is successful, must wait for a 2nd $fell(a). // thread@t7 started
$fell(a)==1, antecedent for thread@t5 is true, assertion for thread@t5 passes
@cycle 10 attempt is successful, must wait for a 2nd $fell(a). // thread@t10 started
$fell(a)==1, antecedent for thread@t7 is true, assertion for thread@t7 passes
The first_match is for antecedent that started at the attempt. It has no correlation or relationships to other threads that started at other attempts. All the attempts are mutually exclusive and independent.
Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
- SystemVerilog Assertions Handbook 3rd Edition, 2013 ISBN 878-0-9705394-3-6
- A Pragmatic Approach to VMM Adoption 2006 ISBN 0-9705394-9-5
- Using PSL/SUGAR for Formal and Dynamic Verification 2nd Edition, 2004, ISBN 0-9705394-6-0
- Real Chip Design and Verification Using Verilog and VHDL, 2002 isbn 0-9705394-2-8
- Component Design by Example ", 2001 ISBN 0-9705394-0-1
- VHDL Coding Styles and Methodologies, 2nd Edition, 1999 ISBN 0-7923-8474-1
- VHDL Answers to Frequently Asked Questions, 2nd Edition ISBN 0-7923-8115