OpenASIP  2.0
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 
40 namespace IDF {
41  class MachineImplementation;
42 }
43 
44 namespace TTAMachine {
45  class Machine;
46 }
47 
48 namespace ProGe {
49  class ICDecoderGeneratorPlugin;
50 }
51 
52 /**
53  * Processor implementation window.
54  */
55 class ProcessorImplementationWindow : public wxDialog {
56 public:
58  wxWindow* parent, TTAMachine::Machine& machine,
60 
62 
63  void setDirty(bool dirty = true) { dirtyData_ = dirty; }
64 private:
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 {
164  };
165 
167 
168  DECLARE_EVENT_TABLE()
169 };
170 
171 #endif
ProcessorImplementationWindow::onSaveIDF
void onSaveIDF(wxCommandEvent &event)
Definition: ProcessorImplementationWindow.cc:777
ProcessorImplementationWindow::ID_IC_DEC_PLUGIN_NAME
@ ID_IC_DEC_PLUGIN_NAME
Definition: ProcessorImplementationWindow.hh:153
ProcessorImplementationWindow::ID_SELECT_RF_IMPL
@ ID_SELECT_RF_IMPL
Definition: ProcessorImplementationWindow.hh:147
ProcessorImplementationWindow::onRFActivation
void onRFActivation(wxListEvent &event)
Definition: ProcessorImplementationWindow.cc:429
ProcessorImplementationWindow::onAutoSelectImplementations
void onAutoSelectImplementations(wxCommandEvent &event)
Definition: ProcessorImplementationWindow.cc:288
ProcessorImplementationWindow::parameterList_
wxListCtrl * parameterList_
Pointer to the ic decoder parameter list widget.
Definition: ProcessorImplementationWindow.hh:129
ProcessorImplementationWindow::onClose
void onClose(wxCommandEvent &event)
Definition: ProcessorImplementationWindow.cc:697
ProcessorImplementationWindow::ProcessorImplementationWindow
ProcessorImplementationWindow(wxWindow *parent, TTAMachine::Machine &machine, IDF::MachineImplementation &impl)
Definition: ProcessorImplementationWindow.cc:123
ProcessorImplementationWindow::ID_PARAMETER_LIST
@ ID_PARAMETER_LIST
Definition: ProcessorImplementationWindow.hh:156
ProcessorImplementationWindow::onBrowseDecompressor
void onBrowseDecompressor(wxCommandEvent &event)
Definition: ProcessorImplementationWindow.cc:785
machine
TTAMachine::Machine * machine
the architecture definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:59
ProcessorImplementationWindow::ID_BROWSE_IC_DEC_PLUGIN
@ ID_BROWSE_IC_DEC_PLUGIN
Definition: ProcessorImplementationWindow.hh:149
ProcessorImplementationWindow::onFUSelection
void onFUSelection(wxListEvent &event)
Definition: ProcessorImplementationWindow.cc:595
PluginTools
Definition: PluginTools.hh:53
ProcessorImplementationWindow::ID_SAVE_IDF
@ ID_SAVE_IDF
Definition: ProcessorImplementationWindow.hh:139
ProcessorImplementationWindow::ID_IC_DEC_HDB_FILE
@ ID_IC_DEC_HDB_FILE
Definition: ProcessorImplementationWindow.hh:155
ProcessorImplementationWindow::onSelectRFImplementation
void onSelectRFImplementation(wxCommandEvent &event)
Definition: ProcessorImplementationWindow.cc:412
ProGe::ICDecoderGeneratorPlugin
Definition: ICDecoderGeneratorPlugin.hh:68
ProcessorImplementationWindow::onParameterSelection
void onParameterSelection(wxListEvent &event)
Definition: ProcessorImplementationWindow.cc:609
ProcessorImplementationWindow::onSelectIUImplementation
void onSelectIUImplementation(wxCommandEvent &event)
Definition: ProcessorImplementationWindow.cc:464
ProcessorImplementationWindow::icDecoderPluginPage
wxSizer * icDecoderPluginPage(wxWindow *parent, bool call_fit, bool set_sizer=true)
Definition: ProcessorImplementationWindow.cc:1206
ProcessorImplementationWindow::onLoadIDF
void onLoadIDF(wxCommandEvent &event)
Definition: ProcessorImplementationWindow.cc:621
ProcessorImplementationWindow::ID_LOAD_IDF
@ ID_LOAD_IDF
Definition: ProcessorImplementationWindow.hh:138
ProcessorImplementationWindow::~ProcessorImplementationWindow
virtual ~ProcessorImplementationWindow()
Definition: ProcessorImplementationWindow.cc:181
ProcessorImplementationWindow::onIUActivation
void onIUActivation(wxListEvent &event)
Definition: ProcessorImplementationWindow.cc:481
ProcessorImplementationWindow::iuList_
wxListCtrl * iuList_
Pointer to the IU implementation list widget.
Definition: ProcessorImplementationWindow.hh:125
ProcessorImplementationWindow::ID_CLOSE
@ ID_CLOSE
Definition: ProcessorImplementationWindow.hh:161
ProcessorImplementationWindow::onBrowseICDecPlugin
void onBrowseICDecPlugin(wxCommandEvent &event)
Definition: ProcessorImplementationWindow.cc:808
ProcessorImplementationWindow::ID_GENERATE_PROCESSOR
@ ID_GENERATE_PROCESSOR
Definition: ProcessorImplementationWindow.hh:140
ProcessorImplementationWindow::ID_IC_DEC_PLUGIN_DESC
@ ID_IC_DEC_PLUGIN_DESC
Definition: ProcessorImplementationWindow.hh:154
ProcessorImplementationWindow::ID_BROWSE_DECOMPRESSOR
@ ID_BROWSE_DECOMPRESSOR
Definition: ProcessorImplementationWindow.hh:148
ProcessorImplementationWindow::handleSelectIUImplementation
void handleSelectIUImplementation(long item)
Definition: ProcessorImplementationWindow.cc:434
ProcessorImplementationWindow
Definition: ProcessorImplementationWindow.hh:55
ProcessorImplementationWindow::TransferDataToWindow
virtual bool TransferDataToWindow()
Definition: ProcessorImplementationWindow.cc:189
ProcessorImplementationWindow::registerFilePage
wxSizer * registerFilePage(wxWindow *parent, bool call_fit, bool set_sizer=true)
Definition: ProcessorImplementationWindow.cc:1111
ProcessorImplementationWindow::ID_PARAMETER_VALUE
@ ID_PARAMETER_VALUE
Definition: ProcessorImplementationWindow.hh:157
ProcessorImplementationWindow::onSelectFUImplementation
void onSelectFUImplementation(wxCommandEvent &event)
Definition: ProcessorImplementationWindow.cc:540
ProcessorImplementationWindow::pluginTool_
PluginTools pluginTool_
Plugintool for loading IC/Decoder plugins.
Definition: ProcessorImplementationWindow.hh:132
ProcessorImplementationWindow::ID_SELECT_FU_IMPL
@ ID_SELECT_FU_IMPL
Definition: ProcessorImplementationWindow.hh:145
ProcessorImplementationWindow::setDirty
void setDirty(bool dirty=true)
Definition: ProcessorImplementationWindow.hh:63
ProcessorImplementationWindow::ID_GENERATE
@ ID_GENERATE
Definition: ProcessorImplementationWindow.hh:160
ProcessorImplementationWindow::onGenerateProcessor
void onGenerateProcessor(wxCommandEvent &event)
Definition: ProcessorImplementationWindow.cc:967
ProcessorImplementationWindow::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition: ProcessorImplementationWindow.cc:1039
ProcessorImplementationWindow::ID_IU_LIST
@ ID_IU_LIST
Definition: ProcessorImplementationWindow.hh:142
ProcessorImplementationWindow::checkImplementationFiles
void checkImplementationFiles()
Definition: ProcessorImplementationWindow.cc:993
ProcessorImplementationWindow::ID_BROWSE_IC_DEC_HDB
@ ID_BROWSE_IC_DEC_HDB
Definition: ProcessorImplementationWindow.hh:150
ProcessorImplementationWindow::rfList_
wxListCtrl * rfList_
Pointer to the RF implementation list widget.
Definition: ProcessorImplementationWindow.hh:127
PluginTools.hh
ProcessorImplementationWindow::ID_RF_LIST
@ ID_RF_LIST
Definition: ProcessorImplementationWindow.hh:143
ProcessorImplementationWindow::plugin_
ProGe::ICDecoderGeneratorPlugin * plugin_
IC/Decoder plugin of the current machine implementation.
Definition: ProcessorImplementationWindow.hh:134
ProcessorImplementationWindow::ID_DECOMPRESSOR_PATH
@ ID_DECOMPRESSOR_PATH
Definition: ProcessorImplementationWindow.hh:151
ProcessorImplementationWindow::onRFSelection
void onRFSelection(wxListEvent &event)
Definition: ProcessorImplementationWindow.cc:567
ProcessorImplementationWindow::fuList_
wxListCtrl * fuList_
Pointer to the FU implementation list widget.
Definition: ProcessorImplementationWindow.hh:123
ProcessorImplementationWindow::decompressionPage
wxSizer * decompressionPage(wxWindow *parent, bool call_fit, bool set_sizer=true)
Definition: ProcessorImplementationWindow.cc:1167
ProcessorImplementationWindow::ID_AUTO_SELECT_IMPL
@ ID_AUTO_SELECT_IMPL
Definition: ProcessorImplementationWindow.hh:144
ProcessorImplementationWindow::updateImplementationLists
void updateImplementationLists()
Definition: ProcessorImplementationWindow.cc:298
ProcessorImplementationWindow::updateFUList
void updateFUList(const std::string &fuName, int index)
Definition: ProcessorImplementationWindow.cc:488
ProcessorImplementationWindow::loadICDecoderPlugin
void loadICDecoderPlugin(const std::string &pluginName, const std::string &pluginFile)
Definition: ProcessorImplementationWindow.cc:893
ProcessorImplementationWindow::handleSelectFUImplementation
void handleSelectFUImplementation(long item)
Definition: ProcessorImplementationWindow.cc:508
ProcessorImplementationWindow::ID_IC_DEC_PLUGIN_FILE
@ ID_IC_DEC_PLUGIN_FILE
Definition: ProcessorImplementationWindow.hh:152
ProcessorImplementationWindow::impl_
IDF::MachineImplementation & impl_
MachineImplementation object containing the implementation information.
Definition: ProcessorImplementationWindow.hh:120
ProGe
Definition: FUGen.hh:54
ProcessorImplementationWindow::ID_FU_LIST
@ ID_FU_LIST
Definition: ProcessorImplementationWindow.hh:141
ProcessorImplementationWindow::onBrowseICHDB
void onBrowseICHDB(wxCommandEvent &event)
Definition: ProcessorImplementationWindow.cc:847
ProcessorImplementationWindow::ID_LINE
@ ID_LINE
Definition: ProcessorImplementationWindow.hh:163
ProcessorImplementationWindow::onFUActivation
void onFUActivation(wxListEvent &event)
Definition: ProcessorImplementationWindow.cc:557
ProcessorImplementationWindow::ID_NOTEBOOK
@ ID_NOTEBOOK
Definition: ProcessorImplementationWindow.hh:159
ProcessorImplementationWindow::onSetParameterValue
void onSetParameterValue(wxCommandEvent &event)
Definition: ProcessorImplementationWindow.cc:868
TTAMachine
Definition: Assembler.hh:48
ProcessorImplementationWindow::functionUnitPage
wxSizer * functionUnitPage(wxWindow *parent, bool call_fit, bool set_sizer=true)
Definition: ProcessorImplementationWindow.cc:1139
ProcessorImplementationWindow::doSaveIDF
void doSaveIDF()
Definition: ProcessorImplementationWindow.cc:719
ProcessorImplementationWindow::ID_TEXT
@ ID_TEXT
Definition: ProcessorImplementationWindow.hh:162
ProcessorImplementationWindow::machine_
TTAMachine::Machine & machine_
Machine that is being generated.
Definition: ProcessorImplementationWindow.hh:118
ProcessorImplementationWindow::dirtyData_
bool dirtyData_
Definition: ProcessorImplementationWindow.hh:166
ProcessorImplementationWindow::handleSelectRFImplementation
void handleSelectRFImplementation(long item)
Definition: ProcessorImplementationWindow.cc:381
ProcessorImplementationWindow::immediateUnitPage
wxSizer * immediateUnitPage(wxWindow *parent, bool call_fit, bool set_sizer=true)
Definition: ProcessorImplementationWindow.cc:1289
ProcessorImplementationWindow::ID_SET_VALUE
@ ID_SET_VALUE
Definition: ProcessorImplementationWindow.hh:158
ProcessorImplementationWindow::updateRFList
void updateRFList(const std::string &rfName, int index)
Definition: ProcessorImplementationWindow.cc:266
IDF::MachineImplementation
Definition: MachineImplementation.hh:54
IDF
Definition: DSDBManager.hh:54
ProcessorImplementationWindow::ID_SELECT_IU_IMPL
@ ID_SELECT_IU_IMPL
Definition: ProcessorImplementationWindow.hh:146
TTAMachine::Machine
Definition: Machine.hh:73
ProcessorImplementationWindow::onIUSelection
void onIUSelection(wxListEvent &event)
Definition: ProcessorImplementationWindow.cc:581