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

#include <AutoSelectImplementationsDialog.hh>

Inheritance diagram for AutoSelectImplementationsDialog:
Inheritance graph
Collaboration diagram for AutoSelectImplementationsDialog:
Collaboration graph

Classes

struct  HdbIdPair
 

Public Member Functions

 AutoSelectImplementationsDialog (wxWindow *parent, TTAMachine::Machine &machine, IDF::MachineImplementation &impl)
 
virtual ~AutoSelectImplementationsDialog ()
 

Private Types

enum  {
  ID_HDB_CHOICE, ID_BROWSE, ID_LINE, ID_TEXT,
  ID_FIND, ID_RF, ID_IU, ID_FU,
  ID_CLOSE
}
 

Private Member Functions

wxSizer * createContents (wxWindow *parent, bool call_fit, bool set_sizer)
 
void onBrowse (wxCommandEvent &event)
 
void onClose (wxCommandEvent &event)
 
void onFind (wxCommandEvent &event)
 
void findRFImplementations (HDB::HDBManager &hdb)
 
void findIUImplementations (HDB::HDBManager &hdb)
 
void findFUImplementations (HDB::HDBManager &hdb)
 

Private Attributes

TTAMachine::Machinemachine_
 Machine containing navigators fo RFs, IUs and FUs. More...
 
IDF::MachineImplementationimpl_
 
wxChoice * hdbChoice_
 Choice selection for list of HDB files. More...
 
wxCheckBox * cboxRF_
 Checkbox widget for register file flag. More...
 
wxCheckBox * cboxIU_
 Checkbox widget for immediate unit flag. More...
 
wxCheckBox * cboxFU_
 Checkbox widget for function unit flag. More...
 
std::set< TCEStringhdbs_
 Set for hdb paths. More...
 
std::map< const IDF::UnitImplementationLocation *, HdbIdPairfoundRF_
 
std::map< const IDF::UnitImplementationLocation *, HdbIdPairfoundIU_
 
std::map< const IDF::UnitImplementationLocation *, HdbIdPairfoundFU_
 

Static Private Attributes

static const std::string defaultHDB_
 

Detailed Description

Dialog for searching and selecting implementations for empty RF/IU/FU units automatically from user chosen HDB file.

Definition at line 59 of file AutoSelectImplementationsDialog.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
ID_HDB_CHOICE 
ID_BROWSE 
ID_LINE 
ID_TEXT 
ID_FIND 
ID_RF 
ID_IU 
ID_FU 
ID_CLOSE 

Definition at line 111 of file AutoSelectImplementationsDialog.hh.

111  {
113  ID_BROWSE,
114  ID_LINE,
115  ID_TEXT,
116  ID_FIND,
117  ID_RF,
118  ID_IU,
119  ID_FU,
120  ID_CLOSE
121  };

Constructor & Destructor Documentation

◆ AutoSelectImplementationsDialog()

AutoSelectImplementationsDialog::AutoSelectImplementationsDialog ( wxWindow *  parent,
TTAMachine::Machine machine,
IDF::MachineImplementation impl 
)

The Constructor.

Parameters
parentParent window of the dialog.
machineCurrent machine.
implImplementation of the machine.

Definition at line 69 of file AutoSelectImplementationsDialog.cc.

72  :
73  wxDialog(parent, -1, _T("Auto Select Implementations"), wxDefaultPosition),
75  impl_(impl) {
76 
77  createContents(this, true, true);
78 
79  hdbChoice_ = dynamic_cast<wxChoice*>(FindWindow(ID_HDB_CHOICE));
80  cboxRF_ = dynamic_cast<wxCheckBox*>(FindWindow(ID_RF));
81  cboxIU_ = dynamic_cast<wxCheckBox*>(FindWindow(ID_IU));
82  cboxFU_ = dynamic_cast<wxCheckBox*>(FindWindow(ID_FU));
83 
84  // set all checkboxes as selected
85  cboxRF_->SetValue(true);
86  cboxIU_->SetValue(true);
87  cboxFU_->SetValue(true);
88 
89  // add available HDBs to the choice list
90  HDBRegistry& registry = HDBRegistry::instance();
91  registry.loadFromSearchPaths();
92  for (int i = 0; i < registry.hdbCount(); i++) {
93  hdbs_.insert(registry.hdbPath(i));
94  }
95  if (!hdbs_.empty()) {
96  std::set<TCEString>::iterator iter = hdbs_.begin();
97  bool defaultHDBFound = false;
98  int selection = 0;
99  for (; iter != hdbs_.end(); iter++) {
100  std::string shortPath = Environment::shortHDBPath(*iter);
101  hdbChoice_->Append(WxConversion::toWxString(shortPath));
102  if (!defaultHDBFound && StringTools::endsWith(*iter, defaultHDB_)) {
103  selection = hdbChoice_->GetCount() - 1;
104  defaultHDBFound = true;
105  }
106  }
107  hdbChoice_->SetSelection(selection);
108  }
109 }

References StringTools::endsWith(), HDB::HDBRegistry::hdbCount(), HDB::HDBRegistry::hdbPath(), HDB::HDBRegistry::loadFromSearchPaths(), Environment::shortHDBPath(), and WxConversion::toWxString().

Here is the call graph for this function:

◆ ~AutoSelectImplementationsDialog()

AutoSelectImplementationsDialog::~AutoSelectImplementationsDialog ( )
virtual

The Destructor.

Definition at line 114 of file AutoSelectImplementationsDialog.cc.

114  {
115 }

Member Function Documentation

◆ createContents()

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

Creates the dialog widgets.

Definition at line 438 of file AutoSelectImplementationsDialog.cc.

441  {
442 
443  wxFlexGridSizer *item0 = new wxFlexGridSizer( 1, 0, 0 );
444  item0->AddGrowableCol( 0 );
445  item0->AddGrowableRow( 1 );
446 
447  wxBoxSizer *item1 = new wxBoxSizer( wxHORIZONTAL );
448 
449  wxStaticText *itemText = new wxStaticText( parent, ID_TEXT, wxT("HDB file:"), wxDefaultPosition, wxDefaultSize, 0 );
450  item1->Add( itemText, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
451 
452  wxString *strs2 = (wxString*) NULL;
453  wxChoice *item2 = new wxChoice( parent, ID_HDB_CHOICE, wxDefaultPosition, wxSize(250,-1), 0, strs2, 0 );
454  item1->Add( item2, 0, wxALIGN_CENTER|wxALL, 5 );
455 
456  wxButton *item3 = new wxButton( parent, ID_BROWSE, wxT("Browse..."), wxDefaultPosition, wxDefaultSize, 0 );
457  item1->Add( item3, 0, wxALIGN_CENTER|wxALL, 5 );
458 
459  wxButton *buttonFind = new wxButton( parent, ID_FIND, wxT("Find"), wxDefaultPosition, wxDefaultSize, 0 );
460  item1->Add( buttonFind, 0, wxALIGN_CENTER|wxALL, 5 );
461 
462  item0->Add( item1, 0, wxALIGN_CENTER|wxALL, 5 );
463 
464  wxBoxSizer *cboxSizer = new wxBoxSizer( wxHORIZONTAL );
465 
466  wxStaticText *cboxText = new wxStaticText( parent, ID_TEXT, wxT("Do selections for:"), wxDefaultPosition, wxDefaultSize, 0 );
467  cboxSizer->Add( cboxText, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
468 
469  wxCheckBox *cboxRF = new wxCheckBox( parent, ID_RF, wxT("Register Files"), wxDefaultPosition, wxDefaultSize, 0 );
470  cboxSizer->Add( cboxRF, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
471 
472  wxCheckBox *cboxIU = new wxCheckBox( parent, ID_IU, wxT("Immediate Units"), wxDefaultPosition, wxDefaultSize, 0 );
473  cboxSizer->Add( cboxIU, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
474 
475  wxCheckBox *cboxFU = new wxCheckBox( parent, ID_FU, wxT("Function Units"), wxDefaultPosition, wxDefaultSize, 0 );
476  cboxSizer->Add( cboxFU, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
477 
478  item0->Add( cboxSizer, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
479 
480  wxStaticLine *item5 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
481  item0->Add( item5, 0, wxGROW|wxALL, 5 );
482 
483  wxBoxSizer *item6 = new wxBoxSizer( wxHORIZONTAL );
484 
485  wxButton *closeButton = new wxButton( parent, ID_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
486  item6->Add( closeButton, 0, wxALIGN_CENTER|wxALL, 5 );
487 
488  item0->Add( item6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
489 
490 
491  if (set_sizer)
492  {
493  parent->SetSizer( item0 );
494  if (call_fit)
495  item0->SetSizeHints( parent );
496  }
497 
498  return item0;
499 }

◆ findFUImplementations()

void AutoSelectImplementationsDialog::findFUImplementations ( HDB::HDBManager hdb)
private

Function that searches FU implementations from given HDB file.

Parameters
hdbHDB file from which implementations are searched.

Definition at line 394 of file AutoSelectImplementationsDialog.cc.

394  {
395 
396  // this component searches proper implementations for function units
399  // add the HDB file to selector for searching
400  selector->addHDB(hdb);
401 
402  std::map<const FUImplementationLocation*, CostEstimates*> fuImpls;
403  std::map<const FUImplementationLocation*, CostEstimates*>::iterator it;
404 
405  // loop through machine's function units
406  int fuCount = machine_.functionUnitNavigator().count();
407  for (int i = 0; i < fuCount; ++i) {
409  FunctionUnit* fu = dynamic_cast<FunctionUnit*>(comp);
410 
411  // if function unit doesn't have an implementation...
412  if (fu != NULL && !impl_.hasFUImplementation(fu->name())) {
413  // ...try to find one using the selector component
414  fuImpls = selector->fuImplementations(*fu);
415  it = fuImpls.begin();
416 
417  // if an implementation was found, save it into the std::map
418  if (fuImpls.size() > 0 && it->first != NULL) {
419  const FUImplementationLocation* location = it->first;
420  HdbIdPair locationInfo;
421  locationInfo.hdbFile = hdb.fileName();
422  locationInfo.id = location->id();
423 
424  foundFU_.insert(
425  std::pair<const FUImplementationLocation*, HdbIdPair>(
426  location, locationInfo));
427  }
428  }
429  }
430 
431  delete selector;
432 }

References ComponentImplementationSelector::addHDB(), HDB::HDBManager::fileName(), ComponentImplementationSelector::fuImplementations(), AutoSelectImplementationsDialog::HdbIdPair::hdbFile, IDF::UnitImplementationLocation::id(), AutoSelectImplementationsDialog::HdbIdPair::id, and TTAMachine::Component::name().

Here is the call graph for this function:

◆ findIUImplementations()

void AutoSelectImplementationsDialog::findIUImplementations ( HDB::HDBManager hdb)
private

Function that searches IU implementations from given HDB file.

Parameters
hdbHDB file from which implementations are searched.

Definition at line 348 of file AutoSelectImplementationsDialog.cc.

348  {
349 
350  // this component searches proper implementations for immediate units
353  // add the HDB file to selector for searching
354  selector->addHDB(hdb);
355 
356  std::map<const RFImplementationLocation*, CostEstimates*> iuImpls;
357  std::map<const RFImplementationLocation*, CostEstimates*>::iterator it;
358 
359  // loop through machine's immediate units
360  int iuCount = machine_.immediateUnitNavigator().count();
361  for (int i = 0; i < iuCount; ++i) {
363  ImmediateUnit* iu = dynamic_cast<ImmediateUnit*>(comp);
364 
365  // if immediate unit doesn't have an implementation...
366  if (iu != NULL && !impl_.hasIUImplementation(iu->name())) {
367  // ...try to find one using the selector component
368  iuImpls = selector->iuImplementations(*iu);
369  it = iuImpls.begin();
370 
371  // if an implementation was found, save it into the std::map
372  if (iuImpls.size() > 0 && it->first != NULL) {
373  const RFImplementationLocation* location = it->first;
374  HdbIdPair locationInfo;
375  locationInfo.hdbFile = hdb.fileName();
376  locationInfo.id = location->id();
377 
378  foundIU_.insert(
379  std::pair<const RFImplementationLocation*, HdbIdPair>(
380  location, locationInfo));
381  }
382  }
383  }
384 
385  delete selector;
386 }

References ComponentImplementationSelector::addHDB(), HDB::HDBManager::fileName(), AutoSelectImplementationsDialog::HdbIdPair::hdbFile, IDF::UnitImplementationLocation::id(), AutoSelectImplementationsDialog::HdbIdPair::id, ComponentImplementationSelector::iuImplementations(), and TTAMachine::Component::name().

Here is the call graph for this function:

◆ findRFImplementations()

void AutoSelectImplementationsDialog::findRFImplementations ( HDB::HDBManager hdb)
private

Function that searches RF implementations from given HDB file.

Parameters
hdbHDB file from which implementations are searched.

Definition at line 302 of file AutoSelectImplementationsDialog.cc.

302  {
303 
304  // this component searches proper implementations for register files
307  // add the HDB file to selector for searching
308  selector->addHDB(hdb);
309 
310  std::map<const RFImplementationLocation*, CostEstimates*> rfImpls;
311  std::map<const RFImplementationLocation*, CostEstimates*>::iterator it;
312 
313  // loop through machine's register files
314  int rfCount = machine_.registerFileNavigator().count();
315  for (int i = 0; i < rfCount; ++i) {
317  RegisterFile* rf = dynamic_cast<RegisterFile*>(comp);
318 
319  // if register file doesn't have an implementation...
320  if (rf != NULL && !impl_.hasRFImplementation(rf->name())) {
321  // ...try to find one using the selector component
322  rfImpls = selector->rfImplementations(*rf, rf->isUsedAsGuard());
323  it = rfImpls.begin();
324 
325  // if an implementation was found, save it into the std::map
326  if (rfImpls.size() > 0 && it->first != NULL) {
327  const RFImplementationLocation* location = it->first;
328  HdbIdPair locationInfo;
329  locationInfo.hdbFile = hdb.fileName();
330  locationInfo.id = location->id();
331 
332  foundRF_.insert(
333  std::pair<const RFImplementationLocation*, HdbIdPair>(
334  location, locationInfo));
335  }
336  }
337  }
338 
339  delete selector;
340 }

References ComponentImplementationSelector::addHDB(), HDB::HDBManager::fileName(), AutoSelectImplementationsDialog::HdbIdPair::hdbFile, IDF::UnitImplementationLocation::id(), AutoSelectImplementationsDialog::HdbIdPair::id, TTAMachine::RegisterFile::isUsedAsGuard(), TTAMachine::Component::name(), and ComponentImplementationSelector::rfImplementations().

Here is the call graph for this function:

◆ onBrowse()

void AutoSelectImplementationsDialog::onBrowse ( wxCommandEvent &  event)
private

File dialog for choosing a custom HDB file.

Definition at line 121 of file AutoSelectImplementationsDialog.cc.

121  {
122 
123  wxFileDialog dialog(
124  this, _T("Choose a HDB file containing the implementation"),
125  _T(""), _T(""), _T("HDBs|*.hdb|All files|*.*"),
126  (wxOPEN | wxFILE_MUST_EXIST));
127 
128  if (dialog.ShowModal() == wxID_OK) {
129  std::string hdb = std::string(dialog.GetPath().mb_str());
130  hdb = Environment::shortHDBPath(hdb);
131  auto wxHDB = WxConversion::toWxString(hdb);
132  int item = hdbChoice_->FindString(wxHDB);
133  if (item == wxNOT_FOUND) {
134  item = hdbChoice_->Append(wxHDB);
135  }
136  hdbChoice_->Select(item);
137  }
138 }

References Environment::shortHDBPath(), and WxConversion::toWxString().

Here is the call graph for this function:

◆ onClose()

void AutoSelectImplementationsDialog::onClose ( wxCommandEvent &  event)
private

Exit the dialog.

Definition at line 144 of file AutoSelectImplementationsDialog.cc.

144  {
145  Close();
146 }

◆ onFind()

void AutoSelectImplementationsDialog::onFind ( wxCommandEvent &  event)
private

Searches implementations for empty RF/IU/FU units.

After search is over and if implementations were found, user is asked if he/she wants to integrate the found implementations to the current machine implementation.

Definition at line 156 of file AutoSelectImplementationsDialog.cc.

156  {
157 
158  foundRF_.clear();
159  foundIU_.clear();
160  foundFU_.clear();
161 
162  // if none of the check boxes are selected, no point in searching
163  if (!cboxRF_->GetValue() && !cboxIU_->GetValue() && !cboxFU_->GetValue()) {
164  return;
165  }
166 
167  // extract path of the HDB file that user has chosen
168  TCEString path = WxConversion::toString(hdbChoice_->GetStringSelection());
169  path = Environment::longHDBPath(path);
170  // make sure the file exists
171  if (!FileSystem::fileExists(path)) {
172  wxString message = _T("Error: path ");
173  message.append(WxConversion::toWxString(path));
174  message.append(_T(" could not be found!\n"));
175  ErrorDialog dialog(this, message);
176  dialog.ShowModal();
177  return;
178  }
179 
180  // pass the hdb file to search functions for implementation searching
181  try {
182  HDBManager& hdb = HDBRegistry::instance().hdb(path);
183 
184  if (cboxRF_->GetValue()) {
186  }
187  if (cboxIU_->GetValue()) {
189  }
190  if (cboxFU_->GetValue()) {
192  }
193  } catch (Exception& e) {
194  wxString message = _T("");
195  message.append(WxConversion::toWxString(e.errorMessage()));
196  ErrorDialog dialog(this, message);
197  dialog.ShowModal();
198  return;
199  }
200 
201  unsigned int rfCount = static_cast<unsigned int>(foundRF_.size());
202  unsigned int iuCount = static_cast<unsigned int>(foundIU_.size());
203  unsigned int fuCount = static_cast<unsigned int>(foundFU_.size());
204 
205  // form a message describing how many implementations were found
206  wxString message = _T("");
207  message.append(WxConversion::toWxString(rfCount+iuCount+fuCount));
208  message.append(_T(" implementations were found for "));
209  if (cboxRF_->GetValue()) {
210  message.append(_T("RF ("));
211  message.append(WxConversion::toWxString(rfCount));
212  message.append(_T(")"));
213  }
214  if (cboxIU_->GetValue()) {
215  if (cboxRF_->GetValue()) {
216  message.append(_T(" / "));
217  }
218  message.append(_T("IU ("));
219  message.append(WxConversion::toWxString(iuCount));
220  message.append(_T(")"));
221  }
222  if (cboxFU_->GetValue()) {
223  if (cboxIU_->GetValue() || cboxRF_->GetValue()) {
224  message.append(_T(" / "));
225  }
226  message.append(_T("FU ("));
227  message.append(WxConversion::toWxString(fuCount));
228  message.append(_T(")"));
229  }
230  message.append(_T(" units that have no implementations yet.\n\n"));
231 
232  // if no implementations were found, prompt user and exit
233  if ((rfCount+iuCount+fuCount) == 0) {
234  WarningDialog dialog(this, message);
235  dialog.ShowModal();
236  return;
237  }
238 
239  message.append(_T("Press Yes to integrate found implementations into"));
240  message.append(_T(" the empty units.\n"));
241 
242  // ask if user wants to save the found implementations
243  ConfirmDialog dialog(this, message);
244  if (dialog.ShowModal() != wxID_YES) {
245  return;
246  }
247 
248  // add all the newly found implementations to the machine implementation
249 
250  // steps: set the new HDB file and ID pair for the unit implementation,
251  // and then add the unit implementation to the machine implementation
252  std::map<const RFImplementationLocation*, HdbIdPair>::iterator itRF;
253  for (itRF = foundRF_.begin(); itRF != foundRF_.end(); ++itRF) {
254  const RFImplementationLocation* unit = itRF->first;
255  HdbIdPair hdbID = itRF->second;
257  hdbID.hdbFile, hdbID.id, unit->unitName());
258  try {
260  } catch (...) {
261  // do nothing if the implementation could not be added
262  }
263  }
264 
265  std::map<const RFImplementationLocation*, HdbIdPair>::iterator itIU;
266  for (itIU = foundIU_.begin(); itIU != foundIU_.end(); ++itIU) {
267  const RFImplementationLocation* unit = itIU->first;
268  HdbIdPair hdbID = itIU->second;
270  hdbID.hdbFile, hdbID.id, unit->unitName());
271  try {
273  } catch (...) {
274  // do nothing if the implementation could not be added
275  }
276  }
277 
278  std::map<const FUImplementationLocation*, HdbIdPair>::iterator itFU;
279  for (itFU = foundFU_.begin(); itFU != foundFU_.end(); ++itFU) {
280  const FUImplementationLocation* unit = itFU->first;
281  HdbIdPair hdbID = itFU->second;
283  hdbID.hdbFile, hdbID.id, unit->unitName());
284  try {
286  } catch (...) {
287  // do nothing if the implementation could not be added
288  }
289  }
290 
291  // exit to update the RF/IU/FU implementation list view for user
292  wxCommandEvent dummy;
293  onClose(dummy);
294 }

References dummy, Exception::errorMessage(), FileSystem::fileExists(), AutoSelectImplementationsDialog::HdbIdPair::hdbFile, AutoSelectImplementationsDialog::HdbIdPair::id, Environment::longHDBPath(), WxConversion::toString(), WxConversion::toWxString(), and IDF::UnitImplementationLocation::unitName().

Here is the call graph for this function:

Member Data Documentation

◆ cboxFU_

wxCheckBox* AutoSelectImplementationsDialog::cboxFU_
private

Checkbox widget for function unit flag.

Definition at line 91 of file AutoSelectImplementationsDialog.hh.

◆ cboxIU_

wxCheckBox* AutoSelectImplementationsDialog::cboxIU_
private

Checkbox widget for immediate unit flag.

Definition at line 89 of file AutoSelectImplementationsDialog.hh.

◆ cboxRF_

wxCheckBox* AutoSelectImplementationsDialog::cboxRF_
private

Checkbox widget for register file flag.

Definition at line 87 of file AutoSelectImplementationsDialog.hh.

◆ defaultHDB_

const std::string AutoSelectImplementationsDialog::defaultHDB_
staticprivate

Definition at line 97 of file AutoSelectImplementationsDialog.hh.

◆ foundFU_

std::map<const IDF::UnitImplementationLocation*, HdbIdPair> AutoSelectImplementationsDialog::foundFU_
private

Definition at line 109 of file AutoSelectImplementationsDialog.hh.

◆ foundIU_

std::map<const IDF::UnitImplementationLocation*, HdbIdPair> AutoSelectImplementationsDialog::foundIU_
private

Definition at line 108 of file AutoSelectImplementationsDialog.hh.

◆ foundRF_

std::map<const IDF::UnitImplementationLocation*, HdbIdPair> AutoSelectImplementationsDialog::foundRF_
private

Definition at line 107 of file AutoSelectImplementationsDialog.hh.

◆ hdbChoice_

wxChoice* AutoSelectImplementationsDialog::hdbChoice_
private

Choice selection for list of HDB files.

Definition at line 84 of file AutoSelectImplementationsDialog.hh.

◆ hdbs_

std::set<TCEString> AutoSelectImplementationsDialog::hdbs_
private

Set for hdb paths.

Definition at line 94 of file AutoSelectImplementationsDialog.hh.

◆ impl_

IDF::MachineImplementation& AutoSelectImplementationsDialog::impl_
private

Definition at line 81 of file AutoSelectImplementationsDialog.hh.

◆ machine_

TTAMachine::Machine& AutoSelectImplementationsDialog::machine_
private

Machine containing navigators fo RFs, IUs and FUs.

Definition at line 79 of file AutoSelectImplementationsDialog.hh.


The documentation for this class was generated from the following files:
IDF::UnitImplementationLocation
Definition: UnitImplementationLocation.hh:48
StringTools::endsWith
static bool endsWith(const std::string &source, const std::string &searchString)
Definition: StringTools.cc:126
AutoSelectImplementationsDialog::cboxIU_
wxCheckBox * cboxIU_
Checkbox widget for immediate unit flag.
Definition: AutoSelectImplementationsDialog.hh:89
WarningDialog
Definition: WarningDialog.hh:42
IDF::RFImplementationLocation
UnitImplementationLocation RFImplementationLocation
Definition: ComponentImplementationSelector.hh:57
IDF::MachineImplementation::hasRFImplementation
bool hasRFImplementation(const std::string &unitName) const
Definition: MachineImplementation.cc:245
WxConversion::toWxString
static wxString toWxString(const std::string &source)
TTAMachine::Component::name
virtual TCEString name() const
Definition: MachinePart.cc:125
ComponentImplementationSelector::addHDB
void addHDB(const HDB::HDBManager &hdb)
Definition: ComponentImplementationSelector.cc:83
machine
TTAMachine::Machine * machine
the architecture definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:59
AutoSelectImplementationsDialog::findRFImplementations
void findRFImplementations(HDB::HDBManager &hdb)
Definition: AutoSelectImplementationsDialog.cc:302
AutoSelectImplementationsDialog::ID_CLOSE
@ ID_CLOSE
Definition: AutoSelectImplementationsDialog.hh:120
AutoSelectImplementationsDialog::findFUImplementations
void findFUImplementations(HDB::HDBManager &hdb)
Definition: AutoSelectImplementationsDialog.cc:394
AutoSelectImplementationsDialog::cboxRF_
wxCheckBox * cboxRF_
Checkbox widget for register file flag.
Definition: AutoSelectImplementationsDialog.hh:87
ComponentImplementationSelector::rfImplementations
std::map< const IDF::RFImplementationLocation *, CostEstimates * > rfImplementations(const TTAMachine::RegisterFile &rf, bool guarded=false, double frequencyMHz=0, double maxArea=0)
Definition: ComponentImplementationSelector.cc:377
FindWindow
Definition: FindWindow.hh:49
TTAMachine::Machine::Navigator::count
int count() const
AutoSelectImplementationsDialog::ID_HDB_CHOICE
@ ID_HDB_CHOICE
Definition: AutoSelectImplementationsDialog.hh:112
AutoSelectImplementationsDialog::hdbs_
std::set< TCEString > hdbs_
Set for hdb paths.
Definition: AutoSelectImplementationsDialog.hh:94
IDF::MachineImplementation::hasFUImplementation
bool hasFUImplementation(const std::string &unitName) const
Definition: MachineImplementation.cc:231
IDF::MachineImplementation::hasIUImplementation
bool hasIUImplementation(const std::string &unitName) const
Definition: MachineImplementation.cc:259
TTAMachine::FunctionUnit
Definition: FunctionUnit.hh:55
AutoSelectImplementationsDialog::onClose
void onClose(wxCommandEvent &event)
Definition: AutoSelectImplementationsDialog.cc:144
HDB::HDBRegistry
Definition: HDBRegistry.hh:46
ErrorDialog
Definition: ErrorDialog.hh:42
TTAMachine::Machine::immediateUnitNavigator
virtual ImmediateUnitNavigator immediateUnitNavigator() const
Definition: Machine.cc:416
ComponentImplementationSelector::fuImplementations
std::map< const IDF::FUImplementationLocation *, CostEstimates * > fuImplementations(const TTAMachine::FunctionUnit &fu, double frequencyMHz=0, double maxArea=0)
Definition: ComponentImplementationSelector.cc:116
AutoSelectImplementationsDialog::cboxFU_
wxCheckBox * cboxFU_
Checkbox widget for function unit flag.
Definition: AutoSelectImplementationsDialog.hh:91
dummy
SimValue dummy(32)
a dummy simvalue which is given for operands that are not bound
Environment::shortHDBPath
static TCEString shortHDBPath(const TCEString &hdbPath)
Definition: Environment.cc:707
AutoSelectImplementationsDialog::hdbChoice_
wxChoice * hdbChoice_
Choice selection for list of HDB files.
Definition: AutoSelectImplementationsDialog.hh:84
AutoSelectImplementationsDialog::ID_IU
@ ID_IU
Definition: AutoSelectImplementationsDialog.hh:118
AutoSelectImplementationsDialog::foundIU_
std::map< const IDF::UnitImplementationLocation *, HdbIdPair > foundIU_
Definition: AutoSelectImplementationsDialog.hh:108
TTAMachine::Machine::functionUnitNavigator
virtual FunctionUnitNavigator functionUnitNavigator() const
Definition: Machine.cc:380
TTAMachine::Component
Definition: MachinePart.hh:90
AutoSelectImplementationsDialog::machine_
TTAMachine::Machine & machine_
Machine containing navigators fo RFs, IUs and FUs.
Definition: AutoSelectImplementationsDialog.hh:79
AutoSelectImplementationsDialog::ID_BROWSE
@ ID_BROWSE
Definition: AutoSelectImplementationsDialog.hh:113
IDF::FUImplementationLocation
UnitImplementationLocation FUImplementationLocation
Definition: ComponentImplementationSelector.hh:55
HDB::HDBManager
Definition: HDBManager.hh:82
IDF::MachineImplementation::addRFImplementation
void addRFImplementation(RFImplementationLocation *implementation)
Definition: MachineImplementation.cc:554
AutoSelectImplementationsDialog::impl_
IDF::MachineImplementation & impl_
Definition: AutoSelectImplementationsDialog.hh:81
Exception
Definition: Exception.hh:54
AutoSelectImplementationsDialog::findIUImplementations
void findIUImplementations(HDB::HDBManager &hdb)
Definition: AutoSelectImplementationsDialog.cc:348
IDF::UnitImplementationLocation::unitName
virtual std::string unitName() const
Definition: UnitImplementationLocation.cc:138
ConfirmDialog
Definition: ConfirmDialog.hh:41
Exception::errorMessage
std::string errorMessage() const
Definition: Exception.cc:123
HDB::HDBRegistry::hdbCount
int hdbCount()
Definition: HDBRegistry.cc:135
AutoSelectImplementationsDialog::ID_FIND
@ ID_FIND
Definition: AutoSelectImplementationsDialog.hh:116
Environment::longHDBPath
static TCEString longHDBPath(const TCEString &hdbPath)
Definition: Environment.cc:731
ComponentImplementationSelector
Definition: ComponentImplementationSelector.hh:74
HDB::HDBManager::fileName
std::string fileName() const
Definition: HDBManager.cc:612
TTAMachine::Machine::registerFileNavigator
virtual RegisterFileNavigator registerFileNavigator() const
Definition: Machine.cc:450
AutoSelectImplementationsDialog::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition: AutoSelectImplementationsDialog.cc:438
AutoSelectImplementationsDialog::ID_RF
@ ID_RF
Definition: AutoSelectImplementationsDialog.hh:117
TTAMachine::RegisterFile::isUsedAsGuard
virtual bool isUsedAsGuard() const
Definition: RegisterFile.cc:567
IDF::UnitImplementationLocation::id
virtual int id() const
Definition: UnitImplementationLocation.cc:127
IDF::MachineImplementation::addFUImplementation
void addFUImplementation(FUImplementationLocation *implementation)
Definition: MachineImplementation.cc:533
AutoSelectImplementationsDialog::foundRF_
std::map< const IDF::UnitImplementationLocation *, HdbIdPair > foundRF_
Definition: AutoSelectImplementationsDialog.hh:107
FileSystem::fileExists
static bool fileExists(const std::string fileName)
TCEString
Definition: TCEString.hh:53
AutoSelectImplementationsDialog::foundFU_
std::map< const IDF::UnitImplementationLocation *, HdbIdPair > foundFU_
Definition: AutoSelectImplementationsDialog.hh:109
AutoSelectImplementationsDialog::ID_LINE
@ ID_LINE
Definition: AutoSelectImplementationsDialog.hh:114
HDB::HDBRegistry::loadFromSearchPaths
void loadFromSearchPaths()
Definition: HDBRegistry.cc:146
ComponentImplementationSelector::iuImplementations
std::map< const IDF::IUImplementationLocation *, CostEstimates * > iuImplementations(const TTAMachine::ImmediateUnit &iu, double frequencyMHz=0, double maxArea=0)
Definition: ComponentImplementationSelector.cc:494
TTAMachine::Machine::Navigator::item
ComponentType * item(int index) const
TTAMachine::RegisterFile
Definition: RegisterFile.hh:47
AutoSelectImplementationsDialog::ID_FU
@ ID_FU
Definition: AutoSelectImplementationsDialog.hh:119
WxConversion::toString
static std::string toString(const wxString &source)
HDB::HDBRegistry::hdbPath
std::string hdbPath(unsigned int index)
Definition: HDBRegistry.cc:217
AutoSelectImplementationsDialog::ID_TEXT
@ ID_TEXT
Definition: AutoSelectImplementationsDialog.hh:115
AutoSelectImplementationsDialog::defaultHDB_
static const std::string defaultHDB_
Definition: AutoSelectImplementationsDialog.hh:97
IDF::MachineImplementation::addIUImplementation
void addIUImplementation(RFImplementationLocation *implementation)
Definition: MachineImplementation.cc:575
TTAMachine::ImmediateUnit
Definition: ImmediateUnit.hh:50