Assertion to verify Spread spectrum clocking of +/- 100ppm

I have something like this to check SSC tolerance, please let me know if there is another way to do it.


property p_time(real tolerance, logic clk);
   realtime v_t1, v_t2, v_hi, v_lo, v_diff;
     disable iff(rst)
      @(posedge clk) (1, v_t1=$time) ##0 @(negedge clk) (1, v_t2=$time, v_hi=v_t2-v_t1) ##0 @(posedge clk) (1, v_lo=$time-v_t2) ##0 v_lo/(v_lo+v_hi) >=0.5-tolerance && v_lo/(v_lo+v_hi) <=0.5+tolerance;
  endproperty 
  ap_time: assert property(p_time(0.01,clk));

In reply to foxtrot:

Your very same question was answered in
https://verificationacademy.com/forums/systemverilog/sva-check-frequency-and-duty-cycle/5-error

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 | 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) Amazon.com
  3. Papers: