Skip to content

Commit 6f3ca9f

Browse files
committed
flow: move eliminate_dead_logic from floorplan.tcl into synth_odb.tcl
Run eliminate_dead_logic just before write_db in synth_odb.tcl so that 1_synth.odb already reflects the live design and the synthesis-stage report doesn't show a surprising endpoint drop versus floorplan. This matters for parallel synthesis flows (e.g., MegaBoom) where yosys only sees a slice of the design at a time and cannot prune logic that is dead only when looking at the whole design. In those flows this step can eliminate vast quantities of debug logic — for MegaBoom it has historically removed ~50% of the design. Place the call before source_step_tcl POST SYNTH so any reporting in a user POST_SYNTH_TCL hook sees the already-pruned design — the standard ORFS pattern of POST hooks running on the final state of the stage. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent 52b6f9d commit 6f3ca9f

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

‎flow/scripts/floorplan.tcl‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ proc report_unused_masters { } {
3232

3333
report_unused_masters
3434

35-
# Eliminate dead logic
36-
eliminate_dead_logic
37-
38-
3935
#Run check_setup
4036
puts "\n=========================================================================="
4137
puts "Floorplan check_setup"

‎flow/scripts/synth_odb.tcl‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ erase_non_stage_variables synth
44
load_design 1_2_yosys.v 1_2_yosys.sdc
55
source_step_tcl PRE SYNTH
66

7+
# Eliminate dead logic before writing the synthesis odb so that
8+
# 1_synth.odb already reflects the live design.
9+
#
10+
# This matters for parallel synthesis flows (e.g., MegaBoom) where yosys
11+
# only sees a slice of the design at a time and cannot prune logic that
12+
# is dead only when looking at the whole design. In those flows this
13+
# step can eliminate vast quantities of debug logic — for MegaBoom it
14+
# has historically removed ~50% of the design.
15+
eliminate_dead_logic
16+
717
source_step_tcl POST SYNTH
818
orfs_write_db $::env(RESULTS_DIR)/1_synth.odb
919
# Canonicalize 1_synth.sdc. The original SDC_FILE provided by

0 commit comments

Comments
 (0)