From 9df3c2ac5997cedbb6b9a220c48d67743b4defb4 Mon Sep 17 00:00:00 2001 From: Eren Dogan Date: Sun, 27 Aug 2023 21:15:25 -0700 Subject: [PATCH] Return the path in source-to-target order --- compiler/router/graph.py | 1 + compiler/router/signal_escape_router.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/router/graph.py b/compiler/router/graph.py index 68454937..dc9f5c40 100644 --- a/compiler/router/graph.py +++ b/compiler/router/graph.py @@ -418,6 +418,7 @@ class graph: path.append(current) current = came_from[current.id] path.append(current) + path.reverse() return path # Get the previous node to better calculate the next costs diff --git a/compiler/router/signal_escape_router.py b/compiler/router/signal_escape_router.py index 047dcfee..86999158 100644 --- a/compiler/router/signal_escape_router.py +++ b/compiler/router/signal_escape_router.py @@ -67,7 +67,7 @@ class signal_escape_router(router): debug.error("Couldn't route from {} to {}.".format(source, target), -1) # Create the path shapes on layout new_shapes = self.add_path(path) - self.new_pins[source.name] = new_shapes[0] + self.new_pins[source.name] = new_shapes[-1] # Find the recently added shapes self.prepare_gds_reader() self.find_blockages(name)