OpenASIP  2.0
AddressSpaceDialog.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 AddressSpaceDialog.cc
26  *
27  * Definition of AddressSpaceDialog class.
28  *
29  * @author Veli-Pekka Jääskeläinen 2004 (vjaaskel-no.spam-cs.tut.fi)
30  * @note rating: red
31  */
32 
33 #include <string>
34 #include <wx/statline.h>
35 #include <wx/valgen.h>
36 #include <wx/spinctrl.h>
37 #include <boost/format.hpp>
38 
39 #include "MathTools.hh"
40 #include "AddressSpaceDialog.hh"
41 #include "Conversion.hh"
42 #include "WxConversion.hh"
43 #include "WarningDialog.hh"
44 #include "Machine.hh"
45 #include "AddressSpace.hh"
46 #include "ModelConstants.hh"
47 #include "NumberControl.hh"
48 #include "InformationDialog.hh"
49 #include "MachineTester.hh"
50 #include "GUITextGenerator.hh"
51 #include "WidgetTools.hh"
52 #include "ProDeTextGenerator.hh"
53 
54 using boost::format;
55 using std::string;
56 using namespace TTAMachine;
57 
58 BEGIN_EVENT_TABLE(AddressSpaceDialog, wxDialog)
59  EVT_TEXT(ID_NAME, AddressSpaceDialog::onName)
61  EVT_TEXT(ID_MIN_ADDRESS, AddressSpaceDialog::onMinAddress)
62  EVT_TEXT(ID_MAX_ADDRESS, AddressSpaceDialog::onMaxAddress)
63  EVT_TEXT(ID_BIT_WIDTH, AddressSpaceDialog::onBitWidthText)
64  EVT_SPINCTRL(ID_BIT_WIDTH, AddressSpaceDialog::onBitWidth)
65 
68  EVT_SPINCTRL(ID_SPIN_ID, AddressSpaceDialog::onSpinId)
69  EVT_LIST_ITEM_FOCUSED(ID_ID_LIST, AddressSpaceDialog::onIdListSelection)
70  EVT_LIST_DELETE_ITEM(ID_ID_LIST, AddressSpaceDialog::onIdListSelection)
74 
75 
76 /**
77  * The Constructor.
78  *
79  * @param parent Parent window of the dialog.
80  * @param addressSpace The address space to be modified with the dialog.
81  */
83  wxWindow* parent,
85  AddressSpace* addressSpace):
86  wxDialog(parent, -1, _T(""), wxDefaultPosition),
87  machine_(machine),
88  as_(addressSpace),
89  name_(_T("")),
91  nameSizer_(NULL),
92  minAddressSizer_(NULL),
93  maxAddressSizer_(NULL),
94  widthSizer_(NULL) {
95 
96  createContents(this, true, true);
97 
98  // disable conditional buttons initially
99  FindWindow(wxID_OK)->Disable();
100  FindWindow(ID_DELETE_ID)->Disable();
101 
102  // set validators for dialog controls
103  FindWindow(ID_NAME)->SetValidator(
104  wxTextValidator(wxFILTER_ASCII, &name_));
105  FindWindow(ID_WIDTH)->SetValidator(
106  wxGenericValidator(&width_));
107 
108  // set min and max adress spin button ranges
109  minControl_ = dynamic_cast<NumberControl*>(FindWindow(ID_MIN_ADDRESS));
110  maxControl_ = dynamic_cast<NumberControl*>(FindWindow(ID_MAX_ADDRESS));
111 
112  bitWidthSpinCtrl_ = dynamic_cast<wxSpinCtrl*>(FindWindow(ID_BIT_WIDTH));
113 
114  // set widget texts
115  setTexts();
116 
117  TransferDataToWindow();
118 
119  FindWindow(ID_NAME)->SetFocus();
120 }
121 
122 
123 /**
124  * The Destructor.
125  */
127 }
128 
129 
130 /**
131  * Sets texts for widgets.
132  */
133 void
137 
138  // Dialog title
139  format fmt = prodeTexts->text(
141  SetTitle(WxConversion::toWxString(fmt.str()));
142 
143  // buttons
144  WidgetTools::setLabel(generator, FindWindow(wxID_OK),
146 
147  WidgetTools::setLabel(generator, FindWindow(wxID_CANCEL),
149 
150  WidgetTools::setLabel(generator, FindWindow(ID_HELP),
152 
153  WidgetTools::setLabel(generator, FindWindow(ID_ADD_ID),
155 
156  WidgetTools::setLabel(generator, FindWindow(ID_DELETE_ID),
158 
159  // box sizer label
160  fmt = prodeTexts->text(ProDeTextGenerator::TXT_LABEL_NAME);
161  WidgetTools::setWidgetLabel(nameSizer_, fmt.str());
162 
163  fmt = prodeTexts->text(ProDeTextGenerator::TXT_LABEL_MAU);
164  WidgetTools::setWidgetLabel(widthSizer_, fmt.str());
165 
167  WidgetTools::setWidgetLabel(minAddressSizer_, fmt.str());
168 
170  WidgetTools::setWidgetLabel(maxAddressSizer_, fmt.str());
171 }
172 
173 
174 /**
175  * Transfers data from the AddressSpace object to the dialog widgets.
176  *
177  * @return false, if an error occured in the transfer, true otherwise.
178  */
179 bool
181 
182  name_ = WxConversion::toWxString(as_->name());
183  width_ = as_->width();
184 
185  minControl_->setValue(as_->start());
186  maxControl_->setValue(as_->end());
187  //minControl_->setRange(0, as_->end() - 1);
188  //maxControl_->setRange(as_->start() + 1, 0xFFFFFFFF);
189 
190  idNumbers_ = as_->numericalIds();
191  updateIdLists();
192 
193  // wxWidgets GTK1 version seems to bug with spincontrol validators.
194  // The widget value has to be set manually.
195  dynamic_cast<wxSpinCtrl*>(FindWindow(ID_WIDTH))->SetValue(width_);
196 
197  wxCommandEvent dummy;
198  onMaxAddress(dummy);
199  onMinAddress(dummy);
200 
201  wxSpinEvent dummySpin;
202  onSpinId(dummySpin);
203 
204  return wxWindow::TransferDataToWindow();
205 }
206 
207 /**
208  * Updates the id lists.
209  */
210 void
212  assert (idListCtrl_ != NULL);
213  idListCtrl_->DeleteAllItems();
214 
215  for (std::set<unsigned>::iterator it = idNumbers_.begin();
216  it != idNumbers_.end(); ++it) {
217  idListCtrl_->InsertItem(
218  static_cast<long>(*it), WxConversion::toWxString(*it));
219  }
220 }
221 
222 /**
223  * Validates input in the controls, and updates the AddressSpace.
224  */
225 void
226 AddressSpaceDialog::onOK(wxCommandEvent&) {
227 
228  if (!Validate()) {
229  return;
230  }
231 
232  if (!TransferDataFromWindow()) {
233  return;
234  }
235 
236  string trimmedName =
237  WxConversion::toString(name_.Trim(false).Trim(true));
238 
239  // Check the name validity.
240  if (!MachineTester::isValidComponentName(trimmedName)) {
242  format message =
244  InformationDialog warning(
245  this, WxConversion::toWxString(message.str()));
246  warning.ShowModal();
247  return;
248  }
249 
250  if (trimmedName != as_->name()) {
251 
252  // Check that the new address space name is unique among
253  // all address spaces in the machine.
255  as_->machine()->addressSpaceNavigator();
256  for (int i = 0; i < navigator.count(); i++) {
257  string asName = navigator.item(i)->name();
258  if (trimmedName == asName) {
259  ProDeTextGenerator* prodeTexts =
261  format message =
263  format an_as = prodeTexts->text(
265  format machine =
267  format as =
269  message % trimmedName % an_as.str() % machine.str() % as.str();
270  WarningDialog warning(
271  this, WxConversion::toWxString(message.str()));
272  warning.ShowModal();
273  return;
274  }
275  }
276  }
277 
278  as_->setName(trimmedName);
279  as_->setWidth(width_);
280  unsigned int minAddr = minControl_->unsignedValue();
281  unsigned int maxAddr = maxControl_->unsignedValue();
282  as_->setAddressBounds(minAddr, maxAddr);
283 
284  if (!as_->setNumericalIds(idNumbers_)) {
286  format message =
288  InformationDialog dialog(
289  this, WxConversion::toWxString(message.str()));
290  dialog.ShowModal();
291  }
292 
293  EndModal(wxID_OK);
294 }
295 
296 
297 /**
298  * Checks whether the name field is empty, and disables OK button of the
299  * dialog if it is.
300  */
301 void
302 AddressSpaceDialog::onName(wxCommandEvent&) {
303  if (!TransferDataFromWindow()) {
304  assert(false);
305  }
306  wxString trimmedName = name_.Trim(false).Trim(true);
307  if (trimmedName == _T("")) {
308  FindWindow(wxID_OK)->Disable();
309  } else {
310  FindWindow(wxID_OK)->Enable();
311  }
312 }
313 
314 
315 /**
316  * Sets the range of the MaxAddress spin-button.
317  */
318 void
320  if (minControl_->unsignedValue() >= maxControl_->unsignedValue()) {
321  minControl_->setValue(maxControl_->unsignedValue() - 1);
322  }
323 }
324 
325 
326 /**
327  * Sets the range of the MaxAddress spin-button.
328  */
329 void
331  if (maxControl_->unsignedValue() <= minControl_->unsignedValue()) {
332  maxControl_->setValue(minControl_->unsignedValue() + 1);
333  }
334  int bitWidth = MathTools::requiredBits(maxControl_->unsignedValue());
335  bitWidthSpinCtrl_->SetValue(bitWidth);
336 }
337 
338 /**
339  * Reads the range from bitWidth spin-button and updates min- and max ranges.
340  */
341 void
343  //wxSpinEvent dummy;
344  //onBitWidth(dummy);
345 }
346 
347 /**
348  * Reads the range from bitWidth spin-button and updates min- and max ranges.
349  */
350 void
352 
353  unsigned maxAddress = static_cast<unsigned>(
354  pow(2, bitWidthSpinCtrl_->GetValue()) - 1u);
355  maxControl_->setValue(maxAddress);
356 
357  wxCommandEvent dummy;
358  onMaxAddress(dummy);
359  onMinAddress(dummy);
360 }
361 
362 /**
363  * Adds a new id number for the address space.
364  */
365 void
366 AddressSpaceDialog::onAddId(wxCommandEvent& /*event*/) {
367  // current number in spin field
368  unsigned spinId = static_cast<unsigned>(idSpinCtrl_->GetValue());
369 
370  // existing entry found from some address space
371  if (!isFreeId(spinId)) {
372  return;
373  }
374 
375  // no conflict, make a new entry for the current value in the spin field
376  idNumbers_.insert(spinId);
377  updateIdLists();
378 
379  // disable add button for added id number
380  FindWindow(ID_ADD_ID)->Disable();
381 }
382 
383 /**
384  * Deletes selected id number(s) from the address space.
385  */
386 void
387 AddressSpaceDialog::onDeleteId(wxCommandEvent& /*event*/) {
388  long itemIndex = -1;
389 
390  // loop through all selected ids
391  for (int i = 0; i < idListCtrl_->GetSelectedItemCount(); ++i) {
392  itemIndex = idListCtrl_->GetNextItem(
393  itemIndex, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
394 
395  // get numerical value of the id and erase it from the address space
396  if (itemIndex >= 0) {
397  wxString idText = idListCtrl_->GetItemText(itemIndex);
398  long id;
399  if (idText.ToLong(&id)) {
400  idNumbers_.erase(id);
401  }
402  }
403  }
404 
405  updateIdLists();
406 
407  wxSpinEvent dummy1;
408  onSpinId(dummy1);
409  wxListEvent dummy2;
410  onIdListSelection(dummy2);
411 }
412 
413 /**
414  * Sets state of add button depending on whether the number in spin input
415  * already exists in some address space
416  */
417 void
418 AddressSpaceDialog::onSpinId(wxSpinEvent& /*event*/) {
419  // current number in spin field
420  unsigned spinId = static_cast<unsigned>(idSpinCtrl_->GetValue());
421 
422  // no conflict found, enable add button
423  if (isFreeId(spinId)) {
424  FindWindow(ID_ADD_ID)->Enable();
425  return;
426  }
427 
428  // the number is already reserved, disable add button
429  FindWindow(ID_ADD_ID)->Disable();
430 }
431 
432 /**
433  * Sets state of delete button depending on whether items are selected
434  */
435 void
436 AddressSpaceDialog::onIdListSelection(wxListEvent& /*event*/) {
437  if (idListCtrl_->GetSelectedItemCount() < 1) {
438  FindWindow(ID_DELETE_ID)->Disable();
439  } else {
440  FindWindow(ID_DELETE_ID)->Enable();
441  }
442 }
443 
444 /**
445  * Checks if given id is already reserved by some address space
446  *
447  * @param id Number that should be checked against reserved ids
448  */
449 bool
450 AddressSpaceDialog::isFreeId(unsigned id) const {
451  assert (machine_ != NULL);
452  std::set<unsigned>::iterator it;
453 
454  // check id numbers reserved by this address space
455  it = idNumbers_.find(id);
456  if (it != idNumbers_.end()) {
457  return false;
458  }
459 
460  Machine::AddressSpaceNavigator asNavigator =
461  machine_->addressSpaceNavigator();
462 
463  // check other address spaces
464  for (int i = 0; i < asNavigator.count(); i++) {
465  AddressSpace* as = asNavigator.item(i);
466 
467  // ignore address space owned by this because data might be old
468  if (as != as_) {
469  std::set<unsigned> ids = as->numericalIds();
470  it = ids.find(id);
471  if (it != ids.end()) {
472  return false;
473  }
474  }
475  }
476 
477  // the id is free
478  return true;
479 }
480 
481 
482 /**
483  * Creates the dialog window contents.
484  *
485  * This method was generated with wxDesigner, thus the ugly code and
486  * too long lines.
487  *
488  * @return Main sizer of the created contents.
489  * @param parent The dialog window.
490  * @param call_fit If true, fits the contents inside the dialog.
491  * @param set_sizer If true, sets the main sizer as dialog contents.
492  */
493 wxSizer*
495  wxWindow *parent, bool call_fit, bool set_sizer) {
496 
497  wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );
498 
499  wxFlexGridSizer *item1 = new wxFlexGridSizer( 2, 0, 0 );
500 
501  wxStaticBox *item3 = new wxStaticBox( parent, -1, wxT("Name:") );
502  wxStaticBoxSizer *item2 = new wxStaticBoxSizer( item3, wxVERTICAL );
503  nameSizer_ = item2;
504 
505  wxTextCtrl *item4 = new wxTextCtrl(parent, ID_NAME, wxT(""), wxDefaultPosition, wxSize(160,-1), 0);
506  item2->Add( item4, 0, wxGROW|wxALL, 5 );
507 
508  item1->Add( item2, 0, wxGROW|wxALL, 5 );
509 
510  wxStaticBox *item6 = new wxStaticBox( parent, -1, wxT("Min-Address") );
511  wxStaticBoxSizer *item5 = new wxStaticBoxSizer( item6, wxVERTICAL );
512  minAddressSizer_ = item5;
513 
514  NumberControl* item7 = new NumberControl(parent, ID_MIN_ADDRESS, wxDefaultPosition, wxSize(180, -1), (NumberControl::MODE_UNSIGNED | NumberControl::MODE_HEXADECIMAL));
515  wxASSERT( item7 );
516  item5->Add( item7, 0, wxALIGN_CENTER|wxALL, 5 );
517 
518  item1->Add( item5, 0, wxGROW|wxALL, 5 );
519 
520  wxStaticBox *item9 = new wxStaticBox( parent, -1, wxT("Width:") );
521  wxStaticBoxSizer *item8 = new wxStaticBoxSizer( item9, wxVERTICAL );
522  widthSizer_ = item8;
523 
524  wxSpinCtrl *item10 = new wxSpinCtrl(parent, ID_WIDTH, wxT("1"), wxDefaultPosition, wxSize(-1,-1), 0, 1, 10000, 1, wxT("Spin"));
525  item8->Add( item10, 0, wxGROW|wxALL, 5 );
526 
527  item1->Add( item8, 0, wxGROW|wxALL, 5 );
528 
529  wxStaticBox *item12 = new wxStaticBox( parent, -1, wxT("Max-Address") );
530  wxStaticBoxSizer *item11 = new wxStaticBoxSizer( item12, wxVERTICAL );
531  maxAddressSizer_ = item11;
532 
533  NumberControl* item13 = new NumberControl(parent, ID_MAX_ADDRESS, wxDefaultPosition, wxSize(180, -1), (NumberControl::MODE_UNSIGNED | NumberControl::MODE_HEXADECIMAL));
534  wxASSERT( item13 );
535  item11->Add( item13, 0, wxALIGN_CENTER|wxALL, 5 );
536 
537  wxBoxSizer *bitSizer = new wxBoxSizer(wxHORIZONTAL);
538 
539  wxStaticText *bitText = new wxStaticText(parent, -1, wxT("Bits:"));
540  bitSizer->Add( bitText, 0, wxGROW|wxALL, 5 );
541 
542  wxSpinCtrl *bitWidth = new wxSpinCtrl( parent, ID_BIT_WIDTH, wxT("1"), wxDefaultPosition, wxSize(-1,-1), 0, 1, 10000, 1);
543  bitSizer->Add( bitWidth, 0, wxGROW|wxALL, 5 );
544 
545  item11->Add( bitSizer, 0, wxGROW|wxALL, 5 );
546 
547  item1->Add( item11, 0, wxGROW|wxALL, 5 );
548 
549  // address space id box
550  wxStaticBox *itemIdBox = new wxStaticBox(parent, -1, wxT("ID number:"));
551  wxStaticBoxSizer *itemIdSizer = new wxStaticBoxSizer(itemIdBox,
552  wxHORIZONTAL);
553  idSizer_ = itemIdSizer;
554 
555  wxListCtrl *itemIdListCtrl = new wxListCtrl( parent, ID_ID_LIST,
556  wxDefaultPosition,
557  wxSize(100,120),
558  wxLC_REPORT|wxSUNKEN_BORDER );
559  idSizer_->Add( itemIdListCtrl, 0, wxALIGN_CENTER|wxALL, 5 );
560  idListCtrl_ = itemIdListCtrl;
561  idListCtrl_->InsertColumn(0, _("ID"));
562 
563  wxBoxSizer *sizerOnRight = new wxBoxSizer(wxVERTICAL);
564 
565  wxSpinCtrl *itemIdSpinCtrl = new wxSpinCtrl( parent, ID_SPIN_ID, wxT("0"), wxDefaultPosition, wxSize(-1,-1), 0, 0, 2147483647, 1, wxT("Spin") );
566  sizerOnRight->Add( itemIdSpinCtrl, 0, wxGROW|wxALL, 5 );
567  idSpinCtrl_ = itemIdSpinCtrl;
568 
569  wxButton *addButton = new wxButton( parent, ID_ADD_ID, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
570  sizerOnRight->Add( addButton, 0, wxALIGN_CENTER|wxALL, 5 );
571 
572  wxButton *deleteButton = new wxButton( parent, ID_DELETE_ID, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
573  sizerOnRight->Add( deleteButton, 0, wxALIGN_CENTER|wxALL, 5 );
574 
575  idSizer_->Add( sizerOnRight, 0, wxALIGN_CENTER|wxALL, 5 );
576  item1->Add( idSizer_, 0, wxGROW|wxALL, 5 );
577 
578  assert (idSizer_ != NULL);
579  assert (idListCtrl_ != NULL);
580  assert (idSpinCtrl_ != NULL);
581  // end of address space id box
582 
583  item0->Add( item1, 0, wxALIGN_CENTER|wxALL, 5 );
584 
585  wxStaticLine *item14 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
586  item0->Add( item14, 0, wxGROW|wxALL, 5 );
587 
588  wxGridSizer *item15 = new wxGridSizer( 2, 0, 0 );
589 
590  wxButton *item16 = new wxButton( parent, ID_HELP, wxT("&Help"), wxDefaultPosition, wxDefaultSize, 0 );
591  item15->Add( item16, 0, wxALL, 5 );
592 
593  wxBoxSizer *item17 = new wxBoxSizer( wxHORIZONTAL );
594 
595  wxButton *item18 = new wxButton( parent, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
596  item17->Add( item18, 0, wxALIGN_CENTER, 5 );
597 
598  wxButton *item19 = new wxButton( parent, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
599  item17->Add( item19, 0, wxALIGN_CENTER|wxALL, 5 );
600 
601  item15->Add( item17, 0, wxALL, 5 );
602 
603  item0->Add( item15, 0, wxGROW, 5 );
604 
605  if (set_sizer)
606  {
607  parent->SetSizer( item0 );
608  if (call_fit)
609  item0->SetSizeHints( parent );
610  }
611 
612  return item0;
613 }
AddressSpaceDialog::onAddId
void onAddId(wxCommandEvent &event)
Definition: AddressSpaceDialog.cc:366
AddressSpaceDialog::onName
void onName(wxCommandEvent &event)
Definition: AddressSpaceDialog.cc:302
WarningDialog
Definition: WarningDialog.hh:42
ProDeTextGenerator::TXT_ADDRESS_SPACE_MIN_ADDRESS
@ TXT_ADDRESS_SPACE_MIN_ADDRESS
Label for Min-Address box.
Definition: ProDeTextGenerator.hh:207
AddressSpaceDialog::onDeleteId
void onDeleteId(wxCommandEvent &event)
Definition: AddressSpaceDialog.cc:387
WxConversion::toWxString
static wxString toWxString(const std::string &source)
AddressSpaceDialog::setTexts
void setTexts()
Definition: AddressSpaceDialog.cc:134
machine
TTAMachine::Machine * machine
the architecture definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:59
DEFAULT_WIDTH
const int DEFAULT_WIDTH
Default window width.
Definition: GUIOptionsSerializer.cc:98
TTAMachine::AddressSpace::numericalIds
std::set< unsigned > numericalIds() const
Definition: AddressSpace.cc:393
TTAMachine::AddressSpace
Definition: AddressSpace.hh:51
WidgetTools::setLabel
static void setLabel(Texts::TextGenerator *generator, wxWindow *widget, int textID)
Definition: WidgetTools.cc:92
GUITextGenerator::instance
static GUITextGenerator * instance()
Definition: GUITextGenerator.cc:67
AddressSpace.hh
ProDeTextGenerator::MSG_ERROR_ID_EXISTS
@ MSG_ERROR_ID_EXISTS
Error: Conflicting addr. space ID.
Definition: ProDeTextGenerator.hh:246
GUITextGenerator
Definition: GUITextGenerator.hh:46
GUITextGenerator::TXT_BUTTON_HELP
@ TXT_BUTTON_HELP
Label for help button.
Definition: GUITextGenerator.hh:60
ModelConstants
Definition: ModelConstants.hh:40
WidgetTools.hh
FindWindow
Definition: FindWindow.hh:49
TTAMachine::Machine::Navigator::count
int count() const
Texts::TextGenerator::text
virtual boost::format text(int textId)
Definition: TextGenerator.cc:94
ProDeTextGenerator::TXT_LABEL_MAU
@ TXT_LABEL_MAU
Label for min. addressable unit.
Definition: ProDeTextGenerator.hh:58
AddressSpaceDialog
Definition: AddressSpaceDialog.hh:50
ProDeTextGenerator.hh
AddressSpaceDialog::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition: AddressSpaceDialog.cc:494
ProDeTextGenerator
Definition: ProDeTextGenerator.hh:49
ProDeTextGenerator::MSG_ERROR_ILLEGAL_NAME
@ MSG_ERROR_ILLEGAL_NAME
Error: Illegal component name.
Definition: ProDeTextGenerator.hh:223
ProDeTextGenerator::MSG_ERROR_SAME_NAME
@ MSG_ERROR_SAME_NAME
Error: Same name exists.
Definition: ProDeTextGenerator.hh:229
assert
#define assert(condition)
Definition: Application.hh:86
AddressSpaceDialog::TransferDataToWindow
virtual bool TransferDataToWindow()
Definition: AddressSpaceDialog.cc:180
AddressSpaceDialog::updateIdLists
void updateIdLists()
Definition: AddressSpaceDialog.cc:211
AddressSpaceDialog::onOK
void onOK(wxCommandEvent &event)
Definition: AddressSpaceDialog.cc:226
GUITextGenerator::TXT_BUTTON_CANCEL
@ TXT_BUTTON_CANCEL
Label for cancel button.
Definition: GUITextGenerator.hh:55
AddressSpaceDialog::onSpinId
void onSpinId(wxSpinEvent &event)
Definition: AddressSpaceDialog.cc:418
WarningDialog.hh
ProDeTextGenerator::TXT_ADDRESS_SPACE_MAX_ADDRESS
@ TXT_ADDRESS_SPACE_MAX_ADDRESS
Label for Max-Address box.
Definition: ProDeTextGenerator.hh:208
NumberControl.hh
Conversion.hh
ProDeTextGenerator::COMP_ADDRESS_SPACE
@ COMP_ADDRESS_SPACE
Address space (w/o article).
Definition: ProDeTextGenerator.hh:279
ProDeTextGenerator::COMP_AN_ADDRESS_SPACE
@ COMP_AN_ADDRESS_SPACE
Address space (w/ article).
Definition: ProDeTextGenerator.hh:278
dummy
SimValue dummy(32)
a dummy simvalue which is given for operands that are not bound
InformationDialog.hh
AddressSpaceDialog.hh
ProDeTextGenerator::TXT_LABEL_NAME
@ TXT_LABEL_NAME
Label for component name widget.
Definition: ProDeTextGenerator.hh:56
MathTools::requiredBits
static int requiredBits(unsigned long int number)
ModelConstants.hh
AddressSpaceDialog::onMinAddress
void onMinAddress(wxCommandEvent &event)
Definition: AddressSpaceDialog.cc:319
Machine.hh
MachineTester::isValidComponentName
static bool isValidComponentName(const std::string &name)
Definition: MachineTester.cc:312
EVT_LIST_ITEM_SELECTED
FUImplementationDialog::onAddExternalPort FUImplementationDialog::onDeleteExternalPort FUImplementationDialog::onArchPortSelection FUImplementationDialog::onArchPortActivation EVT_LIST_ITEM_SELECTED(ID_EXTERNAL_PORT_LIST, FUImplementationDialog::onExternalPortSelection) EVT_LIST_ITEM_ACTIVATED(ID_EXTERNAL_PORT_LIST
AddressSpaceDialog::onBitWidthText
void onBitWidthText(wxCommandEvent &event)
Definition: AddressSpaceDialog.cc:342
AddressSpaceDialog::onIdListSelection
void onIdListSelection(wxListEvent &event)
Definition: AddressSpaceDialog.cc:436
GUITextGenerator::TXT_BUTTON_DELETE
@ TXT_BUTTON_DELETE
Label for delete button.
Definition: GUITextGenerator.hh:56
GUITextGenerator.hh
NumberControl::MODE_UNSIGNED
static const long MODE_UNSIGNED
Style flag for unsigned integer mode availability.
Definition: NumberControl.hh:98
MachineTester.hh
NumberControl::MODE_HEXADECIMAL
static const long MODE_HEXADECIMAL
Style flag for hexadecimal mode availability.
Definition: NumberControl.hh:100
ProDeTextGenerator::instance
static ProDeTextGenerator * instance()
Definition: ProDeTextGenerator.cc:382
EVT_LIST_ITEM_DESELECTED
FUImplementationDialog::onAddExternalPort FUImplementationDialog::onDeleteExternalPort FUImplementationDialog::onArchPortSelection EVT_LIST_ITEM_DESELECTED(ID_ARCH_PORT_LIST, FUImplementationDialog::onArchPortSelection) EVT_LIST_ITEM_ACTIVATED(ID_ARCH_PORT_LIST
EVT_BUTTON
EVT_BUTTON(ID_EDIT_ARCH_PORT, FUImplementationDialog::onEditArchitecturePort) EVT_BUTTON(ID_ADD_EXTERNAL_PORT
AddressSpaceDialog::isFreeId
bool isFreeId(unsigned id) const
Definition: AddressSpaceDialog.cc:450
GUITextGenerator::TXT_BUTTON_ADD_DIALOG
@ TXT_BUTTON_ADD_DIALOG
Label for add button (with trailing ...).
Definition: GUITextGenerator.hh:54
NumberControl
Definition: NumberControl.hh:59
ProDeTextGenerator::COMP_MACHINE
@ COMP_MACHINE
Text for machine description.
Definition: ProDeTextGenerator.hh:252
WxConversion.hh
TTAMachine::Machine::Navigator::item
ComponentType * item(int index) const
WidgetTools::setWidgetLabel
static void setWidgetLabel(wxWindow *widget, std::string text)
Definition: WidgetTools.cc:52
InformationDialog
Definition: InformationDialog.hh:42
MathTools.hh
TTAMachine
Definition: Assembler.hh:48
WxConversion::toString
static std::string toString(const wxString &source)
TTAMachine::Machine::Navigator
Definition: Machine.hh:186
ProDeTextGenerator::TXT_ADDRESS_SPACE_DIALOG_TITLE
@ TXT_ADDRESS_SPACE_DIALOG_TITLE
Address space dialog title.
Definition: ProDeTextGenerator.hh:206
END_EVENT_TABLE
END_EVENT_TABLE() using namespace IDF
AddressSpaceDialog::~AddressSpaceDialog
~AddressSpaceDialog()
Definition: AddressSpaceDialog.cc:126
AddressSpaceDialog::onMaxAddress
void onMaxAddress(wxCommandEvent &event)
Definition: AddressSpaceDialog.cc:330
AddressSpaceDialog::onBitWidth
void onBitWidth(wxSpinEvent &event)
Definition: AddressSpaceDialog.cc:351
TTAMachine::Machine
Definition: Machine.hh:73
GUITextGenerator::TXT_BUTTON_OK
@ TXT_BUTTON_OK
Label for OK button.
Definition: GUITextGenerator.hh:59