public class RouteNode extends Node implements Comparable<RouteNode>
Node
instance. It is denoted as "rnode".
The routing resource graph is built "lazily", i.e., RouteNode Objects (rnodes) are created when needed.Modifier and Type | Field and Description |
---|---|
static short |
capacity
Each RouteNode Object can be legally used by one net only
|
static RouteNode[] |
EMPTY_ARRAY
Memoized static array for use by Collection.toArray() or similar
|
static int |
initialHistoricalCongestionCost |
static int |
initialPresentCongestionCost |
DELAY_ARC, GAP_ARC, LOGICAL_DRIVER_ARC, NULL_ARC, NULL_TILE_ID, offsets, SPECIAL_INVERTING_ARC, STUB_ARC
Modifier and Type | Method and Description |
---|---|
void |
clearTarget() |
int |
compareTo(RouteNode that) |
int |
countConnectionsOfUser(NetWrapper user)
Counts the connections of a user that are using a rnode.
|
void |
decrementDriver(RouteNode parent)
Decrements the driver count of a RouteNode instance.
|
void |
decrementUser(NetWrapper user)
Decrements the connection count of a user that is represented by a
NetWrapper instance corresponding to a Net instance. |
float |
getBaseCost()
Gets the base cost of a RouteNode Object.
|
short |
getBeginTileXCoordinate() |
short |
getBeginTileYCoordinate() |
RouteNode[] |
getChildren(RouteNodeGraph routingGraph)
Gets the children of a RouteNode Object.
|
float |
getDelay()
Gets the delay of a RouteNode Object.
|
short |
getEndTileXCoordinate()
|
short |
getEndTileYCoordinate()
|
float |
getHistoricalCongestionCost()
Gets the historical congestion cost of a RouteNode Object.
|
short |
getLength()
Gets the wirelength.
|
static short |
getLength(Node node) |
float |
getLowerBoundTotalPathCost()
Gets the lower bound total path cost.
|
Node |
getNode()
Returns a deep copy of the Node associated with this RouteNode Object.
|
int |
getOccupancy()
Gets the number of users.
|
float |
getPresentCongestionCost()
Gets the present congestion cost of a RouteNode Object.
|
RouteNode |
getPrev()
Gets the parent RouteNode instance for routing a connection.
|
int |
getSLRIndex(RouteNodeGraph routingGraph) |
RouteNodeType |
getType()
Gets the type of a RouteNode object.
|
float |
getUpstreamPathCost()
Gets the upstream path cost.
|
Map<NetWrapper,Integer> |
getUsersConnectionCounts()
Gets a map that records users of a
RouteNode instance based on all routed connections. |
int |
getVisited()
Gets the connection sequence that this RouteNode instance has been visited by.
|
boolean |
hasMultiDrivers()
Checks if a RouteNode Object are illegally driven by multiple drivers.
|
void |
incrementDriver(RouteNode parent)
Adds a driver to the driver map.
|
void |
incrementUser(NetWrapper user)
Adds an user
NetWrapper instance to the user map, of which a key is a NetWrapper instance and
the value is the number of connections that are using a rnode. |
boolean |
isExcluded(RouteNodeGraph routingGraph,
Node child)
Checks if a downhill node has been excluded should not be present in the routing graph.
|
static boolean |
isExitNode(Node node)
Checks if a node is an exit node of a NodeGroup
|
boolean |
isInConnectionBoundingBox(Connection connection)
Checks if coordinates of a RouteNode Object is within the connection's bounding box.
|
boolean |
isOverUsed()
Checks if a RouteNode Object has been used by more than one users.
|
boolean |
isTarget()
Checks if a RouteNode Object is the current routing target.
|
boolean |
isUsed()
Checks if a RouteNode Object has been used.
|
boolean |
isVisited(int seq)
Checks if a RouteNode instance has been visited by a specific connection sequence.
|
void |
markTarget(com.xilinx.rapidwright.rwroute.RWRoute.ConnectionState state)
Marks this node as a target, and adds it to state's targets list.
|
int |
numChildren()
Get the number of children on this node without expanding.
|
void |
resetChildren()
Clears the children of this node so that it can be regenerated.
|
void |
setHistoricalCongestionCost(float historicalCongestionCost)
Gets the historical congestion cost of a RouteNode Object.
|
void |
setLowerBoundTotalPathCost(float totalPathCost)
Sets the lower bound total path cost.
|
void |
setPresentCongestionCost(float presentCongestionCost)
Sets the present congestion cost of a RouteNode Object.
|
void |
setPrev(RouteNode prev)
Sets the parent RouteNode instance for routing a connection.
|
void |
setType(RouteNodeType type)
Sets the type of a RouteNode object.
|
void |
setUpstreamPathCost(float newPartialPathCost)
Sets the upstream path cost.
|
void |
setVisited(int id)
Mark a RouteNode instance as being visited by a specific integer identifier.
|
String |
toString()
Gets the Vivado string representation of the node
|
int |
uniqueDriverCount()
Gets the number of unique drivers.
|
int |
uniqueUserCount()
Gets the number of unique users.
|
void |
updatePresentCongestionCost(float pres_fac)
Updates the present congestion cost based on the present congestion penalty factor.
|
boolean |
willOverUse(NetWrapper netWrapper) |
equals, equals, equals, getAllDownhillNodes, getAllDownhillNodes, getAllDownhillPIPs, getAllUphillNodes, getAllUphillNodes, getAllUphillPIPs, getAllWiresInNode, getIntentCode, getNode, getNode, getNode, getNode, getNode, getSitePin, getTile, getWireIndex, getWiresInNode, hashCode, hasIntentCode, isInvalidNode, isTied, isTiedToGnd, isTiedToVcc
getTileName, getWireName
public static final short capacity
public static final RouteNode[] EMPTY_ARRAY
public static final int initialPresentCongestionCost
public static final int initialHistoricalCongestionCost
public int compareTo(RouteNode that)
compareTo
in interface Comparable<RouteNode>
public boolean isOverUsed()
public boolean willOverUse(NetWrapper netWrapper)
public boolean isUsed()
public boolean hasMultiDrivers()
public static short getLength(Node node)
public void updatePresentCongestionCost(float pres_fac)
pres_fac
- The present congestion penalty factor.public String toString()
Node
public boolean isInConnectionBoundingBox(Connection connection)
connection
- The connection that is being routed.public Node getNode()
public boolean isTarget()
public void markTarget(com.xilinx.rapidwright.rwroute.RWRoute.ConnectionState state)
state
- State from the connection that is being routed.public void clearTarget()
public RouteNodeType getType()
public void setType(RouteNodeType type)
type
- New RouteNodeType value.public float getDelay()
public short getBeginTileXCoordinate()
public short getBeginTileYCoordinate()
public short getEndTileXCoordinate()
Node
instance stops at.public short getEndTileYCoordinate()
Tile
instance
that the associated Node
instance stops at.
For bidirectional nodes, the prev member is used to determine the end node.Node
instance stops at.public float getBaseCost()
public RouteNode[] getChildren(RouteNodeGraph routingGraph)
public void resetChildren()
public short getLength()
Node
instance spans.public void setLowerBoundTotalPathCost(float totalPathCost)
totalPathCost
- The cost value to be set.public void setUpstreamPathCost(float newPartialPathCost)
newPartialPathCost
- The new value to be set.public float getLowerBoundTotalPathCost()
public float getUpstreamPathCost()
public Map<NetWrapper,Integer> getUsersConnectionCounts()
RouteNode
instance based on all routed connections.
Each user is a NetWrapper
instance representing a Net
instance.
It is often the case that multiple connections of a net are using a same rnode.
So we count connections of each user to facilitate the sharing mechanism of RWRoute.NetWrapper
instances representing by Net
instances,
and numbers of connections from different users.public void incrementUser(NetWrapper user)
NetWrapper
instance to the user map, of which a key is a NetWrapper
instance and
the value is the number of connections that are using a rnode.
If the user is already stored in the map, increment the connection count of the user by 1. Otherwise, put the user
into the map and initialize the connection count as 1.user
- The user net in question.public int uniqueUserCount()
NetWrapper
instances in the user map, i.e, the key set size of the user map.public void decrementUser(NetWrapper user)
NetWrapper
instance corresponding to a Net
instance.
If there is only one connection of the user that is using a RouteNode instance, remove the user from the map.
Otherwise, decrement the connection count by 1.user
- The user to be decremented from the user map.public int countConnectionsOfUser(NetWrapper user)
user
- The user in question indicated by a NetWrapper
instance.public int uniqueDriverCount()
public void incrementDriver(RouteNode parent)
parent
- The driver to be added.public void decrementDriver(RouteNode parent)
parent
- The driver that should have its count reduced by 1.public int getOccupancy()
public RouteNode getPrev()
public void setPrev(RouteNode prev)
prev
- The driving RouteNode instance to set. Cannot be null.public float getPresentCongestionCost()
public void setPresentCongestionCost(float presentCongestionCost)
presentCongestionCost
- The present congestion cost to be set.public float getHistoricalCongestionCost()
public void setHistoricalCongestionCost(float historicalCongestionCost)
historicalCongestionCost
- The historical congestion cost to be set.public int numChildren()
public boolean isVisited(int seq)
seq
- Connection sequence int.public int getVisited()
public void setVisited(int id)
id
- Integer identifier.public static boolean isExitNode(Node node)
node
- The node in questionpublic boolean isExcluded(RouteNodeGraph routingGraph, Node child)
child
- The downhill node.public int getSLRIndex(RouteNodeGraph routingGraph)