Go to the documentation of this file.
35 #ifndef TTA_HDB_MANAGER_HH
36 #define TTA_HDB_MANAGER_HH
57 class PipelineElement;
66 class FUImplementation;
67 class RFImplementation;
68 class CostFunctionPlugin;
88 static void createNew(
const std::string& file);
151 const std::set<std::string>& operationNames)
const;
177 int guardLatency = 0,
180 bool zeroRegister =
false)
const;
183 const std::string& valueName,
const std::string& pluginName)
const;
189 const std::string& valueName,
190 const std::string& value,
191 RowID pluginID)
const;
195 const std::string& valueName,
196 const std::string& value,
197 RowID pluginID)
const;
200 const std::string& valueName,
RowID implementationId,
201 const std::string& pluginName)
const;
204 const std::string& valueName,
RowID implementationId,
205 const std::string& pluginName)
const;
212 const std::string& valueName,
213 const std::string& value,
214 RowID pluginID)
const;
217 const std::string& valueName,
RowID busID,
218 const std::string& pluginName)
const;
221 const std::string& valueName,
RowID implementationId,
222 const std::string& pluginName)
const;
229 const std::string& valueName,
230 const std::string& value,
231 RowID pluginID)
const;
234 const std::string& valueName,
RowID socketID,
235 const std::string& pluginName)
const;
238 const std::string& valueName,
RowID implementationID,
239 const std::string& pluginName)
const;
255 bool useCompiledQueries =
false,
283 short int* queryHash = NULL,
284 bool createBindableQuery =
false)
const;
292 std::set<const TTAMachine::PipelineElement*>
usage1;
293 std::set<const TTAMachine::PipelineElement*>
usage2;
314 const std::string& table,
const std::string& columnName)
const;
316 const std::string& table,
const std::string& newcolumn);
330 const std::string& implementedPort)
const;
333 RowID entryID)
const;
337 RowID entryID)
const;
340 RowID entryID)
const;
343 RowID entryID)
const;
346 RowID entryID)
const;
349 RowID entryID)
const;
352 RowID entryID)
const;
355 RowID entryID)
const;
358 RowID entryID)
const;
363 std::string& query)
const;
389 const std::string& portName);
static std::string formatString(BlockImplementationFile::Format format)
void addPortsAndBindingsToFUArchitecture(FUArchitecture &architecture, RowID id) const
void removeOperationImplementationResource(RowID id)
void createCostEstimatioDataIdsQuery(const CostEstimationData &match, std::string *query, RelationalDBQueryResult *compiledQuery=NULL, short int *queryHash=NULL, bool createBindableQuery=false) const
virtual FUArchitecture * fuArchitectureByID(RowID id) const
static std::string fuImplementationByIDQuery(RowID id)
RowID addCostFunctionPlugin(const CostFunctionPlugin &plugin) const
RowID addFUImplementation(const FUEntry &entry) const
RowID addFUCostEstimationData(RowID fuID, const std::string &valueName, const std::string &value, RowID pluginID) const
DataObjectList * busCostEstimationDataList(const std::string &valueName, RowID implementationId, const std::string &pluginName) const
static std::string fuExternalPortsByIDQuery(RowID id)
static std::string rfImplementationDataPortsByIDQuery(RowID id)
bool hasSocketEntry(RowID id) const
static std::string rfSourceFilesByIDQuery(RowID id)
static std::string directionString(HDB::Direction direction)
virtual void removeFUEntry(RowID id) const
RelationalDBConnection * dbConnection_
Handle to the database connection.
static std::string busEntryByIDQuery(RowID id)
static std::string rfImplementationByIDQuery2(RowID id)
IDF::MachineImplementation * implementation
the implementation definition of the estimated processor
RowID addRFArchitecture(const RFArchitecture &architecture) const
std::set< RowID > costFunctionPluginIDs() const
RowID addSocketEntry() const
void removeOperationImplementation(RowID id)
std::set< RowID > costFunctionPluginDataIDs(RowID pluginID) const
std::vector< PipelineElementUsage > PipelineElementUsageTable
Format
Format of the file.
virtual void removeBusEntry(RowID id) const
RowID addFUArchitecture(const FUArchitecture &architecture) const
static std::string rfExternalPortsByIDQuery(RowID id)
static std::string fuPortsAndBindingsByIDQuery(RowID id)
virtual void removeRFEntry(RowID id) const
virtual void removeFUImplementation(RowID implementationID) const
RowID addRFCostEstimationData(RowID rfID, const std::string &valueName, const std::string &value, RowID pluginID) const
int RowID
Type definition of row ID in relational databases.
bool hasCostFunctionPluginByID(RowID id) const
void addOperationImplementation(const OperationImplementation &operation)
DataObjectList * socketCostEstimationDataList(const std::string &valueName, RowID implementationID, const std::string &pluginName) const
RowID addBusCostEstimationData(RowID busID, const std::string &valueName, const std::string &value, RowID pluginID) const
OperationImplementationResource OperationImplementationResourceByID(RowID id) const
DataObject socketCostEstimationData(const std::string &valueName, RowID socketID, const std::string &pluginName) const
bool hasColumn(const std::string &table, const std::string &columnName) const
void addBlockImplementationFileToHDB(const BlockImplementationFile &file) const
CostEstimationData costEstimationData(RowID id) const
CostFunctionPlugin * costFunctionPluginByID(RowID pluginID) const
bool hasCostEstimationDataByID(RowID id) const
bool containsImplementationFile(const std::string &pathToFile) const
void unsetCostFunctionPluginForFU(RowID fuID) const
std::string hdbFile_
The HDB file to manager.
std::set< RowID > fuArchitectureIDsByOperationSet(const std::set< std::string > &operationNames) const
virtual void removeSocketEntry(RowID id) const
RowID rfEntryIDOfImplementation(RowID implID) const
DataObject busCostEstimationData(const std::string &valueName, RowID busID, const std::string &pluginName) const
bool containsOperation(const std::string &opName) const
DataObject rfCostEstimationData(const std::string &valueName, RowID implementationId, const std::string &pluginName) const
bool hasBusEntry(RowID id) const
virtual void modifyCostEstimationData(RowID id, const CostEstimationData &data)
void addBlockImplementationFiles(FUImplementation &implementation, RowID entryID) const
CostFunctionPlugin * createCostFunctionOfFU(RowID id) const
RowID addSocketCostEstimationData(RowID socketID, const std::string &valueName, const std::string &value, RowID pluginID) const
std::string resolveArchitecturePort(const FUArchitecture &architecture, RowID entryID, const std::string &implementedPort) const
std::set< RowID > OperationImplementationResourceIDs() const
static void insertFileFormats(RelationalDBConnection &connection)
void unsetArchitectureForRF(RowID rfID) const
std::set< RowID > fuArchitectureIDs() const
void addOperationImplementationResource(const OperationImplementationResource &resource)
int addBooleanColumn(const std::string &table, const std::string &newcolumn)
bool canRemoveFUArchitecture(RowID archID) const
void setArchitectureForRF(RowID rfID, RowID archID) const
std::set< RowID > fuEntryIDs() const
static std::string resourceUsageDataByIDQuery(RowID id)
bool hasFUEntry(RowID id) const
Direction
Direction of port.
virtual DataObject costEstimationDataValue(const std::string &valueName, const std::string &pluginName) const
void addFUParametersToImplementation(FUImplementation &implementation, RowID entryID) const
static void createNew(const std::string &file)
virtual RFArchitecture * rfArchitectureByID(RowID id) const
static std::string fuImplementationParametersByIDQuery(RowID id)
HDBManager(const std::string &hdbFile)
bool hasRFEntry(RowID id) const
static std::string fuEntryByIDQuery(RowID id)
void addRFExternalPortsToImplementation(RFImplementation &implementation, RowID entryID) const
std::set< RowID > socketEntryIDs() 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
RowID fuEntryIDOfImplementation(RowID implID) const
CostFunctionPlugin * createCostFunctionOfRF(RowID id) const
static std::string rfEntryByIDQuery(RowID id)
static std::string socketEntryByIDQuery(RowID id)
void setCostFunctionPluginForFU(RowID fuID, RowID pluginID) const
bool containsRFArchitecture(RowID id) const
std::set< RowID > busCostEstimationDataIDs(RowID busID) const
RowID addBusEntry() const
std::list< DataObject > DataObjectList
std::set< RowID > busEntryIDs() const
std::set< const TTAMachine::PipelineElement * > usage1
friend class HDBManagerTest
void addRFParametersToImplementation(RFImplementation &implementation, RowID entryID) const
void addOperationPipelinesToFUArchitecture(FUArchitecture &architecture, RowID id) const
std::set< RowID > OperationImplementationIDs() const
RowID rfArchitectureID(RowID rfEntryID) const
std::set< RowID > rfEntryIDs() const
RowID addRFImplementation(const RFImplementation &implementation, RowID rfEntryID)
std::set< RowID > rfArchitectureIDs() const
bool fuEntryHasArchitecture(RowID id) const
virtual void removeCostFunctionPlugin(RowID pluginID) const
std::string fileName() const
static std::string opcodesByIDQuery(RowID id)
virtual std::set< RowID > costEstimationDataIDs(const CostEstimationData &match, bool useCompiledQueries=false, RelationalDBQueryResult *compiledQuery=NULL) const
std::set< RowID > socketCostEstimationDataIDs(RowID socketID) const
SQLite * db_
Handle to the database.
RelationalDBConnection * getDBConnection() const
OperationImplementation OperationImplementationByID(RowID id) const
static HDBManager * instance_
Unique instance of the HDBManager.
static std::string fuSourceFilesByIDQuery(RowID id)
RowID addCostEstimationData(const CostEstimationData &data) const
virtual void removeCostEstimationData(RowID id) const
virtual FUImplementation * createImplementationOfFU(FUArchitecture &architecture, RowID id) const
static std::string rfImplementationParametersByIDQuery(RowID id)
std::set< RowID > rfCostEstimationDataIDs(RowID rfImplID) const
virtual void removeRFImplementation(RowID implID) const
void unsetCostFunctionPluginForRF(RowID rfID) const
bool rfEntryHasArchitecture(RowID id) const
static std::string rfArchitectureByIDQuery(RowID id)
void addOpcodesToImplementation(FUImplementation &implementation, RowID entryID) const
DataObject fuCostEstimationData(const std::string &valueName, RowID implementationId, const std::string &pluginName) const
static std::string fuPortBindingByNameQuery(RowID fuID, const std::string &portName)
std::set< const TTAMachine::PipelineElement * > usage2
void addFUExternalPortsToImplementation(FUImplementation &implementation, RowID entryID) const
std::set< RowID > fuCostEstimationDataIDs(RowID fuImplID) const
bool canRemoveRFArchitecture(RowID archID) const
virtual void removeFUArchitecture(RowID archID) const
bool containsFUArchitecture(RowID id) const
virtual void deleteCostEstimationDataIDsQueries() const =0
RowID fuArchitectureID(RowID fuEntryID) const
static std::string fuImplementationDataPortsByIDQuery(RowID id)
FUEntry * fuByEntryID(RowID id) const
std::list< std::string > blockSourceFile()
static BlockImplementationFile::Format fileFormat(const std::string &formatString)
virtual void modifyCostFunctionPlugin(RowID id, const CostFunctionPlugin &plugin)
static std::string ioUsageDataByIDQuery(RowID id)
virtual void removeRFArchitecture(RowID archID) const
void unsetArchitectureForFU(RowID fuID) const
static std::string rfImplementationByIDQuery(RowID id)
void addDataPortsToImplementation(FUImplementation &implementation, FUArchitecture &architecture, RowID entryID) const
static bool isMatchingArchitecture(const TTAMachine::FunctionUnit &fu, const FUArchitecture &arch)
void setCostFunctionPluginForRF(RowID rfID, RowID pluginID) const
static bool areCompatiblePipelines(const PipelineElementUsageTable &table)
RFEntry * rfByEntryID(RowID id) const
virtual RFImplementation * createImplementationOfRF(RowID id) const
void setArchitectureForFU(RowID fuID, RowID archID) const
static std::string fuArchitectureByIDQuery(RowID id)