Skip to content

Commit e5477f1

Browse files
committed
flow: move netlist inspections from floorplan.tcl into synth_odb.tcl
report_unused_masters, check_setup, and the post-synth instance count are pure inspections of the loaded netlist + library. They do not depend on having a floorplan, and reporting them at the synthesis stage matches what they actually describe — the synthesized netlist that 1_synth.odb will contain. Rename the check_setup banner from "Floorplan check_setup" to "Synthesis check_setup" to reflect its real role. Place the inspections before source_step_tcl POST SYNTH so a user POST_SYNTH_TCL hook sees the same final state the inspections reported on — 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 6f3ca9f commit e5477f1

2 files changed

Lines changed: 37 additions & 37 deletions

File tree

‎flow/scripts/floorplan.tcl‎

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,6 @@ erase_non_stage_variables floorplan
44
load_design 1_synth.odb 1_synth.sdc
55
source_step_tcl PRE FLOORPLAN
66

7-
proc report_unused_masters { } {
8-
set db [ord::get_db]
9-
set libs [$db getLibs]
10-
set masters ""
11-
foreach lib $libs {
12-
foreach master [$lib getMasters] {
13-
# filter out non-block masters, or you can remove this conditional to detect any unused master
14-
if { [$master getType] == "BLOCK" } {
15-
lappend masters $master
16-
}
17-
}
18-
}
19-
20-
set block [ord::get_db_block]
21-
set insts [$block getInsts]
22-
23-
foreach inst $insts {
24-
set inst_master [$inst getMaster]
25-
set masters [lsearch -all -not -inline $masters $inst_master]
26-
}
27-
28-
foreach master $masters {
29-
puts "Master [$master getName] is loaded but not used in the design"
30-
}
31-
}
32-
33-
report_unused_masters
34-
35-
#Run check_setup
36-
puts "\n=========================================================================="
37-
puts "Floorplan check_setup"
38-
puts "--------------------------------------------------------------------------"
39-
check_setup
40-
41-
set num_instances [llength [get_cells -hier *]]
42-
puts "number instances in verilog is $num_instances"
43-
447
set additional_args ""
458
append_env_var additional_args ADDITIONAL_SITES -additional_sites 1
469

‎flow/scripts/synth_odb.tcl‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,43 @@ source_step_tcl PRE SYNTH
1414
# has historically removed ~50% of the design.
1515
eliminate_dead_logic
1616

17+
proc report_unused_masters { } {
18+
set db [ord::get_db]
19+
set libs [$db getLibs]
20+
set masters ""
21+
foreach lib $libs {
22+
foreach master [$lib getMasters] {
23+
# filter out non-block masters, or you can remove this conditional to detect any unused master
24+
if { [$master getType] == "BLOCK" } {
25+
lappend masters $master
26+
}
27+
}
28+
}
29+
30+
set block [ord::get_db_block]
31+
set insts [$block getInsts]
32+
33+
foreach inst $insts {
34+
set inst_master [$inst getMaster]
35+
set masters [lsearch -all -not -inline $masters $inst_master]
36+
}
37+
38+
foreach master $masters {
39+
puts "Master [$master getName] is loaded but not used in the design"
40+
}
41+
}
42+
43+
report_unused_masters
44+
45+
#Run check_setup
46+
puts "\n=========================================================================="
47+
puts "Synthesis check_setup"
48+
puts "--------------------------------------------------------------------------"
49+
check_setup
50+
51+
set num_instances [llength [get_cells -hier *]]
52+
puts "number instances in verilog is $num_instances"
53+
1754
source_step_tcl POST SYNTH
1855
orfs_write_db $::env(RESULTS_DIR)/1_synth.odb
1956
# Canonicalize 1_synth.sdc. The original SDC_FILE provided by

0 commit comments

Comments
 (0)