OpenASIP  2.0
Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes | List of all members
KoskiIntegrator Class Reference

#include <KoskiIntegrator.hh>

Inheritance diagram for KoskiIntegrator:
Inheritance graph
Collaboration diagram for KoskiIntegrator:
Collaboration graph

Public Member Functions

 KoskiIntegrator ()
 
 KoskiIntegrator (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 ~KoskiIntegrator ()
 
virtual TCEString deviceFamily () const
 
virtual void setDeviceFamily (TCEString devFamily)
 
virtual TCEString devicePackage () const
 
virtual TCEString deviceSpeedClass () const
 
virtual int targetClockFrequency () const
 
virtual void printInfo (std::ostream &stream) const
 
- Public Member Functions inherited from AlteraIntegrator
 AlteraIntegrator ()
 
 AlteraIntegrator (const TTAMachine::Machine *machine, const IDF::MachineImplementation *idf, ProGe::HDL hdl, TCEString progeOutputDir, TCEString entityName, TCEString outputDir, TCEString programName, int targetClockFreq, std::ostream &warningStream, std::ostream &errorStream, const MemInfo &imem, MemType dmemType)
 
virtual ~AlteraIntegrator ()
 
virtual void integrateProcessor (const ProGe::NetlistBlock *progeBlock)
 
- Public Member Functions inherited from PlatformIntegrator
 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 ()
 
void setDeviceName (TCEString devName)
 
TCEString deviceName () const
 
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

virtual TCEString pinTag () const
 
virtual bool chopTaggedSignals () const
 
virtual ProjectFileGeneratorprojectFileGenerator () const
 
virtual MemoryGeneratordmemInstance (MemInfo dmem, TTAMachine::FunctionUnit &lsuArch, std::vector< std::string > lsuPorts)
 
- Protected Member Functions inherited from AlteraIntegrator
virtual MemoryGeneratorimemInstance (MemInfo imem, int coreId)
 
- Protected Member Functions inherited from PlatformIntegrator
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 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 void writeNewToplevel ()
 
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)
 

Private Attributes

ProjectFileGeneratoripXactGen_
 
TCEString deviceFamily_
 
MemoryGeneratordmemGen_
 

Static Private Attributes

static const TCEString PIN_TAG_ = "hibi"
 
static const TCEString DEFAULT_DEVICE_FAMILY_ = "Stratix II"
 

Additional Inherited Members

- Static Protected Attributes inherited from PlatformIntegrator
static const TCEString TTA_CORE_CLK = "clk"
 
static const TCEString TTA_CORE_RSTX = "rstx"
 

Detailed Description

Definition at line 40 of file KoskiIntegrator.hh.

Constructor & Destructor Documentation

◆ KoskiIntegrator() [1/2]

KoskiIntegrator::KoskiIntegrator ( )

Definition at line 47 of file KoskiIntegrator.cc.

47  :
50 }

◆ KoskiIntegrator() [2/2]

KoskiIntegrator::KoskiIntegrator ( 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 53 of file KoskiIntegrator.cc.

65  :
66  AlteraIntegrator(machine, idf, hdl, progeOutputDir, coreEntityName,
67  outputDir, programName, targetClockFreq, warningStream,
68  errorStream, imem, dmemType),
71 }

◆ ~KoskiIntegrator()

KoskiIntegrator::~KoskiIntegrator ( )
virtual

Definition at line 74 of file KoskiIntegrator.cc.

74  {
75 
76  if (ipXactGen_ != NULL) {
77  delete ipXactGen_;
78  }
79  if (dmemGen_ != NULL) {
80  delete dmemGen_;
81  }
82 }

References dmemGen_, and ipXactGen_.

Member Function Documentation

◆ chopTaggedSignals()

bool KoskiIntegrator::chopTaggedSignals ( ) const
protectedvirtual

Implements PlatformIntegrator.

Definition at line 92 of file KoskiIntegrator.cc.

92  {
93 
94  return false;
95 }

◆ deviceFamily()

TCEString KoskiIntegrator::deviceFamily ( ) const
virtual

Returns the FPGA device family

Implements PlatformIntegrator.

Definition at line 147 of file KoskiIntegrator.cc.

147  {
148 
149  return deviceFamily_;
150 }

References deviceFamily_.

◆ devicePackage()

TCEString KoskiIntegrator::devicePackage ( ) const
virtual

Returns the device package name

Implements PlatformIntegrator.

Definition at line 159 of file KoskiIntegrator.cc.

159  {
160  return "";
161 }

◆ deviceSpeedClass()

TCEString KoskiIntegrator::deviceSpeedClass ( ) const
virtual

Returns the device speed class

Implements PlatformIntegrator.

Definition at line 164 of file KoskiIntegrator.cc.

164  {
165  return "";
166 }

◆ dmemInstance()

MemoryGenerator & KoskiIntegrator::dmemInstance ( MemInfo  dmem,
TTAMachine::FunctionUnit lsuArch,
std::vector< std::string >  lsuPorts 
)
protectedvirtual

Reimplemented from AlteraIntegrator.

Definition at line 105 of file KoskiIntegrator.cc.

107  {
108  if (dmem.type == ONCHIP) {
109  if (dmemGen_ == NULL) {
110  TCEString initFile = programName() + "_" + dmem.asName + ".mif";
111  // onchip mem size is scalable, use value from adf's Address Space
112  int addrw = dmem.portAddrw;
113  dmemGen_ =
115  dmem.mauWidth, dmem.widthInMaus, addrw, initFile,
116  this, warningStream(), errorStream());
117  ipXactGen_->addMemInitFile(initFile);
118  dmemGen_->addLsu(lsuArch, lsuPorts);
119  }
120  } else {
121  TCEString msg = "Unsupported data memory type";
122  InvalidData exc(__FILE__, __LINE__, "KoskiIntegrator",
123  msg);
124  throw exc;
125  }
126 
127  return *dmemGen_;
128 }

References MemoryGenerator::addLsu(), ProjectFileGenerator::addMemInitFile(), MemInfo::asName, dmemGen_, PlatformIntegrator::errorStream(), ipXactGen_, MemInfo::mauWidth, ONCHIP, MemInfo::portAddrw, PlatformIntegrator::programName(), MemInfo::type, PlatformIntegrator::warningStream(), and MemInfo::widthInMaus.

Here is the call graph for this function:

◆ pinTag()

TCEString KoskiIntegrator::pinTag ( ) const
protectedvirtual

Implements PlatformIntegrator.

Definition at line 85 of file KoskiIntegrator.cc.

85  {
86 
87  return PIN_TAG_;
88 }

References PIN_TAG_.

◆ printInfo()

void KoskiIntegrator::printInfo ( std::ostream &  stream) const
virtual

Prints information about the platform

Implements PlatformIntegrator.

Definition at line 131 of file KoskiIntegrator.cc.

131  {
132 
133  stream
134  << "Integrator name: KoskiIntegrator" << endl
135  << "---------------------------------" << endl
136  << "Integrates TTA core to Koski flow compatible IP-block. "
137  << "Processor must have a HIBIs-LSU. " << endl
138  << "Creates an IP-XACT description of the created IP." << endl
139  << "This integrator works with Altera tools and FPGAs." << endl
140  << "Supported instruction memory types are 'onchip' and 'vhdl_array."
141  << endl << "Supported data memory type is 'onchip'." << endl
142  << "FPGA device family can be changed. Default device family is "
143  << DEFAULT_DEVICE_FAMILY_ << endl << endl;
144 }

References DEFAULT_DEVICE_FAMILY_.

◆ projectFileGenerator()

ProjectFileGenerator * KoskiIntegrator::projectFileGenerator ( ) const
protectedvirtual

Implements PlatformIntegrator.

Definition at line 99 of file KoskiIntegrator.cc.

99  {
100 
101  return ipXactGen_;
102 }

References ipXactGen_.

◆ setDeviceFamily()

void KoskiIntegrator::setDeviceFamily ( TCEString  devFamily)
virtual

Set the FPGA device family.

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

Implements PlatformIntegrator.

Definition at line 153 of file KoskiIntegrator.cc.

153  {
154 
155  deviceFamily_ = devFamily;
156 }

References deviceFamily_.

◆ targetClockFrequency()

int KoskiIntegrator::targetClockFrequency ( ) const
virtual

Returns the target clock frequency in MHz

Reimplemented from PlatformIntegrator.

Definition at line 169 of file KoskiIntegrator.cc.

169  {
170  return 1;
171 }

Member Data Documentation

◆ DEFAULT_DEVICE_FAMILY_

const TCEString KoskiIntegrator::DEFAULT_DEVICE_FAMILY_ = "Stratix II"
staticprivate

Definition at line 94 of file KoskiIntegrator.hh.

Referenced by printInfo().

◆ deviceFamily_

TCEString KoskiIntegrator::deviceFamily_
private

Definition at line 89 of file KoskiIntegrator.hh.

Referenced by deviceFamily(), and setDeviceFamily().

◆ dmemGen_

MemoryGenerator* KoskiIntegrator::dmemGen_
private

Definition at line 91 of file KoskiIntegrator.hh.

Referenced by dmemInstance(), and ~KoskiIntegrator().

◆ ipXactGen_

ProjectFileGenerator* KoskiIntegrator::ipXactGen_
private

Definition at line 87 of file KoskiIntegrator.hh.

Referenced by dmemInstance(), projectFileGenerator(), and ~KoskiIntegrator().

◆ PIN_TAG_

const TCEString KoskiIntegrator::PIN_TAG_ = "hibi"
staticprivate

Definition at line 93 of file KoskiIntegrator.hh.

Referenced by pinTag().


The documentation for this class was generated from the following files:
PlatformIntegrator::coreEntityName
TCEString coreEntityName() const
Definition: PlatformIntegrator.cc:126
KoskiIntegrator::deviceFamily_
TCEString deviceFamily_
Definition: KoskiIntegrator.hh:89
KoskiIntegrator::DEFAULT_DEVICE_FAMILY_
static const TCEString DEFAULT_DEVICE_FAMILY_
Definition: KoskiIntegrator.hh:94
KoskiIntegrator::dmemGen_
MemoryGenerator * dmemGen_
Definition: KoskiIntegrator.hh:91
MemInfo::type
MemType type
Definition: MemoryGenerator.hh:68
InvalidData
Definition: Exception.hh:149
IPXactFileGenerator
Definition: IPXactFileGenerator.hh:43
MemInfo::asName
TCEString asName
Definition: MemoryGenerator.hh:74
PlatformIntegrator::idf
const IDF::MachineImplementation * idf() const
Definition: PlatformIntegrator.cc:304
PlatformIntegrator::machine
const TTAMachine::Machine * machine() const
Definition: PlatformIntegrator.cc:297
MemoryGenerator::addLsu
void addLsu(TTAMachine::FunctionUnit &lsuArch, std::vector< std::string > lsuPorts)
Definition: MemoryGenerator.cc:376
MemInfo::widthInMaus
int widthInMaus
Definition: MemoryGenerator.hh:70
MemInfo::mauWidth
int mauWidth
Definition: MemoryGenerator.hh:69
PlatformIntegrator::programName
TCEString programName() const
Definition: PlatformIntegrator.cc:133
ONCHIP
@ ONCHIP
Definition: MemoryGenerator.hh:61
TCEString
Definition: TCEString.hh:53
PlatformIntegrator::warningStream
std::ostream & warningStream() const
Definition: PlatformIntegrator.cc:271
AlteraIntegrator::AlteraIntegrator
AlteraIntegrator()
Definition: AlteraIntegrator.cc:44
ProjectFileGenerator::addMemInitFile
void addMemInitFile(const TCEString &memInit)
Definition: ProjectFileGenerator.cc:72
KoskiIntegrator::PIN_TAG_
static const TCEString PIN_TAG_
Definition: KoskiIntegrator.hh:93
MemInfo::portAddrw
int portAddrw
Definition: MemoryGenerator.hh:71
PlatformIntegrator::errorStream
std::ostream & errorStream() const
Definition: PlatformIntegrator.cc:278
KoskiIntegrator::ipXactGen_
ProjectFileGenerator * ipXactGen_
Definition: KoskiIntegrator.hh:87
AlteraHibiDpRamGenerator
Definition: AlteraHibiDpRamGenerator.hh:43