Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
dfa4265
build: add bazel-orfs beta test for design builds
oharboe May 4, 2026
2d101cf
fix: address Gemini review feedback on PR #4208
oharboe May 4, 2026
17bdae5
docs: regenerate variables.json and FlowVariables.md
oharboe May 4, 2026
9dbec6e
docs: condense bazel-orfs.md
oharboe May 4, 2026
53c6836
build: bazelignore gf12 and gf55 design dirs
oharboe May 4, 2026
f578318
fix: drop gf12/gf55 entries from .bazelignore
oharboe May 4, 2026
32f10a8
build: factor out BUILD.bazel boilerplate via flow/designs/design.bzl
oharboe May 4, 2026
5ac403f
build: drop design-specific entries from variables.yaml
oharboe May 4, 2026
375865f
build: drop unused entries
oharboe May 4, 2026
bb0438e
tmp: ignore
oharboe May 4, 2026
e65643e
build: revert unintended rules-base.json changes
oharboe May 4, 2026
19f6278
build: patch bazel-orfs to register injected SYNTH_NUM_PARTITIONS
oharboe May 4, 2026
8ef0408
nangate45: drop dead PLACE_DENSITY_MAX_POST_HOLD from bp_fe_top
oharboe May 4, 2026
2039457
build: patch bazel-orfs synth_partition SYNTH_SKIP_KEEP truthy check
oharboe May 4, 2026
ad76a84
build: patch bazel-orfs synth_partition kept_modules.json parse
oharboe May 5, 2026
eade390
build: mark non-propagated MODULE.bazel decls as dev_dependency
oharboe May 5, 2026
66dc514
build: register VERILOG_FILES_BLACKBOX in variables.yaml
oharboe May 5, 2026
5adb017
build: add user_arguments to orfs_design (patch + chameleon usage)
oharboe May 5, 2026
5d36873
nangate45: bump finish__timing__setup__tns thresholds for openroad bump
oharboe May 5, 2026
a40c139
build: patch yosys 0.62 with the Tcl 9 use-after-free fix from main
oharboe May 5, 2026
ca2aac1
Merge remote-tracking branch 'origin/master' into bazel-orfs-beta-test
oharboe May 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ jenkins/
docs/


tmp
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
build --incompatible_strict_action_env
build --cxxopt "-std=c++20" --host_cxxopt "-std=c++20"
try-import %workspace%/user.bazelrc
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,4 @@ bazel-testlogs

# python venv
venv/
tmp/
136 changes: 119 additions & 17 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,102 @@ module(
version = "0.0.1",
)

bazel_dep(name = "bazel-orfs")
# --- Regular dependencies (propagated to downstream consumers) ---

bazel_dep(name = "rules_python", version = "1.8.5")
bazel_dep(name = "rules_shell", version = "0.6.1")

# --- Dev dependencies (only honoured when @orfs is the root module) ---
#
# When @orfs is consumed as a non-root dep (e.g. by tools/OpenROAD), the
# downstream module brings its own openroad/qt-bazel/bazel-orfs/yosys-slang
# pins and orfs.default() configuration. Marking everything below as
# dev_dependency = True makes those declarations no-ops in that case, so
# our MODULE.bazel doesn't need to be patched at non-root consumption
# time.

bazel_dep(name = "toolchains_llvm", version = "1.5.0", dev_dependency = True)

bazel_dep(name = "openroad", dev_dependency = True)
local_path_override(
module_name = "openroad",
path = "tools/OpenROAD",
)

bazel_dep(name = "qt-bazel", dev_dependency = True)
git_override(
module_name = "qt-bazel",
commit = "886104974c2fd72439f2c33b5deebf0fe4649df7",
remote = "https://github.com/The-OpenROAD-Project/qt_bazel_prebuilts",
)

bazel_dep(name = "bazel-orfs", dev_dependency = True)
bazel_dep(name = "bazel-orfs-verilog", dev_dependency = True)

BAZEL_ORFS_COMMIT = "78f19f25cec73bdec3517a76465dec7ce17ce227"

BAZEL_ORFS_REMOTE = "https://github.com/The-OpenROAD-Project/bazel-orfs.git"

# To bump version, run: bazelisk run @bazel-orfs//:bump
git_override(
module_name = "bazel-orfs",
commit = "f8a4b694b37c8f5322323eba9a9ae37f9541ee17",
remote = "https://github.com/The-OpenROAD-Project/bazel-orfs.git",
commit = BAZEL_ORFS_COMMIT,
patch_strip = 1,
patches = [
"//bazel/bazel-orfs-patches:0001-stages-register-bazel-injected-vars-in-validator.patch",
"//bazel/bazel-orfs-patches:0002-synth_partition-fix-SYNTH_SKIP_KEEP-truthy-check.patch",
"//bazel/bazel-orfs-patches:0003-synth_partition-parse-kept_modules-json-without-greedy-sed.patch",
"//bazel/bazel-orfs-patches:0004-orfs_design-forward-user_arguments-to-orfs_flow.patch",
],
remote = BAZEL_ORFS_REMOTE,
)

bazel_dep(name = "rules_python", version = "1.8.5")
bazel_dep(name = "rules_shell", version = "0.6.1")
git_override(
module_name = "bazel-orfs-verilog",
commit = BAZEL_ORFS_COMMIT,
remote = BAZEL_ORFS_REMOTE,
strip_prefix = "verilog",
)

# yosys-slang is not on BCR. Pin to a commit on povik/yosys-slang master
# that has the upstream Bazel build (povik/yosys-slang#310) and the
# slang.so visibility fix (povik/yosys-slang#311). Submodules pull in
# vendored slang and fmt sources.
bazel_dep(name = "yosys-slang", dev_dependency = True)
git_override(
module_name = "yosys-slang",
commit = "7753ea70431d85929292b90c33b32f6dbdb3b048",
init_submodules = True,
remote = "https://github.com/povik/yosys-slang.git",
)

# YosysHQ/yosys 167c6c4 ("Replace deprecated Tcl API to fix use-after-free")
# fixes a Tcl 9 use-after-free in rtlil::get_attr/get_param that produces
# corrupted module names like '\K B-W_KOGGE_STONE' during ORFS-style
# wrapcell flows. The fix is in yosys main but not yet in the BCR-tagged
# 0.62; carry it as a patch until the next release lands.
single_version_override(
module_name = "yosys",
patch_strip = 1,
patches = [
"//bazel/yosys-patches:0001-Replace-deprecated-Tcl-API-to-fix-use-after-free.patch",
],
version = "0.62.bcr.2",
)

# --- Extensions ---

llvm = use_extension(
"@toolchains_llvm//toolchain/extensions:llvm.bzl",
"llvm",
dev_dependency = True,
)
llvm.toolchain(
llvm_version = "20.1.8",
)
use_repo(llvm, "llvm_toolchain")

register_toolchains("@llvm_toolchain//:all", dev_dependency = True)

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
Expand All @@ -31,16 +116,33 @@ pip.parse(
)
use_repo(pip, "orfs-pip")

orfs = use_extension("@bazel-orfs//:extension.bzl", "orfs_repositories")

# To bump version, run: bazelisk run @bazel-orfs//:bump
orfs = use_extension(
"@bazel-orfs//:extension.bzl",
"orfs_repositories",
dev_dependency = True,
)
orfs.default(
image = "docker.io/openroad/orfs:v3.0-3273-gedf3d6bf",
# Use local files instead of docker image
makefile = "//flow:makefile",
makefile_yosys = "//flow:makefile_yosys",
pdk = "//flow:asap7",
sha256 = "f5692c6325ebcf27cc348e033355ec95c82c35ace1af7e72a0d352624ada143e",
)
use_repo(orfs, "com_github_nixos_patchelf_download")
use_repo(orfs, "docker_orfs")
# Expose the yosys-slang plugin via YOSYS_PLUGIN_PATH so
# SYNTH_HDL_FRONTEND=slang works for ibex, cva6, uart, etc.
yosys_plugins = ["@yosys-slang//src/yosys_plugin:slang.so"],
)
use_repo(orfs, "config")
use_repo(orfs, "gnumake")
use_repo(orfs, "orfs_variable_metadata")

# Auto-generate orfs_flow() targets from config.mk files.
# See bazel-orfs.md for usage.
orfs_designs = use_repo_rule("@bazel-orfs//private:designs.bzl", "orfs_designs")

orfs_designs(
name = "orfs_designs",
designs_dir = "//flow/designs:BUILD.bazel",
platforms = [
"asap7",
"gf180",
"ihp-sg13g2",
"nangate45",
"sky130hd",
"sky130hs",
],
)
Loading