Skip to content

Commit 601b919

Browse files
committed
flow: move repair_tie_fanout into synth_odb.tcl before remove_buffers
PR #4187 moved remove_buffers, replace_arith_modules and repair_timing_helper out of floorplan.tcl into synth_odb.tcl, but left repair_tie_fanout behind in floorplan.tcl. That flipped the relative order: in master repair_tie_fanout had run *before* remove_buffers (a load-bearing invariant the dropped ordering comment was guarding); in the new flow it ran against the already-unbuffered netlist. The behavior difference is small but real. On asap7/ibex it produced 14 TIELOx1 instances instead of 15, propagated through global placement, and the design entered CTS in a state that converged to ~5x worse setup TNS: cts setup TNS master -961 ps PR (pre-fix) -5584 ps Move repair_tie_fanout into synth_odb.tcl ahead of replace_arith_modules and the remove_buffers / repair_timing_helper branch so the original ordering is preserved. Re-running asap7/ibex with this fix gets the TIELO count back to 15. TIE_SEPARATION and SKIP_REPAIR_TIE_FANOUT now live in the synth stage in variables.yaml/json so they survive the synth-stage erase_non_stage_variables call. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent 975e5cf commit 601b919

4 files changed

Lines changed: 27 additions & 22 deletions

File tree

flow/scripts/floorplan.tcl

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -75,22 +75,6 @@ if { [env_var_exists_and_non_empty FASTROUTE_TCL] } {
7575

7676
source_env_var_if_exists FOOTPRINT_TCL
7777

78-
if { !$::env(SKIP_REPAIR_TIE_FANOUT) } {
79-
# Repair tie lo fanout
80-
puts "Repair tie lo fanout..."
81-
set tielo_cell_name [lindex $::env(TIELO_CELL_AND_PORT) 0]
82-
set tielo_lib_name [get_name [get_property [lindex [get_lib_cell $tielo_cell_name] 0] library]]
83-
set tielo_pin $tielo_lib_name/$tielo_cell_name/[lindex $::env(TIELO_CELL_AND_PORT) 1]
84-
repair_tie_fanout -separation $::env(TIE_SEPARATION) $tielo_pin
85-
86-
# Repair tie hi fanout
87-
puts "Repair tie hi fanout..."
88-
set tiehi_cell_name [lindex $::env(TIEHI_CELL_AND_PORT) 0]
89-
set tiehi_lib_name [get_name [get_property [lindex [get_lib_cell $tiehi_cell_name] 0] library]]
90-
set tiehi_pin $tiehi_lib_name/$tiehi_cell_name/[lindex $::env(TIEHI_CELL_AND_PORT) 1]
91-
repair_tie_fanout -separation $::env(TIE_SEPARATION) $tiehi_pin
92-
}
93-
9478
puts "Default units for flow"
9579
report_units
9680
report_units_metric

flow/scripts/synth_odb.tcl

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,27 @@ check_setup
5151
set num_instances [llength [get_cells -hier *]]
5252
puts "number instances in verilog is $num_instances"
5353

54+
# repair_tie_fanout must run before remove_buffers and the timing-driven
55+
# transforms below: a single tie that drives multiple buffers (each driving
56+
# multiple loads) needs the fanout split per-buffer-load before remove_buffers
57+
# collapses the buffers, otherwise the resulting tie fanout is a different
58+
# netlist and cascades into worse setup TNS at CTS (~5x on asap7/ibex).
59+
if { !$::env(SKIP_REPAIR_TIE_FANOUT) } {
60+
# Repair tie lo fanout
61+
puts "Repair tie lo fanout..."
62+
set tielo_cell_name [lindex $::env(TIELO_CELL_AND_PORT) 0]
63+
set tielo_lib_name [get_name [get_property [lindex [get_lib_cell $tielo_cell_name] 0] library]]
64+
set tielo_pin $tielo_lib_name/$tielo_cell_name/[lindex $::env(TIELO_CELL_AND_PORT) 1]
65+
repair_tie_fanout -separation $::env(TIE_SEPARATION) $tielo_pin
66+
67+
# Repair tie hi fanout
68+
puts "Repair tie hi fanout..."
69+
set tiehi_cell_name [lindex $::env(TIEHI_CELL_AND_PORT) 0]
70+
set tiehi_lib_name [get_name [get_property [lindex [get_lib_cell $tiehi_cell_name] 0] library]]
71+
set tiehi_pin $tiehi_lib_name/$tiehi_cell_name/[lindex $::env(TIEHI_CELL_AND_PORT) 1]
72+
repair_tie_fanout -separation $::env(TIE_SEPARATION) $tiehi_pin
73+
}
74+
5475
if { [env_var_exists_and_non_empty SWAP_ARITH_OPERATORS] } {
5576
# Enable sanity checker until replace_arith_modules becomes stable
5677
set_debug_level ODB replace_design_check_sanity 1

flow/scripts/variables.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flow/scripts/variables.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ TIE_SEPARATION:
365365
description: |
366366
Distance separating tie high/low instances from the load.
367367
stages:
368-
- floorplan
368+
- synth
369369
default: 0
370370
UNSET_ABC9_BOX_CELLS:
371371
description: |
@@ -810,9 +810,9 @@ SKIP_CTS_REPAIR_TIMING:
810810
default: 0
811811
SKIP_REPAIR_TIE_FANOUT:
812812
description: >
813-
Skip repair_tie_fanout at floorplan step.
813+
Skip repair_tie_fanout at synth step.
814814
stages:
815-
- floorplan
815+
- synth
816816
default: 0
817817
MIN_ROUTING_LAYER:
818818
description: |

0 commit comments

Comments
 (0)