AMF-Placer
2.0
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
Go to the documentation of this file.
25 #ifndef _PlacementTimingOptimizer
26 #define _PlacementTimingOptimizer
38 #include <semaphore.h>
55 std::vector<std::vector<int>>
findCriticalPaths(
float criticalRatio,
bool checkOverlap =
true,
56 int pathNumThr = 1000,
int converThr = 30);
58 std::vector<bool> &FFDirectlyDrivenButNotInOneSlot);
105 float Y1,
float X2,
float Y2)
119 const float timingC0[10] = {95.05263521, -26.50563359, 77.42394117, 106.29195883, -14.975527};
120 const float timingC1[10] = {123.05017047, -169.25614191, -117.28028144, 208.53573639, 174.2573465};
121 const float timingC2[10] = {234.7694101, -433.99467294, -64.96319998, 373.78606257, 139.45226658};
125 int clockRegionX0, clockRegionY0;
127 int clockRegionX1, clockRegionY1;
130 float X = std::fabs(X1 - X2);
131 float Y = std::fabs(Y1 - Y2);
133 if (
X *
X +
Y *
Y < 9)
139 if (std::abs(clockRegionX1 - clockRegionX0) > 1 || clockRegionX1 == 2 || clockRegionX0 == 2)
140 delay += std::abs(clockRegionX1 - clockRegionX0) * 0.5;
146 else if (
X *
X +
Y *
Y < 36)
152 if (std::abs(clockRegionX1 - clockRegionX0) > 1 || clockRegionX1 == 2 || clockRegionX0 == 2)
153 delay += std::abs(clockRegionX1 - clockRegionX0) * 0.5;
165 if (std::abs(clockRegionX1 - clockRegionX0) > 1 || clockRegionX1 == 2 || clockRegionX0 == 2)
166 delay += std::abs(clockRegionX1 - clockRegionX0) * 0.5;
187 inline std::vector<PlacementTimingInfo::TimingGraph<DesignInfo::DesignCell>::TimingNode *> &
getSortedTimingNodes()
192 return timingGraph->getSortedTimingEndpoints();
208 inline float getDis(
float x1,
float y1,
float x2,
float y2)
210 return std::abs(x1 - x2) +
y2xRatio * std::abs(y1 - y2);
float getWorstSlackOfCell(DesignInfo::DesignCell *srcCell)
float getDelayByModel(PlacementTimingInfo::TimingGraph< DesignInfo::DesignCell >::TimingNode *node1, PlacementTimingInfo::TimingGraph< DesignInfo::DesignCell >::TimingNode *node2, float X1, float Y1, float X2, float Y2)
std::vector< PlacementTimingInfo::TimingGraph< DesignInfo::DesignCell >::TimingNode * > & getSortedTimingNodes()
void clusterLongPathInOneClockRegion(int pathLenThr, float clusterThrRatio)
a DesignCell in design netlist, DesignPin objects of which might connect to DesignNet objects
PlacementTimingInfo is the container which record the timing information related to placement.
void stretchClockRegionColumns()
std::map< PlacementInfo::PlacementNet *, int > & getNetActualSlackPinNum()
std::vector< std::vector< int > > findCriticalPaths(float criticalRatio, bool checkOverlap=true, int pathNumThr=1000, int converThr=30)
std::vector< float > PUId2Slack
void incrementalStaticTimingAnalysis_forPUWithLocation(PlacementInfo::PlacementUnit *curPU, float targetX, float targetY)
void getClockRegionByLocation(float locX, float locY, int &clockRegionX, int &clockRegionY)
Get the clock region ID (X/Y) by a given location (X/Y)
This header file contains the classes of data for a standalone design netlist.
TimingNode is the node in TimingGraph, which could be pin or cell in the design netlist.
This header file contains the classes of data for a standalone device.
void dumpClockRegionClusters()
std::map< PlacementInfo::PlacementNet *, int > netActualSlackPinNum
This header file contains the classes of data which record the timing information related to placemen...
PlacementTimingInfo * timingInfo
std::vector< int > findCriticalPath()
~PlacementTimingOptimizer()
a movement unit in placement with information of location and resource demand
PlacementInfo * placementInfo
void setEffectFactor(float _effectFactor)
float getDelayByModel(float X1, float Y1, float X2, float Y2)
float getDelayByModel_conservative(float X1, float Y1, float X2, float Y2)
std::vector< float > pois
PlacementTimingOptimizer(PlacementInfo *placementInfo, std::map< std::string, std::string > &JSONCfg)
float getDis(float x1, float y1, float x2, float y2)
float conductStaticTimingAnalysis(bool enforeOptimisticTiming=false)
Information class related to FPGA device, including the details of BEL/Site/Tile/ClockRegion.
std::vector< std::vector< int > > clockRegionclusters
std::vector< float > & getPUId2Slack(bool update=false)
void propogateArrivalTime()
bool clockRegionClusterTooLarge
std::map< std::string, std::string > & JSONCfg
This header file mainly contains the definition of class PlacementInfo, including information related...
Information related to FPGA designs, including design cells and their interconnections.
void sortedEndpointByDelay()
Information related to FPGA placement (wirelength optimization, cell spreading, legalization,...
TimingGraph< DesignInfo::DesignCell > * getSimplePlacementTimingGraph()
Get the Simple Placement Timing Graph object.