|
AMF-Placer
2.0
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
Information related to FPGA designs, including design cells and their interconnections. More...
#include <DesignInfo.h>
Classes | |
| class | ControlSetInfo |
| A control set is a combination of CLK, CE and SR signal. It could be nullptr (not related to control set) More... | |
| class | DesignCell |
| a DesignCell in design netlist, DesignPin objects of which might connect to DesignNet objects More... | |
| class | DesignElement |
| basic class of element in a design. More... | |
| class | DesignNet |
| a design net (hyperedge) defined in the design, connecting to pins of cells More... | |
| class | DesignPin |
| A design pin on a design cell connected to a net. More... | |
Public Member Functions | |
| bool | isClockBuffer (DesignCellType cellType) |
| bool | isShifter (DesignCellType cellType) |
| bool | isLogicRelated (DesignCellType cellType) |
| check whether the cell is related to logic computation More... | |
| DesignInfo (std::map< std::string, std::string > &JSONCfg, DeviceInfo *deviceInfo) | |
| Construct a new Design Info object based on user-defined settings and device information. More... | |
| ~DesignInfo () | |
| void | addPinToNet (DesignPin *curPin) |
| bind a pin to an existing net. If the net does not exist, new one. More... | |
| DesignCellType | fromStringToCellType (std::string &cellName, std::string &typeName) |
| translate a string into a DesignCellType for a cell More... | |
| DesignCell * | addCell (DesignCell *curCell) |
| add a cell into the design information More... | |
| void | getCLKSRCENetId (DesignInfo::DesignCell *curFF, int &CLKId, int &SRId, int &CEId) |
| extract the ids of CLK, SR, and CE for a given FF More... | |
| void | getCLKSRCENet (DesignInfo::DesignCell *curFF, DesignNet **CLK, DesignNet **SR, DesignNet **CE) |
| extract the pointers of CLK, SR, and CE for a given FF More... | |
| void | loadClocks (std::string clockFileName) |
| load the global clock signals from a design information file More... | |
| void | updateFFControlSets () |
| go through the FF cells to extract control sets for later processing More... | |
| void | enhanceFFControlSetNets () |
| intend to enhance the nets between FFs in a control set to make later packing easier More... | |
| std::vector< ControlSetInfo * > & | getControlSets () |
| Get the control sets in the design. More... | |
| int | getFFControlSetId (DesignCell *curFF) |
| get the id of the control set of a given FF More... | |
| void | loadUserDefinedClusterNets () |
| for user-defined-cluster-based optimization, load the nets in a user-defined cluster for later processing More... | |
| int | getNumCells () |
| int | getNumNets () |
| std::vector< DesignCell * > & | getCells () |
| std::vector< DesignNet * > & | getNets () |
| std::vector< DesignPin * > & | getPins () |
| void | resetNetEnhanceRatio () |
| disable enhancement of all the nets in the design (reset extra weight to be 1) More... | |
| void | printStat (bool verbose=false) |
| DesignCell * | getCell (std::string &tmpName) |
| DesignNet * | getNet (std::string &tmpName) |
| std::vector< std::vector< DesignCell * > > & | getPredefinedClusters () |
| Get the predefined clusters which are defined in design configuration files. More... | |
| std::map< DesignCellType, std::vector< DesignCell * > > & | getType2Cells () |
| void | resetLUTFFDeterminedOccupation () |
| reset the LUTFFDeterminedOccupation object More... | |
| int | getDeterminedOccupation (int cellId) |
| void | setDeterminedOccupation (int cellId, int occupation) |
| Set the Determined Occupation of a specific cell. More... | |
| bool | isDesignClock (DesignNet *tmpNet) |
| check if a net is a global clock indicated by input design files More... | |
| std::vector< DesignNet * > & | getClocksInDesign () |
| Get the all the clock nets in the design. More... | |
| std::set< DesignCell * > & | getCellsUnderClock (DesignNet *clock) |
| Get the cells driven by a given clock net. More... | |
Static Public Member Functions | |
| static bool | FFSRCompatible (DesignCellType typeA, DesignCellType typeB) |
| static bool | getFFSRType (DesignCellType typeA) |
| static bool | isLUT (DesignCellType cellType) |
| static bool | isCarry (DesignCellType cellType) |
| static bool | isDSP (DesignCellType cellType) |
| static bool | isBRAM (DesignCellType cellType) |
| static bool | isMux (DesignCellType cellType) |
| static bool | isLUTRAM (DesignCellType cellType) |
| static bool | isFF (DesignCellType cellType) |
| static bool | isIO (DesignCellType cellType) |
Public Attributes | |
| std::vector< std::string > | DesignCellTypeStr {CELLTYPESTRS} |
Private Attributes | |
| std::vector< DesignNet * > | netlist |
| std::vector< DesignCell * > | cells |
| std::vector< DesignPin * > | pins |
| std::map< std::string, DesignNet * > | name2Net |
| std::map< std::string, int > | aliasNet2AliasNetId |
| std::map< std::string, DesignCell * > | name2Cell |
| std::vector< std::vector< DesignCell * > > | predefinedClusters |
| the predefined clusters which are defined in design configuration files More... | |
| std::map< DesignCellType, std::vector< DesignCell * > > | type2Cells |
| std::set< std::pair< DesignPin *, DesignPin * > > | connectedPinsWithSmallNet |
| connected pin pairs by nets with a small number of pins More... | |
| std::vector< int > | LUTFFDeterminedOccupation |
| LUTFFDeterminedOccupation is used to record the final resource demand of a LUT/FF after final packing. More... | |
| std::map< std::tuple< int, int, int, int >, int > | CLKSRCEFFType2ControlSetInfoId |
| the mapping from the tuple of CLK/SR/CE ids and FF type to a unique defined control set id More... | |
| std::vector< int > | FFId2ControlSetId |
| the mapping from FF IDs to a unique defined control set id More... | |
| std::vector< ControlSetInfo * > | controlSets |
| std::vector< DesignNet * > | clocks |
| std::set< DesignNet * > | clockSet |
| std::map< DesignNet *, std::set< DesignCell * > > | clock2Cells |
| the mapping from clocks to their corresponding cells driven by the clock net More... | |
| std::map< std::string, std::string > & | JSONCfg |
| std::string | designArchievedTextFileName |
Information related to FPGA designs, including design cells and their interconnections.
Definition at line 50 of file DesignInfo.h.
design cell types
This is a design concept. These cell types should be mapped to device BEL types (resour concept).
Definition at line 72 of file DesignInfo.h.
types of the elements in a design
There are cells in a design, pins of which are interconnected via nets.
| Enumerator | |
|---|---|
| ElementType_cell | |
| ElementType_pin | |
| ElementType_net | |
| ElementType_graph | |
Definition at line 58 of file DesignInfo.h.
| Enumerator | |
|---|---|
| PinType_LUTInput | |
| PinType_LUTOutput | |
| PinType_CLK | |
| PinType_Q | |
| PinType_D | |
| PinType_E | |
| PinType_SR | |
| PinType_Others | |
Definition at line 196 of file DesignInfo.h.
| DesignInfo::DesignInfo | ( | std::map< std::string, std::string > & | JSONCfg, |
| DeviceInfo * | deviceInfo | ||
| ) |
Construct a new Design Info object based on user-defined settings and device information.
| JSONCfg | the file of user-defined settings |
| deviceInfo | device information |
The design information file will contain information like the text shown below
Definition at line 144 of file DesignInfo.cc.

|
inline |
Definition at line 1433 of file DesignInfo.h.
| DesignInfo::DesignCell * DesignInfo::addCell | ( | DesignCell * | curCell | ) |
add a cell into the design information
| curCell | target cell |
Definition at line 617 of file DesignInfo.cc.
Referenced by PlacementInfo::PlacementMacro::addVirtualCell(), and DesignInfo().


| void DesignInfo::addPinToNet | ( | DesignPin * | curPin | ) |
bind a pin to an existing net. If the net does not exist, new one.
| curPin | target pin |
Definition at line 130 of file DesignInfo.cc.
Referenced by DesignInfo().


| void DesignInfo::enhanceFFControlSetNets | ( | ) |
intend to enhance the nets between FFs in a control set to make later packing easier
Definition at line 464 of file DesignInfo.cc.
|
inlinestatic |
Definition at line 148 of file DesignInfo.h.
Referenced by ParallelCLBPacker::PackingCLBSite::addCarry(), ParallelCLBPacker::PackingCLBSite::PackingCLBCluster::addToFFSet(), ParallelCLBPacker::PackingCLBSite::PackingCLBCluster::compatibleInOneHalfCLB(), ParallelCLBPacker::PackingCLBSite::compatibleInOneHalfCLB(), and DesignInfo::ControlSetInfo::compatibleWith().

| DesignInfo::DesignCellType DesignInfo::fromStringToCellType | ( | std::string & | cellName, |
| std::string & | typeName | ||
| ) |
translate a string into a DesignCellType for a cell
| cellName | target cell |
| typeName | type name string |
Definition at line 606 of file DesignInfo.cc.
Referenced by PlacementInfo::CompatiblePlacementTable::CompatiblePlacementTable(), and DesignInfo().


|
inline |
Definition at line 1634 of file DesignInfo.h.
Referenced by InitialPacker::loadFixedPlacementUnits(), InitialPacker::loadOtherCLBMacros(), and WirelengthOptimizer::reloadPlacementInfo().

|
inline |
Definition at line 1609 of file DesignInfo.h.
Referenced by PlacementTimingInfo::buildSimpleTimingGraph(), PlacementTimingOptimizer::conductStaticTimingAnalysis(), InitialPacker::findBRAMMacros(), InitialPacker::findCARRYMacros(), InitialPacker::findDSPMacros(), InitialPacker::findLUTRAMMacros(), InitialPacker::findMuxMacros(), InitialPacker::findUnpackedUnits(), PlacementInfo::getCells(), PlacementTimingOptimizer::incrementalStaticTimingAnalysis_forPUWithLocation(), InitialPacker::LUTFFPairing(), WirelengthOptimizer::LUTLUTPairing_TimingDriven(), PlacementInfo::CompatiblePlacementTable::setBELTypeForCells(), PlacementTimingInfo::setDSPInnerDelay(), ParallelCLBPacker::timingDrivenDetailedPlacement_shortestPath(), ParallelCLBPacker::timingDrivenDetailedPlacement_shortestPath_intermediate(), ParallelCLBPacker::timingDrivenDetailedPlacement_swap(), PlacementInfo::transferCellBinInfo(), PlacementInfo::transferPaintData(), and PlacementInfo::verifyDeviceForDesign().

|
inline |
Get the cells driven by a given clock net.
| clock | a clock net |
Definition at line 1734 of file DesignInfo.h.
Referenced by ClusterPlacer::createClockBasedClusterUnits().

|
inline |
extract the pointers of CLK, SR, and CE for a given FF
| curFF | a given FF |
| CLK | output CLK pointer |
| SR | output SR pointer |
| CE | output CE pointer |
Definition at line 1517 of file DesignInfo.h.

|
inline |
extract the ids of CLK, SR, and CE for a given FF
| curFF | a given FF |
| CLKId | output CLK Id |
| SRId | output SR Id |
| CEId | output CE Id |
Definition at line 1475 of file DesignInfo.h.
Referenced by updateFFControlSets().


|
inline |
Get the all the clock nets in the design.
Definition at line 1723 of file DesignInfo.h.
Referenced by ClusterPlacer::clockBasedPartitioning(), and ClusterPlacer::createClockBasedClusterUnits().

|
inline |
Get the control sets in the design.
Definition at line 1575 of file DesignInfo.h.
Referenced by IncrementalBELPacker::FFPairing().

|
inline |
@briefget the Determined Occupation of a specific cell
LUTFFDeterminedOccupation is used to record the final resource demand of a LUT/FF after final packing
| cellId | target cell |
Definition at line 1688 of file DesignInfo.h.
Referenced by PlacementInfo::getDeterminedOccupation().

|
inline |
get the id of the control set of a given FF
| curFF | target FF |
Definition at line 1586 of file DesignInfo.h.

|
inlinestatic |
Definition at line 179 of file DesignInfo.h.
Referenced by updateFFControlSets().

|
inline |
Definition at line 1644 of file DesignInfo.h.
Referenced by PlacementTimingInfo::PlacementTimingInfo().

|
inline |
Definition at line 1613 of file DesignInfo.h.
Referenced by GlobalPlacer::GlobalPlacement_CLBElements(), and PlacementInfo::reloadNets().

|
inline |
Definition at line 1600 of file DesignInfo.h.
Referenced by PlacementInfo::PlacementMacro::addVirtualCell(), DesignInfo(), InitialPacker::findBRAMMacros(), InitialPacker::findCARRYMacros(), InitialPacker::findDSPMacros(), InitialPacker::findLUTRAMMacros(), InitialPacker::findMuxMacros(), PlacementInfo::getNumCells(), InitialPacker::LUTFFPairing(), PlacementInfo::printStat(), PlacementInfo::CompatiblePlacementTable::setBELTypeForCells(), PlacementInfo::updateCells2PlacementUnits(), and PlacementInfo::updateElementBinGrid().

|
inline |
Definition at line 1604 of file DesignInfo.h.
Referenced by addPinToNet().

|
inline |
Definition at line 1617 of file DesignInfo.h.
Referenced by PlacementTimingOptimizer::setPinsLocation().

|
inline |
Get the predefined clusters which are defined in design configuration files.
Definition at line 1659 of file DesignInfo.h.
Referenced by ClusterPlacer::createUserDefinedClusterBasedClusterUnits(), ClusterPlacer::refineClustersWithPredefinedClusters(), and WirelengthOptimizer::updatePseudoNetForUserDefinedClusters().

|
inline |
Definition at line 1664 of file DesignInfo.h.
Referenced by PlacementInfo::CompatiblePlacementTable::CompatiblePlacementTable().

|
inlinestatic |
Definition at line 1341 of file DesignInfo.h.
Referenced by GlobalPlacer::dumpBRAMCoordinate(), MacroLegalizer::findMacroType2AvailableSites(), MacroLegalizer::findPossibleLegalLocation(), isLogicRelated(), and printStat().

|
inlinestatic |
Definition at line 1331 of file DesignInfo.h.
Referenced by GlobalPlacer::dumpCARRYCoordinate(), MacroLegalizer::findMacroType2AvailableSites(), MacroLegalizer::findPossibleLegalLocation(), and printStat().

|
inline |
Definition at line 1384 of file DesignInfo.h.
|
inline |
check if a net is a global clock indicated by input design files
| tmpNet | target net |
Definition at line 1713 of file DesignInfo.h.
Referenced by loadClocks().

|
inlinestatic |
Definition at line 1336 of file DesignInfo.h.
Referenced by GlobalPlacer::dumpDSPCoordinate(), MacroLegalizer::findMacroType2AvailableSites(), MacroLegalizer::findPossibleLegalLocation(), isLogicRelated(), and printStat().

|
inlinestatic |
Definition at line 1360 of file DesignInfo.h.
Referenced by GlobalPlacer::dumpFFCoordinate(), GeneralSpreader::dumpLUTFFCoordinate(), GlobalPlacer::dumpLUTFFCoordinate(), isLogicRelated(), and printStat().

|
inlinestatic |
Definition at line 1366 of file DesignInfo.h.
|
inline |
check whether the cell is related to logic computation
| cellType | a given cell type |
Definition at line 1401 of file DesignInfo.h.

|
inlinestatic |
Definition at line 1324 of file DesignInfo.h.
Referenced by GlobalPlacer::dumpLUTCoordinate(), GeneralSpreader::dumpLUTFFCoordinate(), GlobalPlacer::dumpLUTFFCoordinate(), isLogicRelated(), and printStat().

|
inlinestatic |
Definition at line 1352 of file DesignInfo.h.
Referenced by isLogicRelated(), and printStat().

|
inlinestatic |
Definition at line 1347 of file DesignInfo.h.
Referenced by printStat().

|
inline |
Definition at line 1389 of file DesignInfo.h.
Referenced by isLogicRelated().

| void DesignInfo::loadClocks | ( | std::string | clockFileName | ) |
load the global clock signals from a design information file
| clockFileName |
Definition at line 372 of file DesignInfo.cc.
Referenced by DesignInfo().


| void DesignInfo::loadUserDefinedClusterNets | ( | ) |
for user-defined-cluster-based optimization, load the nets in a user-defined cluster for later processing
Definition at line 484 of file DesignInfo.cc.
Referenced by DesignInfo().


| void DesignInfo::printStat | ( | bool | verbose = false | ) |
Definition at line 635 of file DesignInfo.cc.
Referenced by AMFPlacer::AMFPlacer().


|
inline |
reset the LUTFFDeterminedOccupation object
LUTFFDeterminedOccupation is used to record the final resource demand of a LUT/FF after final packing
Definition at line 1675 of file DesignInfo.h.
Referenced by PlacementInfo::resetLUTFFDeterminedOccupation().

|
inline |
disable enhancement of all the nets in the design (reset extra weight to be 1)
Definition at line 1626 of file DesignInfo.h.
|
inline |
Set the Determined Occupation of a specific cell.
LUTFFDeterminedOccupation is used to record the final resource demand of a LUT/FF after final packing
| cellId | target cell |
| occupation | resource demand of the cell after packing |
Definition at line 1701 of file DesignInfo.h.
Referenced by PlacementInfo::setDeterminedOccupation().

| void DesignInfo::updateFFControlSets | ( | ) |
go through the FF cells to extract control sets for later processing
Definition at line 425 of file DesignInfo.cc.
Referenced by DesignInfo(), and InitialPacker::pack().


|
private |
Definition at line 1745 of file DesignInfo.h.
Referenced by DesignInfo().
|
private |
Definition at line 1742 of file DesignInfo.h.
Referenced by addCell(), DesignInfo(), getCells(), getNumCells(), loadClocks(), printStat(), resetLUTFFDeterminedOccupation(), updateFFControlSets(), and ~DesignInfo().
|
private |
the mapping from the tuple of CLK/SR/CE ids and FF type to a unique defined control set id
Definition at line 1771 of file DesignInfo.h.
Referenced by DesignInfo(), and updateFFControlSets().
|
private |
the mapping from clocks to their corresponding cells driven by the clock net
Definition at line 1787 of file DesignInfo.h.
Referenced by DesignInfo(), getCellsUnderClock(), and loadClocks().
|
private |
Definition at line 1780 of file DesignInfo.h.
Referenced by DesignInfo(), getClocksInDesign(), and loadClocks().
|
private |
Definition at line 1781 of file DesignInfo.h.
Referenced by DesignInfo(), isDesignClock(), and loadClocks().
connected pin pairs by nets with a small number of pins
Definition at line 1759 of file DesignInfo.h.
Referenced by DesignInfo(), and loadUserDefinedClusterNets().
|
private |
Definition at line 1779 of file DesignInfo.h.
Referenced by DesignInfo(), enhanceFFControlSetNets(), getControlSets(), updateFFControlSets(), and ~DesignInfo().
|
private |
Definition at line 1790 of file DesignInfo.h.
Referenced by DesignInfo().
| std::vector<std::string> DesignInfo::DesignCellTypeStr {CELLTYPESTRS} |
Definition at line 194 of file DesignInfo.h.
Referenced by DesignInfo::ControlSetInfo::display(), fromStringToCellType(), and printStat().
|
private |
the mapping from FF IDs to a unique defined control set id
Definition at line 1777 of file DesignInfo.h.
Referenced by getFFControlSetId(), and updateFFControlSets().
|
private |
Definition at line 1789 of file DesignInfo.h.
Referenced by DesignInfo(), and loadUserDefinedClusterNets().
|
private |
LUTFFDeterminedOccupation is used to record the final resource demand of a LUT/FF after final packing.
Definition at line 1765 of file DesignInfo.h.
Referenced by getDeterminedOccupation(), resetLUTFFDeterminedOccupation(), and setDeterminedOccupation().
|
private |
Definition at line 1746 of file DesignInfo.h.
Referenced by addCell(), DesignInfo(), getCell(), and loadUserDefinedClusterNets().
|
private |
Definition at line 1744 of file DesignInfo.h.
Referenced by addPinToNet(), DesignInfo(), getNet(), and loadClocks().
|
private |
Definition at line 1741 of file DesignInfo.h.
Referenced by addPinToNet(), DesignInfo(), getNets(), getNumNets(), printStat(), resetNetEnhanceRatio(), and ~DesignInfo().
|
private |
Definition at line 1743 of file DesignInfo.h.
Referenced by DesignInfo(), and getPins().
|
private |
the predefined clusters which are defined in design configuration files
Definition at line 1752 of file DesignInfo.h.
Referenced by getPredefinedClusters(), and loadUserDefinedClusterNets().
|
private |
Definition at line 1753 of file DesignInfo.h.
Referenced by addCell(), DesignInfo(), getType2Cells(), and printStat().