OpenASIP  2.0
Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
AddFUFromHDBDialog Class Reference

#include <AddFUFromHDBDialog.hh>

Inheritance diagram for AddFUFromHDBDialog:
Inheritance graph
Collaboration diagram for AddFUFromHDBDialog:
Collaboration graph

Public Member Functions

 AddFUFromHDBDialog (wxWindow *parent, Model *model)
 
virtual ~AddFUFromHDBDialog ()
 

Private Types

enum  {
  ID_LIST = 10000, ID_FILTER_LABEL, ID_FILTER_TEXTCTRL, ID_ADD,
  ID_CLOSE, ID_LINE, ID_FILTER_TIMER
}
 

Private Member Functions

virtual bool TransferDataToWindow ()
 
wxSizer * createContents (wxWindow *parent, bool call_fit, bool set_sizer)
 
void onListSelectionChange (wxListEvent &event)
 
void onAdd (wxCommandEvent &event)
 
void onClose (wxCommandEvent &event)
 
bool loadHDB (const HDB::HDBManager &manager)
 
bool acceptToList (const std::string hdbFilePath, const HDB::FUArchitecture &arch, const std::vector< std::string > &filterList)
 
void onFilterChange (wxCommandEvent &event)
 
void onFilterTimeOut (wxTimerEvent &event)
 
void onColumnClick (wxListEvent &event)
 
void setColumnImage (int col, int image)
 

Private Attributes

Modelmodel_
 Model of the current adf file. More...
 
wxListCtrl * list_
 Immediate slot list widget. More...
 
std::map< int, HDB::FUArchitecture * > fuArchitectures_
 Map of iu architectures displayed in the dialog list. More...
 
wxSearchCtrl * filterCtrl_ = nullptr
 The list filter text control. More...
 
std::vector< std::string > filterPatterns_
 Keywords to filter HDB entries. More...
 
wxTimer filterTimer_
 Timer to postpone filtering while typing filter patterns. More...
 
int sortColumn_
 
bool sortASC_
 

Static Private Attributes

static const wxString HDB_FILE_FILTER = _T("*.hdb")
 File filter for HDB files. More...
 

Detailed Description

Dialog for adding register file architectures directly from HDB to the current machine.

Definition at line 64 of file AddFUFromHDBDialog.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
ID_LIST 
ID_FILTER_LABEL 
ID_FILTER_TEXTCTRL 
ID_ADD 
ID_CLOSE 
ID_LINE 
ID_FILTER_TIMER 

Definition at line 101 of file AddFUFromHDBDialog.hh.

101  {
102  ID_LIST = 10000,
105  ID_ADD,
106  ID_CLOSE,
107  ID_LINE,
109  };

Constructor & Destructor Documentation

◆ AddFUFromHDBDialog()

AddFUFromHDBDialog::AddFUFromHDBDialog ( wxWindow *  parent,
Model model 
)

The Constructor.

Parameters
parentParent window of the dialog.
machineParent Machine of the immediate slots.

Definition at line 131 of file AddFUFromHDBDialog.cc.

133  :
134  wxDialog(
135  parent, -1, _T("HDB Function Units"),
136  wxDefaultPosition, wxDefaultSize,
137  wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
138  model_(model),
140  sortColumn_(1), sortASC_(true) {
141 
142  createContents(this, true, true);
143  SetSize(500, 400);
144 
145  list_ = dynamic_cast<wxListCtrl*>(FindWindow(ID_LIST));
146 
147  list_->InsertColumn(0, _T("Latency"), wxLIST_FORMAT_LEFT, wxLIST_AUTOSIZE);
148  list_->InsertColumn(
149  1, _T("Operations"), wxLIST_FORMAT_LEFT, wxLIST_AUTOSIZE);
150  list_->InsertColumn(2, _T("Impls"), wxLIST_FORMAT_LEFT, wxLIST_AUTOSIZE);
151  list_->InsertColumn(3, _T("HDB ID"), wxLIST_FORMAT_LEFT, wxLIST_AUTOSIZE);
152  list_->InsertColumn(4, _T("HDB"), wxLIST_FORMAT_LEFT, wxLIST_AUTOSIZE);
153 
154  string iconPath =
156 
157  wxImageList* imageList = new wxImageList(13, 17);
158  imageList->Add(wxIcon(
160  imageList->Add(wxIcon(
162  list_->SetImageList(imageList, wxIMAGE_LIST_SMALL);
163 
164  // Disable conditional buttons.
165  FindWindow(ID_ADD)->Disable();
166 }

References createContents(), FileSystem::DIRECTORY_SEPARATOR, ProDeConstants::ICON_SORT_ASC, ProDeConstants::ICON_SORT_DESC, Environment::iconDirPath(), ID_ADD, ID_LIST, list_, and WxConversion::toWxString().

Here is the call graph for this function:

◆ ~AddFUFromHDBDialog()

AddFUFromHDBDialog::~AddFUFromHDBDialog ( )
virtual

The Destructor.

Definition at line 172 of file AddFUFromHDBDialog.cc.

References MapTools::deleteAllValues(), and fuArchitectures_.

Here is the call graph for this function:

Member Function Documentation

◆ acceptToList()

bool AddFUFromHDBDialog::acceptToList ( const std::string  hdbFilePath,
const HDB::FUArchitecture arch,
const std::vector< std::string > &  filterList 
)
private

Returns true if the FU architecture should not be viewed.

Parameters
filterListThe list of all keywords (uppercase), that the FU architecture should contain.

Definition at line 308 of file AddFUFromHDBDialog.cc.

311  {
312 
313  if (filterList.empty()) {
314  return true;
315  }
316 
317  // Construct string from where the keywords are searched.
318  std::string archStr;
319  const FunctionUnit& fu = arch.architecture();
320  for (int i = 0; i < fu.operationCount(); i++) {
321  const HWOperation& oper = *fu.operation(i);
322 
323  // Operation with latency as viewed in the list.
324  archStr += oper.name()
325  + "(" + Conversion::toString(oper.latency()) + ") ";
326 
327  }
328 
329  for (auto& c : archStr) c = tolower(c);
330 
331  for (const string& keyword : filterList) {
332  if (keyword.size() > 0 && keyword.front() == '!') {
333  if (keyword.size() < 2) {
334  continue;
335  } else if (archStr.find(keyword.substr(1)) != std::string::npos ||
336  hdbFilePath.find(keyword.substr(1)) != std::string::npos) {
337  return false;
338  }
339  } else if (archStr.find(keyword) == std::string::npos &&
340  hdbFilePath.find(keyword) == std::string::npos) {
341  return false;
342  }
343  }
344 
345  return true;
346 }

References HDB::FUArchitecture::architecture(), TTAMachine::HWOperation::latency(), TTAMachine::HWOperation::name(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), and Conversion::toString().

Referenced by loadHDB().

Here is the call graph for this function:

◆ createContents()

wxSizer * AddFUFromHDBDialog::createContents ( wxWindow *  parent,
bool  call_fit,
bool  set_sizer 
)
private

Creates the dialog contents.

Parameters
parentParent dialog of the contents.
call_fitIf true, fits the contents inside the dialog.
set_sizerIf true, sets the main sizer as dialog contents.
Returns
Top level sizer of the dialog contents.

Definition at line 496 of file AddFUFromHDBDialog.cc.

497  {
498 
499  wxFlexGridSizer *item0 = new wxFlexGridSizer( 1, 0, 0 );
500  item0->AddGrowableCol( 0 );
501  item0->AddGrowableRow( 0 );
502 
503  wxListCtrl *item1 = new wxListCtrl( parent, ID_LIST, wxDefaultPosition, wxSize(160,120), wxLC_REPORT|wxSUNKEN_BORDER );
504  item0->Add( item1, 0, wxGROW|wxALL, 5 );
505 
506  filterCtrl_ = new wxSearchCtrl(parent,
507  ID_FILTER_TEXTCTRL, wxT(""), wxDefaultPosition, wxDefaultSize, 0);
508  filterCtrl_->SetDescriptiveText(
509  wxT("Filter operations or HDBs. '!PATTERN' to exclude."));
510  item0->Add(filterCtrl_, 0, wxGROW|wxALL, 5);
511 
512  wxButton *item2 = new wxButton( parent, ID_ADD, wxT("&Add"), wxDefaultPosition, wxDefaultSize, 0 );
513  item0->Add( item2, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
514 
515  wxStaticLine *item3 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
516  item0->Add( item3, 0, wxGROW|wxALL, 5 );
517 
518  wxButton *item4 = new wxButton( parent, ID_CLOSE, wxT("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
519  item0->Add( item4, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
520 
521  if (set_sizer) {
522  parent->SetSizer( item0 );
523  if (call_fit) {
524  item0->SetSizeHints( parent );
525  }
526  }
527 
528  return item0;
529 }

References filterCtrl_, ID_ADD, ID_CLOSE, ID_FILTER_TEXTCTRL, ID_LINE, and ID_LIST.

Referenced by AddFUFromHDBDialog().

◆ loadHDB()

bool AddFUFromHDBDialog::loadHDB ( const HDB::HDBManager manager)
private

Loads register files from a HDB to the dialog list.

Parameters
managerHDB manager to load.
Returns
True, if the HDB was succesfully loaded.

Definition at line 229 of file AddFUFromHDBDialog.cc.

229  {
230 
231  const std::set<RowID> fuArchIDs = manager.fuArchitectureIDs();
232  std::set<RowID>::iterator iter = fuArchIDs.begin();
233 
234  std::string path = manager.fileName();
235 
236  // Read properties of all function units found in the HDB and append
237  // data to the dialog FU list widget.
238  for (; iter != fuArchIDs.end(); iter++) {
239 
240  FUArchitecture* arch = manager.fuArchitectureByID(*iter);
241  FunctionUnit& fu = arch->architecture();
242 
243  if (!acceptToList(path, *arch, filterPatterns_)) {
244  continue;
245  }
246 
247  fuArchitectures_.insert(
248  std::pair<int, FUArchitecture*>(list_->GetItemCount(), arch));
249 
250  ListItemData* lid = new ListItemData;
251 
252  list_->InsertItem(0, _T(""));
253  if (fu.operationCount() > 0) {
254  wxString operations;
255  int minLatency = fu.operation(0)->latency();
256  int maxLatency = fu.operation(0)->latency();
257  for (int i = 0; i < fu.operationCount(); i++) {
258  if (i > 0) {
259  operations.Append(_T(", "));
260  }
261  operations.Append(
263  operations.Append(_T("("));
264  operations.Append(
266  operations.Append(_T(")"));
267 
268  if (fu.operation(i)->latency() > maxLatency) {
269  maxLatency = fu.operation(i)->latency();
270  }
271  if (fu.operation(i)->latency() < minLatency) {
272  minLatency = fu.operation(i)->latency();
273  }
274  }
275  wxString latency = WxConversion::toWxString(minLatency);
276  if (maxLatency != minLatency) {
277  latency.Append(_T(".."));
278  latency.Append(WxConversion::toWxString(maxLatency));
279  }
280 
281  list_->SetItem(0, 0, latency);
282  lid->latency = minLatency;
283  list_->SetItem(0, 1, operations);
284  lid->operations = operations;
285  }
286  list_->SetItem(0, 3, WxConversion::toWxString(*iter));
287  lid->hdbId = *iter;
288  list_->SetItem(0, 4, WxConversion::toWxString(path));
289  lid->path = WxConversion::toWxString(path);
290  lid->id = list_->GetItemCount() - 1;
291  list_->SetItemData(0, (long)lid);
292  }
293  // default sorting column is "Operations"
294  list_->SortItems(FUListCompareASC, 1);
296 
297  return true;
298 }

References acceptToList(), HDB::FUArchitecture::architecture(), HDB::HDBManager::fileName(), filterPatterns_, HDB::HDBManager::fuArchitectureByID(), HDB::HDBManager::fuArchitectureIDs(), fuArchitectures_, FUListCompareASC(), ListItemData::hdbId, ListItemData::id, ListItemData::latency, TTAMachine::HWOperation::latency(), list_, TTAMachine::HWOperation::name(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), ListItemData::operations, ListItemData::path, setColumnImage(), sortASC_, and WxConversion::toWxString().

Referenced by TransferDataToWindow().

Here is the call graph for this function:

◆ onAdd()

void AddFUFromHDBDialog::onAdd ( wxCommandEvent &  event)
private

Adds a new register file to the machine when "Add" button is pressed.

Definition at line 387 of file AddFUFromHDBDialog.cc.

387  {
388 
389  long item = -1;
390  item = list_->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
391  if ( item == -1 ) return;
392 
393  ListItemData* lid = (ListItemData*)list_->GetItemData(item);
394  int id = lid->id;
395  const FUArchitecture* arch =
396  MapTools::valueForKey<FUArchitecture*>(fuArchitectures_, id);
397 
398  // Copy the architecture of the selected function unit from HDB.
399  // Copying is done by saving and loading the FU state to an ObjectState
400  // object, because FunctionUnit class doesn't have a copy constructor.
401  ObjectState* fuState = arch->architecture().saveState();
402  FunctionUnit* fu = NULL;
403  try {
404  fu = new FunctionUnit(fuState);
405  delete fuState;
406  } catch (Exception& e) {
407  wxString message = _T("Error while adding function unit:\n");
408  message.Append(WxConversion::toWxString(e.errorMessage()));
409  ErrorDialog dialog(this, message);
410  dialog.ShowModal();
411  }
412 
413  int inIndex = 1;
414  int outIndex = 1;
415  int ioIndex = 1;
416  int unusedIndex = 1;
417 
418  // Rename ports.
419  for (int p = 0; p < fu->portCount(); p++) {
420  FUPort* port = dynamic_cast<FUPort*>(fu->port(p));
421  bool read = false;
422  bool write = false;
423 
424  // Check from the operation pipelines if the port is read or written.
425  for (int o = 0; o < fu->operationCount(); o++) {
426  const HWOperation* operation = fu->operation(o);
427  const ExecutionPipeline* pipeline = operation->pipeline();
428  for (int cycle = 0; cycle < operation->latency(); cycle++) {
429  if (pipeline->isPortRead(*port, cycle)) read = true;
430  if (pipeline->isPortWritten(*port, cycle)) write = true;
431  }
432  }
433 
434  // Generate new name for the port according to if it's read/written.
435  std::string portName = "";
436  if (read && write) {
437  portName = "io" + Conversion::toString(ioIndex);
438  ioIndex++;
439  } else if (read) {
440  portName = "in" + Conversion::toString(inIndex);
441  inIndex++;
442  } else if (write) {
443  portName = "out" + Conversion::toString(outIndex);
444  outIndex++;
445  } else {
446  portName = "unused" + Conversion::toString(unusedIndex);
447  unusedIndex++;
448  }
449  if (port->isTriggering()) {
450  portName = portName + "t";
451  }
452  port->setName(portName);
453  }
454 
455  // Rename the function unit. All operation names are appended to the
456  // function unit name.
457  std::string name;
458  for (int i = 0; i < fu->operationCount(); i++) {
459  if (i > 0) name += "_";
460  name += fu->operation(i)->name();
461  }
462 
464  std::string fuName = name;
465  int i = 1;
466  while (machine->functionUnitNavigator().hasItem(fuName)) {
467  fuName = name + "_" + Conversion::toString(i);
468  i++;
469  }
470 
471  fu->setName(fuName);
472  model_->pushToStack();
473  machine->addFunctionUnit(*fu);
475 
476 }

References TTAMachine::Machine::addFunctionUnit(), HDB::FUArchitecture::architecture(), Exception::errorMessage(), fuArchitectures_, TTAMachine::Machine::functionUnitNavigator(), Model::getMachine(), TTAMachine::Machine::Navigator< ComponentType >::hasItem(), ListItemData::id, TTAMachine::ExecutionPipeline::isPortRead(), TTAMachine::ExecutionPipeline::isPortWritten(), TTAMachine::FUPort::isTriggering(), TTAMachine::HWOperation::latency(), list_, machine, model_, TTAMachine::HWOperation::name(), Model::notifyObservers(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), TTAMachine::HWOperation::pipeline(), TTAMachine::FunctionUnit::port(), TTAMachine::Unit::portCount(), Model::pushToStack(), TTAMachine::FunctionUnit::saveState(), TTAMachine::Port::setName(), TTAMachine::FunctionUnit::setName(), Conversion::toString(), and WxConversion::toWxString().

Here is the call graph for this function:

◆ onClose()

void AddFUFromHDBDialog::onClose ( wxCommandEvent &  event)
private

Closes the dialog when the close button is pressed.

Definition at line 482 of file AddFUFromHDBDialog.cc.

482  {
483  Close();
484 }

◆ onColumnClick()

void AddFUFromHDBDialog::onColumnClick ( wxListEvent &  event)
private

Sorts HDB FU list according to clicked column.

Definition at line 536 of file AddFUFromHDBDialog.cc.

536  {
537 
538  int clickedColumn = event.GetColumn();
539 
540  if (clickedColumn == sortColumn_) {
541  sortASC_ = !sortASC_;
542  } else {
543  sortASC_ = true;
544  setColumnImage(sortColumn_, -1); // removes arrow from old column
545  sortColumn_ = clickedColumn;
546  }
547 
548  setColumnImage(clickedColumn, sortASC_);
549 
550  if (sortASC_) {
551  list_->SortItems(FUListCompareASC, clickedColumn);
552  } else {
553  list_->SortItems(FUListCompareDESC, clickedColumn);
554  }
555 }

References FUListCompareASC(), FUListCompareDESC(), list_, setColumnImage(), sortASC_, and sortColumn_.

Here is the call graph for this function:

◆ onFilterChange()

void AddFUFromHDBDialog::onFilterChange ( wxCommandEvent &  event)
private

Updates FU architecture list view accordingly to new filter rule.

Definition at line 353 of file AddFUFromHDBDialog.cc.

353  {
354  if (filterTimer_.Start(250, /*oneShot = */ true)) {
355  return;
356  }
357 
358  // Timer could not be started for some reason.
359  // Do filtering immediately instead.
361 }

References filterTimer_, and TransferDataToWindow().

Here is the call graph for this function:

◆ onFilterTimeOut()

void AddFUFromHDBDialog::onFilterTimeOut ( wxTimerEvent &  event)
private

Definition at line 365 of file AddFUFromHDBDialog.cc.

References TransferDataToWindow().

Here is the call graph for this function:

◆ onListSelectionChange()

void AddFUFromHDBDialog::onListSelectionChange ( wxListEvent &  event)
private

Enables and disables the delete button according to slot list selection.

Definition at line 374 of file AddFUFromHDBDialog.cc.

374  {
375  if (list_->GetSelectedItemCount() == 1) {
376  FindWindow(ID_ADD)->Enable();
377  } else {
378  FindWindow(ID_ADD)->Disable();
379  }
380 }

References ID_ADD, and list_.

◆ setColumnImage()

void AddFUFromHDBDialog::setColumnImage ( int  col,
int  image 
)
private

Sets sorting arrow image on selected column

Parameters
colColumn index to set the image
imageImage index in wxImageList

Definition at line 565 of file AddFUFromHDBDialog.cc.

565  {
566  wxListItem item;
567  item.SetMask(wxLIST_MASK_IMAGE);
568  item.SetImage(image);
569  list_->SetColumn(col, item);
570 }

References list_.

Referenced by loadHDB(), and onColumnClick().

◆ TransferDataToWindow()

bool AddFUFromHDBDialog::TransferDataToWindow ( )
privatevirtual

Transfers data from the HDBs to the dialog list widget.

Definition at line 181 of file AddFUFromHDBDialog.cc.

181  {
182 
184  list_->DeleteAllItems();
185 
186  if (filterCtrl_) {
187  std::string tmp = WxConversion::toString(filterCtrl_->GetValue());
188  std::istringstream rawFilterRules(tmp.c_str());
189  filterPatterns_.clear();
190  std::string keyword;
191  while (rawFilterRules >> keyword) {
192  filterPatterns_.push_back(keyword);
193  }
194  }
195 
196  HDBRegistry& registry = HDBRegistry::instance();
197  registry.loadFromSearchPaths();
198 
199  for (int i = 0; i < registry.hdbCount(); i++) {
200  loadHDB(registry.hdb(i));
201  }
202 
203  wxString message;
204  for (int i = 0; i < registry.hdbErrorCount(); i++) {
205  message.Append(WxConversion::toWxString(registry.hdbErrorMessage(i)));
206  message.Append(_T("\n"));
207  WarningDialog dialog(this, message);
208  dialog.ShowModal();
209  }
210 
211  if (registry.hdbCount() < 1) {
212  wxString message = _T("No HDBs found in HDB search paths.");
213  WarningDialog dialog(this, message);
214  dialog.ShowModal();
215  }
216 
217  list_->SetColumnWidth(1, 200);
218  list_->SetColumnWidth(4, wxLIST_AUTOSIZE);
219  return wxDialog::TransferDataToWindow();
220 }

References MapTools::deleteAllValues(), filterCtrl_, filterPatterns_, fuArchitectures_, HDB::HDBRegistry::hdb(), HDB::HDBRegistry::hdbCount(), HDB::HDBRegistry::hdbErrorCount(), HDB::HDBRegistry::hdbErrorMessage(), list_, HDB::HDBRegistry::loadFromSearchPaths(), loadHDB(), WxConversion::toString(), and WxConversion::toWxString().

Referenced by onFilterChange(), and onFilterTimeOut().

Here is the call graph for this function:

Member Data Documentation

◆ filterCtrl_

wxSearchCtrl* AddFUFromHDBDialog::filterCtrl_ = nullptr
private

The list filter text control.

Definition at line 92 of file AddFUFromHDBDialog.hh.

Referenced by createContents(), and TransferDataToWindow().

◆ filterPatterns_

std::vector<std::string> AddFUFromHDBDialog::filterPatterns_
private

Keywords to filter HDB entries.

Definition at line 94 of file AddFUFromHDBDialog.hh.

Referenced by loadHDB(), and TransferDataToWindow().

◆ filterTimer_

wxTimer AddFUFromHDBDialog::filterTimer_
private

Timer to postpone filtering while typing filter patterns.

Definition at line 96 of file AddFUFromHDBDialog.hh.

Referenced by onFilterChange().

◆ fuArchitectures_

std::map<int, HDB::FUArchitecture*> AddFUFromHDBDialog::fuArchitectures_
private

Map of iu architectures displayed in the dialog list.

Definition at line 90 of file AddFUFromHDBDialog.hh.

Referenced by loadHDB(), onAdd(), TransferDataToWindow(), and ~AddFUFromHDBDialog().

◆ HDB_FILE_FILTER

const wxString AddFUFromHDBDialog::HDB_FILE_FILTER = _T("*.hdb")
staticprivate

File filter for HDB files.

Definition at line 112 of file AddFUFromHDBDialog.hh.

◆ list_

wxListCtrl* AddFUFromHDBDialog::list_
private

Immediate slot list widget.

Definition at line 88 of file AddFUFromHDBDialog.hh.

Referenced by AddFUFromHDBDialog(), loadHDB(), onAdd(), onColumnClick(), onListSelectionChange(), setColumnImage(), and TransferDataToWindow().

◆ model_

Model* AddFUFromHDBDialog::model_
private

Model of the current adf file.

Definition at line 86 of file AddFUFromHDBDialog.hh.

Referenced by onAdd().

◆ sortASC_

bool AddFUFromHDBDialog::sortASC_
private

Definition at line 99 of file AddFUFromHDBDialog.hh.

Referenced by loadHDB(), and onColumnClick().

◆ sortColumn_

int AddFUFromHDBDialog::sortColumn_
private

Definition at line 98 of file AddFUFromHDBDialog.hh.

Referenced by onColumnClick().


The documentation for this class was generated from the following files:
AddFUFromHDBDialog::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition: AddFUFromHDBDialog.cc:496
HDB::FUArchitecture
Definition: FUArchitecture.hh:55
WarningDialog
Definition: WarningDialog.hh:42
AddFUFromHDBDialog::setColumnImage
void setColumnImage(int col, int image)
Definition: AddFUFromHDBDialog.cc:565
HDB::HDBManager::fuArchitectureByID
virtual FUArchitecture * fuArchitectureByID(RowID id) const
Definition: HDBManager.cc:2940
AddFUFromHDBDialog::acceptToList
bool acceptToList(const std::string hdbFilePath, const HDB::FUArchitecture &arch, const std::vector< std::string > &filterList)
Definition: AddFUFromHDBDialog.cc:308
WxConversion::toWxString
static wxString toWxString(const std::string &source)
machine
TTAMachine::Machine * machine
the architecture definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:59
TTAMachine::HWOperation
Definition: HWOperation.hh:52
AddFUFromHDBDialog::sortASC_
bool sortASC_
Definition: AddFUFromHDBDialog.hh:99
HDB::FUArchitecture::architecture
TTAMachine::FunctionUnit & architecture() const
Definition: FUArchitecture.cc:131
MapTools::deleteAllValues
static void deleteAllValues(MapType &aMap)
ListItemData::operations
wxString operations
Definition: AddFUFromHDBDialog.hh:50
AddFUFromHDBDialog::list_
wxListCtrl * list_
Immediate slot list widget.
Definition: AddFUFromHDBDialog.hh:88
ObjectState
Definition: ObjectState.hh:59
AddFUFromHDBDialog::ID_FILTER_LABEL
@ ID_FILTER_LABEL
Definition: AddFUFromHDBDialog.hh:103
HDB::HDBRegistry::hdb
CachedHDBManager & hdb(const std::string fileName)
Definition: HDBRegistry.cc:80
TTAMachine::FunctionUnit::port
virtual BaseFUPort * port(const std::string &name) const
Definition: FunctionUnit.cc:145
FindWindow
Definition: FindWindow.hh:49
AddFUFromHDBDialog::loadHDB
bool loadHDB(const HDB::HDBManager &manager)
Definition: AddFUFromHDBDialog.cc:229
HDB::HDBRegistry::hdbErrorMessage
std::string hdbErrorMessage(unsigned int index)
Definition: HDBRegistry.cc:251
TTAMachine::FUPort::isTriggering
virtual bool isTriggering() const
Definition: FUPort.cc:182
Conversion::toString
static std::string toString(const T &source)
Model::pushToStack
void pushToStack()
Definition: Model.cc:167
AddFUFromHDBDialog::filterPatterns_
std::vector< std::string > filterPatterns_
Keywords to filter HDB entries.
Definition: AddFUFromHDBDialog.hh:94
ListItemData::latency
int latency
Definition: AddFUFromHDBDialog.hh:49
TTAMachine::Port::setName
virtual void setName(const std::string &name)
Definition: Port.cc:155
Model::notifyObservers
void notifyObservers(bool modified=true)
Definition: Model.cc:152
TTAMachine::FunctionUnit
Definition: FunctionUnit.hh:55
TTAMachine::FUPort
Definition: FUPort.hh:46
ListItemData::id
int id
Definition: AddFUFromHDBDialog.hh:48
HDB::HDBRegistry
Definition: HDBRegistry.hh:46
AddFUFromHDBDialog::model_
Model * model_
Model of the current adf file.
Definition: AddFUFromHDBDialog.hh:86
HDB::HDBManager::fuArchitectureIDs
std::set< RowID > fuArchitectureIDs() const
Definition: HDBManager.cc:2163
FUListCompareDESC
int wxCALLBACK FUListCompareDESC(wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)
Definition: AddFUFromHDBDialog.cc:106
ErrorDialog
Definition: ErrorDialog.hh:42
TTAMachine::HWOperation::name
const std::string & name() const
Definition: HWOperation.cc:141
AddFUFromHDBDialog::TransferDataToWindow
virtual bool TransferDataToWindow()
Definition: AddFUFromHDBDialog.cc:181
TTAMachine::Machine::Navigator::hasItem
bool hasItem(const std::string &name) const
AddFUFromHDBDialog::filterCtrl_
wxSearchCtrl * filterCtrl_
The list filter text control.
Definition: AddFUFromHDBDialog.hh:92
TTAMachine::ExecutionPipeline::isPortWritten
bool isPortWritten(const FUPort &port, int cycle) const
Definition: ExecutionPipeline.cc:386
TTAMachine::Machine::functionUnitNavigator
virtual FunctionUnitNavigator functionUnitNavigator() const
Definition: Machine.cc:380
AddFUFromHDBDialog::ID_CLOSE
@ ID_CLOSE
Definition: AddFUFromHDBDialog.hh:106
AddFUFromHDBDialog::ID_FILTER_TIMER
@ ID_FILTER_TIMER
Definition: AddFUFromHDBDialog.hh:108
TTAMachine::FunctionUnit::operationCount
virtual int operationCount() const
Definition: FunctionUnit.cc:419
Exception
Definition: Exception.hh:54
TTAMachine::FunctionUnit::saveState
virtual ObjectState * saveState() const
Definition: FunctionUnit.cc:677
TTAMachine::Unit::portCount
virtual int portCount() const
Definition: Unit.cc:135
Exception::errorMessage
std::string errorMessage() const
Definition: Exception.cc:123
HDB::HDBRegistry::hdbCount
int hdbCount()
Definition: HDBRegistry.cc:135
AddFUFromHDBDialog::ID_LIST
@ ID_LIST
Definition: AddFUFromHDBDialog.hh:102
FileSystem::DIRECTORY_SEPARATOR
static const std::string DIRECTORY_SEPARATOR
Definition: FileSystem.hh:189
TTAMachine::ExecutionPipeline::isPortRead
bool isPortRead(const FUPort &port, int cycle) const
Definition: ExecutionPipeline.cc:362
HDB::HDBManager::fileName
std::string fileName() const
Definition: HDBManager.cc:612
ProDeConstants::ICON_SORT_ASC
static const std::string ICON_SORT_ASC
Icon location for ascending sort.
Definition: ProDeConstants.hh:401
HDB::HDBRegistry::hdbErrorCount
int hdbErrorCount()
Definition: HDBRegistry.cc:238
Environment::iconDirPath
static std::string iconDirPath()
Definition: Environment.cc:225
TTAMachine::Machine::addFunctionUnit
virtual void addFunctionUnit(FunctionUnit &unit)
Definition: Machine.cc:202
ProDeConstants::ICON_SORT_DESC
static const std::string ICON_SORT_DESC
Icon location for descending sort.
Definition: ProDeConstants.hh:403
AddFUFromHDBDialog::sortColumn_
int sortColumn_
Definition: AddFUFromHDBDialog.hh:98
ListItemData
Definition: AddFUFromHDBDialog.hh:47
FUListCompareASC
int wxCALLBACK FUListCompareASC(wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)
Definition: AddFUFromHDBDialog.cc:86
AddFUFromHDBDialog::ID_FILTER_TEXTCTRL
@ ID_FILTER_TEXTCTRL
Definition: AddFUFromHDBDialog.hh:104
AddFUFromHDBDialog::ID_ADD
@ ID_ADD
Definition: AddFUFromHDBDialog.hh:105
HDB::HDBRegistry::loadFromSearchPaths
void loadFromSearchPaths()
Definition: HDBRegistry.cc:146
TTAMachine::HWOperation::pipeline
ExecutionPipeline * pipeline() const
Definition: HWOperation.cc:201
TTAMachine::ExecutionPipeline
Definition: ExecutionPipeline.hh:55
AddFUFromHDBDialog::filterTimer_
wxTimer filterTimer_
Timer to postpone filtering while typing filter patterns.
Definition: AddFUFromHDBDialog.hh:96
TTAMachine::FunctionUnit::operation
virtual HWOperation * operation(const std::string &name) const
Definition: FunctionUnit.cc:363
TTAMachine::HWOperation::latency
int latency() const
Definition: HWOperation.cc:216
AddFUFromHDBDialog::fuArchitectures_
std::map< int, HDB::FUArchitecture * > fuArchitectures_
Map of iu architectures displayed in the dialog list.
Definition: AddFUFromHDBDialog.hh:90
ListItemData::path
wxString path
Definition: AddFUFromHDBDialog.hh:52
WxConversion::toString
static std::string toString(const wxString &source)
TTAMachine::FunctionUnit::setName
virtual void setName(const std::string &name)
Definition: FunctionUnit.cc:118
ListItemData::hdbId
int hdbId
Definition: AddFUFromHDBDialog.hh:51
AddFUFromHDBDialog::ID_LINE
@ ID_LINE
Definition: AddFUFromHDBDialog.hh:107
Model::getMachine
TTAMachine::Machine * getMachine()
Definition: Model.cc:88
TTAMachine::Machine
Definition: Machine.hh:73