OpenASIP  2.0
FUPortImplementationDialog.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2009 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /**
25  * @file FUPortImplementationDialog.hh
26  *
27  * Declaration of FUPortImplementationDialog class.
28  *
29  * @author Veli-Pekka Jääskeläinen 2006 (vjaaskel-no.spam-cs.tut.fi)
30  * @note rating: red
31  */
32 
33 #ifndef TTA_FU_PORT_IMPLEMENTATION_DIALOG_HH
34 #define TTA_FU_PORT_IMPLEMENTATION_DIALOG_HH
35 
36 #include <wx/wx.h>
37 
38 namespace HDB {
39  class FUPortImplementation;
40 }
41 
42 namespace TTAMachine {
43  class BaseFUPort;
44 }
45 
46 /**
47  * Dialog for editing FU port implementations.
48  */
49 class FUPortImplementationDialog : public wxDialog {
50 public:
52  wxWindow* parent, wxWindowID id,
54  const TTAMachine::BaseFUPort& architecture);
55 
57  virtual bool TransferDataToWindow();
58 private:
59 
60  void onOK(wxCommandEvent& event);
61 
62  /// Enumerated IDs for dialog widgets.
63  enum {
64  ID_LABEL_NAME = 10000,
76  };
77 
78  /// Creates the dialog contents.
79  wxSizer* createContents(wxWindow* parent, bool call_fit, bool set_sizer);
80 
81  /// FU port implementation to modify.
83  /// Architecture of the modified port.
85 
86  /// Name of the port.
87  wxString name_;
88  /// Name of the load port.
89  wxString loadPortName_;
90  /// Name of the guard port.
91  wxString guardPortName_;
92  /// Width formula string.
93  wxString widthFormula_;
94 
95  /// List widget for the operand bindings.
96  wxListCtrl* operandList_;
97 
98  DECLARE_EVENT_TABLE()
99 };
100 
101 #endif
FUPortImplementationDialog::~FUPortImplementationDialog
virtual ~FUPortImplementationDialog()
Definition: FUPortImplementationDialog.cc:108
HDB
Definition: CostDatabase.hh:49
FUPortImplementationDialog::ID_NAME
@ ID_NAME
Definition: FUPortImplementationDialog.hh:65
FUPortImplementationDialog::operandList_
wxListCtrl * operandList_
List widget for the operand bindings.
Definition: FUPortImplementationDialog.hh:96
implementation
IDF::MachineImplementation * implementation
the implementation definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:61
FUPortImplementationDialog::ID_LINE
@ ID_LINE
Definition: FUPortImplementationDialog.hh:75
FUPortImplementationDialog::ID_LOAD_PORT
@ ID_LOAD_PORT
Definition: FUPortImplementationDialog.hh:71
HDB::FUPortImplementation
Definition: FUPortImplementation.hh:46
TTAMachine::BaseFUPort
Definition: BaseFUPort.hh:44
FUPortImplementationDialog::ID_GUARD_PORT
@ ID_GUARD_PORT
Definition: FUPortImplementationDialog.hh:73
FUPortImplementationDialog::ID_LABEL_ARCHITECTURE_PORT
@ ID_LABEL_ARCHITECTURE_PORT
Definition: FUPortImplementationDialog.hh:66
FUPortImplementationDialog::name_
wxString name_
Name of the port.
Definition: FUPortImplementationDialog.hh:87
FUPortImplementationDialog::ID_ARCHITECTURE_PORT_NAME
@ ID_ARCHITECTURE_PORT_NAME
Definition: FUPortImplementationDialog.hh:67
FUPortImplementationDialog::TransferDataToWindow
virtual bool TransferDataToWindow()
Definition: FUPortImplementationDialog.cc:118
FUPortImplementationDialog::FUPortImplementationDialog
FUPortImplementationDialog(wxWindow *parent, wxWindowID id, HDB::FUPortImplementation &implementation, const TTAMachine::BaseFUPort &architecture)
Definition: FUPortImplementationDialog.cc:61
FUPortImplementationDialog::loadPortName_
wxString loadPortName_
Name of the load port.
Definition: FUPortImplementationDialog.hh:89
FUPortImplementationDialog::ID_LOAD_PORT_LABEL
@ ID_LOAD_PORT_LABEL
Definition: FUPortImplementationDialog.hh:70
FUPortImplementationDialog::widthFormula_
wxString widthFormula_
Width formula string.
Definition: FUPortImplementationDialog.hh:93
FUPortImplementationDialog::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Creates the dialog contents.
Definition: FUPortImplementationDialog.cc:199
FUPortImplementationDialog::architecture_
const TTAMachine::BaseFUPort & architecture_
Architecture of the modified port.
Definition: FUPortImplementationDialog.hh:84
FUPortImplementationDialog::ID_LABEL_WIDTH
@ ID_LABEL_WIDTH
Definition: FUPortImplementationDialog.hh:68
FUPortImplementationDialog::guardPortName_
wxString guardPortName_
Name of the guard port.
Definition: FUPortImplementationDialog.hh:91
FUPortImplementationDialog::onOK
void onOK(wxCommandEvent &event)
Definition: FUPortImplementationDialog.cc:164
FUPortImplementationDialog
Definition: FUPortImplementationDialog.hh:49
FUPortImplementationDialog::implementation_
HDB::FUPortImplementation & implementation_
FU port implementation to modify.
Definition: FUPortImplementationDialog.hh:82
FUPortImplementationDialog::ID_OPERAND_LIST
@ ID_OPERAND_LIST
Definition: FUPortImplementationDialog.hh:74
TTAMachine
Definition: Assembler.hh:48
FUPortImplementationDialog::ID_WIDTH
@ ID_WIDTH
Definition: FUPortImplementationDialog.hh:69
FUPortImplementationDialog::ID_GUARD_PORT_LABEL
@ ID_GUARD_PORT_LABEL
Definition: FUPortImplementationDialog.hh:72
FUPortImplementationDialog::ID_LABEL_NAME
@ ID_LABEL_NAME
Definition: FUPortImplementationDialog.hh:64