|
AMF-Placer
2.0
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
GraphPartitioner will recursively bi-partition the netlist (which could be netlist of clusters) based on connectivitity and the net weights. More...
#include <GraphPartitioner.h>
Public Member Functions | |
| GraphPartitioner (NodeList &nodeList, NetList &netList, int minClusterCellNum, int jobs, bool verbose) | |
| Construct a new Graph Partitioner object. More... | |
| ~GraphPartitioner () | |
| void | solve (int eachClusterDSPNum, int eachClusterBRAMNum) |
| a caller which will start the partitioning procedure More... | |
| const std::vector< std::vector< int > > & | getClusters () |
| Get the clusters after partitioning (each is a vector containing ids for nodes inside the clusters) More... | |
| const std::vector< std::set< int > > & | getClustersPUIdSets () |
| Get the clusters after partitioning (each is a set containing ids for nodes inside the clusters) More... | |
| unsigned | minCutBipartition (const std::vector< int > &inputCluster, std::array< std::vector< int >, 2 > &outputClusters, GraphPartitioner< NodeList, NetList > *graphPartitioner, int eachClusterDSPNum, int eachClusterBRAMNum) |
| the actual function to call partitioner to conduct partitioning with given clusters and parameters More... | |
| void | setMaxCutRate (double _maxCutRate) |
| Set the max mincut rate. More... | |
Static Public Member Functions | |
| static void | recursiveMinCutPartition (std::vector< int > &inputCluster, GraphPartitioner< NodeList, NetList > *graphPartitioner, int eachClusterDSPNum, int eachClusterBRAMNum) |
| a recursive function which will recursively bi-partition the input cluster into two based on connectivity and some resouce constraints More... | |
Private Member Functions | |
| void | sortClustersBySize () |
| sort clusters by sizes to fix the output clusters' order for later processing and avoid the random factor due to the multi-process procedure More... | |
Private Attributes | |
| std::vector< std::vector< int > > | clusters |
| the resultant clusters (vectors) after partitioning More... | |
| std::vector< std::set< int > > | ClusterPUIdSets |
| the resultant clusters (set) after partitioning More... | |
| sem_t | partitionSem |
| used to limit the number of processes for the parallel partitioning More... | |
| std::mutex | clustersLock |
| std::mutex | cntLock |
| double | maxCutRate = 0.0333 |
| NodeList & | nodeList |
| NetList & | netList |
| unsigned int | minClusterCellNum |
| bool | verbose |
GraphPartitioner will recursively bi-partition the netlist (which could be netlist of clusters) based on connectivitity and the net weights.
| NodeList | given node list type |
| NetList | given net list type |
Definition at line 51 of file GraphPartitioner.h.
|
inline |
Construct a new Graph Partitioner object.
| nodeList | the node list (it should be a vector) |
| netList | the net list (it should be a vector) |
| minClusterCellNum | a constraint to set the minimum size of the cluster |
| jobs | the number of parallel partitioning workers |
| verbose | whether dumps detailed information |
Definition at line 63 of file GraphPartitioner.h.
|
inline |
Definition at line 71 of file GraphPartitioner.h.
|
inline |
Get the clusters after partitioning (each is a vector containing ids for nodes inside the clusters)
Definition at line 88 of file GraphPartitioner.h.
|
inline |
Get the clusters after partitioning (each is a set containing ids for nodes inside the clusters)
Definition at line 98 of file GraphPartitioner.h.
Referenced by ClusterPlacer::basicPartitioning(), ClusterPlacer::clockBasedPartitioning(), and ClusterPlacer::userDefinedClusterBasedPartitioning().

| unsigned GraphPartitioner< NodeList, NetList >::minCutBipartition | ( | const std::vector< int > & | inputCluster, |
| std::array< std::vector< int >, 2 > & | outputClusters, | ||
| GraphPartitioner< NodeList, NetList > * | graphPartitioner, | ||
| int | eachClusterDSPNum, | ||
| int | eachClusterBRAMNum | ||
| ) |
the actual function to call partitioner to conduct partitioning with given clusters and parameters
| inputCluster | a given input cluster |
| outputClusters | the resultant two clusters |
| graphPartitioner | the partitioning worker (graphPartitioner) to handle this partitioning task (since this is a static function, we have to pass the worker as arguments to conduct partitioning) |
| eachClusterDSPNum | a constraint to limit the maximum of the DSP in a cluster |
| eachClusterBRAMNum | a constraint to limit the maximum of the BRAM in a cluster |
Definition at line 108 of file GraphPartitioner.cc.
Referenced by GraphPartitioner< NodeList, NetList >::recursiveMinCutPartition().

|
static |
a recursive function which will recursively bi-partition the input cluster into two based on connectivity and some resouce constraints
| inputCluster | a given input cluster |
| graphPartitioner | the partitioning worker (graphPartitioner) to handle this partitioning task (since this is a static function, we have to pass the worker as arguments to conduct partitioning) |
| eachClusterDSPNum | a constraint to limit the maximum of the DSP in a cluster |
| eachClusterBRAMNum | a constraint to limit the maximum of the BRAM in a cluster |
Definition at line 65 of file GraphPartitioner.cc.

|
inline |
Set the max mincut rate.
if the partitioning lead to a high mincut rate, the partitioning should be canceled.
| _maxCutRate |
Definition at line 148 of file GraphPartitioner.h.
Referenced by ClusterPlacer::basicPartitioning(), ClusterPlacer::clockBasedPartitioning(), and ClusterPlacer::userDefinedClusterBasedPartitioning().

| void GraphPartitioner< NodeList, NetList >::solve | ( | int | eachClusterDSPNum, |
| int | eachClusterBRAMNum | ||
| ) |
a caller which will start the partitioning procedure
| eachClusterDSPNum | a constraint to limit the maximum of the DSP in a cluster |
| eachClusterBRAMNum | a constraint to limit the maximum of the BRAM in a cluster |
Definition at line 32 of file GraphPartitioner.cc.
Referenced by ClusterPlacer::basicPartitioning(), ClusterPlacer::clockBasedPartitioning(), and ClusterPlacer::userDefinedClusterBasedPartitioning().

|
private |
sort clusters by sizes to fix the output clusters' order for later processing and avoid the random factor due to the multi-process procedure
Definition at line 45 of file GraphPartitioner.cc.
|
private |
the resultant clusters (set) after partitioning
Definition at line 164 of file GraphPartitioner.h.
Referenced by GraphPartitioner< std::vector< PlacementInfo::ClusterUnit * >, std::vector< PlacementInfo::ClusterNet * > >::getClustersPUIdSets().
|
private |
the resultant clusters (vectors) after partitioning
Definition at line 158 of file GraphPartitioner.h.
Referenced by GraphPartitioner< std::vector< PlacementInfo::ClusterUnit * >, std::vector< PlacementInfo::ClusterNet * > >::getClusters(), GraphPartitioner< std::vector< PlacementInfo::ClusterUnit * >, std::vector< PlacementInfo::ClusterNet * > >::getClustersPUIdSets(), and GraphPartitioner< NodeList, NetList >::recursiveMinCutPartition().
|
private |
Definition at line 171 of file GraphPartitioner.h.
Referenced by GraphPartitioner< NodeList, NetList >::recursiveMinCutPartition().
|
private |
Definition at line 171 of file GraphPartitioner.h.
|
private |
Definition at line 173 of file GraphPartitioner.h.
Referenced by GraphPartitioner< std::vector< PlacementInfo::ClusterUnit * >, std::vector< PlacementInfo::ClusterNet * > >::setMaxCutRate().
|
private |
Definition at line 177 of file GraphPartitioner.h.
|
private |
Definition at line 176 of file GraphPartitioner.h.
|
private |
Definition at line 175 of file GraphPartitioner.h.
Referenced by GraphPartitioner< std::vector< PlacementInfo::ClusterUnit * >, std::vector< PlacementInfo::ClusterNet * > >::recursiveMinCutPartition().
|
private |
used to limit the number of processes for the parallel partitioning
Definition at line 170 of file GraphPartitioner.h.
Referenced by GraphPartitioner< std::vector< PlacementInfo::ClusterUnit * >, std::vector< PlacementInfo::ClusterNet * > >::GraphPartitioner(), and GraphPartitioner< NodeList, NetList >::recursiveMinCutPartition().
|
private |
Definition at line 186 of file GraphPartitioner.h.
Referenced by GraphPartitioner< std::vector< PlacementInfo::ClusterUnit * >, std::vector< PlacementInfo::ClusterNet * > >::minCutBipartition().