Always, s_always property examples

In reply to dave_59:

There is an implicit always associated with concurrent assertions, thus allowing the assertion to be retested at each occurrence of its clocking event. For example:


initial 
ap_resetf_hi_ater_hi: assert property(@ (posedge clk) 
   ##20 |=> always reset_f==1'b1 );   

Note that assertion ap_resetf_hi_ater_hi is attempted ONCE because of the initial.
However, after 20 cycles, reset_f must always stay in the high state.
You could write this as


initial begin 
  repeat(20) @(posedge clk); 
  forever
    always @(posedge clk) 
       ap_reset_f_hi: assert property(reset_f==1'b1 );  
end 

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