Checking for signal toggle between defined time limit. Assertion or Functional Check?

In reply to desperadorocks:
SVA requires clocking events, but those events need not be clocks; they could be signals. Thus


    bit clk, a, b, clk1;   
    initial forever #10 clk=!clk;    
    property P;  // Option 1
        realtime t; // <----------- Use realtime 
        @(a) (1, t=$realtime) |=>  $realtime-t >= 9.99ns && $realtime-t <= 10.1ns; 
    endproperty 
    ap_P: assert property(P);  

    property P10; // Option 2
        realtime t; 
        @(a) (1, t=$realtime) |=>  $realtime-t == 10ns; 
    endproperty 
    ap_P10: assert property(P10);  

Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
For training, consulting, services: contact Home - My cvcblr


  1. SVA Alternative for Complex Assertions
    Verification Horizons - March 2018 Issue | Verification Academy
  2. SVA: Package for dynamic and range delays and repeats | Verification Academy
  3. SVA in a UVM Class-based Environment
    SVA in a UVM Class-based Environment | Verification Horizons | Verification Academy