AMF-Placer  2.0
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
DesignInfo::DesignPin Class Reference

A design pin on a design cell connected to a net. More...

#include <DesignInfo.h>

Inheritance diagram for DesignInfo::DesignPin:
Collaboration diagram for DesignInfo::DesignPin:

Public Member Functions

 DesignPin (std::string &name, std::string &refpinname, DesignPinType pinType, bool inputOrNot, DesignElement *parentPtr, int id)
 Construct a new Design Pin object. More...
 
 ~DesignPin ()
 
DesignPinType getPinType ()
 Get the Pin Type of the pin. More...
 
std::string & getNetName ()
 Get the name of the net which the pin connects to. More...
 
void connectToNetName (std::string &_netName)
 bind the pin to the net by the net name More...
 
int getAliasNetId ()
 
void setAliasNetId (int _aliasNetId)
 
void connectToNetVariable (DesignNet *_netPtr)
 bind the pin to the net's pointer for later processing More...
 
bool isOutputPort ()
 
bool isInputPort ()
 
void setDriverPinName (std::string &_driverPinName)
 Set the driver Pin Name of the pin. More...
 
void setDriverPin (DesignPin *_driverPinPtr)
 Set the Driver Pin object. More...
 
DesignPingetDriverPin ()
 Get the driver pin of the pin (nullptr indicates that the pin connects to some global signal like VGG/GND) More...
 
void updateParentCellNetInfo ()
 let the parent cell know that one of its pin connects to a specific net More...
 
DesignNetgetNet ()
 
DesignCellgetCell ()
 Get the Cell object of the pin. More...
 
std::string & getRefPinName ()
 Get the reference pin name of the pin. More...
 
void setUnconnected ()
 Set the attribute unconnected to be true, indicating the pin connect to no net. More...
 
bool isUnconnected ()
 check if the attribute unconnected is true More...
 
void setOffsetInCell (float x, float y)
 Set the Offset of the pin relative to the cell. More...
 
float getOffsetXInCell ()
 Get the offset X of the pin In the cell. More...
 
float getOffsetYInCell ()
 Get the offset Y of the pin In the cell. More...
 
bool isFixed ()
 
void setFixed ()
 
- Public Member Functions inherited from DesignInfo::DesignElement
 DesignElement (const std::string &name, DesignElement *parentPtr, DesignElementType type, int id)
 
 DesignElement (const std::string &name, DesignElementType type, int id)
 
 DesignElement (bool isVirtual, DesignElementType type, int id)
 
 DesignElement (bool isVirtual, const std::string &_name, DesignElementType type, int id)
 
virtual ~DesignElement ()
 
const std::string & getName () const
 
DesignElementgetParentPtr ()
 
DesignElementType getElementType ()
 
int getElementIdInType ()
 

Static Public Member Functions

static DesignPinType checkPinType (DesignCell *cell, std::string &refpinname, bool isInput)
 get the pin type based on its reference name More...
 

Private Attributes

DesignPinType pinType
 pin type could be: More...
 
std::string netName
 
std::string refpinname
 
DesignNetnetPtr = nullptr
 
bool inputOrNot
 
bool unconnected = false
 
bool fixed = false
 
std::string driverPinName
 
DesignPindriverPin = nullptr
 
float offsetXInCell = 0.0
 
float offsetYInCell = 0.0
 
int aliasNetId = -1
 

Detailed Description

A design pin on a design cell connected to a net.

Definition at line 276 of file DesignInfo.h.

Constructor & Destructor Documentation

◆ DesignPin()

DesignInfo::DesignPin::DesignPin ( std::string &  name,
std::string &  refpinname,
DesignPinType  pinType,
bool  inputOrNot,
DesignElement parentPtr,
int  id 
)
inline

Construct a new Design Pin object.

Parameters
namethe actual/unique name of design pin
refpinnamethe reference name of the pin on the cell, indicating which device pin shoud be used on the device BEL
pinTypesome pins can be classified into specific type (clk, reset...)
inputOrNot
parentPtrthe cell of the pin
idthe id of the pin in the pin list

Definition at line 290 of file DesignInfo.h.

◆ ~DesignPin()

DesignInfo::DesignPin::~DesignPin ( )
inline

Definition at line 297 of file DesignInfo.h.

Member Function Documentation

◆ checkPinType()

DesignInfo::DesignPinType DesignInfo::DesignPin::checkPinType ( DesignCell cell,
std::string &  refpinname,
bool  isInput 
)
static

get the pin type based on its reference name

Parameters
cellthe cell of the pin
refpinnamethe reference name of the pin on the cell, indicating which device pin shoud be used on the device BEL
isInput
Returns
DesignPinType

Definition at line 39 of file DesignInfo.cc.

Referenced by DesignInfo::DesignInfo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ connectToNetName()

void DesignInfo::DesignPin::connectToNetName ( std::string &  _netName)
inline

bind the pin to the net by the net name

Parameters
_netName

Definition at line 337 of file DesignInfo.h.

Referenced by DesignInfo::DesignInfo().

Here is the caller graph for this function:

◆ connectToNetVariable()

void DesignInfo::DesignPin::connectToNetVariable ( DesignNet _netPtr)
inline

bind the pin to the net's pointer for later processing

Parameters
_netPtr

Definition at line 357 of file DesignInfo.h.

Referenced by DesignInfo::DesignInfo().

Here is the caller graph for this function:

◆ getAliasNetId()

int DesignInfo::DesignPin::getAliasNetId ( )
inline

Definition at line 342 of file DesignInfo.h.

◆ getCell()

DesignCell* DesignInfo::DesignPin::getCell ( )
inline

Get the Cell object of the pin.

Returns
DesignCell*

Definition at line 418 of file DesignInfo.h.

Referenced by operator<<(), and updateParentCellNetInfo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDriverPin()

DesignPin* DesignInfo::DesignPin::getDriverPin ( )
inline

Get the driver pin of the pin (nullptr indicates that the pin connects to some global signal like VGG/GND)

Returns
DesignPin*

Definition at line 398 of file DesignInfo.h.

◆ getNet()

DesignNet* DesignInfo::DesignPin::getNet ( )
inline

Definition at line 408 of file DesignInfo.h.

Referenced by DesignInfo::loadUserDefinedClusterNets().

Here is the caller graph for this function:

◆ getNetName()

std::string& DesignInfo::DesignPin::getNetName ( )
inline

Get the name of the net which the pin connects to.

Returns
std::string&

Definition at line 327 of file DesignInfo.h.

Referenced by DesignInfo::addPinToNet().

Here is the caller graph for this function:

◆ getOffsetXInCell()

float DesignInfo::DesignPin::getOffsetXInCell ( )
inline

Get the offset X of the pin In the cell.

Returns
float

Definition at line 474 of file DesignInfo.h.

◆ getOffsetYInCell()

float DesignInfo::DesignPin::getOffsetYInCell ( )
inline

Get the offset Y of the pin In the cell.

Returns
float

Definition at line 484 of file DesignInfo.h.

◆ getPinType()

DesignPinType DesignInfo::DesignPin::getPinType ( )
inline

Get the Pin Type of the pin.

Returns
DesignPinType

Definition at line 317 of file DesignInfo.h.

◆ getRefPinName()

std::string& DesignInfo::DesignPin::getRefPinName ( )
inline

Get the reference pin name of the pin.

Returns
std::string&

Definition at line 431 of file DesignInfo.h.

Referenced by operator<<().

Here is the caller graph for this function:

◆ isFixed()

bool DesignInfo::DesignPin::isFixed ( )
inline

Definition at line 489 of file DesignInfo.h.

◆ isInputPort()

bool DesignInfo::DesignPin::isInputPort ( )
inline

Definition at line 367 of file DesignInfo.h.

◆ isOutputPort()

bool DesignInfo::DesignPin::isOutputPort ( )
inline

Definition at line 362 of file DesignInfo.h.

Referenced by DesignInfo::DesignCell::addNetForPin(), DesignInfo::DesignCell::addPin(), and DesignInfo::DesignNet::connectToPinVariable().

Here is the caller graph for this function:

◆ isUnconnected()

bool DesignInfo::DesignPin::isUnconnected ( )
inline

check if the attribute unconnected is true

Returns
true indicating the pin connect to no net
false indicating the pin connect to a net, but note that the net could be nullptr(not design net but a global signal)

Definition at line 452 of file DesignInfo.h.

◆ setAliasNetId()

void DesignInfo::DesignPin::setAliasNetId ( int  _aliasNetId)
inline

Definition at line 347 of file DesignInfo.h.

Referenced by DesignInfo::DesignInfo().

Here is the caller graph for this function:

◆ setDriverPin()

void DesignInfo::DesignPin::setDriverPin ( DesignPin _driverPinPtr)
inline

Set the Driver Pin object.

Parameters
_driverPinPtr

Definition at line 387 of file DesignInfo.h.

◆ setDriverPinName()

void DesignInfo::DesignPin::setDriverPinName ( std::string &  _driverPinName)
inline

Set the driver Pin Name of the pin.

Parameters
_driverPinName

Definition at line 377 of file DesignInfo.h.

Referenced by DesignInfo::DesignInfo().

Here is the caller graph for this function:

◆ setFixed()

void DesignInfo::DesignPin::setFixed ( )
inline

Definition at line 494 of file DesignInfo.h.

◆ setOffsetInCell()

void DesignInfo::DesignPin::setOffsetInCell ( float  x,
float  y 
)
inline

Set the Offset of the pin relative to the cell.

Parameters
x
y

Definition at line 463 of file DesignInfo.h.

◆ setUnconnected()

void DesignInfo::DesignPin::setUnconnected ( )
inline

Set the attribute unconnected to be true, indicating the pin connect to no net.

Definition at line 440 of file DesignInfo.h.

Referenced by DesignInfo::DesignInfo().

Here is the caller graph for this function:

◆ updateParentCellNetInfo()

void DesignInfo::DesignPin::updateParentCellNetInfo ( )

let the parent cell know that one of its pin connects to a specific net

Definition at line 33 of file DesignInfo.cc.

Referenced by DesignInfo::DesignInfo().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ aliasNetId

int DesignInfo::DesignPin::aliasNetId = -1
private

Definition at line 517 of file DesignInfo.h.

Referenced by getAliasNetId(), and setAliasNetId().

◆ driverPin

DesignPin* DesignInfo::DesignPin::driverPin = nullptr
private

Definition at line 514 of file DesignInfo.h.

Referenced by getDriverPin(), and setDriverPin().

◆ driverPinName

std::string DesignInfo::DesignPin::driverPinName
private

Definition at line 513 of file DesignInfo.h.

Referenced by setDriverPinName().

◆ fixed

bool DesignInfo::DesignPin::fixed = false
private

Definition at line 512 of file DesignInfo.h.

Referenced by isFixed(), and setFixed().

◆ inputOrNot

bool DesignInfo::DesignPin::inputOrNot
private

Definition at line 510 of file DesignInfo.h.

Referenced by isInputPort(), and isOutputPort().

◆ netName

std::string DesignInfo::DesignPin::netName
private

Definition at line 507 of file DesignInfo.h.

Referenced by connectToNetName(), and getNetName().

◆ netPtr

DesignNet* DesignInfo::DesignPin::netPtr = nullptr
private

Definition at line 509 of file DesignInfo.h.

Referenced by connectToNetVariable(), getNet(), and updateParentCellNetInfo().

◆ offsetXInCell

float DesignInfo::DesignPin::offsetXInCell = 0.0
private

Definition at line 515 of file DesignInfo.h.

Referenced by getOffsetXInCell(), and setOffsetInCell().

◆ offsetYInCell

float DesignInfo::DesignPin::offsetYInCell = 0.0
private

Definition at line 516 of file DesignInfo.h.

Referenced by getOffsetYInCell(), and setOffsetInCell().

◆ pinType

DesignPinType DesignInfo::DesignPin::pinType
private

pin type could be:

PinType_LUTInput, PinType_LUTOutput, PinType_CLK, PinType_Q,PinType_D, PinType_E, PinType_SR

Definition at line 506 of file DesignInfo.h.

Referenced by getPinType().

◆ refpinname

std::string DesignInfo::DesignPin::refpinname
private

Definition at line 508 of file DesignInfo.h.

Referenced by getRefPinName().

◆ unconnected

bool DesignInfo::DesignPin::unconnected = false
private

Definition at line 511 of file DesignInfo.h.

Referenced by isUnconnected(), and setUnconnected().


The documentation for this class was generated from the following files: