User guide
24-151
SystemVerilog Testbench Constructs
endtask
endextends
// End of file Input.sv
This Example 24-14 shows what the input program looks like after
weaving advice 4 into the class method. A new method
send_before_Created_d is created in this step and a call to it is
added as the first statement in the target method
packet::send_around_Created_c. Also note that the outcome would
have been different if advice 4 (before advice) was defined earlier
than advice 3 (around advice) within aspect_3, as that would have
affected the order of precedence of advice 3 and advice. In that
scenario the advice 3 (around advice) would have weaved around
the code block from advice 4 (before advice), unlike the current
outcome.
Example 24-15
// Beginnning of file Input.vr
program top;
packet p;
p = new();
p.send_Created_f();
endprogram
class packet;
...
// Other member fields/methods
...
task send();
$display("Sending data\n”);
endtask
task send_Created_a();
send();
send_Created_b();
endtask
task send_after_Created_b();