Hi I’m writing an assertion to check the time difference between a clock signal and a reset. The requirement is that the delay between refclk and resetb should be greater than 90 us. This is the assertion that I have written
The problem I face here is that it checks the assertion for every posedge of the refclk, but I need it to check only for the first posedge of the refclk toggle.
To tackle the problem of checking at every posedge, I have used $past(refclk) !== (refclk) to detect only the input edge of the refclk but the assertion still fails even though the delay is greater than 90us
A slight correction , we would need to provide either a default value to input argument ’ delay ’ OR provide an actual during call to assert property :
initial begin
#10; // some delay if necessary
if(enable==0) wait(enable);
ap_clk_before_resetb: assert property( clk_before_resetb( 10ns ) );
end
Also thanks for sharing this interesting application wherein a concurrent assertion needs to be fired only once !! Initial block would ensure that the property is checked only once
Hi Ben, Thank you for the reply, but I have already used the inital begin to invoke the assertion. However I do not need the enable signal anymore and just need to check the timing difference between the first posedge of the REFCLK and the RESETB.