Skip to content

fix: use stat -hierarchy for hierarchical synth to report area#4109

Open
oharboe wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
oharboe:fix/hierarchical-synth-stat
Open

fix: use stat -hierarchy for hierarchical synth to report area#4109
oharboe wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
oharboe:fix/hierarchical-synth-stat

Conversation

@oharboe
Copy link
Copy Markdown
Collaborator

@oharboe oharboe commented Apr 4, 2026

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.

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>
@oharboe
Copy link
Copy Markdown
Collaborator Author

oharboe commented Apr 5, 2026

@maliberty I think there is a problem on pr-merge:

08:18:14  [ERROR PSM-0069] Check connectivity failed on VDD.

Comment on lines +229 to +230
if { $::env(SYNTH_HIERARCHICAL) } {
tee -o $::env(REPORTS_DIR)/synth_stat.txt stat -hierarchy {*}$lib_args
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any harm to always using -hierarchy ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know who the consumers are... Why would you not want the hierarchy, if there is one?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

util/genMetrics.py is the main one. Have you verified it works?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how to.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a test?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@oharboe oharboe requested a review from maliberty April 7, 2026 19:38
@oharboe
Copy link
Copy Markdown
Collaborator Author

oharboe commented Apr 7, 2026

@maliberty Looks like some pr-merge instability that we've been seeing.

@oharboe
Copy link
Copy Markdown
Collaborator Author

oharboe commented Apr 9, 2026

@maliberty Ping?

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.

2 participants