Skip to content

Commit 8b89e39

Browse files
oharboeclaude
andcommitted
fix: use stat -hierarchy for hierarchical synth to report area
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>
1 parent 8724066 commit 8b89e39

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

flow/scripts/synth.tcl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,11 @@ if { $::env(SYNTH_INSBUF) } {
226226
# Reports
227227
tee -o $::env(REPORTS_DIR)/synth_check.txt check
228228

229-
tee -o $::env(REPORTS_DIR)/synth_stat.txt stat {*}$lib_args
229+
if { $::env(SYNTH_HIERARCHICAL) } {
230+
tee -o $::env(REPORTS_DIR)/synth_stat.txt stat -hierarchy {*}$lib_args
231+
} else {
232+
tee -o $::env(REPORTS_DIR)/synth_stat.txt stat {*}$lib_args
233+
}
230234

231235
# check the design is composed exclusively of target cells, and
232236
# check for other problems

0 commit comments

Comments
 (0)