Using sequence as event contol

In reply to MICRO_91:

The way I think it works is that functions called in a sequence_matchedItem
are scheduled in the Observed region. If the function returns a value, it is executed immediately. Thus,

function bit f(bit i) return !i; endfunction
property p;
  bit x; 
  (a, x=f(c)) ## d==x ..; // x is updated in the Observed region
// Otherwise you could not complete the sequence
..
function void Length( input bit [3:0] L ); length = L;  endfunction
task t(bit [3:0] L ); length = L; endtask
assert property( @(ce) (a, Length(data), t(data1)) ); 
// The function and the task are scheduled to be processed in the Observed region. 
// When are they executed? Probably after all executions of queued up 
// assertions are completed, thus probably in the Reactive region. 
// But it really doesn't make a difference to the user. 
// Any updated module variables is not seen by any ongoing assertions 
// being executed in that time step since signals are sampled. 


Ben