|
ComSquare
|
Abstract class representing a continuous block of memory. More...
#include <AMemory.hpp>
Public Member Functions | |
| uint24_t | getRelativeAddress (uint24_t addr) const override |
| Translate an absolute address to a relative address. More... | |
| void | setMemoryRegion (uint24_t start, uint24_t end) |
| Change starting and ending points of this mapped memory. More... | |
| bool | hasMemoryAt (uint24_t addr) const override |
| Return true if this component has mapped the address. More... | |
| ~AMemory () override=default | |
| A default destructor. More... | |
Public Member Functions inherited from ComSquare::Memory::IMemory | |
| virtual uint8_t | read (uint24_t addr)=0 |
| Read data from the component. More... | |
| virtual void | write (uint24_t addr, uint8_t data)=0 |
| Write data to this component. More... | |
| virtual uint24_t | getSize () const =0 |
| Get the size of the data. This size can be lower than the mapped data. More... | |
| virtual std::string | getName () const =0 |
| Get the name of this accessor (used for debug purpose) More... | |
| virtual Component | getComponent () const =0 |
| Get the component of this accessor (used for debug purpose) More... | |
| virtual std::string | getValueName (uint24_t addr) const =0 |
| Get the name of the data at the address. More... | |
| virtual | ~IMemory ()=default |
| A virtual default destructor. More... | |
Protected Attributes | |
| uint24_t | _start = 0 |
| The starting address mapped to this component. More... | |
| uint24_t | _end = 0 |
| The last continuous address mapped to this components. For shadows, see the MemoryShadow class. More... | |
Abstract class representing a continuous block of memory.
|
overridedefault |
A default destructor.
Translate an absolute address to a relative address.
| addr | The absolute address (in the 24 bit bus) |
| InvalidAddress | is thrown if the address is not mapped by this component. |
Implements ComSquare::Memory::IMemory.
|
overridevirtual |
Return true if this component has mapped the address.
| addr | The address to check. |
Implements ComSquare::Memory::IMemory.
Change starting and ending points of this mapped memory.
| start | The first address mapped to this component. |
| end | The last address mapped to this component. |
|
protected |
The last continuous address mapped to this components. For shadows, see the MemoryShadow class.
|
protected |
The starting address mapped to this component.
1.8.17