[source]

Class uvm_pkg::uvm_component_registry

CLASS

uvm_component_registry #(T,Tname)

The uvm_component_registry serves as a lightweight proxy for a component 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 component itself.

See section below for information on using uvm_component_registry.

Parameters

Name

Default value

Description

T

uvm_component

Tname

"<unknown>"

Variables

Name

Type

Description

type_name

string

Typedefs

Name

Actual Type

Description

this_type

uvm_component_registry#(T, Tname)

Functions

create_component(string name, uvm_component parent)

Function

create_component

Creates a component 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.

Parameters:
Return type:

uvm_component

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, string contxt = "")

Function

create

Returns an instance of the component 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 and parent .

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, T , 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 a component 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 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: