OpenASIP 2.2
Loading...
Searching...
No Matches
IUDialog.cc
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2009 Tampere University.
3
4 This file is part of TTA-Based Codesign Environment (TCE).
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23 */
24/**
25 * @file IUDialog.cc
26 *
27 * Definition of IUDialog class.
28 *
29 * @author Veli-Pekka Jääskeläinen 2004 (vjaaskel-no.spam-cs.tut.fi)
30 */
31
32#include <wx/valgen.h>
33#include <boost/format.hpp>
34
35#include "ModelConstants.hh"
36#include "IUDialog.hh"
37#include "IUPortDialog.hh"
38#include "ProDeConstants.hh"
39#include "WxConversion.hh"
40#include "Conversion.hh"
41#include "WarningDialog.hh"
42#include "InformationDialog.hh"
43#include "Machine.hh"
44#include "ImmediateUnit.hh"
45#include "UserManualCmd.hh"
46#include "Port.hh"
47#include "MachineTester.hh"
48#include "WidgetTools.hh"
49#include "GUITextGenerator.hh"
50#include "ProDeTextGenerator.hh"
51
52using boost::format;
53using std::string;
54using namespace TTAMachine;
55
56BEGIN_EVENT_TABLE(IUDialog, wxDialog)
57 EVT_TEXT(ID_NAME, IUDialog::onName)
59 EVT_BUTTON(ID_DELETE_PORT, IUDialog::onDeletePort)
60 EVT_BUTTON(ID_EDIT_PORT, IUDialog::onEditPort)
61 EVT_MENU(ID_EDIT_PORT, IUDialog::onEditPort)
62 EVT_MENU(ID_DELETE_PORT, IUDialog::onDeletePort)
64 EVT_LIST_ITEM_RIGHT_CLICK(ID_PORT_LIST, IUDialog::onPortRightClick)
65
67
68 EVT_LIST_ITEM_FOCUSED(ID_PORT_LIST, IUDialog::onPortSelection)
69 EVT_LIST_DELETE_ITEM(ID_PORT_LIST, IUDialog::onPortSelection)
73
74
75/**
76 * The Constructor.
77 *
78 * @param parent Parent window of the dialog.
79 * @param immediateUnit Immediate unit to be modified with the dialog.
80 */
82 wxWindow* parent,
83 ImmediateUnit* immediateUnit):
84 wxDialog(parent, -1, _T(""), wxDefaultPosition),
85 immediateUnit_(immediateUnit),
86 name_(_T("")),
87 size_(ModelConstants::DEFAULT_IU_SIZE),
89 cycles_(ModelConstants::DEFAULT_IU_CYCLES),
90 portList_(NULL),
91 templateList_(NULL),
92 extensionBox_(NULL) {
93
94 createContents(this, true, true);
95
96 portList_ = dynamic_cast<wxListCtrl*>(FindWindow(ID_PORT_LIST));
97 templateList_ = dynamic_cast<wxListCtrl*>(FindWindow(ID_TEMPLATE_LIST));
98 extensionBox_ = dynamic_cast<wxRadioBox*>(FindWindow(ID_EXTENSION));
99
100 FindWindow(ID_SIZE)->SetValidator(wxGenericValidator(&size_));
101 FindWindow(ID_WIDTH)->SetValidator(wxGenericValidator(&width_));
102 FindWindow(ID_NAME)->SetValidator(wxTextValidator(wxFILTER_ASCII, &name_));
103
104 // set OK button disabled initially
105 FindWindow(wxID_OK)->Disable();
106 FindWindow(ID_DELETE_PORT)->Disable();
107 FindWindow(ID_EDIT_PORT)->Disable();
108
109 // set widget texts
110 setTexts();
111
112 TransferDataToWindow();
113}
114
115
116/**
117 * The Destructor.
118 */
121
122
123/**
124 * Sets texts for widgets.
125 */
126void
130
131 // Dialog title
132 format fmt = prodeTexts->text(ProDeTextGenerator::TXT_IU_DIALOG_TITLE);
133 SetTitle(WxConversion::toWxString(fmt.str()));
134
135 // buttons
136 WidgetTools::setLabel(generator, FindWindow(wxID_OK),
138
139 WidgetTools::setLabel(generator, FindWindow(wxID_CANCEL),
141
144
147
150
153
154 // widget labels
157
160
163
166
167 // box sizer label
170
173
174 // Radio button labels
176 extensionBox_->SetString(0, WxConversion::toWxString(fmt.str()));
178 extensionBox_->SetString(1, WxConversion::toWxString(fmt.str()));
179
180 // Create list columns.
181 wxListCtrl* portList =
182 dynamic_cast<wxListCtrl*>(FindWindow(ID_PORT_LIST));
183 fmt = prodeTexts->text(ProDeTextGenerator::TXT_COLUMN_NAME);
184 portList->InsertColumn(0, WxConversion::toWxString(fmt.str()),
185 wxLIST_FORMAT_LEFT, 240);
186 wxListCtrl* templateList =
187 dynamic_cast<wxListCtrl*>(FindWindow(ID_TEMPLATE_LIST));
188 fmt = prodeTexts->text(ProDeTextGenerator::TXT_COLUMN_NAME);
189 templateList->InsertColumn(0, WxConversion::toWxString(fmt.str()),
190 wxLIST_FORMAT_LEFT, 240);
191
192}
193
194
195/**
196 * Transfers data from the ImmediateUnit object to the dialog widgets.
197 *
198 * @return false, if an error occured in the transfer.
199 */
200bool
202
207
208 // transfer extension
210 wxString zero = ProDeConstants::EXTENSION_ZERO;
211 extensionBox_->SetStringSelection(zero);
212 } else if (immediateUnit_->extensionMode() == Machine::SIGN) {
213 wxString sign = ProDeConstants::EXTENSION_SIGN;
214 extensionBox_->SetStringSelection(sign);
215 } else {
216 assert(false);
217 }
218
221
222 // wxWidgets GTK1 version seems to bug with spincontrol validators.
223 // The widget value has to be set manually.
224 dynamic_cast<wxSpinCtrl*>(FindWindow(ID_WIDTH))->SetValue(width_);
225 dynamic_cast<wxSpinCtrl*>(FindWindow(ID_SIZE))->SetValue(size_);
226
227 return wxWindow::TransferDataToWindow();
228}
229
230
231/**
232 * Validates input in the controls, and updates the ImmediateUnit.
233 */
234void
235IUDialog::onOK(wxCommandEvent&) {
236
237 if (!Validate()) {
238 return;
239 }
240
241 if (!TransferDataFromWindow()) {
242 return;
243 }
244
245 string trimmedName =
246 WxConversion::toString(name_.Trim(false).Trim(true));
247
248 // Check the name validity.
249 if (!MachineTester::isValidComponentName(trimmedName)) {
251 format message =
253 InformationDialog warning(
254 this, WxConversion::toWxString(message.str()));
255 warning.ShowModal();
256 return;
257 }
258
259 if (trimmedName != immediateUnit_->name()) {
260
263 for (int i = 0; i < navigator.count(); i++) {
264 ImmediateUnit* iu = navigator.item(i);
265 if (trimmedName == iu->name()) {
266 ProDeTextGenerator* prodeTexts =
268 format message =
270 format an_iu = prodeTexts->text(
272 format machine =
274 format iu =
276 message % trimmedName % an_iu.str() % machine.str() % iu.str();
277 WarningDialog warning(
278 this, WxConversion::toWxString(message.str()));
279 warning.ShowModal();
280 return;
281 }
282 }
283 }
284
285 // set IU attributes
286 immediateUnit_->setName(trimmedName);
289
290 wxString extension = extensionBox_->GetStringSelection();
291
292 // set IU extension
293 if (extension.IsSameAs(ProDeConstants::EXTENSION_ZERO)) {
295 } else if (extension.IsSameAs(ProDeConstants::EXTENSION_SIGN)) {
297 } else {
298 assert(false);
299 }
300
301 EndModal(wxID_OK);
302}
303
304
305/**
306 * Checks whether name field is empty and disables OK button of the
307 * dialog if it is.
308 */
309void
310IUDialog::onName(wxCommandEvent&) {
311 if (!TransferDataFromWindow()) {
312 assert(false);
313 }
314 wxString trimmedName = name_.Trim(false).Trim(true);
315 if (trimmedName == _T("")) {
316 FindWindow(wxID_OK)->Disable();
317 } else {
318 FindWindow(wxID_OK)->Enable();
319 }
320}
321
322
323/**
324 * Returns pointer to the port which is selected on the port list.
325 *
326 * @return Pointer to the port which is selected on the port list.
327 */
328Port*
330 long item = -1;
331 item = portList_->GetNextItem(
332 item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
333
334 if (item == -1) {
335 return NULL;
336 }
337
338 string portName =
339 WxConversion::toString(portList_->GetItemText(item));
340
341 return immediateUnit_->port(portName);
342}
343
344
345
346
347/**
348 * Creates and shows an empty IUPortDialog for adding ports.
349 */
350void
351IUDialog::onAddPort(wxCommandEvent&) {
352
353 // Generate name for the new port.
354 int i = 1;
357 while (immediateUnit_->hasPort(newName)) {
360 i++;
361 }
362
363 RFPort* port = new RFPort(newName, *immediateUnit_);
364 IUPortDialog portDialog(this, port);
365 if (portDialog.ShowModal() == wxID_OK) {
367 } else {
368 delete port;
369 }
370}
371
372
373/**
374 * Deletes selected port from the port list.
375 */
376void
377IUDialog::onDeletePort(wxCommandEvent&) {
378 Port* selected = selectedPort();
379 assert(selected != NULL);
380 delete selected;
382}
383
384
385/**
386 * Handles left mouse button double click on the port list.
387 */
388void
390 wxCommandEvent dummy;
392}
393
394
395/**
396 * Handles the 'Edit Port' button event.
397 *
398 * Opens a IUPortDialog with the selected port's attributes set.
399 */
400void
401IUDialog::onEditPort(wxCommandEvent&) {
402
403 Port* port = selectedPort();
404 if (port == NULL) {
405 // No port selected.
406 return;
407 }
408
409 IUPortDialog portDialog(this, port);
410 if (portDialog.ShowModal() == wxID_OK) {
412 }
413}
414
415/**
416 * Disables and enables Edit and Delete buttons under the port list.
417 *
418 * If a port is selected, buttons are enabled. If no port is selected the
419 * buttons will be disabled.
420 *
421 * @param event ListEvent, which may have changed the selection.
422 */
423void
425 if (portList_->GetSelectedItemCount() != 1) {
426 FindWindow(ID_DELETE_PORT)->Disable();
427 FindWindow(ID_EDIT_PORT)->Disable();
428 return;
429 }
430 FindWindow(ID_DELETE_PORT)->Enable();
431 FindWindow(ID_EDIT_PORT)->Enable();
432}
433
434
435/**
436 * Opens a pop-up menu when right mouse button was pressed.
437 *
438 * @param event Information about right mouse click event.
439 */
440void
441IUDialog::onPortRightClick(wxListEvent& event) {
442
443 portList_->SetItemState(event.GetIndex(), wxLIST_STATE_SELECTED,
444 wxLIST_STATE_SELECTED);
445
446 wxMenu* contextMenu = new wxMenu();
447 contextMenu->Append(ID_EDIT_PORT, _T("&Edit..."));
448 contextMenu->Append(ID_DELETE_PORT, _T("&Delete"));
449 portList_->PopupMenu(contextMenu, event.GetPoint());
450}
451
452
453/**
454 * Updates 'Ports' list control.
455 *
456 * Clears all items from the choicer and adds all ports.
457 */
458void
460 portList_->DeleteAllItems();
461 for (int i=0; i < immediateUnit_->portCount(); i++) {
462
463 wxString portName =
465
466 portList_->InsertItem(i, portName);
467 }
468}
469
470
471/**
472 * Updates 'Templates' list control.
473 */
474void
476
477 templateList_->DeleteAllItems();
480
481 for (int i = 0; i < navigator.count(); i++) {
482 if (navigator.item(i)->isOneOfDestinations(*immediateUnit_)) {
483 wxString name =
484 WxConversion::toWxString(navigator.item(i)->name());
485
486 templateList_->InsertItem(0, name);
487 }
488 }
489}
490
491
492/**
493 * Creates the dialog window contents.
494 *
495 * Code generated by wxDesigner.
496 *
497 * @return Main sizer of the created contents.
498 * @param parent The dialog window.
499 * @param call_fit If true, fits the contents inside the dialog.
500 * @param set_sizer If true, sets the main sizer as dialog contents.
501 */
502wxSizer*
503IUDialog::createContents(wxWindow *parent, bool call_fit, bool set_sizer) {
504
505 wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );
506
507 wxFlexGridSizer *item1 = new wxFlexGridSizer( 2, 0, 0 );
508
509 wxFlexGridSizer *item2 = new wxFlexGridSizer( 4, 0, 0 );
510
511 wxStaticText *item3 = new wxStaticText( parent, ID_LABEL_NAME, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
512 item2->Add( item3, 0, wxALIGN_RIGHT|wxALL, 5 );
513
514 wxTextCtrl *item4 = new wxTextCtrl( parent, ID_NAME, wxT(""), wxDefaultPosition, wxSize(120,-1), 0 );
515 item2->Add( item4, 0, wxGROW|wxALL, 5 );
516
517 wxStaticText *item5 = new wxStaticText( parent, ID_LABEL_SIZE, wxT("Size:"), wxDefaultPosition, wxDefaultSize, 0 );
518 item2->Add( item5, 0, wxALIGN_RIGHT|wxALL, 5 );
519
520 wxSpinCtrl *item6 = new wxSpinCtrl( parent, ID_SIZE, wxT("1"), wxDefaultPosition, wxSize(-1,-1), 0, 1, 10000, 1 );
521 item2->Add( item6, 0, wxGROW|wxALL, 5 );
522
523 wxStaticText *item7 = new wxStaticText( parent, ID_LABEL_WIDTH, wxT("Width:"), wxDefaultPosition, wxDefaultSize, 0 );
524 item2->Add( item7, 0, wxALIGN_RIGHT|wxALL, 5 );
525
526 wxSpinCtrl *item8 = new wxSpinCtrl( parent, ID_WIDTH, wxT("1"), wxDefaultPosition, wxSize(-1,-1), 0, 1, 10000, 1 );
527 item2->Add( item8, 0, wxGROW|wxALL, 5 );
528
529 item1->Add( item2, 0, 0, 5 );
530
531 wxString strs11[] =
532 {
533 wxT("Zero"),
534 wxT("Sign")
535 };
536 wxRadioBox *item11 = new wxRadioBox( parent, ID_EXTENSION, wxT("Extension"), wxDefaultPosition, wxDefaultSize, 2, strs11, 1, wxRA_SPECIFY_COLS );
537 item1->Add( item11, 0, wxGROW|wxALL, 5 );
538
539 wxStaticBox *item13 = new wxStaticBox( parent, -1, wxT("Templates:") );
540 wxStaticBoxSizer *item12 = new wxStaticBoxSizer( item13, wxVERTICAL );
541 templateListSizer_ = item12;
542
543 wxListCtrl *item14 = new wxListCtrl( parent, ID_TEMPLATE_LIST, wxDefaultPosition, wxSize(200,200), wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
544 item12->Add( item14, 0, wxGROW|wxALL, 5 );
545
546 item1->Add( item12, 0, wxGROW|wxALL, 5 );
547
548 wxStaticBox *item16 = new wxStaticBox( parent, -1, wxT("Ports:") );
549 wxStaticBoxSizer *item15 = new wxStaticBoxSizer( item16, wxVERTICAL );
550 portListSizer_ = item15;
551
552 wxListCtrl *item17 = new wxListCtrl( parent, ID_PORT_LIST, wxDefaultPosition, wxSize(240,150), wxLC_REPORT|wxLC_SINGLE_SEL|wxSUNKEN_BORDER );
553 item15->Add( item17, 0, wxGROW|wxALL, 5 );
554
555 wxBoxSizer *item18 = new wxBoxSizer( wxHORIZONTAL );
556
557 wxButton *item19 = new wxButton( parent, ID_ADD_PORT, wxT("Add..."), wxDefaultPosition, wxDefaultSize, 0 );
558 item18->Add( item19, 0, wxALIGN_CENTER|wxALL, 5 );
559
560 wxButton *item20 = new wxButton( parent, ID_EDIT_PORT, wxT("Edit..."), wxDefaultPosition, wxDefaultSize, 0 );
561 item18->Add( item20, 0, wxALIGN_CENTER|wxALL, 5 );
562
563 wxButton *item21 = new wxButton( parent, ID_DELETE_PORT, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
564 item18->Add( item21, 0, wxALIGN_CENTER|wxALL, 5 );
565
566 item15->Add( item18, 0, wxALIGN_CENTER|wxALL, 5 );
567
568 item1->Add( item15, 0, wxGROW|wxALL, 5 );
569
570 item0->Add( item1, 0, wxALL, 5 );
571
572 wxStaticLine *item22 = new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
573 item0->Add( item22, 0, wxGROW|wxALL, 5 );
574
575 wxGridSizer *item23 = new wxGridSizer( 2, 0, 0 );
576
577 wxButton *item24 = new wxButton( parent, ID_HELP, wxT("&Help"), wxDefaultPosition, wxDefaultSize, 0 );
578 item23->Add( item24, 0, wxALL, 5 );
579
580 wxBoxSizer *item25 = new wxBoxSizer( wxHORIZONTAL );
581
582 wxButton *item26 = new wxButton( parent, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
583 item25->Add( item26, 0, wxALIGN_CENTER|wxALL, 5 );
584
585 wxButton *item27 = new wxButton( parent, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
586 item25->Add( item27, 0, wxALIGN_CENTER|wxALL, 5 );
587
588 item23->Add( item25, 0, wxALL, 5 );
589
590 item0->Add( item23, 0, wxGROW, 5 );
591
592 if (set_sizer)
593 {
594 parent->SetSizer( item0 );
595 if (call_fit)
596 item0->SetSizeHints( parent );
597 }
598
599 return item0;
600}
#define assert(condition)
END_EVENT_TABLE() using namespace IDF
TTAMachine::Machine * machine
the architecture definition of the estimated processor
FUImplementationDialog::onAddExternalPort FUImplementationDialog::onDeleteExternalPort FUImplementationDialog::onArchPortSelection EVT_LIST_ITEM_DESELECTED(ID_ARCH_PORT_LIST, FUImplementationDialog::onArchPortSelection) EVT_LIST_ITEM_ACTIVATED(ID_ARCH_PORT_LIST
FUImplementationDialog::onAddExternalPort FUImplementationDialog::onDeleteExternalPort FUImplementationDialog::onArchPortSelection FUImplementationDialog::onArchPortActivation EVT_LIST_ITEM_SELECTED(ID_EXTERNAL_PORT_LIST, FUImplementationDialog::onExternalPortSelection) EVT_LIST_ITEM_ACTIVATED(ID_EXTERNAL_PORT_LIST
FUImplementationDialog::onAddExternalPort FUImplementationDialog::onDeleteExternalPort FUImplementationDialog::onArchPortSelection FUImplementationDialog::onArchPortActivation FUImplementationDialog::onExternalPortActivation FUImplementationDialog::onParameterSelection EVT_LIST_ITEM_ACTIVATED(ID_PARAMETER_LIST, FUImplementationDialog::onParameterActivation) EVT_LIST_ITEM_DESELECTED(ID_PARAMETER_LIST
EVT_BUTTON(ID_EDIT_ARCH_PORT, FUImplementationDialog::onEditArchitecturePort) EVT_BUTTON(ID_ADD_EXTERNAL_PORT
const int DEFAULT_WIDTH
Default window width.
SimValue dummy(32)
a dummy simvalue which is given for operands that are not bound
static std::string toString(const T &source)
@ TXT_BUTTON_EDIT_DIALOG
Label for edit button (with trailing ...).
@ TXT_BUTTON_ADD_DIALOG
Label for add button (with trailing ...).
@ TXT_BUTTON_HELP
Label for help button.
@ TXT_BUTTON_DELETE
Label for delete button.
@ TXT_BUTTON_CANCEL
Label for cancel button.
@ TXT_BUTTON_OK
Label for OK button.
static GUITextGenerator * instance()
void onPortSelection(wxListEvent &event)
Definition IUDialog.cc:424
void onEditPort(wxCommandEvent &event)
Definition IUDialog.cc:401
void onDeletePort(wxCommandEvent &event)
Definition IUDialog.cc:377
wxRadioBox * extensionBox_
Radio box for extension.
Definition IUDialog.hh:95
wxString name_
Name of the immediate unit.
Definition IUDialog.hh:82
void onOK(wxCommandEvent &event)
Definition IUDialog.cc:235
virtual ~IUDialog()
Definition IUDialog.cc:119
void onAddPort(wxCommandEvent &event)
Definition IUDialog.cc:351
int cycles_
Cycles.
Definition IUDialog.hh:88
@ ID_EDIT_PORT
Definition IUDialog.hh:105
@ ID_LABEL_WIDTH
Definition IUDialog.hh:110
@ ID_DELETE_PORT
Definition IUDialog.hh:106
@ ID_PORT_LIST
Definition IUDialog.hh:103
@ ID_TEMPLATE_LIST
Definition IUDialog.hh:107
@ ID_EXTENSION
Definition IUDialog.hh:102
@ ID_LABEL_SIZE
Definition IUDialog.hh:111
@ ID_ADD_PORT
Definition IUDialog.hh:104
@ ID_LABEL_NAME
Definition IUDialog.hh:109
void onActivatePort(wxListEvent &event)
Definition IUDialog.cc:389
void updatePortList()
Definition IUDialog.cc:459
void setTexts()
Definition IUDialog.cc:127
TTAMachine::ImmediateUnit * immediateUnit_
Immediate unit to modify.
Definition IUDialog.hh:80
wxStaticBoxSizer * portListSizer_
Sizer containing the port list and associated buttons.
Definition IUDialog.hh:75
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition IUDialog.cc:503
int width_
Width.
Definition IUDialog.hh:86
int size_
Number of registers.
Definition IUDialog.hh:84
wxStaticBoxSizer * templateListSizer_
Sizer containing the template list.
Definition IUDialog.hh:77
wxListCtrl * templateList_
Template list control.
Definition IUDialog.hh:93
TTAMachine::Port * selectedPort() const
Definition IUDialog.cc:329
wxListCtrl * portList_
Port list control.
Definition IUDialog.hh:91
void onPortRightClick(wxListEvent &event)
Definition IUDialog.cc:441
virtual bool TransferDataToWindow()
Definition IUDialog.cc:201
void onName(wxCommandEvent &event)
Definition IUDialog.cc:310
void updateTemplateList()
Definition IUDialog.cc:475
static bool isValidComponentName(const std::string &name)
static const std::string COMP_NEW_NAME_PREFIX_PORT
Prefix for new port names.
static const wxString EXTENSION_ZERO
String for the zero extension.
static const wxString EXTENSION_SIGN
String for the sign extension.
static ProDeTextGenerator * instance()
@ MSG_ERROR_SAME_NAME
Error: Same name exists.
@ MSG_ERROR_ILLEGAL_NAME
Error: Illegal component name.
@ COMP_AN_IMMEDIATE_UNIT
Immediate unit (w/ article).
@ TXT_LABEL_NAME
Label for component name widget.
@ TXT_LABEL_EXTENSION
Label for 'extension' radiobox.
@ TXT_RADIO_EXTENSION_ZERO
Label for 'zero' radio button.
@ TXT_LABEL_WIDTH
Label for bit width widget.
@ TXT_IU_TEMPLATES_BOX
Templates box title.
@ COMP_MACHINE
Text for machine description.
@ TXT_RADIO_EXTENSION_SIGN
Label for 'sign' radio button.
@ TXT_IU_PORTS_BOX
Ports box title.
@ COMP_IMMEDIATE_UNIT
Immediate unit (w/o article).
@ TXT_IU_DIALOG_TITLE
Immediate unit Dialog title.
@ TXT_LABEL_SIZE
Label for size widget.
@ TXT_COLUMN_NAME
Label for name column in a list.
virtual int numberOfRegisters() const
virtual int width() const
virtual void setWidth(int width)
virtual RFPort * port(const std::string &name) const
virtual Machine * machine() const
virtual TCEString name() const
virtual void setExtensionMode(Machine::Extension mode)
virtual int latency() const
virtual Machine::Extension extensionMode() const
virtual void setName(const std::string &name)
ComponentType * item(int index) const
virtual InstructionTemplateNavigator instructionTemplateNavigator() const
Definition Machine.cc:428
virtual ImmediateUnitNavigator immediateUnitNavigator() const
Definition Machine.cc:416
@ SIGN
Sign extension.
Definition Machine.hh:82
@ ZERO
Zero extension.
Definition Machine.hh:81
virtual std::string name() const
Definition Port.cc:141
virtual void setNumberOfRegisters(int registers)
virtual bool hasPort(const std::string &name) const
Definition Unit.cc:96
virtual int portCount() const
Definition Unit.cc:135
virtual boost::format text(int textId)
static void setWidgetLabel(wxWindow *widget, std::string text)
static void setLabel(Texts::TextGenerator *generator, wxWindow *widget, int textID)
static wxString toWxString(const std::string &source)
static std::string toString(const wxString &source)