Skip to content

Commit 1b40986

Browse files
authored
Merge pull request The-OpenROAD-Project#9787 from suhr25/fix/pdn-add-sroute-connect-missing-guards
pdn: add missing guards for -layers and -cut_pitch in add_sroute_connect
2 parents 9b0caf1 + 8c51037 commit 1b40986

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/pdn/src/pdn.tcl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,19 @@ proc add_sroute_connect { args } {
670670
-metalspaces -ongrid -insts} \
671671
flags {}
672672

673+
if { ![info exists keys(-layers)] } {
674+
utl::error PDN 1193 "The -layers argument is required."
675+
}
676+
if { [llength $keys(-layers)] != 2 } {
677+
utl::error PDN 1195 "The -layers argument must be a list of 2 layers."
678+
}
679+
if { ![info exists keys(-cut_pitch)] } {
680+
utl::error PDN 1194 "The -cut_pitch argument is required."
681+
}
682+
if { [llength $keys(-cut_pitch)] != 2 } {
683+
utl::error PDN 1196 "The -cut_pitch argument must be a list of 2 pitch values."
684+
}
685+
673686
set l0 [pdn::get_layer [lindex $keys(-layers) 0]]
674687
set l1 [pdn::get_layer [lindex $keys(-layers) 1]]
675688

0 commit comments

Comments
 (0)