Check Assertion for FSM state with unknow number of cycles before state change

In reply to pagarwa5:


property p_FSM_A_B_option1; 
@(posedge clk) disable iff (!rst)
  $rose(state==A) ##1 C==16'H1FFF[->1] ##0 done |=> (state==B, $display(" A - B")) ;
endproperty : p_FSM_A_B_option1

property p_FSM_A_B_option2; 
@(posedge clk) disable iff (!rst)
  $rose(state==A) ##1 done[->1]   |=> (state==B, $display(" A - B")) ;
endproperty : p_FSM_A_B_option2
 

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