Go to the documentation of this file.
38 #include <boost/format.hpp>
91 interp.
step(stepping);
92 simulatedCycles += stepping;
94 std::cerr <<
"Simulation error: " << e.
errorMessage() << std::endl;
103 if (simulatedCycles / 1000000 > (simulatedCycles - stepping) / 1000000)
105 <<
"simulated " << simulatedCycles <<
" cycles" << std::endl;
109 <<
"stop reasons:" << std::endl
110 <<
"* compiled engine:" << std::endl;
112 std::cout <<
"** " << compiled.
stopReason(i) << std::endl;
115 <<
"* interp. engine:" << std::endl;
117 std::cout <<
"** " << interp.
stopReason(i) << std::endl;
128 std::cerr <<
"usage: ttasim-tandem machine.adf program.tpef";
@ SIM_COMPILED
Compiled, faster simulation.
TTAMachine::Machine * machine
the architecture definition of the estimated processor
void setStaticCompilation(bool value)
unsigned int stopReasonCount() const
#define assert(condition)
virtual void loadMachine(const std::string &fileName)
bool compareState(SimulatorFrontend &other, std::ostream *differences=NULL)
virtual void loadProgram(const std::string &fileName)
std::string errorMessage() const
ClockCycleCount cycleCount() const
virtual void step(double count=1)
static Program * loadFromTPEF(const std::string &tpefFileName, const TTAMachine::Machine &theMachine)
void setCompiledSimulationLeaveDirty(bool dirty)
StopReason stopReason(unsigned int index) const
CycleCount ClockCycleCount
Alias for ClockCycleCount.
int main(int argc, char *argv[])
find Finds info of the inner loops in the program
bool hasSimulationEnded() const
bool isSimulationInitialized() const
void tandemSimulate(TTAMachine::Machine &machine, TTAProgram::Program &program)
static Machine * loadFromADF(const std::string &adfFileName)
@ SIM_NORMAL
Default, interpreted simulation (debugging engine).