Go to the documentation of this file.
54 const unsigned int core = 0;
83 std::vector<InstructionAddress> lastExecutedInstructions =
86 bool finished =
false;
88 int finishedCoreCount = 0;
90 const unsigned int core = 0;
99 bool exitPoint =
false;
104 lastExecutedInstructions[core] = pc;
110 for (
size_t i = 0; i < implInstructions.size(); ++i) {
112 *implInstructions.at(i);
138 if (finishedCoreCount > 0)
virtual MemorySystem & memorySystem(int coreId=-1)
UInt32 InstructionAddress
bool hasInstructionAt(InstructionAddress addr) const
TTAMachine::Machine * machine
the architecture definition of the estimated processor
const InstructionContainer & implicitInstructionsAt(InstructionAddress addr) const
InstructionAddress & programCounter()
void setFinished(bool finished=true)
virtual void prepareToStop(StopReason reason)
void endClockOfAllFUStates()
void advanceClockOfLocalMemories()
void advanceClockOfAllFUStates()
SimulationStatus state_
The current state of the simulation.
SimulatorFrontend & frontend_
Reference to the simulator frontend.
std::vector< InstructionMemory * > instructionMemories_
The instruction memory models of cores.
void advanceClockOfSharedMemories()
@ STA_FINISHED
Simulation ended after executing the last instruction.
ExecutableInstruction & instructionAt(InstructionAddress address)
@ SE_CYCLE_END
Generated before advancing the simulator clock at the end of a simulation cycle.
std::vector< InstructionAddress > lastExecutedInstruction_
The address of the last executed instruction.
bool stopRequested_
Flag indicating that simulation should stop.
OTASimulationController(SimulatorFrontend &frontend, const TTAMachine::Machine &machine, const TTAProgram::Program &program)
@ SRE_RUNTIME_ERROR
A fatal runtime error occured in the simulated program.
@ RES_FATAL
Fatal runtime error, there is a serious error in the simulated program, thus it makes no sense to go ...
virtual void advanceClock()
void advanceMachineCycle(unsigned pcAdd)
std::string errorMessage() const
ClockCycleCount clockCount_
How many clock cycles have been simulated.
bool hasImplicitInstructionsAt(InstructionAddress addr) const
virtual ~OTASimulationController()
InstructionAddress firstIllegalInstructionIndex_
The index of the first illegal instruction in the instruction sequence.
MemorySystem & memorySystem(int coreId=-1)
SimulationEventHandler & eventHandler()
find Finds info of the inner loops in the false
MachineStateContainer machineStates_
The machine state models for the simulated cores.
find Finds info of the inner loops in the program
virtual MachineState & machineState(int core=-1)
void reportSimulatedProgramError(RuntimeErrorSeverity severity, const std::string &description)
void advanceClockOfAllGuardStates()
virtual bool simulateCycle()
@ SE_NEW_INSTRUCTION
Generated before executing a new instructon.