User guide

24-129
SystemVerilog Testbench Constructs
methodology. AOP is a way of modularizing such cross-cutting
concerns. AOP extends the functionality of existing OOP derived
classes and uses the notion of aspect as a natural unit of modularity.
Behavior that affects multiple classes can be encapsulated in
aspects to form reusable modules. As potential benefits of AOP are
achieved better in a language where an aspect unit can affect
behavior of multiple classes and therefore can modularize the
behavior that affects multiple classes, AOP ability in SV language is
currently limited in the sense that an aspect extension affects the
behavior of only a single class. It is useful nonetheless, enabling test
engineers to design code that efficiently addresses concerns
"Context-sensitive behavior" and "Unanticipated extensions".
AOP is used in conjunction with object-oriented programming. By
compartmentalizing code containing aspects, cross-cutting
concerns become easy to deal with. Aspects of a system can be
changed, inserted or removed at compile time, and become
reusable.
It is important to understand that the overall verification environment
should be assembled using OOP to retain encapsulation and
protection. NTB's Aspect-Oriented Extensions should be used only
for constrained-random test specifications with the aim of minimizing
code.
SV’s Aspect-Oriented Extensions should not be used to:
Code base classes and class libraries
Debug, trace or monitor unknown or inaccessible classes
Insert new code to fix an existing problem