|
typedef std::pair< std::string, ExplorerPluginParameter > | Parameter |
|
typedef std::map< std::string, ExplorerPluginParameter > | ParameterMap |
|
typedef std::map< std::string, ExplorerPluginParameter >::iterator | PMIt |
|
typedef std::map< std::string, ExplorerPluginParameter >::const_iterator | PMCIt |
|
virtual bool | requiresApplication () const |
|
virtual std::string | description () const |
|
void | addParameter (TCEString name, ExplorerPluginParameterType type, bool compulsory=true, TCEString defaultValue="", TCEString description="") |
|
template<typename T > |
void | readCompulsoryParameter (const std::string paramName, T ¶m) const |
|
template<typename T > |
void | readOptionalParameter (const std::string paramName, T ¶m) const |
|
template<typename RT > |
RT | parameterValue (const std::string ¶mName) const |
|
virtual | ~DesignSpaceExplorerPlugin () |
|
virtual void | giveParameter (const std::string &name, const std::string &value) |
|
virtual std::string | name () const |
|
virtual void | setPluginName (const std::string &pluginName) |
|
virtual bool | hasParameter (const std::string ¶mName) const |
|
ParameterMap | parameters () const |
|
virtual bool | booleanValue (const std::string ¶meter) const |
|
| DesignSpaceExplorer () |
|
virtual | ~DesignSpaceExplorer () |
|
virtual void | setDSDB (DSDBManager &dsdb) |
|
virtual bool | evaluate (const DSDBManager::MachineConfiguration &configuration, CostEstimates &results=dummyEstimate_, bool estimate=false) |
|
virtual DSDBManager & | db () |
|
std::vector< DesignSpaceExplorerPlugin * > | getPlugins () |
|
RowID | createImplementationAndStore (const DSDBManager::MachineConfiguration &conf, const double &frequency=0.0, const double &maxArea=0.0, const bool &createEstimates=true, const std::string &icDec="DefaultICDecoder", const std::string &icDecHDB="asic_130nm_1.5V.hdb") |
|
bool | createImplementation (const DSDBManager::MachineConfiguration &conf, DSDBManager::MachineConfiguration &newConf, const double &frequency=0.0, const double &maxArea=0.0, const bool &createEstimates=true, const std::string &icDec="DefaultICDecoder", const std::string &icDecHDB="asic_130nm_1.5V.hdb") |
|
IDF::MachineImplementation * | selectComponents (const TTAMachine::Machine &mach, const double &frequency=0.0, const double &maxArea=0.0, const std::string &icDec="DefaultICDecoder", const std::string &icDecHDB="asic_130nm_1.5V.hdb") const |
|
void | createEstimateData (const TTAMachine::Machine &mach, const IDF::MachineImplementation &idf, CostEstimator::AreaInGates &area, CostEstimator::DelayInNanoSeconds &longestPathDelay) |
|
RowID | addConfToDSDB (const DSDBManager::MachineConfiguration &conf) |
|
static DesignSpaceExplorerPlugin * | loadExplorerPlugin (const std::string &pluginName, DSDBManager *dsdb=NULL) |
|
| DesignSpaceExplorerPlugin () |
|
void | checkParameters () const |
|
TTAProgram::Program * | schedule (const std::string applicationFile, TTAMachine::Machine &machine, TCEString paramOptions="-O3") |
|
const ExecutionTrace * | simulate (const TTAProgram::Program &program, const TTAMachine::Machine &machine, const TestApplication &testApplication, const ClockCycleCount &maxCycles, ClockCycleCount &runnedCycles, const bool tracing, const bool useCompiledSimulation=false, std::vector< ClockCycleCount > *executionCounts=NULL) |
|
std::string | pluginName_ |
| the name of the explorer plugin More...
|
|
ParameterMap | parameters_ |
| Parameters for the plugin. More...
|
|
Explorer plugin that adds resources until cycle count doesn't go down anymore.
Supported parameters:
Definition at line 61 of file GrowMachine.cc.
virtual std::vector<RowID> GrowMachine::explore |
( |
const RowID & |
configurationID, |
|
|
const unsigned int & |
|
|
) |
| |
|
inlineprivatevirtual |
Optimizes the architecture in regards of the cycle count.
Optimizes the architecture by growing it until cycle count doesn't go down anymore.
@TODO: average cycle count lowering, or lowest/largest lowering percentage among apps now it's largest lowering among apps. @TODO: parametrize machine growing, example how many buses to add each step.
- Returns
- Configurations (including only adf) generated by CycleOptimizer. Best result is at the top of the list.
Reimplemented from DesignSpaceExplorerPlugin.
Definition at line 95 of file GrowMachine.cc.
96 std::vector<RowID> result;
109 debugLog(std::string(
"Fetching architecture from DSDB failed in "
113 result.push_back(configurationID);
126 bool estimate =
false;
127 if (!explorer.
evaluate(startConf, estimates, estimate)) {
128 debugLog(std::string(
"Evaluate failed in GrowMachine."));
129 result.push_back(configurationID);
135 debugLog(std::string(
"Error in GrowMachine: ")
138 result.push_back(configurationID);
144 std::vector<ClockCycleCount> cycleCounts =
148 if (cycleCounts.size() < 1) {
149 std::ostringstream msg(std::ostringstream::out);
150 msg <<
"GrowMachine error: Couldn't evaluate cycle "
151 <<
"counts for applications, correct_simulation_output"
152 <<
" probably missing." << std::endl;
154 result.push_back(configurationID);
162 for (
int i = 1; i < (int)cycleCounts.size(); i++) {
163 if (cycleCounts.at(i) < currentMinCycles) {
164 currentMinCycles = cycleCounts.at(i);
170 std::map<ClockCycleCount, RowID> resultMap;
172 prevMinCycles = currentMinCycles;
194 if (explorer.
evaluate(newConfiguration, newEstimates,
false)) {
196 std::vector<ClockCycleCount> newCycleCounts =
199 currentMinCycles = newCycleCounts.at(0);
200 for (
int i = 1; i < (int)newCycleCounts.size(); i++) {
201 if (newCycleCounts.at(i) < currentMinCycles) {
202 currentMinCycles = newCycleCounts.at(i);
207 std::ostringstream msg(std::ostringstream::out);
208 msg <<
"GrowMachine produced config: "
209 << confID <<
", with cycle count: "
210 << currentMinCycles <<
" ("
220 resultMap[currentMinCycles] = confID;
226 debugLog(
"GrowMachine: Evaluating config with id: "
228 +
" failed. This is probably a bug.");
233 debugLog(std::string(
"Error in GrowMachine: ")
236 result.push_back(configurationID);
243 std::map<ClockCycleCount, RowID>::const_iterator mapIter =
245 for (; mapIter != resultMap.end(); mapIter++) {
246 result.push_back((*mapIter).second);
248 if (result.empty()) {
250 verboseLogC(
"GrowMachine could not generate new configs.", 2)
251 result.push_back(configurationID);
References DSDBManager::addArchitecture(), MachineResourceModifier::addBusesByAmount(), DSDBManager::addConfiguration(), DSDBManager::architecture(), DSDBManager::MachineConfiguration::architectureID, DSDBManager::configuration(), debugLog, Exception::errorMessage(), Exception::errorMessageStack(), DesignSpaceExplorer::evaluate(), DSDBManager::MachineConfiguration::hasImplementation, MachineResourceModifier::increaseAllFUsThatDiffersByAmount(), MachineResourceModifier::increaseAllRFsThatDiffersByAmount(), DesignSpaceExplorer::setDSDB(), Conversion::toString(), Application::verboseLevel(), verboseLog, and verboseLogC.