Always, s_always property examples

In reply to Rahul Patel:

From my SVA Handbook


always [3:4] a ##[1:4] b |-> c
* For every attempt, property must be true at 3rd and 4th cycle of that attempt
* Must be nonvacuously true at either 3rd or 4th cycle of that attempt 

Now, with your example:


module m; 
... variable declarations..
initial forever #10 clk=!clk; 

assert property ( always [4:5] a ##[1:4] b |=> c );
In your testbench the antecedent is a no-match in cycles 4 and 5, thus the assertion is vacuously true. 

On a separate note, I believe that you are misusing the "always" 
// You are stating that at every clocking event  (i.e., every 20ns) you have an attempt, and for that attempt, you want that in the 4th and 5th cycle thereafter the property is true. 

Thus, at every attempt (every cycle) you have a new thread that behaves separately from the other threads.  
Attempt 1   ^ . . . . P 
Attempt 2     ^ . . . . P 
Attempt 2     ^ . . . . . P
.... 

Attempt n                         ^ . . . . P
You can see the confusion!!!  Actually, after the 4th cycle, you are checking the property at every cycle.    If this is what you want, then write 
 assert property ( ##4 a ##[1:4] b |=> c );

Personally, if you must or want to use the always in an assertion, use it in an initial statement. Thus, 
initial assert property ( always [4:5] a ##[1:4] b |=> c );
Thus, you want the property "a ##[1:4] b |=> c " to be true only in cycles 4 and 5. 

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