Repository navigation
read binary liberty files from a cache shared by all designs #4720
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
Merged
eder-matheus
merged 20 commits into
The-OpenROAD-Project:master
from
The-OpenROAD-Project-staging:secure-blib_shared_cache
Nov 6, 2026
Merged
Changes from 6 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
7ada09f
Read binary liberty files from a cache shared by all designs
eder-matheus 510d23a
Store binary liberty files in one folder per platform
eder-matheus bebeeae
Merge branch 'master' of https://github.com/The-OpenROAD-Project-priv…
eder-matheus d41a3c7
use latest openroad
eder-matheus 47cf4c8
Cache binary libs of the design's own libraries per run
eder-matheus fd5d8a2
Describe the binary liberty variables as the cache now works
eder-matheus b59119d
Report the most recently written log as the last log
eder-matheus 95f03da
Drop USE_BINARY_LIBS and read libraries without a usable .blib as given
eder-matheus 2b55caa
Merge remote-tracking branch 'origin/master' into secure-blib_shared_…
eder-matheus 22c6307
Keep the OpenROAD version master pins
eder-matheus 56f8167
Keep the .blib cache in objects/ and convert only when a library changes
eder-matheus a01e937
Read the libraries without checking that they exist, as the Tcl contr…
eder-matheus baf96ed
use latest openroad
eder-matheus 8c0a9b8
Stop the run when a .blib can't be written, and retry it on the next …
eder-matheus 4850570
Convert the libraries again when a corner library changes
eder-matheus 38b1fcb
update OR submodule
jfgava 2485922
Merge branch 'master' of github.com:The-OpenROAD-Project-private/Open…
jfgava b9690c2
Keep the OpenROAD version master pins
jfgava 03fe077
Merge branch 'master' of github.com:The-OpenROAD-Project-private/Open…
jfgava 892ef05
Convert the libraries again after clean_all or clean_binary_libs
jfgava 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
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
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
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.
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
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,45 @@ | ||
| # Fill the binary liberty (.blib) cache with the libraries the OpenROAD stages read | ||
| source $::env(SCRIPTS_DIR)/util.tcl | ||
|
|
||
| set lib_files {} | ||
| if { [env_var_exists_and_non_empty CORNERS] } { | ||
| foreach corner $::env(CORNERS) { | ||
| lappend lib_files {*}$::env([string toupper $corner]_LIB_FILES) | ||
| } | ||
| } else { | ||
| lappend lib_files {*}$::env(LIB_FILES) | ||
| } | ||
|
|
||
| set written 0 | ||
| set cached 0 | ||
| array set seen {} | ||
| foreach lib_file $lib_files { | ||
| # Libraries the flow has not generated yet are converted on a later run | ||
| if { ![file exists $lib_file] } { | ||
| continue | ||
| } | ||
| set blib [binary_lib_path $lib_file] | ||
| if { [info exists seen($blib)] } { | ||
| continue | ||
| } | ||
| set seen($blib) 1 | ||
| if { [file exists $blib] && ![catch { liberty_binary_info $blib }] } { | ||
| incr cached | ||
| continue | ||
| } | ||
| # Publish with a rename, so concurrent flows never read a partial file | ||
| set tmp "$blib.tmp.[info hostname].[pid]" | ||
| if { | ||
| [catch { | ||
| file mkdir [file dirname $blib] | ||
| log_cmd write_liberty_binary $lib_file $tmp | ||
| file rename -force $tmp $blib | ||
| } msg] | ||
| } { | ||
| file delete -force $tmp | ||
| utl::warn FLW 28 "Could not write $blib: $msg" | ||
| continue | ||
| } | ||
| incr written | ||
| } | ||
| puts "Binary liberty files: $written written, $cached already cached" |
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.
If
BINARY_LIBS_DIRcontains spaces, therm -rfcommand will undergo word splitting, potentially leading to accidental deletion of unintended files or directories. Quoting the expanded path prevents this issue.