OpenASIP
2.0
|
#include <HDBManager.hh>
Classes | |
struct | PipelineElementUsage |
Public Types | |
typedef std::list< DataObject > | DataObjectList |
Public Member Functions | |
virtual | ~HDBManager () |
std::string | fileName () const |
RowID | addCostFunctionPlugin (const CostFunctionPlugin &plugin) const |
virtual void | removeCostFunctionPlugin (RowID pluginID) const |
RowID | addFUArchitecture (const FUArchitecture &architecture) const |
bool | canRemoveFUArchitecture (RowID archID) const |
virtual void | removeFUArchitecture (RowID archID) const |
RowID | addFUEntry () const |
virtual void | removeFUEntry (RowID id) const |
RowID | addFUImplementation (const FUEntry &entry) const |
virtual void | removeFUImplementation (RowID implementationID) const |
void | setArchitectureForFU (RowID fuID, RowID archID) const |
void | unsetArchitectureForFU (RowID fuID) const |
RowID | addRFArchitecture (const RFArchitecture &architecture) const |
bool | canRemoveRFArchitecture (RowID archID) const |
virtual void | removeRFArchitecture (RowID archID) const |
RowID | addRFEntry () const |
virtual void | removeRFEntry (RowID id) const |
RowID | addRFImplementation (const RFImplementation &implementation, RowID rfEntryID) |
virtual void | removeRFImplementation (RowID implID) const |
void | setArchitectureForRF (RowID rfID, RowID archID) const |
void | unsetArchitectureForRF (RowID rfID) const |
void | setCostFunctionPluginForFU (RowID fuID, RowID pluginID) const |
void | unsetCostFunctionPluginForFU (RowID fuID) const |
void | setCostFunctionPluginForRF (RowID rfID, RowID pluginID) const |
void | unsetCostFunctionPluginForRF (RowID rfID) const |
std::set< RowID > | fuEntryIDs () const |
std::set< RowID > | rfEntryIDs () const |
std::set< RowID > | busEntryIDs () const |
std::set< RowID > | socketEntryIDs () const |
std::set< RowID > | OperationImplementationIDs () const |
std::set< RowID > | OperationImplementationResourceIDs () const |
OperationImplementation | OperationImplementationByID (RowID id) const |
OperationImplementationResource | OperationImplementationResourceByID (RowID id) const |
void | addOperationImplementationResource (const OperationImplementationResource &resource) |
void | addOperationImplementation (const OperationImplementation &operation) |
void | removeOperationImplementation (RowID id) |
void | removeOperationImplementationResource (RowID id) |
std::set< RowID > | fuArchitectureIDs () const |
std::set< RowID > | fuArchitectureIDsByOperationSet (const std::set< std::string > &operationNames) const |
std::set< RowID > | rfArchitectureIDs () const |
RowID | fuEntryIDOfImplementation (RowID implID) const |
RowID | rfEntryIDOfImplementation (RowID implID) const |
FUEntry * | fuByEntryID (RowID id) const |
RFEntry * | rfByEntryID (RowID id) const |
virtual FUArchitecture * | fuArchitectureByID (RowID id) const |
virtual RFArchitecture * | rfArchitectureByID (RowID id) const |
std::set< RowID > | fuEntriesByArchitecture (const TTAMachine::FunctionUnit &fu) const |
std::set< RowID > | rfEntriesByArchitecture (int readPorts, int writePorts, int bidirPorts, int maxReads, int maxWrites, int latency, bool guardSupport, int guardLatency=0, int width=0, int size=0, bool zeroRegister=false) const |
virtual DataObject | costEstimationDataValue (const std::string &valueName, const std::string &pluginName) const |
DataObject | costEstimationDataValue (RowID entryId) const |
RowID | addFUCostEstimationData (RowID fuID, const std::string &valueName, const std::string &value, RowID pluginID) const |
RowID | addRFCostEstimationData (RowID rfID, const std::string &valueName, const std::string &value, RowID pluginID) const |
DataObject | fuCostEstimationData (const std::string &valueName, RowID implementationId, const std::string &pluginName) const |
DataObject | rfCostEstimationData (const std::string &valueName, RowID implementationId, const std::string &pluginName) const |
RowID | addBusEntry () const |
virtual void | removeBusEntry (RowID id) const |
RowID | addBusCostEstimationData (RowID busID, const std::string &valueName, const std::string &value, RowID pluginID) const |
DataObject | busCostEstimationData (const std::string &valueName, RowID busID, const std::string &pluginName) const |
DataObjectList * | busCostEstimationDataList (const std::string &valueName, RowID implementationId, const std::string &pluginName) const |
RowID | addSocketEntry () const |
virtual void | removeSocketEntry (RowID id) const |
RowID | addSocketCostEstimationData (RowID socketID, const std::string &valueName, const std::string &value, RowID pluginID) const |
DataObject | socketCostEstimationData (const std::string &valueName, RowID socketID, const std::string &pluginName) const |
DataObjectList * | socketCostEstimationDataList (const std::string &valueName, RowID implementationID, const std::string &pluginName) const |
std::set< RowID > | fuCostEstimationDataIDs (RowID fuImplID) const |
std::set< RowID > | rfCostEstimationDataIDs (RowID rfImplID) const |
std::set< RowID > | busCostEstimationDataIDs (RowID busID) const |
std::set< RowID > | socketCostEstimationDataIDs (RowID socketID) const |
CostEstimationData | costEstimationData (RowID id) const |
std::set< RowID > | costFunctionPluginIDs () const |
std::set< RowID > | costFunctionPluginDataIDs (RowID pluginID) const |
CostFunctionPlugin * | costFunctionPluginByID (RowID pluginID) const |
virtual std::set< RowID > | costEstimationDataIDs (const CostEstimationData &match, bool useCompiledQueries=false, RelationalDBQueryResult *compiledQuery=NULL) const |
RowID | addCostEstimationData (const CostEstimationData &data) const |
virtual void | removeCostEstimationData (RowID id) const |
virtual void | modifyCostEstimationData (RowID id, const CostEstimationData &data) |
virtual void | modifyCostFunctionPlugin (RowID id, const CostFunctionPlugin &plugin) |
virtual void | deleteCostEstimationDataIDsQueries () const =0 |
std::list< std::string > | blockSourceFile () |
Static Public Member Functions | |
static void | createNew (const std::string &file) |
static std::string | formatString (BlockImplementationFile::Format format) |
Protected Member Functions | |
virtual RFImplementation * | createImplementationOfRF (RowID id) const |
virtual FUImplementation * | createImplementationOfFU (FUArchitecture &architecture, RowID id) const |
void | createCostEstimatioDataIdsQuery (const CostEstimationData &match, std::string *query, RelationalDBQueryResult *compiledQuery=NULL, short int *queryHash=NULL, bool createBindableQuery=false) const |
RelationalDBConnection * | getDBConnection () const |
HDBManager (const std::string &hdbFile) | |
Private Types | |
typedef std::vector< PipelineElementUsage > | PipelineElementUsageTable |
Private Attributes | |
SQLite * | db_ |
Handle to the database. More... | |
RelationalDBConnection * | dbConnection_ |
Handle to the database connection. More... | |
std::string | hdbFile_ |
The HDB file to manager. More... | |
Static Private Attributes | |
static HDBManager * | instance_ = NULL |
Unique instance of the HDBManager. More... | |
Friends | |
class | HDBManagerTest |
Class used to access hardware database (HDB).
Provides methods to create new HDB and to search, add, and remove blocks from/to HDB. There can exist only one HDBManager instance per database at the same time because HDBManager creates a connection to the database in its constructor and does not close the connection unless the HDBManager instance is deleted. And there cannot be several connections to the same database at the same time.
Definition at line 82 of file HDBManager.hh.
typedef std::list<DataObject> HDB::HDBManager::DataObjectList |
Definition at line 86 of file HDBManager.hh.
|
private |
Definition at line 297 of file HDBManager.hh.
|
virtual |
The destructor.
Definition at line 534 of file HDBManager.cc.
References SQLite::close(), db_, and dbConnection_.
|
protected |
The constructor.
hdbFile | Name of the HDB file to be managed by the manager. |
IOException | If connection to the DB cannot be established. |
Definition at line 394 of file HDBManager.cc.
References __func__, addBooleanColumn(), SQLite::connect(), CQ_OPERATION_IMPLEMENTATION, CQ_OPERATION_IMPLEMENTATION_RESOURCE, CQ_OPERATION_IMPLEMENTATION_RESOURCE_SOURCE_FILE, CQ_OPERATION_IMPLEMENTATION_RESOURCES, CQ_OPERATION_IMPLEMENTATION_SOURCE_FILE, CQ_OPERATION_IMPLEMENTATION_VARIABLE, db_, dbConnection_, RelationalDBConnection::DDLQuery(), Exception::errorMessage(), FileSystem::fileExists(), FileSystem::fileIsReadable(), hasColumn(), RelationalDBConnection::updateQuery(), RelationalDBConnection::updateVersion(), VERILOG_SIM_FORMAT, RelationalDBConnection::version(), and VHDL_SIM_FORMAT.
|
private |
Adds the block implementation files to the given FU implementation which is the implementation of the FU entry that has the given ID.
implementation | The implementation. |
entryID | ID of the FU entry. |
Definition at line 5337 of file HDBManager.cc.
References assert, RelationalDBQueryResult::column(), RelationalDBQueryResult::data(), dbConnection_, fileFormat(), fuSourceFilesByIDQuery(), RelationalDBQueryResult::hasNext(), implementation, RelationalDBQueryResult::next(), RelationalDBConnection::query(), and DataObject::stringValue().
Referenced by createImplementationOfFU(), and createImplementationOfRF().
|
private |
Adds the block implementation files to the given RF implementation which is the implementation of the RF entry that has the given ID.
implementation | The implementation. |
entryID | ID of the RF entry. |
Definition at line 5443 of file HDBManager.cc.
References assert, RelationalDBQueryResult::column(), RelationalDBQueryResult::data(), dbConnection_, fileFormat(), RelationalDBQueryResult::hasNext(), implementation, RelationalDBQueryResult::next(), RelationalDBConnection::query(), rfSourceFilesByIDQuery(), and DataObject::stringValue().
|
private |
Adds the given block implementation file to the HDB.
file | The file to add. |
Definition at line 5498 of file HDBManager.cc.
References containsImplementationFile(), dbConnection_, HDB::BlockImplementationFile::format(), formatString(), HDB::BlockImplementationFile::pathToFile(), and RelationalDBConnection::updateQuery().
Referenced by addFUImplementation(), and addRFImplementation().
|
private |
Inserts a new boolean type column into existing table.
table | The name of the targeted table. |
newColumn | The name of the new column. |
Definition at line 4380 of file HDBManager.cc.
References assert, dbConnection_, debugLog, Exception::errorMessage(), and RelationalDBConnection::updateQuery().
Referenced by addRFImplementation(), and HDBManager().
RowID HDB::HDBManager::addBusCostEstimationData | ( | RowID | busID, |
const std::string & | valueName, | ||
const std::string & | value, | ||
RowID | pluginID | ||
) | const |
Adds the given cost estimation data values to given Bus entry.
busID | The ID of the Bus entry the cost data will be added. @valueName The name of the cost value. @value The cost value. @pluginID The ID of the cost function plugin that owns this data. |
Definition at line 3465 of file HDBManager.cc.
References assert, dbConnection_, debugLog, Exception::errorMessage(), RelationalDBConnection::lastInsertRowID(), Conversion::toString(), and RelationalDBConnection::updateQuery().
RowID HDB::HDBManager::addBusEntry | ( | ) | const |
Adds an empty Bus entry to the database.
entry | The Bus entry. |
Definition at line 3393 of file HDBManager.cc.
References assert, dbConnection_, debugLog, Exception::errorMessage(), RelationalDBConnection::lastInsertRowID(), and RelationalDBConnection::updateQuery().
Referenced by AddBusEntryCmd::Do().
RowID HDB::HDBManager::addCostEstimationData | ( | const CostEstimationData & | data | ) | const |
Adds cost estimation data to the HDB.
data | Cost estimation data to add. |
Definition at line 6694 of file HDBManager.cc.
References __func__, assert, CostEstimationData::busReference(), dbConnection_, debugLog, Exception::errorMessage(), CostEstimationData::fuReference(), hasBusEntry(), CostEstimationData::hasBusReference(), hasFUEntry(), CostEstimationData::hasFUReference(), CostEstimationData::hasName(), CostEstimationData::hasPluginID(), hasRFEntry(), CostEstimationData::hasRFReference(), hasSocketEntry(), CostEstimationData::hasSocketReference(), CostEstimationData::hasValue(), RelationalDBConnection::lastInsertRowID(), CostEstimationData::name(), CostEstimationData::pluginID(), CostEstimationData::rfReference(), CostEstimationData::socketReference(), DataObject::stringValue(), Conversion::toString(), RelationalDBConnection::updateQuery(), and CostEstimationData::value().
RowID HDB::HDBManager::addCostFunctionPlugin | ( | const CostFunctionPlugin & | plugin | ) | const |
Add the given CostFunctionPlugin to the database.
plugin | The CostFunctionPlugin to add. |
Exception | May throw InvalidData if the CostFunctionPlugin type is unknown. |
Definition at line 626 of file HDBManager.cc.
References __func__, assert, RelationalDBConnection::beginTransaction(), RelationalDBConnection::commit(), HDB::CostFunctionPlugin::COST_DECOMP, HDB::CostFunctionPlugin::COST_FU, HDB::CostFunctionPlugin::COST_ICDEC, COST_PLUGIN_TYPE_DECOMP, COST_PLUGIN_TYPE_FU, COST_PLUGIN_TYPE_ICDEC, COST_PLUGIN_TYPE_RF, HDB::CostFunctionPlugin::COST_RF, dbConnection_, debugLog, HDB::CostFunctionPlugin::description(), Exception::errorMessage(), RelationalDBConnection::lastInsertRowID(), HDB::CostFunctionPlugin::name(), HDB::CostFunctionPlugin::pluginFilePath(), RelationalDBConnection::rollback(), HDB::CostFunctionPlugin::type(), and RelationalDBConnection::updateQuery().
Referenced by AddCostFunctionPluginCmd::Do().
|
private |
Adds data ports to the given FU implementation which is the implementation of the FU entry that has the given ID.
implementation | The implementation. |
architecture | The corresponding architecture. |
entryID | ID of the FU entry. |
Definition at line 5006 of file HDBManager.cc.
References assert, RelationalDBQueryResult::column(), RelationalDBQueryResult::data(), dbConnection_, fuImplementationDataPortsByIDQuery(), RelationalDBQueryResult::hasNext(), implementation, RelationalDBQueryResult::next(), RelationalDBConnection::query(), resolveArchitecturePort(), and DataObject::stringValue().
Referenced by createImplementationOfFU(), and createImplementationOfRF().
|
private |
Adds data ports to the given RF implementation which is the implementation of the RF entry that has the given ID.
implementation | The implementation. |
entryID | ID of the RF entry. |
Definition at line 5377 of file HDBManager.cc.
References assert, HDB::BIDIR, BIDIR_DIRECTION, RelationalDBQueryResult::column(), RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), implementation, HDB::IN, IN_DIRECTION, RelationalDBQueryResult::next(), HDB::OUT, OUT_DIRECTION, RelationalDBConnection::query(), rfImplementationDataPortsByIDQuery(), DataObject::stringValue(), and RelationalDBQueryResult::UNKNOWN_INDEX.
RowID HDB::HDBManager::addFUArchitecture | ( | const FUArchitecture & | arch | ) | const |
Adds the given FU architecture to the database.
arch | The FU architecture to add. |
InvalidData | If the FU architecture is invalid. |
Definition at line 717 of file HDBManager.cc.
References __func__, HDB::FUArchitecture::architecture(), assert, RelationalDBConnection::beginTransaction(), FUValidator::checkOperandBindings(), FUValidator::checkOperations(), RelationalDBConnection::commit(), containsOperation(), dbConnection_, debugLog, MachineValidatorResults::error(), MachineValidatorResults::errorCount(), Exception::errorMessage(), HDB::FUArchitecture::hasGuardSupport(), HDB::FUArchitecture::hasParameterizedWidth(), TTAMachine::HWOperation::io(), TTAMachine::HWOperation::isBound(), TTAMachine::FUPort::isOpcodeSetting(), TTAMachine::ExecutionPipeline::isResourceUsed(), TTAMachine::FUPort::isTriggering(), RelationalDBConnection::lastInsertRowID(), TTAMachine::ExecutionPipeline::latency(), TTAMachine::PipelineElement::name(), TTAMachine::HWOperation::name(), TTAMachine::Port::name(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), TTAMachine::FunctionUnit::operationPort(), TTAMachine::FunctionUnit::operationPortCount(), TTAMachine::HWOperation::pipeline(), TTAMachine::FunctionUnit::pipelineElement(), TTAMachine::FunctionUnit::pipelineElementCount(), READ_ACTION, TTAMachine::ExecutionPipeline::readOperands(), RelationalDBConnection::rollback(), Conversion::toString(), RelationalDBConnection::updateQuery(), TTAMachine::BaseFUPort::width(), WRITE_ACTION, and TTAMachine::ExecutionPipeline::writtenOperands().
Referenced by AddFUArchFromADFCmd::Do().
RowID HDB::HDBManager::addFUCostEstimationData | ( | RowID | fuID, |
const std::string & | valueName, | ||
const std::string & | value, | ||
RowID | pluginID | ||
) | const |
Adds the given cost estimation data values to given FU entry.
fuID | The ID of the FU entry the cost data will be added. @valueName The name of the cost value. @value The cost value. @pluginID The ID of the cost function plugin that owns this data. |
Definition at line 3210 of file HDBManager.cc.
References assert, dbConnection_, debugLog, Exception::errorMessage(), RelationalDBConnection::lastInsertRowID(), Conversion::toString(), and RelationalDBConnection::updateQuery().
RowID HDB::HDBManager::addFUEntry | ( | ) | const |
Adds an empty FU entry to the database.
entry | The FU entry. |
Definition at line 1014 of file HDBManager.cc.
References assert, dbConnection_, debugLog, Exception::errorMessage(), RelationalDBConnection::lastInsertRowID(), and RelationalDBConnection::updateQuery().
Referenced by AddFUEntryCmd::Do(), and AddFUImplementationCmd::Do().
|
private |
Adds external ports to the given FU implementation which is the implementation of the FU entry that has the given ID.
implementation | The implementation. |
entryID | ID of the FU entry. |
Definition at line 5055 of file HDBManager.cc.
References assert, HDB::BIDIR, BIDIR_DIRECTION, RelationalDBQueryResult::column(), RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), fuExternalPortsByIDQuery(), RelationalDBQueryResult::hasNext(), implementation, HDB::IN, IN_DIRECTION, HDB::ExternalPort::name(), RelationalDBQueryResult::next(), HDB::OUT, OUT_DIRECTION, RelationalDBConnection::query(), HDB::ExternalPort::setParameterDependency(), DataObject::stringValue(), and Conversion::toString().
Referenced by createImplementationOfFU().
Adds the implementation of the given FU entry to the database.
In practice the implementation is added for the FU entry that has the same ID as the given FUEntry instance. The given FUEntry instance must also have an architecture similar to the architecture of the FU entry in the database. This is required in port mapping.
entry | The FU entry containing the implementation to add. |
InvalidData | If the given FUEntry instance is invalid or if the FU entry does not have architecture in the database of if the FU entry has an implementation already. |
Definition at line 1112 of file HDBManager.cc.
References __func__, addBlockImplementationFileToHDB(), HDB::FUEntry::architecture(), HDB::FUArchitecture::architecture(), HDB::FUPortImplementation::architecturePort(), HDB::FUImplementation::architecturePort(), HDB::FUImplementation::architecturePortCount(), assert, RelationalDBConnection::beginTransaction(), HDB::HWBlockImplementation::clkPort(), RelationalDBConnection::commit(), containsOperation(), RelationalDBQueryResult::data(), dbConnection_, debugLog, HDB::ExternalPort::description(), HDB::ExternalPort::direction(), directionString(), Exception::errorMessage(), HDB::FUImplementation::externalPort(), HDB::FUImplementation::externalPortCount(), HDB::HWBlockImplementation::file(), fuArchitectureID(), fuByEntryID(), HDB::HWBlockImplementation::glockPort(), HDB::FUImplementation::glockReqPort(), HDB::FUPortImplementation::guardPort(), HDB::FUEntry::hasArchitecture(), hasFUEntry(), HDB::HDBEntry::hasID(), HDB::FUEntry::hasImplementation(), RelationalDBQueryResult::hasNext(), HDB::FUImplementation::hasOpcode(), TTAMachine::FunctionUnit::hasOperationPort(), HDB::HDBEntry::id(), HDB::FUEntry::implementation(), HDB::HWBlockImplementation::implementationFileCount(), TTAMachine::HWOperation::io(), TTAMachine::HWOperation::isBound(), RelationalDBConnection::lastInsertRowID(), HDB::PortImplementation::loadPort(), HDB::HWBlockImplementation::moduleName(), HDB::Parameter::name, HDB::PortImplementation::name(), TTAMachine::HWOperation::name(), HDB::ExternalPort::name(), RelationalDBQueryResult::next(), HDB::FUImplementation::opcode(), HDB::FUImplementation::opcodePort(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), TTAMachine::FunctionUnit::operationPort(), HDB::FUImplementation::parameter(), HDB::FUImplementation::parameterCount(), HDB::ExternalPort::parameterDependency(), HDB::ExternalPort::parameterDependencyCount(), HDB::BlockImplementationFile::pathToFile(), RelationalDBConnection::query(), RelationalDBConnection::rollback(), HDB::HWBlockImplementation::rstPort(), DataObject::stringValue(), Conversion::toString(), HDB::Parameter::type, RelationalDBConnection::updateQuery(), HDB::Parameter::value, HDB::FUPortImplementation::widthFormula(), and HDB::ExternalPort::widthFormula().
Referenced by AddFUImplementationCmd::Do(), and HDBEditorModifyCmd::Do().
|
private |
Adds parameters to the given FU implementation which is the implementation of the FU entry that has the given ID.
implementation | The implementation. |
entryID | ID of the FU entry. |
Definition at line 5240 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, fuImplementationParametersByIDQuery(), RelationalDBQueryResult::hasNext(), implementation, RelationalDBQueryResult::next(), RelationalDBConnection::query(), and DataObject::stringValue().
Referenced by createImplementationOfFU().
|
private |
Adds the operation codes to the given FU implementation which is the implementation of the FU entry that has the given ID.
implementation | The FU implementation. |
entryID | ID of the FU entry. |
Definition at line 4971 of file HDBManager.cc.
References assert, RelationalDBQueryResult::column(), RelationalDBQueryResult::data(), dbConnection_, RelationalDBQueryResult::hasNext(), implementation, DataObject::integerValue(), RelationalDBQueryResult::next(), opcodesByIDQuery(), RelationalDBConnection::query(), and DataObject::stringValue().
Referenced by createImplementationOfFU().
void HDB::HDBManager::addOperationImplementation | ( | const OperationImplementation & | operation | ) |
Add addOperationImplementation to the DB.
Definition at line 2541 of file HDBManager.cc.
References HDB::OperationImplementation::absBusDefFile, dbConnection_, HDB::OperationImplementation::implFileVerilog, HDB::OperationImplementation::implFileVhdl, HDB::OperationImplementation::initialImplFileVerilog, HDB::OperationImplementation::initialImplFileVhdl, RelationalDBConnection::lastInsertRowID(), HDB::OperationImplementation::latency, HDB::OperationImplementation::name, HDB::OperationImplementation::postOpImplFileVerilog, HDB::OperationImplementation::postOpImplFileVhdl, HDB::OperationImplementation::resources, RelationalDBConnection::updateQuery(), HDB::BlockImplementationFile::Verilog, HDB::OperationImplementation::verilogVariables, HDB::BlockImplementationFile::VHDL, and HDB::OperationImplementation::vhdlVariables.
Referenced by OperationImplementationDialog::onOK().
void HDB::HDBManager::addOperationImplementationResource | ( | const OperationImplementationResource & | resource | ) |
Add addOperationImplementationResource to the DB.
Definition at line 2482 of file HDBManager.cc.
References dbConnection_, fileFormat(), HDB::OperationImplementationResource::ipxact, RelationalDBConnection::lastInsertRowID(), HDB::OperationImplementationResource::name, HDB::OperationImplementationResource::simFiles, HDB::OperationImplementationResource::simFormats, HDB::OperationImplementationResource::synFiles, HDB::OperationImplementationResource::synFormats, and RelationalDBConnection::updateQuery().
Referenced by OperationImplementationResourceDialog::onOK().
|
private |
Obtains data from HDB and creates the operation pipelines to the given FU architecture.
architecture | The FU architecture to which the operations are added. |
id | ID the FU architecture in HDB. |
Definition at line 4517 of file HDBManager.cc.
References TTAMachine::ExecutionPipeline::addPortRead(), TTAMachine::ExecutionPipeline::addPortWrite(), TTAMachine::ExecutionPipeline::addResourceUse(), HDB::FUArchitecture::architecture(), assert, DataObject::boolValue(), RelationalDBQueryResult::column(), MapTools::containsKey(), RelationalDBQueryResult::data(), dbConnection_, RelationalDBQueryResult::hasNext(), TTAMachine::FunctionUnit::hasOperation(), DataObject::integerValue(), ioUsageDataByIDQuery(), RelationalDBQueryResult::next(), TTAMachine::FunctionUnit::operation(), TTAMachine::HWOperation::pipeline(), RelationalDBConnection::query(), READ_ACTION, resourceUsageDataByIDQuery(), DataObject::stringValue(), Conversion::toString(), and WRITE_ACTION.
Referenced by fuArchitectureByID().
|
private |
Obtains data from HDB and creates ports and operand bindings to the given FU architecture that has the given ID in HDB.
architecture | The FU architecture to which the ports are added. |
id | ID of the FU architecture in HDB. |
Definition at line 4406 of file HDBManager.cc.
References abortWithError, HDB::FUArchitecture::architecture(), assert, TTAMachine::HWOperation::bindPort(), DataObject::boolValue(), RelationalDBQueryResult::column(), MapTools::containsKey(), RelationalDBQueryResult::data(), dbConnection_, debugLog, DEFAULT_PORT_WIDTH, Exception::errorMessage(), fuPortsAndBindingsByIDQuery(), RelationalDBQueryResult::hasNext(), TTAMachine::FunctionUnit::hasOperation(), DataObject::integerValue(), DataObject::isNull(), RelationalDBQueryResult::next(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationPort(), RelationalDBConnection::query(), HDB::FUArchitecture::setGuardSupport(), HDB::FUArchitecture::setParameterizedWidth(), DataObject::stringValue(), Conversion::toString(), and RelationalDBQueryResult::UNKNOWN_INDEX.
Referenced by fuArchitectureByID().
RowID HDB::HDBManager::addRFArchitecture | ( | const RFArchitecture & | architecture | ) | const |
Adds the given RF architecture to the HDB.
architecture | The architecture to add. |
Definition at line 1461 of file HDBManager.cc.
References assert, HDB::RFArchitecture::bidirPortCount(), dbConnection_, debugLog, Exception::errorMessage(), HDB::RFArchitecture::guardLatency(), HDB::RFArchitecture::hasGuardSupport(), HDB::RFArchitecture::hasParameterizedSize(), HDB::RFArchitecture::hasParameterizedWidth(), RelationalDBConnection::lastInsertRowID(), HDB::RFArchitecture::latency(), HDB::RFArchitecture::maxReads(), HDB::RFArchitecture::maxWrites(), HDB::RFArchitecture::readPortCount(), HDB::RFArchitecture::size(), Conversion::toString(), RelationalDBConnection::updateQuery(), HDB::RFArchitecture::width(), HDB::RFArchitecture::writePortCount(), and HDB::RFArchitecture::zeroRegister().
Referenced by AddRFArchitectureCmd::Do().
RowID HDB::HDBManager::addRFCostEstimationData | ( | RowID | rfID, |
const std::string & | valueName, | ||
const std::string & | value, | ||
RowID | pluginID | ||
) | const |
Adds the given cost estimation data values to given RF entry.
rfID | The ID of the RF entry the cost data will be added. @valueName The name of the cost value. @value The cost value. @pluginID The ID of the cost function plugin that owns this data. |
Definition at line 3246 of file HDBManager.cc.
References assert, dbConnection_, debugLog, Exception::errorMessage(), RelationalDBConnection::lastInsertRowID(), Conversion::toString(), and RelationalDBConnection::updateQuery().
RowID HDB::HDBManager::addRFEntry | ( | ) | const |
Adds an empty RF entry to the database.
Definition at line 1557 of file HDBManager.cc.
References assert, dbConnection_, debugLog, Exception::errorMessage(), RelationalDBConnection::lastInsertRowID(), and RelationalDBConnection::updateQuery().
Referenced by AddRFEntryCmd::Do(), and AddRFImplementationCmd::Do().
|
private |
Adds external ports to the given RF implementation which is the implementation of the RF entry that has the given ID.
implementation | The implementation. |
entryID | ID of the RF implementation entry. |
Definition at line 5143 of file HDBManager.cc.
References assert, HDB::BIDIR, BIDIR_DIRECTION, RelationalDBQueryResult::column(), RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), implementation, HDB::IN, IN_DIRECTION, HDB::ExternalPort::name(), RelationalDBQueryResult::next(), HDB::OUT, OUT_DIRECTION, RelationalDBConnection::query(), rfExternalPortsByIDQuery(), HDB::ExternalPort::setParameterDependency(), DataObject::stringValue(), RelationalDBConnection::tableExistsInDB(), and Conversion::toString().
Referenced by createImplementationOfRF().
RowID HDB::HDBManager::addRFImplementation | ( | const RFImplementation & | implementation, |
RowID | rfEntryID | ||
) |
Adds an implementation for the the given RF entry.
implementation | The implementation to add. |
rfEntryID | ID of the RF entry. |
InvalidData | If the RF entry has an implementation already or if the database does not contain an RF entry with the given ID. |
Definition at line 1640 of file HDBManager.cc.
References __func__, addBlockImplementationFileToHDB(), addBooleanColumn(), assert, RelationalDBConnection::beginTransaction(), RelationalDBConnection::commit(), CQ_RF_EXT_PORT_PARAMETER_DEPENDENCY, CQ_RF_EXTERNAL_PORT, CQ_RF_IMPLEMENTATION_PARAMETER, dbConnection_, RelationalDBConnection::DDLQuery(), debugLog, HDB::ExternalPort::description(), HDB::RFPortImplementation::direction(), HDB::ExternalPort::direction(), directionString(), Exception::errorMessage(), hasColumn(), HDB::RFEntry::hasImplementation(), hasRFEntry(), implementation, RelationalDBConnection::lastInsertRowID(), HDB::PortImplementation::loadPort(), HDB::Parameter::name, HDB::PortImplementation::name(), HDB::ExternalPort::name(), HDB::RFPortImplementation::opcodePort(), HDB::RFPortImplementation::opcodePortWidthFormula(), HDB::ExternalPort::parameterDependency(), HDB::ExternalPort::parameterDependencyCount(), HDB::BlockImplementationFile::pathToFile(), rfByEntryID(), RelationalDBConnection::rollback(), RelationalDBConnection::tableExistsInDB(), Conversion::toString(), HDB::Parameter::type, RelationalDBConnection::updateQuery(), HDB::Parameter::value, and HDB::ExternalPort::widthFormula().
Referenced by AddRFImplementationCmd::Do(), and HDBEditorModifyCmd::Do().
|
private |
Adds parameters to the given RF implementation which is the implementation of the RF entry that has the given ID.
implementation | The implementation. |
entryID | ID of the RF entry. |
Definition at line 5274 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, RelationalDBQueryResult::hasNext(), implementation, RelationalDBQueryResult::next(), RelationalDBConnection::query(), rfImplementationParametersByIDQuery(), DataObject::stringValue(), and RelationalDBConnection::tableExistsInDB().
Referenced by createImplementationOfRF().
RowID HDB::HDBManager::addSocketCostEstimationData | ( | RowID | socketID, |
const std::string & | valueName, | ||
const std::string & | value, | ||
RowID | pluginID | ||
) | const |
Adds the given cost estimation data values to given Socket entry.
socketID | The ID of the Socket entry the cost data will be added. @valueName The name of the cost value. @value The cost value. @pluginID The ID of the cost function plugin that owns this data. |
Definition at line 3678 of file HDBManager.cc.
References assert, dbConnection_, debugLog, Exception::errorMessage(), RelationalDBConnection::lastInsertRowID(), Conversion::toString(), and RelationalDBConnection::updateQuery().
RowID HDB::HDBManager::addSocketEntry | ( | ) | const |
Adds an empty Socket entry to the database.
entry | The Socket entry. |
Definition at line 3606 of file HDBManager.cc.
References assert, dbConnection_, debugLog, Exception::errorMessage(), RelationalDBConnection::lastInsertRowID(), and RelationalDBConnection::updateQuery().
Referenced by AddSocketEntryCmd::Do().
|
staticprivate |
Checks whether the pipeline element usages of the given table are compatible.
They are compatible if the first pipeline is more restrictive or equal to the second pipeline.
table | The table that describes the pipeline usages. |
Definition at line 5634 of file HDBManager.cc.
References AssocTools::difference(), and SetTools::intersection().
Referenced by isMatchingArchitecture().
std::list< std::string > HDB::HDBManager::blockSourceFile | ( | ) |
Returns block source file names
Definition at line 7138 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and DataObject::stringValue().
DataObject HDB::HDBManager::busCostEstimationData | ( | const std::string & | valueName, |
RowID | busID, | ||
const std::string & | pluginName | ||
) | const |
Returns bus cost estimation data.
This version assumes that there's only one entry with given parameters.
valueName | Name of the value to fetch. |
busID | The ID of the bus entry. |
pluginName | Name of the cost estimation plugin that owns the data. |
KeyNotFound | If the HDB does not contain bus cost estimation data with the given arguments. |
Definition at line 3506 of file HDBManager.cc.
References __func__, assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by DefaultICDecoderEstimator::delayOfBus().
Returns a set of cost estimation data IDs which reference the given bus entry.
busID | ID of the bus entry. |
Definition at line 6514 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by HDBToHtml::busEntryToHtml().
HDBManager::DataObjectList * HDB::HDBManager::busCostEstimationDataList | ( | const std::string & | valueName, |
RowID | busID, | ||
const std::string & | pluginName | ||
) | const |
Returns a list of bus cost estimation data.
valueName | Name of the value to fetch. |
busID | The ID of the bus entry. |
pluginName | Name of the cost estimation plugin that owns the data. |
KeyNotFound | If the HDB does not contain bus cost estimation data with the given arguments. |
Definition at line 3556 of file HDBManager.cc.
References __func__, assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
|
staticprivate |
Creates an SQL query for getting the Bus entry that has the given ID.
The result set has fields {id}.
id | ID of the entry. |
Definition at line 5819 of file HDBManager.cc.
References Conversion::toString().
Referenced by hasBusEntry().
std::set< RowID > HDB::HDBManager::busEntryIDs | ( | ) | const |
Returns a set of Bus entry IDs in the database.
Definition at line 2099 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), and RelationalDBConnection::query().
Referenced by CostDatabase::buildBuses().
bool HDB::HDBManager::canRemoveFUArchitecture | ( | RowID | archID | ) | const |
Tells whether the FU architecture that has the given ID can be removed from the database. It can be removed only if no FU entry uses it.
archID | ID of the FU architecture. |
Definition at line 904 of file HDBManager.cc.
References assert, dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by HDBEditorDeleteCmd::Do(), and removeFUArchitecture().
bool HDB::HDBManager::canRemoveRFArchitecture | ( | RowID | archID | ) | const |
Tells whether the given RF architecture can be removed.
The architecture can be removed if it is not used by any RF entry.
archID | ID of the RF architecture. |
Definition at line 1508 of file HDBManager.cc.
References assert, dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by HDBEditorDeleteCmd::Do(), and removeRFArchitecture().
|
private |
Tells whether the HDB contains a FU architecture that has the given ID.
id | The ID. |
Definition at line 4212 of file HDBManager.cc.
References assert, dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by fuArchitectureByID(), and setArchitectureForFU().
|
private |
Tells whether the HDB contains the given block implementation file.
pathToFile | Full path to the file. |
Definition at line 4185 of file HDBManager.cc.
References assert, dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), and RelationalDBConnection::query().
Referenced by addBlockImplementationFileToHDB().
|
private |
Tells whether the HDB contains the given operation in operation table.
opName | Name of the operation. |
Definition at line 4159 of file HDBManager.cc.
References assert, dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), and RelationalDBConnection::query().
Referenced by addFUArchitecture(), and addFUImplementation().
|
private |
Tells whether the HDB contains a RF architecture with the given ID.
id | The ID. |
Definition at line 4240 of file HDBManager.cc.
References assert, dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by rfArchitectureByID(), and setArchitectureForRF().
CostEstimationData HDB::HDBManager::costEstimationData | ( | RowID | entryId | ) | const |
Returns cost estimation data with the given id.
entryId | Id of the cost estimation data entry. |
KeyNotFound | If the HDB does not contain cost estimation data with the given arguments. |
Definition at line 6323 of file HDBManager.cc.
References __func__, assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), DataObject::isNull(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), CostEstimationData::setBusReference(), CostEstimationData::setFUReference(), CostEstimationData::setName(), CostEstimationData::setPluginID(), CostEstimationData::setRFReference(), CostEstimationData::setSocketReference(), CostEstimationData::setValue(), DataObject::stringValue(), and Conversion::toString().
Referenced by CostDatabase::buildBuses(), CostDatabase::buildFunctionUnits(), CostDatabase::buildRegisterFiles(), CostDatabase::buildSockets(), HDBToHtml::busEntryToHtml(), HDBToHtml::costFunctionPluginToHtml(), HDBToHtml::fuEntryToHtml(), HDBToHtml::fuImplToHtml(), HDBToHtml::rfEntryToHtml(), HDBToHtml::rfImplToHtml(), and HDBToHtml::socketEntryToHtml().
|
virtual |
Function for querying cost estimation data from the HDB.
Returns set of cost estiamtion data Row IDs that match the given datas attributes that are set.
match | CostEstimationData which is matched to the HDB data. |
useCompiledQueries | if true use a compiled query instead of making a new one. |
compiledQuery | Pointer to a prepared query to be used. |
Reimplemented in HDB::CachedHDBManager.
Definition at line 6778 of file HDBManager.cc.
References assert, createCostEstimatioDataIdsQuery(), RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and RelationalDBQueryResult::reset().
Referenced by CostDatabase::buildBuses(), CostDatabase::buildFunctionUnits(), CostDatabase::buildRegisterFiles(), CostDatabase::buildSockets(), and HDB::CachedHDBManager::costEstimationDataIDs().
|
virtual |
Returns cost estimation data which is not connected to any machine implementation id.
This version assumes that there's only one entry with given parameters.
valueName | Name of the value to fetch. |
pluginName | Name of the cost estimation plugin that owns the data. |
KeyNotFound | If the HDB does not contain cost estimation data with the given arguments. |
Reimplemented in HDB::CachedHDBManager.
Definition at line 3831 of file HDBManager.cc.
References __func__, assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), RelationalDBQueryResult::next(), and RelationalDBConnection::query().
Referenced by HDB::CachedHDBManager::costEstimationDataValue(), DefaultICDecoderEstimator::delayOfBus(), DefaultICDecoderEstimator::delayOfSocket(), DefaultICDecoderEstimator::estimateICArea(), and DefaultICDecoderEstimator::estimateICEnergy().
DataObject HDB::HDBManager::costEstimationDataValue | ( | RowID | entryId | ) | const |
Returns cost estimation data value with the given id.
entryId | Id of the cost estimation data entry. |
KeyNotFound | If the HDB does not contain cost estimation data with the given arguments. |
Definition at line 3882 of file HDBManager.cc.
References __func__, assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
CostFunctionPlugin * HDB::HDBManager::costFunctionPluginByID | ( | RowID | pluginID | ) | const |
Returns cost function plugin with the given ID.
pluginID | ID of the cost function plugin. |
Exception | Throws if pluginID not found (KeyNotFound) or illegal cost_function_plugin row found. |
Definition at line 6631 of file HDBManager.cc.
References __func__, assert, HDB::CostFunctionPlugin::COST_DECOMP, HDB::CostFunctionPlugin::COST_FU, HDB::CostFunctionPlugin::COST_ICDEC, COST_PLUGIN_TYPE_DECOMP, COST_PLUGIN_TYPE_FU, COST_PLUGIN_TYPE_ICDEC, COST_PLUGIN_TYPE_RF, HDB::CostFunctionPlugin::COST_RF, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), DataObject::stringValue(), and Conversion::toString().
Referenced by CostDatabase::buildBuses(), CostDatabase::buildFunctionUnits(), CostDatabase::buildRegisterFiles(), CostDatabase::buildSockets(), HDBToHtml::costFunctionPluginToHtml(), and SetCostFunctionPluginCmd::Do().
Returns cost estimation data IDs related to the given cost function plugin.
pluginID | ID of the cost function plugin. |
Definition at line 6589 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by HDBToHtml::costFunctionPluginToHtml().
std::set< RowID > HDB::HDBManager::costFunctionPluginIDs | ( | ) | const |
Returns RowIDs of cost fucntion plugins in the HDB.
Definition at line 6553 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), and RelationalDBConnection::query().
Referenced by CostDatabase::buildBuses(), CostDatabase::buildFunctionUnits(), CostDatabase::buildRegisterFiles(), CostDatabase::buildSockets(), and SetCostFunctionPluginCmd::Do().
|
private |
|
protected |
Creates or prepares the query for cost estimation data ids.
match | CostEstimationData which is matched to the HDB data. |
query | String variable where query is stored, null if no query is to be created. |
compiledQuery | Pointer to a prepared query to be used, null if not to be used. |
queryHash | Pointer to unique id variable to be created for the query, null if not to be created. |
createBindableQuery | If true query of a kind where variables can be binded is created, if false normal query with values is created. |
Definition at line 6835 of file HDBManager.cc.
References RelationalDBQueryResult::bindInt(), RelationalDBQueryResult::bindString(), CostEstimationData::busReference(), CostEstimationData::fuReference(), CostEstimationData::hasBusReference(), CostEstimationData::hasFUReference(), CostEstimationData::hasName(), CostEstimationData::hasPluginID(), CostEstimationData::hasRFReference(), CostEstimationData::hasSocketReference(), CostEstimationData::hasValue(), CostEstimationData::name(), CostEstimationData::pluginID(), CostEstimationData::rfReference(), CostEstimationData::socketReference(), and Conversion::toString().
Referenced by HDB::CachedHDBManager::costEstimationDataIDs(), and costEstimationDataIDs().
|
private |
Obtains the cost function data of the FU that has the given ID and creates a CostFunctionPlugin instance of it.
id | ID of the FU entry. |
Definition at line 4691 of file HDBManager.cc.
References HDB::CostFunctionPlugin::COST_FU, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), DataObject::isNull(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), DataObject::stringValue(), and Conversion::toString().
Referenced by fuByEntryID().
|
private |
Obtains the cost function data of the RF that has the given ID and creates a CostFunctionPlugin instance of it.
id | ID of the RF entry. |
Definition at line 4763 of file HDBManager.cc.
References HDB::CostFunctionPlugin::COST_RF, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), DataObject::isNull(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), DataObject::stringValue(), and Conversion::toString().
Referenced by rfByEntryID().
|
protectedvirtual |
Obtains implementation data of the FU that has the given ID and creates an FUImplementation instance of it.
architecture | Architecture of the FU (needed when matching the ports in the implementation). |
id | ID of the FU entry. |
Reimplemented in HDB::CachedHDBManager.
Definition at line 4615 of file HDBManager.cc.
References addBlockImplementationFiles(), addDataPortsToImplementation(), addFUExternalPortsToImplementation(), addFUParametersToImplementation(), addOpcodesToImplementation(), assert, RelationalDBQueryResult::column(), RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), fuImplementationByIDQuery(), RelationalDBQueryResult::hasNext(), implementation, DataObject::integerValue(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and DataObject::stringValue().
Referenced by HDB::CachedHDBManager::createImplementationOfFU(), and fuByEntryID().
|
protectedvirtual |
Obtains implementation data of the RF that has the given ID and creates an RFImplementation instance of it.
id | ID of the RF entry. |
Reimplemented in HDB::CachedHDBManager.
Definition at line 4837 of file HDBManager.cc.
References addBlockImplementationFiles(), addDataPortsToImplementation(), addRFExternalPortsToImplementation(), addRFParametersToImplementation(), assert, DataObject::boolValue(), RelationalDBQueryResult::column(), RelationalDBQueryResult::data(), dbConnection_, hasColumn(), RelationalDBQueryResult::hasNext(), implementation, DataObject::integerValue(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), rfImplementationByIDQuery(), rfImplementationByIDQuery2(), DataObject::stringValue(), and RelationalDBQueryResult::UNKNOWN_INDEX.
Referenced by HDB::CachedHDBManager::createImplementationOfRF(), and rfByEntryID().
|
static |
Creates a new HDB to the given file.
file | The database file to be created. |
UnreachableStream | If the given file exists already or cannot be created for another reason. |
Definition at line 548 of file HDBManager.cc.
References assert, SQLite::close(), SQLite::connect(), CQ_BLOCK_SOURCE_FILE, CQ_BUS, CQ_COST_ESTIMATION_DATA, CQ_COST_FUNCTION_PLUGIN, CQ_FORMAT, CQ_FU, CQ_FU_ARCHITECTURE, CQ_FU_DATA_PORT, CQ_FU_EXT_PORT_PARAMETER_DEPENDENCY, CQ_FU_EXTERNAL_PORT, CQ_FU_IMPL_ENTRY_INDEX, CQ_FU_IMPLEMENTATION, CQ_FU_IMPLEMENTATION_PARAMETER, CQ_FU_PORT_MAP, CQ_FU_PORT_MAP_ARCH_INDEX, CQ_FU_SOURCE_FILE, CQ_IO_BINDING, CQ_IO_USAGE, CQ_OPCODE_MAP, CQ_OPERATION, CQ_OPERATION_PIPELINE, CQ_PIPELINE_RESOURCE, CQ_PIPELINE_RESOURCE_USAGE, CQ_RF, CQ_RF_ARCHITECTURE, CQ_RF_DATA_PORT, CQ_RF_EXT_PORT_PARAMETER_DEPENDENCY, CQ_RF_EXTERNAL_PORT, CQ_RF_IMPL_ENTRY_INDEX, CQ_RF_IMPLEMENTATION, CQ_RF_IMPLEMENTATION_PARAMETER, CQ_RF_SOURCE_FILE, CQ_SOCKET, RelationalDBConnection::DDLQuery(), debugLog, Exception::errorMessage(), FileSystem::fileIsCreatable(), and insertFileFormats().
Referenced by HDB::CachedHDBManager::createNew(), and main().
|
pure virtual |
Implemented in HDB::CachedHDBManager.
Referenced by CostDatabase::buildFunctionUnits(), and CostDatabase::buildRegisterFiles().
|
staticprivate |
Returns the string used to represent the given direction in HDB.
direction | The direction. |
Definition at line 5761 of file HDBManager.cc.
References BIDIR_DIRECTION, HDB::IN, IN_DIRECTION, HDB::OUT, and OUT_DIRECTION.
Referenced by addFUImplementation(), and addRFImplementation().
|
staticprivate |
Returns the format corresponding to the given string which is stored in the database.
formatString | The format string stored in the database. |
Definition at line 5714 of file HDBManager.cc.
References assert, formatString(), HDB::BlockImplementationFile::Verilog, VERILOG_FORMAT, VERILOG_SIM_FORMAT, HDB::BlockImplementationFile::Verilogsim, HDB::BlockImplementationFile::VHDL, VHDL_FORMAT, VHDL_SIM_FORMAT, and HDB::BlockImplementationFile::VHDLsim.
Referenced by addBlockImplementationFiles(), and addOperationImplementationResource().
std::string HDB::HDBManager::fileName | ( | ) | const |
Returns the file name of the HDB managed by this HDBManager.
Definition at line 612 of file HDBManager.cc.
References FileSystem::absolutePathOf(), and hdbFile_.
Referenced by HDB::HDBRegistry::addHDB(), ComponentImplementationSelector::addHDB(), DefaultICDecoderEstimator::delayOfBus(), DefaultICDecoderEstimator::delayOfSocket(), DefaultICDecoderEstimator::estimateICArea(), AutoSelectImplementationsDialog::findFUImplementations(), AutoSelectImplementationsDialog::findIUImplementations(), AutoSelectImplementationsDialog::findRFImplementations(), ComponentImplementationSelector::fuImplementations(), ComponentImplementationSelector::iuImplementations(), AddRFFromHDBDialog::loadHDB(), AddFUFromHDBDialog::loadHDB(), BlockImplementationFileDialog::onBrowse(), BlockImplementationFileDialog::onOK(), ComponentImplementationSelector::rfImplementations(), OperationImplementationResourceDialog::sanitize(), OperationImplementationDialog::sanitize(), and HDB::CachedHDBManager::validateCache().
|
static |
Returns the string used to represent the given file format in HDB.
format | The format. |
Definition at line 5737 of file HDBManager.cc.
References assert, HDB::BlockImplementationFile::Verilog, VERILOG_FORMAT, VERILOG_SIM_FORMAT, HDB::BlockImplementationFile::Verilogsim, HDB::BlockImplementationFile::VHDL, VHDL_FORMAT, VHDL_SIM_FORMAT, and HDB::BlockImplementationFile::VHDLsim.
Referenced by addBlockImplementationFileToHDB(), fileFormat(), OperationImplementationResourceDialog::onAddVerilogSimFile(), OperationImplementationResourceDialog::onAddVerilogSynFile(), OperationImplementationResourceDialog::onAddVhdlSimFile(), OperationImplementationResourceDialog::onAddVhdlSynFile(), and OperationImplementationResourceDialog::onOK().
|
virtual |
Creates an FUArchitecture instance of the FU architecture that has the given ID.
ID | The ID of the FU architecture. |
KeyNotFound | If the HDB does not have a FU architecture with the given ID. |
Reimplemented in HDB::CachedHDBManager.
Definition at line 2940 of file HDBManager.cc.
References __func__, addOperationPipelinesToFUArchitecture(), addPortsAndBindingsToFUArchitecture(), containsFUArchitecture(), and HWBlockArchitecture::setID().
Referenced by HDB::CachedHDBManager::fuArchitectureByID(), HDB::CachedHDBManager::fuArchitectureByIDConst(), HDBToHtml::fuArchToHtml(), fuByEntryID(), fuEntriesByArchitecture(), and AddFUFromHDBDialog::loadHDB().
|
staticprivate |
Creates an SQL query for getting the architecture of the FU entry that has the given ID.
The result set has all the fields of fu_architecture.
id | ID of the FU entry. |
Definition at line 5857 of file HDBManager.cc.
References Conversion::toString().
Returns the ID of the architecture of the given FU entry.
fuEntryID | ID of the FU entry. |
NotAvailable | If the FU entry does not have an architecture. |
Definition at line 4268 of file HDBManager.cc.
References __func__, assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), DataObject::isNull(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by addFUImplementation().
std::set< RowID > HDB::HDBManager::fuArchitectureIDs | ( | ) | const |
Returns a set of FU architecture IDs in the database.
Definition at line 2163 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), and RelationalDBConnection::query().
Referenced by SetFUArchitectureCmd::Do(), and AddFUFromHDBDialog::loadHDB().
std::set< RowID > HDB::HDBManager::fuArchitectureIDsByOperationSet | ( | const std::set< std::string > & | operationNames | ) | const |
Definition at line 2684 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), hdbFile_, DataObject::integerValue(), RelationalDBQueryResult::next(), and RelationalDBConnection::query().
Referenced by ComponentImplementationSelector::fuArchsByOpSetWithMinLatency().
Returns the FU entry that has the given ID.
id | The ID of the FU entry. |
Definition at line 2828 of file HDBManager.cc.
References __func__, assert, createCostFunctionOfFU(), createImplementationOfFU(), RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), fuArchitectureByID(), RelationalDBQueryResult::hasNext(), hdbFile_, implementation, DataObject::integerValue(), DataObject::isNull(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), HDB::FUEntry::setArchitecture(), HDB::HDBEntry::setCostFunction(), HDB::HDBEntry::setHDBFile(), HDB::HDBEntry::setID(), HDB::FUEntry::setImplementation(), and Conversion::toString().
Referenced by addFUImplementation(), ProGe::NetlistGenerator::addFUToNetlist(), CostDatabase::buildFunctionUnits(), ProGeTools::checkForSelectableFU(), Automagic::checkForSelectableFU(), ProGe::BlockSourceCopier::copyShared(), AddFUImplementationCmd::Do(), HDBEditorModifyCmd::Do(), CostEstimator::Estimator::fuCostFunctionPluginOfImplementation(), ImplementationTester::fuEntryFromHdb(), HDBToHtml::fuEntryToHtml(), HDBToHtml::fuImplToHtml(), ProGeTestBenchGenerator::generate(), ProGeScriptGenerator::getBlockOrder(), AddFUImplementationCmd::isEnabled(), PlatformIntegrator::loadFUExternalPorts(), BlockImplementationDialog::onHDBSelection(), setArchitectureForFU(), and unsetArchitectureForFU().
DataObject HDB::HDBManager::fuCostEstimationData | ( | const std::string & | valueName, |
RowID | implementationId, | ||
const std::string & | pluginName | ||
) | const |
Returns FU cost estimation data.
This version assumes that there's only one entry with given parameters.
Another version for fetching lists of data.
Refactor most of the code in *costEstimationData() functions to a helper function
valueName | Name of the value to fetch. |
implementationId | The ID of the FU entry. |
pluginName | Name of the cost estimation plugin that owns the data. |
KeyNotFound | If the HDB does not contain FU cost estimation data with the given arguments. |
Definition at line 3289 of file HDBManager.cc.
References __func__, assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by StrictMatchFUEstimator::estimateArea(), StrictMatchFUEstimator::estimateEnergy(), StrictMatchFUEstimator::estimateMaximumComputationDelay(), StrictMatchFUEstimator::estimatePortReadDelay(), and StrictMatchFUEstimator::estimatePortWriteDelay().
Returns a set of cost estimation data IDs which reference the give FU implementation.
fuImplID | ID of the FU implementation. |
Definition at line 6391 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by HDBToHtml::fuEntryToHtml(), and HDBToHtml::fuImplToHtml().
std::set< RowID > HDB::HDBManager::fuEntriesByArchitecture | ( | const TTAMachine::FunctionUnit & | fu | ) | const |
Returns a set of FU entry IDs that have a corresponding architecture with the given one.
The set may contain FU entry IDs that have ports with parametrized width while the given one has fixed width.
fu | The FU architecture. |
Definition at line 3040 of file HDBManager.cc.
References RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), fuArchitectureByID(), RelationalDBQueryResult::hasNext(), HWBlockArchitecture::id(), DataObject::integerValue(), isMatchingArchitecture(), TTAMachine::HWOperation::name(), RelationalDBQueryResult::next(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by ComponentImplementationSelector::fuImplementations(), and BlockImplementationDialog::onHDBSelection().
|
staticprivate |
Creates an SQL query for getting the FU entry that has the given ID.
The result set has fields {id, architecture, cost_function}.
id | ID of the entry. |
Definition at line 5781 of file HDBManager.cc.
References Conversion::toString().
Referenced by hasFUEntry().
|
private |
Tells whether the FU entry that has the given ID has an architecture.
id | ID of the FU entry. |
KeyNotFound | If the HDB does not contain a FU entry with the given ID. |
Definition at line 4097 of file HDBManager.cc.
References __func__, assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::isNull(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
Returns the ID of the FU entry that has the given implementation ID.
implID | The implementation ID. |
KeyNotFound | If there is no implementation by the given ID. |
Definition at line 2765 of file HDBManager.cc.
References __func__, assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by HDBEditorDeleteCmd::Do(), HDBEditorModifyCmd::Do(), HDBToHtml::fuImplToHtml(), and HDB::CachedHDBManager::removeFUImplementation().
std::set< RowID > HDB::HDBManager::fuEntryIDs | ( | ) | const |
Returns a set of FU entry IDs in the database.
Definition at line 2035 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), and RelationalDBConnection::query().
Referenced by CostDatabase::buildFunctionUnits(), ProGeTools::checkForSelectableFU(), Automagic::checkForSelectableFU(), and ImplementationTester::fuEntryIDs().
|
staticprivate |
Creates an SQL query for getting external port data of implementation of the FU that has the given ID.
The result table has fields {fu_external_port.name, fu_external_port.direction, fu_external_port.width_formula, fu_external_port.description}.
id | ID of the FU entry in HDB. |
Definition at line 6043 of file HDBManager.cc.
References Conversion::toString().
Referenced by addFUExternalPortsToImplementation().
|
staticprivate |
Creates an SQL query for getting FU implementation data of the FU that has the given ID.
The result table has fields {fu_implementation.id, fu_implementation.name, fu_implementation.opcode_port, fu_implementation.clk_port, fu_implementation.rst_port, fu_implementation.glock_port, fu_implementation.glock_req_port}.
id | ID of the FU entry in HDB. |
Definition at line 5962 of file HDBManager.cc.
References Conversion::toString().
Referenced by createImplementationOfFU().
|
staticprivate |
Creates an SQL qury for getting data port data of implementation of the FU that has the given ID.
The result table has fields {fu_port_map.name, fu_port_map.width_formula, fu_port_map.load_port, fu_port_map.guard_port}
id | ID of the FU entry in HDB. |
Definition at line 6016 of file HDBManager.cc.
References Conversion::toString().
Referenced by addDataPortsToImplementation().
|
staticprivate |
Creates an SQL query for getting the parameters of the implementation of the FU that has the given ID.
The result table has fields {name, type, value}.
id | ID of the FU implementation entry. |
Definition at line 6099 of file HDBManager.cc.
References Conversion::toString().
Referenced by addFUParametersToImplementation().
|
staticprivate |
Creates an SQL query for getting io binding data of port that has the given name.
The result table has fields {operation.name, io_binding.io_number}.
fuID | ID of the FU entry. |
portName | Name of the implemented port. |
Definition at line 6146 of file HDBManager.cc.
References Conversion::toString().
Referenced by resolveArchitecturePort().
|
staticprivate |
Creates an SQL query for getting the architectural ports and their operand bindings of the FU architecture that has the given ID.
The result table has fields {fu_data_port.id, fu_data_port.triggers, fu_data_port.sets-opcode, fu_data_port.guard_support, fu_data_port.width, operation.name, io_binding.io_number}
id | The ID of the FU architecture. |
Definition at line 5880 of file HDBManager.cc.
References Conversion::toString().
Referenced by addPortsAndBindingsToFUArchitecture().
|
staticprivate |
Creates an SQL query for getting the block source files of the FU entry that has the given ID.
The result table has fields {block_source_file.file, format.format}.
id | ID of the FU entry. |
Definition at line 6174 of file HDBManager.cc.
References Conversion::toString().
Referenced by addBlockImplementationFiles().
|
protected |
Returns used database connection.
Definition at line 6987 of file HDBManager.cc.
References dbConnection_.
Referenced by HDB::CachedHDBManager::costEstimationDataIDs().
|
private |
Tells whether the HDB has an Bus entry that has the given ID.
Definition at line 3980 of file HDBManager.cc.
References assert, busEntryByIDQuery(), dbConnection_, RelationalDBQueryResult::hasNext(), RelationalDBQueryResult::next(), and RelationalDBConnection::query().
Referenced by addCostEstimationData(), modifyCostEstimationData(), and removeBusEntry().
|
private |
Returns true if a table by name has a column by given name.
table | The table by name to search the column from. |
columnName | The name of the column to be searched. |
Definition at line 4342 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and DataObject::stringValue().
Referenced by addRFImplementation(), createImplementationOfRF(), and HDBManager().
|
private |
Tells whether the HDB has cost estimation data that has the given ID.
Definition at line 4035 of file HDBManager.cc.
References assert, dbConnection_, RelationalDBQueryResult::hasNext(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by modifyCostEstimationData().
|
private |
Tells whether the HDB has cost function plugin that has the given ID.
Definition at line 4064 of file HDBManager.cc.
References assert, dbConnection_, RelationalDBQueryResult::hasNext(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by modifyCostFunctionPlugin().
|
private |
Tells whether the HDB has an FU entry that has the given ID.
Definition at line 3924 of file HDBManager.cc.
References assert, dbConnection_, fuEntryByIDQuery(), RelationalDBQueryResult::hasNext(), RelationalDBQueryResult::next(), and RelationalDBConnection::query().
Referenced by addCostEstimationData(), addFUImplementation(), modifyCostEstimationData(), removeFUEntry(), setArchitectureForFU(), and unsetArchitectureForFU().
|
private |
Tells whether the HDB has an RF entry that has the given ID.
Definition at line 3952 of file HDBManager.cc.
References assert, dbConnection_, RelationalDBQueryResult::hasNext(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and rfEntryByIDQuery().
Referenced by addCostEstimationData(), addRFImplementation(), modifyCostEstimationData(), removeRFEntry(), and setArchitectureForRF().
|
private |
Tells whether the HDB has an Socket entry that has the given ID.
Definition at line 4008 of file HDBManager.cc.
References assert, dbConnection_, RelationalDBQueryResult::hasNext(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and socketEntryByIDQuery().
Referenced by addCostEstimationData(), modifyCostEstimationData(), and removeSocketEntry().
|
staticprivate |
Inserts the supported formats to the format table.
connection | The connection used when inserting the formats. |
Definition at line 5689 of file HDBManager.cc.
References assert, debugLog, Exception::errorMessage(), RelationalDBConnection::updateQuery(), VERILOG_FORMAT, and VHDL_FORMAT.
Referenced by createNew().
|
staticprivate |
Creates an SQL query for getting the IO usage data of pipelines of operations contained in the FU architecture that has the given ID.
The result table has fields {operation.name, io_usage.cycle, io_usage.io_number, io_usage.action}.
id | ID of the FU architecture in HDB. |
Definition at line 5908 of file HDBManager.cc.
References Conversion::toString().
Referenced by addOperationPipelinesToFUArchitecture().
|
staticprivate |
Checks whether the given FU has a mathing architecture with the given FU architecture instance.
fu | The function unit. |
arch | The FU architecture. |
Definition at line 5519 of file HDBManager.cc.
References HDB::FUArchitecture::architecture(), areCompatiblePipelines(), TTAMachine::FunctionUnit::hasOperation(), HDB::FUArchitecture::hasParameterizedWidth(), TTAMachine::HWOperation::io(), TTAMachine::HWOperation::isBound(), TTAMachine::FUPort::isOpcodeSetting(), TTAMachine::ExecutionPipeline::isResourceUsed(), TTAMachine::FUPort::isTriggering(), TTAMachine::HWOperation::latency(), TTAMachine::PipelineElement::name(), TTAMachine::HWOperation::name(), TTAMachine::Port::name(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), TTAMachine::FunctionUnit::operationPort(), TTAMachine::FunctionUnit::operationPortCount(), TTAMachine::HWOperation::pipeline(), TTAMachine::FunctionUnit::pipelineElement(), TTAMachine::FunctionUnit::pipelineElementCount(), TTAMachine::HWOperation::port(), TTAMachine::ExecutionPipeline::readOperands(), HDB::HDBManager::PipelineElementUsage::usage1, HDB::HDBManager::PipelineElementUsage::usage2, TTAMachine::BaseFUPort::width(), and TTAMachine::ExecutionPipeline::writtenOperands().
Referenced by fuEntriesByArchitecture().
|
virtual |
Updates cost estimation data in the HDB.
id | Row ID of the data to update. |
data | Updated data. |
Reimplemented in HDB::CachedHDBManager.
Definition at line 6999 of file HDBManager.cc.
References __func__, assert, CostEstimationData::busReference(), dbConnection_, debugLog, Exception::errorMessage(), CostEstimationData::fuReference(), hasBusEntry(), CostEstimationData::hasBusReference(), hasCostEstimationDataByID(), hasFUEntry(), CostEstimationData::hasFUReference(), CostEstimationData::hasName(), CostEstimationData::hasPluginID(), hasRFEntry(), CostEstimationData::hasRFReference(), hasSocketEntry(), CostEstimationData::hasSocketReference(), CostEstimationData::hasValue(), CostEstimationData::name(), CostEstimationData::pluginID(), CostEstimationData::rfReference(), CostEstimationData::socketReference(), DataObject::stringValue(), Conversion::toString(), RelationalDBConnection::updateQuery(), and CostEstimationData::value().
Referenced by HDB::CachedHDBManager::modifyCostEstimationData().
|
virtual |
Modifies cost estimation function plugin attributes.
id | RowID of the plugin to modify. |
plugin | Modified plugin (ID is ignored). |
InvalidData | Throws if the given plugin was invalid. |
KeyNotFound | Throws if no cost function plugin was found with given RowID. |
Reimplemented in HDB::CachedHDBManager.
Definition at line 7080 of file HDBManager.cc.
References __func__, assert, HDB::CostFunctionPlugin::COST_DECOMP, HDB::CostFunctionPlugin::COST_FU, HDB::CostFunctionPlugin::COST_ICDEC, COST_PLUGIN_TYPE_DECOMP, COST_PLUGIN_TYPE_FU, COST_PLUGIN_TYPE_ICDEC, COST_PLUGIN_TYPE_RF, HDB::CostFunctionPlugin::COST_RF, dbConnection_, debugLog, HDB::CostFunctionPlugin::description(), Exception::errorMessage(), hasCostFunctionPluginByID(), HDB::CostFunctionPlugin::name(), HDB::CostFunctionPlugin::pluginFilePath(), Conversion::toString(), HDB::CostFunctionPlugin::type(), and RelationalDBConnection::updateQuery().
Referenced by HDB::CachedHDBManager::modifyCostFunctionPlugin().
|
staticprivate |
Creates an SQL query for getting operation code data of the FU that has the given ID.
The result table has fields {operation.name, opcode_map.opcode}.
id | ID of the FU entry in HDB. |
Definition at line 5991 of file HDBManager.cc.
References Conversion::toString().
Referenced by addOpcodesToImplementation().
HDB::OperationImplementation HDB::HDBManager::OperationImplementationByID | ( | RowID | id | ) | const |
Returns OperationImplementation.
Definition at line 2248 of file HDBManager.cc.
References HDB::OperationImplementation::absBusDefFile, assert, HDB::OperationImplementationResource::count, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), HDB::OperationImplementation::id, HDB::OperationImplementation::implFileVerilog, HDB::OperationImplementation::implFileVhdl, HDB::OperationImplementation::initialImplFileVerilog, HDB::OperationImplementation::initialImplFileVhdl, DataObject::integerValue(), HDB::OperationImplementation::latency, HDB::OperationImplementation::name, RelationalDBQueryResult::next(), OperationImplementationResourceByID(), HDB::OperationImplementation::postOpImplFileVerilog, HDB::OperationImplementation::postOpImplFileVhdl, RelationalDBConnection::query(), HDB::OperationImplementation::resources, DataObject::stringValue(), RelationalDBConnection::tableExistsInDB(), HDB::BlockImplementationFile::Verilog, HDB::OperationImplementation::verilogGlobalSignals, HDB::OperationImplementation::verilogVariables, HDB::BlockImplementationFile::VHDL, HDB::OperationImplementation::vhdlGlobalSignals, and HDB::OperationImplementation::vhdlVariables.
Referenced by Automagic::createFUGeneratableOperationInfos(), ProGeTools::createFUGeneratableOperationInfos(), FUGen::createImplementationFiles(), HDBToHtml::OperationImplementationToHtml(), and FUGen::parseOperations().
std::set< RowID > HDB::HDBManager::OperationImplementationIDs | ( | ) | const |
Returns a set of Operation Implementation Resource IDs in the database.
Definition at line 2193 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), and RelationalDBConnection::query().
Referenced by Automagic::createFUGeneratableOperationInfos(), and ProGeTools::createFUGeneratableOperationInfos().
HDB::OperationImplementationResource HDB::HDBManager::OperationImplementationResourceByID | ( | RowID | id | ) | const |
Returns OperationImplementationResource.
Definition at line 2410 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), HDB::OperationImplementationResource::id, HDB::OperationImplementationResource::ipxact, HDB::OperationImplementationResource::name, RelationalDBQueryResult::next(), RelationalDBConnection::query(), HDB::OperationImplementationResource::simFiles, HDB::OperationImplementationResource::simFormats, DataObject::stringValue(), HDB::OperationImplementationResource::synFiles, HDB::OperationImplementationResource::synFormats, VERILOG_FORMAT, VERILOG_SIM_FORMAT, VHDL_FORMAT, and VHDL_SIM_FORMAT.
Referenced by OperationImplementationDialog::addAvailableResourcesToList(), OperationImplementationByID(), and HDBToHtml::OperationImplementationResourceToHtml().
std::set< RowID > HDB::HDBManager::OperationImplementationResourceIDs | ( | ) | const |
Returns a set of Operation Implementation IDs in the database.
Definition at line 2221 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), and RelationalDBConnection::query().
Referenced by OperationImplementationDialog::addAvailableResourcesToList().
|
virtual |
Removes the Bus entry that has the given ID from the database.
The entry is removed entirely, meaning that also cost estimation data of that entry are removed.
id | The ID of the Bus entry. |
Reimplemented in HDB::CachedHDBManager.
Definition at line 3418 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), hasBusEntry(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), removeCostEstimationData(), Conversion::toString(), and RelationalDBConnection::updateQuery().
Referenced by HDBEditorDeleteCmd::Do(), and HDB::CachedHDBManager::removeBusEntry().
|
virtual |
Removes the cost estimation data that has the given ID.
id | ID of the cost estimation data. |
Reimplemented in HDB::CachedHDBManager.
Definition at line 5479 of file HDBManager.cc.
References assert, dbConnection_, debugLog, Exception::errorMessage(), Conversion::toString(), and RelationalDBConnection::updateQuery().
Referenced by removeBusEntry(), HDB::CachedHDBManager::removeCostEstimationData(), removeFUEntry(), and removeSocketEntry().
|
virtual |
Removes the CostFunctionPlugin that has the given ID.
pluginID | ID of the cost plugin. |
Reimplemented in HDB::CachedHDBManager.
Definition at line 684 of file HDBManager.cc.
References assert, RelationalDBConnection::beginTransaction(), RelationalDBConnection::commit(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBConnection::rollback(), Conversion::toString(), and RelationalDBConnection::updateQuery().
Referenced by AddCostFunctionPluginCmd::Do(), HDBEditorDeleteCmd::Do(), and HDB::CachedHDBManager::removeCostFunctionPlugin().
|
virtual |
Removes the FU architecture that has the given ID. The architecture is removed only it is not used by any FU entry. Otherwise an exception is thrown.
archID | ID of the FU architecture. |
InvalidData | If the architecture cannot be removed since it is used by some FU entry. |
Reimplemented in HDB::CachedHDBManager.
Definition at line 941 of file HDBManager.cc.
References __func__, assert, RelationalDBConnection::beginTransaction(), canRemoveFUArchitecture(), RelationalDBConnection::commit(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBConnection::rollback(), Conversion::toString(), and RelationalDBConnection::updateQuery().
Referenced by HDBEditorDeleteCmd::Do(), and HDB::CachedHDBManager::removeFUArchitecture().
|
virtual |
Removes the FU entry that has the given ID from the database.
The entry is removed entirely, meaning that all also FU implementation and cost estimation data of that entry are removed.
id | The ID of the FU entry. |
Reimplemented in HDB::CachedHDBManager.
Definition at line 1039 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), hasFUEntry(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), removeCostEstimationData(), removeFUImplementation(), Conversion::toString(), and RelationalDBConnection::updateQuery().
Referenced by HDBEditorDeleteCmd::Do(), and HDB::CachedHDBManager::removeFUEntry().
|
virtual |
Removes the given FU implementation from the database.
implID | ID of the FU implementation. |
Reimplemented in HDB::CachedHDBManager.
Definition at line 1325 of file HDBManager.cc.
References assert, RelationalDBConnection::beginTransaction(), RelationalDBConnection::commit(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBConnection::rollback(), Conversion::toString(), and RelationalDBConnection::updateQuery().
Referenced by HDBEditorModifyCmd::Do(), removeFUEntry(), and HDB::CachedHDBManager::removeFUImplementation().
void HDB::HDBManager::removeOperationImplementation | ( | RowID | id | ) |
Remove Operation Implemententation from DB.
Definition at line 2622 of file HDBManager.cc.
References RelationalDBQueryResult::data(), dbConnection_, RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and RelationalDBConnection::updateQuery().
Referenced by HDBEditorDeleteCmd::Do().
void HDB::HDBManager::removeOperationImplementationResource | ( | RowID | id | ) |
Remove Operation Implemententation Resource from DB.
Definition at line 2658 of file HDBManager.cc.
References RelationalDBQueryResult::data(), dbConnection_, RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and RelationalDBConnection::updateQuery().
Referenced by HDBEditorDeleteCmd::Do().
|
virtual |
Removes the RF architecture that has the given ID.
archID | ID of the RF architecture. |
InvalidData | If the RF architecture cannot be removed. |
Reimplemented in HDB::CachedHDBManager.
Definition at line 1535 of file HDBManager.cc.
References __func__, assert, canRemoveRFArchitecture(), dbConnection_, debugLog, Exception::errorMessage(), Conversion::toString(), and RelationalDBConnection::updateQuery().
Referenced by HDBEditorDeleteCmd::Do(), and HDB::CachedHDBManager::removeRFArchitecture().
|
virtual |
Removes the RF entry that has the given ID.
Cost estimation data and implementation of the entry are removed too.
id | ID of the RF entry. |
Reimplemented in HDB::CachedHDBManager.
Definition at line 1583 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), hasRFEntry(), DataObject::integerValue(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), removeRFImplementation(), Conversion::toString(), and RelationalDBConnection::updateQuery().
Referenced by HDBEditorDeleteCmd::Do(), and HDB::CachedHDBManager::removeRFEntry().
|
virtual |
Removes the RF implementation that has the given ID.
implID | ID of the RF implementation. |
Reimplemented in HDB::CachedHDBManager.
Definition at line 1808 of file HDBManager.cc.
References assert, RelationalDBConnection::beginTransaction(), RelationalDBConnection::commit(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBConnection::rollback(), RelationalDBConnection::tableExistsInDB(), Conversion::toString(), and RelationalDBConnection::updateQuery().
Referenced by HDBEditorModifyCmd::Do(), removeRFEntry(), and HDB::CachedHDBManager::removeRFImplementation().
|
virtual |
Removes the Socket entry that has the given ID from the database.
The entry is removed entirely, meaning that also cost estimation data of that entry are removed.
id | The ID of the Socket entry. |
Reimplemented in HDB::CachedHDBManager.
Definition at line 3631 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), hasSocketEntry(), DataObject::integerValue(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), removeCostEstimationData(), Conversion::toString(), and RelationalDBConnection::updateQuery().
Referenced by HDBEditorDeleteCmd::Do(), and HDB::CachedHDBManager::removeSocketEntry().
|
private |
Resolves what is the architectural port corresponding to the given implemented port.
architecture | The architecture of the FU. |
id | ID of the FU entry in the database. |
implementedPort | Name of the implemented port to resolve. |
Definition at line 4922 of file HDBManager.cc.
References HDB::FUArchitecture::architecture(), assert, RelationalDBQueryResult::column(), RelationalDBQueryResult::data(), dbConnection_, fuPortBindingByNameQuery(), RelationalDBQueryResult::hasNext(), TTAMachine::FunctionUnit::hasOperation(), DataObject::integerValue(), TTAMachine::Port::name(), RelationalDBQueryResult::next(), TTAMachine::FunctionUnit::operation(), TTAMachine::HWOperation::port(), RelationalDBConnection::query(), DataObject::stringValue(), and RelationalDBQueryResult::UNKNOWN_INDEX.
Referenced by addDataPortsToImplementation().
|
staticprivate |
Creates an SQL query for getting resource usage data of pipelines of the FU architecture that has the given ID.
The result table has fields {operation.name, pipeline_resource_usage.cycle, pipeline_resource.id}
id | ID of the FU architecture in HDB. |
Definition at line 5933 of file HDBManager.cc.
References Conversion::toString().
Referenced by addOperationPipelinesToFUArchitecture().
|
virtual |
Creates an RFArchitecture instance of the RF architecture that has the given ID.
id | The ID of the RF architecture. |
KeyNotFound | If the HDB does not contain RF architecture with the given ID. |
Reimplemented in HDB::CachedHDBManager.
Definition at line 2963 of file HDBManager.cc.
References __func__, assert, DataObject::boolValue(), RelationalDBQueryResult::column(), containsRFArchitecture(), RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), DataObject::isNull(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), rfArchitectureByIDQuery(), HWBlockArchitecture::setID(), HDB::RFArchitecture::setSize(), and HDB::RFArchitecture::setWidth().
Referenced by AddIUFromHDBDialog::loadHDB(), AddRFFromHDBDialog::loadHDB(), HDB::CachedHDBManager::rfArchitectureByID(), HDB::CachedHDBManager::rfArchitectureByIDConst(), HDBToHtml::rfArchToHtml(), and rfByEntryID().
|
staticprivate |
Creates an SQL query for getting the architecture data of the RF architecture that has the given ID.
The result table has all the fields of rf_architecture table.
id | ID of the RF architecture. |
Definition at line 6198 of file HDBManager.cc.
References Conversion::toString().
Referenced by rfArchitectureByID().
Returns the ID of the architecture of the given RF entry.
rfEntryID | ID of the RF entry. |
NotAvailable | If the RF entry does not have an architecture. |
Definition at line 4305 of file HDBManager.cc.
References __func__, assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), DataObject::isNull(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
std::set< RowID > HDB::HDBManager::rfArchitectureIDs | ( | ) | const |
Returns a set of RF architecture IDs in the database.
Definition at line 2734 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), and RelationalDBConnection::query().
Referenced by SetRFArchitectureCmd::Do(), AddIUFromHDBDialog::loadHDB(), and AddRFFromHDBDialog::loadHDB().
Returns the RF entry that has the given ID.
id | The ID of the RF entry. |
KeyNotFound | If the HDB does not contain an RF entry with the given ID. |
Definition at line 2885 of file HDBManager.cc.
References __func__, assert, createCostFunctionOfRF(), createImplementationOfRF(), RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), hdbFile_, implementation, DataObject::integerValue(), DataObject::isNull(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), rfArchitectureByID(), HDB::RFEntry::setArchitecture(), HDB::HDBEntry::setCostFunction(), HDB::HDBEntry::setHDBFile(), HDB::HDBEntry::setID(), HDB::RFEntry::setImplementation(), and Conversion::toString().
Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), addRFImplementation(), CostDatabase::buildRegisterFiles(), ProGeTools::checkForSelectableIU(), Automagic::checkForSelectableIU(), ProGeTools::checkForSelectableRF(), Automagic::checkForSelectableRF(), ProGe::ProcessorGenerator::checkIULatencies(), ProGe::BlockSourceCopier::copyBaseRFFiles(), HDBEditorModifyCmd::Do(), AddRFImplementationCmd::Do(), ProGeScriptGenerator::getBlockOrder(), AddRFImplementationCmd::isEnabled(), BlockImplementationDialog::onHDBSelection(), CostEstimator::Estimator::rfCostFunctionPluginOfImplementation(), ImplementationTester::rfEntryFromHdb(), HDBToHtml::rfEntryToHtml(), HDBToHtml::rfImplToHtml(), and setArchitectureForRF().
DataObject HDB::HDBManager::rfCostEstimationData | ( | const std::string & | valueName, |
RowID | implementationId, | ||
const std::string & | pluginName | ||
) | const |
Returns RF cost estimation data.
This version assumes that there's only one entry with given parameters.
valueName | Name of the value to fetch. |
implementationId | The ID of the RF entry. |
pluginName | Name of the cost estimation plugin that owns the data. |
KeyNotFound | If the HDB does not contain RF cost estimation data with the given arguments. |
Definition at line 3345 of file HDBManager.cc.
References __func__, assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by StrictMatchRFEstimator::estimateArea(), StrictMatchRFEstimator::estimateEnergy(), StrictMatchRFEstimator::estimateMaximumComputationDelay(), StrictMatchRFEstimator::estimatePortReadDelay(), and StrictMatchRFEstimator::estimatePortWriteDelay().
Returns a set of cost estimation data IDs which reference the give RF implementation.
rfImplID | ID of the RF implementation. |
Definition at line 6432 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by HDBToHtml::rfEntryToHtml(), and HDBToHtml::rfImplToHtml().
std::set< RowID > HDB::HDBManager::rfEntriesByArchitecture | ( | int | readPorts, |
int | writePorts, | ||
int | bidirPorts, | ||
int | maxReads, | ||
int | maxWrites, | ||
int | latency, | ||
bool | guardSupport, | ||
int | guardLatency = 0 , |
||
int | width = 0 , |
||
int | size = 0 , |
||
bool | zeroRegister = false |
||
) | const |
Returns a set of RF entry IDs that have the described architecture.
In case that size or width is given as a parameter are also the RF entries with a parameterized width or size returned as are the entries with matched width and/or size.
readPorts | The number of read ports. |
writePorts | The number of write ports. |
bidirPorts | The number of bidirectional ports. |
maxRead | The (minimum) max reads value. |
latency | The exact latency. |
guardSupport | Guard support. |
guardLatency | The guard latency. |
width | The bit withd of the register file. |
size | The number of registers in the register file. |
zeroRegister | zero register of the register file |
Definition at line 3133 of file HDBManager.cc.
References RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by ComponentImplementationSelector::iuImplementations(), BlockImplementationDialog::onHDBSelection(), and ComponentImplementationSelector::rfImplementations().
|
staticprivate |
Creates an SQL query for getting the RF entry that has the given ID.
The result set has fields {id, architecture, cost_function}.
id | ID of the entry. |
Definition at line 5800 of file HDBManager.cc.
References Conversion::toString().
Referenced by hasRFEntry().
|
private |
Tells whether the RF entry that has the given ID has an architecture.
id | ID of the RF entry. |
KeyNotFound | If the HDB does not contain a RF entry with the given ID. |
Definition at line 4129 of file HDBManager.cc.
References __func__, assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::isNull(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
Returns the ID of the RF entry that has the given implementation ID.
implID | The implementation ID. |
KeyNotFound | If there is no implementation by the given ID. |
Definition at line 2796 of file HDBManager.cc.
References __func__, assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by HDBEditorDeleteCmd::Do(), HDBEditorModifyCmd::Do(), HDB::CachedHDBManager::removeRFImplementation(), and HDBToHtml::rfImplToHtml().
std::set< RowID > HDB::HDBManager::rfEntryIDs | ( | ) | const |
Returns a set of RF entry IDs in the database.
Definition at line 2067 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), and RelationalDBConnection::query().
Referenced by CostDatabase::buildRegisterFiles(), ProGeTools::checkForSelectableIU(), Automagic::checkForSelectableIU(), Automagic::checkForSelectableRF(), ProGeTools::checkForSelectableRF(), and ImplementationTester::rfEntryIDs().
|
staticprivate |
Creates an SQL query for getting external port data of implementation of the RF that has the given ID.
The result table has fields {rf_external_port.name, rf_external_port.direction, rf_external_port.width_formula, rf_external_port.description}.
id | ID of the RF entry in HDB. |
Definition at line 6072 of file HDBManager.cc.
References Conversion::toString().
Referenced by addRFExternalPortsToImplementation().
|
staticprivate |
Creates an SQL query for getting the implementation of the RF entry that has the given ID.
The result table has fields {id, name, size_param, width_param, clk_port, rst_port, glock_port, guard_port}.
id | The ID of the RF entry. |
Definition at line 6219 of file HDBManager.cc.
References Conversion::toString().
Referenced by createImplementationOfRF().
|
staticprivate |
Same as rfImplementationByIDQuery() bus has additional field for separate address cycle.
The result table has fields {id, name, size_param, width_param, clk_port, rst_port, glock_port, guard_port, sac_param}.
id | The ID of the RF entry. |
Definition at line 6246 of file HDBManager.cc.
References Conversion::toString().
Referenced by createImplementationOfRF().
|
staticprivate |
Creates an SQL query for getting the data ports of the implementation of the RF entry that has the given ID.
The result table has fields {name, direction, load_port, opcode_port, opcode_port_width_formula}.
id | ID of the RF entry. |
Definition at line 6274 of file HDBManager.cc.
References Conversion::toString().
Referenced by addDataPortsToImplementation().
|
staticprivate |
Creates an SQL query for getting the parameters of the implementation of the RF that has the given ID.
The result table has fields {name, type, value}.
id | ID of the RF entry. |
Definition at line 6122 of file HDBManager.cc.
References Conversion::toString().
Referenced by addRFParametersToImplementation().
|
staticprivate |
Creates an SQL query for getting the block implementation files of the RF entry that has the given ID.
The result table has fields {block_source_file.file, format.format}.
id | ID of the RF entry. |
Definition at line 6300 of file HDBManager.cc.
References Conversion::toString().
Referenced by addBlockImplementationFiles().
Sets the given architecture for the given FU entry.
fuID | ID of the FU entry. |
archID | ID of the FU architecture. |
InvalidData | If the FU entry has an implementation already or if the HDB does not have FU or architecture by the given ID. |
Definition at line 1401 of file HDBManager.cc.
References __func__, assert, containsFUArchitecture(), dbConnection_, debugLog, Exception::errorMessage(), fuByEntryID(), hasFUEntry(), HDB::FUEntry::hasImplementation(), Conversion::toString(), and RelationalDBConnection::updateQuery().
Referenced by AddFUImplementationCmd::Do(), and SetFUArchitectureCmd::Do().
Sets architecture for an RF entry.
rfID | ID of the RF entry. |
archID | ID of the RF architecture to set. |
InvalidData | If the database does not contain the given IDs or if the RF entry has an architecture already. |
Definition at line 1895 of file HDBManager.cc.
References __func__, assert, containsRFArchitecture(), dbConnection_, debugLog, Exception::errorMessage(), HDB::RFEntry::hasArchitecture(), hasRFEntry(), rfByEntryID(), Conversion::toString(), and RelationalDBConnection::updateQuery().
Referenced by AddRFImplementationCmd::Do(), and SetRFArchitectureCmd::Do().
Sets the given cost function plugin for the given FU entry.
fuID | ID of the FU entry. |
pluginID | ID of the cost function plugin. |
Definition at line 1950 of file HDBManager.cc.
References assert, dbConnection_, debugLog, Exception::errorMessage(), Conversion::toString(), and RelationalDBConnection::updateQuery().
Referenced by SetCostFunctionPluginCmd::Do().
Sets the given cost function plugin for the given RF entry.
rfID | ID of the RF entry. |
pluginID | ID of the cost function plugin. |
Definition at line 1993 of file HDBManager.cc.
References assert, dbConnection_, debugLog, Exception::errorMessage(), Conversion::toString(), and RelationalDBConnection::updateQuery().
Referenced by SetCostFunctionPluginCmd::Do().
DataObject HDB::HDBManager::socketCostEstimationData | ( | const std::string & | valueName, |
RowID | socketID, | ||
const std::string & | pluginName | ||
) | const |
Returns socket cost estimation data.
This version assumes that there's only one entry with given parameters.
valueName | Name of the value to fetch. |
socketID | The ID of the socket entry. |
pluginName | Name of the cost estimation plugin that owns the data. |
KeyNotFound | If the HDB does not contain socket cost estimation data with the given arguments. |
Definition at line 3718 of file HDBManager.cc.
References __func__, assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by DefaultICDecoderEstimator::delayOfSocket().
Returns a set of cost estimation data IDs which reference the given socket entry.
socketID | ID of the socket entry. |
Definition at line 6473 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
Referenced by HDBToHtml::socketEntryToHtml().
HDBManager::DataObjectList * HDB::HDBManager::socketCostEstimationDataList | ( | const std::string & | valueName, |
RowID | socketID, | ||
const std::string & | pluginName | ||
) | const |
Returns socket cost estimation data.
valueName | Name of the value to fetch. |
socketID | The ID of the socket entry. |
pluginName | Name of the cost estimation plugin that owns the data. |
KeyNotFound | If the HDB does not contain socket cost estimation data with the given arguments. |
Definition at line 3772 of file HDBManager.cc.
References __func__, assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), RelationalDBQueryResult::next(), RelationalDBConnection::query(), and Conversion::toString().
|
staticprivate |
Creates an SQL query for getting the Socket entry that has the given ID.
The result set has fields {id}.
id | ID of the entry. |
Definition at line 5838 of file HDBManager.cc.
References Conversion::toString().
Referenced by hasSocketEntry().
std::set< RowID > HDB::HDBManager::socketEntryIDs | ( | ) | const |
Returns a set of Socket entry IDs in the database.
Definition at line 2131 of file HDBManager.cc.
References assert, RelationalDBQueryResult::data(), dbConnection_, debugLog, Exception::errorMessage(), RelationalDBQueryResult::hasNext(), DataObject::integerValue(), RelationalDBQueryResult::next(), and RelationalDBConnection::query().
Referenced by CostDatabase::buildSockets().
void HDB::HDBManager::unsetArchitectureForFU | ( | RowID | fuID | ) | const |
Unsets the architecture of the given FU entry.
fuID | ID of the FU entry. |
InvalidData | If the HDB does not contain the given FU entry or if the FU entry has an implementation. |
Definition at line 1432 of file HDBManager.cc.
References __func__, assert, dbConnection_, debugLog, Exception::errorMessage(), fuByEntryID(), hasFUEntry(), HDB::FUEntry::hasImplementation(), Conversion::toString(), and RelationalDBConnection::updateQuery().
Referenced by SetFUArchitectureCmd::Do().
void HDB::HDBManager::unsetArchitectureForRF | ( | RowID | rfID | ) | const |
Unsets architecture of the given RF entry.
rfID | ID of the RF entry. |
Definition at line 1930 of file HDBManager.cc.
References assert, dbConnection_, debugLog, Exception::errorMessage(), Conversion::toString(), and RelationalDBConnection::updateQuery().
Referenced by SetRFArchitectureCmd::Do().
void HDB::HDBManager::unsetCostFunctionPluginForFU | ( | RowID | fuID | ) | const |
Unsets cost function plugin of the given FU entry.
fuID | ID of the FU entry. |
Definition at line 1971 of file HDBManager.cc.
References assert, dbConnection_, debugLog, Exception::errorMessage(), Conversion::toString(), and RelationalDBConnection::updateQuery().
Referenced by SetCostFunctionPluginCmd::Do().
void HDB::HDBManager::unsetCostFunctionPluginForRF | ( | RowID | rfID | ) | const |
Unsets cost function plugin of the given RF entry.
rfID | ID of the RF entry. |
Definition at line 2014 of file HDBManager.cc.
References assert, dbConnection_, debugLog, Exception::errorMessage(), Conversion::toString(), and RelationalDBConnection::updateQuery().
Referenced by SetCostFunctionPluginCmd::Do().
|
friend |
Definition at line 84 of file HDBManager.hh.
|
private |
Handle to the database.
Definition at line 400 of file HDBManager.hh.
Referenced by HDBManager(), and ~HDBManager().
|
private |
Handle to the database connection.
Definition at line 402 of file HDBManager.hh.
Referenced by addBlockImplementationFiles(), addBlockImplementationFileToHDB(), addBooleanColumn(), addBusCostEstimationData(), addBusEntry(), addCostEstimationData(), addCostFunctionPlugin(), addDataPortsToImplementation(), addFUArchitecture(), addFUCostEstimationData(), addFUEntry(), addFUExternalPortsToImplementation(), addFUImplementation(), addFUParametersToImplementation(), addOpcodesToImplementation(), addOperationImplementation(), addOperationImplementationResource(), addOperationPipelinesToFUArchitecture(), addPortsAndBindingsToFUArchitecture(), addRFArchitecture(), addRFCostEstimationData(), addRFEntry(), addRFExternalPortsToImplementation(), addRFImplementation(), addRFParametersToImplementation(), addSocketCostEstimationData(), addSocketEntry(), blockSourceFile(), busCostEstimationData(), busCostEstimationDataIDs(), busCostEstimationDataList(), busEntryIDs(), canRemoveFUArchitecture(), canRemoveRFArchitecture(), containsFUArchitecture(), containsImplementationFile(), containsOperation(), containsRFArchitecture(), costEstimationData(), costEstimationDataIDs(), costEstimationDataValue(), costFunctionPluginByID(), costFunctionPluginDataIDs(), costFunctionPluginIDs(), createCostFunctionOfFU(), createCostFunctionOfRF(), createImplementationOfFU(), createImplementationOfRF(), fuArchitectureID(), fuArchitectureIDs(), fuArchitectureIDsByOperationSet(), fuByEntryID(), fuCostEstimationData(), fuCostEstimationDataIDs(), fuEntriesByArchitecture(), fuEntryHasArchitecture(), fuEntryIDOfImplementation(), fuEntryIDs(), getDBConnection(), hasBusEntry(), hasColumn(), hasCostEstimationDataByID(), hasCostFunctionPluginByID(), hasFUEntry(), hasRFEntry(), hasSocketEntry(), HDBManager(), modifyCostEstimationData(), modifyCostFunctionPlugin(), OperationImplementationByID(), OperationImplementationIDs(), OperationImplementationResourceByID(), OperationImplementationResourceIDs(), removeBusEntry(), removeCostEstimationData(), removeCostFunctionPlugin(), removeFUArchitecture(), removeFUEntry(), removeFUImplementation(), removeOperationImplementation(), removeOperationImplementationResource(), removeRFArchitecture(), removeRFEntry(), removeRFImplementation(), removeSocketEntry(), resolveArchitecturePort(), rfArchitectureByID(), rfArchitectureID(), rfArchitectureIDs(), rfByEntryID(), rfCostEstimationData(), rfCostEstimationDataIDs(), rfEntriesByArchitecture(), rfEntryHasArchitecture(), rfEntryIDOfImplementation(), rfEntryIDs(), setArchitectureForFU(), setArchitectureForRF(), setCostFunctionPluginForFU(), setCostFunctionPluginForRF(), socketCostEstimationData(), socketCostEstimationDataIDs(), socketCostEstimationDataList(), socketEntryIDs(), unsetArchitectureForFU(), unsetArchitectureForRF(), unsetCostFunctionPluginForFU(), unsetCostFunctionPluginForRF(), and ~HDBManager().
|
private |
The HDB file to manager.
Definition at line 404 of file HDBManager.hh.
Referenced by fileName(), fuArchitectureIDsByOperationSet(), fuByEntryID(), and rfByEntryID().
|
staticprivate |
Unique instance of the HDBManager.
Definition at line 406 of file HDBManager.hh.