OpenASIP 2.2
|
#include <string>
#include <vector>
#include <algorithm>
#include <iostream>
#include "StringTools.hh"
#include "Application.hh"
#include "Exception.hh"
#include "FileSystem.hh"
#include "DesignSpaceExplorer.hh"
#include "DesignSpaceExplorerPlugin.hh"
#include "ExplorerCmdLineOptions.hh"
#include "DSDBManager.hh"
#include "HDBRegistry.hh"
#include "MachineImplementation.hh"
#include "Machine.hh"
#include "ExplorerPluginParameter.hh"
#include "Environment.hh"
#include "Conversion.hh"
Go to the source code of this file.
Functions | |
DSDBManager * | loadDSDB (const std::string &dsdbFile) |
void | parseParameter (const std::string ¶m, std::string ¶mName, std::string ¶mValue) |
void | determineLongest (const vector< DSDBManager::ConfigurationCosts > &confs, int &configurationID, int &applicationPath, int &cycleCount, int &energyEstimate, int &longestPathDelay, int &area) |
void | printSpaces (unsigned int numberOfSpaces) |
DSDBManager::Order | orderingOfData (const string &order) |
bool | loadPluginParameters (DesignSpaceExplorerPlugin *plugin, const ExplorerCmdLineOptions &options) |
DesignSpaceExplorerPlugin * | loadExplorerPlugin (const std::string &plugin, DSDBManager *dsdb) |
void | printPlugins () |
void | printPluginParamInfo (DesignSpaceExplorerPlugin &plugin) |
void | printParetoSet (const DSDBManager &dsdb, TCEString criteriaSet) |
int | main (int argc, char *argv[]) |
Variables | |
const string | EXPLORER_DEFAULT_HDB = "asic_130nm_1.5V.hdb" |
void determineLongest | ( | const vector< DSDBManager::ConfigurationCosts > & | confs, |
int & | configurationID, | ||
int & | applicationPath, | ||
int & | cycleCount, | ||
int & | energyEstimate, | ||
int & | longestPathDelay, | ||
int & | area | ||
) |
Determines the widest column so that column widths can be tuned.
Lengths of the data values are returned through the parameters.
confs | Configuration costs which lengths are checked. @configurationID Length of the configuration ID string. @applicationPath Length of the path string of an application. @cycleCount Length of the program cycle count string. @energyEstimate Length of the programs energy estimate string. |
Definition at line 120 of file Explorer.cc.
References Conversion::toString().
Referenced by main().
DSDBManager * loadDSDB | ( | const std::string & | dsdbFile | ) |
Loads the output Design Space Database file and creates a DSDB from it.
If the given filename doesn't exists creates a new DSDB file with the given name.
dsdbFile | The DSDB file name. |
Definition at line 76 of file Explorer.cc.
References DSDBManager::createNew(), and FileSystem::fileExists().
Referenced by main().
DesignSpaceExplorerPlugin * loadExplorerPlugin | ( | const std::string & | plugin, |
DSDBManager * | dsdb | ||
) |
Loads explorer plugin.
plugin | Explorer plugin name to be loaded. |
dsdb | DSDB that plugin is associated with. |
Definition at line 227 of file Explorer.cc.
References Exception::errorMessage(), DesignSpaceExplorer::loadExplorerPlugin(), verboseLog, and verboseLogC.
Referenced by main(), and printPlugins().
bool loadPluginParameters | ( | DesignSpaceExplorerPlugin * | plugin, |
const ExplorerCmdLineOptions & | options | ||
) |
Parses parameters given from command line and passes them to the plugin.
plugin | Explorer plugin that receives the parameters. |
options | Explorer command line options where parameters are read. |
Definition at line 198 of file Explorer.cc.
References Exception::errorMessage(), DesignSpaceExplorerPlugin::giveParameter(), options, and parseParameter().
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Main function.
Parses the command line and figures out what to do.
argc | The command line argument count. |
argv | The command line arguments (passed to the interpreter). |
Definition at line 402 of file Explorer.cc.
References DSDBManager::addApplication(), DSDBManager::addArchitecture(), DSDBManager::addConfiguration(), DSDBManager::addImplementation(), DSDBManager::applicationCostEstimatesByConf(), DSDBManager::applicationCount(), DSDBManager::applicationIDs(), DSDBManager::applicationPath(), DSDBManager::MachineConfiguration::architectureID, CmdLineParser::argument(), DSDBManager::configuration(), DSDBManager::configurationIDs(), FileSystem::currentWorkingDir(), determineLongest(), FileSystem::DIRECTORY_SEPARATOR, Exception::errorMessage(), DesignSpaceExplorerPlugin::explore(), EXPLORER_DEFAULT_HDB, FileSystem::fileExists(), FileSystem::fileIsDirectory(), Exception::fileName(), DSDBManager::hasApplication(), DSDBManager::hasConfiguration(), DSDBManager::MachineConfiguration::hasImplementation, HDB::HDBRegistry::hdb(), Environment::hdbPaths(), DSDBManager::MachineConfiguration::implementationID, Application::initialize(), HDB::HDBRegistry::instance(), TestApplication::isValid(), Exception::lineNum(), loadDSDB(), loadExplorerPlugin(), TTAMachine::Machine::loadFromADF(), IDF::MachineImplementation::loadFromIDF(), loadPluginParameters(), CmdLineParser::numberOfArguments(), options, orderingOfData(), CmdLineOptions::parse(), MachInfoCmdLineOptions::printHelp(), printParetoSet(), printPluginParamInfo(), printPlugins(), printSpaces(), DSDBManager::removeApplication(), DesignSpaceExplorerPlugin::requiresApplication(), DesignSpaceExplorerPlugin::requiresStartingPointArchitecture(), Application::setCmdLineOptions(), Application::setVerboseLevel(), Conversion::toString(), Application::verboseLevel(), DSDBManager::writeArchitectureToFile(), and DSDBManager::writeImplementationToFile().
DSDBManager::Order orderingOfData | ( | const string & | order | ) |
Returns the ordering of data indicated by the string.
@order Option string given by user that tells the ordering.
Definition at line 177 of file Explorer.cc.
References DSDBManager::ORDER_BY_APPLICATION, DSDBManager::ORDER_BY_CONFIGURATION, DSDBManager::ORDER_BY_CYCLE_COUNT, and DSDBManager::ORDER_BY_ENERGY_ESTIMATE.
Referenced by main().
void parseParameter | ( | const std::string & | param, |
std::string & | paramName, | ||
std::string & | paramValue | ||
) |
Parses the given parameter which has form 'paramname=paramvalue" to different strings.
param | The parameter. |
paramName | Parameter name is stored here. |
paramValue | Parameter value is stored here. |
InvalidData | If the given parameter is not in the correct form. |
Definition at line 94 of file Explorer.cc.
References __func__.
Referenced by loadPluginParameters().
void printParetoSet | ( | const DSDBManager & | dsdb, |
TCEString | criteriaSet | ||
) |
Prints the pareto set of configurations in the DSDB using the given criteria set.
Definition at line 353 of file Explorer.cc.
References DSDBManager::paretoSetConnectivityAndCycles().
Referenced by main().
void printPluginParamInfo | ( | DesignSpaceExplorerPlugin & | plugin | ) |
Prints explorer plugin parameter info.
plugin | Explorer plugin which parameter info is to be printed. |
Definition at line 303 of file Explorer.cc.
References BOOL, INT, DesignSpaceExplorerPlugin::parameters(), STRING, and UINT.
Referenced by main().
void printPlugins | ( | ) |
Prints explorer plugins and their descriptions.
Definition at line 256 of file Explorer.cc.
References DesignSpaceExplorerPlugin::description(), Environment::explorerPluginPaths(), FileSystem::fileExists(), FileSystem::fileNameBody(), FileSystem::findFromDirectory(), loadExplorerPlugin(), and verboseLogC.
Referenced by main().
void printSpaces | ( | unsigned int | numberOfSpaces | ) |
Outputs given number of empty characters to cout.
numberOfSpaces | The number of empty characters to output. |
Definition at line 164 of file Explorer.cc.
Referenced by main().
const string EXPLORER_DEFAULT_HDB = "asic_130nm_1.5V.hdb" |
Definition at line 64 of file Explorer.cc.
Referenced by main().