OpenASIP  2.0
RFImplementationDialog.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2014 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 RFImplementationDialog.hh
26  *
27  * Declaration of RFImplementationDialog 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_RF_IMPLEMENTATION_DIALOG_HH
34 #define TTA_RF_IMPLEMENTATION_DIALOG_HH
35 
36 #include <wx/listctrl.h>
37 #include "RFImplementation.hh"
38 
39 class wxListCtrl;
40 class wxChoice;
41 
42 /**
43  * Dialog for editing RF implementations.
44  */
45 class RFImplementationDialog : public wxDialog {
46 public:
48  wxWindow* parent, wxWindowID id,
50 
51  virtual ~RFImplementationDialog();
52 private:
53 
54  void onOK(wxCommandEvent& event);
55  void update();
56 
60 
61  void onSACchoise(wxCommandEvent& event);
62 
63  void onPortSelection(wxListEvent& event);
64  void onAddPort(wxCommandEvent& event);
65  void onModifyPort(wxCommandEvent& event);
66  void onDeletePort(wxCommandEvent& event);
67 
68  void onExternalPortActivation(wxListEvent& event);
69  void onExternalPortSelection(wxListEvent& event);
70  void onAddExternalPort(wxCommandEvent& event);
71  void onEditExternalPort(wxCommandEvent& event);
72  void onDeleteExternalPort(wxCommandEvent& event);
73 
74  void onParameterActivation(wxListEvent& event);
75  void onParameterSelection(wxListEvent& event);
76  void onAddParameter(wxCommandEvent& event);
77  void onEditParameter(wxCommandEvent& event);
78  void onDeleteParameter(wxCommandEvent& event);
79 
80  void onSourceFileSelection(wxListEvent& event);
81  void onAddSourceFile(wxCommandEvent& event);
82  void onDeleteSourceFile(wxCommandEvent& event);
83  void onMoveSourceFileUp(wxCommandEvent&);
84  void onMoveSourceFileDown(wxCommandEvent&);
85 
86  void onSizeChoice(wxCommandEvent& event);
87  void onWidthChoice(wxCommandEvent& event);
88 
89  wxString getWidthParameter();
90  wxString getSizeParameter();
91 
92  wxSizer* createContents(wxWindow* parent, bool call_fit, bool set_sizer);
93 
94  /// Window indentifiers for dialog widgets.
95  enum {
96  ID_LABEL_NAME = 10000,
122 
133  };
134 
135  enum {
138  };
139 
140  /// RF Implementation to modify.
142 
143  /// Pointer to the port list widget.
144  wxListCtrl* portList_;
145  /// Pointer to the source file list widget.
146  wxListCtrl* sourceList_;
147  /// Pointer to the external port list widget.
148  wxListCtrl* externalPortList_;
149  /// Pointer to the parameter list widget.
150  wxListCtrl* parameterList_;
151  /// Pointer to size parameter choice widget
152  wxChoice* sizeChoice_;
153  /// Pointer to width parameter choice widget
154  wxChoice* widthChoice_;
155 
156  wxString name_;
157  wxString clkPort_;
158  wxString rstPort_;
159  wxString gLockPort_;
160  wxString guardPort_;
161  bool sacParam_;
162 
163  DECLARE_EVENT_TABLE()
164 };
165 
166 #endif
RFImplementationDialog::sacParam_
bool sacParam_
Definition: RFImplementationDialog.hh:161
RFImplementationDialog::getSizeParameter
wxString getSizeParameter()
Definition: RFImplementationDialog.cc:800
RFImplementationDialog::onExternalPortActivation
void onExternalPortActivation(wxListEvent &event)
Definition: RFImplementationDialog.cc:407
RFImplementationDialog::ID_DELETE_PARAMETER
@ ID_DELETE_PARAMETER
Definition: RFImplementationDialog.hh:130
RFImplementationDialog::ID_LABEL_WIDTH_PARAMETER
@ ID_LABEL_WIDTH_PARAMETER
Definition: RFImplementationDialog.hh:108
RFImplementationDialog::ID_ADD_SOURCE
@ ID_ADD_SOURCE
Definition: RFImplementationDialog.hh:117
RFImplementationDialog::ID_MOVE_SOURCE_DOWN
@ ID_MOVE_SOURCE_DOWN
Definition: RFImplementationDialog.hh:120
RFImplementationDialog::onExternalPortSelection
void onExternalPortSelection(wxListEvent &event)
Definition: RFImplementationDialog.cc:423
implementation
IDF::MachineImplementation * implementation
the implementation definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:61
RFImplementationDialog::ID_DELETE_EXTERNAL_PORT
@ ID_DELETE_EXTERNAL_PORT
Definition: RFImplementationDialog.hh:126
RFImplementationDialog::ID_LINE
@ ID_LINE
Definition: RFImplementationDialog.hh:121
RFImplementationDialog::ID_CLK_PORT
@ ID_CLK_PORT
Definition: RFImplementationDialog.hh:99
RFImplementationDialog::ID_WIDTH_PARAMETER
@ ID_WIDTH_PARAMETER
Definition: RFImplementationDialog.hh:109
RFImplementationDialog::selectedPort
HDB::RFPortImplementation * selectedPort()
Definition: RFImplementationDialog.cc:348
RFImplementationDialog::clkPort_
wxString clkPort_
Definition: RFImplementationDialog.hh:157
RFImplementationDialog::sourceList_
wxListCtrl * sourceList_
Pointer to the source file list widget.
Definition: RFImplementationDialog.hh:146
RFImplementationDialog::ID_LABEL_SAC
@ ID_LABEL_SAC
Definition: RFImplementationDialog.hh:110
RFImplementationDialog::gLockPort_
wxString gLockPort_
Definition: RFImplementationDialog.hh:159
RFImplementationDialog::onSourceFileSelection
void onSourceFileSelection(wxListEvent &event)
Definition: RFImplementationDialog.cc:781
RFImplementationDialog::onAddSourceFile
void onAddSourceFile(wxCommandEvent &event)
Definition: RFImplementationDialog.cc:646
RFImplementationDialog::getWidthParameter
wxString getWidthParameter()
Definition: RFImplementationDialog.cc:812
RFImplementationDialog::parameterList_
wxListCtrl * parameterList_
Pointer to the parameter list widget.
Definition: RFImplementationDialog.hh:150
RFImplementationDialog::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition: RFImplementationDialog.cc:860
RFImplementationDialog::onDeletePort
void onDeletePort(wxCommandEvent &event)
Definition: RFImplementationDialog.cc:311
RFImplementationDialog::onModifyPort
void onModifyPort(wxCommandEvent &event)
Definition: RFImplementationDialog.cc:329
RFImplementationDialog::ID_LABEL_SIZE_PARAMETER
@ ID_LABEL_SIZE_PARAMETER
Definition: RFImplementationDialog.hh:106
RFImplementationDialog::ID_PORT_LIST
@ ID_PORT_LIST
Definition: RFImplementationDialog.hh:112
HDB::RFExternalPort
Definition: RFExternalPort.hh:41
RFImplementationDialog::guardPort_
wxString guardPort_
Definition: RFImplementationDialog.hh:160
HDB::RFImplementation
Definition: RFImplementation.hh:50
RFImplementationDialog::RFImplementationDialog
RFImplementationDialog(wxWindow *parent, wxWindowID id, HDB::RFImplementation &implementation)
Definition: RFImplementationDialog.cc:125
RFImplementation.hh
RFImplementationDialog::ID_LABEL_GLOCK_PORT
@ ID_LABEL_GLOCK_PORT
Definition: RFImplementationDialog.hh:102
RFImplementationDialog::ID_SIZE_PARAMETER
@ ID_SIZE_PARAMETER
Definition: RFImplementationDialog.hh:107
RFImplementationDialog::ID_EDIT_EXTERNAL_PORT
@ ID_EDIT_EXTERNAL_PORT
Definition: RFImplementationDialog.hh:125
RFImplementationDialog::sizeChoice_
wxChoice * sizeChoice_
Pointer to size parameter choice widget.
Definition: RFImplementationDialog.hh:152
RFImplementationDialog::ID_SOURCE_LIST
@ ID_SOURCE_LIST
Definition: RFImplementationDialog.hh:116
RFImplementationDialog::onParameterSelection
void onParameterSelection(wxListEvent &event)
Definition: RFImplementationDialog.cc:530
RFImplementationDialog::ID_RESET_PORT
@ ID_RESET_PORT
Definition: RFImplementationDialog.hh:101
RFImplementationDialog::ID_DELETE_SOURCE
@ ID_DELETE_SOURCE
Definition: RFImplementationDialog.hh:118
RFImplementationDialog::onOK
void onOK(wxCommandEvent &event)
Definition: RFImplementationDialog.cc:824
RFImplementationDialog::rstPort_
wxString rstPort_
Definition: RFImplementationDialog.hh:158
RFImplementationDialog::ID_ADD_EXTERNAL_PORT
@ ID_ADD_EXTERNAL_PORT
Definition: RFImplementationDialog.hh:124
RFImplementationDialog::RBOX_FALSE
@ RBOX_FALSE
Definition: RFImplementationDialog.hh:136
RFImplementationDialog::onAddExternalPort
void onAddExternalPort(wxCommandEvent &event)
Definition: RFImplementationDialog.cc:439
RFImplementationDialog::selectedExternalPort
HDB::RFExternalPort * selectedExternalPort()
Definition: RFImplementationDialog.cc:368
RFImplementationDialog::RBOX_TRUE
@ RBOX_TRUE
Definition: RFImplementationDialog.hh:137
RFImplementationDialog::ID_EDIT_PARAMETER
@ ID_EDIT_PARAMETER
Definition: RFImplementationDialog.hh:128
RFImplementationDialog::ID_LABEL_RESET_PORT
@ ID_LABEL_RESET_PORT
Definition: RFImplementationDialog.hh:100
RFImplementationDialog::externalPortList_
wxListCtrl * externalPortList_
Pointer to the external port list widget.
Definition: RFImplementationDialog.hh:148
RFImplementationDialog::ID_PARAMETER_LIST
@ ID_PARAMETER_LIST
Definition: RFImplementationDialog.hh:127
RFImplementationDialog::onMoveSourceFileUp
void onMoveSourceFileUp(wxCommandEvent &)
Definition: RFImplementationDialog.cc:687
RFImplementationDialog::onPortSelection
void onPortSelection(wxListEvent &event)
Definition: RFImplementationDialog.cc:295
RFImplementationDialog::onMoveSourceFileDown
void onMoveSourceFileDown(wxCommandEvent &)
Definition: RFImplementationDialog.cc:734
HDB::RFPortImplementation
Definition: RFPortImplementation.hh:43
RFImplementationDialog::onAddParameter
void onAddParameter(wxCommandEvent &event)
Definition: RFImplementationDialog.cc:547
RFImplementationDialog::onEditExternalPort
void onEditExternalPort(wxCommandEvent &event)
Definition: RFImplementationDialog.cc:460
RFImplementationDialog::onSACchoise
void onSACchoise(wxCommandEvent &event)
Definition: RFImplementationDialog.cc:264
RFImplementationDialog::ID_DELETE_PORT
@ ID_DELETE_PORT
Definition: RFImplementationDialog.hh:115
RFImplementationDialog::onDeleteExternalPort
void onDeleteExternalPort(wxCommandEvent &event)
Definition: RFImplementationDialog.cc:480
RFImplementationDialog::ID_MODIFY_PORT
@ ID_MODIFY_PORT
Definition: RFImplementationDialog.hh:114
RFImplementationDialog::ID_SIZE_CHOICE
@ ID_SIZE_CHOICE
Definition: RFImplementationDialog.hh:131
RFImplementationDialog::onAddPort
void onAddPort(wxCommandEvent &event)
Definition: RFImplementationDialog.cc:275
RFImplementationDialog::ID_LABEL_CLK_PORT
@ ID_LABEL_CLK_PORT
Definition: RFImplementationDialog.hh:98
RFImplementationDialog::~RFImplementationDialog
virtual ~RFImplementationDialog()
Definition: RFImplementationDialog.cc:195
RFImplementationDialog::ID_WIDTH_CHOICE
@ ID_WIDTH_CHOICE
Definition: RFImplementationDialog.hh:132
RFImplementationDialog::ID_EXTERNAL_PORT_LIST
@ ID_EXTERNAL_PORT_LIST
Definition: RFImplementationDialog.hh:123
RFImplementationDialog::onParameterActivation
void onParameterActivation(wxListEvent &event)
Definition: RFImplementationDialog.cc:500
RFImplementationDialog::onDeleteSourceFile
void onDeleteSourceFile(wxCommandEvent &event)
Definition: RFImplementationDialog.cc:668
HDB::Parameter
Definition: HDBTypes.hh:46
RFImplementationDialog::ID_GUARD_PORT
@ ID_GUARD_PORT
Definition: RFImplementationDialog.hh:105
RFImplementationDialog::widthChoice_
wxChoice * widthChoice_
Pointer to width parameter choice widget.
Definition: RFImplementationDialog.hh:154
RFImplementationDialog::ID_ADD_PARAMETER
@ ID_ADD_PARAMETER
Definition: RFImplementationDialog.hh:129
RFImplementationDialog::ID_SAC
@ ID_SAC
Definition: RFImplementationDialog.hh:111
RFImplementationDialog::ID_NAME
@ ID_NAME
Definition: RFImplementationDialog.hh:97
RFImplementationDialog::onDeleteParameter
void onDeleteParameter(wxCommandEvent &event)
Definition: RFImplementationDialog.cc:624
RFImplementationDialog::implementation_
HDB::RFImplementation & implementation_
RF Implementation to modify.
Definition: RFImplementationDialog.hh:141
RFImplementationDialog::selectedParameter
HDB::RFImplementation::Parameter selectedParameter()
Definition: RFImplementationDialog.cc:388
RFImplementationDialog::ID_LABEL_GUARD_PORT
@ ID_LABEL_GUARD_PORT
Definition: RFImplementationDialog.hh:104
RFImplementationDialog::onWidthChoice
void onWidthChoice(wxCommandEvent &event)
RFImplementationDialog::ID_MOVE_SOURCE_UP
@ ID_MOVE_SOURCE_UP
Definition: RFImplementationDialog.hh:119
RFImplementationDialog
Definition: RFImplementationDialog.hh:45
RFImplementationDialog::ID_ADD_PORT
@ ID_ADD_PORT
Definition: RFImplementationDialog.hh:113
RFImplementationDialog::ID_LABEL_NAME
@ ID_LABEL_NAME
Definition: RFImplementationDialog.hh:96
RFImplementationDialog::name_
wxString name_
Definition: RFImplementationDialog.hh:156
RFImplementationDialog::ID_GLOCK_PORT
@ ID_GLOCK_PORT
Definition: RFImplementationDialog.hh:103
RFImplementationDialog::portList_
wxListCtrl * portList_
Pointer to the port list widget.
Definition: RFImplementationDialog.hh:144
RFImplementationDialog::onEditParameter
void onEditParameter(wxCommandEvent &event)
Definition: RFImplementationDialog.cc:594
RFImplementationDialog::update
void update()
Definition: RFImplementationDialog.cc:199
RFImplementationDialog::onSizeChoice
void onSizeChoice(wxCommandEvent &event)