SVA Non-consecutive Repetition @(posedge clk) a |=> b[=2] ##1 c at which cases assertion will pass

In reply to SUNODH:


b[=2] // is equivalent to:
!b[*0:$] ##1 b ##1 !b[*0:$] ##1 b ##1 !b[*0:$]

a |=> b[=2] ##1 c ; // is eauivalent to 
a |=> !b[*0:$] ##1 b ##1 !b[*0:$] ##1 b ##1 !b[*0:$] ##1 c; 
// #35 clk=1, a=0, b=1, c=1 // Property Passed or Fail ?
// Because of !b[*0:$] ##1 c; 
// property is false at time 35 because b==1
// It requires NO b before a c
// Assertion would fail 
//
// If you had 
#25 clk=1, a=0, b=1, c=0 // 2nd b=1
#30 clk=1, a=0, b=0, c=1
// If would pass because 
 b ##1 !b[*0:$] ##1 c
// get reduced to 
b ##1 c // b==1 at 25, c==1 at 30

On your testbench, use nonblocking assignments (the <= ) instead of the blocking assignment.

Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
** SVA Handbook 4th Edition, 2016 ISBN 978-1518681448

  1. SVA Package: Dynamic and range delays and repeats SVA: Package for dynamic and range delays and repeats | Verification Academy
  2. Free books: Component Design by Example FREE BOOK: Component Design by Example … A Step-by-Step Process Using VHDL with UART as Vehicle | Verification Academy
    Real Chip Design and Verification Using Verilog and VHDL($3) https://rb.gy/cwy7nb
  3. Papers:

Udemy courses by Srinivasan Venkataramanan (http://cvcblr.com/home.html)
https://www.udemy.com/course/sva-basic/
https://www.udemy.com/course/sv-pre-uvm/