Fix even more DRC errors in graph router

This commit is contained in:
Eren Dogan
2023-07-22 14:07:27 -07:00
parent 8354de654f
commit 48b556c43a
4 changed files with 34 additions and 22 deletions
+20 -2
View File
@@ -6,7 +6,7 @@
from openram.base.pin_layout import pin_layout
from openram.base.vector import vector
from openram.tech import drc
from .graph_utils import snap_to_grid
from .graph_utils import snap
class graph_shape(pin_layout):
@@ -21,10 +21,28 @@ class graph_shape(pin_layout):
# Snap the shape to the grid here
ll, ur = self.rect
self.rect = [snap_to_grid(ll), snap_to_grid(ur)]
self.rect = [snap(ll), snap(ur)]
self.inflated_from = inflated_from
def center(self):
""" Override the default `center` behavior. """
return snap(super().center())
def height(self):
""" Override the default `height` behavior. """
return snap(super().height())
def width(self):
""" Override the default `width` behavior. """
return snap(super().width())
def get_inflated_from(self):
"""
Return `self` if `self.inflated_from` is None. Otherwise, return