Skip to content

Commit c4a29ca

Browse files
committed
synth: SYNTH_STATS naming doesn't leak implementation details
Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 21a6cec commit c4a29ca

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

flow/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ include $(PLATFORM_DIR)/config.mk
180180

181181
# Enables hierarchical yosys
182182
export SYNTH_HIERARCHICAL ?= 0
183-
export SYNTH_STOP_MODULE_SCRIPT = $(RESULTS_DIR)/keep_hierarchy.tcl
183+
export SYNTH_STATS = $(RESULTS_DIR)/synth_stats.txt
184184
export HIER_REPORT_SCRIPT = $(SCRIPTS_DIR)/synth_hier_report.tcl
185185
export MAX_UNGROUP_SIZE ?= 0
186186

@@ -519,7 +519,7 @@ clean_synth:
519519
rm -f $(RESULTS_DIR)/1_* $(RESULTS_DIR)/mem.json
520520
rm -f $(REPORTS_DIR)/synth_*
521521
rm -f $(LOG_DIR)/1_*
522-
rm -f $(SYNTH_STOP_MODULE_SCRIPT)
522+
rm -f $(SYNTH_STATS)
523523
rm -f $(SDC_FILE_CLOCK_PERIOD)
524524
rm -rf _tmp_yosys-abc-*
525525

flow/scripts/synth.tcl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ if { $::env(MAX_UNGROUP_SIZE) > 0 } {
88
puts "Ungroup modules of size greater than $ungroup_threshold"
99
}
1010

11-
set fp [open $::env(SYNTH_STOP_MODULE_SCRIPT) r]
11+
set fp [open $::env(SYNTH_STATS) r]
1212
while {[gets $fp line] != -1} {
1313
set fields [split $line " "]
1414
set area [lindex $fields 0]
1515
set module_name [lindex $fields 1]
1616

1717
if {[expr $area > $ungroup_threshold]} {
18-
puts "Keeping $area $module_name"
18+
puts "Keeping module $module_name (area: $area)"
1919
select -module $module_name
2020
setattr -mod -set keep_hierarchy 1
2121
select -clear
2222
} else {
23-
puts "Flattening $area $module_name"
23+
puts "Flattening module $module_name (area: $area)"
2424
}
2525
}
2626
close $fp

flow/scripts/synth_hier_report.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ source $::env(SCRIPTS_DIR)/util.tcl
22

33
proc write_keep_hierarchy {} {
44
if { ![env_var_equals SYNTH_HIERARCHICAL 1] } {
5-
set out_script_ptr [open $::env(SYNTH_STOP_MODULE_SCRIPT) w]
5+
set out_script_ptr [open $::env(SYNTH_STATS) w]
66
close $out_script_ptr
77
return
88
}
@@ -65,7 +65,7 @@ proc write_keep_hierarchy {} {
6565
}
6666
set areas [lsort -index 0 -real $areas]
6767

68-
set out_script_ptr [open $::env(SYNTH_STOP_MODULE_SCRIPT) w]
68+
set out_script_ptr [open $::env(SYNTH_STATS) w]
6969
foreach {line} $areas {
7070
puts $out_script_ptr $line
7171
}

0 commit comments

Comments
 (0)