[source]

Class uvm_pkg::uvm_tlm_generic_payload

Class

uvm_tlm_generic_payload

This class provides a transaction definition commonly used in memory-mapped bus-based systems. It's intended to be a general purpose transaction class that lends itself to many applications. The class is derived from uvm_sequence_item which enables it to be generated in sequences and transported to drivers through sequencers.

Constructors

new(string name = "")

Function

new

Create a new instance of the generic payload. Initialize all the members to their default values.

Parameters:

name (string)

Functions

do_print(uvm_printer printer)

Function- do_print

Parameters:

printer (uvm_printer)

do_copy(uvm_object rhs)

Function- do_copy

Parameters:

rhs (uvm_object)

do_compare(uvm_object rhs, uvm_comparer comparer)

Function- do_compare

Parameters:
do_pack(uvm_packer packer)

Function- do_pack

We only pack m_length bytes of the m_data array, even if m_data is larger than m_length. Same treatment for the byte-enable array. We do not pack the extensions, if any, as we will be unable to unpack them.

Parameters:

packer (uvm_packer)

do_unpack(uvm_packer packer)

Function- do_unpack

We only reallocate m_data/m_byte_enable if the new size is greater than their current size. We do not unpack extensions because we do not know what object types to allocate before we unpack into them. Extensions must be handled by user code.

Parameters:

packer (uvm_packer)

do_record(uvm_recorder recorder)

Function- do_record

Parameters:

recorder (uvm_recorder)

convert2string()

Function- convert2string

get_command()

Function

get_command

Get the value of the m_command variable

Return type:

uvm_tlm_command_e

set_command(uvm_tlm_command_e command)

Function

set_command

Set the value of the m_command variable

Parameters:

command (uvm_tlm_command_e)

is_read()

Function

is_read

Returns true if the current value of the m_command variable is UVM_TLM_READ_COMMAND .

set_read()

Function

set_read

Set the current value of the m_command variable to UVM_TLM_READ_COMMAND .

is_write()

Function

is_write

Returns true if the current value of the m_command variable is UVM_TLM_WRITE_COMMAND .

set_write()

Function

set_write

Set the current value of the m_command variable to UVM_TLM_WRITE_COMMAND .

set_address(bit[63:0] addr)

Function

set_address

Set the value of the m_address variable

Parameters:

addr (bit[63:0])

get_address()

Function

get_address

Get the value of the m_address variable

get_data(byte unsigned p)

Function

get_data

Return the value of the m_data array

Parameters:

p (byte unsigned)

set_data(byte unsigned p)

Function

set_data

Set the value of the m_data array

Parameters:

p (byte unsigned)

get_data_length()

Function

get_data_length

Return the current size of the m_data array

set_data_length(int unsigned length)

Function

set_data_length

Set the value of the m_length

Parameters:

length (int unsigned)

get_streaming_width()

Function

get_streaming_width

Get the value of the m_streaming_width array

set_streaming_width(int unsigned width)

Function

set_streaming_width

Set the value of the m_streaming_width array

Parameters:

width (int unsigned)

get_byte_enable(byte unsigned p)

Function

get_byte_enable

Return the value of the m_byte_enable array

Parameters:

p (byte unsigned)

set_byte_enable(byte unsigned p)

Function

set_byte_enable

Set the value of the m_byte_enable array

Parameters:

p (byte unsigned)

get_byte_enable_length()

Function

get_byte_enable_length

Return the current size of the m_byte_enable array

set_byte_enable_length(int unsigned length)

Function

set_byte_enable_length

Set the size m_byte_enable_length of the m_byte_enable array i.e. m_byte_enable.size()

Parameters:

length (int unsigned)

set_dmi_allowed(bit dmi)

Function

set_dmi_allowed

DMI hint. Set the internal flag m_dmi to allow dmi access

Parameters:

dmi (bit)

is_dmi_allowed()

Function

is_dmi_allowed

DMI hint. Query the internal flag m_dmi if allowed dmi access

get_response_status()

Function

get_response_status

Return the current value of the m_response_status variable

Return type:

uvm_tlm_response_status_e

set_response_status(uvm_tlm_response_status_e status)

Function

set_response_status

Set the current value of the m_response_status variable

Parameters:

status (uvm_tlm_response_status_e)

is_response_ok()

Function

is_response_ok

Return TRUE if the current value of the m_response_status variable is UVM_TLM_OK_RESPONSE

is_response_error()

Function

is_response_error

Return TRUE if the current value of the m_response_status variable is not UVM_TLM_OK_RESPONSE

get_response_string()

Function

get_response_string

Return the current value of the m_response_status variable as a string

set_extension(uvm_tlm_extension_base ext)

Function

set_extension

Add an instance-specific extension. Only one instance of any given extension type is allowed. If there is an existing extension instance of the type of ext , ext replaces it and its handle is returned. Otherwise, null is returned.

Parameters:

ext (uvm_tlm_extension_base)

Return type:

uvm_tlm_extension_base

get_num_extensions()

Function

get_num_extensions

Return the current number of instance specific extensions.

get_extension(uvm_tlm_extension_base ext_handle)

Function

get_extension

Return the instance specific extension bound under the specified key. If no extension is bound under that key, null is returned.

Parameters:

ext_handle (uvm_tlm_extension_base)

Return type:

uvm_tlm_extension_base

clear_extension(uvm_tlm_extension_base ext_handle)

Function

clear_extension

Remove the instance-specific extension bound under the specified key.

Parameters:

ext_handle (uvm_tlm_extension_base)

clear_extensions()

Function

clear_extensions

Remove all instance-specific extensions