fix: use stat -hierarchy for hierarchical synth to report area#4109
Open
oharboe wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
Open
fix: use stat -hierarchy for hierarchical synth to report area#4109oharboe wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
oharboe wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
Conversation
When SYNTH_HIERARCHICAL=1, the yosys stat command reports zero area for the top module because all cells are in submodules. Adding -hierarchy makes stat include submodule area, so synth__design__instance__area__stdcell is no longer N/A. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Collaborator
Author
|
@maliberty I think there is a problem on pr-merge: |
maliberty
reviewed
Apr 6, 2026
flow/scripts/synth.tcl
Outdated
Comment on lines
+229
to
+230
| if { $::env(SYNTH_HIERARCHICAL) } { | ||
| tee -o $::env(REPORTS_DIR)/synth_stat.txt stat -hierarchy {*}$lib_args |
Member
There was a problem hiding this comment.
Is there any harm to always using -hierarchy ?
Collaborator
Author
There was a problem hiding this comment.
I don't know who the consumers are... Why would you not want the hierarchy, if there is one?
Member
There was a problem hiding this comment.
util/genMetrics.py is the main one. Have you verified it works?
Collaborator
Author
There was a problem hiding this comment.
I don't know how to.
Collaborator
Author
There was a problem hiding this comment.
Is there any harm to always using -hierarchy ?
Done.
There is no harm in always using -hierarchy flag. It reports the same results for flat designs and correctly includes submodule area for hierarchical designs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Collaborator
Author
|
@maliberty Looks like some pr-merge instability that we've been seeing. |
Collaborator
Author
|
@maliberty Ping? |
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.
When SYNTH_HIERARCHICAL=1, the yosys stat command reports zero area for the top module because all cells are in submodules. Adding -hierarchy makes stat include submodule area, so
synth__design__instance__area__stdcell is no longer N/A.