public class NetTools
extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
NetTools.NodeTree |
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTINUE_ELBOW |
static String |
LAST_ELBOW |
static String |
VERTICAL_BAR |
static String |
WHITE_SPACE |
| Constructor and Description |
|---|
NetTools() |
| Modifier and Type | Method and Description |
|---|---|
static Node |
findClockRootVRoute(Net net)
Finds the clock root VROUTE node.
|
static String |
getClockTreeSpine(Net net)
Generates the clock tree up to the horizontal distribution nodes of the
provided clock net up to the NODE_PINFEED nodes.
|
static List<Net> |
getNetsWithOverlappingNodes(Design design)
Returns a list of nets with overlapping nodes without unrouting them.
|
static String |
getNetTreeString(Net net)
Returns a string representation of the net's routing tree using tree
characters (├─, └─).
|
static String |
getNetTreeString(Net net,
Function<Node,Boolean> filter)
Returns a string representation of the net's routing tree using tree
characters (├─, └─).
|
static String |
getNetTreeString(Net net,
Function<Node,Boolean> filter,
Function<Node,String> customToString)
Returns a string representation of the net's routing tree using tree
characters (├─, └─).
|
static List<Node> |
getNodesToSink(SitePinInst spi)
Recovers the
Node instances that route the net of the given sink pin as far as that
pin, by walking backwards from it through the drivers given by
NetTools.getNodeToDriver(Net). |
static Map<Node,Node> |
getNodeToDriver(Net net)
Builds a map from each
Node driven by a PIP of the given net onto the node driving it,
so that the routing reaching any one node can be recovered by walking backwards from it (see
NetTools.getNodesToSink(SitePinInst)). |
static List<NetTools.NodeTree> |
getNodeTrees(Net net)
Compute the node routing tree of the given Net by examining its PIPs.
|
static List<NetTools.NodeTree> |
getNodeTrees(Net net,
Function<Node,Boolean> filter)
Compute the node routing tree of the given Net by examining its PIPs.
|
static String |
getVerticalClockTreeSpine(Net net)
Gets a string representation of the vertical clock routing spine for the given net.
|
static boolean |
hasClockSinks(Net net)
Checks if the provided net drives a clock site pin input.
|
static boolean |
isGlobalClock(Net net) |
static List<Net> |
unrouteNetsWithOverlappingNodes(Design design)
Unroutes routed nets that have one or more overlapping or conflicting nodes
with another route in the design.
|
static List<Net> |
unrouteTopLevelNetsThatLeavePBlock(Design d,
PBlock pBlock)
Unroute top-level port nets that have PIPs outside the specified PBlock.
|
public static final String CONTINUE_ELBOW
public static final String LAST_ELBOW
public static final String VERTICAL_BAR
public static final String WHITE_SPACE
public static boolean isGlobalClock(Net net)
public static List<NetTools.NodeTree> getNodeTrees(Net net)
net - Net to analyze.public static List<NetTools.NodeTree> getNodeTrees(Net net, Function<Node,Boolean> filter)
net - Net to analyze.filter - A function that when is applied to a node, if it returns true will be excluded from the tree.public static boolean hasClockSinks(Net net)
net - The net to examine.public static List<Net> unrouteNetsWithOverlappingNodes(Design design)
design - The design to evaluate for conflicting nodes.public static List<Net> getNetsWithOverlappingNodes(Design design)
design - The design to evaluate for conflicting nodes.public static String getNetTreeString(Net net)
net - The net to generate the tree of nodes from.public static String getNetTreeString(Net net, Function<Node,Boolean> filter)
net - The net to generate the tree of nodes from.filter - A function that when returns true for a node, the node should
be excluded.public static String getNetTreeString(Net net, Function<Node,Boolean> filter, Function<Node,String> customToString)
net - The net to generate the tree of nodes from.filter - A function that when returns true for a node, the node
should be excluded.customToString - A custom toString() function to be applied to the Node
when printed.public static String getClockTreeSpine(Net net)
net - The clock netpublic static String getVerticalClockTreeSpine(Net net)
net - The net to analyzepublic static Node findClockRootVRoute(Net net)
net - The net to analyzepublic static List<Net> unrouteTopLevelNetsThatLeavePBlock(Design d, PBlock pBlock)
d - The design to unroute nets from.pBlock - The bounding box for the placed and routed design.public static Map<Node,Node> getNodeToDriver(Net net)
Node driven by a PIP of the given net onto the node driving it,
so that the routing reaching any one node can be recovered by walking backwards from it (see
NetTools.getNodesToSink(SitePinInst)). The direction of bidirectional PIPs is taken from
PIP.isReversed(). Since a node has at most one entry, a multiply-driven node (which
only an illegally routed net can have) retains just the driver of the last such PIP visited;
use NetTools.getNodeTrees(Net) when all drivers matter. Nodes that the net's routing merely
passes through without a PIP terminating on them (e.g. the source pin's node) are absent.net - The net to examine; it need not be fully routed.public static List<Node> getNodesToSink(SitePinInst spi)
Node instances that route the net of the given sink pin as far as that
pin, by walking backwards from it through the drivers given by
NetTools.getNodeToDriver(Net). Since that map is rebuilt on every call, prefer building it
once and walking it directly when more than one sink of the same net is of interest.
The walk stops at the first node that no PIP drives, which is not included in the result:
for a fully routed sink that is the source pin's node, but for a partially routed one it is
wherever its routing gives out, which this method does not distinguish. The net's routing is
assumed to be loop-free; this walk does not terminate on one that is not.spi - The sink SitePinInst to walk back from; it must belong to a net.