OpenASIP  2.0
IPXactModel.cc
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2010 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 IPXactModel.cc
26  *
27  * Implementation of IPXactModel class.
28  *
29  * @author Otto Esko 2010 (otto.esko-no.spam-tut.fi)
30  * @note rating: red
31  */
32 #include <vector>
33 #include <cassert>
34 #include "IPXactModel.hh"
35 #include "IPXactInterface.hh"
36 #include "IPXactClkInterface.hh"
37 #include "IPXactResetInterface.hh"
38 #include "IPXactHibiInterface.hh"
39 #include "IPXactAddressSpace.hh"
40 #include "ObjectState.hh"
41 #include "HDLPort.hh"
42 #include "Conversion.hh"
45 using IPXact::Vlnv;
46 using std::vector;
47 
48 const TCEString IPXactModel::OSNAME_IPXACT_MODEL = "spirit:component";
49 const TCEString IPXactModel::OSNAME_VENDOR = "spirit:vendor";
50 const TCEString IPXactModel::OSNAME_LIBRARY = "spirit:library";
51 const TCEString IPXactModel::OSNAME_NAME = "spirit:name";
52 const TCEString IPXactModel::OSNAME_VERSION = "spirit:version";
53 const TCEString IPXactModel::OSNAME_BUS_INTERFACES = "spirit:busInterfaces";
54 const TCEString IPXactModel::OSNAME_BUS_INTERFACE = "spirit:busInterface";
55 const TCEString IPXactModel::OSNAME_BUS_TYPE = "spirit:busType";
56 const TCEString IPXactModel::OSNAME_BUS_ABS_TYPE = "spirit:abstractionType";
57 const TCEString IPXactModel::OSNAME_BUS_MASTER = "spirit:master";
59  "spirit:mirroredMaster";
60 const TCEString IPXactModel::OSNAME_BUS_SLAVE = "spirit:slave";
62  "spirit:mirroredSlave";
63 const TCEString IPXactModel::OSNAME_BUS_SYSTEM = "spirit:system";
65  "spirit:mirroredSystem";
66 const TCEString IPXactModel::OSNAME_BUS_MONITOR = "spirit:monitor";
67 const TCEString IPXactModel::OSNAME_BUS_PORT_MAPS = "spirit:portMaps";
68 const TCEString IPXactModel::OSNAME_BUS_PORT_MAP = "spirit:portMap";
71  "spirit:physicalPort";
73  "spirit:logicalPort";
74 const TCEString IPXactModel::OSNAME_MODEL = "spirit:model";
75 const TCEString IPXactModel::OSNAME_PORTS = "spirit:ports";
76 const TCEString IPXactModel::OSNAME_WIRE = "spirit:wire";
77 const TCEString IPXactModel::OSNAME_VECTOR = "spirit:vector";
78 const TCEString IPXactModel::OSNAME_PORT = "spirit:port";
79 const TCEString IPXactModel::OSNAME_PORT_DIRECTION = "spirit:direction";
80 const TCEString IPXactModel::OSNAME_PORT_LEFT = "spirit:left";
81 const TCEString IPXactModel::OSNAME_PORT_RIGHT = "spirit:right";
82 const TCEString IPXactModel::OSNAME_FILESETS = "spirit:fileSets";
83 const TCEString IPXactModel::OSNAME_FILESET = "spirit:fileSet";
84 const TCEString IPXactModel::OSNAME_FILE = "spirit:file";
85 const TCEString IPXactModel::OSNAME_FILE_NAME = "spirit:name";
86 const TCEString IPXactModel::OSNAME_FILE_TYPE = "spirit:fileType";
87 const std::string IPXactModel::OSNAME_ADDRESS_SPACES = "spirit:addressSpaces";
88 const std::string IPXactModel::OSNAME_ADDRESS_SPACE = "spirit:addressSpace";
89 const std::string IPXactModel::OSNAME_AS_RANGE = "spirit:range";
90 const std::string IPXactModel::OSNAME_AS_WIDTH = "spirit:width";
91 const std::string IPXactModel::OSNAME_AS_MAU = "spirit:addressUnitBits";
92 const TCEString IPXactModel::OSNAME_MODEL_PARAMS = "spirit:modelParameters";
93 const TCEString IPXactModel::OSNAME_MODEL_PARAM = "spirit:modelParameter";
94 const TCEString IPXactModel::OSNAME_DISPLAY_NAME = "spirit:displayName";
95 const TCEString IPXactModel::OSNAME_VALUE = "spirit:value";
96 const TCEString IPXactModel::OSNAME_ATTR_DATA_TYPE = "spirit:dataType";
97 const TCEString IPXactModel::OSNAME_ATTR_FORMAT = "spirit:format";
98 const TCEString IPXactModel::OSNAME_ATTR_ID = "spirit:id";
99 const TCEString IPXactModel::OSNAME_ATTR_RESOLVE = "spirit:resolve";
100 
101 const TCEString IPXactModel::HDL_SET_ID = "hdlSources";
102 const TCEString IPXactModel::VHDL_FILE = "vhdlSource";
103 const TCEString IPXactModel::OTHER_FILE = "unknown";
104 const TCEString IPXactModel::RESOLVE_USER = "user";
105 const TCEString IPXactModel::STRING_PARAM = "string";
106 const TCEString IPXactModel::INTEGER_PARAM = "integer";
107 const TCEString IPXactModel::LONG_PARAM = "long";
108 const TCEString IPXactModel::DEV_FAMILY_GENERIC = "dev_family_g";
109 
111  vlnv_("","","",""), signals_(), parameters_(), busInterfaces_(),
112  addressSpaces_(), hdlFiles_(), otherFiles_() {
113 }
114 
116  : vlnv_("", "", "", ""),
117  signals_(),
118  parameters_(),
119  busInterfaces_(),
120  addressSpaces_(),
121  hdlFiles_(),
122  otherFiles_() {
123  loadState(state);
124 }
125 
127 
128  for (unsigned int i = 0; i < signals_.size(); i++) {
129  delete signals_.at(i);
130  }
131  for (unsigned int i = 0; i < busInterfaces_.size(); i++) {
132  if (busInterfaces_.at(i) != NULL) {
133  delete busInterfaces_.at(i);
134  }
135  }
136  for (unsigned int i = 0; i < addressSpaces_.size(); i++) {
137  if (addressSpaces_.at(i) != NULL) {
138  delete addressSpaces_.at(i);
139  }
140  }
141 }
142 
143 
144 void
146 
147  extractVLNV(state);
148 
149  if (state->hasChild(OSNAME_BUS_INTERFACES)) {
151  }
152 
153  if (state->hasChild(OSNAME_ADDRESS_SPACES)) {
155  }
156 
157  if (state->hasChild(OSNAME_MODEL)) {
158  const ObjectState* model = state->childByName(OSNAME_MODEL);
159  if (model->hasChild(OSNAME_PORTS)) {
161  }
162  if (model->hasChild(OSNAME_MODEL_PARAMS)) {
163  const ObjectState* modelParams =
165  if (modelParams->hasChild(OSNAME_MODEL_PARAM)) {
166  extractModelParams(modelParams);
167  }
168  }
169  }
170 
171  if (state->hasChild(OSNAME_FILESETS)) {
173  }
174 }
175 
176 
179 
181 
182  // add VLNV
183  ObjectState* vendor = new ObjectState(OSNAME_VENDOR);
184  vendor->setValue(vlnv_.vendor);
185  root->addChild(vendor);
186  ObjectState* library = new ObjectState(OSNAME_LIBRARY);
187  library->setValue(vlnv_.library);
188  root->addChild(library);
189  ObjectState* compName = new ObjectState(OSNAME_NAME);
190  compName->setValue(vlnv_.name);
191  root->addChild(compName);
192  ObjectState* compVersion = new ObjectState(OSNAME_VERSION);
193  compVersion->setValue(vlnv_.version);
194  root->addChild(compVersion);
195 
196  // add bus interfaces
197  ObjectState* busInterfaces = new ObjectState(OSNAME_BUS_INTERFACES);
198  root->addChild(busInterfaces);
199  for (unsigned int i = 0; i < busInterfaces_.size(); i++) {
200  ObjectState* busInterface = new ObjectState(OSNAME_BUS_INTERFACE);
201  addBusInterfaceObject(busInterfaces_.at(i), busInterface);
202  busInterfaces->addChild(busInterface);
203  }
204 
205  // add address spaces
206  ObjectState* addressSpaces = new ObjectState(OSNAME_ADDRESS_SPACES);
207  root->addChild(addressSpaces);
208  for (unsigned int i = 0; i < addressSpaces_.size(); i++) {
209  ObjectState* addressSpace = new ObjectState(OSNAME_ADDRESS_SPACE);
210  addAddressSpaceObject(addressSpaces_.at(i), addressSpace);
211  addressSpaces->addChild(addressSpace);
212  }
213 
214  // create model and add signals
215  ObjectState* model = new ObjectState(OSNAME_MODEL);
216  root->addChild(model);
217  ObjectState* signals = new ObjectState(OSNAME_PORTS);
218  model->addChild(signals);
219  for (unsigned int i = 0; i < signals_.size(); i++) {
220  ObjectState* signal = new ObjectState(OSNAME_PORT);
221  addSignalObject(signals_.at(i), signal);
222  signals->addChild(signal);
223  }
224 
225  // add model parameters if any
226  if (parameters_.size() > 0) {
227  addModelParamsObject(model);
228  }
229 
230  // add hdl files
231  ObjectState* fileSets = new ObjectState(OSNAME_FILESETS);
232  root->addChild(fileSets);
233  ObjectState* fileSet = new ObjectState(OSNAME_FILESET);
234  ObjectState* fileSetName = new ObjectState(OSNAME_FILE_NAME);
235  fileSetName->setValue(HDL_SET_ID);
236  fileSet->addChild(fileSetName);
237  fileSets->addChild(fileSet);
238  for (unsigned int i = 0; i < hdlFiles_.size(); i++) {
239  ObjectState* file = new ObjectState(OSNAME_FILE);
240  addFileObject(hdlFiles_.at(i), VHDL_FILE, file);
241  fileSet->addChild(file);
242  }
243  // add other files (memory init files etc)
244  for (unsigned int i = 0; i < otherFiles_.size(); i++) {
245  ObjectState* file = new ObjectState(OSNAME_FILE);
246  addFileObject(otherFiles_.at(i), OTHER_FILE, file);
247  fileSet->addChild(file);
248  }
249  return root;
250 }
251 
252 
253 void
255  TCEString vendor,
256  TCEString library,
257  TCEString name,
258  TCEString version) {
259 
260  vlnv_.vendor = vendor;
261  vlnv_.library = library;
262  vlnv_.name = name;
263  vlnv_.version = version;
264 }
265 
266 
267 void
269 
270  hdlFiles_.push_back(file);
271 }
272 
273 void
275 
276  otherFiles_.push_back(file);
277 }
278 
279 
280 void
281 IPXactModel::setHdlFiles(const std::vector<TCEString>& files) {
282 
283  for (unsigned int i = 0; i < files.size(); i++) {
284  setHdlFile(files.at(i));
285  }
286 }
287 
288 
289 void
291 
292  signals_.push_back(new HDLPort(signal));
293 }
294 
295 void
297  parameters_.push_back(parameter);
298 }
299 
300 void
302 
303  busInterfaces_.push_back(interface);
304 }
305 
306 void
308 
309  addressSpaces_.push_back(addrSpace);
310 }
311 
312 
313 void
315  const IPXactInterface* bus,
316  ObjectState* parent) const {
317 
318  ObjectState* busName = new ObjectState(OSNAME_NAME);
319  busName->setValue(bus->instanceName());
320  parent->addChild(busName);
321 
322  Vlnv busIfType = bus->busType();
323  ObjectState* busType = new ObjectState(OSNAME_BUS_TYPE);
324  busType->setAttribute(OSNAME_VENDOR, busIfType.vendor);
325  busType->setAttribute(OSNAME_LIBRARY, busIfType.library);
326  busType->setAttribute(OSNAME_NAME, busIfType.name);
327  busType->setAttribute(OSNAME_VERSION, busIfType.version);
328  parent->addChild(busType);
329 
330  Vlnv absType = bus->busAbstractionType();
331  ObjectState* busAbsType = new ObjectState(OSNAME_BUS_ABS_TYPE);
332  busAbsType->setAttribute(OSNAME_VENDOR, absType.vendor);
333  busAbsType->setAttribute(OSNAME_LIBRARY, absType.library);
334  busAbsType->setAttribute(OSNAME_NAME, absType.name);
335  busAbsType->setAttribute(OSNAME_VERSION, absType.version);
336  parent->addChild(busAbsType);
337 
338  ObjectState* mode = NULL;
339  BusMode busMode = bus->busMode();
340  if (busMode == MASTER) {
342  } else if (busMode == MIRRORED_MASTER) {
344  } else if (busMode == SLAVE) {
346  } else if (busMode == MIRRORED_SLAVE) {
348  } else {
349  TCEString msg = "Unknown bus mode!";
350  InvalidData exc(__FILE__, __LINE__, "IPXactModel", msg);
351  throw exc;
352  }
353  parent->addChild(mode);
354 
356  parent->addChild(portMaps);
357 
358  const SignalMappingList& signalMap = bus->interfaceMapping();
359  for (unsigned int i = 0; i < signalMap.size(); i++) {
360  ObjectState* portMapping = new ObjectState(OSNAME_BUS_PORT_MAP);
361  portMaps->addChild(portMapping);
362 
364  ObjectState* compPortName = new ObjectState(OSNAME_BUS_PORT_MAP_NAME);
365  compPortName->setValue(signalMap.at(i)->first);
366  compPort->addChild(compPortName);
367 
370  busPortName->setValue(signalMap.at(i)->second);
371  busPort->addChild(busPortName);
372 
373  // in IP-XACT 1.5 bus logical port comes before physical port
374  portMapping->addChild(busPort);
375  portMapping->addChild(compPort);
376  }
377 }
378 
379 
380 void
382  const IPXactAddressSpace* as,
383  ObjectState* parent) const {
384 
385  ObjectState* name = new ObjectState(OSNAME_NAME);
386  name->setValue(as->name());
387  parent->addChild(name);
388 
390  range->setValue(as->memRange());
391  parent->addChild(range);
392 
394  width->setValue(as->memLocationWidth());
395  parent->addChild(width);
396 
397  if (as->mauWidth() > 0) {
399  mau->setValue(as->mauWidth());
400  parent->addChild(mau);
401  }
402 }
403 
404 
405 void
407  const HDLPort* port, ObjectState* parent) const {
408 
409  ObjectState* name = new ObjectState(OSNAME_NAME);
410  name->setValue(port->name());
411  parent->addChild(name);
412 
413  ObjectState* wire = new ObjectState(OSNAME_WIRE);
414  parent->addChild(wire);
415 
417  TCEString dir = "";
418  if (port->direction() == ProGe::IN) {
419  dir = "in";
420  } else if (port->direction() == ProGe::OUT) {
421  dir = "out";
422  } else if (port->direction() == ProGe::BIDIR) {
423  dir = "inout";
424  } else {
425  assert(false && "unknown direction");
426  }
427  direction->setValue(dir);
428  wire->addChild(direction);
429 
430  ObjectState* vector = NULL;
431  if (port->type() == ProGe::BIT_VECTOR) {
432  int leftBorder = 0;
433  int rightBorder = 0;
434  vector = new ObjectState(OSNAME_VECTOR);
435  if (port->hasRealWidth()) {
436  int width = port->realWidth();
437  if (width > 1) {
438  leftBorder = width-1;
439  }
440  } else {
441  // width is unknown, guessing 1
442  leftBorder = 0;
443  }
445  left->setValue(leftBorder);
446  vector->addChild(left);
448  right->setValue(rightBorder);
449  vector->addChild(right);
450  } else if (port->type() != ProGe::BIT) {
451  assert(false && "unknown port type");
452  }
453 
454  if (vector != NULL) {
455  wire->addChild(vector);
456  }
457 }
458 
459 
460 void
462 
464  parent->addChild(params);
465  for (unsigned int i = 0; i < parameters_.size(); i++) {
467  if (parameters_.at(i).type().lower() == STRING_PARAM) {
469  } else if (parameters_.at(i).type().lower() == INTEGER_PARAM) {
471  } else {
472  // unsuppored type, ignore
473  delete param;
474  continue;
475  }
476  params->addChild(param);
477 
478  ObjectState* name = new ObjectState(OSNAME_NAME);
479  name->setValue(parameters_.at(i).name());
480  param->addChild(name);
481 
482  ObjectState* displayName = new ObjectState(OSNAME_DISPLAY_NAME);
483  displayName->setValue(parameters_.at(i).name());
484  param->addChild(displayName);
485 
486  ObjectState* value = new ObjectState(OSNAME_VALUE);
487  if (parameters_.at(i).type().lower() == STRING_PARAM) {
489  } else if (parameters_.at(i).type().lower() == INTEGER_PARAM) {
491  }
492  TCEString id;
493  id << parameters_.at(i).name().upper() << "_ID";
494  value->setAttribute(OSNAME_ATTR_ID, id);
496  value->setValue(parameters_.at(i).value());
497  param->addChild(value);
498  }
499 }
500 
501 
502 void
504  const TCEString& name,
505  const TCEString& type,
506  ObjectState* parent) const {
507 
508  ObjectState* fileName = new ObjectState(OSNAME_FILE_NAME);
509  fileName->setValue(name);
510  parent->addChild(fileName);
511  ObjectState* fileType = new ObjectState(OSNAME_FILE_TYPE);
512  fileType->setValue(type);
513  parent->addChild(fileType);
514 }
515 
516 
517 void
519 
520  assert(root->name() == OSNAME_IPXACT_MODEL);
521  TCEString vendor = "";
522  TCEString library = "";
523  TCEString name = "";
524  TCEString version = "";
525  if (root->hasChild(OSNAME_VENDOR)) {
526  vendor = root->childByName(OSNAME_VENDOR)->stringValue();
527  }
528  if (root->hasChild(OSNAME_LIBRARY)) {
529  library = root->childByName(OSNAME_LIBRARY)->stringValue();
530  }
531  if (root->hasChild(OSNAME_NAME)) {
532  name = root->childByName(OSNAME_NAME)->stringValue();
533  }
534  if (root->hasChild(OSNAME_VERSION)) {
535  version = root->childByName(OSNAME_VERSION)->stringValue();
536  }
537  setVLNV(vendor, library, name, version);
538 }
539 
542 
543  assert(busType->name() == OSNAME_BUS_TYPE ||
544  busType->name() == OSNAME_BUS_ABS_TYPE);
545  IPXact::Vlnv vlnv;
546  if (busType->hasAttribute(OSNAME_VENDOR)) {
547  vlnv.vendor = busType->stringAttribute(OSNAME_VENDOR);
548  }
549  if (busType->hasAttribute(OSNAME_LIBRARY)) {
550  vlnv.library = busType->stringAttribute(OSNAME_LIBRARY);
551  }
552  if (busType->hasAttribute(OSNAME_NAME)) {
553  vlnv.name = busType->stringAttribute(OSNAME_NAME);
554  }
555  if (busType->hasAttribute(OSNAME_VERSION)) {
556  vlnv.version = busType->stringAttribute(OSNAME_VERSION);
557  }
558  return vlnv;
559 }
560 
561 void
563 
564  assert(busInterfaces->name() == OSNAME_BUS_INTERFACES);
565  if (!busInterfaces->hasChild(OSNAME_BUS_INTERFACE)) {
566  return;
567  }
568  for (int i = 0; i < busInterfaces->childCount(); i++) {
569  const ObjectState* bus = busInterfaces->child(i);
570  if (bus->name() == OSNAME_BUS_INTERFACE) {
571  extractBusInterface(bus);
572  }
573  }
574 }
575 
576 
577 void
579 
580  assert(busInterface->name() == OSNAME_BUS_INTERFACE);
581  if (!busInterface->hasChild(OSNAME_NAME)) {
582  TCEString msg = "Bus has no name";
584  new ObjectStateLoadingException(__FILE__, __LINE__,
585  "IPXactModel", msg);
586  throw exc;
587  }
588  if (!busInterface->hasChild(OSNAME_BUS_TYPE)) {
589  TCEString msg = "Bus has no type";
591  new ObjectStateLoadingException(__FILE__, __LINE__,
592  "IPXactModel", msg);
593  throw exc;
594  }
595  if (!busInterface->hasChild(OSNAME_BUS_ABS_TYPE)) {
596  TCEString msg = "Bus has no abstraction type";
598  new ObjectStateLoadingException(__FILE__, __LINE__,
599  "IPXactModel", msg);
600  throw exc;
601  }
602 
603  TCEString instanceName =
604  busInterface->childByName(OSNAME_NAME)->stringValue();
605  const ObjectState* busType =
606  busInterface->childByName(OSNAME_BUS_TYPE);
607  const ObjectState* busAbsType = busInterface->childByName(
609  IPXact::Vlnv type = extractVlnvFromAttr(busType);
610  IPXact::Vlnv absType = extractVlnvFromAttr(busAbsType);
611  BusMode mode = extractBusMode(busInterface);
612 
613  IPXactInterface* interface =
614  interfaceByType(type, absType, instanceName, mode);
615  if (!interface) {
616  TCEString msg = "Unknown bus type";
618  new ObjectStateLoadingException(__FILE__, __LINE__,
619  "IPXactModel", msg);
620  throw exc;
621  }
622 
623  if (busInterface->hasChild(OSNAME_BUS_PORT_MAPS)) {
624  const ObjectState* portMaps =
625  busInterface->childByName(OSNAME_BUS_PORT_MAPS);
626  extractPortMappings(portMaps, *interface);
627  }
628  busInterfaces_.push_back(interface);
629 }
630 
631 
632 void
634 
635  assert(addressSpaces->name() == OSNAME_ADDRESS_SPACES);
636  if (!addressSpaces->hasChild(OSNAME_ADDRESS_SPACE)) {
637  return;
638  }
639  for (int i = 0; i < addressSpaces->childCount(); i++) {
640  const ObjectState* as = addressSpaces->child(i);
641  if (as->name() == OSNAME_ADDRESS_SPACE) {
643  }
644  }
645 }
646 
647 
648 void
650 
651  assert(as->name() == OSNAME_ADDRESS_SPACE);
652  TCEString errorMsg = "Address space has no ";
653  if (!as->hasChild(OSNAME_NAME)) {
654  errorMsg << "name.";
657  __FILE__, __LINE__, "IPXactModel", errorMsg);
658  throw exc;
659  } else if (!as->hasChild(OSNAME_AS_RANGE)) {
660  errorMsg << "range.";
663  __FILE__, __LINE__, "IPXactModel", errorMsg);
664  throw exc;
665  } else if (!as->hasChild(OSNAME_AS_WIDTH)) {
666  errorMsg << "width.";
669  __FILE__, __LINE__, "IPXactModel", errorMsg);
670  throw exc;
671  }
673  int range = as->childByName(OSNAME_AS_RANGE)->intValue();
674  int width = as->childByName(OSNAME_AS_WIDTH)->intValue();
675  int mau = 0;
676  if (as->hasChild(OSNAME_AS_MAU)) {
677  mau = as->childByName(OSNAME_AS_WIDTH)->intValue();
678  }
679  IPXactAddressSpace* ipXactAs =
680  new IPXactAddressSpace(name, range, width, mau);
681  addressSpaces_.push_back(ipXactAs);
682 }
683 
684 
686 IPXactModel::extractBusMode(const ObjectState* busInterface) const {
687 
688  assert(busInterface->name() == OSNAME_BUS_INTERFACE);
689  BusMode mode = INVALID;
690  if (busInterface->hasChild(OSNAME_BUS_MASTER)) {
691  mode = MASTER;
692  } else if (busInterface->hasChild(OSNAME_BUS_MIRRORED_MASTER)) {
694  } else if (busInterface->hasChild(OSNAME_BUS_SLAVE)) {
695  mode = SLAVE;
696  } else if (busInterface->hasChild(OSNAME_BUS_MIRRORED_SLAVE)) {
698  } else if (busInterface->hasChild(OSNAME_BUS_SYSTEM)) {
699  mode = SYSTEM;
700  } else if (busInterface->hasChild(OSNAME_BUS_MIRRORED_SYSTEM)) {
702  } else if (busInterface->hasChild(OSNAME_BUS_MONITOR)) {
703  mode = MONITOR;
704  } else {
705  assert(false && "Unknown bus mode!");
706  }
707  assert(mode != INVALID && "Bus mode is invalid");
708  return mode;
709 }
710 
711 void
713  const ObjectState* portMaps,
714  IPXactInterface& interface) const {
715 
716  assert(portMaps->name() == OSNAME_BUS_PORT_MAPS);
717  if (!portMaps->hasChild(OSNAME_BUS_PORT_MAP)) {
718  return;
719  }
720  for (int i = 0; i < portMaps->childCount(); i++) {
721  const ObjectState* map = portMaps->child(i);
722  if (map->name() == OSNAME_BUS_PORT_MAP) {
723  extractPortMap(map, interface);
724  }
725  }
726 }
727 
728 void
730  const ObjectState* portMap,
731  IPXactInterface& interface) const {
732 
733  assert(portMap->name() == OSNAME_BUS_PORT_MAP);
734  if (!(portMap->hasChild(OSNAME_BUS_PORT_MAP_BUS) &&
735  portMap->hasChild(OSNAME_BUS_PORT_MAP_COMP))) {
736 
737  TCEString msg = "Bus interface port map is invalid";
739  new ObjectStateLoadingException(__FILE__, __LINE__,
740  "IPXactModel", msg);
741  throw exc;
742  }
743 
744  const ObjectState* busPort =
746  const ObjectState* compPort =
748  if (!busPort->hasChild(OSNAME_BUS_PORT_MAP_NAME) ||
749  !compPort->hasChild(OSNAME_BUS_PORT_MAP_NAME)) {
750 
751  TCEString msg = "Port name missing from port map";
753  new ObjectStateLoadingException(__FILE__, __LINE__,
754  "IPXactModel", msg);
755  throw exc;
756  }
757  TCEString compPortName =
759  TCEString busPortName =
761 
762  if (busPortName.empty() || compPortName.empty()) {
763  TCEString msg = "Port name is empty in port map";
765  new ObjectStateLoadingException(__FILE__, __LINE__,
766  "IPXactModel", msg);
767  throw exc;
768  }
769  interface.addSignalMapping(compPortName, busPortName);
770 }
771 
772 void
774 
775  assert(signals->name() == OSNAME_PORTS);
776 
777  for (int i = 0; i < signals->childCount(); i++) {
778  const ObjectState* signal = signals->child(i);
779  if (signal->name() != OSNAME_PORT) {
780  continue;
781  }
782 
783  TCEString name = "";
784  ProGe::Direction direction = ProGe::IN;
786  int width = 0;
787 
788  if (signal->hasChild(OSNAME_NAME)) {
789  name = signal->childByName(OSNAME_NAME)->stringValue();
790  }
791  if (!signal->hasChild(OSNAME_WIRE)) {
792  TCEString msg = "Wire node not found from Port!";
793  InvalidData exc(__FILE__, __LINE__, "IPXactModel", msg);
794  throw exc;
795  }
796  const ObjectState* wire = signal->childByName(OSNAME_WIRE);
797  if (wire->hasChild(OSNAME_PORT_DIRECTION)) {
798  TCEString dir =
800  if (dir == "in") {
801  direction = ProGe::IN;
802  } else if (dir == "out") {
803  direction = ProGe::OUT;
804  } else if (dir == "inout") {
805  direction = ProGe::BIDIR;
806  } else {
807  assert(false && "Unknown direction");
808  }
809  } else {
810  TCEString msg = "Port does not have direction!";
811  InvalidData exc(__FILE__, __LINE__, "IPXactModel", msg);
812  throw exc;
813  }
814 
815  if (wire->hasChild(OSNAME_VECTOR)) {
816  type = ProGe::BIT_VECTOR;
817  int leftBorder = 0;
818  int rightBorder = 0;
819  const ObjectState* vector = wire->childByName(OSNAME_VECTOR);
820  if (vector->hasChild(OSNAME_PORT_LEFT)) {
821  leftBorder =
823  assert(leftBorder >= 0);
824  }
825  if (vector->hasChild(OSNAME_PORT_RIGHT)) {
826  rightBorder =
828  assert(rightBorder >= 0);
829  }
830  if (leftBorder < rightBorder) {
831  TCEString msg = "Reversed bit order is not supported";
832  UnexpectedValue* exc =
833  new UnexpectedValue(__FILE__, __LINE__, "IPXactModel",
834  msg);
835  throw exc;
836  }
837  width = leftBorder - rightBorder + 1;
838  } else {
839  type = ProGe::BIT;
840  width = 0;
841  }
842 
843  TCEString widthFormula = Conversion::toString(width);
844  HDLPort* port = new HDLPort(name, widthFormula, type, direction,
845  false, width);
846  signals_.push_back(port);
847  }
848 }
849 
850 void
852 
853  assert(fileSets->name() == OSNAME_FILESETS);
854  for (int i = 0; i < fileSets->childCount(); i++) {
855  const ObjectState* fs = fileSets->child(i);
856  if (fs->name() != OSNAME_FILESET) {
857  continue;
858  }
859  if (!fs->hasChild(OSNAME_FILE_NAME)) {
860  TCEString msg = "Fileset has no name!";
861  InvalidData exc(__FILE__, __LINE__, "IPXactModel", msg);
862  throw exc;
863  }
865  if (fsName != HDL_SET_ID) {
866  // unknown stuff, ignore
867  continue;
868  }
869 
870  for (int j = 0; j < fs->childCount(); j++) {
871  const ObjectState* file = fs->child(j);
872  if (file->name() != OSNAME_FILE) {
873  continue;
874  }
875  TCEString fileName = "";
876  TCEString fileType = "";
877  if (file->hasChild(OSNAME_NAME)) {
878  fileName = file->childByName(OSNAME_NAME)->stringValue();
879  }
880  if (file->hasChild(OSNAME_FILE_TYPE)) {
881  fileType = file->childByName(OSNAME_FILE_TYPE)->stringValue();
882  }
883 
884  if (fileType == VHDL_FILE) {
885  hdlFiles_.push_back(fileName);
886  } else if (fileType == OTHER_FILE) {
887  otherFiles_.push_back(fileName);
888  } else {
889  // unknown file type, ignore
890  continue;
891  }
892  }
893  }
894 }
895 
896 
899  const IPXact::Vlnv& type,
900  const IPXact::Vlnv& absType,
901  const TCEString instanceName,
902  BusMode mode) const {
903 
904  IPXactInterface* interface = NULL;
905 
906  vector<IPXactInterface*> available;
907  available.push_back(new IPXactClkInterface());
908  available.push_back(new IPXactResetInterface());
909  available.push_back(new IPXactHibiInterface());
910 
911  bool found = false;
912  for (unsigned int i = 0; i < available.size(); i++) {
913  if (!found) {
914  if (available.at(i)->busType() == type &&
915  available.at(i)->busAbstractionType() == absType &&
916  available.at(i)->busMode() == mode) {
917  interface = available.at(i);
918  interface->setInstanceName(instanceName);
919  found = true;
920  continue;
921  }
922  }
923  delete available.at(i);
924  }
925  return interface;
926 }
927 
928 
929 void
931 
932  assert(modelParameters->name() == OSNAME_MODEL_PARAMS);
933  for (int i = 0; i < modelParameters->childCount(); i++) {
934  TCEString childName = modelParameters->child(i)->name();
935  if (childName == OSNAME_MODEL_PARAM) {
936  extractModelParam(modelParameters->child(i));
937  }
938  }
939 }
940 
941 void
943 
944  assert(modelParameter->name() == OSNAME_MODEL_PARAM);
945  if (!modelParameter->hasChild(OSNAME_NAME)) {
946  TCEString msg = "Model parameter has no name";
948  new ObjectStateLoadingException(__FILE__, __LINE__,
949  "IPXactModel", msg);
950  throw exc;
951  }
952  if (!modelParameter->hasChild(OSNAME_VALUE)) {
953  TCEString msg = "Model parameter has no value";
955  new ObjectStateLoadingException(__FILE__, __LINE__,
956  "IPXactModel", msg);
957  throw exc;
958  }
959  ProGe::Parameter parameter;
960  const ObjectState* nameObj = modelParameter->childByName(OSNAME_NAME);
961  parameter.setName(nameObj->stringValue());
962 
963  parameter.setType(STRING_PARAM);
964  if (nameObj->hasAttribute(OSNAME_ATTR_DATA_TYPE)) {
965  TCEString typeAttr =
967  if (typeAttr.lower() == STRING_PARAM) {
968  parameter.setType(STRING_PARAM);
969  } else if (typeAttr.lower() == LONG_PARAM) {
970  parameter.setType(INTEGER_PARAM);
971  }
972  }
973 
974  const ObjectState* valueObj = modelParameter->childByName(OSNAME_VALUE);
975  parameter.setValue(valueObj->stringValue());
976  parameters_.push_back(parameter);
977 }
IPXactModel::addressSpaces_
std::vector< IPXactAddressSpace * > addressSpaces_
Definition: IPXactModel.hh:205
IPXactModel::OSNAME_VECTOR
static const TCEString OSNAME_VECTOR
Definition: IPXactModel.hh:115
IPXactModel::SYSTEM
@ SYSTEM
Definition: IPXactModel.hh:56
IPXactInterface::instanceName
virtual TCEString instanceName() const
Definition: IPXactInterface.cc:49
ObjectState::hasAttribute
bool hasAttribute(const std::string &name) const
Definition: ObjectState.cc:205
IPXactModel::SLAVE
@ SLAVE
Definition: IPXactModel.hh:54
IPXactInterface::setInstanceName
void setInstanceName(const TCEString &name)
Definition: IPXactInterface.cc:89
IPXactClkInterface
Definition: IPXactClkInterface.hh:37
IPXactModel::OTHER_FILE
static const TCEString OTHER_FILE
Definition: IPXactModel.hh:212
TCEString::lower
TCEString lower() const
Definition: TCEString.cc:78
mode
mode
Definition: tceopgen.cc:45
ObjectState::stringAttribute
std::string stringAttribute(const std::string &name) const
Definition: ObjectState.cc:249
IPXactModel::extractAddressSpace
void extractAddressSpace(const ObjectState *as)
Definition: IPXactModel.cc:649
ProGe::Parameter::setValue
void setValue(const TCEString &value)
Definition: Parameter.cc:128
IPXactModel::OSNAME_BUS_INTERFACES
static const TCEString OSNAME_BUS_INTERFACES
Definition: IPXactModel.hh:96
IPXactAddressSpace.hh
IPXactAddressSpace::mauWidth
int mauWidth() const
Definition: IPXactAddressSpace.cc:69
IPXact::Vlnv
Definition: Vlnv.hh:41
IPXactModel::extractVlnvFromAttr
IPXact::Vlnv extractVlnvFromAttr(const ObjectState *busType) const
Definition: IPXactModel.cc:541
HDLPort
Definition: PlatformIntegrator/HDLPort.hh:48
IPXactModel::OSNAME_BUS_MASTER
static const TCEString OSNAME_BUS_MASTER
Definition: IPXactModel.hh:100
ProGe::BIT_VECTOR
@ BIT_VECTOR
Several bits.
Definition: ProGeTypes.hh:48
ObjectStateLoadingException
Definition: Exception.hh:551
IPXactInterface::addSignalMapping
virtual void addSignalMapping(const TCEString &actualSignal, const TCEString &busSignal)
Definition: IPXactInterface.cc:79
ObjectState::intValue
int intValue() const
PlatformIntegratorTypes.hh
IPXactModel::OSNAME_ADDRESS_SPACES
static const std::string OSNAME_ADDRESS_SPACES
Definition: IPXactModel.hh:125
IPXactAddressSpace::name
TCEString name() const
Definition: IPXactAddressSpace.cc:51
IPXactInterface::busMode
virtual IPXactModel::BusMode busMode() const
Definition: IPXactInterface.cc:66
IPXactModel::OSNAME_PORT_LEFT
static const TCEString OSNAME_PORT_LEFT
Definition: IPXactModel.hh:118
PlatInt::SignalMappingList
std::vector< SignalMapping * > SignalMappingList
Definition: PlatformIntegratorTypes.hh:44
IPXactModel::addSignalObject
void addSignalObject(const HDLPort *port, ObjectState *parent) const
Definition: IPXactModel.cc:406
IPXactModel::OSNAME_BUS_SLAVE
static const TCEString OSNAME_BUS_SLAVE
Definition: IPXactModel.hh:102
IPXactModel::OSNAME_LIBRARY
static const TCEString OSNAME_LIBRARY
Definition: IPXactModel.hh:93
IPXactModel::addFileObject
void addFileObject(const TCEString &name, const TCEString &type, ObjectState *parent) const
Definition: IPXactModel.cc:503
IPXactModel::extractBusMode
BusMode extractBusMode(const ObjectState *busInterface) const
Definition: IPXactModel.cc:686
IPXactModel::extractVLNV
void extractVLNV(const ObjectState *root)
Definition: IPXactModel.cc:518
IPXactModel::MIRRORED_MASTER
@ MIRRORED_MASTER
Definition: IPXactModel.hh:53
ObjectState
Definition: ObjectState.hh:59
IPXactModel::OSNAME_BUS_PORT_MAP_COMP
static const TCEString OSNAME_BUS_PORT_MAP_COMP
Definition: IPXactModel.hh:110
IPXactModel::OSNAME_FILESET
static const TCEString OSNAME_FILESET
Definition: IPXactModel.hh:121
ProGe::BIDIR
@ BIDIR
Bidirectional port.
Definition: ProGeTypes.hh:55
IPXactModel::~IPXactModel
virtual ~IPXactModel()
Definition: IPXactModel.cc:126
HDLPort::type
ProGe::DataType type() const
Definition: HDLPort.cc:117
IPXactModel::OSNAME_BUS_INTERFACE
static const TCEString OSNAME_BUS_INTERFACE
Definition: IPXactModel.hh:97
IPXactModel::OSNAME_BUS_MIRRORED_SYSTEM
static const TCEString OSNAME_BUS_MIRRORED_SYSTEM
Definition: IPXactModel.hh:105
IPXactModel::OSNAME_BUS_MONITOR
static const TCEString OSNAME_BUS_MONITOR
Definition: IPXactModel.hh:106
IPXactInterface::busAbstractionType
virtual IPXact::Vlnv busAbstractionType() const
Definition: IPXactInterface.cc:60
IPXactModel::extractPortMap
void extractPortMap(const ObjectState *portMap, IPXactInterface &interface) const
Definition: IPXactModel.cc:729
IPXactModel::OSNAME_FILE
static const TCEString OSNAME_FILE
Definition: IPXactModel.hh:122
IPXactClkInterface.hh
IPXactModel::addBusInterfaceObject
void addBusInterfaceObject(const IPXactInterface *bus, ObjectState *parent) const
Definition: IPXactModel.cc:314
IPXact::Vlnv::version
TCEString version
Entity version.
Definition: Vlnv.hh:62
Conversion::toString
static std::string toString(const T &source)
IPXactModel::signals_
std::vector< HDLPort * > signals_
Definition: IPXactModel.hh:199
IPXactInterface::busType
virtual IPXact::Vlnv busType() const
Definition: IPXactInterface.cc:54
IPXact::Vlnv::vendor
TCEString vendor
Vendor name.
Definition: Vlnv.hh:56
IPXactModel::HDL_SET_ID
static const TCEString HDL_SET_ID
Definition: IPXactModel.hh:210
IPXactModel::VHDL_FILE
static const TCEString VHDL_FILE
Definition: IPXactModel.hh:211
IPXactModel::RESOLVE_USER
static const TCEString RESOLVE_USER
Definition: IPXactModel.hh:213
ObjectState::childByName
ObjectState * childByName(const std::string &name) const
Definition: ObjectState.cc:443
IPXactHibiInterface
Definition: IPXactHibiInterface.hh:38
IPXactModel::INVALID
@ INVALID
Definition: IPXactModel.hh:51
IPXactModel::OSNAME_BUS_PORT_MAP_NAME
static const TCEString OSNAME_BUS_PORT_MAP_NAME
Definition: IPXactModel.hh:109
assert
#define assert(condition)
Definition: Application.hh:86
IPXactModel::OSNAME_BUS_PORT_MAPS
static const TCEString OSNAME_BUS_PORT_MAPS
Definition: IPXactModel.hh:107
IPXactModel::OSNAME_DISPLAY_NAME
static const TCEString OSNAME_DISPLAY_NAME
Definition: IPXactModel.hh:132
IPXact::Vlnv::library
TCEString library
Library name.
Definition: Vlnv.hh:58
IPXactModel::OSNAME_BUS_MIRRORED_SLAVE
static const TCEString OSNAME_BUS_MIRRORED_SLAVE
Definition: IPXactModel.hh:103
IPXactModel::otherFiles_
std::vector< TCEString > otherFiles_
Definition: IPXactModel.hh:208
IPXactModel::OSNAME_NAME
static const TCEString OSNAME_NAME
Definition: IPXactModel.hh:94
IPXactInterface
Definition: IPXactInterface.hh:41
InvalidData
Definition: Exception.hh:149
IPXactModel::BusMode
BusMode
Definition: IPXactModel.hh:50
UnexpectedValue
Definition: Exception.hh:455
IPXactModel::parameters_
std::vector< ProGe::Parameter > parameters_
Definition: IPXactModel.hh:201
IPXactModel::setHdlFile
void setHdlFile(const TCEString &file)
Definition: IPXactModel.cc:268
IPXactModel::interfaceByType
IPXactInterface * interfaceByType(const IPXact::Vlnv &type, const IPXact::Vlnv &absType, const TCEString instanceName, BusMode mode) const
Definition: IPXactModel.cc:898
IPXactResetInterface.hh
ProGe::Parameter::setName
void setName(const TCEString &name)
Definition: Parameter.cc:118
Conversion.hh
IPXactModel::OSNAME_ADDRESS_SPACE
static const std::string OSNAME_ADDRESS_SPACE
Definition: IPXactModel.hh:126
ProGe::Parameter
Definition: Parameter.hh:62
IPXactHibiInterface.hh
IPXactModel::OSNAME_MODEL_PARAMS
static const TCEString OSNAME_MODEL_PARAMS
Definition: IPXactModel.hh:130
IPXactModel::OSNAME_BUS_SYSTEM
static const TCEString OSNAME_BUS_SYSTEM
Definition: IPXactModel.hh:104
IPXactModel::OSNAME_PORT_RIGHT
static const TCEString OSNAME_PORT_RIGHT
Definition: IPXactModel.hh:119
IPXactModel::addAddressSpace
void addAddressSpace(IPXactAddressSpace *addrSpace)
Definition: IPXactModel.cc:307
IPXactModel::OSNAME_AS_MAU
static const std::string OSNAME_AS_MAU
Definition: IPXactModel.hh:129
IPXactModel::OSNAME_FILESETS
static const TCEString OSNAME_FILESETS
Definition: IPXactModel.hh:120
IPXactModel::OSNAME_FILE_NAME
static const TCEString OSNAME_FILE_NAME
Definition: IPXactModel.hh:123
IPXactModel::setFile
void setFile(const TCEString &file)
Definition: IPXactModel.cc:274
IPXactModel.hh
ObjectState.hh
IPXactModel::OSNAME_VENDOR
static const TCEString OSNAME_VENDOR
Definition: IPXactModel.hh:92
ObjectState::child
ObjectState * child(int index) const
Definition: ObjectState.cc:471
ObjectState::addChild
void addChild(ObjectState *child)
Definition: ObjectState.cc:376
IPXactAddressSpace
Definition: IPXactAddressSpace.hh:38
IPXactModel::OSNAME_BUS_ABS_TYPE
static const TCEString OSNAME_BUS_ABS_TYPE
Definition: IPXactModel.hh:99
ObjectState::childCount
int childCount() const
HDLPort::name
TCEString name() const
Definition: HDLPort.cc:87
HDLPort.hh
IPXactModel::OSNAME_PORTS
static const TCEString OSNAME_PORTS
Definition: IPXactModel.hh:113
IPXactModel::extractPortMappings
void extractPortMappings(const ObjectState *portMaps, IPXactInterface &interface) const
Definition: IPXactModel.cc:712
ProGe::BIT
@ BIT
One bit.
Definition: ProGeTypes.hh:47
IPXactModel::addParameter
void addParameter(const ProGe::Parameter &parameter)
Definition: IPXactModel.cc:296
ObjectState::hasChild
bool hasChild(const std::string &name) const
Definition: ObjectState.cc:358
IPXactModel::addModelParamsObject
void addModelParamsObject(ObjectState *parent) const
Definition: IPXactModel.cc:461
IPXactModel::IPXactModel
IPXactModel()
Definition: IPXactModel.cc:110
IPXactModel::LONG_PARAM
static const TCEString LONG_PARAM
Definition: IPXactModel.hh:216
IPXactModel::extractModelParams
void extractModelParams(const ObjectState *modelParameters)
Definition: IPXactModel.cc:930
IPXactModel::OSNAME_AS_RANGE
static const std::string OSNAME_AS_RANGE
Definition: IPXactModel.hh:127
IPXactModel::extractBusInterface
void extractBusInterface(const ObjectState *busInterface)
Definition: IPXactModel.cc:578
ObjectState::name
std::string name() const
IPXactModel::extractBusInterfaces
void extractBusInterfaces(const ObjectState *busInterfaces)
Definition: IPXactModel.cc:562
ProGe::OUT
@ OUT
Output port.
Definition: ProGeTypes.hh:54
IPXactModel::MIRRORED_SYSTEM
@ MIRRORED_SYSTEM
Definition: IPXactModel.hh:57
IPXactModel::OSNAME_WIRE
static const TCEString OSNAME_WIRE
Definition: IPXactModel.hh:114
IPXactModel::OSNAME_PORT_DIRECTION
static const TCEString OSNAME_PORT_DIRECTION
Definition: IPXactModel.hh:117
IPXactModel::OSNAME_BUS_MIRRORED_MASTER
static const TCEString OSNAME_BUS_MIRRORED_MASTER
Definition: IPXactModel.hh:101
HDLPort::direction
ProGe::Direction direction() const
Definition: HDLPort.cc:112
IPXactAddressSpace::memLocationWidth
int memLocationWidth() const
Definition: IPXactAddressSpace.cc:63
IPXactModel::busInterfaces_
std::vector< IPXactInterface * > busInterfaces_
Definition: IPXactModel.hh:203
IPXactModel::extractAddressSpaces
void extractAddressSpaces(const ObjectState *addressSpaces)
Definition: IPXactModel.cc:633
ProGe::Parameter::setType
void setType(const TCEString &type)
Definition: Parameter.cc:123
IPXactModel::setHdlFiles
void setHdlFiles(const std::vector< TCEString > &files)
Definition: IPXactModel.cc:281
IPXactModel::extractSignals
void extractSignals(const ObjectState *signals)
Definition: IPXactModel.cc:773
ProGe::DataType
DataType
Data types of hardware ports.
Definition: ProGeTypes.hh:46
IPXactModel::OSNAME_AS_WIDTH
static const std::string OSNAME_AS_WIDTH
Definition: IPXactModel.hh:128
IPXactModel::OSNAME_ATTR_FORMAT
static const TCEString OSNAME_ATTR_FORMAT
Definition: IPXactModel.hh:135
TCEString
Definition: TCEString.hh:53
IPXactInterface::interfaceMapping
virtual const PlatInt::SignalMappingList & interfaceMapping() const
Definition: IPXactInterface.cc:73
IPXactModel::OSNAME_BUS_TYPE
static const TCEString OSNAME_BUS_TYPE
Definition: IPXactModel.hh:98
IPXactModel::vlnv_
IPXact::Vlnv vlnv_
Definition: IPXactModel.hh:197
IPXactModel::MIRRORED_SLAVE
@ MIRRORED_SLAVE
Definition: IPXactModel.hh:55
ObjectState::stringValue
std::string stringValue() const
IPXactModel::extractModelParam
void extractModelParam(const ObjectState *modelParameter)
Definition: IPXactModel.cc:942
IPXactModel::OSNAME_MODEL
static const TCEString OSNAME_MODEL
Definition: IPXactModel.hh:112
IPXactModel::INTEGER_PARAM
static const TCEString INTEGER_PARAM
Definition: IPXactModel.hh:215
IPXactModel::OSNAME_BUS_PORT_MAP
static const TCEString OSNAME_BUS_PORT_MAP
Definition: IPXactModel.hh:108
IPXactModel::OSNAME_FILE_TYPE
static const TCEString OSNAME_FILE_TYPE
Definition: IPXactModel.hh:124
IPXactModel::MONITOR
@ MONITOR
Definition: IPXactModel.hh:58
IPXactModel::OSNAME_BUS_PORT_MAP_BUS
static const TCEString OSNAME_BUS_PORT_MAP_BUS
Definition: IPXactModel.hh:111
IPXactModel::extractFiles
void extractFiles(const ObjectState *fileSets)
Definition: IPXactModel.cc:851
HDLPort::hasRealWidth
bool hasRealWidth() const
Definition: HDLPort.cc:102
IPXactModel::OSNAME_ATTR_DATA_TYPE
static const TCEString OSNAME_ATTR_DATA_TYPE
Definition: IPXactModel.hh:134
IPXactModel::loadState
virtual void loadState(const ObjectState *state)
Definition: IPXactModel.cc:145
HDLPort::realWidth
int realWidth() const
Definition: HDLPort.cc:107
IPXactResetInterface
Definition: IPXactResetInterface.hh:37
IPXactModel::addBusInterface
void addBusInterface(IPXactInterface *interface)
Definition: IPXactModel.cc:301
IPXactModel::hdlFiles_
std::vector< TCEString > hdlFiles_
Definition: IPXactModel.hh:207
IPXactModel::addAddressSpaceObject
void addAddressSpaceObject(const IPXactAddressSpace *as, ObjectState *parent) const
Definition: IPXactModel.cc:381
IPXact::Vlnv::name
TCEString name
Entity name.
Definition: Vlnv.hh:60
IPXactModel::addSignal
void addSignal(const HDLPort &signal)
Definition: IPXactModel.cc:290
ProGe::Direction
Direction
Direction of the port.
Definition: ProGeTypes.hh:52
IPXactModel::STRING_PARAM
static const TCEString STRING_PARAM
Definition: IPXactModel.hh:214
IPXactModel::DEV_FAMILY_GENERIC
static const TCEString DEV_FAMILY_GENERIC
Definition: IPXactModel.hh:217
ObjectState::setValue
void setValue(const std::string &value)
IPXactModel::MASTER
@ MASTER
Definition: IPXactModel.hh:52
IPXactModel::OSNAME_ATTR_ID
static const TCEString OSNAME_ATTR_ID
Definition: IPXactModel.hh:136
IPXactModel::OSNAME_VALUE
static const TCEString OSNAME_VALUE
Definition: IPXactModel.hh:133
ProGe::IN
@ IN
Input port.
Definition: ProGeTypes.hh:53
IPXactAddressSpace::memRange
int memRange() const
Definition: IPXactAddressSpace.cc:57
IPXactModel::OSNAME_PORT
static const TCEString OSNAME_PORT
Definition: IPXactModel.hh:116
ObjectState::setAttribute
void setAttribute(const std::string &name, const std::string &value)
Definition: ObjectState.cc:100
IPXactModel::OSNAME_ATTR_RESOLVE
static const TCEString OSNAME_ATTR_RESOLVE
Definition: IPXactModel.hh:137
IPXactInterface.hh
IPXactModel::OSNAME_MODEL_PARAM
static const TCEString OSNAME_MODEL_PARAM
Definition: IPXactModel.hh:131
IPXactModel::OSNAME_IPXACT_MODEL
static const TCEString OSNAME_IPXACT_MODEL
Definition: IPXactModel.hh:91
IPXactModel::setVLNV
void setVLNV(TCEString vendor, TCEString library, TCEString name, TCEString version)
Definition: IPXactModel.cc:254
IPXactModel::saveState
virtual ObjectState * saveState() const
Definition: IPXactModel.cc:178
IPXactModel::OSNAME_VERSION
static const TCEString OSNAME_VERSION
Definition: IPXactModel.hh:95