uvm_reg_field

UVMkit » 1800.2-2020

This is an implementation of uvm_reg_field as described in 1800.2 with the addition of API described below.

Summary
uvm_reg_field
This is an implementation of uvm_reg_field as described in 1800.2 with the addition of API described below.
Class Hierarchy
uvm_reg_field
Class Declaration
class uvm_reg_field extends uvm_object
valueMirrored field value.
Initialization
Introspection
get_nameGet the simple name
get_full_nameGet the hierarchical name
get_lsb_posReturn the position of the field
get_n_bitsReturns the width, in number of bits, of the field.
get_max_sizeReturns the width, in number of bits, of the largest field.
set_rand_modeModifies the rand_mode for the field instance to the specified one
get_rand_modeReturns the rand_mode of the field instance
get_accessGet the access policy of the field
Access
Callbacks

value

rand uvm_reg_data_t value

Mirrored field value.  This value can be sampled in a functional coverage model or constrained when randomized.

get_name

Get the simple name

Return the simple object name of this field

get_full_name

virtual function string get_full_name()

Get the hierarchical name

Return the hierarchal name of this field The base of the hierarchical name is the root block.

get_lsb_pos

virtual function int unsigned get_lsb_pos()

Return the position of the field

Returns the index of the least significant bit of the field in the register that instantiates it.  An offset of 0 indicates a field that is aligned with the least-significant bit of the register.

get_n_bits

virtual function int unsigned get_n_bits()

Returns the width, in number of bits, of the field.

get_max_size

static function int unsigned get_max_size()

Returns the width, in number of bits, of the largest field.

set_rand_mode

virtual function void set_rand_mode( bit  rand_mode )

Modifies the rand_mode for the field instance to the specified one

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

get_rand_mode

virtual function bit get_rand_mode()

Returns the rand_mode of the field instance

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

get_access

virtual function string get_access( uvm_reg_map  map  =  null )

Get the access policy of the field

Returns the current access policy of the field when written and read through the specified address map.  If the register containing the field is mapped in multiple address map, an address map must be specified.  The access policy of a field from a specific address map may be restricted by the register’s access policy in that address map.  For example, a RW field may only be writable through one of the address maps and read-only through all of the other maps.  If the field access contradicts the map’s access value (field access of WO, and map access value of RO, etc), the method’s return value is NOACCESS.

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.
class uvm_reg_field extends uvm_object
This is an implementation of uvm_reg_field as described in 1800.2 with the addition of API described below.
rand uvm_reg_data_t value
Mirrored field value.
virtual function string get_full_name()
Get the hierarchical name
virtual function int unsigned get_lsb_pos()
Return the position of the field
virtual function int unsigned get_n_bits()
Returns the width, in number of bits, of the field.
static function int unsigned get_max_size()
Returns the width, in number of bits, of the largest field.
virtual function void set_rand_mode( bit  rand_mode )
Modifies the rand_mode for the field instance to the specified one
virtual function bit get_rand_mode()
Returns the rand_mode of the field instance
virtual function string get_access( uvm_reg_map  map  =  null )
Get the access policy of the field