diff --git a/openlane/common/__init__.py b/openlane/common/__init__.py index 1ce56762c..c34b8c9a3 100644 --- a/openlane/common/__init__.py +++ b/openlane/common/__init__.py @@ -55,7 +55,7 @@ ScopedFile, ) from .toolbox import Toolbox -from .drc import DRC, Violation +from .drc import DRC, Violation, BoundingBox from . import cli from .tpe import get_tpe, set_tpe from .ring_buffer import RingBuffer diff --git a/test/common/test_misc_utils.py b/test/common/test_misc_utils.py index 289fc82b9..7e631fa59 100644 --- a/test/common/test_misc_utils.py +++ b/test/common/test_misc_utils.py @@ -171,62 +171,62 @@ def test_magic_drc_exceptions(): def test_magic_feedback(): - from openlane.common import DRC, Violation + from openlane.common import DRC, Violation, BoundingBox expected_violations = { "obsm4-metal4.ILLEGAL_OVERLAP": Violation( rules=[("obsm4-metal4", "ILLEGAL_OVERLAP")], description="Illegal overlap between obsm4 and metal4 (types do not connect)", bounding_boxes=[ - ( + BoundingBox( Decimal("11137.80"), Decimal("4449.70"), Decimal("11153.80"), Decimal("4458.80"), ), - ( + BoundingBox( Decimal("11137.80"), Decimal("4437.90"), Decimal("11139.90"), Decimal("4449.70"), ), - ( + BoundingBox( Decimal("11151.70"), Decimal("4437.90"), Decimal("11153.80"), Decimal("4449.70"), ), - ( + BoundingBox( Decimal("11137.80"), Decimal("4433.70"), Decimal("11153.80"), Decimal("4437.90"), ), - ( + BoundingBox( Decimal("11137.80"), Decimal("4421.90"), Decimal("11139.90"), Decimal("4433.70"), ), - ( + BoundingBox( Decimal("11151.70"), Decimal("4421.90"), Decimal("11153.80"), Decimal("4433.70"), ), - ( + BoundingBox( Decimal("11137.80"), Decimal("4417.70"), Decimal("11153.80"), Decimal("4421.90"), ), - ( + BoundingBox( Decimal("11137.80"), Decimal("4412.80"), Decimal("11139.90"), Decimal("4417.70"), ), - ( + BoundingBox( Decimal("11151.70"), Decimal("4412.80"), Decimal("11153.80"), @@ -238,19 +238,19 @@ def test_magic_feedback(): rules=[("obsm4-via4", "ILLEGAL_OVERLAP")], description="Illegal overlap between obsm4 and via4 (types do not connect)", bounding_boxes=[ - ( + BoundingBox( Decimal("11139.90"), Decimal("4437.90"), Decimal("11151.70"), Decimal("4449.70"), ), - ( + BoundingBox( Decimal("11139.90"), Decimal("4421.90"), Decimal("11151.70"), Decimal("4433.70"), ), - ( + BoundingBox( Decimal("11139.90"), Decimal("4412.80"), Decimal("11151.70"), @@ -262,31 +262,31 @@ def test_magic_feedback(): rules=[("UNKNOWN", "UNKNOWN2")], description="device missing 1 terminal;\n connecting remainder to node VGND", bounding_boxes=[ - ( + BoundingBox( Decimal("8232.15"), Decimal("8080.15"), Decimal("8238.05"), Decimal("8085.65"), ), - ( + BoundingBox( Decimal("8204.55"), Decimal("8080.15"), Decimal("8224.25"), Decimal("8085.65"), ), - ( + BoundingBox( Decimal("8186.15"), Decimal("8035.95"), Decimal("8215.05"), Decimal("8041.45"), ), - ( + BoundingBox( Decimal("8149.35"), Decimal("8080.15"), Decimal("8196.65"), Decimal("8085.65"), ), - ( + BoundingBox( Decimal("393.75"), Decimal("8025.75"), Decimal("404.25"), @@ -298,31 +298,31 @@ def test_magic_feedback(): rules=[("UNKNOWN", "UNKNOWN3")], description="device missing 1 terminal;\n connecting remainder to node VPWR", bounding_boxes=[ - ( + BoundingBox( Decimal("8232.15"), Decimal("8063.15"), Decimal("8238.05"), Decimal("8071.85"), ), - ( + BoundingBox( Decimal("8204.55"), Decimal("8063.15"), Decimal("8224.25"), Decimal("8071.85"), ), - ( + BoundingBox( Decimal("8186.15"), Decimal("8049.75"), Decimal("8215.05"), Decimal("8058.45"), ), - ( + BoundingBox( Decimal("8149.35"), Decimal("8063.15"), Decimal("8196.65"), Decimal("8071.85"), ), - ( + BoundingBox( Decimal("393.75"), Decimal("8008.75"), Decimal("404.25"),