-
Notifications
You must be signed in to change notification settings - Fork 945
bazel: bump bazel-orfs for single-writer 1_synth.sdc (fixes RBE) #10823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
oharboe
wants to merge
3
commits into
The-OpenROAD-Project:master
from
oharboe:bump-bazel-orfs-single-writer-sdc
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
86 changes: 86 additions & 0 deletions
86
bazel/bazel-orfs-patches/0036-orfs-single-writer-1_synth-sdc.patch
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
| From: =?UTF-8?q?=C3=98yvind=20Harboe?= <oyvind.harboe@zylin.com> | ||
| Date: Mon, 6 Jul 2026 11:17:45 +0200 | ||
| Subject: [PATCH] synth: single writer for 1_synth.sdc | ||
| MIME-Version: 1.0 | ||
| Content-Type: text/plain; charset=UTF-8 | ||
| Content-Transfer-Encoding: 8bit | ||
|
|
||
| Variant of ORFS PR #4333 against the ORFS_COMMIT pinned here | ||
| (no synth_syn.tcl at this commit), plus the flow/BUILD.bazel | ||
| exports_files(scripts/synth.tcl) that newer bazel-orfs needs for | ||
| its _synth_tcl attr (already on ORFS master). Drop this patch at | ||
| the next ORFS bump once #4333 lands. | ||
|
|
||
| Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> | ||
| --- | ||
| flow/BUILD.bazel | 9 +++++++++ | ||
| flow/scripts/synth.tcl | 4 ---- | ||
| flow/scripts/synth_odb.tcl | 9 ++++++--- | ||
| flow/scripts/synth_preamble.tcl | 1 - | ||
| 4 files changed, 15 insertions(+), 8 deletions(-) | ||
|
|
||
| diff --git a/flow/BUILD.bazel b/flow/BUILD.bazel | ||
| index 62e012594..41add0830 100644 | ||
| --- a/flow/BUILD.bazel | ||
| +++ b/flow/BUILD.bazel | ||
| @@ -5,6 +5,15 @@ exports_files( | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
|
|
||
| +# Expose synth.tcl as an addressable source label so bazel-orfs can | ||
| +# point its `_synth_tcl` attr default at `@orfs//flow:scripts/synth.tcl` | ||
| +# instead of vendoring its own (drifting) copy at the bazel-orfs repo | ||
| +# root. See bazel-orfs `private/rules.bzl`. | ||
| +exports_files( | ||
| + ["scripts/synth.tcl"], | ||
| + visibility = ["//visibility:public"], | ||
| +) | ||
| + | ||
| # files shared between scripts/synth.sh and scripts/flow.sh steps | ||
| MAKEFILE_SHARED = [ | ||
| "scripts/variables.json", | ||
| diff --git a/flow/scripts/synth.tcl b/flow/scripts/synth.tcl | ||
| index 1c9e548c5..25a0728fd 100644 | ||
| --- a/flow/scripts/synth.tcl | ||
| +++ b/flow/scripts/synth.tcl | ||
| @@ -273,7 +273,3 @@ if { | ||
|
|
||
| # Write synthesized design | ||
| write_verilog -nohex -nodec $::env(RESULTS_DIR)/1_2_yosys.v | ||
| -# One day a more sophisticated synthesis will write out a modified | ||
| -# .sdc file after synthesis. For now, just copy the input .sdc file, | ||
| -# making synthesis more consistent with other stages. | ||
| -log_cmd exec cp $::env(SDC_FILE) $::env(RESULTS_DIR)/1_synth.sdc | ||
| diff --git a/flow/scripts/synth_odb.tcl b/flow/scripts/synth_odb.tcl | ||
| index d6f53cda3..d0abab512 100644 | ||
| --- a/flow/scripts/synth_odb.tcl | ||
| +++ b/flow/scripts/synth_odb.tcl | ||
| @@ -25,9 +25,12 @@ source_step_tcl PRE SYNTH | ||
| log_cmd eliminate_dead_logic | ||
|
|
||
| source_step_tcl POST SYNTH | ||
| -orfs_write_db $::env(RESULTS_DIR)/1_synth.odb | ||
| +# Producing 1_synth.odb/.sdc is this step's contract: | ||
| +# unconditional, no WRITE_ODB_AND_SDC_EACH_STAGE. | ||
| +log_cmd write_db $::env(RESULTS_DIR)/1_synth.odb | ||
| # Canonicalize 1_synth.sdc. The original SDC_FILE provided by | ||
| # the user could have dependencies, such as sourcing util.tcl, | ||
| # which are read in here and a canonicalized version is written | ||
| -# out by OpenSTA that has no dependencies. | ||
| -orfs_write_sdc $::env(RESULTS_DIR)/1_synth.sdc | ||
| +# out by OpenSTA that has no dependencies. Sole writer of | ||
| +# 1_synth.sdc. | ||
| +log_cmd write_sdc -no_timestamp $::env(RESULTS_DIR)/1_synth.sdc | ||
| diff --git a/flow/scripts/synth_preamble.tcl b/flow/scripts/synth_preamble.tcl | ||
| index af43512c0..58c016a7a 100644 | ||
| --- a/flow/scripts/synth_preamble.tcl | ||
| +++ b/flow/scripts/synth_preamble.tcl | ||
| @@ -14,7 +14,6 @@ if { [env_var_exists_and_non_empty SYNTH_NETLIST_FILES] } { | ||
| # keep things simple we just use the creation date | ||
| log_cmd exec cat {*}$::env(SYNTH_NETLIST_FILES) > $::env(RESULTS_DIR)/1_2_yosys.v | ||
| } | ||
| - log_cmd exec cp -p $::env(SDC_FILE) $::env(RESULTS_DIR)/1_synth.sdc | ||
| if { [env_var_exists_and_non_empty CACHED_REPORTS] } { | ||
| log_cmd exec cp -p {*}$::env(CACHED_REPORTS) $::env(REPORTS_DIR)/. | ||
| } |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this related to the sdc? I think you have another PR for this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, I also filed povik/sv-elab#362 to have stable hashes.
I will create a new updated BCR module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created new BCR release for sv-elab: bazelbuild/bazel-central-registry#9571
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hzeller I take it you will create a PR when it lands?
Claude added that slang noice to this PR because it failed locally, not because it was related to bumping bazel-orfs.
Your problem goes away if you create a PR with
bazelisk run @bazel-orfs//:bump, though you may want to hold off on that until this strom of bazel bcr upgrades is done....