Repository navigation
synth: a partition can read its blackbox list from a file, for lists over Linux's 128 KiB - #4798
Merged
maliberty merged 2 commits intoNov 6, 2026
Conversation
A partition of a parallel synthesis takes the modules to blackbox in SYNTH_BLACKBOXES, one environment variable. Linux caps one environment string at 128 KiB (MAX_ARG_STRLEN): XiangShan's XSTile, synthesised with 2,250 kept modules, is 206 KB of names, and starting synthesis fails with "Argument list too long" on every partition. SYNTH_BLACKBOXES_FILE names a file with more modules to blackbox, one per line, added to SYNTH_BLACKBOXES. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces the SYNTH_BLACKBOXES_FILE configuration option, allowing users to specify black-box modules via an external file to circumvent environment variable length limitations. The implementation updates the documentation, variable definitions, and the synth.tcl script. The reviewer provided an improvement suggestion for the file-reading logic in synth.tcl, recommending the use of 'gets' for better robustness against line endings and whitespace.
A CRLF line or stray spaces would have made a name that blackbox then skipped silently. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
oharboe
marked this pull request as ready for review
November 6, 2026 10:10
Member
🔍 QoR checkMetrics reflect the PR merge build — i.e. what will land on the target branch. Commit 62 design(s) checked — 0 with regression(s), 0 without a comparable baseline. |
maliberty
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A parallel synthesis of XiangShan's XSTile with 2,250 kept modules fails on every partition before yosys starts:
Each partition gets the other partitions' modules to blackbox in
SYNTH_BLACKBOXES, one environment variable. Here that's 206 KB of names, and Linux caps one environment string at 128 KiB (MAX_ARG_STRLEN), soexecvefails withE2BIGon any machine.SYNTH_BLACKBOXES_FILEnames a file with more modules to blackbox, one per line, added toSYNTH_BLACKBOXES. Nothing changes for flows that don't set it.flow/scripts/synth.tcl: reads the file before the hierarchy check, next toSYNTH_BLACKBOXES, with the same silent skip of names not in the checkpoint.variables.yaml, withFlowVariables.mdandvariables.jsonregenerated.Tested in bazel-orfs, whose partition synthesis is the orchestrator that sets these: The-OpenROAD-Project/bazel-orfs#1536 carries this change. Its test requires each kept module of a two-partition design to be defined exactly once in the merged netlist. It fails without this change, because each partition then synthesises the other partition's module too, and passes with it. The same PR checks a 2,250-name list through the partition script.
🤖 Generated with Claude Code