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

a movement unit in placement with information of location and resource demand More...

#include <PlacementInfo.h>

Inheritance diagram for PlacementInfo::PlacementUnit:

Public Member Functions

 PlacementUnit (std::string name, int id, PlacementUnitType unitType)
 
virtual ~PlacementUnit ()
 
void getAnchorLocation (float &x, float &y)
 
float X ()
 
float Y ()
 
float lastX ()
 
float lastY ()
 
void setAnchorLocation (float x, float y)
 Set the Anchor Location for the PlacementUnit. More...
 
void setSpreadLocation (float x, float y, float forgetRatio)
 Set the Spread Location based on forgetting ratio. More...
 
void setSpreadLocation_WithLimitDisplacement (float x, float y, float forgetRatio, float limitDisplacement)
 Set the Spread Location based on forgetting ratio. More...
 
void setAnchorLocationAndForgetTheOriginalOne (float x, float y)
 
void recordSpreadLocatin ()
 
void setFixed ()
 
void setUnfixed ()
 
void setLocked ()
 
void setUnlocked ()
 
bool isLocked ()
 
void setPlaced ()
 
bool isFixed ()
 
bool isPlaced ()
 
std::string & getName ()
 
PlacementUnitType getType ()
 
void setWeight (int numCell)
 
int getWeight ()
 
unsigned int getId ()
 
void renewId (int newId)
 
void setNetsSetPtr (std::vector< PlacementNet * > *_nets)
 Set the Nets Set Ptr object which records the nets connecting to the PlacementUnit. More...
 
std::vector< PlacementNet * > * getNetsSetPtr ()
 Get the Nets Set Ptr object which records the nets connecting to the PlacementUnit. More...
 
int getUnitsBeDrivenByThisPU ()
 
int getUnitsDriveThisPU ()
 
void addDSP ()
 
void addBRAM ()
 
void addLUTRAM ()
 
void addLUT ()
 
void addFF ()
 
void addCARRY ()
 
void addMUX ()
 
bool checkHasDSP ()
 
bool checkHasBRAM ()
 
bool checkHasLUTRAM ()
 
bool checkHasLUT ()
 
bool checkHasFF ()
 
bool checkHasCARRY ()
 
bool checkHasMUX ()
 
bool hasRegister ()
 
bool hasLogic ()
 
bool isMCLB ()
 
bool isLCLB ()
 
int getDSPNum ()
 
int getBRAMNum ()
 
int getLUTRAMNum ()
 
int getLUTNum ()
 
int getCARRYNum ()
 
int getMUXNum ()
 
void setPacked ()
 
void resetPacked ()
 
bool isPacked ()
 
std::set< DesignInfo::DesignNet * > & getClockNets ()
 

Protected Attributes

std::set< DesignInfo::DesignNet * > clockNets
 record the clock nets connected to this PlacementUnit More...
 

Private Attributes

std::string name
 
int id
 
float anchorX = -2000
 
float anchorY = -2000
 
float lastAnchorX = -2000
 
float lastAnchorY = -2000
 
float lastSpreadX = -2000
 
float lastSpreadY = -2000
 
PlacementUnitType unitType
 
std::vector< PlacementNet * > * nets
 record the nets connected to this PlacementUnit More...
 
bool fixed = false
 fixed simply means the PlacementUnit cannot be moved. More...
 
bool placed = false
 the PlacementUnit is placed to BEL slot. More...
 
bool locked = false
 if locked, the attributes of the PlacementUnit cannot be changed (more than fixed.) More...
 
int weight = 1
 
int DSPcnt = 0
 
int BRAMcnt = 0
 
int LUTRAMcnt = 0
 
int LUTcnt = 0
 
int FFcnt = 0
 
int CARRYcnt = 0
 
int MUXcnt = 0
 
int numUnitsBeDrivenByThisPU = -1
 
int numUnitsDriveThisPU = -1
 
bool packed = false
 

Detailed Description

a movement unit in placement with information of location and resource demand

Definition at line 1009 of file PlacementInfo.h.

Constructor & Destructor Documentation

◆ PlacementUnit()

PlacementInfo::PlacementUnit::PlacementUnit ( std::string  name,
int  id,
PlacementUnitType  unitType 
)
inline

Definition at line 1012 of file PlacementInfo.h.

◆ ~PlacementUnit()

virtual PlacementInfo::PlacementUnit::~PlacementUnit ( )
inlinevirtual

Definition at line 1015 of file PlacementInfo.h.

Member Function Documentation

◆ addBRAM()

void PlacementInfo::PlacementUnit::addBRAM ( )
inline

◆ addCARRY()

void PlacementInfo::PlacementUnit::addCARRY ( )
inline

◆ addDSP()

void PlacementInfo::PlacementUnit::addDSP ( )
inline

◆ addFF()

void PlacementInfo::PlacementUnit::addFF ( )
inline

Definition at line 1288 of file PlacementInfo.h.

Referenced by PlacementInfo::PlacementMacro::addCell(), and PlacementInfo::PlacementUnpackedCell::PlacementUnpackedCell().

Here is the caller graph for this function:

◆ addLUT()

void PlacementInfo::PlacementUnit::addLUT ( )
inline

◆ addLUTRAM()

void PlacementInfo::PlacementUnit::addLUTRAM ( )
inline

◆ addMUX()

void PlacementInfo::PlacementUnit::addMUX ( )
inline

◆ checkHasBRAM()

bool PlacementInfo::PlacementUnit::checkHasBRAM ( )
inline

Definition at line 1304 of file PlacementInfo.h.

Referenced by hasLogic(), and hasRegister().

Here is the caller graph for this function:

◆ checkHasCARRY()

bool PlacementInfo::PlacementUnit::checkHasCARRY ( )
inline

Definition at line 1320 of file PlacementInfo.h.

Referenced by ParallelCLBPacker::PackingCLBSite::finalMapToSlotsForCarrySite(), and hasLogic().

Here is the caller graph for this function:

◆ checkHasDSP()

bool PlacementInfo::PlacementUnit::checkHasDSP ( )
inline

Definition at line 1300 of file PlacementInfo.h.

Referenced by hasLogic(), and hasRegister().

Here is the caller graph for this function:

◆ checkHasFF()

bool PlacementInfo::PlacementUnit::checkHasFF ( )
inline

Definition at line 1316 of file PlacementInfo.h.

Referenced by hasLogic(), and hasRegister().

Here is the caller graph for this function:

◆ checkHasLUT()

bool PlacementInfo::PlacementUnit::checkHasLUT ( )
inline

Definition at line 1312 of file PlacementInfo.h.

Referenced by hasLogic().

Here is the caller graph for this function:

◆ checkHasLUTRAM()

bool PlacementInfo::PlacementUnit::checkHasLUTRAM ( )
inline

Definition at line 1308 of file PlacementInfo.h.

Referenced by hasLogic(), and hasRegister().

Here is the caller graph for this function:

◆ checkHasMUX()

bool PlacementInfo::PlacementUnit::checkHasMUX ( )
inline

◆ getAnchorLocation()

void PlacementInfo::PlacementUnit::getAnchorLocation ( float &  x,
float &  y 
)
inline

Definition at line 1018 of file PlacementInfo.h.

◆ getBRAMNum()

int PlacementInfo::PlacementUnit::getBRAMNum ( )
inline

Definition at line 1349 of file PlacementInfo.h.

Referenced by PlacementInfo::ClusterUnit::addPlacementUnit().

Here is the caller graph for this function:

◆ getCARRYNum()

int PlacementInfo::PlacementUnit::getCARRYNum ( )
inline

Definition at line 1361 of file PlacementInfo.h.

Referenced by GlobalPlacer::timingDrivenDetailedPlacement_shortestPath_intermediate().

Here is the caller graph for this function:

◆ getClockNets()

std::set<DesignInfo::DesignNet *>& PlacementInfo::PlacementUnit::getClockNets ( )
inline

◆ getDSPNum()

int PlacementInfo::PlacementUnit::getDSPNum ( )
inline

Definition at line 1345 of file PlacementInfo.h.

Referenced by PlacementInfo::ClusterUnit::addPlacementUnit().

Here is the caller graph for this function:

◆ getId()

◆ getLUTNum()

int PlacementInfo::PlacementUnit::getLUTNum ( )
inline

Definition at line 1357 of file PlacementInfo.h.

◆ getLUTRAMNum()

int PlacementInfo::PlacementUnit::getLUTRAMNum ( )
inline

Definition at line 1353 of file PlacementInfo.h.

◆ getMUXNum()

int PlacementInfo::PlacementUnit::getMUXNum ( )
inline

Definition at line 1365 of file PlacementInfo.h.

◆ getName()

std::string& PlacementInfo::PlacementUnit::getName ( )
inline

◆ getNetsSetPtr()

std::vector<PlacementNet *>* PlacementInfo::PlacementUnit::getNetsSetPtr ( )
inline

Get the Nets Set Ptr object which records the nets connecting to the PlacementUnit.

Returns
std::vector<PlacementNet *>*

Definition at line 1231 of file PlacementInfo.h.

Referenced by ParallelCLBPacker::exceptionPULegalize(), ParallelCLBPacker::PackingCLBSite::getHPWLChangeForPU(), and PlacementInfo::updateLongPaths().

Here is the caller graph for this function:

◆ getType()

PlacementUnitType PlacementInfo::PlacementUnit::getType ( )
inline

◆ getUnitsBeDrivenByThisPU()

int PlacementInfo::PlacementUnit::getUnitsBeDrivenByThisPU ( )
inline

Definition at line 1236 of file PlacementInfo.h.

◆ getUnitsDriveThisPU()

int PlacementInfo::PlacementUnit::getUnitsDriveThisPU ( )
inline

Definition at line 1254 of file PlacementInfo.h.

◆ getWeight()

int PlacementInfo::PlacementUnit::getWeight ( )
inline

◆ hasLogic()

bool PlacementInfo::PlacementUnit::hasLogic ( )
inline

Definition at line 1332 of file PlacementInfo.h.

Referenced by PlacementInfo::updateLongPaths().

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

◆ hasRegister()

bool PlacementInfo::PlacementUnit::hasRegister ( )
inline

Definition at line 1328 of file PlacementInfo.h.

Referenced by PlacementInfo::updateLongPaths().

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

◆ isFixed()

bool PlacementInfo::PlacementUnit::isFixed ( )
inline

Definition at line 1177 of file PlacementInfo.h.

Referenced by PlacementInfo::addPseudoNetsInPlacementInfo(), PlacementInfo::loadPlacementUnitInformation(), and operator<<().

Here is the caller graph for this function:

◆ isLCLB()

bool PlacementInfo::PlacementUnit::isLCLB ( )
inline

Definition at line 1341 of file PlacementInfo.h.

◆ isLocked()

bool PlacementInfo::PlacementUnit::isLocked ( )
inline

Definition at line 1166 of file PlacementInfo.h.

Referenced by operator<<().

Here is the caller graph for this function:

◆ isMCLB()

bool PlacementInfo::PlacementUnit::isMCLB ( )
inline

Definition at line 1337 of file PlacementInfo.h.

◆ isPacked()

bool PlacementInfo::PlacementUnit::isPacked ( )
inline

Definition at line 1377 of file PlacementInfo.h.

◆ isPlaced()

bool PlacementInfo::PlacementUnit::isPlaced ( )
inline

Definition at line 1181 of file PlacementInfo.h.

Referenced by operator<<().

Here is the caller graph for this function:

◆ lastX()

float PlacementInfo::PlacementUnit::lastX ( )
inline

Definition at line 1034 of file PlacementInfo.h.

◆ lastY()

float PlacementInfo::PlacementUnit::lastY ( )
inline

Definition at line 1039 of file PlacementInfo.h.

◆ recordSpreadLocatin()

void PlacementInfo::PlacementUnit::recordSpreadLocatin ( )
inline

Definition at line 1138 of file PlacementInfo.h.

◆ renewId()

void PlacementInfo::PlacementUnit::renewId ( int  newId)
inline

Definition at line 1211 of file PlacementInfo.h.

◆ resetPacked()

void PlacementInfo::PlacementUnit::resetPacked ( )
inline

Definition at line 1373 of file PlacementInfo.h.

◆ setAnchorLocation()

void PlacementInfo::PlacementUnit::setAnchorLocation ( float  x,
float  y 
)
inline

Set the Anchor Location for the PlacementUnit.

meanwhile, if it is not the first iteration in placement, record last anchor location

Parameters
x
y

Definition at line 1052 of file PlacementInfo.h.

Referenced by PlacementInfo::PlacementUnpackedCell::setLockedAt().

Here is the caller graph for this function:

◆ setAnchorLocationAndForgetTheOriginalOne()

void PlacementInfo::PlacementUnit::setAnchorLocationAndForgetTheOriginalOne ( float  x,
float  y 
)
inline

◆ setFixed()

void PlacementInfo::PlacementUnit::setFixed ( )
inline

◆ setLocked()

void PlacementInfo::PlacementUnit::setLocked ( )
inline

Definition at line 1156 of file PlacementInfo.h.

Referenced by PlacementInfo::loadPlacementUnitInformation(), and PlacementInfo::PlacementUnpackedCell::setLockedAt().

Here is the caller graph for this function:

◆ setNetsSetPtr()

void PlacementInfo::PlacementUnit::setNetsSetPtr ( std::vector< PlacementNet * > *  _nets)
inline

Set the Nets Set Ptr object which records the nets connecting to the PlacementUnit.

Parameters
_nets

Definition at line 1221 of file PlacementInfo.h.

◆ setPacked()

void PlacementInfo::PlacementUnit::setPacked ( )
inline

Definition at line 1369 of file PlacementInfo.h.

Referenced by IncrementalBELPacker::LUTFFPairing(), and ParallelCLBPacker::updatePackedMacro().

Here is the caller graph for this function:

◆ setPlaced()

void PlacementInfo::PlacementUnit::setPlaced ( )
inline

Definition at line 1171 of file PlacementInfo.h.

Referenced by PlacementInfo::loadPlacementUnitInformation(), and PlacementInfo::PlacementUnpackedCell::setLockedAt().

Here is the caller graph for this function:

◆ setSpreadLocation()

void PlacementInfo::PlacementUnit::setSpreadLocation ( float  x,
float  y,
float  forgetRatio 
)
inline

Set the Spread Location based on forgetting ratio.

Parameters
x
y
forgetRatiohow much should the PlacementUnit forget the original location from later iteration

Definition at line 1076 of file PlacementInfo.h.

◆ setSpreadLocation_WithLimitDisplacement()

void PlacementInfo::PlacementUnit::setSpreadLocation_WithLimitDisplacement ( float  x,
float  y,
float  forgetRatio,
float  limitDisplacement 
)
inline

Set the Spread Location based on forgetting ratio.

Parameters
x
y
forgetRatiohow much should the PlacementUnit forget the original location from later iteration
limitDisplacementlimit the displacement

Definition at line 1102 of file PlacementInfo.h.

◆ setUnfixed()

void PlacementInfo::PlacementUnit::setUnfixed ( )
inline

Definition at line 1150 of file PlacementInfo.h.

◆ setUnlocked()

void PlacementInfo::PlacementUnit::setUnlocked ( )
inline

Definition at line 1161 of file PlacementInfo.h.

◆ setWeight()

◆ X()

◆ Y()

Member Data Documentation

◆ anchorX

float PlacementInfo::PlacementUnit::anchorX = -2000
private

◆ anchorY

float PlacementInfo::PlacementUnit::anchorY = -2000
private

◆ BRAMcnt

int PlacementInfo::PlacementUnit::BRAMcnt = 0
private

Definition at line 1430 of file PlacementInfo.h.

Referenced by addBRAM(), checkHasBRAM(), and getBRAMNum().

◆ CARRYcnt

int PlacementInfo::PlacementUnit::CARRYcnt = 0
private

Definition at line 1434 of file PlacementInfo.h.

Referenced by addCARRY(), checkHasCARRY(), getCARRYNum(), and isLCLB().

◆ clockNets

std::set<DesignInfo::DesignNet *> PlacementInfo::PlacementUnit::clockNets
protected

◆ DSPcnt

int PlacementInfo::PlacementUnit::DSPcnt = 0
private

Definition at line 1429 of file PlacementInfo.h.

Referenced by addDSP(), checkHasDSP(), and getDSPNum().

◆ FFcnt

int PlacementInfo::PlacementUnit::FFcnt = 0
private

Definition at line 1433 of file PlacementInfo.h.

Referenced by addFF(), and checkHasFF().

◆ fixed

bool PlacementInfo::PlacementUnit::fixed = false
private

fixed simply means the PlacementUnit cannot be moved.

Definition at line 1412 of file PlacementInfo.h.

Referenced by isFixed(), setFixed(), and setUnfixed().

◆ id

int PlacementInfo::PlacementUnit::id
private

Definition at line 1396 of file PlacementInfo.h.

Referenced by PlacementInfo::PlacementMacro::getCell(), and getId().

◆ lastAnchorX

float PlacementInfo::PlacementUnit::lastAnchorX = -2000
private

◆ lastAnchorY

float PlacementInfo::PlacementUnit::lastAnchorY = -2000
private

◆ lastSpreadX

float PlacementInfo::PlacementUnit::lastSpreadX = -2000
private

◆ lastSpreadY

float PlacementInfo::PlacementUnit::lastSpreadY = -2000
private

◆ locked

bool PlacementInfo::PlacementUnit::locked = false
private

◆ LUTcnt

int PlacementInfo::PlacementUnit::LUTcnt = 0
private

Definition at line 1432 of file PlacementInfo.h.

Referenced by addLUT(), checkHasLUT(), getLUTNum(), and isLCLB().

◆ LUTRAMcnt

int PlacementInfo::PlacementUnit::LUTRAMcnt = 0
private

Definition at line 1431 of file PlacementInfo.h.

Referenced by addLUTRAM(), checkHasLUTRAM(), getLUTRAMNum(), and isMCLB().

◆ MUXcnt

int PlacementInfo::PlacementUnit::MUXcnt = 0
private

Definition at line 1435 of file PlacementInfo.h.

Referenced by addMUX(), checkHasMUX(), and getMUXNum().

◆ name

std::string PlacementInfo::PlacementUnit::name
private

Definition at line 1395 of file PlacementInfo.h.

Referenced by getName().

◆ nets

std::vector<PlacementNet *>* PlacementInfo::PlacementUnit::nets
private

record the nets connected to this PlacementUnit

Definition at line 1406 of file PlacementInfo.h.

Referenced by getNetsSetPtr(), getUnitsBeDrivenByThisPU(), getUnitsDriveThisPU(), and setNetsSetPtr().

◆ numUnitsBeDrivenByThisPU

int PlacementInfo::PlacementUnit::numUnitsBeDrivenByThisPU = -1
private

Definition at line 1436 of file PlacementInfo.h.

Referenced by getUnitsBeDrivenByThisPU().

◆ numUnitsDriveThisPU

int PlacementInfo::PlacementUnit::numUnitsDriveThisPU = -1
private

Definition at line 1437 of file PlacementInfo.h.

Referenced by getUnitsDriveThisPU().

◆ packed

bool PlacementInfo::PlacementUnit::packed = false
private

Definition at line 1439 of file PlacementInfo.h.

Referenced by isPacked(), resetPacked(), and setPacked().

◆ placed

bool PlacementInfo::PlacementUnit::placed = false
private

the PlacementUnit is placed to BEL slot.

Currently, this attribute is not used.

Definition at line 1420 of file PlacementInfo.h.

Referenced by isPlaced(), and setPlaced().

◆ unitType

PlacementUnitType PlacementInfo::PlacementUnit::unitType
private

Definition at line 1400 of file PlacementInfo.h.

Referenced by getType().

◆ weight

int PlacementInfo::PlacementUnit::weight = 1
private

Definition at line 1427 of file PlacementInfo.h.

Referenced by getWeight(), and setWeight().


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