Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ load("@rules_shell//shell:sh_binary.bzl", "sh_binary")

sh_binary(
name = "install_for_bazel",
srcs = ["bazel/install.sh"],
srcs = ["//bazel:install.sh"],
)
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ bazel_dep(name = "bazel-orfs", version = "0.0.1")

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

BAZEL_ORFS_COMMIT = "3342596c1f7017b9fda5b4a55a25a54ff2aaedf8"
BAZEL_ORFS_COMMIT = "6ebadeb4be5c9ada103081c9a5e668c014126616"

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

Expand Down
5 changes: 4 additions & 1 deletion bazel/BUILD
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
exports_files(glob(["*.patch"]))
exports_files(
["install.sh"] + glob(["*.patch"], allow_empty = True),
visibility = ["//visibility:public"],
)
59 changes: 0 additions & 59 deletions flow/designs/design.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -52,64 +52,6 @@ def _export_design_files():
visibility = ["//visibility:private"],
)

def _engine_variant_targets(
name,
platform,
verilog_files,
arguments,
user_arguments,
sources,
user_sources,
macros,
stage_data,
tags): # buildifier: disable=unused-variable
"""Forced-engine flow variants for one design (orfs_design extra hook).

Emits, always tagged "manual" (even for CI designs, so only explicit
invocations such as //flow/designs/asap7:syn_test run them), two full
flows that pin the synthesis engine regardless of the config.mk
default:

- variant "syn": SYNTH_USE_SYN=1 (OpenROAD-SYN) — lets any design be
tested under OpenROAD-SYN before its config.mk officially switches.
- variant "yosys": SYNTH_USE_SYN=0 — keeps the yosys baseline
reproducible after a design officially switches (e.g. asap7/gcd).

When the design has a rules-base.json each variant gets the same QoR
gates as the regular flow, congruent with the Jenkins/dashboard
signal because they check the same rules file with the same script:

- <name>_<engine>_test: the full flow gated on all of rules-base.json
(the real, dashboard-equivalent gate).
- <name>_<engine>_synth_test: the fast tier — synthesis plus a check
of only the synth__/constraints__ subset of rules-base.json.
QoR-only (no LEC), but a minutes-scale iteration signal that shares
its synth action with the full-flow variant.

The generated <name>_<engine>_update targets must NOT be run: they
would overwrite the design's rules-base.json with the forced engine's
numbers.
"""
for engine, use_syn in [("syn", "1"), ("yosys", "0")]:
orfs_flow(
name = name,
verilog_files = verilog_files,
pdk = "//flow:" + platform,
arguments = arguments | {"SYNTH_USE_SYN": use_syn},
user_arguments = user_arguments,
# sources carries the auto-detected rules-base.json as
# RULES_JSON, which gates the variant's tests.
sources = sources,
user_sources = user_sources,
macros = macros,
stage_data = stage_data,
variant = engine,
tags = ["manual"],
test_kwargs = {"tags": ["manual"]},
# Sibling packages consume stage outputs (e.g. asap7/gcd's
# single-process comparison seeds from the yosys netlist).
visibility = ["//visibility:public"],
)

def design(config = "config.mk", user_arguments = [], user_sources = [], local_arguments = []):
"""Standard BUILD body for flow/designs/<platform>/<design>/.
Expand All @@ -135,7 +77,6 @@ def design(config = "config.mk", user_arguments = [], user_sources = [], local_a
user_sources = user_sources,
local_arguments = local_arguments,
blender = True,
extra = _engine_variant_targets,
Comment thread
oharboe marked this conversation as resolved.
Resolved
)

def files(group, extra_srcs = None):
Expand Down
10 changes: 9 additions & 1 deletion flow/designs/gf180/aes-hybrid/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
load("//flow/designs:design.bzl", "design")

design(config = "config.mk")
design(
config = "config.mk",
local_arguments = [
"BC_ADDITIONAL_LIB_FILES",
"TC_ADDITIONAL_LIB_FILES",
"WC_ADDITIONAL_LIB_FILES",
],
user_arguments = ["DESIGN_TYPE"],
)
5 changes: 4 additions & 1 deletion flow/designs/gf180/aes/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
load("//flow/designs:design.bzl", "design")

design(config = "config.mk")
design(
config = "config.mk",
user_arguments = ["DESIGN_TYPE"],
)
14 changes: 13 additions & 1 deletion flow/designs/ihp-sg13g2/i2c-gpio-expander/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
load("//flow/designs:design.bzl", "design")

design(config = "config.mk")
design(
config = "config.mk",
user_arguments = [
"IO_EAST_PINS",
"IO_NORTH_PINS",
"IO_SOUTH_PINS",
"IO_WEST_PINS",
],
user_sources = [
"ADDITIONAL_FAST_LIBS",
"ADDITIONAL_SLOW_LIBS",
],
)