Skip to content

Commit fb5eef4

Browse files
authored
Merge pull request #1979 from Pinata-Consulting/floorplan-list-unused-macros
floorplan: report unused ADDITIONAL_... macros
2 parents 27fc100 + d99222b commit fb5eef4

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

flow/scripts/floorplan.tcl

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,34 @@ utl::set_metrics_stage "floorplan__{}"
22
source $::env(SCRIPTS_DIR)/load.tcl
33
load_design 1_synth.v 1_synth.sdc
44

5+
proc report_unused_masters {} {
6+
set db [ord::get_db]
7+
set libs [$db getLibs]
8+
set masters ""
9+
foreach lib $libs {
10+
foreach master [$lib getMasters] {
11+
# filter out non-block masters, or you can remove this conditional to detect any unused master
12+
if {[$master getType] == "BLOCK"} {
13+
lappend masters $master
14+
}
15+
}
16+
}
17+
18+
set block [ord::get_db_block]
19+
set insts [$block getInsts]
20+
21+
foreach inst $insts {
22+
set inst_master [$inst getMaster]
23+
set masters [lsearch -all -not -inline $masters $inst_master]
24+
}
25+
26+
foreach master $masters {
27+
puts "Master [$master getName] is loaded but not used in the design"
28+
}
29+
}
30+
31+
report_unused_masters
32+
533
#Run check_setup
634
puts "\n=========================================================================="
735
puts "Floorplan check_setup"

0 commit comments

Comments
 (0)