[source]

Class uvm_tlm_extension

uvm_pkg::uvm_tlm_extension <T> + ID(): this_type + create(): uvm_object + get_type_handle(): uvm_tlm_extension_base + get_type_handle_name(): string

Inheritance Diagram of 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 = &quot;my_ID&quot;);
     super.new(name);
  endfunction
endclass
Parameters

Name

Default value

Description

T

int

Typedefs

Name

Actual Type

Description

this_type

uvm_tlm_extension#(T)

Constructors

function new ( string name ) [source]

creates a new extension object.

Functions

static function this_type ID ( ) [source]

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.

virtual function uvm_tlm_extension_base get_type_handle ( ) [source]

virtual function string get_type_handle_name ( ) [source]

virtual function uvm_object create ( string name ) [source]