OpenASIP 2.2
Loading...
Searching...
No Matches
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.

41 : name_(name),
43 type_(type),
46 hasWidth_(false),
47 width_(0),
48 hasStaticValue_(false),
ProGe::Direction direction() const
Definition HDLPort.cc:112
ProGe::DataType type_
ProGe::StaticSignal staticValue_
TCEString widthFormula() const
Definition HDLPort.cc:92
TCEString name() const
Definition HDLPort.cc:87
ProGe::Direction direction_
ProGe::DataType type() const
Definition HDLPort.cc:117
bool needsInversion() const
Definition HDLPort.cc:122
@ GND
All port signals set to low.

◆ HDLPort() [2/4]

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

◆ HDLPort() [3/4]

HDLPort::HDLPort ( const HDLPort old)

◆ 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}
bool realWidthAvailable() const
std::string widthFormula() const
DataType dataType() const
Direction direction() const
std::string name() const
int realWidth() const

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_) {
139 }
140 return port;
141}
void setToStatic(StaticSignal value) const

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

◆ 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: