OpenASIP
2.0
|
#include <ProximRegisterWindow.hh>
Public Member Functions | |
ProximRegisterWindow (ProximMainFrame *parent, int id) | |
virtual | ~ProximRegisterWindow () |
void | showRegisterFile (const std::string &name) |
void | showImmediateUnit (const std::string &name) |
Public Member Functions inherited from ProximUnitWindow | |
ProximUnitWindow (ProximMainFrame *parent, int id) | |
virtual | ~ProximUnitWindow () |
Public Member Functions inherited from ProximSimulatorWindow | |
virtual void | reset () |
Private Member Functions | |
void | loadRegisterFile (const TTAMachine::RegisterFile &rf) |
void | loadImmediateUnit (const TTAMachine::ImmediateUnit &iu) |
virtual void | reinitialize () |
virtual void | update () |
Static Private Attributes | |
static const std::string | RF_PREFIX = "RF: " |
Prefix for register files in the unit choicer. More... | |
static const std::string | IMM_PREFIX = "IMM: " |
Prefix for immediate units in the unit choicer. 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 () |
Protected Attributes inherited from ProximUnitWindow | |
SimulatorFrontend * | simulator_ |
Simulator instance . More... | |
wxChoice * | unitChoice_ |
Unit choicer widget. More... | |
wxChoice * | modeChoice_ |
Value display mode choicer widget. More... | |
wxListCtrl * | valueList_ |
List widget for the values. More... | |
Static Protected Attributes inherited from ProximUnitWindow | |
static const wxString | MODE_INT = _T("Int") |
String for the mode choicer integer mode. More... | |
static const wxString | MODE_UNSIGNED = _T("Unsigned") |
String for the mode choicer unsigned integer mode. More... | |
static const wxString | MODE_HEX = _T("Hex") |
String for the mode choicer hexadecimal mode. More... | |
static const wxString | MODE_BIN = _T("Binary") |
String for the mode choicer binary mode. More... | |
Proxim subwindow which displays register values.
This window listens to SimulatorEvents and updates the window contents automatically.
Definition at line 54 of file ProximRegisterWindow.hh.
ProximRegisterWindow::ProximRegisterWindow | ( | ProximMainFrame * | parent, |
int | id | ||
) |
Constructor.
parent | Parent window of the window. |
id | Window identifier. |
Definition at line 73 of file ProximRegisterWindow.cc.
References SimulatorFrontend::hasSimulationEnded(), SimulatorFrontend::isSimulationInitialized(), SimulatorFrontend::isSimulationStopped(), ProximUnitWindow::modeChoice_, reinitialize(), ProximUnitWindow::simulator_, and ProximUnitWindow::valueList_.
|
virtual |
|
private |
Loads register file registers to the register list.
imm | Immediate Unit to display. |
Definition at line 205 of file ProximRegisterWindow.cc.
References LongImmediateUnitState::immediateRegister(), LongImmediateUnitState::immediateRegisterCount(), SimValue::intValue(), MachineState::longImmediateUnitState(), SimulatorFrontend::machineState(), ProximUnitWindow::MODE_BIN, ProximUnitWindow::MODE_HEX, ProximUnitWindow::MODE_INT, ProximUnitWindow::MODE_UNSIGNED, ProximUnitWindow::modeChoice_, TTAMachine::Component::name(), ProximUnitWindow::simulator_, Conversion::toBinString(), Conversion::toHexString(), DisassemblyRegister::toString(), WxConversion::toWxString(), SimValue::unsignedValue(), LongImmediateRegisterState::value(), and ProximUnitWindow::valueList_.
Referenced by update().
|
private |
Loads register file registers to the register list.
rf | Register file to display. |
Definition at line 161 of file ProximRegisterWindow.cc.
References SimValue::intValue(), SimulatorFrontend::machineState(), ProximUnitWindow::MODE_BIN, ProximUnitWindow::MODE_HEX, ProximUnitWindow::MODE_INT, ProximUnitWindow::MODE_UNSIGNED, ProximUnitWindow::modeChoice_, TTAMachine::Component::name(), RegisterFileState::registerCount(), MachineState::registerFileState(), RegisterFileState::registerState(), ProximUnitWindow::simulator_, Conversion::toBinString(), Conversion::toHexString(), DisassemblyRegister::toString(), WxConversion::toWxString(), SimValue::unsignedValue(), RegisterState::value(), and ProximUnitWindow::valueList_.
Referenced by update().
|
privatevirtual |
Sets the available register file selections in the register file choice.
Reimplemented from ProximUnitWindow.
Definition at line 101 of file ProximRegisterWindow.cc.
References TTAMachine::Machine::Navigator< ComponentType >::count(), IMM_PREFIX, TTAMachine::Machine::immediateUnitNavigator(), TTAMachine::Machine::Navigator< ComponentType >::item(), SimulatorFrontend::machine(), TTAMachine::Machine::registerFileNavigator(), RF_PREFIX, ProximUnitWindow::simulator_, WxConversion::toWxString(), ProximUnitWindow::unitChoice_, and update().
Referenced by ProximRegisterWindow().
void ProximRegisterWindow::showImmediateUnit | ( | const std::string & | name | ) |
Sets the immediate unit dipslayed in the window.
name | Name of the immediate unit. |
Definition at line 265 of file ProximRegisterWindow.cc.
References IMM_PREFIX, WxConversion::toWxString(), ProximUnitWindow::unitChoice_, and update().
void ProximRegisterWindow::showRegisterFile | ( | const std::string & | name | ) |
Sets the registerfile displayed in the window.
name | Name of the register file. |
Definition at line 252 of file ProximRegisterWindow.cc.
References RF_PREFIX, WxConversion::toWxString(), ProximUnitWindow::unitChoice_, and update().
Referenced by ProximShowRegistersCmd::Do().
|
privatevirtual |
Event handler for the register file choicer.
When the choice selection changes, corresponding register file registers are loaded in the register list.
Reimplemented from ProximUnitWindow.
Definition at line 133 of file ProximRegisterWindow.cc.
References TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Machine::immediateUnitNavigator(), TTAMachine::Machine::Navigator< ComponentType >::item(), loadImmediateUnit(), loadRegisterFile(), SimulatorFrontend::machine(), ProximUnitWindow::modeChoice_, TTAMachine::Machine::registerFileNavigator(), ProximUnitWindow::simulator_, and ProximUnitWindow::unitChoice_.
Referenced by reinitialize(), showImmediateUnit(), and showRegisterFile().
|
staticprivate |
Prefix for immediate units in the unit choicer.
Definition at line 70 of file ProximRegisterWindow.hh.
Referenced by reinitialize(), and showImmediateUnit().
|
staticprivate |
Prefix for register files in the unit choicer.
Definition at line 68 of file ProximRegisterWindow.hh.
Referenced by reinitialize(), and showRegisterFile().