AMF-Placer
2.0
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
BEL bin for global placement for a specific shared BEL type. More...
#include <PlacementInfo.h>
Public Member Functions | |
PlacementBinInfo (std::string sharedCellType, float leftX, float rightX, float bottomY, float topY, int row, int column, CompatiblePlacementTable *compatiblePlacementTable) | |
Construct a new Placement Bin Info object. More... | |
~PlacementBinInfo () | |
float | getManhattanDistanceTo (float inX, float inY) |
Get the shortest Manhattan distance from the bin to a specific location. More... | |
void | addSiteIntoBin (DeviceInfo::DeviceSite *curSite) |
add a resource site into the bin More... | |
bool | inRange (float x, float y) |
check if the bin covers a given location on the device More... | |
bool | inRangeY (float y) |
void | addCell (DesignInfo::DesignCell *cell, int occupationAdded) |
add a design cell into the bin More... | |
void | removeCell (DesignInfo::DesignCell *cell, int occupationAdded) |
remove a design cell from the bin More... | |
bool | contains (DesignInfo::DesignCell *cell) |
void | reset () |
void | shrinkBinBy (float r) |
reduce the resource capacity by a given ratio More... | |
void | inflateBinBy (float r) |
increase the resource capacity by a given ratio More... | |
void | resetBinShrinkRatio () |
float | getRequiredBinShrinkRatio () |
void | setRequiredBinShrinkRatio (float r) |
Set the Required Bin Shrink Ratio for a bin. More... | |
std::set< DesignInfo::DesignCell * > & | getCells () |
Get the reference of the set of cells in the bin. More... | |
float | getBinShrinkRatio () |
float | getUtilizationRate () |
Get the Utilization Rate: utilization / (capacity * binShrinkRatio) More... | |
float | getRealUtilizationRate () |
Get the theoratical utilization rate (use LUT theoratical resource utilization without any adjustment to dump bin information) More... | |
float | getUtilization () |
float | getCapacity () |
bool | isOverflow (float overflowThreshold) |
check whether the resource demand in the bin is higher than the supply. More... | |
bool | canAddMore (int BELAmo) |
check whether we can add some BEL demand to the bin More... | |
int | Y () |
return the row of the bin in the grid More... | |
int | X () |
return the column of the bin in the grid More... | |
float | left () |
return the left boundary of the bin More... | |
float | right () |
return the right boundary of the bin More... | |
float | top () |
return the top boundary of the bin More... | |
float | bottom () |
return the bottom boundary of the bin More... | |
std::string | getType () |
void | countOverflow () |
increase one time of overflow situation More... | |
void | countNoOverflow () |
increase one time of non-overflow situation More... | |
void | resetNoOverflowCounter () |
void | resetOverflowCounter () |
int | getNoOverflowCounter () |
int | getOverflowCounter () |
std::vector< DeviceInfo::DeviceSite * > & | getCorrespondingSites () |
Get the reference of the set of sites in the bin. More... | |
std::string & | getSharedCellType () |
void | increaseSWDemandBy (float additionalDemand) |
increase the net routing demand of the bin More... | |
float | getSwitchDemandForNets () const |
get the net routing demand of the bin More... | |
void | setClockRegionX (int _x) |
Set the clock region X for this bin. More... | |
int | getClockRegionX () |
Get the clock region X for this bin. More... | |
Private Attributes | |
std::string | sharedCellType |
std::vector< DeviceInfo::DeviceSite * > | correspondingSites |
CompatiblePlacementTable * | compatiblePlacementTable |
std::set< DesignInfo::DesignCell * > | cells |
int | capacity = 0 |
int | utilization = 0 |
float | binShrinkRatio = 1.0 |
float | requiredBinShrinkRatio = 1.0 |
const float | leftX |
const float | rightX |
const float | topY |
const float | bottomY |
float | eps = 1e-5 |
const int | row |
const int | column |
int | overflowCnt = 0 |
int | noOverflowCnt = 0 |
float | switchDemandForNets = 0.0 |
float | switchSupplyForNets = 0.0 |
std::mutex | mtx |
int | clockRegionX = -1 |
BEL bin for global placement for a specific shared BEL type.
To easier to find the neighbors of a design instance, we divide the design instances in the placement into a grid of bins. A placement bin will record the instances and resource sites inside it.
Definition at line 371 of file PlacementInfo.h.
|
inline |
Construct a new Placement Bin Info object.
To construct a placement bin, we need to indicate its boundaries and target cell type for later information processing.
sharedCellType | |
leftX | bin left boundary |
rightX | bin right boundary |
bottomY | bin bottom boundary |
topY | bin top boundary |
row | which row in the grid |
column | which column in the grid |
compatiblePlacementTable |
Definition at line 390 of file PlacementInfo.h.
|
inline |
Definition at line 400 of file PlacementInfo.h.
|
inline |
add a design cell into the bin
we have to set the mutex locked during the process since we enable multi-threading in the placer.
cell | |
occupationAdded | how many slots will the cell occupy |
Definition at line 469 of file PlacementInfo.h.
void PlacementInfo::PlacementBinInfo::addSiteIntoBin | ( | DeviceInfo::DeviceSite * | curSite | ) |
add a resource site into the bin
check the resources in the site and increase the resource capacity of the bin
curSite |
Definition at line 308 of file PlacementInfo.cc.
|
inline |
return the bottom boundary of the bin
Definition at line 723 of file PlacementInfo.h.
Referenced by GeneralSpreader::expandFromABin(), and ParallelCLBPacker::findNeiborSitesFromBinGrid().
|
inline |
check whether we can add some BEL demand to the bin
BELAmo |
Definition at line 661 of file PlacementInfo.h.
|
inline |
Definition at line 499 of file PlacementInfo.h.
|
inline |
increase one time of non-overflow situation
Definition at line 746 of file PlacementInfo.h.
|
inline |
increase one time of overflow situation
Definition at line 737 of file PlacementInfo.h.
|
inline |
Definition at line 568 of file PlacementInfo.h.
|
inline |
Definition at line 627 of file PlacementInfo.h.
Referenced by GeneralSpreader::SpreadRegion::SpreadRegion().
|
inline |
Get the reference of the set of cells in the bin.
Definition at line 563 of file PlacementInfo.h.
Referenced by PlacementInfo::findNeiborLUTFFsFromBinGrid(), ParallelCLBPacker::PackingCLBSite::findNeiborPUsFromBinGrid(), and GeneralSpreader::SpreadRegion::SpreadRegion().
|
inline |
Get the clock region X for this bin.
Definition at line 818 of file PlacementInfo.h.
|
inline |
Get the reference of the set of sites in the bin.
Definition at line 775 of file PlacementInfo.h.
Referenced by PlacementInfo::findNeiborSiteFromBinGrid(), and ParallelCLBPacker::findNeiborSitesFromBinGrid().
|
inline |
Get the shortest Manhattan distance from the bin to a specific location.
inX | |
inY |
Definition at line 413 of file PlacementInfo.h.
Referenced by PlacementInfo::findNeiborLUTFFsFromBinGrid(), ParallelCLBPacker::PackingCLBSite::findNeiborPUsFromBinGrid(), PlacementInfo::findNeiborSiteFromBinGrid(), and ParallelCLBPacker::findNeiborSitesFromBinGrid().
|
inline |
Definition at line 761 of file PlacementInfo.h.
|
inline |
Definition at line 765 of file PlacementInfo.h.
|
inline |
Get the theoratical utilization rate (use LUT theoratical resource utilization without any adjustment to dump bin information)
Definition at line 592 of file PlacementInfo.h.
|
inline |
Definition at line 541 of file PlacementInfo.h.
|
inline |
Definition at line 780 of file PlacementInfo.h.
|
inline |
get the net routing demand of the bin
Definition at line 799 of file PlacementInfo.h.
|
inline |
Definition at line 728 of file PlacementInfo.h.
|
inline |
Definition at line 622 of file PlacementInfo.h.
Referenced by GeneralSpreader::SpreadRegion::SpreadRegion().
|
inline |
Get the Utilization Rate: utilization / (capacity * binShrinkRatio)
Definition at line 578 of file PlacementInfo.h.
Referenced by getRealUtilizationRate(), and siteSortCmp().
|
inline |
increase the net routing demand of the bin
additionalDemand |
Definition at line 790 of file PlacementInfo.h.
|
inline |
increase the resource capacity by a given ratio
r |
Definition at line 531 of file PlacementInfo.h.
|
inline |
check if the bin covers a given location on the device
x | |
y |
Definition at line 449 of file PlacementInfo.h.
|
inline |
Definition at line 454 of file PlacementInfo.h.
|
inline |
check whether the resource demand in the bin is higher than the supply.
overflowThreshold |
Definition at line 639 of file PlacementInfo.h.
|
inline |
return the left boundary of the bin
Definition at line 693 of file PlacementInfo.h.
Referenced by GeneralSpreader::expandFromABin(), and ParallelCLBPacker::findNeiborSitesFromBinGrid().
|
inline |
remove a design cell from the bin
cell | |
occupationAdded | how many slots were occupied by the cell |
we have to set the mutex locked during the process since we enable multi-threading in the placer.
Definition at line 488 of file PlacementInfo.h.
|
inline |
Definition at line 505 of file PlacementInfo.h.
|
inline |
Definition at line 536 of file PlacementInfo.h.
|
inline |
Definition at line 753 of file PlacementInfo.h.
|
inline |
Definition at line 757 of file PlacementInfo.h.
|
inline |
return the right boundary of the bin
Definition at line 703 of file PlacementInfo.h.
Referenced by GeneralSpreader::expandFromABin(), and ParallelCLBPacker::findNeiborSitesFromBinGrid().
|
inline |
|
inline |
Set the Required Bin Shrink Ratio for a bin.
For example, to resolve routing congestion, we will modify the default resource capacity of a bin
r |
Definition at line 553 of file PlacementInfo.h.
|
inline |
reduce the resource capacity by a given ratio
r |
Definition at line 521 of file PlacementInfo.h.
|
inline |
return the top boundary of the bin
Definition at line 713 of file PlacementInfo.h.
Referenced by GeneralSpreader::expandFromABin(), and ParallelCLBPacker::findNeiborSitesFromBinGrid().
|
inline |
return the column of the bin in the grid
Definition at line 683 of file PlacementInfo.h.
Referenced by GeneralSpreader::SpreadRegion::SpreadRegion().
|
inline |
return the row of the bin in the grid
Definition at line 673 of file PlacementInfo.h.
Referenced by GeneralSpreader::SpreadRegion::SpreadRegion().
|
private |
Definition at line 831 of file PlacementInfo.h.
Referenced by canAddMore(), getBinShrinkRatio(), getCapacity(), getUtilizationRate(), inflateBinBy(), reset(), resetBinShrinkRatio(), and shrinkBinBy().
|
private |
Definition at line 837 of file PlacementInfo.h.
Referenced by bottom(), getManhattanDistanceTo(), inRange(), and inRangeY().
|
private |
Definition at line 829 of file PlacementInfo.h.
Referenced by canAddMore(), getCapacity(), getRealUtilizationRate(), getUtilizationRate(), and isOverflow().
|
private |
Definition at line 827 of file PlacementInfo.h.
Referenced by addCell(), contains(), getCells(), getRealUtilizationRate(), PlacementBinInfo(), removeCell(), reset(), and ~PlacementBinInfo().
|
private |
Definition at line 850 of file PlacementInfo.h.
Referenced by getClockRegionX(), and setClockRegionX().
|
private |
Definition at line 841 of file PlacementInfo.h.
Referenced by X().
|
private |
Definition at line 826 of file PlacementInfo.h.
|
private |
Definition at line 825 of file PlacementInfo.h.
Referenced by getCorrespondingSites(), PlacementBinInfo(), and ~PlacementBinInfo().
|
private |
Definition at line 839 of file PlacementInfo.h.
Referenced by canAddMore(), and isOverflow().
|
private |
Definition at line 834 of file PlacementInfo.h.
Referenced by getManhattanDistanceTo(), inRange(), and left().
|
private |
Definition at line 848 of file PlacementInfo.h.
Referenced by addCell(), and removeCell().
|
private |
Definition at line 844 of file PlacementInfo.h.
Referenced by countNoOverflow(), getNoOverflowCounter(), reset(), and resetNoOverflowCounter().
|
private |
Definition at line 843 of file PlacementInfo.h.
Referenced by countOverflow(), getOverflowCounter(), reset(), and resetOverflowCounter().
|
private |
Definition at line 832 of file PlacementInfo.h.
Referenced by getRequiredBinShrinkRatio(), reset(), resetBinShrinkRatio(), and setRequiredBinShrinkRatio().
|
private |
Definition at line 835 of file PlacementInfo.h.
Referenced by getManhattanDistanceTo(), and right().
|
private |
Definition at line 840 of file PlacementInfo.h.
Referenced by Y().
|
private |
Definition at line 824 of file PlacementInfo.h.
Referenced by getSharedCellType(), and getType().
|
private |
Definition at line 846 of file PlacementInfo.h.
Referenced by getSwitchDemandForNets(), increaseSWDemandBy(), and reset().
|
private |
Definition at line 847 of file PlacementInfo.h.
Referenced by reset().
|
private |
Definition at line 836 of file PlacementInfo.h.
Referenced by getManhattanDistanceTo(), and top().
|
private |
Definition at line 830 of file PlacementInfo.h.
Referenced by addCell(), canAddMore(), getUtilization(), getUtilizationRate(), isOverflow(), removeCell(), and reset().