OpenASIP
2.0
|
#include <CostDBEntryStatsRF.hh>
Public Member Functions | |
CostDBEntryStatsRF (double areaData, double delayData) | |
virtual | ~CostDBEntryStatsRF () |
CostDBEntryStatsRF (const CostDBEntryStatsRF &stats1, const CostDBEntryStatsRF &stats2, double coefficient) | |
virtual double | energyActive () const |
virtual double | energyRead () const |
virtual double | energyWrite () const |
virtual double | energyReadWrite (int reads, int writes) const |
virtual void | setEnergyActive (double energy) |
virtual void | setEnergyRead (double energy) |
virtual void | setEnergyWrite (double energy) |
virtual void | setEnergyReadWrite (int reads, int writes, double energy) |
Public Member Functions inherited from CostDBEntryStats | |
CostDBEntryStats (double areaData, double internalDelayData) | |
virtual | ~CostDBEntryStats () |
CostDBEntryStats (const CostDBEntryStats &stats1, const CostDBEntryStats &stats2, double coefficient) | |
virtual CostDBEntryStats * | copy () const |
virtual double | area () const |
virtual double | delay () const |
virtual double | delayPort (const std::string &port) const |
virtual void | setDelay (const std::string &port, double delay) |
virtual double | energyIdle () const |
virtual double | energyOperation (const std::string &name) const |
virtual bool | hasEnergyOperation (const std::string &name) const |
virtual void | setEnergyIdle (double energy) |
virtual void | setEnergyOperation (const std::string &name, double energy) |
Protected Member Functions | |
virtual CostDBEntryStats * | createStats () const |
Protected Member Functions inherited from CostDBEntryStats | |
virtual bool | hasEnergy (const std::string &key) const |
virtual double | findEnergy (const std::string &key) const |
virtual void | addEnergy (const std::string &name, double energy) |
virtual bool | hasDelay (const std::string &key) const |
virtual double | findDelay (const std::string &key) const |
virtual void | addDelay (const std::string &name, double delay) |
Private Types | |
typedef std::map< const std::string, double > | EnergyMap |
Map of energies. More... | |
typedef std::map< const std::string, double > | DelayMap |
Map of delays. More... | |
Private Member Functions | |
CostDBEntryStatsRF (const CostDBEntryStatsRF &) | |
Copying not allowed. More... | |
CostDBEntryStatsRF & | operator= (const CostDBEntryStatsRF &) |
Assignment not allowed. More... | |
Static Private Member Functions | |
static std::string | generateReadWriteString (int reads, int writes) |
Additional Inherited Members | |
Static Protected Attributes inherited from CostDBEntryStats | |
static const std::string | ENERGY_ACTIVE = "(active)" |
String for active energy. More... | |
static const std::string | ENERGY_IDLE = "(idle)" |
String for idle energy. More... | |
static const std::string | ENERGY_READ = "(read)" |
String for read energy. More... | |
static const std::string | ENERGY_WRITE = "(write)" |
String for write energy. More... | |
static const std::string | ENERGY_READ_WRITE = "(rd,wr)" |
String for reads and writes energy. More... | |
Stores area, delay and energy statistics of register files.
Definition at line 45 of file CostDBEntryStatsRF.hh.
|
private |
Map of delays.
Definition at line 71 of file CostDBEntryStatsRF.hh.
|
private |
Map of energies.
Definition at line 69 of file CostDBEntryStatsRF.hh.
CostDBEntryStatsRF::CostDBEntryStatsRF | ( | double | areaData, |
double | delayData | ||
) |
Constructor.
areaData | area. |
delayData | delay. |
Definition at line 50 of file CostDBEntryStatsRF.cc.
Referenced by createStats().
|
virtual |
CostDBEntryStatsRF::CostDBEntryStatsRF | ( | const CostDBEntryStatsRF & | stats1, |
const CostDBEntryStatsRF & | stats2, | ||
double | coefficient | ||
) |
Constructor.
Combines two statistics into one using coefficient as a weighting factor on interpolating the statistics. For example, if weighting factor is 0.4, the first area 100 and the second 200, area of new statistics will be 140. delay and energy will be handled similarly.
stats1 | First statistics. |
stats2 | Second statistics. |
coefficient | Weighting factor. |
Definition at line 66 of file CostDBEntryStatsRF.cc.
|
private |
Copying not allowed.
|
protectedvirtual |
Create correct type of statistics.
Reimplemented from CostDBEntryStats.
Definition at line 88 of file CostDBEntryStatsRF.cc.
References CostDBEntryStats::area(), CostDBEntryStatsRF(), and CostDBEntryStats::delay().
|
virtual |
Returns the energy of an entry in an active cycle.
The function will fail since register files do not have unambiguous energy for the whole unit but separately for each access pairs.
WrongSubclass | An illegal function was called for this instance. |
KeyNotFound | Never thown by this function. |
Reimplemented from CostDBEntryStats.
Definition at line 105 of file CostDBEntryStatsRF.cc.
|
virtual |
Returns the read energy of an entry.
WrongSubclass | Never thrown by this function. |
KeyNotFound | Throws if read energy is not set. |
Reimplemented from CostDBEntryStats.
Definition at line 119 of file CostDBEntryStatsRF.cc.
References CostDBEntryStats::ENERGY_READ, and CostDBEntryStats::findEnergy().
|
virtual |
Returns the reads and writes energy of an entry.
reads | The number of simultaneus reads done for the unit. |
writes | The number of simultaneus writes done for the unit. |
WrongSubclass | Never thrown by this function. |
KeyNotFound | Throws if the requested energy is not found. |
Reimplemented from CostDBEntryStats.
Definition at line 145 of file CostDBEntryStatsRF.cc.
References CostDBEntryStats::findEnergy(), and generateReadWriteString().
|
virtual |
Returns the write energy of an entry.
WrongSubclass | Never thrown by this function. |
KeyNotFound | Throws if write energy is not set. |
Reimplemented from CostDBEntryStats.
Definition at line 131 of file CostDBEntryStatsRF.cc.
References CostDBEntryStats::ENERGY_WRITE, and CostDBEntryStats::findEnergy().
|
staticprivate |
Returns a string corresponding to given (read,write) combination in internal format.
reads | Number of simultaneous reads. |
writes | Number of simultaneous writes. |
Definition at line 210 of file CostDBEntryStatsRF.cc.
References CostDBEntryStats::ENERGY_READ_WRITE, and Conversion::toString().
Referenced by energyReadWrite(), and setEnergyReadWrite().
|
private |
Assignment not allowed.
|
virtual |
Set the energy of an entry in an active cycle.
The function will fail since function units do not have unambiguous energy for the whole unit but separately for each operation.
energy | The energy of an entry in an active cycle. |
WrongSubclass | An illegal function was called for this instance. |
Reimplemented from CostDBEntryStats.
Definition at line 160 of file CostDBEntryStatsRF.cc.
|
virtual |
Set the read energy of an entry.
energy | The read energy of an entry. |
WrongSubclass | An illegal function was called for this instance. |
Reimplemented from CostDBEntryStats.
Definition at line 172 of file CostDBEntryStatsRF.cc.
References CostDBEntryStats::addEnergy(), and CostDBEntryStats::ENERGY_READ.
|
virtual |
Set the reads and writes energy of an entry.
energy | The reads and writes energy of an entry. |
reads | The number of reads of the unit. |
writes | The number of writes of the unit. |
WrongSubclass | Never thrown by this function. |
Reimplemented from CostDBEntryStats.
Definition at line 196 of file CostDBEntryStatsRF.cc.
References CostDBEntryStats::addEnergy(), and generateReadWriteString().
Referenced by CostDatabase::buildRegisterFiles().
|
virtual |
Set the write energy of an entry.
energy | The write energy of an entry. |
WrongSubclass | Never thrown by this function. |
Reimplemented from CostDBEntryStats.
Definition at line 183 of file CostDBEntryStatsRF.cc.
References CostDBEntryStats::addEnergy(), and CostDBEntryStats::ENERGY_WRITE.