OpenASIP 2.2
Loading...
Searching...
No Matches
RFDialog.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 RFDialog.hh
26 *
27 * Declaration of RFDialog class.
28 *
29 * @author Veli-Pekka Jääskeläinen 2004 (vjaaskel-no.spam-cs.tut.fi)
30 */
31
32#ifndef TTA_RF_DIALOG_HH
33#define TTA_RF_DIALOG_HH
34
35#include <wx/wx.h>
36#include <wx/listctrl.h>
37#include <wx/spinctrl.h>
38
39namespace TTAMachine {
40 class RegisterFile;
41 class Port;
42}
43
44/**
45 * Dialog for editing register file parameters.
46 */
47class RFDialog : public wxDialog {
48public:
49 RFDialog(wxWindow* parent, TTAMachine::RegisterFile* registerFile);
50 virtual ~RFDialog();
51
52private:
53 wxSizer* createContents(wxWindow* parent, bool call_fit, bool set_sizer);
54 virtual bool TransferDataToWindow();
56 void onOK(wxCommandEvent& event);
57 void onHelp(wxCommandEvent& event);
58 void onName(wxCommandEvent& event);
59 void onPortSelection(wxListEvent& event);
60 void onPortRightClick(wxListEvent& event);
61 void onAddPort(wxCommandEvent& event);
62 void onActivatePort(wxListEvent& event);
63 void onEditPort(wxCommandEvent& event);
64 void onDeletePort(wxCommandEvent& event);
65 void updateWidgets();
66 void updatePortList();
67 void setTexts();
68
69 /// Sizer containing the port list and associated buttons.
70 wxStaticBoxSizer* portsSizer_;
71
72 /// Register file to modify.
74 /// Name of the register file.
75 wxString name_;
76 /// Number of registers.
77 int size_;
78 /// Width.
79 int width_;
80 /// Max reads.
82 /// Maximum writes.
84 /// Guard latency.
86 /// Zero register
88
89 /// Port list control.
90 wxListCtrl* portListCtrl_;
91 /// Opcode choice control.
92 wxChoice* typeChoice_;
93
94 /// enumerated IDs for the dialog controls
95 enum {
96 ID_NAME = 10000,
116 };
117
118 /// The event table for the controls of the dialog.
119 DECLARE_EVENT_TABLE()
120};
121#endif
void onName(wxCommandEvent &event)
Definition RFDialog.cc:373
int size_
Number of registers.
Definition RFDialog.hh:77
virtual bool TransferDataToWindow()
Definition RFDialog.cc:210
void onDeletePort(wxCommandEvent &event)
Definition RFDialog.cc:441
int maxWrites_
Maximum writes.
Definition RFDialog.hh:83
void updatePortList()
Definition RFDialog.cc:269
wxListCtrl * portListCtrl_
Port list control.
Definition RFDialog.hh:90
void onOK(wxCommandEvent &event)
Definition RFDialog.cc:285
void updateWidgets()
Definition RFDialog.cc:223
wxStaticBoxSizer * portsSizer_
Sizer containing the port list and associated buttons.
Definition RFDialog.hh:70
void setTexts()
Definition RFDialog.cc:135
@ ID_LABEL_MAX_WRITES
Definition RFDialog.hh:113
@ ID_LABEL_MAX_READS
Definition RFDialog.hh:112
@ ID_ADD_PORT
Definition RFDialog.hh:104
@ ID_LABEL_SIZE
Definition RFDialog.hh:109
@ ID_DELETE_PORT
Definition RFDialog.hh:106
@ ID_EDIT_PORT
Definition RFDialog.hh:105
@ ID_LABEL_NAME
Definition RFDialog.hh:108
@ ID_MAX_READS
Definition RFDialog.hh:100
@ ID_GUARD_LATENCY
Definition RFDialog.hh:102
@ ID_LABEL_WIDTH
Definition RFDialog.hh:110
@ ID_LABEL_GUARD_LATENCY
Definition RFDialog.hh:114
@ ID_MAX_WRITES
Definition RFDialog.hh:101
@ ID_ZERO_REGISTER
Definition RFDialog.hh:115
@ ID_LABEL_TYPE
Definition RFDialog.hh:111
@ ID_PORT_LIST
Definition RFDialog.hh:103
TTAMachine::Port * selectedPort() const
Definition RFDialog.cc:392
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition RFDialog.cc:536
wxString name_
Name of the register file.
Definition RFDialog.hh:75
wxChoice * typeChoice_
Opcode choice control.
Definition RFDialog.hh:92
void onAddPort(wxCommandEvent &event)
Definition RFDialog.cc:412
void onActivatePort(wxListEvent &event)
Definition RFDialog.cc:455
int width_
Width.
Definition RFDialog.hh:79
virtual ~RFDialog()
Definition RFDialog.cc:127
void onPortRightClick(wxListEvent &event)
Definition RFDialog.cc:505
int maxReads_
Max reads.
Definition RFDialog.hh:81
void onEditPort(wxCommandEvent &event)
Definition RFDialog.cc:467
TTAMachine::RegisterFile * registerFile_
Register file to modify.
Definition RFDialog.hh:73
void onPortSelection(wxListEvent &event)
Definition RFDialog.cc:488
int guardLatency_
Guard latency.
Definition RFDialog.hh:85
void onHelp(wxCommandEvent &event)
bool zeroRegister_
Zero register.
Definition RFDialog.hh:87