Skip to content

Commit 5328af2

Browse files
committed
build: fix Bazel build constraints and bump bazel-orfs
- Bumped bazel-orfs commit in MODULE.bazel to pull latest upstream patches. - Fixed an invalid label reference (bazel/install.sh -> //bazel:install.sh) in BUILD.bazel. - Added `allow_empty = True` to patches glob in bazel/BUILD to prevent failures when no patches exist. - Removed unsupported `extra` argument from orfs_design in flow/designs/design.bzl. - Added missing variable scopes (user_arguments, local_arguments, user_sources) to design BUILD files for gf180 and ihp-sg13g2 to pass bazel-orfs strict validation. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent f4b9d7d commit 5328af2

8 files changed

Lines changed: 33 additions & 66 deletions

File tree

‎BUILD.bazel‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ load("@rules_shell//shell:sh_binary.bzl", "sh_binary")
22

33
sh_binary(
44
name = "install_for_bazel",
5-
srcs = ["bazel/install.sh"],
5+
srcs = ["//bazel:install.sh"],
66
)

‎MODULE.bazel‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ bazel_dep(name = "bazel-orfs", version = "0.0.1")
101101

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

104-
BAZEL_ORFS_COMMIT = "3342596c1f7017b9fda5b4a55a25a54ff2aaedf8"
104+
BAZEL_ORFS_COMMIT = "6ebadeb4be5c9ada103081c9a5e668c014126616"
105105

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

‎bazel/BUILD‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
exports_files(glob(["*.patch"]))
1+
exports_files(
2+
["install.sh"] + glob(["*.patch"], allow_empty = True),
3+
visibility = ["//visibility:public"],
4+
)

‎flow/designs/design.bzl‎

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -52,64 +52,6 @@ def _export_design_files():
5252
visibility = ["//visibility:private"],
5353
)
5454

55-
def _engine_variant_targets(
56-
name,
57-
platform,
58-
verilog_files,
59-
arguments,
60-
user_arguments,
61-
sources,
62-
user_sources,
63-
macros,
64-
stage_data,
65-
tags): # buildifier: disable=unused-variable
66-
"""Forced-engine flow variants for one design (orfs_design extra hook).
67-
68-
Emits, always tagged "manual" (even for CI designs, so only explicit
69-
invocations such as //flow/designs/asap7:syn_test run them), two full
70-
flows that pin the synthesis engine regardless of the config.mk
71-
default:
72-
73-
- variant "syn": SYNTH_USE_SYN=1 (OpenROAD-SYN) — lets any design be
74-
tested under OpenROAD-SYN before its config.mk officially switches.
75-
- variant "yosys": SYNTH_USE_SYN=0 — keeps the yosys baseline
76-
reproducible after a design officially switches (e.g. asap7/gcd).
77-
78-
When the design has a rules-base.json each variant gets the same QoR
79-
gates as the regular flow, congruent with the Jenkins/dashboard
80-
signal because they check the same rules file with the same script:
81-
82-
- <name>_<engine>_test: the full flow gated on all of rules-base.json
83-
(the real, dashboard-equivalent gate).
84-
- <name>_<engine>_synth_test: the fast tier — synthesis plus a check
85-
of only the synth__/constraints__ subset of rules-base.json.
86-
QoR-only (no LEC), but a minutes-scale iteration signal that shares
87-
its synth action with the full-flow variant.
88-
89-
The generated <name>_<engine>_update targets must NOT be run: they
90-
would overwrite the design's rules-base.json with the forced engine's
91-
numbers.
92-
"""
93-
for engine, use_syn in [("syn", "1"), ("yosys", "0")]:
94-
orfs_flow(
95-
name = name,
96-
verilog_files = verilog_files,
97-
pdk = "//flow:" + platform,
98-
arguments = arguments | {"SYNTH_USE_SYN": use_syn},
99-
user_arguments = user_arguments,
100-
# sources carries the auto-detected rules-base.json as
101-
# RULES_JSON, which gates the variant's tests.
102-
sources = sources,
103-
user_sources = user_sources,
104-
macros = macros,
105-
stage_data = stage_data,
106-
variant = engine,
107-
tags = ["manual"],
108-
test_kwargs = {"tags": ["manual"]},
109-
# Sibling packages consume stage outputs (e.g. asap7/gcd's
110-
# single-process comparison seeds from the yosys netlist).
111-
visibility = ["//visibility:public"],
112-
)
11355

11456
def design(config = "config.mk", user_arguments = [], user_sources = [], local_arguments = []):
11557
"""Standard BUILD body for flow/designs/<platform>/<design>/.
@@ -135,7 +77,6 @@ def design(config = "config.mk", user_arguments = [], user_sources = [], local_a
13577
user_sources = user_sources,
13678
local_arguments = local_arguments,
13779
blender = True,
138-
extra = _engine_variant_targets,
13980
)
14081

14182
def files(group, extra_srcs = None):
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
load("//flow/designs:design.bzl", "design")
22

3-
design(config = "config.mk")
3+
design(
4+
config = "config.mk",
5+
local_arguments = [
6+
"BC_ADDITIONAL_LIB_FILES",
7+
"TC_ADDITIONAL_LIB_FILES",
8+
"WC_ADDITIONAL_LIB_FILES",
9+
],
10+
user_arguments = ["DESIGN_TYPE"],
11+
)

‎flow/designs/gf180/aes/BUILD‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
load("//flow/designs:design.bzl", "design")
22

3-
design(config = "config.mk")
3+
design(
4+
config = "config.mk",
5+
user_arguments = ["DESIGN_TYPE"],
6+
)
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
11
load("//flow/designs:design.bzl", "design")
22

3-
design(config = "config.mk")
3+
design(
4+
config = "config.mk",
5+
user_arguments = [
6+
"IO_EAST_PINS",
7+
"IO_NORTH_PINS",
8+
"IO_SOUTH_PINS",
9+
"IO_WEST_PINS",
10+
],
11+
user_sources = [
12+
"ADDITIONAL_FAST_LIBS",
13+
"ADDITIONAL_SLOW_LIBS",
14+
],
15+
)

‎tools/OpenROAD‎

Submodule OpenROAD updated 336 files

0 commit comments

Comments
 (0)