AMF-Placer
2.0
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
CLBLegalizer maps CLBs (each of which consists of one site) to legal location. e.g. LUTRAM, except those CLBs in CARRY8_Chain. More...
#include <CLBLegalizer.h>
Public Member Functions | |
CLBLegalizer (std::string legalizerName, PlacementInfo *placementInfo, DeviceInfo *deviceInfo, std::vector< std::string > &siteTypesToLegalize, std::map< std::string, std::string > &JSONCfg) | |
Construct a new CLBLegalizer object. More... | |
~CLBLegalizer () | |
void | legalize (bool exactLegalization=false) |
conduct legalization and map the PlacementUnit of one of the given types to sites More... | |
float | getAverageDisplacementOfExactLegalization () |
Get the average displacement of exact legalization for the involved PlacementUnit. More... | |
float | getAverageDisplacementOfRoughLegalization () |
Get the average displacement of rough legalization for the involved PlacementUnit. More... | |
void | setIntitialParameters (float displacementThr, int candidateNum, int _candidateFactor=-1) |
Set the intitial parameters of the legalizer. More... | |
void | resetSitesMapped () |
reset the mapped flag of the involved sites. More... | |
void | dumpMatching (bool fixedColumn=false, bool enforce=false) |
bool | hasNoTarget () |
Private Member Functions | |
void | getPUsToLegalize () |
get the PlacementUnits which SHOULD be legalized More... | |
void | findSiteType2AvailableSites () |
find available sites for each specific type required by the constructor More... | |
void | resolveOverflowColumns () |
resolve the overflow columns during fixed column legalization by spreading "outliers" to neighbor columns More... | |
void | findPossibleLegalLocation (bool fixedColumn=false) |
find potential sites for each PlacementUnit More... | |
void | mapPUsToColumns () |
map PlacementUnit to the columns according to the locations of the cells in it More... | |
void | createBipartiteGraph () |
Create a bipartite graph between PlacementUnit and potential DeviceSites. More... | |
void | roughlyLegalize () |
conduct rough legalization. More... | |
void | fixedColumnLegalize () |
conduct fixed-column legalization as a step in exact legalization. During fixed-column legalization, cells in PlacementUnit (macro) can be only mapped to the same column. More... | |
void | updatePUMatchingLocation (bool isRoughLegalization=true, bool updateDisplacement=true) |
update the locations of the legalization anchors for the PlacementUnits. More... | |
void | finalLegalizeBasedOnDP () |
finally dynamic programming to legalize the PlacementUnits which have been mapped to the columns. More... | |
float | DPForMinHPWL (int colNum, std::vector< std::vector< DeviceInfo::DeviceSite * >> &Column2Sites, std::vector< std::deque< PlacementInfo::PlacementUnit * >> &Column2PUs) |
DP function for the legalization of a specific type of PlacementUnits in the same column. More... | |
void | updateMatchingAndUnmatchedPUs () |
record the matching in private list and update the list of PlacementUnits which are not matched by the bi-partite matching More... | |
void | spreadPUs (int columnNum, std::vector< int > &columnUntilization, std::vector< std::vector< DeviceInfo::DeviceSite * >> &column2Sites, std::vector< std::deque< PlacementInfo::PlacementUnit * >> &column2PUs, std::map< PlacementInfo::PlacementUnit *, int > &cell2Column) |
spread PlacementUnits accross columns to resolve resource overflow More... | |
int | findIdMaxWithRecurence (int minId, int maxId, std::vector< int > &ids) |
find the column which contains the most of cells in a macro in a specific range of columns More... | |
void | setSitesMapped () |
Set the sites which are binded as mapped so they will not be mapped to other elements in the netlist. More... | |
void | resetSettings () |
clear the mapping information and reset the mapping parameters More... | |
void | findPU2SitesInDistance () |
find candidate sites for the PlacementUnits left to be matched More... | |
void | resetPU2SitesInDistance () |
clear the information of candidate sites for the PlacementUnits left to be matched More... | |
int | getPUSiteNum (PlacementInfo::PlacementUnit *tmpPUUnit) |
check how many sites are required by the given PlacementUnit More... | |
void | swapPU (PlacementInfo::PlacementUnit **A, PlacementInfo::PlacementUnit **B) |
void | sortPUsByPU2Y (std::deque< PlacementInfo::PlacementUnit * > &PUs) |
void | sortSitesBySiteY (std::vector< DeviceInfo::DeviceSite * > &sites) |
float | getDisplacement (PlacementInfo::Location &PULoc, DeviceInfo::DeviceSite *curSite) |
float | getDisplacement (PlacementInfo::PlacementUnit *curPU, DeviceInfo::DeviceSite *curSite) |
float | getHPWLChange (PlacementInfo::PlacementUnit *curPU, DeviceInfo::DeviceSite *curSite) |
get the HPWL change when the given PlacementUnit moves to the given DeviceSite More... | |
float | getHPWLChange (PlacementInfo::PlacementUnit *tmpPU, float PUX, float PUY) |
get the HPWL change when the given PlacementUnit moves to the given location More... | |
void | swapSitePtr (DeviceInfo::DeviceSite **siteA, DeviceInfo::DeviceSite **siteB) |
int | sortPartition (PlacementInfo::PlacementUnit *curPU, std::vector< DeviceInfo::DeviceSite * > &sites, int low, int high) |
int | RandomPivotPartition (PlacementInfo::PlacementUnit *curPU, std::vector< DeviceInfo::DeviceSite * > &sites, int low, int high) |
void | quick_sort_WLChange (PlacementInfo::PlacementUnit *curPU, std::vector< DeviceInfo::DeviceSite * > &sites, int p, int q) |
void | swapPUs (PlacementInfo::PlacementUnit **siteA, PlacementInfo::PlacementUnit **siteB) |
int | sortPartition (std::vector< PlacementInfo::PlacementUnit * > &PUs, int low, int high) |
int | RandomPivotPartition (std::vector< PlacementInfo::PlacementUnit * > &PUs, int low, int high) |
void | quick_sort_locX (std::vector< PlacementInfo::PlacementUnit * > &PUs, int p, int q) |
Private Attributes | |
std::string | legalizerName |
PlacementInfo * | placementInfo |
DeviceInfo * | deviceInfo |
PlacementInfo::CompatiblePlacementTable * | compatiblePlacementTable |
compatiblePlacementTable describes the type mapping from design to device, where a cell can be placed (which BEL in which site) More... | |
std::vector< std::string > | siteTypesToLegalize |
a vector of Cell Type string indicating the target types handled by this CLBLegalizer More... | |
std::vector< PlacementInfo::Location > & | cellLoc |
a reference of the locations of cells (in cellId order) More... | |
std::map< std::string, std::string > & | JSONCfg |
MinCostBipartiteMatcher * | minCostBipartiteMatcher = nullptr |
min-cost bipartite matching solver for the legalization More... | |
std::vector< PlacementInfo::PlacementUnit * > | PUsToLegalize |
a vector storing the PlacementUnits which have NOT been legalized More... | |
std::vector< PlacementInfo::PlacementUnit * > | initialPUsToLegalize |
a vector storing the PlacementUnits which SHOULD be legalized More... | |
std::set< PlacementInfo::PlacementUnit * > | PUsToLegalizeSet |
a set storing the PlacementUnits which have NOT been legalized More... | |
std::map< std::string, std::vector< DeviceInfo::DeviceSite * > > | siteType2Sites |
a map record the potential sites of different site types More... | |
std::map< PlacementInfo::PlacementUnit *, std::vector< DeviceInfo::DeviceSite * > > | PU2Sites |
record the mapping from PlacementUnits to the candidate sites which are NOT binded to PUs More... | |
std::map< DeviceInfo::DeviceSite *, int > | rightSiteIds |
map sites to temperary indexes for bipartite matching More... | |
std::vector< DeviceInfo::DeviceSite * > | siteList |
a vector for the candidate sites for bipartite matching More... | |
std::vector< std::vector< std::pair< int, float > > > | adjList |
the adjacent list of the bipartite graph More... | |
std::map< PlacementInfo::PlacementUnit *, std::map< DeviceInfo::DeviceSite *, float > > | PU2Site2HPWLIncrease |
a map of map recording the HPWL overhead when binding a PlacementUnit to a specific site More... | |
std::set< PlacementInfo::PlacementUnit * > | matchedPUs |
a set of PlacementUnits binded to corresponding DeviceSites More... | |
std::set< DeviceInfo::DeviceSite * > | matchedSites |
a set of DeviceSites binded to corresponding PlacementUnits More... | |
std::vector< std::pair< PlacementInfo::PlacementUnit *, DeviceInfo::DeviceSite * > > | PULevelMatching |
record the binding between PlacementUnits and DeviceSites as a vector of pairs More... | |
int | DumpCLBLegalizationCnt = 0 |
float | displacementThreshold = 20 |
displacement threshold to detect potential legal sites More... | |
int | maxNumCandidate = 20 |
the maximum number of final candidate sites More... | |
int | candidateFactor = 5 |
we are allowed to detect a excessive number (>candidateNum) of initial candidates. candidateFactor is to control the excessive ratio. More... | |
int | nJobs = 1 |
the number of the parallel multi-threading workers to handle the legalization problems More... | |
int | MCLBColumnNum = -1 |
the number of SLICEM columns on the target device More... | |
int | LCLBColumnNum = -1 |
the number of SLICEL columns on the target device More... | |
int | MCLBRowNum = -1 |
the number of SLICEM rows ocolumnsn the target device More... | |
int | LCLBRowNum = -1 |
the number of SLICEL rows on the target device More... | |
std::vector< float > | MCLBColumnXs |
the floating-point X location of the SLICEM columns on the device More... | |
std::vector< float > | LCLBColumnXs |
the floating-point X location of the SLICEL columns on the device More... | |
std::vector< std::vector< DeviceInfo::DeviceSite * > > | MCLBColumn2Sites |
record the sites in each column of SLICEM More... | |
std::vector< std::vector< DeviceInfo::DeviceSite * > > | LCLBColumn2Sites |
record the sites in each column of SLICEL More... | |
std::vector< std::deque< PlacementInfo::PlacementUnit * > > | MCLBColumn2PUs |
record the PlacementUnits in each column of SLICEM More... | |
std::vector< std::deque< PlacementInfo::PlacementUnit * > > | LCLBColumn2PUs |
record the PlacementUnits in each column of SLICEL More... | |
std::vector< int > | MCLBColumnUntilization |
record the number of cells (Macro contains multiple cells) in each column of SLICEM More... | |
std::vector< int > | LCLBColumnUntilization |
record the number of cells (Macro contains multiple cells) in each column of SLICEL More... | |
std::map< PlacementInfo::PlacementUnit *, int > | MCLB2Column |
record the mapping from SLICEM CLB PlacementUnits to corresponding columns More... | |
std::map< PlacementInfo::PlacementUnit *, int > | LCLB2Column |
record the mapping from SLICEL CLB PlacementUnits to corresponding columns More... | |
std::map< PlacementInfo::PlacementUnit *, std::vector< DeviceInfo::DeviceSite * > > | PU2LegalSites |
record the mapping from PlacementUnits to exact DeviceSites More... | |
std::map< PlacementInfo::PlacementUnit *, float > | PU2X |
record the mapping from PlacementUnits to exact DeviceSite location X More... | |
std::map< PlacementInfo::PlacementUnit *, float > | PU2Y |
record the mapping from PlacementUnits to exact DeviceSite location Y More... | |
std::map< PlacementInfo::PlacementUnit *, int > | PU2SiteX |
record the exact site X (column id) of involved PlacementUnits More... | |
std::map< PlacementInfo::PlacementUnit *, std::vector< int > > | PU2Columns |
record the column id for the binded cells in involved PlacementUnits More... | |
std::set< PlacementInfo::PlacementUnit * > | MCLBPUs |
the PlacementUnits which shoudl be mapped to SLICEM More... | |
std::set< PlacementInfo::PlacementUnit * > | LCLBPUs |
the PlacementUnits which shoudl be mapped to SLICEL More... | |
std::map< PlacementInfo::PlacementUnit *, std::vector< DeviceInfo::DeviceSite * > * > | PU2SitesInDisplacementThreshold |
a cache record the candidate sites within a given displacement threshold for each PlacementUnit More... | |
bool | enableMCLBLegalization = false |
bool | enableLCLBLegalization = false |
bool | verbose = false |
float | y2xRatio = 1.0 |
float | finalAverageDisplacement = 10000.0 |
the average displacement of exact legalization for the involved PlacementUnit More... | |
float | fixedColumnAverageDisplacement = 10000.0 |
the average displacement of fixed column (but not exactly consective) legalization for the involved PlacementUnit More... | |
float | roughAverageDisplacement = 10000.0 |
the average displacement of rough legalization for the involved PlacementUnit More... | |
bool | noTarget = false |
float | initialDisplacementThreshold = 20 |
displacement threshold to detect potential legal sites More... | |
int | initialMaxNumCandidate = 20 |
the maximum number of final candidate sites More... | |
CLBLegalizer maps CLBs (each of which consists of one site) to legal location. e.g. LUTRAM, except those CLBs in CARRY8_Chain.
It should be aware that on FPGA, there are 2 types of CLBs, SLICEM and SLICEL. SLICEM CLBs can be instantiated as LUTRAM and Shifters while SLICEL can be only instantiated as general logic and carry chains. CLBLegalizer is used to handle 1-to-1 PlacementUnit-DeviceSite legalization.
The legalization procedure will only conduct rough legalization in the early iterations of global placement, and it will conduct exact legalization following rough legalization when the macros are close enough to their potential legal positions.
Definition at line 61 of file CLBLegalizer.h.
CLBLegalizer::CLBLegalizer | ( | std::string | legalizerName, |
PlacementInfo * | placementInfo, | ||
DeviceInfo * | deviceInfo, | ||
std::vector< std::string > & | siteTypesToLegalize, | ||
std::map< std::string, std::string > & | JSONCfg | ||
) |
Construct a new CLBLegalizer object.
legalizerName | the name string of legalizer for log dumping |
placementInfo | the PlacementInfo for this placer to handle |
deviceInfo | device information |
siteTypesToLegalize | a vector of Cell Type string indicating the target types handled by this CLBLegalizer |
JSONCfg | the user-defined placement configuration |
Definition at line 33 of file CLBLegalizer.cc.
|
inline |
Definition at line 75 of file CLBLegalizer.h.
|
private |
Create a bipartite graph between PlacementUnit and potential DeviceSites.
Definition at line 556 of file CLBLegalizer.cc.
Referenced by fixedColumnLegalize(), and roughlyLegalize().
|
private |
DP function for the legalization of a specific type of PlacementUnits in the same column.
colNum | total number of the column of the target type of PlacementUnit |
Column2Sites | a vector record the sites in the columns |
Column2PUs | a vector record the PlacementUnits in the columns |
Definition at line 187 of file CLBLegalizer.cc.
Referenced by finalLegalizeBasedOnDP().
void CLBLegalizer::dumpMatching | ( | bool | fixedColumn = false , |
bool | enforce = false |
||
) |
Definition at line 628 of file CLBLegalizer.cc.
Referenced by GlobalPlacer::GlobalPlacement_CLBElements(), and legalize().
|
private |
finally dynamic programming to legalize the PlacementUnits which have been mapped to the columns.
This function will call DP function for each specific type of PlacementUnits
Definition at line 168 of file CLBLegalizer.cc.
Referenced by legalize().
|
private |
find the column which contains the most of cells in a macro in a specific range of columns
minId | the begin column |
maxId | the end column |
ids | the column ids of the cells in the macro |
Definition at line 916 of file CLBLegalizer.cc.
Referenced by mapPUsToColumns().
|
private |
find potential sites for each PlacementUnit
fixedColumn | true if we want to find potential sites for PlacementUnit in a given column |
Definition at line 472 of file CLBLegalizer.cc.
Referenced by fixedColumnLegalize(), and roughlyLegalize().
|
inlineprivate |
find candidate sites for the PlacementUnits left to be matched
Definition at line 600 of file CLBLegalizer.h.
Referenced by fixedColumnLegalize(), and roughlyLegalize().
|
private |
find available sites for each specific type required by the constructor
Definition at line 374 of file CLBLegalizer.cc.
Referenced by legalize().
|
private |
conduct fixed-column legalization as a step in exact legalization. During fixed-column legalization, cells in PlacementUnit (macro) can be only mapped to the same column.
Definition at line 139 of file CLBLegalizer.cc.
Referenced by legalize().
|
inline |
Get the average displacement of exact legalization for the involved PlacementUnit.
Exact legalization ensures elements in a macro are placed consecutively.
Definition at line 95 of file CLBLegalizer.h.
Referenced by GlobalPlacer::macroLegalize().
|
inline |
Get the average displacement of rough legalization for the involved PlacementUnit.
Rough legalization does not guarantee that elements in a macro are placed consecutively.
Definition at line 117 of file CLBLegalizer.h.
Referenced by GlobalPlacer::macroLegalize().
|
inlineprivate |
Definition at line 665 of file CLBLegalizer.h.
Referenced by dumpMatching(), and findPossibleLegalLocation().
|
inlineprivate |
|
inlineprivate |
get the HPWL change when the given PlacementUnit moves to the given DeviceSite
curPU | the given PlacementUnit |
curSite | the given DeviceSite |
Definition at line 682 of file CLBLegalizer.h.
Referenced by createBipartiteGraph(), DPForMinHPWL(), dumpMatching(), and sortPartition().
|
inlineprivate |
get the HPWL change when the given PlacementUnit moves to the given location
tmpPU | the given PlacementUnit |
PUX | given location X |
PUY | given location Y |
Definition at line 715 of file CLBLegalizer.h.
|
private |
check how many sites are required by the given PlacementUnit
tmpPUUnit | the given PlacementUnit |
Definition at line 685 of file CLBLegalizer.cc.
Referenced by DPForMinHPWL(), dumpMatching(), mapPUsToColumns(), spreadPUs(), and updatePUMatchingLocation().
|
private |
get the PlacementUnits which SHOULD be legalized
Definition at line 336 of file CLBLegalizer.cc.
Referenced by legalize().
|
inline |
Definition at line 148 of file CLBLegalizer.h.
Referenced by GlobalPlacer::GlobalPlacement_CLBElements(), and GlobalPlacer::macroLegalize().
void CLBLegalizer::legalize | ( | bool | exactLegalization = false | ) |
conduct legalization and map the PlacementUnit of one of the given types to sites
exactLegalization | true to ensure elements in a macro are placed consecutively. |
Definition at line 78 of file CLBLegalizer.cc.
Referenced by GlobalPlacer::macroLegalize().
|
private |
map PlacementUnit to the columns according to the locations of the cells in it
Definition at line 939 of file CLBLegalizer.cc.
Referenced by fixedColumnLegalize().
|
inlineprivate |
|
inlineprivate |
Definition at line 769 of file CLBLegalizer.h.
Referenced by findPossibleLegalLocation().
|
inlineprivate |
Definition at line 760 of file CLBLegalizer.h.
Referenced by quick_sort_locX(), and quick_sort_WLChange().
|
inlineprivate |
|
inlineprivate |
clear the information of candidate sites for the PlacementUnits left to be matched
Definition at line 636 of file CLBLegalizer.h.
Referenced by fixedColumnLegalize(), and roughlyLegalize().
|
inlineprivate |
clear the mapping information and reset the mapping parameters
Definition at line 587 of file CLBLegalizer.h.
Referenced by finalLegalizeBasedOnDP(), and legalize().
void CLBLegalizer::resetSitesMapped | ( | ) |
reset the mapped flag of the involved sites.
A mapped site will not be binded to another PlacementUnit.
Definition at line 1002 of file CLBLegalizer.cc.
Referenced by GlobalPlacer::macroLegalize().
|
private |
resolve the overflow columns during fixed column legalization by spreading "outliers" to neighbor columns
Definition at line 904 of file CLBLegalizer.cc.
Referenced by fixedColumnLegalize().
|
private |
conduct rough legalization.
Rough legalization does not guarantee that elements in a macro are placed consecutively. During rough legalization, each cell in a macro will be "legalized" individually as a general standard cell withouth the shape constraints.
Definition at line 114 of file CLBLegalizer.cc.
Referenced by legalize().
|
inline |
Set the intitial parameters of the legalizer.
displacementThr | displacement threshold to detect potential legal sites |
candidateNum | the maximum number of final candidate sites |
_candidateFactor | we are allowed to detect a excessive number (>candidateNum) of initial candidates |
Definition at line 129 of file CLBLegalizer.h.
Referenced by GlobalPlacer::macroLegalize().
|
private |
Set the sites which are binded as mapped so they will not be mapped to other elements in the netlist.
Definition at line 989 of file CLBLegalizer.cc.
Referenced by legalize().
|
inlineprivate |
Definition at line 740 of file CLBLegalizer.h.
Referenced by RandomPivotPartition().
|
inlineprivate |
|
private |
Definition at line 690 of file CLBLegalizer.cc.
Referenced by updatePUMatchingLocation().
|
private |
Definition at line 699 of file CLBLegalizer.cc.
Referenced by DPForMinHPWL().
|
private |
spread PlacementUnits accross columns to resolve resource overflow
columnNum | the number of columns |
columnUntilization | a vector reording the utilization usage of each column |
column2Sites | a vector reording device sites in each column |
column2PUs | a vector reording PlacementUnits in each column |
cell2Column | a map recording the column id for each PlacementUnit |
Definition at line 810 of file CLBLegalizer.cc.
Referenced by resolveOverflowColumns().
|
inlineprivate |
Definition at line 654 of file CLBLegalizer.h.
Referenced by sortPUsByPU2Y().
|
inlineprivate |
Definition at line 783 of file CLBLegalizer.h.
Referenced by RandomPivotPartition(), and sortPartition().
|
inlineprivate |
Definition at line 733 of file CLBLegalizer.h.
Referenced by RandomPivotPartition(), sortPartition(), and sortSitesBySiteY().
|
private |
record the matching in private list and update the list of PlacementUnits which are not matched by the bi-partite matching
Definition at line 600 of file CLBLegalizer.cc.
Referenced by fixedColumnLegalize(), and roughlyLegalize().
|
private |
update the locations of the legalization anchors for the PlacementUnits.
This function might be called more than one time during implementation so we have to specify the type of legalization and whether we want to update the displacement value for the control of some optimizations.
isRoughLegalization | specify the type of legalization |
updateDisplacement | whether we want to update the displacement value for the control of some optimizations |
Definition at line 719 of file CLBLegalizer.cc.
Referenced by legalize().
|
private |
the adjacent list of the bipartite graph
Definition at line 233 of file CLBLegalizer.h.
Referenced by createBipartiteGraph(), fixedColumnLegalize(), and roughlyLegalize().
|
private |
we are allowed to detect a excessive number (>candidateNum) of initial candidates. candidateFactor is to control the excessive ratio.
Definition at line 278 of file CLBLegalizer.h.
Referenced by findPU2SitesInDistance(), and setIntitialParameters().
|
private |
a reference of the locations of cells (in cellId order)
Definition at line 175 of file CLBLegalizer.h.
Referenced by findPU2SitesInDistance().
|
private |
compatiblePlacementTable describes the type mapping from design to device, where a cell can be placed (which BEL in which site)
Definition at line 163 of file CLBLegalizer.h.
|
private |
Definition at line 156 of file CLBLegalizer.h.
Referenced by findSiteType2AvailableSites().
|
private |
displacement threshold to detect potential legal sites
Definition at line 265 of file CLBLegalizer.h.
Referenced by findPossibleLegalLocation(), findPU2SitesInDistance(), fixedColumnLegalize(), resetSettings(), and roughlyLegalize().
|
private |
Definition at line 259 of file CLBLegalizer.h.
Referenced by dumpMatching().
|
private |
Definition at line 423 of file CLBLegalizer.h.
Referenced by CLBLegalizer(), findSiteType2AvailableSites(), getPUsToLegalize(), mapPUsToColumns(), and resolveOverflowColumns().
|
private |
Definition at line 422 of file CLBLegalizer.h.
Referenced by CLBLegalizer(), findSiteType2AvailableSites(), getPUsToLegalize(), mapPUsToColumns(), and resolveOverflowColumns().
|
private |
the average displacement of exact legalization for the involved PlacementUnit
Definition at line 431 of file CLBLegalizer.h.
Referenced by finalLegalizeBasedOnDP(), and getAverageDisplacementOfExactLegalization().
|
private |
the average displacement of fixed column (but not exactly consective) legalization for the involved PlacementUnit
During the fixed column legalization, cells in a macro will be constrainted on one column.
Definition at line 440 of file CLBLegalizer.h.
Referenced by updatePUMatchingLocation().
|
private |
displacement threshold to detect potential legal sites
Definition at line 454 of file CLBLegalizer.h.
Referenced by resetSettings(), and setIntitialParameters().
|
private |
the maximum number of final candidate sites
Definition at line 460 of file CLBLegalizer.h.
Referenced by resetSettings(), and setIntitialParameters().
|
private |
a vector storing the PlacementUnits which SHOULD be legalized
Definition at line 195 of file CLBLegalizer.h.
Referenced by fixedColumnLegalize(), getPUsToLegalize(), and legalize().
|
private |
Definition at line 177 of file CLBLegalizer.h.
Referenced by CLBLegalizer(), and dumpMatching().
|
private |
record the mapping from SLICEL CLB PlacementUnits to corresponding columns
Definition at line 368 of file CLBLegalizer.h.
Referenced by findPossibleLegalLocation(), and resolveOverflowColumns().
|
private |
record the PlacementUnits in each column of SLICEL
Definition at line 344 of file CLBLegalizer.h.
Referenced by dumpMatching(), finalLegalizeBasedOnDP(), mapPUsToColumns(), resolveOverflowColumns(), and updatePUMatchingLocation().
|
private |
record the sites in each column of SLICEL
Definition at line 332 of file CLBLegalizer.h.
Referenced by finalLegalizeBasedOnDP(), findPossibleLegalLocation(), findSiteType2AvailableSites(), and resolveOverflowColumns().
|
private |
the number of SLICEL columns on the target device
Definition at line 296 of file CLBLegalizer.h.
Referenced by dumpMatching(), finalLegalizeBasedOnDP(), findSiteType2AvailableSites(), mapPUsToColumns(), resolveOverflowColumns(), and updatePUMatchingLocation().
|
private |
record the number of cells (Macro contains multiple cells) in each column of SLICEL
Definition at line 356 of file CLBLegalizer.h.
Referenced by mapPUsToColumns(), and resolveOverflowColumns().
|
private |
the floating-point X location of the SLICEL columns on the device
Definition at line 320 of file CLBLegalizer.h.
Referenced by findSiteType2AvailableSites().
|
private |
the PlacementUnits which shoudl be mapped to SLICEL
Definition at line 414 of file CLBLegalizer.h.
Referenced by getPUsToLegalize(), and mapPUsToColumns().
|
private |
the number of SLICEL rows on the target device
Definition at line 308 of file CLBLegalizer.h.
Referenced by findSiteType2AvailableSites().
|
private |
Definition at line 154 of file CLBLegalizer.h.
|
private |
a set of PlacementUnits binded to corresponding DeviceSites
Definition at line 245 of file CLBLegalizer.h.
Referenced by resetSettings(), and updateMatchingAndUnmatchedPUs().
|
private |
a set of DeviceSites binded to corresponding PlacementUnits
Definition at line 251 of file CLBLegalizer.h.
Referenced by findPossibleLegalLocation(), resetSettings(), and updateMatchingAndUnmatchedPUs().
|
private |
the maximum number of final candidate sites
Definition at line 271 of file CLBLegalizer.h.
Referenced by findPossibleLegalLocation(), findPU2SitesInDistance(), fixedColumnLegalize(), resetSettings(), and roughlyLegalize().
|
private |
record the mapping from SLICEM CLB PlacementUnits to corresponding columns
Definition at line 362 of file CLBLegalizer.h.
Referenced by findPossibleLegalLocation(), and resolveOverflowColumns().
|
private |
record the PlacementUnits in each column of SLICEM
Definition at line 338 of file CLBLegalizer.h.
Referenced by dumpMatching(), finalLegalizeBasedOnDP(), mapPUsToColumns(), resolveOverflowColumns(), and updatePUMatchingLocation().
|
private |
record the sites in each column of SLICEM
Definition at line 326 of file CLBLegalizer.h.
Referenced by finalLegalizeBasedOnDP(), findPossibleLegalLocation(), findSiteType2AvailableSites(), and resolveOverflowColumns().
|
private |
the number of SLICEM columns on the target device
Definition at line 290 of file CLBLegalizer.h.
Referenced by dumpMatching(), finalLegalizeBasedOnDP(), findSiteType2AvailableSites(), mapPUsToColumns(), resolveOverflowColumns(), and updatePUMatchingLocation().
|
private |
record the number of cells (Macro contains multiple cells) in each column of SLICEM
Definition at line 350 of file CLBLegalizer.h.
Referenced by mapPUsToColumns(), and resolveOverflowColumns().
|
private |
the floating-point X location of the SLICEM columns on the device
Definition at line 314 of file CLBLegalizer.h.
Referenced by findSiteType2AvailableSites().
|
private |
the PlacementUnits which shoudl be mapped to SLICEM
Definition at line 408 of file CLBLegalizer.h.
Referenced by getPUsToLegalize(), and mapPUsToColumns().
|
private |
the number of SLICEM rows ocolumnsn the target device
Definition at line 302 of file CLBLegalizer.h.
Referenced by findSiteType2AvailableSites().
|
private |
min-cost bipartite matching solver for the legalization
Definition at line 183 of file CLBLegalizer.h.
Referenced by fixedColumnLegalize(), roughlyLegalize(), updateMatchingAndUnmatchedPUs(), and ~CLBLegalizer().
|
private |
the number of the parallel multi-threading workers to handle the legalization problems
Definition at line 284 of file CLBLegalizer.h.
Referenced by CLBLegalizer(), fixedColumnLegalize(), and roughlyLegalize().
|
private |
Definition at line 448 of file CLBLegalizer.h.
Referenced by hasNoTarget(), and legalize().
|
private |
Definition at line 155 of file CLBLegalizer.h.
Referenced by finalLegalizeBasedOnDP(), findPossibleLegalLocation(), findPU2SitesInDistance(), getHPWLChange(), getPUsToLegalize(), and updatePUMatchingLocation().
|
private |
record the column id for the binded cells in involved PlacementUnits
i.e., if a PlacementUnit is PlacementMacro, the cells in it might be allowed to bind to different columns during rough legalization.
Definition at line 402 of file CLBLegalizer.h.
Referenced by mapPUsToColumns(), and updatePUMatchingLocation().
|
private |
record the mapping from PlacementUnits to exact DeviceSites
Definition at line 374 of file CLBLegalizer.h.
Referenced by CLBLegalizer(), DPForMinHPWL(), finalLegalizeBasedOnDP(), resetSitesMapped(), setSitesMapped(), and updatePUMatchingLocation().
|
private |
a map of map recording the HPWL overhead when binding a PlacementUnit to a specific site
Definition at line 239 of file CLBLegalizer.h.
Referenced by CLBLegalizer(), getHPWLChange(), getPUsToLegalize(), and legalize().
|
private |
record the mapping from PlacementUnits to the candidate sites which are NOT binded to PUs
Please be aware that a PlacementUnit (i.e., PlacementMacro) might be binded of multiple sites.
Definition at line 215 of file CLBLegalizer.h.
Referenced by createBipartiteGraph(), DPForMinHPWL(), findPossibleLegalLocation(), fixedColumnLegalize(), and roughlyLegalize().
|
private |
a cache record the candidate sites within a given displacement threshold for each PlacementUnit
Definition at line 420 of file CLBLegalizer.h.
Referenced by findPossibleLegalLocation(), findPU2SitesInDistance(), and resetPU2SitesInDistance().
|
private |
record the exact site X (column id) of involved PlacementUnits
unused currently and just for debugging
Definition at line 393 of file CLBLegalizer.h.
Referenced by updatePUMatchingLocation().
|
private |
record the mapping from PlacementUnits to exact DeviceSite location X
Definition at line 380 of file CLBLegalizer.h.
Referenced by CLBLegalizer(), DPForMinHPWL(), finalLegalizeBasedOnDP(), and updatePUMatchingLocation().
|
private |
record the mapping from PlacementUnits to exact DeviceSite location Y
Definition at line 385 of file CLBLegalizer.h.
Referenced by CLBLegalizer(), DPForMinHPWL(), dumpMatching(), finalLegalizeBasedOnDP(), sortPUsByPU2Y(), and updatePUMatchingLocation().
|
private |
record the binding between PlacementUnits and DeviceSites as a vector of pairs
Definition at line 257 of file CLBLegalizer.h.
Referenced by DPForMinHPWL(), dumpMatching(), getAverageDisplacementOfExactLegalization(), resetSettings(), resetSitesMapped(), setSitesMapped(), updateMatchingAndUnmatchedPUs(), and updatePUMatchingLocation().
|
private |
a vector storing the PlacementUnits which have NOT been legalized
Definition at line 189 of file CLBLegalizer.h.
Referenced by CLBLegalizer(), createBipartiteGraph(), findPossibleLegalLocation(), findPU2SitesInDistance(), fixedColumnLegalize(), getPUsToLegalize(), resetPU2SitesInDistance(), roughlyLegalize(), and updateMatchingAndUnmatchedPUs().
|
private |
a set storing the PlacementUnits which have NOT been legalized
Definition at line 201 of file CLBLegalizer.h.
Referenced by getPUsToLegalize().
|
private |
map sites to temperary indexes for bipartite matching
Definition at line 221 of file CLBLegalizer.h.
Referenced by createBipartiteGraph(), fixedColumnLegalize(), and roughlyLegalize().
|
private |
the average displacement of rough legalization for the involved PlacementUnit
Definition at line 446 of file CLBLegalizer.h.
Referenced by getAverageDisplacementOfRoughLegalization(), and updatePUMatchingLocation().
|
private |
a vector for the candidate sites for bipartite matching
Definition at line 227 of file CLBLegalizer.h.
Referenced by createBipartiteGraph(), and updateMatchingAndUnmatchedPUs().
|
private |
a map record the potential sites of different site types
Definition at line 207 of file CLBLegalizer.h.
Referenced by findPossibleLegalLocation(), and findSiteType2AvailableSites().
|
private |
a vector of Cell Type string indicating the target types handled by this CLBLegalizer
Definition at line 169 of file CLBLegalizer.h.
Referenced by CLBLegalizer(), and findSiteType2AvailableSites().
|
private |
Definition at line 424 of file CLBLegalizer.h.
Referenced by CLBLegalizer(), finalLegalizeBasedOnDP(), fixedColumnLegalize(), legalize(), roughlyLegalize(), and updatePUMatchingLocation().
|
private |
Definition at line 425 of file CLBLegalizer.h.
Referenced by CLBLegalizer(), getDisplacement(), and getHPWLChange().