Package: memory_pkg
- File: memory_pkg.vhd
Constants
Name | Type | Value | Description |
---|---|---|---|
null_memory | memory_t | (p_logger => null_logger, p_check_permissions => boolean'low, p_default_endian => endianness_t'low, others => null_ptr) |
|
memory_logger | logger_t | get_logger("vunit_lib:memory_pkg") | Default memory logger |
null_buffer | buffer_t | (p_memory_ref => null_memory, p_name => null_string_ptr, p_address => natural'low, p_num_bytes => natural'low) |
Types
Name | Type | Description |
---|---|---|
endianness_arg_t | (little_endian, big_endian, default_endian) |
|
memory_t | Memory model object | |
permissions_t | (no_access, write_only, read_only, read_and_write) |
--------------------------------------------------- Memory access permission control functions --------------------------------------------------- |
buffer_t | --------------------------------------------------- Memory buffer allocation --------------------------------------------------- Reference to an allocated buffer with the memory |
Functions
- clear (memory : memory_t) return ()
Description
Empties the memory by removing all data and permissions
- write_byte (memory : memory_t;
address : natural;
byte : byte_t) return ()
Description
Memory data read and write functions
- write_word (memory : memory_t;
address : natural;
word : std_logic_vector;
endian : endianness_arg_t := default_endian) return ()
- write_integer (memory : memory_t;
address : natural;
word : integer;
bytes_per_word : natural range 1 to 4 := 4;
endian : endianness_arg_t := default_endian) return ()
Description
Write integer
- set_permissions (memory : memory_t;
address : natural;
permissions : permissions_t) return ()
- clear_expected_byte (memory : memory_t;
address : natural) return ()
- set_expected_byte (memory : memory_t;
address : natural;
expected : byte_t) return ()
- set_expected_word (memory : memory_t;
address : natural;
expected : std_logic_vector;
endian : endianness_arg_t := default_endian) return ()
- set_expected_integer (memory : memory_t;
address : natural;
expected : integer;
bytes_per_word : natural range 1 to 4 := 4;
endian : endianness_arg_t := default_endian) return ()
- check_expected_was_written (memory : memory_t;
address : natural;
num_bytes : natural) return ()
Description
Check that all expected bytes within address range was written
with correct value
- check_expected_was_written (memory : memory_t) return ()
Description
Check that all expected bytes within the entire memory was written
with correct value
- check_expected_was_written (buf : buffer_t) return ()
Description
Check that all expected bytes was written with correct value in buffer
- write_byte_unchecked (memory : memory_t;
address : natural;
byte : byte_t) return ()
Description
Perform write of one byte without running any address or data checks