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

#include <ProjectFileGenerator.hh>

Inheritance diagram for ProjectFileGenerator:
Inheritance graph
Collaboration diagram for ProjectFileGenerator:
Collaboration graph

Public Member Functions

 ProjectFileGenerator (TCEString coreEntity, const PlatformIntegrator *integrator)
 
virtual ~ProjectFileGenerator ()
 
virtual void writeProjectFiles ()=0
 
void addHdlFile (const TCEString &file)
 
void addHdlFiles (const std::vector< TCEString > &files)
 
void addMemInitFile (const TCEString &memInit)
 
void addSignalMapping (const PlatInt::SignalMapping &mapping)
 

Protected Member Functions

const std::vector< TCEString > & hdlFileList () const
 
const std::vector< TCEString > & memInitFileList () const
 
const PlatformIntegratorintegrator () const
 
TCEString coreEntity () const
 
TCEString toplevelEntity () const
 
int signalMappingCount () const
 
const PlatInt::SignalMappingsignalMapping (int index) const
 
TCEString extractFUName (const TCEString &port, const TCEString &delimiter) const
 

Private Attributes

TCEString coreEntity_
 the HDL entity of the non-integrated TTA core More...
 
const PlatformIntegratorintegrator_
 
std::vector< TCEStringhdlFiles_
 
std::vector< TCEStringmemInitFiles_
 
PlatInt::SignalMappingList signalMap_
 

Detailed Description

Definition at line 41 of file ProjectFileGenerator.hh.

Constructor & Destructor Documentation

◆ ProjectFileGenerator()

ProjectFileGenerator::ProjectFileGenerator ( TCEString  coreEntity,
const PlatformIntegrator integrator 
)

Definition at line 40 of file ProjectFileGenerator.cc.

42  :
44 }

◆ ~ProjectFileGenerator()

ProjectFileGenerator::~ProjectFileGenerator ( )
virtual

Definition at line 47 of file ProjectFileGenerator.cc.

47  {
48 
49  for (unsigned int i = 0; i < signalMap_.size(); i++) {
50  delete signalMap_.at(i);
51  }
52 }

References signalMap_.

Member Function Documentation

◆ addHdlFile()

void ProjectFileGenerator::addHdlFile ( const TCEString file)

Definition at line 56 of file ProjectFileGenerator.cc.

56  {
57 
58  hdlFiles_.push_back(file);
59 }

References hdlFiles_.

Referenced by AlmaIFIntegrator::addAlmaifFiles(), PlatformIntegrator::addProGeFiles(), and PlatformIntegrator::writeNewToplevel().

◆ addHdlFiles()

void ProjectFileGenerator::addHdlFiles ( const std::vector< TCEString > &  files)

Definition at line 63 of file ProjectFileGenerator.cc.

63  {
64 
65  for (unsigned int i = 0; i < files.size(); i++) {
66  hdlFiles_.push_back(files.at(i));
67  }
68 }

References hdlFiles_.

Referenced by PlatformIntegrator::createMemories().

◆ addMemInitFile()

void ProjectFileGenerator::addMemInitFile ( const TCEString memInit)

Definition at line 72 of file ProjectFileGenerator.cc.

72  {
73 
74  memInitFiles_.push_back(memInit);
75 }

References memInitFiles_.

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

◆ addSignalMapping()

void ProjectFileGenerator::addSignalMapping ( const PlatInt::SignalMapping mapping)

Definition at line 79 of file ProjectFileGenerator.cc.

79  {
80 
81  SignalMapping* signalMap = new SignalMapping(mapping);
82  signalMap_.push_back(signalMap);
83 }

References signalMap_.

Referenced by Stratix3DevKitIntegrator::addSignalMapping(), and Stratix2DSPBoardIntegrator::addSignalMapping().

◆ coreEntity()

TCEString ProjectFileGenerator::coreEntity ( ) const
inlineprotected

Definition at line 65 of file ProjectFileGenerator.hh.

65 { return coreEntity_; }

References coreEntity_.

◆ extractFUName()

TCEString ProjectFileGenerator::extractFUName ( const TCEString port,
const TCEString delimiter 
) const
protected

Definition at line 120 of file ProjectFileGenerator.cc.

122  {
123 
124  TCEString::size_type pos = port.find(delimiter);
125  if (pos == TCEString::npos || pos == 0) {
126  return port;
127  }
128 
129  TCEString fuName = port.substr(0, pos);
130  return StringTools::trim(fuName);
131 }

References StringTools::trim().

Referenced by SOPCBuilderFileGenerator::handleAvalonSignal().

Here is the call graph for this function:

◆ hdlFileList()

const std::vector< TCEString > & ProjectFileGenerator::hdlFileList ( ) const
protected

◆ integrator()

const PlatformIntegrator * ProjectFileGenerator::integrator ( ) const
protected

◆ memInitFileList()

const std::vector< TCEString > & ProjectFileGenerator::memInitFileList ( ) const
protected

◆ signalMapping()

const SignalMapping * ProjectFileGenerator::signalMapping ( int  index) const
protected

Definition at line 113 of file ProjectFileGenerator.cc.

113  {
114 
115  return signalMap_.at(index);
116 }

References signalMap_.

Referenced by QuartusProjectGenerator::writeQSFFile().

◆ signalMappingCount()

int ProjectFileGenerator::signalMappingCount ( ) const
protected

Definition at line 106 of file ProjectFileGenerator.cc.

106  {
107 
108  return signalMap_.size();
109 }

References signalMap_.

Referenced by QuartusProjectGenerator::writeQSFFile().

◆ toplevelEntity()

TCEString ProjectFileGenerator::toplevelEntity ( ) const
inlineprotected

◆ writeProjectFiles()

virtual void ProjectFileGenerator::writeProjectFiles ( )
pure virtual

Member Data Documentation

◆ coreEntity_

TCEString ProjectFileGenerator::coreEntity_
private

the HDL entity of the non-integrated TTA core

Definition at line 80 of file ProjectFileGenerator.hh.

Referenced by coreEntity(), and toplevelEntity().

◆ hdlFiles_

std::vector<TCEString> ProjectFileGenerator::hdlFiles_
private

Definition at line 83 of file ProjectFileGenerator.hh.

Referenced by addHdlFile(), addHdlFiles(), and hdlFileList().

◆ integrator_

const PlatformIntegrator* ProjectFileGenerator::integrator_
private

Definition at line 81 of file ProjectFileGenerator.hh.

Referenced by integrator().

◆ memInitFiles_

std::vector<TCEString> ProjectFileGenerator::memInitFiles_
private

Definition at line 84 of file ProjectFileGenerator.hh.

Referenced by addMemInitFile(), and memInitFileList().

◆ signalMap_

PlatInt::SignalMappingList ProjectFileGenerator::signalMap_
private

The documentation for this class was generated from the following files:
ProjectFileGenerator::integrator
const PlatformIntegrator * integrator() const
Definition: ProjectFileGenerator.cc:101
ProjectFileGenerator::memInitFiles_
std::vector< TCEString > memInitFiles_
Definition: ProjectFileGenerator.hh:84
PlatInt::SignalMapping
std::pair< TCEString, TCEString > SignalMapping
Definition: PlatformIntegratorTypes.hh:42
ProjectFileGenerator::signalMap_
PlatInt::SignalMappingList signalMap_
Definition: ProjectFileGenerator.hh:85
ProjectFileGenerator::integrator_
const PlatformIntegrator * integrator_
Definition: ProjectFileGenerator.hh:81
StringTools::trim
static std::string trim(const std::string &source)
Definition: StringTools.cc:55
ProjectFileGenerator::coreEntity
TCEString coreEntity() const
Definition: ProjectFileGenerator.hh:65
TCEString
Definition: TCEString.hh:53
ProjectFileGenerator::coreEntity_
TCEString coreEntity_
the HDL entity of the non-integrated TTA core
Definition: ProjectFileGenerator.hh:80
ProjectFileGenerator::hdlFiles_
std::vector< TCEString > hdlFiles_
Definition: ProjectFileGenerator.hh:83