AMF-Placer
2.0
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
Go to the documentation of this file.
27 #ifndef _CLUSTERPLACER
28 #define _CLUSTERPLACER
41 #include <semaphore.h>
75 delete tmpClusterUnit;
232 for (
auto tmpPU : tmpNet->getUnits())
260 void basicPartitioning(
int minClusterCellNum,
int eachClusterDSPNum,
int eachClusterBRAMNum);
346 if (unpacked->getCell()->isVirtualCell())
348 return timingNodes[unpacked->getCell()->getCellId()]->getLongestPathLength();
353 for (
auto tmpCell : tmpMacro->getCells())
355 if (tmpCell->isVirtualCell())
357 int len = timingNodes[tmpCell->getCellId()]->getLongestPathLength();
368 return ((
float)random() / RAND_MAX) * (max - min) + min;
std::vector< int > placementUnitId2ClusterUnitId
ClusterPlacer will cluster nodes in the given netlist and place the clusters on the device based on s...
float connectionToFixedFactor
the enhancement ratio of the net between elements and I/Os
std::vector< PlacementUnit * > & getPlacementUnits()
void creaeClusterNets()
construct the netlist of the generated clusters based on the PlacementNet in PlacementInfo
void createUserDefinedClusterBasedClusterUnits()
initially cluster cells based on user-defined clusters
a fixed group of multiple standard cells with constraints of their relative locations
void resetClusterInfo()
clean all information of the clusters (including PlacementUnit-Cluster mapping and the cluster-level ...
GraphPartitioner< std::vector< PlacementInfo::ClusterUnit * >, std::vector< PlacementInfo::ClusterNet * > > * userDefinedClusterBasedGraphPartitioner
userDefinedClusterBasedGraphPartitioner will conduct partitioning at the Cluster level considering co...
std::vector< float > clusterBRAMCellWeights
The net between the objects of ClusterUnit class.
GraphPartitioner< std::vector< PlacementInfo::PlacementUnit * >, std::vector< PlacementInfo::PlacementNet * > > * basicGraphPartitioner
basicGraphPartitioner will conduct partitioning at the PlacementUnit level considering connectivity a...
PlacementInfo * placementInfo
the PlacementInfo for this placer to handle
std::vector< float > clusterDSPCellWeights
void addClusterUnit(ClusterUnit *tmpCU)
void basicPartitioning(int minClusterCellNum, int eachClusterDSPNum, int eachClusterBRAMNum)
pure connectivity-based partitioning based on PaToH
std::vector< PlacementInfo::ClusterNet * > clusterNets
void userDefinedClusterBasedPartitioning(int minClusterCellNum, int eachClusterDSPNum, int eachClusterBRAMNum)
initially cluster cells based on user-defined clusters and conduct connectivity-based partitioning ba...
float y2xRatio
the Y/X coordinate calibration factor
int getClockRegionNumY()
Get the number of rows of the clock region array.
std::vector< std::pair< int, int > > cluster2XY
mapping cluster id to X/Y location in the cluster bin
void createLongPathClusterUnits()
initially cluster cells based on user-defined clusters
int jobs
the parallel (multi-threading) worker number
This header file contains the classes of data for a standalone design netlist.
std::vector< float > clusterCLBCellWeights
DeviceInfo * getDeviceInfo()
void refineClustersWithPredefinedClusters()
refine the elements in obtained clusters to ensure the cells in user-defined clusters in the same clu...
void createSinglePUClusterUnits()
wrap single PlacementUnits into ClusterUnit for later uniform processing
bool isClustersToLarges()
check whether the average size of clusters is greater than the given threshold
This header file contains the classes of data for a standalone device.
int getPlacementUnitMaxPathLen(PlacementInfo::PlacementUnit *curPU)
void clockBasedPartitioning(int minClusterCellNum, int eachClusterDSPNum, int eachClusterBRAMNum)
initially cluster cells based on clock domains and conduct connectivity-based partitioning based on P...
int avgClusterSizeRequirement
the requirement of the average size of clusters (the number of cells)
GraphPartitioner will recursively bi-partition the netlist (which could be netlist of clusters) based...
bool randomInitialPlacement
void placeClusters()
conduct the ClusterUnit level SA placement and then map PlacementUnit to cluster location
void setClusterNetsAdjMat()
construct the cluster nets adjacent matrix for simulated-annealing cluster placement
std::vector< int > placementUnit2ClusterId
void hypergraphPartitioning()
call specific partitioners to partition the design netlist into clusters for initial placement
float random_float(float min, float max)
a movement unit in placement with information of location and resource demand
PlacementTimingInfo * getTimingInfo()
std::vector< PlacementInfo::ClusterUnit * > clusterUnits
std::map< std::string, std::string > & JSONCfg
double maxMinCutRate
the maximum cut rate for netlist min-cut partitioning
std::vector< std::pair< float, float > > cluster2FP_XY
mapping cluster id to floating-point X/Y location on device
std::vector< std::set< int > > clusters
the resultant clusters of PlacementUnit (id)
int getClockRegionNumX()
Get the number of columns of the clock region array.
std::vector< TimingGraph< DesignInfo::DesignCell >::TimingNode * > & getSimplePlacementTimingInfo()
Get the Simple Timing Info object which regard design cells as timing nodes.
std::vector< PlacementNet * > & getPlacementNets()
SAPlacer * saPlacer
simulated-annealing placer for the cluster placement.
void ClusterPlacement()
conduct cluster placement, cluster nodes in the given netlist and place the clusters on the device as...
the smallest, indivisible, representable component. It will include only one standard cell
std::vector< std::vector< float > > clusterAdjMat
GraphPartitioner< std::vector< PlacementInfo::ClusterUnit * >, std::vector< PlacementInfo::ClusterNet * > > * clockBasedGraphPartitioner
clockBasedGraphPartitioner will conduct partitioning at the Cluster level considering connectivity an...
void print_info(std::string tmp_string)
std::vector< std::vector< float > > cluster2FixedUnitMat
ClusterPlacer(PlacementInfo *placementInfo, std::map< std::string, std::string > &JSONCfg, float connectionToFixedFactor=5.0)
Construct a new Cluster Placer object.
This header file mainly contains the definition of class PlacementInfo, including information related...
std::vector< float > fixedX
void createClockBasedClusterUnits()
initially cluster cells based on clock domains
Information related to FPGA placement (wirelength optimization, cell spreading, legalization,...
void placeUnitBaseOnClusterPlacement(const std::vector< std::pair< int, int >> &cluster2XY)
map PlacementUnit to cluster location
std::vector< float > fixedY
void clusterPlacementUnits()
cluster the netlist and create ClusterUnit level netlist for SA placement