|
OpenASIP 2.2
|
#include <OpsetDialog.hh>


Public Member Functions | |
| OpsetDialog (wxWindow *parent) | |
| virtual | ~OpsetDialog () |
| TTAMachine::HWOperation * | createOperation (TTAMachine::FunctionUnit &fu) |
Protected Member Functions | |
| virtual bool | TransferDataToWindow () |
| virtual bool | TransferDataFromWindow () |
Private Types | |
| enum | { ID_LIST = 20000 , ID_OP_FILTER_LABEL , ID_OP_FILTER , ID_OP_DESCRIPTION , ID_OP_INPUTS , ID_OP_OUTPUTS , ID_LATENCY , ID_TEXT , ID_LINE } |
| Widget IDs. More... | |
| typedef std::set< const TTAMachine::FUPort *, TTAMachine::MachinePart::Comparator > | PortSet |
| typedef std::map< int, PortSet > | PortMap |
Private Member Functions | |
| bool | bindPorts (TTAMachine::HWOperation &operation, std::map< int, std::set< int > > &operands, PortMap &ports, bool needsTrigger) |
| const TTAMachine::FUPort * | findTriggerPort (PortMap &ports) |
| wxSizer * | createContents (wxWindow *parent, bool call_fit, bool set_sizer) |
| void | onSelectOperation (wxCommandEvent &event) |
| void | onOK (wxCommandEvent &event) |
| void | onOperationFilterChange (wxCommandEvent &event) |
Private Attributes | |
| int | latency_ |
| Chosen latency. | |
| TCEString | operation_ |
| Name of the selected operation. | |
| wxListBox * | operationList_ |
| Operation list widget. | |
| std::string | opNameFilter_ = "" |
| A string to filter opset list. | |
Dialog for selecting and creating HWOperation from the operation pool.
Definition at line 50 of file OpsetDialog.hh.
|
private |
Definition at line 61 of file OpsetDialog.hh.
|
private |
Definition at line 60 of file OpsetDialog.hh.
|
private |
Widget IDs.
| Enumerator | |
|---|---|
| ID_LIST | |
| ID_OP_FILTER_LABEL | |
| ID_OP_FILTER | |
| ID_OP_DESCRIPTION | |
| ID_OP_INPUTS | |
| ID_OP_OUTPUTS | |
| ID_LATENCY | |
| ID_TEXT | |
| ID_LINE | |
Definition at line 84 of file OpsetDialog.hh.
| OpsetDialog::OpsetDialog | ( | wxWindow * | parent | ) |
The constructor.
| parent | Parent window of the dialog. |
Definition at line 69 of file OpsetDialog.cc.
|
virtual |
|
private |
Binds ports to operands of an instruction.
Tries to use sensible port widths, ie smallest allowed.
| operation | HWOperation being constructed |
| operands | width-based map of all operands |
| ports | width-based map of all ports |
| needsTrigger | if trigger neeed to be bound. |
Definition at line 333 of file OpsetDialog.cc.
References TTAMachine::HWOperation::bindPort(), findTriggerPort(), TTAMachine::FUPort::isTriggering(), and TTAMachine::BaseFUPort::width().
Referenced by createOperation().

|
private |
Creates the dialog widgets.
| parent | Parent window of the widgets. |
Definition at line 423 of file OpsetDialog.cc.
References ID_LATENCY, ID_LINE, ID_LIST, ID_OP_DESCRIPTION, ID_OP_FILTER, ID_OP_FILTER_LABEL, ID_OP_INPUTS, ID_OP_OUTPUTS, and ID_TEXT.
| HWOperation * OpsetDialog::createOperation | ( | TTAMachine::FunctionUnit & | fu | ) |
Creates a new HWOperation based on user choices.
| fu | Parent function unit of the new operation. |
Definition at line 212 of file OpsetDialog.cc.
References TTAMachine::ExecutionPipeline::addPortRead(), TTAMachine::ExecutionPipeline::addPortWrite(), TTAMachine::FunctionUnit::addressSpace(), assert, bindPorts(), TTAMachine::AddressSpace::end(), TTAMachine::FunctionUnit::hasAddressSpace(), TTAMachine::FunctionUnit::hasOperation(), Operand::index(), TTAMachine::Port::inputSocket(), Operand::isAddress(), Operand::isInput(), Operand::isOutput(), TTAMachine::FUPort::isTriggering(), latency_, Operation::numberOfInputs(), Operation::numberOfOutputs(), Operation::operand(), operation_, TTAMachine::FunctionUnit::operationPort(), TTAMachine::FunctionUnit::operationPortCount(), TTAMachine::Port::outputSocket(), TTAMachine::HWOperation::pipeline(), MathTools::requiredBits(), WxConversion::toWxString(), TTAMachine::BaseFUPort::width(), and Operand::width().
Referenced by FUDialog::onAddOperationFromOpset().

|
private |
Finds the trigger port from map of function unit ports.
Definition at line 403 of file OpsetDialog.cc.
References TTAMachine::FUPort::isTriggering().
Referenced by bindPorts().

|
private |
Event handler for the OK button.
Definition at line 176 of file OpsetDialog.cc.
References operationList_, and TransferDataFromWindow().

|
private |
Event handler for opset filtering.
Definition at line 192 of file OpsetDialog.cc.
References opNameFilter_, and TransferDataToWindow().

|
private |
Event handler for the operation list selections.
Enables and disables the OK button. Displays operation description and ports count.
Definition at line 134 of file OpsetDialog.cc.
References Operation::description(), ID_OP_DESCRIPTION, ID_OP_INPUTS, ID_OP_OUTPUTS, Operation::numberOfInputs(), Operation::numberOfOutputs(), operation_, operationList_, WxConversion::toString(), and WxConversion::toWxString().

|
protectedvirtual |
Reads user choices from the dialog widgets.
Definition at line 121 of file OpsetDialog.cc.
References ID_LATENCY, latency_, operation_, operationList_, and WxConversion::toString().
Referenced by onOK().

|
protectedvirtual |
Transfers data to the opset list.
Definition at line 89 of file OpsetDialog.cc.
References OperationPool::cleanupCache(), OperationIndex::moduleCount(), OperationIndex::operationCount(), operationList_, OperationIndex::operationName(), opNameFilter_, and WxConversion::toWxString().
Referenced by onOperationFilterChange().

|
private |
Chosen latency.
Definition at line 75 of file OpsetDialog.hh.
Referenced by createOperation(), and TransferDataFromWindow().
|
private |
Name of the selected operation.
Definition at line 77 of file OpsetDialog.hh.
Referenced by createOperation(), onSelectOperation(), and TransferDataFromWindow().
|
private |
Operation list widget.
Definition at line 79 of file OpsetDialog.hh.
Referenced by onOK(), onSelectOperation(), TransferDataFromWindow(), and TransferDataToWindow().
|
private |
A string to filter opset list.
Definition at line 81 of file OpsetDialog.hh.
Referenced by onOperationFilterChange(), and TransferDataToWindow().