OpenASIP
2.0
|
#include <SimulationStatistics.hh>
Public Member Functions | |
SimulationStatistics (const TTAProgram::Program &programData, const InstructionMemory &executionCounts) | |
virtual | ~SimulationStatistics () |
void | addStatistics (SimulationStatisticsCalculator &statisticsType) |
void | calculate () |
Private Attributes | |
std::vector< SimulationStatisticsCalculator * > | statisticsTypes_ |
All registered statistics types are stored in this container. More... | |
const TTAProgram::Program & | program_ |
The program used in calculating the statistics. More... | |
const InstructionMemory & | executionCounts_ |
The execution counts of instructions and moves in the program. More... | |
Calculates simulation statistics using user-given calculation classes.
Definition at line 48 of file SimulationStatistics.hh.
SimulationStatistics::SimulationStatistics | ( | const TTAProgram::Program & | programData, |
const InstructionMemory & | executionCounts | ||
) |
Constructs a new simulation statistics calculation loop.
programData | The program the statistics are calculated from. |
executionCounts | Execution counts of instructions and moves in the program. |
Definition at line 48 of file SimulationStatistics.cc.
|
virtual |
void SimulationStatistics::addStatistics | ( | SimulationStatisticsCalculator & | statisticsType | ) |
Adds a new statistics type to be included in simulation statistics calculation.
statisticsType | New statistics type. |
Definition at line 68 of file SimulationStatistics.cc.
References statisticsTypes_.
Referenced by SimulatorFrontend::utilizationStatistics().
void SimulationStatistics::calculate | ( | ) |
Calculates simulation statistics by going through the program and invoking calculate() for all statistics types.
Definition at line 78 of file SimulationStatistics.cc.
References TTAProgram::Instruction::address(), ExecutableInstruction::executionCount(), executionCounts_, InstructionMemory::implicitInstructionsAt(), TTAProgram::NullInstruction::instance(), TTAProgram::Program::instructionAt(), InstructionMemory::instructionAtConst(), TTAProgram::Address::location(), TTAProgram::Program::nextInstruction(), program_, TTAProgram::Instruction::size(), TTAProgram::Program::startAddress(), and statisticsTypes_.
Referenced by SimulatorFrontend::utilizationStatistics().
|
private |
The execution counts of instructions and moves in the program.
Definition at line 64 of file SimulationStatistics.hh.
Referenced by calculate().
|
private |
The program used in calculating the statistics.
Definition at line 62 of file SimulationStatistics.hh.
Referenced by calculate().
|
private |
All registered statistics types are stored in this container.
Definition at line 60 of file SimulationStatistics.hh.
Referenced by addStatistics(), and calculate().