Skip to content

bazel-orfs: bump and migrate to source-built tools#10216

Open
oharboe wants to merge 3 commits intoThe-OpenROAD-Project:masterfrom
oharboe:ditch-docker
Open

bazel-orfs: bump and migrate to source-built tools#10216
oharboe wants to merge 3 commits intoThe-OpenROAD-Project:masterfrom
oharboe:ditch-docker

Conversation

@oharboe
Copy link
Copy Markdown
Collaborator

@oharboe oharboe commented Apr 21, 2026

Upstream bazel-orfs dropped the @docker_orfs image extraction in favour of source-built tools (OpenROAD/OpenSTA from @openroad, yosys/abc from BCR, GNU Make from source) and gained a non-dev bazel_dep on the orfs module. Overrides declared in non-root modules are ignored, so mirror bazel-orfs's orfs git_override and the yosys single_version_override at root. Patches are copied into bazel/orfs-patches/ because git_override only accepts patches from the main repo.

BCR yosys 0.62 ships backends/aiger2/aiger.cc but doesn't compile it, so the internal write_xaiger2 call from abc_new.cc aborts synthesis. Add yosys-backend-aiger2.patch to wire backends/aiger2 into the yosys binary.

test/orfs references the asap7 stdcell dff.v/empty.v that used to come from @docker_orfs; copy them next to the existing per-test .v files.

One of the patches will clear up when The-OpenROAD-Project/OpenROAD-flow-scripts#4159 is merged

Upstream bazel-orfs dropped the @docker_orfs image extraction in favour
of source-built tools (OpenROAD/OpenSTA from @openroad, yosys/abc from
BCR, GNU Make from source) and gained a non-dev bazel_dep on the orfs
module. Overrides declared in non-root modules are ignored, so mirror
bazel-orfs's orfs git_override and the yosys single_version_override at
root. Patches are copied into bazel/orfs-patches/ because git_override
only accepts patches from the main repo.

BCR yosys 0.62 ships backends/aiger2/aiger.cc but doesn't compile it,
so the internal write_xaiger2 call from abc_new.cc aborts synthesis.
Add yosys-backend-aiger2.patch to wire backends/aiger2 into the yosys
binary.

test/orfs references the asap7 stdcell dff.v/empty.v that used to come
from @docker_orfs; copy them next to the existing per-test .v files.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request transitions the OpenROAD-flow-scripts (ORFS) integration from a Docker-based approach to a local dependency model. Key changes include adding the orfs module, updating bazel-orfs commits, and applying several patches to orfs and yosys to manage overrides and visibility. Additionally, test configurations were updated to reference local Verilog files instead of Docker-hosted ones. Feedback was provided regarding an inconsistency in test/orfs/asap7/BUILD where the asap7_verilog filegroup and exports_files list do not contain the same set of files.

Comment thread test/orfs/asap7/BUILD Outdated
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Gemini review flagged that test/orfs/asap7/BUILD listed different
Verilog files in asap7_files and exports_files (empty.v was exported
but not in the filegroup; OA was in the filegroup but not exported).
Share a single ASAP7_VERILOG list between both so the set stays in
sync.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
@oharboe
Copy link
Copy Markdown
Collaborator Author

oharboe commented Apr 21, 2026

/gemini review

@oharboe
Copy link
Copy Markdown
Collaborator Author

oharboe commented Apr 21, 2026

@hzeller Close to ditching docker now....

@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates the OpenROAD flow from a Docker-based environment to source-built tools within the Bazel workspace. Key changes include updating MODULE.bazel to include the orfs dependency and applying several patches to orfs and yosys to support local tool execution, visibility, and header access. The orfs.default configuration has been updated to use local openroad and opensta targets instead of a Docker image. Additionally, test configurations in test/orfs/asap7 were updated to use local behavioral models for Verilator compatibility, removing the dependency on @docker_orfs. I have no feedback to provide.

Enables `bazelisk run test/orfs/gcd:gcd_synth_html` and similar
HTML report targets across the gcd, ram_8x7, and mock-array flows.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
@oharboe
Copy link
Copy Markdown
Collaborator Author

oharboe commented Apr 21, 2026

@maliberty FYI, you can now launch static HTML with the command line below. Replace "synth" with whatever stage you're interested in:

bazelisk run test/orfs/gcd:gcd_synth_html

The above works at home, but on my work workstation, I get in Chrome:

gcd_synth_html_gen.html:8619 Failed to load initial data from server: TypeError: Cannot read properties of null (reading 'fitBounds')
    at gcd_synth_html_gen.html:8470:21
(anonymous)	@	gcd_synth_html_gen.html:8619


@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@oharboe
Copy link
Copy Markdown
Collaborator Author

oharboe commented Apr 21, 2026

Working on explicit/early failure instead of silently papering over problems.

image

@oharboe oharboe requested review from hzeller and maliberty April 21, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant