OpenASIP 2.2
Loading...
Searching...
No Matches
FUImplementationDialog.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 FUImplementationDialog.hh
26 *
27 * Declaration of FUImplementationDialog 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_IMPLEMENTATION_DIALOG_HH
34#define TTA_FU_IMPLEMENTATION_DIALOG_HH
35
36#include <wx/listctrl.h>
37#include "FUImplementation.hh"
38
39// Remove this define when opcode editing should be disabled.
40// Also edit hdb/HDBManager.cc not to write opcodes into hdb anymore.
41#define ALLOW_OPCODE_EDITING
42
43class wxListCtrl;
44
45namespace TTAMachine {
46 class FunctionUnit;
47}
48
49/**
50 * Dialog for editing FU implementations.
51 */
52class FUImplementationDialog : public wxDialog {
53public:
55 wxWindow* parent, wxWindowID id,
57 const TTAMachine::FunctionUnit& architecture);
58
60private:
61
62 void onOK(wxCommandEvent& event);
63 void update(bool onInit = false);
64
68
69 void onArchPortActivation(wxListEvent& event);
70 void onArchPortSelection(wxListEvent& event);
71 void onAddArchitecturePort(wxCommandEvent& event);
72 void onEditArchitecturePort(wxCommandEvent& event);
73 void onDeleteArchitecturePort(wxCommandEvent& event);
74
75 void onExternalPortActivation(wxListEvent& event);
76 void onExternalPortSelection(wxListEvent& event);
77 void onAddExternalPort(wxCommandEvent& event);
78 void onEditExternalPort(wxCommandEvent& event);
79 void onDeleteExternalPort(wxCommandEvent& event);
80
81 void onParameterActivation(wxListEvent& event);
82 void onParameterSelection(wxListEvent& event);
83 void onAddParameter(wxCommandEvent& event);
84 void onEditParameter(wxCommandEvent& event);
85 void onDeleteParameter(wxCommandEvent& event);
86
87 void onSourceFileSelection(wxListEvent& event);
88 void onAddSourceFile(wxCommandEvent& event);
89 void onDeleteSourceFile(wxCommandEvent& event);
90
91 void onMoveSourceFileUp(wxCommandEvent& event);
92 void onMoveSourceFileDown(wxCommandEvent& event);
93
94#ifdef ALLOW_OPCODE_EDITING
95 void onOpcodeSelection(wxListEvent& event);
96 void onSetOpcode(wxCommandEvent& event);
97 void onClearOpcode(wxCommandEvent& event);
98#endif
99
100 wxSizer* createContents(wxWindow* parent, bool call_fit, bool set_sizer);
101
102 /// Window indentifiers for dialog widgets.
103 enum {
115#ifdef ALLOW_OPCODE_EDITING
119#endif
138 };
139
140 /// FU Implementation to modify.
142 /// Function unit architecture the FUImplementation implements.
144
146
147 /// Pointer to the architecture port list widget.
148 wxListCtrl* archPortList_;
149 /// Pointer to the external port list widget.
150 wxListCtrl* externalPortList_;
151 /// Pointer to the parameter list widget.
152 wxListCtrl* parameterList_;
153 /// Pointer to the opcode list widget.
154 wxListCtrl* opcodeList_;
155 /// Pointer to the source file list widget.
156 wxListCtrl* sourceList_;
157
158 wxString name_;
159 wxString opcodePort_;
160 wxString clkPort_;
161 wxString rstPort_;
162 wxString gLockPort_;
164
165 DECLARE_EVENT_TABLE()
166};
167
168#endif
IDF::MachineImplementation * implementation
the implementation definition of the estimated processor
wxListCtrl * sourceList_
Pointer to the source file list widget.
void onOpcodeSelection(wxListEvent &event)
const TTAMachine::FunctionUnit & architecture_
Function unit architecture the FUImplementation implements.
void onArchPortActivation(wxListEvent &event)
void onAddParameter(wxCommandEvent &event)
void onMoveSourceFileDown(wxCommandEvent &event)
void onAddExternalPort(wxCommandEvent &event)
void onAddSourceFile(wxCommandEvent &event)
void onAddArchitecturePort(wxCommandEvent &event)
void onDeleteSourceFile(wxCommandEvent &event)
wxListCtrl * opcodeList_
Pointer to the opcode list widget.
void onClearOpcode(wxCommandEvent &event)
void onDeleteExternalPort(wxCommandEvent &event)
void onParameterActivation(wxListEvent &event)
HDB::FUExternalPort * selectedExternalPort()
void onSetOpcode(wxCommandEvent &event)
wxListCtrl * parameterList_
Pointer to the parameter list widget.
void onArchPortSelection(wxListEvent &event)
void onSourceFileSelection(wxListEvent &event)
void onExternalPortSelection(wxListEvent &event)
void update(bool onInit=false)
void onOK(wxCommandEvent &event)
void onMoveSourceFileUp(wxCommandEvent &event)
wxListCtrl * externalPortList_
Pointer to the external port list widget.
void onDeleteArchitecturePort(wxCommandEvent &event)
void onEditParameter(wxCommandEvent &event)
void onEditArchitecturePort(wxCommandEvent &event)
void onEditExternalPort(wxCommandEvent &event)
HDB::FUImplementation & implementation_
FU Implementation to modify.
void onExternalPortActivation(wxListEvent &event)
wxListCtrl * archPortList_
Pointer to the architecture port list widget.
void onDeleteParameter(wxCommandEvent &event)
HDB::FUPortImplementation * selectedArchPort()
HDB::FUImplementation::Parameter selectedParameter()
void onParameterSelection(wxListEvent &event)
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)