OpenASIP 2.2
|
#include <ProcessorImplementationWindow.hh>
Public Member Functions | |
ProcessorImplementationWindow (wxWindow *parent, TTAMachine::Machine &machine, IDF::MachineImplementation &impl) | |
virtual | ~ProcessorImplementationWindow () |
void | setDirty (bool dirty=true) |
Private Member Functions | |
void | onAutoSelectImplementations (wxCommandEvent &event) |
void | updateImplementationLists () |
void | handleSelectRFImplementation (long item) |
void | onSelectRFImplementation (wxCommandEvent &event) |
void | onRFSelection (wxListEvent &event) |
void | onRFActivation (wxListEvent &event) |
void | updateRFList (const std::string &rfName, int index) |
void | handleSelectIUImplementation (long item) |
void | onSelectIUImplementation (wxCommandEvent &event) |
void | onIUSelection (wxListEvent &event) |
void | onIUActivation (wxListEvent &event) |
void | handleSelectFUImplementation (long item) |
void | onSelectFUImplementation (wxCommandEvent &event) |
void | onFUSelection (wxListEvent &event) |
void | onFUActivation (wxListEvent &event) |
void | updateFUList (const std::string &fuName, int index) |
void | onSetParameterValue (wxCommandEvent &event) |
void | onBrowseDecompressor (wxCommandEvent &event) |
void | onBrowseICDecPlugin (wxCommandEvent &event) |
void | onBrowseICHDB (wxCommandEvent &event) |
void | loadICDecoderPlugin (const std::string &pluginName, const std::string &pluginFile) |
void | onParameterSelection (wxListEvent &event) |
virtual bool | TransferDataToWindow () |
void | onLoadIDF (wxCommandEvent &event) |
void | onSaveIDF (wxCommandEvent &event) |
void | onClose (wxCommandEvent &event) |
void | onGenerateProcessor (wxCommandEvent &event) |
void | doSaveIDF () |
void | checkImplementationFiles () |
wxSizer * | createContents (wxWindow *parent, bool call_fit, bool set_sizer) |
wxSizer * | functionUnitPage (wxWindow *parent, bool call_fit, bool set_sizer=true) |
wxSizer * | registerFilePage (wxWindow *parent, bool call_fit, bool set_sizer=true) |
wxSizer * | immediateUnitPage (wxWindow *parent, bool call_fit, bool set_sizer=true) |
wxSizer * | decompressionPage (wxWindow *parent, bool call_fit, bool set_sizer=true) |
wxSizer * | icDecoderPluginPage (wxWindow *parent, bool call_fit, bool set_sizer=true) |
Private Attributes | |
TTAMachine::Machine & | machine_ |
Machine that is being generated. | |
IDF::MachineImplementation & | impl_ |
MachineImplementation object containing the implementation information. | |
wxListCtrl * | fuList_ |
Pointer to the FU implementation list widget. | |
wxListCtrl * | iuList_ |
Pointer to the IU implementation list widget. | |
wxListCtrl * | rfList_ |
Pointer to the RF implementation list widget. | |
wxListCtrl * | parameterList_ |
Pointer to the ic decoder parameter list widget. | |
PluginTools | pluginTool_ |
Plugintool for loading IC/Decoder plugins. | |
ProGe::ICDecoderGeneratorPlugin * | plugin_ |
IC/Decoder plugin of the current machine implementation. | |
bool | dirtyData_ |
Processor implementation window.
Definition at line 55 of file ProcessorImplementationWindow.hh.
|
private |
Definition at line 137 of file ProcessorImplementationWindow.hh.
ProcessorImplementationWindow::ProcessorImplementationWindow | ( | wxWindow * | parent, |
TTAMachine::Machine & | machine, | ||
IDF::MachineImplementation & | impl | ||
) |
Constructor.
parent | Parent window of the page. |
machine | Processor architecture. |
impl | Processor implementation definition. |
Definition at line 123 of file ProcessorImplementationWindow.cc.
References assert, Environment::defaultICDecoderPlugin(), and FileSystem::fileNameBody().
|
virtual |
|
private |
Checks if every file path defined in IDF is correct.
If one or more file paths are invalid, warning dialog is shown to user.
Definition at line 993 of file ProcessorImplementationWindow.cc.
References IDF::MachineImplementation::checkImplFiles(), impl_, and WxConversion::toWxString().
Referenced by onLoadIDF().
|
private |
Creates the dialog widgets.
Code geenrated by wxDesigner. Do not modify manually.
parent | Parent window of the created widget hierarchy. |
call_fit | Fit parent window size. |
set_sizer | Set the created top level sizer as the parent win contents. |
Definition at line 1039 of file ProcessorImplementationWindow.cc.
References decompressionPage(), FALSE, functionUnitPage(), icDecoderPluginPage(), ID_CLOSE, ID_GENERATE, ID_LINE, ID_LOAD_IDF, ID_NOTEBOOK, ID_SAVE_IDF, immediateUnitPage(), and registerFilePage().
|
private |
Definition at line 1167 of file ProcessorImplementationWindow.cc.
References ID_BROWSE_DECOMPRESSOR, ID_DECOMPRESSOR_PATH, and ID_TEXT.
Referenced by createContents().
|
private |
Definition at line 719 of file ProcessorImplementationWindow.cc.
References FileSystem::absolutePathOf(), FileSystem::currentWorkingDir(), FileSystem::directoryOfPath(), Exception::errorMessage(), FileSystem::fileOfPath(), Environment::hdbPaths(), impl_, IDF::MachineImplementation::makeImplFilesRelative(), XMLSerializer::setDestinationFile(), setDirty(), WxConversion::toString(), WxConversion::toWxString(), and IDF::IDFSerializer::writeMachineImplementation().
Referenced by onClose(), and onSaveIDF().
|
private |
Definition at line 1139 of file ProcessorImplementationWindow.cc.
References ID_AUTO_SELECT_IMPL, ID_FU_LIST, and ID_SELECT_FU_IMPL.
Referenced by createContents().
|
private |
Handle calling of the implementation selection dialog and it's return value
Definition at line 508 of file ProcessorImplementationWindow.cc.
References IDF::MachineImplementation::addFUImplementation(), IDF::MachineImplementation::fuImplementation(), TTAMachine::Machine::functionUnitNavigator(), IDF::MachineImplementation::hasFUImplementation(), impl_, TTAMachine::Machine::Navigator< ComponentType >::item(), machine_, TTAMachine::Component::name(), setDirty(), and updateFUList().
Referenced by onFUActivation(), and onSelectFUImplementation().
|
private |
Definition at line 434 of file ProcessorImplementationWindow.cc.
References IDF::MachineImplementation::addIUImplementation(), IDF::MachineImplementation::hasIUImplementation(), TTAMachine::Machine::immediateUnitNavigator(), impl_, TTAMachine::Machine::Navigator< ComponentType >::item(), IDF::MachineImplementation::iuImplementation(), machine_, TTAMachine::Component::name(), setDirty(), and TransferDataToWindow().
Referenced by onIUActivation(), and onSelectIUImplementation().
|
private |
Call the dialog to select RF implementation and handle the return values of the dialog.
Definition at line 381 of file ProcessorImplementationWindow.cc.
References IDF::MachineImplementation::addRFImplementation(), IDF::MachineImplementation::hasRFImplementation(), impl_, TTAMachine::Machine::Navigator< ComponentType >::item(), machine_, TTAMachine::Component::name(), TTAMachine::Machine::registerFileNavigator(), IDF::MachineImplementation::rfImplementation(), setDirty(), and updateRFList().
Referenced by onRFActivation(), and onSelectRFImplementation().
|
private |
Definition at line 1206 of file ProcessorImplementationWindow.cc.
References ID_BROWSE_IC_DEC_HDB, ID_BROWSE_IC_DEC_PLUGIN, ID_IC_DEC_HDB_FILE, ID_IC_DEC_PLUGIN_DESC, ID_IC_DEC_PLUGIN_FILE, ID_IC_DEC_PLUGIN_NAME, ID_PARAMETER_LIST, ID_PARAMETER_VALUE, ID_SET_VALUE, and ID_TEXT.
Referenced by createContents().
|
private |
Definition at line 1289 of file ProcessorImplementationWindow.cc.
References ID_AUTO_SELECT_IMPL, ID_IU_LIST, and ID_SELECT_IU_IMPL.
Referenced by createContents().
|
private |
Loads an IC/Decoder plugin.
pluginName | Name of the plugin. |
pluginFile | Full path to the plugin file. |
Definition at line 893 of file ProcessorImplementationWindow.cc.
References PluginTools::addSearchPath(), assert, Exception::errorMessage(), BEMGenerator::generate(), Environment::icDecoderPluginPaths(), impl_, PluginTools::importSymbol(), machine_, plugin_, pluginTool_, PluginTools::registerModule(), IDF::MachineImplementation::setICDecoderPluginFile(), IDF::MachineImplementation::setICDecoderPluginName(), and WxConversion::toWxString().
Referenced by onBrowseICDecPlugin(), and onLoadIDF().
|
private |
Event handler for the automatic implementation selection button.
Definition at line 288 of file ProcessorImplementationWindow.cc.
References impl_, machine_, and updateImplementationLists().
|
private |
Event handler for the decompressor block Browse... button.
Definition at line 785 of file ProcessorImplementationWindow.cc.
References impl_, IDF::MachineImplementation::setDecompressorFile(), setDirty(), WxConversion::toString(), and TransferDataToWindow().
|
private |
Event handler for the ic/decoder plugin Browse... button.
Definition at line 808 of file ProcessorImplementationWindow.cc.
References IDF::MachineImplementation::clearICDecoderParameters(), FileSystem::fileNameBody(), FileSystem::fileOfPath(), impl_, loadICDecoderPlugin(), setDirty(), WxConversion::toString(), and TransferDataToWindow().
|
private |
Event handler for the ic/ hdb Browse... button.
Definition at line 847 of file ProcessorImplementationWindow.cc.
References impl_, setDirty(), IDF::MachineImplementation::setICDecoderHDB(), WxConversion::toString(), and TransferDataToWindow().
|
private |
Event handler for the Close button.
Definition at line 697 of file ProcessorImplementationWindow.cc.
References dirtyData_, and doSaveIDF().
|
private |
Event handler for the FU Select implementation doubleclick.
Definition at line 557 of file ProcessorImplementationWindow.cc.
References handleSelectFUImplementation().
|
private |
Event handler for the FU list selection changes.
Enables and disables the select FU implementation button.
Definition at line 595 of file ProcessorImplementationWindow.cc.
References fuList_, and ID_SELECT_FU_IMPL.
|
private |
Event handler for the Generate Processor... button.
Definition at line 967 of file ProcessorImplementationWindow.cc.
References IDFValidator::errorCount(), IDFValidator::errorMessage(), impl_, machine_, WxConversion::toWxString(), and IDFValidator::validate().
|
private |
Event handler for the IU Select implementation doubleclick.
Definition at line 481 of file ProcessorImplementationWindow.cc.
References handleSelectIUImplementation().
|
private |
Event handler for the IU list selection changes.
Enables and disables the select IU implementation button.
Definition at line 581 of file ProcessorImplementationWindow.cc.
References ID_SELECT_IU_IMPL, and iuList_.
|
private |
Event handler for the Load IDF... button.
Definition at line 621 of file ProcessorImplementationWindow.cc.
References checkImplementationFiles(), IDFValidator::errorCount(), Exception::errorMessage(), IDFValidator::errorMessage(), IDF::MachineImplementation::hasICDecoderPluginFile(), IDF::MachineImplementation::hasICDecoderPluginName(), IDF::MachineImplementation::icDecoderPluginFile(), IDF::MachineImplementation::icDecoderPluginName(), impl_, loadICDecoderPlugin(), IDF::MachineImplementation::loadState(), machine_, IDF::IDFSerializer::readState(), IDFValidator::removeUnknownImplementations(), IDF::MachineImplementation::saveState(), XMLSerializer::setSourceFile(), WxConversion::toString(), WxConversion::toWxString(), TransferDataToWindow(), and IDFValidator::validate().
|
private |
Event handler for the ic/decoder parameter list selection changes.
Enables and disables the set parameter value button.
Definition at line 609 of file ProcessorImplementationWindow.cc.
References ID_SET_VALUE, and parameterList_.
|
private |
Event handler for the RF Select implementation button.
Definition at line 429 of file ProcessorImplementationWindow.cc.
References handleSelectRFImplementation().
|
private |
Event handler for the RF list selection changes.
Enables and disables the select RF implementation button.
Definition at line 567 of file ProcessorImplementationWindow.cc.
References ID_SELECT_RF_IMPL, and rfList_.
|
private |
Event handler for the Save IDF button.
Definition at line 777 of file ProcessorImplementationWindow.cc.
References doSaveIDF().
|
private |
Event handler for the FU Select implementation button.
Definition at line 540 of file ProcessorImplementationWindow.cc.
References fuList_, and handleSelectFUImplementation().
|
private |
Event handler for the IU Select implementation button.
Definition at line 464 of file ProcessorImplementationWindow.cc.
References handleSelectIUImplementation(), and iuList_.
|
private |
Event handler for the RF Select implementation button.
Definition at line 412 of file ProcessorImplementationWindow.cc.
References handleSelectRFImplementation(), and rfList_.
|
private |
Event handler for the ic/decoder parameter value setting button.
Definition at line 868 of file ProcessorImplementationWindow.cc.
References ID_PARAMETER_VALUE, impl_, parameterList_, plugin_, ProGe::ICDecoderGeneratorPlugin::recognizedParameter(), IDF::MachineImplementation::setICDecoderParameter(), WxConversion::toString(), and TransferDataToWindow().
|
private |
Definition at line 1111 of file ProcessorImplementationWindow.cc.
References ID_AUTO_SELECT_IMPL, ID_RF_LIST, and ID_SELECT_RF_IMPL.
Referenced by createContents().
|
inline |
Definition at line 63 of file ProcessorImplementationWindow.hh.
References dirtyData_.
Referenced by doSaveIDF(), handleSelectFUImplementation(), handleSelectIUImplementation(), handleSelectRFImplementation(), onBrowseDecompressor(), onBrowseICDecPlugin(), and onBrowseICHDB().
|
privatevirtual |
Transfers data from the current MachineImplementation object to the dialog widgets.
Definition at line 189 of file ProcessorImplementationWindow.cc.
References IDF::MachineImplementation::decompressorFile(), IDF::MachineImplementation::hasDecompressorFile(), IDF::MachineImplementation::hasICDecoderHDB(), IDF::MachineImplementation::hasICDecoderPluginFile(), IDF::MachineImplementation::hasICDecoderPluginName(), IDF::MachineImplementation::icDecoderHDB(), IDF::MachineImplementation::icDecoderParameterValue(), IDF::MachineImplementation::icDecoderPluginFile(), IDF::MachineImplementation::icDecoderPluginName(), ID_DECOMPRESSOR_PATH, ID_IC_DEC_HDB_FILE, ID_IC_DEC_PLUGIN_DESC, ID_IC_DEC_PLUGIN_FILE, ID_IC_DEC_PLUGIN_NAME, impl_, ProGe::ICDecoderGeneratorPlugin::parameterDescription(), parameterList_, plugin_, ProGe::ICDecoderGeneratorPlugin::pluginDescription(), ProGe::ICDecoderGeneratorPlugin::recognizedParameter(), ProGe::ICDecoderGeneratorPlugin::recognizedParameterCount(), WxConversion::toWxString(), and updateImplementationLists().
Referenced by handleSelectIUImplementation(), onBrowseDecompressor(), onBrowseICDecPlugin(), onBrowseICHDB(), onLoadIDF(), and onSetParameterValue().
|
private |
Update the list of FU implementations for single FU
Definition at line 488 of file ProcessorImplementationWindow.cc.
References Exception::errorMessage(), IDF::MachineImplementation::fuImplementation(), fuList_, IDF::UnitImplementationLocation::hdbFile(), IDF::UnitImplementationLocation::id(), impl_, Environment::shortHDBPath(), and WxConversion::toWxString().
Referenced by handleSelectFUImplementation().
|
private |
Updates the list views on RF, IU and FU pages.
Definition at line 298 of file ProcessorImplementationWindow.cc.
References TTAMachine::Machine::Navigator< ComponentType >::count(), Exception::errorMessage(), IDF::MachineImplementation::fuImplementation(), fuList_, TTAMachine::Machine::functionUnitNavigator(), IDF::MachineImplementation::hasFUImplementation(), IDF::MachineImplementation::hasIUImplementation(), IDF::MachineImplementation::hasRFImplementation(), IDF::UnitImplementationLocation::hdbFile(), IDF::UnitImplementationLocation::id(), TTAMachine::Machine::immediateUnitNavigator(), impl_, TTAMachine::Machine::Navigator< ComponentType >::item(), IDF::MachineImplementation::iuImplementation(), iuList_, machine_, TTAMachine::Machine::registerFileNavigator(), IDF::MachineImplementation::rfImplementation(), rfList_, Environment::shortHDBPath(), and WxConversion::toWxString().
Referenced by onAutoSelectImplementations(), and TransferDataToWindow().
|
private |
Update the list of FU implementations for single RF
Definition at line 266 of file ProcessorImplementationWindow.cc.
References Exception::errorMessage(), IDF::UnitImplementationLocation::hdbFile(), IDF::UnitImplementationLocation::id(), impl_, IDF::MachineImplementation::rfImplementation(), rfList_, Environment::shortHDBPath(), and WxConversion::toWxString().
Referenced by handleSelectRFImplementation().
|
private |
Definition at line 166 of file ProcessorImplementationWindow.hh.
Referenced by onClose(), and setDirty().
|
private |
Pointer to the FU implementation list widget.
Definition at line 123 of file ProcessorImplementationWindow.hh.
Referenced by onFUSelection(), onSelectFUImplementation(), updateFUList(), and updateImplementationLists().
|
private |
MachineImplementation object containing the implementation information.
Definition at line 120 of file ProcessorImplementationWindow.hh.
Referenced by checkImplementationFiles(), doSaveIDF(), handleSelectFUImplementation(), handleSelectIUImplementation(), handleSelectRFImplementation(), loadICDecoderPlugin(), onAutoSelectImplementations(), onBrowseDecompressor(), onBrowseICDecPlugin(), onBrowseICHDB(), onGenerateProcessor(), onLoadIDF(), onSetParameterValue(), TransferDataToWindow(), updateFUList(), updateImplementationLists(), and updateRFList().
|
private |
Pointer to the IU implementation list widget.
Definition at line 125 of file ProcessorImplementationWindow.hh.
Referenced by onIUSelection(), onSelectIUImplementation(), and updateImplementationLists().
|
private |
Machine that is being generated.
Definition at line 118 of file ProcessorImplementationWindow.hh.
Referenced by handleSelectFUImplementation(), handleSelectIUImplementation(), handleSelectRFImplementation(), loadICDecoderPlugin(), onAutoSelectImplementations(), onGenerateProcessor(), onLoadIDF(), and updateImplementationLists().
|
private |
Pointer to the ic decoder parameter list widget.
Definition at line 129 of file ProcessorImplementationWindow.hh.
Referenced by onParameterSelection(), onSetParameterValue(), and TransferDataToWindow().
|
private |
IC/Decoder plugin of the current machine implementation.
Definition at line 134 of file ProcessorImplementationWindow.hh.
Referenced by loadICDecoderPlugin(), onSetParameterValue(), and TransferDataToWindow().
|
private |
Plugintool for loading IC/Decoder plugins.
Definition at line 132 of file ProcessorImplementationWindow.hh.
Referenced by loadICDecoderPlugin().
|
private |
Pointer to the RF implementation list widget.
Definition at line 127 of file ProcessorImplementationWindow.hh.
Referenced by onRFSelection(), onSelectRFImplementation(), updateImplementationLists(), and updateRFList().