Skip to content

Commit d99222b

Browse files
committed
floorplan: report unused ADDITIONAL_... macros
To see report, run: $ make DESIGN_CONFIG=designs/asap7/gcd/config.mk ADDITIONAL_LEFS=platforms/asap7/lef/fakeram7_256x32.lef ADDITIONAL_LIBS=platforms/asap7/lib/fakeram7_256x32.lib do-floorplan [deleted] Running floorplan.tcl, stage 2_1_floorplan [INFO ODB-0227] LEF file: /home/oyvind/OpenROAD-flow-scripts/flow/platforms/asap7/lef/asap7_tech_1x_201209.lef, created 24 layers, 9 vias [INFO ODB-0227] LEF file: /home/oyvind/OpenROAD-flow-scripts/flow/platforms/asap7/lef/asap7sc7p5t_28_R_1x_220121a.lef, created 212 library cells [INFO ODB-0227] LEF file: platforms/asap7/lef/fakeram7_256x32.lef, created 1 library cells Master fakeram7_256x32 is loaded but not used in the design ... Co-authored-by: Austin Rovinski <[email protected]> Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 40b3bc1 commit d99222b

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)