Repository navigation
Conversation
The Yosys flow adds CLKGATE_MAP_FILE to the frontend's inputs itself
(synth_preamble.tcl, for both the slang and the Yosys Verilog
frontends). OpenROAD's own synthesis (SYNTH_USE_SYN, synth_syn.tcl) did
not, so asap7/swerv_wrapper, which instantiates OPENROAD_CLKGATE and
synthesises with SYNTH_USE_SYN, listed $(CLKGATE_MAP_FILE) in its
VERILOG_FILES: a platform file in a design's source list, and one that
a flow reading config.mk without the platform's variables cannot
resolve ("unknown module 'OPENROAD_CLKGATE'").
synth_syn.tcl now adds CLKGATE_MAP_FILE when it is set, and
swerv_wrapper no longer names it. Under make the file read is the same
one, read once.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request removes the CLKGATE_MAP_FILE from the VERILOG_FILES list in the swerv_wrapper configuration for the asap7 design. Instead, the clock gate map file is conditionally appended to the elaboration arguments in synth_syn.tcl if the CLKGATE_MAP_FILE environment variable exists and is not empty. I have no feedback to provide as there are no review comments.
oharboe
marked this pull request as ready for review
November 7, 2026 19:51
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. |
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.
Before: OpenROAD's own synthesis (
SYNTH_USE_SYN=1,synth_syn.tcl) did not read the platform's clock gate, soasap7/swerv_wrapper, which instantiatesOPENROAD_CLKGATE, listed$(CLKGATE_MAP_FILE)among itsVERILOG_FILES.Now:
synth_syn.tcladdsCLKGATE_MAP_FILEwhen it is set, as the Yosys flow does insynth_preamble.tcl, andswerv_wrapperlists only its own sources.Under make the same file is read, once. A flow that reads a design's
config.mkwithout the platform's variables can no longer leave$(CLKGATE_MAP_FILE)unresolved inVERILOG_FILES; that was the failure seen,unknown module 'OPENROAD_CLKGATE'.Tested:
asap7/swerv_wrappersynthesis withSYNTH_USE_SYN=1through bazel-orfs, which has carried this change since October.🤖 Generated with Claude Code