|
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 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 optimizes the interconnection network of the given configuration by removing the connections that are not used in the parallel program.
Definition at line 79 of file SimpleICOptimizer.cc.
◆ SimpleICOptimizer()
SimpleICOptimizer::SimpleICOptimizer |
( |
| ) |
|
|
inlineprivate |
◆ addConnections()
Adds connections used in the program to the given machine.
Connections to add are determined by procedure instructions in application domains programs.
- Parameters
-
mach | Machine where the connections are added. |
prog | Scheduled program where the used connections are searched. |
Definition at line 423 of file SimpleICOptimizer.cc.
437 for (
int m = 0; m < instruction.
moveCount(); m++) {
439 std::string busName = move.
bus().
name();
440 std::string sourceName =
"";
447 std::string destinationName =
449 Bus* bus = busNav.
item(busName);
452 if (sourceName !=
"") {
463 Socket* socket = socketNav.
item(destinationName);
References assert, TTAMachine::Socket::attachBus(), TTAProgram::Move::bus(), TTAMachine::Machine::busNavigator(), TTAProgram::Move::destinationSocket(), TTAProgram::CodeSnippet::instructionAtIndex(), TTAProgram::CodeSnippet::instructionCount(), TTAMachine::Socket::isConnectedTo(), TTAProgram::Terminal::isImmediate(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAProgram::Instruction::move(), TTAProgram::Instruction::moveCount(), TTAMachine::Component::name(), TTAProgram::Program::procedure(), TTAProgram::Program::procedureCount(), TTAMachine::Bus::segment(), TTAMachine::Bus::segmentCount(), TTAMachine::Socket::setDirection(), TTAMachine::Machine::socketNavigator(), TTAProgram::Move::source(), and TTAProgram::Move::sourceSocket().
◆ explore()
virtual std::vector<RowID> SimpleICOptimizer::explore |
( |
const RowID & |
startPointConfigurationID, |
|
|
const unsigned int & |
|
|
) |
| |
|
inlineprivatevirtual |
Optimizes the IC of the given configuration by removing not used connections.
First removes connections and then adds them by looking all application domains programs instructions and their moves. Needs the start point configuration to get the architecture which connections are optimized.
Supported parameters:
- tpef, name of the scheduled program file, no default value.
- add_only, if parameter is set the connections of the given configuration won't be emptied, just added new ones, not set as default.
- Parameters
-
startPointConfigurationID | Configuration to optimize. |
Reimplemented from DesignSpaceExplorerPlugin.
Definition at line 125 of file SimpleICOptimizer.cc.
127 std::vector<RowID> result;
143 std::ostringstream msg(std::ostringstream::out);
159 std::set<RowID>::const_iterator iter = appIDs.begin();
160 if (iter == appIDs.end()) {
164 for (; iter != appIDs.end(); iter++) {
168 testApp.applicationPath(), *origMach);
170 std::string msg =
"SimpleICOptimizer: Schedule "
171 "failed for program: " +
172 testApp.applicationPath();
180 std::ostringstream msg(std::ostringstream::out);
181 msg << e.errorMessageStack() << std::endl;
193 std::ostringstream msg(std::ostringstream::out);
194 msg <<
"Error while loading the program in "
195 <<
"SimpleICOptimizer:" << endl
207 std::ostringstream msg(std::ostringstream::out);
208 msg <<
"Error while adding ADF to the dsdb. "
209 <<
"ADF probably too big." << endl;
222 "RemoveUnconnectedComponents", &
db());
227 std::vector<RowID> cleanedTempConfIDs =
228 removeUnconnected->
explore(tempConfID);
229 delete removeUnconnected;
230 removeUnconnected = NULL;
231 if (cleanedTempConfIDs.size() < 1) {
232 std::string errorMsg =
"SimpleICOptimizer plugin: "
233 "RemoveUnconnectedComponents plugin failed to produce"
240 dsdb.configuration(cleanedTempConfIDs.at(0));
245 if (RFCheck.checkIntRegs(*origMach)) {
250 newConf.architectureID =
259 newConf.hasImplementation =
false;
266 bool estimate = newConf.hasImplementation;
267 if (
evaluate(newConf, estimates, estimate)) {
269 result.push_back(confID);
272 std::ostringstream msg(std::ostringstream::out);
273 msg <<
"SimpleICOptimizer plugin couldn't evaluate "
274 <<
"generated config - nothing done." << endl;
280 result.push_back(confID);
284 std::ostringstream msg(std::ostringstream::out);
285 msg <<
"Error while using SimpleICOptimizer:" << endl
References DSDBManager::addArchitecture(), DSDBManager::addConfiguration(), DSDBManager::applicationIDs(), TestApplication::applicationPath(), DSDBManager::applicationPath(), DSDBManager::architecture(), DSDBManager::MachineConfiguration::architectureID, RegisterQuantityCheck::checkIntRegs(), DSDBManager::configuration(), Exception::errorMessage(), Exception::errorMessageStack(), DesignSpaceExplorerPlugin::explore(), DesignSpaceExplorerPlugin::giveParameter(), DSDBManager::MachineConfiguration::hasImplementation, DesignSpaceExplorer::loadExplorerPlugin(), TTAProgram::Program::loadFromTPEF(), program, DesignSpaceExplorer::schedule(), verboseLog, and verboseLogC.
◆ fixIntRegisters()
◆ PLUGIN_DESCRIPTION()
SimpleICOptimizer::PLUGIN_DESCRIPTION |
( |
"Optimizes the IC of the given configuration" |
| ) |
|
|
private |
◆ producesArchitecture()
virtual bool SimpleICOptimizer::producesArchitecture |
( |
| ) |
const |
|
inlineprivatevirtual |
◆ readParameters()
void SimpleICOptimizer::readParameters |
( |
| ) |
|
|
inlineprivate |
◆ removeAllConnections()
Removes all socket-bus connection from the given machine.
- Parameters
-
mach | Machine which connections are removed. |
Definition at line 327 of file SimpleICOptimizer.cc.
334 for (
int i = 0; i < socketNav.
count(); i++) {
336 for (
int bus = 0; bus < busNav.
count(); bus++) {
342 for (
int i = 0; i < socketNav.
count(); i++) {
344 std::set<std::string> ignoreFUNames;
345 std::set<std::string> ignoreRFNames;
347 for (
int si = 0; si < socket->
portCount(); ++si) {
349 if (
dynamic_cast<FUPort*
>(port)) {
351 }
else if (
dynamic_cast<RFPort*
>(port)) {
361 if (!ignoreFUNames.empty()) {
363 if (!ignoreRFNames.empty()) {
366 for (
int bus = 0; bus < busNav.
count(); bus++)
372 for (
int bus = 0; bus < busNav.
count(); bus++) {
377 }
else if (!ignoreRFNames.empty()) {
379 for (
int bus = 0; bus < busNav.
count(); bus++) {
384 for (
int bus = 0; bus < busNav.
count(); bus++) {
References TTAMachine::Machine::busNavigator(), RegisterQuantityCheck::checkWithIgnore(), MinimalOpSetCheck::checkWithIgnore(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Socket::detachBus(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Component::name(), TTAMachine::Port::parentUnit(), TTAMachine::Socket::port(), TTAMachine::Socket::portCount(), and TTAMachine::Machine::socketNavigator().
◆ requiresApplication()
virtual bool SimpleICOptimizer::requiresApplication |
( |
| ) |
const |
|
inlineprivatevirtual |
◆ requiresHDB()
virtual bool SimpleICOptimizer::requiresHDB |
( |
| ) |
const |
|
inlineprivatevirtual |
◆ requiresSimulationData()
virtual bool SimpleICOptimizer::requiresSimulationData |
( |
| ) |
const |
|
inlineprivatevirtual |
◆ requiresStartingPointArchitecture()
virtual bool SimpleICOptimizer::requiresStartingPointArchitecture |
( |
| ) |
const |
|
inlineprivatevirtual |
◆ addOnly_
bool SimpleICOptimizer::addOnly_ |
|
private |
◆ addOnlyPN_
const std::string SimpleICOptimizer::addOnlyPN_ |
|
staticprivate |
◆ evaluatePN_
const std::string SimpleICOptimizer::evaluatePN_ |
|
staticprivate |
◆ evaluateResult_
bool SimpleICOptimizer::evaluateResult_ |
|
private |
◆ preserveMinimalOpset_
bool SimpleICOptimizer::preserveMinimalOpset_ |
|
private |
◆ preserveMinOpsPN_
const std::string SimpleICOptimizer::preserveMinOpsPN_ |
|
staticprivate |
◆ tpef_
std::string SimpleICOptimizer::tpef_ |
|
private |
◆ tpefDefaultPN_
const std::string SimpleICOptimizer::tpefDefaultPN_ |
|
staticprivate |
◆ tpefPN_
const std::string SimpleICOptimizer::tpefPN_ |
|
staticprivate |
The documentation for this class was generated from the following file:
bool checkWithIgnore(const TTAMachine::Machine &machine, const std::set< std::string > &ignoreFUName) const
virtual bool evaluate(const DSDBManager::MachineConfiguration &configuration, CostEstimates &results=dummyEstimate_, bool estimate=false)
TTAMachine::Socket & destinationSocket() const
bool checkWithIgnore(const TTAMachine::Machine &mach, const std::set< std::string > &ignoreRFs) const
Port * port(int index) const
virtual TCEString name() const
bool preserveMinimalOpset_
respect minimal opset when removing connections
virtual DSDBManager & db()
int procedureCount() const
TTAMachine::Machine * architecture(RowID id) const
void addConnections(TTAMachine::Machine &mach, Program &prog)
bool addOnly_
can we remove connections
static const std::string evaluatePN_
int RowID
Type definition of row ID in relational databases.
DesignSpaceExplorerPlugin()
const TTAMachine::Bus & bus() const
static const std::string addOnlyPN_
virtual Segment * segment(int index) const
static std::string toString(const T &source)
#define assert(condition)
TTAMachine::Socket & sourceSocket() const
TTAProgram::Program * schedule(const std::string applicationFile, TTAMachine::Machine &machine, TCEString paramOptions="-O3")
static const std::string tpefPN_
void readOptionalParameter(const std::string paramName, T ¶m) const
void attachBus(Segment &bus)
#define verboseLogC(text, neededVerbosity)
virtual int instructionCount() const
bool evaluateResult_
evaluate the result(s)
virtual void giveParameter(const std::string &name, const std::string &value)
void removeAllConnections(TTAMachine::Machine &mach)
static const std::string preserveMinOpsPN_
static DesignSpaceExplorerPlugin * loadExplorerPlugin(const std::string &pluginName, DSDBManager *dsdb=NULL)
virtual SocketNavigator socketNavigator() const
void setDirection(Direction direction)
bool isConnectedTo(const Bus &bus) const
bool fixIntRegs(TTAMachine::Machine &mach) const
void detachBus(Segment &bus)
std::string errorMessage() const
RowID addConfiguration(const MachineConfiguration &conf)
RowID addArchitecture(const TTAMachine::Machine &mom)
MachineConfiguration configuration(RowID id) const
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")
virtual std::vector< RowID > explore(const RowID &startPointConfigurationID, const unsigned int &maxIter=0)
virtual BusNavigator busNavigator() const
std::string tpef_
name of the tpef file
virtual Instruction & instructionAtIndex(int index) const
Terminal & source() const
ComponentType * item(int index) const
find Finds info of the inner loops in the program
std::string applicationPath(RowID id) const
bool checkIntRegs(const TTAMachine::Machine &mach) const
virtual bool isImmediate() const
Procedure & procedure(int index) const
virtual int segmentCount() const
void addParameter(TCEString name, ExplorerPluginParameterType type, bool compulsory=true, TCEString defaultValue="", TCEString description="")
bool canFixIntRegs(const TTAMachine::Machine &mach) const
std::set< RowID > applicationIDs() const
Unit * parentUnit() const
bool fixIntRegisters(TTAMachine::Machine &mach)