From d609ef9243bdff2bf1c80016e8b05bb8428d47d8 Mon Sep 17 00:00:00 2001 From: Eren Dogan Date: Tue, 25 Jul 2023 22:21:26 -0700 Subject: [PATCH] Make sure via probes can also be blocked by other blockages --- compiler/router/graph.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/compiler/router/graph.py b/compiler/router/graph.py index 4a058fc9..a9bb7f08 100644 --- a/compiler/router/graph.py +++ b/compiler/router/graph.py @@ -99,9 +99,15 @@ class graph: return blocked - def is_via_blocked(self, point): + def is_via_blocked(self, nodes): """ Return if a via on the given point is blocked by another via. """ + # If the nodes are blocked by a blockage other than a via + for node in nodes: + if self.is_node_blocked(node): + return True + # If the nodes are blocked by a via + point = node.center for via in self.graph_vias: ll, ur = via.rect center = via.center() @@ -273,7 +279,7 @@ class graph: search(i, lambda count: (count / 2) >= y_len, y_len * 2) # Left if not hasattr(self.nodes[i], "remove") and \ not hasattr(self.nodes[i + 1], "remove") and \ - not self.is_via_blocked(self.nodes[i].center): + not self.is_via_blocked(self.nodes[i:i+2]): self.nodes[i].add_neighbor(self.nodes[i + 1]) # Remove marked nodes