From 005a104891216af5921ca708b6f3c39c6ef87925 Mon Sep 17 00:00:00 2001 From: Eryk Szpotanski Date: Mon, 25 Nov 2024 12:03:28 +0100 Subject: [PATCH 1/3] scripts: Add REPAIR_TIMING_MAX_PASSES_PER_ITER parameters Signed-off-by: Eryk Szpotanski --- flow/scripts/cts.tcl | 2 +- flow/scripts/floorplan.tcl | 6 +++--- flow/scripts/global_route.tcl | 2 +- flow/scripts/util.tcl | 11 ++++++++++- flow/scripts/variables.yaml | 18 ++++++++++++++++++ 5 files changed, 33 insertions(+), 6 deletions(-) diff --git a/flow/scripts/cts.tcl b/flow/scripts/cts.tcl index 55f4a06207..a776ee49e6 100644 --- a/flow/scripts/cts.tcl +++ b/flow/scripts/cts.tcl @@ -69,7 +69,7 @@ if {![env_var_equals SKIP_CTS_REPAIR_TIMING 1]} { write_eqy_verilog 4_before_rsz.v } - repair_timing_helper + repair_timing_helper "cts" if {$::env(EQUIVALENCE_CHECK)} { run_equivalence_test diff --git a/flow/scripts/floorplan.tcl b/flow/scripts/floorplan.tcl index d2b26dbefe..97fa5565f6 100644 --- a/flow/scripts/floorplan.tcl +++ b/flow/scripts/floorplan.tcl @@ -108,13 +108,13 @@ if { [env_var_equals REMOVE_ABC_BUFFERS 1] } { # remove buffers inserted by yosys/abc remove_buffers } else { - repair_timing_helper 0 + repair_timing_helper "floorplan" 0 } ##### Restructure for timing ######### if { [env_var_equals RESYNTH_TIMING_RECOVER 1] } { repair_design_helper - repair_timing_helper + repair_timing_helper "floorplan" # pre restructure area/timing report (ideal clocks) puts "Post synth-opt area" report_design_area @@ -134,7 +134,7 @@ if { [env_var_equals RESYNTH_TIMING_RECOVER 1] } { # post restructure area/timing report (ideal clocks) remove_buffers repair_design_helper - repair_timing_helper + repair_timing_helper "floorplan" puts "Post restructure-opt wns" report_worst_slack -max -digits 3 diff --git a/flow/scripts/global_route.tcl b/flow/scripts/global_route.tcl index 16639a3c93..8b3b57ac06 100644 --- a/flow/scripts/global_route.tcl +++ b/flow/scripts/global_route.tcl @@ -67,7 +67,7 @@ proc global_route_helper {} { puts "Repair setup and hold violations..." estimate_parasitics -global_routing - repair_timing_helper + repair_timing_helper "grt" if { $::env(DETAILED_METRICS) } { report_metrics 5 "global route post repair timing" diff --git a/flow/scripts/util.tcl b/flow/scripts/util.tcl index 1438b8ea07..e04ba0e984 100644 --- a/flow/scripts/util.tcl +++ b/flow/scripts/util.tcl @@ -16,7 +16,7 @@ proc fast_route {} { } } -proc repair_timing_helper { {hold_margin 1} } { +proc repair_timing_helper { stage {hold_margin 1} } { set additional_args "-verbose" append_env_var additional_args SETUP_SLACK_MARGIN -setup_margin 1 if {$hold_margin || $::env(HOLD_SLACK_MARGIN) < 0} { @@ -28,6 +28,15 @@ proc repair_timing_helper { {hold_margin 1} } { append_env_var additional_args SKIP_BUFFER_REMOVAL -skip_buffer_removal 0 append_env_var additional_args SKIP_LAST_GASP -skip_last_gasp 0 append_env_var additional_args MATCH_CELL_FOOTPRINT -match_cell_footprint 0 + if { $stage == "floorplan"} { + set max_passes_prefix "FP_" + } elseif { $stage == "cts" } { + set max_passes_prefix "CTS_" + } elseif { $stage == "grt"} { + set max_passes_prefix "GRT_" + } + append_env_var additional_args "${max_passes_prefix}REPAIR_TIMING_MAX_PASSES_PER_ITER" -max_passes_per_iter 1 + puts "repair_timing [join $additional_args " "]" log_cmd repair_timing {*}$additional_args } diff --git a/flow/scripts/variables.yaml b/flow/scripts/variables.yaml index eb2453ad6b..5fe93284ab 100644 --- a/flow/scripts/variables.yaml +++ b/flow/scripts/variables.yaml @@ -312,6 +312,12 @@ IO_PLACER_V: stages: - floorplan - place +FP_REPAIR_TIMING_MAX_PASSES_PER_ITER: + description: > + Maximum number of repairs per iteration during repair_timing, called from floorplan. + default: 20 + stages: + - floorplan GUI_TIMING: description: > Load timing information when opening GUI. For large designs, this can @@ -708,6 +714,12 @@ CTS_CLUSTER_SIZE: default: 50 stages: - cts +CTS_REPAIR_TIMING_MAX_PASSES_PER_ITER: + description: > + Maximum number of repairs per iteration during repair_timing, called from CTS. + default: 20 + stages: + - cts CTS_SNAPSHOT: description: > Creates ODB/SDC files prior to clock net and setup/hold repair. @@ -739,6 +751,12 @@ GLOBAL_ROUTE_ARGS: stages: - grt default: -congestion_iterations 30 -congestion_report_iter_step 5 -verbose +GRT_REPAIR_TIMING_MAX_PASSES_PER_ITER: + description: > + Maximum number of repairs per iteration during repair_timing, called from GRT. + default: 20 + stages: + - grt MATCH_CELL_FOOTPRINT: description: > Enforce sizing operations to only swap cells that have the same layout From ebceafab660c8819122220047837a884d3b316df Mon Sep 17 00:00:00 2001 From: Eryk Szpotanski Date: Mon, 25 Nov 2024 12:04:40 +0100 Subject: [PATCH 2/3] designs: Set REPAIR_TIMING_MAX_PASSES_PER_ITER params for a few designs Signed-off-by: Eryk Szpotanski --- flow/designs/asap7/ibex/config.mk | 4 ++++ flow/designs/gf180/aes-hybrid/config.mk | 4 ++++ flow/designs/gf180/aes/config.mk | 4 ++++ flow/designs/gf180/ibex/config.mk | 4 ++++ flow/designs/nangate45/black_parrot/config.mk | 3 +++ flow/designs/nangate45/bp_fe_top/config.mk | 3 +++ flow/designs/nangate45/swerv_wrapper/config.mk | 4 ++++ flow/designs/sky130hd/gcd/config.mk | 4 ++++ flow/designs/sky130hd/microwatt/config.mk | 4 ++++ 9 files changed, 34 insertions(+) diff --git a/flow/designs/asap7/ibex/config.mk b/flow/designs/asap7/ibex/config.mk index b49ef0dac7..6f37328c11 100644 --- a/flow/designs/asap7/ibex/config.mk +++ b/flow/designs/asap7/ibex/config.mk @@ -15,3 +15,7 @@ export ENABLE_DPO = 0 export TNS_END_PERCENT = 100 +export FP_REPAIR_TIMING_MAX_PASSES_PER_ITER = 5 +export CTS_REPAIR_TIMING_MAX_PASSES_PER_ITER = 30 +export GRT_REPAIR_TIMING_MAX_PASSES_PER_ITER = 20 + diff --git a/flow/designs/gf180/aes-hybrid/config.mk b/flow/designs/gf180/aes-hybrid/config.mk index 7da1e35827..3d0d5adf4e 100644 --- a/flow/designs/gf180/aes-hybrid/config.mk +++ b/flow/designs/gf180/aes-hybrid/config.mk @@ -42,3 +42,7 @@ export DESIGN_TYPE = CELL else export DESIGN_TYPE = CELL_NODEN endif + +export FP_REPAIR_TIMING_MAX_PASSES_PER_ITER=10000 +export CTS_REPAIR_TIMING_MAX_PASSES_PER_ITER=10000 +export GRT_REPAIR_TIMING_MAX_PASSES_PER_ITER=10000 diff --git a/flow/designs/gf180/aes/config.mk b/flow/designs/gf180/aes/config.mk index 74abc9da2d..d7ecdc6f5d 100644 --- a/flow/designs/gf180/aes/config.mk +++ b/flow/designs/gf180/aes/config.mk @@ -17,3 +17,7 @@ export DESIGN_TYPE = CELL else export DESIGN_TYPE = CELL_NODEN endif + +export FP_REPAIR_TIMING_MAX_PASSES_PER_ITER=1000 +export CTS_REPAIR_TIMING_MAX_PASSES_PER_ITER=1000 +export GRT_REPAIR_TIMING_MAX_PASSES_PER_ITER=1000 diff --git a/flow/designs/gf180/ibex/config.mk b/flow/designs/gf180/ibex/config.mk index ebeeadf520..d584e9d41c 100644 --- a/flow/designs/gf180/ibex/config.mk +++ b/flow/designs/gf180/ibex/config.mk @@ -44,3 +44,7 @@ export SDC_FILE = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NICKNAME)/constraint. export CORE_UTILIZATION = 45 export PLACE_DENSITY_LB_ADDON = 0.1 + +export FP_REPAIR_TIMING_MAX_PASSES_PER_ITER=30 +export CTS_REPAIR_TIMING_MAX_PASSES_PER_ITER=40 +export GRT_REPAIR_TIMING_MAX_PASSES_PER_ITER=30 diff --git a/flow/designs/nangate45/black_parrot/config.mk b/flow/designs/nangate45/black_parrot/config.mk index 16e60bd058..f9043da518 100644 --- a/flow/designs/nangate45/black_parrot/config.mk +++ b/flow/designs/nangate45/black_parrot/config.mk @@ -39,3 +39,6 @@ export PLACE_DENSITY_LB_ADDON = 0.05 export MACRO_PLACE_HALO = 10 10 export MACRO_PLACE_CHANNEL = 20 20 export TNS_END_PERCENT = 100 + +export FP_REPAIR_TIMING_MAX_PASSES_PER_ITER = 5 +export GRT_REPAIR_TIMING_MAX_PASSES_PER_ITER = 30 diff --git a/flow/designs/nangate45/bp_fe_top/config.mk b/flow/designs/nangate45/bp_fe_top/config.mk index 8962d30efd..b4bcccc638 100644 --- a/flow/designs/nangate45/bp_fe_top/config.mk +++ b/flow/designs/nangate45/bp_fe_top/config.mk @@ -35,3 +35,6 @@ export PLACE_DENSITY_MAX_POST_HOLD = 0.12 export TNS_END_PERCENT = 100 export FASTROUTE_TCL = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NAME)/fastroute.tcl + +export CTS_REPAIR_TIMING_MAX_PASSES_PER_ITER=1000 +export GRT_REPAIR_TIMING_MAX_PASSES_PER_ITER=1000 diff --git a/flow/designs/nangate45/swerv_wrapper/config.mk b/flow/designs/nangate45/swerv_wrapper/config.mk index 2f9dc7fe92..0f248d0a05 100644 --- a/flow/designs/nangate45/swerv_wrapper/config.mk +++ b/flow/designs/nangate45/swerv_wrapper/config.mk @@ -34,3 +34,7 @@ export TNS_END_PERCENT = 100 export FASTROUTE_TCL = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NAME)/fastroute.tcl export GPL_KEEP_OVERFLOW = 0 + +export FP_REPAIR_TIMING_MAX_PASSES_PER_ITER=50 +export CTS_REPAIR_TIMING_MAX_PASSES_PER_ITER=50 +export GRT_REPAIR_TIMING_MAX_PASSES_PER_ITER=50 diff --git a/flow/designs/sky130hd/gcd/config.mk b/flow/designs/sky130hd/gcd/config.mk index 9b725dcf0b..fcd5492949 100644 --- a/flow/designs/sky130hd/gcd/config.mk +++ b/flow/designs/sky130hd/gcd/config.mk @@ -11,3 +11,7 @@ export CORE_UTILIZATION = 40 export TNS_END_PERCENT = 100 export EQUIVALENCE_CHECK ?= 1 export REMOVE_CELLS_FOR_EQY = sky130_fd_sc_hd__tapvpwrvgnd* + +export FP_REPAIR_TIMING_MAX_PASSES_PER_ITER=1000 +export CTS_REPAIR_TIMING_MAX_PASSES_PER_ITER=1000 +export GRT_REPAIR_TIMING_MAX_PASSES_PER_ITER=1000 diff --git a/flow/designs/sky130hd/microwatt/config.mk b/flow/designs/sky130hd/microwatt/config.mk index 8b20a0f8b7..3dab929b8b 100644 --- a/flow/designs/sky130hd/microwatt/config.mk +++ b/flow/designs/sky130hd/microwatt/config.mk @@ -37,3 +37,7 @@ export SETUP_SLACK_MARGIN = 0.2 # to real SRAMs and not instantiated as flops export SYNTH_MEMORY_MAX_BITS ?= 42000 +export FP_REPAIR_TIMING_MAX_PASSES_PER_ITER=1000 +export CTS_REPAIR_TIMING_MAX_PASSES_PER_ITER=1000 +export GRT_REPAIR_TIMING_MAX_PASSES_PER_ITER=1000 + From ca642cae2492a421bddab361a75996680541ca3f Mon Sep 17 00:00:00 2001 From: Eryk Szpotanski Date: Mon, 25 Nov 2024 17:57:33 +0100 Subject: [PATCH 3/3] openroad: bump Signed-off-by: Eryk Szpotanski --- tools/OpenROAD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/OpenROAD b/tools/OpenROAD index 7fb347f37d..fd90261c8c 160000 --- a/tools/OpenROAD +++ b/tools/OpenROAD @@ -1 +1 @@ -Subproject commit 7fb347f37d0068b4a9344d7e6ae1b668360e174e +Subproject commit fd90261c8c418a1d4359124a99f2c920c14841b6