Include other pins as blockages in Hanan router

This commit is contained in:
Eren Dogan 2023-06-05 11:27:05 -07:00
parent 8f1af0ebb7
commit 48a148003a
1 changed files with 18 additions and 1 deletions

View File

@ -66,7 +66,7 @@ class hanan_graph:
# Find the blockages that are in the routing area
self.graph_blockages = []
for blockage in self.router.blockages:
for blockage in self.get_blockages(source.name):
# Set the region's lpp to current blockage's lpp so that the
# overlaps method works
region.lpp = blockage.lpp
@ -81,6 +81,23 @@ class hanan_graph:
debug.info(0, "Number of nodes in the routing graph: {}".format(len(self.nodes)))
def get_blockages(self, pin_name):
"""
Return all blockages for this routing region, including pins with
different name.
"""
# Create a copy of blockages
blockages = self.router.blockages[:]
# Create a copy of pins with different name than the routed pins
for name, pins, in self.router.pins.items():
if name == pin_name:
continue
for pin in pins:
blockages.append(deepcopy(pin).inflated_pin(multiple=1))
return blockages
def generate_cartesian_values(self):
"""
Generate x and y values from all the corners of the shapes in the