User guide

24-139
SystemVerilog Testbench Constructs
Advice:
before task myTask ();
$display("Before in aoe1\n");
endtask
Weaving of the advice in the target method yields the following.
task myTask();
mytask_before();
$display("Executing original code\n");
endtask
task mytask_before ();
$display("Before in aoe1\n");
endtask
Note that the SV language does not impose any restrictions on the
names of newly created methods during pre-compilation expansion,
such as mytask_before . Compilers can adopt any naming
conventions such methods that are created as a result of the
weaving process.
Example 24-9
Target method:
task myTask();
$display("Executing original code\n");
endtask
Advice:
after task myTask ();
$display("Before in aoe1\n");
endtask