Skip to content

Commit

Permalink
Rework Antenna Repair (The-OpenROAD-Project#1968)
Browse files Browse the repository at this point in the history
- Remove BM64 test design
~ Update a couple of CI designs enabling RUN_HEURISTIC_DIODE_INSERTION and DIODE_ON_PORTS
~ Move OpenROAD DPL logic and API calls to scripts/openroad/common/dpl.tcl and update scripts/openroad/dpl.tcl accordingly
~ Move OpenROAD GRT logic and API calls to scripts/openroad/common/grt.tcl and update scripts/openroad/grt.tcl accordingly
~ Use `repair_antennas.tcl` instead of running it inside GRT script
+ Add scripts/openroad/repair_antennas.tcl with the following flow:
	* GRT - needed to run OR's repair antennas
	* OR's repair antennas (with cell padding for diodes)
	* DPL to legalize
	* GRT to create new guides for legalized cells
  • Loading branch information
kareefardi authored Sep 5, 2023
1 parent d03ecd9 commit df7fd51
Show file tree
Hide file tree
Showing 13 changed files with 94 additions and 47 deletions.
1 change: 0 additions & 1 deletion .github/test_sets/test_sets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
- scl: sky130A/sky130_fd_sc_hd
name: extended_test_set
designs:
- ./designs/ci/BM64
- ./designs/ci/salsa20
- ./designs/ci/aes_core
- ./designs/ci/blabla
Expand Down
1 change: 0 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ pipeline {
"ci/aes_core",
"ci/APU",
"ci/blabla",
"'ci/BM64 -override_env QUIT_ON_LINTER_ERRORS=0'",
"ci/gcd",
"ci/inverter",
"ci/manual_macro_placement_test",
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ veryclean:
@git clean -fdX

clean_runs:
@rm -rf ./designs/*/runs && rm -rf ./_build/it_tc_logs && echo "Runs cleaned successfully." || echo "Failed to delete runs."
@rm -rf ./designs/ci/*/runs && rm -rf ./_build/it_tc_logs && echo "Runs cleaned successfully." || echo "Failed to delete runs."
@rm -rf ./tests/*/runs && echo "Test runs cleaned successfully." || echo "Failed to delete test runs."

clean_results:
Expand Down
2 changes: 1 addition & 1 deletion docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN_BASE_IMAGE := $(TOOL_REPOSITORY):$(RUN_BASE_TAG)
export BUILD_COMMAND ?= docker build --no-cache

TOOLS = $(shell $(PYTHON_BIN) ../dependencies/tool.py --containerized --no-pdks .)
OPENLANE_SKELETON=configuration dependencies designs regression_results scripts AUTHORS.md env.py flow.tcl LICENSE run_designs.py
OPENLANE_SKELETON=configuration dependencies designs/spm regression_results scripts AUTHORS.md env.py flow.tcl LICENSE run_designs.py
TOOL_BUILD_TARGETS = $(foreach tool,$(TOOLS),build-$(tool))
TOOL_EXPORT_TARGETS = $(foreach tool,$(TOOLS),pull-$(tool))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
design,design_name,config,flow_status,total_runtime,routed_runtime,DIEAREA_mm^2,CellPer_mm^2,OpenDP_Util,Final_Util,Peak_Memory_Usage_MB,synth_cell_count,tritonRoute_violations,Short_violations,MetSpc_violations,OffGrid_violations,MinHole_violations,Other_violations,Magic_violations,pin_antenna_violations,net_antenna_violations,lvs_total_errors,cvc_total_errors,klayout_violations,wire_length,vias,wns,pl_wns,optimized_wns,fastroute_wns,spef_wns,tns,pl_tns,optimized_tns,fastroute_tns,spef_tns,HPWL,routing_layer1_pct,routing_layer2_pct,routing_layer3_pct,routing_layer4_pct,routing_layer5_pct,routing_layer6_pct,wires_count,wire_bits,public_wires_count,public_wire_bits,memories_count,memory_bits,processes_count,cells_pre_abc,AND,DFF,NAND,NOR,OR,XOR,XNOR,MUX,inputs,outputs,level,DecapCells,WelltapCells,DiodeCells,FillCells,NonPhysCells,TotalCells,CoreArea_um^2,power_slowest_internal_uW,power_slowest_switching_uW,power_slowest_leakage_uW,power_typical_internal_uW,power_typical_switching_uW,power_typical_leakage_uW,power_fastest_internal_uW,power_fastest_switching_uW,power_fastest_leakage_uW,critical_path_ns,CLOCK_PERIOD,FP_ASPECT_RATIO,FP_CORE_UTIL,FP_PDN_HPITCH,FP_PDN_VPITCH,GRT_ADJUSTMENT,GRT_REPAIR_ANTENNAS,PL_TARGET_DENSITY,RUN_HEURISTIC_DIODE_INSERTION,STD_CELL_LIBRARY,MAX_FANOUT_CONSTRAINT,SYNTH_STRATEGY
./designs/ci/APU,APU,run_config,flow completed,0h4m26s0ms,0h3m1s0ms,0.0983350472999999,34484.144698225005,36.06,36.0,792.03,3253,0,0,0,0,0,0,0,3,3,0,-1,-1,140372,25964,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,106197908.0,0.0,42.45,43.9,6.23,12.61,0.0,2847,3426,183,703,0,0,0,3120,89,40,102,150,274,250,56,1024,432,424,23,5671,1221,33,2252,3391,12568,88101.99680000001,-1,-1,-1,-1,-1,-1,-1,-1,-1,4.76,17.0,1,35,153.18,153.6,0.3,1,0.4,0,sky130_fd_sc_hd,6,AREA 0
./designs/ci/BM64,BM64,run_config,flow completed,0h21m34s0ms,0h7m10s0ms,1.0,11369.0,10.79,14.0,2185.41,10036,0,0,0,0,0,0,0,54,54,0,-1,-1,1244959,88394,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,1127965307.0,0.0,36.41,35.9,7.79,18.11,0.0,8380,12259,21,3896,0,0,0,9910,25,0,9,454,2211,950,347,262,1800,1287,33,64383,13718,3437,20269,11369,113176,965289.5392,-1,-1,-1,-1,-1,-1,-1,-1,-1,10.88,20.0,1,18,153.18,153.6,0.3,1,0.23,0,sky130_fd_sc_hd,6,AREA 0
./designs/ci/PPU,PPU,run_config,flow completed,0h13m54s0ms,0h6m31s0ms,0.733195271625,18162.9649226804,20.49,25.0,2077.11,12649,0,0,0,0,0,0,0,72,65,0,-1,-1,914385,99369,0.0,0.0,-1,0.0,0.0,0.0,0.0,-1,0.0,0.0,640716798.0,0.0,36.57,38.6,7.09,12.5,0.17,5308,8922,576,4178,0,0,0,7674,52,8,53,75,466,113,21,3014,2918,2927,21,43486,10075,708,14399,13317,81985,703299.52,-1,-1,-1,-1,-1,-1,-1,-1,-1,9.05,18.0,1,20,153.18,153.6,0.3,1,0.25,0,sky130_fd_sc_hd,8,AREA 0
./designs/ci/aes,aes,run_config,flow completed,0h31m18s0ms,0h16m12s0ms,1.5614589344249998,13835.778529747611,15.32,19.0,3995.48,20122,0,0,0,0,0,0,0,75,70,0,-1,-1,1906160,185725,-26.68,-45.4,-1,0.0,0.0,-77174.7,-129120.43,-1,0.0,0.0,1421600626.0,0.0,34.34,35.77,9.34,16.27,0.15,21918,39764,1376,19222,0,0,0,24130,219,143,88,346,8958,2179,691,1414,3037,3024,24,98615,21612,1617,28611,21604,172059,1519006.8479999998,-1,-1,-1,-1,-1,-1,-1,-1,-1,2.91,25.0,1,15,153.18,153.6,0.3,1,0.25,0,sky130_fd_sc_hd,8,AREA 0
./designs/ci/aes_core,aes_core,run_config,flow completed,0h38m54s0ms,0h17m41s0ms,0.8670581510250001,24200.22229788714,25.56,36.0,3197.34,19301,0,0,0,0,0,0,0,10,10,0,-1,-1,1995431,218062,-20.25,-33.48,-1,0.0,0.0,-47470.02,-78096.02,-1,0.0,0.0,1553775824.0,0.0,54.68,59.5,32.22,50.36,2.92,21779,38579,1339,18139,0,0,0,23475,303,11,176,343,8963,2035,834,1198,2865,2604,25,50614,11830,22472,31654,20983,137553,835761.5616,-1,-1,-1,-1,-1,-1,-1,-1,-1,2.9899999999999998,22.0,1,25,153.18,153.6,0.3,1,0.3,1,sky130_fd_sc_hd,6,AREA 0
Expand Down
2 changes: 1 addition & 1 deletion scripts/magic/def/antenna_check.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ extract
feedback save $::env(_tmp_feedback_file)

antennacheck debug
antennacheck
antennacheck
27 changes: 27 additions & 0 deletions scripts/openroad/common/dpl.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2020-2023 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/dpl_cell_pad.tcl

detailed_placement\
-max_displacement [subst { $::env(PL_MAX_DISPLACEMENT_X) $::env(PL_MAX_DISPLACEMENT_Y) }]

if { [info exists ::env(PL_OPTIMIZE_MIRRORING)] && $::env(PL_OPTIMIZE_MIRRORING) } {
optimize_mirroring
}

if { [catch {check_placement -verbose} errmsg] } {
puts stderr $errmsg
exit 1
}
33 changes: 33 additions & 0 deletions scripts/openroad/common/grt.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2020-2023 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/set_routing_layers.tcl

set_macro_extension $::env(GRT_MACRO_EXTENSION)

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
lappend arg_list -congestion_report_file $::env(GRT_CONGESTION_REPORT_FILE)
if { $::env(GRT_ALLOW_CONGESTION) == 1 } {
lappend arg_list -allow_congestion
}
puts $arg_list
global_route {*}$arg_list

if { $::env(GRT_REPAIR_ANTENNAS) } {
repair_antennas "$::env(DIODE_CELL)" -iterations $::env(GRT_ANT_ITERS) -ratio_margin $::env(GRT_ANT_MARGIN)
}
16 changes: 2 additions & 14 deletions scripts/openroad/dpl.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,6 @@
source $::env(SCRIPTS_DIR)/openroad/common/io.tcl
read

source $::env(SCRIPTS_DIR)/openroad/common/dpl_cell_pad.tcl
source $::env(SCRIPTS_DIR)/openroad/common/dpl.tcl

detailed_placement\
-max_displacement [subst { $::env(PL_MAX_DISPLACEMENT_X) $::env(PL_MAX_DISPLACEMENT_Y) }]

if { [info exists ::env(PL_OPTIMIZE_MIRRORING)] && $::env(PL_OPTIMIZE_MIRRORING) } {
optimize_mirroring
}

if { [catch {check_placement -verbose} errmsg] } {
puts stderr $errmsg
exit 1
}

write
write
25 changes: 2 additions & 23 deletions scripts/openroad/groute.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,8 @@ read

set_propagated_clock [all_clocks]

if { $::env(GRT_REPAIR_ANTENNAS) } {
set_placement_padding -masters $::env(DIODE_CELL) -left $::env(DIODE_PADDING)
}
source $::env(SCRIPTS_DIR)/openroad/common/dpl_cell_pad.tcl

source $::env(SCRIPTS_DIR)/openroad/common/set_routing_layers.tcl

set_macro_extension $::env(GRT_MACRO_EXTENSION)

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
lappend arg_list -congestion_report_file $::env(GRT_CONGESTION_REPORT_FILE)
if { $::env(GRT_ALLOW_CONGESTION) == 1 } {
lappend arg_list -allow_congestion
}
puts $arg_list
global_route {*}$arg_list

if { $::env(GRT_REPAIR_ANTENNAS) } {
repair_antennas "$::env(DIODE_CELL)" -iterations $::env(GRT_ANT_ITERS) -ratio_margin $::env(GRT_ANT_MARGIN)
check_placement
}
source $::env(SCRIPTS_DIR)/openroad/common/grt.tcl

write
24 changes: 24 additions & 0 deletions scripts/openroad/repair_antennas.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2020-2023 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

source $::env(SCRIPTS_DIR)/openroad/common/grt.tcl
source $::env(SCRIPTS_DIR)/openroad/common/dpl_cell_pad.tcl ; # just in case
repair_antennas "$::env(DIODE_CELL)" -iterations $::env(GRT_ANT_ITERS) -ratio_margin $::env(GRT_ANT_MARGIN)
source $::env(SCRIPTS_DIR)/openroad/common/dpl.tcl
source $::env(SCRIPTS_DIR)/openroad/common/grt.tcl

write

5 changes: 2 additions & 3 deletions scripts/tcl_commands/routing.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ proc global_routing_fastroute {args} {
set initial_odb [index_file $::env(routing_tmpfiles)/global.odb]

set ::env(GRT_CONGESTION_REPORT_FILE) $::env(routing_tmpfiles)/groute-congestion.rpt
run_openroad_script $::env(SCRIPTS_DIR)/openroad/groute.tcl\
run_openroad_script $::env(SCRIPTS_DIR)/openroad/repair_antennas.tcl\
-indexed_log $log\
-save "def=$initial_def,guide=$initial_guide,odb=$initial_odb"\
-no_update_current
Expand All @@ -64,10 +64,9 @@ proc global_routing_fastroute {args} {
--new-prefix "INSDIODE$iter"

set log [index_file $::env(routing_logs)/antenna_route_$iter.log]
run_openroad_script $::env(SCRIPTS_DIR)/openroad/groute.tcl\
run_openroad_script $::env(SCRIPTS_DIR)/openroad/repair_antennas.tcl\
-indexed_log $log\
-save "to=$::env(routing_tmpfiles),name=global_$iter,def,guide,odb"\
-no_update_current

set antennae [groute_antenna_extract -from_log $log]

Expand Down

0 comments on commit df7fd51

Please sign in to comment.