Rename 'inflated_from' to 'core'

This commit is contained in:
Eren Dogan 2023-07-25 10:26:23 -07:00
parent 47185f6085
commit ed404a3ad2
2 changed files with 11 additions and 11 deletions

View File

@ -58,7 +58,7 @@ class graph:
# Probe is blocked if the shape isn't routable # Probe is blocked if the shape isn't routable
if not self.is_routable(blockage): if not self.is_routable(blockage):
return True return True
blockage = blockage.get_inflated_from() blockage = blockage.get_core()
if blockage.overlaps(probe_shape): if blockage.overlaps(probe_shape):
continue continue
return True return True
@ -75,7 +75,7 @@ class graph:
if not self.is_routable(blockage): if not self.is_routable(blockage):
blocked = True blocked = True
continue continue
blockage = blockage.get_inflated_from() blockage = blockage.get_core()
if self.inside_shape(node.center, blockage): if self.inside_shape(node.center, blockage):
offset = self.router.offset offset = self.router.offset
p = node.center p = node.center
@ -163,7 +163,7 @@ class graph:
# Make sure that the source or target fake pins are included as blockage # Make sure that the source or target fake pins are included as blockage
for shape in [self.source, self.target]: for shape in [self.source, self.target]:
for blockage in self.graph_blockages: for blockage in self.graph_blockages:
blockage = blockage.get_inflated_from() blockage = blockage.get_core()
if shape == blockage: if shape == blockage:
break break
else: else:
@ -199,7 +199,7 @@ class graph:
for shape in self.graph_blockages: for shape in self.graph_blockages:
if not self.is_routable(shape): if not self.is_routable(shape):
continue continue
shape = shape.get_inflated_from() shape = shape.get_core()
aspect_ratio = shape.width() / shape.height() aspect_ratio = shape.width() / shape.height()
# FIXME: Aspect ratio may not be the best way to determine this # 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 # If the pin is tall or fat, add two points on the ends

View File

@ -15,14 +15,15 @@ class graph_shape(pin_layout):
the graph router. 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) pin_layout.__init__(self, name, rect, layer_name_pp)
# Snap the shape to the grid here # Snap the shape to the grid here
ll, ur = self.rect ll, ur = self.rect
self.rect = [snap(ll), snap(ur)] 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): def center(self):
@ -43,15 +44,14 @@ class graph_shape(pin_layout):
return snap(super().width()) return snap(super().width())
def get_inflated_from(self): def get_core(self):
""" """
Return `self` if `self.inflated_from` is None. Otherwise, return Return `self` if `self.core` is None. Otherwise, return `self.core`.
`self.inflated_from`.
""" """
if self.inflated_from is None: if self.core is None:
return self return self
return self.inflated_from return self.core
def inflated_pin(self, spacing=None, multiple=0.5, extra_spacing=0): def inflated_pin(self, spacing=None, multiple=0.5, extra_spacing=0):