The Sparta Modeling Framework
|
Represents a mapping between an input address and output address for use in a destination BlockingMemoryIF. More...
#include <SimpleMemoryMap.hpp>
Public Member Functions | |
Mapping (addr_t _start, addr_t _end, BlockingMemoryIF *_memif, addr_t _dest_off) | |
construct a mapping using the same values received from SimpleMemoryMap::addMapping | |
addr_t | mapAddress (addr_t input) const noexcept |
Maps an input address to the address-space for the destination memory interface. | |
bool | contains (addr_t a) const noexcept |
Returns true if a is in the range [start,end) | |
bool | overlaps (addr_t a, addr_t b) const noexcept |
Returns true if any part of the range [a,b) is shared with range [start,end) | |
Public Attributes | |
const addr_t | start |
Beginning of the mapping input range (inclusive) | |
const addr_t | end |
End of the mapping input address range (exclusive) | |
const addr_t | dest_off |
Offset into destination memory interface. This is an offset from 0 which is received when the input address equals start. | |
BlockingMemoryIF *const | memif |
Memory interface mapped to (after add/sub are applied to address) | |
Represents a mapping between an input address and output address for use in a destination BlockingMemoryIF.
Definition at line 61 of file SimpleMemoryMap.hpp.
|
inline |
construct a mapping using the same values received from SimpleMemoryMap::addMapping
Definition at line 67 of file SimpleMemoryMap.hpp.
|
inlinenoexcept |
Returns true if a is in the range [start,end)
a | Address to test in the range |
Definition at line 122 of file SimpleMemoryMap.hpp.
Maps an input address to the address-space for the destination memory interface.
Definition at line 114 of file SimpleMemoryMap.hpp.
Returns true if any part of the range [a,b) is shared with range [start,end)
a | Start (inclusive) of test range |
e | End (exclusive) of test range |
Definition at line 132 of file SimpleMemoryMap.hpp.
const addr_t sparta::memory::SimpleMemoryMap::Mapping::dest_off |
Offset into destination memory interface. This is an offset from 0 which is received when the input address equals start.
Value to add to incoming address to remap. This exists in addition to subtract so that mappings equal to + or - the entire address space can be done.
Definition at line 102 of file SimpleMemoryMap.hpp.
const addr_t sparta::memory::SimpleMemoryMap::Mapping::end |
End of the mapping input address range (exclusive)
Definition at line 91 of file SimpleMemoryMap.hpp.
BlockingMemoryIF* const sparta::memory::SimpleMemoryMap::Mapping::memif |
Memory interface mapped to (after add/sub are applied to address)
Definition at line 108 of file SimpleMemoryMap.hpp.
const addr_t sparta::memory::SimpleMemoryMap::Mapping::start |
Beginning of the mapping input range (inclusive)
Value to subtract from incoming address to remap. This will always be <= the incoming address because it is the start of the mapping in the input address space.
Add this number to memif first because result will always be >= 0
Definition at line 86 of file SimpleMemoryMap.hpp.