diff --git a/compiler/router/graph.py b/compiler/router/graph.py index b54898e3..687b682a 100644 --- a/compiler/router/graph.py +++ b/compiler/router/graph.py @@ -58,7 +58,7 @@ class graph: # Probe is blocked if the shape isn't routable if not self.is_routable(blockage): return True - blockage = blockage.get_inflated_from() + blockage = blockage.get_core() if blockage.overlaps(probe_shape): continue return True @@ -75,7 +75,7 @@ class graph: if not self.is_routable(blockage): blocked = True continue - blockage = blockage.get_inflated_from() + blockage = blockage.get_core() if self.inside_shape(node.center, blockage): offset = self.router.offset p = node.center @@ -163,7 +163,7 @@ class graph: # Make sure that the source or target fake pins are included as blockage for shape in [self.source, self.target]: for blockage in self.graph_blockages: - blockage = blockage.get_inflated_from() + blockage = blockage.get_core() if shape == blockage: break else: @@ -199,7 +199,7 @@ class graph: for shape in self.graph_blockages: if not self.is_routable(shape): continue - shape = shape.get_inflated_from() + shape = shape.get_core() aspect_ratio = shape.width() / shape.height() # FIXME: Aspect ratio may not be the best way to determine this # If the pin is tall or fat, add two points on the ends diff --git a/compiler/router/graph_shape.py b/compiler/router/graph_shape.py index 29f1f872..f38c9f91 100644 --- a/compiler/router/graph_shape.py +++ b/compiler/router/graph_shape.py @@ -15,14 +15,15 @@ class graph_shape(pin_layout): the graph router. """ - def __init__(self, name, rect, layer_name_pp, inflated_from=None): + def __init__(self, name, rect, layer_name_pp, core=None): pin_layout.__init__(self, name, rect, layer_name_pp) # Snap the shape to the grid here ll, ur = self.rect self.rect = [snap(ll), snap(ur)] - self.inflated_from = inflated_from + # Core is the original shape from which this shape is inflated + self.core = core def center(self): @@ -43,15 +44,14 @@ class graph_shape(pin_layout): return snap(super().width()) - def get_inflated_from(self): + def get_core(self): """ - Return `self` if `self.inflated_from` is None. Otherwise, return - `self.inflated_from`. + Return `self` if `self.core` is None. Otherwise, return `self.core`. """ - if self.inflated_from is None: + if self.core is None: return self - return self.inflated_from + return self.core def inflated_pin(self, spacing=None, multiple=0.5, extra_spacing=0):