OpenASIP  2.0
Public Member Functions | Private Attributes | List of all members
HDLPort Class Reference

#include <HDLPort.hh>

Collaboration diagram for HDLPort:
Collaboration graph

Public Member Functions

 HDLPort (const TCEString name, const TCEString &widthFormula, ProGe::DataType type, ProGe::Direction direction, bool needsInversion)
 
 HDLPort (const TCEString name, const TCEString &widthFormula, ProGe::DataType type, ProGe::Direction direction, bool needsInversion, int width)
 
 HDLPort (const HDLPort &old)
 
 HDLPort (const ProGe::NetlistPort &port)
 
TCEString name () const
 
TCEString widthFormula () const
 
void updateWidthFormula (const TCEString &widthFormula)
 
bool hasRealWidth () const
 
int realWidth () const
 
ProGe::Direction direction () const
 
ProGe::DataType type () const
 
bool needsInversion () const
 
ProGe::NetlistPortconvertToNetlistPort (ProGe::NetlistBlock &block) const
 
void setToStatic (ProGe::StaticSignal value)
 
bool hasStaticValue () const
 
ProGe::StaticSignal staticValue () const
 

Private Attributes

TCEString name_
 
TCEString widthFormula_
 
ProGe::DataType type_
 
ProGe::Direction direction_
 
bool needsInversion_
 
bool hasWidth_
 
int width_
 
bool hasStaticValue_
 
ProGe::StaticSignal staticValue_
 

Detailed Description

Represents a HDL port which is on higher abstraction level than NetlistPort

Definition at line 48 of file PlatformIntegrator/HDLPort.hh.

Constructor & Destructor Documentation

◆ HDLPort() [1/4]

HDLPort::HDLPort ( const TCEString  name,
const TCEString widthFormula,
ProGe::DataType  type,
ProGe::Direction  direction,
bool  needsInversion 
)

Definition at line 38 of file HDLPort.cc.

◆ HDLPort() [2/4]

HDLPort::HDLPort ( const TCEString  name,
const TCEString widthFormula,
ProGe::DataType  type,
ProGe::Direction  direction,
bool  needsInversion,
int  width 
)

Definition at line 51 of file HDLPort.cc.

◆ HDLPort() [3/4]

HDLPort::HDLPort ( const HDLPort old)

Definition at line 64 of file HDLPort.cc.

◆ HDLPort() [4/4]

HDLPort::HDLPort ( const ProGe::NetlistPort port)

Definition at line 71 of file HDLPort.cc.

72  : name_(port.name()),
74  type_(port.dataType()),
75  direction_(port.direction()),
76  needsInversion_(false),
78  width_(0),
79  hasStaticValue_(false),
81  if (port.realWidthAvailable()) {
82  width_ = port.realWidth();
83  }
84 }

References ProGe::NetlistPort::realWidth(), ProGe::NetlistPort::realWidthAvailable(), and width_.

Here is the call graph for this function:

Member Function Documentation

◆ convertToNetlistPort()

ProGe::NetlistPort * HDLPort::convertToNetlistPort ( ProGe::NetlistBlock block) const

Definition at line 127 of file HDLPort.cc.

127  {
128 
129  NetlistPort* port;
130  if (hasWidth_) {
132  direction_, block);
133  } else {
135  block);
136  }
137  if (hasStaticValue_) {
138  port->setToStatic(staticValue_);
139  }
140  return port;
141 }

References direction_, hasStaticValue_, hasWidth_, name_, ProGe::NetlistPort::setToStatic(), staticValue_, type_, width_, and widthFormula_.

Referenced by Stratix2SramGenerator::addMemory(), and MemoryGenerator::createMemoryNetlistBlock().

Here is the call graph for this function:

◆ direction()

ProGe::Direction HDLPort::direction ( ) const

Definition at line 112 of file HDLPort.cc.

112  {
113  return direction_;
114 }

References direction_.

Referenced by IPXactModel::addSignalObject().

◆ hasRealWidth()

bool HDLPort::hasRealWidth ( ) const

Definition at line 102 of file HDLPort.cc.

102  {
103  return hasWidth_;
104 }

References hasWidth_.

Referenced by IPXactModel::addSignalObject().

◆ hasStaticValue()

bool HDLPort::hasStaticValue ( ) const

Definition at line 153 of file HDLPort.cc.

153  {
154 
155  return hasStaticValue_;
156 }

References hasStaticValue_.

Referenced by MemoryGenerator::createMemoryNetlistBlock().

◆ name()

TCEString HDLPort::name ( ) const

◆ needsInversion()

bool HDLPort::needsInversion ( ) const

Definition at line 122 of file HDLPort.cc.

122  {
123  return needsInversion_;
124 }

References needsInversion_.

Referenced by Stratix2SramGenerator::addMemory(), XilinxBlockRamGenerator::addMemory(), and MemoryGenerator::addMemory().

◆ realWidth()

int HDLPort::realWidth ( ) const

Definition at line 107 of file HDLPort.cc.

107  {
108  return width_;
109 }

References width_.

Referenced by IPXactModel::addSignalObject().

◆ setToStatic()

void HDLPort::setToStatic ( ProGe::StaticSignal  value)

Definition at line 145 of file HDLPort.cc.

145  {
146 
147  hasStaticValue_ = true;
148  staticValue_ = value;
149 }

References hasStaticValue_, and staticValue_.

Referenced by AlteraOnchipRomGenerator::AlteraOnchipRomGenerator(), and VhdlRomGenerator::VhdlRomGenerator().

◆ staticValue()

ProGe::StaticSignal HDLPort::staticValue ( ) const

Definition at line 160 of file HDLPort.cc.

160  {
161 
162  return staticValue_;
163 }

References staticValue_.

◆ type()

ProGe::DataType HDLPort::type ( ) const

Definition at line 117 of file HDLPort.cc.

117  {
118  return type_;
119 }

References type_.

Referenced by IPXactModel::addSignalObject().

◆ updateWidthFormula()

void HDLPort::updateWidthFormula ( const TCEString widthFormula)

Definition at line 97 of file HDLPort.cc.

97  {
99 }

References widthFormula(), and widthFormula_.

Here is the call graph for this function:

◆ widthFormula()

TCEString HDLPort::widthFormula ( ) const

Definition at line 92 of file HDLPort.cc.

92  {
93  return widthFormula_;
94 }

References widthFormula_.

Referenced by updateWidthFormula().

Member Data Documentation

◆ direction_

ProGe::Direction HDLPort::direction_
private

Definition at line 99 of file PlatformIntegrator/HDLPort.hh.

Referenced by convertToNetlistPort(), and direction().

◆ hasStaticValue_

bool HDLPort::hasStaticValue_
private

◆ hasWidth_

bool HDLPort::hasWidth_
private

Definition at line 101 of file PlatformIntegrator/HDLPort.hh.

Referenced by convertToNetlistPort(), and hasRealWidth().

◆ name_

TCEString HDLPort::name_
private

Definition at line 96 of file PlatformIntegrator/HDLPort.hh.

Referenced by convertToNetlistPort(), and name().

◆ needsInversion_

bool HDLPort::needsInversion_
private

Definition at line 100 of file PlatformIntegrator/HDLPort.hh.

Referenced by needsInversion().

◆ staticValue_

ProGe::StaticSignal HDLPort::staticValue_
private

Definition at line 104 of file PlatformIntegrator/HDLPort.hh.

Referenced by convertToNetlistPort(), setToStatic(), and staticValue().

◆ type_

ProGe::DataType HDLPort::type_
private

Definition at line 98 of file PlatformIntegrator/HDLPort.hh.

Referenced by convertToNetlistPort(), and type().

◆ width_

int HDLPort::width_
private

Definition at line 102 of file PlatformIntegrator/HDLPort.hh.

Referenced by convertToNetlistPort(), HDLPort(), and realWidth().

◆ widthFormula_

TCEString HDLPort::widthFormula_
private

The documentation for this class was generated from the following files:
ProGe::StaticSignal::GND
@ GND
All port signals set to low.
Definition: NetlistPort.hh:50
HDLPort::width_
int width_
Definition: PlatformIntegrator/HDLPort.hh:102
ProGe::NetlistPort::widthFormula
std::string widthFormula() const
Definition: NetlistPort.cc:316
ProGe::NetlistPort::direction
Direction direction() const
Definition: NetlistPort.cc:373
HDLPort::needsInversion_
bool needsInversion_
Definition: PlatformIntegrator/HDLPort.hh:100
ProGe::NetlistPort::setToStatic
void setToStatic(StaticSignal value) const
Definition: NetlistPort.cc:410
HDLPort::type
ProGe::DataType type() const
Definition: HDLPort.cc:117
HDLPort::hasWidth_
bool hasWidth_
Definition: PlatformIntegrator/HDLPort.hh:101
HDLPort::staticValue_
ProGe::StaticSignal staticValue_
Definition: PlatformIntegrator/HDLPort.hh:104
ProGe::NetlistPort::realWidthAvailable
bool realWidthAvailable() const
Definition: NetlistPort.cc:334
HDLPort::type_
ProGe::DataType type_
Definition: PlatformIntegrator/HDLPort.hh:98
HDLPort::name_
TCEString name_
Definition: PlatformIntegrator/HDLPort.hh:96
HDLPort::name
TCEString name() const
Definition: HDLPort.cc:87
ProGe::NetlistPort::name
std::string name() const
Definition: NetlistPort.cc:283
ProGe::NetlistPort::dataType
DataType dataType() const
Definition: NetlistPort.cc:362
HDLPort::direction
ProGe::Direction direction() const
Definition: HDLPort.cc:112
ProGe::NetlistPort::realWidth
int realWidth() const
Definition: NetlistPort.cc:348
ProGe::NetlistPort
Definition: NetlistPort.hh:70
HDLPort::widthFormula
TCEString widthFormula() const
Definition: HDLPort.cc:92
HDLPort::hasStaticValue_
bool hasStaticValue_
Definition: PlatformIntegrator/HDLPort.hh:103
HDLPort::widthFormula_
TCEString widthFormula_
Definition: PlatformIntegrator/HDLPort.hh:97
HDLPort::direction_
ProGe::Direction direction_
Definition: PlatformIntegrator/HDLPort.hh:99
HDLPort::needsInversion
bool needsInversion() const
Definition: HDLPort.cc:122