OpenASIP  2.0
Public Member Functions | Private Attributes | List of all members
RemoteMemory Class Reference

#include <RemoteMemory.hh>

Inheritance diagram for RemoteMemory:
Inheritance graph
Collaboration diagram for RemoteMemory:
Collaboration graph

Public Member Functions

 RemoteMemory (const AddressSpace &space, bool littleEndian)
 
void setController (RemoteController *con)
 
virtual void write (ULongWord address, MAU data) override
 
virtual Memory::MAU read (ULongWord address) override
 
- Public Member Functions inherited from Memory
 Memory (ULongWord start, ULongWord end, ULongWord MAUSize, bool littleEndian_)
 
virtual ~Memory ()
 
virtual void advanceClock ()
 
virtual void writeBE (ULongWord address, int size, ULongWord data)
 
virtual void writeLE (ULongWord address, int size, ULongWord data)
 
void write (ULongWord address, int size, ULongWord data)
 
virtual void writeDirectlyBE (ULongWord address, int size, ULongWord data)
 
virtual void writeDirectlyLE (ULongWord address, int size, ULongWord data)
 
void write (ULongWord address, FloatWord data)
 
void write (ULongWord address, DoubleWord data)
 
void read (ULongWord address, int size, ULongWord &data)
 
void read (ULongWord address, DoubleWord &data)
 
void read (ULongWord address, FloatWord &data)
 
virtual void writeBE (ULongWord address, FloatWord data)
 
virtual void writeBE (ULongWord address, DoubleWord data)
 
virtual void writeLE (ULongWord address, FloatWord data)
 
virtual void writeLE (ULongWord address, DoubleWord data)
 
virtual void readBE (ULongWord address, int size, ULongWord &data)
 
virtual void readLE (ULongWord address, int size, ULongWord &data)
 
virtual void readBE (ULongWord address, FloatWord &data)
 
virtual void readBE (ULongWord address, DoubleWord &data)
 
virtual void readLE (ULongWord address, FloatWord &data)
 
virtual void readLE (ULongWord address, DoubleWord &data)
 
virtual void reset ()
 
virtual void fillWithZeros ()
 
virtual ULongWord start ()
 
virtual ULongWord end ()
 
virtual ULongWord MAUSize ()
 
bool isLittleEndian ()
 

Private Attributes

RemoteControllercontroller_
 
const AddressSpaceaddressspace_
 

Additional Inherited Members

- Public Types inherited from Memory
typedef MinimumAddressableUnit MAU
 
typedef MAUMAUTable
 
- Protected Member Functions inherited from Memory
void packBE (const Memory::MAUTable data, int size, ULongWord &value)
 
void unpackBE (const ULongWord &value, int size, Memory::MAUTable data)
 
void packLE (const Memory::MAUTable data, int size, ULongWord &value)
 
void unpackLE (const ULongWord &value, int size, Memory::MAUTable data)
 
- Protected Attributes inherited from Memory
bool littleEndian_
 

Detailed Description

RemoteMemory is a proxy class for a physical memory.

This class adapts a physical memory on a FPGA or ASIC, as seen through a debug interface, to the main TCE system. The RemoteMemory is used only in the Simulator parts of TCE. All accesses to the physical memories RemoteMemory objects do go through the RemoteController that implements the debugging interface.

Definition at line 50 of file RemoteMemory.hh.

Constructor & Destructor Documentation

◆ RemoteMemory()

RemoteMemory::RemoteMemory ( const AddressSpace space,
bool  littleEndian 
)
inline

Definition at line 53 of file RemoteMemory.hh.

53  :
54  Memory(space.start(), space.end(), space.width(), littleEndian),
55  controller_(NULL), addressspace_(space) {}

Member Function Documentation

◆ read()

Memory::MAU RemoteMemory::read ( ULongWord  address)
overridevirtual

Reads a single memory location.

Must be implemented in the derived class. No range checking. The fastest way to read the memory.

Parameters
addressThe address to read.
Returns
The data read.

Implements Memory.

Definition at line 44 of file RemoteMemory.cc.

45 {
47  return controller_->readMem(address, addressspace_ );
48 }

References addressspace_, assert, controller_, and RemoteController::readMem().

Here is the call graph for this function:

◆ setController()

void RemoteMemory::setController ( RemoteController con)
inline

Set SimulationController for memory.

The RemoteMemory accesses physical memories via this controller object.

Definition at line 62 of file RemoteMemory.hh.

62  {
63  controller_ = con;
64  }

References controller_.

◆ write()

void RemoteMemory::write ( ULongWord  address,
MAU  data 
)
overridevirtual

Writes a single memory location.

Must be implemented in the derived class. No range checking. The fastest way to write to the memory.

Parameters
addressThe target address.
dataThe data to write.

Implements Memory.

Definition at line 37 of file RemoteMemory.cc.

38 {
40  controller_->writeMem(address, data, addressspace_);
41 }

References addressspace_, assert, controller_, and RemoteController::writeMem().

Here is the call graph for this function:

Member Data Documentation

◆ addressspace_

const AddressSpace& RemoteMemory::addressspace_
private

Definition at line 72 of file RemoteMemory.hh.

Referenced by read(), and write().

◆ controller_

RemoteController* RemoteMemory::controller_
private

Definition at line 71 of file RemoteMemory.hh.

Referenced by read(), setController(), and write().


The documentation for this class was generated from the following files:
RemoteMemory::addressspace_
const AddressSpace & addressspace_
Definition: RemoteMemory.hh:72
assert
#define assert(condition)
Definition: Application.hh:86
RemoteController::readMem
virtual MAU readMem(Word address, const AddressSpace &)=0
RemoteMemory::controller_
RemoteController * controller_
Definition: RemoteMemory.hh:71
TTAMachine::AddressSpace::width
virtual int width() const
Definition: AddressSpace.cc:155
Memory::Memory
Memory(ULongWord start, ULongWord end, ULongWord MAUSize, bool littleEndian_)
Definition: Memory.cc:56
TTAMachine::AddressSpace::start
virtual ULongWord start() const
Definition: AddressSpace.cc:166
TTAMachine::AddressSpace::end
virtual ULongWord end() const
Definition: AddressSpace.cc:177
RemoteController::writeMem
virtual void writeMem(Word address, MAU data, const AddressSpace &)=0