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