Skip to content

Commit d012f05

Browse files
authored
Merge pull request #2336 from Pinata-Consulting/makefile-less-surprises
makefile: POLA - Principle Of Least Astonishment for variables
2 parents 835d7f8 + 42e17b0 commit d012f05

File tree

4 files changed

+25
-17
lines changed

4 files changed

+25
-17
lines changed

flow/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ export TNS_END_PERCENT ?=100
136136

137137
# Default routing layer adjustment
138138
export ROUTING_LAYER_ADJUSTMENT ?= 0.5
139+
export RECOVER_POWER ?= 0
140+
export SKIP_INCREMENTAL_REPAIR ?= 0
141+
export DETAILED_METRICS ?= 0
139142

140143
# If we are running headless use offscreen rendering for save_image
141144
ifndef DISPLAY

flow/scripts/cts.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ set_dont_use $::env(DONT_USE_CELLS)
4646
utl::push_metrics_stage "cts__{}__pre_repair"
4747

4848
estimate_parasitics -placement
49-
if {[info exist ::env(DETAILED_METRICS)]} {
49+
if { $::env(DETAILED_METRICS) } {
5050
report_metrics 4 "cts pre-repair"
5151
}
5252
utl::pop_metrics_stage
@@ -55,7 +55,7 @@ repair_clock_nets
5555

5656
utl::push_metrics_stage "cts__{}__post_repair"
5757
estimate_parasitics -placement
58-
if {[info exist ::env(DETAILED_METRICS)]} {
58+
if { $::env(DETAILED_METRICS) } {
5959
report_metrics 4 "cts post-repair"
6060
}
6161
utl::pop_metrics_stage

flow/scripts/global_route.tcl

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ proc global_route_helper {} {
4949
set_dont_use $::env(DONT_USE_CELLS)
5050
}
5151

52-
if { ![info exists ::env(SKIP_INCREMENTAL_REPAIR)] } {
53-
if {[info exist ::env(DETAILED_METRICS)]} {
52+
if { !$::env(SKIP_INCREMENTAL_REPAIR) } {
53+
if { $::env(DETAILED_METRICS) } {
5454
report_metrics 5 "global route pre repair design"
5555
}
5656

5757
# Repair design using global route parasitics
5858
puts "Perform buffer insertion..."
5959
repair_design
60-
if {[info exist ::env(DETAILED_METRICS)]} {
60+
if { $::env(DETAILED_METRICS) } {
6161
report_metrics 5 "global route post repair design"
6262
}
6363

@@ -74,7 +74,7 @@ proc global_route_helper {} {
7474

7575
repair_timing_helper
7676

77-
if {[info exist ::env(DETAILED_METRICS)]} {
77+
if { $::env(DETAILED_METRICS) } {
7878
report_metrics 5 "global route post repair timing"
7979
}
8080

@@ -86,17 +86,7 @@ proc global_route_helper {} {
8686
global_route -end_incremental -congestion_report_file $::env(REPORTS_DIR)/congestion_post_repair_timing.rpt
8787
}
8888

89-
if { [info exists ::env(RECOVER_POWER)] } {
90-
puts "Downsizing/switching to higher Vt for non critical gates for power recovery"
91-
puts "Percent of paths optimized $::env(RECOVER_POWER)"
92-
report_tns
93-
report_wns
94-
report_power
95-
repair_timing -recover_power $::env(RECOVER_POWER)
96-
report_tns
97-
report_wns
98-
report_power
99-
}
89+
recover_power
10090

10191
if {![info exist ::env(SKIP_ANTENNA_REPAIR)]} {
10292
puts "Repair antennas..."

flow/scripts/util.tcl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,18 @@ proc repair_timing_helper { {hold_margin 1} } {
2929
puts "repair_timing [join $additional_args " "]"
3030
repair_timing {*}$additional_args
3131
}
32+
33+
proc recover_power {} {
34+
if { $::env(RECOVER_POWER) == 0 } {
35+
return
36+
}
37+
puts "Downsizing/switching to higher Vt for non critical gates for power recovery"
38+
puts "Percent of paths optimized $::env(RECOVER_POWER)"
39+
report_tns
40+
report_wns
41+
report_power
42+
repair_timing -recover_power $::env(RECOVER_POWER)
43+
report_tns
44+
report_wns
45+
report_power
46+
}

0 commit comments

Comments
 (0)