uvm_reg_block

Block abstraction base class

A block represents a design hierarchy.  It can contain registers, register files, memories and sub-blocks.

A block has one or more address maps, each corresponding to a physical interface on the block.

Summary
uvm_reg_block
Block abstraction base class
Class Hierarchy
uvm_reg_block
Class Declaration
virtual class uvm_reg_block extends uvm_object
default_pathDefault access path for the registers and memories in this block.
Initialization
newCreate a new instance and type-specific configuration
configureInstance-specific configuration
create_mapCreate an address map in this block
check_data_widthCheck that the specified data width (in bits) is less than or equal to the value of `UVM_REG_DATA_WIDTH
set_default_mapDefines the default address map
default_mapDefault address map
lock_modelLock a model and build the address map.
is_lockedReturn TRUE if the model is locked.
Introspection
get_nameGet the simple name
get_full_nameGet the hierarchical name
get_parentGet the parent block
get_root_blocksGet the all root blocks
find_blocksFind the blocks whose hierarchical names match the specified name glob.
find_blockFind the first block whose hierarchical names match the specified name glob.
get_blocksGet the sub-blocks
get_mapsGet the address maps
get_registersGet the registers
get_fieldsGet the fields
get_virtual_registersGet the virtual registers
get_virtual_fieldsGet the virtual fields
get_block_by_nameFinds a sub-block with the specified simple name.
get_map_by_nameFinds an address map with the specified simple name.
get_reg_by_nameFinds a register with the specified simple name.
get_field_by_nameFinds a field with the specified simple name.
get_mem_by_nameFinds a memory with the specified simple name.
get_vreg_by_nameFinds a virtual register with the specified simple name.
get_vfield_by_nameFinds a virtual field with the specified simple name.
Coverage
build_coverageCheck if all of the specified coverage model must be built.
add_coverageSpecify that additional coverage models are available.
has_coverageCheck if block has coverage model(s)
set_coverageTurns on coverage measurement.
get_coverageCheck if coverage measurement is on.
sampleFunctional coverage measurement method
sample_valuesFunctional coverage measurement method for field values
Access
get_default_pathDefault access path
resetReset the mirror for this block.
needs_updateCheck if DUT registers need to be written
updateBatch update of register.
mirrorUpdate the mirrored values
write_reg_by_nameWrite the named register
read_reg_by_nameRead the named register
write_mem_by_nameWrite the named memory
read_mem_by_nameRead the named memory
Backdoor
get_backdoorGet the user-defined backdoor for all registers in this block
set_backdoorSet the user-defined backdoor for all registers in this block
clear_hdl_pathDelete HDL paths
add_hdl_pathAdd an HDL path
has_hdl_pathCheck if a HDL path is specified
get_hdl_pathGet the incremental HDL path(s)
get_full_hdl_pathGet the full hierarchical HDL path(s)
set_default_hdl_pathSet the default design abstraction
get_default_hdl_pathGet the default design abstraction
set_hdl_path_rootSpecify a root HDL path
is_hdl_path_rootCheck if this block has an absolute path

default_path

uvm_path_e default_path = UVM_DEFAULT_PATH

Default access path for the registers and memories in this block.

new

function new( string  name  =  "",
int  has_coverage  =  UVM_NO_COVERAGE )

Create a new instance and type-specific configuration

Creates an instance of a block abstraction class with the specified name.

has_coverage specifies which functional coverage models are present in the extension of the block abstraction class.  Multiple functional coverage models may be specified by adding their symbolic names, as defined by the uvm_coverage_model_e type.

configure

function void configure( uvm_reg_block  parent  =  null,
string  hdl_path  =  "" )

Instance-specific configuration

Specify the parent block of this block.  A block without parent is a root block.

If the block file corresponds to a hierarchical RTL structure, it’s contribution to the HDL path is specified as the hdl_path.  Otherwise, the block does not correspond to a hierarchical RTL structure (e.g. it is physically flattened) and does not contribute to the hierarchical HDL path of any contained registers or memories.

create_map

virtual function uvm_reg_map create_map( string  name,   
uvm_reg_addr_t  base_addr,   
int  unsigned  n_bytes,   
uvm_endianness_e  endian,   
bit  byte_addressing  =  )

Create an address map in this block

Create an address map with the specified name.  The base address is usually 0.  n_bytes specifies the number of bytes in the datapath that accesses this address map.  endian specifies the endianness, should a register or sub-map with a greater number of bytes be accessed.

APB = create_map("APB", 0, 1, UVM_LITTLE_ENDIAN);

check_data_width

protected static function bit check_data_width( int  unsigned  width )

Check that the specified data width (in bits) is less than or equal to the value of `UVM_REG_DATA_WIDTH

This method is designed to be called by a static initializer

class my_blk extends uvm_reg_block;
  local static bit m_data_width = check_data_width(356);
  ...
endclass

set_default_map

function void set_default_map ( uvm_reg_map  map )

Defines the default address map

Set the specified address map as the default_map for this block.  The address map must be a map of this address block.

default_map

uvm_reg_map default_map

Default address map

Default address map for this block, to be used when no address map is specified for a register operation and that register is accessible from more than one address map.

It is also the implciit address map for a block with a single, unamed address map because it has only one physical interface.

lock_model

virtual function void lock_model()

Lock a model and build the address map.

Recursively lock an entire register model and build the address maps to enable the uvm_reg_map::get_reg_by_offset() and uvm_reg_map::get_mem_by_offset() methods.

Once locked, no further structural changes, such as adding registers or memories, can be made.

It is not possible to unlock a model.

is_locked

function bit is_locked()

Return TRUE if the model is locked.

get_name

Get the simple name

Return the simple object name of this block.

get_full_name

virtual function string get_full_name()

Get the hierarchical name

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

get_parent

virtual function uvm_reg_block get_parent()

Get the parent block

If this a top-level block, returns null.

get_root_blocks

static function void get_root_blocks( ref  uvm_reg_block  blks[$] )

Get the all root blocks

Returns an array of all root blocks in the simulation.

find_blocks

static function int find_blocks( input  string  name,   
ref  uvm_reg_block  blks[$],   
input  uvm_reg_block  root  =  null,
input  uvm_object  accessor  =  null )

Find the blocks whose hierarchical names match the specified name glob.  If a root block is specified, the name of the blocks are relative to that block, otherwise they are absolute.

Returns the number of blocks found.

find_block

static function uvm_reg_block find_block( input  string  name,   
input  uvm_reg_block  root  =  null,
input  uvm_object  accessor  =  null )

Find the first block whose hierarchical names match the specified name glob.  If a root block is specified, the name of the blocks are relative to that block, otherwise they are absolute.

Returns the first block found or null otherwise.  A warning is issued if more than one block is found.

get_blocks

virtual function void get_blocks ( ref  uvm_reg_block  blks[$],   
input  uvm_hier_e  hier  =  UVM_HIER )

Get the sub-blocks

Get the blocks instantiated in this blocks.  If hier is TRUE, recursively includes any sub-blocks.

get_maps

virtual function void get_maps ( ref  uvm_reg_map  maps[$] )

Get the address maps

Get the address maps instantiated in this block.

get_registers

virtual function void get_registers ( ref  uvm_reg  regs[$],   
input  uvm_hier_e  hier  =  UVM_HIER )

Get the registers

Get the registers instantiated in this block.  If hier is TRUE, recursively includes the registers in the sub-blocks.

Note that registers may be located in different and/or multiple address maps.  To get the registers in a specific address map, use the uvm_reg_map::get_registers() method.

get_fields

virtual function void get_fields ( ref  uvm_reg_field  fields[$],   
input  uvm_hier_e  hier  =  UVM_HIER )

Get the fields

Get the fields in the registers instantiated in this block.  If hier is TRUE, recursively includes the fields of the registers in the sub-blocks.

get_virtual_registers

virtual function void get_virtual_registers( ref  uvm_vreg  regs[$],   
input  uvm_hier_e  hier  =  UVM_HIER )

Get the virtual registers

Get the virtual registers instantiated in this block.  If hier is TRUE, recursively includes the virtual registers in the sub-blocks.

get_virtual_fields

virtual function void get_virtual_fields ( ref  uvm_vreg_field  fields[$],   
input  uvm_hier_e  hier  =  UVM_HIER )

Get the virtual fields

Get the virtual fields from the virtual registers instantiated in this block.  If hier is TRUE, recursively includes the virtual fields in the virtual registers in the sub-blocks.

get_block_by_name

virtual function uvm_reg_block get_block_by_name ( string  name )

Finds a sub-block with the specified simple name.

The name is the simple name of the block, not a hierarchical name. relative to this block.  If no block with that name is found in this block, the sub-blocks are searched for a block of that name and the first one to be found is returned.

If no blocks are found, returns null.

get_map_by_name

virtual function uvm_reg_map get_map_by_name ( string  name )

Finds an address map with the specified simple name.

The name is the simple name of the address map, not a hierarchical name. relative to this block.  If no map with that name is found in this block, the sub-blocks are searched for a map of that name and the first one to be found is returned.

If no address maps are found, returns null.

get_reg_by_name

virtual function uvm_reg get_reg_by_name ( string  name )

Finds a register with the specified simple name.

The name is the simple name of the register, not a hierarchical name. relative to this block.  If no register with that name is found in this block, the sub-blocks are searched for a register of that name and the first one to be found is returned.

If no registers are found, returns null.

get_field_by_name

virtual function uvm_reg_field get_field_by_name ( string  name )

Finds a field with the specified simple name.

The name is the simple name of the field, not a hierarchical name. relative to this block.  If no field with that name is found in this block, the sub-blocks are searched for a field of that name and the first one to be found is returned.

If no fields are found, returns null.

get_mem_by_name

virtual function uvm_mem get_mem_by_name ( string  name )

Finds a memory with the specified simple name.

The name is the simple name of the memory, not a hierarchical name. relative to this block.  If no memory with that name is found in this block, the sub-blocks are searched for a memory of that name and the first one to be found is returned.

If no memories are found, returns null.

get_vreg_by_name

virtual function uvm_vreg get_vreg_by_name ( string  name )

Finds a virtual register with the specified simple name.

The name is the simple name of the virtual register, not a hierarchical name. relative to this block.  If no virtual register with that name is found in this block, the sub-blocks are searched for a virtual register of that name and the first one to be found is returned.

If no virtual registers are found, returns null.

get_vfield_by_name

virtual function uvm_vreg_field get_vfield_by_name ( string  name )

Finds a virtual field with the specified simple name.

The name is the simple name of the virtual field, not a hierarchical name. relative to this block.  If no virtual field with that name is found in this block, the sub-blocks are searched for a virtual field of that name and the first one to be found is returned.

If no virtual fields are found, returns null.

build_coverage

protected function uvm_reg_cvr_t build_coverage( uvm_reg_cvr_t  models )

Check if all of the specified coverage model must be built.

Check which of the specified coverage model must be built in this instance of the block abstraction class, as specified by calls to uvm_reg::include_coverage().

Models are specified by adding the symbolic value of individual coverage model as defined in uvm_coverage_model_e.  Returns the sum of all coverage models to be built in the block model.

add_coverage

virtual protected function void add_coverage( uvm_reg_cvr_t  models )

Specify that additional coverage models are available.

Add the specified coverage model to the coverage models available in this class.  Models are specified by adding the symbolic value of individual coverage model as defined in uvm_coverage_model_e.

This method shall be called only in the constructor of subsequently derived classes.

has_coverage

virtual function bit has_coverage( uvm_reg_cvr_t  models )

Check if block has coverage model(s)

Returns TRUE if the block abstraction class contains a coverage model for all of the models specified.  Models are specified by adding the symbolic value of individual coverage model as defined in uvm_coverage_model_e.

set_coverage

virtual function uvm_reg_cvr_t set_coverage( uvm_reg_cvr_t  is_on )

Turns on coverage measurement.

Turns the collection of functional coverage measurements on or off for this block and all blocks, registers, fields and memories within it.  The functional coverage measurement is turned on for every coverage model specified using uvm_coverage_model_e symbolic identifers.  Multiple functional coverage models can be specified by adding the functional coverage model identifiers.  All other functional coverage models are turned off.  Returns the sum of all functional coverage models whose measurements were previously on.

This method can only control the measurement of functional coverage models that are present in the various abstraction classes, then enabled during construction.  See the uvm_reg_block::has_coverage() method to identify the available functional coverage models.

get_coverage

virtual function bit get_coverage( uvm_reg_cvr_t  is_on  =  UVM_CVR_ALL )

Check if coverage measurement is on.

Returns TRUE if measurement for all of the specified functional coverage models are currently on.  Multiple functional coverage models can be specified by adding the functional coverage model identifiers.

See uvm_reg_block::set_coverage() for more details.

sample

protected virtual function void sample( uvm_reg_addr_t  offset,
bit  is_read,
uvm_reg_map  map )

Functional coverage measurement method

This method is invoked by the block abstraction class whenever an address within one of its address map is succesfully read or written.  The specified offset is the offset within the block, not an absolute address.

Empty by default, this method may be extended by the abstraction class generator to perform the required sampling in any provided functional coverage model.

sample_values

virtual function void sample_values()

Functional coverage measurement method for field values

This method is invoked by the user or by the uvm_reg_block::sample_values() method of the parent block to trigger the sampling of the current field values in the block-level functional coverage model.  It recursively invokes the uvm_reg_block::sample_values() and uvm_reg::sample_values() methods in the blocks and registers in this block.

This method may be extended by the abstraction class generator to perform the required sampling in any provided field-value functional coverage model.  If this method is extended, it MUST call super.sample_values().

get_default_path

virtual function uvm_path_e get_default_path()

Default access path

Returns the default access path for this block.

reset

virtual function void reset( string  kind  =  "HARD" )

Reset the mirror for this block.

Sets the mirror value of all registers in the block and sub-blocks to the reset value corresponding to the specified reset event.  See uvm_reg_field::reset() for more details.  Does not actually set the value of the registers in the design, only the values mirrored in their corresponding mirror.

needs_update

virtual function bit needs_update()

Check if DUT registers need to be written

If a mirror value has been modified in the abstraction model without actually updating the actual register (either through randomization or via the uvm_reg::set() method, the mirror and state of the registers are outdated.  The corresponding registers in the DUT need to be updated.

This method returns TRUE if the state of at lest one register in the block or sub-blocks needs to be updated to match the mirrored values.  The mirror values, or actual content of registers, are not modified.  For additional information, see uvm_reg_block::update() method.

update

virtual task update( output  uvm_status_e  status,   
input  uvm_path_e  path  =  UVM_DEFAULT_PATH,
input  uvm_sequence_base  parent  =  null,
input  int  prior  =  -1,
input  uvm_object  extension  =  null,
input  string  fname  =  "",
input  int  lineno  =  0 )

Batch update of register.

Using the minimum number of write operations, updates the registers in the design to match the mirrored values in this block and sub-blocks.  The update can be performed using the physical interfaces (front-door access) or back-door accesses.  This method performs the reverse operation of uvm_reg_block::mirror().

mirror

virtual task mirror( output  uvm_status_e  status,   
input  uvm_check_e  check  =  UVM_NO_CHECK,
input  uvm_path_e  path  =  UVM_DEFAULT_PATH,
input  uvm_sequence_base  parent  =  null,
input  int  prior  =  -1,
input  uvm_object  extension  =  null,
input  string  fname  =  "",
input  int  lineno  =  0 )

Update the mirrored values

Read all of the registers in this block and sub-blocks and update their mirror values to match their corresponding values in the design.  The mirroring can be performed using the physical interfaces (front-door access) or back-door accesses.  If the check argument is specified as UVM_CHECK, an error message is issued if the current mirrored value does not match the actual value in the design.  This method performs the reverse operation of uvm_reg_block::update().

write_reg_by_name

virtual task write_reg_by_name( output  uvm_status_e  status,   
input  string  name,   
input  uvm_reg_data_t  data,   
input  uvm_path_e  path  =  UVM_DEFAULT_PATH,
input  uvm_reg_map  map  =  null,
input  uvm_sequence_base  parent  =  null,
input  int  prior  =  -1,
input  uvm_object  extension  =  null,
input  string  fname  =  "",
input  int  lineno  =  0 )

Write the named register

Equivalent to get_reg_by_name() followed by uvm_reg::write()

read_reg_by_name

virtual task read_reg_by_name( output  uvm_status_e  status,   
input  string  name,   
output  uvm_reg_data_t  data,   
input  uvm_path_e  path  =  UVM_DEFAULT_PATH,
input  uvm_reg_map  map  =  null,
input  uvm_sequence_base  parent  =  null,
input  int  prior  =  -1,
input  uvm_object  extension  =  null,
input  string  fname  =  "",
input  int  lineno  =  0 )

Read the named register

Equivalent to get_reg_by_name() followed by uvm_reg::read()

write_mem_by_name

virtual task write_mem_by_name( output  uvm_status_e  status,   
input  string  name,   
input  uvm_reg_addr_t  offset,   
input  uvm_reg_data_t  data,   
input  uvm_path_e  path  =  UVM_DEFAULT_PATH,
input  uvm_reg_map  map  =  null,
input  uvm_sequence_base  parent  =  null,
input  int  prior  =  -1,
input  uvm_object  extension  =  null,
input  string  fname  =  "",
input  int  lineno  =  0 )

Write the named memory

Equivalent to get_mem_by_name() followed by uvm_mem::write()

read_mem_by_name

virtual task read_mem_by_name( output  uvm_status_e  status,   
input  string  name,   
input  uvm_reg_addr_t  offset,   
output  uvm_reg_data_t  data,   
input  uvm_path_e  path  =  UVM_DEFAULT_PATH,
input  uvm_reg_map  map  =  null,
input  uvm_sequence_base  parent  =  null,
input  int  prior  =  -1,
input  uvm_object  extension  =  null,
input  string  fname  =  "",
input  int  lineno  =  0 )

Read the named memory

Equivalent to get_mem_by_name() followed by uvm_mem::read()

get_backdoor

function uvm_reg_backdoor get_backdoor( bit  inherited  =  1 )

Get the user-defined backdoor for all registers in this block

Return the user-defined backdoor for all register in this block and all sub-blocks -- unless overriden by a backdoor set in a lower-level block or in the register itself.

If inherited is TRUE, returns the backdoor of the parent block if none have been specified for this block.

set_backdoor

function void set_backdoor ( uvm_reg_backdoor  bkdr,   
string  fname  =  "",
int  lineno  =  0 )

Set the user-defined backdoor for all registers in this block

Defines the backdoor mechanism for all registers instantiated in this block and sub-blocks, unless overriden by a definition in a lower-level block or register.

clear_hdl_path

function void clear_hdl_path ( string  kind  =  "RTL" )

Delete HDL paths

Remove any previously specified HDL path to the block instance for the specified design abstraction.

add_hdl_path

function void add_hdl_path ( string  path,   
string  kind  =  "RTL" )

Add an HDL path

Add the specified HDL path to the block instance for the specified design abstraction.  This method may be called more than once for the same design abstraction if the block is physically duplicated in the design abstraction

has_hdl_path

function bit has_hdl_path ( string  kind  =  "" )

Check if a HDL path is specified

Returns TRUE if the block instance has a HDL path defined for the specified design abstraction.  If no design abstraction is specified, uses the default design abstraction specified for this block or the nearest block ancestor with a specified default design abstraction.

get_hdl_path

function void get_hdl_path ( ref  string  paths[$],   
input  string  kind  =  "" )

Get the incremental HDL path(s)

Returns the HDL path(s) defined for the specified design abstraction in the block instance.  Returns only the component of the HDL paths that corresponds to the block, not a full hierarchical path

If no design asbtraction is specified, the default design abstraction for this block is used.

get_full_hdl_path

function void get_full_hdl_path ( ref  string  paths[$],   
input  string  kind  =  "",
string  separator  =  "." )

Get the full hierarchical HDL path(s)

Returns the full hierarchical HDL path(s) defined for the specified design abstraction in the block instance.  There may be more than one path returned even if only one path was defined for the block instance, if any of the parent components have more than one path defined for the same design abstraction

If no design asbtraction is specified, the default design abstraction for each ancestor block is used to get each incremental path.

set_default_hdl_path

function void set_default_hdl_path ( string  kind )

Set the default design abstraction

Set the default design abstraction for this block instance.

get_default_hdl_path

function string get_default_hdl_path ()

Get the default design abstraction

Returns the default design abstraction for this block instance.  If a default design abstraction has not been explicitly set for this block instance, returns the default design absraction for the nearest block ancestor.  Returns “” if no default design abstraction has been specified.

set_hdl_path_root

function void set_hdl_path_root ( string  path,   
string  kind  =  "RTL" )

Specify a root HDL path

Set the specified path as the absolute HDL path to the block instance for the specified design abstraction.  This absolute root path is preppended to all hierarchical paths under this block.  The HDL path of any ancestor block is ignored.  This method overrides any incremental path for the same design abstraction specified using add_hdl_path.

is_hdl_path_root

function bit is_hdl_path_root ( string  kind  =  "" )

Check if this block has an absolute path

Returns TRUE if an absolute HDL path to the block instance for the specified design abstraction has been defined.  If no design asbtraction is specified, the default design abstraction for this block is used.

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_reg_block extends uvm_object
Block abstraction base class
uvm_path_e default_path = UVM_DEFAULT_PATH
Default access path for the registers and memories in this block.
function new( string  name  =  "",
int  has_coverage  =  UVM_NO_COVERAGE )
Create a new instance and type-specific configuration
function void configure( uvm_reg_block  parent  =  null,
string  hdl_path  =  "" )
Instance-specific configuration
virtual function uvm_reg_map create_map( string  name,   
uvm_reg_addr_t  base_addr,   
int  unsigned  n_bytes,   
uvm_endianness_e  endian,   
bit  byte_addressing  =  )
Create an address map in this block
protected static function bit check_data_width( int  unsigned  width )
Check that the specified data width (in bits) is less than or equal to the value of `UVM_REG_DATA_WIDTH
function void set_default_map ( uvm_reg_map  map )
Defines the default address map
uvm_reg_map default_map
Default address map
virtual function void lock_model()
Lock a model and build the address map.
function bit is_locked()
Return TRUE if the model is locked.
virtual function string get_full_name()
Get the hierarchical name
virtual function uvm_reg_block get_parent()
Get the parent block
static function void get_root_blocks( ref  uvm_reg_block  blks[$] )
Get the all root blocks
static function int find_blocks( input  string  name,   
ref  uvm_reg_block  blks[$],   
input  uvm_reg_block  root  =  null,
input  uvm_object  accessor  =  null )
Find the blocks whose hierarchical names match the specified name glob.
static function uvm_reg_block find_block( input  string  name,   
input  uvm_reg_block  root  =  null,
input  uvm_object  accessor  =  null )
Find the first block whose hierarchical names match the specified name glob.
virtual function void get_blocks ( ref  uvm_reg_block  blks[$],   
input  uvm_hier_e  hier  =  UVM_HIER )
Get the sub-blocks
virtual function void get_maps ( ref  uvm_reg_map  maps[$] )
Get the address maps
virtual function void get_registers ( ref  uvm_reg  regs[$],   
input  uvm_hier_e  hier  =  UVM_HIER )
Get the registers
virtual function void get_fields ( ref  uvm_reg_field  fields[$],   
input  uvm_hier_e  hier  =  UVM_HIER )
Get the fields
virtual function void get_virtual_registers( ref  uvm_vreg  regs[$],   
input  uvm_hier_e  hier  =  UVM_HIER )
Get the virtual registers
virtual function void get_virtual_fields ( ref  uvm_vreg_field  fields[$],   
input  uvm_hier_e  hier  =  UVM_HIER )
Get the virtual fields
virtual function uvm_reg_block get_block_by_name ( string  name )
Finds a sub-block with the specified simple name.
virtual function uvm_reg_map get_map_by_name ( string  name )
Finds an address map with the specified simple name.
virtual function uvm_reg get_reg_by_name ( string  name )
Finds a register with the specified simple name.
virtual function uvm_reg_field get_field_by_name ( string  name )
Finds a field with the specified simple name.
virtual function uvm_mem get_mem_by_name ( string  name )
Finds a memory with the specified simple name.
virtual function uvm_vreg get_vreg_by_name ( string  name )
Finds a virtual register with the specified simple name.
virtual function uvm_vreg_field get_vfield_by_name ( string  name )
Finds a virtual field with the specified simple name.
protected function uvm_reg_cvr_t build_coverage( uvm_reg_cvr_t  models )
Check if all of the specified coverage model must be built.
virtual protected function void add_coverage( uvm_reg_cvr_t  models )
Specify that additional coverage models are available.
virtual function bit has_coverage( uvm_reg_cvr_t  models )
Check if block has coverage model(s)
virtual function uvm_reg_cvr_t set_coverage( uvm_reg_cvr_t  is_on )
Turns on coverage measurement.
virtual function bit get_coverage( uvm_reg_cvr_t  is_on  =  UVM_CVR_ALL )
Check if coverage measurement is on.
protected virtual function void sample( uvm_reg_addr_t  offset,
bit  is_read,
uvm_reg_map  map )
Functional coverage measurement method
virtual function void sample_values()
Functional coverage measurement method for field values
virtual function uvm_path_e get_default_path()
Default access path
virtual function void reset( string  kind  =  "HARD" )
Reset the mirror for this block.
virtual function bit needs_update()
Check if DUT registers need to be written
virtual task update( output  uvm_status_e  status,   
input  uvm_path_e  path  =  UVM_DEFAULT_PATH,
input  uvm_sequence_base  parent  =  null,
input  int  prior  =  -1,
input  uvm_object  extension  =  null,
input  string  fname  =  "",
input  int  lineno  =  0 )
Batch update of register.
virtual task mirror( output  uvm_status_e  status,   
input  uvm_check_e  check  =  UVM_NO_CHECK,
input  uvm_path_e  path  =  UVM_DEFAULT_PATH,
input  uvm_sequence_base  parent  =  null,
input  int  prior  =  -1,
input  uvm_object  extension  =  null,
input  string  fname  =  "",
input  int  lineno  =  0 )
Update the mirrored values
virtual task write_reg_by_name( output  uvm_status_e  status,   
input  string  name,   
input  uvm_reg_data_t  data,   
input  uvm_path_e  path  =  UVM_DEFAULT_PATH,
input  uvm_reg_map  map  =  null,
input  uvm_sequence_base  parent  =  null,
input  int  prior  =  -1,
input  uvm_object  extension  =  null,
input  string  fname  =  "",
input  int  lineno  =  0 )
Write the named register
virtual task read_reg_by_name( output  uvm_status_e  status,   
input  string  name,   
output  uvm_reg_data_t  data,   
input  uvm_path_e  path  =  UVM_DEFAULT_PATH,
input  uvm_reg_map  map  =  null,
input  uvm_sequence_base  parent  =  null,
input  int  prior  =  -1,
input  uvm_object  extension  =  null,
input  string  fname  =  "",
input  int  lineno  =  0 )
Read the named register
virtual task write_mem_by_name( output  uvm_status_e  status,   
input  string  name,   
input  uvm_reg_addr_t  offset,   
input  uvm_reg_data_t  data,   
input  uvm_path_e  path  =  UVM_DEFAULT_PATH,
input  uvm_reg_map  map  =  null,
input  uvm_sequence_base  parent  =  null,
input  int  prior  =  -1,
input  uvm_object  extension  =  null,
input  string  fname  =  "",
input  int  lineno  =  0 )
Write the named memory
virtual task read_mem_by_name( output  uvm_status_e  status,   
input  string  name,   
input  uvm_reg_addr_t  offset,   
output  uvm_reg_data_t  data,   
input  uvm_path_e  path  =  UVM_DEFAULT_PATH,
input  uvm_reg_map  map  =  null,
input  uvm_sequence_base  parent  =  null,
input  int  prior  =  -1,
input  uvm_object  extension  =  null,
input  string  fname  =  "",
input  int  lineno  =  0 )
Read the named memory
function uvm_reg_backdoor get_backdoor( bit  inherited  =  1 )
Get the user-defined backdoor for all registers in this block
function void set_backdoor ( uvm_reg_backdoor  bkdr,   
string  fname  =  "",
int  lineno  =  0 )
Set the user-defined backdoor for all registers in this block
function void clear_hdl_path ( string  kind  =  "RTL" )
Delete HDL paths
function void add_hdl_path ( string  path,   
string  kind  =  "RTL" )
Add an HDL path
function bit has_hdl_path ( string  kind  =  "" )
Check if a HDL path is specified
function void get_hdl_path ( ref  string  paths[$],   
input  string  kind  =  "" )
Get the incremental HDL path(s)
function void get_full_hdl_path ( ref  string  paths[$],   
input  string  kind  =  "",
string  separator  =  "." )
Get the full hierarchical HDL path(s)
function void set_default_hdl_path ( string  kind )
Set the default design abstraction
function string get_default_hdl_path ()
Get the default design abstraction
function void set_hdl_path_root ( string  path,   
string  kind  =  "RTL" )
Specify a root HDL path
function bit is_hdl_path_root ( string  kind  =  "" )
Check if this block has an absolute path
Coverage models available or desired.
virtual function uvm_reg get_reg_by_offset( uvm_reg_addr_t  offset,   
bit  read  =  1 )
Get register mapped at offset
virtual function uvm_mem get_mem_by_offset( uvm_reg_addr_t  offset )
Get memory mapped at offset
virtual function void get_registers ( ref  uvm_reg  regs[$],   
input  uvm_hier_e  hier  =  UVM_HIER )
Get the registers
static function void include_coverage( string  scope,   
uvm_reg_cvr_t  models,   
uvm_object  accessor  =  null )
Specify which coverage model that must be included in various block, register or memory abstraction class instances.
virtual function void sample_values()
Functional coverage measurement method for field values
virtual function void reset( string  kind  =  "HARD" )
Reset the desired/mirrored value for this field.
virtual function void set ( uvm_reg_data_t  value,   
string  fname  =  "",
int  lineno  =  0 )
Set the desired value for this register
Read and check
virtual task write( output  uvm_status_e  status,   
input  uvm_reg_data_t  value,   
input  uvm_path_e  path  =  UVM_DEFAULT_PATH,
input  uvm_reg_map  map  =  null,
input  uvm_sequence_base  parent  =  null,
input  int  prior  =  -1,
input  uvm_object  extension  =  null,
input  string  fname  =  "",
input  int  lineno  =  0 )
Write the specified value in this register
virtual task read( output  uvm_status_e  status,   
output  uvm_reg_data_t  value,   
input  uvm_path_e  path  =  UVM_DEFAULT_PATH,
input  uvm_reg_map  map  =  null,
input  uvm_sequence_base  parent  =  null,
input  int  prior  =  -1,
input  uvm_object  extension  =  null,
input  string  fname  =  "",
input  int  lineno  =  0 )
Read the current value from this register
virtual task write( output  uvm_status_e  status,   
input  uvm_reg_addr_t  offset,   
input  uvm_reg_data_t  value,   
input  uvm_path_e  path  =  UVM_DEFAULT_PATH,
input  uvm_reg_map  map  =  null,
input  uvm_sequence_base  parent  =  null,
input  int  prior  =  -1,
input  uvm_object  extension  =  null,
input  string  fname  =  "",
input  int  lineno  =  0 )
Write the specified value in a memory location
virtual task read( output  uvm_status_e  status,   
input  uvm_reg_addr_t  offset,   
output  uvm_reg_data_t  value,   
input  uvm_path_e  path  =  UVM_DEFAULT_PATH,
input  uvm_reg_map  map  =  null,
input  uvm_sequence_base  parent  =  null,
input  int  prior  =  -1,
input  uvm_object  extension  =  null,
input  string  fname  =  "",
input  int  lineno  =  0 )
Read the current value from a memory location