Assertion to check number of clock pulses

In reply to Srini @ CVCblr.com:
Your figures show that clk is a master clock and sck is a derived divde-by-two clock and is not a separate async clock. If that is the case, then the following should work
See diagrams below.


 ap_cs_n: assert property(  
        @(posedge clk)  $fell(cs_n) |-> 
            (##2 sck && !cs_n ##2 !sck && !cs_n)[*16] ##2 $rose(cs_n));


Google Photos

Google Photos

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: