OpenASIP  2.0
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
ProximMachineStateWindow Class Reference

#include <ProximMachineStateWindow.hh>

Inheritance diagram for ProximMachineStateWindow:
Inheritance graph
Collaboration diagram for ProximMachineStateWindow:
Collaboration graph

Public Types

enum  {
  COMMAND_ZOOM_IN = 20000, COMMAND_ZOOM_OUT, COMMAND_TOGGLE_UNIT_INFO, COMMAND_TOGGLE_MOVES,
  COMMAND_TOGGLE_UTILIZATIONS, COMMAND_EXPORT
}
 

Public Member Functions

 ProximMachineStateWindow (ProximMainFrame *parent, int id)
 
virtual ~ProximMachineStateWindow ()
 
virtual void reset ()
 
void setMachine (TTAMachine::Machine *machine)
 
void setStatusText (std::string status)
 
void appendUtilizationData (std::string text)
 
void appendDetails (std::string text)
 
void clearDetails ()
 

Private Types

enum  {
  ID_MACHINE_CANVAS = 10000, ID_UTILIZATION_WINDOW, ID_TITLE, ID_DETAILS,
  ID_LINE, ID_LABEL_UTILIZATION, ID_UTILIZATION, ID_SPLITTER
}
 

Private Member Functions

void onMachineLoaded (const SimulatorEvent &event)
 
void onProgramLoaded (const SimulatorEvent &event)
 
void onSimulationStop (const SimulatorEvent &event)
 
void createContents ()
 
void onZoom (wxCommandEvent &event)
 
void setUtilizationHighlights ()
 
void addMoves ()
 
void onToggleMoves (wxCommandEvent &event)
 
void onToggleUtilizations (wxCommandEvent &event)
 
void onToggleUnitInfo (wxCommandEvent &event)
 
void onUpdateUIEvent (wxUpdateUIEvent &event)
 
void onExport (wxCommandEvent &event)
 

Private Attributes

MachineCanvascanvas_
 Machine visualization canvas. More...
 
SimulatorFrontendsimulator_
 Simulator instance which contains the registers to display. More...
 
wxBoxSizer * sizer_
 Toplevel sizer for the window widgets. More...
 
wxStatusBar * statusbar_
 Statusbar of the window. More...
 
bool showMoves_
 Tells if the moves are displayed or not. More...
 
bool showUtilizations_
 Tells if the machine part utilizations are displayed or not. More...
 
wxTextCtrl * detailsCtrl_
 Utilziation window where to display utilization data of the components. More...
 
wxTextCtrl * utilizationCtrl_
 

Static Private Attributes

static const int MINIMUM_PANE_WIDTH = 150
 Minimum width for the splitter window panes. More...
 
static const int INITIAL_DETAILS_PANE_WIDTH = 200
 Initial width for the component detail pane. 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 ()
 

Detailed Description

Proxim subwindow which displays the simulated machine state.

This window listens to SimulatorEvents and updates the window contents automatically.

Definition at line 56 of file ProximMachineStateWindow.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
COMMAND_ZOOM_IN 
COMMAND_ZOOM_OUT 
COMMAND_TOGGLE_UNIT_INFO 
COMMAND_TOGGLE_MOVES 
COMMAND_TOGGLE_UTILIZATIONS 
COMMAND_EXPORT 

Definition at line 68 of file ProximMachineStateWindow.hh.

◆ anonymous enum

anonymous enum
private
Enumerator
ID_MACHINE_CANVAS 
ID_UTILIZATION_WINDOW 
ID_TITLE 
ID_DETAILS 
ID_LINE 
ID_LABEL_UTILIZATION 
ID_UTILIZATION 
ID_SPLITTER 

Definition at line 101 of file ProximMachineStateWindow.hh.

101  {
102  ID_MACHINE_CANVAS = 10000,
104  ID_TITLE,
105  ID_DETAILS,
106  ID_LINE,
110  };

Constructor & Destructor Documentation

◆ ProximMachineStateWindow()

ProximMachineStateWindow::ProximMachineStateWindow ( ProximMainFrame parent,
int  id 
)

Constructor.

Parameters
parentParent window of the window.
idWindow identifier.

Definition at line 94 of file ProximMachineStateWindow.cc.

95  :
96  ProximSimulatorWindow(parent, id, wxDefaultPosition, wxSize(800,600)),
97  showMoves_(true), showUtilizations_(true),
98  detailsCtrl_(NULL), utilizationCtrl_(NULL) {
99 
100  createContents();
101 
102  SetSizeHints(400, 300);
103 
104  simulator_ = wxGetApp().simulation()->frontend();
105 
110 
112  const_cast<Machine*>(&ProximToolbox::machine());
113 
115 
116  if (showUtilizations_) {
118  }
119 
120  }
121 }

References ProximToolbox::machine(), and machine.

Here is the call graph for this function:

◆ ~ProximMachineStateWindow()

ProximMachineStateWindow::~ProximMachineStateWindow ( )
virtual

Destructor.

Definition at line 127 of file ProximMachineStateWindow.cc.

127  {
128 }

Member Function Documentation

◆ addMoves()

void ProximMachineStateWindow::addMoves ( )
private

Adds active moves to be drawn on the canvas.

Definition at line 358 of file ProximMachineStateWindow.cc.

358  {
359 
361 
362  const TTAProgram::Instruction& instruction =
363  simulator_->program().instructionAt(address);
364 
365  canvas_->clearMoves();
366  for (int i = 0; i < instruction.moveCount(); i++) {
367 
368  // Check that the move wasn't squashed by a guard.
369  const ExecutableInstruction& lastInstruction =
371 
372  if (lastInstruction.moveSquashed(i)) {
373  continue;
374  }
375 
376  // Move not squashed, add move to be drawn on the canvas.
377  TTAProgram::Move& move = instruction.move(i);
378  const Bus* bus = &move.bus();
379  const Port* source = NULL;
380  const Port* target = NULL;
381  if (move.source().isFUPort() || move.source().isGPR()) {
382  source = &move.source().port();
383  }
384  if (move.destination().isFUPort() || move.destination().isGPR()) {
385  target = &move.destination().port();
386  }
387  canvas_->addMove(bus, source, target);
388  }
389 
390 }

References MachineCanvas::addMove(), TTAProgram::Move::bus(), canvas_, MachineCanvas::clearMoves(), TTAProgram::Move::destination(), TTAProgram::Program::instructionAt(), TTAProgram::Terminal::isFUPort(), TTAProgram::Terminal::isGPR(), SimulatorFrontend::lastExecInstruction(), SimulatorFrontend::lastExecutedInstruction(), TTAProgram::Instruction::move(), TTAProgram::Instruction::moveCount(), ExecutableInstruction::moveSquashed(), TTAProgram::Terminal::port(), SimulatorFrontend::program(), simulator_, and TTAProgram::Move::source().

Referenced by onSimulationStop(), and onToggleMoves().

Here is the call graph for this function:

◆ appendDetails()

void ProximMachineStateWindow::appendDetails ( std::string  text)

Appends text to the component details widget.

Parameters
textText to append.

Definition at line 479 of file ProximMachineStateWindow.cc.

479  {
480  wxString data = WxConversion::toWxString(text);
481  detailsCtrl_->AppendText(data);
482 }

References detailsCtrl_, and WxConversion::toWxString().

Referenced by ProximBusDetailsCmd::Do(), ProximSocketDetailsCmd::Do(), ProximRFDetailsCmd::Do(), ProximIUDetailsCmd::Do(), ProximFUPortDetailsCmd::Do(), and ProximFUDetailsCmd::Do().

Here is the call graph for this function:

◆ appendUtilizationData()

void ProximMachineStateWindow::appendUtilizationData ( std::string  text)

Appends text to the component utilization widget.

Parameters
textText to append.

Definition at line 467 of file ProximMachineStateWindow.cc.

467  {
468  wxString data = WxConversion::toWxString(text);
469  utilizationCtrl_->AppendText(data);
470 }

References WxConversion::toWxString(), and utilizationCtrl_.

Referenced by ProximBusDetailsCmd::Do(), ProximSocketDetailsCmd::Do(), ProximRFDetailsCmd::Do(), ProximIUDetailsCmd::Do(), and ProximFUDetailsCmd::Do().

Here is the call graph for this function:

◆ clearDetails()

void ProximMachineStateWindow::clearDetails ( )

Clears data in the component details pane.

Definition at line 488 of file ProximMachineStateWindow.cc.

488  {
489  detailsCtrl_->Clear();
490  utilizationCtrl_->Clear();
491 }

References detailsCtrl_, and utilizationCtrl_.

Referenced by ProximMachineCanvasTool::onMouseEvent(), and onSimulationStop().

◆ createContents()

void ProximMachineStateWindow::createContents ( )
private

Creates the window contents.

Code generated by wxWidgets.

Definition at line 199 of file ProximMachineStateWindow.cc.

199  {
200 
201  sizer_ = new wxBoxSizer(wxVERTICAL);
202 
203  wxSplitterWindow* splitter = new wxSplitterWindow(
204  this, ID_SPLITTER, wxDefaultPosition, wxSize(800,600),
205  wxSP_BORDER|wxSP_3D|wxCLIP_CHILDREN);
206 
207  wxPanel* left = new wxPanel(splitter, -1);
208  wxPanel* right = new wxPanel(splitter, -1);
209 
210  // Splitter window left hand pane sizer.
211  wxFlexGridSizer* leftSizer = new wxFlexGridSizer(1, 0, 0);
212  leftSizer->AddGrowableCol(0);
213  leftSizer->AddGrowableRow(1);
214  leftSizer->AddGrowableRow(4);
215 
216  wxStaticText* title = new wxStaticText(
218  wxDefaultPosition, wxDefaultSize, 0);
219 
220  detailsCtrl_ = new wxTextCtrl(
221  left, ID_DETAILS, wxT(""), wxDefaultPosition, wxSize(80,40),
222  wxTE_MULTILINE|wxTE_READONLY|wxVSCROLL|wxHSCROLL);
223 
224  wxStaticLine* line = new wxStaticLine(
225  left, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL);
226 
227  wxStaticText* utilizationTitle = new wxStaticText(
228  left, ID_LABEL_UTILIZATION,
230  wxDefaultSize, 0);
231 
232  utilizationCtrl_ = new wxTextCtrl(
233  left, ID_UTILIZATION, wxT(""), wxDefaultPosition, wxSize(80,40),
234  wxTE_MULTILINE|wxTE_READONLY|wxVSCROLL|wxHSCROLL);
235 
236  leftSizer->Add(title, 0, wxGROW|wxALL, 5);
237  leftSizer->Add(detailsCtrl_, 0, wxGROW|wxALL, 5);
238  leftSizer->Add(line, 0, wxGROW|wxALL, 5);
239  leftSizer->Add(utilizationTitle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
240  leftSizer->Add(utilizationCtrl_, 0, wxGROW|wxALL, 5);
241  left->SetSizer(leftSizer);
242 
243 
244  // Splitter window right hand pane sizer.
245  wxFlexGridSizer* rightSizer = new wxFlexGridSizer(1, 0, 0);
246  rightSizer->AddGrowableCol(0);
247  rightSizer->AddGrowableRow(0);
248  canvas_ = new MachineCanvas(right, new ProximEditPolicyFactory());
249  statusbar_ = new wxStatusBar(right, -1);
250  rightSizer->Add(canvas_, 0, wxGROW|wxALL, 5);
251  rightSizer->Add(statusbar_, 0, wxGROW|wxALL, 5);
252  right->SetSizer(rightSizer);
253 
254  // Set sizers and split the window.
255  splitter->SetMinimumPaneSize(MINIMUM_PANE_WIDTH);
256  splitter->SplitVertically(left, right);
257  splitter->SetSashPosition(INITIAL_DETAILS_PANE_WIDTH);
258 
259  sizer_->Add(splitter, 1, wxGROW);
260  SetSizer(sizer_);
261 
262  // Create tool for the canvas.
264  canvas_->setTool(canvasTool);
265 }

References canvas_, detailsCtrl_, ID_DETAILS, ID_LABEL_UTILIZATION, ID_LINE, ID_SPLITTER, ID_TITLE, ID_UTILIZATION, INITIAL_DETAILS_PANE_WIDTH, ProximConstants::MACH_WIN_DETAILS_TITLE, ProximConstants::MACH_WIN_UTILIZATION_TITLE, MINIMUM_PANE_WIDTH, MachineCanvas::setTool(), sizer_, statusbar_, and utilizationCtrl_.

Here is the call graph for this function:

◆ onExport()

void ProximMachineStateWindow::onExport ( wxCommandEvent &  event)
private

Displays a dialog for saving machine figure in a file.

Definition at line 498 of file ProximMachineStateWindow.cc.

498  {
499 
500  wxString message = _T("Export processor figure.");
501  wxString defaultDir = _T(".");
502  wxString defaultFile= _T("");
503 #if wxCHECK_VERSION(3, 0, 0)
504  wxString fileTypes = _T("Scalable Vector Graphics (.svg)|*.svg|");
505 #else
506  wxString fileTypes = _T("Encapsulated Postscript (.eps)|*.eps;*.epsi|");
507 #endif
508  fileTypes.Append(_T("Portable Network Graphics (.png)|*.png"));
509 
510  wxFileDialog dialog(
511  this, message, defaultDir, defaultFile, fileTypes,
512  wxSAVE | wxOVERWRITE_PROMPT);
513 
514  if (dialog.ShowModal() == wxID_CANCEL) {
515  return;
516  }
517 
518  std::string filename = WxConversion::toString(dialog.GetPath());
519  std::string extension = FileSystem::fileExtension(filename);
520  std::string creator = "TTA Processor Simulator (Proxim)";
521  std::string title = "Processor Simulation";
522 
523 #if wxCHECK_VERSION(3, 0, 0)
524  if (extension == ".svg") {
525  if (!canvas_->saveSVG(filename)) {
526 #else
527  if (extension == ".eps" || extension == ".epsi") {
528  if (!canvas_->saveEPS(filename, title, creator)) {
529 #endif
530  wxString message = _T("Error saving file '");
531  message.Append(dialog.GetPath());
532  message.Append(_T("'."));
533  ErrorDialog errorDialog(this, message);
534  errorDialog.ShowModal();
535  }
536  } else if (extension == ".png") {
537  if (!canvas_->savePNG(filename)) {
538  wxString message = _T("Error saving file '");
539  message.Append(dialog.GetPath());
540  message.Append(_T("'."));
541  ErrorDialog errorDialog(this, message);
542  errorDialog.ShowModal();
543  }
544  } else {
545  wxString message = _T("File type with extension '");
546  message.Append(WxConversion::toWxString(extension));
547  message.Append(_T("' is not supported."));
548  ErrorDialog dialog(this, message);
549  dialog.ShowModal();
550  }
551 }

References canvas_, FileSystem::fileExtension(), MachineCanvas::saveEPS(), MachineCanvas::savePNG(), WxConversion::toString(), and WxConversion::toWxString().

Here is the call graph for this function:

◆ onMachineLoaded()

void ProximMachineStateWindow::onMachineLoaded ( const SimulatorEvent event)
private

◆ onProgramLoaded()

void ProximMachineStateWindow::onProgramLoaded ( const SimulatorEvent event)
private

Event handler which is called when a new program is loaded in the simulator.

Definition at line 135 of file ProximMachineStateWindow.cc.

135  {
137  const_cast<Machine*>(&simulator_->machine());
139 }

References canvas_, machine, SimulatorFrontend::machine(), MachineCanvas::setMachine(), and simulator_.

Here is the call graph for this function:

◆ onSimulationStop()

void ProximMachineStateWindow::onSimulationStop ( const SimulatorEvent event)
private

Event handler for simulation stop.

Refreshes the register values.

Definition at line 159 of file ProximMachineStateWindow.cc.

159  {
160 
161  // Store pointer to the selected machine part.
162  const MachinePart* selection = NULL;
163  if (canvas_->selection() != NULL) {
164  selection = canvas_->selection()->model();
165  }
166 
168  clearDetails();
169 
170  if (showMoves_) {
171  addMoves();
172  }
173  if (showUtilizations_) {
175  }
176 
177  canvas_->Refresh();
178 
179  // Reselect & display details of the previously selected machine part.
180  Request statusRequest(Request::DETAILS_REQUEST);
181  if (selection != NULL) {
182  EditPart * part = canvas_->findEditPart(selection);
183  if (part != NULL && part->canHandle(&statusRequest)) {
184  canvas_->select(part);
185  ComponentCommand* command = part->performRequest(&statusRequest);
186  command->Do();
187  delete command;
188  }
189  }
190 }

References addMoves(), EditPart::canHandle(), canvas_, clearDetails(), MachineCanvas::clearSelection(), Request::DETAILS_REQUEST, ComponentCommand::Do(), MachineCanvas::findEditPart(), EditPart::model(), EditPart::performRequest(), MachineCanvas::select(), MachineCanvas::selection(), setUtilizationHighlights(), showMoves_, and showUtilizations_.

Here is the call graph for this function:

◆ onToggleMoves()

void ProximMachineStateWindow::onToggleMoves ( wxCommandEvent &  event)
private

Toggles the move display on and off.

Definition at line 411 of file ProximMachineStateWindow.cc.

411  {
413  if (showMoves_) {
414  addMoves();
415  } else {
416  canvas_->clearMoves();
417  }
418  canvas_->Refresh();
419 }

References addMoves(), canvas_, MachineCanvas::clearMoves(), and showMoves_.

Here is the call graph for this function:

◆ onToggleUnitInfo()

void ProximMachineStateWindow::onToggleUnitInfo ( wxCommandEvent &  event)
private

Toggles the unit info string display on and off.

Definition at line 396 of file ProximMachineStateWindow.cc.

396  {
397 
398  OptionValue& showInfo = canvas_->options().optionValue(
400 
401  showInfo.setBoolValue(!showInfo.isFlagOn());
403 
404 }

References canvas_, OptionValue::isFlagOn(), MachineCanvas::options(), Options::optionValue(), OptionValue::setBoolValue(), MachineCanvasOptions::SHOW_UNIT_INFO_STRING, and MachineCanvas::updateMachine().

Here is the call graph for this function:

◆ onToggleUtilizations()

void ProximMachineStateWindow::onToggleUtilizations ( wxCommandEvent &  event)
private

Toggles the utilization display on and off.

Definition at line 425 of file ProximMachineStateWindow.cc.

425  {
426 
428 
430  if (showUtilizations_ && frontend != NULL) {
432  } else {
434  }
435  canvas_->Refresh();
436 }

References canvas_, MachineCanvas::clearHighlights(), ProximToolbox::frontend(), setUtilizationHighlights(), and showUtilizations_.

Here is the call graph for this function:

◆ onUpdateUIEvent()

void ProximMachineStateWindow::onUpdateUIEvent ( wxUpdateUIEvent &  event)
private

Event handler for meni item UI update events.

Parameters
eventUpdate event to handle.

Definition at line 445 of file ProximMachineStateWindow.cc.

445  {
446 
447  if (event.GetId() == COMMAND_TOGGLE_MOVES) {
448  event.Check(showMoves_);
449  } else if (event.GetId() == COMMAND_TOGGLE_UTILIZATIONS) {
450  event.Check(showUtilizations_);
451  } else if (event.GetId() == COMMAND_TOGGLE_UNIT_INFO) {
452  OptionValue& showInfo = canvas_->options().optionValue(
454  event.Check(showInfo.isFlagOn());
455  } else {
456  event.Skip();
457  }
458 }

References canvas_, COMMAND_TOGGLE_MOVES, COMMAND_TOGGLE_UNIT_INFO, COMMAND_TOGGLE_UTILIZATIONS, OptionValue::isFlagOn(), MachineCanvas::options(), Options::optionValue(), MachineCanvasOptions::SHOW_UNIT_INFO_STRING, showMoves_, and showUtilizations_.

Here is the call graph for this function:

◆ onZoom()

void ProximMachineStateWindow::onZoom ( wxCommandEvent &  event)
private

Handles zoom menu item events.

Parameters
eventMenu event to handle.

Definition at line 286 of file ProximMachineStateWindow.cc.

286  {
287 
288  // Zoom in.
289  if (event.GetId() == COMMAND_ZOOM_IN) {
290  canvas_->zoomIn();
291  }
292 
293  // Zoom out.
294  if (event.GetId() == COMMAND_ZOOM_OUT) {
295  canvas_->zoomOut();
296  }
297 }

References canvas_, COMMAND_ZOOM_IN, COMMAND_ZOOM_OUT, MachineCanvas::zoomIn(), and MachineCanvas::zoomOut().

Here is the call graph for this function:

◆ reset()

void ProximMachineStateWindow::reset ( )
virtual

Resets the machine displayed on the canvas when the machine is unloaded in the simulator.

Reimplemented from ProximSimulatorWindow.

Definition at line 147 of file ProximMachineStateWindow.cc.

147  {
148  canvas_->setMachine(NULL);
149 }

References canvas_, and MachineCanvas::setMachine().

Here is the call graph for this function:

◆ setMachine()

void ProximMachineStateWindow::setMachine ( TTAMachine::Machine machine)

◆ setStatusText()

void ProximMachineStateWindow::setStatusText ( std::string  status)

Sets the status line text.

Parameters
statusStatus text to set.

Definition at line 274 of file ProximMachineStateWindow.cc.

274  {
275  wxString text = WxConversion::toWxString(status);
276  statusbar_->SetStatusText(text);
277 }

References statusbar_, and WxConversion::toWxString().

Referenced by ProximComponentStatusCmd::Do(), and ProximMachineCanvasTool::onMouseEvent().

Here is the call graph for this function:

◆ setUtilizationHighlights()

void ProximMachineStateWindow::setUtilizationHighlights ( )
private

Sets machine part highlights based on part utilizations.

Definition at line 304 of file ProximMachineStateWindow.cc.

304  {
305 
307 
308  Machine* machine = const_cast<Machine*>(&ProximToolbox::machine());
309 
310  const UtilizationStats& stats =
312 
314 
315  // Highlight buses.
316  const Machine::BusNavigator& busNavigator = machine->busNavigator();
317  for (int i = 0; i < busNavigator.count(); i++) {
318  ClockCycleCount writes =
319  stats.busWrites(busNavigator.item(i)->name());
320  double utilization = static_cast<double>(writes) / cycles;
321  unsigned value = unsigned(utilization * 255);
322  canvas_->highlight(busNavigator.item(i), wxColour(value, 0, 0));
323  }
324 
325  // Highlight sockets.
326  const Machine::SocketNavigator& socketNavigator =
328 
329  for (int i = 0; i < socketNavigator.count(); i++) {
330  ClockCycleCount writes =
331  stats.socketWrites(socketNavigator.item(i)->name());
332  double utilization = static_cast<double>(writes) / cycles;
333  unsigned value = 255 - unsigned(utilization * 255);
334  wxColour colour = wxColour(255, value, value);
335  canvas_->highlight(socketNavigator.item(i), colour);
336  }
337 
338  // Highlight function units.
339  const Machine::FunctionUnitNavigator& fuNavigator =
341 
342  for (int i = 0; i < fuNavigator.count(); i++) {
343  ClockCycleCount writes =
344  stats.triggerCount(fuNavigator.item(i)->name());
345  double utilization = static_cast<double>(writes) / cycles;
346  unsigned value = 255 - unsigned(utilization * 255);
347  wxColour colour = wxColour(255, value, value);
348  canvas_->highlight(fuNavigator.item(i), colour);
349  }
350 
351 }

References TTAMachine::Machine::busNavigator(), UtilizationStats::busWrites(), canvas_, MachineCanvas::clearHighlights(), TTAMachine::Machine::Navigator< ComponentType >::count(), SimulatorFrontend::cycleCount(), ProximToolbox::frontend(), TTAMachine::Machine::functionUnitNavigator(), MachineCanvas::highlight(), TTAMachine::Machine::Navigator< ComponentType >::item(), ProximToolbox::machine(), machine, TTAMachine::Machine::socketNavigator(), UtilizationStats::socketWrites(), UtilizationStats::triggerCount(), and SimulatorFrontend::utilizationStatistics().

Referenced by onSimulationStop(), and onToggleUtilizations().

Here is the call graph for this function:

Member Data Documentation

◆ canvas_

MachineCanvas* ProximMachineStateWindow::canvas_
private

◆ detailsCtrl_

wxTextCtrl* ProximMachineStateWindow::detailsCtrl_
private

Utilziation window where to display utilization data of the components.

Definition at line 119 of file ProximMachineStateWindow.hh.

Referenced by appendDetails(), clearDetails(), and createContents().

◆ INITIAL_DETAILS_PANE_WIDTH

const int ProximMachineStateWindow::INITIAL_DETAILS_PANE_WIDTH = 200
staticprivate

Initial width for the component detail pane.

Definition at line 125 of file ProximMachineStateWindow.hh.

Referenced by createContents().

◆ MINIMUM_PANE_WIDTH

const int ProximMachineStateWindow::MINIMUM_PANE_WIDTH = 150
staticprivate

Minimum width for the splitter window panes.

Definition at line 123 of file ProximMachineStateWindow.hh.

Referenced by createContents().

◆ showMoves_

bool ProximMachineStateWindow::showMoves_
private

Tells if the moves are displayed or not.

Definition at line 113 of file ProximMachineStateWindow.hh.

Referenced by onSimulationStop(), onToggleMoves(), and onUpdateUIEvent().

◆ showUtilizations_

bool ProximMachineStateWindow::showUtilizations_
private

Tells if the machine part utilizations are displayed or not.

Definition at line 115 of file ProximMachineStateWindow.hh.

Referenced by onSimulationStop(), onToggleUtilizations(), and onUpdateUIEvent().

◆ simulator_

SimulatorFrontend* ProximMachineStateWindow::simulator_
private

Simulator instance which contains the registers to display.

Definition at line 94 of file ProximMachineStateWindow.hh.

Referenced by addMoves(), and onProgramLoaded().

◆ sizer_

wxBoxSizer* ProximMachineStateWindow::sizer_
private

Toplevel sizer for the window widgets.

Definition at line 96 of file ProximMachineStateWindow.hh.

Referenced by createContents().

◆ statusbar_

wxStatusBar* ProximMachineStateWindow::statusbar_
private

Statusbar of the window.

Definition at line 98 of file ProximMachineStateWindow.hh.

Referenced by createContents(), and setStatusText().

◆ utilizationCtrl_

wxTextCtrl* ProximMachineStateWindow::utilizationCtrl_
private

The documentation for this class was generated from the following files:
MachineCanvas::findEditPart
EditPart * findEditPart(int x, int y)
Definition: MachineCanvas.cc:421
TTAProgram::Terminal::isFUPort
virtual bool isFUPort() const
Definition: Terminal.cc:118
MachineCanvas
Definition: MachineCanvas.hh:64
ProximMachineStateWindow::ID_UTILIZATION_WINDOW
@ ID_UTILIZATION_WINDOW
Definition: ProximMachineStateWindow.hh:103
ExecutableInstruction
Definition: ExecutableInstruction.hh:49
ProximMachineStateWindow::COMMAND_ZOOM_OUT
@ COMMAND_ZOOM_OUT
Definition: ProximMachineStateWindow.hh:70
InstructionAddress
UInt32 InstructionAddress
Definition: BaseType.hh:175
ProximToolbox::frontend
static TracedSimulatorFrontend * frontend()
Definition: ProximToolbox.cc:223
WxConversion::toWxString
static wxString toWxString(const std::string &source)
SimulatorFrontend::program
const TTAProgram::Program & program() const
Definition: SimulatorFrontend.cc:276
UtilizationStats::triggerCount
ClockCycleCount triggerCount(const std::string &fuName) const
Definition: UtilizationStats.cc:220
TTAProgram::Instruction::move
Move & move(int i) const
Definition: Instruction.cc:193
ProximMachineStateWindow::COMMAND_TOGGLE_MOVES
@ COMMAND_TOGGLE_MOVES
Definition: ProximMachineStateWindow.hh:72
MachineCanvas::clearSelection
void clearSelection()
Definition: MachineCanvas.cc:395
machine
TTAMachine::Machine * machine
the architecture definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:59
ProximConstants::MACH_WIN_UTILIZATION_TITLE
static const wxString MACH_WIN_UTILIZATION_TITLE
Execution count title for the machine state window.
Definition: ProximConstants.hh:244
ProximMachineStateWindow::INITIAL_DETAILS_PANE_WIDTH
static const int INITIAL_DETAILS_PANE_WIDTH
Initial width for the component detail pane.
Definition: ProximMachineStateWindow.hh:125
Options::optionValue
OptionValue & optionValue(const string &name, int index=0)
Definition: Options.cc:115
ProximMachineStateWindow::MINIMUM_PANE_WIDTH
static const int MINIMUM_PANE_WIDTH
Minimum width for the splitter window panes.
Definition: ProximMachineStateWindow.hh:123
SimulatorFrontend::machine
const TTAMachine::Machine & machine() const
Definition: SimulatorFrontend.cc:263
TTAProgram::Instruction
Definition: Instruction.hh:57
UtilizationStats::socketWrites
ClockCycleCount socketWrites(const std::string &socketName) const
Definition: UtilizationStats.cc:206
TTAMachine::Bus
Definition: Bus.hh:53
TTAProgram::Move::destination
Terminal & destination() const
Definition: Move.cc:323
SimulatorFrontend::isSimulationStopped
bool isSimulationStopped() const
Definition: SimulatorFrontend.cc:1271
ProximMachineStateWindow::ID_TITLE
@ ID_TITLE
Definition: ProximMachineStateWindow.hh:104
EditPart::performRequest
ComponentCommand * performRequest(Request *request) const
Definition: EditPart.cc:297
ProximMachineCanvasTool
Definition: ProximMachineCanvasTool.hh:45
TTAProgram::Move::bus
const TTAMachine::Bus & bus() const
Definition: Move.cc:373
ProximMachineStateWindow::statusbar_
wxStatusBar * statusbar_
Statusbar of the window.
Definition: ProximMachineStateWindow.hh:98
ProximMachineStateWindow::detailsCtrl_
wxTextCtrl * detailsCtrl_
Utilziation window where to display utilization data of the components.
Definition: ProximMachineStateWindow.hh:119
TTAMachine::Machine::Navigator::count
int count() const
MachineCanvas::saveEPS
bool saveEPS(const std::string &filename, const std::string &title, const std::string &creator="")
Definition: MachineCanvas.cc:617
ProximMachineStateWindow::showMoves_
bool showMoves_
Tells if the moves are displayed or not.
Definition: ProximMachineStateWindow.hh:113
MachineCanvas::setTool
void setTool(MachineCanvasTool *tool)
Definition: MachineCanvas.cc:305
ComponentCommand::Do
virtual bool Do()=0
ProximMachineStateWindow::simulator_
SimulatorFrontend * simulator_
Simulator instance which contains the registers to display.
Definition: ProximMachineStateWindow.hh:94
MachineCanvas::selection
EditPart * selection()
Definition: MachineCanvas.cc:409
TTAProgram::Program::instructionAt
Instruction & instructionAt(InstructionAddress address) const
Definition: Program.cc:374
ProximMachineStateWindow::ID_LINE
@ ID_LINE
Definition: ProximMachineStateWindow.hh:106
MachineCanvasOptions::SHOW_UNIT_INFO_STRING
static const std::string SHOW_UNIT_INFO_STRING
Option name for the unit info string visibility flag.
Definition: MachineCanvasOptions.hh:48
ErrorDialog
Definition: ErrorDialog.hh:42
Request::DETAILS_REQUEST
@ DETAILS_REQUEST
Detailed info request.
Definition: Request.hh:53
OptionValue::isFlagOn
virtual bool isFlagOn() const
Definition: OptionValue.cc:166
ProximMachineStateWindow::ID_LABEL_UTILIZATION
@ ID_LABEL_UTILIZATION
Definition: ProximMachineStateWindow.hh:107
ProximMachineStateWindow::createContents
void createContents()
Definition: ProximMachineStateWindow.cc:199
SimulatorFrontend::utilizationStatistics
const UtilizationStats & utilizationStatistics(int core=-1)
Definition: SimulatorFrontend.cc:2155
TTAMachine::Port
Definition: Port.hh:54
FileSystem::fileExtension
static std::string fileExtension(const std::string &fileName)
Definition: FileSystem.cc:279
ProximMachineStateWindow::COMMAND_TOGGLE_UNIT_INFO
@ COMMAND_TOGGLE_UNIT_INFO
Definition: ProximMachineStateWindow.hh:71
ProximMachineStateWindow::setUtilizationHighlights
void setUtilizationHighlights()
Definition: ProximMachineStateWindow.cc:304
TTAMachine::Machine::functionUnitNavigator
virtual FunctionUnitNavigator functionUnitNavigator() const
Definition: Machine.cc:380
ProximMachineStateWindow::ID_SPLITTER
@ ID_SPLITTER
Definition: ProximMachineStateWindow.hh:109
UtilizationStats::busWrites
ClockCycleCount busWrites(const std::string &busName) const
Definition: UtilizationStats.cc:192
TTAMachine::MachinePart
Definition: MachinePart.hh:57
MachineCanvas::updateMachine
void updateMachine()
Definition: MachineCanvas.cc:345
ExecutableInstruction::moveSquashed
bool moveSquashed(std::size_t moveIndex) const
TTAProgram::Terminal::isGPR
virtual bool isGPR() const
Definition: Terminal.cc:107
ProximMachineStateWindow::COMMAND_EXPORT
@ COMMAND_EXPORT
Definition: ProximMachineStateWindow.hh:74
MachineCanvasTool
Definition: MachineCanvasTool.hh:49
EditPart
Definition: EditPart.hh:60
ProximMachineStateWindow::addMoves
void addMoves()
Definition: ProximMachineStateWindow.cc:358
TTAProgram::Move
Definition: Move.hh:55
MachineCanvas::clearHighlights
void clearHighlights()
Definition: MachineCanvas.cc:527
SimulatorFrontend::lastExecutedInstruction
virtual InstructionAddress lastExecutedInstruction(int coreId=-1) const
Definition: SimulatorFrontend.cc:1182
TTAMachine::Machine::socketNavigator
virtual SocketNavigator socketNavigator() const
Definition: Machine.cc:368
EditPart::model
TTAMachine::MachinePart * model() const
Request
Definition: Request.hh:43
ComponentCommand
Definition: ComponentCommand.hh:46
SimulatorFrontend::isSimulationRunning
bool isSimulationRunning() const
Definition: SimulatorFrontend.cc:1260
MachineCanvas::select
void select(EditPart *part)
Definition: MachineCanvas.cc:485
MachineCanvas::options
MachineCanvasOptions & options()
Definition: MachineCanvas.cc:681
ProximMachineStateWindow::COMMAND_ZOOM_IN
@ COMMAND_ZOOM_IN
Definition: ProximMachineStateWindow.hh:69
MachineCanvas::clearMoves
void clearMoves()
Definition: MachineCanvas.cc:577
ProximMachineStateWindow::utilizationCtrl_
wxTextCtrl * utilizationCtrl_
Definition: ProximMachineStateWindow.hh:120
ProximToolbox::machine
static const TTAMachine::Machine & machine()
Definition: ProximToolbox.cc:69
MachineCanvas::setMachine
void setMachine(TTAMachine::Machine *machine)
Definition: MachineCanvas.cc:386
SimulatorFrontend::cycleCount
ClockCycleCount cycleCount() const
Definition: SimulatorFrontend.cc:1194
ProximMachineStateWindow::ID_MACHINE_CANVAS
@ ID_MACHINE_CANVAS
Definition: ProximMachineStateWindow.hh:102
ProximMachineStateWindow::showUtilizations_
bool showUtilizations_
Tells if the machine part utilizations are displayed or not.
Definition: ProximMachineStateWindow.hh:115
MachineCanvas::addMove
void addMove(const TTAMachine::Bus *bus, const TTAMachine::Port *source, const TTAMachine::Port *target)
Definition: MachineCanvas.cc:541
ProximMachineStateWindow::ID_DETAILS
@ ID_DETAILS
Definition: ProximMachineStateWindow.hh:105
TTAMachine::Machine::busNavigator
virtual BusNavigator busNavigator() const
Definition: Machine.cc:356
EditPart::canHandle
bool canHandle(Request *request) const
Definition: EditPart.cc:316
OptionValue
Definition: OptionValue.hh:51
MachineCanvas::highlight
void highlight(TTAMachine::MachinePart *model, const wxColour &colour)
Definition: MachineCanvas.cc:510
TTAProgram::Move::source
Terminal & source() const
Definition: Move.cc:302
MachineCanvas::savePNG
bool savePNG(const std::string &filename)
Definition: MachineCanvas.cc:648
OptionValue::setBoolValue
virtual void setBoolValue(bool)
Definition: OptionValue.cc:106
ClockCycleCount
CycleCount ClockCycleCount
Alias for ClockCycleCount.
Definition: SimulatorConstants.hh:57
TTAProgram::Terminal::port
virtual const TTAMachine::Port & port() const
Definition: Terminal.cc:378
TTAMachine::Machine::Navigator::item
ComponentType * item(int index) const
SimulatorFrontend::hasSimulationEnded
bool hasSimulationEnded() const
Definition: SimulatorFrontend.cc:1283
ProximMachineStateWindow::clearDetails
void clearDetails()
Definition: ProximMachineStateWindow.cc:488
MachineCanvas::zoomIn
void zoomIn()
Definition: MachineCanvas.cc:240
MachineCanvas::zoomOut
void zoomOut()
Definition: MachineCanvas.cc:251
SimulatorFrontend::lastExecInstruction
const ExecutableInstruction & lastExecInstruction() const
Definition: SimulatorFrontend.cc:2194
ProximMachineStateWindow::sizer_
wxBoxSizer * sizer_
Toplevel sizer for the window widgets.
Definition: ProximMachineStateWindow.hh:96
WxConversion::toString
static std::string toString(const wxString &source)
ProximEditPolicyFactory
Definition: ProximEditPolicyFactory.hh:42
TTAMachine::Machine::Navigator
Definition: Machine.hh:186
SimulatorFrontend
Definition: SimulatorFrontend.hh:89
ProximMachineStateWindow::ID_UTILIZATION
@ ID_UTILIZATION
Definition: ProximMachineStateWindow.hh:108
ProximMachineStateWindow::canvas_
MachineCanvas * canvas_
Machine visualization canvas.
Definition: ProximMachineStateWindow.hh:92
SimulatorFrontend::isSimulationInitialized
bool isSimulationInitialized() const
Definition: SimulatorFrontend.cc:1228
TTAProgram::Instruction::moveCount
int moveCount() const
Definition: Instruction.cc:176
UtilizationStats
Definition: UtilizationStats.hh:50
ProximMachineStateWindow::COMMAND_TOGGLE_UTILIZATIONS
@ COMMAND_TOGGLE_UTILIZATIONS
Definition: ProximMachineStateWindow.hh:73
TTAMachine::Machine
Definition: Machine.hh:73
ProximSimulatorWindow::ProximSimulatorWindow
ProximSimulatorWindow(ProximMainFrame *mainFrame, wxWindowID id=-1, wxPoint pos=wxDefaultPosition, wxSize size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
Definition: ProximSimulatorWindow.cc:49
ProximConstants::MACH_WIN_DETAILS_TITLE
static const wxString MACH_WIN_DETAILS_TITLE
Execution count title for the machine state window.
Definition: ProximConstants.hh:242