Skip to content

Commit 12ff05d

Browse files
authored
Merge pull request #1642 from Pinata-Consulting/empty-gnd-pwr-env-vars-fix
power: handle empty PWR/GND_NETS_VOLTAGES variables
2 parents d723079 + 232cecc commit 12ff05d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

flow/scripts/final_report.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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)]} {
40+
if {[info exist ::env(PWR_NETS_VOLTAGES)] && [string length $::env(PWR_NETS_VOLTAGES)] > 0} {
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)]} {
49+
if {[info exist ::env(GND_NETS_VOLTAGES)] && [string length $::env(GND_NETS_VOLTAGES)] > 0} {
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/save_images.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ gui::set_display_controls "Layers/*" visible false
3434
gui::set_display_controls "Instances/Physical/*" visible false
3535
save_image -resolution $resolution $::env(REPORTS_DIR)/final_placement.webp
3636

37-
if {[info exist ::env(PWR_NETS_VOLTAGES)]} {
37+
if {[info exist ::env(PWR_NETS_VOLTAGES)] && [string length $::env(PWR_NETS_VOLTAGES)] > 0} {
3838
gui::set_display_controls "Heat Maps/IR Drop" visible true
3939
gui::set_heatmap IRDrop Layer $::env(IR_DROP_LAYER)
4040
gui::set_heatmap IRDrop ShowLegend 1

0 commit comments

Comments
 (0)