Skip to content

Commit 434bec3

Browse files
committed
pdn: add check_only flag
Signed-off-by: Peter Gadfort <[email protected]>
1 parent 8f65df6 commit 434bec3

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/pdn/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Build a power grid in accordance with the information specified.
2121

2222
```tcl
2323
pdngen
24+
[-check_only]
2425
[-dont_add_pins]
2526
[-failed_via_report file]
2627
[-report_only]
@@ -36,6 +37,7 @@ pdngen
3637
| `[-dont_add_pins]` | Prevent the creation of block pins. |
3738
| `[-failed_via_report]` | Generate a report file which can be viewed in the DRC viewer for all the failed vias (ie. those that did not get built or were removed). |
3839
| `[-report_only]` | Print the current specifications. |
40+
| `[-check_only]` | Check the current setup for errors. |
3941
| `[-reset]` | Reset the grid and domain specifications. |
4042
| `[-ripup]` | Ripup the existing power grid, as specified by the voltage domains. |
4143
| `[-skip_trim]` | Skip the metal trim step, which attempts to remove metal stubs. |

src/pdn/src/pdn.tcl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ sta::define_cmd_args "pdngen" {[-skip_trim] \
66
[-reset] \
77
[-ripup] \
88
[-report_only] \
9+
[-check_only] \
910
[-failed_via_report file] \
1011
[-verbose]
1112
} ;#checker off
1213

1314
proc pdngen { args } {
1415
sta::parse_key_args "pdngen" args \
15-
keys {-failed_via_report} flags {-skip_trim -dont_add_pins -reset -ripup -report_only -verbose}
16+
keys {-failed_via_report} \
17+
flags {-skip_trim -dont_add_pins -reset -ripup -report_only -verbose -check_only}
1618

1719
sta::check_argc_eq0 "pdngen" $args
1820

@@ -43,6 +45,13 @@ proc pdngen { args } {
4345
pdn::report
4446
return
4547
}
48+
if { [info exists flags(-check_only)] } {
49+
if { [array size flags] != 1 } {
50+
utl::error PDN 1040 "-check_only flag is mutually exclusive to all other flags"
51+
}
52+
pdn::check_setup
53+
return
54+
}
4655

4756
set trim [expr [info exists flags(-skip_trim)] == 0]
4857
set add_pins [expr [info exists flags(-dont_add_pins)] == 0]

0 commit comments

Comments
 (0)