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

#include <FUImplementationDialog.hh>

Inheritance diagram for FUImplementationDialog:
Inheritance graph
Collaboration diagram for FUImplementationDialog:
Collaboration graph

Public Member Functions

 FUImplementationDialog (wxWindow *parent, wxWindowID id, HDB::FUImplementation &implementation, const TTAMachine::FunctionUnit &architecture)
 
virtual ~FUImplementationDialog ()
 

Private Types

enum  {
  ID_LABEL_NAME = 10000, ID_NAME, ID_LABEL_CLK_PORT, ID_CLK_PORT,
  ID_LABEL_RST_PORT, ID_RST_PORT, ID_LABEL_GLOCK_PORT, ID_GLOCK_PORT,
  ID_LABEL_GLOCK_REQ_PORT, ID_GLOCK_REQ_PORT, ID_OPCODE_LIST, ID_CLEAR_OPCODE,
  ID_SET_OPCODE, ID_OPCODE, ID_EXTERNAL_PORT_LIST, ID_ADD_EXTERNAL_PORT,
  ID_EDIT_EXTERNAL_PORT, ID_DELETE_EXTERNAL_PORT, ID_SOURCE_LIST, ID_ADD_SOURCE,
  ID_DELETE_SOURCE, ID_PARAMETER_LIST, ID_EDIT_PARAMETER, ID_ADD_PARAMETER,
  ID_DELETE_PARAMETER, ID_LABEL_OPCODE_PORT_NAME, ID_OPCODE_PORT, ID_ARCH_PORT_LIST,
  ID_EDIT_ARCH_PORT, ID_LINE, ID_MOVE_SOURCE_UP, ID_MOVE_SOURCE_DOWN
}
 Window indentifiers for dialog widgets. More...
 

Private Member Functions

void onOK (wxCommandEvent &event)
 
void update (bool onInit=false)
 
HDB::FUPortImplementationselectedArchPort ()
 
HDB::FUExternalPortselectedExternalPort ()
 
HDB::FUImplementation::Parameter selectedParameter ()
 
void onArchPortActivation (wxListEvent &event)
 
void onArchPortSelection (wxListEvent &event)
 
void onAddArchitecturePort (wxCommandEvent &event)
 
void onEditArchitecturePort (wxCommandEvent &event)
 
void onDeleteArchitecturePort (wxCommandEvent &event)
 
void onExternalPortActivation (wxListEvent &event)
 
void onExternalPortSelection (wxListEvent &event)
 
void onAddExternalPort (wxCommandEvent &event)
 
void onEditExternalPort (wxCommandEvent &event)
 
void onDeleteExternalPort (wxCommandEvent &event)
 
void onParameterActivation (wxListEvent &event)
 
void onParameterSelection (wxListEvent &event)
 
void onAddParameter (wxCommandEvent &event)
 
void onEditParameter (wxCommandEvent &event)
 
void onDeleteParameter (wxCommandEvent &event)
 
void onSourceFileSelection (wxListEvent &event)
 
void onAddSourceFile (wxCommandEvent &event)
 
void onDeleteSourceFile (wxCommandEvent &event)
 
void onMoveSourceFileUp (wxCommandEvent &event)
 
void onMoveSourceFileDown (wxCommandEvent &event)
 
void onOpcodeSelection (wxListEvent &event)
 
void onSetOpcode (wxCommandEvent &event)
 
void onClearOpcode (wxCommandEvent &event)
 
wxSizer * createContents (wxWindow *parent, bool call_fit, bool set_sizer)
 

Private Attributes

HDB::FUImplementationimplementation_
 FU Implementation to modify. More...
 
const TTAMachine::FunctionUnitarchitecture_
 Function unit architecture the FUImplementation implements. More...
 
bool opcodeWarningShowed_
 
wxListCtrl * archPortList_
 Pointer to the architecture port list widget. More...
 
wxListCtrl * externalPortList_
 Pointer to the external port list widget. More...
 
wxListCtrl * parameterList_
 Pointer to the parameter list widget. More...
 
wxListCtrl * opcodeList_
 Pointer to the opcode list widget. More...
 
wxListCtrl * sourceList_
 Pointer to the source file list widget. More...
 
wxString name_
 
wxString opcodePort_
 
wxString clkPort_
 
wxString rstPort_
 
wxString gLockPort_
 
wxString gLockReqPort_
 

Detailed Description

Dialog for editing FU implementations.

Definition at line 52 of file FUImplementationDialog.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private

Window indentifiers for dialog widgets.

Enumerator
ID_LABEL_NAME 
ID_NAME 
ID_LABEL_CLK_PORT 
ID_CLK_PORT 
ID_LABEL_RST_PORT 
ID_RST_PORT 
ID_LABEL_GLOCK_PORT 
ID_GLOCK_PORT 
ID_LABEL_GLOCK_REQ_PORT 
ID_GLOCK_REQ_PORT 
ID_OPCODE_LIST 
ID_CLEAR_OPCODE 
ID_SET_OPCODE 
ID_OPCODE 
ID_EXTERNAL_PORT_LIST 
ID_ADD_EXTERNAL_PORT 
ID_EDIT_EXTERNAL_PORT 
ID_DELETE_EXTERNAL_PORT 
ID_SOURCE_LIST 
ID_ADD_SOURCE 
ID_DELETE_SOURCE 
ID_PARAMETER_LIST 
ID_EDIT_PARAMETER 
ID_ADD_PARAMETER 
ID_DELETE_PARAMETER 
ID_LABEL_OPCODE_PORT_NAME 
ID_OPCODE_PORT 
ID_ARCH_PORT_LIST 
ID_EDIT_ARCH_PORT 
ID_LINE 
ID_MOVE_SOURCE_UP 
ID_MOVE_SOURCE_DOWN 

Definition at line 103 of file FUImplementationDialog.hh.

Constructor & Destructor Documentation

◆ FUImplementationDialog()

The Constructor.

Parameters
parentParent window of the dialog.
idWindow identifier for the dialog window.
implementationFU implementation to modify.

Definition at line 139 of file FUImplementationDialog.cc.

141  :
142  wxDialog(parent, id, _T("Function Unit Implementation")),
144  opcodeWarningShowed_(false) {
145 
146  createContents(this, true, true);
147 
148  // Initialize list widgets.
149  archPortList_ = dynamic_cast<wxListCtrl*>(FindWindow(ID_ARCH_PORT_LIST));
151  dynamic_cast<wxListCtrl*>(FindWindow(ID_EXTERNAL_PORT_LIST));
152  parameterList_ = dynamic_cast<wxListCtrl*>(FindWindow(ID_PARAMETER_LIST));
153  sourceList_ = dynamic_cast<wxListCtrl*>(FindWindow(ID_SOURCE_LIST));
154  opcodeList_ = dynamic_cast<wxListCtrl*>(FindWindow(ID_OPCODE_LIST));
155 
156  // Create columns in list widgets.
157  archPortList_->InsertColumn(0, _T("name"), wxLIST_FORMAT_LEFT, 130);
158 
159  archPortList_->InsertColumn(
160  1, _T("architecture port"), wxLIST_FORMAT_LEFT, 130);
161 
162  externalPortList_->InsertColumn(0, _T("name"), wxLIST_FORMAT_LEFT, 260);
163 
164  parameterList_->InsertColumn(
165  0, _T("parameter"), wxLIST_FORMAT_LEFT, 180);
166 
167  parameterList_->InsertColumn(
168  1, _T("value"), wxLIST_FORMAT_LEFT, 80);
169 
170  opcodeList_->InsertColumn(
171  0, _T("operation"), wxLIST_FORMAT_LEFT, 180);
172 
173  opcodeList_->InsertColumn(
174  1, _T("opcode"), wxLIST_FORMAT_LEFT, 80);
175 
176  sourceList_->InsertColumn(
177  0, _T("source file"), wxLIST_FORMAT_LEFT, 260);
178 
179  // Read string attributes from the FUImplementation object.
180  // If implementation attributes are empty, use default values
183  if (implementation_.clkPort().empty()) {
185  } else {
187  }
188  if (implementation_.rstPort().empty()) {
190  } else {
192  }
193  if (implementation_.glockPort().empty()) {
195  } else {
197  }
199 
200 
201  // Set text field validators.
202  FindWindow(ID_NAME)->SetValidator(
203  wxTextValidator(wxFILTER_ASCII, &name_));
204  FindWindow(ID_OPCODE_PORT)->SetValidator(
205  wxTextValidator(wxFILTER_ASCII, &opcodePort_));
206  FindWindow(ID_CLK_PORT)->SetValidator(
207  wxTextValidator(wxFILTER_ASCII, &clkPort_));
208  FindWindow(ID_RST_PORT)->SetValidator(
209  wxTextValidator(wxFILTER_ASCII, &rstPort_));
210  FindWindow(ID_GLOCK_PORT)->SetValidator(
211  wxTextValidator(wxFILTER_ASCII, &gLockPort_));
212  FindWindow(ID_GLOCK_REQ_PORT)->SetValidator(
213  wxTextValidator(wxFILTER_ASCII, &gLockReqPort_));
214 
215 
216  // Disable conditional buttons initially.
217  FindWindow(ID_EDIT_ARCH_PORT)->Disable();
218  FindWindow(ID_EDIT_EXTERNAL_PORT)->Disable();
220  FindWindow(ID_EDIT_PARAMETER)->Disable();
221  FindWindow(ID_DELETE_PARAMETER)->Disable();
222 #ifdef ALLOW_OPCODE_EDITING
223  FindWindow(ID_SET_OPCODE)->Disable();
224  FindWindow(ID_CLEAR_OPCODE)->Disable();
225 #endif
226  FindWindow(ID_DELETE_SOURCE)->Disable();
227  FindWindow(ID_MOVE_SOURCE_UP)->Disable();
228  FindWindow(ID_MOVE_SOURCE_DOWN)->Disable();
229 
230  update(true);
231 }

References WxConversion::toWxString().

Here is the call graph for this function:

◆ ~FUImplementationDialog()

FUImplementationDialog::~FUImplementationDialog ( )
virtual

The Destructor.

Definition at line 236 of file FUImplementationDialog.cc.

236  {
237 }

Member Function Documentation

◆ createContents()

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

Creates the dialog contents.

Definition at line 1064 of file FUImplementationDialog.cc.

1065  {
1066  wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );
1067 
1068  wxFlexGridSizer *item1 = new wxFlexGridSizer( 2, 0, 0 );
1069 
1070  wxFlexGridSizer *item2 = new wxFlexGridSizer( 2, 0, 0 );
1071 
1072  wxStaticText *item3 = new wxStaticText( parent, ID_LABEL_NAME, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
1073  item2->Add( item3, 0, wxALIGN_RIGHT|wxALL, 5 );
1074 
1075  wxTextCtrl *item4 = new wxTextCtrl( parent, ID_NAME, wxT(""), wxDefaultPosition, wxSize(160,-1), 0 );
1076  item2->Add( item4, 0, wxGROW|wxALL, 5 );
1077 
1078  wxStaticText *item5 = new wxStaticText( parent, ID_LABEL_OPCODE_PORT_NAME, wxT("Opcode port:"), wxDefaultPosition, wxDefaultSize, 0 );
1079  item2->Add( item5, 0, wxALIGN_RIGHT|wxALL, 5 );
1080 
1081  wxTextCtrl *item6 = new wxTextCtrl( parent, ID_OPCODE_PORT, wxT(""), wxDefaultPosition, wxSize(160,-1), 0 );
1082  item2->Add( item6, 0, wxGROW|wxALL, 5 );
1083 
1084  wxStaticText *item7 = new wxStaticText( parent, ID_LABEL_CLK_PORT, wxT("Clock port:"), wxDefaultPosition, wxDefaultSize, 0 );
1085  item2->Add( item7, 0, wxALIGN_RIGHT|wxALL, 5 );
1086 
1087  wxTextCtrl *item8 = new wxTextCtrl( parent, ID_CLK_PORT, wxT(""), wxDefaultPosition, wxSize(80,-1), 0 );
1088  item2->Add( item8, 0, wxGROW|wxALL, 5 );
1089 
1090  wxStaticText *item9 = new wxStaticText( parent, ID_LABEL_GLOCK_PORT, wxT("Global lock port:"), wxDefaultPosition, wxDefaultSize, 0 );
1091  item2->Add( item9, 0, wxALIGN_RIGHT|wxALL, 5 );
1092 
1093  wxTextCtrl *item10 = new wxTextCtrl( parent, ID_GLOCK_PORT, wxT(""), wxDefaultPosition, wxSize(150,-1), 0 );
1094  item2->Add( item10, 0, wxGROW|wxALL, 5 );
1095 
1096  wxStaticText *item11 = new wxStaticText( parent, ID_LABEL_RST_PORT, wxT("Reset port:"), wxDefaultPosition, wxDefaultSize, 0 );
1097  item2->Add( item11, 0, wxALIGN_RIGHT|wxALL, 5 );
1098 
1099  wxTextCtrl *item12 = new wxTextCtrl( parent, ID_RST_PORT, wxT(""), wxDefaultPosition, wxSize(80,-1), 0 );
1100  item2->Add( item12, 0, wxGROW|wxALL, 5 );
1101 
1102  wxStaticText *item13 = new wxStaticText( parent, ID_LABEL_GLOCK_REQ_PORT, wxT("Global lock req. port:"), wxDefaultPosition, wxDefaultSize, 0 );
1103  item2->Add( item13, 0, wxALIGN_RIGHT|wxALL, 5 );
1104 
1105  wxTextCtrl *item14 = new wxTextCtrl( parent, ID_GLOCK_REQ_PORT, wxT(""), wxDefaultPosition, wxSize(80,-1), 0 );
1106  item2->Add( item14, 0, wxGROW|wxALL, 5 );
1107 
1108  item1->Add( item2, 0, wxALL, 5 );
1109 
1110  wxStaticBox *item16 = new wxStaticBox( parent, -1, wxT("Source files:") );
1111 
1112  wxStaticBoxSizer *item15 = new wxStaticBoxSizer( item16, wxVERTICAL );
1113 
1114  wxFlexGridSizer *item17_1 = new wxFlexGridSizer( 2, 0, 0 );
1115 
1116  wxListCtrl *item17 = new wxListCtrl( parent, ID_SOURCE_LIST, wxDefaultPosition, wxSize(300,150), wxLC_REPORT|wxSUNKEN_BORDER );
1117  item17_1->Add( item17, 0, wxGROW|wxALL, 5 );
1118 
1119  wxBoxSizer *item17_3 = new wxBoxSizer( wxVERTICAL );
1120 
1121  wxButton *item60 = new wxButton( parent, ID_MOVE_SOURCE_UP, wxT("â–´"), wxDefaultPosition, wxSize(20, 20), 0 );
1122  item17_3->Add( item60, 0, wxALIGN_CENTER|wxALL, 5 );
1123 
1124  wxButton *item61 = new wxButton( parent, ID_MOVE_SOURCE_DOWN, wxT("â–¾"), wxDefaultPosition, wxSize(20, 20), 0 );
1125  item17_3->Add( item61, 0, wxALIGN_CENTER|wxALL, 5 );
1126 
1127  item17_1->Add( item17_3, 0, wxALIGN_RIGHT|wxALIGN_CENTER, 5 );
1128 
1129  item15->Add( item17_1, 0, wxGROW|wxALL, 5 );
1130 
1131  wxBoxSizer *item18 = new wxBoxSizer( wxHORIZONTAL );
1132 
1133  wxButton *item19 = new wxButton( parent, ID_ADD_SOURCE, wxT("Add..."), wxDefaultPosition, wxDefaultSize, 0 );
1134  item18->Add( item19, 0, wxALL, 5 );
1135 
1136  wxButton *item20 = new wxButton( parent, ID_DELETE_SOURCE, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
1137  item18->Add( item20, 0, wxALIGN_CENTER|wxALL, 5 );
1138 
1139  item15->Add( item18, 0, 0, 5 );
1140 
1141  item1->Add( item15, 0, wxGROW|wxALL, 5 );
1142 
1143  wxStaticBox *item22 = new wxStaticBox( parent, -1, wxT("Architecture ports:") );
1144  wxStaticBoxSizer *item21 = new wxStaticBoxSizer( item22, wxVERTICAL );
1145 
1146  wxListCtrl *item23 = new wxListCtrl( parent, ID_ARCH_PORT_LIST, wxDefaultPosition, wxSize(200,120), wxLC_REPORT|wxSUNKEN_BORDER );
1147  item21->Add( item23, 0, wxGROW|wxALL, 5 );
1148 
1149  wxBoxSizer *item24 = new wxBoxSizer( wxHORIZONTAL );
1150 
1151  wxButton *item25 = new wxButton( parent, ID_EDIT_ARCH_PORT, wxT("Edit..."), wxDefaultPosition, wxDefaultSize, 0 );
1152  item24->Add( item25, 0, wxALIGN_CENTER|wxALL, 5 );
1153 
1154  item21->Add( item24, 0, 0, 5 );
1155 
1156  item1->Add( item21, 0, wxGROW|wxALL, 5 );
1157 
1158  wxStaticBox *item27 = new wxStaticBox( parent, -1, wxT("Opcodes:") );
1159  wxStaticBoxSizer *item26 = new wxStaticBoxSizer( item27, wxVERTICAL );
1160 
1161  wxListCtrl *item28 = new wxListCtrl( parent, ID_OPCODE_LIST, wxDefaultPosition, wxSize(260,120), wxLC_REPORT|wxSUNKEN_BORDER );
1162  item26->Add( item28, 0, wxGROW|wxALL, 5 );
1163 
1164  wxBoxSizer *item29 = new wxBoxSizer( wxHORIZONTAL );
1165 #ifdef ALLOW_OPCODE_EDITING
1166  wxSpinCtrl *item30 = new wxSpinCtrl( parent, ID_OPCODE, wxT("0"), wxDefaultPosition, wxSize(-1,-1), 0, 0, 100, 0 );
1167  item29->Add( item30, 0, wxALIGN_CENTER|wxALL, 5 );
1168 
1169  wxButton *item31 = new wxButton( parent, ID_SET_OPCODE, wxT("Set"), wxDefaultPosition, wxDefaultSize, 0 );
1170  item29->Add( item31, 0, wxALIGN_CENTER|wxALL, 5 );
1171 
1172  wxButton *item32 = new wxButton( parent, ID_CLEAR_OPCODE, wxT("Clear"), wxDefaultPosition, wxDefaultSize, 0 );
1173  item29->Add( item32, 0, wxALIGN_CENTER|wxALL, 5 );
1174 #endif
1175  item26->Add( item29, 0, 0, 5 );
1176 
1177  item1->Add( item26, 0, wxGROW|wxALL, 5 );
1178 
1179  wxStaticBox *item34 = new wxStaticBox( parent, -1, wxT("External ports:") );
1180  wxStaticBoxSizer *item33 = new wxStaticBoxSizer( item34, wxVERTICAL );
1181 
1182  wxListCtrl *item35 = new wxListCtrl( parent, ID_EXTERNAL_PORT_LIST, wxDefaultPosition, wxSize(200,120), wxLC_REPORT|wxSUNKEN_BORDER );
1183  item33->Add( item35, 0, wxGROW|wxALL, 5 );
1184 
1185  wxBoxSizer *item36 = new wxBoxSizer( wxHORIZONTAL );
1186 
1187  wxButton *item37 = new wxButton( parent, ID_ADD_EXTERNAL_PORT, wxT("Add..."), wxDefaultPosition, wxDefaultSize, 0 );
1188  item36->Add( item37, 0, wxALL, 5 );
1189 
1190  wxButton *item38 = new wxButton( parent, ID_EDIT_EXTERNAL_PORT, wxT("Edit..."), wxDefaultPosition, wxDefaultSize, 0 );
1191  item36->Add( item38, 0, wxALIGN_CENTER|wxALL, 5 );
1192 
1193  wxButton *item39 = new wxButton( parent, ID_DELETE_EXTERNAL_PORT, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
1194  item36->Add( item39, 0, wxALIGN_CENTER|wxALL, 5 );
1195 
1196  item33->Add( item36, 0, wxALIGN_CENTER, 5 );
1197 
1198  item1->Add( item33, 0, wxGROW|wxALL, 5 );
1199 
1200  wxStaticBox *item41 = new wxStaticBox( parent, -1, wxT("Parameters:") );
1201  wxStaticBoxSizer *item40 = new wxStaticBoxSizer( item41, wxVERTICAL );
1202 
1203  wxListCtrl *item42 = new wxListCtrl( parent, ID_PARAMETER_LIST, wxDefaultPosition, wxSize(260,120), wxLC_REPORT|wxSUNKEN_BORDER );
1204  item40->Add( item42, 0, wxGROW|wxALL, 5 );
1205 
1206  wxBoxSizer *item43 = new wxBoxSizer( wxHORIZONTAL );
1207 
1208  wxButton *item44 = new wxButton( parent, ID_ADD_PARAMETER, wxT("Add..."), wxDefaultPosition, wxDefaultSize, 0 );
1209  item43->Add( item44, 0, wxALIGN_CENTER|wxALL, 5 );
1210 
1211  wxButton *item45 = new wxButton( parent, ID_EDIT_PARAMETER, wxT("Edit..."), wxDefaultPosition, wxDefaultSize, 0 );
1212  item43->Add( item45, 0, wxALIGN_CENTER|wxALL, 5 );
1213 
1214  wxButton *item46 = new wxButton( parent, ID_DELETE_PARAMETER, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
1215  item43->Add( item46, 0, wxALIGN_CENTER|wxALL, 5 );
1216 
1217  item40->Add( item43, 0, 0, 5 );
1218 
1219  item1->Add( item40, 0, wxGROW|wxALL, 5 );
1220 
1221  item0->Add( item1, 0, wxALIGN_CENTER|wxALL, 5 );
1222 
1223  wxStaticLine *item47 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
1224  item0->Add( item47, 0, wxGROW|wxALL, 5 );
1225 
1226  wxBoxSizer *item48 = new wxBoxSizer( wxHORIZONTAL );
1227 
1228  wxButton *item49 = new wxButton( parent, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
1229  item48->Add( item49, 0, wxALIGN_CENTER|wxALL, 5 );
1230 
1231  wxButton *item50 = new wxButton( parent, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
1232  item48->Add( item50, 0, wxALIGN_CENTER|wxALL, 5 );
1233 
1234  item0->Add( item48, 0, wxALL, 5 );
1235 
1236  if (set_sizer)
1237  {
1238  parent->SetSizer( item0 );
1239  if (call_fit)
1240  item0->SetSizeHints( parent );
1241  }
1242 
1243  return item0;
1244 }

◆ onAddArchitecturePort()

void FUImplementationDialog::onAddArchitecturePort ( wxCommandEvent &  event)
private

◆ onAddExternalPort()

void FUImplementationDialog::onAddExternalPort ( wxCommandEvent &  event)
private

Event handler for the add external port button.

Opens a FUExternalPortDialog for adding a new external port.

Definition at line 443 of file FUImplementationDialog.cc.

443  {
444 
445  FUExternalPort* port = new FUExternalPort(
446  "", IN, "", "", implementation_);
447 
448  FUExternalPortDialog dialog(this, -1, *port, implementation_);
449 
450  if (dialog.ShowModal() != wxID_OK) {
452  return;
453  }
454 
455  update();
456 }

References HDB::IN.

◆ onAddParameter()

void FUImplementationDialog::onAddParameter ( wxCommandEvent &  event)
private

Event handler for the add parameter button.

Opens a ImplementationParameterDialog for adding a new parameter.

Definition at line 539 of file FUImplementationDialog.cc.

539  {
540 
541  FUImplementation::Parameter parameter;
542 
543  ImplementationParameterDialog dialog(this, -1, parameter);
544 
545  if (dialog.ShowModal() != wxID_OK) {
546  return;
547  }
548 
549  try {
551  parameter.name, parameter.type, parameter.value);
552  } catch (IllegalParameters& e) {
553  wxString message = _T("FU implementation already contains ");
554  message.Append(_T("a parameter\nwith name '"));
555  message.Append(WxConversion::toWxString(parameter.name));
556  message.Append(_T("'."));
557  ErrorDialog dialog(this, message);
558  dialog.ShowModal();
559  return;
560  }
561 
562  update();
563 }

References HDB::Parameter::name, WxConversion::toWxString(), HDB::Parameter::type, and HDB::Parameter::value.

Here is the call graph for this function:

◆ onAddSourceFile()

void FUImplementationDialog::onAddSourceFile ( wxCommandEvent &  event)
private

Event handler for the add source file button.

Opens a source file dialog for adding a new implementation file to the list.

Definition at line 813 of file FUImplementationDialog.cc.

813  {
814 
817 
818  BlockImplementationFileDialog dialog(this, -1, *file);
819 
820  if (dialog.ShowModal() == wxID_OK) {
822  update();
823  } else {
824  delete file;
825  }
826 
827  FindWindow(ID_DELETE_SOURCE)->Disable();
828  FindWindow(ID_MOVE_SOURCE_UP)->Disable();
829  FindWindow(ID_MOVE_SOURCE_DOWN)->Disable();
830 }

References HDB::BlockImplementationFile::VHDL.

◆ onArchPortActivation()

void FUImplementationDialog::onArchPortActivation ( wxListEvent &  event)
private

Event handler for the architecture port list activateion

Opens a FUPortImplementationdialog for modifying the selected architecure port.

Definition at line 422 of file FUImplementationDialog.cc.

422  {
424 
425  assert(port != NULL);
426 
427  const BaseFUPort& archPort =
429 
430  FUPortImplementationDialog dialog(this, -1, *port, archPort);
431 
432  dialog.ShowModal();
433  update();
434 }

References HDB::FUPortImplementation::architecturePort(), and assert.

Here is the call graph for this function:

◆ onArchPortSelection()

void FUImplementationDialog::onArchPortSelection ( wxListEvent &  event)
private

Event handler for the architecture port list selection changes.

Updates edit/delete architecture port enabeld/disabled states.

Definition at line 407 of file FUImplementationDialog.cc.

407  {
408  if (selectedArchPort() == NULL) {
409  FindWindow(ID_EDIT_ARCH_PORT)->Disable();
410  } else {
411  FindWindow(ID_EDIT_ARCH_PORT)->Enable();
412  }
413 }

◆ onClearOpcode()

void FUImplementationDialog::onClearOpcode ( wxCommandEvent &  event)
private

Event handler for the clear opcode button.

Clears the opcode of the selected operation.

Definition at line 756 of file FUImplementationDialog.cc.

756  {
757 
758  std::string operation = WidgetTools::lcStringSelection(opcodeList_, 0);
759 
760  if (operation == "") {
761  return;
762  }
763 
764  implementation_.unsetOpcode(operation);
765 
766  update();
767 }

References WidgetTools::lcStringSelection().

Here is the call graph for this function:

◆ onDeleteArchitecturePort()

void FUImplementationDialog::onDeleteArchitecturePort ( wxCommandEvent &  event)
private

◆ onDeleteExternalPort()

void FUImplementationDialog::onDeleteExternalPort ( wxCommandEvent &  event)
private

Event handler for the delete external port button.

Deletes the selected external port.

Definition at line 504 of file FUImplementationDialog.cc.

504  {
505 
507 
508  if (port == NULL) {
509  return;
510  }
511 
513  update();
514 }

◆ onDeleteParameter()

void FUImplementationDialog::onDeleteParameter ( wxCommandEvent &  event)
private

Event handler for the delete parameter button.

Deletes the selected parameter.

Definition at line 634 of file FUImplementationDialog.cc.

634  {
635 
637 
639 
640  // update external port parameter dependencies
641  for (int i = 0; i < implementation_.externalPortCount(); i++) {
643  port.unsetParameterDependency(parameter.name);
644  }
645 
646  update();
647 }

References HDB::Parameter::name, and HDB::ExternalPort::unsetParameterDependency().

Here is the call graph for this function:

◆ onDeleteSourceFile()

void FUImplementationDialog::onDeleteSourceFile ( wxCommandEvent &  event)
private

Event handler for the delete source file button.

Removes the selected source file.

Definition at line 838 of file FUImplementationDialog.cc.

838  {
839 
840  std::string fileName = WidgetTools::lcStringSelection(sourceList_, 0);
841 
842  for (int i = 0; i < implementation_.implementationFileCount(); i++) {
844  if (file.pathToFile() == fileName) {
846  }
847  }
848 
849  FindWindow(ID_DELETE_SOURCE)->Disable();
850  FindWindow(ID_MOVE_SOURCE_UP)->Disable();
851  FindWindow(ID_MOVE_SOURCE_DOWN)->Disable();
852 
853  update();
854 }

References WidgetTools::lcStringSelection(), and HDB::BlockImplementationFile::pathToFile().

Here is the call graph for this function:

◆ onEditArchitecturePort()

void FUImplementationDialog::onEditArchitecturePort ( wxCommandEvent &  event)
private

Event handler for the edit architecture port button.

Opens a FUPortImplementationdialog for modifying the selected architecure port.

Definition at line 383 of file FUImplementationDialog.cc.

383  {
384 
386 
387  if (port == NULL) {
388  return;
389  }
390 
391  const BaseFUPort& archPort =
393 
394  FUPortImplementationDialog dialog(this, -1, *port, archPort);
395 
396  dialog.ShowModal();
397  update();
398 }

References HDB::FUPortImplementation::architecturePort().

Here is the call graph for this function:

◆ onEditExternalPort()

void FUImplementationDialog::onEditExternalPort ( wxCommandEvent &  event)
private

Event handler for the edit external port button.

Opens a FUExternalPort for modifying the selected external port.

Definition at line 465 of file FUImplementationDialog.cc.

465  {
466 
468 
469  if (port == NULL) {
470  return;
471  }
472 
473  FUExternalPortDialog dialog(this, -1, *port, implementation_);
474 
475  dialog.ShowModal();
476  update();
477 }

◆ onEditParameter()

void FUImplementationDialog::onEditParameter ( wxCommandEvent &  event)
private

Event handler for the edit parameter button.

Opens a FUImplementationParamaeterDialog for modifying the selected parameter.

Definition at line 573 of file FUImplementationDialog.cc.

573  {
574 
576  std::string oldName = parameter.name;
577 
578  ImplementationParameterDialog dialog(this, -1, parameter);
579 
580  if (dialog.ShowModal() == wxID_OK) {
583  parameter.name, parameter.type, parameter.value);
584 
585  // update external port parameter dependencies if needed
586  for (int i = 0; i < implementation_.externalPortCount(); i++) {
588  if (port.unsetParameterDependency(oldName)) {
589  port.setParameterDependency(parameter.name);
590  }
591  }
592  }
593 
594  update();
595 }

References HDB::Parameter::name, HDB::ExternalPort::setParameterDependency(), HDB::Parameter::type, HDB::ExternalPort::unsetParameterDependency(), and HDB::Parameter::value.

Here is the call graph for this function:

◆ onExternalPortActivation()

void FUImplementationDialog::onExternalPortActivation ( wxListEvent &  event)
private

Event handler for the activate external port list item

Opens a FUExternalPort for modifying the selected external port.

Definition at line 485 of file FUImplementationDialog.cc.

485  {
486 
488  assert(port != NULL);
489 
490  FUExternalPortDialog dialog(this, -1, *port, implementation_);
491 
492  dialog.ShowModal();
493  update();
494 }

References assert.

◆ onExternalPortSelection()

void FUImplementationDialog::onExternalPortSelection ( wxListEvent &  event)
private

Event handler for the external port list selection changes.

Updates edit/delete external port enabeld/disabled states.

Definition at line 522 of file FUImplementationDialog.cc.

522  {
523  if (selectedExternalPort() == NULL) {
525  FindWindow(ID_EDIT_EXTERNAL_PORT)->Disable();
526  } else {
529  }
530 }

◆ onMoveSourceFileDown()

void FUImplementationDialog::onMoveSourceFileDown ( wxCommandEvent &  event)
private

Event handler for the move source file down button.

Moves the selected source file down on the files list.

Definition at line 911 of file FUImplementationDialog.cc.

911  {
913  std::string fileName =
915  std::vector<std::string> pathToFileList;
916 
917  int originalImplementationFileCount =
919 
920  for (int i = 0; i < originalImplementationFileCount; i++) {
922  pathToFileList.push_back(file.pathToFile());
924  }
925 
926  for (unsigned int i = 0; i < (pathToFileList.size() - 1); i++) {
927  if (pathToFileList.at(i) == fileName) {
928  pathToFileList.erase(pathToFileList.begin() + i);
929  pathToFileList.insert(
930  pathToFileList.begin() + i + 1, fileName);
931  break;
932  }
933  }
934 
935  for (unsigned int i = 0; i < pathToFileList.size(); i++) {
937  new BlockImplementationFile(pathToFileList.at(i),
940  }
941 
942  pathToFileList.clear();
943  update();
944 
945  for (int i = 0; i < implementation_.implementationFileCount(); i++) {
946  if (implementation_.file(i).pathToFile() == fileName) {
947  sourceList_->SetItemState(i, wxLIST_STATE_SELECTED,
948  wxLIST_STATE_SELECTED);
949  }
950  }
951  }
952 }

References WidgetTools::lcStringSelection(), HDB::BlockImplementationFile::pathToFile(), and HDB::BlockImplementationFile::VHDL.

Here is the call graph for this function:

◆ onMoveSourceFileUp()

void FUImplementationDialog::onMoveSourceFileUp ( wxCommandEvent &  event)
private

Event handler for the move source file up button.

Moves the selected source file up on the files list.

Definition at line 862 of file FUImplementationDialog.cc.

862  {
863 
865  std::string fileName =
867  std::vector<std::string> pathToFileList;
868  int originalImplementationFileCount =
870 
871  for (int i = 0; i < originalImplementationFileCount; i++) {
873  pathToFileList.push_back(file.pathToFile());
875  }
876 
877  for (unsigned int i = 1; i < pathToFileList.size(); i++) {
878  if (pathToFileList.at(i) == fileName) {
879  pathToFileList.erase(pathToFileList.begin() + i);
880  pathToFileList.insert(
881  pathToFileList.begin() + i - 1, fileName);
882  break;
883  }
884  }
885 
886  for (unsigned int i = 0; i < pathToFileList.size(); i++) {
888  new BlockImplementationFile(pathToFileList.at(i),
891  }
892 
893  pathToFileList.clear();
894  update();
895 
896  for (int i = 0; i < implementation_.implementationFileCount(); i++) {
897  if (implementation_.file(i).pathToFile() == fileName) {
898  sourceList_->SetItemState(i, wxLIST_STATE_SELECTED,
899  wxLIST_STATE_SELECTED);
900  }
901  }
902  }
903 }

References WidgetTools::lcStringSelection(), HDB::BlockImplementationFile::pathToFile(), and HDB::BlockImplementationFile::VHDL.

Here is the call graph for this function:

◆ onOK()

void FUImplementationDialog::onOK ( wxCommandEvent &  event)
private

Event handler for the OK button.

Validates the dialog data and updates the FUImplementation object string attributes.

Definition at line 980 of file FUImplementationDialog.cc.

980  {
981 
982  TransferDataFromWindow();
983 
984  name_ = name_.Trim(true).Trim(false);
985  clkPort_ = clkPort_.Trim(true).Trim(false);
986  rstPort_ = rstPort_.Trim(true).Trim(false);
987  gLockPort_ = gLockPort_.Trim(true).Trim(false);
988  gLockReqPort_ = gLockReqPort_.Trim(true).Trim(false);
989  opcodePort_ = opcodePort_.Trim(true).Trim(false);
990 
991  if (name_.IsEmpty()) {
992  wxString message = _T("Name field must not be empty.");
993  InformationDialog dialog(this, message);
994  dialog.ShowModal();
995  return;
996  }
997 
998  for (int i = 0; i < implementation_.architecturePortCount(); i++) {
999  if (implementation_.architecturePort(i).name() == "") {
1000  wxString message =
1001  _T("No name specified for the architecture port '");
1002  std::string port =
1004  message.Append(WxConversion::toWxString(port));
1005  message.Append(_T("'."));
1006  InformationDialog dialog(this, message);
1007  dialog.ShowModal();
1008  return;
1009  }
1010  for (int k = i+1; k < implementation_.architecturePortCount(); k++) {
1013  wxString message =
1014  _T("Ports '");
1015  std::string port =
1017  message.Append(WxConversion::toWxString(port));
1018  message.Append(_T("' and '"));
1019  port =
1021  message.Append(WxConversion::toWxString(port));
1022  message.Append(_T("' have the same name."));
1023  InformationDialog dialog(this, message);
1024  dialog.ShowModal();
1025  return;
1026  }
1027  }
1028  }
1029 #ifdef ALLOW_OPCODE_EDITING
1030  if (architecture_.operationCount() > 1) {
1031  for (int i = 0; i < architecture_.operationCount(); i++) {
1033  architecture_.operation(i)->name())) {
1034 
1035  wxString message =
1036  _T("No opcode specified for the operation '");
1037  std::string operation = architecture_.operation(i)->name();
1038  message.Append(WxConversion::toWxString(operation));
1039  message.Append(_T("'."));
1040  InformationDialog dialog(this, message);
1041  dialog.ShowModal();
1042  return;
1043  }
1044  }
1045  }
1046 #endif
1047 
1054 
1055  EndModal(wxID_OK);
1056 
1057 }

References WxConversion::toString(), and WxConversion::toWxString().

Here is the call graph for this function:

◆ onOpcodeSelection()

void FUImplementationDialog::onOpcodeSelection ( wxListEvent &  event)
private

Event handler for the opcode list selection changes.

Updates the enabled/disabled state of the set and clear opcode buttons.

Definition at line 734 of file FUImplementationDialog.cc.

734  {
735  std::string operation = WidgetTools::lcStringSelection(opcodeList_, 0);
736  if (operation == "") {
737  FindWindow(ID_SET_OPCODE)->Disable();
738  FindWindow(ID_CLEAR_OPCODE)->Disable();
739  } else {
740  FindWindow(ID_SET_OPCODE)->Enable();
741  if (implementation_.hasOpcode(operation)) {
742  FindWindow(ID_CLEAR_OPCODE)->Enable();
743  } else {
744  FindWindow(ID_CLEAR_OPCODE)->Disable();
745  }
746  }
747 }

References WidgetTools::lcStringSelection().

Here is the call graph for this function:

◆ onParameterActivation()

void FUImplementationDialog::onParameterActivation ( wxListEvent &  event)
private

Event handler for the parameter list activateion.

Opens a FUImplementationParamaeterDialog for modifying the selected parameter.

Definition at line 604 of file FUImplementationDialog.cc.

604  {
605 
607  std::string oldName = parameter.name;
608 
609  ImplementationParameterDialog dialog(this, -1, parameter);
610 
611  if (dialog.ShowModal() == wxID_OK) {
614  parameter.name, parameter.type, parameter.value);
615 
616  // update external port parameter dependencies if needed
617  for (int i = 0; i < implementation_.externalPortCount(); i++) {
619  if (port.unsetParameterDependency(oldName)) {
620  port.setParameterDependency(parameter.name);
621  }
622  }
623  }
624 
625  update();
626 }

References HDB::Parameter::name, HDB::ExternalPort::setParameterDependency(), HDB::Parameter::type, HDB::ExternalPort::unsetParameterDependency(), and HDB::Parameter::value.

Here is the call graph for this function:

◆ onParameterSelection()

void FUImplementationDialog::onParameterSelection ( wxListEvent &  event)
private

Event handler for the parameter list selection changes.

Updates edit/delete parameter enabled/disabled states.

Definition at line 655 of file FUImplementationDialog.cc.

655  {
656  if (selectedParameter().name == "") {
657  FindWindow(ID_DELETE_PARAMETER)->Disable();
658  FindWindow(ID_EDIT_PARAMETER)->Disable();
659  } else {
660  FindWindow(ID_DELETE_PARAMETER)->Enable();
661  FindWindow(ID_EDIT_PARAMETER)->Enable();
662  }
663 }

◆ onSetOpcode()

void FUImplementationDialog::onSetOpcode ( wxCommandEvent &  event)
private

Event handler for the set opcode button.

Sets the opcode for the selected operation.

Definition at line 775 of file FUImplementationDialog.cc.

775  {
776 
777  std::string operation = WidgetTools::lcStringSelection(opcodeList_, 0);
778 
779  if (operation == "") {
780  return;
781  }
782 
783  int opcode = dynamic_cast<wxSpinCtrl*>(FindWindow(ID_OPCODE))->GetValue();
784 
785  for (int i = 0; i < architecture_.operationCount(); i++) {
786  std::string operation = architecture_.operation(i)->name();
787  if (implementation_.hasOpcode(operation) &&
788  implementation_.opcode(operation) == opcode) {
789 
790  wxString message = _T("Opcode ");
791  message.Append(WxConversion::toWxString(opcode));
792  message.Append(_T(" is already used by operation "));
793  message.Append(WxConversion::toWxString(operation));
794  message.Append(_T("."));
795  InformationDialog dialog(this, message);
796  dialog.ShowModal();
797  return;
798  }
799  }
800 
801  implementation_.setOpcode(operation, opcode);
802 
803  update();
804 }

References WidgetTools::lcStringSelection(), and WxConversion::toWxString().

Here is the call graph for this function:

◆ onSourceFileSelection()

void FUImplementationDialog::onSourceFileSelection ( wxListEvent &  event)
private

Event handler for the source file list selection changes.

Updates delete source file and move up/down buttons enabled/disabled states.

Definition at line 961 of file FUImplementationDialog.cc.

961  {
963  FindWindow(ID_DELETE_SOURCE)->Disable();
964  FindWindow(ID_MOVE_SOURCE_UP)->Disable();
965  FindWindow(ID_MOVE_SOURCE_DOWN)->Disable();
966  } else {
967  FindWindow(ID_DELETE_SOURCE)->Enable();
968  FindWindow(ID_MOVE_SOURCE_UP)->Enable();
969  FindWindow(ID_MOVE_SOURCE_DOWN)->Enable();
970  }
971 }

References WidgetTools::lcStringSelection().

Here is the call graph for this function:

◆ selectedArchPort()

HDB::FUPortImplementation * FUImplementationDialog::selectedArchPort ( )
private

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

Returns
Selected architecture port.

Definition at line 675 of file FUImplementationDialog.cc.

675  {
676 
677  long item = -1;
678  item = archPortList_->GetNextItem(
679  item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
680 
681  if (item == -1) {
682  return NULL;
683  }
684 
685  return &implementation_.architecturePort(item);
686 }

References HDB::FUPortImplementation::architecturePort().

Here is the call graph for this function:

◆ selectedExternalPort()

HDB::FUExternalPort * FUImplementationDialog::selectedExternalPort ( )
private

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

Returns
Selected external port.

Definition at line 694 of file FUImplementationDialog.cc.

694  {
695 
696  long item = -1;
697  item = externalPortList_->GetNextItem(
698  item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
699 
700  if (item == -1) {
701  return NULL;
702  }
703 
704  return &implementation_.externalPort(item);
705 }

◆ selectedParameter()

FUImplementation::Parameter FUImplementationDialog::selectedParameter ( )
private

Returns copy of the selected parameter in the parameter list.

Returns
Selected parameter.

Definition at line 713 of file FUImplementationDialog.cc.

713  {
714 
715  long item = -1;
716  item = parameterList_->GetNextItem(
717  item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
718 
719  if (item == -1) {
720  FUImplementation::Parameter empty = {"", "", ""};
721  return empty;
722  }
723 
724  return implementation_.parameter(item);
725 }

◆ update()

void FUImplementationDialog::update ( bool  onInit = false)
private

Update handler Updates UI values to reflect new state. If called from constructor, fills default values for opcodes.

Parameters
onInitSet true whe called from constructor

Definition at line 247 of file FUImplementationDialog.cc.

247  {
248 
249  // Update architecture port list.
250  archPortList_->DeleteAllItems();
251  for (int i = 0; i < implementation_.architecturePortCount(); i++) {
252 
253  wxString portName = WxConversion::toWxString(
255 
256  std::string archPortName =
258 
259  const FUPort* port = architecture_.operationPort(archPortName);
260 
261  // Append operation operands bound to this port to the
262  // otherwise meaningless port name.
263  archPortName += ":";
264  for (int j = 0; j < architecture_.operationCount(); j++) {
265  const HWOperation* operation = architecture_.operation(j);
266  if (operation->isBound(*port)) {
267 
268  std::string io = Conversion::toString(operation->io(*port));
269  std::string operationName = operation->name();
270  archPortName =
271  archPortName + " " + operationName + "[" + io + "]";
272  }
273  }
274  archPortList_->InsertItem(i, portName);
275  archPortList_->SetItem(i, 1, WxConversion::toWxString(archPortName));
276  }
277 
278  // Update external port list.
279  externalPortList_->DeleteAllItems();
280  for (int i = 0; i < implementation_.externalPortCount(); i++) {
281  wxString portName = WxConversion::toWxString(
283  externalPortList_->InsertItem(i, portName);
284  }
285 
286  // Update parameter list.
287  parameterList_->DeleteAllItems();
288  for (int i = 0; i < implementation_.parameterCount(); i++) {
289  const FUImplementation::Parameter parameter =
291  wxString param = WxConversion::toWxString(parameter.type);
292  param.Append(_T(": "));
293  param.Append(WxConversion::toWxString(parameter.name));
294  parameterList_->InsertItem(i, param);
295  parameterList_->SetItem(
296  i, 1, WxConversion::toWxString(parameter.value));
297  }
298 
299  // Update source file list.
300  sourceList_->DeleteAllItems();
301  for (int i = 0; i < implementation_.implementationFileCount(); i++) {
302  wxString fileName = WxConversion::toWxString(
304  sourceList_->InsertItem(i, fileName);
305  }
307  sourceList_->SetColumnWidth(0, wxLIST_AUTOSIZE);
308  }
309 
310  // Update operation list.
311  opcodeList_->DeleteAllItems();
312  // arrange operations in alphabetical order
313  std::set<std::string> opcodeSet;
314  for (int i = 0; i < architecture_.operationCount(); i++) {
315  std::string operation = architecture_.operation(i)->name();
316  opcodeSet.insert(operation);
317  }
318  // operation opcodes should be generated according to the alphabetical
319  // order
320  int index = 0;
321  for (std::set<std::string>::iterator i = opcodeSet.begin();
322  i != opcodeSet.end(); i++) {
323  std::string operation = *i;
324  wxString opcode = _T("");
325  if (implementation_.hasOpcode(operation)) {
326  int opcodeIndex = implementation_.opcode(operation);
327  if (opcodeIndex != index && !opcodeWarningShowed_) {
328 #ifdef ALLOW_OPCODE_EDITING
329  // show warning about future incompatibility
330  wxMessageDialog errorDialog(
331  this,
332  _T("Illegal opcodes. Design might not work in future. "
333  "Opcode IDs must be generated according to the "
334  "alphabetical order of operation names. Please fix "
335  "FU's vhdl code and HDB entry"),
336  _T("Illegal opcodes"), wxOK);
337 #else
338  // operations must be in alphaberical order
339  wxMessageDialog errorDialog(
340  this,
341  _T("Illegal opcodes. Design won't work. Opcode IDs must "
342  "be generated according to the alphabetical order of "
343  "operation names."),
344  _T("Illegal opcodes"), wxOK);
345 #endif
346  opcodeWarningShowed_ = true;
347  errorDialog.ShowModal();
348  }
349  opcode =
351  }
352 #ifndef ALLOW_OPCODE_EDITING
353  else {
354  // add default opcode (without ability to modify it)
355  opcode = WxConversion::toWxString(index);
356  }
357 #else
358  else if (onInit) {
359  // add default opcode
360  opcode = WxConversion::toWxString(index);
361  implementation_.setOpcode(operation, index);
362  }
363 #endif
364  wxString operationName = WxConversion::toWxString(operation);
365  opcodeList_->InsertItem(index, operationName);
366  opcodeList_->SetItem(index, 1, opcode);
367  ++index;
368  }
369 
370  wxListEvent dummy;
374 }

References dummy, TTAMachine::HWOperation::io(), TTAMachine::HWOperation::isBound(), HDB::Parameter::name, TTAMachine::HWOperation::name(), Conversion::toString(), WxConversion::toWxString(), HDB::Parameter::type, and HDB::Parameter::value.

Here is the call graph for this function:

Member Data Documentation

◆ architecture_

const TTAMachine::FunctionUnit& FUImplementationDialog::architecture_
private

Function unit architecture the FUImplementation implements.

Definition at line 143 of file FUImplementationDialog.hh.

◆ archPortList_

wxListCtrl* FUImplementationDialog::archPortList_
private

Pointer to the architecture port list widget.

Definition at line 148 of file FUImplementationDialog.hh.

◆ clkPort_

wxString FUImplementationDialog::clkPort_
private

Definition at line 160 of file FUImplementationDialog.hh.

◆ externalPortList_

wxListCtrl* FUImplementationDialog::externalPortList_
private

Pointer to the external port list widget.

Definition at line 150 of file FUImplementationDialog.hh.

◆ gLockPort_

wxString FUImplementationDialog::gLockPort_
private

Definition at line 162 of file FUImplementationDialog.hh.

◆ gLockReqPort_

wxString FUImplementationDialog::gLockReqPort_
private

Definition at line 163 of file FUImplementationDialog.hh.

◆ implementation_

HDB::FUImplementation& FUImplementationDialog::implementation_
private

FU Implementation to modify.

Definition at line 141 of file FUImplementationDialog.hh.

◆ name_

wxString FUImplementationDialog::name_
private

Definition at line 158 of file FUImplementationDialog.hh.

◆ opcodeList_

wxListCtrl* FUImplementationDialog::opcodeList_
private

Pointer to the opcode list widget.

Definition at line 154 of file FUImplementationDialog.hh.

◆ opcodePort_

wxString FUImplementationDialog::opcodePort_
private

Definition at line 159 of file FUImplementationDialog.hh.

◆ opcodeWarningShowed_

bool FUImplementationDialog::opcodeWarningShowed_
private

Definition at line 145 of file FUImplementationDialog.hh.

◆ parameterList_

wxListCtrl* FUImplementationDialog::parameterList_
private

Pointer to the parameter list widget.

Definition at line 152 of file FUImplementationDialog.hh.

◆ rstPort_

wxString FUImplementationDialog::rstPort_
private

Definition at line 161 of file FUImplementationDialog.hh.

◆ sourceList_

wxListCtrl* FUImplementationDialog::sourceList_
private

Pointer to the source file list widget.

Definition at line 156 of file FUImplementationDialog.hh.


The documentation for this class was generated from the following files:
FUImplementationDialog::ID_SOURCE_LIST
@ ID_SOURCE_LIST
Definition: FUImplementationDialog.hh:124
FUImplementationDialog::ID_OPCODE
@ ID_OPCODE
Definition: FUImplementationDialog.hh:118
HDB::FUExternalPort
Definition: FUExternalPort.hh:52
HDB::HWBlockImplementation::clkPort
std::string clkPort() const
Definition: HWBlockImplementation.cc:175
HDB::HWBlockImplementation::file
BlockImplementationFile & file(int index) const
Definition: HWBlockImplementation.cc:267
ImplementationParameterDialog
Definition: ImplementationParameterDialog.hh:44
WxConversion::toWxString
static wxString toWxString(const std::string &source)
FUImplementationDialog::opcodeWarningShowed_
bool opcodeWarningShowed_
Definition: FUImplementationDialog.hh:145
FUImplementationDialog::ID_MOVE_SOURCE_DOWN
@ ID_MOVE_SOURCE_DOWN
Definition: FUImplementationDialog.hh:137
FUImplementationDialog::parameterList_
wxListCtrl * parameterList_
Pointer to the parameter list widget.
Definition: FUImplementationDialog.hh:152
FUImplementationDialog::externalPortList_
wxListCtrl * externalPortList_
Pointer to the external port list widget.
Definition: FUImplementationDialog.hh:150
HDB::FUImplementation::hasOpcode
bool hasOpcode(const std::string &operation) const
Definition: FUImplementation.cc:227
TTAMachine::HWOperation
Definition: HWOperation.hh:52
FUImplementationDialog::ID_LABEL_NAME
@ ID_LABEL_NAME
Definition: FUImplementationDialog.hh:104
implementation
IDF::MachineImplementation * implementation
the implementation definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:61
HDB::FUPortImplementation
Definition: FUPortImplementation.hh:46
TTAMachine::BaseFUPort
Definition: BaseFUPort.hh:44
HDB::ExternalPort::setParameterDependency
bool setParameterDependency(const std::string &parameter)
Definition: ExternalPort.cc:162
HDB::HWBlockImplementation::implementationFileCount
int implementationFileCount() const
Definition: HWBlockImplementation.cc:254
FUImplementationDialog::ID_LABEL_GLOCK_PORT
@ ID_LABEL_GLOCK_PORT
Definition: FUImplementationDialog.hh:110
FUImplementationDialog::selectedParameter
HDB::FUImplementation::Parameter selectedParameter()
Definition: FUImplementationDialog.cc:713
FUImplementationDialog::ID_CLK_PORT
@ ID_CLK_PORT
Definition: FUImplementationDialog.hh:107
FUImplementationDialog::ID_ADD_SOURCE
@ ID_ADD_SOURCE
Definition: FUImplementationDialog.hh:125
FUImplementationDialog::ID_PARAMETER_LIST
@ ID_PARAMETER_LIST
Definition: FUImplementationDialog.hh:127
FUImplementationDialog::ID_LABEL_OPCODE_PORT_NAME
@ ID_LABEL_OPCODE_PORT_NAME
Definition: FUImplementationDialog.hh:131
HDB::FUImplementation::externalPort
FUExternalPort & externalPort(int index) const
Definition: FUImplementation.cc:390
FUImplementationDialog::ID_EDIT_ARCH_PORT
@ ID_EDIT_ARCH_PORT
Definition: FUImplementationDialog.hh:134
HDB::HWBlockImplementation::setClkPort
void setClkPort(const std::string &name)
Definition: HWBlockImplementation.cc:164
TTAMachine::FunctionUnit::port
virtual BaseFUPort * port(const std::string &name) const
Definition: FunctionUnit.cc:145
FindWindow
Definition: FindWindow.hh:49
FUImplementationDialog::ID_CLEAR_OPCODE
@ ID_CLEAR_OPCODE
Definition: FUImplementationDialog.hh:116
FUImplementationDialog::update
void update(bool onInit=false)
Definition: FUImplementationDialog.cc:247
HDB::HWBlockImplementation::setGlockPort
void setGlockPort(const std::string &name)
Definition: HWBlockImplementation.cc:208
HDB::FUImplementation::opcodePort
std::string opcodePort() const
Definition: FUImplementation.cc:135
FUImplementationDialog::ID_EXTERNAL_PORT_LIST
@ ID_EXTERNAL_PORT_LIST
Definition: FUImplementationDialog.hh:120
HDB::BlockImplementationFile
Definition: BlockImplementationFile.hh:44
FUImplementationDialog::ID_OPCODE_PORT
@ ID_OPCODE_PORT
Definition: FUImplementationDialog.hh:132
Conversion::toString
static std::string toString(const T &source)
FUImplementationDialog::ID_EDIT_PARAMETER
@ ID_EDIT_PARAMETER
Definition: FUImplementationDialog.hh:128
FUImplementationDialog::ID_MOVE_SOURCE_UP
@ ID_MOVE_SOURCE_UP
Definition: FUImplementationDialog.hh:136
HDB::ExternalPort::unsetParameterDependency
bool unsetParameterDependency(const std::string &parameter)
Definition: ExternalPort.cc:178
HDB::HWBlockImplementation::rstPort
std::string rstPort() const
Definition: HWBlockImplementation.cc:197
HDB::FUImplementation::glockReqPort
std::string glockReqPort() const
Definition: FUImplementation.cc:157
assert
#define assert(condition)
Definition: Application.hh:86
HDB::FUImplementation::parameterCount
int parameterCount() const
Definition: FUImplementation.cc:443
TTAMachine::FUPort
Definition: FUPort.hh:46
IllegalParameters
Definition: Exception.hh:113
TTAMachine::HWOperation::io
int io(const FUPort &port) const
Definition: HWOperation.cc:364
ProGe::VHDL
@ VHDL
VHDL.
Definition: ProGeTypes.hh:41
ErrorDialog
Definition: ErrorDialog.hh:42
TTAMachine::HWOperation::name
const std::string & name() const
Definition: HWOperation.cc:141
HDB::FUImplementation::setGlockReqPort
void setGlockReqPort(const std::string &name)
Definition: FUImplementation.cc:146
HDB::HWBlockImplementation::addImplementationFile
void addImplementationFile(BlockImplementationFile *file)
Definition: HWBlockImplementation.cc:230
dummy
SimValue dummy(32)
a dummy simvalue which is given for operands that are not bound
WidgetTools::lcStringSelection
static std::string lcStringSelection(wxListCtrl *list, int column)
Definition: WidgetTools.cc:108
TTAMachine::HWOperation::isBound
bool isBound(const FUPort &port) const
Definition: HWOperation.cc:338
FUImplementationDialog::gLockPort_
wxString gLockPort_
Definition: FUImplementationDialog.hh:162
HDB::Parameter::type
std::string type
Type of the parameter.
Definition: HDBTypes.hh:48
TTAMachine::FunctionUnit::operationCount
virtual int operationCount() const
Definition: FunctionUnit.cc:419
FUImplementationDialog::ID_NAME
@ ID_NAME
Definition: FUImplementationDialog.hh:105
HDB::HWBlockImplementation::setModuleName
void setModuleName(const std::string &name)
Definition: HWBlockImplementation.cc:142
FUImplementationDialog::selectedArchPort
HDB::FUPortImplementation * selectedArchPort()
Definition: FUImplementationDialog.cc:675
HDB::FUImplementation::addParameter
void addParameter(const std::string &name, const std::string &type, const std::string &value)
Definition: FUImplementation.cc:409
HDB::BlockImplementationFile::pathToFile
std::string pathToFile() const
Definition: BlockImplementationFile.cc:61
FUExternalPortDialog
Definition: FUExternalPortDialog.hh:48
FUImplementationDialog::rstPort_
wxString rstPort_
Definition: FUImplementationDialog.hh:161
HDB::FUImplementation::setOpcode
void setOpcode(const std::string &operation, int opcode)
Definition: FUImplementation.cc:169
HDB::FUImplementation::deleteExternalPort
void deleteExternalPort(FUExternalPort *port)
Definition: FUImplementation.cc:313
FUImplementationDialog::ID_EDIT_EXTERNAL_PORT
@ ID_EDIT_EXTERNAL_PORT
Definition: FUImplementationDialog.hh:122
FUImplementationDialog::ID_SET_OPCODE
@ ID_SET_OPCODE
Definition: FUImplementationDialog.hh:117
FUImplementationDialog::ID_ARCH_PORT_LIST
@ ID_ARCH_PORT_LIST
Definition: FUImplementationDialog.hh:133
FUImplementationDialog::archPortList_
wxListCtrl * archPortList_
Pointer to the architecture port list widget.
Definition: FUImplementationDialog.hh:148
HDB::FUImplementation::setOpcodePort
void setOpcodePort(const std::string &name)
Definition: FUImplementation.cc:124
HDB::Parameter::name
std::string name
Name of the parameter.
Definition: HDBTypes.hh:47
FUImplementationDialog::ID_DELETE_EXTERNAL_PORT
@ ID_DELETE_EXTERNAL_PORT
Definition: FUImplementationDialog.hh:123
FUImplementationDialog::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition: FUImplementationDialog.cc:1064
HDB::FUImplementation::opcode
int opcode(const std::string &operation) const
Definition: FUImplementation.cc:242
HDB::FUPortImplementation::architecturePort
std::string architecturePort() const
Definition: FUPortImplementation.cc:93
FUImplementationDialog::ID_ADD_PARAMETER
@ ID_ADD_PARAMETER
Definition: FUImplementationDialog.hh:129
HDB::PortImplementation::name
std::string name() const
Definition: PortImplementation.cc:74
FUImplementationDialog::name_
wxString name_
Definition: FUImplementationDialog.hh:158
FUImplementationDialog::ID_LABEL_CLK_PORT
@ ID_LABEL_CLK_PORT
Definition: FUImplementationDialog.hh:106
FUImplementationDialog::ID_RST_PORT
@ ID_RST_PORT
Definition: FUImplementationDialog.hh:109
HDB::FUImplementation::parameter
Parameter parameter(int index) const
Definition: FUImplementation.cc:457
FUImplementationDialog::ID_GLOCK_PORT
@ ID_GLOCK_PORT
Definition: FUImplementationDialog.hh:111
HDB::FUImplementation::unsetOpcode
void unsetOpcode(const std::string &operation)
Definition: FUImplementation.cc:182
FUImplementationDialog::sourceList_
wxListCtrl * sourceList_
Pointer to the source file list widget.
Definition: FUImplementationDialog.hh:156
FUImplementationDialog::ID_DELETE_SOURCE
@ ID_DELETE_SOURCE
Definition: FUImplementationDialog.hh:126
HDB::FUImplementation::architecturePortCount
int architecturePortCount() const
Definition: FUImplementation.cc:326
FUImplementationDialog::ID_LINE
@ ID_LINE
Definition: FUImplementationDialog.hh:135
FUImplementationDialog::ID_DELETE_PARAMETER
@ ID_DELETE_PARAMETER
Definition: FUImplementationDialog.hh:130
HDB::IN
@ IN
Input port.
Definition: HDBTypes.hh:41
FUImplementationDialog::ID_GLOCK_REQ_PORT
@ ID_GLOCK_REQ_PORT
Definition: FUImplementationDialog.hh:113
FUPortImplementationDialog
Definition: FUPortImplementationDialog.hh:49
HDB::Parameter::value
std::string value
Value of the parameter.
Definition: HDBTypes.hh:49
FUImplementationDialog::clkPort_
wxString clkPort_
Definition: FUImplementationDialog.hh:160
HDB::Parameter
Definition: HDBTypes.hh:46
HDB::HWBlockImplementation::moduleName
std::string moduleName() const
Definition: HWBlockImplementation.cc:153
TTAMachine::FunctionUnit::operation
virtual HWOperation * operation(const std::string &name) const
Definition: FunctionUnit.cc:363
FUImplementationDialog::ID_LABEL_GLOCK_REQ_PORT
@ ID_LABEL_GLOCK_REQ_PORT
Definition: FUImplementationDialog.hh:112
InformationDialog
Definition: InformationDialog.hh:42
HDB::ExternalPort::name
std::string name() const
Definition: ExternalPort.cc:84
TTAMachine::FunctionUnit::operationPort
virtual FUPort * operationPort(const std::string &name) const
Definition: FunctionUnit.cc:224
HDB::HWBlockImplementation::setRstPort
void setRstPort(const std::string &name)
Definition: HWBlockImplementation.cc:186
FUImplementationDialog::ID_OPCODE_LIST
@ ID_OPCODE_LIST
Definition: FUImplementationDialog.hh:114
FUImplementationDialog::implementation_
HDB::FUImplementation & implementation_
FU Implementation to modify.
Definition: FUImplementationDialog.hh:141
FUImplementationDialog::onExternalPortSelection
void onExternalPortSelection(wxListEvent &event)
Definition: FUImplementationDialog.cc:522
HDB::HWBlockImplementation::glockPort
std::string glockPort() const
Definition: HWBlockImplementation.cc:219
WxConversion::toString
static std::string toString(const wxString &source)
HDB::HWBlockImplementation::removeImplementationFile
void removeImplementationFile(const BlockImplementationFile &file)
Definition: HWBlockImplementation.cc:241
FUImplementationDialog::onParameterSelection
void onParameterSelection(wxListEvent &event)
Definition: FUImplementationDialog.cc:655
FUImplementationDialog::ID_ADD_EXTERNAL_PORT
@ ID_ADD_EXTERNAL_PORT
Definition: FUImplementationDialog.hh:121
FUImplementationDialog::ID_LABEL_RST_PORT
@ ID_LABEL_RST_PORT
Definition: FUImplementationDialog.hh:108
BlockImplementationFileDialog
Definition: BlockImplementationFileDialog.hh:44
HDB::FUImplementation::architecturePort
FUPortImplementation & architecturePort(int index) const
Definition: FUImplementation.cc:351
FUImplementationDialog::architecture_
const TTAMachine::FunctionUnit & architecture_
Function unit architecture the FUImplementation implements.
Definition: FUImplementationDialog.hh:143
HDB::FUImplementation::externalPortCount
int externalPortCount() const
Definition: FUImplementation.cc:337
FUImplementationDialog::opcodePort_
wxString opcodePort_
Definition: FUImplementationDialog.hh:159
FUImplementationDialog::opcodeList_
wxListCtrl * opcodeList_
Pointer to the opcode list widget.
Definition: FUImplementationDialog.hh:154
FUImplementationDialog::gLockReqPort_
wxString gLockReqPort_
Definition: FUImplementationDialog.hh:163
FUImplementationDialog::onArchPortSelection
void onArchPortSelection(wxListEvent &event)
Definition: FUImplementationDialog.cc:407
FUImplementationDialog::selectedExternalPort
HDB::FUExternalPort * selectedExternalPort()
Definition: FUImplementationDialog.cc:694
HDB::FUImplementation::removeParameter
void removeParameter(const std::string &name)
Definition: FUImplementation.cc:426