In reply to pk_94:
($rose(div_clk[n]) ,local_cnte=0) |=> ((1'b1,local_cnte=local_cnte+1)[*1:$] ##0 (local_cnte==VALUE/2)) ##0 $fell(div_clk[n]);
If (local_cnte==VALUE/2) is true and in the same cycle $fell(div_clk[n] is false, the consequent will keep on trying for another thread. Specifically, an assertion of the form:
(a, v=k) |=> (1, v=v+1)[*1:$] ##0 v==x ##0 b; // is same as
(a, v=k) |=? (1, v=v+1)[*1] ##0 v==x ##0 b or
(1, v=v+1)[*2] ##0 v==x ##0 b or
(1, v=v+1)1[*3]##0 v==x ##0 b or
.......
(1, v=v+1)[*n] ##0 v==x##0 b; // where n is infinity/
Thus, if any of the thread fails, the simulator will try other threads.
The first_match() traps the 1st good condition when v==x, and then tests of the b.
If b==0, assertion fails. thus,
(a, v=k) |=> first_match((1, v=v+1)[*1:$] ##0 v==x) ##0 b;
Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
For training, consulting, services: contact Home - My cvcblr
- SVA Handbook 4th Edition, 2016 ISBN 978-1518681448
- 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 978-1539769712
- 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
- VF Horizons:PAPER: SVA Alternative for Complex Assertions | Verification Academy
- http://systemverilog.us/vf/SolvingComplexUsersAssertions.pdf
- “Using SVA for scoreboarding and TB designs”
http://systemverilog.us/papers/sva4scoreboarding.pdf - “Assertions Instead of FSMs/logic for Scoreboarding and Verification”
October 2013 | Volume 9, Issue 3 | Verification Academy - SVA in a UVM Class-based Environment
SVA in a UVM Class-based Environment | Verification Horizons | Verification Academy