The uvm_named_object_registry serves as a lightweight proxy for a named_object of type T and type name Tname, a string. The proxy enables efficient registration with the <uvm_factory>. Without it, registration would require an instance of the named_object itself.
See Usage section below for information on using uvm_named_object_registry.
| uvm_named_object_registry | ||||||||||||||||||||||
| The uvm_named_object_registry serves as a lightweight proxy for a named_object of type T and type name Tname, a string. | ||||||||||||||||||||||
| Class Hierarchy | ||||||||||||||||||||||
| ||||||||||||||||||||||
| Class Declaration | ||||||||||||||||||||||
| ||||||||||||||||||||||
| Methods | ||||||||||||||||||||||
| create_named_object | Creates a named_object of type T having the provided name and parent. | |||||||||||||||||||||
| create_object | Creates an object of type T and returns it as a handle to an <uvm_object>. | |||||||||||||||||||||
| get_type_name | Returns the value given by the string parameter, Tname. | |||||||||||||||||||||
| get | Returns the singleton instance of this type. | |||||||||||||||||||||
| create | Returns an instance of the named_object type, T, represented by this proxy, subject to any factory overrides based on the context provided by the parent’s full name. | |||||||||||||||||||||
| set_type_override | Configures the factory to create an object of the type represented by override_type whenever a request is made to create an object of the type, T, represented by this proxy, provided no instance override applies. | |||||||||||||||||||||
| set_inst_override | Configures the factory to create a named_object of the type represented by override_type whenever a request is made to create an object of the type, T, represented by this proxy, with matching instance paths. | |||||||||||||||||||||
virtual function uvm_named_object create_named_object ( string name, uvm_named_object parent = null )
Creates a named_object of type T having the provided name and parent. This is an override of the method in <uvm_object_wrapper>. It is called by the factory after determining the type of object to create. You should not call this method directly. Call create instead.
Creates an object of type T and returns it as a handle to an <uvm_object>. This is an override of the method in <uvm_object_wrapper>. It is called by the factory after determining the type of object to create. You should not call this method directly. Call create instead.
virtual function string get_type_name()
Returns the value given by the string parameter, Tname. This method overrides the method in <uvm_object_wrapper>.
static function this_type get()
Returns the singleton instance of this type. Type-based factory operation depends on there being a single proxy instance for each registered type.
static function T create( string name, uvm_named_object parent, string contxt = "" )
Returns an instance of the named_object type, T, represented by this proxy, subject to any factory overrides based on the context provided by the parent’s full name. The contxt argument, if supplied, supercedes the parent’s context. The new instance will have the given leaf name and parent.
static function void set_type_override ( uvm_object_wrapper override_type, bit replace = 1 )
Configures the factory to create an object of the type represented by override_type whenever a request is made to create an object of the type, T, represented by this proxy, provided no instance override applies. The original type, T, is typically a super class of the override type.
static function void set_inst_override( uvm_object_wrapper override_type, string inst_path, uvm_named_object parent = null )
Configures the factory to create a named_object of the type represented by override_type whenever a request is made to create an object of the type, T, represented by this proxy, with matching instance paths. The original type, T, is typically a super class of the override type.
If parent is not specified, inst_path is interpreted as an absolute instance path, which enables instance overrides to be set from outside named_object classes. If parent is specified, inst_path is interpreted as being relative to the parent’s hierarchical instance path, i.e. {parent.get_full_name(),”.”,inst_path} is the instance path that is registered with the override. The inst_path may contain wildcards for matching against multiple contexts.
The uvm_named_object_registry serves as a lightweight proxy for a named_object of type T and type name Tname, a string.
class uvm_named_object_registry #( type T = uvm_named_object, string Tname = "<unknown>" ) extends uvm_object_wrapper
Creates a named_object of type T having the provided name and parent.
virtual function uvm_named_object create_named_object ( string name, uvm_named_object parent = null )
Returns the value given by the string parameter, Tname.
virtual function string get_type_name()
Returns the singleton instance of this type.
static function this_type get()
Returns an instance of the named_object type, T, represented by this proxy, subject to any factory overrides based on the context provided by the parent’s full name.
static function T create( string name, uvm_named_object parent, string contxt = "" )
Configures the factory to create an object of the type represented by override_type whenever a request is made to create an object of the type, T, represented by this proxy, provided no instance override applies.
static function void set_type_override ( uvm_object_wrapper override_type, bit replace = 1 )
Configures the factory to create a named_object of the type represented by override_type whenever a request is made to create an object of the type, T, represented by this proxy, with matching instance paths.
static function void set_inst_override( uvm_object_wrapper override_type, string inst_path, uvm_named_object parent = null )