diff --git a/compiler/router/graph.py b/compiler/router/graph.py index cc6890cd..4a058fc9 100644 --- a/compiler/router/graph.py +++ b/compiler/router/graph.py @@ -50,7 +50,7 @@ class graph: This function assumes that p1 and p2 are on the same layer. """ - probe_shape = graph_probe(p1, p2, self.router.vert_lpp if p1.z else self.router.horiz_lpp) + probe_shape = graph_probe(p1, p2, self.router.get_lpp(p1.z)) # Check if any blockage blocks this probe for blockage in self.graph_blockages: # Check if two shapes overlap diff --git a/compiler/router/router_tech.py b/compiler/router/router_tech.py index 326a60a9..92366e3c 100644 --- a/compiler/router/router_tech.py +++ b/compiler/router/router_tech.py @@ -114,6 +114,14 @@ class router_tech: else: debug.error("Invalid zindex {}".format(zindex), -1) + def get_lpp(self, zindex): + if zindex == 1: + return self.vert_lpp + elif zindex == 0: + return self.horiz_lpp + else: + debug.error("Invalid zindex {}".format(zindex), -1) + def get_layer_width_space(self, zindex): """ These are the width and spacing of a supply layer given a supply rail