Search the Community
Showing results for tags 'utility macros'.
-
Does an abstract class (virtual class ....), which extends from uvm_object, benefit from using uvm utility macros (`uvm_component_utils, `uvm_object_utils)? As I understand, `uvm_component_utils and `uvm_object_utils are used to register a class w/ the factory so objects of that class can be overridden. But, because an abstract class cannot be instantiated, it cannot be overridden. Is that assessment correct? Are those utils macros doing smthg else besides allowing for 'overriding' capability? (Although I have looked at them, I know I don't fully understand all they're used for.) thanks, From uvm_object_defines.svh: //------------------------------------------------------------------------------ // // Title: Utility and Field Macros for Components and Objects // // Group: Utility Macros // // The ~utils~ macros define the infrastructure needed to enable the // object/component for correct factory operation. See <`uvm_object_utils> and // <`uvm_component_utils> for details. // // A ~utils~ macro should be used inside ~every~ user-defined class that extends // <uvm_object> directly or indirectly, including <uvm_sequence_item> and // <uvm_component>. // // Below is an example usage of the ~utils~ macro for a user-defined object. // //| class mydata extends uvm_object; //| //| `uvm_object_utils(mydata) //| //| // declare data properties
- 3 replies
-
- virtual class
- abstract class
- (and 5 more)