From d1e843a792b8329400b9309d6012bef686a43f90 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Wed, 13 Nov 2024 15:57:19 -0800 Subject: [PATCH] Tidy up Signed-off-by: Eddie Hung --- .../xilinx/rapidwright/rwroute/RWRoute.java | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/com/xilinx/rapidwright/rwroute/RWRoute.java b/src/com/xilinx/rapidwright/rwroute/RWRoute.java index 64095bd11..b7028f901 100644 --- a/src/com/xilinx/rapidwright/rwroute/RWRoute.java +++ b/src/com/xilinx/rapidwright/rwroute/RWRoute.java @@ -627,19 +627,16 @@ protected NetWrapper createNetWrapperAndConnections(Net net) { } indirectConnections.add(connection); - BitSet[] eastWestWires = (routingGraph.eastWestWires == null) ? null : - routingGraph.eastWestWires.get(sinkINTNode.getTile().getTileTypeEnum()); - RouteNode sinkRnode; - if (eastWestWires != null && eastWestWires[0].get(sinkINTNode.getWireIndex())) { - sinkRnode = routingGraph.getOrCreate(sinkINTNode, RouteNodeType.EXCLUSIVE_SINK_EAST); - sinkRnode.setType(RouteNodeType.EXCLUSIVE_SINK_EAST); - } else if (eastWestWires != null && eastWestWires[1].get(sinkINTNode.getWireIndex())) { - sinkRnode = routingGraph.getOrCreate(sinkINTNode, RouteNodeType.EXCLUSIVE_SINK_WEST); - sinkRnode.setType(RouteNodeType.EXCLUSIVE_SINK_WEST); - } else { - sinkRnode = routingGraph.getOrCreate(sinkINTNode, RouteNodeType.EXCLUSIVE_SINK_BOTH); - sinkRnode.setType(RouteNodeType.EXCLUSIVE_SINK_BOTH); - } + + RouteNodeInfo rni = RouteNodeInfo.get(sinkINTNode, routingGraph); + assert(rni.type.isAnyLocal()); + RouteNodeType sinkType = rni.type == RouteNodeType.LOCAL_EAST ? RouteNodeType.EXCLUSIVE_SINK_EAST : + rni.type == RouteNodeType.LOCAL_WEST ? RouteNodeType.EXCLUSIVE_SINK_WEST : + rni.type == RouteNodeType.LOCAL_BOTH ? RouteNodeType.EXCLUSIVE_SINK_BOTH : + null; + assert(sinkType != null); + RouteNode sinkRnode = routingGraph.getOrCreate(sinkINTNode, sinkType); + sinkRnode.setType(sinkType); connection.setSinkRnode(sinkRnode); // Where appropriate, allow all 6 LUT pins to be swapped to begin with