From fbb2ea5fb697c1ef9fd604c2a1c9be3b871e37a8 Mon Sep 17 00:00:00 2001 From: mrg Date: Fri, 13 May 2022 13:56:16 -0700 Subject: [PATCH] Intersection now returns a pin_layout fixed during LEF computation. --- compiler/base/lef.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/compiler/base/lef.py b/compiler/base/lef.py index 1d86a63e..8a54253f 100644 --- a/compiler/base/lef.py +++ b/compiler/base/lef.py @@ -119,14 +119,13 @@ class lef: old_blockages = list(self.blockages[pin.layer]) for blockage in old_blockages: if blockage.overlaps(inflated_pin): - intersection_shape = blockage.intersection(inflated_pin) + intersection_pin = blockage.intersection(inflated_pin) # If it is zero area, don't split the blockage - if intersection_shape[0][0]==intersection_shape[1][0] or intersection_shape[0][1]==intersection_shape[1][1]: + if not intersection_pin or intersection_pin.area() == 0: continue # Remove the old blockage and add the new ones self.blockages[pin.layer].remove(blockage) - intersection_pin = pin_layout("", intersection_shape, inflated_pin.layer) new_blockages = blockage.cut(intersection_pin) self.blockages[pin.layer].extend(new_blockages) # We split something so make another pass