[source]

Class uvm_pkg::uvm_reg_map

uvm_pkg::uvm_reg_map + type_name : string + Xget_bus_infoX(): void + Xinit_address_mapX(): void + Xverify_map_configX(): void + __m_uvm_field_automation(): void + add_mem(): void + add_parent_map(): void + add_reg(): void + add_submap(): void + backdoor(): uvm_reg_map + clone(): uvm_object + configure(): void + convert2string(): string + create(): uvm_object + do_bus_read() + do_bus_write() + do_copy(): void + do_print(): void + do_read() + do_write() + get_adapter(): uvm_reg_adapter + get_addr_unit_bytes(): int unsigned + get_auto_predict(): bit + get_base_addr(): uvm_reg_addr_t + get_check_on_read(): bit + get_endian(): uvm_endianness_e + get_fields(): void + get_full_name(): string + get_mem_by_offset(): uvm_mem + get_mem_map_info(): uvm_reg_map_info + get_memories(): void + get_n_bytes(): int unsigned + get_object_type(): uvm_object_wrapper + get_parent(): uvm_reg_block + get_parent_map(): uvm_reg_map + get_physical_addresses(): int + get_reg_by_offset(): uvm_reg + get_reg_map_info(): uvm_reg_map_info + get_registers(): void + get_root_map(): uvm_reg_map + get_sequencer(): uvm_sequencer_base + get_size(): int unsigned + get_submap_offset(): uvm_reg_addr_t + get_submaps(): void + get_transaction_order_policy(): uvm_reg_transaction_order_policy + get_type(): type_id + get_type_name(): string + get_virtual_fields(): void + get_virtual_registers(): void + m_set_mem_offset(): void + m_set_reg_offset(): void + reset(): void + set_auto_predict(): void + set_base_addr(): void + set_check_on_read(): void + set_sequencer(): void + set_submap_offset(): void + set_transaction_order_policy(): void dv_base_reg_pkg::dv_base_reg_map

Inheritance Diagram of uvm_reg_map

Class

uvm_reg_map

Address map abstraction class

This class represents an address map. An address map is a collection of registers and memories accessible via a specific physical interface. Address maps can be composed into higher-level address maps.

Address maps are created using the uvm_reg_block::create_map() method.

Assertions

Name

Kind

Description

uvm_pkg::uvm_reg_map.[anonymous]

immediate assert

$cast(seq, o)

uvm_pkg::uvm_reg_map.[anonymous]

immediate assert

$cast(seq, o)

Constructors

new(string name = "uvm_reg_map")

Function

new

Create a new instance. New

Parameters:

name (string)

Functions

Xinit_address_mapX()

Xinit_address_mapXlocal

backdoor()

Function

backdoor

Return the backdoor pseudo-map singleton

This pseudo-map is used to specify or configure the backdoor instead of a real address map.

Return type:

uvm_reg_map

configure(uvm_reg_block parent, uvm_reg_addr_t base_addr, int unsigned n_bytes, uvm_endianness_e endian, bit byte_addressing = 1)

Function

configure

Instance-specific configuration

Configures this map with the following properties.

parent

the block in which this map is created and applied

base_addr

the base address for this map. All registers, memories, and sub-blocks will be at offsets to this address

n_bytes

the byte-width of the bus on which this map is used

endian

the endian format. See uvm_endianness_e for possible values

byte_addressing

specifies whether the address increment is on a per-byte basis. For example, consecutive memory locations with n_bytes =4 (32-bit bus) are 4 apart: 0, 4, 8, and so on. Default is TRUE. Configure

Parameters:
add_reg(uvm_reg rg, uvm_reg_addr_t offset, string rights = "RW", bit unmapped = 0, uvm_reg_frontdoor frontdoor = null)

Function

add_reg

Add a register

Add the specified register instance rg to this address map.

The register is located at the specified address offset from this maps configured base address.

The rights specify the register's accessibility via this map. Valid values are "RW", "RO", and "WO". Whether a register field can be read or written depends on both the field's configured access policy (see uvm_reg_field::configure and the register's rights in the map being used to access the field.

The number of consecutive physical addresses occupied by the register depends on the width of the register and the number of bytes in the physical interface corresponding to this address map.

If unmapped is TRUE, the register does not occupy any physical addresses and the base address is ignored. Unmapped registers require a user-defined frontdoor to be specified.

A register may be added to multiple address maps if it is accessible from multiple physical interfaces. A register may only be added to an address map whose parent block is the same as the register's parent block. Add_reg

Parameters:
add_mem(uvm_mem mem, uvm_reg_addr_t offset, string rights = "RW", bit unmapped = 0, uvm_reg_frontdoor frontdoor = null)

Function

add_mem

Add a memory

Add the specified memory instance to this address map. The memory is located at the specified base address and has the specified access rights ("RW", "RO" or "WO"). The number of consecutive physical addresses occupied by the memory depends on the width and size of the memory and the number of bytes in the physical interface corresponding to this address map.

If unmapped is TRUE, the memory does not occupy any physical addresses and the base address is ignored. Unmapped memories require a user-defined frontdoor to be specified.

A memory may be added to multiple address maps if it is accessible from multiple physical interfaces. A memory may only be added to an address map whose parent block is the same as the memory's parent block. Add_mem

Parameters:
add_submap(uvm_reg_map child_map, uvm_reg_addr_t offset)

Function

add_submap

Add an address map

Add the specified address map instance to this address map. The address map is located at the specified base address. The number of consecutive physical addresses occupied by the submap depends on the number of bytes in the physical interface that corresponds to the submap, the number of addresses used in the submap and the number of bytes in the physical interface corresponding to this address map.

An address map may be added to multiple address maps if it is accessible from multiple physical interfaces. An address map may only be added to an address map in the grand-parent block of the address submap. Add_submap

Parameters:
set_sequencer(uvm_sequencer_base sequencer, uvm_reg_adapter adapter = null)

Function

set_sequencer

Set the sequencer and adapter associated with this map. This method must be called before starting any sequences based on uvm_reg_sequence. Set_sequencer

Parameters:
set_submap_offset(uvm_reg_map submap, uvm_reg_addr_t offset)

Function

set_submap_offset

Set the offset of the given submap to offset . Set_submap_offset

Parameters:
get_submap_offset(uvm_reg_map submap)

Function

get_submap_offset

Return the offset of the given submap . Get_submap_offset

Parameters:

submap (uvm_reg_map)

Return type:

uvm_reg_addr_t

set_base_addr(uvm_reg_addr_t offset)

Function

set_base_addr

Set the base address of this map. Set_base_addr

Parameters:

offset (uvm_reg_addr_t)

reset(string kind = "SOFT")

Function

reset

Reset the mirror for all registers in this address map.

Sets the mirror value of all registers in this address map and all of its submaps 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.

Note that, unlike the other reset() method, the default reset event for this method is "SOFT". Reset

Parameters:

kind (string)

add_parent_map(uvm_reg_map parent_map, uvm_reg_addr_t offset)

Add_parent_map

Parameters:
Xverify_map_configX()

Local

m_set_reg_offset(uvm_reg rg, uvm_reg_addr_t offset, bit unmapped)

M_set_reg_offset

Parameters:
m_set_mem_offset(uvm_mem mem, uvm_reg_addr_t offset, bit unmapped)

M_set_mem_offset

Parameters:
get_full_name()

Function

get_full_name

Get the hierarchical name

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

get_root_map()

Function

get_root_map

Get the externally-visible address map

Get the top-most address map where this address map is instantiated. It corresponds to the externally-visible address map that can be accessed by the verification environment. Get_root_map

Return type:

uvm_reg_map

get_parent()

Function

get_parent

Get the parent block

Return the block that is the parent of this address map. Get_parent

Return type:

uvm_reg_block

get_parent_map()

Function

get_parent_map

Get the higher-level address map

Return the address map in which this address map is mapped. returns null if this is a top-level address map. Get_parent_map

Return type:

uvm_reg_map

get_base_addr(uvm_hier_e hier = UVM_HIER)

Function

get_base_addr

Get the base offset address for this map. If this map is the root map, the base address is that set with the base_addr argument to uvm_reg_block::create_map(). If this map is a submap of a higher-level map, the base address is offset given this submap by the parent map. See set_submap_offset. Get_base_addr

Parameters:

hier (uvm_hier_e)

Return type:

uvm_reg_addr_t

get_n_bytes(uvm_hier_e hier = UVM_HIER)

Function

get_n_bytes

Get the width in bytes of the bus associated with this map. If hier is UVM_HIER , then gets the effective bus width relative to the system level. The effective bus width is the narrowest bus width from this map to the top-level root map. Each bus access will be limited to this bus width. Get_n_bytes

Parameters:

hier (uvm_hier_e)

get_addr_unit_bytes()

Function

get_addr_unit_bytes

Get the number of bytes in the smallest addressable unit in the map. Returns 1 if the address map was configured using byte-level addressing. Returns get_n_bytes() otherwise. Get_addr_unit_bytes

get_endian(uvm_hier_e hier = UVM_HIER)

Function

get_base_addr

Gets the endianness of the bus associated with this map. If hier is set to UVM_HIER , gets the system-level endianness. Get_endian

Parameters:

hier (uvm_hier_e)

Return type:

uvm_endianness_e

get_sequencer(uvm_hier_e hier = UVM_HIER)

Function

get_sequencer

Gets the sequencer for the bus associated with this map. If hier is set to UVM_HIER , gets the sequencer for the bus at the system-level. See set_sequencer. Get_sequencer

Parameters:

hier (uvm_hier_e)

Return type:

uvm_sequencer_base

get_adapter(uvm_hier_e hier = UVM_HIER)

Function

get_adapter

Gets the bus adapter for the bus associated with this map. If hier is set to UVM_HIER , gets the adapter for the bus used at the system-level. See set_sequencer. Get_adapter

Parameters:

hier (uvm_hier_e)

Return type:

uvm_reg_adapter

get_submaps(uvm_reg_map maps, uvm_hier_e hier = UVM_HIER)

Function

get_submaps

Get the address sub-maps

Get the address maps instantiated in this address map. If hier is UVM_HIER , recursively includes the address maps, in the sub-maps. Get_submaps

Parameters:
get_registers(uvm_reg regs, uvm_hier_e hier = UVM_HIER)

Function

get_registers

Get the registers

Get the registers instantiated in this address map. If hier is UVM_HIER , recursively includes the registers in the sub-maps. Get_registers

Parameters:
get_fields(uvm_reg_field fields, uvm_hier_e hier = UVM_HIER)

Function

get_fields

Get the fields

Get the fields in the registers instantiated in this address map. If hier is UVM_HIER , recursively includes the fields of the registers in the sub-maps. Get_fields

Parameters:
get_memories(uvm_mem mems, uvm_hier_e hier = UVM_HIER)

Function

get_memories

Get the memories

Get the memories instantiated in this address map. If hier is UVM_HIER , recursively includes the memories in the sub-maps. Get_memories

Parameters:
get_virtual_registers(uvm_vreg regs, uvm_hier_e hier = UVM_HIER)

Function

get_virtual_registers

Get the virtual registers

Get the virtual registers instantiated in this address map. If hier is UVM_HIER , recursively includes the virtual registers in the sub-maps. Get_virtual_registers

Parameters:
get_virtual_fields(uvm_vreg_field fields, uvm_hier_e hier = UVM_HIER)

Function

get_virtual_fields

Get the virtual fields

Get the virtual fields from the virtual registers instantiated in this address map. If hier is UVM_HIER , recursively includes the virtual fields in the virtual registers in the sub-maps. Get_virtual_fields

Parameters:
get_reg_map_info(uvm_reg rg, bit error = 1)

Get_reg_map_info

Parameters:
Return type:

uvm_reg_map_info

get_mem_map_info(uvm_mem mem, bit error = 1)

Get_mem_map_info

Parameters:
Return type:

uvm_reg_map_info

get_size()

Get_size

get_physical_addresses(uvm_reg_addr_t base_addr, uvm_reg_addr_t mem_offset, int unsigned n_bytes, uvm_reg_addr_t addr)

Function

get_physical_addresses

Translate a local address into external addresses

Identify the sequence of addresses that must be accessed physically to access the specified number of bytes at the specified address within this address map. Returns the number of bytes of valid data in each access.

Returns in addr a list of address in little endian order, with the granularity of the top-level address map.

A register is specified using a base address with mem_offset as 0. A location within a memory is specified using the base address of the memory and the index of the location within that memory. Get_physical_addresses

Parameters:
get_reg_by_offset(uvm_reg_addr_t offset, bit read = 1)

Function

get_reg_by_offset

Get register mapped at offset

Identify the register located at the specified offset within this address map for the specified type of access. Returns null if no such register is found.

The model must be locked using uvm_reg_block::lock_model() to enable this functionality. Get_reg_by_offset

Parameters:
Return type:

uvm_reg

get_mem_by_offset(uvm_reg_addr_t offset)

Function

get_mem_by_offset

Get memory mapped at offset

Identify the memory located at the specified offset within this address map. The offset may refer to any memory location in that memory. Returns null if no such memory is found.

The model must be locked using uvm_reg_block::lock_model() to enable this functionality. Get_mem_by_offset

Parameters:

offset (uvm_reg_addr_t)

Return type:

uvm_mem

set_auto_predict(bit on = 1)

Function

set_auto_predict

Sets the auto-predict mode for his map.

When on is TRUE , the register model will automatically update its mirror (what it thinks should be in the DUT) immediately after any bus read or write operation via this map. Before a uvm_reg::write or uvm_reg::read operation returns, the register's uvm_reg::predict method is called to update the mirrored value in the register.

When on is FALSE , bus reads and writes via this map do not automatically update the mirror. For real-time updates to the mirror in this mode, you connect a uvm_reg_predictor instance to the bus monitor. The predictor takes observed bus transactions from the bus monitor, looks up the associated uvm_reg register given the address, then calls that register's uvm_reg::predict method. While more complex, this mode will capture all register read/write activity, including that not directly descendant from calls to uvm_reg::write and uvm_reg::read.

By default, auto-prediction is turned off.

Parameters:

on (bit)

get_auto_predict()

Function

get_auto_predict

Gets the auto-predict mode setting for this map.

set_check_on_read(bit on = 1)

Function

set_check_on_read

Sets the check-on-read mode for his map and all of its submaps.

When on is TRUE , the register model will automatically check any value read back from a register or field against the current value in its mirror and report any discrepancy. This effectively combines the functionality of the uvm_reg::read() and uvm_reg::mirror(UVM_CHECK) method. This mode is useful when the register model is used passively.

When on is FALSE , no check is made against the mirrored value.

At the end of the read operation, the mirror value is updated based on the value that was read regardless of this mode setting.

By default, auto-prediction is turned off.

Parameters:

on (bit)

get_check_on_read()

Function

get_check_on_read

Gets the check-on-read mode setting for this map.

Xget_bus_infoX(uvm_reg_item rw, uvm_reg_map_info map_info, int size, int lsb, int addr_skip)

Bus Access

Parameters:
convert2string()

Convert2string

clone()

Clone

Return type:

uvm_object

do_print(uvm_printer printer)

Do_print

Parameters:

printer (uvm_printer)

do_copy(uvm_object rhs)

Do_copy

Parameters:

rhs (uvm_object)

set_transaction_order_policy(uvm_reg_transaction_order_policy pol)

Function

set_transaction_order_policy

set the transaction order policy

Parameters:

pol (uvm_reg_transaction_order_policy)

get_transaction_order_policy()

Function

get_transaction_order_policy

set the transaction order policy

Return type:

uvm_reg_transaction_order_policy

Tasks

do_bus_write(uvm_reg_item rw, uvm_sequencer_base sequencer, uvm_reg_adapter adapter)

Task

do_bus_write

Perform a bus write operation. Do_bus_write

Parameters:
do_bus_read(uvm_reg_item rw, uvm_sequencer_base sequencer, uvm_reg_adapter adapter)

Task

do_bus_read

Perform a bus read operation. Do_bus_read

Parameters:
do_write(uvm_reg_item rw)

Task

do_write

Perform a write operation. Do_write(uvm_reg_item rw)

Parameters:

rw (uvm_reg_item)

do_read(uvm_reg_item rw)

Task

do_read

Perform a read operation. Do_read(uvm_reg_item rw)

Parameters:

rw (uvm_reg_item)