OpenASIP  2.0
InterpolatingRFEstimator.cc
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2009 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /**
25  * @file InterpolatingRFEstimator.cc
26  *
27  * Declaration of InterpolatingRFEstimator. A RF estimation plugin that
28  * estimates data generating cost database from the cost data stored in HDB.
29  * Estimate is interpolated if possible if no exact data values are found.
30  *
31  * @author Jari Mäntyneva 2006 (jari.mantyneva-no.spam-tut.fi)
32  * @note rating: red
33  */
35 #include "Application.hh"
36 #include "DataObject.hh"
37 #include "Exception.hh"
38 #include "HDBManager.hh"
39 #include "BaseRegisterFile.hh"
40 #include "RegisterFile.hh"
41 #include "ExecutionTrace.hh"
42 #include "CostDatabase.hh"
43 #include "EntryKeyProperty.hh"
44 #include "CostDBTypes.hh"
45 #include "MatchType.hh"
46 #include "RFArchitecture.hh"
47 #include "FilterSearch.hh"
48 #include "CostDatabaseRegistry.hh"
49 #include "Conversion.hh"
50 
51 using namespace CostEstimator;
52 using namespace HDB;
53 using namespace TTAMachine;
54 
56 public:
57  InterpolatingRFEstimator(const std::string& name) :
59  costDatabaseRegistry_ = &CostDatabaseRegistry::instance();
60  }
61 
63  }
64 
66  "RF cost estimator plugin that estimates costs of RFs by generating"
67  "cost database from cost values of HDB and uses interpolation to "
68  "estimate the costs. In case there's no cost data available for the "
69  "given RF the plugin interpolates the estimate if possible.");
70 
71 public:
72 
73  /**
74  * Estimates the register file's area by fetching cost data named 'area'
75  * from HDB.
76  */
79  const IDF::RFImplementationLocation& /*implementation*/,
80  AreaInGates& area,
81  HDB::HDBManager& hdb) {
82 
83 //#define DEBUG_AREA_ESTIMATION
84  try {
85  initializeEstimator(hdb);
86  CostDBTypes::EntryTable results = createSearch(rf);
87  CostDBTypes::EntryTable::const_iterator i = results.begin();
88  area = 0.0;
89  // worst case area is returned
90  for (;i < results.end(); i++) {
91  for (int n = 0; n < (*i)->statisticsCount(); n++) {
92  if (area < (*i)->statistics(n).area()) {
93  area = (*i)->statistics(n).area();
94  }
95  }
96  }
97  } catch (Exception& e) {
98 #ifdef DEBUG_AREA_ESTIMATION
99  std::cout << "Exception: " << e.name() << std::endl
100  << "Error message: " << e.errorMsg() << std::endl
101  << "File: " << e.fileName() << std::endl
102  <<" Line: " e.lineNum() << std::endl;
103 #endif //DEBUG_AREA_ESTIMATION
104  return false;
105  }
106 #ifdef DEBUG_AREA_ESTIMATION
108  << rf.name() << " area " << area << std::endl;
109 #endif //DEBUG_AREA_ESTIMATION
110  return true;
111  }
112 
113  /**
114  * Estimates the register file port write delay by fetching cost data
115  * named 'input_delay' from HDB.
116  *
117  * Assumes that all ports have the same input delay, that is, there is
118  * only one 'input_delay' entry for a RF in HDB.
119  */
120  bool
122  const TTAMachine::RFPort& port,
123  const IDF::RFImplementationLocation& /*implementation*/,
124  DelayInNanoSeconds& delay,
125  HDB::HDBManager& hdb) {
126 
127 //#define DEBUG_DELAY_ESTIMATION
128  try {
129  initializeEstimator(hdb);
130  CostDBTypes::EntryTable results = createSearch(*port.parentUnit());
131 
132  CostDBTypes::EntryTable::const_iterator i = results.begin();
133  delay = 0.0;
134  // worst case delay is returned
135  for (;i < results.end(); i++) {
136  for (int n = 0; n < (*i)->statisticsCount(); n++) {
137 #ifndef UNIQUE_PORT_DELAY
138  if (delay < (*i)->statistics(n).delayPort("input_delay")) {
139  delay = (*i)->statistics(n).delayPort("input_delay");
140  }
141 #endif // UNIQUE_PORT_DELAY
142 #ifdef UNIQUE_PORT_DELAY
143  // this one is used if defferent ports of an unit
144  // can have different delays
145  if (delay < (*i)->statistics(n).delayPort(port.name())) {
146  delay = (*i)->statistics(n).delayPort(port.name());
147  }
148 #endif // UNIQUE_PORT_DELAY
149  }
150  }
151  } catch (Exception& e) {
152 #ifdef DEBUG_DELAY_ESTIMATION
153  Application::logStream() << "No input_delay data for register "
154  << "file "
155  << port.parentUnit()->name()
156  << " found in HDB." << std::endl;
157 #endif // DEBUG_DELAY_ESTIMATION
158  return false;
159  }
160 #ifdef DEBUG_DELAY_ESTIMATION
162  << port.name() << " (port) delay " << delay << std::endl;
163 #endif // DEBUG_DELAY_ESTIMATION
164  return true;
165  }
166 
167  /**
168  * Estimates the register file port read delay by fetching cost data
169  * named 'output_delay' from HDB.
170  *
171  * Assumes that all ports have the same output delay, that is, there is
172  * only one 'output_delay' entry for a RF in HDB.
173  */
174  bool
176  const TTAMachine::RFPort& port,
177  const IDF::RFImplementationLocation& /*implementation*/,
178  DelayInNanoSeconds& delay,
179  HDB::HDBManager& hdb) {
180 
181 //#define DEBUG_DELAY_ESTIMATION
182  try {
183  initializeEstimator(hdb);
184  CostDBTypes::EntryTable results = createSearch(*port.parentUnit());
185  CostDBTypes::EntryTable::const_iterator i = results.begin();
186  delay = 0.0;
187  // worst case delay is returned
188  for (;i < results.end(); i++) {
189  for (int n = 0; n < (*i)->statisticsCount(); n++) {
190 #ifndef UNIQUE_PORT_DELAY
191  if (delay < (*i)->statistics(n).delayPort("output_delay")) {
192  delay = (*i)->statistics(n).delayPort("output_delay");
193  }
194 #endif // UNIQUE_PORT_DELAY
195 #ifdef UNIQUE_PORT_DELAY
196  // this one is used if defferent ports of an unit
197  // can have different delays
198  if (delay < (*i)->statistics(n).delayPort(port.name())) {
199  delay = (*i)->statistics(n).delayPort(port.name());
200  }
201 #endif // UNIQUE_PORT_DELAY
202  }
203  }
204  } catch (Exception& e) {
205 #ifdef DEBUG_DELAY_ESTIMATION
206  Application::logStream() << "No output_delay data for register "
207  << "file "
208  << port.parentUnit()->name()
209  << " found in HDB." << std::endl;
210 #endif // DEBUG_DELAY_ESTIMATION
211  return false;
212  }
213 #ifdef DEBUG_DELAY_ESTIMATION
215  << port.name() << " (port) delay " << delay << std::endl;
216 #endif // DEBUG_DELAY_ESTIMATION
217  return true;
218  }
219 
220  /**
221  * Estimates the register file maximum computation delay by fetching
222  * cost data named 'computation_delay' from HDB.
223  */
224  bool
227  const IDF::RFImplementationLocation& /*implementation*/,
228  DelayInNanoSeconds& delay,
229  HDB::HDBManager& hdb) {
230 
231 //#define DEBUG_DELAY_ESTIMATION
232  try {
233  initializeEstimator(hdb);
234  CostDBTypes::EntryTable results = createSearch(rf);
235  CostDBTypes::EntryTable::const_iterator i = results.begin();
236  delay = 0.0;
237  // the worst case is returned if found multiple results
238  for (;i < results.end(); i++) {
239  for (int n = 0; n < (*i)->statisticsCount(); n++) {
240  if (delay < (*i)->statistics(n).delay()) {
241  delay = (*i)->statistics(n).delay();
242  }
243  }
244  }
245  } catch (Exception& e) {
246  return false;
247  }
248 #ifdef DEBUG_DELAY_ESTIMATION
249  Application::logStream() << rf.name()
250  << " computation delay "
251  << delay << std::endl;
252 #endif // DEBUG_DELAY_ESTIMATION
253  return true;
254  }
255 
256  /**
257  * Estimates the energy consumed by given RF.
258  *
259  * Estimate is done by computing the sum of all register file access
260  * type energies and RF idle energy. Register file access energies are
261  * stored with entries named 'rf_access_energy Nr Nw'. Nr is the number
262  * of read accesses, Nw the number of write accesses. For example,
263  * 'rf_access_energy 1 3' is the name of entry which tells how much
264  * energy is consumed by the RF in case RF is accessed simultaneously
265  * once for reading and trice for writing. Idle energy is stored in
266  * entry 'rf_idle_energy'.
267  */
271  const TTAProgram::Program&,
272  const ExecutionTrace& trace,
273  EnergyInMilliJoules& energy,
274  HDB::HDBManager& hdb) {
275 
276 //#define DEBUG_ENERGY_ESTIMATION
277  energy = 0.0;
278  ClockCycleCount cyclesWithRFAccess = 0;
279  CostDBTypes::EntryTable results;
280  try {
281  initializeEstimator(hdb);
282  results = createSearch(rf);
283 
284 #ifdef DEBUG_ENERGY_ESTIMATION
286  << "## register file " << rf.name() << ": " << std::endl;
287 #endif
288 
292  const_iterator i = accessList->begin();
293  i != accessList->end(); ++i) {
294  const ExecutionTrace::ConcurrentRFAccessCount& accessCount =
295  *i;
296 
297  const std::size_t reads = accessCount.get<0>();
298  const std::size_t writes = accessCount.get<1>();
299  const ClockCycleCount count = accessCount.get<2>();
300 
301  const std::string dataName =
302  std::string("rf_access_energy ") +
303  Conversion::toString(reads) + " " +
304  Conversion::toString(writes);
305  try {
306  CostDBTypes::EntryTable::const_iterator i = results.begin();
307  for (;i < results.end(); i++) {
308 
309  // if there are multilpe reults for the rf access
310  // energy, select the worst case
311  // @todo ensure that multiple result is not a bug
312  EnergyInMilliJoules energyTemp = 0.0;
313  for (int n = 0; n < (*i)->statisticsCount(); n++) {
314  if (((*i)->statistics(n).energyReadWrite(
315  reads, writes) * count) > energyTemp) {
316  energyTemp =
317  (*i)->statistics(n).energyReadWrite(
318  reads, writes) * count;
319  }
320 #ifdef DEBUG_ENERGY_ESTIMATION
321  if (n > 0) {
323  << " NOTE: Multiple register access energy "
324  << "results found!"
325  << " "
326  << (*i)->statistics(n).energyReadWrite(
327  reads, writes)
328  << std::endl;
329  }
330 #endif
331  }
332  energy += energyTemp;
333  }
334  cyclesWithRFAccess += count;
335  } catch (const KeyNotFound&) {
336  // if no data found, don't even try to estimate the area
337  delete accessList;
338  accessList = NULL;
340  << "Cost estimation data '" << dataName
341  << "' not found in HDB." << std::endl;
342  return false;
343  } catch (const Exception& e) {
344  delete accessList;
345  accessList = NULL;
346  debugLog(e.errorMessage());
347  return false;
348  }
349  }
350  delete accessList;
351  accessList = NULL;
352  } catch (const Exception& e) {
353  debugLog(e.errorMessage());
354  return false;
355  }
356 
357  // add the cost of RF idling
358  const ClockCycleCount idleCycles =
359  trace.simulatedCycleCount() - cyclesWithRFAccess;
360  const std::string dataName = std::string("rf_idle_energy");
361 
362  try {
363  CostDBTypes::EntryTable::const_iterator i = results.begin();
364  for (;i < results.end(); i++) {
365 
366  // if there are multilpe reults for the rf idle energy,
367  // select the worst case
368  // @todo Ensure that multiple results is not a bug
369  EnergyInMilliJoules energyTemp = 0.0;
370  for (int n = 0; n < (*i)->statisticsCount(); n++) {
371  if (((*i)->statistics(n).energyIdle() * idleCycles) >
372  energyTemp) {
373 
374  energyTemp =
375  (*i)->statistics(n).energyIdle() * idleCycles;
376  }
377 #ifdef DEBUG_ENERGY_ESTIMATION
378  if (n > 0) {
380  << " NOTE: Multiple register idle energy "
381  << "results found!"
382  << " " << (*i)->statistics(n).energyIdle()
383  << std::endl;
384  }
385 #endif
386  }
387  energy += energyTemp;
388  }
389  } catch (const KeyNotFound&) {
390  // if no data found, don't even try to estimate the area
392  << "Cost estimation data '" << dataName
393  << "' not found in HDB." << std::endl;
394  return false;
395  } catch (const Exception& e) {
396  debugLog(e.errorMessage());
397  return false;
398  }
399 
400  return true;
401  }
402 
403 private:
404  /// Registry of cost databases.
406  /// Cost database being used.
408  /// Search strategy to be used with the cost database.
410  /// Entry key property of register file.
412  /// Search type for each entry type.
413  typedef std::map<
415  /// Types of matches used for searching entries from the cost database.
417  /// Table of types of match.
419 
420 /**
421  * Initializes the plugin.
422  *
423  * @param hdb The HDB to be used in searching entries. Cost database is created
424  * in basis of this HDB.
425  */
426 void
428 
429  costdb_ = &costDatabaseRegistry_->costDatabase(hdb);
430  strategy_ = new FilterSearch();
431  costdb_->setSearchStrategy(strategy_);
433  createSearchTypes();
434 }
435 
436 /**
437  * Creates a search to cost database to find entries matching the given
438  * register file.
439  *
440  * @param rf Register file which matches are searched.
441  * @return Returns entries that matched the register file.
442  */
444 createSearch(const BaseRegisterFile& rf) const {
445  CostDBTypes::EntryTable results;
446 
447  RFArchitecture rfArch(&rf);
448 
449  CostDBEntryKey* searchKey = new CostDBEntryKey(rfileProperty_);
450  searchKey->addField(
451  new EntryKeyField(
452  new EntryKeyDataInt(rfArch.size()),
453  rfileProperty_->fieldProperty(
455  searchKey->addField(
456  new EntryKeyField(
457  new EntryKeyDataInt(rfArch.readPortCount()),
458  rfileProperty_->fieldProperty(
460  searchKey->addField(
461  new EntryKeyField(
462  new EntryKeyDataInt(rfArch.writePortCount()),
463  rfileProperty_->fieldProperty(
465  searchKey->addField(
466  new EntryKeyField(
467  new EntryKeyDataInt(rfArch.width()),
468  rfileProperty_->fieldProperty(CostDBTypes::EKF_BIT_WIDTH)));
469  searchKey->addField(
470  new EntryKeyField(
471  new EntryKeyDataInt(rfArch.latency()),
472  rfileProperty_->fieldProperty(CostDBTypes::EKF_LATENCY)));
473  searchKey->addField(
474  new EntryKeyField(
475  new EntryKeyDataInt(rfArch.bidirPortCount()),
476  rfileProperty_->fieldProperty(
478  searchKey->addField(
479  new EntryKeyField(
480  new EntryKeyDataInt(rfArch.maxReads()),
481  rfileProperty_->fieldProperty(
483  searchKey->addField(
484  new EntryKeyField(
485  new EntryKeyDataInt(rfArch.maxWrites()),
486  rfileProperty_->fieldProperty(
488  searchKey->addField(
489  new EntryKeyField(
490  new EntryKeyDataBool(rfArch.hasGuardSupport()),
491  rfileProperty_->fieldProperty(
493  searchKey->addField(
494  new EntryKeyField(
495  new EntryKeyDataInt(rfArch.guardLatency()),
496  rfileProperty_->fieldProperty(
498 
499  // Perform a database query.
500  try {
501  results = costdb_->search(*searchKey, interpMatchType_);
502  } catch (Exception& e) {
503  delete searchKey;
504  searchKey = 0;
505  throw e;
506  }
507  delete searchKey;
508  searchKey = 0;
509  return results;
510 }
511 
512 /**
513  * Creates types of matches used for searching cost database
514  * entries.
515  */
517 
518  interpMatchType_.push_back(
519  new MatchType(
522  interpMatchType_.push_back(
523  new MatchType(
526  interpMatchType_.push_back(
527  new MatchType(
530  interpMatchType_.push_back(
531  new MatchType(
534  interpMatchType_.push_back(
535  new MatchType(
536  rfileProperty_->fieldProperty(CostDBTypes::EKF_BIT_WIDTH),
538  interpMatchType_.push_back(
539  new MatchType(
540  rfileProperty_->fieldProperty(CostDBTypes::EKF_LATENCY),
542  interpMatchType_.push_back(
543  new MatchType(
544  rfileProperty_->fieldProperty(CostDBTypes::EKF_MAX_READS),
546  interpMatchType_.push_back(
547  new MatchType(
550  interpMatchType_.push_back(
551  new MatchType(
554  interpMatchType_.push_back(
555  new MatchType(
558 }
559 
560 };
561 
CostEstimator::RFCostEstimationPlugin
Definition: RFCostEstimationPlugin.hh:67
IDF::UnitImplementationLocation
Definition: UnitImplementationLocation.hh:48
CostDatabase
Definition: CostDatabase.hh:64
BaseRegisterFile.hh
InterpolatingRFEstimator::MatchTypeMap
std::map< const EntryKeyProperty *, CostDBTypes::MatchTypeTable > MatchTypeMap
Search type for each entry type.
Definition: InterpolatingRFEstimator.cc:414
CostDBTypes::EK_RFILE
static const std::string EK_RFILE
Entry type for register files.
Definition: CostDBTypes.hh:65
TTAProgram::Program
Definition: Program.hh:63
InterpolatingRFEstimator::costdb_
CostDatabase * costdb_
Cost database being used.
Definition: InterpolatingRFEstimator.cc:407
InterpolatingRFEstimator::InterpolatingRFEstimator
InterpolatingRFEstimator(const std::string &name)
Definition: InterpolatingRFEstimator.cc:57
HDB::RFArchitecture::maxReads
int maxReads() const
Definition: RFArchitecture.cc:447
CostDBTypes::EKF_GUARD_SUPPORT
static const std::string EKF_GUARD_SUPPORT
Field type for guard support in an entry.
Definition: CostDBTypes.hh:104
MatchType
Definition: MatchType.hh:49
CostDBTypes::EKF_BIT_WIDTH
static const std::string EKF_BIT_WIDTH
Field type for bit width of an entry.
Definition: CostDBTypes.hh:78
CostDBTypes::MatchTypeTable
std::vector< MatchType * > MatchTypeTable
Table of types of match.
Definition: CostDBTypes.hh:114
InterpolatingRFEstimator::strategy_
SearchStrategy * strategy_
Search strategy to be used with the cost database.
Definition: InterpolatingRFEstimator.cc:409
Exception::lineNum
int lineNum() const
CostDBTypes.hh
TTAMachine::Component::name
virtual TCEString name() const
Definition: MachinePart.cc:125
HDB
Definition: CostDatabase.hh:49
CostDatabaseRegistry::costDatabase
CostDatabase & costDatabase(const HDB::HDBManager &hdb)
Definition: CostDatabaseRegistry.cc:79
Exception.hh
DESCRIPTION
#define DESCRIPTION(TEXT__)
Definition: FUCostEstimationPlugin.hh:129
HDB::RFArchitecture::latency
int latency() const
Definition: RFArchitecture.cc:497
CostDatabaseRegistry
Definition: CostDatabaseRegistry.hh:46
CostDBTypes::EKF_WRITE_PORTS
static const std::string EKF_WRITE_PORTS
Field type for number of write ports in an entry.
Definition: CostDBTypes.hh:88
CostDBTypes::EntryTable
std::vector< CostDBEntry * > EntryTable
Table of database entries.
Definition: CostDBTypes.hh:111
EntryKeyField
Definition: EntryKeyField.hh:45
SearchStrategy
Definition: SearchStrategy.hh:45
CostDatabaseRegistry.hh
InterpolatingRFEstimator::rfileProperty_
EntryKeyProperty * rfileProperty_
Entry key property of register file.
Definition: InterpolatingRFEstimator.cc:411
CostEstimator::AreaInGates
double AreaInGates
type for area values in equivalent gates
Definition: CostEstimatorTypes.hh:35
Application::logStream
static std::ostream & logStream()
Definition: Application.cc:155
InterpolatingRFEstimator::createSearchTypes
void createSearchTypes()
Definition: InterpolatingRFEstimator.cc:516
Conversion::toString
static std::string toString(const T &source)
HDB::RFArchitecture::width
int width() const
Definition: RFArchitecture.cc:343
FilterSearch.hh
TTAMachine::RFPort
Definition: RFPort.hh:45
CostDBTypes::MATCH_EXACT
@ MATCH_EXACT
Definition: CostDBTypes.hh:56
CostDatabaseRegistry::instance
static CostDatabaseRegistry & instance()
Definition: CostDatabaseRegistry.cc:60
Exception::fileName
std::string fileName() const
CostEstimator::EnergyInMilliJoules
double EnergyInMilliJoules
type for consumed energy in milli joules
Definition: CostEstimatorTypes.hh:37
CostDBTypes::EKF_NUM_REGISTERS
static const std::string EKF_NUM_REGISTERS
Field type for number of registers in an entry.
Definition: CostDBTypes.hh:84
CostDBTypes::MATCH_INTERPOLATION
@ MATCH_INTERPOLATION
Definition: CostDBTypes.hh:59
TTAMachine::BaseRegisterFile
Definition: BaseRegisterFile.hh:48
FilterSearch
Definition: FilterSearch.hh:63
CostDatabase::search
CostDBTypes::EntryTable search(const CostDBEntryKey &searchKey, const CostDBTypes::MatchTypeTable &match) const
Definition: CostDatabase.cc:888
EXPORT_RF_COST_ESTIMATOR_PLUGIN
#define EXPORT_RF_COST_ESTIMATOR_PLUGIN(PLUGIN_NAME__)
Definition: RFCostEstimationPlugin.hh:108
InterpolatingRFEstimator::searchTypes_
MatchTypeMap searchTypes_
Types of matches used for searching entries from the cost database.
Definition: InterpolatingRFEstimator.cc:416
CostDBEntryKey::addField
void addField(EntryKeyField *field)
Definition: CostDBEntryKey.cc:88
InterpolatingRFEstimator::initializeEstimator
void initializeEstimator(const HDBManager &hdb)
Definition: InterpolatingRFEstimator.cc:427
HDB::RFArchitecture::maxWrites
int maxWrites() const
Definition: RFArchitecture.cc:472
Conversion.hh
ExecutionTrace
Definition: ExecutionTrace.hh:56
Application.hh
InterpolatingRFEstimator::estimateMaximumComputationDelay
bool estimateMaximumComputationDelay(const TTAMachine::BaseRegisterFile &rf, const IDF::RFImplementationLocation &, DelayInNanoSeconds &delay, HDB::HDBManager &hdb)
Definition: InterpolatingRFEstimator.cc:225
HDB::HDBManager
Definition: HDBManager.hh:82
RFArchitecture.hh
HDB::RFArchitecture::guardLatency
int guardLatency() const
Definition: RFArchitecture.cc:551
Exception
Definition: Exception.hh:54
CostDBTypes::EKF_BIDIR_PORTS
static const std::string EKF_BIDIR_PORTS
Field type for number of bidirectional ports in an entry.
Definition: CostDBTypes.hh:90
MatchType.hh
DataObject.hh
EntryKeyProperty
Definition: EntryKeyProperty.hh:57
Exception::errorMessage
std::string errorMessage() const
Definition: Exception.cc:123
ExecutionTrace::registerFileAccessCounts
ConcurrentRFAccessCountList * registerFileAccessCounts(RegisterFileID registerFile) const
Definition: ExecutionTrace.cc:505
EntryKeyProperty.hh
CostEstimator::DelayInNanoSeconds
double DelayInNanoSeconds
type for propagation delays in nano seconds
Definition: CostEstimatorTypes.hh:39
CostDatabase.hh
HDB::RFArchitecture::hasGuardSupport
bool hasGuardSupport() const
Definition: RFArchitecture.cc:519
HDB::RFArchitecture
Definition: RFArchitecture.hh:50
InterpolatingRFEstimator::costDatabaseRegistry_
CostDatabaseRegistry * costDatabaseRegistry_
Registry of cost databases.
Definition: InterpolatingRFEstimator.cc:405
TTAMachine::RFPort::parentUnit
BaseRegisterFile * parentUnit() const
Definition: RFPort.cc:93
InterpolatingRFEstimator::interpMatchType_
CostDBTypes::MatchTypeTable interpMatchType_
Table of types of match.
Definition: InterpolatingRFEstimator.cc:418
InterpolatingRFEstimator
Definition: InterpolatingRFEstimator.cc:55
InterpolatingRFEstimator::estimateEnergy
bool estimateEnergy(const TTAMachine::BaseRegisterFile &rf, const IDF::RFImplementationLocation &, const TTAProgram::Program &, const ExecutionTrace &trace, EnergyInMilliJoules &energy, HDB::HDBManager &hdb)
Definition: InterpolatingRFEstimator.cc:268
CostDBTypes::EKF_MAX_WRITES
static const std::string EKF_MAX_WRITES
Field type for number of max simultaneous writes in an entry.
Definition: CostDBTypes.hh:94
RegisterFile.hh
TTAMachine::Port::name
virtual std::string name() const
Definition: Port.cc:141
ExecutionTrace::simulatedCycleCount
ClockCycleCount simulatedCycleCount() const
Definition: ExecutionTrace.cc:764
trace
ExecutionTrace * trace
the execution trace database
Definition: EstimatorCmdLineUI.cc:66
ExecutionTrace::ConcurrentRFAccessCount
boost::tuple< RegisterAccessCount, RegisterAccessCount, ClockCycleCount > ConcurrentRFAccessCount
type to be used as a key for storing concurrent RF access info
Definition: ExecutionTrace.hh:105
HDB::RFArchitecture::readPortCount
int readPortCount() const
Definition: RFArchitecture.cc:372
EntryKeyDataInt
Definition: EntryKeyData.hh:83
HDB::RFArchitecture::size
int size() const
Definition: RFArchitecture.cc:326
InterpolatingRFEstimator::~InterpolatingRFEstimator
virtual ~InterpolatingRFEstimator()
Definition: InterpolatingRFEstimator.cc:62
CostDBTypes::EKF_READ_PORTS
static const std::string EKF_READ_PORTS
Field type for number of read ports in an entry.
Definition: CostDBTypes.hh:86
ClockCycleCount
CycleCount ClockCycleCount
Alias for ClockCycleCount.
Definition: SimulatorConstants.hh:57
CostDBTypes::EKF_MAX_READS
static const std::string EKF_MAX_READS
Field type for number of max simultaneous reads in an entry.
Definition: CostDBTypes.hh:92
CostDBEntryKey
Definition: CostDBEntryKey.hh:52
ExecutionTrace::ConcurrentRFAccessCountList
std::list< ConcurrentRFAccessCount > ConcurrentRFAccessCountList
type to be used for a list of concurrent RF accesses
Definition: ExecutionTrace.hh:108
KeyNotFound
Definition: Exception.hh:285
InterpolatingRFEstimator::estimatePortReadDelay
bool estimatePortReadDelay(const TTAMachine::RFPort &port, const IDF::RFImplementationLocation &, DelayInNanoSeconds &delay, HDB::HDBManager &hdb)
Definition: InterpolatingRFEstimator.cc:175
EntryKeyProperty::find
static EntryKeyProperty * find(std::string type)
Definition: EntryKeyProperty.cc:150
HDB::RFArchitecture::bidirPortCount
int bidirPortCount() const
Definition: RFArchitecture.cc:422
TTAMachine
Definition: Assembler.hh:48
EntryKeyDataBool
Definition: EntryKeyData.hh:166
CostDBTypes::EKF_GUARD_LATENCY
static const std::string EKF_GUARD_LATENCY
Field type for guard latency in an entry.
Definition: CostDBTypes.hh:106
HDBManager.hh
CostDatabase::setSearchStrategy
void setSearchStrategy(SearchStrategy *strategy)
Definition: CostDatabase.cc:985
CostEstimator
Definition: CostEstimationPlugin.cc:36
debugLog
#define debugLog(text)
Definition: Application.hh:95
CostDBTypes::EKF_LATENCY
static const std::string EKF_LATENCY
Field type for latency of an entry.
Definition: CostDBTypes.hh:82
InterpolatingRFEstimator::createSearch
CostDBTypes::EntryTable createSearch(const BaseRegisterFile &rf) const
Definition: InterpolatingRFEstimator.cc:444
EntryKeyProperty::fieldProperty
EntryKeyFieldProperty * fieldProperty(std::string field) const
Definition: EntryKeyProperty.cc:104
RFCostEstimationPlugin.hh
InterpolatingRFEstimator::estimatePortWriteDelay
bool estimatePortWriteDelay(const TTAMachine::RFPort &port, const IDF::RFImplementationLocation &, DelayInNanoSeconds &delay, HDB::HDBManager &hdb)
Definition: InterpolatingRFEstimator.cc:121
InterpolatingRFEstimator::estimateArea
bool estimateArea(const TTAMachine::BaseRegisterFile &rf, const IDF::RFImplementationLocation &, AreaInGates &area, HDB::HDBManager &hdb)
Definition: InterpolatingRFEstimator.cc:77
HDB::RFArchitecture::writePortCount
int writePortCount() const
Definition: RFArchitecture.cc:397
ExecutionTrace.hh