OpenASIP 2.2
|
#include <FUImplementationDialog.hh>
Public Member Functions | |
FUImplementationDialog (wxWindow *parent, wxWindowID id, HDB::FUImplementation &implementation, const TTAMachine::FunctionUnit &architecture) | |
virtual | ~FUImplementationDialog () |
Private Types | |
enum | { ID_LABEL_NAME = 10000 , ID_NAME , ID_LABEL_CLK_PORT , ID_CLK_PORT , ID_LABEL_RST_PORT , ID_RST_PORT , ID_LABEL_GLOCK_PORT , ID_GLOCK_PORT , ID_LABEL_GLOCK_REQ_PORT , ID_GLOCK_REQ_PORT , ID_OPCODE_LIST , ID_CLEAR_OPCODE , ID_SET_OPCODE , ID_OPCODE , ID_EXTERNAL_PORT_LIST , ID_ADD_EXTERNAL_PORT , ID_EDIT_EXTERNAL_PORT , ID_DELETE_EXTERNAL_PORT , ID_SOURCE_LIST , ID_ADD_SOURCE , ID_DELETE_SOURCE , ID_PARAMETER_LIST , ID_EDIT_PARAMETER , ID_ADD_PARAMETER , ID_DELETE_PARAMETER , ID_LABEL_OPCODE_PORT_NAME , ID_OPCODE_PORT , ID_ARCH_PORT_LIST , ID_EDIT_ARCH_PORT , ID_LINE , ID_MOVE_SOURCE_UP , ID_MOVE_SOURCE_DOWN } |
Window indentifiers for dialog widgets. More... | |
Private Member Functions | |
void | onOK (wxCommandEvent &event) |
void | update (bool onInit=false) |
HDB::FUPortImplementation * | selectedArchPort () |
HDB::FUExternalPort * | selectedExternalPort () |
HDB::FUImplementation::Parameter | selectedParameter () |
void | onArchPortActivation (wxListEvent &event) |
void | onArchPortSelection (wxListEvent &event) |
void | onAddArchitecturePort (wxCommandEvent &event) |
void | onEditArchitecturePort (wxCommandEvent &event) |
void | onDeleteArchitecturePort (wxCommandEvent &event) |
void | onExternalPortActivation (wxListEvent &event) |
void | onExternalPortSelection (wxListEvent &event) |
void | onAddExternalPort (wxCommandEvent &event) |
void | onEditExternalPort (wxCommandEvent &event) |
void | onDeleteExternalPort (wxCommandEvent &event) |
void | onParameterActivation (wxListEvent &event) |
void | onParameterSelection (wxListEvent &event) |
void | onAddParameter (wxCommandEvent &event) |
void | onEditParameter (wxCommandEvent &event) |
void | onDeleteParameter (wxCommandEvent &event) |
void | onSourceFileSelection (wxListEvent &event) |
void | onAddSourceFile (wxCommandEvent &event) |
void | onDeleteSourceFile (wxCommandEvent &event) |
void | onMoveSourceFileUp (wxCommandEvent &event) |
void | onMoveSourceFileDown (wxCommandEvent &event) |
void | onOpcodeSelection (wxListEvent &event) |
void | onSetOpcode (wxCommandEvent &event) |
void | onClearOpcode (wxCommandEvent &event) |
wxSizer * | createContents (wxWindow *parent, bool call_fit, bool set_sizer) |
Private Attributes | |
HDB::FUImplementation & | implementation_ |
FU Implementation to modify. | |
const TTAMachine::FunctionUnit & | architecture_ |
Function unit architecture the FUImplementation implements. | |
bool | opcodeWarningShowed_ |
wxListCtrl * | archPortList_ |
Pointer to the architecture port list widget. | |
wxListCtrl * | externalPortList_ |
Pointer to the external port list widget. | |
wxListCtrl * | parameterList_ |
Pointer to the parameter list widget. | |
wxListCtrl * | opcodeList_ |
Pointer to the opcode list widget. | |
wxListCtrl * | sourceList_ |
Pointer to the source file list widget. | |
wxString | name_ |
wxString | opcodePort_ |
wxString | clkPort_ |
wxString | rstPort_ |
wxString | gLockPort_ |
wxString | gLockReqPort_ |
Dialog for editing FU implementations.
Definition at line 52 of file FUImplementationDialog.hh.
|
private |
Window indentifiers for dialog widgets.
Definition at line 103 of file FUImplementationDialog.hh.
FUImplementationDialog::onAddExternalPort FUImplementationDialog::onDeleteExternalPort FUImplementationDialog::onArchPortSelection FUImplementationDialog::onArchPortActivation FUImplementationDialog::onExternalPortActivation FUImplementationDialog::onParameterSelection FUImplementationDialog::onParameterSelection FUImplementationDialog::onOpcodeSelection FUImplementationDialog::onSourceFileSelection FUImplementationDialog::FUImplementationDialog | ( | wxWindow * | parent, |
wxWindowID | id, | ||
HDB::FUImplementation & | implementation, | ||
const TTAMachine::FunctionUnit & | architecture | ||
) |
The Constructor.
parent | Parent window of the dialog. |
id | Window identifier for the dialog window. |
implementation | FU implementation to modify. |
Definition at line 139 of file FUImplementationDialog.cc.
References WxConversion::toWxString().
|
virtual |
|
private |
Creates the dialog contents.
Definition at line 1064 of file FUImplementationDialog.cc.
References ID_ADD_EXTERNAL_PORT, ID_ADD_PARAMETER, ID_ADD_SOURCE, ID_ARCH_PORT_LIST, ID_CLEAR_OPCODE, ID_CLK_PORT, ID_DELETE_EXTERNAL_PORT, ID_DELETE_PARAMETER, ID_DELETE_SOURCE, ID_EDIT_ARCH_PORT, ID_EDIT_EXTERNAL_PORT, ID_EDIT_PARAMETER, ID_EXTERNAL_PORT_LIST, ID_GLOCK_PORT, ID_GLOCK_REQ_PORT, ID_LABEL_CLK_PORT, ID_LABEL_GLOCK_PORT, ID_LABEL_GLOCK_REQ_PORT, ID_LABEL_NAME, ID_LABEL_OPCODE_PORT_NAME, ID_LABEL_RST_PORT, ID_LINE, ID_MOVE_SOURCE_DOWN, ID_MOVE_SOURCE_UP, ID_NAME, ID_OPCODE, ID_OPCODE_LIST, ID_OPCODE_PORT, ID_PARAMETER_LIST, ID_RST_PORT, ID_SET_OPCODE, and ID_SOURCE_LIST.
|
private |
|
private |
Event handler for the add external port button.
Opens a FUExternalPortDialog for adding a new external port.
Definition at line 443 of file FUImplementationDialog.cc.
References HDB::FUImplementation::deleteExternalPort(), implementation_, HDB::IN, and update().
|
private |
Event handler for the add parameter button.
Opens a ImplementationParameterDialog for adding a new parameter.
Definition at line 539 of file FUImplementationDialog.cc.
References HDB::FUImplementation::addParameter(), implementation_, HDB::Parameter::name, WxConversion::toWxString(), HDB::Parameter::type, update(), and HDB::Parameter::value.
|
private |
Event handler for the add source file button.
Opens a source file dialog for adding a new implementation file to the list.
Definition at line 813 of file FUImplementationDialog.cc.
References HDB::HWBlockImplementation::addImplementationFile(), ID_DELETE_SOURCE, ID_MOVE_SOURCE_DOWN, ID_MOVE_SOURCE_UP, implementation_, update(), and HDB::BlockImplementationFile::VHDL.
|
private |
Event handler for the architecture port list activateion
Opens a FUPortImplementationdialog for modifying the selected architecure port.
Definition at line 422 of file FUImplementationDialog.cc.
References architecture_, HDB::FUPortImplementation::architecturePort(), assert, TTAMachine::FunctionUnit::port(), selectedArchPort(), and update().
|
private |
Event handler for the architecture port list selection changes.
Updates edit/delete architecture port enabeld/disabled states.
Definition at line 407 of file FUImplementationDialog.cc.
References ID_EDIT_ARCH_PORT, and selectedArchPort().
Referenced by update().
|
private |
Event handler for the clear opcode button.
Clears the opcode of the selected operation.
Definition at line 756 of file FUImplementationDialog.cc.
References implementation_, WidgetTools::lcStringSelection(), opcodeList_, HDB::FUImplementation::unsetOpcode(), and update().
|
private |
|
private |
Event handler for the delete external port button.
Deletes the selected external port.
Definition at line 504 of file FUImplementationDialog.cc.
References HDB::FUImplementation::deleteExternalPort(), implementation_, selectedExternalPort(), and update().
|
private |
Event handler for the delete parameter button.
Deletes the selected parameter.
Definition at line 634 of file FUImplementationDialog.cc.
References HDB::FUImplementation::externalPort(), HDB::FUImplementation::externalPortCount(), implementation_, HDB::Parameter::name, HDB::FUImplementation::removeParameter(), selectedParameter(), HDB::ExternalPort::unsetParameterDependency(), and update().
|
private |
Event handler for the delete source file button.
Removes the selected source file.
Definition at line 838 of file FUImplementationDialog.cc.
References HDB::HWBlockImplementation::file(), ID_DELETE_SOURCE, ID_MOVE_SOURCE_DOWN, ID_MOVE_SOURCE_UP, implementation_, HDB::HWBlockImplementation::implementationFileCount(), WidgetTools::lcStringSelection(), HDB::BlockImplementationFile::pathToFile(), HDB::HWBlockImplementation::removeImplementationFile(), sourceList_, and update().
|
private |
Event handler for the edit architecture port button.
Opens a FUPortImplementationdialog for modifying the selected architecure port.
Definition at line 383 of file FUImplementationDialog.cc.
References architecture_, HDB::FUPortImplementation::architecturePort(), TTAMachine::FunctionUnit::port(), selectedArchPort(), and update().
|
private |
Event handler for the edit external port button.
Opens a FUExternalPort for modifying the selected external port.
Definition at line 465 of file FUImplementationDialog.cc.
References implementation_, selectedExternalPort(), and update().
|
private |
Event handler for the edit parameter button.
Opens a FUImplementationParamaeterDialog for modifying the selected parameter.
Definition at line 573 of file FUImplementationDialog.cc.
References HDB::FUImplementation::addParameter(), HDB::FUImplementation::externalPort(), HDB::FUImplementation::externalPortCount(), implementation_, HDB::Parameter::name, HDB::FUImplementation::removeParameter(), selectedParameter(), HDB::ExternalPort::setParameterDependency(), HDB::Parameter::type, HDB::ExternalPort::unsetParameterDependency(), update(), and HDB::Parameter::value.
|
private |
Event handler for the activate external port list item
Opens a FUExternalPort for modifying the selected external port.
Definition at line 485 of file FUImplementationDialog.cc.
References assert, implementation_, selectedExternalPort(), and update().
|
private |
Event handler for the external port list selection changes.
Updates edit/delete external port enabeld/disabled states.
Definition at line 522 of file FUImplementationDialog.cc.
References ID_DELETE_EXTERNAL_PORT, ID_EDIT_EXTERNAL_PORT, and selectedExternalPort().
Referenced by update().
|
private |
Event handler for the move source file down button.
Moves the selected source file down on the files list.
Definition at line 911 of file FUImplementationDialog.cc.
References HDB::HWBlockImplementation::addImplementationFile(), HDB::HWBlockImplementation::file(), implementation_, HDB::HWBlockImplementation::implementationFileCount(), WidgetTools::lcStringSelection(), HDB::BlockImplementationFile::pathToFile(), HDB::HWBlockImplementation::removeImplementationFile(), sourceList_, update(), and HDB::BlockImplementationFile::VHDL.
|
private |
Event handler for the move source file up button.
Moves the selected source file up on the files list.
Definition at line 862 of file FUImplementationDialog.cc.
References HDB::HWBlockImplementation::addImplementationFile(), HDB::HWBlockImplementation::file(), implementation_, HDB::HWBlockImplementation::implementationFileCount(), WidgetTools::lcStringSelection(), HDB::BlockImplementationFile::pathToFile(), HDB::HWBlockImplementation::removeImplementationFile(), sourceList_, update(), and HDB::BlockImplementationFile::VHDL.
|
private |
Event handler for the OK button.
Validates the dialog data and updates the FUImplementation object string attributes.
Definition at line 980 of file FUImplementationDialog.cc.
References architecture_, HDB::FUPortImplementation::architecturePort(), HDB::FUImplementation::architecturePort(), HDB::FUImplementation::architecturePortCount(), clkPort_, gLockPort_, gLockReqPort_, HDB::FUImplementation::hasOpcode(), implementation_, HDB::PortImplementation::name(), TTAMachine::HWOperation::name(), name_, opcodePort_, TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), rstPort_, HDB::HWBlockImplementation::setClkPort(), HDB::HWBlockImplementation::setGlockPort(), HDB::FUImplementation::setGlockReqPort(), HDB::HWBlockImplementation::setModuleName(), HDB::FUImplementation::setOpcodePort(), HDB::HWBlockImplementation::setRstPort(), WxConversion::toString(), and WxConversion::toWxString().
|
private |
Event handler for the opcode list selection changes.
Updates the enabled/disabled state of the set and clear opcode buttons.
Definition at line 734 of file FUImplementationDialog.cc.
References HDB::FUImplementation::hasOpcode(), ID_CLEAR_OPCODE, ID_SET_OPCODE, implementation_, WidgetTools::lcStringSelection(), and opcodeList_.
|
private |
Event handler for the parameter list activateion.
Opens a FUImplementationParamaeterDialog for modifying the selected parameter.
Definition at line 604 of file FUImplementationDialog.cc.
References HDB::FUImplementation::addParameter(), HDB::FUImplementation::externalPort(), HDB::FUImplementation::externalPortCount(), implementation_, HDB::Parameter::name, HDB::FUImplementation::removeParameter(), selectedParameter(), HDB::ExternalPort::setParameterDependency(), HDB::Parameter::type, HDB::ExternalPort::unsetParameterDependency(), update(), and HDB::Parameter::value.
|
private |
Event handler for the parameter list selection changes.
Updates edit/delete parameter enabled/disabled states.
Definition at line 655 of file FUImplementationDialog.cc.
References ID_DELETE_PARAMETER, ID_EDIT_PARAMETER, and selectedParameter().
Referenced by update().
|
private |
Event handler for the set opcode button.
Sets the opcode for the selected operation.
Definition at line 775 of file FUImplementationDialog.cc.
References architecture_, HDB::FUImplementation::hasOpcode(), ID_OPCODE, implementation_, WidgetTools::lcStringSelection(), TTAMachine::HWOperation::name(), HDB::FUImplementation::opcode(), opcodeList_, TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), HDB::FUImplementation::setOpcode(), WxConversion::toWxString(), and update().
|
private |
Event handler for the source file list selection changes.
Updates delete source file and move up/down buttons enabled/disabled states.
Definition at line 961 of file FUImplementationDialog.cc.
References ID_DELETE_SOURCE, ID_MOVE_SOURCE_DOWN, ID_MOVE_SOURCE_UP, WidgetTools::lcStringSelection(), and sourceList_.
|
private |
Returns pointer to the architecture port selected in the architecture port list.
Definition at line 675 of file FUImplementationDialog.cc.
References HDB::FUImplementation::architecturePort(), archPortList_, and implementation_.
Referenced by onArchPortActivation(), onArchPortSelection(), and onEditArchitecturePort().
|
private |
Returns pointer to the external port selected in the external port list.
Definition at line 694 of file FUImplementationDialog.cc.
References HDB::FUImplementation::externalPort(), externalPortList_, and implementation_.
Referenced by onDeleteExternalPort(), onEditExternalPort(), onExternalPortActivation(), and onExternalPortSelection().
|
private |
Returns copy of the selected parameter in the parameter list.
Definition at line 713 of file FUImplementationDialog.cc.
References implementation_, HDB::FUImplementation::parameter(), and parameterList_.
Referenced by onDeleteParameter(), onEditParameter(), onParameterActivation(), and onParameterSelection().
|
private |
Update handler Updates UI values to reflect new state. If called from constructor, fills default values for opcodes.
onInit | Set true whe called from constructor |
Definition at line 247 of file FUImplementationDialog.cc.
References architecture_, HDB::FUPortImplementation::architecturePort(), HDB::FUImplementation::architecturePort(), HDB::FUImplementation::architecturePortCount(), archPortList_, dummy, HDB::FUImplementation::externalPort(), HDB::FUImplementation::externalPortCount(), externalPortList_, HDB::HWBlockImplementation::file(), HDB::FUImplementation::hasOpcode(), implementation_, HDB::HWBlockImplementation::implementationFileCount(), TTAMachine::HWOperation::io(), TTAMachine::HWOperation::isBound(), HDB::ExternalPort::name(), HDB::Parameter::name, HDB::PortImplementation::name(), TTAMachine::HWOperation::name(), onArchPortSelection(), onExternalPortSelection(), onParameterSelection(), HDB::FUImplementation::opcode(), opcodeList_, opcodeWarningShowed_, TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), TTAMachine::FunctionUnit::operationPort(), HDB::FUImplementation::parameter(), HDB::FUImplementation::parameterCount(), parameterList_, HDB::BlockImplementationFile::pathToFile(), HDB::FUImplementation::setOpcode(), sourceList_, Conversion::toString(), WxConversion::toWxString(), HDB::Parameter::type, and HDB::Parameter::value.
Referenced by onAddExternalPort(), onAddParameter(), onAddSourceFile(), onArchPortActivation(), onClearOpcode(), onDeleteExternalPort(), onDeleteParameter(), onDeleteSourceFile(), onEditArchitecturePort(), onEditExternalPort(), onEditParameter(), onExternalPortActivation(), onMoveSourceFileDown(), onMoveSourceFileUp(), onParameterActivation(), and onSetOpcode().
|
private |
Function unit architecture the FUImplementation implements.
Definition at line 143 of file FUImplementationDialog.hh.
Referenced by onArchPortActivation(), onEditArchitecturePort(), onOK(), onSetOpcode(), and update().
|
private |
Pointer to the architecture port list widget.
Definition at line 148 of file FUImplementationDialog.hh.
Referenced by selectedArchPort(), and update().
|
private |
Definition at line 160 of file FUImplementationDialog.hh.
Referenced by onOK().
|
private |
Pointer to the external port list widget.
Definition at line 150 of file FUImplementationDialog.hh.
Referenced by selectedExternalPort(), and update().
|
private |
Definition at line 162 of file FUImplementationDialog.hh.
Referenced by onOK().
|
private |
Definition at line 163 of file FUImplementationDialog.hh.
Referenced by onOK().
|
private |
FU Implementation to modify.
Definition at line 141 of file FUImplementationDialog.hh.
Referenced by onAddExternalPort(), onAddParameter(), onAddSourceFile(), onClearOpcode(), onDeleteExternalPort(), onDeleteParameter(), onDeleteSourceFile(), onEditExternalPort(), onEditParameter(), onExternalPortActivation(), onMoveSourceFileDown(), onMoveSourceFileUp(), onOK(), onOpcodeSelection(), onParameterActivation(), onSetOpcode(), selectedArchPort(), selectedExternalPort(), selectedParameter(), and update().
|
private |
Definition at line 158 of file FUImplementationDialog.hh.
Referenced by onOK().
|
private |
Pointer to the opcode list widget.
Definition at line 154 of file FUImplementationDialog.hh.
Referenced by onClearOpcode(), onOpcodeSelection(), onSetOpcode(), and update().
|
private |
Definition at line 159 of file FUImplementationDialog.hh.
Referenced by onOK().
|
private |
Definition at line 145 of file FUImplementationDialog.hh.
Referenced by update().
|
private |
Pointer to the parameter list widget.
Definition at line 152 of file FUImplementationDialog.hh.
Referenced by selectedParameter(), and update().
|
private |
Definition at line 161 of file FUImplementationDialog.hh.
Referenced by onOK().
|
private |
Pointer to the source file list widget.
Definition at line 156 of file FUImplementationDialog.hh.
Referenced by onDeleteSourceFile(), onMoveSourceFileDown(), onMoveSourceFileUp(), onSourceFileSelection(), and update().