#joe Examples
#joe Following are the example scripts for Innovus and Ostrich to generate SPEFs and scaling factors for an MMMC design:
#joe Generate SPEF files in Innovus
# Within Innovus restore the routed design
restoreDesign routed.enc.dat top
# Define RC corners
set rcCorners {rc_worst rc_best}
# Signoff extraction. The following uses standalone Quantus QRC extraction engine. Modify the setup to run.
# Your desired signoff extractor and make sure to set proper coupling filters. This may be Turbo-QRC (TQRC),
# Integrated QRC (IQRC),signoff (standalone) QRC or a 3rd party extractor.
setExtractRCMode -engine postRoute -effortLevel signoff -coupled true
extractRC
foreach corner $rcCorners {
rcOut -spef signoff.$corner.spef.gz
}
# Create a list of clock nets
getReport -quiet {
dbForEachCellNet [dbgTopCell] net {
if {[dbIsNetDefInClock $net]} {
puts [dbNetName $net]
}
}} > clocks.txt
# Set RC scaling factors to 1
foreach corner $rcCorners {
update_rc_corner -name $corner \
-preRoute_cap 1.0 -preRoute_res 1.0 -preRoute_clkcap 1.0 -preRoute_clkres 1.0 \
-postRoute_cap 1.0 -postRoute_res 1.0 -postroute_xcap 1.0 -postRoute_clkcap 1.0 -postRoute_clkres 1.0
}
# Generate PostRoute SPEFs
setExtractRCMode -engine postRoute -effortLevel medium -coupled true
extractRC
foreach corner $rcCorners {
rcOut -rc_corner $corner -spef postRoute.$corner.spef.gz -excNetFile clocks.txt
rcOut -rc_corner $corner -spef clk.postRoute.$corner.spef.gz -net clocks.txt -addHeaderTail
}
# Generate PreRoute SPEFs
# Fix all clock nets
set cn [get_ccopt_clock_tree_nets *]
editSelect -nets $cn
editSelectVia -nets $cn
editChangeStatus -to FIXED
# For Innovus versions 15.1 and older use trialRoute instead of earlyGlobalRoute
earlyGlobalRoute
setExtractRCMode -engine preRoute
extractRC
foreach corner $rcCorners {
rcOut -rc_corner $corner -spef preRoute.$corner.spef.gz -excNetFile clocks.txt
rcOut -rc_corner $corner -spef clk.preRoute.$corner.spef.gz -net clocks.txt -addHeaderTail
}
Note: - The command -editSelectVia -net $cn- has been changed to -editSelect -net $cn -object_type via- in Innovus 20.1. The option being used works with present version of Innovus and will be obsoleted in a future release.
Generate RC scaling factors in Ostrich
#joe ostrich -64
# Load the SPEFs for each RC corner
set rcCorners {list of RC corners}
foreach corner $rcCorners {
read_spef -setname signoff.$corner \
-filename signoff.$corner.spef.gz
read_spef -setname postRoute.$corner \
-filename postRoute.$corner.spef.gz
read_spef -setname clk_postRoute.$corner \
-filename clk.postRoute.$corner.spef.gz
read_spef -setname preRoute.$corner \
-filename preRoute.$corner.spef.gz
read_spef -setname clk_preRoute.$corner \
-filename clk.preRoute.$corner.spef.gz
}
# Generate plots for Signoff vs. PostRoute SPEFs
foreach corner $rcCorners {
foreach plot_type {tcap xcap res} {
# signals
build_plot -plotname postRoute.$corner \
-golden signoff.$corner -target postRoute.$corner -datatype $plot_type
# clocks - xcap plot not needed for clocks
if {$plot_type != "xcap"} {
build_plot -plotname clk_postRoute.$corner \
-golden signoff.$corner -target clk_postRoute.$corner -datatype $plot_type
}
}
# The following commands generate the recommended scale factors.
# The following command gives -postRoute_cap:
set postRoute_cap($corner) [get_scale_factor -plotname postRoute.$corner \
-datatype tcap -recommended]
# The following command gives -postRoute_xcap:
set postRoute_xcap($corner) [get_scale_factor -plotname postRoute.$corner \
-datatype xcap -recommended]
# The following command gives -postRoute_res:
set postRoute_res($corner) [get_scale_factor -plotname postRoute.$corner \
-datatype res -recommended]
# The following command gives -postRoute_clkcap:
set postRoute_clkcap($corner) [get_scale_factor -plotname clk_postRoute.$corner \
-datatype tcap -recommended]
# The following command gives -postRoute_clkcap:
set postRoute_clkres($corner) [get_scale_factor -plotname clk_postRoute.$corner \
-datatype res -recommended]
}
# Generate plots for PreRoute vs. Signoff SPEFs
foreach corner $rcCorners{
foreach plot_type {tcap res} {
# signals
build_plot -plotname preRoute.$corner \
-golden signoff.$corner -target preRoute.$corner -datatype $plot_type
# clocks
build_plot -plotname clk_preRoute.$corner \
-golden signoff.$corner -target clk_preRoute.$corner -datatype $plot_type
}
# The following commands generate the recommended scale factors.
# The following command gives -preRoute_cap
set preRoute_cap($corner) [get_scale_factor -plotname preRoute.$corner \
-datatype tcap -recommended]
# The following command gives -preRoute_res
set preRoute_res($corner) [get_scale_factor -plotname preRoute.$corner \
-datatype res -recommended]
# The following command gives -preRoute_clkcap
set preRoute_clkcap($corner) [get_scale_factor -plotname clk_preRoute.$corner \
-datatype tcap -recommended]
# The following command gives -preRoute_clkcap
set preRoute_clkres($corner) [get_scale_factor -plotname clk_preRoute.$corner \
-datatype res -recommended]
}
#joe Set RC scaling factors in Innovus
foreach corner $rcCorners {
update_rc_corner -name $corner \
-preRoute_cap $preRoute_cap($corner) \
-preRoute_res $preRoute_res($corner) \
-preRoute_clkcap $preRoute_clkcap($corner) \
-preRoute_clkres $preRoute_clkres($corner) \
-postRoute_cap $postRoute_cap($corner) \
-postRoute_res $postRoute_res($corner) \
-postRoute_clkcap $postRoute_clkcap($corner) \
-postRoute_clkres $postRoute_clkres($corner) \
-postRoute_xcap $postRoute_xcap($corner)
}
|