In reply to MICRO_91:
Q: In which region a void function or task is executed if that function/task is called from a sequence_match_item?
My previous answer may be incorrect as it may be tool-dependent.
**Previous answer:**The void functions and tasks 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.
However, when I tested this model, it appeared that some tools(not all) execute the void functions and tasks when they are called in the Observed region. Thus, if the task has Delays or wait statements that would not work in completing an on-going assertion. The tool may then set a warning about the non-support of Delays or wait statements in match item task calls.
module m;
`include "uvm_macros.svh" import uvm_pkg::*;
bit a, b, c, dbg, clk;
initial forever clk = #1 !clk;
task automatic t1(); dbg <=1; @(negedge clk) dbg<=0; endtask
sequence s_ab; @(posedge clk) a ##1 b; endsequence
ap_abc: assert property(@ (posedge clk) (s_ab.triggered, t1()) |-> ##2 c);
...
endmodule
To get around this issue, you could have another procedure to carry on the delays/additional clocking processes.
task automatic t1(); dbg <=1;// @(negedge clk) dbg<=0;
endtask
always @(posedge dbg) @(posedge clk) dbg<=0;
BTW, Tools seem to have no issue with delays if the task is in the action block
Ben Cohen
Ben@systemverilog.us
Link to the list of papers and books that I wrote, many are now donated.