Assertion for holding the reset for a long time

I see that assertions are always related to n number of cycles of a clock. Is there any way I can check the duration wrt timescale? Meaning

let’s say I want to check if a reset is hold for 100ns or less, how do we write a assert statement for this?

In reply to vg_ql:

property reset_check();
realtime v;
@(posedge reset)
(1, v = $realtime) |-> @(negedge reset) (($realtime - v) <= 100ns);  //This is active high reset
endproperty

I tried this, seeing a fatal at 0ps, not sure why questa is failing for this assertion at time 0.

** Fatal: sync_fifo_reset_hold_check failed

Time: 0 ps Started: 0 ps

Code here:

property sync_fifo_wrslaverst_hold_check;
realtime v;
@(posedge fifoWrSlaveRst) disable iff (MODE != FIFO_RAM_SYNC_MODE) (1, v = $realtime) |-> @(negedge fifoWrSlaveRst) (($realtime - v) >= 100ns);
endproperty

assert property (sync_fifo_wrslaverst_hold_check) else $fatal(“sync_fifo_reset_hold_check failed”);

TB code:
always #3.2ns clk++;

fifoWrSlaveRst= 1;
repeat (100) @(posedge clk);
fifoWrSlaveRst= 0;

In reply to vg_ql:

Try to put “disable iff (MODE != FIFO_RAM_SYNC_MODE)” statement outside actual assertion something like

property sync_fifo_wrslaverst_hold_check;
realtime v;
disable iff (MODE != FIFO_RAM_SYNC_MODE)
@(posedge fifoWrSlaveRst)  (1, v = $realtime) |-> @(negedge fifoWrSlaveRst) (($realtime - v) >= 100ns); 
endproperty

assert property (sync_fifo_wrslaverst_hold_check) else $fatal("sync_fifo_reset_hold_check failed");

In reply to Anudeep J:

What difference does it make in these two cases(overlapping and nonoverlapping implication) when reset is high at 0ns and make it low at 300ns?

@(posedge fifoWrSlaveRst) disable iff (MODE != FIFO_RAM_SYNC_MODE) (1, v = $realtime) |-> @(negedge fifoWrSlaveRst) (($realtime - v) >= 100ns); //This is active high reset

@(posedge fifoWrSlaveRst) disable iff (MODE != FIFO_RAM_SYNC_MODE) (1, v = $realtime) |=> @(negedge fifoWrSlaveRst) (($realtime - v) >= 100ns); //This is active high reset

First case the tool gives fatal at 0ps and 2nd case tool is happy.

And when I change the test case such that reset is high at 0ns and make it low at 60ns, 2nd case catches the assertion, first case fatal at 0ps.

In reply to vg_ql:

Hi vg_ql,

In this case, it does not make any difference because in the property you are dealing with the edges. Whereas if you take into consideration the sampled functions like $rose or $fell, it makes the difference. For me the above code is working properly in both cases.Could you please post the complete code, so that I can give you exact problem?