Enhance IR Drop Analysis (#1864)

+ Add `VSRC_LOC_FILES`
+ Fix IR drop analysis flow
+ Consistent default NONE in configuration.md
This commit is contained in:
Kareem Farid
2023-06-22 12:53:38 +03:00
committed by GitHub
parent 064db85073
commit aeef4d0572
3 changed files with 42 additions and 25 deletions

View File

@@ -259,6 +259,12 @@ These variables worked initially, but they were too sky130 specific and will be
| `SPEF_WIRE_MODEL` | **Removed:** Specifies the wire model used in SPEF extraction. Options are `L` or `Pi` <br> (Default: `L`) |
| `SPEF_EDGE_CAP_FACTOR` | **Removed:** Specifies the edge capacitance factor used in SPEF extraction. Ranges from 0 to 1 <br> (Default: `1`) |
### IR Drop Analysis
|Variable|Description|
|-|-|
| `VSRC_LOC_FILES` | PSM loc file for power and ground nets. Variable should be provided as a json/tcl list or a space delimited tcl string as follows: `net1 file1 net2 file2`. See [this](https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/psm#commands) for more info.<br> (Default: NONE) |
### Magic
|Variable|Description|
|-|-|
@@ -323,7 +329,7 @@ These variables worked initially, but they were too sky130 specific and will be
| | 4: Use Sylvain Minaut's custom script for diode insertion. |
| | 5: **removed** A combination of strategies 2 and 4. |
| | 6: A combination of strategies 3 and 4. |
| `DIODE_ON_PORTS` | Insert diodes on ports with the specified polarities. Available options are `none`, `in`, `out` and `both`. <br> (Default: `none`) |
| `DIODE_ON_PORTS` | Insert diodes on ports with the specified polarities. Available options are `none`, `in`, `out` and `both`. <br> (Default: NONE) |
| `HEURISTIC_ANTENNA_THRESHOLD` | Minimum manhattan distance of a net to insert a diode in microns. Only applicable for `RUN_HEURISTIC_DIODE_INSERTION` is enabled. <br> (Default: `90`)
| `USE_ARC_ANTENNA_CHECK` | Specifies whether to use the openroad ARC antenna checker or magic antenna checker. 0=magic antenna checker, 1=ARC OR antenna checker <br> (Default: `1`)
| `RUN_LINTER` | Enable linter (currently Verilator) <br> (Default: `1`)

View File

@@ -11,27 +11,27 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
if {[catch {read_lef $::env(MERGED_LEF)} errmsg]} {
puts stderr $errmsg
exit 1
}
if {[catch {read_def $::env(CURRENT_DEF)} errmsg]} {
puts stderr $errmsg
exit 1
}
foreach lib $::env(LIB_SYNTH_COMPLETE) {
read_liberty $lib
}
if { [info exists ::env(EXTRA_LIBS) ] } {
foreach lib $::env(EXTRA_LIBS) {
read_liberty $lib
}
}
source $::env(SCRIPTS_DIR)/openroad/common/io.tcl
read
read_spef $::env(CURRENT_SPEF)
source $::env(SCRIPTS_DIR)/openroad/common/set_rc.tcl
analyze_power_grid -net $::env(VDD_NET) -outfile $::env(_tmp_save_rpt)
if { [info exists ::env(VSRC_LOC_FILES)] } {
foreach {net vsrc_file} "$::env(VSRC_LOC_FILES)" {
set arg_list [list]
lappend -net $net
lappend -outfile $::env(_tmp_save_rpt_prefix)-$net.rpt
lappend -vsrc $vsrc_file
analyze_power_grid {*}$arg_list
}
} else {
foreach net "$::env(VDD_NETS) $::env(GND_NETS)" {
set arg_list [list]
lappend arg_list -net $::env(VDD_NET)
lappend arg_list -outfile $::env(_tmp_save_rpt_prefix)-$net.rpt
analyze_power_grid {*}$arg_list
}
}

View File

@@ -889,6 +889,13 @@ proc prep {args} {
}
}
if { [info exists ::env(VSRC_LOC_FILES)] } {
if { [expr [llength $::env(VSRC_LOC_FILES)] % 2] != 0 } {
puts_err "Please define VSRC_LOC_FILES correctly. i.e. : net1 file1 net2 file2 ..."
flow_fail
}
}
TIMER::timer_stop
exec echo "[TIMER::get_runtime]" | python3 $::env(SCRIPTS_DIR)/write_runtime.py "openlane design prep"
return -code ok
@@ -1213,11 +1220,15 @@ proc run_irdrop_report {args} {
set log [index_file $::env(signoff_logs)/irdrop.log]
puts_info "Creating IR Drop Report (log: [relpath . $log])..."
set rpt [index_file $::env(signoff_reports)/irdrop.rpt]
if { ![info exists ::env(VSRC_LOC_FILES)] } {
puts_warn "VSRC_LOC_FILES is not defined. The IR drop analysis will run, but the values may be inaccurate."
}
set ::env(_tmp_save_rpt) $rpt
set rpt [index_file $::env(signoff_reports)/irdrop]
set ::env(_tmp_save_rpt_prefix) $rpt
run_openroad_script $::env(SCRIPTS_DIR)/openroad/irdrop.tcl -indexed_log $log
unset ::env(_tmp_save_rpt)
unset ::env(_tmp_save_rpt_prefix)
TIMER::timer_stop
exec echo "[TIMER::get_runtime]" | python3 $::env(SCRIPTS_DIR)/write_runtime.py "ir drop report - openroad"