ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Public Member Functions | List of all members
etiss::SimpleSystem Class Referenceabstract

A simple system, that implements the etiss::System interface. More...

#include <System.h>

Inheritance diagram for etiss::SimpleSystem:
Inheritance graph
[legend]
Collaboration diagram for etiss::SimpleSystem:
Collaboration graph
[legend]

Public Member Functions

virtual ~SimpleSystem ()
 
virtual etiss::int32 iread (ETISS_CPU *cpu, etiss::uint64 addr, etiss::uint32 len)
 Instruction read operation. More...
 
virtual etiss::int32 iwrite (ETISS_CPU *cpu, etiss::uint64 addr, etiss::uint8 *buf, etiss::uint32 len)
 Instruction write operation. More...
 
virtual etiss::int32 dread (ETISS_CPU *cpu, etiss::uint64 addr, etiss::uint8 *buf, etiss::uint32 len)
 Data read operation. More...
 
virtual etiss::int32 dwrite (ETISS_CPU *cpu, etiss::uint64 addr, etiss::uint8 *buf, etiss::uint32 len)
 Data write operation. More...
 
virtual etiss::int32 dbg_read (etiss::uint64 addr, etiss::uint8 *buf, etiss::uint32 len)
 Debug read operation. More...
 
virtual etiss::int32 dbg_write (etiss::uint64 addr, etiss::uint8 *buf, etiss::uint32 len)
 Debug write operation. More...
 
virtual void syncTime (ETISS_CPU *cpu)
 Synchronize simulation time. More...
 
virtual bool read (bool debug, ETISS_CPU *cpu, etiss::uint64 addr, etiss::uint8 *buf, etiss::uint32 len)=0
 
virtual bool write (bool debug, ETISS_CPU *cpu, etiss::uint64 addr, etiss::uint8 *buf, etiss::uint32 len)=0
 
- Public Member Functions inherited from etiss::System
virtual ~System ()
 

Detailed Description

A simple system, that implements the etiss::System interface.

Definition at line 220 of file System.h.

Constructor & Destructor Documentation

◆ ~SimpleSystem()

virtual etiss::SimpleSystem::~SimpleSystem ( )
inlinevirtual

Definition at line 223 of file System.h.

Member Function Documentation

◆ dbg_read()

etiss::int32 etiss::SimpleSystem::dbg_read ( etiss::uint64  addr,
etiss::uint8 buf,
etiss::uint32  len 
)
virtual

Debug read operation.

This method should implement a debug read operation. The debug operations are used for data access that should not influence the simulation time. To indicate an error a non 0 value should be returned.

Note
The read debug operation is used for the instruction fetches required for generating the code blocks.
Parameters
addrThe address from which the data should be read.
bufPointer to the buffer, that contains the instruction.
lenThe length of the data in bytes.
Returns
0 if no error occurred.

Implements etiss::System.

Definition at line 161 of file System.cpp.

References read().

Here is the call graph for this function:

◆ dbg_write()

etiss::int32 etiss::SimpleSystem::dbg_write ( etiss::uint64  addr,
etiss::uint8 buf,
etiss::uint32  len 
)
virtual

Debug write operation.

This method should implement a debug write operation. The debug operations are used for data access that should not influence the simulation time. To indicate an error a non 0 value should be returned.

Parameters
addrThe address to which the data should be written.
bufPointer to the buffer, that contains the instruction.
lenThe length of the data in bytes.
Returns
0 if no error occurred

Implements etiss::System.

Definition at line 168 of file System.cpp.

References write().

Here is the call graph for this function:

◆ dread()

etiss::int32 etiss::SimpleSystem::dread ( ETISS_CPU cpu,
etiss::uint64  addr,
etiss::uint8 buf,
etiss::uint32  len 
)
virtual

Data read operation.

This method should implement a data read operation. To indicate an error a non 0 value should be returned. The CPU time needs to be increased according to the delay of this instruction operation.

Parameters
cpuPointer to the CPU structure, that requested this operation.
addrThe address from which the data should be read.
bufPointer to the buffer, that contains the instruction.
lenThe length of the data in bytes.
Returns
0 if no error occurred.

Implements etiss::System.

Definition at line 147 of file System.cpp.

References read().

Here is the call graph for this function:

◆ dwrite()

etiss::int32 etiss::SimpleSystem::dwrite ( ETISS_CPU cpu,
etiss::uint64  addr,
etiss::uint8 buf,
etiss::uint32  len 
)
virtual

Data write operation.

This method should implement a data write operation. To indicate an error a non 0 value should be returned. The CPU time needs to be increased according to the delay of this instruction operation.

Parameters
cpuPointer to the CPU structure, that requested this operation.
addrThe address to which the data should be written.
bufPointer to the buffer, that contains the instruction.
lenThe length of the data in bytes.
Returns
0 if no error occurred.

Implements etiss::System.

Definition at line 154 of file System.cpp.

References write().

Here is the call graph for this function:

◆ iread()

etiss::int32 etiss::SimpleSystem::iread ( ETISS_CPU cpu,
etiss::uint64  addr,
etiss::uint32  len 
)
virtual

Instruction read operation.

This method should implement an instruction read operation. To indicate an error a non 0 value should be returned. The CPU time needs to be increased according to the delay of this instruction operation.

Note
Normally this method can be implemented as an empty method that only returns an error value. Because of the translating nature of ETISS all instruction operations are out of order an will be performed via the debug interface.
Parameters
cpuPointer to the CPU structure, that requested this operation.
addrThe address from which the instruction should be read.
lenThe length of the instruction in bytes.
Returns
0 if no error occurred

Implements etiss::System.

Definition at line 132 of file System.cpp.

◆ iwrite()

etiss::int32 etiss::SimpleSystem::iwrite ( ETISS_CPU cpu,
etiss::uint64  addr,
etiss::uint8 buf,
etiss::uint32  len 
)
virtual

Instruction write operation.

This method should implement an instruction write operation. To indicate an error a non 0 value should be returned. The CPU time needs to be increased according to the delay of this instruction operation.

Note
Normally this method can be implemented as an empty method that only returns an error value. Because of the translating nature of ETISS all instruction operations are out of order an will be performed via the debug interface
Parameters
cpuPointer to the CPU structure, that requested this operation.
addrThe address to which the instruction should be written.
bufPointer to the buffer, that contains the instruction.
lenThe length of the instruction in bytes.
Returns
0 if no error occurred.

Implements etiss::System.

Definition at line 140 of file System.cpp.

References write().

Here is the call graph for this function:

◆ read()

virtual bool etiss::SimpleSystem::read ( bool  debug,
ETISS_CPU cpu,
etiss::uint64  addr,
etiss::uint8 buf,
etiss::uint32  len 
)
pure virtual

Implemented in etiss::plugin::VirtualStructMemory.

Referenced by dbg_read(), and dread().

Here is the caller graph for this function:

◆ syncTime()

void etiss::SimpleSystem::syncTime ( ETISS_CPU cpu)
virtual

Synchronize simulation time.

This method should implement the synchronization between the simulation time of the system and the CPU. This function call should allow the system to catch up with the CPU.

See also
etiss::ETISS_CPU
Parameters
cpuPointer to the CPU structure, for which the synchronization should be performed.

Implements etiss::System.

Definition at line 175 of file System.cpp.

◆ write()

virtual bool etiss::SimpleSystem::write ( bool  debug,
ETISS_CPU cpu,
etiss::uint64  addr,
etiss::uint8 buf,
etiss::uint32  len 
)
pure virtual

Implemented in etiss::plugin::VirtualStructMemory.

Referenced by dbg_write(), dwrite(), and iwrite().

Here is the caller graph for this function:

The documentation for this class was generated from the following files: