data.memory.unaligned ≡
Memory supporting partial word access and unaligned addressing.
template < typename T, auto WordSize, auto TotalSize, template <typename, auto> typename Memory = memory > class unaligned_read_unaligned_write_memory §source
Memory supporting reads/writes of up to WordSize
elements per cycle at aligned or unaligned address. The class internally
instantiates WordSize logical memories that are
bitsizeof T wide and TotalSize / WordSize
deep.
Parameters
-
typename TType of the memory element
-
auto WordSizeNumber of elements per word
-
auto TotalSizeTotal number of elements in memory
-
template <typename, auto> typename Memory = memory
Memory implementation
Aliases
Methods
-
inline unaligned_read_unaligned_write_memory::word_t read_aligned(unaligned_read_unaligned_write_memory::addr_t addr) §source
Read a word from a word aligned address
-
template <auto N = 1> inline unaligned_read_unaligned_write_memory::word_t read(unaligned_read_unaligned_write_memory::addr_t addr) §source
Read a word from an address aligned at
Nelement boundary -
inline void write_aligned( unaligned_read_unaligned_write_memory::addr_t addr, unaligned_read_unaligned_write_memory::word_t value ) §source
Write a word to a word aligned address
-
template <auto N = 1> inline void write( unaligned_read_unaligned_write_memory::addr_t addr, unaligned_read_unaligned_write_memory::word_t value, unaligned_read_unaligned_write_memory::element_count_t size ) §source
Write specified number of elements to an address aligned at
Nelement boundary. Thesizemust be a multiple ofNand no greater thanWordSize.
template < typename T, auto WordSize, auto ReadWordSize, auto TotalSize, template <typename, auto> typename Memory = memory > class unaligned_read_aligned_write_memory §source
Memory capable of aligned or unaligned reads of
ReadWordSize elements per cycle and WordSize
element writes aligned to WordSize.
Parameters
-
typename TType of the memory element.
-
auto WordSizeNumber of elements per word.
-
auto ReadWordSizeNumber of elements to be returned per read. Must be power-of-2 fraction or integer multiple of
WordSize. -
auto TotalSizeTotal number of elements in memory. Memory width is
WordSize * bitsizeof(T)bits. Memory depth isTotalSize / WordSizewords. -
template <typename, auto> typename Memory = memory
Memory implementation.
Aliases
Methods
-
inline unaligned_read_aligned_write_memory::read_word_t read_aligned(unaligned_read_aligned_write_memory::addr_t addr) §source
Read a word from a word aligned address.
-
inline unaligned_read_aligned_write_memory::read_word_t read(unaligned_read_aligned_write_memory::addr_t addr) §source
Read a word from an unaligned address.
-
inline void write_aligned( unaligned_read_aligned_write_memory::addr_t addr, unaligned_read_aligned_write_memory::word_t value ) §source
Write a word to a word aligned address.