OpenASIP
2.0
|
#include <CostEstimates.hh>
Public Member Functions | |
CostEstimates () | |
virtual | ~CostEstimates () |
void | setArea (double area) |
void | setLongestPathDelay (double delay) |
void | setEnergy (const TTAProgram::Program &program, double energy) |
void | setCycleCount (const TTAProgram::Program &program, ClockCycleCount cycles) |
double | area () const |
double | longestPathDelay () const |
int | energies () const |
double | energy (int index) const |
double | energy (const TTAProgram::Program &program) const |
Private Attributes | |
std::map< const TTAProgram::Program *, double > | energyMap_ |
Map containing programs and energies consumed in running the programs. More... | |
double | area_ |
Area estimation value (in gates). More... | |
double | longestPathDelay_ |
Longest path delay estimation value (in nano seconds). More... | |
This class represents cost estimates for a machine configuration.
Class stores estimates of area (in gates), longest path delay (in nano seconds) and energy consumptions (in milli joules) when the configuration is used to run different programs. Area and longest path delay are constants to one configuration while there can be multiple programs executed so multiple energy consumption estimations and cycle counts as well. Each energy consumption is bound to one program.
Definition at line 57 of file CostEstimates.hh.
CostEstimates::CostEstimates | ( | ) |
The contstructor.
Definition at line 42 of file CostEstimates.cc.
|
virtual |
double CostEstimates::area | ( | ) | const |
Returns the area estimate (in gates).
Definition at line 101 of file CostEstimates.cc.
References area_.
Referenced by MinimizeMachine::minimizeBuses(), Evaluate::printEstimates(), ComponentImplementationSelector::selectFUs(), ComponentImplementationSelector::selectIUs(), ComponentImplementationSelector::selectRFs(), and setArea().
int CostEstimates::energies | ( | ) | const |
Returns the number of different energy estimates (one for each program) in the cost estimation data.
Definition at line 124 of file CostEstimates.cc.
References energyMap_.
Referenced by energy(), and Evaluate::printEstimates().
double CostEstimates::energy | ( | const TTAProgram::Program & | program | ) | const |
Returns the energy value corresponding to the Program.
program | Program of which energy is returned. |
KeyNotFound | Is thrown if program has no energy set. |
Definition at line 159 of file CostEstimates.cc.
References __func__, energyMap_, and program.
double CostEstimates::energy | ( | int | index | ) | const |
Returns the energy value from the given index.
index | The index. |
OutOfRange | If the given index is less than 0 or greater or equal to the number of energies. |
Definition at line 138 of file CostEstimates.cc.
References __func__, energies(), and energyMap_.
Referenced by Evaluate::printEstimates(), and setEnergy().
double CostEstimates::longestPathDelay | ( | ) | const |
Returns the longest path delay estimate (in nano seconds).
Definition at line 112 of file CostEstimates.cc.
References longestPathDelay_.
Referenced by MinimizeMachine::minimizeBuses(), Evaluate::printEstimates(), ComponentImplementationSelector::selectFUs(), ComponentImplementationSelector::selectIUs(), and ComponentImplementationSelector::selectRFs().
void CostEstimates::setArea | ( | double | area | ) |
Sets the area estimate (in gates).
area | Area estimate value (in gates). |
Definition at line 58 of file CostEstimates.cc.
Referenced by DesignSpaceExplorer::evaluate(), ComponentImplementationSelector::fuImplementations(), ComponentImplementationSelector::iuImplementations(), and ComponentImplementationSelector::rfImplementations().
void CostEstimates::setCycleCount | ( | const TTAProgram::Program & | program, |
ClockCycleCount | cycles | ||
) |
void CostEstimates::setEnergy | ( | const TTAProgram::Program & | program, |
double | energy | ||
) |
Sets new energy estimate for the given program.
If there was an old energy value for the given key it is removed first.
program | Program that is used as a key. |
energy | Energy consumed while running the program (in milli joules). |
Definition at line 83 of file CostEstimates.cc.
References energy(), energyMap_, and program.
Referenced by DesignSpaceExplorer::evaluate().
void CostEstimates::setLongestPathDelay | ( | double | delay | ) |
Sets the longest path delay estimate (in nano seconds).
delay | Longest path delay estimte value (in nano seconds). |
Definition at line 69 of file CostEstimates.cc.
References longestPathDelay_.
Referenced by DesignSpaceExplorer::evaluate(), ComponentImplementationSelector::fuImplementations(), ComponentImplementationSelector::iuImplementations(), and ComponentImplementationSelector::rfImplementations().
|
private |
Area estimation value (in gates).
Definition at line 76 of file CostEstimates.hh.
|
private |
Map containing programs and energies consumed in running the programs.
Definition at line 74 of file CostEstimates.hh.
Referenced by energies(), energy(), and setEnergy().
|
private |
Longest path delay estimation value (in nano seconds).
Definition at line 78 of file CostEstimates.hh.
Referenced by longestPathDelay(), and setLongestPathDelay().