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

a fixed group of multiple standard cells with constraints of their relative locations More...

#include <PlacementInfo.h>

Inheritance diagram for PlacementInfo::PlacementMacro:
Collaboration diagram for PlacementInfo::PlacementMacro:

Classes

struct  _fixedPlacementInfo_inMacro
 some constaints of elements' relative locations are defined by the design. We need to record this. More...
 

Public Types

enum  PlacementMacroType {
  PlacementMacroType_LUTFFPair = 0, PlacementMacroType_LUTLUTSeires, PlacementMacroType_FFFFPair, PlacementMacroType_HALFCLB,
  PlacementMacroType_LCLB, PlacementMacroType_MCLB, PlacementMacroType_CARRY, PlacementMacroType_DSP,
  PlacementMacroType_BRAM, PlacementMacroType_MUX7, PlacementMacroType_MUX8, PlacementMacroType_MUX9
}
 
typedef struct PlacementInfo::PlacementMacro::_fixedPlacementInfo_inMacro fixedPlacementInfo_inMacro
 some constaints of elements' relative locations are defined by the design. We need to record this. More...
 

Public Member Functions

 PlacementMacro (std::string name, int id, PlacementMacroType macroType)
 
 ~PlacementMacro ()
 
bool hasCell (DesignInfo::DesignCell *curCell)
 
void addCell (DesignInfo::DesignCell *curCell, DesignInfo::DesignCellType cellType, float x, float y)
 add a real cell into the macro with its offsets in the macro More...
 
DesignInfo::DesignCelladdVirtualCell (std::string virtualCellName, DesignInfo *designInfo, DesignInfo::DesignCellType cellType, float x, float y)
 add a virtual cell with a given name into the macro with its offsets in the macro. Usually it is to occupy routing resource in a site. More...
 
void addVirtualCell (DesignInfo *designInfo, DesignInfo::DesignCellType cellType, float x, float y)
 add a virtual cell without given name into the macro with its offsets in the macro. Usually it is to occupy routing resource in a site. More...
 
std::vector< DesignInfo::DesignCell * > & getCells ()
 
void addFixedCellInfo (DesignInfo::DesignCell *cell, std::string siteName, std::string BELName)
 add information of a fixed cell More...
 
float getCellOffsetXInMacro (DesignInfo::DesignCell *cell)
 
float getCellOffsetYInMacro (DesignInfo::DesignCell *cell)
 
void getVirtualCellInfo (int vId, float &x, float &y, DesignInfo::DesignCellType &cellType)
 Get the virtual cell information, including offsets and cell type. More...
 
DesignInfo::DesignCellType getVirtualCellType (int vId)
 
int getNumOfCells ()
 
DesignInfo::DesignCellgetCell (unsigned int id)
 
float getTopOffset ()
 
float getBottomOffset ()
 
float getLeftOffset ()
 
float getRightOffset ()
 
void addOccupiedSite (float siteOffset, float occ)
 for site-level cell spreading More...
 
bool isCellInMacro (DesignInfo::DesignCell *curCell)
 
PlacementMacroType getMacroType ()
 
std::vector< fixedPlacementInfo_inMacro > & getFixedCellInfoVec ()
 
- Public Member Functions inherited from PlacementInfo::PlacementUnit
 PlacementUnit (std::string name, int id, PlacementUnitType unitType)
 
virtual ~PlacementUnit ()
 
void getAnchorLocation (float &x, float &y)
 
float X ()
 
float Y ()
 
float lastX ()
 
float lastY ()
 
void setAnchorLocation (float x, float y)
 Set the Anchor Location for the PlacementUnit. More...
 
void setSpreadLocation (float x, float y, float forgetRatio)
 Set the Spread Location based on forgetting ratio. More...
 
void setSpreadLocation_WithLimitDisplacement (float x, float y, float forgetRatio, float limitDisplacement)
 Set the Spread Location based on forgetting ratio. More...
 
void setAnchorLocationAndForgetTheOriginalOne (float x, float y)
 
void recordSpreadLocatin ()
 
void setFixed ()
 
void setUnfixed ()
 
void setLocked ()
 
void setUnlocked ()
 
bool isLocked ()
 
void setPlaced ()
 
bool isFixed ()
 
bool isPlaced ()
 
std::string & getName ()
 
PlacementUnitType getType ()
 
void setWeight (int numCell)
 
int getWeight ()
 
unsigned int getId ()
 
void renewId (int newId)
 
void setNetsSetPtr (std::vector< PlacementNet * > *_nets)
 Set the Nets Set Ptr object which records the nets connecting to the PlacementUnit. More...
 
std::vector< PlacementNet * > * getNetsSetPtr ()
 Get the Nets Set Ptr object which records the nets connecting to the PlacementUnit. More...
 
int getUnitsBeDrivenByThisPU ()
 
int getUnitsDriveThisPU ()
 
void addDSP ()
 
void addBRAM ()
 
void addLUTRAM ()
 
void addLUT ()
 
void addFF ()
 
void addCARRY ()
 
void addMUX ()
 
bool checkHasDSP ()
 
bool checkHasBRAM ()
 
bool checkHasLUTRAM ()
 
bool checkHasLUT ()
 
bool checkHasFF ()
 
bool checkHasCARRY ()
 
bool checkHasMUX ()
 
bool hasRegister ()
 
bool hasLogic ()
 
bool isMCLB ()
 
bool isLCLB ()
 
int getDSPNum ()
 
int getBRAMNum ()
 
int getLUTRAMNum ()
 
int getLUTNum ()
 
int getCARRYNum ()
 
int getMUXNum ()
 
void setPacked ()
 
void resetPacked ()
 
bool isPacked ()
 
std::set< DesignInfo::DesignNet * > & getClockNets ()
 

Private Attributes

std::set< DesignInfo::DesignCell * > cellSet
 
std::map< DesignInfo::DesignCell *, int > cell2IdInMacro
 
std::vector< DesignInfo::DesignCell * > cellsInMacro
 
std::vector< DesignInfo::DesignCellTypecells_Type
 
std::vector< float > offsetX
 
std::vector< float > offsetY
 
std::vector< fixedPlacementInfo_inMacrofixedCells
 
float left
 
float right
 
float top
 
float bottom
 
PlacementMacroType macroType
 

Additional Inherited Members

- Protected Attributes inherited from PlacementInfo::PlacementUnit
std::set< DesignInfo::DesignNet * > clockNets
 record the clock nets connected to this PlacementUnit More...
 

Detailed Description

a fixed group of multiple standard cells with constraints of their relative locations

Definition at line 1524 of file PlacementInfo.h.

Member Typedef Documentation

◆ fixedPlacementInfo_inMacro

some constaints of elements' relative locations are defined by the design. We need to record this.

Member Enumeration Documentation

◆ PlacementMacroType

Enumerator
PlacementMacroType_LUTFFPair 
PlacementMacroType_LUTLUTSeires 
PlacementMacroType_FFFFPair 
PlacementMacroType_HALFCLB 
PlacementMacroType_LCLB 
PlacementMacroType_MCLB 
PlacementMacroType_CARRY 
PlacementMacroType_DSP 
PlacementMacroType_BRAM 
PlacementMacroType_MUX7 
PlacementMacroType_MUX8 
PlacementMacroType_MUX9 

Definition at line 1527 of file PlacementInfo.h.

Constructor & Destructor Documentation

◆ PlacementMacro()

PlacementInfo::PlacementMacro::PlacementMacro ( std::string  name,
int  id,
PlacementMacroType  macroType 
)
inline

Definition at line 1545 of file PlacementInfo.h.

◆ ~PlacementMacro()

PlacementInfo::PlacementMacro::~PlacementMacro ( )
inline

Definition at line 1558 of file PlacementInfo.h.

Member Function Documentation

◆ addCell()

void PlacementInfo::PlacementMacro::addCell ( DesignInfo::DesignCell curCell,
DesignInfo::DesignCellType  cellType,
float  x,
float  y 
)
inline

add a real cell into the macro with its offsets in the macro

Parameters
curCell
cellTypeupdate the cell's "virtual" cell type so it can occupy specific resource (e.g., make an LUT1 an LUT6)
x
y

Definition at line 1576 of file PlacementInfo.h.

Referenced by IncrementalBELPacker::FFPairing(), InitialPacker::findBRAMMacros(), InitialPacker::findCARRYMacros(), InitialPacker::findDSPMacros(), InitialPacker::findLUTRAMMacros(), InitialPacker::findMuxMacros(), InitialPacker::loadOtherCLBMacros(), PlacementInfo::loadPlacementUnitInformation(), IncrementalBELPacker::LUTFFPairing(), InitialPacker::LUTFFPairing(), and ParallelCLBPacker::updatePackedMacro().

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

◆ addFixedCellInfo()

void PlacementInfo::PlacementMacro::addFixedCellInfo ( DesignInfo::DesignCell cell,
std::string  siteName,
std::string  BELName 
)
inline

add information of a fixed cell

Parameters
cell
siteName
BELName

Definition at line 1751 of file PlacementInfo.h.

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

Here is the caller graph for this function:

◆ addOccupiedSite()

void PlacementInfo::PlacementMacro::addOccupiedSite ( float  siteOffset,
float  occ 
)
inline

◆ addVirtualCell() [1/2]

void PlacementInfo::PlacementMacro::addVirtualCell ( DesignInfo designInfo,
DesignInfo::DesignCellType  cellType,
float  x,
float  y 
)
inline

add a virtual cell without given name into the macro with its offsets in the macro. Usually it is to occupy routing resource in a site.

Parameters
designInfosince we are creating virtual cell, it should be added into design information
cellTypethe type of the virtual cell type
x
y

Definition at line 1685 of file PlacementInfo.h.

Here is the call graph for this function:

◆ addVirtualCell() [2/2]

DesignInfo::DesignCell* PlacementInfo::PlacementMacro::addVirtualCell ( std::string  virtualCellName,
DesignInfo designInfo,
DesignInfo::DesignCellType  cellType,
float  x,
float  y 
)
inline

add a virtual cell with a given name into the macro with its offsets in the macro. Usually it is to occupy routing resource in a site.

Parameters
virtualCellNamethe name of the virtual cell to be added into the design
designInfosince we are creating virtual cell, it should be added into design information
cellTypethe type of the virtual cell type
x
y
Returns
DesignInfo::DesignCell*

Definition at line 1634 of file PlacementInfo.h.

Referenced by InitialPacker::findBRAMMacros(), InitialPacker::findCARRYMacros(), InitialPacker::findMuxMacros(), and InitialPacker::mapCarryRelatedRouteThru().

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

◆ getBottomOffset()

float PlacementInfo::PlacementMacro::getBottomOffset ( )
inline

Definition at line 1806 of file PlacementInfo.h.

Referenced by operator<<().

Here is the caller graph for this function:

◆ getCell()

DesignInfo::DesignCell* PlacementInfo::PlacementMacro::getCell ( unsigned int  id)
inline

Definition at line 1796 of file PlacementInfo.h.

◆ getCellOffsetXInMacro()

float PlacementInfo::PlacementMacro::getCellOffsetXInMacro ( DesignInfo::DesignCell cell)
inline

Definition at line 1756 of file PlacementInfo.h.

Referenced by operator<<(), and PlacementInfo::PlacementNet::PlacementNet().

Here is the caller graph for this function:

◆ getCellOffsetYInMacro()

float PlacementInfo::PlacementMacro::getCellOffsetYInMacro ( DesignInfo::DesignCell cell)
inline

◆ getCells()

◆ getFixedCellInfoVec()

std::vector<fixedPlacementInfo_inMacro>& PlacementInfo::PlacementMacro::getFixedCellInfoVec ( )
inline

Definition at line 1846 of file PlacementInfo.h.

Referenced by operator<<().

Here is the caller graph for this function:

◆ getLeftOffset()

float PlacementInfo::PlacementMacro::getLeftOffset ( )
inline

Definition at line 1810 of file PlacementInfo.h.

Referenced by operator<<().

Here is the caller graph for this function:

◆ getMacroType()

◆ getNumOfCells()

int PlacementInfo::PlacementMacro::getNumOfCells ( )
inline

Definition at line 1791 of file PlacementInfo.h.

◆ getRightOffset()

float PlacementInfo::PlacementMacro::getRightOffset ( )
inline

Definition at line 1814 of file PlacementInfo.h.

Referenced by operator<<().

Here is the caller graph for this function:

◆ getTopOffset()

float PlacementInfo::PlacementMacro::getTopOffset ( )
inline

Definition at line 1802 of file PlacementInfo.h.

Referenced by operator<<().

Here is the caller graph for this function:

◆ getVirtualCellInfo()

void PlacementInfo::PlacementMacro::getVirtualCellInfo ( int  vId,
float &  x,
float &  y,
DesignInfo::DesignCellType cellType 
)
inline

Get the virtual cell information, including offsets and cell type.

Parameters
vId
x
y
cellType

Definition at line 1779 of file PlacementInfo.h.

◆ getVirtualCellType()

DesignInfo::DesignCellType PlacementInfo::PlacementMacro::getVirtualCellType ( int  vId)
inline

Definition at line 1786 of file PlacementInfo.h.

Referenced by operator<<().

Here is the caller graph for this function:

◆ hasCell()

bool PlacementInfo::PlacementMacro::hasCell ( DesignInfo::DesignCell curCell)
inline

◆ isCellInMacro()

bool PlacementInfo::PlacementMacro::isCellInMacro ( DesignInfo::DesignCell curCell)
inline

Definition at line 1836 of file PlacementInfo.h.

Member Data Documentation

◆ bottom

float PlacementInfo::PlacementMacro::bottom
private

Definition at line 1863 of file PlacementInfo.h.

Referenced by addCell(), addVirtualCell(), getBottomOffset(), and PlacementMacro().

◆ cell2IdInMacro

std::map<DesignInfo::DesignCell *, int> PlacementInfo::PlacementMacro::cell2IdInMacro
private

◆ cells_Type

std::vector<DesignInfo::DesignCellType> PlacementInfo::PlacementMacro::cells_Type
private

◆ cellSet

std::set<DesignInfo::DesignCell *> PlacementInfo::PlacementMacro::cellSet
private

Definition at line 1854 of file PlacementInfo.h.

Referenced by addCell(), addVirtualCell(), hasCell(), isCellInMacro(), and PlacementMacro().

◆ cellsInMacro

std::vector<DesignInfo::DesignCell *> PlacementInfo::PlacementMacro::cellsInMacro
private

Definition at line 1856 of file PlacementInfo.h.

Referenced by addCell(), addVirtualCell(), getCell(), getCells(), and PlacementMacro().

◆ fixedCells

std::vector<fixedPlacementInfo_inMacro> PlacementInfo::PlacementMacro::fixedCells
private

Definition at line 1861 of file PlacementInfo.h.

Referenced by addFixedCellInfo(), getFixedCellInfoVec(), and PlacementMacro().

◆ left

float PlacementInfo::PlacementMacro::left
private

Definition at line 1863 of file PlacementInfo.h.

Referenced by addCell(), addVirtualCell(), getLeftOffset(), and PlacementMacro().

◆ macroType

PlacementMacroType PlacementInfo::PlacementMacro::macroType
private

Definition at line 1864 of file PlacementInfo.h.

Referenced by getMacroType().

◆ offsetX

std::vector<float> PlacementInfo::PlacementMacro::offsetX
private

◆ offsetY

std::vector<float> PlacementInfo::PlacementMacro::offsetY
private

◆ right

float PlacementInfo::PlacementMacro::right
private

Definition at line 1863 of file PlacementInfo.h.

Referenced by addCell(), addVirtualCell(), getRightOffset(), and PlacementMacro().

◆ top

float PlacementInfo::PlacementMacro::top
private

Definition at line 1863 of file PlacementInfo.h.

Referenced by addCell(), addVirtualCell(), getTopOffset(), and PlacementMacro().


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