AMF-Placer
2.0
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
Information class related to FPGA device, including the details of BEL/Site/Tile/ClockRegion. More...
#include <DeviceInfo.h>
Classes | |
class | ClockColumn |
a column of site in clock region More... | |
class | ClockRegion |
class for clock regions on FPGA More... | |
class | DeviceBEL |
BEL(Basic Element of Logic), the smallest undividable element. More... | |
class | DeviceElement |
basic class of device element More... | |
class | DeviceSite |
Site class for site on device. More... | |
class | DeviceTile |
A tile is a combination of sites. More... | |
Public Types | |
enum | DeviceElementType { DeviceElementType_BEL = 0, DeviceElementType_Site, DeviceElementType_Tile, DeviceElementType_CLOCKREGION, DeviceElementType_Device } |
types of the elements in a device More... | |
Public Member Functions | |
DeviceInfo (std::map< std::string, std::string > &JSONCfg, std::string _deviceName) | |
Construct a new Device Info object. More... | |
~DeviceInfo () | |
void | printStat (bool verbose=false) |
void | addBELTypes (std::string &strBELType) |
add a BEL type into the set of the existing BEL types More... | |
void | addBEL (std::string &BELName, std::string &BELType, DeviceSite *parentSite) |
add a BEL element into the device information More... | |
void | addSiteTypes (std::string &strSiteType) |
add a Site type into the set of the existing site types More... | |
void | addSite (std::string &siteName, std::string &siteType, float locx, float locy, int clockRegionX, int clockRegionY, DeviceTile *parentTile) |
add a site into the device information class More... | |
void | addTileTypes (std::string &strTileType) |
void | addTile (std::string &tileName, std::string &tileType) |
std::string & | getDeviceName () |
std::set< std::string > & | getBELTypes () |
get BEL types in the device More... | |
DeviceBEL * | getBELWithName (std::string &BELName) |
get a BEL based on a given name More... | |
std::vector< DeviceBEL * > & | getBELsInType (std::string &BELType) |
get BELs of a specific type More... | |
std::set< std::string > & | getSiteTypes () |
Get the Site Types in the device. More... | |
DeviceSite * | getSiteWithName (std::string &siteName) |
Get a site based on a given name. More... | |
std::vector< DeviceSite * > & | getSitesInType (std::string &siteType) |
Get sites of a specfic type. More... | |
std::set< std::string > & | getTileTypes () |
Get the tile types in the device. More... | |
DeviceTile * | getTileWithName (std::string &tileName) |
Get a tile With name. More... | |
std::vector< DeviceTile * > & | getTilesInType (std::string &tileType) |
Get the tiles of a specific type. More... | |
void | loadPCIEPinOffset (std::string specialPinOffsetFileName) |
load the detailed location information of pins on PCIE IO slot More... | |
std::vector< DeviceBEL * > & | getBELs () |
std::vector< DeviceSite * > & | getSites () |
std::vector< DeviceTile * > & | getTiles () |
DeviceBEL * | getBEL (std::string &Name) |
DeviceSite * | getSite (std::string &Name) |
DeviceTile * | getTile (std::string &Name) |
std::string | getBELType2FalseBELType (std::string curBELType) |
void | loadBELType2FalseBELType (std::string curFileName) |
load BEL type remapping information since some cell can be placed in sites of different sites. For cell spreading, we need to remap some BEL types to a unified BEL types. Belows are some examples: More... | |
void | resetAllSiteMapping () |
remove the mapped flags for all sites without fixed elements More... | |
void | mapClockRegionToArray () |
map recognized clock regions into an array for later clock utilization evaluation More... | |
float | getBoundaryTolerance () |
void | getClockRegionByLocation (float locX, float locY, int &clockRegionX, int &clockRegionY) |
Get the clock region ID (X/Y) by a given location (X/Y) More... | |
int | getClockRegionNumX () |
Get the number of columns of the clock region array. More... | |
int | getClockRegionNumY () |
Get the number of rows of the clock region array. More... | |
void | recordClockRelatedCell (float locX, float locY, int regionX, int regionY, int cellId, int netId) |
record the information of cell in a specific clock region More... | |
int | getMaxUtilizationOfClockColumns_InClockRegion (int regionX, int regionY) |
Get the maximum utilization among the clock columns in clock region. More... | |
std::vector< std::vector< ClockRegion * > > & | getClockRegions () |
Get the Clock Regions in an 2D array clockregion[Y][X]. More... | |
std::vector< ClockColumn * > & | getClockColumns () |
Private Attributes | |
std::string | deviceName |
std::set< std::string > | BELTypes |
std::map< std::string, std::vector< DeviceBEL * > > | BELType2BELs |
std::vector< DeviceBEL * > | BELs |
std::set< std::string > | siteTypes |
std::map< std::string, std::vector< DeviceSite * > > | siteType2Sites |
std::vector< DeviceSite * > | sites |
std::set< std::string > | tileTypes |
std::map< std::string, std::vector< DeviceTile * > > | tileType2Tiles |
std::vector< DeviceTile * > | tiles |
std::map< std::string, std::string > | BELType2FalseBELType |
std::map< std::string, DeviceBEL * > | name2BEL |
std::map< std::string, DeviceSite * > | name2Site |
std::map< std::string, DeviceTile * > | name2Tile |
std::map< std::pair< int, int >, ClockRegion * > | coord2ClockRegion |
std::vector< std::vector< ClockRegion * > > | clockRegions |
std::vector< ClockColumn * > | clockColumns |
std::vector< float > | clockRegionXBounds |
std::vector< float > | clockRegionYBounds |
std::map< std::string, std::string > & | JSONCfg |
std::string | deviceArchievedTextFileName |
std::string | specialPinOffsetFileName |
float | boundaryTolerance = 0.5 |
int | clockRegionNumX = 1 |
int | clockRegionNumY = 1 |
Information class related to FPGA device, including the details of BEL/Site/Tile/ClockRegion.
Definition at line 42 of file DeviceInfo.h.
types of the elements in a device
Enumerator | |
---|---|
DeviceElementType_BEL | |
DeviceElementType_Site | |
DeviceElementType_Tile | |
DeviceElementType_CLOCKREGION | |
DeviceElementType_Device |
Definition at line 49 of file DeviceInfo.h.
DeviceInfo::DeviceInfo | ( | std::map< std::string, std::string > & | JSONCfg, |
std::string | _deviceName | ||
) |
Construct a new Device Info object.
JSONCfg | user configuration JSON mapping |
_deviceName | device file name |
The device information file will contain information like the text shown below
Definition at line 44 of file DeviceInfo.cc.
|
inline |
Definition at line 915 of file DeviceInfo.h.
void DeviceInfo::addBEL | ( | std::string & | BELName, |
std::string & | BELType, | ||
DeviceSite * | parentSite | ||
) |
add a BEL element into the device information
BELName | |
BELType | |
parentSite |
Definition at line 518 of file DeviceInfo.cc.
Referenced by DeviceInfo().
|
inline |
add a BEL type into the set of the existing BEL types
strBELType |
Definition at line 932 of file DeviceInfo.h.
Referenced by addBEL().
void DeviceInfo::addSite | ( | std::string & | siteName, |
std::string & | siteType, | ||
float | locx, | ||
float | locy, | ||
int | clockRegionX, | ||
int | clockRegionY, | ||
DeviceTile * | parentTile | ||
) |
add a site into the device information class
siteName | site name string |
siteType | site type string |
locx | the location (X) of the site on the device |
locy | the location (Y) of the site on the device |
clockRegionX | the clock region ID X of the site |
clockRegionY | the clock region ID Y of the site |
parentTile | parent tile of this site |
Definition at line 535 of file DeviceInfo.cc.
Referenced by DeviceInfo().
|
inline |
add a Site type into the set of the existing site types
strSiteType |
Definition at line 951 of file DeviceInfo.h.
Referenced by addSite().
void DeviceInfo::addTile | ( | std::string & | tileName, |
std::string & | tileType | ||
) |
Definition at line 554 of file DeviceInfo.cc.
Referenced by DeviceInfo().
|
inline |
Definition at line 970 of file DeviceInfo.h.
Referenced by addTile().
|
inline |
Definition at line 1106 of file DeviceInfo.h.
|
inline |
Definition at line 1093 of file DeviceInfo.h.
|
inline |
get BELs of a specific type
BELType | the target BEL type |
Definition at line 1009 of file DeviceInfo.h.
|
inline |
Definition at line 1122 of file DeviceInfo.h.
Referenced by PlacementInfo::getBELType2FalseBELType(), and PlacementInfo::CompatiblePlacementTable::setBELTypeForCells().
|
inline |
get BEL types in the device
Definition at line 986 of file DeviceInfo.h.
Referenced by PlacementInfo::CompatiblePlacementTable::CompatiblePlacementTable().
|
inline |
get a BEL based on a given name
BELName |
Definition at line 997 of file DeviceInfo.h.
|
inline |
Definition at line 1170 of file DeviceInfo.h.
Referenced by PlacementInfo::createGridBins().
|
inline |
Definition at line 1266 of file DeviceInfo.h.
Referenced by mapClockRegionToArray(), and ParallelCLBPacker::ParallelCLBPacker().
|
inline |
Get the clock region ID (X/Y) by a given location (X/Y)
locX | |
locY | |
clockRegionX | |
clockRegionY |
Definition at line 1183 of file DeviceInfo.h.
Referenced by PlacementInfo::adjustLUTFFUtilization_Clocking(), PlacementInfo::checkClockUtilization(), PlacementTimingOptimizer::clusterLongPathInOneClockRegion(), PlacementInfo::enhanceRiskyClockNet(), ParallelCLBPacker::PackingCLBSite::findNeiborPUsFromBinGrid(), ParallelCLBPacker::findNeiborSitesFromBinGrid(), PlacementTimingOptimizer::getDelayByModel_conservative(), PlacementInfo::PlacementNet::getNewHPWLByTrying(), PlacementTimingOptimizer::stretchClockRegionColumns(), and PlacementInfo::PlacementNet::updateBound2BoundNetWeight().
|
inline |
Get the number of columns of the clock region array.
Definition at line 1217 of file DeviceInfo.h.
Referenced by PlacementInfo::adjustLUTFFUtilization_Clocking(), PlacementInfo::checkClockUtilization(), PlacementInfo::dumpOverflowClockUtilization(), and ClusterPlacer::isDensePlacement().
|
inline |
Get the number of rows of the clock region array.
Definition at line 1227 of file DeviceInfo.h.
Referenced by PlacementInfo::adjustLUTFFUtilization_Clocking(), PlacementInfo::checkClockUtilization(), PlacementInfo::dumpOverflowClockUtilization(), and ClusterPlacer::isDensePlacement().
|
inline |
Get the Clock Regions in an 2D array clockregion[Y][X].
Definition at line 1261 of file DeviceInfo.h.
Referenced by PlacementInfo::adjustLUTFFUtilization_Clocking(), PlacementInfo::checkClockUtilization(), PlacementTimingOptimizer::clusterLongPathInOneClockRegion(), PlacementInfo::dumpOverflowClockUtilization(), PlacementInfo::PlacementInfo(), PlacementTimingOptimizer::stretchClockRegionColumns(), GeneralSpreader::updatePlacementUnitsWithSpreadedCellLocations(), and WirelengthOptimizer::updatePseudoNetForClockRegion().
|
inline |
Definition at line 976 of file DeviceInfo.h.
|
inline |
Get the maximum utilization among the clock columns in clock region.
regionX | clock region ID X |
regionY | clock region ID Y |
Definition at line 1251 of file DeviceInfo.h.
Referenced by PlacementInfo::checkClockUtilization().
|
inline |
Definition at line 1111 of file DeviceInfo.h.
Referenced by InitialPacker::loadFixedPlacementUnits(), and PlacementInfo::PlacementUnpackedCell::setLockedAt().
|
inline |
Definition at line 1097 of file DeviceInfo.h.
Referenced by PlacementInfo::createGridBins(), DeviceInfo::ClockRegion::mapSiteToClockColumns(), and PlacementInfo::PlacementInfo().
|
inline |
Get sites of a specfic type.
siteType |
Definition at line 1043 of file DeviceInfo.h.
Referenced by PlacementInfo::createGridBins(), PlacementInfo::createSiteBinGrid(), DesignInfo::DesignInfo(), MacroLegalizer::findMacroType2AvailableSites(), CLBLegalizer::findSiteType2AvailableSites(), loadPCIEPinOffset(), and ParallelCLBPacker::ParallelCLBPacker().
|
inline |
Get the Site Types in the device.
Definition at line 1020 of file DeviceInfo.h.
|
inline |
Get a site based on a given name.
siteName |
Definition at line 1031 of file DeviceInfo.h.
Referenced by InitialPacker::loadOtherCLBMacros(), and PlacementInfo::loadPlacementUnitInformation().
|
inline |
Definition at line 1116 of file DeviceInfo.h.
Referenced by DeviceInfo::ClockRegion::mapSiteToClockColumns().
|
inline |
Definition at line 1101 of file DeviceInfo.h.
|
inline |
Get the tiles of a specific type.
tileType |
Definition at line 1077 of file DeviceInfo.h.
|
inline |
Get the tile types in the device.
Definition at line 1054 of file DeviceInfo.h.
|
inline |
Get a tile With name.
tileName |
Definition at line 1065 of file DeviceInfo.h.
void DeviceInfo::loadBELType2FalseBELType | ( | std::string | curFileName | ) |
load BEL type remapping information since some cell can be placed in sites of different sites. For cell spreading, we need to remap some BEL types to a unified BEL types. Belows are some examples:
SLICEM_CARRY8 => SLICEL_CARRY8
SLICEM_LUT => SLICEL_LUT
SLICEM_FF => SLICEL_FF
curFileName |
Definition at line 570 of file DeviceInfo.cc.
Referenced by DeviceInfo().
void DeviceInfo::loadPCIEPinOffset | ( | std::string | specialPinOffsetFileName | ) |
load the detailed location information of pins on PCIE IO slot
PCIE I/O is a long slot which contains pins at various location so we cannot ignore the pin location on the PCIE BEL!
specialPinOffsetFileName | a file name which records these information |
Definition at line 394 of file DeviceInfo.cc.
Referenced by DeviceInfo().
void DeviceInfo::mapClockRegionToArray | ( | ) |
map recognized clock regions into an array for later clock utilization evaluation
Definition at line 172 of file DeviceInfo.cc.
Referenced by DeviceInfo().
void DeviceInfo::printStat | ( | bool | verbose = false | ) |
Definition at line 466 of file DeviceInfo.cc.
Referenced by AMFPlacer::AMFPlacer().
void DeviceInfo::recordClockRelatedCell | ( | float | locX, |
float | locY, | ||
int | regionX, | ||
int | regionY, | ||
int | cellId, | ||
int | netId | ||
) |
record the information of cell in a specific clock region
locX | cell location X |
locY | cell location Y |
regionX | clock region ID X |
regionY | clock region ID Y |
cellId | target cell ID |
netId | clock net ID |
Definition at line 388 of file DeviceInfo.cc.
Referenced by PlacementInfo::checkClockUtilization().
|
inline |
remove the mapped flags for all sites without fixed elements
Definition at line 1153 of file DeviceInfo.h.
Referenced by GlobalPlacer::macroLegalize().
|
private |
Definition at line 1275 of file DeviceInfo.h.
Referenced by addBEL(), DeviceInfo(), getBELs(), printStat(), and ~DeviceInfo().
|
private |
Definition at line 1274 of file DeviceInfo.h.
Referenced by addBEL(), DeviceInfo(), getBELsInType(), and printStat().
|
private |
Definition at line 1285 of file DeviceInfo.h.
Referenced by DeviceInfo(), getBELType2FalseBELType(), and loadBELType2FalseBELType().
|
private |
Definition at line 1273 of file DeviceInfo.h.
Referenced by addBELTypes(), DeviceInfo(), getBELTypes(), and printStat().
|
private |
Definition at line 1301 of file DeviceInfo.h.
Referenced by getBoundaryTolerance(), and mapClockRegionToArray().
|
private |
Definition at line 1293 of file DeviceInfo.h.
Referenced by getClockColumns(), and mapClockRegionToArray().
|
private |
Definition at line 1302 of file DeviceInfo.h.
Referenced by DeviceInfo(), getClockRegionByLocation(), getClockRegionNumX(), and mapClockRegionToArray().
|
private |
Definition at line 1303 of file DeviceInfo.h.
Referenced by DeviceInfo(), getClockRegionByLocation(), getClockRegionNumY(), and mapClockRegionToArray().
|
private |
Definition at line 1292 of file DeviceInfo.h.
Referenced by getClockRegions(), getMaxUtilizationOfClockColumns_InClockRegion(), mapClockRegionToArray(), and recordClockRelatedCell().
|
private |
Definition at line 1294 of file DeviceInfo.h.
Referenced by getClockRegionByLocation(), and mapClockRegionToArray().
|
private |
Definition at line 1295 of file DeviceInfo.h.
Referenced by getClockRegionByLocation(), and mapClockRegionToArray().
|
private |
Definition at line 1291 of file DeviceInfo.h.
Referenced by DeviceInfo(), and mapClockRegionToArray().
|
private |
Definition at line 1298 of file DeviceInfo.h.
Referenced by DeviceInfo().
|
private |
Definition at line 1272 of file DeviceInfo.h.
Referenced by DeviceInfo(), and getDeviceName().
|
private |
Definition at line 1297 of file DeviceInfo.h.
Referenced by DeviceInfo().
|
private |
Definition at line 1287 of file DeviceInfo.h.
Referenced by addBEL(), getBEL(), and getBELWithName().
|
private |
Definition at line 1288 of file DeviceInfo.h.
Referenced by addSite(), DeviceInfo(), getSite(), and getSiteWithName().
|
private |
Definition at line 1289 of file DeviceInfo.h.
Referenced by addTile(), DeviceInfo(), getTile(), and getTileWithName().
|
private |
Definition at line 1279 of file DeviceInfo.h.
Referenced by addSite(), DeviceInfo(), getSites(), printStat(), resetAllSiteMapping(), and ~DeviceInfo().
|
private |
Definition at line 1278 of file DeviceInfo.h.
Referenced by addSite(), DeviceInfo(), getSitesInType(), and printStat().
|
private |
Definition at line 1277 of file DeviceInfo.h.
Referenced by addSiteTypes(), DeviceInfo(), getSiteTypes(), and printStat().
|
private |
Definition at line 1299 of file DeviceInfo.h.
Referenced by DeviceInfo(), and loadPCIEPinOffset().
|
private |
Definition at line 1283 of file DeviceInfo.h.
Referenced by addTile(), DeviceInfo(), getTiles(), printStat(), and ~DeviceInfo().
|
private |
Definition at line 1282 of file DeviceInfo.h.
Referenced by addTile(), DeviceInfo(), getTilesInType(), and printStat().
|
private |
Definition at line 1281 of file DeviceInfo.h.
Referenced by addTileTypes(), DeviceInfo(), getTileTypes(), and printStat().