OpenASIP
2.0
|
#include <DSDBManager.hh>
Classes | |
struct | appComparator |
struct | ApplicationData |
struct | ConfigurationCosts |
Struct for configuration costs with a specified application. More... | |
struct | cycleComparator |
struct | energyComparator |
struct | idComparator |
struct | MachineConfiguration |
Public Types | |
enum | Order { ORDER_BY_CONFIGURATION, ORDER_BY_CYCLE_COUNT, ORDER_BY_ENERGY_ESTIMATE, ORDER_BY_APPLICATION } |
Identifiers for ordering results. More... | |
typedef boost::tuple< RowID, int, ClockCycleCount > | ParetoPointConnectivityAndCycles |
typedef std::set< ParetoPointConnectivityAndCycles > | ParetoSetConnectivityAndCycles |
Static Public Member Functions | |
static DSDBManager * | createNew (const std::string &file) |
Private Member Functions | |
std::string | architectureString (RowID id) const |
std::string | implementationString (RowID id) const |
Private Attributes | |
SQLite * | db_ |
Handle to the database. More... | |
RelationalDBConnection * | dbConnection_ |
Handle to the database connection. More... | |
std::string | file_ |
The DSDB file containing the current database. More... | |
Design space database manager.
Design space database stores information about explored machine configurations for test applications.
The following information can be stored:
Definition at line 76 of file DSDBManager.hh.
typedef boost::tuple<RowID, int, ClockCycleCount> DSDBManager::ParetoPointConnectivityAndCycles |
Definition at line 153 of file DSDBManager.hh.
typedef std::set<ParetoPointConnectivityAndCycles> DSDBManager::ParetoSetConnectivityAndCycles |
Definition at line 156 of file DSDBManager.hh.
enum DSDBManager::Order |
Identifiers for ordering results.
Enumerator | |
---|---|
ORDER_BY_CONFIGURATION | |
ORDER_BY_CYCLE_COUNT | |
ORDER_BY_ENERGY_ESTIMATE | |
ORDER_BY_APPLICATION |
Definition at line 159 of file DSDBManager.hh.
DSDBManager::DSDBManager | ( | const std::string & | file | ) |
The Constructor.
Loads a DSDB from the given file.
file | DSDB file to load. |
IOException | if the DSDB file couldn't be succesfully loaded. |
Definition at line 108 of file DSDBManager.cc.
References __func__, SQLite::connect(), db_, dbConnection_, Exception::errorMessage(), and FileSystem::fileExists().
Referenced by createNew().
|
virtual |
The Destructor.
Closes the database connection.
Definition at line 128 of file DSDBManager.cc.
References SQLite::close(), db_, and dbConnection_.
RowID DSDBManager::addApplication | ( | const std::string & | path | ) |
Adds a new application to the database.
path | Path of the application test case. |
InvalidData | in case the application dir is not valid. |
Definition at line 440 of file DSDBManager.cc.
References assert, RelationalDBConnection::beginTransaction(), RelationalDBConnection::commit(), dbConnection_, debugLog, FileSystem::DIRECTORY_SEPARATOR, Exception::errorMessage(), RelationalDBConnection::lastInsertRowID(), RelationalDBConnection::rollback(), and RelationalDBConnection::updateQuery().
Referenced by main().
RowID DSDBManager::addArchitecture | ( | const TTAMachine::Machine & | mom | ) |
Adds machine architecture to the database.
In case an existing equal architecture is found in the DB, does not add a new one, but returns the ID of the old one.
mom | Machine architecture to add. |
Definition at line 191 of file DSDBManager.cc.
References __func__, architectureId(), assert, RelationalDBConnection::beginTransaction(), RelationalDBConnection::commit(), dbConnection_, debugLog, Exception::errorMessage(), TTAMachine::Machine::hash(), ILLEGAL_ROW_ID, RelationalDBConnection::lastInsertRowID(), RelationalDBConnection::rollback(), TTAMachine::Machine::saveState(), XMLSerializer::setDestinationString(), MachineConnectivityCheck::totalConnectionCount(), RelationalDBConnection::updateQuery(), and ADFSerializer::writeState().
Referenced by Evaluate::createConfig(), MinimalOpSet::createConfig(), BlocksConnectICCmd::Do(), VLIWConnectICCmd::Do(), MinimizeMachine::evalNewConfigWithoutImplementation(), VLIWConnectIC::explore(), MinimalOpSet::explore(), BlocksConnectIC::explore(), RemoveUnconnectedComponents::explore(), VectorLSGenerator::explore(), GrowMachine::explore(), ComponentAdder::explore(), ImplementationSelector::explore(), ImmediateGenerator::explore(), SimpleICOptimizer::explore(), ADFCombiner::explore(), main(), MinimizeMachine::minimizeBuses(), MinimizeMachine::minimizeFunctionUnits(), MinimizeMachine::minimizeRegisterFiles(), and CallExplorerPluginWindow::onRun().
RowID DSDBManager::addConfiguration | ( | const MachineConfiguration & | conf | ) |
Adds a new machine configuration to the database.
In case a same configuration found in the DB, reuses that one.
conf | Configuration to add. |
KeyNotFound | if the configuration contained unknown IDs. |
Definition at line 299 of file DSDBManager.cc.
References __func__, DSDBManager::MachineConfiguration::architectureID, assert, RelationalDBConnection::beginTransaction(), RelationalDBConnection::commit(), configurationId(), dbConnection_, debugLog, Exception::errorMessage(), hasArchitecture(), DSDBManager::MachineConfiguration::hasImplementation, hasImplementation(), ILLEGAL_ROW_ID, DSDBManager::MachineConfiguration::implementationID, RelationalDBConnection::lastInsertRowID(), RelationalDBConnection::rollback(), Conversion::toString(), and RelationalDBConnection::updateQuery().
Referenced by BlocksConnectICCmd::Do(), VLIWConnectICCmd::Do(), MinimizeMachine::evalNewConfigWithoutImplementation(), VLIWConnectIC::explore(), BlocksConnectIC::explore(), RemoveUnconnectedComponents::explore(), GrowMachine::explore(), VectorLSGenerator::explore(), ComponentAdder::explore(), ImplementationSelector::explore(), ImmediateGenerator::explore(), SimpleICOptimizer::explore(), ADFCombiner::explore(), main(), MinimizeMachine::minimizeBuses(), and CallExplorerPluginWindow::onRun().
void DSDBManager::addCycleCount | ( | RowID | application, |
RowID | architecture, | ||
ClockCycleCount | count | ||
) |
Adds cycle count of an application on specific architecture.
application | RowID of the application. |
architecture | RowID of the machine architecture. |
count | Cycle count |
Definition at line 583 of file DSDBManager.cc.
References __func__, architecture(), dbConnection_, file_, hasApplication(), hasArchitecture(), Conversion::toString(), and RelationalDBConnection::updateQuery().
void DSDBManager::addEnergyEstimate | ( | RowID | application, |
RowID | implementation, | ||
double | energyEstimate | ||
) |
Adds an energy estimate for application on specific implementation.
application | RowID of the application. |
implementation | RowID of the machine implementation. |
energy | Application energy estimate as joules. |
Definition at line 477 of file DSDBManager.cc.
References __func__, dbConnection_, energyEstimate(), file_, hasApplication(), hasImplementation(), implementation(), Conversion::toString(), and RelationalDBConnection::updateQuery().
RowID DSDBManager::addImplementation | ( | const IDF::MachineImplementation & | impl, |
double | longestPathDelay, | ||
CostEstimator::AreaInGates | area | ||
) |
Adds machine implementation to the database.
impl | Machine implementation to add. |
longestPathDelay | Longest path delay in seconds. |
area | Area as number of gates. |
Definition at line 252 of file DSDBManager.cc.
References assert, RelationalDBConnection::beginTransaction(), RelationalDBConnection::commit(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBConnection::lastInsertRowID(), RelationalDBConnection::rollback(), IDF::MachineImplementation::saveState(), XMLSerializer::setDestinationString(), Conversion::toString(), RelationalDBConnection::updateQuery(), and IDF::IDFSerializer::writeState().
Referenced by Evaluate::createConfig(), MinimalOpSet::createConfig(), RemoveUnconnectedComponents::explore(), ImplementationSelector::explore(), ImmediateGenerator::explore(), main(), MinimizeMachine::minimizeBuses(), and ComponentImplementationSelector::selectComponentsToConf().
std::vector< DSDBManager::ConfigurationCosts > DSDBManager::applicationCostEstimatesByConf | ( | Order | ordering = ORDER_BY_CONFIGURATION | ) | const |
Returs set of ConfigurationCosts ordered by the given ordering.
ordering | Ordering of the results. |
Definition at line 1524 of file DSDBManager.cc.
References abortWithError, DSDBManager::ConfigurationCosts::application, DSDBManager::ConfigurationCosts::area, DSDBManager::ConfigurationCosts::configurationID, DSDBManager::ConfigurationCosts::cycleCount, RelationalDBQueryResult::data(), dbConnection_, DataObject::doubleValue(), DSDBManager::ConfigurationCosts::energyEstimate, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DSDBManager::ApplicationData::id, DataObject::integerValue(), DSDBManager::ConfigurationCosts::longestPathDelay, DSDBManager::ApplicationData::name, RelationalDBQueryResult::next(), ORDER_BY_APPLICATION, ORDER_BY_CYCLE_COUNT, ORDER_BY_ENERGY_ESTIMATE, RelationalDBConnection::query(), and DataObject::stringValue().
Referenced by main().
int DSDBManager::applicationCount | ( | ) | const |
Returns the number of applications in the dsdb.
Definition at line 1666 of file DSDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), and RelationalDBConnection::query().
Referenced by main().
std::set< RowID > DSDBManager::applicationIDs | ( | ) | const |
Returns IDs of all applications in the database.
Definition at line 1381 of file DSDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), and RelationalDBConnection::query().
Referenced by cycleCounts(), ConnectionSweeper::explore(), SimpleICOptimizer::explore(), FrequencySweepExplorer::fastEnough(), main(), MinimizeMachine::minimizeMachine(), and paretoSetConnectivityAndCycles().
std::string DSDBManager::applicationPath | ( | RowID | id | ) | const |
Returns path of an application with the given ID.
id | RowID of the application test case. |
Definition at line 947 of file DSDBManager.cc.
References __func__, abortWithError, RelationalDBQueryResult::data(), dbConnection_, Exception::errorMessage(), file_, hasApplication(), RelationalDBQueryResult::hasNext(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), DataObject::stringValue(), and Conversion::toString().
Referenced by SimpleICOptimizer::explore(), FrequencySweepExplorer::fastEnough(), hasApplication(), main(), and MinimizeMachine::minimizeMachine().
Returns IDs of all configurations referencing the given architecture.
architectureID | ID of the architecture to search configurations for. |
Definition at line 1487 of file DSDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
TTAMachine::Machine * DSDBManager::architecture | ( | RowID | id | ) | const |
Returns machine architecture with the given id.
id | RowID of the machine architecture. |
Definition at line 807 of file DSDBManager.cc.
References architectureString(), TTAMachine::Machine::loadState(), ADFSerializer::readState(), and XMLSerializer::setSourceString().
Referenced by addCycleCount(), cycleCount(), BlocksConnectICCmd::Do(), VLIWConnectICCmd::Do(), VLIWConnectIC::explore(), MinimalOpSet::explore(), BlocksConnectIC::explore(), RemoveUnconnectedComponents::explore(), VectorLSGenerator::explore(), GrowMachine::explore(), ComponentAdder::explore(), ImplementationSelector::explore(), ConnectionSweeper::explore(), ImmediateGenerator::explore(), SimpleICOptimizer::explore(), ADFCombiner::explore(), hasCycleCount(), isUnschedulable(), MinimizeMachine::minimizeBuses(), MinimizeMachine::minimizeFunctionUnits(), MinimizeMachine::minimizeRegisterFiles(), CallExplorerPluginWindow::onRun(), ComponentImplementationSelector::selectComponentsToConf(), and setUnschedulable().
RowID DSDBManager::architectureId | ( | const TTAMachine::Machine & | mach | ) | const |
Returns the row ID of the given architecture.
Searches for the architecture using its Machine::hash() string. e
id | RowID of the machine architecture. ILLEGAL_ROW_ID, if not found. |
Definition at line 705 of file DSDBManager.cc.
References abortWithError, RelationalDBQueryResult::data(), dbConnection_, Exception::errorMessage(), TTAMachine::Machine::hash(), RelationalDBQueryResult::hasNext(), ILLEGAL_ROW_ID, DataObject::integerValue(), RelationalDBQueryResult::next(), and RelationalDBConnection::query().
Referenced by addArchitecture().
std::set< RowID > DSDBManager::architectureIDs | ( | ) | const |
Returns IDs of all machine architectures in the database.
Definition at line 1416 of file DSDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), and RelationalDBConnection::query().
|
private |
Returns the machine architecture of the given id as string.
id | RowID of the machine architecture. |
Definition at line 665 of file DSDBManager.cc.
References __func__, abortWithError, RelationalDBQueryResult::data(), dbConnection_, Exception::errorMessage(), file_, hasArchitecture(), RelationalDBQueryResult::hasNext(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), DataObject::stringValue(), and Conversion::toString().
Referenced by architecture(), and writeArchitectureToFile().
AreaInGates DSDBManager::areaEstimate | ( | RowID | implementation | ) | const |
Returns area estimate for an specific implementation.
implementation | RowID of the machine implementation. |
KeyNotFound | If the implementation was not found in DB. |
Definition at line 1343 of file DSDBManager.cc.
References __func__, abortWithError, RelationalDBQueryResult::data(), dbConnection_, Exception::errorMessage(), file_, hasImplementation(), RelationalDBQueryResult::hasNext(), implementation(), DataObject::integerValue(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by setAreaEstimate().
DSDBManager::MachineConfiguration DSDBManager::configuration | ( | RowID | id | ) | const |
Returns machine configuration with the give ID.
id | ID of the machine configuration to return. |
KeyNotFound | If a configuration with the given ID was not found. |
Definition at line 361 of file DSDBManager.cc.
References __func__, abortWithError, DSDBManager::MachineConfiguration::architectureID, RelationalDBQueryResult::data(), dbConnection_, Exception::errorMessage(), file_, hasConfiguration(), DSDBManager::MachineConfiguration::hasImplementation, RelationalDBQueryResult::hasNext(), DSDBManager::MachineConfiguration::implementationID, DataObject::integerValue(), DataObject::isNull(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by FrequencySweepExplorer::callPlugin(), Evaluate::explore(), VLIWConnectIC::explore(), MinimalOpSet::explore(), BlocksConnectIC::explore(), RemoveUnconnectedComponents::explore(), GrowMachine::explore(), VectorLSGenerator::explore(), ComponentAdder::explore(), ImplementationSelector::explore(), ConnectionSweeper::explore(), ImmediateGenerator::explore(), SimpleICOptimizer::explore(), FrequencySweepExplorer::fastEnough(), main(), MinimizeMachine::minimizeBuses(), MinimizeMachine::minimizeFunctionUnits(), MinimizeMachine::minimizeMachine(), and MinimizeMachine::minimizeRegisterFiles().
RowID DSDBManager::configurationId | ( | const MachineConfiguration & | conf | ) | const |
Returns the row ID of the given configuration.
id | RowID of the configuration. ILLEGAL_ROW_ID, if not found. |
Definition at line 762 of file DSDBManager.cc.
References abortWithError, DSDBManager::MachineConfiguration::architectureID, RelationalDBQueryResult::data(), dbConnection_, Exception::errorMessage(), DSDBManager::MachineConfiguration::hasImplementation, RelationalDBQueryResult::hasNext(), ILLEGAL_ROW_ID, DSDBManager::MachineConfiguration::implementationID, DataObject::integerValue(), RelationalDBQueryResult::next(), and RelationalDBConnection::query().
Referenced by addConfiguration().
std::set< RowID > DSDBManager::configurationIDs | ( | ) | const |
Returns IDs of all machine configurations in the database.
Definition at line 1451 of file DSDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), and RelationalDBConnection::query().
Referenced by main().
|
static |
Creates a new DSDB file, and a DSDB manager for it.
file | Full path to the DSDB file to create. |
IOException | if the DSDB file creation was not succesful. |
Definition at line 141 of file DSDBManager.cc.
References assert, SQLite::close(), SQLite::connect(), CREATE_APPLICATION_TABLE, CREATE_ARCH_TABLE, CREATE_CYCLE_COUNT_TABLE, CREATE_ENERGY_ESTIMATE_TABLE, CREATE_IMPL_TABLE, CREATE_MACHINE_CFG_TABLE, RelationalDBConnection::DDLQuery(), debugLog, DSDBManager(), Exception::errorMessage(), and FileSystem::fileIsCreatable().
Referenced by BlocksConnectICCmd::Do(), VLIWConnectICCmd::Do(), loadDSDB(), and CallExplorerPluginWindow::onRun().
ClockCycleCount DSDBManager::cycleCount | ( | RowID | application, |
RowID | architecture | ||
) | const |
Returns cycle count for an application on specific architecture.
application | RowID of the application. |
architecture | RowID of the architecture. |
KeyNotFound | If cycle count was not found in DB. |
Definition at line 1261 of file DSDBManager.cc.
References __func__, abortWithError, architecture(), RelationalDBQueryResult::data(), dbConnection_, DataObject::doubleValue(), Exception::errorMessage(), file_, hasCycleCount(), RelationalDBQueryResult::hasNext(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by cycleCounts(), ConnectionSweeper::explore(), and FrequencySweepExplorer::fastEnough().
std::vector< ClockCycleCount > DSDBManager::cycleCounts | ( | const MachineConfiguration & | conf | ) | const |
Returns the cycle counts for the given configuration for all applications, if known.
Definition at line 738 of file DSDBManager.cc.
References applicationIDs(), DSDBManager::MachineConfiguration::architectureID, cycleCount(), and hasCycleCount().
std::string DSDBManager::dsdbFile | ( | ) | const |
Returns absolute path of the database file.
Definition at line 177 of file DSDBManager.cc.
References FileSystem::absolutePathOf(), and file_.
Returns energy estimate for an application on specific implementation.
application | RowID of the application. |
implementation | RowID of the implementation. |
KeyNotFound | If an energy estimate was not found. |
Definition at line 1187 of file DSDBManager.cc.
References __func__, abortWithError, RelationalDBQueryResult::data(), dbConnection_, DataObject::doubleValue(), Exception::errorMessage(), file_, hasEnergyEstimate(), RelationalDBQueryResult::hasNext(), implementation(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by addEnergyEstimate().
bool DSDBManager::hasApplication | ( | const std::string & | applicationPath | ) | const |
Checks if the database contains application with the given application path.
applicationPath | Path of the application. |
Definition at line 1041 of file DSDBManager.cc.
References applicationPath(), assert, dbConnection_, FileSystem::DIRECTORY_SEPARATOR, RelationalDBQueryResult::hasNext(), and RelationalDBConnection::query().
bool DSDBManager::hasApplication | ( | RowID | id | ) | const |
Checks if the database contains application with the given RowID.
id | ID of the application. |
Definition at line 1013 of file DSDBManager.cc.
References assert, dbConnection_, RelationalDBQueryResult::hasNext(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by addCycleCount(), addEnergyEstimate(), applicationPath(), main(), removeApplication(), and setUnschedulable().
bool DSDBManager::hasArchitecture | ( | RowID | id | ) | const |
Checks if the database contains architecture with the given RowID.
id | ID of the architecture. |
Definition at line 1101 of file DSDBManager.cc.
References assert, dbConnection_, RelationalDBQueryResult::hasNext(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by addConfiguration(), addCycleCount(), architectureString(), and setUnschedulable().
bool DSDBManager::hasConfiguration | ( | RowID | id | ) | const |
Checks if the database contains configuration with the given RowID.
id | ID of the configuration. |
Definition at line 1129 of file DSDBManager.cc.
References assert, dbConnection_, RelationalDBQueryResult::hasNext(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by configuration(), main(), and removeConfiguration().
Checks if cycle count exists for an application and architecture with given IDs.
application | ID of the application. |
architecture | ID of the machine architecture |
Definition at line 1228 of file DSDBManager.cc.
References architecture(), assert, dbConnection_, RelationalDBQueryResult::hasNext(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by cycleCount(), cycleCounts(), and ConnectionSweeper::explore().
Checks if energy estimate exists for an application and implementation with given IDs.
application | ID of the application. |
implementation | ID of the machine implementation. |
Definition at line 983 of file DSDBManager.cc.
References assert, dbConnection_, RelationalDBQueryResult::hasNext(), implementation(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by energyEstimate().
bool DSDBManager::hasImplementation | ( | RowID | id | ) | const |
Checks if the database contains implementation with the given RowID.
id | ID of the implementation |
Definition at line 1157 of file DSDBManager.cc.
References assert, dbConnection_, RelationalDBQueryResult::hasNext(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by addConfiguration(), addEnergyEstimate(), areaEstimate(), implementationString(), longestPathDelayEstimate(), setAreaEstimate(), and setLongestPathDelayEstimate().
IDF::MachineImplementation * DSDBManager::implementation | ( | RowID | id | ) | const |
Returns machine implementation with the given id.
id | RowID of the machine implementation. |
Definition at line 887 of file DSDBManager.cc.
References implementationString(), IDF::MachineImplementation::loadState(), IDF::IDFSerializer::readState(), and XMLSerializer::setSourceString().
Referenced by addEnergyEstimate(), areaEstimate(), energyEstimate(), RemoveUnconnectedComponents::explore(), ImmediateGenerator::explore(), hasEnergyEstimate(), longestPathDelayEstimate(), MinimizeMachine::minimizeBuses(), setAreaEstimate(), and setLongestPathDelayEstimate().
|
private |
Returns machine implementation with the given id as string.
id | RowID of the machine implementation. |
Definition at line 847 of file DSDBManager.cc.
References __func__, abortWithError, RelationalDBQueryResult::data(), dbConnection_, Exception::errorMessage(), file_, hasImplementation(), RelationalDBQueryResult::hasNext(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), DataObject::stringValue(), and Conversion::toString().
Referenced by implementation(), and writeImplementationToFile().
Checks if the application has been scheduled for the given architecture previously unsuccessfully.
application | RowID of the application. |
architecture | RowID of the machine architecture. |
Definition at line 550 of file DSDBManager.cc.
References abortWithError, architecture(), dbConnection_, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), RelationalDBConnection::query(), and Conversion::toString().
double DSDBManager::longestPathDelayEstimate | ( | RowID | implementation | ) | const |
Returns longest path delay estimate for an specific implementation.
implementation | RowID of the machine implementation. |
KeyNotFound | If the implmentation was not found in DB. |
Definition at line 1303 of file DSDBManager.cc.
References __func__, abortWithError, RelationalDBQueryResult::data(), dbConnection_, DataObject::doubleValue(), Exception::errorMessage(), file_, hasImplementation(), RelationalDBQueryResult::hasNext(), implementation(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
DSDBManager::ParetoSetConnectivityAndCycles DSDBManager::paretoSetConnectivityAndCycles | ( | RowID | application = ILLEGAL_ROW_ID | ) | const |
Finds a pareto set of configurations using the connection count and the cycle count of the given application as criteria.
Definition at line 1697 of file DSDBManager.cc.
References abortWithError, applicationIDs(), assert, RelationalDBQueryResult::data(), dbConnection_, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), ILLEGAL_ROW_ID, DataObject::integerValue(), RelationalDBQueryResult::next(), and RelationalDBConnection::query().
Referenced by printParetoSet().
void DSDBManager::removeApplication | ( | RowID | id | ) |
Removes the application that has the given ID.
id | Application ID to remove. |
KeyNotFound | If the application ID was not found in the database. |
Definition at line 1071 of file DSDBManager.cc.
References __func__, assert, RelationalDBConnection::beginTransaction(), RelationalDBConnection::commit(), dbConnection_, debugLog, Exception::errorMessage(), file_, hasApplication(), RelationalDBConnection::rollback(), Conversion::toString(), and RelationalDBConnection::updateQuery().
Referenced by main().
void DSDBManager::removeConfiguration | ( | RowID | id | ) |
Removes configuration with the give ID from the database.
Arhcitecture and implementation that are referenced by the configuration are not removed.
id | ID of the configuration to remove. |
KeyNotFound | If a configuration ID was not found in the database. |
Definition at line 409 of file DSDBManager.cc.
References __func__, assert, RelationalDBConnection::beginTransaction(), RelationalDBConnection::commit(), dbConnection_, debugLog, Exception::errorMessage(), file_, hasConfiguration(), RelationalDBConnection::rollback(), Conversion::toString(), and RelationalDBConnection::updateQuery().
void DSDBManager::setAreaEstimate | ( | RowID | implementation, |
CostEstimator::AreaInGates | area | ||
) |
Sets the area estimate for an implementation.
implementation | RowID of the machine implementation. |
area | Implementation area estimate in gates. |
Definition at line 641 of file DSDBManager.cc.
References __func__, areaEstimate(), dbConnection_, file_, hasImplementation(), implementation(), Conversion::toString(), and RelationalDBConnection::updateQuery().
void DSDBManager::setLongestPathDelayEstimate | ( | RowID | implementation, |
double | delay | ||
) |
Sets the longest path delay estimate for an implementation.
implementation | RowID of the machine implementation. |
delay | Longest path delay estimate of implementation in nanoseconds. |
Definition at line 617 of file DSDBManager.cc.
References __func__, dbConnection_, file_, hasImplementation(), implementation(), Conversion::toString(), and RelationalDBConnection::updateQuery().
Sets the application to be unschedulable for an architecture, thus cycle count nor further estimation could not be done.
This is saved to the DB so future evaluations of the same architecture can be skipped.
application | RowID of the application. |
architecture | RowID of the machine architecture. |
Definition at line 515 of file DSDBManager.cc.
References __func__, architecture(), dbConnection_, file_, hasApplication(), hasArchitecture(), Conversion::toString(), and RelationalDBConnection::updateQuery().
void DSDBManager::writeArchitectureToFile | ( | RowID | id, |
const std::string & | path | ||
) | const |
Writes the machine architecture of given ID to file.
id | RowID of the machine architecture. |
path | File path where the ADF file is written. |
Definition at line 826 of file DSDBManager.cc.
References __func__, architectureString(), Exception::errorMessage(), ADFSerializer::readState(), XMLSerializer::setDestinationFile(), XMLSerializer::setSourceString(), and ADFSerializer::writeState().
Referenced by main(), and writeConfigurationToFile().
void DSDBManager::writeConfigurationToFile | ( | const MachineConfiguration & | conf, |
const std::string & | path | ||
) |
Writes the machine configuration to files path.{idf,adf}.
conf | MachineConfiguration to be written to a path. |
path | Path where the ADF and possibly the IDF of the configuration will be written. |
Definition at line 929 of file DSDBManager.cc.
References DSDBManager::MachineConfiguration::architectureID, DSDBManager::MachineConfiguration::hasImplementation, DSDBManager::MachineConfiguration::implementationID, writeArchitectureToFile(), and writeImplementationToFile().
void DSDBManager::writeImplementationToFile | ( | RowID | id, |
const std::string & | path | ||
) | const |
Writes the machine implementation of given ID to file.
id | RowID of the machine implementation. |
path | File path where the IDF file is written. |
Definition at line 906 of file DSDBManager.cc.
References __func__, Exception::errorMessage(), implementationString(), IDF::IDFSerializer::readState(), XMLSerializer::setDestinationFile(), XMLSerializer::setSourceString(), and IDF::IDFSerializer::writeState().
Referenced by main(), and writeConfigurationToFile().
|
private |
Handle to the database.
Definition at line 250 of file DSDBManager.hh.
Referenced by DSDBManager(), and ~DSDBManager().
|
private |
Handle to the database connection.
Definition at line 252 of file DSDBManager.hh.
Referenced by addApplication(), addArchitecture(), addConfiguration(), addCycleCount(), addEnergyEstimate(), addImplementation(), applicationCostEstimatesByConf(), applicationCount(), applicationIDs(), applicationPath(), archConfigurationIDs(), architectureId(), architectureIDs(), architectureString(), areaEstimate(), configuration(), configurationId(), configurationIDs(), cycleCount(), DSDBManager(), energyEstimate(), hasApplication(), hasArchitecture(), hasConfiguration(), hasCycleCount(), hasEnergyEstimate(), hasImplementation(), implementationString(), isUnschedulable(), longestPathDelayEstimate(), paretoSetConnectivityAndCycles(), removeApplication(), removeConfiguration(), setAreaEstimate(), setLongestPathDelayEstimate(), setUnschedulable(), and ~DSDBManager().
|
private |
The DSDB file containing the current database.
Definition at line 254 of file DSDBManager.hh.
Referenced by addCycleCount(), addEnergyEstimate(), applicationPath(), architectureString(), areaEstimate(), configuration(), cycleCount(), dsdbFile(), energyEstimate(), implementationString(), longestPathDelayEstimate(), removeApplication(), removeConfiguration(), setAreaEstimate(), setLongestPathDelayEstimate(), and setUnschedulable().