OpenASIP 2.2
Loading...
Searching...
No Matches
ProcessorImplementationWindow.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 ProcessorImplementationWindow.hh
26 *
27 * Declaration of ProcessorImplementationWindow 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_PROCESSOR_IMPLEMENTATION_WINDOW_HH
34#define TTA_PROCESSOR_IMPLEMENTATION_WINDOW_HH
35
36#include <wx/wx.h>
37#include <wx/listctrl.h>
38#include "PluginTools.hh"
39
40namespace IDF {
41 class MachineImplementation;
42}
43
44namespace TTAMachine {
45 class Machine;
46}
47
48namespace ProGe {
49 class ICDecoderGeneratorPlugin;
50}
51
52/**
53 * Processor implementation window.
54 */
55class ProcessorImplementationWindow : public wxDialog {
56public:
58 wxWindow* parent, TTAMachine::Machine& machine,
60
62
63 void setDirty(bool dirty = true) { dirtyData_ = dirty; }
64private:
65
66 void onAutoSelectImplementations(wxCommandEvent& event);
68
69 void handleSelectRFImplementation(long item);
70 void onSelectRFImplementation(wxCommandEvent& event);
71 void onRFSelection(wxListEvent& event);
72 void onRFActivation(wxListEvent& event);
73 void updateRFList(const std::string& rfName, int index);
74
75 void handleSelectIUImplementation(long item);
76 void onSelectIUImplementation(wxCommandEvent& event);
77 void onIUSelection(wxListEvent& event);
78 void onIUActivation(wxListEvent& event);
79
80 void handleSelectFUImplementation(long item);
81 void onSelectFUImplementation(wxCommandEvent& event);
82 void onFUSelection(wxListEvent& event);
83 void onFUActivation(wxListEvent& event);
84 void updateFUList(const std::string& fuName, int index);
85
86 void onSetParameterValue(wxCommandEvent& event);
87 void onBrowseDecompressor(wxCommandEvent& event);
88 void onBrowseICDecPlugin(wxCommandEvent& event);
89 void onBrowseICHDB(wxCommandEvent& event);
90
92 const std::string& pluginName,
93 const std::string& pluginFile);
94 void onParameterSelection(wxListEvent& event);
95
96 virtual bool TransferDataToWindow();
97 void onLoadIDF(wxCommandEvent& event);
98 void onSaveIDF(wxCommandEvent& event);
99 void onClose(wxCommandEvent& event);
100 void onGenerateProcessor(wxCommandEvent& event);
101 void doSaveIDF();
102
104
105 wxSizer* createContents(wxWindow* parent, bool call_fit, bool set_sizer);
106 wxSizer* functionUnitPage(
107 wxWindow* parent, bool call_fit, bool set_sizer = true);
108 wxSizer* registerFilePage(
109 wxWindow* parent, bool call_fit, bool set_sizer = true);
110 wxSizer* immediateUnitPage(
111 wxWindow* parent, bool call_fit, bool set_sizer = true);
112 wxSizer* decompressionPage(
113 wxWindow* parent, bool call_fit, bool set_sizer = true);
114 wxSizer* icDecoderPluginPage(
115 wxWindow* parent, bool call_fit, bool set_sizer = true);
116
117 /// Machine that is being generated.
119 /// MachineImplementation object containing the implementation information.
121
122 /// Pointer to the FU implementation list widget.
123 wxListCtrl* fuList_;
124 /// Pointer to the IU implementation list widget.
125 wxListCtrl* iuList_;
126 /// Pointer to the RF implementation list widget.
127 wxListCtrl* rfList_;
128 /// Pointer to the ic decoder parameter list widget.
129 wxListCtrl* parameterList_;
130
131 /// Plugintool for loading IC/Decoder plugins.
133 /// IC/Decoder plugin of the current machine implementation.
135
136 // Widget IDs.
137 enum {
163 ID_LINE
164 };
165
167
168 DECLARE_EVENT_TABLE()
169};
170
171#endif
TTAMachine::Machine * machine
the architecture definition of the estimated processor
wxSizer * registerFilePage(wxWindow *parent, bool call_fit, bool set_sizer=true)
wxListCtrl * iuList_
Pointer to the IU implementation list widget.
TTAMachine::Machine & machine_
Machine that is being generated.
IDF::MachineImplementation & impl_
MachineImplementation object containing the implementation information.
wxListCtrl * fuList_
Pointer to the FU implementation list widget.
void updateFUList(const std::string &fuName, int index)
void onAutoSelectImplementations(wxCommandEvent &event)
void updateRFList(const std::string &rfName, int index)
void onGenerateProcessor(wxCommandEvent &event)
wxSizer * immediateUnitPage(wxWindow *parent, bool call_fit, bool set_sizer=true)
PluginTools pluginTool_
Plugintool for loading IC/Decoder plugins.
wxListCtrl * rfList_
Pointer to the RF implementation list widget.
void onSelectRFImplementation(wxCommandEvent &event)
void onSetParameterValue(wxCommandEvent &event)
ProGe::ICDecoderGeneratorPlugin * plugin_
IC/Decoder plugin of the current machine implementation.
wxListCtrl * parameterList_
Pointer to the ic decoder parameter list widget.
void onBrowseICDecPlugin(wxCommandEvent &event)
void onSelectFUImplementation(wxCommandEvent &event)
void onBrowseDecompressor(wxCommandEvent &event)
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
void onSelectIUImplementation(wxCommandEvent &event)
wxSizer * functionUnitPage(wxWindow *parent, bool call_fit, bool set_sizer=true)
wxSizer * icDecoderPluginPage(wxWindow *parent, bool call_fit, bool set_sizer=true)
wxSizer * decompressionPage(wxWindow *parent, bool call_fit, bool set_sizer=true)
void loadICDecoderPlugin(const std::string &pluginName, const std::string &pluginFile)
Definition FUGen.hh:54