From 53505e2ed294957071e101ed8e2fd59ac94d08bd Mon Sep 17 00:00:00 2001 From: Eren Dogan Date: Wed, 26 Jul 2023 16:41:46 -0700 Subject: [PATCH] Add "pin safe" functionality to is_node_blocked() --- compiler/router/graph.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/router/graph.py b/compiler/router/graph.py index a9bb7f08..adb98ea1 100644 --- a/compiler/router/graph.py +++ b/compiler/router/graph.py @@ -65,7 +65,7 @@ class graph: return False - def is_node_blocked(self, node): + def is_node_blocked(self, node, pin_safe=True): """ Return if a node is blocked by a blockage. """ blocked = False @@ -92,7 +92,7 @@ class graph: safe[i] = False if not all(safe): blocked = True - elif blockage in [self.source, self.target]: + elif pin_safe and blockage in [self.source, self.target]: return False else: blocked = True @@ -104,7 +104,7 @@ class graph: # If the nodes are blocked by a blockage other than a via for node in nodes: - if self.is_node_blocked(node): + if self.is_node_blocked(node, pin_safe=False): return True # If the nodes are blocked by a via point = node.center