OpenASIP  2.0
RFDialog.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 RFDialog.cc
26  *
27  * Definition of RFDialog class.
28  *
29  * @author Veli-Pekka Jääskeläinen 2004 (vjaaskel-no.spam-cs.tut.fi)
30  * @note rating: red
31  */
32 
33 #include <wx/valgen.h>
34 #include <boost/format.hpp>
35 
36 #include "RFDialog.hh"
37 #include "RFPortDialog.hh"
38 #include "ModelConstants.hh"
39 #include "ProDeConstants.hh"
40 #include "WxConversion.hh"
41 #include "Conversion.hh"
42 #include "WarningDialog.hh"
43 #include "InformationDialog.hh"
44 #include "Machine.hh"
45 #include "MachineTester.hh"
46 #include "RegisterFile.hh"
47 #include "UserManualCmd.hh"
48 #include "Port.hh"
49 #include "WidgetTools.hh"
50 #include "GUITextGenerator.hh"
51 #include "ProDeTextGenerator.hh"
52 
53 using boost::format;
54 using std::string;
55 using namespace TTAMachine;
56 
57 BEGIN_EVENT_TABLE(RFDialog, wxDialog)
58  EVT_TEXT(ID_NAME, RFDialog::onName)
59  EVT_BUTTON(ID_ADD_PORT, RFDialog::onAddPort)
60  EVT_BUTTON(ID_DELETE_PORT, RFDialog::onDeletePort)
61  EVT_BUTTON(ID_EDIT_PORT, RFDialog::onEditPort)
62  EVT_MENU(ID_EDIT_PORT, RFDialog::onEditPort)
63  EVT_MENU(ID_DELETE_PORT, RFDialog::onDeletePort)
65  EVT_LIST_ITEM_RIGHT_CLICK(ID_PORT_LIST, RFDialog::onPortRightClick)
66 
67  EVT_BUTTON(wxID_OK, RFDialog::onOK)
68 
69  EVT_LIST_ITEM_FOCUSED(ID_PORT_LIST, RFDialog::onPortSelection)
70  EVT_LIST_DELETE_ITEM(ID_PORT_LIST, RFDialog::onPortSelection)
74 
75 
76 /**
77  * The Constructor.
78  *
79  * @param parent Parent window of the dialog.
80  * @param registerFile Register file to add/edit.
81  */
83  wxWindow* parent,
84  RegisterFile* registerFile):
85  wxDialog(parent, -1, _T(""), wxDefaultPosition),
86  registerFile_(registerFile),
87  name_(_T("")),
88  size_(1),
90  maxReads_(0),
91  maxWrites_(0),
92  zeroRegister_(false),
93  portListCtrl_(NULL),
94  typeChoice_(NULL) {
95 
96  //registerFile_->updateMaxReadsAndWrites();
97  createContents(this, true, true);
98 
99  FindWindow(wxID_OK)->Disable();
100  FindWindow(ID_EDIT_PORT)->Disable();
101  FindWindow(ID_DELETE_PORT)->Disable();
102 
103  FindWindow(ID_NAME)->SetValidator(wxTextValidator(wxFILTER_ASCII, &name_));
104 
105  portListCtrl_ = dynamic_cast<wxListCtrl*>(FindWindow(ID_PORT_LIST));
106  typeChoice_ = dynamic_cast<wxChoice*>(FindWindow(ID_TYPE));
107 
108  // Set widget validators.
109  FindWindow(ID_WIDTH)->SetValidator(wxGenericValidator(&width_));
110  FindWindow(ID_SIZE)->SetValidator(wxGenericValidator(&size_));
111  FindWindow(ID_GUARD_LATENCY)->SetValidator(
112  wxGenericValidator(&guardLatency_));
113 
114  FindWindow(ID_ZERO_REGISTER)->SetValidator(
115  wxGenericValidator(&zeroRegister_));
116 
117  // set widget texts
118  setTexts();
119 
120  TransferDataToWindow();
121 }
122 
123 
124 /**
125  * The Destructor.
126  */
128 }
129 
130 
131 /**
132  * Sets texts for widgets.
133  */
134 void
138 
139  // Dialog title
140  format fmt = prodeTexts->text(ProDeTextGenerator::TXT_RF_DIALOG_TITLE);
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_PORT),
155 
156  WidgetTools::setLabel(generator, FindWindow(ID_EDIT_PORT),
158 
159  WidgetTools::setLabel(generator, FindWindow(ID_DELETE_PORT),
161 
162  // widget labels
163  WidgetTools::setLabel(prodeTexts, FindWindow(ID_LABEL_NAME),
165 
166  WidgetTools::setLabel(prodeTexts, FindWindow(ID_LABEL_TYPE),
168 
169  WidgetTools::setLabel(prodeTexts, FindWindow(ID_LABEL_SIZE),
171 
172  WidgetTools::setLabel(prodeTexts, FindWindow(ID_LABEL_WIDTH),
174 
175  WidgetTools::setLabel(prodeTexts, FindWindow(ID_LABEL_MAX_READS),
177 
178  WidgetTools::setLabel(prodeTexts, FindWindow(ID_LABEL_MAX_WRITES),
180 
181  WidgetTools::setLabel(prodeTexts, FindWindow(ID_LABEL_GUARD_LATENCY),
183 
184  // choicer texts
185  fmt = prodeTexts->text(ProDeTextGenerator::TXT_RF_TYPE_NORMAL);
186  typeChoice_->Append(WxConversion::toWxString(fmt.str()));
188  typeChoice_->Append(WxConversion::toWxString(fmt.str()));
190  typeChoice_->Append(WxConversion::toWxString(fmt.str()));
191 
192  // box sizer label
193  fmt = prodeTexts->text(ProDeTextGenerator::TXT_RF_PORTS_BOX);
194  WidgetTools::setWidgetLabel(portsSizer_, fmt.str());
195 
196  // Create port list column.
197  wxListCtrl* portList =
198  dynamic_cast<wxListCtrl*>(FindWindow(ID_PORT_LIST));
199  fmt = prodeTexts->text(ProDeTextGenerator::TXT_COLUMN_NAME);
200  portList->InsertColumn(0, WxConversion::toWxString(fmt.str()),
201  wxLIST_FORMAT_LEFT, 200);
202 }
203 
204 /**
205  * Transfers data from the RegisterFile object to the dialog widgets.
206  *
207  * @return false, if an error occured in the transfer.
208  */
209 bool
211 
212  updateWidgets();
213 
214  return wxWindow::TransferDataToWindow();
215 }
216 
217 
218 /**
219  * Reads data form the RegisterFile and updates GUI.
220  *
221  */
222 void
224 
225  //registerFile_->updateMaxReadsAndWrites();
226 
227  name_ = WxConversion::toWxString(registerFile_->name());
228  size_ = registerFile_->numberOfRegisters();
229  width_ = registerFile_->width();
230  maxReads_ = registerFile_->maxReads();
231  maxWrites_ = registerFile_->maxWrites();
232  guardLatency_ = registerFile_->guardLatency();
233  zeroRegister_ = registerFile_->zeroRegister();
234 
235  switch (registerFile_->type()) {
237  typeChoice_->SetSelection(0);
238  break;
240  typeChoice_->SetSelection(1);
241  break;
243  typeChoice_->SetSelection(2);
244  break;
245  default:
246  assert(false);
247  }
248 
249  updatePortList();
250 
251  // wxWidgets GTK1 version seems to bug with spincontrol validators.
252  // The widget value has to be set manually.
253  dynamic_cast<wxSpinCtrl*>(FindWindow(ID_SIZE))->SetValue(size_);
254  dynamic_cast<wxSpinCtrl*>(FindWindow(ID_WIDTH))->SetValue(width_);
255  dynamic_cast<wxStaticText*>(FindWindow(ID_MAX_READS))->SetLabel(
256  WxConversion::toWxString(maxReads_));
257  dynamic_cast<wxStaticText*>(FindWindow(ID_MAX_WRITES))->SetLabel(
258  WxConversion::toWxString(maxWrites_));
259  dynamic_cast<wxSpinCtrl*>(
260  FindWindow(ID_GUARD_LATENCY))->SetValue(guardLatency_);
261  dynamic_cast<wxCheckBox*>(
262  FindWindow(ID_ZERO_REGISTER))->SetValue(zeroRegister_);
263 }
264 
265 /**
266  * Updates the port list widget.
267  */
268 void
270  portListCtrl_->DeleteAllItems();
271  for (int i=0; i < registerFile_->portCount(); i++) {
272 
273  wxString name =
274  WxConversion::toWxString(registerFile_->port(i)->name());
275 
276  portListCtrl_->InsertItem(i, name);
277  }
278 }
279 
280 
281 /**
282  * Validates input in the controls, and updates the RegisterFile.
283  */
284 void
285 RFDialog::onOK(wxCommandEvent&) {
286  if (!Validate()) {
287  return;
288  }
289 
290  if (!TransferDataFromWindow()) {
291  return;
292  }
293 
294  string trimmedName =
295  WxConversion::toString(name_.Trim(false).Trim(true));
296 
297  // Check the name validity.
298  if (!MachineTester::isValidComponentName(trimmedName)) {
300  format message =
302  InformationDialog warning(
303  this, WxConversion::toWxString(message.str()));
304  warning.ShowModal();
305  return;
306  }
307 
308  if (registerFile_->name() != trimmedName) {
309 
311  registerFile_->machine()->registerFileNavigator();
312 
313  for (int i = 0; i < navigator.count(); i++) {
314  RegisterFile* rf = navigator.item(i);
315  if (trimmedName == rf->name()) {
316  ProDeTextGenerator* prodeTexts =
318  format message =
320  format a_rf =
322  format machine =
324  format rf =
326  message % trimmedName % a_rf.str() % machine.str() % rf.str();
327  WarningDialog warning(
328  this, WxConversion::toWxString(message.str()));
329  warning.ShowModal();
330  return;
331  }
332  }
333  }
334 
335  try {
336  registerFile_->setName(trimmedName);
337  registerFile_->setWidth(width_);
338  registerFile_->setNumberOfRegisters(size_);
339  registerFile_->setGuardLatency(guardLatency_);
340  registerFile_->setZeroRegister(zeroRegister_);
341  } catch (Exception& e) {
342  InformationDialog dialog(
344  dialog.ShowModal();
345  return;
346  }
347 
348  // set register file type
349  switch (typeChoice_->GetSelection()) {
350  case 0:
351  registerFile_->setType(RegisterFile::NORMAL);
352  break;
353  case 1:
354  registerFile_->setType(RegisterFile::RESERVED);
355  break;
356  case 2:
357  registerFile_->setType(RegisterFile::VOLATILE);
358  break;
359  default:
360  assert(false);
361  }
362 
363  //registerFile_->updateMaxReadsAndWrites();
364  EndModal(wxID_OK);
365 }
366 
367 
368 /**
369  * Checks whether name field is empty and disables OK button of the
370  * dialog if it is.
371  */
372 void
373 RFDialog::onName(wxCommandEvent&) {
374  if (!TransferDataFromWindow()) {
375  assert(false);
376  }
377  wxString trimmedName = name_.Trim(false).Trim(true);
378  if (trimmedName == _T("")) {
379  FindWindow(wxID_OK)->Disable();
380  } else {
381  FindWindow(wxID_OK)->Enable();
382  }
383 }
384 
385 
386 /**
387  * Returns pointer to the port which is selected on the port list.
388  *
389  * @return Pointer to the port which is selected on the port list.
390  */
391 Port*
393  long item = -1;
394  item = portListCtrl_->GetNextItem(
395  item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
396 
397  if (item == -1) {
398  return NULL;
399  }
400 
401  string portName =
402  WxConversion::toString(portListCtrl_->GetItemText(item));
403 
404  return registerFile_->port(portName);
405 }
406 
407 
408 /**
409  * Creates and shows an empty RFPortDialog for adding ports.
410  */
411 void
412 RFDialog::onAddPort(wxCommandEvent&) {
413 
414  // Generate name for the new port.
415  int i = 1;
418  while (registerFile_->hasPort(newName)) {
421  i++;
422  }
423 
424  RFPort* port = new RFPort(newName, *registerFile_);
425  RFPortDialog portDialog(this, port);
426  if (portDialog.ShowModal() == wxID_OK) {
427  updatePortList();
428  } else {
429  delete port;
430  }
431 
432  updateWidgets();
433 
434 }
435 
436 
437 /**
438  * Deletes selected port from the port list.
439  */
440 void
441 RFDialog::onDeletePort(wxCommandEvent&) {
442  Port* selected = selectedPort();
443  assert(selected != NULL);
444  delete selected;
445  updatePortList();
446 
447  updateWidgets();
448 }
449 
450 
451 /**
452  * Handles left mouse button double clicks on the port list.
453  */
454 void
456  wxCommandEvent dummy;
457  onEditPort(dummy);
458 }
459 
460 
461 /**
462  * Handles the 'Edit Port' button event.
463  *
464  * Opens a RFPortDialog with the selected port's attributes set.
465  */
466 void
467 RFDialog::onEditPort(wxCommandEvent&) {
468 
469  Port* port = selectedPort();
470  if (port == NULL) {
471  // No port selected.
472  return;
473  }
474 
475  RFPortDialog portDialog(this, port);
476  if (portDialog.ShowModal() == wxID_OK) {
477  updatePortList();
478  }
479 }
480 
481 /**
482  * Disables and enables Edit and Delete buttons under the port list.
483  *
484  * If a port is selected, buttons are enabled. If no port is selected the
485  * buttons will be disabled.
486  */
487 void
489  if (portListCtrl_->GetSelectedItemCount() != 1) {
490  FindWindow(ID_DELETE_PORT)->Disable();
491  FindWindow(ID_EDIT_PORT)->Disable();
492  return;
493  }
494  FindWindow(ID_DELETE_PORT)->Enable();
495  FindWindow(ID_EDIT_PORT)->Enable();
496 }
497 
498 
499 /**
500  * Opens a pop-up menu when right mouse button was pressed.
501  *
502  * @param event Information about right mouse click event.
503  */
504 void
505 RFDialog::onPortRightClick(wxListEvent& event) {
506 
507  portListCtrl_->SetItemState(event.GetIndex(), wxLIST_STATE_SELECTED,
508  wxLIST_STATE_SELECTED);
509 
510  wxMenu* contextMenu = new wxMenu();
511 
513  format button = prodeTexts->text(
515  contextMenu->Append(
516  ID_EDIT_PORT, WxConversion::toWxString(button.str()));
517  button = prodeTexts->text(
519  contextMenu->Append(
520  ID_DELETE_PORT, WxConversion::toWxString(button.str()));
521  portListCtrl_->PopupMenu(contextMenu, event.GetPoint());
522 }
523 
524 
525 /**
526  * Creates the dialog window contents.
527  *
528  * This method was generated with wxDesigner.
529  *
530  * @return Main sizer of the created contents.
531  * @param parent The dialog window.
532  * @param call_fit If true, fits the contents inside the dialog.
533  * @param set_sizer If true, sets the main sizer as dialog contents.
534  */
535 wxSizer*
536 RFDialog::createContents(wxWindow *parent, bool call_fit, bool set_sizer) {
537 
538  wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );
539 
540  wxFlexGridSizer *item1 = new wxFlexGridSizer( 2, 0, 0 );
541 
542  wxStaticText *item2 = new wxStaticText( parent, ID_LABEL_NAME, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
543  item1->Add( item2, 0, wxALIGN_RIGHT|wxALL, 5 );
544 
545  wxTextCtrl *item3 = new wxTextCtrl( parent, ID_NAME, wxT(""), wxDefaultPosition, wxSize(200,-1), 0 );
546  item1->Add( item3, 0, wxGROW|wxALL, 5 );
547 
548  wxStaticText *item4 = new wxStaticText( parent, ID_LABEL_TYPE, wxT("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
549  item1->Add( item4, 0, wxALIGN_RIGHT|wxALL, 5 );
550 
551  wxString *strs5 = (wxString*) NULL;
552  wxChoice *item5 = new wxChoice( parent, ID_TYPE, wxDefaultPosition, wxSize(100,-1), 0, strs5, 0 );
553  item1->Add( item5, 0, wxGROW|wxALL, 5 );
554 
555  wxStaticText *item6 = new wxStaticText( parent, ID_LABEL_SIZE, wxT("Size:"), wxDefaultPosition, wxDefaultSize, 0 );
556  item1->Add( item6, 0, wxALIGN_RIGHT|wxALL, 5 );
557 
558  wxSpinCtrl *item7 = new wxSpinCtrl( parent, ID_SIZE, wxT("1"), wxDefaultPosition, wxSize(-1,-1), 0, 1, 10000, 1 );
559  item1->Add( item7, 0, wxGROW|wxALL, 5 );
560 
561  wxStaticText *item8 = new wxStaticText( parent, ID_LABEL_WIDTH, wxT("Width:"), wxDefaultPosition, wxDefaultSize, 0 );
562  item1->Add( item8, 0, wxALIGN_RIGHT|wxALL, 5 );
563 
564  wxSpinCtrl *item9 = new wxSpinCtrl( parent, ID_WIDTH, wxT("1"), wxDefaultPosition, wxSize(-1,-1), 0, 1, 10000, 1 );
565  item1->Add( item9, 0, wxGROW|wxALL, 5 );
566 
567  wxStaticText *item10 = new wxStaticText( parent, ID_LABEL_MAX_READS, wxT("Max-Reads:"), wxDefaultPosition, wxDefaultSize, 0 );
568  item1->Add( item10, 0, wxALIGN_RIGHT|wxALL, 5 );
569 
570  wxStaticText *item11 = new wxStaticText( parent, ID_MAX_READS, wxT("0"), wxDefaultPosition, wxSize(100,-1), 0);
571  item1->Add( item11, 0, wxGROW|wxALL, 5 );
572 
573  wxStaticText *item12 = new wxStaticText( parent, ID_LABEL_MAX_WRITES, wxT("Max-Writes:"), wxDefaultPosition, wxDefaultSize, 0 );
574  item1->Add( item12, 0, wxALIGN_RIGHT|wxALL, 5 );
575 
576  wxStaticText *item13 = new wxStaticText( parent, ID_MAX_WRITES, wxT("0"), wxDefaultPosition, wxSize(100,-1), 0);
577  item1->Add( item13, 0, wxGROW|wxALL, 5 );
578 
579  wxStaticText *item14 = new wxStaticText( parent, ID_LABEL_GUARD_LATENCY, wxT("Guard Latency:"), wxDefaultPosition, wxDefaultSize, 0 );
580  item1->Add( item14, 0, wxALIGN_RIGHT|wxALL, 5 );
581 
582  wxSpinCtrl *item15 = new wxSpinCtrl( parent, ID_GUARD_LATENCY, wxT("0"), wxDefaultPosition, wxSize(-1,-1), 0, 0, 1, 0 );
583  item1->Add( item15, 0, wxGROW|wxALL, 5 );
584 
585  item0->Add( item1, 0, wxGROW|wxALL, 5 );
586 
587  wxStaticBox *item17 = new wxStaticBox( parent, -1, wxT("Ports:") );
588  wxStaticBoxSizer *item16 = new wxStaticBoxSizer( item17, wxVERTICAL );
589  portsSizer_ = item16;
590 
591  wxListCtrl *item18 = new wxListCtrl( parent, ID_PORT_LIST, wxDefaultPosition, wxSize(160,120), wxLC_REPORT|wxSUNKEN_BORDER );
592  item16->Add( item18, 0, wxGROW|wxALL, 5 );
593 
594  wxBoxSizer *item19 = new wxBoxSizer( wxHORIZONTAL );
595 
596  wxButton *item20 = new wxButton( parent, ID_ADD_PORT, wxT("&Add.."), wxDefaultPosition, wxDefaultSize, 0 );
597  item19->Add( item20, 0, wxALIGN_CENTER|wxALL, 5 );
598 
599  wxButton *item21 = new wxButton( parent, ID_EDIT_PORT, wxT("&Edit..."), wxDefaultPosition, wxDefaultSize, 0 );
600  item19->Add( item21, 0, wxALIGN_CENTER|wxALL, 5 );
601 
602  wxButton *item22 = new wxButton( parent, ID_DELETE_PORT, wxT("&Delete"), wxDefaultPosition, wxDefaultSize, 0 );
603  item19->Add( item22, 0, wxALIGN_CENTER|wxALL, 5 );
604 
605  item16->Add( item19, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, 5 );
606 
607  item0->Add( item16, 0, wxALIGN_CENTER|wxALL, 5 );
608 
609  wxBoxSizer *item23 = new wxBoxSizer( wxHORIZONTAL );
610 
611  wxButton *item24 = new wxButton( parent, ID_HELP, wxT("&Help"), wxDefaultPosition, wxDefaultSize, 0 );
612  item23->Add( item24, 0, wxALIGN_CENTER|wxALL, 5 );
613 
614  wxButton *item25 = new wxButton( parent, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
615  item23->Add( item25, 0, wxALIGN_CENTER|wxALL, 5 );
616 
617  wxButton *item26 = new wxButton( parent, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
618  item23->Add( item26, 0, wxALIGN_CENTER|wxALL, 5 );
619 
620  item0->Add( item23, 0, wxALIGN_CENTER|wxALL, 5 );
621 
622  wxCheckBox *item27 = new wxCheckBox( parent, ID_ZERO_REGISTER, wxT("Zero register"), wxDefaultPosition, wxDefaultSize, 0);
623  item1->Add( item27, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
624 
625  if (set_sizer)
626  {
627  parent->SetSizer( item0 );
628  if (call_fit)
629  item0->SetSizeHints( parent );
630  }
631 
632  return item0;
633 }
RFDialog::onPortRightClick
void onPortRightClick(wxListEvent &event)
Definition: RFDialog.cc:505
WarningDialog
Definition: WarningDialog.hh:42
ProDeTextGenerator::TXT_LABEL_MAX_READS
@ TXT_LABEL_MAX_READS
Label for Max-Reads widget.
Definition: ProDeTextGenerator.hh:70
WxConversion::toWxString
static wxString toWxString(const std::string &source)
RFDialog::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition: RFDialog.cc:536
TTAMachine::Component::name
virtual TCEString name() const
Definition: MachinePart.cc:125
RFDialog::onPortSelection
void onPortSelection(wxListEvent &event)
Definition: RFDialog.cc:488
EVT_LIST_ITEM_ACTIVATED
FUImplementationDialog::onAddExternalPort FUImplementationDialog::onDeleteExternalPort FUImplementationDialog::onArchPortSelection FUImplementationDialog::onArchPortActivation FUImplementationDialog::onExternalPortActivation FUImplementationDialog::onParameterSelection EVT_LIST_ITEM_ACTIVATED(ID_PARAMETER_LIST, FUImplementationDialog::onParameterActivation) EVT_LIST_ITEM_DESELECTED(ID_PARAMETER_LIST
ProDeTextGenerator::TXT_LABEL_BUTTON_DELETE
@ TXT_LABEL_BUTTON_DELETE
Label for &Delete button.
Definition: ProDeTextGenerator.hh:95
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::RegisterFile::RESERVED
@ RESERVED
Used for custom, user controlled register allocation.
Definition: RegisterFile.hh:52
RFDialog::onActivatePort
void onActivatePort(wxListEvent &event)
Definition: RFDialog.cc:455
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
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
ProDeConstants::COMP_NEW_NAME_PREFIX_PORT
static const std::string COMP_NEW_NAME_PREFIX_PORT
Prefix for new port names.
Definition: ProDeConstants.hh:373
TTAMachine::Machine::Navigator::count
int count() const
Texts::TextGenerator::text
virtual boost::format text(int textId)
Definition: TextGenerator.cc:94
RFDialog::onOK
void onOK(wxCommandEvent &event)
Definition: RFDialog.cc:285
RFDialog.hh
RFPortDialog
Definition: RFPortDialog.hh:44
ProDeTextGenerator.hh
Conversion::toString
static std::string toString(const T &source)
ProDeTextGenerator::TXT_LABEL_BUTTON_EDIT
@ TXT_LABEL_BUTTON_EDIT
Label for &Edit... button.
Definition: ProDeTextGenerator.hh:96
ProDeTextGenerator
Definition: ProDeTextGenerator.hh:49
ProDeTextGenerator::MSG_ERROR_ILLEGAL_NAME
@ MSG_ERROR_ILLEGAL_NAME
Error: Illegal component name.
Definition: ProDeTextGenerator.hh:223
TTAMachine::RFPort
Definition: RFPort.hh:45
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
ProDeTextGenerator::TXT_RF_TYPE_NORMAL
@ TXT_RF_TYPE_NORMAL
Register file type: normal.
Definition: ProDeTextGenerator.hh:157
Port.hh
RFDialog::setTexts
void setTexts()
Definition: RFDialog.cc:135
ProDeTextGenerator::TXT_LABEL_MAX_WRITES
@ TXT_LABEL_MAX_WRITES
Label for Max-Writes widget.
Definition: ProDeTextGenerator.hh:69
GUITextGenerator::TXT_BUTTON_CANCEL
@ TXT_BUTTON_CANCEL
Label for cancel button.
Definition: GUITextGenerator.hh:55
TTAMachine::RegisterFile::VOLATILE
@ VOLATILE
Used for user-controlled I/O communication.
Definition: RegisterFile.hh:53
ProDeTextGenerator::TXT_LABEL_TYPE
@ TXT_LABEL_TYPE
Label for type widget.
Definition: ProDeTextGenerator.hh:67
RFDialog::updatePortList
void updatePortList()
Definition: RFDialog.cc:269
WarningDialog.hh
Conversion.hh
TTAMachine::Port
Definition: Port.hh:54
dummy
SimValue dummy(32)
a dummy simvalue which is given for operands that are not bound
InformationDialog.hh
ProDeTextGenerator::COMP_REGISTER_FILE
@ COMP_REGISTER_FILE
Register file (w/o article).
Definition: ProDeTextGenerator.hh:269
ProDeTextGenerator::TXT_LABEL_NAME
@ TXT_LABEL_NAME
Label for component name widget.
Definition: ProDeTextGenerator.hh:56
RFDialog::onEditPort
void onEditPort(wxCommandEvent &event)
Definition: RFDialog.cc:467
ProDeTextGenerator::TXT_LABEL_SIZE
@ TXT_LABEL_SIZE
Label for size widget.
Definition: ProDeTextGenerator.hh:68
RFPortDialog.hh
ModelConstants.hh
Machine.hh
Exception
Definition: Exception.hh:54
ProDeTextGenerator::TXT_LABEL_GUARD_LATENCY
@ TXT_LABEL_GUARD_LATENCY
Label for guard latency.
Definition: ProDeTextGenerator.hh:92
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
Exception::errorMessage
std::string errorMessage() const
Definition: Exception.cc:123
GUITextGenerator::TXT_BUTTON_DELETE
@ TXT_BUTTON_DELETE
Label for delete button.
Definition: GUITextGenerator.hh:56
ProDeConstants.hh
GUITextGenerator.hh
RFDialog::onName
void onName(wxCommandEvent &event)
Definition: RFDialog.cc:373
MachineTester.hh
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
RFDialog::TransferDataToWindow
virtual bool TransferDataToWindow()
Definition: RFDialog.cc:210
GUITextGenerator::TXT_BUTTON_ADD_DIALOG
@ TXT_BUTTON_ADD_DIALOG
Label for add button (with trailing ...).
Definition: GUITextGenerator.hh:54
false
find Finds info of the inner loops in the false
Definition: InnerLoopFinder.cc:81
GUITextGenerator::TXT_BUTTON_EDIT_DIALOG
@ TXT_BUTTON_EDIT_DIALOG
Label for edit button (with trailing ...).
Definition: GUITextGenerator.hh:58
RFDialog::selectedPort
TTAMachine::Port * selectedPort() const
Definition: RFDialog.cc:392
RegisterFile.hh
ProDeTextGenerator::TXT_RF_DIALOG_TITLE
@ TXT_RF_DIALOG_TITLE
Register file Dialog title.
Definition: ProDeTextGenerator.hh:155
TTAMachine::RegisterFile::NORMAL
@ NORMAL
Used for general register allocation.
Definition: RegisterFile.hh:51
RFDialog::updateWidgets
void updateWidgets()
Definition: RFDialog.cc:223
ProDeTextGenerator::TXT_RF_TYPE_RESERVED
@ TXT_RF_TYPE_RESERVED
Register file type: reserved.
Definition: ProDeTextGenerator.hh:159
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
TTAMachine::RegisterFile
Definition: RegisterFile.hh:47
ProDeTextGenerator::TXT_RF_TYPE_VOLATILE
@ TXT_RF_TYPE_VOLATILE
Register file type: volatile.
Definition: ProDeTextGenerator.hh:158
InformationDialog
Definition: InformationDialog.hh:42
RFDialog::onAddPort
void onAddPort(wxCommandEvent &event)
Definition: RFDialog.cc:412
TTAMachine
Definition: Assembler.hh:48
ProDeTextGenerator::TXT_LABEL_WIDTH
@ TXT_LABEL_WIDTH
Label for bit width widget.
Definition: ProDeTextGenerator.hh:57
WxConversion::toString
static std::string toString(const wxString &source)
ProDeTextGenerator::TXT_COLUMN_NAME
@ TXT_COLUMN_NAME
Label for name column in a list.
Definition: ProDeTextGenerator.hh:105
TTAMachine::Machine::Navigator
Definition: Machine.hh:186
UserManualCmd.hh
ProDeTextGenerator::COMP_A_REGISTER_FILE
@ COMP_A_REGISTER_FILE
Register file (w/ article).
Definition: ProDeTextGenerator.hh:268
RFDialog::~RFDialog
virtual ~RFDialog()
Definition: RFDialog.cc:127
RFDialog::onDeletePort
void onDeletePort(wxCommandEvent &event)
Definition: RFDialog.cc:441
RFDialog
Definition: RFDialog.hh:47
END_EVENT_TABLE
END_EVENT_TABLE() using namespace IDF
ProDeTextGenerator::TXT_RF_PORTS_BOX
@ TXT_RF_PORTS_BOX
Ports box title.
Definition: ProDeTextGenerator.hh:156
GUITextGenerator::TXT_BUTTON_OK
@ TXT_BUTTON_OK
Label for OK button.
Definition: GUITextGenerator.hh:59