OpenASIP  2.0
ProximMachineStateWindow.cc
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 ProximMachineStateWindow.cc
26  *
27  * Definition of ProximMachineStateWindow class.
28  *
29  * @author Veli-Pekka Jääskeläinen 2005 (vjaaskel-no.spam-cs.tut.fi)
30  * @note rating: red
31  */
32 
33 #include <wx/wx.h>
34 #include <wx/statline.h>
39 #include "MachineCanvas.hh"
40 #include "Machine.hh"
41 #include "Proxim.hh"
44 #include "Instruction.hh"
45 #include "Move.hh"
46 #include "WxConversion.hh"
47 #include "Terminal.hh"
48 #include "EditPart.hh"
49 #include "Figure.hh"
50 #include "Port.hh"
51 #include "Bus.hh"
52 #include "ProximToolbox.hh"
53 #include "UtilizationStats.hh"
54 #include "ExecutableInstruction.hh"
55 #include "MachinePart.hh"
56 #include "ProximConstants.hh"
57 #include "ErrorDialog.hh"
58 #include "FileSystem.hh"
59 #include "Request.hh"
60 #include "ComponentCommand.hh"
61 #include "Program.hh"
62 #include "OptionValue.hh"
63 
64 #if wxCHECK_VERSION(3, 0, 0)
65  #define wxSAVE wxFD_SAVE
66  #define wxOVERWRITE_PROMPT wxFD_OVERWRITE_PROMPT
67 #endif
68 
72  EVT_MENU(COMMAND_ZOOM_IN, ProximMachineStateWindow::onZoom)
73  EVT_MENU(COMMAND_ZOOM_OUT, ProximMachineStateWindow::onZoom)
74  EVT_MENU(COMMAND_TOGGLE_UNIT_INFO, ProximMachineStateWindow::onToggleUnitInfo)
75  EVT_MENU(COMMAND_TOGGLE_MOVES, ProximMachineStateWindow::onToggleMoves)
76  EVT_MENU(COMMAND_TOGGLE_UTILIZATIONS, ProximMachineStateWindow::onToggleUtilizations)
77  EVT_MENU(COMMAND_EXPORT, ProximMachineStateWindow::onExport)
78  EVT_UPDATE_UI_RANGE(COMMAND_TOGGLE_UNIT_INFO, COMMAND_TOGGLE_UTILIZATIONS, ProximMachineStateWindow::onUpdateUIEvent)
80 
81 using std::string;
82 using namespace TTAMachine;
83 using namespace TTAProgram;
84 
85 const int ProximMachineStateWindow::MINIMUM_PANE_WIDTH = 150;
86 const int ProximMachineStateWindow::INITIAL_DETAILS_PANE_WIDTH = 200;
87 
88 /**
89  * Constructor.
90  *
91  * @param parent Parent window of the window.
92  * @param id Window identifier.
93  */
95  ProximMainFrame* parent, int id):
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 
106  if (simulator_->isSimulationInitialized() ||
107  simulator_->isSimulationStopped() ||
108  simulator_->isSimulationRunning() ||
109  simulator_->hasSimulationEnded()) {
110 
112  const_cast<Machine*>(&ProximToolbox::machine());
113 
114  canvas_->setMachine(machine);
115 
116  if (showUtilizations_) {
117  setUtilizationHighlights();
118  }
119 
120  }
121 }
122 
123 
124 /**
125  * Destructor.
126  */
128 }
129 
130 
131 /**
132  * Event handler which is called when a new program is loaded in the simulator.
133  */
134 void
137  const_cast<Machine*>(&simulator_->machine());
139 }
140 
141 
142 /**
143  * Resets the machine displayed on the canvas when the machine is unloaded
144  * in the simulator.
145  */
146 void
148  canvas_->setMachine(NULL);
149 }
150 
151 
152 
153 /**
154  * Event handler for simulation stop.
155  *
156  * Refreshes the register values.
157  */
158 void
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 }
191 
192 
193 /**
194  * Creates the window contents.
195  *
196  * Code generated by wxWidgets.
197  */
198 void
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 }
266 
267 
268 /**
269  * Sets the status line text.
270  *
271  * @param status Status text to set.
272  */
273 void
275  wxString text = WxConversion::toWxString(status);
276  statusbar_->SetStatusText(text);
277 }
278 
279 
280 /**
281  * Handles zoom menu item events.
282  *
283  * @param event Menu event to handle.
284  */
285 void
286 ProximMachineStateWindow::onZoom(wxCommandEvent& event) {
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 }
298 
299 
300 /**
301  * Sets machine part highlights based on part utilizations.
302  */
303 void
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 }
352 
353 
354 /**
355  * Adds active moves to be drawn on the canvas.
356  */
357 void
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 }
391 
392 /**
393  * Toggles the unit info string display on and off.
394  */
395 void
397 
398  OptionValue& showInfo = canvas_->options().optionValue(
400 
401  showInfo.setBoolValue(!showInfo.isFlagOn());
403 
404 }
405 
406 
407 /**
408  * Toggles the move display on and off.
409  */
410 void
413  if (showMoves_) {
414  addMoves();
415  } else {
416  canvas_->clearMoves();
417  }
418  canvas_->Refresh();
419 }
420 
421 /**
422  * Toggles the utilization display on and off.
423  */
424 void
426 
428 
430  if (showUtilizations_ && frontend != NULL) {
432  } else {
434  }
435  canvas_->Refresh();
436 }
437 
438 
439 /**
440  * Event handler for meni item UI update events.
441  *
442  * @param event Update event to handle.
443  */
444 void
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 }
459 
460 
461 /**
462  * Appends text to the component utilization widget.
463  *
464  * @param text Text to append.
465  */
466 void
468  wxString data = WxConversion::toWxString(text);
469  utilizationCtrl_->AppendText(data);
470 }
471 
472 
473 /**
474  * Appends text to the component details widget.
475  *
476  * @param text Text to append.
477  */
478 void
480  wxString data = WxConversion::toWxString(text);
481  detailsCtrl_->AppendText(data);
482 }
483 
484 /**
485  * Clears data in the component details pane.
486  */
487 void
489  detailsCtrl_->Clear();
490  utilizationCtrl_->Clear();
491 }
492 
493 
494 /**
495  * Displays a dialog for saving machine figure in a file.
496  */
497 void
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 }
ProximMainFrame
Definition: ProximMainFrame.hh:58
TTAProgram::Terminal::isFUPort
virtual bool isFUPort() const
Definition: Terminal.cc:118
MachineCanvas::findEditPart
EditPart * findEditPart(int x, int y)
Definition: MachineCanvas.cc:421
ProximMachineStateWindow::setStatusText
void setStatusText(std::string status)
Definition: ProximMachineStateWindow.cc:274
MachineCanvas
Definition: MachineCanvas.hh:64
TTAProgram
Definition: Estimator.hh:65
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
ProximMachineStateWindow::onZoom
void onZoom(wxCommandEvent &event)
Definition: ProximMachineStateWindow.cc:286
FileSystem.hh
WxConversion::toWxString
static wxString toWxString(const std::string &source)
ProximMachineStateWindow::onExport
void onExport(wxCommandEvent &event)
Definition: ProximMachineStateWindow.cc:498
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
ProximMachineStateWindow.hh
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
ProximMachineStateWindow::ID_TITLE
@ ID_TITLE
Definition: ProximMachineStateWindow.hh:104
ProximMachineStateWindow::appendDetails
void appendDetails(std::string text)
Definition: ProximMachineStateWindow.cc:479
EditPart::performRequest
ComponentCommand * performRequest(Request *request) const
Definition: EditPart.cc:297
ProximMachineCanvasTool
Definition: ProximMachineCanvasTool.hh:45
ProximMachineStateWindow::onToggleMoves
void onToggleMoves(wxCommandEvent &event)
Definition: ProximMachineStateWindow.cc:411
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
Definition: ProximMachineStateWindow.hh:56
ProximSimulationThread.hh
Terminal.hh
ProximMachineStateWindow::detailsCtrl_
wxTextCtrl * detailsCtrl_
Utilziation window where to display utilization data of the components.
Definition: ProximMachineStateWindow.hh:119
Proxim.hh
TTAMachine::Machine::Navigator::count
int count() const
MachinePart.hh
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
Figure.hh
MachineCanvas::setTool
void setTool(MachineCanvasTool *tool)
Definition: MachineCanvas.cc:305
ComponentCommand::Do
virtual bool Do()=0
ProximMachineStateWindow::~ProximMachineStateWindow
virtual ~ProximMachineStateWindow()
Definition: ProximMachineStateWindow.cc:127
ProximMachineStateWindow::reset
virtual void reset()
Definition: ProximMachineStateWindow.cc:147
ProximSimulatorWindow
Definition: ProximSimulatorWindow.hh:47
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
ProximToolbox.hh
Port.hh
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
Request.hh
ErrorDialog
Definition: ErrorDialog.hh:42
Instruction.hh
Request::DETAILS_REQUEST
@ DETAILS_REQUEST
Detailed info request.
Definition: Request.hh:53
OptionValue::isFlagOn
virtual bool isFlagOn() const
Definition: OptionValue.cc:166
EditPart.hh
ProximMachineStateWindow::ID_LABEL_UTILIZATION
@ ID_LABEL_UTILIZATION
Definition: ProximMachineStateWindow.hh:107
ErrorDialog.hh
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
MachineCanvas.hh
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
MachineCanvasTool
Definition: MachineCanvasTool.hh:49
ProximMachineCanvasTool.hh
EditPart
Definition: EditPart.hh:60
ProximMachineStateWindow::onToggleUtilizations
void onToggleUtilizations(wxCommandEvent &event)
Definition: ProximMachineStateWindow.cc:425
ProximMachineStateWindow::addMoves
void addMoves()
Definition: ProximMachineStateWindow.cc:358
TTAProgram::Move
Definition: Move.hh:55
Machine.hh
MachineCanvas::clearHighlights
void clearHighlights()
Definition: MachineCanvas.cc:527
SimulatorFrontend::lastExecutedInstruction
virtual InstructionAddress lastExecutedInstruction(int coreId=-1) const
Definition: SimulatorFrontend.cc:1182
Bus.hh
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
MachineCanvas::select
void select(EditPart *part)
Definition: MachineCanvas.cc:485
ProximMachineStateWindow::appendUtilizationData
void appendUtilizationData(std::string text)
Definition: ProximMachineStateWindow.cc:467
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
ProximMachineStateWindow::onToggleUnitInfo
void onToggleUnitInfo(wxCommandEvent &event)
Definition: ProximMachineStateWindow.cc:396
ProximToolbox::machine
static const TTAMachine::Machine & machine()
Definition: ProximToolbox.cc:69
UtilizationStats.hh
TracedSimulatorFrontend.hh
MachineCanvas::setMachine
void setMachine(TTAMachine::Machine *machine)
Definition: MachineCanvas.cc:386
SimulatorFrontend::cycleCount
ClockCycleCount cycleCount() const
Definition: SimulatorFrontend.cc:1194
ProximMachineStateWindow::showUtilizations_
bool showUtilizations_
Tells if the machine part utilizations are displayed or not.
Definition: ProximMachineStateWindow.hh:115
ProximConstants.hh
Program.hh
MachineCanvas::addMove
void addMove(const TTAMachine::Bus *bus, const TTAMachine::Port *source, const TTAMachine::Port *target)
Definition: MachineCanvas.cc:541
ProximMachineStateWindow::onUpdateUIEvent
void onUpdateUIEvent(wxUpdateUIEvent &event)
Definition: ProximMachineStateWindow.cc:445
MachineEditPartFactory.hh
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
ExecutableInstruction.hh
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
WxConversion.hh
TTAProgram::Terminal::port
virtual const TTAMachine::Port & port() const
Definition: Terminal.cc:378
TTAMachine::Machine::Navigator::item
ComponentType * item(int index) const
EVT_SIMULATOR_PROGRAM_LOADED
#define EVT_SIMULATOR_PROGRAM_LOADED(id, fn)
Definition: SimulatorEvent.hh:151
ProximMachineStateWindow::clearDetails
void clearDetails()
Definition: ProximMachineStateWindow.cc:488
SimulatorEvent
Definition: SimulatorEvent.hh:42
MachineCanvas::zoomIn
void zoomIn()
Definition: MachineCanvas.cc:240
Move.hh
TTAMachine
Definition: Assembler.hh:48
ProximMachineStateWindow::onProgramLoaded
void onProgramLoaded(const SimulatorEvent &event)
Definition: ProximMachineStateWindow.cc:135
ProximEditPolicyFactory.hh
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
EVT_SIMULATOR_STOP
#define EVT_SIMULATOR_STOP(id, fn)
Definition: SimulatorEvent.hh:106
ProximMachineStateWindow::canvas_
MachineCanvas * canvas_
Machine visualization canvas.
Definition: ProximMachineStateWindow.hh:92
TTAProgram::Instruction::moveCount
int moveCount() const
Definition: Instruction.cc:176
UtilizationStats
Definition: UtilizationStats.hh:50
END_EVENT_TABLE
END_EVENT_TABLE() using namespace IDF
ProximMachineStateWindow::onSimulationStop
void onSimulationStop(const SimulatorEvent &event)
Definition: ProximMachineStateWindow.cc:159
ProximMachineStateWindow::COMMAND_TOGGLE_UTILIZATIONS
@ COMMAND_TOGGLE_UTILIZATIONS
Definition: ProximMachineStateWindow.hh:73
TTAMachine::Machine
Definition: Machine.hh:73
OptionValue.hh
ComponentCommand.hh
ProximConstants::MACH_WIN_DETAILS_TITLE
static const wxString MACH_WIN_DETAILS_TITLE
Execution count title for the machine state window.
Definition: ProximConstants.hh:242