OpenASIP  2.0
Public Member Functions | Private Attributes | List of all members
HDB::FUPortImplementation Class Reference

#include <FUPortImplementation.hh>

Inheritance diagram for HDB::FUPortImplementation:
Inheritance graph
Collaboration diagram for HDB::FUPortImplementation:
Collaboration graph

Public Member Functions

 FUPortImplementation (const std::string &name, const std::string &architecturePort, const std::string &widthFormula, const std::string &loadPort, const std::string &guardPort, FUImplementation &parent)
 
virtual ~FUPortImplementation ()
 
void setArchitecturePort (const std::string &name)
 
std::string architecturePort () const
 
void setGuardPort (const std::string &name)
 
std::string guardPort () const
 
void setWidthFormula (const std::string &formula)
 
std::string widthFormula () const
 
- Public Member Functions inherited from HDB::PortImplementation
 PortImplementation (const std::string &name, const std::string &loadPort)
 
virtual ~PortImplementation ()
 
void setName (const std::string &name)
 
std::string name () const
 
void setLoadPort (const std::string &name)
 
std::string loadPort () const
 

Private Attributes

std::string architecturePort_
 Name of the corresponding port in architecture. More...
 
std::string widthFormula_
 The formula for the width of the port. More...
 
std::string guardPort_
 Name of the guard port. More...
 

Detailed Description

Represents an architectural port of an FU implementation in HDB.

Definition at line 46 of file FUPortImplementation.hh.

Constructor & Destructor Documentation

◆ FUPortImplementation()

HDB::FUPortImplementation::FUPortImplementation ( const std::string &  name,
const std::string &  architecturePort,
const std::string &  widthFormula,
const std::string &  loadPort,
const std::string &  guardPort,
FUImplementation parent 
)

The constructor.

Adds the port automatically to the given FUImplementation.

Parameters
nameName of the port.
architecturePortName of the corresponding port in architecture.
widthFormulaThe formula for the width of the port.
loadPortName of the load enable port.
guardPortName of the guard port if the port is guarded.
parentThe parent FU implementation.

Definition at line 54 of file FUPortImplementation.cc.

60  :
64 
65  parent.addArchitecturePort(this);
66 }

References HDB::FUImplementation::addArchitecturePort().

Here is the call graph for this function:

◆ ~FUPortImplementation()

HDB::FUPortImplementation::~FUPortImplementation ( )
virtual

The destructor.

Definition at line 72 of file FUPortImplementation.cc.

72  {
73 }

Member Function Documentation

◆ architecturePort()

std::string HDB::FUPortImplementation::architecturePort ( ) const

◆ guardPort()

std::string HDB::FUPortImplementation::guardPort ( ) const

Returns the name of the guard port if the port is guarded.

Returns
The name of the guard port.

Definition at line 115 of file FUPortImplementation.cc.

115  {
116  return guardPort_;
117 }

References guardPort_.

Referenced by HDB::HDBManager::addFUImplementation(), ProGe::NetlistGenerator::addFUToNetlist(), and HDBToHtml::fuImplToHtml().

◆ setArchitecturePort()

void HDB::FUPortImplementation::setArchitecturePort ( const std::string &  name)

Sets the corresponding port in the FU architecture.

Parameters
nameName of the port.

Definition at line 82 of file FUPortImplementation.cc.

82  {
84 }

References architecturePort_, and HDB::PortImplementation::name().

Here is the call graph for this function:

◆ setGuardPort()

void HDB::FUPortImplementation::setGuardPort ( const std::string &  name)

Sets the name of the guard port if the port is guarded.

Parameters
nameName of the guard port.

Definition at line 104 of file FUPortImplementation.cc.

104  {
105  guardPort_ = name;
106 }

References guardPort_, and HDB::PortImplementation::name().

Here is the call graph for this function:

◆ setWidthFormula()

void HDB::FUPortImplementation::setWidthFormula ( const std::string &  formula)

Sets the width formula of the port.

Parameters
formulaThe new formula.

Definition at line 126 of file FUPortImplementation.cc.

126  {
127  widthFormula_ = formula;
128 }

References widthFormula_.

◆ widthFormula()

std::string HDB::FUPortImplementation::widthFormula ( ) const

Returns the formula for the width of the port.

Returns
The formula.

Definition at line 137 of file FUPortImplementation.cc.

137  {
138  return widthFormula_;
139 }

References widthFormula_.

Referenced by HDB::HDBManager::addFUImplementation(), ProGe::NetlistGenerator::addFUToNetlist(), HDBToHtml::fuImplToHtml(), and ProGe::NetlistGenerator::isParameterizable().

Member Data Documentation

◆ architecturePort_

std::string HDB::FUPortImplementation::architecturePort_
private

Name of the corresponding port in architecture.

Definition at line 66 of file FUPortImplementation.hh.

Referenced by architecturePort(), and setArchitecturePort().

◆ guardPort_

std::string HDB::FUPortImplementation::guardPort_
private

Name of the guard port.

Definition at line 70 of file FUPortImplementation.hh.

Referenced by guardPort(), and setGuardPort().

◆ widthFormula_

std::string HDB::FUPortImplementation::widthFormula_
private

The formula for the width of the port.

Definition at line 68 of file FUPortImplementation.hh.

Referenced by setWidthFormula(), and widthFormula().


The documentation for this class was generated from the following files:
HDB::FUPortImplementation::architecturePort_
std::string architecturePort_
Name of the corresponding port in architecture.
Definition: FUPortImplementation.hh:66
HDB::PortImplementation::PortImplementation
PortImplementation(const std::string &name, const std::string &loadPort)
Definition: PortImplementation.cc:43
HDB::PortImplementation::loadPort
std::string loadPort() const
Definition: PortImplementation.cc:96
HDB::FUPortImplementation::architecturePort
std::string architecturePort() const
Definition: FUPortImplementation.cc:93
HDB::PortImplementation::name
std::string name() const
Definition: PortImplementation.cc:74
HDB::FUPortImplementation::guardPort_
std::string guardPort_
Name of the guard port.
Definition: FUPortImplementation.hh:70
HDB::FUPortImplementation::guardPort
std::string guardPort() const
Definition: FUPortImplementation.cc:115
HDB::FUPortImplementation::widthFormula_
std::string widthFormula_
The formula for the width of the port.
Definition: FUPortImplementation.hh:68
HDB::FUPortImplementation::widthFormula
std::string widthFormula() const
Definition: FUPortImplementation.cc:137