AMF-Placer
2.0
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
describes the type mapping from design to device, where a cell can be placed (which BEL in which site) More...
#include <PlacementInfo.h>
Public Member Functions | |
CompatiblePlacementTable (std::string cellType2fixedAmoFileName, std::string cellType2sharedCellTypeFileName, std::string sharedCellType2BELtypeFileName, DesignInfo *designInfo, DeviceInfo *deviceInfo) | |
Construct a new Compatible Placement Table object. More... | |
~CompatiblePlacementTable () | |
std::vector< int > & | getPotentialBELTypeIDs (DesignInfo::DesignCell *cell) |
Get the Potential BEL Type IDs for a specific cell object. More... | |
std::vector< int > & | getPotentialBELTypeIDs (DesignInfo::DesignCellType cellType) |
Get the potential BEL Type IDs for a specific cell type. More... | |
int | getSharedBELTypeId (std::string tmpStr) |
get the ID of SharedBELType from a string More... | |
float | getOccupation (DesignInfo::DesignCellType cellType) |
Get the theoratical occupation of a specific cell type. More... | |
float | getActualOccupation (DesignInfo::DesignCell *cell) |
Get the actual occupation of a specific cell. More... | |
float | getInflateRatio (DesignInfo::DesignCell *cell) |
Get the inflate ratio of a cell. More... | |
float | getActualOccupationByCellId (int id) |
Get the Actual Occupation By Cell Id. More... | |
std::vector< float > & | getcellId2Occupation () |
get the reference of cellId2Occupation for convenience More... | |
std::vector< float > & | getcellId2InfationRatio () |
get the reference of cellId2InfationRatio for convenience More... | |
void | setBELTypeForCells (DesignInfo *designInfo) |
set the mapping from cells in design netlist to BEL type ID for later processing. More... | |
void | resetCellOccupationToDefault () |
forget the occupation adjustment by packing feasibility and routing congestion More... | |
Public Attributes | |
std::vector< std::string > | realBELTypes |
the actual BEL types according to the definition file More... | |
std::map< std::string, int > | realBELTypeName2ID |
each actual BEL type gets an integer ID for checking More... | |
std::vector< std::string > | sharedCellBELTypes |
some BEL types (design cells should be mapped to the BEL slot on FPGA device) More... | |
std::map< DesignInfo::DesignCellType, int > | cellType2sharedBELTypeOccupation |
the resource demand of specific types. (cost how many slot/BELs) More... | |
std::map< DesignInfo::DesignCellType, std::vector< std::string > > | cellType2sharedBELTypes |
the mapping from design cell type to device resource type More... | |
std::map< DesignInfo::DesignCellType, std::vector< int > > | cellType2sharedBELTypeIDs |
the mapping from design cell type to device resource type ID More... | |
std::map< std::string, std::string > | sharedCellType2SiteType |
The mapping from shared cell types to device site types. More... | |
std::map< std::string, std::vector< std::string > > | sharedCellType2BELNames |
The mapping from shared cell types to device BEL types. More... | |
Private Attributes | |
std::map< std::string, int > | sharedCellBELTypeName2ID |
std::vector< std::vector< int > > | cellId2SharedCellBELTypeID |
std::vector< float > | cellId2Occupation |
std::vector< float > | cellId2InfationRatio |
std::vector< float > | defaultCellId2Occupation |
DesignInfo * | designInfo |
DeviceInfo * | deviceInfo |
describes the type mapping from design to device, where a cell can be placed (which BEL in which site)
Since different cell types can be mapped to a group of resource BEL types, we handle the mapping in the following way, with a intermediate Shared BEL Type:
cell type A => A => BEL type 1
cell type B => Shared => BEL type 2
cell type C => BEL => BEL type 3
cell type D => Type => BEL type 4
Definition at line 93 of file PlacementInfo.h.
PlacementInfo::CompatiblePlacementTable::CompatiblePlacementTable | ( | std::string | cellType2fixedAmoFileName, |
std::string | cellType2sharedCellTypeFileName, | ||
std::string | sharedCellType2BELtypeFileName, | ||
DesignInfo * | designInfo, | ||
DeviceInfo * | deviceInfo | ||
) |
Construct a new Compatible Placement Table object.
cellType2fixedAmoFileName | a file indicating how many resource BEL slots will be cost for a design cell of specific type |
cellType2sharedCellTypeFileName | a file indicating the mapping from design cell types to device resource type groups |
sharedCellType2BELtypeFileName | a file indicating the mapping from specific resource types to device BEL resource slots |
designInfo | design inforamtion |
deviceInfo | device information |
Definition at line 90 of file PlacementInfo.cc.
|
inline |
Definition at line 111 of file PlacementInfo.h.
|
inline |
Get the actual occupation of a specific cell.
cell |
it will be the multiplication of cellId2Occupation and cellId2InfationRatio. cellId2Occupation might be adjusted by the packing feasibility. cellId2InfationRatio might be adjusted by the routing congestion level.
Definition at line 242 of file PlacementInfo.h.
Referenced by PlacementInfo::getActualOccupation().
|
inline |
Get the Actual Occupation By Cell Id.
id |
Definition at line 264 of file PlacementInfo.h.
Referenced by PlacementInfo::getActualOccupationByCellId().
|
inline |
get the reference of cellId2InfationRatio for convenience
Definition at line 284 of file PlacementInfo.h.
Referenced by PlacementInfo::adjustLUTFFUtilization_Clocking(), PlacementInfo::adjustLUTFFUtilization_Routability(), and PlacementInfo::adjustLUTFFUtilization_Routability_Reset().
|
inline |
get the reference of cellId2Occupation for convenience
Definition at line 274 of file PlacementInfo.h.
Referenced by PlacementInfo::adjustLUTFFUtilization_Packablity(), and PlacementInfo::getcellId2Occupation().
|
inline |
Get the inflate ratio of a cell.
cell |
Definition at line 253 of file PlacementInfo.h.
Referenced by PlacementInfo::getInflateRatio().
|
inline |
Get the theoratical occupation of a specific cell type.
cellType |
Definition at line 227 of file PlacementInfo.h.
Referenced by PlacementInfo::getOccupation(), and InitialPacker::loadOtherCLBMacros().
|
inline |
Get the Potential BEL Type IDs for a specific cell object.
cell |
Definition at line 187 of file PlacementInfo.h.
Referenced by PlacementInfo::getPotentialBELTypeIDs().
|
inline |
Get the potential BEL Type IDs for a specific cell type.
cellType |
Definition at line 203 of file PlacementInfo.h.
|
inline |
get the ID of SharedBELType from a string
tmpStr |
Definition at line 215 of file PlacementInfo.h.
Referenced by PlacementInfo::createGridBins(), and PlacementInfo::getSharedBELTypeId().
void PlacementInfo::CompatiblePlacementTable::resetCellOccupationToDefault | ( | ) |
forget the occupation adjustment by packing feasibility and routing congestion
Definition at line 241 of file PlacementInfo.cc.
Referenced by PlacementInfo::adjustLUTFFUtilization().
void PlacementInfo::CompatiblePlacementTable::setBELTypeForCells | ( | DesignInfo * | designInfo | ) |
set the mapping from cells in design netlist to BEL type ID for later processing.
set the mapping variable cellId2SharedCellBELTypeID for later processing
designInfo |
Definition at line 217 of file PlacementInfo.cc.
Referenced by InitialPacker::pack(), and PlacementInfo::setBELTypeForCells().
|
private |
Definition at line 309 of file PlacementInfo.h.
Referenced by getActualOccupation(), getActualOccupationByCellId(), getcellId2InfationRatio(), and getInflateRatio().
|
private |
Definition at line 308 of file PlacementInfo.h.
Referenced by getActualOccupation(), getActualOccupationByCellId(), and getcellId2Occupation().
|
private |
Definition at line 307 of file PlacementInfo.h.
Referenced by getPotentialBELTypeIDs().
std::map<DesignInfo::DesignCellType, std::vector<int> > PlacementInfo::CompatiblePlacementTable::cellType2sharedBELTypeIDs |
the mapping from design cell type to device resource type ID
string overhead is high. We use integer id to represent the BEL types.
Definition at line 161 of file PlacementInfo.h.
Referenced by CompatiblePlacementTable(), and getPotentialBELTypeIDs().
std::map<DesignInfo::DesignCellType, int> PlacementInfo::CompatiblePlacementTable::cellType2sharedBELTypeOccupation |
the resource demand of specific types. (cost how many slot/BELs)
the resource demand of specific types. (cost how many slot/BELs), e.g., LUT6 will take 2 SLICEM_LUT slots in a CLB site.
Definition at line 144 of file PlacementInfo.h.
Referenced by CompatiblePlacementTable(), IncrementalBELPacker::FFPairing(), InitialPacker::findBRAMMacros(), InitialPacker::findCARRYMacros(), InitialPacker::findDSPMacros(), InitialPacker::findMuxMacros(), InitialPacker::findUnpackedUnits(), getOccupation(), InitialPacker::loadOtherCLBMacros(), PlacementInfo::loadPlacementUnitInformation(), IncrementalBELPacker::LUTFFPairing(), InitialPacker::LUTFFPairing(), and ParallelCLBPacker::updatePackedMacro().
std::map<DesignInfo::DesignCellType, std::vector<std::string> > PlacementInfo::CompatiblePlacementTable::cellType2sharedBELTypes |
the mapping from design cell type to device resource type
the mapping from design cell type to device resource type (we call SharedBELType). Such as LUT1-6 should be mapped to SLICEM_LUT/SLICEL_LUT.
Definition at line 153 of file PlacementInfo.h.
Referenced by CompatiblePlacementTable(), and PlacementInfo::verifyDeviceForDesign().
|
private |
Definition at line 310 of file PlacementInfo.h.
|
private |
Definition at line 311 of file PlacementInfo.h.
Referenced by CompatiblePlacementTable().
|
private |
Definition at line 312 of file PlacementInfo.h.
Referenced by CompatiblePlacementTable().
std::map<std::string, int> PlacementInfo::CompatiblePlacementTable::realBELTypeName2ID |
each actual BEL type gets an integer ID for checking
Definition at line 125 of file PlacementInfo.h.
Referenced by CompatiblePlacementTable().
std::vector<std::string> PlacementInfo::CompatiblePlacementTable::realBELTypes |
the actual BEL types according to the definition file
Definition at line 119 of file PlacementInfo.h.
Referenced by CompatiblePlacementTable().
|
private |
Definition at line 306 of file PlacementInfo.h.
Referenced by CompatiblePlacementTable(), and getSharedBELTypeId().
std::vector<std::string> PlacementInfo::CompatiblePlacementTable::sharedCellBELTypes |
some BEL types (design cells should be mapped to the BEL slot on FPGA device)
e.g., some BEL types are mapped to the same resource slots on FPGA device, such as SLICEL_LUT, SLICEM_LUT,SLICEL_FF,SLICEM_FF,RAMB18E2_L,RAMB18E2_U,SLICEL_MUXF8,SLICEM_MUXF8... We call them SharedBELType
Definition at line 135 of file PlacementInfo.h.
Referenced by CompatiblePlacementTable(), PlacementInfo::createGridBins(), and MacroLegalizer::findMacroType2AvailableSites().
std::map<std::string, std::vector<std::string> > PlacementInfo::CompatiblePlacementTable::sharedCellType2BELNames |
The mapping from shared cell types to device BEL types.
For example, SLICEM_LUT should be mapped to A5LUT,A6LUT,B5LUT,B6LUT,C5LUT,C6LUT,D5LUT,D6LUT,E5LUT,E6LUT,F5LUT,F6LUT,G5LUT,G6LUT,H5LUT,H6LUT. On Xilinx Ultrascale.
Definition at line 179 of file PlacementInfo.h.
Referenced by PlacementInfo::PlacementBinInfo::addSiteIntoBin(), and CompatiblePlacementTable().
std::map<std::string, std::string> PlacementInfo::CompatiblePlacementTable::sharedCellType2SiteType |
The mapping from shared cell types to device site types.
For example, SLICEM_LUT should be mapped to SLICEM.
Definition at line 169 of file PlacementInfo.h.
Referenced by CompatiblePlacementTable(), PlacementInfo::createGridBins(), and MacroLegalizer::findMacroType2AvailableSites().