OpenASIP 2.2
Loading...
Searching...
No Matches
AddWatchDialog.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 AddWatchDialog.cc
26 *
27 * Implementation of AddWatchDialog class.
28 *
29 * @author Veli-Pekka Jääskeläinen 2005 (vjaaskel-no.spam-cs.tut.fi)
30 * @note rating: red
31 */
32
33#include <string>
34#include <vector>
35#include <wx/statline.h>
36#include <wx/spinctrl.h>
37#include "AddWatchDialog.hh"
38#include "ProximToolbox.hh"
39#include "Machine.hh"
40#include "RegisterFile.hh"
41#include "FunctionUnit.hh"
42#include "Port.hh"
43#include "AddressSpace.hh"
44#include "WxConversion.hh"
45#include "ErrorDialog.hh"
46#include "ProximLineReader.hh"
47#include "SimulatorFrontend.hh"
49#include "ProximConstants.hh"
50#include "ExpressionScript.hh"
51#include "TclConditionScript.hh"
52#include "Conversion.hh"
53
54using namespace TTAMachine;
55using std::string;
56using std::vector;
57
58BEGIN_EVENT_TABLE(AddWatchDialog, wxDialog)
59 EVT_CHOICE(ID_FU_CHOICE, AddWatchDialog::onFUChoice)
60 EVT_CHOICE(ID_RF_CHOICE, AddWatchDialog::onRFChoice)
61 EVT_CHOICE(ID_ADDRESS_SPACE, AddWatchDialog::onASChoice)
62
63 EVT_RADIOBUTTON(ID_RB_MEMORY, AddWatchDialog::onWatchTypeChange)
64 EVT_RADIOBUTTON(ID_RB_REGISTER, AddWatchDialog::onWatchTypeChange)
65 EVT_RADIOBUTTON(ID_RB_PORT, AddWatchDialog::onWatchTypeChange)
66 EVT_RADIOBUTTON(ID_RB_BUS, AddWatchDialog::onWatchTypeChange)
67 EVT_RADIOBUTTON(ID_RB_EXPRESSION, AddWatchDialog::onWatchTypeChange)
68
71
72/**
73 * The Constructor.
74 *
75 * @param parent Parent window of the dialog.
76 * @param id Dialog identifier.
77 * @param watch Watch point to edit, or NULL to create a new watch point.
78 */
80 wxWindow* parent, wxWindowID id, Watch* /*watch*/) :
81 wxDialog(parent, id, _T("Watch point"), wxDefaultPosition) {
82
83 createContents(this, true, true);
84
85 // Initialize widget pointers.
86 asChoice_ = dynamic_cast<wxChoice*>(FindWindow(ID_ADDRESS_SPACE));
87 rfChoice_ = dynamic_cast<wxChoice*>(FindWindow(ID_RF_CHOICE));
88 indexChoice_ = dynamic_cast<wxChoice*>(FindWindow(ID_INDEX_CHOICE));
89 fuChoice_ = dynamic_cast<wxChoice*>(FindWindow(ID_FU_CHOICE));
90 portChoice_ = dynamic_cast<wxChoice*>(FindWindow(ID_PORT_CHOICE));
91 busChoice_ = dynamic_cast<wxChoice*>(FindWindow(ID_BUS_CHOICE));
92
93 endAddressCtrl_ = dynamic_cast<wxSpinCtrl*>(FindWindow(ID_END_ADDRESS));
94 startAddressCtrl_ =
95 dynamic_cast<wxSpinCtrl*>(FindWindow(ID_START_ADDRESS));
96
97 initialize();
98}
99
100
101/**
102 * The Destructor.
103 */
106
107/**
108 * Initializes the dialog choicer items.
109 */
110void
112
114
115 // Address space choicer.
116 const Machine::AddressSpaceNavigator asNavigator =
118 for (int i = 0; i < asNavigator.count(); i++) {
119 string asName = asNavigator.item(i)->name();
120 asChoice_->Append(WxConversion::toWxString(asName));
121 }
122
123 // Register file choicer.
124 const Machine::RegisterFileNavigator rfNavigator =
126 for (int i = 0; i < rfNavigator.count(); i++) {
127 string rfName = rfNavigator.item(i)->name();
128 rfChoice_->Append(WxConversion::toWxString(rfName));
129 }
130
131 // Function unit choicer.
132 const Machine::FunctionUnitNavigator fuNavigator =
134 for (int i = 0; i < fuNavigator.count(); i++) {
135 string fuName = fuNavigator.item(i)->name();
136 fuChoice_->Append(WxConversion::toWxString(fuName));
137 }
138
139 // Bus choicer.
140 const Machine::BusNavigator busNavigator = machine.busNavigator();
141 for (int i = 0; i < busNavigator.count(); i++) {
142 string busName = busNavigator.item(i)->name();
143 busChoice_->Append(WxConversion::toWxString(busName));
144 }
145
146 wxCommandEvent dummy;
147 dummy.SetId(ID_RB_PORT);
149}
150
151/**
152 * Disables and enables dialog widgets when the watch type selection changes.
153 *
154 * @param event Radio-button event of the watch type changing.
155 */
156void
157AddWatchDialog::onWatchTypeChange(wxCommandEvent& event) {
158
159 // Disable all watch type specific widgets.
160 FindWindow(ID_LABEL_AS)->Disable();
161 FindWindow(ID_LABEL_UNIT)->Disable();
162 FindWindow(ID_LABEL_PORT)->Disable();
163 FindWindow(ID_LABEL_RF)->Disable();
164 FindWindow(ID_LABEL_BUS)->Disable();
167 FindWindow(ID_LABEL_INDEX)->Disable();
168 FindWindow(ID_START_ADDRESS)->Disable();
169 FindWindow(ID_END_ADDRESS)->Disable();
170 FindWindow(ID_BUS_CHOICE)->Disable();
171 FindWindow(ID_RF_CHOICE)->Disable();
172 FindWindow(ID_FU_CHOICE)->Disable();
173 FindWindow(ID_PORT_CHOICE)->Disable();
174 FindWindow(ID_INDEX_CHOICE)->Disable();
175 FindWindow(ID_EXPRESSION)->Disable();
176 FindWindow(ID_ADDRESS_SPACE)->Disable();
177
178 // Enable widgets associated to the selected watch type.
179
180 if (event.GetId() == ID_RB_MEMORY) {
181 FindWindow(ID_LABEL_AS)->Enable();
184 FindWindow(ID_START_ADDRESS)->Enable();
185 FindWindow(ID_END_ADDRESS)->Enable();
186 }
187 if (event.GetId() == ID_RB_PORT) {
188 FindWindow(ID_LABEL_UNIT)->Enable();
189 FindWindow(ID_LABEL_PORT)->Enable();
190 FindWindow(ID_FU_CHOICE)->Enable();
191 FindWindow(ID_PORT_CHOICE)->Enable();
192 }
193 if (event.GetId() == ID_RB_REGISTER) {
194 FindWindow(ID_LABEL_RF)->Enable();
195 FindWindow(ID_LABEL_INDEX)->Enable();
196 FindWindow(ID_RF_CHOICE)->Enable();
197 FindWindow(ID_INDEX_CHOICE)->Enable();
198 }
199 if (event.GetId() == ID_RB_BUS) {
200 FindWindow(ID_LABEL_BUS)->Enable();
201 FindWindow(ID_BUS_CHOICE)->Enable();
202 }
203 if (event.GetId() == ID_RB_EXPRESSION) {
204 FindWindow(ID_EXPRESSION)->Enable();
205 }
206}
207
208/**
209 * Sets the function unit port choicer items when the function unit selection
210 * changes.
211 */
212void
214
215 string fuName =
216 WxConversion::toString(fuChoice_->GetStringSelection());
217
218 const Machine::FunctionUnitNavigator fuNavigator =
220
221 FunctionUnit* fu = fuNavigator.item(fuName);
222
223 assert(fu != NULL);
224
225 // Set the port choicer to contain an item for each of the selected
226 // function unit's ports.
227 portChoice_->Clear();
228 for (int i = 0; i < fu->portCount(); i++) {
229 string portName = fu->port(i)->name();
230 portChoice_->Append(WxConversion::toWxString(portName));
231 }
232 portChoice_->SetSelection(0);
233}
234
235/**
236 * Sets the register index choicer items when the register file selection
237 * changes.
238 */
239void
241
242 string rfName =
243 WxConversion::toString(rfChoice_->GetStringSelection());
244
245 const Machine::RegisterFileNavigator rfNavigator =
247
248 RegisterFile* rf = rfNavigator.item(rfName);
249
250 assert(rf != NULL);
251
252 // Set the index choicer to contain an item for each of the selected
253 // register file's indexes.
254 indexChoice_->Clear();
255 for (int i = 0; i < rf->numberOfRegisters(); i++) {
257 }
258 indexChoice_->SetSelection(0);
259}
260
261/**
262 * Event handler for the address space choicer.
263 *
264 * Sets the minimum and maximum start/end address values of the memory
265 * watch spin-buttons when the address space selection is changed.
266 */
267void
269
270 string asName =
271 WxConversion::toString(asChoice_->GetStringSelection());
272
273 const Machine::AddressSpaceNavigator asNavigator =
275
276 AddressSpace* as = asNavigator.item(asName);
277
278 assert(as != NULL);
279
280 startAddressCtrl_->SetRange(as->start(), as->end());
281 endAddressCtrl_->SetRange(as->start(), as->end());
282
283 startAddressCtrl_->SetValue(as->start());
284 endAddressCtrl_->SetValue(as->end());
285}
286
287/**
288 * Event handler for the dialog OK-button.
289 */
290void
291AddWatchDialog::onOK(wxCommandEvent&) {
292 string expression;
293
294
295 // Memory watch.
296 if (dynamic_cast<wxRadioButton*>(FindWindow(ID_RB_MEMORY))->GetValue()) {
297
298 string asName =
299 WxConversion::toString(asChoice_->GetStringSelection());
300
301 unsigned start = startAddressCtrl_->GetValue();
302 unsigned end = endAddressCtrl_->GetValue();
303 int count = end - start + 1;
304
305 string startStr = Conversion::toString(start);
306 string countStr = Conversion::toString(count);
307
308 if (asName == "") {
309 wxString message = _T("Invalid address space.");
310 ErrorDialog error(this, message);
311 error.ShowModal();
312 return;
313 }
314 if (count < 1) {
315 wxString message = _T("The memory watch end address must be\n");
316 message.Append(_T("greater than the start address."));
317 ErrorDialog error(this, message);
318 error.ShowModal();
319 return;
320 }
321
322 expression = "x " " /a " + asName + " /n " + countStr + " " + startStr;
323 }
324
325 // Port Watch.
326 if (dynamic_cast<wxRadioButton*>(FindWindow(ID_RB_PORT))->GetValue()) {
327
328 string fuName =
329 WxConversion::toString(fuChoice_->GetStringSelection());
330 string portName =
331 WxConversion::toString(portChoice_->GetStringSelection());
332 if (fuName == "" || portName == "") {
333 wxString message = _T("Invalid port.");
334 ErrorDialog error(this, message);
335 error.ShowModal();
336 return;
337 }
338 expression = "info ports " + fuName + " " + portName;
339 }
340
341 // Register watch.
342 if (dynamic_cast<wxRadioButton*>(FindWindow(ID_RB_REGISTER))->GetValue()) {
343
344 string rfName =
345 WxConversion::toString(rfChoice_->GetStringSelection());
346 string index = Conversion::toString(indexChoice_->GetSelection());
347
348 if (rfName == "") {
349 wxString message = _T("Invalid register.");
350 ErrorDialog error(this, message);
351 error.ShowModal();
352 return;
353 }
354 expression = "info registers " + rfName + " " + index;
355 }
356
357 // Bus watch.
358 if (dynamic_cast<wxRadioButton*>(FindWindow(ID_RB_BUS))->GetValue()) {
359
360 string busName =
361 WxConversion::toString(busChoice_->GetStringSelection());
362
363 if (busName == "") {
364 wxString message = _T("Invalid bus.");
365 ErrorDialog error(this, message);
366 error.ShowModal();
367 return;
368 }
369 expression = "info segments " + busName;
370 }
371
372 // User defined expression watch.
373 bool expressionWatch =
374 dynamic_cast<wxRadioButton*>(FindWindow(ID_RB_EXPRESSION))->GetValue();
375 if (expressionWatch) {
376 wxTextCtrl* expressionCtrl =
377 dynamic_cast<wxTextCtrl*>(FindWindow(ID_EXPRESSION));
378
379 expression = WxConversion::toString(
380 expressionCtrl->GetValue().Trim(true).Trim(false));
381 }
382
383 if (expression == "") {
384 wxString message = _T("No expression defined for the watch");
385 ErrorDialog error(this, message);
386 error.ShowModal();
387 return;
388 }
389
390 // Test expression script.
391 if (!ProximToolbox::testExpression(this, expression)) {
392 // Invalid expression, error dialog is displayed by the toolbox.
393 return;
394 }
395
398 lineReader.input(expression);
399
400 EndModal(wxID_OK);
401}
402
403
404/**
405 * Creates the dialog widgets.
406 *
407 * Code generated by wxDesigner. Do not modify manually.
408 *
409 * @param parent Parent window for the dialog widgets.
410 * @param call_fit If true, the dialog is resized to fit the widgets.
411 * @param set_sizer If true, the created widgets are set as the dialog
412 * contents.
413 */
414wxSizer*
415AddWatchDialog::createContents(wxWindow *parent, bool call_fit, bool set_sizer) {
416
417 wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );
418
419 wxBoxSizer *item1 = new wxBoxSizer( wxVERTICAL );
420
421 wxBoxSizer *item2 = new wxBoxSizer( wxHORIZONTAL );
422
423 wxRadioButton *item3 = new wxRadioButton( parent, ID_RB_PORT, wxT("Port watch"), wxDefaultPosition, wxDefaultSize, 0 );
424 item2->Add( item3, 0, wxALL, 5 );
425
426 wxBoxSizer *item4 = new wxBoxSizer( wxHORIZONTAL );
427
428 item4->Add( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
429
430 wxStaticText *item5 = new wxStaticText( parent, ID_LABEL_UNIT, wxT("Unit:"), wxDefaultPosition, wxDefaultSize, 0 );
431 item4->Add( item5, 0, wxALIGN_CENTER|wxALL, 5 );
432
433 wxString *strs6 = (wxString*) NULL;
434 wxChoice *item6 = new wxChoice( parent, ID_FU_CHOICE, wxDefaultPosition, wxSize(100,-1), 0, strs6, 0 );
435 item4->Add( item6, 0, wxALIGN_CENTER|wxALL, 5 );
436
437 wxStaticText *item7 = new wxStaticText( parent, ID_LABEL_PORT, wxT("Port:"), wxDefaultPosition, wxDefaultSize, 0 );
438 item4->Add( item7, 0, wxALIGN_CENTER|wxALL, 5 );
439
440 wxString *strs8 = (wxString*) NULL;
441 wxChoice *item8 = new wxChoice( parent, ID_PORT_CHOICE, wxDefaultPosition, wxSize(100,-1), 0, strs8, 0 );
442 item4->Add( item8, 0, wxALIGN_CENTER|wxALL, 5 );
443
444 item2->Add( item4, 0, wxALIGN_CENTER|wxALL, 5 );
445
446 item1->Add( item2, 0, wxALL, 5 );
447
448 wxBoxSizer *item9 = new wxBoxSizer( wxHORIZONTAL );
449
450 wxRadioButton *item10 = new wxRadioButton( parent, ID_RB_REGISTER, wxT("Register watch"), wxDefaultPosition, wxDefaultSize, 0 );
451 item9->Add( item10, 0, wxALL, 5 );
452
453 wxBoxSizer *item11 = new wxBoxSizer( wxHORIZONTAL );
454
455 item11->Add( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
456
457 wxStaticText *item12 = new wxStaticText( parent, ID_LABEL_RF, wxT("Register file:"), wxDefaultPosition, wxDefaultSize, 0 );
458 item11->Add( item12, 0, wxALIGN_CENTER|wxALL, 5 );
459
460 wxString *strs13 = (wxString*) NULL;
461 wxChoice *item13 = new wxChoice( parent, ID_RF_CHOICE, wxDefaultPosition, wxSize(100,-1), 0, strs13, 0 );
462 item11->Add( item13, 0, wxALIGN_CENTER|wxALL, 5 );
463
464 wxStaticText *item14 = new wxStaticText( parent, ID_LABEL_INDEX, wxT("Index:"), wxDefaultPosition, wxDefaultSize, 0 );
465 item11->Add( item14, 0, wxALIGN_CENTER|wxALL, 5 );
466
467 wxString *strs15 = (wxString*) NULL;
468 wxChoice *item15 = new wxChoice( parent, ID_INDEX_CHOICE, wxDefaultPosition, wxSize(100,-1), 0, strs15, 0 );
469 item11->Add( item15, 0, wxALIGN_CENTER|wxALL, 5 );
470
471 item9->Add( item11, 0, wxALIGN_CENTER|wxALL, 5 );
472
473 item1->Add( item9, 0, wxALL, 5 );
474
475 wxBoxSizer *item16 = new wxBoxSizer( wxHORIZONTAL );
476
477 wxRadioButton *item17 = new wxRadioButton( parent, ID_RB_BUS, wxT("Bus watch"), wxDefaultPosition, wxDefaultSize, 0 );
478 item16->Add( item17, 0, wxALL, 5 );
479
480 wxBoxSizer *item18 = new wxBoxSizer( wxHORIZONTAL );
481
482 item18->Add( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
483
484 wxStaticText *item19 = new wxStaticText( parent, ID_LABEL_BUS, wxT("Bus:"), wxDefaultPosition, wxDefaultSize, 0 );
485 item18->Add( item19, 0, wxALIGN_CENTER|wxALL, 5 );
486
487 wxString *strs20 = (wxString*) NULL;
488 wxChoice *item20 = new wxChoice( parent, ID_BUS_CHOICE, wxDefaultPosition, wxSize(100,-1), 0, strs20, 0 );
489 item18->Add( item20, 0, wxALIGN_CENTER|wxALL, 5 );
490
491 item16->Add( item18, 0, wxALIGN_CENTER|wxALL, 5 );
492
493 item1->Add( item16, 0, wxALL, 5 );
494
495 wxBoxSizer *item21 = new wxBoxSizer( wxVERTICAL );
496
497 wxRadioButton *item22 = new wxRadioButton( parent, ID_RB_MEMORY, wxT("Memory watch"), wxDefaultPosition, wxDefaultSize, 0 );
498 item21->Add( item22, 0, wxALL, 5 );
499
500 wxBoxSizer *item23 = new wxBoxSizer( wxHORIZONTAL );
501
502 item23->Add( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
503
504 wxStaticText *item24 = new wxStaticText( parent, ID_LABEL_AS, wxT("Address space:"), wxDefaultPosition, wxDefaultSize, 0 );
505 item23->Add( item24, 0, wxALIGN_CENTER|wxALL, 5 );
506
507 wxString *strs25 = (wxString*) NULL;
508 wxChoice *item25 = new wxChoice( parent, ID_ADDRESS_SPACE, wxDefaultPosition, wxSize(100,-1), 0, strs25, 0 );
509 item23->Add( item25, 0, wxALIGN_CENTER|wxALL, 5 );
510
511 wxStaticText *item26 = new wxStaticText( parent, ID_LABEL_START_ADDRESS, wxT("Start address:"), wxDefaultPosition, wxDefaultSize, 0 );
512 item23->Add( item26, 0, wxALIGN_CENTER|wxALL, 5 );
513
514 wxSpinCtrl *item27 = new wxSpinCtrl( parent, ID_START_ADDRESS, wxT("0"), wxDefaultPosition, wxSize(-1,-1), 0, 0, 100, 0 );
515 item23->Add( item27, 0, wxALIGN_CENTER|wxALL, 5 );
516
517 wxStaticText *item28 = new wxStaticText( parent, ID_LABEL_END_ADDRESS, wxT("End address:"), wxDefaultPosition, wxDefaultSize, 0 );
518 item23->Add( item28, 0, wxALIGN_CENTER|wxALL, 5 );
519
520 wxSpinCtrl *item29 = new wxSpinCtrl( parent, ID_END_ADDRESS, wxT("0"), wxDefaultPosition, wxSize(-1,-1), 0, 0, 100, 0 );
521 item23->Add( item29, 0, wxALIGN_CENTER|wxALL, 5 );
522
523 item21->Add( item23, 0, wxALIGN_CENTER|wxALL, 5 );
524
525 item1->Add( item21, 0, wxALL, 5 );
526
527 wxBoxSizer *item30 = new wxBoxSizer( wxHORIZONTAL );
528
529 wxRadioButton *item31 = new wxRadioButton( parent, ID_RB_EXPRESSION, wxT("Experession:"), wxDefaultPosition, wxDefaultSize, 0 );
530 item30->Add( item31, 0, wxALL, 5 );
531
532 wxTextCtrl *item32 = new wxTextCtrl( parent, ID_EXPRESSION, wxT(""), wxDefaultPosition, wxSize(500,-1), 0 );
533 item30->Add( item32, 0, wxALIGN_CENTER|wxALL, 5 );
534
535 item1->Add( item30, 0, wxGROW|wxALL, 5 );
536
537 item0->Add( item1, 0, wxGROW|wxALL, 5 );
538
539 wxBoxSizer *item33 = new wxBoxSizer( wxVERTICAL );
540
541 wxStaticLine *item34 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
542 item33->Add( item34, 0, wxGROW|wxALL, 5 );
543
544 wxBoxSizer *item35 = new wxBoxSizer( wxHORIZONTAL );
545
546 wxButton *item36 = new wxButton( parent, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
547 item35->Add( item36, 0, wxALIGN_CENTER|wxALL, 5 );
548
549 wxButton *item37 = new wxButton( parent, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
550 item35->Add( item37, 0, wxALIGN_CENTER|wxALL, 5 );
551
552 item33->Add( item35, 0, wxALL, 5 );
553
554 item0->Add( item33, 0, wxGROW|wxALL, 5 );
555
556 if (set_sizer)
557 {
558 parent->SetSizer( item0 );
559 if (call_fit)
560 item0->SetSizeHints( parent );
561 }
562
563 return item0;
564}
#define assert(condition)
END_EVENT_TABLE() using namespace IDF
TTAMachine::Machine * machine
the architecture definition of the estimated processor
EVT_BUTTON(ID_EDIT_ARCH_PORT, FUImplementationDialog::onEditArchitecturePort) EVT_BUTTON(ID_ADD_EXTERNAL_PORT
SimValue dummy(32)
a dummy simvalue which is given for operands that are not bound
wxSpinCtrl * endAddressCtrl_
End adderss widget for memory watch.
wxChoice * fuChoice_
Function unit choicer for port watch.
wxChoice * asChoice_
Address space choicer for memory watch.
void onASChoice(wxCommandEvent &event)
virtual ~AddWatchDialog()
void onOK(wxCommandEvent &event)
wxChoice * portChoice_
Port choicer for port watch.
void onWatchTypeChange(wxCommandEvent &event)
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
wxSpinCtrl * startAddressCtrl_
Start address widget for memory watch.
void onRFChoice(wxCommandEvent &event)
void onFUChoice(wxCommandEvent &event)
wxChoice * rfChoice_
Register file choicer for register watch.
wxChoice * indexChoice_
Register index choicer for register watch.
wxChoice * busChoice_
Bus choicer for bus watch.
static std::string toString(const T &source)
static const std::string SCL_ADD_WATCH
Command for adding watches in the simulator control language.
void input(std::string command)
static const TTAMachine::Machine & machine()
static bool testExpression(wxWindow *parent, const std::string &expression)
static ProximLineReader & lineReader()
virtual ULongWord end() const
virtual ULongWord start() const
virtual int numberOfRegisters() const
virtual BaseFUPort * port(const std::string &name) const
ComponentType * item(int index) const
virtual RegisterFileNavigator registerFileNavigator() const
Definition Machine.cc:450
virtual FunctionUnitNavigator functionUnitNavigator() const
Definition Machine.cc:380
virtual BusNavigator busNavigator() const
Definition Machine.cc:356
virtual AddressSpaceNavigator addressSpaceNavigator() const
Definition Machine.cc:392
virtual std::string name() const
Definition Port.cc:141
virtual int portCount() const
Definition Unit.cc:135
Definition Watch.hh:48
static wxString toWxString(const std::string &source)
static std::string toString(const wxString &source)