[source]

Class uvm_pkg::uvm_object_registry

CLASS

uvm_object_registry #(T,Tname)

The uvm_object_registry serves as a lightweight proxy for a uvm_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 object itself.

See section below for information on using uvm_component_registry.

Parameters

Name

Default value

Description

T

uvm_object

Tname

"<unknown>"

Variables

Name

Type

Description

type_name

string

Typedefs

Name

Actual Type

Description

this_type

uvm_object_registry#(T, Tname)

Functions

create_object(string name = "")

Function

create_object

Creates an object of type T and returns it as a handle to a 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.

Parameters:

name (string)

Return type:

uvm_object

get_type_name()

Function

get_type_name

Returns the value given by the string parameter, Tname . This method overrides the method in uvm_object_wrapper.

get()

Function

get

Returns the singleton instance of this type. Type-based factory operation depends on there being a single proxy instance for each registered type.

Return type:

this_type

create(string name = "", uvm_component parent = null, string contxt = "")

Function

create

Returns an instance of the 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, supersedes the parent 's context. The new instance will have the given leaf name , if provided.

Parameters:
Return type:

T

set_type_override(uvm_object_wrapper override_type, bit replace = 1)

Function

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 represented by this proxy, provided no instance override applies. The original type, T , is typically a super class of the override type.

Parameters:
set_inst_override(uvm_object_wrapper override_type, string inst_path, uvm_component parent = null)

Function

set_inst_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 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 component 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.

Parameters: