Skip to content

Commit 19f157c

Browse files
authored
Merge pull request #2399 from Pinata-Consulting/scripts-cleanup-5
scripts: more cleanup
2 parents 87b8073 + 5bd9e4e commit 19f157c

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

flow/scripts/detail_place.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ proc do_dpl {} {
1616
detailed_placement
1717

1818
if {[env_var_equals ENABLE_DPO 1]} {
19-
if {[info exist ::env(DPO_MAX_DISPLACEMENT)]} {
19+
if {[env_var_exists_and_non_empty DPO_MAX_DISPLACEMENT]} {
2020
improve_placement -max_displacement $::env(DPO_MAX_DISPLACEMENT)
2121
} else {
2222
improve_placement

flow/scripts/detail_route.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ set_global_routing_layer_adjustment $env(MIN_ROUTING_LAYER)-$env(MAX_ROUTING_LAY
5050
set_routing_layers -signal $env(MIN_ROUTING_LAYER)-$env(MAX_ROUTING_LAYER)
5151

5252

53-
if {![info exist ::env(SKIP_ANTENNA_REPAIR_POST_DRT)]} {
53+
if {![env_var_equals SKIP_ANTENNA_REPAIR_POST_DRT 1]} {
5454
set repair_antennas_iters 1
5555
repair_antennas
5656
while {[check_antennas] && $repair_antennas_iters < 5} {

flow/scripts/final_report.tcl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ write_def $::env(RESULTS_DIR)/6_final.def
1717
write_verilog $::env(RESULTS_DIR)/6_final.v
1818

1919
# Run extraction and STA
20-
if {[info exist ::env(RCX_RULES)]} {
20+
if {[env_var_exists_and_non_empty RCX_RULES]} {
2121

2222
# Set RC corner for RCX
2323
# Set in config.mk
24-
if {[info exist ::env(RCX_RC_CORNER)]} {
24+
if {[env_var_exists_and_non_empty RCX_RC_CORNER]} {
2525
set rc_corner $::env(RCX_RC_CORNER)
2626
}
2727

@@ -37,7 +37,7 @@ if {[info exist ::env(RCX_RULES)]} {
3737
read_spef $::env(RESULTS_DIR)/6_final.spef
3838

3939
# Static IR drop analysis
40-
if {[info exist ::env(PWR_NETS_VOLTAGES)] && [string length $::env(PWR_NETS_VOLTAGES)] > 0} {
40+
if {[env_var_exists_and_non_empty PWR_NETS_VOLTAGES]} {
4141
dict for {pwrNetName pwrNetVoltage} {*}$::env(PWR_NETS_VOLTAGES) {
4242
set_pdnsim_net_voltage -net ${pwrNetName} -voltage ${pwrNetVoltage}
4343
analyze_power_grid -net ${pwrNetName} \
@@ -46,7 +46,7 @@ if {[info exist ::env(RCX_RULES)]} {
4646
} else {
4747
puts "IR drop analysis for power nets is skipped because PWR_NETS_VOLTAGES is undefined"
4848
}
49-
if {[info exist ::env(GND_NETS_VOLTAGES)] && [string length $::env(GND_NETS_VOLTAGES)] > 0} {
49+
if {[env_var_exists_and_non_empty GND_NETS_VOLTAGES]} {
5050
dict for {gndNetName gndNetVoltage} {*}$::env(GND_NETS_VOLTAGES) {
5151
set_pdnsim_net_voltage -net ${gndNetName} -voltage ${gndNetVoltage}
5252
analyze_power_grid -net ${gndNetName} \

flow/scripts/generate_abstract.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ puts "Generating abstract views"
2424
write_timing_model $::env(RESULTS_DIR)/$::env(DESIGN_NAME).lib
2525
write_abstract_lef -bloat_occupied_layers $::env(RESULTS_DIR)/$::env(DESIGN_NAME).lef
2626

27-
if {[info exist ::env(CDL_FILES)]} {
27+
if {[env_var_exists_and_non_empty CDL_FILES]} {
2828
cdl read_masters $::env(CDL_FILES)
2929
cdl out $::env(RESULTS_DIR)/$stem.cdl
3030
}

flow/scripts/global_place.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ if {$result != 0} {
4141

4242
estimate_parasitics -placement
4343

44-
if {[info exist ::env(CLUSTER_FLOPS)]} {
44+
if {[env_var_equals CLUSTER_FLOPS 1]} {
4545
cluster_flops
4646
estimate_parasitics -placement
4747
}

flow/scripts/global_route.tcl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ proc global_route_helper {} {
66
source $::env(SCRIPTS_DIR)/load.tcl
77
load_design 4_cts.odb 4_cts.sdc
88

9-
if {[info exist ::env(PRE_GLOBAL_ROUTE)]} {
9+
if {[env_var_exists_and_non_empty PRE_GLOBAL_ROUTE]} {
1010
source $::env(PRE_GLOBAL_ROUTE)
1111
}
1212

@@ -45,7 +45,7 @@ proc global_route_helper {} {
4545
set_propagated_clock [all_clocks]
4646
estimate_parasitics -global_routing
4747

48-
if {[info exist ::env(DONT_USE_CELLS)]} {
48+
if {[env_var_exists_and_non_empty DONT_USE_CELLS]} {
4949
set_dont_use $::env(DONT_USE_CELLS)
5050
}
5151

@@ -88,7 +88,7 @@ proc global_route_helper {} {
8888

8989
recover_power
9090

91-
if {![info exist ::env(SKIP_ANTENNA_REPAIR)]} {
91+
if {![env_var_equals SKIP_ANTENNA_REPAIR 1]} {
9292
puts "Repair antennas..."
9393
repair_antennas -iterations 5
9494
check_placement -verbose

0 commit comments

Comments
 (0)