The mem_bkdr_util
class provides a way to manipulate the memory array directly via backdoor.
It includes a set of functions to backdoor read or write any address location within the memory.
The class instance is created in the testbench module and passed to the UVM environment via uvm_config_db
.
This interface supports basic backdoor methods to access memory. Useful methods are:
is_addr_valid
: Check if input address is valid The input address is assumed to be the byte addressable address into memory starting at 0. It is user's responsibility to mask the upper bits.read8
,read16
,read32
,read64
: Functions to read one byte, two bytes, four bytes, and eight bytes respectively at specified input addresswrite8
,write16
,write32
,write64
: Functions to write one byte, two bytes, four bytes, and eight bytes respectively with input data at specified input addressload_mem_from_file
: Load memory from a file specified by input stringprint_mem
: Print the content of the memoryclear_mem
: Clear the memory to all 0sset_mem
: Set the memory to all 1srandomize_mem
: Randomize contents of the memory