[source]

Class uvm_pkg::uvm_tlm_extension

Class

uvm_tlm_extension

TLM extension class. The class is parameterized with arbitrary type which represents the type of the extension. An instance of the generic payload can contain one extension object of each type; it cannot contain two instances of the same extension type.

The extension type can be identified using the ID() method.

To implement a generic payload extension, simply derive a new class from this class and specify the name of the derived class as the extension parameter.

|

 class my_ID extends uvm_tlm_extension#(my_ID);
   int ID;

   `uvm_object_utils_begin(my_ID)
      `uvm_field_int(ID, UVM_ALL_ON)
   `uvm_object_utils_end

   function new(string name = "my_ID");
      super.new(name);
   endfunction
 endclass
Parameters

Name

Default value

Description

T

int

Typedefs

Name

Actual Type

Description

this_type

uvm_tlm_extension#(T)

Constructors

new(string name = "")

Function

new

creates a new extension object.

Parameters:

name (string)

Functions

ID()

Function

ID()

Return the unique ID of this TLM extension type. This method is used to identify the type of the extension to retrieve from a uvm_tlm_generic_payload instance, using the uvm_tlm_generic_payload::get_extension() method.

Return type:

this_type

get_type_handle()
Return type:

uvm_tlm_extension_base

get_type_handle_name()
create(string name = "")
Parameters:

name (string)

Return type:

uvm_object