OpenASIP
2.0
|
#include <ProximMemoryWindow.hh>
Public Member Functions | |
ProximMemoryWindow (ProximMainFrame *parent, int id) | |
virtual | ~ProximMemoryWindow () |
virtual void | reset () |
Private Types | |
enum | { ID_AS_CHOICE = 10000, ID_TEXT_AS, ID_TEXT_AS_INFO, ID_TEXT_START_ADDRESS, ID_START_ADDRESS, ID_TEXT_DISPLAY, ID_DISPLAY_SIZE_CHOICE, ID_LINE } |
Private Member Functions | |
void | onProgramLoaded (const SimulatorEvent &event) |
void | onSimulationStop (const SimulatorEvent &event) |
void | loadProgramMemory () |
void | loadMemory (const TTAMachine::AddressSpace &as) |
void | initialize () |
void | onASChoice (wxCommandEvent &event) |
void | onDisplayRangeChoice (wxCommandEvent &event) |
void | createContents () |
Private Attributes | |
MemorySystem * | memorySystem_ |
Memory system to display in teh window. More... | |
MemoryControl * | memoryControl_ |
MemoryControl widget which displays the memory contents. More... | |
SimulatorFrontend * | simulator_ |
Simulator instance which contains the memory system to display. More... | |
wxBoxSizer * | sizer_ |
Toplevel sizer for the window widgets. More... | |
wxChoice * | asChoice_ |
Address space choicer widget. More... | |
wxStaticBoxSizer * | addressRangeSizer_ |
Sizer for address range widgets. More... | |
wxStaticText * | asInfoText_ |
Static text control displaying address space information. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ProximSimulatorWindow | |
ProximSimulatorWindow (ProximMainFrame *mainFrame, wxWindowID id=-1, wxPoint pos=wxDefaultPosition, wxSize size=wxDefaultSize, long style=wxTAB_TRAVERSAL) | |
virtual | ~ProximSimulatorWindow () |
Proxim subwindow which displays memory contents.
This window listens to SimulatorEvents and updates the window contents automatically.
Definition at line 54 of file ProximMemoryWindow.hh.
|
private |
Enumerator | |
---|---|
ID_AS_CHOICE | |
ID_TEXT_AS | |
ID_TEXT_AS_INFO | |
ID_TEXT_START_ADDRESS | |
ID_START_ADDRESS | |
ID_TEXT_DISPLAY | |
ID_DISPLAY_SIZE_CHOICE | |
ID_LINE |
Definition at line 85 of file ProximMemoryWindow.hh.
ProximMemoryWindow::ProximMemoryWindow | ( | ProximMainFrame * | parent, |
int | id | ||
) |
Constructor.
parent | Parent window of the window. |
id | Window identifier. |
Definition at line 65 of file ProximMemoryWindow.cc.
|
virtual |
|
private |
Creates the window contents.
Definition at line 221 of file ProximMemoryWindow.cc.
References asChoice_, asInfoText_, ID_AS_CHOICE, ID_LINE, ID_TEXT_AS, ID_TEXT_AS_INFO, and sizer_.
|
private |
|
private |
Loads memory from the given address space to the memory window.
as | Address space of the memory to load. |
Definition at line 96 of file ProximMemoryWindow.cc.
References asInfoText_, TTAMachine::AddressSpace::end(), MemorySystem::memory(), memoryControl_, SimulatorFrontend::memorySystem(), TTAMachine::Component::name(), MemoryControl::setMemory(), simulator_, sizer_, TTAMachine::AddressSpace::start(), Conversion::toHexString(), WxConversion::toWxString(), and TTAMachine::AddressSpace::width().
Referenced by onASChoice().
|
private |
Initializes simulated memory system in the window.
Definition at line 155 of file ProximMemoryWindow.cc.
References MemorySystem::addressSpace(), asChoice_, dummy, MemorySystem::memoryCount(), SimulatorFrontend::memorySystem(), TTAMachine::Component::name(), onASChoice(), simulator_, and WxConversion::toWxString().
Referenced by onProgramLoaded().
|
private |
Event handler for the address space choicer.
Loads the selected address space in the memory control.
Definition at line 175 of file ProximMemoryWindow.cc.
References MemorySystem::addressSpace(), asChoice_, loadMemory(), SimulatorFrontend::memorySystem(), and simulator_.
Referenced by loadProgramMemory().
|
private |
|
private |
Event handler which is called when a new program is loaded in the simulator.
Definition at line 133 of file ProximMemoryWindow.cc.
References loadProgramMemory().
|
private |
Event handler for simulation stop.
Refreshes the memory display.
Definition at line 189 of file ProximMemoryWindow.cc.
References asChoice_, MemoryControl::clearHighlights(), MemoryControl::highlight(), MemorySystem::memory(), memoryControl_, SimulatorFrontend::memorySystem(), MemoryProxy::readAccess(), MemoryProxy::readAccessCount(), simulator_, MemoryControl::updateView(), MemoryProxy::writeAccess(), and MemoryProxy::writeAccessCount().
|
virtual |
Resets the window when a new program or machine is being loaded in the simulator.
Reimplemented from ProximSimulatorWindow.
Definition at line 142 of file ProximMemoryWindow.cc.
References asChoice_, asInfoText_, and memoryControl_.
|
private |
Sizer for address range widgets.
Definition at line 80 of file ProximMemoryWindow.hh.
|
private |
Address space choicer widget.
Definition at line 78 of file ProximMemoryWindow.hh.
Referenced by createContents(), loadProgramMemory(), onASChoice(), onSimulationStop(), and reset().
|
private |
Static text control displaying address space information.
Definition at line 82 of file ProximMemoryWindow.hh.
Referenced by createContents(), loadMemory(), and reset().
|
private |
MemoryControl widget which displays the memory contents.
Definition at line 72 of file ProximMemoryWindow.hh.
Referenced by loadMemory(), onSimulationStop(), and reset().
|
private |
Memory system to display in teh window.
Definition at line 70 of file ProximMemoryWindow.hh.
|
private |
Simulator instance which contains the memory system to display.
Definition at line 74 of file ProximMemoryWindow.hh.
Referenced by loadMemory(), loadProgramMemory(), onASChoice(), and onSimulationStop().
|
private |
Toplevel sizer for the window widgets.
Definition at line 76 of file ProximMemoryWindow.hh.
Referenced by createContents(), and loadMemory().