Go to the documentation of this file.
71 addParameter(adfPN_,
STRING,
false, adf_);
72 addParameter(idfPN_,
STRING,
false, idf_);
81 virtual std::vector<RowID>
84 std::vector<RowID> result;
87 if (configurationID == 0 && adf_ ==
"") {
88 std::ostringstream msg(std::ostringstream::out);
89 msg <<
"No configuration nor adf defined. Use -s <confID> to "
90 <<
"define the configuration to be optimized or give adf "
91 <<
"as plugin parameter." << endl;
100 if (configurationID == 0) {
101 if (!createConfig(adf_, idf_, dsdb, conf)) {
112 if (!evaluate(conf, estimates, estimate)) {
117 debugLog(std::string(
"Error in Evaluate plugin: ")
124 + (estimate ?
"with" :
"without") +
" estimation.",1)
126 if (print_ && estimate) {
127 printEstimates(estimates, conf);
131 if (configurationID == 0) {
132 RowID newConfID = addConfToDSDB(conf);
133 if (newConfID != 0) {
134 result.push_back(newConfID);
159 readOptionalParameter(adfPN_, adf_);
160 readOptionalParameter(idfPN_, idf_);
161 readOptionalParameter(printPN_, print_);
175 const std::string& adf,
176 const std::string& idf,
200 std::ostringstream msg(std::ostringstream::out);
201 msg <<
"Error loading the adf/idf." << std::endl;
219 std::ostream& log = std::cout;
220 log.flags(std::ios::left);
223 log << setw(fw) <<
"Area: " << estimates.
area() << endl;
224 log << setw(fw) <<
"Longest path delay: " <<
226 for (
int i = 0; i < estimates.
energies(); ++i) {
227 log <<
"application " << i << setw(14) <<
" energy: " <<
228 estimates.
energy(i) << endl;
231 std::vector<ClockCycleCount> cycleCounts =
232 db().cycleCounts(configuration);
234 for (
int i = 0; i < (int)cycleCounts.size(); ++i) {
235 log <<
"application " << i <<
" cycle count: " <<
236 cycleCounts.at(i) << endl;
virtual bool requiresSimulationData() const
bool createConfig(const std::string &adf, const std::string &idf, DSDBManager &dsdb, DSDBManager::MachineConfiguration &conf)
int RowID
Type definition of row ID in relational databases.
double energy(int index) const
virtual std::vector< RowID > explore(const RowID &configurationID, const unsigned int &)
std::string idf_
name of the idf file to evaluate
static std::string toString(const T &source)
#define assert(condition)
static const std::string printPN_
double longestPathDelay() const
const std::string PLUGIN_DESCRIPTION
bool print_
print evaluation results
static const std::string idfPN_
#define EXPORT_DESIGN_SPACE_EXPLORER_PLUGIN(PLUGIN_NAME__)
#define verboseLogC(text, neededVerbosity)
virtual bool producesArchitecture() const
virtual bool requiresHDB() const
void printEstimates(const CostEstimates &estimates, const DSDBManager::MachineConfiguration &configuration)
std::string errorMessageStack(bool messagesOnly=false) const
std::string adf_
name of the adf file to evaluate
virtual bool requiresStartingPointArchitecture() const
std::string errorMessage() const
RowID addArchitecture(const TTAMachine::Machine &mom)
MachineConfiguration configuration(RowID id) const
static const std::string adfPN_
RowID addImplementation(const IDF::MachineImplementation &impl, double longestPathDelay, CostEstimator::AreaInGates area)
static MachineImplementation * loadFromIDF(const std::string &idfFileName)
static Machine * loadFromADF(const std::string &adfFileName)