Add get_lpp() function to router_tech

This commit is contained in:
Eren Dogan 2023-07-25 21:01:32 -07:00
parent 54ce1377c5
commit 62a04ce874
2 changed files with 9 additions and 1 deletions

View File

@ -50,7 +50,7 @@ class graph:
This function assumes that p1 and p2 are on the same layer. 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 # Check if any blockage blocks this probe
for blockage in self.graph_blockages: for blockage in self.graph_blockages:
# Check if two shapes overlap # Check if two shapes overlap

View File

@ -114,6 +114,14 @@ class router_tech:
else: else:
debug.error("Invalid zindex {}".format(zindex), -1) 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): def get_layer_width_space(self, zindex):
""" """
These are the width and spacing of a supply layer given a supply rail These are the width and spacing of a supply layer given a supply rail