OpenASIP  2.0
Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
ADFCombiner Class Reference
Inheritance diagram for ADFCombiner:
Inheritance graph
Collaboration diagram for ADFCombiner:
Collaboration graph

Private Types

typedef std::vector< TTAMachine::Bus * > BusVector
 
typedef std::set< TTAMachine::Guard *, TTAMachine::MachinePart::ComparatorGuardSet
 

Private Member Functions

 PLUGIN_DESCRIPTION ("Explorer plugin that produces a clustered machine with N lanes/nodes " "and an 'extras' node.")
 
 ADFCombiner ()
 
virtual bool requiresStartingPointArchitecture () const
 
virtual bool producesArchitecture () const
 
virtual bool requiresHDB () const
 
virtual bool requiresSimulationData () const
 
virtual bool requiresApplication () const
 
virtual std::vector< RowIDexplore (const RowID &, const unsigned int &)
 
void readParameters ()
 
GuardSet findGuards (TTAMachine::Machine *mach)
 
void addComponents (TTAMachine::Machine *finalMach, TTAMachine::Machine *nodeMach, TTAMachine::Machine *extraMach, unsigned nodeCount)
 
TCEString nodeNamePrefix (int nodeId)
 
void addAllGuardsToConnectionBuses (TTAMachine::Machine *finalMach, const BusVector &connectionBuses)
 
void addGuardsToBuses (std::map< Bus *, std::pair< Bus *, int > > &busMapping, GuardSet &extrasGuards)
 
void addBuses (TTAMachine::Machine *finalMach, TTAMachine::Machine *nodeMach, unsigned nodeCount, std::map< Bus *, std::pair< Bus *, int > > &busMapping)
 
void addRegisterFiles (TTAMachine::Machine *finalMach, TTAMachine::Machine *nodeMach, unsigned nodeCount)
 
void addFunctionUnits (TTAMachine::Machine *finalMach, TTAMachine::Machine *nodeMach, unsigned nodeCount)
 
void connectPorts (TTAMachine::Machine *finalMach, TTAMachine::Unit *original, TTAMachine::Unit *newUnit, int count)
 
void addAddressSpaces (TTAMachine::Machine *finalMach, TTAMachine::Machine *nodeMach)
 
void connectRegisterFiles (TTAMachine::Machine *finalMach, TTAMachine::Machine *nodeMach, TTAMachine::Machine *extraMach, unsigned nodeCount, std::set< TTAMachine::Guard *, TTAMachine::MachinePart::Comparator > extrasGuards, BusVector &connectionBuses)
 
TTAMachine::BuscreateBus (TTAMachine::Machine *finalMach, TCEString busName, int width)
 
void createPortsAndSockets (TTAMachine::Machine *finalMach, TTAMachine::RegisterFile *rf, TTAMachine::Bus *newBus, TCEString name, bool readOnly, int nodeNumber=-1)
 
bool connectVectorLSU (TTAMachine::Machine *finalMach, TTAMachine::Machine *nodeMach, TTAMachine::Machine *extraMach, int nodeCount)
 
void renameExtraUnits (TTAMachine::Machine *finalMach)
 
TCEString getNodeComponentName (TCEString originalName, int idx)
 
TCEString getExtraComponentName (TCEString originalName)
 
void copyGuards (TTAMachine::Bus &originalBus, TTAMachine::Bus &addBus, const TCEString &prefix)
 

Private Attributes

ComponentImplementationSelector selector_
 Selector used by the plugin. More...
 
TCEString node_
 
int nodeCount_
 
TCEString extra_
 
bool buildIDF_
 
bool vectorLSU_
 
TCEString addressSpaces_
 
bool addBroadcast_
 
bool addRing_
 
bool addBar_
 
bool addStar_
 
int nodesPerBus_
 
bool reuseRFPorts_
 
int sharedLSULatency_
 
int dataLSULatency_
 
int VLSUConnectionBuses_
 

Static Private Attributes

static const TCEString NodePN_
 
static const TCEString NodeCountPN_
 
static const TCEString ExtraPN_
 
static const TCEString BuildIDFPN_
 
static const TCEString VectorLSUPN_
 
static const TCEString AddressSpacesPN_
 
static const TCEString AddBroadcastPN_
 
static const TCEString AddRingConnectionPN_
 
static const TCEString AddBarConnectionPN_
 
static const TCEString AddStarConnectionPN_
 
static const TCEString NodesPerBusPN_
 
static const TCEString ReuseRFPortsPN_
 
static const TCEString SharedLSULatencyPN_
 
static const TCEString DataLSULatencyPN_
 
static const TCEString VLSUConnectionBusesPN_
 

Additional Inherited Members

- Public Types inherited from DesignSpaceExplorerPlugin
typedef std::pair< std::string, ExplorerPluginParameterParameter
 
typedef std::map< std::string, ExplorerPluginParameterParameterMap
 
typedef std::map< std::string, ExplorerPluginParameter >::iterator PMIt
 
typedef std::map< std::string, ExplorerPluginParameter >::const_iterator PMCIt
 
- Public Member Functions inherited from DesignSpaceExplorerPlugin
virtual std::string description () const
 
void addParameter (TCEString name, ExplorerPluginParameterType type, bool compulsory=true, TCEString defaultValue="", TCEString description="")
 
template<typename T >
void readCompulsoryParameter (const std::string paramName, T &param) const
 
template<typename T >
void readOptionalParameter (const std::string paramName, T &param) const
 
template<typename RT >
RT parameterValue (const std::string &paramName) const
 
virtual ~DesignSpaceExplorerPlugin ()
 
virtual void giveParameter (const std::string &name, const std::string &value)
 
virtual std::string name () const
 
virtual void setPluginName (const std::string &pluginName)
 
virtual bool hasParameter (const std::string &paramName) const
 
ParameterMap parameters () const
 
virtual bool booleanValue (const std::string &parameter) const
 
- Public Member Functions inherited from DesignSpaceExplorer
 DesignSpaceExplorer ()
 
virtual ~DesignSpaceExplorer ()
 
virtual void setDSDB (DSDBManager &dsdb)
 
virtual bool evaluate (const DSDBManager::MachineConfiguration &configuration, CostEstimates &results=dummyEstimate_, bool estimate=false)
 
virtual DSDBManagerdb ()
 
std::vector< DesignSpaceExplorerPlugin * > getPlugins ()
 
RowID createImplementationAndStore (const DSDBManager::MachineConfiguration &conf, const double &frequency=0.0, const double &maxArea=0.0, const bool &createEstimates=true, const std::string &icDec="DefaultICDecoder", const std::string &icDecHDB="asic_130nm_1.5V.hdb")
 
bool createImplementation (const DSDBManager::MachineConfiguration &conf, DSDBManager::MachineConfiguration &newConf, const double &frequency=0.0, const double &maxArea=0.0, const bool &createEstimates=true, const std::string &icDec="DefaultICDecoder", const std::string &icDecHDB="asic_130nm_1.5V.hdb")
 
IDF::MachineImplementationselectComponents (const TTAMachine::Machine &mach, const double &frequency=0.0, const double &maxArea=0.0, const std::string &icDec="DefaultICDecoder", const std::string &icDecHDB="asic_130nm_1.5V.hdb") const
 
void createEstimateData (const TTAMachine::Machine &mach, const IDF::MachineImplementation &idf, CostEstimator::AreaInGates &area, CostEstimator::DelayInNanoSeconds &longestPathDelay)
 
RowID addConfToDSDB (const DSDBManager::MachineConfiguration &conf)
 
- Static Public Member Functions inherited from DesignSpaceExplorer
static DesignSpaceExplorerPluginloadExplorerPlugin (const std::string &pluginName, DSDBManager *dsdb=NULL)
 
- Protected Member Functions inherited from DesignSpaceExplorerPlugin
 DesignSpaceExplorerPlugin ()
 
void checkParameters () const
 
- Protected Member Functions inherited from DesignSpaceExplorer
TTAProgram::Programschedule (const std::string applicationFile, TTAMachine::Machine &machine, TCEString paramOptions="-O3")
 
const ExecutionTracesimulate (const TTAProgram::Program &program, const TTAMachine::Machine &machine, const TestApplication &testApplication, const ClockCycleCount &maxCycles, ClockCycleCount &runnedCycles, const bool tracing, const bool useCompiledSimulation=false, std::vector< ClockCycleCount > *executionCounts=NULL)
 
- Protected Attributes inherited from DesignSpaceExplorerPlugin
std::string pluginName_
 the name of the explorer plugin More...
 
ParameterMap parameters_
 Parameters for the plugin. More...
 

Detailed Description

Explorer plugin that adds machine components to a given machine.

Definition at line 60 of file ADFCombiner.cc.

Member Typedef Documentation

◆ BusVector

typedef std::vector<TTAMachine::Bus*> ADFCombiner::BusVector
private

Definition at line 297 of file ADFCombiner.cc.

◆ GuardSet

Definition at line 299 of file ADFCombiner.cc.

Constructor & Destructor Documentation

◆ ADFCombiner()

ADFCombiner::ADFCombiner ( )
inlineprivate

Definition at line 65 of file ADFCombiner.cc.

66  node_("node.adf"),
67  nodeCount_(4),
68  extra_(""),
69  buildIDF_(false),
70  vectorLSU_(false),
71  addressSpaces_("data"),
72  addBroadcast_(false),
73  addRing_(false),
74  addBar_(false),
75  addStar_(true),
76  nodesPerBus_(1),
77  reuseRFPorts_(true),
79  dataLSULatency_(3),
81 
82  // compulsory parameters
83  // no compulsory parameters
84 
85  // parameters that have a default value
86  addParameter(NodePN_, STRING, false, node_);
93 
94 
107 
108  addParameter(
110  addParameter(
112  addParameter(
114 
115 
116  }

References BOOL, STRING, Conversion::toString(), and UINT.

Here is the call graph for this function:

Member Function Documentation

◆ addAddressSpaces()

void ADFCombiner::addAddressSpaces ( TTAMachine::Machine finalMach,
TTAMachine::Machine nodeMach 
)
inlineprivate

Adds address spaces from node machine to final one, if missing. Address spaces from extra machine are already in final.

Returns
void

Definition at line 621 of file ADFCombiner.cc.

623  {
624 
626  nodeMach->addressSpaceNavigator();
627  for (int i = 0; i < ANav.count(); i++) {
628  TTAMachine::AddressSpace* origA = ANav.item(i);
629  if (!finalMach->addressSpaceNavigator().hasItem(origA->name())) {
630  ObjectState* origState = origA->saveState();
631  // Creating address space registers it.
632  TTAMachine::AddressSpace* aSpace =
633  new TTAMachine::AddressSpace(origState, *finalMach);
634  assert(
635  finalMach->addressSpaceNavigator().hasItem(aSpace->name()));
636  }
637  }
638  }

References TTAMachine::Machine::addressSpaceNavigator(), assert, TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Machine::Navigator< ComponentType >::hasItem(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Component::name(), and TTAMachine::AddressSpace::saveState().

Here is the call graph for this function:

◆ addAllGuardsToConnectionBuses()

void ADFCombiner::addAllGuardsToConnectionBuses ( TTAMachine::Machine finalMach,
const BusVector connectionBuses 
)
inlineprivate

Definition at line 361 of file ADFCombiner.cc.

363  {
364  for (BusVector::const_iterator i = connectionBuses.begin();
365  i != connectionBuses.end(); ++i) {
366  const TTAMachine::Machine::BusNavigator& busNav =
367  finalMach->busNavigator();
368  Bus* connectionBus = *i;
369  for (int b = 0; b < busNav.count(); b++) {
370  Bus* origBus = busNav.item(b);
371  origBus->copyGuardsTo(*connectionBus);
372  }
373  }
374 
375  }

References TTAMachine::Machine::busNavigator(), TTAMachine::Bus::copyGuardsTo(), TTAMachine::Machine::Navigator< ComponentType >::count(), and TTAMachine::Machine::Navigator< ComponentType >::item().

Here is the call graph for this function:

◆ addBuses()

void ADFCombiner::addBuses ( TTAMachine::Machine finalMach,
TTAMachine::Machine nodeMach,
unsigned  nodeCount,
std::map< Bus *, std::pair< Bus *, int > > &  busMapping 
)
inlineprivate

Adds buses and sockets to the machine.

Definition at line 399 of file ADFCombiner.cc.

403  {
404  const Machine::SocketNavigator socketNav = nodeMach->socketNavigator();
405  const TTAMachine::Machine::BusNavigator& busNav =
406  nodeMach->busNavigator();
407 
408  for (unsigned j = 0; j < nodeCount; j++) {
409  bool socketsCreated = false;
410  // Add busses
411  for (int i = 0; i < busNav.count(); i++) {
412  TTAMachine::Bus* addBus = busNav.item(i)->copy();
413  TTAMachine::Bus* originalBus = busNav.item(i);
414  busMapping[addBus] = std::pair<Bus*,int>(originalBus, j);
415 
416  TCEString busName =
417  originalBus->name() + "_connect_" + Conversion::toString(j);
418  addBus->setName(busName);
419  try {
420  finalMach->addBus(*addBus);
421  } catch (const ComponentAlreadyExists& e) {
422  TCEString msg = "ADFCombiner: Tried to add Bus with an "
423  "already existing name (" + busName + ")";
424  throw Exception(
425  __FILE__, __LINE__, __func__, msg);
426  }
427 
428  for (int k = 0; k < socketNav.count(); k++) {
429  TTAMachine::Socket* addSocket = NULL;
430  if (socketNav.item(k)->portCount() == 0) {
431  // Don't bother copying sockets that are not connected
432  // to any ports.
433  continue;
434  }
435  // When first bus added, create also new sockets
436  if (!socketsCreated) {
437  TCEString socketName =
438  getNodeComponentName(socketNav.item(k)->name(), j);
439  addSocket = new TTAMachine::Socket(socketName);
440  try {
441  finalMach->addSocket(*addSocket);
442  } catch (const ComponentAlreadyExists& e) {
443  TCEString msg = "ADFCombiner: Tried to add Socket with "
444  " an already existing name (" + socketName +")";
445  throw Exception(
446  __FILE__, __LINE__, __func__, msg);
447  }
448  } else {
449  // Sockets were create for first bus already, just pick
450  // them based on their known generated names.
451  TCEString socketName =
452  getNodeComponentName(socketNav.item(k)->name(), j);
453  addSocket =
454  finalMach->socketNavigator().item(socketName);
455  }
456  // Connect sockets to bus
457  for (int l = 0; l < originalBus->segmentCount(); l++) {
458  if (socketNav.item(k)->isConnectedTo(
459  *originalBus->segment(l))) {
460  addSocket->attachBus(*addBus->segment(l));
461  addSocket->setDirection(
462  socketNav.item(k)->direction());
463  }
464  }
465  }
466  socketsCreated = true;
467  }
468  }
469  }

References __func__, TTAMachine::Machine::addBus(), TTAMachine::Machine::addSocket(), TTAMachine::Socket::attachBus(), TTAMachine::Machine::busNavigator(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Component::name(), TTAMachine::Bus::segment(), TTAMachine::Bus::segmentCount(), TTAMachine::Socket::setDirection(), TTAMachine::Bus::setName(), TTAMachine::Machine::socketNavigator(), and Conversion::toString().

Here is the call graph for this function:

◆ addComponents()

void ADFCombiner::addComponents ( TTAMachine::Machine finalMach,
TTAMachine::Machine nodeMach,
TTAMachine::Machine extraMach,
unsigned  nodeCount 
)
inlineprivate

Copies node.adf to the final machine nodeCount times.

Returns
The initial machine of NULL if an error occurred.

Definition at line 320 of file ADFCombiner.cc.

324  {
325 
326  std::map<Bus*, std::pair<Bus*, int> > busMapping;
327  // Order is important here!
328  // When adding busses also socket will be created
329  // and the RF and FU ports will be connected to them when adding.
330 
331  // find guards that have come from extras
332  GuardSet extrasGuards = findGuards(finalMach);
333 
334  renameExtraUnits(finalMach);
335  addAddressSpaces(finalMach, nodeMach);
336  if (extraMach != NULL)
337  addAddressSpaces(finalMach, extraMach);
338  addBuses(finalMach, nodeMach, nodeCount, busMapping);
339  addRegisterFiles(finalMach, nodeMach, nodeCount);
340  addFunctionUnits(finalMach, nodeMach, nodeCount);
341 
342  BusVector connectionBuses;
344  finalMach, nodeMach, extraMach, nodeCount, extrasGuards,
345  connectionBuses);
346  addGuardsToBuses(busMapping, extrasGuards);
347 
348  /* For the node-only machine, copy the guards from the nodes to the
349  connection buses to enable predicated inter-node moves. */
350  if (extra_ == "")
351  addAllGuardsToConnectionBuses(finalMach, connectionBuses);
352  }

◆ addFunctionUnits()

void ADFCombiner::addFunctionUnits ( TTAMachine::Machine finalMach,
TTAMachine::Machine nodeMach,
unsigned  nodeCount 
)
inlineprivate

Adds function unit(s) to the machine

Returns
void

Definition at line 511 of file ADFCombiner.cc.

513  {
515  nodeMach->functionUnitNavigator();
516  for (unsigned j = 0; j < nodeCount; j++) {
517  for (int i = 0; i < FUNav.count(); i++) {
518  TTAMachine::FunctionUnit* addFU = FUNav.item(i)->copy();
519  TTAMachine::FunctionUnit* originalFU = FUNav.item(i);
520  TCEString FUName =
521  getNodeComponentName(FUNav.item(i)->name(), j);
522  addFU->setName(FUName);
523  try {
524  finalMach->addFunctionUnit(*addFU);
525  } catch (const ComponentAlreadyExists& e) {
526  TCEString msg =
527  "ADFCombiner: Tried to add FU with an already"
528  "existing name (" + FUName +")";
529  throw Exception(
530  __FILE__, __LINE__, __func__, msg);
531  }
532  if (originalFU->hasAddressSpace()) {
533  TCEString aName = originalFU->addressSpace()->name();
535  finalMach->addressSpaceNavigator();
536  assert(aNav.hasItem(aName));
537  addFU->setAddressSpace(aNav.item(aName));
538  }
539  connectPorts(finalMach, originalFU, addFU, j);
540  }
541  }
542 
543  if (extra_ == "") {
544  TTAMachine::ControlUnit *originalCU = nodeMach->controlUnit();
545  TTAMachine::ControlUnit *copyCU = originalCU->copy();
546  finalMach->setGlobalControl(*copyCU);
547  if (originalCU->hasAddressSpace()) {
548  TCEString aName = originalCU->addressSpace()->name();
550  finalMach->addressSpaceNavigator();
551  assert(aNav.hasItem(aName));
552  copyCU->setAddressSpace(aNav.item(aName));
553 
554  // Connect the CU to all node 0 buses for now.
555  // @todo remove the connections not to RFs and
556  // ensure the buses are guarded
557  FullyConnectedCheck conn;
558  conn.connectControlUnit(*copyCU);
559  }
560 
561  }
562  }

References __func__, TTAMachine::Machine::addFunctionUnit(), TTAMachine::FunctionUnit::addressSpace(), TTAMachine::Machine::addressSpaceNavigator(), assert, FullyConnectedCheck::connectControlUnit(), TTAMachine::Machine::controlUnit(), TTAMachine::ControlUnit::copy(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Machine::functionUnitNavigator(), TTAMachine::FunctionUnit::hasAddressSpace(), TTAMachine::Machine::Navigator< ComponentType >::hasItem(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Component::name(), TTAMachine::FunctionUnit::setAddressSpace(), TTAMachine::Machine::setGlobalControl(), and TTAMachine::FunctionUnit::setName().

Here is the call graph for this function:

◆ addGuardsToBuses()

void ADFCombiner::addGuardsToBuses ( std::map< Bus *, std::pair< Bus *, int > > &  busMapping,
GuardSet extrasGuards 
)
inlineprivate

Definition at line 378 of file ADFCombiner.cc.

379  {
380  for (std::map<Bus*, std::pair<Bus*, int> >::iterator i =
381  busMapping.begin(); i != busMapping.end(); i++) {
382 
383  copyGuards(*(i->second.first), *(i->first), nodeNamePrefix(i->second.second));
384 
385  for (GuardSet::iterator j = extrasGuards.begin();
386  j != extrasGuards.end(); j++) {
387  if (!i->first->hasGuard(**j)) {
388  (*j)->copyTo(*i->first);
389  }
390  }
391  }
392  }

◆ addRegisterFiles()

void ADFCombiner::addRegisterFiles ( TTAMachine::Machine finalMach,
TTAMachine::Machine nodeMach,
unsigned  nodeCount 
)
inlineprivate

Adds register file(s) to the machine

Returns
void

Definition at line 478 of file ADFCombiner.cc.

480  {
481 
483  nodeMach->registerFileNavigator();
484  for (unsigned j = 0; j < nodeCount; j++) {
485  for (int i = 0; i < RFNav.count(); i++) {
486  TTAMachine::RegisterFile* addRF = RFNav.item(i)->copy();
487  TTAMachine::RegisterFile* originalRF = RFNav.item(i);
488  TCEString RFName =
489  getNodeComponentName(RFNav.item(i)->name(), j);
490  addRF->setName(RFName);
491  try {
492  finalMach->addRegisterFile(*addRF);
493  } catch (const ComponentAlreadyExists& e) {
494  TCEString msg =
495  "ADFCombiner: Tried to add RF with an already"
496  "existing name (" + RFName +")";
497  throw Exception(
498  __FILE__, __LINE__, __func__, msg);
499  }
500  connectPorts(finalMach, originalRF, addRF, j);
501  }
502  }
503  }

References __func__, TTAMachine::Machine::addRegisterFile(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Machine::registerFileNavigator(), and TTAMachine::RegisterFile::setName().

Here is the call graph for this function:

◆ connectPorts()

void ADFCombiner::connectPorts ( TTAMachine::Machine finalMach,
TTAMachine::Unit original,
TTAMachine::Unit newUnit,
int  count 
)
inlineprivate

Connect unit ports to sockets.

Returns
void

Definition at line 571 of file ADFCombiner.cc.

575  {
576 
577  for (int k = 0; k < original->portCount(); k++) {
578  TTAMachine::Port* port = original->port(k);
579  TTAMachine::Socket* socket = port->inputSocket();
580  if (socket != NULL) {
581  TCEString socketName =
582  getNodeComponentName(socket->name(), count);
583  TTAMachine::Socket* newSocket =
584  finalMach->socketNavigator().item(socketName);
585  newUnit->port(k)->attachSocket(*newSocket);
586  }
587  socket = port->outputSocket();
588  if (socket != NULL) {
589  TCEString socketName =
590  getNodeComponentName(socket->name(), count);
591  TTAMachine::Socket* newSocket =
592  finalMach->socketNavigator().item(socketName);
593  newUnit->port(k)->attachSocket(*newSocket);
594  }
595  socket = port->unconnectedSocket(0);
596  if (socket != NULL) {
597  TCEString socketName =
598  getNodeComponentName(socket->name(), count);
599  TTAMachine::Socket* newSocket =
600  finalMach->socketNavigator().item(socketName);
601  newUnit->port(k)->attachSocket(*newSocket);
602  }
603  socket = port->unconnectedSocket(1);
604  if (socket != NULL) {
605  TCEString socketName =
606  getNodeComponentName(socket->name(), count);
607  TTAMachine::Socket* newSocket =
608  finalMach->socketNavigator().item(socketName);
609  newUnit->port(k)->attachSocket(*newSocket);
610  }
611  }
612  }

References TTAMachine::Port::attachSocket(), TTAMachine::Port::inputSocket(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Component::name(), TTAMachine::Port::outputSocket(), TTAMachine::Unit::port(), TTAMachine::Unit::portCount(), TTAMachine::Machine::socketNavigator(), and TTAMachine::Port::unconnectedSocket().

Here is the call graph for this function:

◆ connectRegisterFiles()

void ADFCombiner::connectRegisterFiles ( TTAMachine::Machine finalMach,
TTAMachine::Machine nodeMach,
TTAMachine::Machine extraMach,
unsigned  nodeCount,
std::set< TTAMachine::Guard *, TTAMachine::MachinePart::Comparator extrasGuards,
BusVector connectionBuses 
)
inlineprivate

Connect register files from extra and node into a ring, star or bar.

Definition at line 645 of file ADFCombiner.cc.

652  {
653 
655  nodeMach->registerFileNavigator();
657  finalMach->registerFileNavigator();
658 
660  finalMach->immediateUnitNavigator();
661 
662  const TTAMachine::Machine::BusNavigator& busNav =
663  finalMach->busNavigator();
664  if (addRing_) {
665  for (int i = 0; i < nodeNav.count(); i++) {
666  TCEString rfName = nodeNav.item(i)->name();
667  // Connect register file between neighbouring node
668  for (unsigned int j = 0; j < nodeCount -1; j++) {
669  TCEString firstName = getNodeComponentName(rfName, j);
670  TCEString secondName = getNodeComponentName(rfName, j+1);
671  TTAMachine::RegisterFile* firstRF = finalNav.item(firstName);
672  TTAMachine::RegisterFile* secondRF = finalNav.item(secondName);
673 
674  TCEString busName = "connect_"
675  + Conversion::toString(j) +
676  "_" + Conversion::toString(j + 1);
677  int width = std::max(firstRF->width(), secondRF->width());
678  TTAMachine::Bus* newBus = NULL;
679 
680  if (busNav.hasItem(busName)) {
681  newBus = busNav.item(busName);
682  } else {
683  newBus = createBus(finalMach, busName, width);
684  }
685  connectionBuses.push_back(newBus);
686 
687  // Copy guards from extras to neighbour connection buses.
688  for (GuardSet::iterator k = extrasGuards.begin();
689  k != extrasGuards.end(); k++) {
690  if (!newBus->hasGuard(**k)) {
691  (*k)->copyTo(*newBus);
692  }
693  }
695  finalMach, firstRF, newBus, firstName, false);
697  finalMach, secondRF, newBus, secondName, false);
698  }
699 
700  // A clustered machine without an extras node.
701  if (extraMach == NULL) continue;
702 
704  extraMach->registerFileNavigator();
705 
706  // Add connections between RF in extra.adf with first and
707  // last of the multiplied nodes
708  TCEString firstName = getNodeComponentName(rfName, 0);
709  TCEString lastName = getNodeComponentName(rfName, nodeCount -1);
710  TTAMachine::RegisterFile* firstRF = finalNav.item(firstName);
711  TTAMachine::RegisterFile* lastRF = finalNav.item(lastName);
712 
713  for (int k = 0; k < extraNav.count(); k++) {
714  TCEString newName =
715  getExtraComponentName(extraNav.item(k)->name());
716  TTAMachine::RegisterFile* extraRF = finalNav.item(newName);
717  if (extraRF->width() != firstRF->width()) {
718  continue;
719  }
720  TCEString extraName = extraRF->name();
721  int width = std::max(firstRF->width(), extraRF->width());
722  TCEString busName = "connect_extra_first";
723  TTAMachine::Bus* newBus = NULL;
724  if (busNav.hasItem(busName)) {
725  newBus = busNav.item(busName);
726  } else {
727  newBus = createBus(finalMach, busName, width);
728  }
729  for (GuardSet::iterator j = extrasGuards.begin();
730  j != extrasGuards.end(); j++) {
731  if (!newBus->hasGuard(**j)) {
732  (*j)->copyTo(*newBus);
733  }
734  }
736  finalMach, firstRF, newBus, firstName, false);
738  finalMach, extraRF, newBus, extraName, false);
739  // In case we only one node, there is no need to bidirectional
740  // connection
741  if (firstName != lastName) {
742  width = std::max(lastRF->width(), extraRF->width());
743  busName = "connect_extra_last";
744  if (busNav.hasItem(busName)) {
745  newBus = busNav.item(busName);
746  } else {
747  newBus = createBus(finalMach, busName, width);
748  }
749  for (GuardSet::iterator j = extrasGuards.begin();
750  j != extrasGuards.end(); j++) {
751  if (!newBus->hasGuard(**j)) {
752  (*j)->copyTo(*newBus);
753  }
754  }
756  finalMach, lastRF, newBus, lastName, false);
758  finalMach, extraRF, newBus, extraName, false);
759  }
760  }
761  }
762  }
763  if (addBar_) {
764  int busCount = nodeCount;
765  for (int i = 0; i < busCount; i++) {
766  TCEString busName =
767  "connect_all_" + Conversion::toString(i);
768 
769  TTAMachine::Bus* newBus = createBus(finalMach, busName, 32);
770  connectionBuses.push_back(newBus);
771 
772  for (int i = 0; i < nodeNav.count(); i++) {
773  // Pick all register files in node, one by one
774  TCEString rfName = nodeNav.item(i)->name();
775  for (unsigned int j = 0; j < nodeCount; j++) {
776  // connect register file from all node to the
777  // bus
778  TCEString nodeName =
779  getNodeComponentName(rfName, j);
780  TTAMachine::RegisterFile* nodeRF =
781  finalNav.item(nodeName);
783  finalMach, nodeRF, newBus, nodeName, false);
784  }
785  }
786 
787  if (extraMach == NULL) continue;
788 
790  extraMach->registerFileNavigator();
791 
792  for (int k = 0; k < extraNav.count(); k++) {
793  TCEString newName =
794  getExtraComponentName(extraNav.item(k)->name());
795  TTAMachine::RegisterFile* extraRF = finalNav.item(newName);
796  TCEString extraName = extraRF->name();
797  int width = extraRF->width();
798  if (width == 1)
799  continue;
800 
801  createPortsAndSockets(finalMach, extraRF, newBus, extraName, false);
802  for (GuardSet::iterator j = extrasGuards.begin();
803  j != extrasGuards.end(); j++) {
804  if (!newBus->hasGuard(**j)) {
805  (*j)->copyTo(*newBus);
806  }
807  }
808  }
809 
811  extraMach->immediateUnitNavigator();
812 
813 
814  for (int k = 0; k < extraImmNav.count(); k++) {
815  TCEString newName =
816  getExtraComponentName(extraImmNav.item(k)->name());
817  TTAMachine::ImmediateUnit* extraImm = finalImmNav.item(newName);
818  TCEString extraName = extraImm->name();
819  int width = extraImm->width();
820  if (width == 1)
821  continue;
822 
824  finalMach, extraImm, newBus, extraName, true);
825  for (GuardSet::iterator j = extrasGuards.begin();
826  j != extrasGuards.end(); j++) {
827  if (!newBus->hasGuard(**j)) {
828  (*j)->copyTo(*newBus);
829  }
830  }
831  }
832  }
833  }
834  if (addStar_) {
835  if (extraMach != NULL) {
837  extraMach->registerFileNavigator();
838 
839  for (unsigned int i = 0; i*nodesPerBus_ < nodeCount; i++) {
840  TCEString busName =
841  "star_" + Conversion::toString(i);
842  TTAMachine::Bus* newBus =
843  createBus(finalMach, busName, 32);
844  connectionBuses.push_back(newBus);
845  // Connect RFs in extra to the bus
846  for (int k = 0; k < extraNav.count(); k++) {
847  TCEString newName =
848  getExtraComponentName(extraNav.item(k)->name());
849  TTAMachine::RegisterFile* extraRF =
850  finalNav.item(newName);
851  TCEString extraName = extraRF->name();
852  int width = extraRF->width();
853  if (width == 1)
854  continue;
855 
857  finalMach, extraRF, newBus, extraName, false, i);
858  for (GuardSet::iterator j = extrasGuards.begin();
859  j != extrasGuards.end(); j++) {
860  if (!newBus->hasGuard(**j)) {
861  (*j)->copyTo(*newBus);
862  }
863  }
864  }
865 
866  for (int j = 0; j < nodeNav.count(); j++) {
867  // Pick all register files in node, one by one
868  TCEString rfName = nodeNav.item(j)->name();
869  for (int k = 0;
870  k < nodesPerBus_ && (i*nodesPerBus_)+k
871  < nodeCount; k++) {
872  TCEString nodeName =
874  rfName, ((i*nodesPerBus_)+k));
875  TTAMachine::RegisterFile* nodeRF =
876  finalNav.item(nodeName);
878  finalMach, nodeRF, newBus, nodeName, false);
879  }
880  }
881 
883  extraMach->immediateUnitNavigator();
884 
885  for (int k = 0; k < extraImmNav.count(); k++) {
886  TCEString newName =
887  getExtraComponentName(extraImmNav.item(k)->name());
888  TTAMachine::ImmediateUnit* extraImm = finalImmNav.item(newName);
889  TCEString extraName = extraImm->name();
890  int width = extraImm->width();
891  if (width == 1)
892  continue;
893 
895  finalMach, extraImm, newBus, extraName, true);
896  for (GuardSet::iterator j = extrasGuards.begin();
897  j != extrasGuards.end(); j++) {
898  if (!newBus->hasGuard(**j)) {
899  (*j)->copyTo(*newBus);
900  }
901  }
902  }
903 
904  }
905  } else { // extrasless - connect all to lane 0
906 
907  for (unsigned int i = 0; i*nodesPerBus_ < nodeCount-1; i++) {
908  TCEString busName =
909  "star_" + Conversion::toString(i);
910  TTAMachine::Bus* newBus =
911  createBus(finalMach, busName, 32);
912  connectionBuses.push_back(newBus);
913 
914  for (int j = 0; j < nodeNav.count(); j++) {
915  // Pick all register files in node, one by one
916  TCEString rfName = nodeNav.item(j)->name();
917  for (int k = 0;
918  k < nodesPerBus_ && (i*nodesPerBus_)+k
919  < nodeCount-1; k++) {
920  TCEString nodeName =
922  rfName, ((i*nodesPerBus_)+k+1));
923  TTAMachine::RegisterFile* nodeRF =
924  finalNav.item(nodeName);
926  finalMach, nodeRF, newBus, nodeName, false);
927  }
928  }
929 
930 
931  for (int j = 0; j < nodeNav.count(); j++) {
932  // Pick all register files in node, one by one
933  TCEString rfName = nodeNav.item(j)->name();
934  TCEString node0Name =
935  getNodeComponentName(rfName, 0);
936  TTAMachine::RegisterFile* node0RF =
937  finalNav.item(node0Name);
938  int width = node0RF->width();
939  if (width == 1)
940  continue;
941 
943  finalMach, node0RF, newBus, node0Name, false, i);
944 
945  }
946  }
947  }
948  }
949  }

References TTAMachine::Machine::busNavigator(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Bus::hasGuard(), TTAMachine::Machine::Navigator< ComponentType >::hasItem(), TTAMachine::Machine::immediateUnitNavigator(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Component::name(), TTAMachine::Machine::registerFileNavigator(), Conversion::toString(), and TTAMachine::BaseRegisterFile::width().

Here is the call graph for this function:

◆ connectVectorLSU()

bool ADFCombiner::connectVectorLSU ( TTAMachine::Machine finalMach,
TTAMachine::Machine nodeMach,
TTAMachine::Machine extraMach,
int  nodeCount 
)
inlineprivate

If extra has LSU that is not connected to any of the buses, treat it as a vector LSU and connect address write port to extra and data ports to respective number of nodes.

The name of bus is generated same way as when creating new buses for nodes. Any change there must be reflected here as well! In case LSU has more ports then there are nodes we start from beginning.

The name of bus is generated same way as when creating new buses for nodes. Any change there must be reflected here as well! In case LSU has more ports then there are nodes we start from beginning.

Definition at line 1110 of file ADFCombiner.cc.

1114  {
1115 
1117  finalMach->functionUnitNavigator();
1118  TTAMachine::FunctionUnit* vectorLSU = NULL;
1119  TTAMachine::FUPort* trigger = NULL;
1120  TTAMachine::FUPort* inExtra = NULL;
1121  TTAMachine::FUPort* outExtra = NULL;
1122  int triggerIndex = -1;
1123  int outputPortCount = 0;
1124  bool broadcastUnit = false;
1125  for (int i = 0; i < finalNav.count(); i++) {
1126  TTAMachine::FunctionUnit* fu = finalNav.item(i);
1127  bool unconnected = false;
1128  for(int j = 0; j < fu->operationPortCount(); j++) {
1129  if (fu->operationPort(j)->socketCount() == 0) {
1130  unconnected = true;
1131  outputPortCount++;
1132  if (fu->operationPort(j)->isTriggering()) {
1133  triggerIndex = j;
1134  }
1135  } else {
1136  unconnected = false;
1137  triggerIndex = -1;
1138  }
1139  }
1140  if (unconnected) {
1141  // We found FU in extra that is not connected to any sockets,
1142  // that is agreed indication that is it vector load/store and
1143  // needs specific connectivity.
1144  // Let's check if it has address space
1145  if (fu->hasAddressSpace()) {
1146  // Ok, it seems to be load/store we look for, stop looking.
1147  // Find equivalends in final architecture
1148  vectorLSU = fu;
1149  trigger = vectorLSU->operationPort(triggerIndex);
1150  break;
1151  } else if (addBroadcast_){
1152  // We enabled addition of broadcast unit, so there is
1153  // unit without the address space.
1154  vectorLSU = fu;
1155  trigger = vectorLSU->operationPort(triggerIndex);
1156  broadcastUnit = true;
1157  break;
1158  } else {
1159  verboseLog("Candidate for Vector LSU does not have "
1160  "address space defined - " + fu->name());
1161  }
1162  }
1163  }
1164  if (vectorLSU == NULL) {
1165  // No unconnected vector LSU found, nothing to do here.
1166  return false;
1167  }
1168 
1169  assert(trigger != NULL);
1170  TCEString prefix = vectorLSU->name();
1171  TTAMachine::Socket* triggerSocket =
1172  new TTAMachine::Socket(prefix + "_" + trigger->name());
1173  TTAMachine::Socket* inExtraSocket = NULL;
1174  if (inExtra)
1175  inExtraSocket =
1176  new TTAMachine::Socket(prefix + "_" + inExtra->name());
1177  TTAMachine::Socket* outExtraSocket = NULL;
1178  if (outExtra)
1179  outExtraSocket =
1180  new TTAMachine::Socket(prefix + "_" + outExtra->name());
1181 
1182  try {
1183  finalMach->addSocket(*triggerSocket);
1184  } catch (const ComponentAlreadyExists& e) {
1185  TCEString msg =
1186  "ADFCombiner: Tried to add Socket with "
1187  " an already existing name (" + triggerSocket->name() +")";
1188  throw Exception(
1189  __FILE__, __LINE__, __func__, msg);
1190  }
1191  trigger->attachSocket(*triggerSocket);
1192  if (inExtra) {
1193  try {
1194  finalMach->addSocket(*inExtraSocket);
1195  } catch (const ComponentAlreadyExists& e) {
1196  TCEString msg =
1197  "ADFCombiner: Tried to add Socket with "
1198  " an already existing name (" + inExtraSocket->name() +")";
1199  throw Exception(
1200  __FILE__, __LINE__, __func__, msg);
1201  }
1202  inExtra->attachSocket(*inExtraSocket);
1203  }
1204  if (outExtra) {
1205  try {
1206  finalMach->addSocket(*outExtraSocket);
1207  } catch (const ComponentAlreadyExists& e) {
1208  TCEString msg =
1209  "ADFCombiner: Tried to add Socket with "
1210  " an already existing name (" + outExtraSocket->name() +")";
1211  throw Exception(
1212  __FILE__, __LINE__, __func__, msg);
1213  }
1214  outExtra->attachSocket(*outExtraSocket);
1215  }
1216 
1217  const TTAMachine::Machine::BusNavigator& extraBusNav =
1218  extraMach->busNavigator();
1219  const TTAMachine::Machine::BusNavigator& nodeBusNav =
1220  nodeMach->busNavigator();
1221  const TTAMachine::Machine::BusNavigator& finalBusNav =
1222  finalMach->busNavigator();
1223  // Connect trigger socket to all the buses in extra.
1224  for (int i = 0; i < extraBusNav.count(); i++) {
1225  TCEString busName = extraBusNav.item(i)->name();
1226  if (i>VLSUConnectionBuses_)
1227  continue;
1228  triggerSocket->attachBus(*finalBusNav.item(busName)->segment(0));
1229  if (inExtra)
1230  inExtraSocket->attachBus(*finalBusNav.item(busName)->segment(0));
1231  if (outExtra)
1232  outExtraSocket->attachBus(*finalBusNav.item(busName)->segment(0));
1233  }
1234  triggerSocket->setDirection(Socket::INPUT);
1235  if (inExtra)
1236  inExtraSocket->setDirection(Socket::INPUT);
1237  if (outExtra)
1238  outExtraSocket->setDirection(Socket::OUTPUT);
1239 
1240 
1241  for (int j = 0; j < vectorLSU->operationCount(); j++) {
1242  // We run this for all the HW operations, so some
1243  // sockets port connections could already exists
1244  TTAMachine::HWOperation* operation = vectorLSU->operation(j);
1245  TTAMachine::ExecutionPipeline* pipeline = operation->pipeline();
1246 
1247  // connect write ports to nodes.
1249  pipeline->readOperands();
1250  TTAMachine::ExecutionPipeline::OperandSet::iterator it =
1251  readOperandSet.begin();
1252  bool writeConnectedToExtra = false;
1253  for (; it != readOperandSet.end(); it++) {
1254  TTAMachine::Port* port = operation->port(*it);
1255  if (port != trigger && port != inExtra) {
1256  // Trigger is already connected to extra, we just connect
1257  // rest of writing ports.
1258  TCEString socketName = prefix + "_" + port->name();
1259  TTAMachine::Socket* inputSocket = NULL;
1260  if (!finalMach->socketNavigator().hasItem(socketName)) {
1261  inputSocket =
1262  new TTAMachine::Socket(prefix + "_" + port->name());
1263  try {
1264  finalMach->addSocket(*inputSocket);
1265  } catch (const ComponentAlreadyExists& e) {
1266  TCEString msg =
1267  "ADFCombiner: Tried to add Socket with "
1268  " an already existing name (" + inputSocket->name() +")";
1269  throw Exception(
1270  __FILE__, __LINE__, __func__, msg);
1271  }
1272  } else {
1273  inputSocket =
1274  finalMach->socketNavigator().item(socketName);
1275  }
1276  if (!port->isConnectedTo(*inputSocket)){
1277  port->attachSocket(*inputSocket);
1278  }
1279  for (int i = 0; i < nodeBusNav.count(); i++) {
1280  /// The name of bus is generated same way as when creating
1281  /// new buses for nodes. Any change there must be reflected
1282  /// here as well!
1283  /// In case LSU has more ports then there are nodes
1284  /// we start from beginning.
1285  // Operand index 1 is trigger, usefull operand
1286  // indexes starts from 2, node counting starts from 0
1287  TCEString busName =
1288  nodeBusNav.item(i)->name() + "_connect_" +
1289  Conversion::toString((*it -2) % nodeCount);
1290  assert(finalBusNav.hasItem(busName));
1291  if (i>VLSUConnectionBuses_)
1292  continue;
1293  if (!inputSocket->isConnectedTo(
1294  *finalBusNav.item(busName)->segment(0))) {
1295  inputSocket->attachBus(
1296  *finalBusNav.item(busName)->segment(0));
1297  }
1298  }
1299  if (!writeConnectedToExtra) {
1300  for (int i = 0; i < extraBusNav.count(); i++) {
1301  TCEString busName = extraBusNav.item(i)->name();
1302  if (i>VLSUConnectionBuses_)
1303  continue;
1304  if (!inputSocket->isConnectedTo(
1305  *finalBusNav.item(busName)->segment(0)))
1306  inputSocket->attachBus(
1307  *finalBusNav.item(busName)->segment(0));
1308  }
1309  writeConnectedToExtra = true;
1310  }
1311  inputSocket->setDirection(Socket::INPUT);
1312  }
1313  }
1314  // connect read ports to nodes.
1316  pipeline->writtenOperands();
1317  it = writeOperandSet.begin();
1318  bool readConnectedToExtra = false;
1319  for (; it != writeOperandSet.end(); it++) {
1320  TTAMachine::Port* port = operation->port(*it);
1321  if (port == outExtra)
1322  continue;
1323  assert(port != trigger);
1324  TCEString socketName = prefix + "_" + port->name();
1325  TTAMachine::Socket* outputSocket = NULL;
1326  if (!finalMach->socketNavigator().hasItem(socketName)) {
1327  outputSocket =
1328  new TTAMachine::Socket(prefix + "_" + port->name());
1329  try {
1330  finalMach->addSocket(*outputSocket);
1331  } catch (const ComponentAlreadyExists& e) {
1332  TCEString msg =
1333  "ADFCombiner: Tried to add Socket with "
1334  " an already existing name (" + outputSocket->name() +")";
1335  throw Exception(
1336  __FILE__, __LINE__, __func__, msg);
1337  }
1338  } else {
1339  outputSocket =
1340  finalMach->socketNavigator().item(socketName);
1341  }
1342  if (!port->isConnectedTo(*outputSocket)){
1343  port->attachSocket(*outputSocket);
1344  }
1345  for (int i = 0; i < nodeBusNav.count(); i++) {
1346  /// The name of bus is generated same way as when creating
1347  /// new buses for nodes. Any change there must be reflected
1348  /// here as well!
1349  /// In case LSU has more ports then there are nodes
1350  /// we start from beginning.
1351  // Operand index 1 is trigger, usefull operand
1352  // indexes starts from 2, node counting starts from 0
1353  TCEString busName =
1354  nodeBusNav.item(i)->name() + "_connect_" +
1355  Conversion::toString((*it -2) % nodeCount);
1356  assert(finalBusNav.hasItem(busName));
1357  if (i>VLSUConnectionBuses_)
1358  continue;
1359  if (!outputSocket->isConnectedTo(
1360  *finalBusNav.item(busName)->segment(0))) {
1361  outputSocket->attachBus(
1362  *finalBusNav.item(busName)->segment(0));
1363  }
1364  }
1365  if (!readConnectedToExtra && !broadcastUnit) {
1366  for (int i = 0; i < extraBusNav.count(); i++) {
1367  TCEString busName = extraBusNav.item(i)->name();
1368  if (i>VLSUConnectionBuses_)
1369  continue;
1370  if (!outputSocket->isConnectedTo(
1371  *finalBusNav.item(busName)->segment(0)))
1372  outputSocket->attachBus(
1373  *finalBusNav.item(busName)->segment(0));
1374  }
1375  readConnectedToExtra = true;
1376  }
1377  outputSocket->setDirection(Socket::OUTPUT);
1378  }
1379  }
1380  return true;
1381  }

References __func__, TTAMachine::Machine::addSocket(), assert, TTAMachine::Socket::attachBus(), TTAMachine::Port::attachSocket(), TTAMachine::Machine::busNavigator(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Machine::functionUnitNavigator(), TTAMachine::FunctionUnit::hasAddressSpace(), TTAMachine::Machine::Navigator< ComponentType >::hasItem(), TTAMachine::Socket::INPUT, TTAMachine::Port::isConnectedTo(), TTAMachine::Socket::isConnectedTo(), TTAMachine::FUPort::isTriggering(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Port::name(), TTAMachine::Component::name(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), TTAMachine::FunctionUnit::operationPort(), TTAMachine::FunctionUnit::operationPortCount(), TTAMachine::Socket::OUTPUT, TTAMachine::HWOperation::pipeline(), TTAMachine::HWOperation::port(), TTAMachine::ExecutionPipeline::readOperands(), TTAMachine::Socket::setDirection(), TTAMachine::Port::socketCount(), TTAMachine::Machine::socketNavigator(), Conversion::toString(), verboseLog, and TTAMachine::ExecutionPipeline::writtenOperands().

Here is the call graph for this function:

◆ copyGuards()

void ADFCombiner::copyGuards ( TTAMachine::Bus originalBus,
TTAMachine::Bus addBus,
const TCEString prefix 
)
inlineprivate

Definition at line 1410 of file ADFCombiner.cc.

1411  {
1412  for (int i = 0; i < originalBus.guardCount(); ++i) {
1413  Guard* guard = originalBus.guard(i);
1414  if (RegisterGuard* rg = dynamic_cast<RegisterGuard*>(guard)) {
1415  TCEString rfName = prefix + rg->registerFile()->name();
1416  int index = rg->registerIndex();
1417  RegisterFile* rfNew =
1418  addBus.machine()->registerFileNavigator().item(rfName);
1419  if (rfNew == NULL) {
1420  std::cerr << "RF: " << rfName << " not found from mach!"
1421  << std::endl;
1422  continue;
1423  }
1424  new RegisterGuard(
1425  rg->isInverted(), *rfNew, index, &addBus);
1426  } else if (PortGuard* pg = dynamic_cast<PortGuard*>(guard)) {
1427  FUPort* fuPort = pg->port();
1428  FunctionUnit* fu =
1429  static_cast<FunctionUnit*>(fuPort->parentUnit());
1430  int index = -1;
1431  for (int i = 0; i < fu->portCount(); i++) {
1432  if (fu->port(i) == fuPort) {
1433  index = i;
1434  }
1435  }
1436  assert(index != -1);
1437  TCEString fuName = prefix + fu->name();
1438  FunctionUnit* fuNew =
1439  addBus.machine()->functionUnitNavigator().item(fuName);
1440  if (fuNew == NULL) {
1441  std::cerr << "FU: " << fuName << " not found from mach!"
1442  << std::endl;
1443  continue;
1444  }
1445  FUPort* port = static_cast<FUPort*>(fuNew->port(index));
1446  new PortGuard(pg->isInverted(), *port, addBus);
1447  }
1448  }
1449  }

References assert, TTAMachine::Machine::functionUnitNavigator(), TTAMachine::Bus::guard(), TTAMachine::Bus::guardCount(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Component::machine(), TTAMachine::Component::name(), TTAMachine::BaseFUPort::parentUnit(), TTAMachine::FunctionUnit::port(), TTAMachine::Unit::portCount(), and TTAMachine::Machine::registerFileNavigator().

Here is the call graph for this function:

◆ createBus()

TTAMachine::Bus* ADFCombiner::createBus ( TTAMachine::Machine finalMach,
TCEString  busName,
int  width 
)
inlineprivate

Create single bus with given name and width.

Definition at line 953 of file ADFCombiner.cc.

956  {
957  TTAMachine::Bus* newBus = new TTAMachine::Bus(
958  busName, width, 0,
959  Machine::SIGN);
960  TTAMachine::Segment* newSegment =
961  new TTAMachine::Segment(busName, *newBus);
962  assert(newBus->hasSegment(newSegment->name()));
963  try {
964  finalMach->addBus(*newBus);
965  } catch (const ComponentAlreadyExists& e) {
966  TCEString msg =
967  "ADFCombiner: Tried to add Bus with an already"
968  "existing name (" + busName +")";
969  throw Exception(
970  __FILE__, __LINE__, __func__, msg);
971  }
972  return newBus;
973  }

References __func__, TTAMachine::Machine::addBus(), assert, TTAMachine::Bus::hasSegment(), TTAMachine::Segment::name(), and TTAMachine::Machine::SIGN.

Here is the call graph for this function:

◆ createPortsAndSockets()

void ADFCombiner::createPortsAndSockets ( TTAMachine::Machine finalMach,
TTAMachine::RegisterFile rf,
TTAMachine::Bus newBus,
TCEString  name,
bool  readOnly,
int  nodeNumber = -1 
)
inlineprivate

Create new ports in RF and connected them to sockets and connect sockets to the bus.

Definition at line 978 of file ADFCombiner.cc.

984  {
985 
986  TTAMachine::RFPort* readPort = NULL;
987  TTAMachine::RFPort* writePort = NULL;
988  TTAMachine::Socket* readSocket = NULL;
989  TTAMachine::Socket* writeSocket = NULL;
990 
991  if (!reuseRFPorts_) {
992  // Create new ports and sockets for the register files connections
993  for (int k = 0; k < rf->portCount(); k++) {
994  if (rf->port(k)->name() == name + "_connect_r") {
995  readPort = rf->port(k);
996  }
997  if (rf->port(k)->name() == name + "_connect_w") {
998  writePort = rf->port(k);
999  }
1000  }
1001  } else if (reuseRFPorts_ && nodeNumber != -1) {
1002  // If the callee passed the node number, we connect only
1003  // certain ports to the bus.
1004  int indexRead = nodeNumber % rf->maxReads();
1005  int indexWrite = nodeNumber % rf->maxWrites();
1006  int foundReads = 0;
1007  int foundWrites = 0;
1008  for (int k = 0; k < rf->portCount(); k++) {
1009  if (rf->port(k)->outputSocket() != NULL) {
1010  if (foundReads == indexRead) {
1011  readPort = rf->port(k);
1012  readSocket = rf->port(k)->outputSocket();
1013  }
1014  foundReads++;
1015  }
1016  if (rf->port(k)->inputSocket() != NULL) {
1017  if (foundWrites == indexWrite) {
1018  writePort = rf->port(k);
1019  writeSocket = rf->port(k)->inputSocket();
1020  }
1021  foundWrites++;
1022  }
1023  }
1024  } else {
1025  // Just find first available port for reuse.
1026  for (int k = 0; k < rf->portCount(); k++) {
1027  if (rf->port(k)->outputSocket() != NULL) {
1028  if (readPort == NULL) {
1029  readPort = rf->port(k);
1030  readSocket = rf->port(k)->outputSocket();
1031  }
1032  }
1033  if (!readOnly && rf->port(k)->inputSocket() != NULL) {
1034  if (writePort == NULL) {
1035  writePort = rf->port(k);
1036  writeSocket = rf->port(k)->inputSocket();
1037  }
1038  }
1039  }
1040  }
1041 
1042  if (readPort == NULL) {
1043  readPort = new TTAMachine::RFPort(
1044  name + "_connect_r", *rf);
1045  }
1046  if (!readOnly && writePort == NULL) {
1047  writePort = new TTAMachine::RFPort(
1048  name + "_connect_w", *rf);
1049  }
1050 
1051  const Machine::SocketNavigator socketNavigator =
1052  finalMach->socketNavigator();
1053 
1054  // If we reused the ports, the socket is already known, if not
1055  // try to find it or create new one.
1056  if (readSocket == NULL) {
1057  if (!socketNavigator.hasItem(readPort->name())) {
1058  readSocket = new TTAMachine::Socket(readPort->name());
1059  try {
1060  finalMach->addSocket(*readSocket);
1061  } catch (const ComponentAlreadyExists& e) {
1062  TCEString msg =
1063  "ADFCombiner: Tried to add Socket with "
1064  " an already existing name (" + readSocket->name() +")";
1065  throw Exception(
1066  __FILE__, __LINE__, __func__, msg);
1067  }
1068  } else {
1069  readSocket = socketNavigator.item(readPort->name());
1070  }
1071  }
1072 
1073  if (!readOnly && writeSocket == NULL) {
1074  if (!socketNavigator.hasItem(writePort->name())) {
1075  writeSocket = new TTAMachine::Socket(writePort->name());
1076  try {
1077  finalMach->addSocket(*writeSocket);
1078  } catch (const ComponentAlreadyExists& e) {
1079  TCEString msg =
1080  "ADFCombiner: Tried to add Socket with "
1081  " an already existing name (" + writeSocket->name() +")";
1082  throw Exception(
1083  __FILE__, __LINE__, __func__, msg);
1084  }
1085  } else {
1086  writeSocket = socketNavigator.item(writePort->name());
1087  }
1088  }
1089 
1090  if (readPort->outputSocket() == NULL) {
1091  readPort->attachSocket(*readSocket);
1092  }
1093  if (!readSocket->isConnectedTo(*newBus->segment(0))) {
1094  readSocket->attachBus(*newBus->segment(0));
1095  readSocket->setDirection(Socket::OUTPUT);
1096  }
1097  if (!readOnly && writePort->inputSocket() == NULL) {
1098  writePort->attachSocket(*writeSocket);
1099  }
1100  if (!readOnly && !writeSocket->isConnectedTo(*newBus->segment(0))) {
1101  writeSocket->attachBus(*newBus->segment(0));
1102  writeSocket->setDirection(Socket::INPUT);
1103  }
1104  }

References __func__, TTAMachine::Machine::addSocket(), TTAMachine::Socket::attachBus(), TTAMachine::Port::attachSocket(), TTAMachine::Machine::Navigator< ComponentType >::hasItem(), TTAMachine::Socket::INPUT, TTAMachine::Port::inputSocket(), TTAMachine::Socket::isConnectedTo(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::RegisterFile::maxReads(), TTAMachine::RegisterFile::maxWrites(), TTAMachine::Port::name(), TTAMachine::Component::name(), TTAMachine::Socket::OUTPUT, TTAMachine::Port::outputSocket(), TTAMachine::BaseRegisterFile::port(), TTAMachine::Unit::portCount(), TTAMachine::Bus::segment(), TTAMachine::Socket::setDirection(), and TTAMachine::Machine::socketNavigator().

Here is the call graph for this function:

◆ explore()

virtual std::vector<RowID> ADFCombiner::explore ( const RowID ,
const unsigned int &   
)
inlineprivatevirtual

Explorer plugin that adds machine components to a given machine with adf parameter or with configuration id in dsdb.

Reimplemented from DesignSpaceExplorerPlugin.

Definition at line 129 of file ADFCombiner.cc.

129  {
130  readParameters();
131  std::vector<RowID> result;
132 
133  // check if adf given
134  if (extra_ == "" && node_ == "") {
135  TCEString msg =
136  "No node.adf or extra.adf defined. "
137  "Give adfs as plugin parameters.";
138  throw Exception(
139  __FILE__, __LINE__, __func__, msg);
140  }
141 
142  DSDBManager& dsdb = db();
144  conf.hasImplementation = false;
145  TTAMachine::Machine* nodeMach = NULL;
146  TTAMachine::Machine* extraMach = NULL;
147  TTAMachine::Machine* finalMach = NULL;
148 
149  // load the adf from file or from dsdb
150  try {
152  } catch (const Exception& e) {
153  TCEString msg =
154  "Error loading the \'" + node_ + "\'";
155  throw Exception(
156  __FILE__, __LINE__, __func__, msg);
157  }
158  assert(nodeMach != NULL);
159 
160  if (extra_ != "") {
161  try {
163  finalMach = new TTAMachine::Machine(*extraMach);
164  } catch (const Exception& e) {
165  TCEString msg =
166  "Error loading the \'" + extra_ + "\'";
167  throw Exception(
168  __FILE__, __LINE__, __func__, msg);
169  }
170  } else {
171  extraMach = NULL;
172  finalMach = new TTAMachine::Machine();
173  }
174 
175  // Copies the extra machine to new architecture
176  // add components
177  addComponents(finalMach, nodeMach, extraMach, nodeCount_);
178 
179  // add machine to configuration
180  conf.architectureID = dsdb.addArchitecture(*finalMach);
181 
182  // add new configuration to dsdb
183  RowID confID = dsdb.addConfiguration(conf);
184 
185  // If requested, adds wide load/store unit
186  if (vectorLSU_ && nodeCount_ > 1) {
187  DesignSpaceExplorerPlugin* lsuAdd =
189  "VectorLSGenerator", &db());
190 
191  lsuAdd->giveParameter("node_count", Conversion::toString(nodeCount_));
192  lsuAdd->giveParameter(
193  "address_spaces", Conversion::toString(addressSpaces_));
194  lsuAdd->giveParameter(
195  "add_broadcast", Conversion::toString(addBroadcast_));
196 
197  lsuAdd->giveParameter(
198  "shared_lsu_latency", Conversion::toString(sharedLSULatency_));
199  lsuAdd->giveParameter(
200  "data_lsu_latency", Conversion::toString(dataLSULatency_));
201 
202  std::vector<RowID> addedLSUConf =
203  lsuAdd->explore(confID);
204 
205  finalMach = dsdb.architecture(addedLSUConf.back());
206 
207  bool connectAgain = false;
208  // Connect vector units, one at a time.
209  do {
210  connectAgain =
211  connectVectorLSU(finalMach, nodeMach, extraMach, nodeCount_);
212  } while (connectAgain);
213 
214  conf.architectureID = dsdb.addArchitecture(*finalMach);
215  confID = dsdb.addConfiguration(conf);
216  }
217  if (buildIDF_) {
218  try {
219  // add idf to configuration
220  selector_.selectComponentsToConf(conf, dsdb, finalMach);
221  conf.architectureID = dsdb.addArchitecture(*finalMach);
222  confID = dsdb.addConfiguration(conf);
223  } catch (const Exception& e) {
224  throw Exception(
225  __FILE__, __LINE__, __func__, e.errorMessageStack());
226  }
227  } else {
228  conf.hasImplementation = false;
229  }
230  result.push_back(confID);
231  return result;
232  }

References __func__, DSDBManager::addArchitecture(), DSDBManager::addConfiguration(), DSDBManager::architecture(), DSDBManager::MachineConfiguration::architectureID, assert, Exception::errorMessageStack(), DesignSpaceExplorerPlugin::explore(), DesignSpaceExplorerPlugin::giveParameter(), DSDBManager::MachineConfiguration::hasImplementation, DesignSpaceExplorer::loadExplorerPlugin(), TTAMachine::Machine::loadFromADF(), and Conversion::toString().

Here is the call graph for this function:

◆ findGuards()

GuardSet ADFCombiner::findGuards ( TTAMachine::Machine mach)
inlineprivate

Definition at line 302 of file ADFCombiner.cc.

302  {
303  GuardSet guards;
304 
305  const TTAMachine::Machine::BusNavigator& busNav =
306  mach->busNavigator();
307 
308  for (int k = 0; k < busNav.count(); k++) {
309  for (int j = 0; j < busNav.item(k)->guardCount(); j++) {
310  guards.insert(busNav.item(k)->guard(j));
311  }
312  }
313  return guards;
314  }

References TTAMachine::Machine::busNavigator(), TTAMachine::Machine::Navigator< ComponentType >::count(), and TTAMachine::Machine::Navigator< ComponentType >::item().

Here is the call graph for this function:

◆ getExtraComponentName()

TCEString ADFCombiner::getExtraComponentName ( TCEString  originalName)
inlineprivate

Definition at line 1406 of file ADFCombiner.cc.

1406  {
1407  return "EX_" + originalName;
1408  }

◆ getNodeComponentName()

TCEString ADFCombiner::getNodeComponentName ( TCEString  originalName,
int  idx 
)
inlineprivate

Definition at line 1402 of file ADFCombiner.cc.

1402  {
1403  return "L_" + Conversion::toString(idx) + "_" + originalName;
1404  }

References Conversion::toString().

Here is the call graph for this function:

◆ nodeNamePrefix()

TCEString ADFCombiner::nodeNamePrefix ( int  nodeId)
inlineprivate

Definition at line 354 of file ADFCombiner.cc.

354  {
355  TCEString nodeNamePrefix = "L_";
356  nodeNamePrefix << nodeId << "_";
357  return nodeNamePrefix;
358  }

◆ PLUGIN_DESCRIPTION()

ADFCombiner::PLUGIN_DESCRIPTION ( "Explorer plugin that produces a clustered machine with N lanes/nodes " "and an 'extras' node."  )
private

◆ producesArchitecture()

virtual bool ADFCombiner::producesArchitecture ( ) const
inlineprivatevirtual

Implements DesignSpaceExplorerPlugin.

Definition at line 119 of file ADFCombiner.cc.

119 { return true; }

◆ readParameters()

void ADFCombiner::readParameters ( )
inlineprivate

◆ renameExtraUnits()

void ADFCombiner::renameExtraUnits ( TTAMachine::Machine finalMach)
inlineprivate

Definition at line 1382 of file ADFCombiner.cc.

1382  {
1384  finalMach->functionUnitNavigator();
1385  for (int i = 0; i < finalNav.count(); i++) {
1386  TCEString oldName = finalNav.item(i)->name();
1387  finalNav.item(i)->setName(getExtraComponentName(oldName));
1388  }
1389  const TTAMachine::Machine::RegisterFileNavigator& finalRFNav =
1390  finalMach->registerFileNavigator();
1391  for (int i = 0; i < finalRFNav.count(); i++) {
1392  TCEString oldName = finalRFNav.item(i)->name();
1393  finalRFNav.item(i)->setName(getExtraComponentName(oldName));
1394  }
1395  const TTAMachine::Machine::ImmediateUnitNavigator& finalImmNav =
1396  finalMach->immediateUnitNavigator();
1397  for (int i = 0; i < finalImmNav.count(); i++) {
1398  TCEString oldName = finalImmNav.item(i)->name();
1399  finalImmNav.item(i)->setName(getExtraComponentName(oldName));
1400  }
1401  }

References TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Machine::functionUnitNavigator(), TTAMachine::Machine::immediateUnitNavigator(), TTAMachine::Machine::Navigator< ComponentType >::item(), and TTAMachine::Machine::registerFileNavigator().

Here is the call graph for this function:

◆ requiresApplication()

virtual bool ADFCombiner::requiresApplication ( ) const
inlineprivatevirtual

Reimplemented from DesignSpaceExplorerPlugin.

Definition at line 122 of file ADFCombiner.cc.

122 { return false; }

◆ requiresHDB()

virtual bool ADFCombiner::requiresHDB ( ) const
inlineprivatevirtual

Implements DesignSpaceExplorerPlugin.

Definition at line 120 of file ADFCombiner.cc.

120 { return false; }

◆ requiresSimulationData()

virtual bool ADFCombiner::requiresSimulationData ( ) const
inlineprivatevirtual

Implements DesignSpaceExplorerPlugin.

Definition at line 121 of file ADFCombiner.cc.

121 { return false; }

◆ requiresStartingPointArchitecture()

virtual bool ADFCombiner::requiresStartingPointArchitecture ( ) const
inlineprivatevirtual

Implements DesignSpaceExplorerPlugin.

Definition at line 118 of file ADFCombiner.cc.

118 { return false; }

Member Data Documentation

◆ addBar_

bool ADFCombiner::addBar_
private

Definition at line 262 of file ADFCombiner.cc.

◆ AddBarConnectionPN_

const TCEString ADFCombiner::AddBarConnectionPN_
staticprivate

Definition at line 246 of file ADFCombiner.cc.

◆ addBroadcast_

bool ADFCombiner::addBroadcast_
private

Definition at line 260 of file ADFCombiner.cc.

◆ AddBroadcastPN_

const TCEString ADFCombiner::AddBroadcastPN_
staticprivate

Definition at line 244 of file ADFCombiner.cc.

◆ addressSpaces_

TCEString ADFCombiner::addressSpaces_
private

Definition at line 259 of file ADFCombiner.cc.

◆ AddressSpacesPN_

const TCEString ADFCombiner::AddressSpacesPN_
staticprivate

Definition at line 243 of file ADFCombiner.cc.

◆ addRing_

bool ADFCombiner::addRing_
private

Definition at line 261 of file ADFCombiner.cc.

◆ AddRingConnectionPN_

const TCEString ADFCombiner::AddRingConnectionPN_
staticprivate

Definition at line 245 of file ADFCombiner.cc.

◆ addStar_

bool ADFCombiner::addStar_
private

Definition at line 263 of file ADFCombiner.cc.

◆ AddStarConnectionPN_

const TCEString ADFCombiner::AddStarConnectionPN_
staticprivate

Definition at line 247 of file ADFCombiner.cc.

◆ buildIDF_

bool ADFCombiner::buildIDF_
private

Definition at line 257 of file ADFCombiner.cc.

◆ BuildIDFPN_

const TCEString ADFCombiner::BuildIDFPN_
staticprivate

Definition at line 241 of file ADFCombiner.cc.

◆ dataLSULatency_

int ADFCombiner::dataLSULatency_
private

Definition at line 267 of file ADFCombiner.cc.

◆ DataLSULatencyPN_

const TCEString ADFCombiner::DataLSULatencyPN_
staticprivate

Definition at line 251 of file ADFCombiner.cc.

◆ extra_

TCEString ADFCombiner::extra_
private

Definition at line 256 of file ADFCombiner.cc.

◆ ExtraPN_

const TCEString ADFCombiner::ExtraPN_
staticprivate

Definition at line 240 of file ADFCombiner.cc.

◆ node_

TCEString ADFCombiner::node_
private

Definition at line 254 of file ADFCombiner.cc.

◆ nodeCount_

int ADFCombiner::nodeCount_
private

Definition at line 255 of file ADFCombiner.cc.

◆ NodeCountPN_

const TCEString ADFCombiner::NodeCountPN_
staticprivate

Definition at line 239 of file ADFCombiner.cc.

◆ NodePN_

const TCEString ADFCombiner::NodePN_
staticprivate

Definition at line 238 of file ADFCombiner.cc.

◆ nodesPerBus_

int ADFCombiner::nodesPerBus_
private

Definition at line 264 of file ADFCombiner.cc.

◆ NodesPerBusPN_

const TCEString ADFCombiner::NodesPerBusPN_
staticprivate

Definition at line 248 of file ADFCombiner.cc.

◆ reuseRFPorts_

bool ADFCombiner::reuseRFPorts_
private

Definition at line 265 of file ADFCombiner.cc.

◆ ReuseRFPortsPN_

const TCEString ADFCombiner::ReuseRFPortsPN_
staticprivate

Definition at line 249 of file ADFCombiner.cc.

◆ selector_

ComponentImplementationSelector ADFCombiner::selector_
private

Selector used by the plugin.

Definition at line 236 of file ADFCombiner.cc.

◆ sharedLSULatency_

int ADFCombiner::sharedLSULatency_
private

Definition at line 266 of file ADFCombiner.cc.

◆ SharedLSULatencyPN_

const TCEString ADFCombiner::SharedLSULatencyPN_
staticprivate

Definition at line 250 of file ADFCombiner.cc.

◆ vectorLSU_

bool ADFCombiner::vectorLSU_
private

Definition at line 258 of file ADFCombiner.cc.

◆ VectorLSUPN_

const TCEString ADFCombiner::VectorLSUPN_
staticprivate

Definition at line 242 of file ADFCombiner.cc.

◆ VLSUConnectionBuses_

int ADFCombiner::VLSUConnectionBuses_
private

Definition at line 268 of file ADFCombiner.cc.

◆ VLSUConnectionBusesPN_

const TCEString ADFCombiner::VLSUConnectionBusesPN_
staticprivate

Definition at line 252 of file ADFCombiner.cc.


The documentation for this class was generated from the following file:
ADFCombiner::addressSpaces_
TCEString addressSpaces_
Definition: ADFCombiner.cc:259
TTAMachine::Bus::hasGuard
bool hasGuard(const Guard &guard) const
Definition: Bus.cc:393
TTAMachine::Port::unconnectedSocket
virtual Socket * unconnectedSocket(int index) const
Definition: Port.cc:323
TTAMachine::Guard
Definition: Guard.hh:55
ADFCombiner::addAllGuardsToConnectionBuses
void addAllGuardsToConnectionBuses(TTAMachine::Machine *finalMach, const BusVector &connectionBuses)
Definition: ADFCombiner.cc:361
ADFCombiner::AddStarConnectionPN_
static const TCEString AddStarConnectionPN_
Definition: ADFCombiner.cc:247
TTAMachine::Port::inputSocket
virtual Socket * inputSocket() const
Definition: Port.cc:261
ADFCombiner::AddBarConnectionPN_
static const TCEString AddBarConnectionPN_
Definition: ADFCombiner.cc:246
ADFCombiner::vectorLSU_
bool vectorLSU_
Definition: ADFCombiner.cc:258
TTAMachine::Component::name
virtual TCEString name() const
Definition: MachinePart.cc:125
DesignSpaceExplorer::db
virtual DSDBManager & db()
Definition: DesignSpaceExplorer.cc:300
TTAMachine::FunctionUnit::hasAddressSpace
virtual bool hasAddressSpace() const
Definition: FunctionUnit.cc:608
TTAMachine::HWOperation
Definition: HWOperation.hh:52
TTAMachine::AddressSpace
Definition: AddressSpace.hh:51
ADFCombiner::node_
TCEString node_
Definition: ADFCombiner.cc:254
UINT
@ UINT
Definition: ExplorerPluginParameter.hh:40
TTAMachine::BaseFUPort::parentUnit
FunctionUnit * parentUnit() const
Definition: BaseFUPort.cc:96
DSDBManager::architecture
TTAMachine::Machine * architecture(RowID id) const
Definition: DSDBManager.cc:807
TTAMachine::Segment
Definition: Segment.hh:54
ADFCombiner::AddressSpacesPN_
static const TCEString AddressSpacesPN_
Definition: ADFCombiner.cc:243
DSDBManager::MachineConfiguration::hasImplementation
bool hasImplementation
Definition: DSDBManager.hh:80
TTAMachine::Bus
Definition: Bus.hh:53
ADFCombiner::addBuses
void addBuses(TTAMachine::Machine *finalMach, TTAMachine::Machine *nodeMach, unsigned nodeCount, std::map< Bus *, std::pair< Bus *, int > > &busMapping)
Definition: ADFCombiner.cc:399
DesignSpaceExplorerPlugin
Definition: DesignSpaceExplorerPlugin.hh:55
RowID
int RowID
Type definition of row ID in relational databases.
Definition: DBTypes.hh:37
DesignSpaceExplorerPlugin::DesignSpaceExplorerPlugin
DesignSpaceExplorerPlugin()
Definition: DesignSpaceExplorerPlugin.cc:48
ADFCombiner::ReuseRFPortsPN_
static const TCEString ReuseRFPortsPN_
Definition: ADFCombiner.cc:249
ADFCombiner::copyGuards
void copyGuards(TTAMachine::Bus &originalBus, TTAMachine::Bus &addBus, const TCEString &prefix)
Definition: ADFCombiner.cc:1410
ObjectState
Definition: ObjectState.hh:59
ADFCombiner::connectRegisterFiles
void connectRegisterFiles(TTAMachine::Machine *finalMach, TTAMachine::Machine *nodeMach, TTAMachine::Machine *extraMach, unsigned nodeCount, std::set< TTAMachine::Guard *, TTAMachine::MachinePart::Comparator > extrasGuards, BusVector &connectionBuses)
Definition: ADFCombiner.cc:645
TTAMachine::FunctionUnit::port
virtual BaseFUPort * port(const std::string &name) const
Definition: FunctionUnit.cc:145
ADFCombiner::extra_
TCEString extra_
Definition: ADFCombiner.cc:256
TTAMachine::FunctionUnit::addressSpace
virtual AddressSpace * addressSpace() const
Definition: FunctionUnit.cc:580
ADFCombiner::BusVector
std::vector< TTAMachine::Bus * > BusVector
Definition: ADFCombiner.cc:297
TTAMachine::ExecutionPipeline::writtenOperands
OperandSet writtenOperands(int cycle) const
Definition: ExecutionPipeline.cc:429
Application::logStream
static std::ostream & logStream()
Definition: Application.cc:155
ADFCombiner::addFunctionUnits
void addFunctionUnits(TTAMachine::Machine *finalMach, TTAMachine::Machine *nodeMach, unsigned nodeCount)
Definition: ADFCombiner.cc:511
ADFCombiner::connectPorts
void connectPorts(TTAMachine::Machine *finalMach, TTAMachine::Unit *original, TTAMachine::Unit *newUnit, int count)
Definition: ADFCombiner.cc:571
TTAMachine::Machine::Navigator::count
int count() const
TTAMachine::ExecutionPipeline::readOperands
OperandSet readOperands(int cycle) const
Definition: ExecutionPipeline.cc:408
TTAMachine::Bus::segment
virtual Segment * segment(int index) const
Definition: Bus.cc:329
TTAMachine::FUPort::isTriggering
virtual bool isTriggering() const
Definition: FUPort.cc:182
TTAMachine::RegisterFile::maxWrites
virtual int maxWrites() const
Definition: RegisterFile.cc:135
Conversion::toString
static std::string toString(const T &source)
ADFCombiner::nodeNamePrefix
TCEString nodeNamePrefix(int nodeId)
Definition: ADFCombiner.cc:354
verboseLog
#define verboseLog(text)
Definition: Application.hh:115
TTAMachine::RFPort
Definition: RFPort.hh:45
ADFCombiner::createBus
TTAMachine::Bus * createBus(TTAMachine::Machine *finalMach, TCEString busName, int width)
Definition: ADFCombiner.cc:953
BOOL
@ BOOL
Definition: ExplorerPluginParameter.hh:40
TTAMachine::Port::socketCount
virtual int socketCount() const
Definition: Port.cc:375
ADFCombiner::NodeCountPN_
static const TCEString NodeCountPN_
Definition: ADFCombiner.cc:239
ADFCombiner::dataLSULatency_
int dataLSULatency_
Definition: ADFCombiner.cc:267
ADFCombiner::connectVectorLSU
bool connectVectorLSU(TTAMachine::Machine *finalMach, TTAMachine::Machine *nodeMach, TTAMachine::Machine *extraMach, int nodeCount)
Definition: ADFCombiner.cc:1110
assert
#define assert(condition)
Definition: Application.hh:86
TTAMachine::FunctionUnit
Definition: FunctionUnit.hh:55
TTAMachine::HWOperation::port
virtual FUPort * port(int operand) const
Definition: HWOperation.cc:320
TTAMachine::Port::attachSocket
virtual void attachSocket(Socket &socket)
Definition: Port.cc:191
TTAMachine::FUPort
Definition: FUPort.hh:46
TTAMachine::Machine::addRegisterFile
virtual void addRegisterFile(RegisterFile &unit)
Definition: Machine.cc:236
TTAMachine::ControlUnit::copy
virtual ControlUnit * copy() const
Definition: ControlUnit.cc:105
DesignSpaceExplorerPlugin::readOptionalParameter
void readOptionalParameter(const std::string paramName, T &param) const
ADFCombiner::VLSUConnectionBuses_
int VLSUConnectionBuses_
Definition: ADFCombiner.cc:268
TTAMachine::Machine::controlUnit
virtual ControlUnit * controlUnit() const
Definition: Machine.cc:345
TTAMachine::RegisterFile::maxReads
virtual int maxReads() const
Definition: RegisterFile.cc:123
TTAMachine::Socket::attachBus
void attachBus(Segment &bus)
Definition: Socket.cc:166
DSDBManager::MachineConfiguration
Definition: DSDBManager.hh:78
STRING
@ STRING
Definition: ExplorerPluginParameter.hh:40
TTAMachine::Machine::immediateUnitNavigator
virtual ImmediateUnitNavigator immediateUnitNavigator() const
Definition: Machine.cc:416
TTAMachine::ControlUnit
Definition: ControlUnit.hh:50
TTAMachine::RegisterGuard
Definition: Guard.hh:137
TTAMachine::Port
Definition: Port.hh:54
TTAMachine::Bus::setName
virtual void setName(const std::string &name)
Definition: Bus.cc:196
TTAMachine::Machine::Navigator::hasItem
bool hasItem(const std::string &name) const
TTAMachine::Unit::port
virtual Port * port(const std::string &name) const
Definition: Unit.cc:116
__func__
#define __func__
Definition: Application.hh:67
TTAMachine::Machine::functionUnitNavigator
virtual FunctionUnitNavigator functionUnitNavigator() const
Definition: Machine.cc:380
TTAMachine::Socket
Definition: Socket.hh:53
DesignSpaceExplorerPlugin::giveParameter
virtual void giveParameter(const std::string &name, const std::string &value)
Definition: DesignSpaceExplorerPlugin.cc:89
ADFCombiner::VectorLSUPN_
static const TCEString VectorLSUPN_
Definition: ADFCombiner.cc:242
ADFCombiner::AddBroadcastPN_
static const TCEString AddBroadcastPN_
Definition: ADFCombiner.cc:244
Exception::errorMessageStack
std::string errorMessageStack(bool messagesOnly=false) const
Definition: Exception.cc:138
TTAMachine::FunctionUnit::operationCount
virtual int operationCount() const
Definition: FunctionUnit.cc:419
TTAMachine::AddressSpace::saveState
virtual ObjectState * saveState() const
Definition: AddressSpace.cc:295
ADFCombiner::NodePN_
static const TCEString NodePN_
Definition: ADFCombiner.cc:238
ADFCombiner::AddRingConnectionPN_
static const TCEString AddRingConnectionPN_
Definition: ADFCombiner.cc:245
Exception
Definition: Exception.hh:54
DSDBManager
Definition: DSDBManager.hh:76
TTAMachine::FunctionUnit::setAddressSpace
virtual void setAddressSpace(AddressSpace *as)
Definition: FunctionUnit.cc:594
DesignSpaceExplorer::loadExplorerPlugin
static DesignSpaceExplorerPlugin * loadExplorerPlugin(const std::string &pluginName, DSDBManager *dsdb=NULL)
Definition: DesignSpaceExplorer.cc:527
ADFCombiner::nodesPerBus_
int nodesPerBus_
Definition: ADFCombiner.cc:264
TTAMachine::Machine::addressSpaceNavigator
virtual AddressSpaceNavigator addressSpaceNavigator() const
Definition: Machine.cc:392
TTAMachine::Bus::hasSegment
virtual bool hasSegment(const std::string &name) const
Definition: Bus.cc:284
ADFCombiner::reuseRFPorts_
bool reuseRFPorts_
Definition: ADFCombiner.cc:265
TTAMachine::Machine::socketNavigator
virtual SocketNavigator socketNavigator() const
Definition: Machine.cc:368
TTAMachine::ExecutionPipeline::OperandSet
std::set< int > OperandSet
Set for operand indexes.
Definition: ExecutionPipeline.hh:58
TTAMachine::Socket::setDirection
void setDirection(Direction direction)
Definition: Socket.cc:130
TTAMachine::FunctionUnit::operationPortCount
virtual int operationPortCount() const
Definition: FunctionUnit.cc:182
ADFCombiner::NodesPerBusPN_
static const TCEString NodesPerBusPN_
Definition: ADFCombiner.cc:248
TTAMachine::Machine::addBus
virtual void addBus(Bus &bus)
Definition: Machine.cc:139
TTAMachine::Bus::guardCount
int guardCount() const
Definition: Bus.cc:441
TTAMachine::Socket::isConnectedTo
bool isConnectedTo(const Bus &bus) const
Definition: Socket.cc:331
TTAMachine::Bus::guard
Guard * guard(int index) const
Definition: Bus.cc:456
TTAMachine::Unit::portCount
virtual int portCount() const
Definition: Unit.cc:135
ADFCombiner::renameExtraUnits
void renameExtraUnits(TTAMachine::Machine *finalMach)
Definition: ADFCombiner.cc:1382
TTAMachine::Machine::setGlobalControl
virtual void setGlobalControl(ControlUnit &unit)
Definition: Machine.cc:317
ADFCombiner::nodeCount_
int nodeCount_
Definition: ADFCombiner.cc:255
DSDBManager::addConfiguration
RowID addConfiguration(const MachineConfiguration &conf)
Definition: DSDBManager.cc:299
ADFCombiner::ExtraPN_
static const TCEString ExtraPN_
Definition: ADFCombiner.cc:240
ADFCombiner::selector_
ComponentImplementationSelector selector_
Selector used by the plugin.
Definition: ADFCombiner.cc:236
DSDBManager::addArchitecture
RowID addArchitecture(const TTAMachine::Machine &mom)
Definition: DSDBManager.cc:191
ADFCombiner::buildIDF_
bool buildIDF_
Definition: ADFCombiner.cc:257
TTAMachine::BaseRegisterFile::port
virtual RFPort * port(const std::string &name) const
Definition: BaseRegisterFile.cc:129
TTAMachine::Machine::registerFileNavigator
virtual RegisterFileNavigator registerFileNavigator() const
Definition: Machine.cc:450
DesignSpaceExplorerPlugin::explore
virtual std::vector< RowID > explore(const RowID &startPointConfigurationID, const unsigned int &maxIter=0)
Definition: DesignSpaceExplorerPlugin.cc:174
TTAMachine::Machine::addFunctionUnit
virtual void addFunctionUnit(FunctionUnit &unit)
Definition: Machine.cc:202
ADFCombiner::addAddressSpaces
void addAddressSpaces(TTAMachine::Machine *finalMach, TTAMachine::Machine *nodeMach)
Definition: ADFCombiner.cc:621
ADFCombiner::addComponents
void addComponents(TTAMachine::Machine *finalMach, TTAMachine::Machine *nodeMach, TTAMachine::Machine *extraMach, unsigned nodeCount)
Definition: ADFCombiner.cc:320
FullyConnectedCheck
Definition: FullyConnectedCheck.hh:51
TTAMachine::Component::machine
virtual Machine * machine() const
TTAMachine::Port::name
virtual std::string name() const
Definition: Port.cc:141
ADFCombiner::SharedLSULatencyPN_
static const TCEString SharedLSULatencyPN_
Definition: ADFCombiner.cc:250
ADFCombiner::GuardSet
std::set< TTAMachine::Guard *, TTAMachine::MachinePart::Comparator > GuardSet
Definition: ADFCombiner.cc:299
TCEString
Definition: TCEString.hh:53
TTAMachine::Machine::busNavigator
virtual BusNavigator busNavigator() const
Definition: Machine.cc:356
ADFCombiner::DataLSULatencyPN_
static const TCEString DataLSULatencyPN_
Definition: ADFCombiner.cc:251
TTAMachine::Port::outputSocket
virtual Socket * outputSocket() const
Definition: Port.cc:281
ComponentAlreadyExists
Definition: Exception.hh:510
DesignSpaceExplorerPlugin::name
virtual std::string name() const
Definition: DesignSpaceExplorerPlugin.cc:77
ADFCombiner::VLSUConnectionBusesPN_
static const TCEString VLSUConnectionBusesPN_
Definition: ADFCombiner.cc:252
TTAMachine::HWOperation::pipeline
ExecutionPipeline * pipeline() const
Definition: HWOperation.cc:201
ADFCombiner::addRing_
bool addRing_
Definition: ADFCombiner.cc:261
TTAMachine::ExecutionPipeline
Definition: ExecutionPipeline.hh:55
ADFCombiner::addGuardsToBuses
void addGuardsToBuses(std::map< Bus *, std::pair< Bus *, int > > &busMapping, GuardSet &extrasGuards)
Definition: ADFCombiner.cc:378
TTAMachine::Machine::Navigator::item
ComponentType * item(int index) const
TTAMachine::PortGuard
Definition: Guard.hh:99
TTAMachine::FunctionUnit::operation
virtual HWOperation * operation(const std::string &name) const
Definition: FunctionUnit.cc:363
TTAMachine::RegisterFile
Definition: RegisterFile.hh:47
TTAMachine::Port::isConnectedTo
virtual bool isConnectedTo(const Socket &socket) const
Definition: Port.cc:393
TTAMachine::FunctionUnit::operationPort
virtual FUPort * operationPort(const std::string &name) const
Definition: FunctionUnit.cc:224
ComponentImplementationSelector::selectComponentsToConf
void selectComponentsToConf(DSDBManager::MachineConfiguration &conf, DSDBManager &dsdb, TTAMachine::Machine *mach=NULL, const std::string &icDecoder="ic_hdb", const std::string &icDecoderHDB="asic_130nm_1.5V.hdb", const double &frequency=0, const double &maxArea=0)
Definition: ComponentImplementationSelector.cc:601
ADFCombiner::getNodeComponentName
TCEString getNodeComponentName(TCEString originalName, int idx)
Definition: ADFCombiner.cc:1402
TTAMachine::Segment::name
std::string name() const
ADFCombiner::addRegisterFiles
void addRegisterFiles(TTAMachine::Machine *finalMach, TTAMachine::Machine *nodeMach, unsigned nodeCount)
Definition: ADFCombiner.cc:478
TTAMachine::BaseRegisterFile::width
virtual int width() const
DSDBManager::MachineConfiguration::architectureID
RowID architectureID
Definition: DSDBManager.hh:79
TTAMachine::FunctionUnit::setName
virtual void setName(const std::string &name)
Definition: FunctionUnit.cc:118
FullyConnectedCheck::connectControlUnit
void connectControlUnit(TTAMachine::ControlUnit &gcu) const
Definition: FullyConnectedCheck.cc:363
TTAMachine::Machine::Navigator
Definition: Machine.hh:186
TTAMachine::Machine::addSocket
virtual void addSocket(Socket &socket)
Definition: Machine.cc:157
TTAMachine::Bus::segmentCount
virtual int segmentCount() const
Definition: Bus.cc:385
DesignSpaceExplorerPlugin::addParameter
void addParameter(TCEString name, ExplorerPluginParameterType type, bool compulsory=true, TCEString defaultValue="", TCEString description="")
ADFCombiner::getExtraComponentName
TCEString getExtraComponentName(TCEString originalName)
Definition: ADFCombiner.cc:1406
ADFCombiner::addStar_
bool addStar_
Definition: ADFCombiner.cc:263
ADFCombiner::addBar_
bool addBar_
Definition: ADFCombiner.cc:262
ADFCombiner::readParameters
void readParameters()
Definition: ADFCombiner.cc:273
TTAMachine::RegisterFile::setName
virtual void setName(const std::string &name)
Definition: RegisterFile.cc:198
ADFCombiner::addBroadcast_
bool addBroadcast_
Definition: ADFCombiner.cc:260
TTAMachine::Machine
Definition: Machine.hh:73
ADFCombiner::findGuards
GuardSet findGuards(TTAMachine::Machine *mach)
Definition: ADFCombiner.cc:302
ADFCombiner::BuildIDFPN_
static const TCEString BuildIDFPN_
Definition: ADFCombiner.cc:241
ADFCombiner::sharedLSULatency_
int sharedLSULatency_
Definition: ADFCombiner.cc:266
TTAMachine::Bus::copyGuardsTo
virtual void copyGuardsTo(Bus &other) const
Definition: Bus.cc:1155
TTAMachine::Machine::loadFromADF
static Machine * loadFromADF(const std::string &adfFileName)
Definition: Machine.cc:905
ADFCombiner::createPortsAndSockets
void createPortsAndSockets(TTAMachine::Machine *finalMach, TTAMachine::RegisterFile *rf, TTAMachine::Bus *newBus, TCEString name, bool readOnly, int nodeNumber=-1)
Definition: ADFCombiner.cc:978
TTAMachine::ImmediateUnit
Definition: ImmediateUnit.hh:50