User guide
24-143
SystemVerilog Testbench Constructs
5. Weaving of all advices in the input program are weaved into their
respective class methods as per the precedence order.
These steps are described in more detail in the following sections.
Precedence
Precedence is specified through the dominate_list (see
“dominate_list” on page 24-134) There is no default precedence
across files; if precedence is not specified, the tool is free to weave
code in any order. Within a file, dominance established by
dominate_lists always overrides precedence established by the
order in which extends directives are coded. Only when the
precedence is not established after analyzing the dominate lists of
directives, is the order of coding used to define the order of
precedence.
Within an extends directive there is an inherent precedence between
advices. Advices that are defined later in the directive have higher
precedence that those defined earlier.
Precedence does not change the order between adding of
introductions and weaving of advices in the code. Precedence
defines the order in which introductions to a class are added to the
class, and the order in which advices to methods belonging to a
class are woven into the class methods.
Example 24-11
// Beginnning of file Input.vr
program top ;
initial begin
packet p;
p = new();
p.send();
end
endprogram