OpenASIP  2.0
Public Member Functions | Protected Member Functions | Static Protected Attributes | Private Member Functions | Private Attributes | List of all members
PlatformIntegrator Class Referenceabstract

#include <PlatformIntegrator.hh>

Inheritance diagram for PlatformIntegrator:
Inheritance graph
Collaboration diagram for PlatformIntegrator:
Collaboration graph

Public Member Functions

 PlatformIntegrator ()
 
 PlatformIntegrator (const TTAMachine::Machine *machine, const IDF::MachineImplementation *idf, ProGe::HDL hdl, TCEString progeOutputDir, TCEString coreEntityName, TCEString outputDir, TCEString programName, int targetClockFreq, std::ostream &warningStream, std::ostream &errorStream, const MemInfo &imem, MemType dmemType)
 
virtual ~PlatformIntegrator ()
 
virtual void integrateProcessor (const ProGe::NetlistBlock *progeBlock)=0
 
virtual TCEString deviceFamily () const =0
 
virtual void setDeviceFamily (TCEString devFamily)=0
 
void setDeviceName (TCEString devName)
 
TCEString deviceName () const
 
virtual TCEString devicePackage () const =0
 
virtual TCEString deviceSpeedClass () const =0
 
virtual int targetClockFrequency () const
 
virtual void printInfo (std::ostream &stream) const =0
 
const ProGe::NetlistBlockprogeBlock () const
 
const ProGe::NetlistBlocktoplevelBlock () const
 
void setSharedOutputDir (const TCEString &sharedDir)
 
TCEString outputPath () const
 
TCEString outputFilePath (TCEString fileName, bool absolute=false) const
 
TCEString coreEntityName () const
 
const TTAMachine::Machinemachine () const
 
const IDF::MachineImplementationidf () const
 
const MemInfoimemInfo () const
 
const MemInfodmemInfo (TTAMachine::AddressSpace *as) const
 
const MemInfodmemInfo (int index) const
 
int dmemCount () const
 
ProGe::NetlistPortclockPort () const
 
ProGe::NetlistPortresetPort () const
 

Protected Member Functions

ProGe::NetlistBlockintegratorBlock ()
 
virtual void initPlatformNetlist (const ProGe::NetlistBlock *progeBlock)
 
virtual bool integrateCore (const ProGe::NetlistBlock &cores, int coreId)
 
virtual void exportUnconnectedPorts (int coreId)
 
virtual void connectToplevelPort (const ProGe::NetlistPort &corePort, const TCEString signalPrefix="")
 
virtual TCEString pinTag () const =0
 
virtual bool chopTaggedSignals () const =0
 
virtual bool hasPinTag (const TCEString &signal) const
 
void copyProgeBlockToNetlist (const ProGe::NetlistBlock *progeBlock)
 
virtual bool createMemories (int coreId)
 
virtual bool generateMemory (MemoryGenerator &memGen, std::vector< TCEString > &generatedFiles, int memIndex, int coreId)
 
virtual MemoryGeneratorimemInstance (MemInfo imem, int coreId)=0
 
virtual MemoryGeneratordmemInstance (MemInfo dmem, TTAMachine::FunctionUnit &lsuArch, std::vector< std::string > lsuPorts)=0
 
virtual void writeNewToplevel ()
 
virtual ProjectFileGeneratorprojectFileGenerator () const =0
 
void addProGeFiles () const
 
TCEString programName () const
 
TCEString progeFilePath (TCEString fileName, bool absolute=false) const
 
TCEString chopSignalToTag (const TCEString &original, const TCEString &tag) const
 
void progeOutputHdlFiles (std::vector< TCEString > &files) const
 
std::ostream & warningStream () const
 
std::ostream & errorStream () const
 
TCEString platformEntityName () const
 
void parseDataMemories ()
 
void clearDataMemories ()
 
MemInfo readLsuParameters (const TTAMachine::FunctionUnit &lsu)
 

Static Protected Attributes

static const TCEString TTA_CORE_CLK = "clk"
 
static const TCEString TTA_CORE_RSTX = "rstx"
 

Private Member Functions

void createOutputDir ()
 
std::vector< std::string > loadFUExternalPorts (TTAMachine::FunctionUnit &fu) const
 

Private Attributes

const TTAMachine::Machinemachine_
 
const IDF::MachineImplementationidf_
 
ProGe::NetlistBlockintegratorBlock_
 
ProGe::HDL hdl_
 
TCEString progeOutputDir_
 
TCEString sharedOutputDir_
 
TCEString coreEntityName_
 
TCEString outputDir_
 
TCEString programName_
 
TCEString deviceName_
 
int targetFrequency_
 
std::ostream & warningStream_
 
std::ostream & errorStream_
 
ProGe::NetlistBlockttaCores_
 
MemInfo imem_
 
MemType dmemType_
 
std::map< TTAMachine::AddressSpace *, MemInfodmem_
 
std::vector< TTAMachine::FunctionUnit * > lsus_
 
ProGe::NetlistPortclkPort_
 
ProGe::NetlistPortresetPort_
 
std::multimap< TCEString, const ProGe::NetlistPort * > * unconnectedPorts_
 

Detailed Description

Definition at line 65 of file PlatformIntegrator.hh.

Constructor & Destructor Documentation

◆ PlatformIntegrator() [1/2]

PlatformIntegrator::PlatformIntegrator ( )

Definition at line 68 of file PlatformIntegrator.cc.

69  : machine_(NULL),
70  idf_(NULL),
71  integratorBlock_(NULL),
73  progeOutputDir_(""),
74  coreEntityName_(""),
75  outputDir_(""),
76  programName_(""),
78  warningStream_(std::cout),
79  errorStream_(std::cerr),
80  ttaCores_(NULL),
81  imem_(),
83  dmem_(),
84  lsus_(),
85  clkPort_(NULL),
86  resetPort_(NULL),
87  unconnectedPorts_(NULL) {
88  imem_.type = UNKNOWN;
89 }

References imem_, MemInfo::type, and UNKNOWN.

◆ PlatformIntegrator() [2/2]

PlatformIntegrator::PlatformIntegrator ( const TTAMachine::Machine machine,
const IDF::MachineImplementation idf,
ProGe::HDL  hdl,
TCEString  progeOutputDir,
TCEString  coreEntityName,
TCEString  outputDir,
TCEString  programName,
int  targetClockFreq,
std::ostream &  warningStream,
std::ostream &  errorStream,
const MemInfo imem,
MemType  dmemType 
)

Definition at line 91 of file PlatformIntegrator.cc.

97  : machine_(machine),
98  idf_(idf),
99  integratorBlock_(NULL),
100  hdl_(hdl),
101  progeOutputDir_(progeOutputDir),
102  sharedOutputDir_(""),
104  outputDir_(outputDir),
106  targetFrequency_(targetClockFreq),
109  ttaCores_(NULL),
110  imem_(imem),
111  dmemType_(dmemType),
112  dmem_(),
113  lsus_(),
114  clkPort_(NULL),
115  resetPort_(NULL),
116  unconnectedPorts_(NULL) {
119 
120  createOutputDir();
121 }

References createOutputDir(), integratorBlock_, and platformEntityName().

Here is the call graph for this function:

◆ ~PlatformIntegrator()

PlatformIntegrator::~PlatformIntegrator ( )
virtual

Definition at line 123 of file PlatformIntegrator.cc.

123 { delete integratorBlock_; }

References integratorBlock_.

Member Function Documentation

◆ addProGeFiles()

void PlatformIntegrator::addProGeFiles ( ) const
protected

Definition at line 640 of file PlatformIntegrator.cc.

640  {
641 
642  vector<TCEString> progeOutFiles;
643  progeOutputHdlFiles(progeOutFiles);
644  for (unsigned int i = 0; i < progeOutFiles.size(); i++) {
645  projectFileGenerator()->addHdlFile(progeOutFiles.at(i));
646  }
647 }

References ProjectFileGenerator::addHdlFile(), progeOutputHdlFiles(), and projectFileGenerator().

Referenced by AlteraIntegrator::integrateProcessor(), AlmaIFIntegrator::integrateProcessor(), Stratix3DevKitIntegrator::integrateProcessor(), and Stratix2DSPBoardIntegrator::integrateProcessor().

Here is the call graph for this function:

◆ chopSignalToTag()

TCEString PlatformIntegrator::chopSignalToTag ( const TCEString original,
const TCEString tag 
) const
protected

Utility function for processing vhdl signals.

Signal name format is fu_name_<TAG>_name : <dir> <type> {);} This function chops the signal name in such way that the name starts from <TAG> i.e. returns <TAG>_name : <dir> <type> {);}

Parameters
originalOriginal signal name
tagStarting tag
Returns
Chopped string

Definition at line 185 of file PlatformIntegrator.cc.

187  {
188 
189  TCEString signal = original;
190  if (original.find(tag) != TCEString::npos) {
191  signal = original.substr(original.find(tag));
192  }
193  return StringTools::trim(signal);
194 }

References StringTools::trim().

Referenced by connectToplevelPort().

Here is the call graph for this function:

◆ chopTaggedSignals()

virtual bool PlatformIntegrator::chopTaggedSignals ( ) const
protectedpure virtual

◆ clearDataMemories()

void PlatformIntegrator::clearDataMemories ( )
protected

Definition at line 361 of file PlatformIntegrator.cc.

361  {
362  dmem_.clear();
363  lsus_.clear();
364 }

References dmem_, and lsus_.

◆ clockPort()

ProGe::NetlistPort * PlatformIntegrator::clockPort ( ) const

Definition at line 692 of file PlatformIntegrator.cc.

692  {
693 
694  if (clkPort_ == NULL) {
695  TCEString msg;
696  msg << "PlatformIntegrator was not initialized properly";
697  throw ObjectNotInitialized(__FILE__, __LINE__, __func__, msg);
698  }
699  return clkPort_;
700 }

References __func__, and clkPort_.

Referenced by XilinxBlockRamGenerator::addMemory(), MemoryGenerator::addMemory(), MemoryGenerator::corePortName(), AlmaIFIntegrator::initAlmaifBlock(), AlmaIFIntegrator::integrateCore(), and integrateCore().

◆ connectToplevelPort()

void PlatformIntegrator::connectToplevelPort ( const ProGe::NetlistPort corePort,
const TCEString  signalPrefix = "" 
)
protectedvirtual

Definition at line 464 of file PlatformIntegrator.cc.

465  {
466  TCEString toplevelName = corePort.name();
467  if (chopTaggedSignals() && hasPinTag(toplevelName)) {
468  toplevelName = signalPrefix + chopSignalToTag(toplevelName, pinTag());
469  }
470  NetlistPort* topPort = NULL;
471  if (corePort.realWidthAvailable()) {
472  int width = corePort.realWidth();
473  if (width == 0 || width == 1) {
474  topPort = new NetlistPort(
475  toplevelName, corePort.widthFormula(), corePort.realWidth(),
476  ProGe::BIT, corePort.direction(), *integratorBlock());
477  } else {
478  topPort = new NetlistPort(
479  toplevelName, corePort.widthFormula(), corePort.realWidth(),
481  }
482  } else {
483  topPort = new NetlistPort(
484  toplevelName, corePort.widthFormula(), corePort.dataType(),
485  corePort.direction(), *integratorBlock());
486  }
487  if (topPort->dataType() == corePort.dataType()) {
488  integratorBlock()->netlist().connect(*topPort, corePort);
489  } else {
490  integratorBlock()->netlist().connect(*topPort, corePort, 0, 0, 1);
491  }
492 }

References ProGe::BIT, ProGe::BIT_VECTOR, chopSignalToTag(), chopTaggedSignals(), ProGe::Netlist::connect(), ProGe::NetlistPort::dataType(), ProGe::NetlistPort::direction(), hasPinTag(), integratorBlock(), ProGe::NetlistPort::name(), ProGe::NetlistBlock::netlist(), pinTag(), ProGe::NetlistPort::realWidth(), ProGe::NetlistPort::realWidthAvailable(), and ProGe::NetlistPort::widthFormula().

Referenced by AlmaIFIntegrator::exportUnconnectedPorts(), and exportUnconnectedPorts().

Here is the call graph for this function:

◆ copyProgeBlockToNetlist()

void PlatformIntegrator::copyProgeBlockToNetlist ( const ProGe::NetlistBlock progeBlock)
protected

Copies the ProGe generated toplevel block (i.e. tta core(s)) to a new netlist.

Parameters
progeBlockThe toplevel netlist block created by ProGe

Definition at line 502 of file PlatformIntegrator.cc.

503  {
504  ttaCores_ = progeBlock->shallowCopy("core");
506  top.addSubBlock(ttaCores_);
507 
508  // copy parameters to the current toplevel
509  for (size_t i = 0; i < ttaCores_->parameterCount(); i++) {
510  // Filter out some parameters not usable in the integrator block.
511  if (ttaCores_->parameter(i).name() == "core_id") {
512  continue;
513  }
514 
516  }
517 
518  // copy package references to the current toplevel
519  for (size_t i = 0; i < ttaCores_->packageCount(); i++) {
520  top.addPackage(ttaCores_->package(i));
521  }
522 
523  for (size_t i = 0; i < ttaCores_->netlist().parameterCount(); i++) {
525  }
526 }

References ProGe::NetlistBlock::addPackage(), ProGe::NetlistBlock::addSubBlock(), integratorBlock_, ProGe::Parameter::name(), ProGe::NetlistBlock::netlist(), ProGe::NetlistBlock::package(), ProGe::NetlistBlock::packageCount(), ProGe::NetlistBlock::parameter(), ProGe::Netlist::parameter(), ProGe::BaseNetlistBlock::parameterCount(), progeBlock(), ProGe::NetlistBlock::setParameter(), ProGe::Netlist::setParameter(), ProGe::NetlistBlock::shallowCopy(), and ttaCores_.

Referenced by initPlatformNetlist().

Here is the call graph for this function:

◆ coreEntityName()

TCEString PlatformIntegrator::coreEntityName ( ) const

Return TTA core entity name

Definition at line 126 of file PlatformIntegrator.cc.

126  {
127 
128  return coreEntityName_;
129 }

References coreEntityName_.

Referenced by AlmaIFIntegrator::addAlmaifFiles(), platformEntityName(), progeOutputHdlFiles(), MemoryGenerator::ttaCoreName(), and writeNewToplevel().

◆ createMemories()

bool PlatformIntegrator::createMemories ( int  coreId)
protectedvirtual

Definition at line 542 of file PlatformIntegrator.cc.

542  {
543  assert(imem_.type != UNKNOWN);
544 
545  int imemIndex = 0;
546  MemoryGenerator& imemGen = imemInstance(imem_, coreId);
547  vector<TCEString> imemFiles;
548 
549  if (imem_.type != NONE) {
550  if (!generateMemory(imemGen, imemFiles, imemIndex, coreId)) {
551  return false;
552  }
553  if (imemFiles.size() != 0) {
554  projectFileGenerator()->addHdlFiles(imemFiles);
555  }
556  }
557 
558  for (unsigned int i = 0; i < lsus_.size(); i++) {
559  TTAMachine::FunctionUnit* lsuArch = lsus_.at(i);
560  std::vector<std::string> ports = loadFUExternalPorts(*lsuArch);
561 
562  TTAMachine::AddressSpace* as = lsuArch->addressSpace();
563  assert(dmem_.find(as) != dmem_.end() && "Address space not found!");
564 
565  MemoryGenerator& dmemGen =
566  dmemInstance(dmem_.find(as)->second, *lsuArch, ports);
567  vector<TCEString> dmemFiles;
568  if (!generateMemory(dmemGen, dmemFiles, i, coreId)) {
569  return false;
570  }
571  if (dmemFiles.size() != 0) {
572  projectFileGenerator()->addHdlFiles(dmemFiles);
573  }
574  }
575  return true;
576 }

References ProjectFileGenerator::addHdlFiles(), TTAMachine::FunctionUnit::addressSpace(), assert, dmem_, dmemInstance(), generateMemory(), imem_, imemInstance(), loadFUExternalPorts(), lsus_, NONE, projectFileGenerator(), MemInfo::type, and UNKNOWN.

Referenced by AlmaIFIntegrator::integrateCore(), and integrateCore().

Here is the call graph for this function:

◆ createOutputDir()

void PlatformIntegrator::createOutputDir ( )
private

Definition at line 260 of file PlatformIntegrator.cc.

260  {
261 
263  if (!FileSystem::createDirectory(absolute)) {
264  throw IOException(__FILE__, __LINE__, "PlatformIntegrator",
265  "Couldn't create dir " + absolute);
266  }
267 }

References FileSystem::absolutePathOf(), FileSystem::createDirectory(), and outputDir_.

Referenced by PlatformIntegrator().

Here is the call graph for this function:

◆ deviceFamily()

virtual TCEString PlatformIntegrator::deviceFamily ( ) const
pure virtual

◆ deviceName()

TCEString PlatformIntegrator::deviceName ( ) const
inline

Definition at line 114 of file PlatformIntegrator.hh.

114 { return deviceName_; }

References deviceName_.

Referenced by AlmaIFIntegrator::addAlmaifFiles(), and QuartusProjectGenerator::writeQSFFile().

◆ devicePackage()

virtual TCEString PlatformIntegrator::devicePackage ( ) const
pure virtual

◆ deviceSpeedClass()

virtual TCEString PlatformIntegrator::deviceSpeedClass ( ) const
pure virtual

◆ dmemCount()

int PlatformIntegrator::dmemCount ( ) const

Definition at line 685 of file PlatformIntegrator.cc.

685  {
686 
687  return dmem_.size();
688 }

References dmem_.

Referenced by IPXactFileGenerator::addAddressSpaces().

◆ dmemInfo() [1/2]

const MemInfo & PlatformIntegrator::dmemInfo ( int  index) const

Definition at line 667 of file PlatformIntegrator.cc.

667  {
668 
669  if (index > static_cast<int>(dmem_.size())) {
670  TCEString msg = "Data memory index out of range";
671  throw OutOfRange(__FILE__, __LINE__, "PlatformIntegrator", msg);
672  }
673  std::map<TTAMachine::AddressSpace*, MemInfo>::const_iterator iter =
674  dmem_.begin();
675  int i = 0;
676  while (i < index) {
677  iter++;
678  i++;
679  }
680  assert(iter != dmem_.end());
681  return iter->second;
682 }

References assert, and dmem_.

◆ dmemInfo() [2/2]

const MemInfo & PlatformIntegrator::dmemInfo ( TTAMachine::AddressSpace as) const

Definition at line 657 of file PlatformIntegrator.cc.

657  {
658 
659  if (as == NULL || dmem_.find(as) == dmem_.end()) {
660  TCEString msg = "Invalid address space";
661  throw InvalidData(__FILE__, __LINE__, "PlatformIntegrator", msg);
662  }
663  return dmem_.find(as)->second;
664 }

References dmem_.

◆ dmemInstance()

virtual MemoryGenerator& PlatformIntegrator::dmemInstance ( MemInfo  dmem,
TTAMachine::FunctionUnit lsuArch,
std::vector< std::string >  lsuPorts 
)
protectedpure virtual

◆ errorStream()

std::ostream & PlatformIntegrator::errorStream ( ) const
protected

◆ exportUnconnectedPorts()

void PlatformIntegrator::exportUnconnectedPorts ( int  coreId)
protectedvirtual

Reimplemented in AlmaIFIntegrator.

Definition at line 453 of file PlatformIntegrator.cc.

453  {
454  const NetlistBlock& core = progeBlock();
455  for (size_t i = 0; i < core.portCount(); i++) {
456  const NetlistPort& port = core.port(i);
457  if (!integratorBlock()->netlist().isPortConnected(port)) {
458  connectToplevelPort(port);
459  }
460  }
461 }

References connectToplevelPort(), integratorBlock(), ProGe::NetlistBlock::port(), ProGe::NetlistBlock::portCount(), and progeBlock().

Referenced by AlmaIFIntegrator::exportUnconnectedPorts(), and integrateCore().

Here is the call graph for this function:

◆ generateMemory()

bool PlatformIntegrator::generateMemory ( MemoryGenerator memGen,
std::vector< TCEString > &  generatedFiles,
int  memIndex,
int  coreId 
)
protectedvirtual

Definition at line 579 of file PlatformIntegrator.cc.

581  {
582  const NetlistBlock& ttaCores = progeBlock();
583 
584  vector<TCEString> reasons;
585  if (!memGen.isCompatible(ttaCores, coreId, reasons)) {
586  errorStream() << "TTA core doesn't have compatible memory "
587  <<"interface:" << std::endl;
588  for (unsigned int i = 0; i < reasons.size(); i++) {
589  errorStream() << reasons.at(i) << std::endl;
590  }
591  return false;
592  }
593 
594  memGen.addMemory(ttaCores, *integratorBlock(), memIndex, coreId);
595 
596  if (memGen.generatesComponentHdlFile()) {
597  generatedFiles =
599  if (generatedFiles.size() == 0) {
600  errorStream() << "Failed to create mem component" << endl;
601  return false;
602  }
603  }
604 
605  return true;
606 }

References MemoryGenerator::addMemory(), errorStream(), MemoryGenerator::generateComponentFile(), MemoryGenerator::generatesComponentHdlFile(), integratorBlock(), MemoryGenerator::isCompatible(), outputPath(), and progeBlock().

Referenced by createMemories().

Here is the call graph for this function:

◆ hasPinTag()

bool PlatformIntegrator::hasPinTag ( const TCEString signal) const
protectedvirtual

Definition at line 495 of file PlatformIntegrator.cc.

495  {
496 
497  return signal.find(pinTag()) != TCEString::npos;
498 }

References pinTag().

Referenced by connectToplevelPort().

Here is the call graph for this function:

◆ idf()

const IDF::MachineImplementation * PlatformIntegrator::idf ( ) const

Definition at line 304 of file PlatformIntegrator.cc.

304  {
305 
306  return idf_;
307 }

References idf_.

Referenced by AlmaIFIntegrator::AlmaIFIntegrator(), and loadFUExternalPorts().

◆ imemInfo()

const MemInfo & PlatformIntegrator::imemInfo ( ) const

◆ imemInstance()

virtual MemoryGenerator& PlatformIntegrator::imemInstance ( MemInfo  imem,
int  coreId 
)
protectedpure virtual

Implemented in AlmaIFIntegrator, and AlteraIntegrator.

Referenced by createMemories().

◆ initPlatformNetlist()

void PlatformIntegrator::initPlatformNetlist ( const ProGe::NetlistBlock progeBlock)
protectedvirtual

Initializes the platform integrator netlist

Copies a TTA core to a new netlist, adds clock and reset ports to the new netlist.

Parameters
progeBlockThe toplevel netlist block created by ProGe

Definition at line 317 of file PlatformIntegrator.cc.

318  {
319  NetlistBlock* highestBlock = integratorBlock_;
320  // Must add ports to highest block *before* copying tta toplevel
321  clkPort_ = new NetlistPort(
322  TTA_CORE_CLK, "0", 1, ProGe::BIT, ProGe::IN, *highestBlock);
323  resetPort_ = new NetlistPort(
324  TTA_CORE_RSTX, "0", 1, ProGe::BIT, ProGe::IN, *highestBlock);
326 
327  if (dmemType_ != NONE) {
329  }
330 }

References ProGe::BIT, clkPort_, copyProgeBlockToNetlist(), dmemType_, ProGe::IN, integratorBlock_, NONE, parseDataMemories(), progeBlock(), resetPort_, TTA_CORE_CLK, and TTA_CORE_RSTX.

Referenced by AlteraIntegrator::integrateProcessor(), AlmaIFIntegrator::integrateProcessor(), Stratix3DevKitIntegrator::integrateProcessor(), and Stratix2DSPBoardIntegrator::integrateProcessor().

Here is the call graph for this function:

◆ integrateCore()

bool PlatformIntegrator::integrateCore ( const ProGe::NetlistBlock cores,
int  coreId 
)
protectedvirtual

Integrates a single TTA core

Parameters
coresNetlistBlock containing the core(s)
coreIdIndex of the core to be integrated

Reimplemented in AlmaIFIntegrator.

Definition at line 434 of file PlatformIntegrator.cc.

435  {
438  const NetlistPort* coreClk = cores.port(clkPortName);
439  const NetlistPort* coreRstx = cores.port(resetPortName);
440  integratorBlock()->netlist().connect(*clockPort(), *coreClk);
441  integratorBlock()->netlist().connect(*resetPort(), *coreRstx);
442 
443  if (!createMemories(coreId)) {
444  return false;
445  }
446 
447  exportUnconnectedPorts(coreId);
448 
449  return true;
450 }

References clockPort(), ProGe::Netlist::connect(), createMemories(), exportUnconnectedPorts(), integratorBlock(), ProGe::NetlistBlock::netlist(), ProGe::NetlistBlock::port(), resetPort(), TTA_CORE_CLK, and TTA_CORE_RSTX.

Referenced by AlteraIntegrator::integrateProcessor(), Stratix3DevKitIntegrator::integrateProcessor(), and Stratix2DSPBoardIntegrator::integrateProcessor().

Here is the call graph for this function:

◆ integrateProcessor()

virtual void PlatformIntegrator::integrateProcessor ( const ProGe::NetlistBlock progeBlock)
pure virtual

Integrates the TTA core(s) generated by ProGe

Parameters
progeBlockThe toplevel netlist block created by ProGe

Implemented in Stratix2DSPBoardIntegrator, Stratix3DevKitIntegrator, AlmaIFIntegrator, and AlteraIntegrator.

Referenced by ProGe::ProGeUI::integrateProcessor().

◆ integratorBlock()

ProGe::NetlistBlock * PlatformIntegrator::integratorBlock ( )
protected

◆ loadFUExternalPorts()

std::vector< std::string > PlatformIntegrator::loadFUExternalPorts ( TTAMachine::FunctionUnit fu) const
private

Definition at line 367 of file PlatformIntegrator.cc.

367  {
368  if (idf()->hasFUImplementation(fu.name())) {
370  idf()->fuImplementation(fu.name());
371  TCEString hdb = location.hdbFile();
372  int id = location.id();
374  HDB::FUEntry* entry = manager.fuByEntryID(id);
375 
376  if (!entry->hasImplementation()) {
377  TCEString msg = "HDB entry for " + fu.name() +
378  " does not contain " + "implementation!";
379  throw InvalidData(__FILE__, __LINE__, "PlatformIntegrator", msg);
380  }
381 
382  auto implementation = entry->implementation();
383 
384  std::vector<std::string> ports;
385  for (int i = 0; i > implementation.externalPortCount(); ++i) {
386  ports.push_back(implementation.externalPort(i).name());
387  }
388  return ports;
389  } else if (idf()->hasFUGeneration(fu.name())) {
390  // quick fix: assume AlmaIF ports
391  std::vector<std::string> ports = {
392  "avalid_out", "aready_in", "aaddr_out", "awren_out", "astrb_out",
393  "rvalid_in", "rready_out", "rdata_in", "adata_out"};
394  return ports;
395  } else {
396  TCEString msg = "Function Unit " + fu.name() + " does not have an " +
397  "implementation!";
398  throw InvalidData(__FILE__, __LINE__, "PlatformIntegrator", msg);
399  }
400 }

References HDB::HDBManager::fuByEntryID(), IDF::MachineImplementation::fuImplementation(), HDB::FUEntry::hasImplementation(), HDB::HDBRegistry::hdb(), IDF::UnitImplementationLocation::hdbFile(), IDF::UnitImplementationLocation::id(), idf(), HDB::FUEntry::implementation(), implementation, HDB::HDBRegistry::instance(), and TTAMachine::Component::name().

Referenced by createMemories().

Here is the call graph for this function:

◆ machine()

const TTAMachine::Machine * PlatformIntegrator::machine ( ) const

Definition at line 297 of file PlatformIntegrator.cc.

297  {
298 
299  return machine_;
300 }

References machine_.

Referenced by AlmaIFIntegrator::findMemories(), and AlmaIFIntegrator::initAlmaifBlock().

◆ outputFilePath()

TCEString PlatformIntegrator::outputFilePath ( TCEString  fileName,
bool  absolute = false 
) const

Returns string to the platform integrator output path of the fileName

Parameters
filenameName of file
absoluteReturn absolute path
Returns
Path to file

Definition at line 154 of file PlatformIntegrator.cc.

155  {
156 
157  TCEString pathToFile =
159 
160  if (absolute) {
161  pathToFile = FileSystem::absolutePathOf(pathToFile);
162  }
163 
164  return pathToFile;
165 }

References FileSystem::absolutePathOf(), FileSystem::DIRECTORY_SEPARATOR, and outputDir_.

Referenced by AlmaIFIntegrator::addAlmaifFiles(), AlmaIFIntegrator::copyPlatformFile(), SOPCBuilderFileGenerator::writeModuleProperties(), and writeNewToplevel().

Here is the call graph for this function:

◆ outputPath()

TCEString PlatformIntegrator::outputPath ( ) const

Returns the platform integrator output path string. Might not exist.

Returns
Platform Integrator output path

Definition at line 179 of file PlatformIntegrator.cc.

179  {
180  return outputDir_;
181 }

References outputDir_.

Referenced by AlmaIFIntegrator::addAlmaifFiles(), AlmaIFIntegrator::copyPlatformFile(), generateMemory(), and writeNewToplevel().

◆ parseDataMemories()

void PlatformIntegrator::parseDataMemories ( )
protected

Definition at line 334 of file PlatformIntegrator.cc.

334  {
337  for (int i = 0; i < fuNav.count(); i++) {
338  TTAMachine::FunctionUnit* fu = fuNav.item(i);
339  if (fu->hasAddressSpace()) {
341 
342  bool isLSU = false;
343  for (int i = 0; i < fu->operationCount(); ++i) {
344  std::string operation = fu->operation(i)->name();
345  std::string prefix = operation.substr(0, 2);
346  if (prefix == "ld" || prefix == "st") {
347  isLSU = true;
348  break;
349  }
350  }
351 
352  if (isLSU) {
353  dmem_[as] = readLsuParameters(*fu);
354  lsus_.push_back(fu);
355  }
356  }
357  }
358 }

References TTAMachine::FunctionUnit::addressSpace(), TTAMachine::Machine::Navigator< ComponentType >::count(), dmem_, TTAMachine::Machine::functionUnitNavigator(), TTAMachine::FunctionUnit::hasAddressSpace(), TTAMachine::Machine::Navigator< ComponentType >::item(), lsus_, machine_, TTAMachine::HWOperation::name(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), and readLsuParameters().

Referenced by initPlatformNetlist().

Here is the call graph for this function:

◆ pinTag()

virtual TCEString PlatformIntegrator::pinTag ( ) const
protectedpure virtual

◆ platformEntityName()

TCEString PlatformIntegrator::platformEntityName ( ) const
protected

Definition at line 311 of file PlatformIntegrator.cc.

311  {
312 
313  return coreEntityName() + "_toplevel";
314 }

References coreEntityName().

Referenced by PlatformIntegrator(), and writeNewToplevel().

Here is the call graph for this function:

◆ printInfo()

virtual void PlatformIntegrator::printInfo ( std::ostream &  stream) const
pure virtual

Prints information about the platform

Implemented in Stratix2DSPBoardIntegrator, Stratix3DevKitIntegrator, AvalonIntegrator, KoskiIntegrator, and AlmaIFIntegrator.

◆ progeBlock()

const ProGe::NetlistBlock & PlatformIntegrator::progeBlock ( ) const

◆ progeFilePath()

TCEString PlatformIntegrator::progeFilePath ( TCEString  fileName,
bool  absolute = false 
) const
protected

Returns string to the proge-output path of the fileName

Parameters
filenameName of file
absoluteReturn absolute path
Returns
Path to file

Definition at line 140 of file PlatformIntegrator.cc.

140  {
141 
142  TCEString pathToFile =
144 
145  if (absolute) {
146  pathToFile = FileSystem::absolutePathOf(pathToFile);
147  }
148 
149  return pathToFile;
150 }

References FileSystem::absolutePathOf(), FileSystem::DIRECTORY_SEPARATOR, and progeOutputDir_.

Referenced by AlmaIFIntegrator::addAlmaifFiles(), and AlmaIFIntegrator::copyPlatformFile().

Here is the call graph for this function:

◆ progeOutputHdlFiles()

void PlatformIntegrator::progeOutputHdlFiles ( std::vector< TCEString > &  files) const
protected

Appends all the vhdl files from ProGe output directory's vhdl and gcu_ic subdirectories to the given vector.

Parameters
filesVector where the filenames are appended to.

Definition at line 198 of file PlatformIntegrator.cc.

199  {
200 
201  bool makeAbsolute = false;
202  try {
203  TCEString gcuPath =
205  std::vector<std::string> gcuFiles =
206  FileSystem::directoryContents(gcuPath, makeAbsolute);
207 
208  for (unsigned int i = 0; i < gcuFiles.size(); i++) {
209  files.push_back(gcuFiles.at(i));
210  }
211  } catch (FileNotFound& e) {
212  errorStream() << "Error: " << e.errorMessage() << std::endl;
213  throw e;
214  }
215 
216  try {
217  bool foundImemMau = false;
218  TCEString imemMau = coreEntityName() + "_imem_mau_pkg.vhdl";
219 
220  TCEString vhdlPath =
222  std::vector<std::string> vhdlFiles =
223  FileSystem::directoryContents(vhdlPath, makeAbsolute);
224  for (unsigned int i = 0; i < vhdlFiles.size(); i++) {
225  if (vhdlFiles.at(i).find(imemMau) != TCEString::npos) {
226  foundImemMau = true;
227  }
228  files.push_back(vhdlFiles.at(i));
229  }
230 
231  // imem_mau_pkg was not yet present, but add it to file list
232  if (!foundImemMau) {
233  TCEString path =
234  vhdlPath + FileSystem::DIRECTORY_SEPARATOR + imemMau;
235  files.push_back(path);
236  }
237  } catch (FileNotFound& e) {
238  errorStream() << "Error: " << e.errorMessage() << std::endl;
239  throw e;
240  }
241 
242  if (!sharedOutputDir_.empty()) {
243  try {
244  std::string sharedVhdl =
246  std::vector<std::string> sharedFiles =
247  FileSystem::directoryContents(sharedVhdl, makeAbsolute);
248  for (unsigned int i = 0; i < sharedFiles.size(); i++) {
249  files.push_back(sharedFiles.at(i));
250  }
251  } catch (FileNotFound& e) {
252  errorStream() << "Error: " << e.errorMessage() << std::endl;
253  throw e;
254  }
255  }
256 }

References coreEntityName(), FileSystem::DIRECTORY_SEPARATOR, FileSystem::directoryContents(), Exception::errorMessage(), errorStream(), progeOutputDir_, and sharedOutputDir_.

Referenced by addProGeFiles().

Here is the call graph for this function:

◆ programName()

TCEString PlatformIntegrator::programName ( ) const
protected

Returns the scheduled program name without .tpef ending

Definition at line 133 of file PlatformIntegrator.cc.

133  {
134 
135  return programName_;
136 }

References programName_.

Referenced by AlteraIntegrator::dmemInstance(), KoskiIntegrator::dmemInstance(), Stratix2DSPBoardIntegrator::dmemInstance(), AlteraIntegrator::imemInstance(), and AlmaIFIntegrator::imemInstance().

◆ projectFileGenerator()

virtual ProjectFileGenerator* PlatformIntegrator::projectFileGenerator ( ) const
protectedpure virtual

◆ readLsuParameters()

MemInfo PlatformIntegrator::readLsuParameters ( const TTAMachine::FunctionUnit lsu)
protected

Definition at line 403 of file PlatformIntegrator.cc.

403  {
404 
405  MemInfo dmem;
406  dmem.type = dmemType_;
407  dmem.mauWidth = lsu.addressSpace()->width();
408  unsigned int internalAddrw =
410  unsigned int dataWidth = 0;
411  for (int i = 0; i < lsu.operationPortCount(); i++) {
412  TTAMachine::FUPort* port = lsu.operationPort(i);
413  if (port->isInput() && !port->isTriggering()) {
414  dataWidth = std::max((unsigned)port->width(), dataWidth);
415  }
416  }
417  dmem.widthInMaus = static_cast<int>(
418  ceil(static_cast<double>(dataWidth)/dmem.mauWidth));
419  int bytemaskWidth = 0;
420  if (dmem.widthInMaus > 1) {
421  unsigned int maus = static_cast<unsigned int>(dmem.widthInMaus) - 1;
422  bytemaskWidth = MathTools::requiredBits(maus);
423  }
424  dmem.portAddrw = internalAddrw - bytemaskWidth;
425  unsigned long int lastAddr = lsu.addressSpace()->end();
426  dmem.asAddrw = MathTools::requiredBits(lastAddr);
427  dmem.asName = lsu.addressSpace()->name();
428  dmem.lsuName = lsu.name();
429  dmem.isShared = false;
430  return dmem;
431 }

References TTAMachine::FunctionUnit::addressSpace(), MemInfo::asAddrw, MemInfo::asName, dmemType_, TTAMachine::AddressSpace::end(), TTAMachine::Port::isInput(), MemInfo::isShared, TTAMachine::FUPort::isTriggering(), MemInfo::lsuName, MemInfo::mauWidth, TTAMachine::Component::name(), TTAMachine::FunctionUnit::operationPort(), TTAMachine::FunctionUnit::operationPortCount(), MemInfo::portAddrw, MathTools::requiredBits(), MemInfo::type, TTAMachine::BaseFUPort::width(), TTAMachine::AddressSpace::width(), and MemInfo::widthInMaus.

Referenced by AlmaIFIntegrator::findMemories(), and parseDataMemories().

Here is the call graph for this function:

◆ resetPort()

ProGe::NetlistPort * PlatformIntegrator::resetPort ( ) const

Definition at line 704 of file PlatformIntegrator.cc.

704  {
705 
706  if (resetPort_ == NULL) {
707  TCEString msg;
708  msg << "PlatformIntegrator was not initialized properly";
709  throw ObjectNotInitialized(__FILE__, __LINE__, __func__, msg);
710  }
711  return resetPort_;
712 }

References __func__, and resetPort_.

Referenced by XilinxBlockRamGenerator::addMemory(), MemoryGenerator::addMemory(), MemoryGenerator::corePortName(), AlmaIFIntegrator::initAlmaifBlock(), AlmaIFIntegrator::integrateCore(), and integrateCore().

◆ setDeviceFamily()

virtual void PlatformIntegrator::setDeviceFamily ( TCEString  devFamily)
pure virtual

Set the FPGA device family.

Intended for TTA IP integration. Integrator can device whether this overrides the default device family.

Implemented in Stratix2DSPBoardIntegrator, Stratix3DevKitIntegrator, AlmaIFIntegrator, AvalonIntegrator, and KoskiIntegrator.

Referenced by ProGe::ProGeUI::integrateProcessor().

◆ setDeviceName()

void PlatformIntegrator::setDeviceName ( TCEString  devName)
inline

Set or get the FPGA device name.

This is used for synthesis scripts by AlmaIFIntegrator and QuartusProjectGenerator.

Definition at line 113 of file PlatformIntegrator.hh.

113 { deviceName_ = devName; }

References deviceName_.

Referenced by ProGe::ProGeUI::integrateProcessor(), Stratix2DSPBoardIntegrator::Stratix2DSPBoardIntegrator(), and Stratix3DevKitIntegrator::Stratix3DevKitIntegrator().

◆ setSharedOutputDir()

void PlatformIntegrator::setSharedOutputDir ( const TCEString sharedDir)

Set proge share output directory if it differs from ProGe output dir

Definition at line 169 of file PlatformIntegrator.cc.

169  {
170 
171  if (FileSystem::absolutePathOf(sharedDir) !=
173  sharedOutputDir_ = sharedDir;
174  }
175 }

References FileSystem::absolutePathOf(), progeOutputDir_, and sharedOutputDir_.

Referenced by ProGe::ProGeUI::integrateProcessor().

Here is the call graph for this function:

◆ targetClockFrequency()

int PlatformIntegrator::targetClockFrequency ( ) const
virtual

◆ toplevelBlock()

const ProGe::NetlistBlock & PlatformIntegrator::toplevelBlock ( ) const

◆ warningStream()

std::ostream & PlatformIntegrator::warningStream ( ) const
protected

◆ writeNewToplevel()

void PlatformIntegrator::writeNewToplevel ( )
protectedvirtual

Definition at line 609 of file PlatformIntegrator.cc.

609  {
610 
611  ProGe::NetlistWriter* writer;
612  if (hdl_ == ProGe::VHDL) {
614  } else {
615  assert(false);
616  }
617 
618  TCEString platformDir = outputPath();
619  writer->write(platformDir);
620  delete writer;
621 
622 
623  TCEString toplevelFile =
624  outputFilePath(coreEntityName() + "_toplevel.vhdl");
625  if (!FileSystem::fileExists(toplevelFile)) {
626  TCEString msg = "NetlistWriter failed to create file " + toplevelFile;
627  throw FileNotFound(__FILE__, __LINE__, "platformIntegrator", msg);
628  }
629  projectFileGenerator()->addHdlFile(toplevelFile);
630 
631  TCEString paramFile =
632  outputFilePath(platformEntityName() + "_params_pkg.vhdl");
633  if (FileSystem::fileExists(paramFile)) {
634  projectFileGenerator()->addHdlFile(paramFile);
635  }
636 }

References ProjectFileGenerator::addHdlFile(), assert, coreEntityName(), FileSystem::fileExists(), hdl_, integratorBlock_, outputFilePath(), outputPath(), platformEntityName(), projectFileGenerator(), ProGe::VHDL, and ProGe::NetlistWriter::write().

Referenced by AlteraIntegrator::integrateProcessor(), AlmaIFIntegrator::integrateProcessor(), Stratix3DevKitIntegrator::integrateProcessor(), and Stratix2DSPBoardIntegrator::integrateProcessor().

Here is the call graph for this function:

Member Data Documentation

◆ clkPort_

ProGe::NetlistPort* PlatformIntegrator::clkPort_
private

Definition at line 340 of file PlatformIntegrator.hh.

Referenced by clockPort(), and initPlatformNetlist().

◆ coreEntityName_

TCEString PlatformIntegrator::coreEntityName_
private

Definition at line 323 of file PlatformIntegrator.hh.

Referenced by coreEntityName().

◆ deviceName_

TCEString PlatformIntegrator::deviceName_
private

Definition at line 326 of file PlatformIntegrator.hh.

Referenced by deviceName(), and setDeviceName().

◆ dmem_

std::map<TTAMachine::AddressSpace*, MemInfo> PlatformIntegrator::dmem_
private

◆ dmemType_

MemType PlatformIntegrator::dmemType_
private

Definition at line 335 of file PlatformIntegrator.hh.

Referenced by initPlatformNetlist(), and readLsuParameters().

◆ errorStream_

std::ostream& PlatformIntegrator::errorStream_
private

Definition at line 330 of file PlatformIntegrator.hh.

Referenced by errorStream().

◆ hdl_

ProGe::HDL PlatformIntegrator::hdl_
private

Definition at line 319 of file PlatformIntegrator.hh.

Referenced by writeNewToplevel().

◆ idf_

const IDF::MachineImplementation* PlatformIntegrator::idf_
private

Definition at line 315 of file PlatformIntegrator.hh.

Referenced by idf().

◆ imem_

MemInfo PlatformIntegrator::imem_
private

Definition at line 334 of file PlatformIntegrator.hh.

Referenced by createMemories(), imemInfo(), and PlatformIntegrator().

◆ integratorBlock_

ProGe::NetlistBlock* PlatformIntegrator::integratorBlock_
private

◆ lsus_

std::vector<TTAMachine::FunctionUnit*> PlatformIntegrator::lsus_
private

Definition at line 338 of file PlatformIntegrator.hh.

Referenced by clearDataMemories(), createMemories(), and parseDataMemories().

◆ machine_

const TTAMachine::Machine* PlatformIntegrator::machine_
private

Definition at line 313 of file PlatformIntegrator.hh.

Referenced by machine(), and parseDataMemories().

◆ outputDir_

TCEString PlatformIntegrator::outputDir_
private

Definition at line 324 of file PlatformIntegrator.hh.

Referenced by createOutputDir(), outputFilePath(), and outputPath().

◆ progeOutputDir_

TCEString PlatformIntegrator::progeOutputDir_
private

Definition at line 321 of file PlatformIntegrator.hh.

Referenced by progeFilePath(), progeOutputHdlFiles(), and setSharedOutputDir().

◆ programName_

TCEString PlatformIntegrator::programName_
private

Definition at line 325 of file PlatformIntegrator.hh.

Referenced by programName().

◆ resetPort_

ProGe::NetlistPort* PlatformIntegrator::resetPort_
private

Definition at line 341 of file PlatformIntegrator.hh.

Referenced by initPlatformNetlist(), and resetPort().

◆ sharedOutputDir_

TCEString PlatformIntegrator::sharedOutputDir_
private

Definition at line 322 of file PlatformIntegrator.hh.

Referenced by progeOutputHdlFiles(), and setSharedOutputDir().

◆ targetFrequency_

int PlatformIntegrator::targetFrequency_
private

Definition at line 327 of file PlatformIntegrator.hh.

Referenced by targetClockFrequency().

◆ TTA_CORE_CLK

const TCEString PlatformIntegrator::TTA_CORE_CLK = "clk"
staticprotected

◆ TTA_CORE_RSTX

const TCEString PlatformIntegrator::TTA_CORE_RSTX = "rstx"
staticprotected

◆ ttaCores_

ProGe::NetlistBlock* PlatformIntegrator::ttaCores_
private

Definition at line 332 of file PlatformIntegrator.hh.

Referenced by copyProgeBlockToNetlist(), and progeBlock().

◆ unconnectedPorts_

std::multimap<TCEString, const ProGe::NetlistPort*>* PlatformIntegrator::unconnectedPorts_
private

Definition at line 343 of file PlatformIntegrator.hh.

◆ warningStream_

std::ostream& PlatformIntegrator::warningStream_
private

Definition at line 329 of file PlatformIntegrator.hh.

Referenced by warningStream().


The documentation for this class was generated from the following files:
PlatformIntegrator::programName_
TCEString programName_
Definition: PlatformIntegrator.hh:325
IDF::UnitImplementationLocation
Definition: UnitImplementationLocation.hh:48
MemoryGenerator::generateComponentFile
virtual std::vector< TCEString > generateComponentFile(TCEString outputPath)=0
PlatformIntegrator::TTA_CORE_RSTX
static const TCEString TTA_CORE_RSTX
Definition: PlatformIntegrator.hh:304
HDB::FUEntry
Definition: FUEntry.hh:49
ProGe::NetlistBlock::netlist
virtual const Netlist & netlist() const
Definition: BaseNetlistBlock.cc:348
PlatformIntegrator::warningStream_
std::ostream & warningStream_
Definition: PlatformIntegrator.hh:329
PlatformIntegrator::clockPort
ProGe::NetlistPort * clockPort() const
Definition: PlatformIntegrator.cc:692
PlatformIntegrator::lsus_
std::vector< TTAMachine::FunctionUnit * > lsus_
Definition: PlatformIntegrator.hh:338
PlatformIntegrator::coreEntityName_
TCEString coreEntityName_
Definition: PlatformIntegrator.hh:323
PlatformIntegrator::coreEntityName
TCEString coreEntityName() const
Definition: PlatformIntegrator.cc:126
PlatformIntegrator::platformEntityName
TCEString platformEntityName() const
Definition: PlatformIntegrator.cc:311
PlatformIntegrator::chopSignalToTag
TCEString chopSignalToTag(const TCEString &original, const TCEString &tag) const
Definition: PlatformIntegrator.cc:185
FileNotFound
Definition: Exception.hh:224
FileSystem::createDirectory
static bool createDirectory(const std::string &path)
Definition: FileSystem.cc:400
TTAMachine::Component::name
virtual TCEString name() const
Definition: MachinePart.cc:125
ProGe::NetlistBlock
Definition: NetlistBlock.hh:61
TTAMachine::FunctionUnit::hasAddressSpace
virtual bool hasAddressSpace() const
Definition: FunctionUnit.cc:608
TTAMachine::AddressSpace
Definition: AddressSpace.hh:51
PlatformIntegrator::targetFrequency_
int targetFrequency_
Definition: PlatformIntegrator.hh:327
implementation
IDF::MachineImplementation * implementation
the implementation definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:61
ProGe::BIT_VECTOR
@ BIT_VECTOR
Several bits.
Definition: ProGeTypes.hh:48
MemInfo
Definition: MemoryGenerator.hh:67
ProGe::BaseNetlistBlock::parameterCount
virtual size_t parameterCount() const
Definition: BaseNetlistBlock.cc:231
OutOfRange
Definition: Exception.hh:320
PlatformIntegrator::pinTag
virtual TCEString pinTag() const =0
ProGe::VHDLNetlistWriter
Definition: VHDLNetlistWriter.hh:52
ProGe::NetlistPort::widthFormula
std::string widthFormula() const
Definition: NetlistPort.cc:316
PlatformIntegrator::parseDataMemories
void parseDataMemories()
Definition: PlatformIntegrator.cc:334
ProGe::NetlistPort::direction
Direction direction() const
Definition: NetlistPort.cc:373
ProGe::NetlistBlock::setParameter
void setParameter(const std::string &name, const std::string &type, const std::string &value)
Definition: NetlistBlock.cc:89
ProGe::NetlistWriter
Definition: NetlistWriter.hh:47
PlatformIntegrator::TTA_CORE_CLK
static const TCEString TTA_CORE_CLK
Definition: PlatformIntegrator.hh:303
HDB::HDBRegistry::hdb
CachedHDBManager & hdb(const std::string fileName)
Definition: HDBRegistry.cc:80
TTAMachine::FunctionUnit::addressSpace
virtual AddressSpace * addressSpace() const
Definition: FunctionUnit.cc:580
ProGe::NetlistBlock::packageCount
virtual size_t packageCount() const
Definition: BaseNetlistBlock.cc:694
ProGe::NetlistBlock::package
virtual const std::string & package(size_t idx) const
Definition: BaseNetlistBlock.cc:699
TTAMachine::Machine::Navigator::count
int count() const
PlatformIntegrator::createOutputDir
void createOutputDir()
Definition: PlatformIntegrator.cc:260
TTAMachine::FUPort::isTriggering
virtual bool isTriggering() const
Definition: FUPort.cc:182
PlatformIntegrator::errorStream_
std::ostream & errorStream_
Definition: PlatformIntegrator.hh:330
FileSystem::absolutePathOf
static std::string absolutePathOf(const std::string &pathName)
Definition: FileSystem.cc:303
PlatformIntegrator::createMemories
virtual bool createMemories(int coreId)
Definition: PlatformIntegrator.cc:542
ProGe::NetlistBlock::portCount
virtual size_t portCount() const
Definition: BaseNetlistBlock.cc:248
ProGe::NetlistBlock::addPackage
void addPackage(const std::string &packageName)
Definition: BaseNetlistBlock.cc:687
ProGe::Netlist::connect
bool connect(const NetlistPort &port1, const NetlistPort &port2, int port1FirstBit, int port2FirstBit, int width=1)
Definition: Netlist.cc:83
PlatformIntegrator::projectFileGenerator
virtual ProjectFileGenerator * projectFileGenerator() const =0
PlatformIntegrator::outputPath
TCEString outputPath() const
Definition: PlatformIntegrator.cc:179
PlatformIntegrator::connectToplevelPort
virtual void connectToplevelPort(const ProGe::NetlistPort &corePort, const TCEString signalPrefix="")
Definition: PlatformIntegrator.cc:464
ProjectFileGenerator::addHdlFiles
void addHdlFiles(const std::vector< TCEString > &files)
Definition: ProjectFileGenerator.cc:63
MemoryGenerator::addMemory
virtual void addMemory(const ProGe::NetlistBlock &ttaCore, ProGe::NetlistBlock &integratorBlock, int memIndex, int coreId)
Definition: MemoryGenerator.cc:119
assert
#define assert(condition)
Definition: Application.hh:86
TTAMachine::FunctionUnit
Definition: FunctionUnit.hh:55
ProGe::NetlistPort::realWidthAvailable
bool realWidthAvailable() const
Definition: NetlistPort.cc:334
TTAMachine::FUPort
Definition: FUPort.hh:46
PlatformIntegrator::ttaCores_
ProGe::NetlistBlock * ttaCores_
Definition: PlatformIntegrator.hh:332
ObjectNotInitialized
Definition: Exception.hh:640
ProGe::VHDL
@ VHDL
VHDL.
Definition: ProGeTypes.hh:41
PlatformIntegrator::sharedOutputDir_
TCEString sharedOutputDir_
Definition: PlatformIntegrator.hh:322
TTAMachine::HWOperation::name
const std::string & name() const
Definition: HWOperation.cc:141
MemInfo::type
MemType type
Definition: MemoryGenerator.hh:68
InvalidData
Definition: Exception.hh:149
MemoryGenerator::generatesComponentHdlFile
virtual bool generatesComponentHdlFile() const =0
PlatformIntegrator::resetPort
ProGe::NetlistPort * resetPort() const
Definition: PlatformIntegrator.cc:704
MemoryGenerator::isCompatible
virtual bool isCompatible(const ProGe::NetlistBlock &ttaCore, int coreId, std::vector< TCEString > &reasons) const
Definition: MemoryGenerator.cc:82
MemInfo::asAddrw
int asAddrw
Definition: MemoryGenerator.hh:72
PlatformIntegrator::hdl_
ProGe::HDL hdl_
Definition: PlatformIntegrator.hh:319
MemInfo::asName
TCEString asName
Definition: MemoryGenerator.hh:74
PlatformIntegrator::loadFUExternalPorts
std::vector< std::string > loadFUExternalPorts(TTAMachine::FunctionUnit &fu) const
Definition: PlatformIntegrator.cc:367
ProGe::Parameter::name
const TCEString & name() const
Definition: Parameter.cc:133
PlatformIntegrator::progeBlock
const ProGe::NetlistBlock & progeBlock() const
Definition: PlatformIntegrator.cc:530
__func__
#define __func__
Definition: Application.hh:67
TTAMachine::Machine::functionUnitNavigator
virtual FunctionUnitNavigator functionUnitNavigator() const
Definition: Machine.cc:380
PlatformIntegrator::idf
const IDF::MachineImplementation * idf() const
Definition: PlatformIntegrator.cc:304
PlatformIntegrator::dmem_
std::map< TTAMachine::AddressSpace *, MemInfo > dmem_
Definition: PlatformIntegrator.hh:336
TTAMachine::FunctionUnit::operationCount
virtual int operationCount() const
Definition: FunctionUnit.cc:419
HDB::HDBManager
Definition: HDBManager.hh:82
MathTools::requiredBits
static int requiredBits(unsigned long int number)
ProGe::BIT
@ BIT
One bit.
Definition: ProGeTypes.hh:47
PlatformIntegrator::machine
const TTAMachine::Machine * machine() const
Definition: PlatformIntegrator.cc:297
MemInfo::widthInMaus
int widthInMaus
Definition: MemoryGenerator.hh:70
PlatformIntegrator::generateMemory
virtual bool generateMemory(MemoryGenerator &memGen, std::vector< TCEString > &generatedFiles, int memIndex, int coreId)
Definition: PlatformIntegrator.cc:579
TTAMachine::FunctionUnit::operationPortCount
virtual int operationPortCount() const
Definition: FunctionUnit.cc:182
ProGe::NetlistBlock::shallowCopy
NetlistBlock * shallowCopy(const std::string &instanceName) const
Definition: NetlistBlock.cc:161
ProGe::NetlistPort::name
std::string name() const
Definition: NetlistPort.cc:283
PlatformIntegrator::hasPinTag
virtual bool hasPinTag(const TCEString &signal) const
Definition: PlatformIntegrator.cc:495
MemInfo::mauWidth
int mauWidth
Definition: MemoryGenerator.hh:69
ProjectFileGenerator::addHdlFile
void addHdlFile(const TCEString &file)
Definition: ProjectFileGenerator.cc:56
Exception::errorMessage
std::string errorMessage() const
Definition: Exception.cc:123
FileSystem::DIRECTORY_SEPARATOR
static const std::string DIRECTORY_SEPARATOR
Definition: FileSystem.hh:189
NONE
@ NONE
Definition: MemoryGenerator.hh:59
ProGe::NetlistWriter::write
virtual void write(const std::string &dstDirectory)=0
PlatformIntegrator::idf_
const IDF::MachineImplementation * idf_
Definition: PlatformIntegrator.hh:315
PlatformIntegrator::deviceName_
TCEString deviceName_
Definition: PlatformIntegrator.hh:326
PlatformIntegrator::dmemType_
MemType dmemType_
Definition: PlatformIntegrator.hh:335
PlatformIntegrator::outputDir_
TCEString outputDir_
Definition: PlatformIntegrator.hh:324
ProGe::NetlistPort::dataType
DataType dataType() const
Definition: NetlistPort.cc:362
PlatformIntegrator::dmemInstance
virtual MemoryGenerator & dmemInstance(MemInfo dmem, TTAMachine::FunctionUnit &lsuArch, std::vector< std::string > lsuPorts)=0
StringTools::trim
static std::string trim(const std::string &source)
Definition: StringTools.cc:55
TTAMachine::AddressSpace::width
virtual int width() const
Definition: AddressSpace.cc:155
MemInfo::isShared
bool isShared
Definition: MemoryGenerator.hh:73
PlatformIntegrator::integratorBlock
ProGe::NetlistBlock * integratorBlock()
Definition: PlatformIntegrator.cc:291
PlatformIntegrator::progeOutputHdlFiles
void progeOutputHdlFiles(std::vector< TCEString > &files) const
Definition: PlatformIntegrator.cc:198
PlatformIntegrator::programName
TCEString programName() const
Definition: PlatformIntegrator.cc:133
ProGe::NetlistPort::realWidth
int realWidth() const
Definition: NetlistPort.cc:348
PlatformIntegrator::exportUnconnectedPorts
virtual void exportUnconnectedPorts(int coreId)
Definition: PlatformIntegrator.cc:453
PlatformIntegrator::unconnectedPorts_
std::multimap< TCEString, const ProGe::NetlistPort * > * unconnectedPorts_
Definition: PlatformIntegrator.hh:343
PlatformIntegrator::readLsuParameters
MemInfo readLsuParameters(const TTAMachine::FunctionUnit &lsu)
Definition: PlatformIntegrator.cc:403
ProGe::NetlistBlock::addSubBlock
void addSubBlock(BaseNetlistBlock *subBlock, const std::string &instanceName="")
Definition: BaseNetlistBlock.cc:405
IDF::UnitImplementationLocation::id
virtual int id() const
Definition: UnitImplementationLocation.cc:127
FileSystem::fileExists
static bool fileExists(const std::string fileName)
TCEString
Definition: TCEString.hh:53
PlatformIntegrator::warningStream
std::ostream & warningStream() const
Definition: PlatformIntegrator.cc:271
UNKNOWN
@ UNKNOWN
Definition: MemoryGenerator.hh:58
ProGe::Netlist::parameter
Parameter parameter(size_t index) const
Definition: Netlist.cc:434
PlatformIntegrator::integratorBlock_
ProGe::NetlistBlock * integratorBlock_
Definition: PlatformIntegrator.hh:317
PlatformIntegrator::imem_
MemInfo imem_
Definition: PlatformIntegrator.hh:334
TTAMachine::Port::isInput
virtual bool isInput() const
Definition: Port.cc:298
ProGe::NetlistPort
Definition: NetlistPort.hh:70
PlatformIntegrator::copyProgeBlockToNetlist
void copyProgeBlockToNetlist(const ProGe::NetlistBlock *progeBlock)
Definition: PlatformIntegrator.cc:502
TTAMachine::Machine::Navigator::item
ComponentType * item(int index) const
ProGe::Netlist::setParameter
void setParameter(const std::string &name, const std::string &type, const std::string &value)
Definition: Netlist.cc:362
TTAMachine::FunctionUnit::operation
virtual HWOperation * operation(const std::string &name) const
Definition: FunctionUnit.cc:363
IDF::UnitImplementationLocation::hdbFile
virtual std::string hdbFile() const
Definition: UnitImplementationLocation.cc:99
IOException
Definition: Exception.hh:130
PlatformIntegrator::outputFilePath
TCEString outputFilePath(TCEString fileName, bool absolute=false) const
Definition: PlatformIntegrator.cc:154
TTAMachine::FunctionUnit::operationPort
virtual FUPort * operationPort(const std::string &name) const
Definition: FunctionUnit.cc:224
PlatformIntegrator::resetPort_
ProGe::NetlistPort * resetPort_
Definition: PlatformIntegrator.hh:341
HDB::FUEntry::hasImplementation
virtual bool hasImplementation() const
Definition: FUEntry.cc:74
IDF::MachineImplementation::fuImplementation
FUImplementationLocation & fuImplementation(const std::string &fu) const
Definition: MachineImplementation.cc:355
HDB::FUEntry::implementation
FUImplementation & implementation() const
Definition: FUEntry.cc:86
PlatformIntegrator::clkPort_
ProGe::NetlistPort * clkPort_
Definition: PlatformIntegrator.hh:340
MemInfo::portAddrw
int portAddrw
Definition: MemoryGenerator.hh:71
PlatformIntegrator::errorStream
std::ostream & errorStream() const
Definition: PlatformIntegrator.cc:278
HDB::HDBManager::fuByEntryID
FUEntry * fuByEntryID(RowID id) const
Definition: HDBManager.cc:2828
ProGe::NetlistBlock::parameter
virtual const Parameter & parameter(const std::string &name) const
Definition: BaseNetlistBlock.cc:198
TTAMachine::Machine::Navigator
Definition: Machine.hh:186
TTAMachine::AddressSpace::end
virtual ULongWord end() const
Definition: AddressSpace.cc:177
PlatformIntegrator::progeOutputDir_
TCEString progeOutputDir_
Definition: PlatformIntegrator.hh:321
ProGe::NetlistBlock::port
virtual NetlistPort * port(const std::string &portName, bool partialMatch=true)
Definition: NetlistBlock.cc:97
PlatformIntegrator::machine_
const TTAMachine::Machine * machine_
Definition: PlatformIntegrator.hh:313
PlatformIntegrator::imemInstance
virtual MemoryGenerator & imemInstance(MemInfo imem, int coreId)=0
ProGe::IN
@ IN
Input port.
Definition: ProGeTypes.hh:53
PlatformIntegrator::chopTaggedSignals
virtual bool chopTaggedSignals() const =0
TTAMachine::BaseFUPort::width
virtual int width() const
Definition: BaseFUPort.cc:109
MemInfo::lsuName
TCEString lsuName
Definition: MemoryGenerator.hh:75
FileSystem::directoryContents
static std::vector< std::string > directoryContents(const std::string &directory, const bool absolutePaths=true)
Definition: FileSystem.cc:600
HDB::HDBRegistry::instance
static HDBRegistry & instance()
Definition: HDBRegistry.cc:62
MemoryGenerator
Definition: MemoryGenerator.hh:85