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

System Interface for the basic system IO operations and time synchronization. More...

#include <System.h>

Inheritance diagram for etiss::System:
Inheritance graph
[legend]

Public Member Functions

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

Detailed Description

System Interface for the basic system IO operations and time synchronization.

Systems that are model around a CPU model, for the memory and peripherals need to implement this interface in order to be simulated with ETISS. These method are called by ETISS if required.

See also
etiss::CPUCore
Note
For increased performance use the ETISS_System structure instead.

Definition at line 76 of file System.h.

Constructor & Destructor Documentation

◆ ~System()

virtual etiss::System::~System ( )
inlinevirtual

Definition at line 79 of file System.h.

Member Function Documentation

◆ dbg_read()

virtual etiss::int32 etiss::System::dbg_read ( etiss::uint64  addr,
etiss::uint8 buf,
etiss::uint32  len 
)
pure 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.

Implemented in etiss::SimpleSystem, and etiss::SimpleMemSystem.

◆ dbg_write()

virtual etiss::int32 etiss::System::dbg_write ( etiss::uint64  addr,
etiss::uint8 buf,
etiss::uint32  len 
)
pure 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

Implemented in etiss::SimpleSystem, and etiss::SimpleMemSystem.

◆ dread()

virtual etiss::int32 etiss::System::dread ( ETISS_CPU cpu,
etiss::uint64  addr,
etiss::uint8 buf,
etiss::uint32  len 
)
pure 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.

Implemented in etiss::SimpleSystem, and etiss::SimpleMemSystem.

◆ dwrite()

virtual etiss::int32 etiss::System::dwrite ( ETISS_CPU cpu,
etiss::uint64  addr,
etiss::uint8 buf,
etiss::uint32  len 
)
pure 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.

Implemented in etiss::SimpleSystem, and etiss::SimpleMemSystem.

◆ iread()

virtual etiss::int32 etiss::System::iread ( ETISS_CPU cpu,
etiss::uint64  addr,
etiss::uint32  len 
)
pure 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

Implemented in etiss::SimpleSystem, and etiss::SimpleMemSystem.

◆ iwrite()

virtual etiss::int32 etiss::System::iwrite ( ETISS_CPU cpu,
etiss::uint64  addr,
etiss::uint8 buf,
etiss::uint32  len 
)
pure 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.

Implemented in etiss::SimpleSystem, and etiss::SimpleMemSystem.

◆ syncTime()

virtual void etiss::System::syncTime ( ETISS_CPU cpu)
pure 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.

Implemented in etiss::SimpleSystem, and etiss::SimpleMemSystem.


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