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

#include <GCUDialog.hh>

Inheritance diagram for GCUDialog:
Inheritance graph
Collaboration diagram for GCUDialog:
Collaboration graph

Public Member Functions

 GCUDialog (wxWindow *parent, TTAMachine::ControlUnit *gcu)
 
virtual ~GCUDialog ()
 

Private Types

enum  {
  ID_NAME = 10000, ID_TEXT, ID_DELAY_SLOTS, ID_ADDRESS_SPACE,
  ID_OPERATION_LIST, ID_PORT_LIST, ID_RA_CHOICE, ID_OP_CHOICE,
  ID_LINE, ID_ADD_OPERATION, ID_EDIT_OPERATION, ID_DELETE_OPERATION,
  ID_ADD_FU_PORT, ID_ADD_SR_PORT, ID_EDIT_PORT, ID_DELETE_PORT,
  ID_HELP, ID_TEXT_NAME, ID_TEXT_DS, ID_TEXT_AS,
  ID_TEXT_INPUT_SOCKET, ID_TEXT_OUTPUT_SOCKET, ID_TEXT_RA_WIDTH, ID_LABEL_RA_CHOICE,
  ID_LABEL_OP_CHOICE
}
 enumerated IDs for dialog controls More...
 

Private Member Functions

virtual bool TransferDataToWindow ()
 
wxSizer * createContents (wxWindow *parent, bool call_fit, bool set_sizer)
 
void updateAddressSpaceChoice ()
 
void updateSocketChoicers ()
 
void updateOperationList ()
 
void updatePortList ()
 
void updateRAPortChoice ()
 
TTAMachine::HWOperationselectedOperation ()
 
TTAMachine::BaseFUPortselectedPort ()
 
void onName (wxCommandEvent &event)
 
void onOperationSelection (wxListEvent &event)
 
void onAddOperation (wxCommandEvent &event)
 
void onEditOperation (wxCommandEvent &event)
 
void onDeleteOperation (wxCommandEvent &event)
 
void onActivateOperation (wxListEvent &event)
 
void onOperationRightClick (wxListEvent &event)
 
void onAddFUPort (wxCommandEvent &event)
 
void onAddSRPort (wxCommandEvent &event)
 
void onEditPort (wxCommandEvent &event)
 
void onDeletePort (wxCommandEvent &event)
 
void onPortSelection (wxListEvent &event)
 
void onActivatePort (wxListEvent &event)
 
void onPortRightClick (wxListEvent &event)
 
void onRAPortChoice (wxCommandEvent &event)
 
void onHelp (wxCommandEvent &event)
 
void onOK (wxCommandEvent &event)
 
void setLabels ()
 

Private Attributes

TTAMachine::ControlUnitgcu_
 The Global Control Unit to be modified with the dialog. More...
 
wxString name_
 Name of the global control unit. More...
 
int delaySlots_
 Number of delay slots of the global control unit. More...
 
int guardLatency_
 Guard latency of the gcu. More...
 
wxChoice * addressSpaceChoice_
 Address Space choice control. More...
 
wxChoice * raPortChoice_
 Return address port choice control. More...
 
wxListCtrl * operationList_
 Operation list widget. More...
 
wxListCtrl * portList_
 Port list widget. More...
 
wxStaticBoxSizer * operationsSizer_
 Box sizer for the operations list controls. More...
 
wxStaticBoxSizer * portListSizer_
 Box sizer for the port list controls. More...
 

Detailed Description

Dialog for adding a new Global Control Unit to the Machine and editing existing Global Control Unit attributes.

Definition at line 48 of file GCUDialog.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private

enumerated IDs for dialog controls

Enumerator
ID_NAME 
ID_TEXT 
ID_DELAY_SLOTS 
ID_ADDRESS_SPACE 
ID_OPERATION_LIST 
ID_PORT_LIST 
ID_RA_CHOICE 
ID_OP_CHOICE 
ID_LINE 
ID_ADD_OPERATION 
ID_EDIT_OPERATION 
ID_DELETE_OPERATION 
ID_ADD_FU_PORT 
ID_ADD_SR_PORT 
ID_EDIT_PORT 
ID_DELETE_PORT 
ID_HELP 
ID_TEXT_NAME 
ID_TEXT_DS 
ID_TEXT_AS 
ID_TEXT_INPUT_SOCKET 
ID_TEXT_OUTPUT_SOCKET 
ID_TEXT_RA_WIDTH 
ID_LABEL_RA_CHOICE 
ID_LABEL_OP_CHOICE 

Definition at line 111 of file GCUDialog.hh.

111  {
112  ID_NAME = 10000,
113  ID_TEXT,
115  //ID_GUARD_LATENCY,
118  ID_PORT_LIST,
119  ID_RA_CHOICE,
120  ID_OP_CHOICE,
121  ID_LINE,
127  ID_EDIT_PORT,
129  ID_HELP,
130  ID_TEXT_NAME,
131  ID_TEXT_DS,
132  ID_TEXT_AS,
138  //ID_LABEL_GLOBAL_GUARD_LATENCY
139  };

Constructor & Destructor Documentation

◆ GCUDialog()

GCUDialog::GCUDialog ( wxWindow *  parent,
TTAMachine::ControlUnit gcu 
)

The Constructor.

Parameters
parentParent window of the dialog.
gcuThe Global Control Unit to be modified with the dialog.

Definition at line 106 of file GCUDialog.cc.

108  :
109  wxDialog(parent, -1, _T(""), wxDefaultPosition),
110  gcu_(gcu),
111  name_(_T("")),
112  delaySlots_(0) {
113 
114  // Create dialog contents and set pointers to the dialog controls.
115  createContents(this, true, true);
117  dynamic_cast<wxChoice*>(FindWindow(ID_ADDRESS_SPACE));
118  raPortChoice_ =
119  dynamic_cast<wxChoice*>(FindWindow(ID_RA_CHOICE));
121  dynamic_cast<wxListCtrl*>(FindWindow(ID_OPERATION_LIST));
122  portList_ =
123  dynamic_cast<wxListCtrl*>(FindWindow(ID_PORT_LIST));
124 
125  // Disable conditional controls initially.
126  FindWindow(wxID_OK)->Disable();
127  FindWindow(ID_EDIT_OPERATION)->Disable();
128  FindWindow(ID_DELETE_OPERATION)->Disable();
129  FindWindow(ID_EDIT_PORT)->Disable();
130  FindWindow(ID_DELETE_PORT)->Disable();
131 
132  // set widget labels
133  setLabels();
134 
135  // Set validators for dialog controls.
136  FindWindow(ID_NAME)->SetValidator(
137  wxTextValidator(wxFILTER_ASCII, &name_));
138  FindWindow(ID_DELAY_SLOTS)->SetValidator(
139  wxGenericValidator(&delaySlots_));
140  //FindWindow(ID_GUARD_LATENCY)->SetValidator(
141  //wxGenericValidator(&guardLatency_));
142 
144 }

◆ ~GCUDialog()

GCUDialog::~GCUDialog ( )
virtual

The Destructor.

Definition at line 150 of file GCUDialog.cc.

150  {
151 }

Member Function Documentation

◆ createContents()

wxSizer * GCUDialog::createContents ( wxWindow *  parent,
bool  call_fit,
bool  set_sizer 
)
private

Creates the dialog window contents.

This method was generated with wxDesigner, thus the ugly code and too long lines.

Returns
Main sizer of the created contents.
Parameters
parentThe dialog window.
call_fitIf true, fits the contents inside the dialog.
set_sizerIf true, sets the main sizer as dialog contents.

Definition at line 840 of file GCUDialog.cc.

840  {
841 
842  wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );
843 
844  wxBoxSizer *item1 = new wxBoxSizer( wxHORIZONTAL );
845 
846  wxBoxSizer *item2 = new wxBoxSizer( wxVERTICAL );
847 
848  wxFlexGridSizer *item3 = new wxFlexGridSizer( 2, 0, 0 );
849 
850  wxStaticText *item4 = new wxStaticText( parent, ID_TEXT_NAME, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
851  item3->Add( item4, 0, wxALL, 5 );
852 
853  wxTextCtrl *item5 = new wxTextCtrl( parent, ID_NAME, wxT(""), wxDefaultPosition, wxSize(140,-1), 0 );
854  item3->Add( item5, 0, wxGROW|wxALL, 5 );
855 
856  wxStaticText *item6 = new wxStaticText( parent, ID_TEXT_DS, wxT("Delay slots:"), wxDefaultPosition, wxDefaultSize, 0 );
857  item3->Add( item6, 0, wxALL, 5 );
858 
859  wxSpinCtrl *item7 = new wxSpinCtrl( parent, ID_DELAY_SLOTS, wxT("1"), wxDefaultPosition, wxSize(-1,-1), 0, 0, 10000, 1 );
860  item3->Add( item7, 0, wxGROW|wxALL, 5 );
861 
862  // global guard latency currently fixed at 1.
863  //wxStaticText *item8 = new wxStaticText( parent, ID_LABEL_GLOBAL_GUARD_LATENCY, wxT("Guard Latency:"), wxDefaultPosition, wxDefaultSize, 0 );
864  //item3->Add( item8, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
865 
866  //wxSpinCtrl *item9 = new wxSpinCtrl( parent, ID_GUARD_LATENCY, wxT("0"), wxDefaultPosition, wxSize(100,-1), 0, 0, 1000, 0 );
867  //item3->Add( item9, 0, wxGROW|wxALL, 5 );
868 
869  wxStaticText *item10 = new wxStaticText( parent, ID_TEXT_AS, wxT("Address Space:"), wxDefaultPosition, wxDefaultSize, 0 );
870  item3->Add( item10, 0, wxALL, 5 );
871 
872  wxString *strs11 = (wxString*) NULL;
873  wxChoice *item11 = new wxChoice( parent, ID_ADDRESS_SPACE, wxDefaultPosition, wxSize(100,-1), 0, strs11, 0 );
874  item3->Add( item11, 0, wxGROW|wxALL, 5 );
875 
876  item2->Add( item3, 0, wxALL, 5 );
877 
878  wxStaticBox *item13 = new wxStaticBox( parent, -1, wxT("Operations:") );
879  wxStaticBoxSizer *item12 = new wxStaticBoxSizer( item13, wxVERTICAL );
880  operationsSizer_ = item12;
881 
882  wxListCtrl *item14 = new wxListCtrl( parent, ID_OPERATION_LIST, wxDefaultPosition, wxSize(300,200), wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
883  item12->Add( item14, 0, wxGROW|wxALL, 5 );
884 
885  wxBoxSizer *item15 = new wxBoxSizer( wxHORIZONTAL );
886 
887  wxButton *item16 = new wxButton( parent, ID_ADD_OPERATION, wxT("&Add..."), wxDefaultPosition, wxDefaultSize, 0 );
888  item15->Add( item16, 0, wxALIGN_CENTER|wxALL, 5 );
889 
890  wxButton *item17 = new wxButton( parent, ID_EDIT_OPERATION, wxT("&Edit..."), wxDefaultPosition, wxDefaultSize, 0 );
891  item15->Add( item17, 0, wxALIGN_CENTER|wxALL, 5 );
892 
893  wxButton *item18 = new wxButton( parent, ID_DELETE_OPERATION, wxT("&Delete"), wxDefaultPosition, wxDefaultSize, 0 );
894  item15->Add( item18, 0, wxALIGN_CENTER|wxALL, 5 );
895 
896  item12->Add( item15, 0, wxALIGN_CENTER|wxALL, 5 );
897 
898  item2->Add( item12, 0, wxGROW|wxALL, 5 );
899 
900  item1->Add( item2, 0, wxGROW|wxALL, 5 );
901 
902  wxStaticBox *item20 = new wxStaticBox( parent, -1, wxT("Ports:") );
903  wxStaticBoxSizer *item19 = new wxStaticBoxSizer( item20, wxVERTICAL );
904  portListSizer_ = item19;
905 
906  wxBoxSizer *item21 = new wxBoxSizer( wxVERTICAL );
907 
908  wxListCtrl *item22 = new wxListCtrl( parent, ID_PORT_LIST, wxDefaultPosition, wxSize(300,180), wxLC_REPORT|wxSUNKEN_BORDER );
909  item21->Add( item22, 0, wxGROW|wxALL, 5 );
910 
911  wxBoxSizer *item23 = new wxBoxSizer( wxHORIZONTAL );
912 
913  wxButton *item24 = new wxButton( parent, ID_EDIT_PORT, wxT("Edit..."), wxDefaultPosition, wxDefaultSize, 0 );
914  item23->Add( item24, 0, wxALIGN_CENTER|wxALL, 5 );
915 
916  wxButton *item25 = new wxButton( parent, ID_DELETE_PORT, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
917  item23->Add( item25, 0, wxALIGN_CENTER|wxALL, 5 );
918 
919  item21->Add( item23, 0, 0, 5 );
920 
921  wxBoxSizer *item26 = new wxBoxSizer( wxHORIZONTAL );
922 
923  wxButton *item27 = new wxButton( parent, ID_ADD_FU_PORT, wxT("Add operation port..."), wxDefaultPosition, wxDefaultSize, 0 );
924  item26->Add( item27, 0, wxALIGN_CENTER|wxALL, 5 );
925 
926  wxButton *item28 = new wxButton( parent, ID_ADD_SR_PORT, wxT("Add special register port..."), wxDefaultPosition, wxDefaultSize, 0 );
927  item26->Add( item28, 0, wxALIGN_CENTER|wxALL, 5 );
928 
929  item21->Add( item26, 0, wxALIGN_CENTER|wxALL, 5 );
930 
931  wxStaticLine *item29 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
932  item21->Add( item29, 0, wxGROW|wxALL, 5 );
933 
934  wxFlexGridSizer *item30 = new wxFlexGridSizer( 2, 0, 0 );
935 
936  wxStaticText *item31 = new wxStaticText( parent, ID_LABEL_RA_CHOICE, wxT("Return address port:"), wxDefaultPosition, wxDefaultSize, 0 );
937  item30->Add( item31, 0, wxALIGN_CENTER|wxALL, 5 );
938 
939  wxString strs32[] =
940  {
941  wxT("NONE")
942  };
943  wxChoice *item32 = new wxChoice( parent, ID_RA_CHOICE, wxDefaultPosition, wxSize(120,-1), 1, strs32, 0 );
944  item30->Add( item32, 0, wxALIGN_CENTER|wxALL, 5 );
945 
946  item21->Add( item30, 0, wxGROW|wxALL, 5 );
947 
948  wxStaticLine *item35 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
949  item21->Add( item35, 0, wxGROW|wxALL, 5 );
950 
951  item19->Add( item21, 0, wxGROW|wxALL, 5 );
952 
953  item1->Add( item19, 0, wxGROW|wxALL, 5 );
954 
955  item0->Add( item1, 0, wxALIGN_CENTER|wxALL, 5 );
956 
957  wxStaticLine *item36 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
958  item0->Add( item36, 0, wxGROW|wxALL, 5 );
959 
960  wxGridSizer *item37 = new wxGridSizer( 2, 0, 0 );
961 
962  wxButton *item38 = new wxButton( parent, ID_HELP, wxT("&Help"), wxDefaultPosition, wxDefaultSize, 0 );
963  item37->Add( item38, 0, wxALL, 5 );
964 
965  wxBoxSizer *item39 = new wxBoxSizer( wxHORIZONTAL );
966 
967  wxButton *item40 = new wxButton( parent, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
968  item39->Add( item40, 0, wxALIGN_CENTER|wxALL, 5 );
969 
970  wxButton *item41 = new wxButton( parent, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
971  item39->Add( item41, 0, wxALIGN_CENTER|wxALL, 5 );
972 
973  item37->Add( item39, 0, wxALL, 5 );
974 
975  item0->Add( item37, 0, wxGROW|wxLEFT|wxRIGHT, 5 );
976 
977  if (set_sizer)
978  {
979  parent->SetSizer( item0 );
980  if (call_fit)
981  item0->SetSizeHints( parent );
982  }
983 
984  return item0;
985 }

◆ onActivateOperation()

void GCUDialog::onActivateOperation ( wxListEvent &  event)
private

Handles left mouse button double clicks on the operation list.

Definition at line 627 of file GCUDialog.cc.

627  {
628  wxCommandEvent dummy;
630 }

References dummy.

◆ onActivatePort()

void GCUDialog::onActivatePort ( wxListEvent &  event)
private

Handles left mouse button double clicks on the port list.

Definition at line 798 of file GCUDialog.cc.

798  {
799  wxCommandEvent dummy;
800  onEditPort(dummy);
801 }

References dummy.

◆ onAddFUPort()

void GCUDialog::onAddFUPort ( wxCommandEvent &  event)
private

Creates and shows an empty Function Unit Port Dialog for adding ports.

Definition at line 638 of file GCUDialog.cc.

638  {
639 
640  // Generate name for the new port.
641  int i = 1;
644  while (gcu_->hasPort(newName)) {
647  i++;
648  }
649 
650  FUPort* port = new FUPort(
651  newName, ModelConstants::DEFAULT_WIDTH, *gcu_, false, false);
652  FUPortDialog portDialog(this, port);
653  if (portDialog.ShowModal() == wxID_CANCEL) {
654  // adding port was cancelled
655  delete port;
656  }
657  updatePortList();
658 }

References ProDeConstants::COMP_NEW_NAME_PREFIX_PORT, ModelConstants::DEFAULT_WIDTH, and Conversion::toString().

Here is the call graph for this function:

◆ onAddOperation()

void GCUDialog::onAddOperation ( wxCommandEvent &  event)
private

Creates and shows an empty Operation Dialog for adding operations.

Definition at line 483 of file GCUDialog.cc.

483  {
484  ObjectState* gcu = gcu_->saveState();
485 
486  // Generate name for the new operation.
487  int i = 1;
490  while (gcu_->hasOperation(newName)) {
493  i++;
494  }
495 
496  HWOperation* operation = new HWOperation(newName, *gcu_);
497  OperationDialog dialog(this, operation);
498  if (dialog.ShowModal() == wxID_OK) {
499  delete gcu;
500  } else {
501  gcu_->loadState(gcu);
502  }
504 }

References ProDeConstants::COMP_NEW_NAME_PREFIX_OPERATION, and Conversion::toString().

Here is the call graph for this function:

◆ onAddSRPort()

void GCUDialog::onAddSRPort ( wxCommandEvent &  event)
private

Creates and shows an empty Special Register Port Dialog for adding ports.

Definition at line 665 of file GCUDialog.cc.

665  {
666 
667  // Generate name for the new port.
668  int i = 1;
671  while (gcu_->hasPort(newName)) {
674  i++;
675  }
676 
679 
680  SRPortDialog portDialog(this, port);
681  if (portDialog.ShowModal() == wxID_CANCEL) {
682  // adding port was cancelled
683  delete port;
684  }
685  updatePortList();
687 }

References ProDeConstants::COMP_NEW_NAME_PREFIX_PORT, ModelConstants::DEFAULT_WIDTH, and Conversion::toString().

Here is the call graph for this function:

◆ onDeleteOperation()

void GCUDialog::onDeleteOperation ( wxCommandEvent &  event)
private

Deletes selected operation from the operation list.

Definition at line 511 of file GCUDialog.cc.

511  {
513  if (name == "") {
514  return;
515  }
516  delete gcu_->operation(name);
518 }

References WidgetTools::lcStringSelection().

Here is the call graph for this function:

◆ onDeletePort()

void GCUDialog::onDeletePort ( wxCommandEvent &  event)
private

Deletes selected port from the port list.

Definition at line 694 of file GCUDialog.cc.

694  {
695  Port* selected = selectedPort();
696  if (selected == NULL) {
697  return;
698  }
699  delete selected;
700  updatePortList();
702 }

◆ onEditOperation()

void GCUDialog::onEditOperation ( wxCommandEvent &  event)
private

Handles the 'Edit Operation' button event.

Opens a OperationDialog with the selected operation's attributes set.

Definition at line 527 of file GCUDialog.cc.

527  {
528 
529  HWOperation* selected = selectedOperation();
530  if (selected == NULL) {
531  // No operation selected.
532  return;
533  }
534 
535  ObjectState* gcu = gcu_->saveState();
536  OperationDialog dialog(this, selected);
537  if (dialog.ShowModal() == wxID_OK) {
538  delete gcu;
539  } else {
540  gcu_->loadState(gcu);
541  }
543 }

◆ onEditPort()

void GCUDialog::onEditPort ( wxCommandEvent &  event)
private

Handles the 'Edit Port' button event.

Opens a FUPortDialog with the selected port set.

Definition at line 727 of file GCUDialog.cc.

727  {
728  BaseFUPort* selected = selectedPort();
729  if (selected == NULL) {
730  return;
731  }
732 
733  if (gcu_->hasSpecialRegisterPort(selected->name())) {
734  SpecialRegisterPort* port =
735  gcu_->specialRegisterPort(selected->name());
736  SRPortDialog portDialog(this, port);
737  portDialog.ShowModal();
738  } else if (gcu_->hasOperationPort(selected->name())) {
739  FUPort* port = gcu_->operationPort(selected->name());
740  FUPortDialog portDialog(this, port);
741  portDialog.ShowModal();
742  }
743  updatePortList();
745 }

References TTAMachine::Port::name().

Here is the call graph for this function:

◆ onHelp()

void GCUDialog::onHelp ( wxCommandEvent &  event)
private

◆ onName()

void GCUDialog::onName ( wxCommandEvent &  event)
private

Checks whether the name field is empty, and disables OK button of the dialog if it is.

Definition at line 465 of file GCUDialog.cc.

465  {
466  if (!TransferDataFromWindow()) {
467  assert(false);
468  }
469  wxString trimmedName = name_.Trim(false).Trim(true);
470  if (trimmedName == _T("")) {
471  FindWindow(wxID_OK)->Disable();
472  } else {
473  FindWindow(wxID_OK)->Enable();
474  }
475 }

References assert.

◆ onOK()

void GCUDialog::onOK ( wxCommandEvent &  event)
private

Validates input in the controls, and updates the ControlUnit.

Definition at line 378 of file GCUDialog.cc.

378  {
379 
380  if (!Validate()) {
381  return;
382  }
383 
384  if (!TransferDataFromWindow()) {
385  return;
386  }
387 
388  string trimmedName =
389  WxConversion::toString(name_.Trim(false).Trim(true));
390 
391  // Check the name validity.
392  if (!MachineTester::isValidComponentName(trimmedName)) {
394  format message =
396  InformationDialog warning(
397  this, WxConversion::toWxString(message.str()));
398  warning.ShowModal();
399  return;
400  }
401 
402  // Check that the name is not reserved for another FU.
403  if (trimmedName != gcu_->name()) {
406  for (int i = 0; i < navigator.count(); i++) {
407  FunctionUnit* fu = navigator.item(i);
408  if (trimmedName == fu->name()) {
409  ProDeTextGenerator* prodeTexts =
411  format message =
413  format a_fu =
415  format machine =
417  format gcu = prodeTexts->text(ProDeTextGenerator::COMP_GCU);
418  message % trimmedName % a_fu.str() % machine.str() % gcu.str();
419  WarningDialog warning(
420  this, WxConversion::toWxString(message.str()));
421  warning.ShowModal();
422  return;
423  }
424  }
425  }
426 
427  try {
428  gcu_->setName(trimmedName);
431  } catch (Exception& e) {
432  InformationDialog dialog(
434  dialog.ShowModal();
435  return;
436  }
437 
438  // set GCU address space
439  string asName =
440  WxConversion::toString(addressSpaceChoice_->GetStringSelection());
441 
443 
444  Machine::AddressSpaceNavigator asNavigator =
446 
447  assert(asNavigator.hasItem(asName));
448  AddressSpace* addressSpace = asNavigator.item(asName);
449  gcu_->setAddressSpace(addressSpace);
450 
451  } else {
452  // no address space set
453  gcu_->setAddressSpace(NULL);
454  }
455 
456  EndModal(wxID_OK);
457 }

References assert, ProDeTextGenerator::COMP_A_FUNCTION_UNIT, ProDeTextGenerator::COMP_GCU, ProDeTextGenerator::COMP_MACHINE, TTAMachine::Machine::Navigator< ComponentType >::count(), Exception::errorMessage(), TTAMachine::Machine::Navigator< ComponentType >::hasItem(), ProDeTextGenerator::instance(), MachineTester::isValidComponentName(), TTAMachine::Machine::Navigator< ComponentType >::item(), machine, ProDeTextGenerator::MSG_ERROR_ILLEGAL_NAME, ProDeTextGenerator::MSG_ERROR_SAME_NAME, TTAMachine::Component::name(), ProDeConstants::NONE, Texts::TextGenerator::text(), WxConversion::toString(), and WxConversion::toWxString().

Here is the call graph for this function:

◆ onOperationRightClick()

void GCUDialog::onOperationRightClick ( wxListEvent &  event)
private

Opens a pop-up menu when right mouse button was pressed on the operation list.

Parameters
eventInformation about right mouse click event.

Definition at line 603 of file GCUDialog.cc.

603  {
604 
605  operationList_->SetItemState(event.GetIndex(), wxLIST_STATE_SELECTED,
606  wxLIST_STATE_SELECTED);
607 
608  wxMenu* contextMenu = new wxMenu();
609 
611  format button = prodeTexts->text(
613  contextMenu->Append(
615  button = prodeTexts->text(
617  contextMenu->Append(
619  operationList_->PopupMenu(contextMenu, event.GetPoint());
620 }

References ProDeTextGenerator::instance(), Texts::TextGenerator::text(), WxConversion::toWxString(), ProDeTextGenerator::TXT_LABEL_BUTTON_DELETE, and ProDeTextGenerator::TXT_LABEL_BUTTON_EDIT.

Here is the call graph for this function:

◆ onOperationSelection()

void GCUDialog::onOperationSelection ( wxListEvent &  event)
private

Disables and enables Edit and Delete buttons under the operation list.

If a operation is selected, buttons are enabled. If no operation is selected the buttons will be disabled.

Parameters
eventListEvent, which may have changed the selection.

Definition at line 570 of file GCUDialog.cc.

570  {
571  if (operationList_->GetSelectedItemCount() != 1) {
572  FindWindow(ID_DELETE_OPERATION)->Disable();
573  FindWindow(ID_EDIT_OPERATION)->Disable();
574  return;
575  }
576  FindWindow(ID_DELETE_OPERATION)->Enable();
577  FindWindow(ID_EDIT_OPERATION)->Enable();
578 }

◆ onPortRightClick()

void GCUDialog::onPortRightClick ( wxListEvent &  event)
private

Opens a pop-up menu when right mouse button was pressed on the port list.

Parameters
eventInformation about right mouse click event.

Definition at line 774 of file GCUDialog.cc.

774  {
775 
776  portList_->SetItemState(event.GetIndex(), wxLIST_STATE_SELECTED,
777  wxLIST_STATE_SELECTED);
778 
779  wxMenu* contextMenu = new wxMenu();
780 
782  format button = prodeTexts->text(
784  contextMenu->Append(
785  ID_EDIT_PORT, WxConversion::toWxString(button.str()));
786  button = prodeTexts->text(
788  contextMenu->Append(
790  portList_->PopupMenu(contextMenu, event.GetPoint());
791 }

References ProDeTextGenerator::instance(), Texts::TextGenerator::text(), WxConversion::toWxString(), ProDeTextGenerator::TXT_LABEL_BUTTON_DELETE, and ProDeTextGenerator::TXT_LABEL_BUTTON_EDIT.

Here is the call graph for this function:

◆ onPortSelection()

void GCUDialog::onPortSelection ( wxListEvent &  event)
private

Disables and enables Edit and Delete buttons under the port list.

If a port is selected, buttons are enabled. If no port is selected the buttons will be disabled.

Parameters
eventListEvent, which may have changed the selection.

Definition at line 757 of file GCUDialog.cc.

757  {
758  if (portList_->GetSelectedItemCount() != 1) {
759  FindWindow(ID_DELETE_PORT)->Disable();
760  FindWindow(ID_EDIT_PORT)->Disable();
761  return;
762  }
763  FindWindow(ID_DELETE_PORT)->Enable();
764  FindWindow(ID_EDIT_PORT)->Enable();
765 }

◆ onRAPortChoice()

void GCUDialog::onRAPortChoice ( wxCommandEvent &  event)
private

Sets the return address port when return address port choicer selection changes.

Definition at line 809 of file GCUDialog.cc.

809  {
810 
811  if (raPortChoice_->GetStringSelection() == ProDeConstants::NONE) {
813  return;
814  }
815 
816  string selection =
817  WxConversion::toString(raPortChoice_->GetStringSelection());
818 
819  SpecialRegisterPort* port = gcu_->specialRegisterPort(selection);
820 
821  assert(port != NULL);
822 
823  gcu_->setReturnAddressPort(*port);
825 }

References assert, ProDeConstants::NONE, and WxConversion::toString().

Here is the call graph for this function:

◆ selectedOperation()

HWOperation * GCUDialog::selectedOperation ( )
private

Returns pointer to the operation, which is selected on the operation list.

Returns
Pointer to the selected operation.

Definition at line 552 of file GCUDialog.cc.

552  {
554  if (name == "") {
555  return NULL;
556  }
557  return gcu_->operation(name);
558 }

References WidgetTools::lcStringSelection().

Here is the call graph for this function:

◆ selectedPort()

BaseFUPort * GCUDialog::selectedPort ( )
private

Returns a pointer to the port selected in the port list.

Returns
Pointer to the port selected in the port list.

Definition at line 711 of file GCUDialog.cc.

711  {
712  string name = WidgetTools::lcStringSelection(portList_, 2);
713  if (name == "") {
714  return NULL;
715  }
716  BaseFUPort* port = gcu_->port(name);
717  return port;
718 }

References WidgetTools::lcStringSelection().

Here is the call graph for this function:

◆ setLabels()

void GCUDialog::setLabels ( )
private

Sets the widget labels to texts provided by the GUITextGenerator.

Definition at line 158 of file GCUDialog.cc.

158  {
159 
162 
163  // Dialog title
164  format fmt = prodeTexts->text(ProDeTextGenerator::TXT_GCU_DIALOG_TITLE);
165  string title = fmt.str();
166  SetTitle(WxConversion::toWxString(title));
167 
168  // buttons
169  WidgetTools::setLabel(generator, FindWindow(wxID_OK),
171 
172  WidgetTools::setLabel(generator, FindWindow(wxID_CANCEL),
174 
177 
180 
183 
186 
189 
192 
195 
198 
199  // widget labels
202 
205 
208 
209  //WidgetTools::setLabel(
210  //prodeTexts, FindWindow(ID_LABEL_GLOBAL_GUARD_LATENCY),
211  //ProDeTextGenerator::TXT_LABEL_GLOBAL_GUARD_LATENCY);
212 
213  // box sizer labels
214  fmt = prodeTexts->text(ProDeTextGenerator::TXT_GCU_PORTS_BOX);
216 
217 
218  // Create operation list columns.
219  fmt = prodeTexts->text(ProDeTextGenerator::TXT_COLUMN_NAME);
220  wxListCtrl* operationList =
221  dynamic_cast<wxListCtrl*>(FindWindow(ID_OPERATION_LIST));
222  operationList->InsertColumn(0, WxConversion::toWxString(fmt.str()),
223  wxLIST_FORMAT_LEFT, 260);
224 
225  // Create port list columns.
227  portList_->InsertColumn(0, WxConversion::toWxString(fmt.str()),
228  wxLIST_FORMAT_CENTER, 30);
229  fmt = prodeTexts->text(ProDeTextGenerator::TXT_COLUMN_SRP);
230  portList_->InsertColumn(1, WxConversion::toWxString(fmt.str()),
231  wxLIST_FORMAT_CENTER, 40);
232  fmt = prodeTexts->text(ProDeTextGenerator::TXT_COLUMN_NAME);
233  portList_->InsertColumn(2, WxConversion::toWxString(fmt.str()),
234  wxLIST_FORMAT_LEFT, 110);
235  fmt = prodeTexts->text(ProDeTextGenerator::TXT_COLUMN_WIDTH);
236  portList_->InsertColumn(3, WxConversion::toWxString(fmt.str()),
237  wxLIST_FORMAT_LEFT, 110);
238 }

References GUITextGenerator::instance(), ProDeTextGenerator::instance(), WidgetTools::setLabel(), WidgetTools::setWidgetLabel(), Texts::TextGenerator::text(), WxConversion::toWxString(), GUITextGenerator::TXT_BUTTON_ADD_DIALOG, ProDeTextGenerator::TXT_BUTTON_ADD_FU_PORT, ProDeTextGenerator::TXT_BUTTON_ADD_SR_PORT, GUITextGenerator::TXT_BUTTON_CANCEL, GUITextGenerator::TXT_BUTTON_DELETE, GUITextGenerator::TXT_BUTTON_EDIT_DIALOG, GUITextGenerator::TXT_BUTTON_HELP, GUITextGenerator::TXT_BUTTON_OK, ProDeTextGenerator::TXT_COLUMN_NAME, ProDeTextGenerator::TXT_COLUMN_SRP, ProDeTextGenerator::TXT_COLUMN_TRIGGERS, ProDeTextGenerator::TXT_COLUMN_WIDTH, ProDeTextGenerator::TXT_GCU_DELAY_SLOTS, ProDeTextGenerator::TXT_GCU_DIALOG_TITLE, ProDeTextGenerator::TXT_GCU_PORTS_BOX, ProDeTextGenerator::TXT_LABEL_ADDRESS_SPACE, and ProDeTextGenerator::TXT_LABEL_NAME.

Here is the call graph for this function:

◆ TransferDataToWindow()

bool GCUDialog::TransferDataToWindow ( )
privatevirtual

Transfers data from the GCU object to the dialog widgets.

Returns
false, if an error occured in the transfer.

Definition at line 247 of file GCUDialog.cc.

247  {
253  updatePortList();
255 
256  // wxWidgets GTK1 version seems to bug with spincontrol validators.
257  // The widget value has to be set manually.
258  dynamic_cast<wxSpinCtrl*>(
260 
261  return wxWindow::TransferDataToWindow();
262 }

References WxConversion::toWxString().

Here is the call graph for this function:

◆ updateAddressSpaceChoice()

void GCUDialog::updateAddressSpaceChoice ( )
private

Updates 'Address Space' choice control.

Clears all items from the choicer and adds all address spaces plus an item 'NONE' indicating empty selection.

Definition at line 272 of file GCUDialog.cc.

272  {
273 
274  addressSpaceChoice_->Clear();
276 
277  // Put each address space of the Machine to the control.
280 
281  for (int i = 0;i < navigator.count(); i++) {
282  AddressSpace* as = navigator.item(i);
283  wxString name = WxConversion::toWxString(as->name());
284  addressSpaceChoice_->Append(name);
285  }
286 
287  if (gcu_->addressSpace() != NULL) {
288 
289  wxString asName =
291 
292  addressSpaceChoice_->SetStringSelection(asName);
293 
294  } else {
295  addressSpaceChoice_->SetStringSelection(ProDeConstants::NONE);
296  }
297 }

References TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Component::name(), ProDeConstants::NONE, and WxConversion::toWxString().

Here is the call graph for this function:

◆ updateOperationList()

void GCUDialog::updateOperationList ( )
private

Updates the operation list.

Definition at line 585 of file GCUDialog.cc.

585  {
586  operationList_->DeleteAllItems();
587  for (int i=0; i < gcu_->operationCount(); i++) {
588  wxString name = WxConversion::toWxString(gcu_->operation(i)->name());
589  operationList_->InsertItem(0, name);
590  }
591  wxListEvent dummy;
593 }

References dummy, and WxConversion::toWxString().

Here is the call graph for this function:

◆ updatePortList()

void GCUDialog::updatePortList ( )
private

Updates 'Ports' list control.

Clears all items from the choicer and adds all ports.

Definition at line 334 of file GCUDialog.cc.

334  {
335 
336  portList_->DeleteAllItems();
337 
338  // Current list index is stored in a separate variable because of
339  // possible omitting of the return address port.
340  int index = 0;
341  for (int i = 0; i < gcu_->portCount(); i++) {
342 
343  BaseFUPort* port = gcu_->port(i);
344 
345  bool triggers = port->isTriggering();
346  string width = Conversion::toString(port->width());
347  string name = port->name();
348 
349  // set asterisk symbol in the "T" column if port triggers
350  if (!triggers) {
351  portList_->InsertItem(index, _T(""), 0);
352  } else {
353  portList_->InsertItem(index, _T("*"), 0);
354  }
355 
356  // set asterisk symbol in the "SRP" column if the port is
357  // a special register port
358  if (gcu_->hasSpecialRegisterPort(port->name())) {
359  portList_->SetItem(index, 1, _T("*"));
360  } else {
361  portList_->SetItem(index, 1, _T(""));
362  }
363 
364  portList_->SetItem(index, 2, WxConversion::toWxString(name));
365  portList_->SetItem(index, 3, WxConversion::toWxString(width));
366 
367  index++;
368  }
369  wxListEvent dummy;
371 }

References dummy, TTAMachine::BaseFUPort::isTriggering(), TTAMachine::Port::name(), Conversion::toString(), WxConversion::toWxString(), and TTAMachine::BaseFUPort::width().

Here is the call graph for this function:

◆ updateRAPortChoice()

void GCUDialog::updateRAPortChoice ( )
private

Updates the Return address port choicer when the return address port choicer selection is changed.

Definition at line 305 of file GCUDialog.cc.

305  {
306 
307  wxString selection = raPortChoice_->GetStringSelection();
308 
309  raPortChoice_->Clear();
311  raPortChoice_->SetSelection(0);
312 
313  for (int i = 0; i < gcu_->specialRegisterPortCount(); i++) {
315  string portName = port->name();
316  raPortChoice_->Append(WxConversion::toWxString(portName));
317 
318  if (gcu_->hasReturnAddressPort() &&
319  port == gcu_->returnAddressPort()) {
320 
321  raPortChoice_->SetStringSelection(
322  WxConversion::toWxString(portName));
323  }
324  }
325 }

References TTAMachine::Port::name(), ProDeConstants::NONE, and WxConversion::toWxString().

Here is the call graph for this function:

◆ updateSocketChoicers()

void GCUDialog::updateSocketChoicers ( )
private

Member Data Documentation

◆ addressSpaceChoice_

wxChoice* GCUDialog::addressSpaceChoice_
private

Address Space choice control.

Definition at line 96 of file GCUDialog.hh.

◆ delaySlots_

int GCUDialog::delaySlots_
private

Number of delay slots of the global control unit.

Definition at line 91 of file GCUDialog.hh.

◆ gcu_

TTAMachine::ControlUnit* GCUDialog::gcu_
private

The Global Control Unit to be modified with the dialog.

Definition at line 87 of file GCUDialog.hh.

◆ guardLatency_

int GCUDialog::guardLatency_
private

Guard latency of the gcu.

Definition at line 93 of file GCUDialog.hh.

◆ name_

wxString GCUDialog::name_
private

Name of the global control unit.

Definition at line 89 of file GCUDialog.hh.

◆ operationList_

wxListCtrl* GCUDialog::operationList_
private

Operation list widget.

Definition at line 101 of file GCUDialog.hh.

◆ operationsSizer_

wxStaticBoxSizer* GCUDialog::operationsSizer_
private

Box sizer for the operations list controls.

Definition at line 106 of file GCUDialog.hh.

◆ portList_

wxListCtrl* GCUDialog::portList_
private

Port list widget.

Definition at line 103 of file GCUDialog.hh.

◆ portListSizer_

wxStaticBoxSizer* GCUDialog::portListSizer_
private

Box sizer for the port list controls.

Definition at line 108 of file GCUDialog.hh.

◆ raPortChoice_

wxChoice* GCUDialog::raPortChoice_
private

Return address port choice control.

Definition at line 98 of file GCUDialog.hh.


The documentation for this class was generated from the following files:
GCUDialog::ID_EDIT_PORT
@ ID_EDIT_PORT
Definition: GCUDialog.hh:127
ProDeTextGenerator::TXT_GCU_DIALOG_TITLE
@ TXT_GCU_DIALOG_TITLE
GCU Dialog title.
Definition: ProDeTextGenerator.hh:143
WarningDialog
Definition: WarningDialog.hh:42
GCUDialog::ID_PORT_LIST
@ ID_PORT_LIST
Definition: GCUDialog.hh:118
GCUDialog::ID_LABEL_RA_CHOICE
@ ID_LABEL_RA_CHOICE
Definition: GCUDialog.hh:136
WxConversion::toWxString
static wxString toWxString(const std::string &source)
TTAMachine::Component::name
virtual TCEString name() const
Definition: MachinePart.cc:125
ProDeTextGenerator::TXT_BUTTON_ADD_SR_PORT
@ TXT_BUTTON_ADD_SR_PORT
Label for GCUdlg add FU port btn.
Definition: ProDeTextGenerator.hh:97
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
GCUDialog::ID_ADD_SR_PORT
@ ID_ADD_SR_PORT
Definition: GCUDialog.hh:126
TTAMachine::HWOperation
Definition: HWOperation.hh:52
TTAMachine::AddressSpace
Definition: AddressSpace.hh:51
GCUDialog::ID_TEXT_AS
@ ID_TEXT_AS
Definition: GCUDialog.hh:132
WidgetTools::setLabel
static void setLabel(Texts::TextGenerator *generator, wxWindow *widget, int textID)
Definition: WidgetTools.cc:92
GCUDialog::ID_LABEL_OP_CHOICE
@ ID_LABEL_OP_CHOICE
Definition: GCUDialog.hh:137
TTAMachine::BaseFUPort
Definition: BaseFUPort.hh:44
TTAMachine::ControlUnit::saveState
virtual ObjectState * saveState() const
Definition: ControlUnit.cc:322
GCUDialog::operationList_
wxListCtrl * operationList_
Operation list widget.
Definition: GCUDialog.hh:101
GUITextGenerator::instance
static GUITextGenerator * instance()
Definition: GUITextGenerator.cc:67
GCUDialog::guardLatency_
int guardLatency_
Guard latency of the gcu.
Definition: GCUDialog.hh:93
GUITextGenerator
Definition: GUITextGenerator.hh:46
ObjectState
Definition: ObjectState.hh:59
GUITextGenerator::TXT_BUTTON_HELP
@ TXT_BUTTON_HELP
Label for help button.
Definition: GUITextGenerator.hh:60
TTAMachine::FunctionUnit::port
virtual BaseFUPort * port(const std::string &name) const
Definition: FunctionUnit.cc:145
FindWindow
Definition: FindWindow.hh:49
TTAMachine::FunctionUnit::addressSpace
virtual AddressSpace * addressSpace() const
Definition: FunctionUnit.cc:580
ProDeTextGenerator::COMP_A_FUNCTION_UNIT
@ COMP_A_FUNCTION_UNIT
Name for FU (w/ article).
Definition: ProDeTextGenerator.hh:264
GCUDialog::ID_OPERATION_LIST
@ ID_OPERATION_LIST
Definition: GCUDialog.hh:117
ProDeTextGenerator::TXT_COLUMN_WIDTH
@ TXT_COLUMN_WIDTH
Label for width column in a list.
Definition: ProDeTextGenerator.hh:109
ProDeConstants::COMP_NEW_NAME_PREFIX_PORT
static const std::string COMP_NEW_NAME_PREFIX_PORT
Prefix for new port names.
Definition: ProDeConstants.hh:373
GCUDialog::onEditPort
void onEditPort(wxCommandEvent &event)
Definition: GCUDialog.cc:727
TTAMachine::Machine::Navigator::count
int count() const
Texts::TextGenerator::text
virtual boost::format text(int textId)
Definition: TextGenerator.cc:94
Conversion::toString
static std::string toString(const T &source)
GCUDialog::delaySlots_
int delaySlots_
Number of delay slots of the global control unit.
Definition: GCUDialog.hh:91
ProDeTextGenerator::TXT_LABEL_BUTTON_EDIT
@ TXT_LABEL_BUTTON_EDIT
Label for &Edit... button.
Definition: ProDeTextGenerator.hh:96
ProDeTextGenerator
Definition: ProDeTextGenerator.hh:49
GCUDialog::ID_EDIT_OPERATION
@ ID_EDIT_OPERATION
Definition: GCUDialog.hh:123
ProDeTextGenerator::MSG_ERROR_ILLEGAL_NAME
@ MSG_ERROR_ILLEGAL_NAME
Error: Illegal component name.
Definition: ProDeTextGenerator.hh:223
GCUDialog::ID_TEXT_INPUT_SOCKET
@ ID_TEXT_INPUT_SOCKET
Definition: GCUDialog.hh:133
GCUDialog::ID_NAME
@ ID_NAME
Definition: GCUDialog.hh:112
ProDeTextGenerator::MSG_ERROR_SAME_NAME
@ MSG_ERROR_SAME_NAME
Error: Same name exists.
Definition: ProDeTextGenerator.hh:229
TTAMachine::ControlUnit::setGlobalGuardLatency
void setGlobalGuardLatency(int latency)
Definition: ControlUnit.cc:159
GCUDialog::portListSizer_
wxStaticBoxSizer * portListSizer_
Box sizer for the port list controls.
Definition: GCUDialog.hh:108
GCUDialog::operationsSizer_
wxStaticBoxSizer * operationsSizer_
Box sizer for the operations list controls.
Definition: GCUDialog.hh:106
assert
#define assert(condition)
Definition: Application.hh:86
TTAMachine::FunctionUnit
Definition: FunctionUnit.hh:55
ProDeTextGenerator::TXT_GCU_PORTS_BOX
@ TXT_GCU_PORTS_BOX
Port list box title.
Definition: ProDeTextGenerator.hh:145
GCUDialog::setLabels
void setLabels()
Definition: GCUDialog.cc:158
ProDeConstants::COMP_NEW_NAME_PREFIX_OPERATION
static const std::string COMP_NEW_NAME_PREFIX_OPERATION
Prefix for new operation names.
Definition: ProDeConstants.hh:377
TTAMachine::FUPort
Definition: FUPort.hh:46
ProDeTextGenerator::TXT_COLUMN_SRP
@ TXT_COLUMN_SRP
Label for sp.reg. port column.
Definition: ProDeTextGenerator.hh:128
GUITextGenerator::TXT_BUTTON_CANCEL
@ TXT_BUTTON_CANCEL
Label for cancel button.
Definition: GUITextGenerator.hh:55
ModelConstants::DEFAULT_WIDTH
static const int DEFAULT_WIDTH
Default bit width.
Definition: ModelConstants.hh:46
GCUDialog::ID_HELP
@ ID_HELP
Definition: GCUDialog.hh:129
GCUDialog::ID_ADD_FU_PORT
@ ID_ADD_FU_PORT
Definition: GCUDialog.hh:125
TTAMachine::SpecialRegisterPort
Definition: SpecialRegisterPort.hh:48
TTAMachine::HWOperation::name
const std::string & name() const
Definition: HWOperation.cc:141
GCUDialog::ID_DELAY_SLOTS
@ ID_DELAY_SLOTS
Definition: GCUDialog.hh:114
GCUDialog::portList_
wxListCtrl * portList_
Port list widget.
Definition: GCUDialog.hh:103
GCUDialog::updatePortList
void updatePortList()
Definition: GCUDialog.cc:334
GCUDialog::ID_TEXT_NAME
@ ID_TEXT_NAME
Definition: GCUDialog.hh:130
ProDeTextGenerator::COMP_GCU
@ COMP_GCU
Name for control unit.
Definition: ProDeTextGenerator.hh:265
TTAMachine::Port
Definition: Port.hh:54
ProDeTextGenerator::TXT_BUTTON_ADD_FU_PORT
@ TXT_BUTTON_ADD_FU_PORT
Label for GCUdlg add SR port btn.
Definition: ProDeTextGenerator.hh:98
TTAMachine::ControlUnit::specialRegisterPort
SpecialRegisterPort * specialRegisterPort(int index) const
Definition: ControlUnit.cc:211
dummy
SimValue dummy(32)
a dummy simvalue which is given for operands that are not bound
TTAMachine::Machine::Navigator::hasItem
bool hasItem(const std::string &name) const
ProDeTextGenerator::TXT_COLUMN_TRIGGERS
@ TXT_COLUMN_TRIGGERS
Label for T column in a list.
Definition: ProDeTextGenerator.hh:119
WidgetTools::lcStringSelection
static std::string lcStringSelection(wxListCtrl *list, int column)
Definition: WidgetTools.cc:108
GCUDialog::ID_DELETE_OPERATION
@ ID_DELETE_OPERATION
Definition: GCUDialog.hh:124
GCUDialog::gcu_
TTAMachine::ControlUnit * gcu_
The Global Control Unit to be modified with the dialog.
Definition: GCUDialog.hh:87
TTAMachine::ControlUnit::specialRegisterPortCount
int specialRegisterPortCount() const
Definition: ControlUnit.cc:185
GCUDialog::ID_TEXT_DS
@ ID_TEXT_DS
Definition: GCUDialog.hh:131
TTAMachine::Machine::functionUnitNavigator
virtual FunctionUnitNavigator functionUnitNavigator() const
Definition: Machine.cc:380
SRPortDialog
Definition: SRPortDialog.hh:44
ProDeTextGenerator::TXT_LABEL_NAME
@ TXT_LABEL_NAME
Label for component name widget.
Definition: ProDeTextGenerator.hh:56
GCUDialog::ID_ADD_OPERATION
@ ID_ADD_OPERATION
Definition: GCUDialog.hh:122
TTAMachine::FunctionUnit::operationCount
virtual int operationCount() const
Definition: FunctionUnit.cc:419
TTAMachine::ControlUnit::loadState
virtual void loadState(const ObjectState *state)
Definition: ControlUnit.cc:351
TTAMachine::Unit::hasPort
virtual bool hasPort(const std::string &name) const
Definition: Unit.cc:96
TTAMachine::ControlUnit::unsetReturnAddressPort
void unsetReturnAddressPort()
Definition: ControlUnit.cc:284
TTAMachine::ControlUnit::delaySlots
int delaySlots() const
TTAMachine::FunctionUnit::hasOperation
virtual bool hasOperation(const std::string &name) const
Definition: FunctionUnit.cc:330
Exception
Definition: Exception.hh:54
TTAMachine::FunctionUnit::setAddressSpace
virtual void setAddressSpace(AddressSpace *as)
Definition: FunctionUnit.cc:594
TTAMachine::Machine::addressSpaceNavigator
virtual AddressSpaceNavigator addressSpaceNavigator() const
Definition: Machine.cc:392
TTAMachine::ControlUnit::setDelaySlots
void setDelaySlots(int delaySlots)
Definition: ControlUnit.cc:145
MachineTester::isValidComponentName
static bool isValidComponentName(const std::string &name)
Definition: MachineTester.cc:312
TTAMachine::BaseFUPort::isTriggering
virtual bool isTriggering() const =0
GCUDialog::ID_LINE
@ ID_LINE
Definition: GCUDialog.hh:121
GCUDialog::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition: GCUDialog.cc:840
TTAMachine::ControlUnit::hasSpecialRegisterPort
bool hasSpecialRegisterPort(const std::string &name) const
Definition: ControlUnit.cc:197
TTAMachine::Unit::portCount
virtual int portCount() const
Definition: Unit.cc:135
GCUDialog::addressSpaceChoice_
wxChoice * addressSpaceChoice_
Address Space choice control.
Definition: GCUDialog.hh:96
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
GCUDialog::onEditOperation
void onEditOperation(wxCommandEvent &event)
Definition: GCUDialog.cc:527
GCUDialog::name_
wxString name_
Name of the global control unit.
Definition: GCUDialog.hh:89
TTAMachine::FunctionUnit::hasOperationPort
virtual bool hasOperationPort(const std::string &name) const
Definition: FunctionUnit.cc:204
GCUDialog::ID_TEXT_RA_WIDTH
@ ID_TEXT_RA_WIDTH
Definition: GCUDialog.hh:135
ProDeTextGenerator::instance
static ProDeTextGenerator * instance()
Definition: ProDeTextGenerator.cc:382
GCUDialog::ID_OP_CHOICE
@ ID_OP_CHOICE
Definition: GCUDialog.hh:120
GCUDialog::selectedPort
TTAMachine::BaseFUPort * selectedPort()
Definition: GCUDialog.cc:711
GCUDialog::ID_TEXT_OUTPUT_SOCKET
@ ID_TEXT_OUTPUT_SOCKET
Definition: GCUDialog.hh:134
GCUDialog::ID_TEXT
@ ID_TEXT
Definition: GCUDialog.hh:113
GUITextGenerator::TXT_BUTTON_ADD_DIALOG
@ TXT_BUTTON_ADD_DIALOG
Label for add button (with trailing ...).
Definition: GUITextGenerator.hh:54
GCUDialog::ID_RA_CHOICE
@ ID_RA_CHOICE
Definition: GCUDialog.hh:119
GUITextGenerator::TXT_BUTTON_EDIT_DIALOG
@ TXT_BUTTON_EDIT_DIALOG
Label for edit button (with trailing ...).
Definition: GUITextGenerator.hh:58
GCUDialog::updateAddressSpaceChoice
void updateAddressSpaceChoice()
Definition: GCUDialog.cc:272
TTAMachine::Component::machine
virtual Machine * machine() const
TTAMachine::Port::name
virtual std::string name() const
Definition: Port.cc:141
GCUDialog::TransferDataToWindow
virtual bool TransferDataToWindow()
Definition: GCUDialog.cc:247
GCUDialog::ID_ADDRESS_SPACE
@ ID_ADDRESS_SPACE
Definition: GCUDialog.hh:116
TTAMachine::ControlUnit::setReturnAddressPort
void setReturnAddressPort(const SpecialRegisterPort &port)
Definition: ControlUnit.cc:271
ProDeTextGenerator::COMP_MACHINE
@ COMP_MACHINE
Text for machine description.
Definition: ProDeTextGenerator.hh:252
TTAMachine::Machine::Navigator::item
ComponentType * item(int index) const
TTAMachine::FunctionUnit::operation
virtual HWOperation * operation(const std::string &name) const
Definition: FunctionUnit.cc:363
WidgetTools::setWidgetLabel
static void setWidgetLabel(wxWindow *widget, std::string text)
Definition: WidgetTools.cc:52
InformationDialog
Definition: InformationDialog.hh:42
GCUDialog::updateOperationList
void updateOperationList()
Definition: GCUDialog.cc:585
TTAMachine::FunctionUnit::operationPort
virtual FUPort * operationPort(const std::string &name) const
Definition: FunctionUnit.cc:224
TTAMachine::ControlUnit::globalGuardLatency
int globalGuardLatency() const
TTAMachine::ControlUnit::returnAddressPort
SpecialRegisterPort * returnAddressPort() const
Definition: ControlUnit.cc:307
GCUDialog::onPortSelection
void onPortSelection(wxListEvent &event)
Definition: GCUDialog.cc:757
GCUDialog::ID_DELETE_PORT
@ ID_DELETE_PORT
Definition: GCUDialog.hh:128
GCUDialog::selectedOperation
TTAMachine::HWOperation * selectedOperation()
Definition: GCUDialog.cc:552
ProDeConstants::NONE
static const wxString NONE
Constant for "None".
Definition: ProDeConstants.hh:56
WxConversion::toString
static std::string toString(const wxString &source)
TTAMachine::FunctionUnit::setName
virtual void setName(const std::string &name)
Definition: FunctionUnit.cc:118
ProDeTextGenerator::TXT_COLUMN_NAME
@ TXT_COLUMN_NAME
Label for name column in a list.
Definition: ProDeTextGenerator.hh:105
ProDeTextGenerator::TXT_GCU_DELAY_SLOTS
@ TXT_GCU_DELAY_SLOTS
Delay slots control label.
Definition: ProDeTextGenerator.hh:146
FUPortDialog
Definition: FUPortDialog.hh:44
TTAMachine::Machine::Navigator
Definition: Machine.hh:186
GCUDialog::updateRAPortChoice
void updateRAPortChoice()
Definition: GCUDialog.cc:305
TTAMachine::ControlUnit::hasReturnAddressPort
bool hasReturnAddressPort() const
Definition: ControlUnit.cc:295
GCUDialog::raPortChoice_
wxChoice * raPortChoice_
Return address port choice control.
Definition: GCUDialog.hh:98
OperationDialog
Definition: OperationDialog.hh:49
ProDeTextGenerator::TXT_LABEL_ADDRESS_SPACE
@ TXT_LABEL_ADDRESS_SPACE
Label for address spave selector.
Definition: ProDeTextGenerator.hh:59
TTAMachine::BaseFUPort::width
virtual int width() const
Definition: BaseFUPort.cc:109
GUITextGenerator::TXT_BUTTON_OK
@ TXT_BUTTON_OK
Label for OK button.
Definition: GUITextGenerator.hh:59
GCUDialog::onOperationSelection
void onOperationSelection(wxListEvent &event)
Definition: GCUDialog.cc:570