The SYSTEM VERILOG ASSERTIONS HANDBOOK, 4th Edition states following on page no. 36:
Do not use first_match function in a sequence that is an antecedent that has goto repetition operator unless that sequence has other expressions which are multi-ranged.
Thus a ##1 b[->1] |-> c; //first_match is not needed here because once b==1, there could not be another thread of !b.
The book also states on page no. 37 that for non-consecutive repetition operator, in an antecedent, we NEED TO USE first_match function:
a ##1 b[=1]##1 c |-> d; is equivalent to
a ##1 !b[*0:$] ##1 b ##1 !b[*0:$] ##1 c |-> d;
// !b[*0:$] ##1 c can cause mutliple threads.
(can someone explain why this causes multiple threads?)
Now above statement is equivalent to !b[*0] ##1 c or !b[*1] ##1 c or !b[*2] ## 1 c .. and so on. ( !b ## 1 c or !b ##1 !b ## 1 c ...)
Are the multiple threads caused by or operator in the above expression?
In that case even for goto operator example given above - a ##1 b[->1] |-> c;
There will be multiple threads as b[->1] is equivalent to !b[*0:$] ##1 b; Why does this not cause multiple threads (because of repetition of !b)
Can someone explain this in the detail.
regards,
-sunil puranik