uvm_mem

UVMkit » 1800.2-2017

Memory abstraction base class

A memory is a collection of contiguous locations.  A memory may be accessible via more than one address map.

Unlike registers, memories are not mirrored because of the potentially large data space: tests that walk the entire memory space would negate any benefit from sparse memory modelling techniques.  Rather than relying on a mirror, it is recommended that backdoor access be used instead.

Summary
uvm_mem
Memory abstraction base class
Class Hierarchy
Class Declaration
class uvm_mem extends uvm_object
Initialization
mamMemory allocation manager
Introspection
get_nameGet the simple name
get_full_nameGet the hierarchical name
get_sizeReturns the number of unique memory locations in this memory.
get_n_bytesReturn the width, in number of bytes, of each memory location
get_n_bitsReturns the width, in number of bits, of each memory location
get_max_sizeReturns the maximum width, in number of bits, of all memories
get_vreg_by_offsetFind the virtual register implemented at the specified offset
HDL Access
Frontdoor
Backdoor
Callbacks
Coverage

mam

uvm_mem_mam mam

Memory allocation manager

Memory allocation manager for the memory corresponding to this abstraction class instance.  Can be used to allocate regions of consecutive addresses of specific sizes, such as DMA buffers, or to locate virtual register array.

get_name

Get the simple name

Return the simple object name of this memory.

get_full_name

virtual function string get_full_name()

Get the hierarchical name

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

get_size

function longint unsigned get_size()

Returns the number of unique memory locations in this memory. this is in units of the memory declaration: full memory is get_size()*get_n_bits() (bits)

get_n_bytes

function int unsigned get_n_bytes()

Return the width, in number of bytes, of each memory location

get_n_bits

function int unsigned get_n_bits()

Returns the width, in number of bits, of each memory location

get_max_size

static function int unsigned get_max_size()

Returns the maximum width, in number of bits, of all memories

get_vreg_by_offset

virtual function uvm_vreg get_vreg_by_offset( uvm_reg_addr_t  offset,   
uvm_reg_map  map  =  null )

Find the virtual register implemented at the specified offset

Finds the virtual register implemented in this memory at the specified offset in the specified address map and returns its abstraction class instance.  If no virtual register at the offset is found, returns null.

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_mem extends uvm_object
Memory abstraction base class
uvm_mem_mam mam
Memory allocation manager
virtual function string get_full_name()
Get the hierarchical name
function longint unsigned get_size()
Returns the number of unique memory locations in this memory.
function int unsigned get_n_bytes()
Return the width, in number of bytes, of each memory location
function int unsigned get_n_bits()
Returns the width, in number of bits, of each memory location
static function int unsigned get_max_size()
Returns the maximum width, in number of bits, of all memories
virtual function uvm_vreg get_vreg_by_offset( uvm_reg_addr_t  offset,   
uvm_reg_map  map  =  null )
Find the virtual register implemented at the specified offset