33#ifndef TTA_SIMULATION_CONTROLLER_HH
34#define TTA_SIMULATION_CONTROLLER_HH
88 virtual void step(
double count = 1) = 0;
90 virtual void next(
int count = 1) = 0;
92 virtual void run() = 0;
100 const std::string& rfName,
101 int registerIndex = -1) = 0;
104 const std::string& iuName,
int index = -1) = 0;
107 const std::string& fuName,
108 const std::string& portName) = 0;
UInt32 InstructionAddress
TTAMachine::Machine * machine
the architecture definition of the estimated processor
find Finds info of the inner loops in the program
CycleCount ClockCycleCount
Alias for ClockCycleCount.
StopReason
The reasons to stop simulation.
InstructionAddress initialPC_
The address of the first executed instruction.
StopReasonContainer stopReasons_
The set of reasons the simulation was stopped.
virtual StopReason stopReason(unsigned int index) const
virtual SimValue FUPortValue(const std::string &fuName, const std::string &portName)=0
TTASimulationController(const TTASimulationController &)
Copying not allowed.
virtual bool automaticFinishImpossible() const
const TTAMachine::Machine & sourceMachine_
The simulated Machine Object Model.
virtual ~TTASimulationController()
virtual void step(double count=1)=0
std::vector< InstructionAddress > lastExecutedInstruction_
The address of the last executed instruction.
virtual unsigned int stopReasonCount() const
bool stopRequested_
Flag indicating that simulation should stop.
virtual SimulationStatus state() const
virtual void prepareToStop(StopReason reason)
SimulationStatus
The states of simulation.
@ STA_FINISHED
Simulation ended after executing the last instruction.
@ STA_INITIALIZING
Simulation is being initialized.
@ STA_RUNNING
A run command (run, stepi, until...) given.
@ STA_STOPPED
Simulation stopped for some reason.
@ STA_INITIALIZED
Simulation initialized and ready to run.
virtual SimulatorFrontend & frontend()
virtual std::set< InstructionAddress > findProgramExitPoints(const TTAProgram::Program &program, const TTAMachine::Machine &machine) const
virtual std::string registerFileValue(const std::string &rfName, int registerIndex=-1)=0
virtual void next(int count=1)=0
std::set< StopReason > StopReasonContainer
The container type for reasons why simulation stop was requested.
InstructionAddress firstIllegalInstructionIndex_
The index of the first illegal instruction in the instruction sequence.
virtual void runUntil(UIntWord address)=0
virtual InstructionAddress lastExecutedInstruction(int coreId=-1) const
const TTAProgram::Program & program_
Program object model of the simulated program.
SimulationStatus state_
The current state of the simulation.
virtual ClockCycleCount clockCount() const
bool automaticFinishImpossible_
If this is true, simulation cannot be finished automatically.
TTASimulationController & operator=(const TTASimulationController &)
Assignment not allowed.
ClockCycleCount clockCount_
How many clock cycles have been simulated.
virtual SimValue immediateUnitRegisterValue(const std::string &iuName, int index=-1)=0
SimulatorFrontend & frontend_
Reference to the simulator frontend.
virtual InstructionAddress programCounter() const =0
virtual MemorySystem & memorySystem(int coreId=-1)