data.memory.byte_addressable ≡
Memory supporting byte level access and addressing.
template < typename T, auto DepthInBytes, template <typename, auto> typename Memory = memory > class byte_addressable_memory §source
Memory that logically stores words of type T but allows
addressing and read and write access at byte granularity.
Parameters
-
typename TType of memory word
-
auto DepthInBytesDepth of memory in bytes
-
template <typename, auto> typename Memory = memory
Memory implementation
Aliases
-
using addr_t = byte_addressable_memory::mem_t::addr_t §source
-
using byte_count_t = byte_addressable_memory::mem_t::element_count_t §source
-
using word_t = T §source
Methods
-
inline byte_addressable_memory::word_t read_aligned(byte_addressable_memory::addr_t addr) §source
Read a word from a word aligned address
-
template <auto N = 1> inline byte_addressable_memory::word_t read(byte_addressable_memory::addr_t addr) §source
Read a word from N-byte aligned address
-
inline void write_aligned( byte_addressable_memory::addr_t addr, byte_addressable_memory::word_t word ) §source
Write a word to a word aligned address
-
template <auto N = 1> inline void write( byte_addressable_memory::addr_t addr, byte_addressable_memory::word_t value, byte_addressable_memory::byte_count_t size ) §source
Write specified number of bytes to an N-byte unaligned address. The
sizemust be a multiple ofNand no greater thanbytesizeof T.