run_invs.tcl 3.45 KB
Newer Older
1
# This script was written and developed by ABKGroup students at UCSD. However, the underlying commands and reports are copyrighted by Cadence. 
sakundu committed
2
# We thank Cadence for granting permission to share our research to help promote and foster the next generation of innovators.
3 4 5
source lib_setup.tcl
source design_setup.tcl
source mmmc_setup.tcl
sakundu committed
6

7 8
setMultiCpuUsage -localCpu 16
set util 0.3
sakundu committed
9

sakundu committed
10
set handoff_dir  "./syn_handoff"
sakundu committed
11

sakundu committed
12 13
set netlist ${handoff_dir}/${DESIGN}.v
set sdc ${handoff_dir}/${DESIGN}.sdc 
sakundu committed
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

set rptDir summaryReport/ 
set encDir enc/

if {![file exists $rptDir/]} {
    exec mkdir $rptDir/
}

if {![file exists $encDir/]} {
    exec mkdir $encDir/
}

# default settings
set init_pwr_net VDD
set init_gnd_net VSS

# default settings
set init_verilog "$netlist"
set init_design_netlisttype "Verilog"
set init_design_settop 1
34 35
set init_top_cell "$DESIGN"
set init_lef_file "$lefs"
sakundu committed
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57

# MCMM setup
init_design -setup {WC_VIEW} -hold {BC_VIEW}
set_power_analysis_mode -leakage_power_view WC_VIEW -dynamic_power_view WC_VIEW

set_interactive_constraint_modes {CON}

clearGlobalNets
globalNetConnect VDD -type pgpin -pin VDD -inst * -override
globalNetConnect VSS -type pgpin -pin VSS -inst * -override
globalNetConnect VDD -type tiehi -inst * -override
globalNetConnect VSS -type tielo -inst * -override


setOptMode -powerEffort low -leakageToDynamicRatio 0.5
setGenerateViaMode -auto true
generateVias

# basic path groups
createBasicPathGroups -expanded

## Generate the floorplan ##
58

sakundu committed
59 60 61 62 63 64 65 66
if {[info exist ::env(PHY_SYNTH)] && $::env(PHY_SYNTH) == 1} {
    defIn ${handoff_dir}/${DESIGN}.def
} else {
    defIn $floorplan_def
    addHaloToBlock -allMacro $HALO_WIDTH $HALO_WIDTH $HALO_WIDTH $HALO_WIDTH
    place_design -concurrent_macros
    refine_macro_place
}
67

sakundu committed
68
saveDesign ${encDir}/${DESIGN}_floorplan.enc
69 70 71

setPlaceMode -place_detail_legalization_inst_gap 1
setFillerMode -fitGap true
sakundu committed
72 73
setDesignMode -topRoutingLayer $TOP_ROUTING_LAYER
setDesignMode -bottomRoutingLayer 2 
sakundu committed
74 75

place_opt_design -out_dir $rptDir -prefix place
76
saveDesign $encDir/${DESIGN}_placed.enc
sakundu committed
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94

set_ccopt_property post_conditioning_enable_routing_eco 1
set_ccopt_property -cts_def_lock_clock_sinks_after_routing true
setOptMode -unfixClkInstForOpt false

create_ccopt_clock_tree_spec
ccopt_design

set_interactive_constraint_modes [all_constraint_modes -active]
set_propagated_clock [all_clocks]
set_clock_propagation propagated

# ------------------------------------------------------------------------------
# Routing
# ------------------------------------------------------------------------------
setNanoRouteMode -drouteVerboseViolationSummary 1
setNanoRouteMode -routeWithSiDriven true
setNanoRouteMode -routeWithTimingDriven true
sakundu committed
95
setNanoRouteMode -routeUseAutoVia true
sakundu committed
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111

##Recommended by lib owners
# Prevent router modifying M1 pins shapes
setNanoRouteMode -routeWithViaInPin "1:1"
setNanoRouteMode -routeWithViaOnlyForStandardCellPin "1:1"

## limit VIAs to ongrid only for VIA1 (S1)
setNanoRouteMode -drouteOnGridOnly "via 1:1"
setNanoRouteMode -drouteAutoStop false
setNanoRouteMode -drouteExpAdvancedMarFix true
setNanoRouteMode -routeExpAdvancedTechnology true

#SM suggestion for solving long extraction runtime during GR
setNanoRouteMode -grouteExpWithTimingDriven false

routeDesign
sakundu committed
112
#route_opt_design
113 114
saveDesign ${encDir}/${DESIGN}_route.enc
defOut -netlist -floorplan -routing ${DESIGN}_route.def
sakundu committed
115 116

summaryReport -noHtml -outfile summaryReport/post_route.sum
117 118
saveDesign ${encDir}/${DESIGN}.enc
defOut -netlist -floorplan -routing ${DESIGN}.def
sakundu committed
119 120

exit