OpenASIP 2.2
Loading...
Searching...
No Matches
GCUDialog.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 GCUDialog.hh
26 *
27 * Declaration of GCUDialog class.
28 *
29 * @author Veli-Pekka Jääskeläinen 2004 (vjaaskel-no.spam-cs.tut.fi)
30 */
31
32#ifndef TTA_GCU_DIALOG_HH
33#define TTA_GCU_DIALOG_HH
34
35#include <wx/wx.h>
36#include <wx/listctrl.h>
37
38namespace TTAMachine {
39 class ControlUnit;
40 class HWOperation;
41 class BaseFUPort;
42}
43
44/**
45 * Dialog for adding a new Global Control Unit to the Machine and
46 * editing existing Global Control Unit attributes.
47 */
48class GCUDialog : public wxDialog {
49 public:
50 GCUDialog(wxWindow* parent, TTAMachine::ControlUnit* gcu);
51 virtual ~GCUDialog();
52
53 private:
54 virtual bool TransferDataToWindow();
55 wxSizer* createContents(wxWindow* parent, bool call_fit, bool set_sizer);
59 void updatePortList();
60 void updateRAPortChoice();
63 void onName(wxCommandEvent& event);
64
65 void onOperationSelection(wxListEvent& event);
66 void onAddOperation(wxCommandEvent& event);
67 void onEditOperation(wxCommandEvent& event);
68 void onDeleteOperation(wxCommandEvent& event);
69 void onActivateOperation(wxListEvent& event);
70 void onOperationRightClick(wxListEvent& event);
71
72 void onAddFUPort(wxCommandEvent& event);
73 void onAddSRPort(wxCommandEvent& event);
74 void onEditPort(wxCommandEvent& event);
75 void onDeletePort(wxCommandEvent& event);
76 void onPortSelection(wxListEvent& event);
77 void onActivatePort(wxListEvent& event);
78 void onPortRightClick(wxListEvent& event);
79
80 void onRAPortChoice(wxCommandEvent& event);
81
82 void onHelp(wxCommandEvent& event);
83 void onOK(wxCommandEvent& event);
84 void setLabels();
85
86 /// The Global Control Unit to be modified with the dialog.
88 /// Name of the global control unit.
89 wxString name_;
90 /// Number of delay slots of the global control unit.
92 /// Guard latency of the gcu.
94
95 /// Address Space choice control.
97 /// Return address port choice control.
98 wxChoice* raPortChoice_;
99
100 /// Operation list widget.
101 wxListCtrl* operationList_;
102 /// Port list widget.
103 wxListCtrl* portList_;
104
105 /// Box sizer for the operations list controls.
106 wxStaticBoxSizer* operationsSizer_;
107 /// Box sizer for the port list controls.
108 wxStaticBoxSizer* portListSizer_;
109
110 /// enumerated IDs for dialog controls
111 enum {
112 ID_NAME = 10000,
115 //ID_GUARD_LATENCY,
138 //ID_LABEL_GLOBAL_GUARD_LATENCY
139 };
140 DECLARE_EVENT_TABLE()
141};
142
143#endif
void updateRAPortChoice()
Definition GCUDialog.cc:305
void updatePortList()
Definition GCUDialog.cc:334
void onOK(wxCommandEvent &event)
Definition GCUDialog.cc:378
void onEditOperation(wxCommandEvent &event)
Definition GCUDialog.cc:527
void onAddOperation(wxCommandEvent &event)
Definition GCUDialog.cc:483
void onPortSelection(wxListEvent &event)
Definition GCUDialog.cc:757
virtual bool TransferDataToWindow()
Definition GCUDialog.cc:247
wxStaticBoxSizer * operationsSizer_
Box sizer for the operations list controls.
Definition GCUDialog.hh:106
wxChoice * addressSpaceChoice_
Address Space choice control.
Definition GCUDialog.hh:96
@ ID_ADD_OPERATION
Definition GCUDialog.hh:122
@ ID_TEXT_OUTPUT_SOCKET
Definition GCUDialog.hh:134
@ ID_TEXT_INPUT_SOCKET
Definition GCUDialog.hh:133
@ ID_LABEL_RA_CHOICE
Definition GCUDialog.hh:136
@ ID_EDIT_OPERATION
Definition GCUDialog.hh:123
@ ID_ADDRESS_SPACE
Definition GCUDialog.hh:116
@ ID_OPERATION_LIST
Definition GCUDialog.hh:117
@ ID_DELETE_OPERATION
Definition GCUDialog.hh:124
@ ID_TEXT_RA_WIDTH
Definition GCUDialog.hh:135
@ ID_LABEL_OP_CHOICE
Definition GCUDialog.hh:137
void onAddFUPort(wxCommandEvent &event)
Definition GCUDialog.cc:638
void onActivatePort(wxListEvent &event)
Definition GCUDialog.cc:798
wxChoice * raPortChoice_
Return address port choice control.
Definition GCUDialog.hh:98
void onDeletePort(wxCommandEvent &event)
Definition GCUDialog.cc:694
void setLabels()
Definition GCUDialog.cc:158
int delaySlots_
Number of delay slots of the global control unit.
Definition GCUDialog.hh:91
wxListCtrl * operationList_
Operation list widget.
Definition GCUDialog.hh:101
TTAMachine::HWOperation * selectedOperation()
Definition GCUDialog.cc:552
void onOperationRightClick(wxListEvent &event)
Definition GCUDialog.cc:603
void onDeleteOperation(wxCommandEvent &event)
Definition GCUDialog.cc:511
void onEditPort(wxCommandEvent &event)
Definition GCUDialog.cc:727
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition GCUDialog.cc:840
void onActivateOperation(wxListEvent &event)
Definition GCUDialog.cc:627
TTAMachine::BaseFUPort * selectedPort()
Definition GCUDialog.cc:711
wxString name_
Name of the global control unit.
Definition GCUDialog.hh:89
void updateSocketChoicers()
wxStaticBoxSizer * portListSizer_
Box sizer for the port list controls.
Definition GCUDialog.hh:108
TTAMachine::ControlUnit * gcu_
The Global Control Unit to be modified with the dialog.
Definition GCUDialog.hh:87
wxListCtrl * portList_
Port list widget.
Definition GCUDialog.hh:103
void onPortRightClick(wxListEvent &event)
Definition GCUDialog.cc:774
void updateOperationList()
Definition GCUDialog.cc:585
int guardLatency_
Guard latency of the gcu.
Definition GCUDialog.hh:93
void updateAddressSpaceChoice()
Definition GCUDialog.cc:272
void onHelp(wxCommandEvent &event)
void onRAPortChoice(wxCommandEvent &event)
Definition GCUDialog.cc:809
void onOperationSelection(wxListEvent &event)
Definition GCUDialog.cc:570
virtual ~GCUDialog()
Definition GCUDialog.cc:150
void onAddSRPort(wxCommandEvent &event)
Definition GCUDialog.cc:665
void onName(wxCommandEvent &event)
Definition GCUDialog.cc:465