AMF-Placer
2.0
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
InitialPacker will identify macros from the design netlist based on pattern matching. More...
#include <InitialPacker.h>
Classes | |
class | PackedControlSet |
control set information container used during initial packing. More... | |
class | SiteBELMapping |
SiteBELMapping is a contain recording the mapping between cells and BELs. More... | |
Public Member Functions | |
InitialPacker (DesignInfo *designInfo, DeviceInfo *deviceInfo, PlacementInfo *placementInfo, std::map< std::string, std::string > &JSONCfg) | |
Construct a new Initial Packer object. More... | |
void | pack () |
extract the macros from the netlist to construction PlacmentMacro More... | |
std::vector< DesignInfo::DesignCell * > | BFSExpandViaSpecifiedPorts (std::string portPattern, DesignInfo::DesignCell *startCell, bool exactMatch=false) |
BFS to find the core cells of a macro based on some pre-defined patterns of cascaded cells. More... | |
std::vector< DesignInfo::DesignCell * > | BFSExpandViaSpecifiedPorts (std::vector< std::string > portPatterns, DesignInfo::DesignCell *startCell, bool exactMatch=false) |
void | findDSPMacros () |
detects DSP macros and clusters the related cells into PlacementInfo::PlacementMacro More... | |
void | setDSPRegs (std::vector< DesignInfo::DesignCell * > &DSPTailsToBeCheckedRegisterAttr) |
void | findLUTRAMMacros () |
detects LUTRAM macros and clusters the related cells into PlacementInfo::PlacementMacro More... | |
void | findBRAMMacros () |
detects BRAM macros and clusters the related cells into PlacementInfo::PlacementMacro More... | |
std::vector< DesignInfo::DesignCell * > | checkCompatibleFFs (std::vector< DesignInfo::DesignCell * > FFs) |
check the control set of the candidate FFs and select the control set with the most FFs to be packed in the carray macro More... | |
void | findCARRYMacros () |
detects CARRY macros and clusters the related cells into PlacementInfo::PlacementMacro More... | |
void | findMuxMacros () |
detects Mux macros and clusters the related cells into PlacementInfo::PlacementMacro More... | |
void | loadOtherCLBMacros (std::string RAMMacroListFromVivadoFileName) |
load the special macros from the design file. vendors might allow users to specify some primitive macros (e.g. cross-clock-domain register pairs and fine-grained LUTRAM macros) More... | |
void | LUTFFPairing () |
directly pack some LUTs/FFs if the LUT has only one fan-out. More... | |
void | findUnpackedUnits () |
other non-Macro elements will be instantiated as PlacementInfo::PlacementUnpackedCell More... | |
void | loadFixedPlacementUnits (std::string fixedPlacementUnitsFromVivadoFileName) |
load the fixed elements (e.g., IOs) from the design file. More... | |
void | enhanceIONets () |
enhance the nets connected to the IO ports More... | |
void | dumpMacroHighLight () |
Private Member Functions | |
void | mapCarryRelatedRouteThru (PlacementInfo::PlacementMacro *CARRYChain, DesignInfo::DesignCell *coreCell, float CARRYChainSiteOffset) |
Private Attributes | |
DesignInfo * | designInfo |
DeviceInfo * | deviceInfo |
PlacementInfo * | placementInfo |
PlacementInfo::CompatiblePlacementTable * | compatiblePlacementTable |
std::vector< PlacementInfo::PlacementUnit * > & | placementUnits |
std::vector< PlacementInfo::PlacementUnpackedCell * > & | placementUnpackedCells |
std::vector< PlacementInfo::PlacementMacro * > & | placementMacros |
std::vector< PlacementInfo::PlacementUnit * > & | fixedPlacementUnits |
std::set< DesignInfo::DesignCell * > & | cellInMacros |
std::map< int, PlacementInfo::PlacementUnit * > & | cellId2PlacementUnit |
std::vector< PlacementInfo::PlacementUnit * > & | cellId2PlacementUnitVec |
std::map< std::string, std::string > & | JSONCfg |
bool | DSPCritical = false |
InitialPacker will identify macros from the design netlist based on pattern matching.
Definition at line 50 of file InitialPacker.h.
|
inline |
Construct a new Initial Packer object.
designInfo | given design information |
deviceInfo | given device information |
placementInfo | the PlacementInfo for this placer to handle |
JSONCfg | the user-defined placement configuration |
Definition at line 61 of file InitialPacker.h.
std::vector< DesignInfo::DesignCell * > InitialPacker::BFSExpandViaSpecifiedPorts | ( | std::string | portPattern, |
DesignInfo::DesignCell * | startCell, | ||
bool | exactMatch = false |
||
) |
BFS to find the core cells of a macro based on some pre-defined patterns of cascaded cells.
portPattern | a given set of port patterns on the element to detect cascading interconnection |
startCell | a start cell for the search initialization |
exactMatch | indicate whether the portPattern should be exactly matched otherwise, containment relationship will be accepted as matched. |
Definition at line 118 of file InitialPacker.cc.
Referenced by findBRAMMacros(), findCARRYMacros(), and findDSPMacros().
std::vector< DesignInfo::DesignCell * > InitialPacker::BFSExpandViaSpecifiedPorts | ( | std::vector< std::string > | portPatterns, |
DesignInfo::DesignCell * | startCell, | ||
bool | exactMatch = false |
||
) |
std::vector< DesignInfo::DesignCell * > InitialPacker::checkCompatibleFFs | ( | std::vector< DesignInfo::DesignCell * > | FFs | ) |
check the control set of the candidate FFs and select the control set with the most FFs to be packed in the carray macro
FFs |
Definition at line 534 of file InitialPacker.cc.
Referenced by findCARRYMacros().
void InitialPacker::dumpMacroHighLight | ( | ) |
Definition at line 1744 of file InitialPacker.cc.
Referenced by pack().
void InitialPacker::enhanceIONets | ( | ) |
enhance the nets connected to the IO ports
Definition at line 96 of file InitialPacker.cc.
void InitialPacker::findBRAMMacros | ( | ) |
detects BRAM macros and clusters the related cells into PlacementInfo::PlacementMacro
If two BRAMs are interconnected via their "CAS" ports, they are cascaded.
Definition at line 408 of file InitialPacker.cc.
Referenced by pack().
void InitialPacker::findCARRYMacros | ( | ) |
detects CARRY macros and clusters the related cells into PlacementInfo::PlacementMacro
If two CARRYs are interconnected via their "CI" ports, they are cascaded. Moreover, the directly-connected LUTs/FFs will be fitted into the macro, after verifying the compatibility. Meanwhile, route-thru virtual elements will be added into the macro to occupy the BEL resources
Definition at line 815 of file InitialPacker.cc.
Referenced by pack().
void InitialPacker::findDSPMacros | ( | ) |
detects DSP macros and clusters the related cells into PlacementInfo::PlacementMacro
If two DSPs are interconnected via their "ACIN[", "BCIN[", "PCIN[" ports, they are cascaded.
Definition at line 215 of file InitialPacker.cc.
Referenced by pack().
void InitialPacker::findLUTRAMMacros | ( | ) |
detects LUTRAM macros and clusters the related cells into PlacementInfo::PlacementMacro
Definition at line 362 of file InitialPacker.cc.
Referenced by pack().
void InitialPacker::findMuxMacros | ( | ) |
detects Mux macros and clusters the related cells into PlacementInfo::PlacementMacro
If two Mux are interconnected via their "I0/1" ports, they are cascaded. Moreover, the directly-connected LUTs/FFs will be fitted into the macro, after verifying the compatibility. Meanwhile, route-thru virtual elements will be added into the macro to occupy the BEL resources
Definition at line 1202 of file InitialPacker.cc.
Referenced by pack().
void InitialPacker::findUnpackedUnits | ( | ) |
other non-Macro elements will be instantiated as PlacementInfo::PlacementUnpackedCell
Definition at line 1640 of file InitialPacker.cc.
Referenced by pack().
void InitialPacker::loadFixedPlacementUnits | ( | std::string | fixedPlacementUnitsFromVivadoFileName | ) |
load the fixed elements (e.g., IOs) from the design file.
fixedPlacementUnitsFromVivadoFileName | a given design file indicate the fixed elements and their locations on the device |
Definition at line 1671 of file InitialPacker.cc.
Referenced by pack().
void InitialPacker::loadOtherCLBMacros | ( | std::string | RAMMacroListFromVivadoFileName | ) |
load the special macros from the design file. vendors might allow users to specify some primitive macros (e.g. cross-clock-domain register pairs and fine-grained LUTRAM macros)
RAMMacroListFromVivadoFileName | a given design file indicate the special CLB macros in the design |
Definition at line 1448 of file InitialPacker.cc.
Referenced by pack().
void InitialPacker::LUTFFPairing | ( | ) |
directly pack some LUTs/FFs if the LUT has only one fan-out.
According to our observation, this might not significantly improve the HPWL but it can help to get better timing.
Definition at line 1564 of file InitialPacker.cc.
Referenced by pack().
|
private |
Definition at line 592 of file InitialPacker.cc.
Referenced by findCARRYMacros().
void InitialPacker::pack | ( | ) |
extract the macros from the netlist to construction PlacmentMacro
Definition at line 28 of file InitialPacker.cc.
Referenced by AMFPlacer::run().
void InitialPacker::setDSPRegs | ( | std::vector< DesignInfo::DesignCell * > & | DSPTailsToBeCheckedRegisterAttr | ) |
Definition at line 307 of file InitialPacker.cc.
Referenced by findDSPMacros().
|
private |
Definition at line 362 of file InitialPacker.h.
Referenced by findBRAMMacros(), findCARRYMacros(), findDSPMacros(), findLUTRAMMacros(), findMuxMacros(), findUnpackedUnits(), loadFixedPlacementUnits(), loadOtherCLBMacros(), LUTFFPairing(), pack(), and setDSPRegs().
|
private |
Definition at line 363 of file InitialPacker.h.
|
private |
Definition at line 361 of file InitialPacker.h.
Referenced by findBRAMMacros(), findCARRYMacros(), findDSPMacros(), findLUTRAMMacros(), findMuxMacros(), findUnpackedUnits(), loadOtherCLBMacros(), LUTFFPairing(), and pack().
|
private |
Definition at line 354 of file InitialPacker.h.
Referenced by findBRAMMacros(), findCARRYMacros(), findDSPMacros(), findMuxMacros(), findUnpackedUnits(), loadOtherCLBMacros(), LUTFFPairing(), and pack().
|
private |
Definition at line 351 of file InitialPacker.h.
Referenced by findBRAMMacros(), findCARRYMacros(), findDSPMacros(), findLUTRAMMacros(), findMuxMacros(), findUnpackedUnits(), loadFixedPlacementUnits(), loadOtherCLBMacros(), LUTFFPairing(), mapCarryRelatedRouteThru(), and pack().
|
private |
Definition at line 352 of file InitialPacker.h.
Referenced by loadFixedPlacementUnits(), and loadOtherCLBMacros().
|
private |
Definition at line 365 of file InitialPacker.h.
Referenced by findDSPMacros(), and InitialPacker().
|
private |
Definition at line 359 of file InitialPacker.h.
Referenced by loadFixedPlacementUnits().
|
private |
Definition at line 364 of file InitialPacker.h.
Referenced by dumpMacroHighLight(), InitialPacker(), and pack().
|
private |
Definition at line 353 of file InitialPacker.h.
Referenced by dumpMacroHighLight(), enhanceIONets(), and pack().
|
private |
Definition at line 358 of file InitialPacker.h.
Referenced by findBRAMMacros(), findCARRYMacros(), findDSPMacros(), findLUTRAMMacros(), findMuxMacros(), loadOtherCLBMacros(), LUTFFPairing(), and pack().
|
private |
Definition at line 356 of file InitialPacker.h.
Referenced by findBRAMMacros(), findCARRYMacros(), findDSPMacros(), findLUTRAMMacros(), findMuxMacros(), findUnpackedUnits(), loadOtherCLBMacros(), LUTFFPairing(), and pack().
|
private |
Definition at line 357 of file InitialPacker.h.
Referenced by findUnpackedUnits(), LUTFFPairing(), and pack().