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

#include <BusDialog.hh>

Inheritance diagram for BusDialog:
Inheritance graph
Collaboration diagram for BusDialog:
Collaboration graph

Public Member Functions

 BusDialog (wxWindow *parent, TTAMachine::Bus *bus)
 
virtual ~BusDialog ()
 

Private Types

enum  {
  ID_BUS_NAME = 10000, ID_BUS_WIDTH, ID_SI_WIDTH, ID_SI_EXTENSION,
  ID_TRUE_GUARD, ID_FALSE_GUARD, ID_SEGMENT_LIST, ID_SEGMENT_NAME,
  ID_SEGMENT_UP, ID_SEGMENT_DOWN, ID_ADD_SEGMENT, ID_DELETE_SEGMENT,
  ID_RF_GUARD_LIST, ID_ADD_RF_GUARD, ID_EDIT_RF_GUARD, ID_DELETE_RF_GUARD,
  ID_FU_GUARD_LIST, ID_ADD_FU_GUARD, ID_EDIT_FU_GUARD, ID_DELETE_FU_GUARD,
  ID_HELP, ID_LABEL_BUS_NAME, ID_LABEL_BUS_WIDTH, ID_LABEL_WIDTH,
  ID_LABEL_SI_WIDTH, ID_LABEL_SEGMENT_NAME
}
 enumerated IDs for dialog controls More...
 

Private Member Functions

virtual bool TransferDataToWindow ()
 
void onOK (wxCommandEvent &)
 
void onHelp (wxCommandEvent &event)
 
void onBusName (wxCommandEvent &)
 
void onAddSegment (wxCommandEvent &)
 
void onSegmentName (wxCommandEvent &)
 
void onSegmentSelection (wxListEvent &)
 
void onSegmentRightClick (wxListEvent &event)
 
void onDeleteSegment (wxCommandEvent &)
 
void onSegmentUp (wxCommandEvent &)
 
void onSegmentDown (wxCommandEvent &)
 
void setTexts ()
 
void onRFGuardSelection (wxListEvent &)
 
void onAddRFGuard (wxCommandEvent &)
 
void onDeleteRFGuard (wxCommandEvent &)
 
void onEditRFGuard (wxCommandEvent &)
 
void onFUGuardSelection (wxListEvent &)
 
void onAddFUGuard (wxCommandEvent &)
 
void onDeleteFUGuard (wxCommandEvent &)
 
void onEditFUGuard (wxCommandEvent &)
 
void onUnconditionalGuard (wxCommandEvent &)
 
void onWidth (wxSpinEvent &)
 
void updateSegmentList ()
 
void updateGuardLists ()
 
void onRFGuardRightClick (wxListEvent &event)
 
void onActivateRFGuard (wxListEvent &event)
 
void onFUGuardRightClick (wxListEvent &event)
 
void onActivateFUGuard (wxListEvent &event)
 
TTAMachine::SegmentselectedSegment () const
 
TTAMachine::RegisterGuardselectedRFGuard () const
 
TTAMachine::PortGuardselectedFUGuard () const
 
wxSizer * createContents (wxWindow *parent, bool call_fit, bool set_sizer)
 

Private Attributes

TTAMachine::Busbus_
 Transport Bus to edit. More...
 
wxString name_
 Name of the bus. More...
 
int width_
 Width of the bus. More...
 
int immWidth_
 Short immediate width. More...
 
wxString newSegName_
 Name for a new segment. More...
 
wxListCtrl * segList_
 List widget for the segment list. More...
 
wxCheckBox * alwaysTrueGuard_
 Check box for always true unconditional guard. More...
 
wxCheckBox * alwaysFalseGuard_
 Check box for always false unconditional guard. More...
 
wxRadioBox * immediateExtensionBox_
 Radio box for immediate extension. More...
 
wxListCtrl * rfGuardList_
 Register file guard list control. More...
 
wxListCtrl * fuGuardList_
 Function unit port guard list control. More...
 
wxStaticBoxSizer * busSizer_
 Static boxsizer for the bus properties. More...
 
wxStaticBoxSizer * siSizer_
 Static boxsizer for the short immediate properties. More...
 
wxStaticBoxSizer * registerGuardSizer_
 Static boxsizer for the register guard properties. More...
 
wxStaticBoxSizer * portGuardSizer_
 Static boxsizer for the port guard properties. More...
 
wxStaticBoxSizer * segmentSizer_
 Static boxsizer for the segment properties. More...
 
vector< TTAMachine::RegisterGuard * > registerGuards_
 list of register guards More...
 
vector< TTAMachine::PortGuard * > portGuards_
 list of port guards More...
 

Detailed Description

Dialog for querying transport bus parameters from the user.

Definition at line 54 of file BusDialog.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private

enumerated IDs for dialog controls

Enumerator
ID_BUS_NAME 
ID_BUS_WIDTH 
ID_SI_WIDTH 
ID_SI_EXTENSION 
ID_TRUE_GUARD 
ID_FALSE_GUARD 
ID_SEGMENT_LIST 
ID_SEGMENT_NAME 
ID_SEGMENT_UP 
ID_SEGMENT_DOWN 
ID_ADD_SEGMENT 
ID_DELETE_SEGMENT 
ID_RF_GUARD_LIST 
ID_ADD_RF_GUARD 
ID_EDIT_RF_GUARD 
ID_DELETE_RF_GUARD 
ID_FU_GUARD_LIST 
ID_ADD_FU_GUARD 
ID_EDIT_FU_GUARD 
ID_DELETE_FU_GUARD 
ID_HELP 
ID_LABEL_BUS_NAME 
ID_LABEL_BUS_WIDTH 
ID_LABEL_WIDTH 
ID_LABEL_SI_WIDTH 
ID_LABEL_SEGMENT_NAME 

Definition at line 138 of file BusDialog.hh.

Constructor & Destructor Documentation

◆ BusDialog()

BusDialog::BusDialog ( wxWindow *  parent,
TTAMachine::Bus bus 
)

The Constructor.

Parameters
parentParent window of the dialog.
busTransport bus to be modified with the dialog.

Definition at line 122 of file BusDialog.cc.

124  :
125  wxDialog(parent, -1, _T(""), wxDefaultPosition, wxSize(300, 300)),
126  bus_(bus),
127  name_(_T("")),
130  newSegName_(_T("")),
131  alwaysTrueGuard_(NULL),
132  alwaysFalseGuard_(NULL),
134  rfGuardList_(NULL),
135  fuGuardList_(NULL) {
136 
137  createContents(this, true, true);
138 
139  FindWindow(wxID_OK)->Disable();
140  FindWindow(ID_ADD_SEGMENT)->Disable();
141  FindWindow(ID_DELETE_SEGMENT)->Disable();
142  FindWindow(ID_SEGMENT_UP)->Disable();
143  FindWindow(ID_SEGMENT_DOWN)->Disable();
144  FindWindow(ID_EDIT_RF_GUARD)->Disable();
145  FindWindow(ID_DELETE_RF_GUARD)->Disable();
146  FindWindow(ID_EDIT_FU_GUARD)->Disable();
147  FindWindow(ID_DELETE_FU_GUARD)->Disable();
148 
149  rfGuardList_ = dynamic_cast<wxListCtrl*>(FindWindow(ID_RF_GUARD_LIST));
150  fuGuardList_ = dynamic_cast<wxListCtrl*>(FindWindow(ID_FU_GUARD_LIST));
151  segList_ = dynamic_cast<wxListCtrl*>(FindWindow(ID_SEGMENT_LIST));
152 
154  dynamic_cast<wxRadioBox*>(FindWindow(ID_SI_EXTENSION));
156  dynamic_cast<wxCheckBox*>(FindWindow(ID_TRUE_GUARD));
158  dynamic_cast<wxCheckBox*>(FindWindow(ID_FALSE_GUARD));
159 
160  FindWindow(ID_BUS_NAME)->SetValidator(
161  wxTextValidator(wxFILTER_ASCII, &name_));
162  FindWindow(ID_SEGMENT_NAME)->SetValidator(
163  wxTextValidator(wxFILTER_ASCII, &newSegName_));
164  FindWindow(ID_BUS_WIDTH)->SetValidator(wxGenericValidator(&width_));
165  FindWindow(ID_SI_WIDTH)->SetValidator(wxGenericValidator(&immWidth_));
166 
167  // set widget texts
168  setTexts();
169 
171 
172  FindWindow(ID_BUS_NAME)->SetFocus();
173 
174  // Editing segments is unsupported feature => hide segment ui
175  segmentSizer_->Show(false);
176  GetSizer()->SetSizeHints(this);
177 }

◆ ~BusDialog()

BusDialog::~BusDialog ( )
virtual

The Destructor.

Definition at line 184 of file BusDialog.cc.

184  {
185 }

Member Function Documentation

◆ createContents()

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

Creates the dialog window contents.

This method was generated with wxDesigner. Don't modify manually, all chnages will be lost if the code is regenerated.

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 1178 of file BusDialog.cc.

1178  {
1179 
1180  wxFlexGridSizer *item0 = new wxFlexGridSizer( 2, 0, 0 );
1181 
1182  wxBoxSizer *item1 = new wxBoxSizer( wxVERTICAL );
1183 
1184  wxStaticBox *item3 = new wxStaticBox( parent, -1, wxT("Bus:") );
1185  wxStaticBoxSizer *item2 = new wxStaticBoxSizer( item3, wxVERTICAL );
1186  busSizer_ = item2;
1187 
1188  wxBoxSizer *item4 = new wxBoxSizer( wxHORIZONTAL );
1189 
1190  wxStaticText *item5 = new wxStaticText( parent, ID_LABEL_BUS_NAME, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
1191  item4->Add( item5, 0, wxALIGN_CENTER|wxALL, 5 );
1192 
1193  wxTextCtrl *item6 = new wxTextCtrl( parent, ID_BUS_NAME, wxT(""), wxDefaultPosition, wxSize(200,-1), 0 );
1194  item4->Add( item6, 0, wxALIGN_CENTER|wxALL, 5 );
1195 
1196  item2->Add( item4, 0, wxGROW|wxALL, 5 );
1197 
1198  wxBoxSizer *item7 = new wxBoxSizer( wxHORIZONTAL );
1199 
1200  wxStaticText *item8 = new wxStaticText( parent, ID_LABEL_BUS_WIDTH, wxT("Width:"), wxDefaultPosition, wxDefaultSize, 0 );
1201  item7->Add( item8, 0, wxALIGN_CENTER|wxALL, 5 );
1202 
1203  wxSpinCtrl *item9 = new wxSpinCtrl( parent, ID_BUS_WIDTH, wxT("1"), wxDefaultPosition, wxSize(-1,-1), 0, 1, 1024, 1 );
1204  item7->Add( item9, 0, wxALIGN_CENTER|wxALL, 5 );
1205 
1206  item2->Add( item7, 0, wxGROW|wxALL, 5 );
1207 
1208  item0->Add( item2, 0, wxGROW|wxALL, 5 );
1209  //item1->Add( item2, 0, wxGROW|wxALL, 5 );
1210 
1211  wxStaticBox *item11 = new wxStaticBox( parent, -1, wxT("Short Immediate:") );
1212  wxStaticBoxSizer *item10 = new wxStaticBoxSizer( item11, wxVERTICAL );
1213  siSizer_ = item10;
1214 
1215  wxBoxSizer *item12 = new wxBoxSizer( wxHORIZONTAL );
1216 
1217  wxStaticText *item13 = new wxStaticText( parent, ID_LABEL_SI_WIDTH, wxT("Width:"), wxDefaultPosition, wxDefaultSize, 0 );
1218  item12->Add( item13, 0, wxALIGN_CENTER|wxALL, 5 );
1219 
1220  wxSpinCtrl *item14 = new wxSpinCtrl( parent, ID_SI_WIDTH, wxT("0"), wxDefaultPosition, wxSize(-1,-1), 0, 0, 1000, 0 );
1221  item12->Add( item14, 0, wxALIGN_CENTER|wxALL, 5 );
1222 
1223  item10->Add( item12, 0, wxGROW|wxALL, 5 );
1224 
1225  wxString strs15[] =
1226  {
1227  wxT("Zero"),
1228  wxT("Sign")
1229  };
1230  wxRadioBox *item15 = new wxRadioBox( parent, ID_SI_EXTENSION, wxT("Extension"), wxDefaultPosition, wxDefaultSize, 2, strs15, 1, wxRA_SPECIFY_ROWS );
1231  item10->Add( item15, 0, wxALL, 5 );
1232 
1233  item0->Add( item10, 0, wxGROW|wxALL, 5 );
1234  //item1->Add( item10, 0, wxGROW|wxALL, 5 );
1235 
1236  wxCheckBox *item16 = new wxCheckBox( parent, ID_TRUE_GUARD, wxT("Always true guard"), wxDefaultPosition, wxDefaultSize, 0 );
1237  item1->Add( item16, 0, wxALL, 5 );
1238 
1239  wxCheckBox *item17 = new wxCheckBox( parent, ID_FALSE_GUARD, wxT("Always false guard"), wxDefaultPosition, wxDefaultSize, 0 );
1240  item1->Add( item17, 0, wxALL, 5 );
1241 
1242  item0->Add( item1, 0, wxGROW|wxALL, 5 );
1243 
1244  wxStaticBox *item19 = new wxStaticBox( parent, -1, wxT("Segements:") );
1245  wxStaticBoxSizer *item18 = new wxStaticBoxSizer( item19, wxVERTICAL );
1246  segmentSizer_ = item18;
1247 
1248  wxListCtrl *item20 = new wxListCtrl( parent, ID_SEGMENT_LIST, wxDefaultPosition, wxSize(300,160), wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
1249  item18->Add( item20, 0, wxALIGN_CENTER|wxALL, 5 );
1250 
1251  wxBoxSizer *item21 = new wxBoxSizer( wxHORIZONTAL );
1252 
1253  wxStaticText *item22 = new wxStaticText( parent, ID_LABEL_SEGMENT_NAME, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
1254  item21->Add( item22, 0, wxALIGN_CENTER|wxALL, 5 );
1255 
1256  wxTextCtrl *item23 = new wxTextCtrl( parent, ID_SEGMENT_NAME, wxT(""), wxDefaultPosition, wxSize(100,-1), 0 );
1257  item21->Add( item23, 0, wxALIGN_CENTER|wxALL, 5 );
1258 
1259  wxBoxSizer *item24 = new wxBoxSizer( wxHORIZONTAL );
1260 
1261  wxButton *item25 = new wxButton( parent, ID_SEGMENT_UP, wxT("Up"), wxDefaultPosition, wxSize(40,-1), 0 );
1262  item24->Add( item25, 0, wxALIGN_CENTER|wxALL, 5 );
1263 
1264  wxButton *item26 = new wxButton( parent, ID_SEGMENT_DOWN, wxT("Down"), wxDefaultPosition, wxSize(50,-1), 0 );
1265  item24->Add( item26, 0, wxALIGN_CENTER|wxALL, 5 );
1266 
1267  item21->Add( item24, 0, wxALL, 5 );
1268 
1269  item18->Add( item21, 0, wxGROW|wxALL, 5 );
1270 
1271  wxBoxSizer *item27 = new wxBoxSizer( wxHORIZONTAL );
1272 
1273  wxButton *item28 = new wxButton( parent, ID_ADD_SEGMENT, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 );
1274  item27->Add( item28, 0, wxALIGN_CENTER|wxALL, 5 );
1275 
1276  item27->Add( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
1277 
1278  wxButton *item29 = new wxButton( parent, ID_DELETE_SEGMENT, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
1279  item27->Add( item29, 0, wxALIGN_CENTER|wxALL, 5 );
1280 
1281  item18->Add( item27, 0, wxALIGN_CENTER|wxALL, 5 );
1282 
1283  item0->Add( item18, 0, wxALL, 5 );
1284 
1285  wxStaticBox *item31 = new wxStaticBox( parent, -1, wxT("Register File Guards:") );
1286  wxStaticBoxSizer *item30 = new wxStaticBoxSizer( item31, wxVERTICAL );
1287  registerGuardSizer_ = item30;
1288 
1289  wxListCtrl *item32 = new wxListCtrl( parent, ID_RF_GUARD_LIST, wxDefaultPosition, wxSize(300,120), wxLC_REPORT|wxSUNKEN_BORDER );
1290  item30->Add( item32, 0, wxALIGN_CENTER|wxALL, 5 );
1291 
1292  wxBoxSizer *item33 = new wxBoxSizer( wxHORIZONTAL );
1293 
1294  wxButton *item34 = new wxButton( parent, ID_ADD_RF_GUARD, wxT("Add..."), wxDefaultPosition, wxDefaultSize, 0 );
1295  item33->Add( item34, 0, wxALIGN_CENTER|wxALL, 5 );
1296 
1297  wxButton *item35 = new wxButton( parent, ID_EDIT_RF_GUARD, wxT("Edit..."), wxDefaultPosition, wxDefaultSize, 0 );
1298  item35->Enable( false );
1299  item33->Add( item35, 0, wxALIGN_CENTER|wxALL, 5 );
1300 
1301  wxButton *item36 = new wxButton( parent, ID_DELETE_RF_GUARD, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
1302  item36->Enable( false );
1303  item33->Add( item36, 0, wxALIGN_CENTER|wxALL, 5 );
1304 
1305  item30->Add( item33, 0, wxALIGN_CENTER|wxALL, 5 );
1306 
1307  item0->Add( item30, 0, wxGROW|wxALL, 5 );
1308 
1309  wxStaticBox *item38 = new wxStaticBox( parent, -1, wxT("Function Unit Guards") );
1310  wxStaticBoxSizer *item37 = new wxStaticBoxSizer( item38, wxVERTICAL );
1311  portGuardSizer_ = item37;
1312 
1313  wxListCtrl *item39 = new wxListCtrl( parent, ID_FU_GUARD_LIST, wxDefaultPosition, wxSize(300,120), wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
1314  item37->Add( item39, 0, wxALIGN_CENTER|wxALL, 5 );
1315 
1316  wxBoxSizer *item40 = new wxBoxSizer( wxHORIZONTAL );
1317 
1318  wxButton *item41 = new wxButton( parent, ID_ADD_FU_GUARD, wxT("Add..."), wxDefaultPosition, wxDefaultSize, 0 );
1319  item40->Add( item41, 0, wxALIGN_CENTER|wxALL, 5 );
1320 
1321  wxButton *item42 = new wxButton( parent, ID_EDIT_FU_GUARD, wxT("Edit..."), wxDefaultPosition, wxDefaultSize, 0 );
1322  item42->Enable( false );
1323  item40->Add( item42, 0, wxALIGN_CENTER|wxALL, 5 );
1324 
1325  wxButton *item43 = new wxButton( parent, ID_DELETE_FU_GUARD, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
1326  item43->Enable( false );
1327  item40->Add( item43, 0, wxALIGN_CENTER|wxALL, 5 );
1328 
1329  item37->Add( item40, 0, wxALIGN_CENTER|wxALL, 5 );
1330 
1331  item0->Add( item37, 0, wxGROW|wxALL, 5 );
1332 
1333  wxButton *item44 = new wxButton( parent, ID_HELP, wxT("&Help"), wxDefaultPosition, wxDefaultSize, 0 );
1334  item0->Add( item44, 0, wxALL, 5 );
1335 
1336  wxBoxSizer *item45 = new wxBoxSizer( wxHORIZONTAL );
1337 
1338  wxButton *item46 = new wxButton( parent, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
1339  item45->Add( item46, 0, wxALIGN_CENTER|wxALL, 5 );
1340 
1341  wxButton *item47 = new wxButton( parent, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
1342  item45->Add( item47, 0, wxALIGN_CENTER|wxALL, 5 );
1343 
1344  item0->Add( item45, 0, wxALL, 5 );
1345 
1346  if (set_sizer)
1347  {
1348  parent->SetSizer( item0 );
1349  if (call_fit)
1350  item0->SetSizeHints( parent );
1351  }
1352 
1353  return item0;
1354 }

◆ onActivateFUGuard()

void BusDialog::onActivateFUGuard ( wxListEvent &  event)
private

Handles left mouse button double clicks on the FUGuard list.

Definition at line 1160 of file BusDialog.cc.

1160  {
1161  wxCommandEvent dummy;
1163 }

References dummy.

◆ onActivateRFGuard()

void BusDialog::onActivateRFGuard ( wxListEvent &  event)
private

Handles left mouse button double clicks on the RFGuard list.

Definition at line 1123 of file BusDialog.cc.

1123  {
1124  wxCommandEvent dummy;
1126 }

References dummy.

◆ onAddFUGuard()

void BusDialog::onAddFUGuard ( wxCommandEvent &  )
private

Creates and shows an empty function unit port guard dialog for adding function unit port guards.

Definition at line 998 of file BusDialog.cc.

998  {
1001 
1002  bool portExists = false;
1003  for (int i = 0; i < navigator.count(); i++) {
1004  if (navigator.item(i)->portCount() > 0) {
1005  portExists = true;
1006  break;
1007  }
1008  }
1009 
1010  if (!portExists) {
1012  format message =
1014  InformationDialog dialog(
1015  this, WxConversion::toWxString(message.str()));
1016  dialog.ShowModal();
1017  return;
1018  }
1019 
1020  FUGuardDialog dialog(this, bus_);
1021  dialog.ShowModal();
1022  updateGuardLists();
1023 }

References TTAMachine::Machine::Navigator< ComponentType >::count(), ProDeTextGenerator::instance(), TTAMachine::Machine::Navigator< ComponentType >::item(), ProDeTextGenerator::MSG_ERROR_CANNOT_FU_GUARD, Texts::TextGenerator::text(), and WxConversion::toWxString().

Here is the call graph for this function:

◆ onAddRFGuard()

void BusDialog::onAddRFGuard ( wxCommandEvent &  )
private

Creates and shows a register file guard dialog for adding register file guards.

Definition at line 898 of file BusDialog.cc.

898  {
901 
902  if (navigator.count() < 1) {
904  format message =
906  InformationDialog dialog(this, WxConversion::toWxString(message.str()));
907  dialog.ShowModal();
908  return;
909  }
910 
911  RFGuardDialog dialog(this, bus_);
912  dialog.ShowModal();
914 }

References TTAMachine::Machine::Navigator< ComponentType >::count(), ProDeTextGenerator::instance(), ProDeTextGenerator::MSG_ERROR_CANNOT_RF_GUARD, Texts::TextGenerator::text(), and WxConversion::toWxString().

Here is the call graph for this function:

◆ onAddSegment()

void BusDialog::onAddSegment ( wxCommandEvent &  )
private

Adds a new segment to the segment list.

Definition at line 567 of file BusDialog.cc.

567  {
568 
569  if (!TransferDataFromWindow()) {
570  return;
571  }
572  assert(newSegName_ != _T(""));
573 
574  string trimmedName =
575  WxConversion::toString(newSegName_.Trim(false).Trim(true));
576 
577  // Check the name validity.
578  if (!MachineTester::isValidComponentName(trimmedName)) {
580  format message =
582  InformationDialog warning(
583  this, WxConversion::toWxString(message.str()));
584  warning.ShowModal();
585  return;
586  }
587 
588  // Check that the new segment's name is unique among the segments of
589  // the bus.
590  if (bus_->hasSegment(trimmedName)) {
592  format message =
594  format component =
596  format bus = prodeTexts->text(ProDeTextGenerator::COMP_BUS);
597  message % trimmedName % component.str() % bus.str();
598  component = prodeTexts->text(ProDeTextGenerator::COMP_SEGMENT);
599  message % component.str();
600  WarningDialog dialog(this, WxConversion::toWxString(message.str()));
601  dialog.ShowModal();
602  return;
603  }
604  new Segment(trimmedName, *bus_);
606 
607  // clear the segment name control
608  dynamic_cast<wxTextCtrl*>(
609  FindWindow(ID_SEGMENT_NAME))->SetValue(_T(""));
610 }

References assert, ProDeTextGenerator::COMP_A_SEGMENT, ProDeTextGenerator::COMP_BUS, ProDeTextGenerator::COMP_SEGMENT, ProDeTextGenerator::instance(), MachineTester::isValidComponentName(), ProDeTextGenerator::MSG_ERROR_ILLEGAL_NAME, ProDeTextGenerator::MSG_ERROR_SAME_NAME, Texts::TextGenerator::text(), WxConversion::toString(), and WxConversion::toWxString().

Here is the call graph for this function:

◆ onBusName()

void BusDialog::onBusName ( wxCommandEvent &  )
private

Enables and disables OK button based on input in the bus name widget.

Definition at line 617 of file BusDialog.cc.

617  {
618  if (!TransferDataFromWindow()) {
619  assert(false);
620  }
621  wxString trimmedName = name_.Trim(false).Trim(true);
622  if (trimmedName == _T("")) {
623  FindWindow(wxID_OK)->Disable();
624  } else {
625  FindWindow(wxID_OK)->Enable();
626  }
627 }

References assert.

◆ onDeleteFUGuard()

void BusDialog::onDeleteFUGuard ( wxCommandEvent &  )
private

Deletes selected function unit port guards from the function unit port guards list.

Definition at line 1032 of file BusDialog.cc.

1032  {
1033  delete selectedFUGuard();
1034  updateGuardLists();
1035  wxListEvent dummy;
1037 }

References dummy.

◆ onDeleteRFGuard()

void BusDialog::onDeleteRFGuard ( wxCommandEvent &  )
private

Deletes selected register file guards from the register file guards list.

Definition at line 922 of file BusDialog.cc.

922  {
923  long item = -1;
924 
925  // loop selected guards and delete them
926  for (int i = 0; i < rfGuardList_->GetSelectedItemCount(); ++i) {
927  item = rfGuardList_->GetNextItem(
928  item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
929 
930  assert (item < static_cast<int>(registerGuards_.size()));
931 
932  // retrieve item data (guard pointer) that is bound with the item
933  if (item >= 0) {
934  long itemData = rfGuardList_->GetItemData(item);
935  RegisterGuard* rfGuard = (RegisterGuard*)itemData;
936  if (rfGuard != NULL) {
937  delete rfGuard;
938  rfGuard = NULL;
939  }
940  }
941  }
942 
944  wxListEvent dummy;
946 
947  return;
948 }

References assert, and dummy.

◆ onDeleteSegment()

void BusDialog::onDeleteSegment ( wxCommandEvent &  )
private

Deletes the selected segment from the bus.

The Segments before and after the deleted segments are connected to each other.

Definition at line 735 of file BusDialog.cc.

735  {
736 
737  Segment* selected = selectedSegment();
738  assert(selected != NULL);
739 
740  delete selected;
742 
743  wxListEvent dummy;
745 }

References assert, and dummy.

◆ onEditFUGuard()

void BusDialog::onEditFUGuard ( wxCommandEvent &  )
private

Handles the 'Edit FUGuard' button event.

Opens a FUGuardDialog with the selected guard's attributes set.

Definition at line 1047 of file BusDialog.cc.

1047  {
1048  PortGuard* guard = selectedFUGuard();
1049  if (guard == NULL) {
1050  // No guard selected.
1051  return;
1052  }
1053  FUGuardDialog dialog(this, bus_, guard);
1054  dialog.ShowModal();
1055  updateGuardLists();
1056 }

◆ onEditRFGuard()

void BusDialog::onEditRFGuard ( wxCommandEvent &  )
private

Handles the 'Edit RFGuard' button event.

Opens a RFGuardDialog with the selected guard's attributes set.

Definition at line 958 of file BusDialog.cc.

958  {
959  RegisterGuard* guard = selectedRFGuard();
960  if (guard == NULL) {
961  // No guard selected.
962  return;
963  }
964  RFGuardDialog dialog(this, bus_, guard);
965  dialog.ShowModal();
967 }

◆ onFUGuardRightClick()

void BusDialog::onFUGuardRightClick ( wxListEvent &  event)
private

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

Parameters
eventInformation about right mouse click event.

Definition at line 1136 of file BusDialog.cc.

1136  {
1137 
1138  fuGuardList_->SetItemState(event.GetIndex(), wxLIST_STATE_SELECTED,
1139  wxLIST_STATE_SELECTED);
1140 
1141  wxMenu* contextMenu = new wxMenu();
1142 
1144  format button = prodeTexts->text(
1146  contextMenu->Append(
1148  button = prodeTexts->text(
1150  contextMenu->Append(
1152  fuGuardList_->PopupMenu(contextMenu, event.GetPoint());
1153 }

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:

◆ onFUGuardSelection()

void BusDialog::onFUGuardSelection ( wxListEvent &  )
private

Disables and enables Edit and Delete buttons under the register file guard list.

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

Definition at line 1081 of file BusDialog.cc.

1081  {
1082  if (fuGuardList_->GetSelectedItemCount() != 1) {
1083  FindWindow(ID_DELETE_FU_GUARD)->Disable();
1084  FindWindow(ID_EDIT_FU_GUARD)->Disable();
1085  return;
1086  }
1087  FindWindow(ID_DELETE_FU_GUARD)->Enable();
1088  FindWindow(ID_EDIT_FU_GUARD)->Enable();
1089 }

◆ onHelp()

void BusDialog::onHelp ( wxCommandEvent &  event)
private

◆ onOK()

void BusDialog::onOK ( wxCommandEvent &  )
private

Validates input in the controls, and updates the Bus object.

Definition at line 797 of file BusDialog.cc.

797  {
798 
799  if (!Validate()) {
800  return;
801  }
802 
803  if (!TransferDataFromWindow()) {
804  return;
805  }
806 
807  // Check that the machine doesn't contain instruction templates with
808  // slots that are wider than the new bus width.
811  for (int i = 0; i < navigator.count(); i++) {
812  int slotWidth = navigator.item(i)->supportedWidth(bus_->name());
813  if (slotWidth != 0 && slotWidth > width_) {
814  ProDeTextGenerator* generator =
816  format message = generator->text(
818  message % navigator.item(i)->name();
819  message % slotWidth;
820  InformationDialog dialog(
821  this, WxConversion::toWxString(message.str()));
822  dialog.ShowModal();
823  return;
824  }
825  }
826 
827  // Check the name validity.
828  string trimmedName =
829  WxConversion::toString(name_.Trim(false).Trim(true));
830  if (!MachineTester::isValidComponentName(trimmedName)) {
832  format message =
834  InformationDialog warning(
835  this, WxConversion::toWxString(message.str()));
836  warning.ShowModal();
837  return;
838  }
839 
840  // Check that the new name is not reserved.
841  if (trimmedName != bus_->name()) {
842  const Machine::BusNavigator busNavigator =
843  bus_->machine()->busNavigator();
844  if (busNavigator.hasItem(trimmedName)) {
846  format message =
848  message % trimmedName;
849  message % prodeTexts->text(ProDeTextGenerator::COMP_A_BUS).str();
850  message % prodeTexts->text(ProDeTextGenerator::COMP_MACHINE).str();
851  message % prodeTexts->text(ProDeTextGenerator::COMP_BUS).str();
852  WarningDialog warning(
853  this, WxConversion::toWxString(message.str()));
854  warning.ShowModal();
855  return;
856  }
857  // Immediate slots share namespace with busses, check that an immediate
858  // slot with the same name does not exist.
859  const Machine::ImmediateSlotNavigator immSlotNavigator =
861  if (immSlotNavigator.hasItem(trimmedName)) {
863  format message =
865  message % trimmedName;
866  message % prodeTexts->text(
868  message % prodeTexts->text(ProDeTextGenerator::COMP_MACHINE).str();
869  message % prodeTexts->text(ProDeTextGenerator::COMP_BUS).str();
870  WarningDialog warning(
871  this, WxConversion::toWxString(message.str()));
872  warning.ShowModal();
873  return;
874  }
875  }
876 
877  bus_->setWidth(width_);
879  bus_->setName(trimmedName);
880 
881  if (immediateExtensionBox_->GetStringSelection().IsSameAs(
883 
884  bus_->setZeroExtends();
885  } else {
886  bus_->setSignExtends();
887  }
888 
889  EndModal(wxID_OK);
890 }

References ProDeTextGenerator::COMP_A_BUS, ProDeTextGenerator::COMP_AN_IMM_SLOT, ProDeTextGenerator::COMP_BUS, ProDeTextGenerator::COMP_MACHINE, TTAMachine::Machine::Navigator< ComponentType >::count(), ProDeConstants::EXTENSION_ZERO, TTAMachine::Machine::Navigator< ComponentType >::hasItem(), ProDeTextGenerator::instance(), MachineTester::isValidComponentName(), TTAMachine::Machine::Navigator< ComponentType >::item(), ProDeTextGenerator::MSG_ERROR_BUS_IT_SLOT_WIDTH, ProDeTextGenerator::MSG_ERROR_ILLEGAL_NAME, ProDeTextGenerator::MSG_ERROR_SAME_NAME, Texts::TextGenerator::text(), WxConversion::toString(), and WxConversion::toWxString().

Here is the call graph for this function:

◆ onRFGuardRightClick()

void BusDialog::onRFGuardRightClick ( wxListEvent &  event)
private

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

Parameters
eventInformation about right mouse click event.

Definition at line 1099 of file BusDialog.cc.

1099  {
1100 
1101  rfGuardList_->SetItemState(event.GetIndex(), wxLIST_STATE_SELECTED,
1102  wxLIST_STATE_SELECTED);
1103 
1104  wxMenu* contextMenu = new wxMenu();
1105 
1107  format button = prodeTexts->text(
1109  contextMenu->Append(
1111  button = prodeTexts->text(
1113  contextMenu->Append(
1115  rfGuardList_->PopupMenu(contextMenu, event.GetPoint());
1116 }

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:

◆ onRFGuardSelection()

void BusDialog::onRFGuardSelection ( wxListEvent &  )
private

Disables and enables Edit and Delete buttons under the register file guard list.

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

Definition at line 978 of file BusDialog.cc.

978  {
979  if (rfGuardList_->GetSelectedItemCount() != 1) {
980  FindWindow(ID_EDIT_RF_GUARD)->Disable();
981  } else {
982  FindWindow(ID_EDIT_RF_GUARD)->Enable();
983  }
984 
985  if (rfGuardList_->GetSelectedItemCount() < 1) {
986  FindWindow(ID_DELETE_RF_GUARD)->Disable();
987  } else {
988  FindWindow(ID_DELETE_RF_GUARD)->Enable();
989  }
990 }

◆ onSegmentDown()

void BusDialog::onSegmentDown ( wxCommandEvent &  )
private

Moves selected segment one position down in the segment chain.

Definition at line 775 of file BusDialog.cc.

775  {
776  Segment* selected = selectedSegment();
777  assert (selected != NULL);
778 
779  if (!selected->hasDestinationSegment()) {
780  // Selected segment was first in the chain, do nothing.
781  return;
782  }
783 
784  selected->moveAfter(*(selected->destinationSegment()));
786 
787  // set the moved segment as selected
788  long i = segList_->FindItem(0, WxConversion::toWxString(selected->name()));
789  segList_->SetItemState(i,wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
790 }

References assert, TTAMachine::Segment::destinationSegment(), TTAMachine::Segment::hasDestinationSegment(), TTAMachine::Segment::moveAfter(), TTAMachine::Segment::name(), and WxConversion::toWxString().

Here is the call graph for this function:

◆ onSegmentName()

void BusDialog::onSegmentName ( wxCommandEvent &  )
private

Enables and disables add segment button based on input in the segment name widget.

Definition at line 676 of file BusDialog.cc.

676  {
677  if (!TransferDataFromWindow()) {
678  assert(false);
679  }
680  wxString trimmedName = newSegName_.Trim(false).Trim(true);
681  if (trimmedName == _T("")) {
682  FindWindow(ID_ADD_SEGMENT)->Disable();
683  } else {
684  FindWindow(ID_ADD_SEGMENT)->Enable();
685  }
686 }

References assert.

◆ onSegmentRightClick()

void BusDialog::onSegmentRightClick ( wxListEvent &  event)
private

Opens a pop-up menu when right mouse button was pressed.

Parameters
eventInformation about right mouse click event.

Definition at line 712 of file BusDialog.cc.

712  {
713 
714  segList_->SetItemState(event.GetIndex(), wxLIST_STATE_SELECTED,
715  wxLIST_STATE_SELECTED);
716 
717  wxMenu* contextMenu = new wxMenu();
718 
720  format button = prodeTexts->text(
722  contextMenu->Append(
724  segList_->PopupMenu(contextMenu, event.GetPoint());
725 }

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

Here is the call graph for this function:

◆ onSegmentSelection()

void BusDialog::onSegmentSelection ( wxListEvent &  )
private

Disables segment deletion and move buttons if no segment is selected.

Definition at line 693 of file BusDialog.cc.

693  {
694  if (segList_->GetSelectedItemCount() != 1) {
695  FindWindow(ID_DELETE_SEGMENT)->Disable();
696  FindWindow(ID_SEGMENT_UP)->Disable();
697  FindWindow(ID_SEGMENT_DOWN)->Disable();
698  return;
699  }
700  FindWindow(ID_DELETE_SEGMENT)->Enable();
701  FindWindow(ID_SEGMENT_UP)->Enable();
702  FindWindow(ID_SEGMENT_DOWN)->Enable();
703 }

◆ onSegmentUp()

void BusDialog::onSegmentUp ( wxCommandEvent &  )
private

Moves selected segment one position up in the segment chain.

Definition at line 752 of file BusDialog.cc.

752  {
753  Segment* selected = selectedSegment();
754  assert (selected != NULL);
755 
756  if (!selected->hasSourceSegment()) {
757  // Selected segment was first in the chain, do nothing.
758  return;
759  }
760 
761  selected->moveBefore(*(selected->sourceSegment()));
763 
764  // set the moved segment as selected
765  long i = segList_->FindItem(0, WxConversion::toWxString(selected->name()));
766  segList_->SetItemState(i,wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
767 }

References assert, TTAMachine::Segment::hasSourceSegment(), TTAMachine::Segment::moveBefore(), TTAMachine::Segment::name(), TTAMachine::Segment::sourceSegment(), and WxConversion::toWxString().

Here is the call graph for this function:

◆ onUnconditionalGuard()

void BusDialog::onUnconditionalGuard ( wxCommandEvent &  event)
private

Handles the unconditional guard deletion/creation when true/false guard checkbox values are toggled.

Definition at line 635 of file BusDialog.cc.

635  {
636 
637  bool inverted = false;
638  wxCheckBox* checkbox = alwaysTrueGuard_;
639 
640  if (event.GetId() == ID_FALSE_GUARD) {
641  inverted = true;
642  checkbox = alwaysFalseGuard_;
643  }
644 
645  if (!checkbox->GetValue()) {
646  for (int i = 0; i < bus_->guardCount(); i++) {
647  Guard* guard = bus_->guard(i);
648  UnconditionalGuard* unCondGuard =
649  dynamic_cast<UnconditionalGuard*>(guard);
650  if (unCondGuard != NULL &&
651  unCondGuard->isInverted() == inverted) {
652 
653  delete unCondGuard;
654  }
655  }
656  } else {
657  try {
658  new UnconditionalGuard(inverted, *bus_);
659  } catch (Exception& e) {
661  format text = prodeTexts->text(ProDeTextGenerator::MSG_ERROR);
662  wxString message = WxConversion::toWxString(text.str());
663  message.Append(WxConversion::toWxString(e.errorMessage()));
664  ErrorDialog dialog(this, message);
665  dialog.ShowModal();
666  return;
667  }
668  }
669 }

References Exception::errorMessage(), ProDeTextGenerator::instance(), TTAMachine::Guard::isInverted(), ProDeTextGenerator::MSG_ERROR, Texts::TextGenerator::text(), and WxConversion::toWxString().

Here is the call graph for this function:

◆ onWidth()

void BusDialog::onWidth ( wxSpinEvent &  )
private

Sets the immediate width range when the bus width is modified.

Definition at line 1063 of file BusDialog.cc.

1063  {
1064  wxSpinCtrl* width = dynamic_cast<wxSpinCtrl*>(FindWindow(ID_BUS_WIDTH));
1065  wxSpinCtrl* siWidth = dynamic_cast<wxSpinCtrl*>(FindWindow(ID_SI_WIDTH));
1066  if (siWidth->GetValue() > width->GetValue()) {
1067  siWidth->SetValue(width->GetValue());
1068  }
1069  siWidth->SetRange(0, width->GetValue());
1070 }

◆ selectedFUGuard()

PortGuard * BusDialog::selectedFUGuard ( ) const
private

Returns pointer to the selected fu port guard.

Returns
NULL if no port guard is selected.

Definition at line 522 of file BusDialog.cc.

522  {
523  long item = -1;
524  item = fuGuardList_->GetNextItem(
525  item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
526 
527  if (item == -1) {
528  return NULL;
529  }
530 
531  assert (item < int(portGuards_.size()));
532 
533  return portGuards_[item];
534 }

References assert.

◆ selectedRFGuard()

RegisterGuard * BusDialog::selectedRFGuard ( ) const
private

Returns pointer to the selected register file guard.

Returns
NULL if no register guard is selected.

Definition at line 543 of file BusDialog.cc.

543  {
544  long item = -1;
545  item = rfGuardList_->GetNextItem(
546  item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
547 
548  if (item == -1) {
549  return NULL;
550  }
551 
552  assert (item < int(registerGuards_.size()));
553 
554  long itemData = rfGuardList_->GetItemData(item);
555  RegisterGuard* rfGuard = (RegisterGuard*)itemData;
556  assert (rfGuard != NULL);
557  return rfGuard;
558 }

References assert.

◆ selectedSegment()

Segment * BusDialog::selectedSegment ( ) const
private

Returns pointer to the selected segment.

Returns NULL if no segment is selected.

Definition at line 501 of file BusDialog.cc.

501  {
502 
503  // search the selected segment in the segment list widget
504  Segment* selected = NULL;
505  for (int i = 0; i < segList_->GetItemCount(); i++) {
506  // search selected list item
507  if (segList_->GetItemState(i, wxLIST_STATE_SELECTED) != 0) {
508  string name = WxConversion::toString(segList_->GetItemText(i));
509  selected = bus_->segment(name);
510  }
511  }
512  return selected;
513 }

References WxConversion::toString().

Here is the call graph for this function:

◆ setTexts()

void BusDialog::setTexts ( )
private

Definition at line 192 of file BusDialog.cc.

192  {
195 
196  // Dialog title
197  format fmt = prodeTexts->text(ProDeTextGenerator::TXT_BUS_DIALOG_TITLE);
198 
199  string title = fmt.str();
200  SetTitle(WxConversion::toWxString(title));
201 
202  // buttons
203  WidgetTools::setLabel(generator, FindWindow(wxID_OK),
205 
206  WidgetTools::setLabel(generator, FindWindow(wxID_CANCEL),
208 
211 
214 
217 
220 
223 
226 
229 
232 
235 
238 
241 
242  // widget labels
245 
248 
251 
254 
257 
260 
263 
264  // Radio button labels
266  immediateExtensionBox_->SetString(0, WxConversion::toWxString(fmt.str()));
268  immediateExtensionBox_->SetString(1, WxConversion::toWxString(fmt.str()));
269 
270  // box sizer labels
271  fmt = prodeTexts->text(ProDeTextGenerator::TXT_BUS_BUS_BOX);
272  string label = fmt.str();
274 
276  label = fmt.str();
278 
279  fmt = prodeTexts->text(ProDeTextGenerator::TXT_BUS_SI_BOX);
280  label = fmt.str();
282 
283  fmt = prodeTexts->
285  label = fmt.str();
287 
289  label = fmt.str();
291 
292  // Create segment list columns.
293  wxListCtrl* segmentList =
294  dynamic_cast<wxListCtrl*>(FindWindow(ID_SEGMENT_LIST));
295  wxListCtrl* rfGuardList =
296  dynamic_cast<wxListCtrl*>(FindWindow(ID_RF_GUARD_LIST));
297  wxListCtrl* fuGuardList =
298  dynamic_cast<wxListCtrl*>(FindWindow(ID_FU_GUARD_LIST));
299 
301  string invLabel = fmt.str();
302 
303  fmt = prodeTexts->text(ProDeTextGenerator::TXT_COLUMN_NAME);
304  string nameLabel = fmt.str();
305 
306  fmt = prodeTexts->text(ProDeTextGenerator::TXT_COLUMN_INDEX);
307  string indexLabel = fmt.str();
308 
309  fmt = prodeTexts->text(ProDeTextGenerator::TXT_COLUMN_PORT);
310  string portLabel = fmt.str();
311 
312  segmentList->InsertColumn(0, WxConversion::toWxString(nameLabel),
313  wxLIST_FORMAT_LEFT, 280);
314 
315  rfGuardList->InsertColumn(0, WxConversion::toWxString(nameLabel),
316  wxLIST_FORMAT_LEFT, 170);
317  rfGuardList->InsertColumn(1, WxConversion::toWxString(indexLabel),
318  wxLIST_FORMAT_LEFT, 70);
319  rfGuardList->InsertColumn(2, WxConversion::toWxString(invLabel),
320  wxLIST_FORMAT_LEFT, 40);
321 
322  fuGuardList->InsertColumn(0, WxConversion::toWxString(invLabel),
323  wxLIST_FORMAT_LEFT, 40);
324  fuGuardList->InsertColumn(1, WxConversion::toWxString(nameLabel),
325  wxLIST_FORMAT_LEFT, 170);
326  fuGuardList->InsertColumn(2, WxConversion::toWxString(portLabel),
327  wxLIST_FORMAT_LEFT, 70);
328 }

References GUITextGenerator::instance(), ProDeTextGenerator::instance(), WidgetTools::setLabel(), WidgetTools::setWidgetLabel(), Texts::TextGenerator::text(), WxConversion::toWxString(), ProDeTextGenerator::TXT_BUS_BUS_BOX, ProDeTextGenerator::TXT_BUS_DIALOG_TITLE, ProDeTextGenerator::TXT_BUS_PORT_GUARD_BOX, ProDeTextGenerator::TXT_BUS_REGISTER_GUARD_BOX, ProDeTextGenerator::TXT_BUS_SEGMENTS_BOX, ProDeTextGenerator::TXT_BUS_SI_BOX, GUITextGenerator::TXT_BUTTON_ADD, GUITextGenerator::TXT_BUTTON_ADD_DIALOG, GUITextGenerator::TXT_BUTTON_CANCEL, GUITextGenerator::TXT_BUTTON_DELETE, ProDeTextGenerator::TXT_BUTTON_DOWN, GUITextGenerator::TXT_BUTTON_EDIT_DIALOG, GUITextGenerator::TXT_BUTTON_HELP, GUITextGenerator::TXT_BUTTON_OK, ProDeTextGenerator::TXT_BUTTON_UP, ProDeTextGenerator::TXT_COLUMN_INDEX, ProDeTextGenerator::TXT_COLUMN_INVERTED, ProDeTextGenerator::TXT_COLUMN_NAME, ProDeTextGenerator::TXT_COLUMN_PORT, ProDeTextGenerator::TXT_LABEL_EXTENSION, ProDeTextGenerator::TXT_LABEL_FALSE_GUARD, ProDeTextGenerator::TXT_LABEL_NAME, ProDeTextGenerator::TXT_LABEL_TRUE_GUARD, ProDeTextGenerator::TXT_LABEL_WIDTH, ProDeTextGenerator::TXT_RADIO_EXTENSION_SIGN, and ProDeTextGenerator::TXT_RADIO_EXTENSION_ZERO.

Here is the call graph for this function:

◆ TransferDataToWindow()

bool BusDialog::TransferDataToWindow ( )
privatevirtual

Transfers the data from the bus model to the dialog controls.

Returns
false, if an error occured in the transfer.

Definition at line 337 of file BusDialog.cc.

337  {
338 
340  width_ = bus_->width();
342 
343 
344  // set extension
345  if (bus_->signExtends()) {
346  immediateExtensionBox_->SetStringSelection(
348  } else {
349  immediateExtensionBox_->SetStringSelection(
351  }
352 
355 
356  // wxWidgets GTK1 version seems to bug with spincontrol validators.
357  // The widget value has to be set manually.
358  dynamic_cast<wxSpinCtrl*>(FindWindow(ID_BUS_WIDTH))->SetValue(width_);
359  dynamic_cast<wxSpinCtrl*>(FindWindow(ID_SI_WIDTH))->SetValue(immWidth_);
360 
361  wxSpinEvent dummy;
362  onWidth(dummy);
363 
364  return wxWindow::TransferDataToWindow();
365 }

References dummy, ProDeConstants::EXTENSION_SIGN, ProDeConstants::EXTENSION_ZERO, and WxConversion::toWxString().

Here is the call graph for this function:

◆ updateGuardLists()

void BusDialog::updateGuardLists ( )
private

Updates the guard lists.

Definition at line 412 of file BusDialog.cc.

412  {
413 
414  assert (rfGuardList_ != NULL);
415  assert (fuGuardList_ != NULL);
416  rfGuardList_->DeleteAllItems();
417  fuGuardList_->DeleteAllItems();
418 
419  registerGuards_.clear();
420  portGuards_.clear();
421 
422  alwaysTrueGuard_->SetValue(false);
423  alwaysFalseGuard_->SetValue(false);
424 
425  // add guards
426  for (int i = 0; i < bus_->guardCount(); i++) {
427 
428  Guard* guard = bus_->guard(i);
429 
430  UnconditionalGuard* unCondGuard =
431  dynamic_cast<UnconditionalGuard*>(guard);
432 
433  RegisterGuard* rfGuard = dynamic_cast<RegisterGuard*>(guard);
434  PortGuard* fuGuard = dynamic_cast<PortGuard*>(guard);
435 
436  if (unCondGuard != NULL) {
437  // unconditional guard
438  if (unCondGuard->isInverted()) {
439  alwaysFalseGuard_->SetValue(true);
440  } else {
441  alwaysTrueGuard_->SetValue(true);
442  }
443  } else if(rfGuard != NULL) {
444  // register guard
445  int index = registerGuards_.size();
446  registerGuards_.push_back(rfGuard);
447 
448  string name = rfGuard->registerFile()->name();
449  int rfIndex = rfGuard->registerIndex();
450  rfGuardList_->InsertItem(index, WxConversion::toWxString(name));
451  rfGuardList_->SetItem(index, 1, WxConversion::toWxString(rfIndex));
452  if (rfGuard->isInverted()) {
453  rfGuardList_->SetItem(index, 2, _T("*"));
454  } else {
455  rfGuardList_->SetItem(index, 2, _T(" "));
456  }
457 
458  // bind pointer to the guard as item data for future reference
459  rfGuardList_->SetItemData(index, (long)rfGuard);
460  } else if(fuGuard != NULL) {
461  // port guard
462  int index = portGuards_.size();
463  portGuards_.push_back(fuGuard);
464 
465  if (fuGuard->isInverted()) {
466  fuGuardList_->InsertItem(index, _T("*"));
467  } else {
468  fuGuardList_->InsertItem(index, _T(" "));
469  }
470 
471  string name = fuGuard->port()->parentUnit()->name();
472  fuGuardList_->SetItem(index, 1, WxConversion::toWxString(name));
473  name = fuGuard->port()->name();
474  fuGuardList_->SetItem(index, 2, WxConversion::toWxString(name));
475  }
476  }
477 
478  // sort guard list with given function, data parameter is not needed
479  rfGuardList_->SortItems(ListCompareFunction, static_cast<long>(0));
480 }

References assert, TTAMachine::Guard::isInverted(), ListCompareFunction(), TTAMachine::Port::name(), TTAMachine::Component::name(), TTAMachine::BaseFUPort::parentUnit(), TTAMachine::PortGuard::port(), TTAMachine::RegisterGuard::registerFile(), TTAMachine::RegisterGuard::registerIndex(), and WxConversion::toWxString().

Here is the call graph for this function:

◆ updateSegmentList()

void BusDialog::updateSegmentList ( )
private

Updates the segment list control.

Definition at line 486 of file BusDialog.cc.

486  {
487  segList_->DeleteAllItems();
488 
489  for (int i = bus_->segmentCount()-1;i > -1;i--) {
490  string segmentName = bus_->segment(i)->name();
491  segList_->InsertItem(0, WxConversion::toWxString(segmentName));
492  }
493 }

References WxConversion::toWxString().

Here is the call graph for this function:

Member Data Documentation

◆ alwaysFalseGuard_

wxCheckBox* BusDialog::alwaysFalseGuard_
private

Check box for always false unconditional guard.

Definition at line 112 of file BusDialog.hh.

◆ alwaysTrueGuard_

wxCheckBox* BusDialog::alwaysTrueGuard_
private

Check box for always true unconditional guard.

Definition at line 110 of file BusDialog.hh.

◆ bus_

TTAMachine::Bus* BusDialog::bus_
private

Transport Bus to edit.

Definition at line 97 of file BusDialog.hh.

◆ busSizer_

wxStaticBoxSizer* BusDialog::busSizer_
private

Static boxsizer for the bus properties.

Definition at line 121 of file BusDialog.hh.

◆ fuGuardList_

wxListCtrl* BusDialog::fuGuardList_
private

Function unit port guard list control.

Definition at line 118 of file BusDialog.hh.

◆ immediateExtensionBox_

wxRadioBox* BusDialog::immediateExtensionBox_
private

Radio box for immediate extension.

Definition at line 114 of file BusDialog.hh.

◆ immWidth_

int BusDialog::immWidth_
private

Short immediate width.

Definition at line 103 of file BusDialog.hh.

◆ name_

wxString BusDialog::name_
private

Name of the bus.

Definition at line 99 of file BusDialog.hh.

◆ newSegName_

wxString BusDialog::newSegName_
private

Name for a new segment.

Definition at line 105 of file BusDialog.hh.

◆ portGuards_

vector<TTAMachine::PortGuard*> BusDialog::portGuards_
private

list of port guards

Definition at line 135 of file BusDialog.hh.

◆ portGuardSizer_

wxStaticBoxSizer* BusDialog::portGuardSizer_
private

Static boxsizer for the port guard properties.

Definition at line 127 of file BusDialog.hh.

◆ registerGuards_

vector<TTAMachine::RegisterGuard*> BusDialog::registerGuards_
private

list of register guards

Definition at line 133 of file BusDialog.hh.

◆ registerGuardSizer_

wxStaticBoxSizer* BusDialog::registerGuardSizer_
private

Static boxsizer for the register guard properties.

Definition at line 125 of file BusDialog.hh.

◆ rfGuardList_

wxListCtrl* BusDialog::rfGuardList_
private

Register file guard list control.

Definition at line 116 of file BusDialog.hh.

◆ segList_

wxListCtrl* BusDialog::segList_
private

List widget for the segment list.

Definition at line 108 of file BusDialog.hh.

◆ segmentSizer_

wxStaticBoxSizer* BusDialog::segmentSizer_
private

Static boxsizer for the segment properties.

Definition at line 129 of file BusDialog.hh.

◆ siSizer_

wxStaticBoxSizer* BusDialog::siSizer_
private

Static boxsizer for the short immediate properties.

Definition at line 123 of file BusDialog.hh.

◆ width_

int BusDialog::width_
private

Width of the bus.

Definition at line 101 of file BusDialog.hh.


The documentation for this class was generated from the following files:
TTAMachine::Bus::immediateWidth
int immediateWidth() const
Definition: Bus.cc:160
TTAMachine::Guard
Definition: Guard.hh:55
WarningDialog
Definition: WarningDialog.hh:42
BusDialog::fuGuardList_
wxListCtrl * fuGuardList_
Function unit port guard list control.
Definition: BusDialog.hh:118
TTAMachine::Bus::setSignExtends
virtual void setSignExtends()
Definition: Bus.cc:262
BusDialog::immediateExtensionBox_
wxRadioBox * immediateExtensionBox_
Radio box for immediate extension.
Definition: BusDialog.hh:114
ProDeTextGenerator::COMP_AN_IMM_SLOT
@ COMP_AN_IMM_SLOT
Name for imm. slot (w/ article).
Definition: ProDeTextGenerator.hh:283
TTAMachine::Bus::setZeroExtends
virtual void setZeroExtends()
Definition: Bus.cc:253
WxConversion::toWxString
static wxString toWxString(const std::string &source)
BusDialog::name_
wxString name_
Name of the bus.
Definition: BusDialog.hh:99
TTAMachine::Component::name
virtual TCEString name() const
Definition: MachinePart.cc:125
TTAMachine::Bus::setImmediateWidth
virtual void setImmediateWidth(int width)
Definition: Bus.cc:241
ProDeTextGenerator::TXT_LABEL_BUTTON_DELETE
@ TXT_LABEL_BUTTON_DELETE
Label for &Delete button.
Definition: ProDeTextGenerator.hh:95
BusDialog::registerGuardSizer_
wxStaticBoxSizer * registerGuardSizer_
Static boxsizer for the register guard properties.
Definition: BusDialog.hh:125
BusDialog::ID_FALSE_GUARD
@ ID_FALSE_GUARD
Definition: BusDialog.hh:144
TTAMachine::PortGuard::port
FUPort * port() const
TTAMachine::Bus::setWidth
virtual void setWidth(int width)
Definition: Bus.cc:223
BusDialog::busSizer_
wxStaticBoxSizer * busSizer_
Static boxsizer for the bus properties.
Definition: BusDialog.hh:121
ListCompareFunction
int wxCALLBACK ListCompareFunction(long item1, long item2, long WXUNUSED(sortData))
Definition: BusDialog.cc:375
BusDialog::rfGuardList_
wxListCtrl * rfGuardList_
Register file guard list control.
Definition: BusDialog.hh:116
TTAMachine::RegisterGuard::registerIndex
int registerIndex() const
BusDialog::ID_SEGMENT_DOWN
@ ID_SEGMENT_DOWN
Definition: BusDialog.hh:148
TTAMachine::BaseFUPort::parentUnit
FunctionUnit * parentUnit() const
Definition: BaseFUPort.cc:96
ProDeTextGenerator::COMP_A_SEGMENT
@ COMP_A_SEGMENT
Name for a segment component.
Definition: ProDeTextGenerator.hh:255
TTAMachine::Segment
Definition: Segment.hh:54
BusDialog::ID_FU_GUARD_LIST
@ ID_FU_GUARD_LIST
Definition: BusDialog.hh:155
TTAMachine::Bus::width
int width() const
Definition: Bus.cc:149
ProDeTextGenerator::TXT_COLUMN_INDEX
@ TXT_COLUMN_INDEX
Label for index column in a list.
Definition: ProDeTextGenerator.hh:113
WidgetTools::setLabel
static void setLabel(Texts::TextGenerator *generator, wxWindow *widget, int textID)
Definition: WidgetTools.cc:92
BusDialog::immWidth_
int immWidth_
Short immediate width.
Definition: BusDialog.hh:103
BusDialog::ID_LABEL_SI_WIDTH
@ ID_LABEL_SI_WIDTH
Definition: BusDialog.hh:163
GUITextGenerator::instance
static GUITextGenerator * instance()
Definition: GUITextGenerator.cc:67
BusDialog::ID_DELETE_FU_GUARD
@ ID_DELETE_FU_GUARD
Definition: BusDialog.hh:158
BusDialog::updateGuardLists
void updateGuardLists()
Definition: BusDialog.cc:412
TTAMachine::Segment::destinationSegment
Segment * destinationSegment() const
ProDeTextGenerator::TXT_LABEL_TRUE_GUARD
@ TXT_LABEL_TRUE_GUARD
Label for 'always true guard'.
Definition: ProDeTextGenerator.hh:64
ProDeTextGenerator::TXT_BUS_DIALOG_TITLE
@ TXT_BUS_DIALOG_TITLE
Bus Dialog title.
Definition: ProDeTextGenerator.hh:148
ProDeTextGenerator::TXT_BUS_BUS_BOX
@ TXT_BUS_BUS_BOX
Bus Dialog bus box title.
Definition: ProDeTextGenerator.hh:149
GUITextGenerator
Definition: GUITextGenerator.hh:46
BusDialog::ID_SEGMENT_UP
@ ID_SEGMENT_UP
Definition: BusDialog.hh:147
GUITextGenerator::TXT_BUTTON_HELP
@ TXT_BUTTON_HELP
Label for help button.
Definition: GUITextGenerator.hh:60
BusDialog::ID_EDIT_FU_GUARD
@ ID_EDIT_FU_GUARD
Definition: BusDialog.hh:157
FindWindow
Definition: FindWindow.hh:49
BusDialog::ID_SEGMENT_NAME
@ ID_SEGMENT_NAME
Definition: BusDialog.hh:146
BusDialog::onSegmentSelection
void onSegmentSelection(wxListEvent &)
Definition: BusDialog.cc:693
TTAMachine::Machine::Navigator::count
int count() const
Texts::TextGenerator::text
virtual boost::format text(int textId)
Definition: TextGenerator.cc:94
TTAMachine::Bus::segment
virtual Segment * segment(int index) const
Definition: Bus.cc:329
ProDeConstants::EXTENSION_SIGN
static const wxString EXTENSION_SIGN
String for the sign extension.
Definition: ProDeConstants.hh:65
TTAMachine::Segment::moveAfter
void moveAfter(Segment &segment)
Definition: Segment.cc:357
BusDialog::ID_SEGMENT_LIST
@ ID_SEGMENT_LIST
Definition: BusDialog.hh:145
ProDeTextGenerator::MSG_ERROR_CANNOT_RF_GUARD
@ MSG_ERROR_CANNOT_RF_GUARD
Error: Register file guard.
Definition: ProDeTextGenerator.hh:226
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::Bus::signExtends
bool signExtends() const
Definition: Bus.cc:171
BusDialog::registerGuards_
vector< TTAMachine::RegisterGuard * > registerGuards_
list of register guards
Definition: BusDialog.hh:133
ProDeTextGenerator::MSG_ERROR_SAME_NAME
@ MSG_ERROR_SAME_NAME
Error: Same name exists.
Definition: ProDeTextGenerator.hh:229
BusDialog::ID_BUS_NAME
@ ID_BUS_NAME
Definition: BusDialog.hh:139
assert
#define assert(condition)
Definition: Application.hh:86
BusDialog::siSizer_
wxStaticBoxSizer * siSizer_
Static boxsizer for the short immediate properties.
Definition: BusDialog.hh:123
BusDialog::alwaysTrueGuard_
wxCheckBox * alwaysTrueGuard_
Check box for always true unconditional guard.
Definition: BusDialog.hh:110
TTAMachine::UnconditionalGuard
Definition: Guard.hh:180
BusDialog::onEditFUGuard
void onEditFUGuard(wxCommandEvent &)
Definition: BusDialog.cc:1047
BusDialog::ID_DELETE_RF_GUARD
@ ID_DELETE_RF_GUARD
Definition: BusDialog.hh:154
BusDialog::newSegName_
wxString newSegName_
Name for a new segment.
Definition: BusDialog.hh:105
ProDeTextGenerator::TXT_BUS_SI_BOX
@ TXT_BUS_SI_BOX
Short immediate box title.
Definition: ProDeTextGenerator.hh:151
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
ErrorDialog
Definition: ErrorDialog.hh:42
BusDialog::ID_TRUE_GUARD
@ ID_TRUE_GUARD
Definition: BusDialog.hh:143
BusDialog::width_
int width_
Width of the bus.
Definition: BusDialog.hh:101
BusDialog::ID_LABEL_SEGMENT_NAME
@ ID_LABEL_SEGMENT_NAME
Definition: BusDialog.hh:164
TTAMachine::RegisterGuard
Definition: Guard.hh:137
ProDeTextGenerator::TXT_RADIO_EXTENSION_ZERO
@ TXT_RADIO_EXTENSION_ZERO
Label for 'zero' radio button.
Definition: ProDeTextGenerator.hh:100
ProDeTextGenerator::TXT_COLUMN_PORT
@ TXT_COLUMN_PORT
Label for port column in a list.
Definition: ProDeTextGenerator.hh:114
TTAMachine::Bus::setName
virtual void setName(const std::string &name)
Definition: Bus.cc:196
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
BusDialog::ID_LABEL_BUS_NAME
@ ID_LABEL_BUS_NAME
Definition: BusDialog.hh:160
ProDeTextGenerator::MSG_ERROR_BUS_IT_SLOT_WIDTH
@ MSG_ERROR_BUS_IT_SLOT_WIDTH
Error: Slot width > bus width.
Definition: ProDeTextGenerator.hh:233
TTAMachine::Machine::functionUnitNavigator
virtual FunctionUnitNavigator functionUnitNavigator() const
Definition: Machine.cc:380
ProDeTextGenerator::TXT_RADIO_EXTENSION_SIGN
@ TXT_RADIO_EXTENSION_SIGN
Label for 'sign' radio button.
Definition: ProDeTextGenerator.hh:101
GUITextGenerator::TXT_BUTTON_ADD
@ TXT_BUTTON_ADD
Label for an add button.
Definition: GUITextGenerator.hh:53
ProDeTextGenerator::TXT_LABEL_NAME
@ TXT_LABEL_NAME
Label for component name widget.
Definition: ProDeTextGenerator.hh:56
ProDeTextGenerator::COMP_BUS
@ COMP_BUS
Name for bus component.
Definition: ProDeTextGenerator.hh:254
FUGuardDialog
Definition: FUGuardDialog.hh:47
BusDialog::portGuards_
vector< TTAMachine::PortGuard * > portGuards_
list of port guards
Definition: BusDialog.hh:135
Exception
Definition: Exception.hh:54
ProDeTextGenerator::COMP_SEGMENT
@ COMP_SEGMENT
Name for segment component.
Definition: ProDeTextGenerator.hh:256
BusDialog::segmentSizer_
wxStaticBoxSizer * segmentSizer_
Static boxsizer for the segment properties.
Definition: BusDialog.hh:129
MachineTester::isValidComponentName
static bool isValidComponentName(const std::string &name)
Definition: MachineTester.cc:312
TTAMachine::Bus::hasSegment
virtual bool hasSegment(const std::string &name) const
Definition: Bus.cc:284
ProDeConstants::EXTENSION_ZERO
static const wxString EXTENSION_ZERO
String for the zero extension.
Definition: ProDeConstants.hh:63
TTAMachine::Bus::guardCount
int guardCount() const
Definition: Bus.cc:441
TTAMachine::Segment::hasSourceSegment
bool hasSourceSegment() const
Definition: Segment.cc:388
TTAMachine::Machine::immediateSlotNavigator
virtual ImmediateSlotNavigator immediateSlotNavigator() const
Definition: Machine.cc:462
BusDialog::onWidth
void onWidth(wxSpinEvent &)
Definition: BusDialog.cc:1063
BusDialog::ID_HELP
@ ID_HELP
Definition: BusDialog.hh:159
TTAMachine::Bus::guard
Guard * guard(int index) const
Definition: Bus.cc:456
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
BusDialog::ID_EDIT_RF_GUARD
@ ID_EDIT_RF_GUARD
Definition: BusDialog.hh:153
BusDialog::ID_LABEL_BUS_WIDTH
@ ID_LABEL_BUS_WIDTH
Definition: BusDialog.hh:161
ProDeTextGenerator::instance
static ProDeTextGenerator * instance()
Definition: ProDeTextGenerator.cc:382
BusDialog::ID_SI_EXTENSION
@ ID_SI_EXTENSION
Definition: BusDialog.hh:142
ProDeTextGenerator::TXT_LABEL_EXTENSION
@ TXT_LABEL_EXTENSION
Label for 'extension' radiobox.
Definition: ProDeTextGenerator.hh:66
TTAMachine::Machine::registerFileNavigator
virtual RegisterFileNavigator registerFileNavigator() const
Definition: Machine.cc:450
TTAMachine::Segment::sourceSegment
Segment * sourceSegment() const
TTAMachine::Segment::hasDestinationSegment
bool hasDestinationSegment() const
Definition: Segment.cc:399
BusDialog::setTexts
void setTexts()
Definition: BusDialog.cc:192
ProDeTextGenerator::MSG_ERROR
@ MSG_ERROR
Text 'Error' and new line.
Definition: ProDeTextGenerator.hh:222
GUITextGenerator::TXT_BUTTON_ADD_DIALOG
@ TXT_BUTTON_ADD_DIALOG
Label for add button (with trailing ...).
Definition: GUITextGenerator.hh:54
TTAMachine::Guard::isInverted
virtual bool isInverted() const
ProDeTextGenerator::COMP_A_BUS
@ COMP_A_BUS
Name for a bus component.
Definition: ProDeTextGenerator.hh:253
GUITextGenerator::TXT_BUTTON_EDIT_DIALOG
@ TXT_BUTTON_EDIT_DIALOG
Label for edit button (with trailing ...).
Definition: GUITextGenerator.hh:58
BusDialog::ID_RF_GUARD_LIST
@ ID_RF_GUARD_LIST
Definition: BusDialog.hh:151
ProDeTextGenerator::TXT_BUS_SEGMENTS_BOX
@ TXT_BUS_SEGMENTS_BOX
Segments box title.
Definition: ProDeTextGenerator.hh:150
ProDeTextGenerator::TXT_BUTTON_DOWN
@ TXT_BUTTON_DOWN
Label for down button.
Definition: ProDeTextGenerator.hh:135
TTAMachine::Component::machine
virtual Machine * machine() const
BusDialog::ID_ADD_RF_GUARD
@ ID_ADD_RF_GUARD
Definition: BusDialog.hh:152
TTAMachine::Port::name
virtual std::string name() const
Definition: Port.cc:141
BusDialog::selectedRFGuard
TTAMachine::RegisterGuard * selectedRFGuard() const
Definition: BusDialog.cc:543
TTAMachine::Machine::busNavigator
virtual BusNavigator busNavigator() const
Definition: Machine.cc:356
BusDialog::portGuardSizer_
wxStaticBoxSizer * portGuardSizer_
Static boxsizer for the port guard properties.
Definition: BusDialog.hh:127
BusDialog::selectedSegment
TTAMachine::Segment * selectedSegment() const
Definition: BusDialog.cc:501
TTAMachine::Segment::moveBefore
void moveBefore(Segment &segment)
Definition: Segment.cc:320
BusDialog::ID_ADD_FU_GUARD
@ ID_ADD_FU_GUARD
Definition: BusDialog.hh:156
ProDeTextGenerator::MSG_ERROR_CANNOT_FU_GUARD
@ MSG_ERROR_CANNOT_FU_GUARD
Error: Function unit port guard.
Definition: ProDeTextGenerator.hh:227
BusDialog::segList_
wxListCtrl * segList_
List widget for the segment list.
Definition: BusDialog.hh:108
ProDeTextGenerator::COMP_MACHINE
@ COMP_MACHINE
Text for machine description.
Definition: ProDeTextGenerator.hh:252
TTAMachine::Machine::Navigator::item
ComponentType * item(int index) const
TTAMachine::PortGuard
Definition: Guard.hh:99
ProDeTextGenerator::TXT_COLUMN_INVERTED
@ TXT_COLUMN_INVERTED
Label for inv column in a list.
Definition: ProDeTextGenerator.hh:112
WidgetTools::setWidgetLabel
static void setWidgetLabel(wxWindow *widget, std::string text)
Definition: WidgetTools.cc:52
InformationDialog
Definition: InformationDialog.hh:42
BusDialog::ID_ADD_SEGMENT
@ ID_ADD_SEGMENT
Definition: BusDialog.hh:149
BusDialog::TransferDataToWindow
virtual bool TransferDataToWindow()
Definition: BusDialog.cc:337
BusDialog::onFUGuardSelection
void onFUGuardSelection(wxListEvent &)
Definition: BusDialog.cc:1081
BusDialog::alwaysFalseGuard_
wxCheckBox * alwaysFalseGuard_
Check box for always false unconditional guard.
Definition: BusDialog.hh:112
BusDialog::bus_
TTAMachine::Bus * bus_
Transport Bus to edit.
Definition: BusDialog.hh:97
BusDialog::selectedFUGuard
TTAMachine::PortGuard * selectedFUGuard() const
Definition: BusDialog.cc:522
BusDialog::ID_SI_WIDTH
@ ID_SI_WIDTH
Definition: BusDialog.hh:141
ProDeTextGenerator::TXT_BUS_REGISTER_GUARD_BOX
@ TXT_BUS_REGISTER_GUARD_BOX
Register file guards box title.
Definition: ProDeTextGenerator.hh:152
TTAMachine::Segment::name
std::string name() const
BusDialog::ID_DELETE_SEGMENT
@ ID_DELETE_SEGMENT
Definition: BusDialog.hh:150
TTAMachine::Machine::instructionTemplateNavigator
virtual InstructionTemplateNavigator instructionTemplateNavigator() const
Definition: Machine.cc:428
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)
TTAMachine::RegisterGuard::registerFile
const RegisterFile * registerFile() const
RFGuardDialog
Definition: RFGuardDialog.hh:46
BusDialog::updateSegmentList
void updateSegmentList()
Definition: BusDialog.cc:486
BusDialog::onEditRFGuard
void onEditRFGuard(wxCommandEvent &)
Definition: BusDialog.cc:958
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
TTAMachine::Bus::segmentCount
virtual int segmentCount() const
Definition: Bus.cc:385
BusDialog::ID_LABEL_WIDTH
@ ID_LABEL_WIDTH
Definition: BusDialog.hh:162
BusDialog::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition: BusDialog.cc:1178
ProDeTextGenerator::TXT_BUS_PORT_GUARD_BOX
@ TXT_BUS_PORT_GUARD_BOX
Function unit guards box title.
Definition: ProDeTextGenerator.hh:153
ProDeTextGenerator::TXT_LABEL_FALSE_GUARD
@ TXT_LABEL_FALSE_GUARD
Label for 'always false guard'.
Definition: ProDeTextGenerator.hh:65
BusDialog::onRFGuardSelection
void onRFGuardSelection(wxListEvent &)
Definition: BusDialog.cc:978
ProDeTextGenerator::TXT_BUTTON_UP
@ TXT_BUTTON_UP
Label for up button.
Definition: ProDeTextGenerator.hh:134
GUITextGenerator::TXT_BUTTON_OK
@ TXT_BUTTON_OK
Label for OK button.
Definition: GUITextGenerator.hh:59
BusDialog::ID_BUS_WIDTH
@ ID_BUS_WIDTH
Definition: BusDialog.hh:140