uvm_tlm_generic_payload

UVMkit » 1800.2-2017

Implementation of uvm_tlm_generic_payload, as described in section 12.3.4.2.1 of 1800.2-2017.

Summary
uvm_tlm_generic_payload
Implementation of uvm_tlm_generic_payload, as described in section 12.3.4.2.1 of 1800.2-2017.
Methods
do_compareCompares this generic payload to rhs.
do_packPacks the fields of the payload in packer.
do_unpackUnpacks the fields of the payload from packer.

do_compare

function bit do_compare(
    uvm_object  rhs,
    uvm_comparer  comparer
)

Compares this generic payload to rhs.

The do_compare method compares the fields of this instance to to those of rhs.  All fields are compared, however if byte enables are being used, then non-enabled bytes of data are skipped.

@uvm-contrib This API is being considered for potential contribution to 1800.2

do_pack

function void do_pack(
    uvm_packer  packer
)

Packs the fields of the payload in packer.

Fields are packed in the following order

  • <m_address>
  • <m_command>
  • <m_length>
  • <m_dmi>
  • <m_data> (if <m_length> is greater than 0)
  • <m_response_status>
  • <m_byte_enable_length>
  • <m_byte_enable> (if <m_byte_enable_length> is greater than 0)
  • <m_streaming_width>

Only <m_length> bytes of the <m_data> array are packed, and a fatal message is generated if m_data.size() is less than <m_length>.  The same is true for <m_byte_enable_length> and <m_byte_enable>.

Note: The extensions are not packed.

@uvm-contrib This API is being considered for potential contribution to 1800.2

do_unpack

function void do_unpack(
    uvm_packer  packer
)

Unpacks the fields of the payload from packer.

The <m_data>/<m_byte_enable> arrays are reallocated if the new size is greater than their current size; otherwise the existing array allocations are kept.

Note: The extensions are not unpacked.

@uvm-contrib This API is being considered for potential contribution to 1800.2

function bit do_compare(
    uvm_object  rhs,
    uvm_comparer  comparer
)
Compares this generic payload to rhs.
function void do_pack(
    uvm_packer  packer
)
Packs the fields of the payload in packer.
function void do_unpack(
    uvm_packer  packer
)
Unpacks the fields of the payload from packer.