Thanks much, Ben. Have been using local variables for some time now, but wasn’t aware of these nuances.
I had created an example to see how this works. Here’s the EDA playground link.
The assertion is the same as posted above except that I added a few $display statements attached to sub-sequences.
sequence s1;
int y, y1;
( (a ##[1:5] b, y = data1, $display($stime,“From sequence s1 : A B complete y=%0b”,y)) ) or
(d ##2 e, y = data2, $display($stime,“From seqeunce D E complete y=%0b”,y) ) ##1 (1’b1,$display($stime,“y=%b”,y) );
endsequence
When I simulate this, the subsequence " ##1 (1’b1,$display($stime,“y=%b”, y) ); " never gets executed, even when one of the OR subsequence is satisfied. I don’t understand that. Please see the EDA playground example.
Thanks in advance.