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

#include <RFPortImplementation.hh>

Inheritance diagram for HDB::RFPortImplementation:
Inheritance graph
Collaboration diagram for HDB::RFPortImplementation:
Collaboration graph

Public Member Functions

 RFPortImplementation (const std::string &name, Direction direction, const std::string &loadPort, const std::string &opcodePort, const std::string &opcodePortWidthFormula, RFImplementation &parent)
 
virtual ~RFPortImplementation ()
 
void setDirection (Direction direction)
 
Direction direction () const
 
void setOpcodePort (const std::string &name)
 
std::string opcodePort () const
 
void setOpcodePortWidthFormula (const std::string &formula)
 
std::string opcodePortWidthFormula () 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

Direction direction_
 Direction of the port. More...
 
std::string opcodePort_
 Name of the opcode port. More...
 
std::string opcodePortWidthFormula_
 Width calculation formula for the opcode port. More...
 

Detailed Description

Definition at line 43 of file RFPortImplementation.hh.

Constructor & Destructor Documentation

◆ RFPortImplementation()

HDB::RFPortImplementation::RFPortImplementation ( const std::string &  name,
Direction  direction,
const std::string &  loadPort,
const std::string &  opcodePort,
const std::string &  opcodePortWidthFormula,
RFImplementation parent 
)

The constructor.

Adds the port automatically to the given parent RF implementation.

Parameters
nameName of the port.
directionDirection of the port.
loadPortName of the load enable port.
opcodePortName of the opcode port.
parentThe parent RF implementation.

Definition at line 49 of file RFPortImplementation.cc.

55  :
59 
60  parent.addPort(this);
61 }

References HDB::RFImplementation::addPort().

Here is the call graph for this function:

◆ ~RFPortImplementation()

HDB::RFPortImplementation::~RFPortImplementation ( )
virtual

The destructor.

Definition at line 67 of file RFPortImplementation.cc.

67  {
68 }

Member Function Documentation

◆ direction()

Direction HDB::RFPortImplementation::direction ( ) const

Returns the direction of the port.

Returns
The direction of the port.

Definition at line 88 of file RFPortImplementation.cc.

88  {
89  return direction_;
90 }

References direction_.

Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), HDB::HDBManager::addRFImplementation(), RFTestbenchGenerator::parseRfPorts(), HDBToHtml::rfImplToHtml(), and setDirection().

◆ opcodePort()

std::string HDB::RFPortImplementation::opcodePort ( ) const

Returns the name of the opcode port.

Returns
The name of the opcode port.

Definition at line 110 of file RFPortImplementation.cc.

110  {
111  return opcodePort_;
112 }

References opcodePort_.

Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), HDB::HDBManager::addRFImplementation(), RFTestbenchGenerator::parseRfPorts(), and HDBToHtml::rfImplToHtml().

◆ opcodePortWidthFormula()

std::string HDB::RFPortImplementation::opcodePortWidthFormula ( ) const

Returns the formula of the width of the opcode port.

Returns
The formula.

Definition at line 132 of file RFPortImplementation.cc.

132  {
134 }

References opcodePortWidthFormula_.

Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), HDB::HDBManager::addRFImplementation(), and HDBToHtml::rfImplToHtml().

◆ setDirection()

void HDB::RFPortImplementation::setDirection ( Direction  direction)

Sets the direction of the port.

Parameters
directionThe new direction.

Definition at line 77 of file RFPortImplementation.cc.

77  {
79 }

References direction(), and direction_.

Here is the call graph for this function:

◆ setOpcodePort()

void HDB::RFPortImplementation::setOpcodePort ( const std::string &  name)

Sets the name of the opcode port.

Parameters
nameThe new name.

Definition at line 99 of file RFPortImplementation.cc.

99  {
100  opcodePort_ = name;
101 }

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

Here is the call graph for this function:

◆ setOpcodePortWidthFormula()

void HDB::RFPortImplementation::setOpcodePortWidthFormula ( const std::string &  formula)

Sets the width formula of the opcode port.

Parameters
formulaThe new width formula.

Definition at line 121 of file RFPortImplementation.cc.

121  {
122  opcodePortWidthFormula_ = formula;
123 }

References opcodePortWidthFormula_.

Member Data Documentation

◆ direction_

Direction HDB::RFPortImplementation::direction_
private

Direction of the port.

Definition at line 63 of file RFPortImplementation.hh.

Referenced by direction(), and setDirection().

◆ opcodePort_

std::string HDB::RFPortImplementation::opcodePort_
private

Name of the opcode port.

Definition at line 65 of file RFPortImplementation.hh.

Referenced by opcodePort(), and setOpcodePort().

◆ opcodePortWidthFormula_

std::string HDB::RFPortImplementation::opcodePortWidthFormula_
private

Width calculation formula for the opcode port.

Definition at line 67 of file RFPortImplementation.hh.

Referenced by opcodePortWidthFormula(), and setOpcodePortWidthFormula().


The documentation for this class was generated from the following files:
HDB::RFPortImplementation::opcodePortWidthFormula
std::string opcodePortWidthFormula() const
Definition: RFPortImplementation.cc:132
HDB::PortImplementation::PortImplementation
PortImplementation(const std::string &name, const std::string &loadPort)
Definition: PortImplementation.cc:43
HDB::RFPortImplementation::direction
Direction direction() const
Definition: RFPortImplementation.cc:88
HDB::RFPortImplementation::opcodePort_
std::string opcodePort_
Name of the opcode port.
Definition: RFPortImplementation.hh:65
HDB::PortImplementation::loadPort
std::string loadPort() const
Definition: PortImplementation.cc:96
HDB::PortImplementation::name
std::string name() const
Definition: PortImplementation.cc:74
HDB::RFPortImplementation::opcodePort
std::string opcodePort() const
Definition: RFPortImplementation.cc:110
HDB::RFPortImplementation::opcodePortWidthFormula_
std::string opcodePortWidthFormula_
Width calculation formula for the opcode port.
Definition: RFPortImplementation.hh:67
HDB::RFPortImplementation::direction_
Direction direction_
Direction of the port.
Definition: RFPortImplementation.hh:63