Rename gridless router

This commit is contained in:
Eren Dogan 2023-05-29 09:18:55 -07:00
parent 533c1c9472
commit e1e24f6d06
6 changed files with 22 additions and 22 deletions

View File

@ -256,7 +256,7 @@ class sram_1bank(design, verilog, lef):
elif OPTS.route_supplies == "grid":
from openram.router import supply_grid_router as router
elif OPTS.route_supplies == "navigation":
from openram.router import navigation_router as router
from openram.router import hanan_router as router
else:
from openram.router import supply_tree_router as router
rtr=router(layers=self.supply_stack,

View File

@ -8,4 +8,4 @@ from .signal_escape_router import *
from .signal_router import *
from .supply_grid_router import *
from .supply_tree_router import *
from .navigation_router import *
from .hanan_router import *

View File

@ -10,12 +10,12 @@ from openram.base.pin_layout import pin_layout
from openram.base.vector import vector
from openram.base.vector3d import vector3d
from .direction import direction
from .navigation_node import navigation_node
from .navigation_utils import *
from .hanan_node import hanan_node
from .hanan_utils import *
class navigation_graph:
""" This is the navigation graph created from the blockages. """
class hanan_graph:
""" This is the Hanan graph created from the blockages. """
def __init__(self, router):
@ -30,7 +30,7 @@ class navigation_graph:
def create_graph(self, layout_source, layout_target):
""" Create the Hanan graph to run routing on later. """
debug.info(0, "Creating the navigation graph for source '{0}' and target'{1}'.".format(layout_source, layout_target))
debug.info(0, "Creating the Hanan graph for source '{0}' and target'{1}'.".format(layout_source, layout_target))
# Find the region to be routed and only include objects inside that region
region = deepcopy(layout_source)
@ -96,7 +96,7 @@ class navigation_graph:
# Create graph nodes from Hanan points
self.nodes = []
for point in hanan_points:
self.nodes.append(navigation_node(point))
self.nodes.append(hanan_node(point))
# Connect closest points avoiding blockages
for i in range(len(self.nodes)):

View File

@ -7,16 +7,16 @@ from openram.base.vector import vector
from openram.base.vector3d import vector3d
class navigation_node:
""" This class represents a node on the navigation graph. """
class hanan_node:
""" This class represents a node on the Hanan graph. """
# This is used to assign unique ids to nodes
next_id = 0
def __init__(self, center):
self.id = navigation_node.next_id
navigation_node.next_id += 1
self.id = hanan_node.next_id
hanan_node.next_id += 1
if isinstance(center, vector3d):
self.center = center
else:

View File

@ -12,12 +12,12 @@ from openram.tech import GDS
from openram.tech import layer as tech_layer
from openram import OPTS
from .router_tech import router_tech
from .navigation_graph import navigation_graph
from .hanan_graph import hanan_graph
class navigation_router(router_tech):
class hanan_router(router_tech):
"""
This is the router class that implements navigation graph routing algorithm.
This is the router class that implements Hanan graph routing algorithm.
"""
def __init__(self, layers, design, bbox=None, pin_type=None):
@ -51,7 +51,7 @@ class navigation_router(router_tech):
# Find blockages
self.find_blockages()
# Create the navigation graph
# Create the hanan graph
# TODO: Remove this part later and route all pins
vdds = list(self.pins["vdd"])
vdds.sort()
@ -64,11 +64,11 @@ class navigation_router(router_tech):
next(pin_iter)
next(pin_iter)
vdd_1 = next(pin_iter)
self.nav = navigation_graph(self)
self.nav.create_graph(vdd_0, vdd_1)
self.hg = hanan_graph(self)
self.hg.create_graph(vdd_0, vdd_1)
# Find the shortest path from source to target
path = self.nav.find_shortest_path(vdd_0, vdd_1)
path = self.hg.find_shortest_path(vdd_0, vdd_1)
# Create the path shapes on layout
if path:
@ -151,9 +151,9 @@ class navigation_router(router_tech):
# Display the inflated blockage
if "nav" in self.__dict__:
for blockage in self.nav.graph_blockages:
for blockage in self.hg.graph_blockages:
self.add_object_info(blockage, "blockage")
for node in self.nav.nodes:
for node in self.hg.nodes:
offset = (node.center.x, node.center.y)
self.design.add_label(text="O",
layer="text",

View File

@ -4,7 +4,7 @@
# All rights reserved.
#
"""
Utility functions for navigation router.
Utility functions for Hanan router.
"""
def is_probe_blocked(p1, p2, blockages):