AMF-Placer
2.0
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
SubBox is the exact container which is the object for bi-partitioning-based cell spreading. More...
#include <GeneralSpreader.h>
Public Member Functions | |
SubBox (PlacementInfo *placementInfo, SpreadRegion *curRegion, std::vector< std::vector< PlacementInfo::PlacementBinInfo * >> &binGrid, float capacityShrinkRatio=1.0, int level=100, bool dirIsH=true) | |
Construct a new Sub Box object. More... | |
SubBox (SubBox *parentBox, int topBinY, int bottomBinY, int leftBinX, int rightBinX, int cellRangeBegin, int cellRangeEnd) | |
Construct a new Sub Box object. More... | |
~SubBox () | |
void | addCellId (int cellId) |
void | spreadAndPartition () |
spread cells and partition the SubBox into smaller SubBoxes More... | |
int | Partition (std::vector< int > &cellIds, int low, int high, bool Xsort) |
the partition/sort function for quick sorting by cell location (X or Y) More... | |
int | RandomPivotPartition (std::vector< int > &cellIds, int low, int high, bool Xsort) |
the partition/sort function for quick sorting by cell location (X or Y) More... | |
void | quick_sort (std::vector< int > &cellIds, int p, int q, bool Xsort) |
recursive implementation of quick sort for cell ids by X/Y location More... | |
int | getLevel () |
void | spreadCellsH (SubBox **boxA, SubBox **boxB) |
split horizontally the SubBox into smaller ones and assign cells to them More... | |
void | spreadCellsV (SubBox **boxA, SubBox **boxB) |
split vertically the SubBox into smaller ones and assign cells to them More... | |
int | top () |
get the top bin coordinate Y of the SubBox in bin grid More... | |
int | bottom () |
get the bottom bin coordinate Y of the SubBox in bin grid More... | |
int | left () |
get the left bin coordinate X of the SubBox in bin grid More... | |
int | right () |
get the right bin coordinate X of the SubBox in bin grid More... | |
Public Attributes | |
PlacementInfo * | placementInfo |
std::vector< std::vector< PlacementInfo::PlacementBinInfo * > > & | binGrid |
float | capacityShrinkRatio = 1.0 |
bool | dirIsH |
int | minExpandSize = 2 |
the minimum length of boundary More... | |
Private Attributes | |
int | topBinY |
int | bottomBinY |
int | leftBinX |
int | rightBinX |
std::vector< int > | cellIds |
the cells in this SubBox More... | |
int | level |
SubBox is the exact container which is the object for bi-partitioning-based cell spreading.
Each SubBox can be splited vertically or horizontally and cells can be assigned to the partitions accoringly if it is allowed.
Definition at line 821 of file GeneralSpreader.h.
|
inline |
Construct a new Sub Box object.
placementInfo | PlacementInfo so this object can access the corresponding placement database |
curRegion | the parent SpreadRegion of this SubBox which guides the boundary setting of the subox |
binGrid | the bin grid which record the cell density distribution |
capacityShrinkRatio | shrink the area supply to a specific ratio |
level | current recursion level |
dirIsH | split vertically or horizontally (it is a priority setting instead of enforcement) |
Definition at line 834 of file GeneralSpreader.h.
|
inline |
Construct a new Sub Box object.
parentBox | inheret information from a parent SubBox |
topBinY | the top bin index |
bottomBinY | the bottom bin index |
leftBinX | the left bin index |
rightBinX | the right bin index |
cellRangeBegin | the range begin for copying the cell ids to this child SubBox |
cellRangeEnd | the range end for copying the cell ids to this child SubBox |
Definition at line 869 of file GeneralSpreader.h.
|
inline |
Definition at line 882 of file GeneralSpreader.h.
|
inline |
Definition at line 890 of file GeneralSpreader.h.
|
inline |
get the bottom bin coordinate Y of the SubBox in bin grid
Definition at line 1028 of file GeneralSpreader.h.
Referenced by operator<<().
|
inline |
Definition at line 992 of file GeneralSpreader.h.
|
inline |
get the left bin coordinate X of the SubBox in bin grid
Definition at line 1038 of file GeneralSpreader.h.
Referenced by operator<<().
|
inline |
the partition/sort function for quick sorting by cell location (X or Y)
cellIds | the cell ids for location sorting |
low | lower bound of sorting range |
high | upper bound of sorting range |
Xsort | sort by X loction or Y location |
Definition at line 910 of file GeneralSpreader.h.
Referenced by RandomPivotPartition().
|
inline |
recursive implementation of quick sort for cell ids by X/Y location
cellIds | the cell ids for location sorting |
p | lower bound of sorting range |
q | upper bound of sorting range |
Xsort | sort by X loction or Y location |
Definition at line 979 of file GeneralSpreader.h.
|
inline |
the partition/sort function for quick sorting by cell location (X or Y)
cellIds | the cell ids for location sorting |
low | lower bound of sorting range |
high | upper bound of sorting range |
Xsort | sort by X loction or Y location |
Definition at line 961 of file GeneralSpreader.h.
Referenced by quick_sort().
|
inline |
get the right bin coordinate X of the SubBox in bin grid
Definition at line 1048 of file GeneralSpreader.h.
Referenced by operator<<().
void GeneralSpreader::SpreadRegion::SubBox::spreadAndPartition | ( | ) |
spread cells and partition the SubBox into smaller SubBoxes
Definition at line 706 of file GeneralSpreader.cc.
Referenced by spreadAndPartition(), and GeneralSpreader::spreadPlacementUnits().
split horizontally the SubBox into smaller ones and assign cells to them
boxA | the obtained pointer of new smaller SubBox |
boxB | another obtained pointer of new smaller SubBox |
Definition at line 752 of file GeneralSpreader.cc.
split vertically the SubBox into smaller ones and assign cells to them
boxA | the obtained pointer of new smaller SubBox |
boxB | another obtained pointer of new smaller SubBox |
Definition at line 986 of file GeneralSpreader.cc.
|
inline |
get the top bin coordinate Y of the SubBox in bin grid
Definition at line 1018 of file GeneralSpreader.h.
Referenced by operator<<().
std::vector<std::vector<PlacementInfo::PlacementBinInfo *> >& GeneralSpreader::SpreadRegion::SubBox::binGrid |
Definition at line 887 of file GeneralSpreader.h.
|
private |
Definition at line 1054 of file GeneralSpreader.h.
Referenced by bottom().
float GeneralSpreader::SpreadRegion::SubBox::capacityShrinkRatio = 1.0 |
Definition at line 888 of file GeneralSpreader.h.
|
private |
the cells in this SubBox
Definition at line 1060 of file GeneralSpreader.h.
Referenced by addCellId(), Partition(), quick_sort(), RandomPivotPartition(), spreadCellsH(), spreadCellsV(), and SubBox().
bool GeneralSpreader::SpreadRegion::SubBox::dirIsH |
Definition at line 1064 of file GeneralSpreader.h.
|
private |
Definition at line 1054 of file GeneralSpreader.h.
Referenced by left().
|
private |
Definition at line 1061 of file GeneralSpreader.h.
Referenced by getLevel().
int GeneralSpreader::SpreadRegion::SubBox::minExpandSize = 2 |
the minimum length of boundary
Definition at line 1070 of file GeneralSpreader.h.
PlacementInfo* GeneralSpreader::SpreadRegion::SubBox::placementInfo |
Definition at line 886 of file GeneralSpreader.h.
Referenced by Partition().
|
private |
Definition at line 1054 of file GeneralSpreader.h.
Referenced by right().
|
private |
Definition at line 1054 of file GeneralSpreader.h.
Referenced by top().