An interface for implementing components that read/write data via an address bus. More...
#include <AddressDataBus.h>
Public Member Functions | |
AddressDataBus () | |
Constructs an AddressDataBus instance. More... | |
virtual | ~AddressDataBus () |
virtual void | AddressSelect (uint64_t address)=0 |
Place an address on the bus. More... | |
virtual bool | ReadData (uint8_t &data, Endianness endianness=BigEndian)=0 |
Reads 8-bit data from the currently selected address. More... | |
virtual bool | ReadData (uint16_t &data, Endianness endianness)=0 |
Reads 16-bit data from the currently selected address. More... | |
virtual bool | ReadData (uint32_t &data, Endianness endianness)=0 |
Reads 32-bit data from the currently selected address. More... | |
virtual bool | ReadData (uint64_t &data, Endianness endianness)=0 |
Reads 64-bit data from the currently selected address. More... | |
virtual bool | WriteData (const uint8_t &data, Endianness endianness=BigEndian)=0 |
Writes 8-bit data to the currently selected address. More... | |
virtual bool | WriteData (const uint16_t &data, Endianness endianness)=0 |
Writes 16-bit data to the currently selected address. More... | |
virtual bool | WriteData (const uint32_t &data, Endianness endianness)=0 |
Writes 32-bit data to the currently selected address. More... | |
virtual bool | WriteData (const uint64_t &data, Endianness endianness)=0 |
Writes 64-bit data to the currently selected address. More... | |
An interface for implementing components that read/write data via an address bus.
Any component which allows data to be read or written by using an address as an index/offset should implement this interface.
A typical example of a Component which implements the functions of this class is the RAMComponent.
Definition at line 44 of file AddressDataBus.h.
|
inline |
Constructs an AddressDataBus instance.
Definition at line 50 of file AddressDataBus.h.
|
inlinevirtual |
Definition at line 52 of file AddressDataBus.h.
References AddressSelect(), BigEndian, data, ReadData(), and WriteData().
|
pure virtual |
Place an address on the bus.
address | The address to select. |
Implemented in RAMComponent, CacheComponent, CPUComponent, and MainbusComponent.
Referenced by MainbusComponent::AddressSelect(), DYNTRANS_INSTR(), FileLoader::Load(), FileLoader_raw::LoadIntoComponent(), CPUComponent::ReadData(), MainbusComponent::WriteData(), CPUComponent::WriteData(), RAMComponent::WriteData(), and ~AddressDataBus().
|
pure virtual |
Reads 8-bit data from the currently selected address.
data | A reference to a variable which will receive the data. |
endianness | Selects the endianness of the operation. Ignored for 8-bit reads and writes. |
Implemented in RAMComponent, CacheComponent, CPUComponent, and MainbusComponent.
Referenced by FileLoader::Load(), MainbusComponent::ReadData(), CPUComponent::ReadData(), MainbusComponent::WriteData(), RAMComponent::WriteData(), and ~AddressDataBus().
|
pure virtual |
Reads 16-bit data from the currently selected address.
data | A reference to a variable which will receive the data. |
endianness | Selects the endianness of the operation. |
Implemented in RAMComponent, CacheComponent, CPUComponent, and MainbusComponent.
|
pure virtual |
Reads 32-bit data from the currently selected address.
data | A reference to a variable which will receive the data. |
endianness | Selects the endianness of the operation. |
Implemented in RAMComponent, CacheComponent, CPUComponent, and MainbusComponent.
|
pure virtual |
Reads 64-bit data from the currently selected address.
data | A reference to a variable which will receive the data. |
endianness | Selects the endianness of the operation. |
Implemented in RAMComponent, CacheComponent, CPUComponent, and MainbusComponent.
|
pure virtual |
Writes 8-bit data to the currently selected address.
data | A reference to a variable which contains the data. |
endianness | Selects the endianness of the operation. Ignored for 8-bit reads and writes. |
Implemented in RAMComponent, CacheComponent, CPUComponent, and MainbusComponent.
Referenced by DYNTRANS_INSTR(), FileLoader_raw::LoadIntoComponent(), MainbusComponent::WriteData(), CPUComponent::WriteData(), RAMComponent::WriteData(), and ~AddressDataBus().
|
pure virtual |
Writes 16-bit data to the currently selected address.
data | A reference to a variable which contains the data. |
endianness | Selects the endianness of the operation. |
Implemented in RAMComponent, CacheComponent, CPUComponent, and MainbusComponent.
|
pure virtual |
Writes 32-bit data to the currently selected address.
data | A reference to a variable which contains the data. |
endianness | Selects the endianness of the operation. |
Implemented in RAMComponent, CacheComponent, CPUComponent, and MainbusComponent.
|
pure virtual |
Writes 64-bit data to the currently selected address.
data | A reference to a variable which contains the data. |
endianness | Selects the endianness of the operation. |
Implemented in RAMComponent, CacheComponent, CPUComponent, and MainbusComponent.