OpenASIP 2.2
|
#include <AutoSelectImplementationsDialog.hh>
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::Machine & | machine_ |
Machine containing navigators fo RFs, IUs and FUs. | |
IDF::MachineImplementation & | impl_ |
wxChoice * | hdbChoice_ |
Choice selection for list of HDB files. | |
wxCheckBox * | cboxRF_ |
Checkbox widget for register file flag. | |
wxCheckBox * | cboxIU_ |
Checkbox widget for immediate unit flag. | |
wxCheckBox * | cboxFU_ |
Checkbox widget for function unit flag. | |
std::set< TCEString > | hdbs_ |
Set for hdb paths. | |
std::map< const IDF::UnitImplementationLocation *, HdbIdPair > | foundRF_ |
std::map< const IDF::UnitImplementationLocation *, HdbIdPair > | foundIU_ |
std::map< const IDF::UnitImplementationLocation *, HdbIdPair > | foundFU_ |
Static Private Attributes | |
static const std::string | defaultHDB_ |
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.
|
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.
AutoSelectImplementationsDialog::AutoSelectImplementationsDialog | ( | wxWindow * | parent, |
TTAMachine::Machine & | machine, | ||
IDF::MachineImplementation & | impl | ||
) |
The Constructor.
parent | Parent window of the dialog. |
machine | Current machine. |
impl | Implementation of the machine. |
Definition at line 69 of file AutoSelectImplementationsDialog.cc.
References StringTools::endsWith(), HDB::HDBRegistry::hdbCount(), HDB::HDBRegistry::hdbPath(), HDB::HDBRegistry::instance(), HDB::HDBRegistry::loadFromSearchPaths(), Environment::shortHDBPath(), and WxConversion::toWxString().
|
virtual |
|
private |
Creates the dialog widgets.
Definition at line 438 of file AutoSelectImplementationsDialog.cc.
References ID_BROWSE, ID_CLOSE, ID_FIND, ID_FU, ID_HDB_CHOICE, ID_IU, ID_LINE, ID_RF, and ID_TEXT.
|
private |
Function that searches FU implementations from given HDB file.
hdb | HDB file from which implementations are searched. |
Definition at line 394 of file AutoSelectImplementationsDialog.cc.
References ComponentImplementationSelector::addHDB(), TTAMachine::Machine::Navigator< ComponentType >::count(), HDB::HDBManager::fileName(), foundFU_, ComponentImplementationSelector::fuImplementations(), TTAMachine::Machine::functionUnitNavigator(), IDF::MachineImplementation::hasFUImplementation(), AutoSelectImplementationsDialog::HdbIdPair::hdbFile, IDF::UnitImplementationLocation::id(), AutoSelectImplementationsDialog::HdbIdPair::id, impl_, TTAMachine::Machine::Navigator< ComponentType >::item(), machine_, and TTAMachine::Component::name().
Referenced by onFind().
|
private |
Function that searches IU implementations from given HDB file.
hdb | HDB file from which implementations are searched. |
Definition at line 348 of file AutoSelectImplementationsDialog.cc.
References ComponentImplementationSelector::addHDB(), TTAMachine::Machine::Navigator< ComponentType >::count(), HDB::HDBManager::fileName(), foundIU_, IDF::MachineImplementation::hasIUImplementation(), AutoSelectImplementationsDialog::HdbIdPair::hdbFile, IDF::UnitImplementationLocation::id(), AutoSelectImplementationsDialog::HdbIdPair::id, TTAMachine::Machine::immediateUnitNavigator(), impl_, TTAMachine::Machine::Navigator< ComponentType >::item(), ComponentImplementationSelector::iuImplementations(), machine_, and TTAMachine::Component::name().
Referenced by onFind().
|
private |
Function that searches RF implementations from given HDB file.
hdb | HDB file from which implementations are searched. |
Definition at line 302 of file AutoSelectImplementationsDialog.cc.
References ComponentImplementationSelector::addHDB(), TTAMachine::Machine::Navigator< ComponentType >::count(), HDB::HDBManager::fileName(), foundRF_, IDF::MachineImplementation::hasRFImplementation(), AutoSelectImplementationsDialog::HdbIdPair::hdbFile, IDF::UnitImplementationLocation::id(), AutoSelectImplementationsDialog::HdbIdPair::id, impl_, TTAMachine::RegisterFile::isUsedAsGuard(), TTAMachine::Machine::Navigator< ComponentType >::item(), machine_, TTAMachine::Component::name(), TTAMachine::Machine::registerFileNavigator(), and ComponentImplementationSelector::rfImplementations().
Referenced by onFind().
|
private |
File dialog for choosing a custom HDB file.
Definition at line 121 of file AutoSelectImplementationsDialog.cc.
References hdbChoice_, Environment::shortHDBPath(), and WxConversion::toWxString().
|
private |
Exit the dialog.
Definition at line 144 of file AutoSelectImplementationsDialog.cc.
Referenced by onFind().
|
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.
References IDF::MachineImplementation::addFUImplementation(), IDF::MachineImplementation::addIUImplementation(), IDF::MachineImplementation::addRFImplementation(), cboxFU_, cboxIU_, cboxRF_, dummy, Exception::errorMessage(), FileSystem::fileExists(), findFUImplementations(), findIUImplementations(), findRFImplementations(), foundFU_, foundIU_, foundRF_, HDB::HDBRegistry::hdb(), hdbChoice_, AutoSelectImplementationsDialog::HdbIdPair::hdbFile, AutoSelectImplementationsDialog::HdbIdPair::id, impl_, HDB::HDBRegistry::instance(), Environment::longHDBPath(), onClose(), WxConversion::toString(), WxConversion::toWxString(), and IDF::UnitImplementationLocation::unitName().
|
private |
Checkbox widget for function unit flag.
Definition at line 91 of file AutoSelectImplementationsDialog.hh.
Referenced by onFind().
|
private |
Checkbox widget for immediate unit flag.
Definition at line 89 of file AutoSelectImplementationsDialog.hh.
Referenced by onFind().
|
private |
Checkbox widget for register file flag.
Definition at line 87 of file AutoSelectImplementationsDialog.hh.
Referenced by onFind().
|
staticprivate |
Definition at line 97 of file AutoSelectImplementationsDialog.hh.
|
private |
Definition at line 109 of file AutoSelectImplementationsDialog.hh.
Referenced by findFUImplementations(), and onFind().
|
private |
Definition at line 108 of file AutoSelectImplementationsDialog.hh.
Referenced by findIUImplementations(), and onFind().
|
private |
Definition at line 107 of file AutoSelectImplementationsDialog.hh.
Referenced by findRFImplementations(), and onFind().
|
private |
Choice selection for list of HDB files.
Definition at line 84 of file AutoSelectImplementationsDialog.hh.
Referenced by onBrowse(), and onFind().
|
private |
Set for hdb paths.
Definition at line 94 of file AutoSelectImplementationsDialog.hh.
|
private |
Definition at line 81 of file AutoSelectImplementationsDialog.hh.
Referenced by findFUImplementations(), findIUImplementations(), findRFImplementations(), and onFind().
|
private |
Machine containing navigators fo RFs, IUs and FUs.
Definition at line 79 of file AutoSelectImplementationsDialog.hh.
Referenced by findFUImplementations(), findIUImplementations(), and findRFImplementations().