Skip to content

synth: ABC_SCRIPT, a design's own script for the abc pass - #4664

Merged
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
oharboe:abc-script
Oct 11, 2026
Merged

maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
oharboe:abc-script

Conversation

@oharboe

@oharboe oharboe commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

TL;DR: ABC_SCRIPT lets a design use its own ABC script for the classic abc pass, for example a vendored and modified abc_speed.script. Designs that don't set it synthesize exactly as before.

  • ABC_SCRIPT replaces abc_speed.script or abc_area.script and takes precedence over ABC_AREA.
  • It doesn't apply to abc_new (SYNTH_WRAPPED_OPERATORS, SWAP_ARITH_OPERATORS). abc_new maps each arithmetic operator module with the abc9_script attribute synth_wrap_operators.tcl sets, and an explicit -script would override that. An earlier revision passed one, and asap7/riscv32i setup WS went from -2.5 ps to -123 ps at CTS. -script stays cropped from abc_new's arguments.
  • scratchpad -set abc9.script …abc_speed_gia_only.script before abc_new stays, and now has a comment. It looks dead: abc_new installs its own default script when no -script is given. But it decides that by searching its arguments for the text "-script", and every liberty path here is under /OpenROAD-flow-scripts/ (abc_new: a "-script" anywhere in the arguments, such as in a liberty path, disables the default script YosysHQ/yosys#6320). Without the line, every SWAP_ARITH_OPERATORS design fails synthesis. It can go once ORFS's yosys has the fix.

🤖 Generated with Claude Code

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

Copy link
Copy Markdown
Contributor

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 introduces the ABC_SCRIPT environment variable, allowing users to specify a custom ABC script for synthesis. The changes include updating the synthesis preamble script to support this variable and documenting it across configuration and markdown files. The feedback suggests validating that the specified script file exists and warning the user when ABC_SCRIPT is silently ignored due to SYNTH_WRAPPED_OPERATORS or SWAP_ARITH_OPERATORS being enabled, as well as documenting this limitation.

Comment thread flow/scripts/synth_preamble.tcl Resolved
Comment thread flow/scripts/variables.yaml Resolved
@oharboe
oharboe force-pushed the abc-script branch 3 times, most recently from 2c68084 to 13d62e8 Compare October 10, 2026 07:32
@oharboe
oharboe requested a review from maliberty October 10, 2026 08:08
@openroad-ci

openroad-ci commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

🔍 QoR check

Metrics reflect the PR merge build — i.e. what will land on the target branch.

Commit 72d803d · Jenkins build #8 · Baseline: build · View build on dashboard

62 design(s) checked — 0 with regression(s), 0 without a comparable baseline.

@oharboe

oharboe commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator Author

@vvbandeira retrigger? looks like CI outage

@vvbandeira

Copy link
Copy Markdown
Member

@vvbandeira retrigger? looks like CI outage

Does not look like CI issues, what I am seeing is a lot of metrics failing.
Can you point me to where you think is the outage?

@oharboe
oharboe removed the request for review from maliberty October 10, 2026 10:52
@oharboe

oharboe commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator Author

@vvbandeira retrigger? looks like CI outage

Does not look like CI issues, what I am seeing is a lot of metrics failing. Can you point me to where you think is the outage?

Oops... sorry. I looked at the "Error response from daemon: failed to resolve reference "us-docker.pkg.dev/foss-fpga-tools-ext-openroad/openroad/flow-ubuntu22.04-builder:13d62e8a3": us-docker.pkg.dev/foss-fpga-tools-ext-openroad/openroad/flow-ubuntu22.04-builder:13d62e8a3: not found" and concluded it was a CI outage.

@oharboe
oharboe marked this pull request as draft October 10, 2026 10:53
@oharboe oharboe changed the title synth: ABC_SCRIPT, a design's own ABC script synth: ABC_SCRIPT, a design's own script for the abc pass Oct 10, 2026
@oharboe
oharboe marked this pull request as ready for review October 10, 2026 12:21
@oharboe
oharboe requested a review from maliberty October 10, 2026 13:05
@oharboe
oharboe marked this pull request as draft October 10, 2026 13:43
@oharboe
oharboe removed the request for review from maliberty October 10, 2026 13:43
ABC_SCRIPT replaces the ABC script synthesis runs, abc_speed.script or
abc_area.script, so that a design can vendor and change it.

It applies to the abc path only. The abc_new path, which
SYNTH_WRAPPED_OPERATORS and SWAP_ARITH_OPERATORS select, maps each
arithmetic operator module with the abc9_script attribute
synth_wrap_operators.tcl sets on it, and every other module with the
abc9.script scratchpad. An explicit -script overrides both, so it
stays cropped from abc_new's arguments; passing one lost the adder
architecture the operator swap chose (asap7/riscv32i setup WS -2.5 ps
to -123 ps at CTS).

The scratchpad abc9.script setting before abc_new stays, with a
comment: abc_new installs its own default only when it sees no
-script, and it looks for one by searching its arguments for the text
"-script", which every /OpenROAD-flow-scripts/... liberty path
contains (YosysHQ/yosys#6320). Without the line, every
SWAP_ARITH_OPERATORS design fails synthesis.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
@oharboe
oharboe marked this pull request as ready for review October 10, 2026 21:50
@oharboe
oharboe requested a review from maliberty October 10, 2026 21:50
@maliberty
maliberty merged commit 3451ca1 into The-OpenROAD-Project:master Oct 11, 2026
12 checks 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.

4 participants