Systemverilog assertions

In reply to dave_59:
testbench http://SystemVerilog.us/vf/a4bc.sv


 // "When a is equal to any value from 0 to 31 ,then in the next 4 cycles ,
  //either b or c should be equal to what a was in the first cycle, 
  // and a cannot be the same as it was in the first cycle."
 property p_a4bc;
    int v;
    @(posedge clk) (a inside {[0:31]}, v = a) |-> ##[1:4] (v == b || v==c) and 
                                                  ##1 (a != v)[*4];
 endproperty
 ap_p_a4bc: assert property(p_a4bc);  

http://SystemVerilog.us/vf/a4bc.sv
Image: http://SystemVerilog.us/vf/a4bc.png

Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
For training, consulting, services: contact http://cvcblr.com/home.html
** 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 - SystemVerilog - Verification Academy
  2. Free books: Component Design by Example https://rb.gy/9tcbhl
    Real Chip Design and Verification Using Verilog and VHDL($3) https://rb.gy/cwy7nb
  3. Papers: