Class Memory
Defined in File Memory.h
Inheritance Relationships
Base Type
public Component
(Class Component)
Class Documentation
-
class Memory : public Component
This component is an universal software model of a rewritable memory.
The memory can have a size specified, a range to which it will be mapped to and a default value. Ports: none Connectors: data connector “data” to access the memory.
Note
Please note that the address range can be larger than the size, then the memory will be mirrored across the whole range.
Public Functions
-
Memory(size_t size, AddressRange addressRange, uint8_t defaultValue = 0x0)
Construct a memory.
- Parameters
size – Size of the memory in bytes.
addressRange – Range to which the memory to.
defaultValue – Default value of the memory on init.
-
virtual void init() override
Initialize a component to a default power-on state (hard reset).
Note
For Component developer: Implement a correct power-on state here.
-
virtual std::vector<EmulatorWindow> getGUIs() override
Get GUI windows: metadata and rendering functions.
Note
For Component developer: If the component have a debugger or other GUI, return an arbitrary count of windows, they will be rendered on a load of a system which contains the component.
- Returns
A vector of windows to be rendered.
-
void load(uint32_t from, std::ifstream &src)
-
Memory(size_t size, AddressRange addressRange, uint8_t defaultValue = 0x0)