Skip to content

Commit 2bdc815

Browse files
committed
Merge branch 'upstream-master' into signoff-single-commit
2 parents c1ae0cd + a8b85cd commit 2bdc815

275 files changed

Lines changed: 2259 additions & 4694 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.bazelignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ jenkins/
66
docs/
77

88

9+
tmp

.bazelrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
11
build --incompatible_strict_action_env
2+
build --cxxopt "-std=c++20" --host_cxxopt "-std=c++20"
3+
4+
# Don't track MODULE.bazel.lock. Resolved versions ride along with the
5+
# pinned BCR + git_override(commit=…) coordinates in MODULE.bazel and
6+
# downstream cache hits are what we actually care about. Tracking the
7+
# lockfile just means every bazel-orfs / yosys / openroad bump produces
8+
# a 1000-line lock diff that buries the real change. Matches what
9+
# bazel-orfs itself does (its own .bazelrc:7).
10+
common --lockfile_mode=off
11+
212
try-import %workspace%/user.bazelrc

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ bazel-bin
102102
bazel-out
103103
bazel-OpenROAD-flow-scripts
104104
bazel-testlogs
105+
MODULE.bazel.lock
105106

106107
# python venv
107108
venv/
109+
tmp/

MODULE.bazel

Lines changed: 109 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,92 @@ module(
55
version = "0.0.1",
66
)
77

8-
bazel_dep(name = "bazel-orfs")
8+
# --- Regular dependencies (propagated to downstream consumers) ---
9+
10+
bazel_dep(name = "rules_python", version = "1.8.5")
11+
bazel_dep(name = "rules_shell", version = "0.6.1")
12+
13+
# --- Dev dependencies (only honoured when @orfs is the root module) ---
14+
#
15+
# When @orfs is consumed as a non-root dep (e.g. by tools/OpenROAD), the
16+
# downstream module brings its own openroad/qt-bazel/bazel-orfs/yosys-slang
17+
# pins and orfs.default() configuration. Marking everything below as
18+
# dev_dependency = True makes those declarations no-ops in that case, so
19+
# our MODULE.bazel doesn't need to be patched at non-root consumption
20+
# time.
21+
22+
bazel_dep(name = "toolchains_llvm", version = "1.5.0", dev_dependency = True)
23+
bazel_dep(name = "openroad", dev_dependency = True)
24+
local_path_override(
25+
module_name = "openroad",
26+
path = "tools/OpenROAD",
27+
)
28+
29+
bazel_dep(name = "qt-bazel", dev_dependency = True)
30+
git_override(
31+
module_name = "qt-bazel",
32+
commit = "886104974c2fd72439f2c33b5deebf0fe4649df7",
33+
remote = "https://github.com/The-OpenROAD-Project/qt_bazel_prebuilts",
34+
)
35+
36+
bazel_dep(name = "bazel-orfs", dev_dependency = True)
37+
bazel_dep(name = "bazel-orfs-verilog", dev_dependency = True)
38+
39+
BAZEL_ORFS_COMMIT = "3a5ddd7eb48c363717e65903ae4573d528327fd3"
40+
41+
BAZEL_ORFS_REMOTE = "https://github.com/The-OpenROAD-Project/bazel-orfs.git"
942

1043
# To bump version, run: bazelisk run @bazel-orfs//:bump
44+
#
45+
# `patches =` keeps small bazel-orfs fixes vendored in this repo while
46+
# we iterate, instead of round-tripping every change through a
47+
# bazel-orfs PR + pin bump. When a patch lands upstream, drop the
48+
# entry here and bump BAZEL_ORFS_COMMIT.
1149
git_override(
1250
module_name = "bazel-orfs",
13-
commit = "f8a4b694b37c8f5322323eba9a9ae37f9541ee17",
14-
remote = "https://github.com/The-OpenROAD-Project/bazel-orfs.git",
51+
commit = BAZEL_ORFS_COMMIT,
52+
patch_strip = 1,
53+
patches = [
54+
"//patches/bazel-orfs:0001-render_gds-monkey-patch-PDK_CONFIGS-not-gdsii_use_custom_config.patch",
55+
],
56+
remote = BAZEL_ORFS_REMOTE,
1557
)
1658

17-
bazel_dep(name = "rules_python", version = "1.8.5")
18-
bazel_dep(name = "rules_shell", version = "0.6.1")
59+
git_override(
60+
module_name = "bazel-orfs-verilog",
61+
commit = BAZEL_ORFS_COMMIT,
62+
remote = BAZEL_ORFS_REMOTE,
63+
strip_prefix = "verilog",
64+
)
65+
66+
# yosys-slang is not on BCR. Pin to a commit on povik/yosys-slang master
67+
# that has the upstream Bazel build (povik/yosys-slang#310) and the
68+
# slang.so visibility fix (povik/yosys-slang#311). Submodules pull in
69+
# vendored slang and fmt sources.
70+
bazel_dep(name = "yosys-slang", dev_dependency = True)
71+
git_override(
72+
module_name = "yosys-slang",
73+
commit = "7753ea70431d85929292b90c33b32f6dbdb3b048",
74+
init_submodules = True,
75+
remote = "https://github.com/povik/yosys-slang.git",
76+
)
77+
78+
# --- Extensions ---
79+
80+
llvm = use_extension(
81+
"@toolchains_llvm//toolchain/extensions:llvm.bzl",
82+
"llvm",
83+
dev_dependency = True,
84+
)
85+
llvm.toolchain(
86+
llvm_version = "20.1.8",
87+
)
88+
use_repo(llvm, "llvm_toolchain")
89+
90+
register_toolchains(
91+
"@llvm_toolchain//:all",
92+
dev_dependency = True,
93+
)
1994

2095
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
2196
python.toolchain(
@@ -31,16 +106,33 @@ pip.parse(
31106
)
32107
use_repo(pip, "orfs-pip")
33108

34-
orfs = use_extension("@bazel-orfs//:extension.bzl", "orfs_repositories")
35-
36-
# To bump version, run: bazelisk run @bazel-orfs//:bump
109+
orfs = use_extension(
110+
"@bazel-orfs//:extension.bzl",
111+
"orfs_repositories",
112+
dev_dependency = True,
113+
)
37114
orfs.default(
38-
image = "docker.io/openroad/orfs:v3.0-3273-gedf3d6bf",
39-
# Use local files instead of docker image
40-
makefile = "//flow:makefile",
41-
makefile_yosys = "//flow:makefile_yosys",
42-
pdk = "//flow:asap7",
43-
sha256 = "f5692c6325ebcf27cc348e033355ec95c82c35ace1af7e72a0d352624ada143e",
44-
)
45-
use_repo(orfs, "com_github_nixos_patchelf_download")
46-
use_repo(orfs, "docker_orfs")
115+
# Expose the yosys-slang plugin via YOSYS_PLUGIN_PATH so
116+
# SYNTH_HDL_FRONTEND=slang works for ibex, cva6, uart, etc.
117+
yosys_plugins = ["@yosys-slang//src/yosys_plugin:slang.so"],
118+
)
119+
use_repo(orfs, "config")
120+
use_repo(orfs, "gnumake")
121+
use_repo(orfs, "orfs_variable_metadata")
122+
123+
# Auto-generate orfs_flow() targets from config.mk files.
124+
# See flow/README.md for usage.
125+
orfs_designs = use_repo_rule("@bazel-orfs//private:designs.bzl", "orfs_designs")
126+
127+
orfs_designs(
128+
name = "orfs_designs",
129+
designs_dir = "//flow/designs:BUILD",
130+
platforms = [
131+
"asap7",
132+
"gf180",
133+
"ihp-sg13g2",
134+
"nangate45",
135+
"sky130hd",
136+
"sky130hs",
137+
],
138+
)

0 commit comments

Comments
 (0)