##[0:$] expr ##0 w // is equivalent to
##0 expr ##0 w or
##1 expr ##0 w or
##2 expr##0 w or
..
##n expr ##0 w
/* if(expr==1) and w==0 then you keep on looking for another possibility in later cycles.
The consequent can never be a NO-MATCH because if no-match, then try for next cycle, maybe there will be match.
expr[->1] ##0 w // is equivalent to
!expr[*0:$] ##0 expr // Thus
// if (expr==1) in any cycle, then w must be true in the same cycle
// Once expr==1 there cannot be cannot repeat cycle where expr==0
// the goto is like the 1st occurrence of the expression.
Ben Cohen Ben@systemverilog.us
Link to the list of papers and books that I wrote, many are now donated.
Thanks Ben,
So essentially the consequent is expanded to :
##0 $rose(b) ##0 ( ($realtime - a_rose) > 2ns ) or
##1 $rose(b) ##0 ( ($realtime - a_rose) > 2ns ) or
##2 $rose(b) ##0 ( ($realtime - a_rose) > 2ns ) or
.............................................. or
##N $rose(b) ##0 ( ($realtime - a_rose) > 2ns ) or
At time:5 since expression:( ($realtime - a_rose) > 2ns ) isn’t true , it keeps on checking the other remaining sequences.As a result no failure at time:5
I am not clear why is clock delay ##[0:$] required for $rose(b) ?
Using it we don’t observe the failure at time:5 due to infinite ‘or’ sequence.
##[0:$] essentially will wait (till end of simulation) till sequence is true else it doesn’t throw an error.