system-verilogsystem-verilog-assertions

Gate-level timing checks in SVA


I need to check the value of a signal after a certain amount of time a clock edge occurs. For example, I want to check that if signal b asserts to high 1ps after posedge clock occurs.

Does SVA provide a syntax for this?


Solution

  • were not intended for use as gate-level timing checks. Verilog already provides a number of built-in and optimized timing checks like $setuphold and $skew. See section 31. Timing checks in the IEEE 1800-2017 SystemVerilog LRM.

    Timing checks are usually expressed as limits—either assertion happens at least 1ps after the clock edge, or at most 1ps after the clock edge. Also, must b be asserted after every clock edge? Regardless of the answers to these questions, it's possible to use SVA to model timing check, but you will have to manually create equations based on the actual requirements. For example

    property p;
      realtime timestamp;
      @(posedge c) ($rose(a), timestamp = $realtime) |=> 
           @(posedge b) $realtime - timestamp < 1ps;
    endproperty