I have two signals “a” and “b”. The relationship between these two signals is that “b” will be asserted if “a” was stable(and 0) for the past “n” clock cycles. The time “n” here is a variable time.
How can I write an assertion which checks for the following:
If “b” is asserted, “a” must have been stable(and 0) for the past “n” clock cycles
Here is what I have written to check this:
property stability_for_past_n_clks (clk,a,b,n);
int t;
disable iff (ares)
@(posedge clk)
($rose(b),t=n+1'b1) |-> ($past($stable(!a),t),t=t-1'b1)[*0:$] ##1 t==0 ;
endproperty
Will this work?
Thanks,
Rajesh