mirror of https://github.com/VLSIDA/OpenRAM.git
Simplify inflated_from logic
This commit is contained in:
parent
5ce193c2dd
commit
7ee1dcef54
|
|
@ -57,8 +57,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
|
||||||
if blockage.inflated_from is not None:
|
blockage = blockage.get_inflated_from()
|
||||||
blockage = blockage.inflated_from
|
|
||||||
if blockage.overlaps(probe_shape):
|
if blockage.overlaps(probe_shape):
|
||||||
continue
|
continue
|
||||||
return True
|
return True
|
||||||
|
|
@ -83,8 +82,7 @@ class graph:
|
||||||
if not self.is_routable(blockage):
|
if not self.is_routable(blockage):
|
||||||
blocked = True
|
blocked = True
|
||||||
continue
|
continue
|
||||||
if blockage.inflated_from is not None:
|
blockage = blockage.get_inflated_from()
|
||||||
blockage = blockage.inflated_from
|
|
||||||
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
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,17 @@ class graph_shape(pin_layout):
|
||||||
self.inflated_from = inflated_from
|
self.inflated_from = inflated_from
|
||||||
|
|
||||||
|
|
||||||
|
def get_inflated_from(self):
|
||||||
|
"""
|
||||||
|
Return `self` if `self.inflated_from` is None. Otherwise, return
|
||||||
|
`self.inflated_from`.
|
||||||
|
"""
|
||||||
|
|
||||||
|
if self.inflated_from is None:
|
||||||
|
return self
|
||||||
|
return self.inflated_from
|
||||||
|
|
||||||
|
|
||||||
def inflated_pin(self, spacing=None, multiple=0.5, extra_spacing=0, keep_link=False):
|
def inflated_pin(self, spacing=None, multiple=0.5, extra_spacing=0, keep_link=False):
|
||||||
""" Override the default inflated_pin behavior. """
|
""" Override the default inflated_pin behavior. """
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue