Skip to content

Orfs design fixes#720

Merged
oharboe merged 3 commits into
mainfrom
orfs-design-fixes
May 11, 2026
Merged

Orfs design fixes#720
oharboe merged 3 commits into
mainfrom
orfs-design-fixes

Conversation

@oharboe
Copy link
Copy Markdown
Collaborator

@oharboe oharboe commented May 11, 2026

No description provided.

oharboe added 3 commits May 11, 2026 13:21
Mirror upstream ORFS PR #4208 so BUILD files can be a single line:

    load("@orfs_designs//:designs.bzl", "orfs_design")
    orfs_design(config = "config.mk")

The generated @orfs_designs//:designs.bzl now exposes a wrapper that
bakes in DESIGNS, so callers no longer need to load DESIGNS separately.
The underlying private orfs_design() still accepts designs= for the
existing @bazel-orfs//:openroad.bzl entry point.

Replaces native.exports_files(native.glob(["*"])) with a focused
design_config filegroup (*.mk, *.sdc, *.json, *.cfg, *.tcl, *.def)
and validates that the named config file exists in the package.

Ref: The-OpenROAD-Project/OpenROAD-flow-scripts#4208
Signed-off-by: Øyvind Harboe <[email protected]>
Mirror upstream ORFS PR #4208 (second bazel-orfs patch).

config.mk often defines local helpers used only for $(VAR) expansion
within the same file — e.g. VERILOG_FILES_BLACKBOX appearing verbatim
inside VERILOG_FILES.  These never get read by ORFS or by user .tcl/.mk,
so they shouldn't reach orfs_flow at all: passing them through either
fails variables.yaml validation or pollutes the per-stage env with
noise.

Add a local_arguments= list to orfs_design().  Names listed there are
dropped from both arguments and sources before orfs_flow() is invoked.

Ref: The-OpenROAD-Project/OpenROAD-flow-scripts#4208
Signed-off-by: Øyvind Harboe <[email protected]>
Two unit tests for the local-helper pattern that orfs_design()'s new
local_arguments= parameter targets:

- VERILOG_FILES_BLACKBOX routes to sources (not arguments), so the
  parser classifies it correctly as a SOURCE_VAR.
- $(VERILOG_FILES_BLACKBOX) inside VERILOG_FILES is resolved during
  parsing, so a single helper assignment can contribute files to the
  top-level verilog_files list.

These are the parser-side invariants that local_arguments= relies on
when it later drops the helper from arguments/sources before orfs_flow.

Signed-off-by: Øyvind Harboe <[email protected]>
oharboe added a commit to oharboe/OpenROAD-flow-scripts that referenced this pull request May 11, 2026
…eamed patches

bazel-orfs PR The-OpenROAD-Project/bazel-orfs#720
lands the two patches we were carrying as 0001/0002:

  - orfs_design() accepts config = "config.mk" explicitly and drops
    the blanket native.exports_files(native.glob(["*"]));
  - orfs_design() takes a local_arguments= list to drop config.mk
    helpers (e.g. VERILOG_FILES_BLACKBOX) before orfs_flow().

It also adds parser unit tests covering the VERILOG_FILES_BLACKBOX
pattern that local_arguments= targets.

Bump bazel-orfs to 717655415d (PR The-OpenROAD-Project#720 head) and drop both patches.
bazel/BUILD shrinks to a single exports_files(["install.sh"]) — the
only remaining reason for the package is making //bazel:install.sh
resolvable from //:install_for_bazel.

Verified: bazelisk test //flow/designs/asap7/gcd/... passes;
microwatt and chameleon (both consumers of local_arguments=) parse.

Signed-off-by: Øyvind Harboe <[email protected]>
@oharboe oharboe merged commit 603e34b into main May 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant