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

#include <OpsetDialog.hh>

Inheritance diagram for OpsetDialog:
Inheritance graph
Collaboration diagram for OpsetDialog:
Collaboration graph

Public Member Functions

 OpsetDialog (wxWindow *parent)
 
virtual ~OpsetDialog ()
 
TTAMachine::HWOperationcreateOperation (TTAMachine::FunctionUnit &fu)
 

Protected Member Functions

virtual bool TransferDataToWindow ()
 
virtual bool TransferDataFromWindow ()
 

Private Types

enum  {
  ID_LIST = 20000, ID_OP_FILTER_LABEL, ID_OP_FILTER, ID_OP_DESCRIPTION,
  ID_OP_INPUTS, ID_OP_OUTPUTS, ID_LATENCY, ID_TEXT,
  ID_LINE
}
 Widget IDs. More...
 
typedef std::set< const TTAMachine::FUPort *, TTAMachine::MachinePart::ComparatorPortSet
 
typedef std::map< int, PortSetPortMap
 

Private Member Functions

bool bindPorts (TTAMachine::HWOperation &operation, std::map< int, std::set< int > > &operands, PortMap &ports, bool needsTrigger)
 
const TTAMachine::FUPortfindTriggerPort (PortMap &ports)
 
wxSizer * createContents (wxWindow *parent, bool call_fit, bool set_sizer)
 
void onSelectOperation (wxCommandEvent &event)
 
void onOK (wxCommandEvent &event)
 
void onOperationFilterChange (wxCommandEvent &event)
 

Private Attributes

int latency_
 Chosen latency. More...
 
TCEString operation_
 Name of the selected operation. More...
 
wxListBox * operationList_
 Operation list widget. More...
 
std::string opNameFilter_ = ""
 A string to filter opset list. More...
 

Detailed Description

Dialog for selecting and creating HWOperation from the operation pool.

Definition at line 50 of file OpsetDialog.hh.

Member Typedef Documentation

◆ PortMap

typedef std::map<int, PortSet> OpsetDialog::PortMap
private

Definition at line 61 of file OpsetDialog.hh.

◆ PortSet

Definition at line 60 of file OpsetDialog.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private

Widget IDs.

Enumerator
ID_LIST 
ID_OP_FILTER_LABEL 
ID_OP_FILTER 
ID_OP_DESCRIPTION 
ID_OP_INPUTS 
ID_OP_OUTPUTS 
ID_LATENCY 
ID_TEXT 
ID_LINE 

Definition at line 84 of file OpsetDialog.hh.

84  {
85  ID_LIST = 20000,
91  ID_LATENCY,
92  ID_TEXT,
93  ID_LINE
94  };

Constructor & Destructor Documentation

◆ OpsetDialog()

OpsetDialog::OpsetDialog ( wxWindow *  parent)

The constructor.

Parameters
parentParent window of the dialog.

Definition at line 69 of file OpsetDialog.cc.

69  :
70  wxDialog(parent, -1, _T("Choose operation & latency"),
71  wxDefaultPosition),
72  latency_(1), operation_("") {
73 
74  createContents(this, true, true);
75  operationList_ = dynamic_cast<wxListBox*>(FindWindow(ID_LIST));
76  FindWindow(wxID_OK)->Disable();
77 }

◆ ~OpsetDialog()

OpsetDialog::~OpsetDialog ( )
virtual

The Destructor.

Definition at line 82 of file OpsetDialog.cc.

82  {
83 }

Member Function Documentation

◆ bindPorts()

bool OpsetDialog::bindPorts ( TTAMachine::HWOperation operation,
std::map< int, std::set< int > > &  operands,
PortMap ports,
bool  needsTrigger 
)
private

Binds ports to operands of an instruction.

Tries to use sensible port widths, ie smallest allowed.

Parameters
operationHWOperation being constructed
operandswidth-based map of all operands
portswidth-based map of all ports
needsTriggerif trigger neeed to be bound.
Returns
true if did bind trigger, false if did not.

Definition at line 333 of file OpsetDialog.cc.

336  {
337  bool triggerBound = false;
338  int triggerWidth = 0;
339  const FUPort* triggerPort = NULL;
340 
341  if (needsTrigger) {
342  triggerPort = findTriggerPort(ports);
343  if (triggerPort) {
344  triggerWidth = triggerPort->width();
345  }
346  }
347 
348  while (!operands.empty() && !ports.empty()) {
349  std::map<int, std::set<int> >::iterator j = operands.begin();
350  int width = j->first;
351  for (PortMap::iterator k = ports.begin();
352  k != ports.end();) {
353  if (k->first >= width) {
354  std::set<int>& operandsOfSize = j->second;
355  std::set<int>::iterator operandIter = operandsOfSize.begin();
356  if (needsTrigger
357  && triggerPort != nullptr
358  && width <= triggerWidth
359  && operandsOfSize.size() == 1) {
360  std::map<int, std::set<int> >::iterator next = j;
361  next++;
362  if (next==operands.end() || next->first > triggerWidth) {
363  operation.bindPort(*operandIter, *triggerPort);
364  operands.erase(j->first);
365  ports.erase(triggerWidth);
366  needsTrigger = false;
367  triggerBound = true;
368  break;
369  }
370  }
371  PortSet& portsOfSize = k->second;
372  // Take the last element of the set
373  PortSet::iterator portIter = portsOfSize.end();
374  portIter--;
375  const TTAMachine::FUPort* fuPort = *portIter;
376  operation.bindPort(*operandIter, *fuPort);
377  if (fuPort->isTriggering()) {
378  needsTrigger = false;
379  triggerBound = true;
380  }
381  operandsOfSize.erase(operandIter);
382  if (operandsOfSize.empty()) {
383  operands.erase(j->first);
384  }
385  portsOfSize.erase(portIter);
386  if (portsOfSize.empty()) {
387  ports.erase(k->first);
388  }
389  break;
390  } else {
391  // port sizes of this size are too small for all in the future
392  ports.erase(k++);
393  }
394  }
395  }
396  return triggerBound;
397 }

References TTAMachine::HWOperation::bindPort(), TTAMachine::FUPort::isTriggering(), and TTAMachine::BaseFUPort::width().

Here is the call graph for this function:

◆ createContents()

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

Creates the dialog widgets.

Parameters
parentParent window of the widgets.

Definition at line 423 of file OpsetDialog.cc.

423  {
424 
425  wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);
426  // Sizer for leftSizer and rightSizer
427  wxBoxSizer *upperSizer = new wxBoxSizer(wxHORIZONTAL);
428 
429  // Sizer for oplistbox, filterlabel and filterinput
430  wxBoxSizer *leftSizer = new wxBoxSizer(wxVERTICAL);
431  // List of operations
432  wxListBox *opListBox = new wxListBox(parent, ID_LIST, wxDefaultPosition,
433  wxSize(210, 150), 0, NULL, wxLB_SINGLE|wxLB_SORT);
434  leftSizer->Add(opListBox, 0, wxEXPAND|wxALL, 5);
435 
436  // Sizer for opNameFilterLabel and opNameFilter
437  wxBoxSizer *filterSizer = new wxBoxSizer(wxHORIZONTAL);
438  // TextLabel "Filter:"
439  wxStaticText *opNameFilterLabel = new wxStaticText(parent,
440  ID_OP_FILTER_LABEL, wxT("Filter:"), wxDefaultPosition, wxDefaultSize,
441  0);
442  // Operation filter input
443  wxTextCtrl *opNameFilter = new wxTextCtrl(parent, ID_OP_FILTER, wxT(""),
444  wxDefaultPosition, wxDefaultSize, 0);
445  filterSizer->Add(opNameFilterLabel, 0, 0);
446  filterSizer->Add(opNameFilter, 1, wxEXPAND);
447  leftSizer->Add(filterSizer, 0, wxEXPAND|wxALL, 5);
448 
449  // Sizer for latencyLabel and latencySpinner
450  wxBoxSizer *latencySizer = new wxBoxSizer(wxHORIZONTAL);
451  // TextLabel "Latency"
452  wxStaticText *latencyLabel = new wxStaticText(parent, ID_TEXT,
453  wxT("Latency:"), wxDefaultPosition, wxDefaultSize, 0);
454  // Latency spinner
455  wxSpinCtrl *latencySpinner = new wxSpinCtrl(parent, ID_LATENCY, wxT("1"),
456  wxDefaultPosition, wxSize(-1,-1), 0, 1, 100, 1);
457  latencySizer->Add(latencyLabel, 1, 0);
458  latencySizer->Add(latencySpinner, 1);
459  leftSizer->Add(latencySizer, 0, wxEXPAND|wxALL, 5);
460 
461  // Sizer for operation information
462  wxStaticBoxSizer *rightSizer = new wxStaticBoxSizer(wxVERTICAL, parent,
463  wxT("Operation description"));
464  // Selected operation description
465  wxTextCtrl *opDescription = new wxTextCtrl(parent, ID_OP_DESCRIPTION,
466  wxT(""), wxDefaultPosition, wxSize(210, -1),
467  wxTE_MULTILINE|wxTE_READONLY);
468 
469  // Sizer for Inputs/Outputs
470  wxBoxSizer *insOutsSizer = new wxBoxSizer(wxHORIZONTAL);
471  // Output count label
472  wxStaticText *inputsLabel = new wxStaticText(parent, ID_OP_INPUTS,
473  wxT("Inputs:"), wxDefaultPosition, wxDefaultSize, 0);
474  // Outputs count label
475  wxStaticText *outputsLabel = new wxStaticText(parent, ID_OP_OUTPUTS,
476  wxT("Outputs: "), wxDefaultPosition, wxDefaultSize, 0);
477  insOutsSizer->Add(inputsLabel, 1);
478  insOutsSizer->Add(outputsLabel, 1);
479  rightSizer->Add(opDescription, 1, wxEXPAND|wxALL, 5);
480  rightSizer->Add(insOutsSizer, 0, wxEXPAND|wxALL, 5);
481 
482  upperSizer->Add(leftSizer, 0, wxALL, 5);
483  upperSizer->Add(rightSizer, 1, wxEXPAND|wxALL, 5);
484 
485  mainSizer->Add(upperSizer, 1, wxEXPAND);
486 
487  // Static line
488  wxStaticLine *horisontalLine = new wxStaticLine(parent, ID_LINE,
489  wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL);
490  mainSizer->Add(horisontalLine, 0, wxEXPAND|wxALL, 5);
491 
492  // Sizer for Cancel and OK buttons
493  wxBoxSizer *buttonsSizer = new wxBoxSizer(wxHORIZONTAL);
494  // Cancel button
495  wxButton *cancelButton = new wxButton(parent, wxID_CANCEL, wxT("&Cancel"),
496  wxDefaultPosition, wxDefaultSize, 0);
497  buttonsSizer->Add(cancelButton, 0, wxALIGN_CENTER|wxALL, 5);
498  // OK button
499  wxButton *okButton = new wxButton(parent, wxID_OK, wxT("&OK"),
500  wxDefaultPosition, wxDefaultSize, 0);
501  buttonsSizer->Add(okButton, 0, wxALIGN_CENTER|wxALL, 5);
502 
503  mainSizer->Add(buttonsSizer, 0, 0, 5);
504 
505  if (set_sizer) {
506  parent->SetSizer(mainSizer);
507  if (call_fit) {
508  mainSizer->SetSizeHints( parent );
509  }
510  }
511 
512  return mainSizer;
513 }

◆ createOperation()

HWOperation * OpsetDialog::createOperation ( TTAMachine::FunctionUnit fu)

Creates a new HWOperation based on user choices.

Parameters
fuParent function unit of the new operation.
Returns
Pointer to the created operation.

Definition at line 212 of file OpsetDialog.cc.

212  {
213 
214  // Check that the function unit doesn't already have an operation with
215  // the selected name.
216  if (fu.hasOperation(operation_)) {
217  wxString message = _T("Function unit already contains operation '");
218  message.Append(WxConversion::toWxString(operation_));
219  message.Append(_T("'."));
220  ErrorDialog dialog(this, message);
221  dialog.ShowModal();
222  return NULL;
223  }
224 
225  OperationPool pool;
226  const Operation& op = pool.operation(operation_.c_str());
227 
228  HWOperation* operation = new HWOperation(operation_, fu);
229 
230  // Read operation operand information from the operation pool.
231  std::map<int, std::set<int> > inputs;
232  std::map<int, std::set<int> > outputs;
233  wxString opWidths;
234 
235  PortMap inputPorts;
236  PortMap outputPorts;
237  PortMap unconnectedPorts;
238 
239  for (int i = 1; i <= op.numberOfInputs() + op.numberOfOutputs(); i++) {
240  const Operand& oper = op.operand(i);
241  opWidths.Append(WxConversion::toWxString(oper.width()));
242 
243  if (oper.isInput()) {
244  int opWidth;
245  if (oper.isAddress()) {
246  assert(fu.hasAddressSpace());
247  opWidth = MathTools::requiredBits(fu.addressSpace()->end());
248  } else {
249  opWidth = oper.width();
250  }
251  inputs[opWidth].insert(oper.index());
252  opWidths.Append(WxConversion::toWxString("b input, "));
253  operation->pipeline()->addPortRead(oper.index(), 0, 1);
254  } else if (oper.isOutput()) {
255  outputs[oper.width()].insert(oper.index());
256  opWidths.Append(WxConversion::toWxString("b output, "));
257  if (!inputs.empty()) {
258  // 0 and 1 latency means that the output operand is written
259  // on cycle 0.
260  int latency = (latency_ > 0) ? latency_ - 1 : latency_;
261  operation->pipeline()->addPortWrite(oper.index(), latency, 1);
262  }
263  }
264  }
265 
266  opWidths.RemoveLast(2);
267  opWidths.Append(_T("."));
268 
269  // Try to bind operation operands to function unit ports.
270  for (int i = 0; i < fu.operationPortCount(); i++) {
271  const FUPort* port = fu.operationPort(i);
272 
273  if (port->inputSocket() != NULL || port->isTriggering()) {
274  inputPorts[port->width()].insert(port);
275  } else if (port->outputSocket() != NULL) {
276  outputPorts[port->width()].insert(port);
277  } else {
278  unconnectedPorts[port->width()].insert(port);
279  }
280  }
281 
282  bool triggerBound = false;
283  triggerBound |= bindPorts(*operation, inputs, inputPorts, !inputs.empty());
284  bindPorts(*operation, outputs, outputPorts, false);
285 
286  bindPorts(*operation, inputs, unconnectedPorts, false);
287  bindPorts(*operation, outputs, unconnectedPorts, false);
288 
289  // Display an error dialog and abort if the operands couldn't be bound
290  // to ports.
291  if (!inputs.empty() || !outputs.empty()
292  || (!inputs.empty() && !triggerBound)) {
293  wxString message;
294  if (!inputs.empty() && !triggerBound) {
295  message.Append(
296  _T("Could not bind operand to the trigger port. "));
297  message.Append(
298  _T("It may be too narrow or missing?\n"));
299  }
300 
301  if (!inputs.empty()) {
302  message.Append(
303  _T("Not enough (wide enough?) input ports for the operation "
304  "input operands.\n"));
305  }
306  if (!outputs.empty()) {
307  message.Append(
308  _T("Not enough (wide enough?) output ports for the operation "
309  "output operands.\n"));
310  }
311  message.Append(WxConversion::toWxString("\n" + operation_));
312  message.Append(_T(" needs a "));
313  message.Append(opWidths);
314  ErrorDialog dialog(this, message);
315  dialog.ShowModal();
316  delete operation;
317  return NULL;
318  }
319 
320  return operation;
321 }

References TTAMachine::ExecutionPipeline::addPortRead(), TTAMachine::ExecutionPipeline::addPortWrite(), TTAMachine::FunctionUnit::addressSpace(), assert, TTAMachine::AddressSpace::end(), TTAMachine::FunctionUnit::hasAddressSpace(), TTAMachine::FunctionUnit::hasOperation(), Operand::index(), TTAMachine::Port::inputSocket(), Operand::isAddress(), Operand::isInput(), Operand::isOutput(), TTAMachine::FUPort::isTriggering(), Operation::numberOfInputs(), Operation::numberOfOutputs(), Operation::operand(), OperationPool::operation(), TTAMachine::FunctionUnit::operationPort(), TTAMachine::FunctionUnit::operationPortCount(), TTAMachine::Port::outputSocket(), TTAMachine::HWOperation::pipeline(), MathTools::requiredBits(), WxConversion::toWxString(), TTAMachine::BaseFUPort::width(), and Operand::width().

Referenced by FUDialog::onAddOperationFromOpset().

Here is the call graph for this function:

◆ findTriggerPort()

const TTAMachine::FUPort * OpsetDialog::findTriggerPort ( PortMap ports)
private

Finds the trigger port from map of function unit ports.

Definition at line 403 of file OpsetDialog.cc.

403  {
404  for (PortMap::iterator i = ports.begin(); i != ports.end(); i++) {
405  PortSet& portsOfSize = i->second;
406  for (PortSet::iterator j = portsOfSize.begin();
407  j != portsOfSize.end(); j++) {
408  const TTAMachine::FUPort* port = *j;
409  if (port->isTriggering()) {
410  return port;
411  }
412  }
413  }
414  return NULL;
415 }

References TTAMachine::FUPort::isTriggering().

Here is the call graph for this function:

◆ onOK()

void OpsetDialog::onOK ( wxCommandEvent &  event)
private

Event handler for the OK button.

Definition at line 176 of file OpsetDialog.cc.

176  {
177  if (operationList_->GetSelection() == wxNOT_FOUND) {
178  wxString message = _T("No operation selected.");
179  ErrorDialog dialog(this, message);
180  dialog.ShowModal();
181  return;
182  }
184  EndModal(wxID_OK);
185 }

◆ onOperationFilterChange()

void OpsetDialog::onOperationFilterChange ( wxCommandEvent &  event)
private

Event handler for opset filtering.

Definition at line 192 of file OpsetDialog.cc.

192  {
193  std::string pattern(event.GetString().mb_str());
194  std::string::iterator it;
195  it = std::remove_if(pattern.begin(), pattern.end(), [](const char& c) {
196  return c == ' ';
197  });
198  pattern.erase(it, pattern.end());
199  for (auto& c : pattern) c = toupper(c);
200  opNameFilter_ = pattern;
202 }

References TransferDataToWindow().

Here is the call graph for this function:

◆ onSelectOperation()

void OpsetDialog::onSelectOperation ( wxCommandEvent &  event)
private

Event handler for the operation list selections.

Enables and disables the OK button. Displays operation description and ports count.

Definition at line 134 of file OpsetDialog.cc.

134  {
135  FindWindow(wxID_OK)->Enable(operationList_->GetSelection() != wxNOT_FOUND);
136 
137  operation_ = WxConversion::toString(operationList_->GetStringSelection());
138 
139  if (operation_ == "")
140  return;
141 
142  wxString opDesc;
143  wxString inputCount;
144  wxString outputCount;
145  try {
146  OperationPool pool;
147  const Operation& op = pool.operation(operation_.c_str());
148  opDesc = WxConversion::toWxString(op.description());
149  inputCount = WxConversion::toWxString(op.numberOfInputs());
150  outputCount = WxConversion::toWxString(op.numberOfOutputs());
151  } catch (Exception&) {
152  opDesc = WxConversion::toWxString(
153  "Error in loading the operation description.");
154  inputCount = WxConversion::toWxString("N/A");
155  outputCount = WxConversion::toWxString("N/A");
156  }
157  // Set operation description
158  wxTextCtrl *opDescription = dynamic_cast<wxTextCtrl*>(
160  opDescription->Clear();
161  opDescription->AppendText(opDesc);
162  // Set inputs and outputs count
163  wxStaticText *inputsLabel = dynamic_cast<wxStaticText*>(
165  inputsLabel->SetLabel(wxT("Inputs: ") + inputCount);
166  wxStaticText *outputsLabel = dynamic_cast<wxStaticText*>(
168  outputsLabel->SetLabel(wxT("Outputs: ") + outputCount);
169 }

References Operation::description(), Operation::numberOfInputs(), Operation::numberOfOutputs(), OperationPool::operation(), WxConversion::toString(), and WxConversion::toWxString().

Here is the call graph for this function:

◆ TransferDataFromWindow()

bool OpsetDialog::TransferDataFromWindow ( )
protectedvirtual

Reads user choices from the dialog widgets.

Definition at line 121 of file OpsetDialog.cc.

121  {
122  latency_ = dynamic_cast<wxSpinCtrl*>(FindWindow(ID_LATENCY))->GetValue();
123  operation_ = WxConversion::toString(operationList_->GetStringSelection());
124  return true;
125 }

References WxConversion::toString().

Here is the call graph for this function:

◆ TransferDataToWindow()

bool OpsetDialog::TransferDataToWindow ( )
protectedvirtual

Transfers data to the opset list.

Definition at line 89 of file OpsetDialog.cc.

89  {
90 
91  operationList_->Clear();
92 
93  // Cleanup operation pool cache so new operations
94  // appear w/o restarting prode.
96  OperationPool pool;
97  OperationIndex& index = pool.index();
98  std::set<TCEString> opset;
99  for (int m = 0; m < index.moduleCount(); m++) {
100  OperationModule& module = index.module(m);
101  for (int i = 0; i < index.operationCount(module); i++) {
102  std::string opName = index.operationName(i, module);
103  if (opNameFilter_.empty()
104  || opName.find(opNameFilter_) != std::string::npos) {
105  opset.insert(opName);
106  }
107  }
108  }
109 
110  for (const auto& opName : opset) {
111  operationList_->Append(WxConversion::toWxString(opName));
112  }
113 
114  return true;
115 }

References OperationPool::cleanupCache(), OperationPool::index(), OperationIndex::module(), OperationIndex::moduleCount(), OperationIndex::operationCount(), OperationIndex::operationName(), and WxConversion::toWxString().

Referenced by onOperationFilterChange().

Here is the call graph for this function:

Member Data Documentation

◆ latency_

int OpsetDialog::latency_
private

Chosen latency.

Definition at line 75 of file OpsetDialog.hh.

◆ operation_

TCEString OpsetDialog::operation_
private

Name of the selected operation.

Definition at line 77 of file OpsetDialog.hh.

◆ operationList_

wxListBox* OpsetDialog::operationList_
private

Operation list widget.

Definition at line 79 of file OpsetDialog.hh.

◆ opNameFilter_

std::string OpsetDialog::opNameFilter_ = ""
private

A string to filter opset list.

Definition at line 81 of file OpsetDialog.hh.


The documentation for this class was generated from the following files:
Operand
Definition: Operand.hh:52
OpsetDialog::ID_OP_DESCRIPTION
@ ID_OP_DESCRIPTION
Definition: OpsetDialog.hh:88
OperationPool::operation
Operation & operation(const char *name)
Definition: OperationPool.cc:99
TTAMachine::Port::inputSocket
virtual Socket * inputSocket() const
Definition: Port.cc:261
OpsetDialog::operation_
TCEString operation_
Name of the selected operation.
Definition: OpsetDialog.hh:77
OpsetDialog::findTriggerPort
const TTAMachine::FUPort * findTriggerPort(PortMap &ports)
Definition: OpsetDialog.cc:403
WxConversion::toWxString
static wxString toWxString(const std::string &source)
OpsetDialog::ID_LINE
@ ID_LINE
Definition: OpsetDialog.hh:93
TTAMachine::FunctionUnit::hasAddressSpace
virtual bool hasAddressSpace() const
Definition: FunctionUnit.cc:608
TTAMachine::HWOperation
Definition: HWOperation.hh:52
TTAMachine::HWOperation::bindPort
virtual void bindPort(int operand, const FUPort &port)
Definition: HWOperation.cc:269
OpsetDialog::bindPorts
bool bindPorts(TTAMachine::HWOperation &operation, std::map< int, std::set< int > > &operands, PortMap &ports, bool needsTrigger)
Definition: OpsetDialog.cc:333
Operand::width
virtual int width() const
Definition: Operand.cc:318
OpsetDialog::TransferDataToWindow
virtual bool TransferDataToWindow()
Definition: OpsetDialog.cc:89
OperationPool::index
OperationIndex & index()
Definition: OperationPool.cc:109
Operation::numberOfInputs
virtual int numberOfInputs() const
Definition: Operation.cc:192
OpsetDialog::ID_TEXT
@ ID_TEXT
Definition: OpsetDialog.hh:92
FindWindow
Definition: FindWindow.hh:49
TTAMachine::FunctionUnit::addressSpace
virtual AddressSpace * addressSpace() const
Definition: FunctionUnit.cc:580
TTAMachine::FUPort::isTriggering
virtual bool isTriggering() const
Definition: FUPort.cc:182
Operand::isOutput
virtual bool isOutput() const
Definition: Operand.cc:155
assert
#define assert(condition)
Definition: Application.hh:86
TTAMachine::FUPort
Definition: FUPort.hh:46
OpsetDialog::latency_
int latency_
Chosen latency.
Definition: OpsetDialog.hh:75
ErrorDialog
Definition: ErrorDialog.hh:42
OperationPool::cleanupCache
static void cleanupCache()
Definition: OperationPool.cc:84
OpsetDialog::PortSet
std::set< const TTAMachine::FUPort *, TTAMachine::MachinePart::Comparator > PortSet
Definition: OpsetDialog.hh:60
TTAMachine::ExecutionPipeline::addPortRead
void addPortRead(int operand, int start, int duration)
Definition: ExecutionPipeline.cc:141
Operand::index
virtual int index() const
Definition: Operand.cc:135
MathTools::requiredBits
static int requiredBits(unsigned long int number)
OpsetDialog::operationList_
wxListBox * operationList_
Operation list widget.
Definition: OpsetDialog.hh:79
TTAMachine::FunctionUnit::hasOperation
virtual bool hasOperation(const std::string &name) const
Definition: FunctionUnit.cc:330
OpsetDialog::PortMap
std::map< int, PortSet > PortMap
Definition: OpsetDialog.hh:61
Exception
Definition: Exception.hh:54
TTAMachine::FunctionUnit::operationPortCount
virtual int operationPortCount() const
Definition: FunctionUnit.cc:182
Operation
Definition: Operation.hh:59
OpsetDialog::ID_OP_OUTPUTS
@ ID_OP_OUTPUTS
Definition: OpsetDialog.hh:90
OpsetDialog::ID_OP_FILTER_LABEL
@ ID_OP_FILTER_LABEL
Definition: OpsetDialog.hh:86
Operation::description
virtual TCEString description() const
Definition: Operation.cc:103
Operation::operand
virtual Operand & operand(int id) const
Definition: Operation.cc:541
OpsetDialog::ID_LATENCY
@ ID_LATENCY
Definition: OpsetDialog.hh:91
OperationIndex::moduleCount
int moduleCount() const
OperationModule
Definition: OperationModule.hh:46
OperationIndex
Definition: OperationIndex.hh:58
TTAMachine::Port::outputSocket
virtual Socket * outputSocket() const
Definition: Port.cc:281
OpsetDialog::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition: OpsetDialog.cc:423
TTAMachine::HWOperation::pipeline
ExecutionPipeline * pipeline() const
Definition: HWOperation.cc:201
TTAMachine::ExecutionPipeline::addPortWrite
void addPortWrite(int operand, int start, int duration)
Definition: ExecutionPipeline.cc:167
Operand::isAddress
virtual bool isAddress() const
Definition: Operand.cc:328
TTAMachine::FunctionUnit::operationPort
virtual FUPort * operationPort(const std::string &name) const
Definition: FunctionUnit.cc:224
OpsetDialog::opNameFilter_
std::string opNameFilter_
A string to filter opset list.
Definition: OpsetDialog.hh:81
OperationPool
Definition: OperationPool.hh:52
Operand::isInput
virtual bool isInput() const
Definition: Operand.cc:145
OperationIndex::operationCount
int operationCount(const OperationModule &om)
Definition: OperationIndex.cc:363
WxConversion::toString
static std::string toString(const wxString &source)
OpsetDialog::ID_OP_INPUTS
@ ID_OP_INPUTS
Definition: OpsetDialog.hh:89
OpsetDialog::ID_LIST
@ ID_LIST
Definition: OpsetDialog.hh:85
Operation::numberOfOutputs
virtual int numberOfOutputs() const
Definition: Operation.cc:202
TTAMachine::AddressSpace::end
virtual ULongWord end() const
Definition: AddressSpace.cc:177
OpsetDialog::TransferDataFromWindow
virtual bool TransferDataFromWindow()
Definition: OpsetDialog.cc:121
OperationIndex::module
OperationModule & module(int i)
OperationIndex::operationName
std::string operationName(int i, const OperationModule &om)
Definition: OperationIndex.cc:337
TTAMachine::BaseFUPort::width
virtual int width() const
Definition: BaseFUPort.cc:109
OpsetDialog::ID_OP_FILTER
@ ID_OP_FILTER
Definition: OpsetDialog.hh:87