Generic Register Operation Descriptors

This section defines the abstract register transaction item.  It also defines a descriptor for a physical bus operation that is used by uvm_reg_adapter subtypes to convert from a protocol-specific address/data/rw operation to a bus-independent, canonical r/w operation.

Contents
Generic Register Operation DescriptorsThis section defines the abstract register transaction item.
uvm_reg_itemDefines an abstract register transaction item.
uvm_reg_bus_opStruct that defines a generic bus transaction for register and memory accesses, having kind (read or write), address, data, and byte enable information.

uvm_reg_item

Defines an abstract register transaction item.  No bus-specific information is present, although a handle to a uvm_reg_map is provided in case a user wishes to implement a custom address translation algorithm.

Summary
uvm_reg_item
Defines an abstract register transaction item.
Class Hierarchy
Class Declaration
class uvm_reg_item extends uvm_sequence_item
Variables
element_kindKind of element being accessed: REG, MEM, or FIELD.
elementA handle to the RegModel model element associated with this transaction.
kindKind of access: READ or WRITE.
valueThe value to write to, or after completion, the value read from the DUT.
offsetFor memory accesses, the offset address.
statusThe result of the transaction: IS_OK, HAS_X, or ERROR.
local_mapThe local map used to obtain addresses.
mapThe original map specified for the operation.
pathThe path being used: UVM_FRONTDOOR or UVM_BACKDOOR.
parentThe sequence from which the operation originated.
priorThe priority requested of this transfer, as defined by uvm_sequence_base::start_item.
extensionHandle to optional user data, as conveyed in the call to write(), read(), mirror(), or update() used to trigger the operation.
bd_kindIf path is UVM_BACKDOOR, this member specifies the abstraction kind for the backdoor access, e.g.
fnameThe file name from where this transaction originated, if provided at the call site.
linenoThe file name from where this transaction originated, if provided at the call site.
Methods
newCreate a new instance of this type, giving it the optional name.
convert2stringReturns a string showing the contents of this transaction.
do_copyCopy the rhs object into this object.

element_kind

uvm_elem_kind_e element_kind

Kind of element being accessed: REG, MEM, or FIELD.  See uvm_elem_kind_e.

element

uvm_object element

A handle to the RegModel model element associated with this transaction.  Use element_kind to determine the type to cast to: uvm_reg, uvm_mem, or uvm_reg_field.

kind

rand uvm_access_e kind

Kind of access: READ or WRITE.

value

rand uvm_reg_data_t value[]

The value to write to, or after completion, the value read from the DUT.  Burst operations use the values property.

offset

rand uvm_reg_addr_t offset

For memory accesses, the offset address.  For bursts, the starting offset address.

status

uvm_status_e status

The result of the transaction: IS_OK, HAS_X, or ERROR.  See uvm_status_e.

local_map

uvm_reg_map local_map

The local map used to obtain addresses.  Users may customize address-translation using this map.  Access to the sequencer and bus adapter can be obtained by getting this map’s root map, then calling uvm_reg_map::get_sequencer and uvm_reg_map::get_adapter.

map

uvm_reg_map map

The original map specified for the operation.  The actual map used may differ when a test or sequence written at the block level is reused at the system level.

path

uvm_path_e path

The path being used: UVM_FRONTDOOR or UVM_BACKDOOR.

parent

rand uvm_sequence_base parent

The sequence from which the operation originated.

prior

int prior = -1

The priority requested of this transfer, as defined by uvm_sequence_base::start_item.

extension

rand uvm_object extension

Handle to optional user data, as conveyed in the call to write(), read(), mirror(), or update() used to trigger the operation.

bd_kind

string bd_kind

If path is UVM_BACKDOOR, this member specifies the abstraction kind for the backdoor access, e.g.  “RTL” or “GATES”.

fname

string fname

The file name from where this transaction originated, if provided at the call site.

lineno

int lineno

The file name from where this transaction originated, if provided at the call site.

new

function new(
    string  name  =  ""
)

Create a new instance of this type, giving it the optional name.

convert2string

virtual function string convert2string()

Returns a string showing the contents of this transaction.

do_copy

virtual function void do_copy(
    uvm_object  rhs
)

Copy the rhs object into this object.  The rhs object must derive from uvm_reg_item.

uvm_reg_bus_op

Struct that defines a generic bus transaction for register and memory accesses, having kind (read or write), address, data, and byte enable information.  If the bus is narrower than the register or memory location being accessed, there will be multiple of these bus operations for every abstract uvm_reg_item transaction.  In this case, data represents the portion of uvm_reg_item::value being transferred during this bus cycle.  If the bus is wide enough to perform the register or memory operation in a single cycle, data will be the same as uvm_reg_item::value.

Summary
uvm_reg_bus_op
Struct that defines a generic bus transaction for register and memory accesses, having kind (read or write), address, data, and byte enable information.
Variables
kindKind of access: READ or WRITE.
addrThe bus address.
dataThe data to write.
n_bitsThe number of bits of uvm_reg_item::value being transferred by this transaction.
byte_enEnables for the byte lanes on the bus.
statusThe result of the transaction: UVM_IS_OK, UVM_HAS_X, UVM_NOT_OK.

kind

uvm_access_e kind

Kind of access: READ or WRITE.

addr

uvm_reg_addr_t addr

The bus address.

data

uvm_reg_data_t data

The data to write.  If the bus width is smaller than the register or memory width, data represents only the portion of value that is being transferred this bus cycle.

n_bits

int n_bits

The number of bits of uvm_reg_item::value being transferred by this transaction.

byte_en

uvm_reg_byte_en_t byte_en

Enables for the byte lanes on the bus.  Meaningful only when the bus supports byte enables and the operation originates from a field write/read.

status

uvm_status_e status

The result of the transaction: UVM_IS_OK, UVM_HAS_X, UVM_NOT_OK.  See uvm_status_e.

class uvm_reg_item extends uvm_sequence_item
Defines an abstract register transaction item.
virtual class uvm_reg_adapter extends uvm_object
This class defines an interface for converting between uvm_reg_bus_op and a specific bus transaction.
virtual class uvm_void
The uvm_void class is the base class for all UVM classes.
virtual class uvm_object extends uvm_void
The uvm_object class is the base class for all UVM data and hierarchical classes.
virtual class uvm_transaction extends uvm_object
The uvm_transaction class is the root base class for UVM transactions.
class uvm_sequence_item extends uvm_transaction
The base class for user-defined sequence items and also the base class for the uvm_sequence class.
uvm_elem_kind_e element_kind
Kind of element being accessed: REG, MEM, or FIELD.
uvm_object element
A handle to the RegModel model element associated with this transaction.
rand uvm_access_e kind
Kind of access: READ or WRITE.
rand uvm_reg_data_t value[]
The value to write to, or after completion, the value read from the DUT.
rand uvm_reg_addr_t offset
For memory accesses, the offset address.
uvm_status_e status
The result of the transaction: IS_OK, HAS_X, or ERROR.
uvm_reg_map local_map
The local map used to obtain addresses.
uvm_reg_map map
The original map specified for the operation.
uvm_path_e path
The path being used: UVM_FRONTDOOR or UVM_BACKDOOR.
Use the front door
Use the back door
rand uvm_sequence_base parent
The sequence from which the operation originated.
int prior = -1
The priority requested of this transfer, as defined by uvm_sequence_base::start_item.
virtual task start_item (
    uvm_sequence_item  item,   
    int  set_priority  =  -1,
    uvm_sequencer_base  sequencer  =  null
)
start_item and finish_item together will initiate operation of a sequence item.
rand uvm_object extension
Handle to optional user data, as conveyed in the call to write(), read(), mirror(), or update() used to trigger the operation.
string bd_kind
If path is UVM_BACKDOOR, this member specifies the abstraction kind for the backdoor access, e.g.
string fname
The file name from where this transaction originated, if provided at the call site.
int lineno
The file name from where this transaction originated, if provided at the call site.
function new(
    string  name  =  ""
)
Create a new instance of this type, giving it the optional name.
virtual function string convert2string()
Returns a string showing the contents of this transaction.
virtual function void do_copy(
    uvm_object  rhs
)
Copy the rhs object into this object.
class uvm_reg_map extends uvm_object
Type of element being read or written
virtual class uvm_reg extends uvm_object
Register abstraction base class
class uvm_mem extends uvm_object
Memory abstraction base class
class uvm_reg_field extends uvm_object
Field abstraction class
Return status for register operations
virtual function uvm_sequencer_base get_sequencer (
    uvm_hier_e  hier  =  UVM_HIER
)
Gets the sequencer for the bus associated with this map.
virtual function uvm_reg_adapter get_adapter (
    uvm_hier_e  hier  =  UVM_HIER
)
Gets the bus adapter for the bus associated with this map.
uvm_access_e kind
Kind of access: READ or WRITE.
uvm_reg_addr_t addr
The bus address.
uvm_reg_data_t data
The data to write.
int n_bits
The number of bits of uvm_reg_item::value being transferred by this transaction.
uvm_reg_byte_en_t byte_en
Enables for the byte lanes on the bus.
uvm_status_e status
The result of the transaction: UVM_IS_OK, UVM_HAS_X, UVM_NOT_OK.