OpenASIP  2.0
HDBManager.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2014 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /**
25  * @file HDBManager.hh
26  *
27  * Declaration of HDBManager class.
28  *
29  * @author Lasse Laasonen 2005 (lasse.laasonen-no.spam-tut.fi)
30  * @author Esa Määttä 2007 (esa.maatta-no.spam-tut.fi)
31  * @author Vinogradov Viacheslav(added Verilog generating) 2012
32  * @note rating: red
33  */
34 
35 #ifndef TTA_HDB_MANAGER_HH
36 #define TTA_HDB_MANAGER_HH
37 
38 #include <string>
39 #include <list>
40 #include <set>
41 #include <vector>
42 
44 #include "Exception.hh"
45 #include "DataObject.hh"
46 #include "DBTypes.hh"
47 #include "HDBTypes.hh"
48 #include "CostEstimationData.hh"
49 #include "SQLiteConnection.hh"
51 
52 class SQLite;
54 
55 namespace TTAMachine {
56 class FunctionUnit;
57 class PipelineElement;
58 }
59 
60 namespace HDB {
61 
62 class FUEntry;
63 class RFEntry;
64 class FUArchitecture;
65 class RFArchitecture;
66 class FUImplementation;
67 class RFImplementation;
68 class CostFunctionPlugin;
69 class HDBRegistry;
70 
71 /**
72  * Class used to access hardware database (HDB).
73  *
74  * Provides methods to create new HDB and to search, add, and remove
75  * blocks from/to HDB. There can exist only one HDBManager instance
76  * per database at the same time because HDBManager creates a
77  * connection to the database in its constructor and does not close
78  * the connection unless the HDBManager instance is deleted. And there
79  * cannot be several connections to the same database at the same
80  * time.
81  */
82 class HDBManager {
83 public:
84  friend class HDBManagerTest;
85 
86  typedef std::list<DataObject> DataObjectList;
87  virtual ~HDBManager();
88  static void createNew(const std::string& file);
89 
90  std::string fileName() const;
91 
92  RowID addCostFunctionPlugin(const CostFunctionPlugin& plugin) const;
93  virtual void removeCostFunctionPlugin(RowID pluginID) const;
94 
95  RowID addFUArchitecture(const FUArchitecture& architecture) const;
96  bool canRemoveFUArchitecture(RowID archID) const;
97  virtual void removeFUArchitecture(RowID archID) const;
98 
99  RowID addFUEntry() const;
100  virtual void removeFUEntry(RowID id) const;
101 
102  RowID addFUImplementation(const FUEntry& entry) const;
103 
104  virtual void removeFUImplementation(RowID implementationID) const;
105 
106  void setArchitectureForFU(RowID fuID, RowID archID) const;
107  void unsetArchitectureForFU(RowID fuID) const;
108 
109  RowID addRFArchitecture(const RFArchitecture& architecture) const;
110  bool canRemoveRFArchitecture(RowID archID) const;
111  virtual void removeRFArchitecture(RowID archID) const;
112 
113  RowID addRFEntry() const;
114  virtual void removeRFEntry(RowID id) const;
115 
117  const RFImplementation& implementation, RowID rfEntryID);
118 
119  virtual void removeRFImplementation(RowID implID) const;
120 
121  void setArchitectureForRF(RowID rfID, RowID archID) const;
122 
123  void unsetArchitectureForRF(RowID rfID) const;
124 
125  void setCostFunctionPluginForFU(RowID fuID, RowID pluginID) const;
126  void unsetCostFunctionPluginForFU(RowID fuID) const;
127  void setCostFunctionPluginForRF(RowID rfID, RowID pluginID) const;
128  void unsetCostFunctionPluginForRF(RowID rfID) const;
129 
130  std::set<RowID> fuEntryIDs() const;
131  std::set<RowID> rfEntryIDs() const;
132  std::set<RowID> busEntryIDs() const;
133  std::set<RowID> socketEntryIDs() const;
134  std::set<RowID> OperationImplementationIDs() const;
135  std::set<RowID> OperationImplementationResourceIDs() const;
136 
139  RowID id) const;
140 
142  const OperationImplementationResource& resource);
144  const OperationImplementation& operation);
145 
148 
149  std::set<RowID> fuArchitectureIDs() const;
150  std::set<RowID> fuArchitectureIDsByOperationSet(
151  const std::set<std::string>& operationNames) const;
152  std::set<RowID> rfArchitectureIDs() const;
153 
154  RowID fuEntryIDOfImplementation(RowID implID) const;
155 
156  RowID rfEntryIDOfImplementation(RowID implID) const;
157 
158  FUEntry* fuByEntryID(RowID id) const;
159 
160  RFEntry* rfByEntryID(RowID id) const;
161 
162  virtual FUArchitecture* fuArchitectureByID(RowID id) const;
163 
164  virtual RFArchitecture* rfArchitectureByID(RowID id) const;
165 
166  std::set<RowID> fuEntriesByArchitecture(
167  const TTAMachine::FunctionUnit& fu) const;
168 
169  std::set<RowID> rfEntriesByArchitecture(
170  int readPorts,
171  int writePorts,
172  int bidirPorts,
173  int maxReads,
174  int maxWrites,
175  int latency,
176  bool guardSupport,
177  int guardLatency = 0,
178  int width = 0,
179  int size = 0,
180  bool zeroRegister = false) const;
181 
183  const std::string& valueName, const std::string& pluginName) const;
184 
186 
188  RowID fuID,
189  const std::string& valueName,
190  const std::string& value,
191  RowID pluginID) const;
192 
194  RowID rfID,
195  const std::string& valueName,
196  const std::string& value,
197  RowID pluginID) const;
198 
200  const std::string& valueName, RowID implementationId,
201  const std::string& pluginName) const;
202 
204  const std::string& valueName, RowID implementationId,
205  const std::string& pluginName) const;
206 
207  RowID addBusEntry() const;
208  virtual void removeBusEntry(RowID id) const;
209 
211  RowID busID,
212  const std::string& valueName,
213  const std::string& value,
214  RowID pluginID) const;
215 
217  const std::string& valueName, RowID busID,
218  const std::string& pluginName) const;
219 
221  const std::string& valueName, RowID implementationId,
222  const std::string& pluginName) const;
223 
224  RowID addSocketEntry() const;
225  virtual void removeSocketEntry(RowID id) const;
226 
228  RowID socketID,
229  const std::string& valueName,
230  const std::string& value,
231  RowID pluginID) const;
232 
234  const std::string& valueName, RowID socketID,
235  const std::string& pluginName) const;
236 
238  const std::string& valueName, RowID implementationID,
239  const std::string& pluginName) const;
240 
241  std::set<RowID> fuCostEstimationDataIDs(RowID fuImplID) const;
242 
243  std::set<RowID> rfCostEstimationDataIDs(RowID rfImplID) const;
244  std::set<RowID> busCostEstimationDataIDs(RowID busID) const;
245  std::set<RowID> socketCostEstimationDataIDs(RowID socketID) const;
246 
248 
249  std::set<RowID> costFunctionPluginIDs() const;
250  std::set<RowID> costFunctionPluginDataIDs(RowID pluginID) const;
252 
253  virtual std::set<RowID> costEstimationDataIDs(
254  const CostEstimationData& match,
255  bool useCompiledQueries = false,
256  RelationalDBQueryResult* compiledQuery = NULL) const;
257 
259 
260  virtual void removeCostEstimationData(RowID id) const;
261 
262  virtual void modifyCostEstimationData(
263  RowID id, const CostEstimationData& data);
264 
265  virtual void modifyCostFunctionPlugin(
266  RowID id, const CostFunctionPlugin& plugin);
267 
268  virtual void deleteCostEstimationDataIDsQueries() const = 0;
269 
270  std::list<std::string> blockSourceFile();
271 
272  static std::string formatString(BlockImplementationFile::Format format);
273 
274 protected:
277  FUArchitecture& architecture,
278  RowID id) const;
280  const CostEstimationData& match,
281  std::string* query,
282  RelationalDBQueryResult* compiledQuery = NULL,
283  short int* queryHash = NULL,
284  bool createBindableQuery = false) const;
286 
287  HDBManager(const std::string& hdbFile);
288 
289 private:
290  // Struct PipelineElementUsage
292  std::set<const TTAMachine::PipelineElement*> usage1;
293  std::set<const TTAMachine::PipelineElement*> usage2;
294  };
295 
296  // typedef for PipelineElemtnUsageTable
297  typedef std::vector<PipelineElementUsage> PipelineElementUsageTable;
298 
299  bool hasFUEntry(RowID id) const;
300  bool hasRFEntry(RowID id) const;
301  bool hasBusEntry(RowID id) const;
302  bool hasSocketEntry(RowID id) const;
303  bool hasCostEstimationDataByID(RowID id) const;
304  bool hasCostFunctionPluginByID(RowID id) const;
305  bool fuEntryHasArchitecture(RowID id) const;
306  bool rfEntryHasArchitecture(RowID id) const;
307  bool containsOperation(const std::string& opName) const;
308  bool containsImplementationFile(const std::string& pathToFile) const;
309  bool containsFUArchitecture(RowID id) const;
310  bool containsRFArchitecture(RowID id) const;
311  RowID fuArchitectureID(RowID fuEntryID) const;
312  RowID rfArchitectureID(RowID rfEntryID) const;
313  bool hasColumn(
314  const std::string& table, const std::string& columnName) const;
315  int addBooleanColumn(
316  const std::string& table, const std::string& newcolumn);
317 
320 
322  FUArchitecture& architecture,
323  RowID id) const;
325  FUArchitecture& architecture,
326  RowID id) const;
327  std::string resolveArchitecturePort(
328  const FUArchitecture& architecture,
329  RowID entryID,
330  const std::string& implementedPort) const;
333  RowID entryID) const;
336  FUArchitecture& architecture,
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;
360  const BlockImplementationFile& file) const;
362  const CostEstimationData& match,
363  std::string& query) const;
364 
365  static bool isMatchingArchitecture(
366  const TTAMachine::FunctionUnit& fu, const FUArchitecture& arch);
367  static bool areCompatiblePipelines(
368  const PipelineElementUsageTable& table);
369  static void insertFileFormats(RelationalDBConnection& connection);
371  const std::string& formatString);
372 
373  static std::string directionString(HDB::Direction direction);
374  static std::string fuEntryByIDQuery(RowID id);
375  static std::string rfEntryByIDQuery(RowID id);
376  static std::string busEntryByIDQuery(RowID id);
377  static std::string socketEntryByIDQuery(RowID id);
378  static std::string fuArchitectureByIDQuery(RowID id);
379  static std::string fuPortsAndBindingsByIDQuery(RowID id);
380  static std::string ioUsageDataByIDQuery(RowID id);
381  static std::string resourceUsageDataByIDQuery(RowID id);
382  static std::string fuImplementationByIDQuery(RowID id);
383  static std::string opcodesByIDQuery(RowID id);
384  static std::string fuImplementationDataPortsByIDQuery(RowID id);
385  static std::string fuExternalPortsByIDQuery(RowID id);
386  static std::string rfExternalPortsByIDQuery(RowID id);
387  static std::string fuPortBindingByNameQuery(
388  RowID fuID,
389  const std::string& portName);
390  static std::string fuImplementationParametersByIDQuery(RowID id);
391  static std::string rfImplementationParametersByIDQuery(RowID id);
392  static std::string fuSourceFilesByIDQuery(RowID id);
393  static std::string rfArchitectureByIDQuery(RowID id);
394  static std::string rfImplementationByIDQuery(RowID id);
395  static std::string rfImplementationByIDQuery2(RowID id);
396  static std::string rfImplementationDataPortsByIDQuery(RowID id);
397  static std::string rfSourceFilesByIDQuery(RowID id);
398 
399  /// Handle to the database.
401  /// Handle to the database connection.
403  /// The HDB file to manager.
404  std::string hdbFile_;
405  /// Unique instance of the HDBManager.
407 };
408 
409 }
410 
411 #endif
HDB::HDBManager::formatString
static std::string formatString(BlockImplementationFile::Format format)
Definition: HDBManager.cc:5737
HDB::FUArchitecture
Definition: FUArchitecture.hh:55
HDB::FUEntry
Definition: FUEntry.hh:49
HDB::HDBManager::addPortsAndBindingsToFUArchitecture
void addPortsAndBindingsToFUArchitecture(FUArchitecture &architecture, RowID id) const
Definition: HDBManager.cc:4406
HDB::HDBManager::removeOperationImplementationResource
void removeOperationImplementationResource(RowID id)
Definition: HDBManager.cc:2658
HDBTypes.hh
RelationalDBConnection
Definition: RelationalDBConnection.hh:48
HDB::HDBManager::createCostEstimatioDataIdsQuery
void createCostEstimatioDataIdsQuery(const CostEstimationData &match, std::string *query, RelationalDBQueryResult *compiledQuery=NULL, short int *queryHash=NULL, bool createBindableQuery=false) const
Definition: HDBManager.cc:6835
HDB::HDBManager::fuArchitectureByID
virtual FUArchitecture * fuArchitectureByID(RowID id) const
Definition: HDBManager.cc:2940
HDB::HDBManager::fuImplementationByIDQuery
static std::string fuImplementationByIDQuery(RowID id)
Definition: HDBManager.cc:5962
HDB::HDBManager::addCostFunctionPlugin
RowID addCostFunctionPlugin(const CostFunctionPlugin &plugin) const
Definition: HDBManager.cc:626
HDB::HDBManager::addFUImplementation
RowID addFUImplementation(const FUEntry &entry) const
Definition: HDBManager.cc:1112
HDB::HDBManager::addFUCostEstimationData
RowID addFUCostEstimationData(RowID fuID, const std::string &valueName, const std::string &value, RowID pluginID) const
Definition: HDBManager.cc:3210
HDB::HDBManager::busCostEstimationDataList
DataObjectList * busCostEstimationDataList(const std::string &valueName, RowID implementationId, const std::string &pluginName) const
Definition: HDBManager.cc:3556
HDB::HDBManager::fuExternalPortsByIDQuery
static std::string fuExternalPortsByIDQuery(RowID id)
Definition: HDBManager.cc:6043
HDB::HDBManager::rfImplementationDataPortsByIDQuery
static std::string rfImplementationDataPortsByIDQuery(RowID id)
Definition: HDBManager.cc:6274
HDB
Definition: CostDatabase.hh:49
HDB::HDBManager::hasSocketEntry
bool hasSocketEntry(RowID id) const
Definition: HDBManager.cc:4008
HDB::HDBManager::rfSourceFilesByIDQuery
static std::string rfSourceFilesByIDQuery(RowID id)
Definition: HDBManager.cc:6300
HDB::HDBManager::directionString
static std::string directionString(HDB::Direction direction)
Definition: HDBManager.cc:5761
HDB::HDBManager::removeFUEntry
virtual void removeFUEntry(RowID id) const
Definition: HDBManager.cc:1039
Exception.hh
HDB::HDBManager::dbConnection_
RelationalDBConnection * dbConnection_
Handle to the database connection.
Definition: HDBManager.hh:402
HDB::HDBManager::busEntryByIDQuery
static std::string busEntryByIDQuery(RowID id)
Definition: HDBManager.cc:5819
HDB::HDBManager::rfImplementationByIDQuery2
static std::string rfImplementationByIDQuery2(RowID id)
Definition: HDBManager.cc:6246
implementation
IDF::MachineImplementation * implementation
the implementation definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:61
DataObject
Definition: DataObject.hh:50
HDB::HDBManager::addRFArchitecture
RowID addRFArchitecture(const RFArchitecture &architecture) const
Definition: HDBManager.cc:1461
HDB::HDBManager::costFunctionPluginIDs
std::set< RowID > costFunctionPluginIDs() const
Definition: HDBManager.cc:6553
HDB::HDBManager::addSocketEntry
RowID addSocketEntry() const
Definition: HDBManager.cc:3606
HDB::HDBManager::removeOperationImplementation
void removeOperationImplementation(RowID id)
Definition: HDBManager.cc:2622
HDB::HDBManager::costFunctionPluginDataIDs
std::set< RowID > costFunctionPluginDataIDs(RowID pluginID) const
Definition: HDBManager.cc:6589
HDB::RFEntry
Definition: RFEntry.hh:47
HDB::HDBManager::PipelineElementUsageTable
std::vector< PipelineElementUsage > PipelineElementUsageTable
Definition: HDBManager.hh:297
HDB::BlockImplementationFile::Format
Format
Format of the file.
Definition: BlockImplementationFile.hh:47
HDB::HDBManager::removeBusEntry
virtual void removeBusEntry(RowID id) const
Definition: HDBManager.cc:3418
HDB::HDBManager::addFUArchitecture
RowID addFUArchitecture(const FUArchitecture &architecture) const
Definition: HDBManager.cc:717
SQLiteConnection.hh
HDB::HDBManager::rfExternalPortsByIDQuery
static std::string rfExternalPortsByIDQuery(RowID id)
Definition: HDBManager.cc:6072
HDB::HDBManager::fuPortsAndBindingsByIDQuery
static std::string fuPortsAndBindingsByIDQuery(RowID id)
Definition: HDBManager.cc:5880
HDB::HDBManager::removeRFEntry
virtual void removeRFEntry(RowID id) const
Definition: HDBManager.cc:1583
HDB::HDBManager::removeFUImplementation
virtual void removeFUImplementation(RowID implementationID) const
Definition: HDBManager.cc:1325
HDB::HDBManager::addRFCostEstimationData
RowID addRFCostEstimationData(RowID rfID, const std::string &valueName, const std::string &value, RowID pluginID) const
Definition: HDBManager.cc:3246
RowID
int RowID
Type definition of row ID in relational databases.
Definition: DBTypes.hh:37
HDB::HDBManager::hasCostFunctionPluginByID
bool hasCostFunctionPluginByID(RowID id) const
Definition: HDBManager.cc:4064
HDB::HDBManager::addOperationImplementation
void addOperationImplementation(const OperationImplementation &operation)
Definition: HDBManager.cc:2541
HDB::HDBManager::socketCostEstimationDataList
DataObjectList * socketCostEstimationDataList(const std::string &valueName, RowID implementationID, const std::string &pluginName) const
Definition: HDBManager.cc:3772
HDB::HDBManager::addBusCostEstimationData
RowID addBusCostEstimationData(RowID busID, const std::string &valueName, const std::string &value, RowID pluginID) const
Definition: HDBManager.cc:3465
HDB::HDBManager::OperationImplementationResourceByID
OperationImplementationResource OperationImplementationResourceByID(RowID id) const
Definition: HDBManager.cc:2410
HDB::HDBManager::addRFEntry
RowID addRFEntry() const
Definition: HDBManager.cc:1557
HDB::HDBManager::socketCostEstimationData
DataObject socketCostEstimationData(const std::string &valueName, RowID socketID, const std::string &pluginName) const
Definition: HDBManager.cc:3718
HDB::HDBManager::hasColumn
bool hasColumn(const std::string &table, const std::string &columnName) const
Definition: HDBManager.cc:4342
HDB::HDBManager::addBlockImplementationFileToHDB
void addBlockImplementationFileToHDB(const BlockImplementationFile &file) const
Definition: HDBManager.cc:5498
HDB::HDBManager::costEstimationData
CostEstimationData costEstimationData(RowID id) const
Definition: HDBManager.cc:6323
HDB::HDBManager::costFunctionPluginByID
CostFunctionPlugin * costFunctionPluginByID(RowID pluginID) const
Definition: HDBManager.cc:6631
HDB::HDBManager::hasCostEstimationDataByID
bool hasCostEstimationDataByID(RowID id) const
Definition: HDBManager.cc:4035
HDB::HDBManager::containsImplementationFile
bool containsImplementationFile(const std::string &pathToFile) const
Definition: HDBManager.cc:4185
HDB::BlockImplementationFile
Definition: BlockImplementationFile.hh:44
HDB::HDBManager::unsetCostFunctionPluginForFU
void unsetCostFunctionPluginForFU(RowID fuID) const
Definition: HDBManager.cc:1971
HDB::HDBManager::hdbFile_
std::string hdbFile_
The HDB file to manager.
Definition: HDBManager.hh:404
HDB::HDBManager::fuArchitectureIDsByOperationSet
std::set< RowID > fuArchitectureIDsByOperationSet(const std::set< std::string > &operationNames) const
Definition: HDBManager.cc:2684
CostEstimationData.hh
HDB::HDBManager::removeSocketEntry
virtual void removeSocketEntry(RowID id) const
Definition: HDBManager.cc:3631
HDB::HDBManager::rfEntryIDOfImplementation
RowID rfEntryIDOfImplementation(RowID implID) const
Definition: HDBManager.cc:2796
HDB::HDBManager::busCostEstimationData
DataObject busCostEstimationData(const std::string &valueName, RowID busID, const std::string &pluginName) const
Definition: HDBManager.cc:3506
HDB::HDBManager::containsOperation
bool containsOperation(const std::string &opName) const
Definition: HDBManager.cc:4159
HDB::HDBManager::rfCostEstimationData
DataObject rfCostEstimationData(const std::string &valueName, RowID implementationId, const std::string &pluginName) const
Definition: HDBManager.cc:3345
TTAMachine::FunctionUnit
Definition: FunctionUnit.hh:55
HDB::HDBManager::hasBusEntry
bool hasBusEntry(RowID id) const
Definition: HDBManager.cc:3980
HDB::HDBManager::modifyCostEstimationData
virtual void modifyCostEstimationData(RowID id, const CostEstimationData &data)
Definition: HDBManager.cc:6999
DBTypes.hh
HDB::HDBManager::addBlockImplementationFiles
void addBlockImplementationFiles(FUImplementation &implementation, RowID entryID) const
Definition: HDBManager.cc:5337
HDB::HDBManager::createCostFunctionOfFU
CostFunctionPlugin * createCostFunctionOfFU(RowID id) const
Definition: HDBManager.cc:4691
HDB::HDBManager::addSocketCostEstimationData
RowID addSocketCostEstimationData(RowID socketID, const std::string &valueName, const std::string &value, RowID pluginID) const
Definition: HDBManager.cc:3678
HDB::HDBManager::resolveArchitecturePort
std::string resolveArchitecturePort(const FUArchitecture &architecture, RowID entryID, const std::string &implementedPort) const
Definition: HDBManager.cc:4922
HDB::HDBManager::OperationImplementationResourceIDs
std::set< RowID > OperationImplementationResourceIDs() const
Definition: HDBManager.cc:2221
HDB::HDBManager::insertFileFormats
static void insertFileFormats(RelationalDBConnection &connection)
Definition: HDBManager.cc:5689
HDB::RFImplementation
Definition: RFImplementation.hh:50
HDB::HDBManager::unsetArchitectureForRF
void unsetArchitectureForRF(RowID rfID) const
Definition: HDBManager.cc:1930
HDB::HDBManager::fuArchitectureIDs
std::set< RowID > fuArchitectureIDs() const
Definition: HDBManager.cc:2163
HDB::HDBManager::addOperationImplementationResource
void addOperationImplementationResource(const OperationImplementationResource &resource)
Definition: HDBManager.cc:2482
HDB::HDBManager::addBooleanColumn
int addBooleanColumn(const std::string &table, const std::string &newcolumn)
Definition: HDBManager.cc:4380
HDB::HDBManager::PipelineElementUsage
Definition: HDBManager.hh:291
HDB::HDBManager::canRemoveFUArchitecture
bool canRemoveFUArchitecture(RowID archID) const
Definition: HDBManager.cc:904
HDB::HDBManager::setArchitectureForRF
void setArchitectureForRF(RowID rfID, RowID archID) const
Definition: HDBManager.cc:1895
HDB::HDBManager::fuEntryIDs
std::set< RowID > fuEntryIDs() const
Definition: HDBManager.cc:2035
HDB::HDBManager::resourceUsageDataByIDQuery
static std::string resourceUsageDataByIDQuery(RowID id)
Definition: HDBManager.cc:5933
HDB::HDBManager::hasFUEntry
bool hasFUEntry(RowID id) const
Definition: HDBManager.cc:3924
HDB::Direction
Direction
Direction of port.
Definition: HDBTypes.hh:40
HDB::HDBManager::costEstimationDataValue
virtual DataObject costEstimationDataValue(const std::string &valueName, const std::string &pluginName) const
Definition: HDBManager.cc:3831
HDB::HDBManager::addFUParametersToImplementation
void addFUParametersToImplementation(FUImplementation &implementation, RowID entryID) const
Definition: HDBManager.cc:5240
HDB::HDBManager::createNew
static void createNew(const std::string &file)
Definition: HDBManager.cc:548
HDB::HDBManager::rfArchitectureByID
virtual RFArchitecture * rfArchitectureByID(RowID id) const
Definition: HDBManager.cc:2963
HDB::HDBManager::fuImplementationParametersByIDQuery
static std::string fuImplementationParametersByIDQuery(RowID id)
Definition: HDBManager.cc:6099
HDB::HDBManager::HDBManager
HDBManager(const std::string &hdbFile)
Definition: HDBManager.cc:394
HDB::HDBManager::hasRFEntry
bool hasRFEntry(RowID id) const
Definition: HDBManager.cc:3952
RelationalDBQueryResult
Definition: RelationalDBQueryResult.hh:46
HDB::HDBManager::fuEntryByIDQuery
static std::string fuEntryByIDQuery(RowID id)
Definition: HDBManager.cc:5781
HDB::HDBManager::addRFExternalPortsToImplementation
void addRFExternalPortsToImplementation(RFImplementation &implementation, RowID entryID) const
Definition: HDBManager.cc:5143
HDB::HDBManager::socketEntryIDs
std::set< RowID > socketEntryIDs() const
Definition: HDBManager.cc:2131
HDB::HDBManager::fuEntriesByArchitecture
std::set< RowID > fuEntriesByArchitecture(const TTAMachine::FunctionUnit &fu) const
Definition: HDBManager.cc:3040
HDB::HDBManager::rfEntriesByArchitecture
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
Definition: HDBManager.cc:3133
HDB::HDBManager::fuEntryIDOfImplementation
RowID fuEntryIDOfImplementation(RowID implID) const
Definition: HDBManager.cc:2765
HDB::HDBManager
Definition: HDBManager.hh:82
HDB::HDBManager::createCostFunctionOfRF
CostFunctionPlugin * createCostFunctionOfRF(RowID id) const
Definition: HDBManager.cc:4763
HDB::HDBManager::rfEntryByIDQuery
static std::string rfEntryByIDQuery(RowID id)
Definition: HDBManager.cc:5800
HDB::OperationImplementationResource
Definition: OperationImplementationResource.hh:38
HDB::HDBManager::socketEntryByIDQuery
static std::string socketEntryByIDQuery(RowID id)
Definition: HDBManager.cc:5838
HDB::HDBManager::setCostFunctionPluginForFU
void setCostFunctionPluginForFU(RowID fuID, RowID pluginID) const
Definition: HDBManager.cc:1950
DataObject.hh
HDB::HDBManager::containsRFArchitecture
bool containsRFArchitecture(RowID id) const
Definition: HDBManager.cc:4240
HDB::HDBManager::busCostEstimationDataIDs
std::set< RowID > busCostEstimationDataIDs(RowID busID) const
Definition: HDBManager.cc:6514
HDB::HDBManager::addBusEntry
RowID addBusEntry() const
Definition: HDBManager.cc:3393
CostEstimationData
Definition: CostEstimationData.hh:42
HDB::HDBManager::DataObjectList
std::list< DataObject > DataObjectList
Definition: HDBManager.hh:86
HDB::HDBManager::busEntryIDs
std::set< RowID > busEntryIDs() const
Definition: HDBManager.cc:2099
HDB::HDBManager::PipelineElementUsage::usage1
std::set< const TTAMachine::PipelineElement * > usage1
Definition: HDBManager.hh:292
HDB::HDBManager::HDBManagerTest
friend class HDBManagerTest
Definition: HDBManager.hh:84
HDB::HDBManager::addRFParametersToImplementation
void addRFParametersToImplementation(RFImplementation &implementation, RowID entryID) const
Definition: HDBManager.cc:5274
HDB::HDBManager::addOperationPipelinesToFUArchitecture
void addOperationPipelinesToFUArchitecture(FUArchitecture &architecture, RowID id) const
Definition: HDBManager.cc:4517
HDB::HDBManager::OperationImplementationIDs
std::set< RowID > OperationImplementationIDs() const
Definition: HDBManager.cc:2193
HDB::HDBManager::rfArchitectureID
RowID rfArchitectureID(RowID rfEntryID) const
Definition: HDBManager.cc:4305
HDB::HDBManager::rfEntryIDs
std::set< RowID > rfEntryIDs() const
Definition: HDBManager.cc:2067
HDB::HDBManager::addFUEntry
RowID addFUEntry() const
Definition: HDBManager.cc:1014
HDB::HDBManager::addRFImplementation
RowID addRFImplementation(const RFImplementation &implementation, RowID rfEntryID)
Definition: HDBManager.cc:1640
HDB::HDBManager::rfArchitectureIDs
std::set< RowID > rfArchitectureIDs() const
Definition: HDBManager.cc:2734
HDB::HDBManager::fuEntryHasArchitecture
bool fuEntryHasArchitecture(RowID id) const
Definition: HDBManager.cc:4097
HDB::HDBManager::removeCostFunctionPlugin
virtual void removeCostFunctionPlugin(RowID pluginID) const
Definition: HDBManager.cc:684
HDB::HDBManager::fileName
std::string fileName() const
Definition: HDBManager.cc:612
HDB::FUImplementation
Definition: FUImplementation.hh:53
HDB::RFArchitecture
Definition: RFArchitecture.hh:50
HDB::HDBManager::opcodesByIDQuery
static std::string opcodesByIDQuery(RowID id)
Definition: HDBManager.cc:5991
HDB::HDBManager::costEstimationDataIDs
virtual std::set< RowID > costEstimationDataIDs(const CostEstimationData &match, bool useCompiledQueries=false, RelationalDBQueryResult *compiledQuery=NULL) const
Definition: HDBManager.cc:6778
HDB::HDBManager::socketCostEstimationDataIDs
std::set< RowID > socketCostEstimationDataIDs(RowID socketID) const
Definition: HDBManager.cc:6473
HDB::HDBManager::db_
SQLite * db_
Handle to the database.
Definition: HDBManager.hh:400
HDB::HDBManager::getDBConnection
RelationalDBConnection * getDBConnection() const
Definition: HDBManager.cc:6987
HDB::HDBManager::OperationImplementationByID
OperationImplementation OperationImplementationByID(RowID id) const
Definition: HDBManager.cc:2248
HDB::HDBManager::instance_
static HDBManager * instance_
Unique instance of the HDBManager.
Definition: HDBManager.hh:406
BlockImplementationFile.hh
HDB::HDBManager::fuSourceFilesByIDQuery
static std::string fuSourceFilesByIDQuery(RowID id)
Definition: HDBManager.cc:6174
HDB::HDBManager::addCostEstimationData
RowID addCostEstimationData(const CostEstimationData &data) const
Definition: HDBManager.cc:6694
HDB::HDBManager::removeCostEstimationData
virtual void removeCostEstimationData(RowID id) const
Definition: HDBManager.cc:5479
HDB::HDBManager::createImplementationOfFU
virtual FUImplementation * createImplementationOfFU(FUArchitecture &architecture, RowID id) const
Definition: HDBManager.cc:4615
HDB::HDBManager::rfImplementationParametersByIDQuery
static std::string rfImplementationParametersByIDQuery(RowID id)
Definition: HDBManager.cc:6122
HDB::HDBManager::rfCostEstimationDataIDs
std::set< RowID > rfCostEstimationDataIDs(RowID rfImplID) const
Definition: HDBManager.cc:6432
HDB::HDBManager::~HDBManager
virtual ~HDBManager()
Definition: HDBManager.cc:534
HDB::HDBManager::removeRFImplementation
virtual void removeRFImplementation(RowID implID) const
Definition: HDBManager.cc:1808
HDB::HDBManager::unsetCostFunctionPluginForRF
void unsetCostFunctionPluginForRF(RowID rfID) const
Definition: HDBManager.cc:2014
HDB::HDBManager::rfEntryHasArchitecture
bool rfEntryHasArchitecture(RowID id) const
Definition: HDBManager.cc:4129
HDB::HDBManager::rfArchitectureByIDQuery
static std::string rfArchitectureByIDQuery(RowID id)
Definition: HDBManager.cc:6198
HDB::HDBManager::addOpcodesToImplementation
void addOpcodesToImplementation(FUImplementation &implementation, RowID entryID) const
Definition: HDBManager.cc:4971
HDB::HDBManager::fuCostEstimationData
DataObject fuCostEstimationData(const std::string &valueName, RowID implementationId, const std::string &pluginName) const
Definition: HDBManager.cc:3289
HDB::HDBManager::fuPortBindingByNameQuery
static std::string fuPortBindingByNameQuery(RowID fuID, const std::string &portName)
Definition: HDBManager.cc:6146
HDB::HDBManager::PipelineElementUsage::usage2
std::set< const TTAMachine::PipelineElement * > usage2
Definition: HDBManager.hh:293
HDB::HDBManager::addFUExternalPortsToImplementation
void addFUExternalPortsToImplementation(FUImplementation &implementation, RowID entryID) const
Definition: HDBManager.cc:5055
HDB::HDBManager::fuCostEstimationDataIDs
std::set< RowID > fuCostEstimationDataIDs(RowID fuImplID) const
Definition: HDBManager.cc:6391
HDB::HDBManager::canRemoveRFArchitecture
bool canRemoveRFArchitecture(RowID archID) const
Definition: HDBManager.cc:1508
TTAMachine
Definition: Assembler.hh:48
HDB::HDBManager::removeFUArchitecture
virtual void removeFUArchitecture(RowID archID) const
Definition: HDBManager.cc:941
OperationImplementation.hh
HDB::HDBManager::containsFUArchitecture
bool containsFUArchitecture(RowID id) const
Definition: HDBManager.cc:4212
HDB::HDBManager::deleteCostEstimationDataIDsQueries
virtual void deleteCostEstimationDataIDsQueries() const =0
HDB::HDBManager::fuArchitectureID
RowID fuArchitectureID(RowID fuEntryID) const
Definition: HDBManager.cc:4268
HDB::HDBManager::fuImplementationDataPortsByIDQuery
static std::string fuImplementationDataPortsByIDQuery(RowID id)
Definition: HDBManager.cc:6016
HDB::HDBManager::fuByEntryID
FUEntry * fuByEntryID(RowID id) const
Definition: HDBManager.cc:2828
HDB::HDBManager::blockSourceFile
std::list< std::string > blockSourceFile()
Definition: HDBManager.cc:7138
HDB::HDBManager::fileFormat
static BlockImplementationFile::Format fileFormat(const std::string &formatString)
Definition: HDBManager.cc:5714
SQLite
Definition: SQLite.hh:45
HDB::HDBManager::modifyCostFunctionPlugin
virtual void modifyCostFunctionPlugin(RowID id, const CostFunctionPlugin &plugin)
Definition: HDBManager.cc:7080
HDB::HDBManager::ioUsageDataByIDQuery
static std::string ioUsageDataByIDQuery(RowID id)
Definition: HDBManager.cc:5908
HDB::HDBManager::removeRFArchitecture
virtual void removeRFArchitecture(RowID archID) const
Definition: HDBManager.cc:1535
HDB::CostFunctionPlugin
Definition: CostFunctionPlugin.hh:43
HDB::HDBManager::unsetArchitectureForFU
void unsetArchitectureForFU(RowID fuID) const
Definition: HDBManager.cc:1432
HDB::HDBManager::rfImplementationByIDQuery
static std::string rfImplementationByIDQuery(RowID id)
Definition: HDBManager.cc:6219
HDB::HDBManager::addDataPortsToImplementation
void addDataPortsToImplementation(FUImplementation &implementation, FUArchitecture &architecture, RowID entryID) const
Definition: HDBManager.cc:5006
HDB::OperationImplementation
Definition: OperationImplementation.hh:47
HDB::HDBManager::isMatchingArchitecture
static bool isMatchingArchitecture(const TTAMachine::FunctionUnit &fu, const FUArchitecture &arch)
Definition: HDBManager.cc:5519
HDB::HDBManager::setCostFunctionPluginForRF
void setCostFunctionPluginForRF(RowID rfID, RowID pluginID) const
Definition: HDBManager.cc:1993
HDB::HDBManager::areCompatiblePipelines
static bool areCompatiblePipelines(const PipelineElementUsageTable &table)
Definition: HDBManager.cc:5634
HDB::HDBManager::rfByEntryID
RFEntry * rfByEntryID(RowID id) const
Definition: HDBManager.cc:2885
HDB::HDBManager::createImplementationOfRF
virtual RFImplementation * createImplementationOfRF(RowID id) const
Definition: HDBManager.cc:4837
HDB::HDBManager::setArchitectureForFU
void setArchitectureForFU(RowID fuID, RowID archID) const
Definition: HDBManager.cc:1401
HDB::HDBManager::fuArchitectureByIDQuery
static std::string fuArchitectureByIDQuery(RowID id)
Definition: HDBManager.cc:5857