public class DesignTools
extends Object
Design
objects.
Created on: Dec 7, 2015Modifier and Type | Field and Description |
---|---|
static Map<Series,Map<String,Pair<String,String>>> |
belTypeSitePinNameMapping
Mapping from device Series to another mapping from FF BEL name to CKEN/SRST site pin name
|
Constructor and Description |
---|
DesignTools() |
Modifier and Type | Method and Description |
---|---|
static void |
addProhibitConstraint(Design design,
List<String> belLocations)
Adds a PROHIBIT constraint to the specified BEL Locations (ex:
"SLICE_X10Y10/AFF")
|
static boolean |
areAllPinsConnectedToALUT(Net n)
Determines if all the pins connected to this net connect to only LUTs
|
static void |
batchRemoveSitePins(Map<Net,Set<SitePinInst>> deferredRemovals,
boolean preserveOtherRoutes)
Remove a batch of site pins from nets for efficiency purposes.
|
static Map<UtilizationType,Integer> |
calculateUtilization(Collection<SiteInst> siteInsts) |
static Map<UtilizationType,Integer> |
calculateUtilization(Design d) |
static Map<UtilizationType,Integer> |
calculateUtilization(Design d,
PBlock pblock) |
static void |
copyImplementation(Design src,
Design dest,
boolean copyStaticNets,
boolean copyOnlyInternalNets,
boolean lockPlacement,
boolean lockRouting,
Map<String,String> srcToDestInstNames)
Copies the logic and implementation of a set of cells from one design to another with additional flags to control copying nets.
|
static void |
copyImplementation(Design src,
Design dest,
boolean lockPlacement,
boolean lockRouting,
Map<String,String> srcToDestInstNames)
Copies the logic and implementation of a set of cells from one design to another.
|
static void |
copyImplementation(Design src,
Design dest,
boolean lockPlacement,
boolean lockRouting,
String... instNames)
Copies the logic and implementation of a set of cells from one design to another.
|
static void |
copyImplementation(Design src,
Design dest,
String... instNames)
Copies the logic and implementation of a set of cells from one design to another.
|
static void |
createA1A6ToStaticNets(Design design) |
static void |
createCeClkOfRoutethruFFToVCC(Design design) |
static void |
createCeSrRstPinsToVCC(Design design)
Create and add any missing SitePinInst-s belonging to the VCC net.
|
static void |
createMissingSitePinInsts(Design design)
Creates all missing SitePinInsts in a design, except GLOBAL_USEDNET.
|
static List<SitePinInst> |
createMissingSitePinInsts(Design design,
Net net)
Creates any and all missing SitePinInsts for this net.
|
static void |
createMissingStaticSitePins(BELPin belPin,
SiteInst si,
Cell cell) |
static ModuleImplsInst |
createModuleImplsInst(Design design,
String name,
ModuleImpls module)
Create a
ModuleImplsInst , i.e. |
static void |
createModuleInstsFromModuleImplsInsts(Design design,
Collection<ModuleImplsInst> instances,
Collection<ImplsPath> paths)
In a design containing
ModuleImplsInst s, convert them into ModuleInst s so that the design
can be exported to a checkpoint |
static SitePinInst |
createPinAndAddToNet(Cell cell,
String cellPinName,
Net net)
Creates a new pin on a site connected to the cell pin and also adds it to the
provided net.
|
static void |
createPossiblePinsToStaticNets(Design design) |
static List<PIP> |
findRoutingPath(Node start,
Node end)
Demonstrates a rudimentary path expansion for finding a routing path in the
interconnect.
|
static List<PIP> |
findRoutingPath(RouteNode start,
RouteNode end)
Demonstrates a rudimentary path expansion for finding a routing path in the
interconnect.
|
static void |
fullyRemoveCell(Design design,
Cell cell,
Map<Net,Set<SitePinInst>> deferRemovals)
This method will completely remove a placed cell (both logical and physical) from a design.
|
static void |
fullyUnplaceCell(Cell cell,
Map<Net,Set<SitePinInst>> deferRemovals)
This method will fully unplace (but not remove) a physical cell from a design.
|
static Path |
generateReadableEDIF(Path dcp,
Path edfFileName)
Use Vivado to create a readable version of the EDIF file inside a design checkpoint.
|
static Job |
generateReadableEDIFJob(Path checkpoint,
Path edif)
Create a Job running Vivado to create a readable version of
the EDIF inside the checkpoint to a separate file.
|
static List<String> |
getAllRoutedSitePinsFromPhysicalPin(Cell cell,
Net net,
String belPinName)
Gets all site pins that are currently routed to the specified cell pin.
|
static Net |
getClockDomain(Design d,
String edifNet) |
static Set<BELPin> |
getConnectedBELPins(BELPin pin,
SiteInst si)
Looks in the site instance for BEL pins connected to this BEL pin and SiteInst.
|
static Set<BELPin> |
getConnectedBELPins(SitePinInst pin)
Looks in the site instance for BEL pins connected to this site pin.
|
static Set<Cell> |
getConnectedCells(BELPin pin,
SiteInst si)
Looks in the site instance for cells connected to this BEL pin and SiteInst.
|
static Set<Cell> |
getConnectedCells(SitePinInst pin)
Looks in the site instance for cells connected to this site pin.
|
static List<PIP> |
getConnectionPIPs(SitePinInst sinkPin)
Finds the essential PIPs which connect the provided sink pin to its source.
|
static ArrayList<BELPin> |
getCorrespondingBELInputPins(BELPin outputPin,
SiteInst inst) |
static ArrayList<BELPin> |
getCorrespondingBELOutputPins(BELPin inputPin,
SiteInst inst)
TODO - Work in progress
|
static BELPin |
getCorrespondingRBELInputPin(BELPin outputPin,
SiteInst inst)
Uses SitePIP information in the site instance to determine the driving input of the RBEL element
output pin.
|
static BELPin |
getCorrespondingRBELOutputPin(BELPin inputPin,
SiteInst inst)
Returns the element's output pin corresponding that is being driven by the provided input pin.
|
static SiteInst |
getCorrespondingSiteInst(Design design,
SiteInst orig,
Site newAnchor,
Module module)
Gets or creates the corresponding SiteInst from the prototype orig from a module.
|
static long |
getCurrVal(long lutValue,
int i) |
static Path |
getDCPAutoGenMD5FilePath(Path dcpFile,
Path edfDir)
Gets the corresponding MD5 file path for a DCP that has had its EDIF file auto-generated
|
static Path |
getDefaultReadableEDIFDir(Path dcpFile)
Gets the corresponding EDIF directory created when auto generating EDIF from Vivado.
|
static ArrayList<BELPin> |
getDrivenBELPins(BELPin elementPin)
Gets the driven element pins of either a site port input or an element output pin.
|
static BELPin |
getDrivingBELPin(BELPin elementPin)
Gets the driving element pin of either a site port output or an element input pin.
|
static BELPin |
getDrivingBELPin(SitePinInst netSource)
Gets the originating driving element pin that corresponds to the given site pin.
|
static Cell |
getDrivingCell(SitePinInst netSource)
Tries to determine the driving cell within the site from the output site pin.
|
static Path |
getEDFAutoGenFilePath(Path dcpFile,
Path edfDir)
Gets the path to the auto-generated EDIF file for the provided DCP and EDIF directory.
|
static int |
getInvertCol(String logicalPinName) |
static Map<String,String> |
getInvertiblePinMap(Series series,
Unisim unisim)
Creates a map that contains pin names for keys that map to the Unisim Verilog parameter that
can invert a pins value.
|
static SitePinInst |
getLegalAlternativeOutputPin(Net net)
Finds a legal/available alternative output site pin for the given net.
|
static BELPin |
getLogicalBELPinDriver(SitePinInst sitePinInst)
Looks backwards from a SitePinInst output pin and finds the corresponding BELPin of the
driver.
|
static Map<Node,ArrayList<PIP>> |
getNodePIPMap(List<PIP> route)
Creates a map from Node to a list of PIPs for a given list of PIPs
(likely from the routing of a net).
|
static List<EDIFHierPortInst> |
getPortInstsFromSitePinInst(SitePinInst sitePin)
Given a SitePinInst, this method will find any return hierarchical logical cell pins within
the site directly connected to the site pin.
|
static String |
getRoutedSitePin(Cell cell,
Net net,
String logicalPinName)
Gets the first site pin that is currently routed to the specified cell pin.
|
static String |
getRoutedSitePinFromPhysicalPin(Cell cell,
Net net,
String belPinName)
Gets the first site pin that is currently routed to the specified cell pin.
|
static String |
getSitePinSource(BELPin pin)
Given an unroute site wire path, find the site pin name that would drive the given BELPin.
|
static Set<PIP> |
getTrimmablePIPsFromPins(Net net,
Collection<SitePinInst> pins)
For the given set of pins, if they were removed, determine which PIPs could be trimmed as
they no longer route to any specific sink.
|
static void |
handlePinRemovals(SitePinInst spi,
Map<Net,Set<SitePinInst>> deferRemovals)
Helper method for either removing (and unrouting) a SitePinInst immediately (when deferRemovals is null)
or deferring its removal by putting it into the deferRemovals map.
|
static SitePinInst |
identifyClockSource(SitePinInst netSource)
Tries to identify the clock pin source for the given user signal output by
tracing back to a FF within a SLICE.
|
static int |
invertBit(int i,
int col) |
static String |
invertLutInput(Cell lut,
String physicalPinName) |
static boolean |
isBELALut(String elementName) |
static boolean |
isBELAReg(String elementName) |
static boolean |
isNetDrivenByHierPort(Net net)
Determine if a Net is driven by a hierarchical port, created as part of an out-of-context
synthesis flow, for example.
|
static boolean |
isPinStateBEL(BELPin pin) |
static Boolean |
isUltraScaleSliceTop(BEL bel)
Checks the provided BEL's first letter to determine if it is in the top half
of a SLICE or bottom half.
|
static void |
lockNetlist(Design design)
Locks the logical netlist of the design using the DONT_TOUCH property.
|
static void |
lockPlacement(Design design)
Locks placement of cells of a design against changes in Vivado.
|
static void |
lockPlacement(Design design,
boolean lock)
Locks or unlocks all placement of a design against changes in Vivado.
|
static void |
lockRouting(Design design)
Locks all routing of a design (except GND and VCC nets) against changes in
Vivado.
|
static void |
lockRouting(Design design,
boolean lock)
Locks or unlocks all routing of a design (except GND and VCC nets) against
changes in Vivado.
|
static void |
makeBlackBox(Design d,
EDIFHierCellInst hierarchicalCell)
Turns the cell named hierarchicalCell into a blackbox and removes any
associated placement and routing information associated with that instance.
|
static void |
makeBlackBox(Design d,
String hierarchicalCellName)
Turns the cell named hierarchicalCellName into a blackbox and removes any
associated placement and routing information associated with that instance.
|
static void |
makePhysNetNamesConsistent(Design design)
Make all of a Design's physical Net objects consistent with its logical (EDIF) netlist.
|
static long |
moveValToNewRow(long lutValue,
int i,
int newRow) |
static void |
optimizeLUT1Inverters(Design design) |
static boolean |
placeCell(Cell c,
Design design)
Quick and dumb placement of a cell.
|
static void |
populateBlackBox(Design design,
String hierarchicalCellName,
Design cell)
NOTE: This method is not fully tested.
|
static void |
postBlackBoxCleanup(String hierCellName,
Design design)
Attempts to rename boundary nets around the previous blackbox to follow naming convention
(net is named after source).
|
static void |
prepareShellBlackBoxForRouting(Design design)
This adds PROHIBIT constraints to the design (via .XDC) that will prohibit
the use of BEL sites in the same half SLICE if there are any other cells
placed in it.
|
static void |
printSiteInstInfo(SiteInst siteInst,
PrintStream ps) |
static void |
prohibitGNDSources(Design design)
Adds a PROHIBIT constraint for each LUT BEL supplying GND.
|
static boolean |
removeConnectedRouting(Net net,
Node node)
Examines the routing of a net and will remove all parts of the routing
that connect to the provided node.
|
static void |
replaceEncryptedCells(Design design,
List<Path> netlists)
Removes all the existing encrypted cell files from a design and replaces them
with the provided list and black boxes those cells.
|
static String |
resolveNetNameFromSiteWire(SiteInst inst,
int siteWire)
Examines a site wire in a populated site inst for all the connected BELPins for
cells occupying those BELs.
|
static void |
resolveSiteRoutingFromInContextPorts(Design design)
When importing designs that have been taken from an in-context implementation
(write_checkpoint -cell), often Vivado will write out residual nets that do not necessarily
exist in the module or are retaining GND/VCC routing from the parent context.
|
static boolean |
routeAlternativeOutputSitePin(Net net,
SitePinInst sitePinInst)
Routes (within the site) the alternate site output pin for SLICE dual-output scenarios.
|
static boolean |
stampPlacement(Design design,
Module stamp,
Map<String,Site> instPlacements)
Given a design with multiple identical cell instances, place
each of those instances using the stamp module template
at the anchored site locations provided in instPlacements.
|
static void |
toCSV(String fileName,
Design design)
Creates two CSV files based on this design, one for instances and one
for nets.
|
static void |
unlockNetlist(Design design)
Unlocks the logical netlist of the design by removing the DONT_TOUCH
property.
|
static void |
unlockPlacement(Design design)
Unlocks placement of cells of a design.
|
static void |
unlockRouting(Design design)
Unlocks any and all routing of a design.
|
static boolean |
unrouteAlternativeOutputSitePin(Net net)
Un-routes (within the site) the alternate source pin on the provided net.
|
static List<SitePinInst> |
unrouteCellPinSiteRouting(Cell cell,
String logicalPinName)
Unroutes the site routing connected to the provided cell's logical pin.
|
static void |
unrouteDualOutputSitePinRouting(Design design)
In Series7 and UltraScale architectures, there are dual output site pin scenarios where an
optional additional output can be used to drive out of the SLICE using the OUTMUX routing
BEL.
|
static void |
unrouteGNDNetAndLUTSources(Design design)
Unroutes the GND net of a design and unroutes the site routing of any LUT GND
sources while leaving other site routing inputs intact.
|
static void |
unroutePins(Net net,
Collection<SitePinInst> pins)
Unroutes pins from a specific net by only removing the routing (PIPs) that are essential
for those pins.
|
static Set<PIP> |
unrouteSourcePin(SitePinInst src)
Unroutes a SitePinInst of a net.
|
static void |
updatePinsIsRouted(Design design)
Update the SitePinInst.isRouted() value of all sink pins in the given
Design.
|
static void |
updatePinsIsRouted(Net net)
Update the SitePinInst.isRouted() value of all pins on the given
Net.
|
static void |
writeVerilogStub(Design design,
String fileName)
Creates a verilog wrapper file for this design by examining the
top level netlist.
|
public static SitePinInst identifyClockSource(SitePinInst netSource)
netSource
- The site pin output from which to start the clock searchpublic static Cell getDrivingCell(SitePinInst netSource)
netSource
- The output site pin from which to start searchingpublic static BELPin getDrivingBELPin(SitePinInst netSource)
netSource
- The source pinpublic static BELPin getDrivingBELPin(BELPin elementPin)
elementPin
- The element pin of interest. Cannot be a element output pin.public static ArrayList<BELPin> getDrivenBELPins(BELPin elementPin)
elementPin
- The element pin of interest. Cannot be an element input pin.public static BELPin getCorrespondingRBELInputPin(BELPin outputPin, SiteInst inst)
outputPin
- The output pin on the RBEL element of interest.inst
- The corresponding site instance where the pin resides.public static BELPin getCorrespondingRBELOutputPin(BELPin inputPin, SiteInst inst)
inputPin
- The input pin of interestinst
- The site instance corresponding to the element of interestpublic static ArrayList<BELPin> getCorrespondingBELInputPins(BELPin outputPin, SiteInst inst)
public static ArrayList<BELPin> getCorrespondingBELOutputPins(BELPin inputPin, SiteInst inst)
inputPin
- inst
- public static boolean isBELALut(String elementName)
public static boolean isBELAReg(String elementName)
public static boolean isPinStateBEL(BELPin pin)
public static int invertBit(int i, int col)
public static long getCurrVal(long lutValue, int i)
public static long moveValToNewRow(long lutValue, int i, int newRow)
public static int getInvertCol(String logicalPinName)
public static String invertLutInput(Cell lut, String physicalPinName)
public static boolean areAllPinsConnectedToALUT(Net n)
public static void optimizeLUT1Inverters(Design design)
public static SitePinInst createPinAndAddToNet(Cell cell, String cellPinName, Net net)
cell
- The placed source or sink BEL instance from which to trace to a site pin.
Must have a direct connection to a site pin.cellPinName
- Name of the logical pin name on the cell.net
- The net to add the pin to.public static Map<UtilizationType,Integer> calculateUtilization(Design d, PBlock pblock)
public static Map<UtilizationType,Integer> calculateUtilization(Design d)
public static Map<UtilizationType,Integer> calculateUtilization(Collection<SiteInst> siteInsts)
public static void writeVerilogStub(Design design, String fileName)
fileName
- Name of the desired verilog file.public static void toCSV(String fileName, Design design)
fileName
- public static List<PIP> findRoutingPath(Node start, Node end)
start
- Desired start nodeend
- Desired end nodepublic static List<PIP> findRoutingPath(RouteNode start, RouteNode end)
start
- Desired start nodeend
- Desired end nodepublic static String resolveNetNameFromSiteWire(SiteInst inst, int siteWire)
inst
- The site instance where the site wire in question resides.siteWire
- The site wire index in the site where the site inst resides.public static void populateBlackBox(Design design, String hierarchicalCellName, Design cell)
read_checkpoint -cell <cell name> <DCP Name>
design
- The top level designhierarchicalCellName
- Name of the black box in the design netlist.cell
- The 'guts' to be inserted into the black boxpublic static void postBlackBoxCleanup(String hierCellName, Design design)
hierCellName
- The hierarchical cell instance that was previously a black boxdesign
- The current design.public static Map<Node,ArrayList<PIP>> getNodePIPMap(List<PIP> route)
route
- The list of PIPs to create the map from.public static boolean removeConnectedRouting(Net net, Node node)
net
- The net with potential disjoint routing treesnode
- Node belonging to the routing tree to remove.public static void unroutePins(Net net, Collection<SitePinInst> pins)
net
- The current net to modify routing and to which all pins will have their routing
removed. If any pin passed in is not of this net, it is skipped and no effect is taken.pins
- Pins that belong to the provided net that should have their selective routing
removed.
Source pins are handled by DesignTools.unrouteSourcePin(SitePinInst)
.public static Set<PIP> unrouteSourcePin(SitePinInst src)
Net.unroute()
.src
- The source pin of the net from which to remove the routingpublic static Set<PIP> getTrimmablePIPsFromPins(Net net, Collection<SitePinInst> pins)
DesignTools.unrouteSourcePin(SitePinInst)
for handling source pin unroutes.net
- The current netpins
- The set of pins to remove.public static void fullyUnplaceCell(Cell cell, Map<Net,Set<SitePinInst>> deferRemovals)
cell
- The cell to unplacedeferRemovals
- An optional map that, if passed in non-null will be populated with
site pins marked for removal. The map allows for persistent tracking if this method is called
many times as the process is expensive without batching.public static void fullyRemoveCell(Design design, Cell cell, Map<Net,Set<SitePinInst>> deferRemovals)
design
- The design where the cell is instantiatedcell
- The cell to removedeferRemovals
- An optional map that, if passed in non-null will be populated with
site pins marked for removal. The map allows for persistent tracking if this method is called
many times as the process is expensive without batching.public static void handlePinRemovals(SitePinInst spi, Map<Net,Set<SitePinInst>> deferRemovals)
spi
- SitePinInst object to be removed/unrouted.deferRemovals
- Optional map for deferring the removal of SitePinInst objects, grouped by their
associated Net object.public static String getSitePinSource(BELPin pin)
pin
- The BELpin to search frompublic static void batchRemoveSitePins(Map<Net,Set<SitePinInst>> deferredRemovals, boolean preserveOtherRoutes)
DesignTools.fullyRemoveCell(Design, Cell, Map)
.deferredRemovals
- Mapping between nets and the site pins to be removedpreserveOtherRoutes
- Flag indicating if when pins are removed, if other routes on the
net should be preserved.public static void makeBlackBox(Design d, String hierarchicalCellName)
update_design -cells <name> -black_box
or (2)
by deleting all of the cells and nets insides of a cell instance. Method (2) is
more likely to have complications.d
- The current designhierarchicalCellName
- The name of the hierarchical cell to become a black box.public static List<SitePinInst> unrouteCellPinSiteRouting(Cell cell, String logicalPinName)
cell
- The cell of the pinlogicalPinName
- The logical pin name source or sink to have routing
removed.public static void makeBlackBox(Design d, EDIFHierCellInst hierarchicalCell)
update_design -cells <name> -black_box
or (2) by deleting all of the
cells and nets insides of a cell instance. Method (2) is more likely to have
complications. This also unroutes both GND and VCC nets to avoid
implementation issues by Vivado in subsequent place and route runs.d
- The current designhierarchicalCell
- The hierarchical cell to become a black box.public static SiteInst getCorrespondingSiteInst(Design design, SiteInst orig, Site newAnchor, Module module)
design
- The current design from which to get the corresponding site instance.orig
- The original site instance (from the module)newAnchor
- The new anchor location of the module.module
- The Module to use as the template.public static boolean stampPlacement(Design design, Module stamp, Map<String,Site> instPlacements)
design
- The top level design with identical multiple cell instances.stamp
- The prototype stamp (or stencil) to use for replicated placement and routing.
This must match identically with the named instances in instPlacementsinstPlacements
- Desired locations for placementspublic static Set<Cell> getConnectedCells(BELPin pin, SiteInst si)
pin
- The BELPin to examine for connected cells.si
- The SiteInst to examine for connected cells.public static Set<Cell> getConnectedCells(SitePinInst pin)
pin
- The SitePinInst to examine for connected cells.public static Set<BELPin> getConnectedBELPins(BELPin pin, SiteInst si)
pin
- The SitePinInst to examine for connected BEL pins.si
- The SiteInst to examine for connected cells.public static Set<BELPin> getConnectedBELPins(SitePinInst pin)
pin
- The SitePinInst to examine for connected BEL pins.public static boolean placeCell(Cell c, Design design)
c
- The cell to placepublic static List<SitePinInst> createMissingSitePinInsts(Design design, Net net)
design
- The current design of this net.public static String getRoutedSitePin(Cell cell, Net net, String logicalPinName)
cell
- The cell with the pin of interest.net
- The physical net to which this pin belongslogicalPinName
- The logical pin name of the cell to query.public static String getRoutedSitePinFromPhysicalPin(Cell cell, Net net, String belPinName)
cell
- The cell with the pin of interest.net
- The physical net to which this pin belongsbelPinName
- The physical pin name of the cellpublic static List<String> getAllRoutedSitePinsFromPhysicalPin(Cell cell, Net net, String belPinName)
cell
- The cell with the pin of interest.net
- The physical net to which this pin belongsbelPinName
- The physical pin name of the cellpublic static void createMissingSitePinInsts(Design design)
DesignTools.createMissingSitePinInsts(Design, Net)
.design
- The current designpublic static void unrouteDualOutputSitePinRouting(Design design)
design
- The design from which to remove the unnecessary site routingpublic static SitePinInst getLegalAlternativeOutputPin(Net net)
net
- The net of interest.public static BELPin getLogicalBELPinDriver(SitePinInst sitePinInst)
sitePinInst
- The output site pin instance from which to find the logical driver.public static boolean routeAlternativeOutputSitePin(Net net, SitePinInst sitePinInst)
net
- The current net of interest to be routedsitePinInst
- The alternate site output pin to be routedpublic static boolean unrouteAlternativeOutputSitePin(Net net)
net
- The relevant net that has the populated alternative site pin.public static List<EDIFHierPortInst> getPortInstsFromSitePinInst(SitePinInst sitePin)
sitePin
- The site pin to query.public static Map<String,String> getInvertiblePinMap(Series series, Unisim unisim)
series
- The series of interest.unisim
- The unisim of interest.public static void copyImplementation(Design src, Design dest, boolean lockPlacement, boolean lockRouting, Map<String,String> srcToDestInstNames)
src
- The source design (with partial or full implementation)dest
- The destination design (with matching cell instance interfaces).lockPlacement
- Flag indicating if the destination implementation copy should have the
placement lockedlockRouting
- Flag indicating if the destination implementation copy should have the
routing lockedsrcToDestInstNames
- A map of source (key) to destination (value) pairs of cell
instances from which to copy the implementation. If targeting the top instance, use an
empty String ("") as the destination instance name.public static void copyImplementation(Design src, Design dest, boolean copyStaticNets, boolean copyOnlyInternalNets, boolean lockPlacement, boolean lockRouting, Map<String,String> srcToDestInstNames)
src
- The source design (with partial or full implementation)dest
- The destination design (with matching cell instance interfaces)copyStaticNets
- Flag indicating if static nets should be copiedcopyOnlyInternalNets
- Flag indicating if only nets with every terminal inside the cell should be copiedlockPlacement
- Flag indicating if the destination implementation copy should have the
placement lockedlockRouting
- Flag indicating if the destination implementation copy should have the
routing lockedsrcToDestInstNames
- A map of source (key) to destination (value) pairs of cell
instances from which to copy the implementationpublic static void copyImplementation(Design src, Design dest, String... instNames)
src
- The source design (with partial or full implementation)dest
- The destination design (with matching cell instance interfaces)instNames
- Names of the cell instances to copypublic static void copyImplementation(Design src, Design dest, boolean lockPlacement, boolean lockRouting, String... instNames)
src
- The source design (with partial or full implementation)dest
- The destination design (with matching cell instance interfaces)lockPlacement
- Flag indicating if the destination implementation copy should have the
placement lockedlockRouting
- Flag indicating if the destination implementation copy should have the
routing lockedinstNames
- Names of the cell instances to copypublic static void printSiteInstInfo(SiteInst siteInst, PrintStream ps)
public static void makePhysNetNamesConsistent(Design design)
design
- Design object to be modified in-place.public static void createPossiblePinsToStaticNets(Design design)
public static void createCeClkOfRoutethruFFToVCC(Design design)
public static void createA1A6ToStaticNets(Design design)
public static void createCeSrRstPinsToVCC(Design design)
design
- Design object to be modified in-place.public static void createMissingStaticSitePins(BELPin belPin, SiteInst si, Cell cell)
public static List<PIP> getConnectionPIPs(SitePinInst sinkPin)
sinkPin
- A sink pin from a routed net.public static Job generateReadableEDIFJob(Path checkpoint, Path edif)
checkpoint
- the input checkpointedif
- the output EDIFpublic static Path getDefaultReadableEDIFDir(Path dcpFile)
dcpFile
- The source DCP file pathpublic static Path getDCPAutoGenMD5FilePath(Path dcpFile, Path edfDir)
dcpFile
- The Path to the DCP sourceedfDir
- The directory containing the auto-generated edf and md5 filepublic static Path getEDFAutoGenFilePath(Path dcpFile, Path edfDir)
dcpFile
- The Path to the DCP sourceedfDir
- The directory where the auto-generated EDIF is storedpublic static Path generateReadableEDIF(Path dcp, Path edfFileName)
dcp
- the checkpointedfFileName
- filename to use or null if we should select a filenamepublic static void resolveSiteRoutingFromInContextPorts(Design design)
design
- The design of interest.public static ModuleImplsInst createModuleImplsInst(Design design, String name, ModuleImpls module)
ModuleImplsInst
, i.e. a Module instance with flexible implementation. If an edif cell inst
of the given name already exists in the design hierarchy, it will be used for the module. Otherwise, a new
EDIF Cell Inst will be created.design
- the designname
- name of the module instancemodule
- the module to usepublic static void createModuleInstsFromModuleImplsInsts(Design design, Collection<ModuleImplsInst> instances, Collection<ImplsPath> paths)
ModuleImplsInst
s, convert them into ModuleInst
s so that the design
can be exported to a checkpointdesign
- the designinstances
- the instances to be convertedpaths
- nets connecting the instances as returned by BlockPlacer2.getPaths()
public static boolean isNetDrivenByHierPort(Net net)
net
- Net to examine.public static void lockNetlist(Design design)
EDIFTools.lockNetlist(EDIFNetlist)
.design
- The design of the netlist to lock.public static void unlockNetlist(Design design)
EDIFTools.unlockNetlist(EDIFNetlist)
.design
- The design of the netlist to unlock.public static void lockPlacement(Design design, boolean lock)
DesignTools.lockNetlist(Design)
). This strives to be as close as possible to
what Vivado's 'lock_design -level placement' does to lock the design.design
- The design to locklock
- Flag indicating to lock (true) or unlock (false) the design's
placement and netlist.public static void lockPlacement(Design design)
DesignTools.lockNetlist(Design)
). This strives
to be as close as possible to what Vivado's 'lock_design -level placement'
does to lock the design.design
- The design to lockpublic static void unlockPlacement(Design design)
DesignTools.unlockNetlist(Design)
). This strives to be as close as
possible to what Vivado's 'lock_design -unlock -level placement' does to lock
the design.design
- The design to unlockpublic static void lockRouting(Design design, boolean lock)
DesignTools.lockPlacement(Design, boolean)
). This strives to be
as close as possible to what Vivado's 'lock_design -level routing' does to
lock the design.design
- The design to locklock
- Flag indicating to lock (true) or unlock (false) the design's
routing, placement and netlist.public static void lockRouting(Design design)
design
- The design to lockpublic static void unlockRouting(Design design)
design
- The design to unlockpublic static void unrouteGNDNetAndLUTSources(Design design)
design
- The design to modify.public static void prohibitGNDSources(Design design)
design
- The design to which the PROHIBIT constraints are added.public static Boolean isUltraScaleSliceTop(BEL bel)
bel
- The BEL of a SLICE to querypublic static void prepareShellBlackBoxForRouting(Design design)
design
- The design to which the constraints are added.public static void addProhibitConstraint(Design design, List<String> belLocations)
design
- The design to which the constraint should be addedbelLocations
- A list of BEL locations using the syntax
'<SITE-NAME>/<BEL-NAME>'.public static void updatePinsIsRouted(Net net)
net
- Net on which pins are to be updated.public static void updatePinsIsRouted(Design design)
DesignTools.updatePinsIsRouted(Net)
.design
- Design in which pins are to be updated.public static void replaceEncryptedCells(Design design, List<Path> netlists)
design
- The design to modify.netlists
- The list of encrypted cell files (*.edn, *.edf, or *.dcp)
that should be used instead.