Add repair_design for global routing (#1670)

\+ Add run_resizer_design_routing before run_resizer_timing_routing
Co-authored-by: kareefardi <kareem.farid@efabless.com>
This commit is contained in:
Mohamed Hosni
2023-03-02 02:55:32 -08:00
committed by GitHub
parent e10820ecf5
commit 93c8d84c0d
5 changed files with 104 additions and 2 deletions

View File

@@ -40,6 +40,7 @@ set ::env(DRT_OPT_ITERS) 64
# GLB Resizer
set ::env(GLB_OPTIMIZE_MIRRORING) 1
set ::env(GLB_RESIZER_TIMING_OPTIMIZATIONS) 1
set ::env(GLB_RESIZER_DESIGN_OPTIMIZATIONS) 1
set ::env(GLB_RESIZER_MAX_WIRE_LENGTH) 0
set ::env(GLB_RESIZER_MAX_SLEW_MARGIN) 10
set ::env(GLB_RESIZER_MAX_CAP_MARGIN) 10

View File

@@ -120,6 +120,8 @@ set ::env(PL_RESIZER_TIMING_OPTIMIZATIONS) 0
set ::env(PL_RESIZER_BUFFER_INPUT_PORTS) 0
set ::env(PL_RESIZER_BUFFER_OUTPUT_PORTS) 0
set ::env(GLB_RESIZER_DESIGN_OPTIMIZATIONS) 0
set ::env(FP_PDN_ENABLE_RAILS) 0
set ::env(DIODE_INSERTION_STRATEGY) 0

View File

@@ -206,6 +206,7 @@ These variables worked initially, but they were too sky130 specific and will be
| `RT_CLOCK_MIN_LAYER` | The name of lowest layer to be used in routing the clock net. <br> (Default: `RT_MIN_LAYER`)|
| `RT_CLOCK_MAX_LAYER` | The name of highest layer to be used in routing the clock net. <br> (Default: `RT_MAX_LAYER`)|
| `GLB_RESIZER_TIMING_OPTIMIZATIONS` | Specifies whether resizer timing optimizations should be performed after global routing or not. 0 = false, 1 = true <br> (Default: `1`)
| `GLB_RESIZER_DESIGN_OPTIMIZATIONS` | Specifies whether resizer design optimizations should be performed after global routing or not. 0 = false, 1 = true <br> (Default: `1`)
| `GLB_RESIZER_MAX_WIRE_LENGTH` | Specifies the maximum wire length cap used by resizer to insert buffers. If set to 0, no buffers will be inserted. Value in microns. <br> (Default: `0`)|
| `GLB_RESIZER_MAX_SLEW_MARGIN` | Specifies a margin for the slews. <br> (Default: `10`)|
| `GLB_RESIZER_MAX_CAP_MARGIN` | Specifies a margin for the capacitances. <br> (Default: `10`)|

View File

@@ -0,0 +1,78 @@
# Copyright 2020-2022 Efabless Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.
source $::env(SCRIPTS_DIR)/openroad/common/io.tcl
read -override_libs "$::env(RSZ_LIB)"
set_propagated_clock [all_clocks]
# set don't touch nets
source $::env(SCRIPTS_DIR)/openroad/common/resizer.tcl
set_dont_touch_rx "$::env(RSZ_DONT_TOUCH_RX)"
# set don't use cells
if { [info exists ::env(DONT_USE_CELLS)] } {
set_dont_use $::env(DONT_USE_CELLS)
}
source $::env(SCRIPTS_DIR)/openroad/common/set_routing_layers.tcl
source $::env(SCRIPTS_DIR)/openroad/common/set_layer_adjustments.tcl
set arg_list [list]
lappend arg_list -congestion_iterations $::env(GRT_OVERFLOW_ITERS)
lappend arg_list -verbose
if { $::env(GRT_ALLOW_CONGESTION) == 1 } {
lappend arg_list -allow_congestion
}
puts $arg_list
global_route {*}$arg_list
# set rc values
source $::env(SCRIPTS_DIR)/openroad/common/set_rc.tcl
# estimate wire rc parasitics
estimate_parasitics -global_routing
# Resize
set arg_list [list]
lappend arg_list -slew_margin $::env(GLB_RESIZER_MAX_SLEW_MARGIN)
lappend arg_list -cap_margin $::env(GLB_RESIZER_MAX_CAP_MARGIN)
if { [info exists ::env(GLB_RESIZER_MAX_WIRE_LENGTH)] \
&& $::env(GLB_RESIZER_MAX_WIRE_LENGTH) } {
lappend -max_wire_length $::env(GLB_RESIZER_MAX_WIRE_LENGTH)
}
repair_design {*}$arg_list
source $::env(SCRIPTS_DIR)/openroad/common/dpl_cell_pad.tcl
detailed_placement
if { $::env(GLB_OPTIMIZE_MIRRORING) } {
optimize_mirroring
}
if { [catch {check_placement -verbose} errmsg] } {
puts stderr $errmsg
exit 1
}
unset_dont_touch_rx "$::env(RSZ_DONT_TOUCH_RX)"
write
# Run post timing optimizations STA
estimate_parasitics -global_routing
set ::env(RUN_STANDALONE) 0
source $::env(SCRIPTS_DIR)/openroad/sta.tcl

View File

@@ -385,6 +385,7 @@ proc run_routing {args} {
# |---------------- 5. ROUTING ----------------------|
# |----------------------------------------------------|
run_resizer_design_routing
run_resizer_timing_routing
if { $::env(RSZ_USE_OLD_REMOVER) == 1} {
remove_buffers_from_nets
@@ -444,15 +445,34 @@ proc run_routing {args} {
set ::env(timer_routed) [clock seconds]
}
proc run_resizer_design_routing {args} {
if { $::env(GLB_RESIZER_DESIGN_OPTIMIZATIONS) == 1} {
increment_index
TIMER::timer_start
set log [index_file $::env(routing_logs)/resizer_design.log]
puts_info "Running Global Routing Resizer Design Optimizations (log: [relpath . $log])..."
run_openroad_script $::env(SCRIPTS_DIR)/openroad/resizer_routing_design.tcl\
-indexed_log $log\
-save "dir=$::env(routing_tmpfiles),def,sdc,odb,netlist,powered_netlist"
TIMER::timer_stop
exec echo "[TIMER::get_runtime]" | python3 $::env(SCRIPTS_DIR)/write_runtime.py "resizer design optimizations - openroad"
} else {
puts_info "Skipping Global Routing Resizer Design Optimizations."
}
}
proc run_resizer_timing_routing {args} {
if { $::env(GLB_RESIZER_TIMING_OPTIMIZATIONS) == 1} {
increment_index
TIMER::timer_start
set log [index_file $::env(routing_logs)/resizer.log]
set log [index_file $::env(routing_logs)/resizer_timing.log]
puts_info "Running Global Routing Resizer Timing Optimizations (log: [relpath . $log])..."
run_openroad_script $::env(SCRIPTS_DIR)/openroad/resizer_routing_timing.tcl\
-indexed_log [index_file $::env(routing_logs)/resizer.log]\
-indexed_log $log\
-save "dir=$::env(routing_tmpfiles),def,sdc,odb,netlist,powered_netlist"
TIMER::timer_stop