OpenASIP
2.0
|
#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. More... | |
TCEString | operation_ |
Name of the selected operation. More... | |
wxListBox * | operationList_ |
Operation list widget. More... | |
std::string | opNameFilter_ = "" |
A string to filter opset list. More... | |
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(), TTAMachine::FUPort::isTriggering(), and TTAMachine::BaseFUPort::width().
|
private |
Creates the dialog widgets.
parent | Parent window of the widgets. |
Definition at line 423 of file OpsetDialog.cc.
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, TTAMachine::AddressSpace::end(), TTAMachine::FunctionUnit::hasAddressSpace(), TTAMachine::FunctionUnit::hasOperation(), Operand::index(), TTAMachine::Port::inputSocket(), Operand::isAddress(), Operand::isInput(), Operand::isOutput(), TTAMachine::FUPort::isTriggering(), Operation::numberOfInputs(), Operation::numberOfOutputs(), Operation::operand(), OperationPool::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().
|
private |
|
private |
Event handler for opset filtering.
Definition at line 192 of file OpsetDialog.cc.
References 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(), Operation::numberOfInputs(), Operation::numberOfOutputs(), OperationPool::operation(), WxConversion::toString(), and WxConversion::toWxString().
|
protectedvirtual |
Reads user choices from the dialog widgets.
Definition at line 121 of file OpsetDialog.cc.
References WxConversion::toString().
|
protectedvirtual |
Transfers data to the opset list.
Definition at line 89 of file OpsetDialog.cc.
References OperationPool::cleanupCache(), OperationPool::index(), OperationIndex::module(), OperationIndex::moduleCount(), OperationIndex::operationCount(), OperationIndex::operationName(), and WxConversion::toWxString().
Referenced by onOperationFilterChange().
|
private |
Chosen latency.
Definition at line 75 of file OpsetDialog.hh.
|
private |
Name of the selected operation.
Definition at line 77 of file OpsetDialog.hh.
|
private |
Operation list widget.
Definition at line 79 of file OpsetDialog.hh.
|
private |
A string to filter opset list.
Definition at line 81 of file OpsetDialog.hh.