From ed4c0653e2f6c4d395429f8a8fa857e57bb31fa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Harboe?= Date: Sat, 23 May 2026 13:06:20 +0200 Subject: [PATCH] bazel-orfs: bump to 6ebadeb (yosys/abc 0.64 via custom registry) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Picks up the Kogge-Stone adder memory corruption fix in yosys 0.64 that triggered ABC SIGSEGVs under yosys 0.63 + abc 0.62-yosyshq. - Bump BAZEL_ORFS_COMMIT to 6ebadeb, which moves yosys to 0.64. - Drop the vendored render_gds PDK_CONFIGS patch and the now-empty patches/bazel-orfs/ directory: the fix landed upstream in bazel-orfs commit bfd3a1d ("render_gds: monkey-patch PDK_CONFIGS instead of gdsii_use_custom_config"), so the patches= argument and its sole entry are no longer needed. - Mirror bazel-orfs/.bazelrc's --registry= lines into root .bazelrc so yosys 0.64 resolves from the unmerged BCR PR (bazelbuild/bazel- central-registry#8862) fork until that PR lands. ORFS has its own .bazelrc, so bazel-orfs's lines don't propagate automatically. - abc 0.64-yosyshq.bcr.1 is already on official BCR; only yosys 0.64 requires the fallback registry. Local test: bazelisk test //flow/designs/asap7/... --keep_going: mock-alu (kogge-stone exerciser) PASSES with yosys/abc 0.64. Co-Authored-By: Claude Opus 4.7 (1M context) Signed-off-by: Øyvind Harboe --- .bazelrc | 10 ++++ MODULE.bazel | 11 +---- ..._CONFIGS-not-gdsii_use_custom_config.patch | 49 ------------------- patches/bazel-orfs/BUILD.bazel | 8 --- 4 files changed, 11 insertions(+), 67 deletions(-) delete mode 100644 patches/bazel-orfs/0001-render_gds-monkey-patch-PDK_CONFIGS-not-gdsii_use_custom_config.patch delete mode 100644 patches/bazel-orfs/BUILD.bazel diff --git a/.bazelrc b/.bazelrc index b5d97b6598..1d550b988f 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,3 +1,13 @@ +# yosys 0.64 is not yet in BCR; add the unmerged PR's fork as a fallback +# registry until bazelbuild/bazel-central-registry#8862 lands. BCR is +# listed first so all other modules resolve from the official source; +# the fork is only consulted for modules/versions BCR doesn't carry yet. +# The commit hash makes the fork reference immutable. Mirrors what +# bazel-orfs/.bazelrc does upstream — ORFS root has its own .bazelrc so +# the upstream lines don't propagate automatically. +common --registry=https://bcr.bazel.build/ +common --registry=https://raw.githubusercontent.com/oharboe/bazel-central-registry/0586b398db6edd245da97cbec29e26c5e2a808d7/ + build --incompatible_strict_action_env build --cxxopt "-std=c++20" --host_cxxopt "-std=c++20" diff --git a/MODULE.bazel b/MODULE.bazel index 126de82d6f..1d21ea2f79 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -36,23 +36,14 @@ git_override( bazel_dep(name = "bazel-orfs", dev_dependency = True) bazel_dep(name = "bazel-orfs-verilog", dev_dependency = True) -BAZEL_ORFS_COMMIT = "3a5ddd7eb48c363717e65903ae4573d528327fd3" +BAZEL_ORFS_COMMIT = "6ebadeb4be5c9ada103081c9a5e668c014126616" BAZEL_ORFS_REMOTE = "https://github.com/The-OpenROAD-Project/bazel-orfs.git" # To bump version, run: bazelisk run @bazel-orfs//:bump -# -# `patches =` keeps small bazel-orfs fixes vendored in this repo while -# we iterate, instead of round-tripping every change through a -# bazel-orfs PR + pin bump. When a patch lands upstream, drop the -# entry here and bump BAZEL_ORFS_COMMIT. git_override( module_name = "bazel-orfs", commit = BAZEL_ORFS_COMMIT, - patch_strip = 1, - patches = [ - "//patches/bazel-orfs:0001-render_gds-monkey-patch-PDK_CONFIGS-not-gdsii_use_custom_config.patch", - ], remote = BAZEL_ORFS_REMOTE, ) diff --git a/patches/bazel-orfs/0001-render_gds-monkey-patch-PDK_CONFIGS-not-gdsii_use_custom_config.patch b/patches/bazel-orfs/0001-render_gds-monkey-patch-PDK_CONFIGS-not-gdsii_use_custom_config.patch deleted file mode 100644 index c67b99cffa..0000000000 --- a/patches/bazel-orfs/0001-render_gds-monkey-patch-PDK_CONFIGS-not-gdsii_use_custom_config.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 0010e181efa28210dbf7839e6e6131139cc705bd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=C3=98yvind=20Harboe?= -Date: Mon, 18 May 2026 00:06:14 +0200 -Subject: [PATCH] render_gds: monkey-patch PDK_CONFIGS instead of - gdsii_use_custom_config - -The addon's gdsii_use_custom_config=True branch in import_gdsii skips -initialising pdk_info and addon_dir, both of which are still used a -few lines later to resolve color_path -- so any non-default -layerstack YAML trips UnboundLocalError inside the addon. - -Patch the addon's PDK_CONFIGS dict at runtime instead, pointing the -selected PDK's config_path entry at our trimmed YAML. The else -branch then fires normally, pdk_info is set, color_path resolves, -and Path's absolute-RHS semantic makes addon_dir / Path(abs_path) -evaluate to the absolute path. ---- - tools/blendergds/render_gds.py | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/tools/blendergds/render_gds.py b/tools/blendergds/render_gds.py -index cbe116c..b53da1e 100644 ---- a/tools/blendergds/render_gds.py -+++ b/tools/blendergds/render_gds.py -@@ -289,11 +289,19 @@ def main(): - # in seconds rather than 5-7 minutes + 16 GB RSS. No-op for - # PDKs without a preset and for designs whose full stack is - # already small enough. -+ # We can't go through the addon's `gdsii_use_custom_config = True` -+ # path: that branch in `import_gdsii` skips initialising -+ # `pdk_info` and `addon_dir`, both of which are still used -+ # afterwards to resolve `color_path` -- so a custom YAML trips -+ # `UnboundLocalError: pdk_info` inside the addon. Instead, -+ # monkey-patch PDK_CONFIGS[pdk]['config_path'] to point at the -+ # trimmed YAML (absolute path -- `addon_dir / Path("/abs")` -+ # evaluates to the absolute path in pathlib, so the else branch -+ # in the addon picks it up correctly). - trimmed = _trim_layerstack(addon, addon_root, args.pdk, tmp) - if trimmed is not None: - yaml_path, kept_layers, missing = trimmed -- bpy.context.scene.gdsii_use_custom_config = True -- bpy.context.scene.gdsii_config_path = str(yaml_path) -+ addon.PDK_CONFIGS.setdefault(args.pdk, {})["config_path"] = str(yaml_path) - _log_phase( - "layerstack-trimmed", - extra=( --- -2.51.0 - diff --git a/patches/bazel-orfs/BUILD.bazel b/patches/bazel-orfs/BUILD.bazel deleted file mode 100644 index d5bfbcbe26..0000000000 --- a/patches/bazel-orfs/BUILD.bazel +++ /dev/null @@ -1,8 +0,0 @@ -"""Vendored patches applied on top of the bazel-orfs git_override pin. - -These are small fixes we keep here to reduce churn while iterating; -when they land upstream, drop the entry from MODULE.bazel and bump -BAZEL_ORFS_COMMIT instead. -""" - -exports_files(glob(["*.patch"]))