Fix spacing for gridless router

This commit is contained in:
Eren Dogan 2023-07-16 20:25:15 -07:00
parent 094e71764a
commit 983cf13ccf
2 changed files with 9 additions and 7 deletions

View File

@ -57,13 +57,15 @@ class graph:
""" Create the graph to run routing on later. """
debug.info(2, "Creating the graph for source '{}' and target'{}'.".format(source, target))
# Save source and target nodes
self.source = source
self.target = target
# Find the region to be routed and only include objects inside that region
region = deepcopy(source)
region.bbox([target])
region = region.inflated_pin(multiple=1)
region = region.inflated_pin(spacing=self.router.track_space,
multiple=1)
debug.info(3, "Routing region is {}".format(region.rect))
# Find the blockages that are in the routing area

View File

@ -82,13 +82,11 @@ class graph_router(router_tech):
else:
debug.warning("Side supply pins aren't created.")
# FIXME: Comment-out later
self.write_debug_gds(gds_name="after.gds")
# Add vdd and gnd pins as blockages as well
# NOTE: This is done to make vdd and gnd pins DRC-safe
for pin in self.all_pins:
self.blockages.append(pin.inflated_pin(multiple=1,
self.blockages.append(pin.inflated_pin(spacing=self.track_space,
multiple=1,
extra_spacing=self.offset,
keep_link=True))
@ -196,7 +194,8 @@ class graph_router(router_tech):
# Inflate the shapes to prevent DRC errors
for blockage in blockages:
self.blockages.append(blockage.inflated_pin(multiple=1,
self.blockages.append(blockage.inflated_pin(spacing=self.track_space,
multiple=1,
extra_spacing=self.offset,
keep_link=shape_name is not None))
# Remove blockages contained by this new blockage
@ -328,7 +327,8 @@ class graph_router(router_tech):
# Save side pins for routing
self.new_pins[pin_name] = new_pins
for pin in new_pins:
self.blockages.append(pin.inflated_pin(multiple=1,
self.blockages.append(pin.inflated_pin(spacing=self.track_space,
multiple=1,
extra_spacing=self.offset,
keep_link=True))