diff --git a/flake.lock b/flake.lock index 06fcfc675..bac293ac1 100644 --- a/flake.lock +++ b/flake.lock @@ -142,16 +142,16 @@ "volare": "volare" }, "locked": { - "lastModified": 1719911213, - "narHash": "sha256-rd4nqjpwNwqcpKGMx6QN6cX/2MjVt24I5CL9/QE45iM=", + "lastModified": 1722786339, + "narHash": "sha256-eU9EXz2QaLegqwp1NUod7eyOLoA8nry+2h69avqd5TU=", "owner": "efabless", "repo": "openlane2", - "rev": "315e8a220fc7327c4d146b9101b5dc5325862d58", + "rev": "129fc2211fd6e51d6a6e899ff010d6ae675739ee", "type": "github" }, "original": { "owner": "efabless", - "ref": "dev", + "ref": "2.1.1", "repo": "openlane2", "type": "github" } diff --git a/flake.nix b/flake.nix index e25e3b57f..0e1d7d558 100644 --- a/flake.nix +++ b/flake.nix @@ -22,7 +22,7 @@ }; inputs = { - openlane2.url = github:efabless/openlane2/dev; + openlane2.url = github:efabless/openlane2/2.1.1; }; outputs = { @@ -50,9 +50,15 @@ }; openroad = pkgs.openroad.override { # openroad-rev-sha + # https://github.com/The-OpenROAD-Project/OpenROAD/discussions/4743 openroad-abc = self.openroad-abc; opensta = self.opensta; }; + magic = pkgs.magic.override { + # https://github.com/RTimothyEdwards/magic/issues/317 + rev = "8.3.478"; + sha256 = "sha256-aFFKbSqIgpkYjFZfpW3C52N1yQc5+KiLyf5jC16K5UU="; + }; openlane1 = callPythonPackage ./default.nix {}; default = self.openlane1; } @@ -63,13 +69,5 @@ }); in self); - - # devShells = self.forAllSystems ( - # pkgs: let - # callPackage = pkgs.lib.callPackageWith (pkgs // self.packages.${pkgs.system}); - # callPythonPackage = pkgs.lib.callPackageWith (pkgs // pkgs.python3.pkgs // self.packages.${pkgs.system}); - # in rec { - # } - # ); }; } diff --git a/scripts/odbpy/defutil.py b/scripts/odbpy/defutil.py index d1d376702..f2a8edf26 100644 --- a/scripts/odbpy/defutil.py +++ b/scripts/odbpy/defutil.py @@ -87,10 +87,7 @@ def merge_components(reader, donor_def, input_lef): def move_diearea(target_db, input_lef, template_def): - source_db = odb.dbDatabase.create() - - odb.read_lef(source_db, input_lef) - odb.read_def(source_db.getTech(), template_def) + source_db = OdbReader(input_lef, template_def).db assert ( source_db.getTech().getManufacturingGrid() @@ -164,9 +161,7 @@ def relocate_pins(db, input_lef, template_def): # -------------------------------- # 2. Read the donor def # -------------------------------- - template_db = odb.dbDatabase.create() - odb.read_lef(template_db, input_lef) - odb.read_def(template_db.getTech(), template_def) + template_db = OdbReader(input_lef, template_def).db template_bterms = template_db.getChip().getBlock().getBTerms() assert ( diff --git a/scripts/odbpy/reader.py b/scripts/odbpy/reader.py index aec97eaaa..23afc2f50 100644 --- a/scripts/odbpy/reader.py +++ b/scripts/odbpy/reader.py @@ -28,8 +28,7 @@ class OdbReader(object): def __init__(self, *args): if primary := OdbReader.primary_reader: - self.db = odb.dbDatabase.create() - self.db.setLogger(primary.design.getLogger()) + self.db = primary.design.createDetachedDb() else: self.ord_tech = Tech() self.design = Design(self.ord_tech) diff --git a/tests/1007-buffer_insertion/hooks/post_run.py b/tests/1007-buffer_insertion/hooks/post_run.py index 0536860b2..d9ddd7caa 100644 --- a/tests/1007-buffer_insertion/hooks/post_run.py +++ b/tests/1007-buffer_insertion/hooks/post_run.py @@ -14,8 +14,11 @@ import os import odb +from openroad import Tech, Design -db = odb.dbDatabase.create() +ord_tech = Tech() +design = Design(ord_tech) +db = ord_tech.getDB() odb.read_db(db, os.getenv("CURRENT_ODB")) instances = db.getChip().getBlock().getInsts() buffers = [ diff --git a/tests/1413-odb_remover/hooks/post_run.py b/tests/1413-odb_remover/hooks/post_run.py index 722c659f7..55d8fc6cf 100644 --- a/tests/1413-odb_remover/hooks/post_run.py +++ b/tests/1413-odb_remover/hooks/post_run.py @@ -14,8 +14,11 @@ import os import odb +from openroad import Tech, Design -db = odb.dbDatabase.create() +ord_tech = Tech() +design = Design(ord_tech) +db = ord_tech.getDB() odb.read_db(db, os.getenv("CURRENT_ODB")) nets = db.getChip().getBlock().getNets() pins = db.getChip().getBlock().getBTerms() diff --git a/tests/__main__.py b/tests/__main__.py index 02d12beb7..c69c9b851 100755 --- a/tests/__main__.py +++ b/tests/__main__.py @@ -124,7 +124,7 @@ def run_test_case(test_case): result = subprocess.Popen( [ - "flow.tcl", + os.path.join(openlane_root, "flow.tcl"), "-design", test_case, "-verbose",