AMF-Placer  2.0
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
PlacementInfo::CompatiblePlacementTable Class Reference

describes the type mapping from design to device, where a cell can be placed (which BEL in which site) More...

#include <PlacementInfo.h>

Collaboration diagram for PlacementInfo::CompatiblePlacementTable:

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
 
DesignInfodesignInfo
 
DeviceInfodeviceInfo
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CompatiblePlacementTable()

PlacementInfo::CompatiblePlacementTable::CompatiblePlacementTable ( std::string  cellType2fixedAmoFileName,
std::string  cellType2sharedCellTypeFileName,
std::string  sharedCellType2BELtypeFileName,
DesignInfo designInfo,
DeviceInfo deviceInfo 
)

Construct a new Compatible Placement Table object.

Parameters
cellType2fixedAmoFileNamea file indicating how many resource BEL slots will be cost for a design cell of specific type
cellType2sharedCellTypeFileNamea file indicating the mapping from design cell types to device resource type groups
sharedCellType2BELtypeFileNamea file indicating the mapping from specific resource types to device BEL resource slots
designInfodesign inforamtion
deviceInfodevice information

Definition at line 90 of file PlacementInfo.cc.

Here is the call graph for this function:

◆ ~CompatiblePlacementTable()

PlacementInfo::CompatiblePlacementTable::~CompatiblePlacementTable ( )
inline

Definition at line 111 of file PlacementInfo.h.

Member Function Documentation

◆ getActualOccupation()

float PlacementInfo::CompatiblePlacementTable::getActualOccupation ( DesignInfo::DesignCell cell)
inline

Get the actual occupation of a specific cell.

Parameters
cell
Returns
float

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getActualOccupationByCellId()

float PlacementInfo::CompatiblePlacementTable::getActualOccupationByCellId ( int  id)
inline

Get the Actual Occupation By Cell Id.

Parameters
id
Returns
float

Definition at line 264 of file PlacementInfo.h.

Referenced by PlacementInfo::getActualOccupationByCellId().

Here is the caller graph for this function:

◆ getcellId2InfationRatio()

std::vector<float>& PlacementInfo::CompatiblePlacementTable::getcellId2InfationRatio ( )
inline

get the reference of cellId2InfationRatio for convenience

Returns
std::vector<float>&

Definition at line 284 of file PlacementInfo.h.

Referenced by PlacementInfo::adjustLUTFFUtilization_Clocking(), PlacementInfo::adjustLUTFFUtilization_Routability(), and PlacementInfo::adjustLUTFFUtilization_Routability_Reset().

Here is the caller graph for this function:

◆ getcellId2Occupation()

std::vector<float>& PlacementInfo::CompatiblePlacementTable::getcellId2Occupation ( )
inline

get the reference of cellId2Occupation for convenience

Returns
std::vector<float>&

Definition at line 274 of file PlacementInfo.h.

Referenced by PlacementInfo::adjustLUTFFUtilization_Packablity(), and PlacementInfo::getcellId2Occupation().

Here is the caller graph for this function:

◆ getInflateRatio()

float PlacementInfo::CompatiblePlacementTable::getInflateRatio ( DesignInfo::DesignCell cell)
inline

Get the inflate ratio of a cell.

Parameters
cell
Returns
float

Definition at line 253 of file PlacementInfo.h.

Referenced by PlacementInfo::getInflateRatio().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getOccupation()

float PlacementInfo::CompatiblePlacementTable::getOccupation ( DesignInfo::DesignCellType  cellType)
inline

Get the theoratical occupation of a specific cell type.

Parameters
cellType
Returns
float

Definition at line 227 of file PlacementInfo.h.

Referenced by PlacementInfo::getOccupation(), and InitialPacker::loadOtherCLBMacros().

Here is the caller graph for this function:

◆ getPotentialBELTypeIDs() [1/2]

std::vector<int>& PlacementInfo::CompatiblePlacementTable::getPotentialBELTypeIDs ( DesignInfo::DesignCell cell)
inline

Get the Potential BEL Type IDs for a specific cell object.

Parameters
cell
Returns
std::vector<int>&

Definition at line 187 of file PlacementInfo.h.

Referenced by PlacementInfo::getPotentialBELTypeIDs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPotentialBELTypeIDs() [2/2]

std::vector<int>& PlacementInfo::CompatiblePlacementTable::getPotentialBELTypeIDs ( DesignInfo::DesignCellType  cellType)
inline

Get the potential BEL Type IDs for a specific cell type.

Parameters
cellType
Returns
std::vector<int>&

Definition at line 203 of file PlacementInfo.h.

◆ getSharedBELTypeId()

int PlacementInfo::CompatiblePlacementTable::getSharedBELTypeId ( std::string  tmpStr)
inline

get the ID of SharedBELType from a string

Parameters
tmpStr
Returns
int

Definition at line 215 of file PlacementInfo.h.

Referenced by PlacementInfo::createGridBins(), and PlacementInfo::getSharedBELTypeId().

Here is the caller graph for this function:

◆ resetCellOccupationToDefault()

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().

Here is the caller graph for this function:

◆ setBELTypeForCells()

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

Parameters
designInfo

Definition at line 217 of file PlacementInfo.cc.

Referenced by InitialPacker::pack(), and PlacementInfo::setBELTypeForCells().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ cellId2InfationRatio

std::vector<float> PlacementInfo::CompatiblePlacementTable::cellId2InfationRatio
private

◆ cellId2Occupation

std::vector<float> PlacementInfo::CompatiblePlacementTable::cellId2Occupation
private

◆ cellId2SharedCellBELTypeID

std::vector<std::vector<int> > PlacementInfo::CompatiblePlacementTable::cellId2SharedCellBELTypeID
private

Definition at line 307 of file PlacementInfo.h.

Referenced by getPotentialBELTypeIDs().

◆ cellType2sharedBELTypeIDs

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().

◆ cellType2sharedBELTypeOccupation

std::map<DesignInfo::DesignCellType, int> PlacementInfo::CompatiblePlacementTable::cellType2sharedBELTypeOccupation

◆ cellType2sharedBELTypes

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().

◆ defaultCellId2Occupation

std::vector<float> PlacementInfo::CompatiblePlacementTable::defaultCellId2Occupation
private

Definition at line 310 of file PlacementInfo.h.

◆ designInfo

DesignInfo* PlacementInfo::CompatiblePlacementTable::designInfo
private

Definition at line 311 of file PlacementInfo.h.

Referenced by CompatiblePlacementTable().

◆ deviceInfo

DeviceInfo* PlacementInfo::CompatiblePlacementTable::deviceInfo
private

Definition at line 312 of file PlacementInfo.h.

Referenced by CompatiblePlacementTable().

◆ realBELTypeName2ID

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().

◆ realBELTypes

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().

◆ sharedCellBELTypeName2ID

std::map<std::string, int> PlacementInfo::CompatiblePlacementTable::sharedCellBELTypeName2ID
private

Definition at line 306 of file PlacementInfo.h.

Referenced by CompatiblePlacementTable(), and getSharedBELTypeId().

◆ sharedCellBELTypes

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().

◆ sharedCellType2BELNames

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().

◆ sharedCellType2SiteType

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().


The documentation for this class was generated from the following files: