OpenASIP 2.2
Loading...
Searching...
No Matches
ProximMemoryWindow.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 ProximMemoryWindow.cc
26 *
27 * Declaration of ProximMemoryWindow class.
28 *
29 * @author Veli-Pekka Jääskeläinen 2005 (vjaaskel-no.spam-cs.tut.fi)
30 * @note rating: red
31 */
32
33
34#ifndef TTA_PROXIM_MEMORY_WINDOW_HH
35#define TTA_PROXIM_MEMORY_WINDOW_HH
36
38#include "SimulatorEvent.hh"
39
40class MemorySystem;
41class MemoryControl;
43
44namespace TTAMachine {
45 class AddressSpace;
46}
47
48/**
49 * Proxim subwindow which displays memory contents.
50 *
51 * This window listens to SimulatorEvents and updates the window
52 * contents automatically.
53 */
55public:
56 ProximMemoryWindow(ProximMainFrame* parent, int id);
57 virtual ~ProximMemoryWindow();
58 virtual void reset();
59private:
60 void onProgramLoaded(const SimulatorEvent& event);
61 void onSimulationStop(const SimulatorEvent& event);
62 void loadProgramMemory();
64 void initialize();
65 void onASChoice(wxCommandEvent& event);
66 void onDisplayRangeChoice(wxCommandEvent& event);
67 void createContents();
68
69 /// Memory system to display in teh window.
71 /// MemoryControl widget which displays the memory contents.
73 /// Simulator instance which contains the memory system to display.
75 /// Toplevel sizer for the window widgets.
76 wxBoxSizer* sizer_;
77 /// Address space choicer widget.
78 wxChoice* asChoice_;
79 /// Sizer for address range widgets.
80 wxStaticBoxSizer* addressRangeSizer_;
81 /// Static text control displaying address space information.
82 wxStaticText* asInfoText_;
83
84 // Widget IDs.
85 enum {
86 ID_AS_CHOICE = 10000,
94 };
95 DECLARE_EVENT_TABLE()
96};
97
98#endif
wxStaticBoxSizer * addressRangeSizer_
Sizer for address range widgets.
MemoryControl * memoryControl_
MemoryControl widget which displays the memory contents.
void onProgramLoaded(const SimulatorEvent &event)
wxBoxSizer * sizer_
Toplevel sizer for the window widgets.
wxStaticText * asInfoText_
Static text control displaying address space information.
void onASChoice(wxCommandEvent &event)
MemorySystem * memorySystem_
Memory system to display in teh window.
SimulatorFrontend * simulator_
Simulator instance which contains the memory system to display.
void onDisplayRangeChoice(wxCommandEvent &event)
wxChoice * asChoice_
Address space choicer widget.
void loadMemory(const TTAMachine::AddressSpace &as)
void onSimulationStop(const SimulatorEvent &event)