User guide
24-142
SystemVerilog Testbench Constructs
Weaving of the advice in the target method yields:
task myTask_around();
myTask();
$display("Around in aoe1\n");
endtask
task myTask();
$display("Executing original code\n");
endtask
As a result of weaving, all the method calls to myTask() in the input
program code are replaced by method calls to myTask_around().
The proceed statement in the around code is replaced with a call to
the target method myTask(). Also, myTask_around replaces
myTask as the target method for myTask().
Pre-compilation Expansion details
Pre-compilation expansion of a program containing AOE code is
done in the following order:
1. Preprocessing and parsing of all input code.
2. Identification of the symbols, such as methods and classes
affected by extensions.
3. The precedence order of aspect extensions (and thereby
introductions and advices) for each class is established.
4. Addition of introductions to their respective classes as class
members in their order of precedence. Whether an introduction
can or can not override or hide a symbol with the same name that
is visible in the scope of the original class definition, is dependent
on certain rules related to the hide_list parameter. For a detailed
explanation, see “hide_list details” on page 24-157.