File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -193,5 +193,32 @@ if { [env_var_exists_and_non_empty POST_FLOORPLAN_TCL] } {
193193 source $::env(POST_FLOORPLAN_TCL)
194194}
195195
196+ set db [ord::get_db]
197+ set chip [$db getChip]
198+ set block [$chip getBlock]
199+
200+ set scale_to_um [expr [$block getDbUnitsPerMicron] * [$block getDbUnitsPerMicron]]
201+
202+ proc module_area {insts} {
203+ global scale_to_um
204+ set area 0
205+ foreach inst $insts {
206+ set bbox [$inst getBBox]
207+ set area [expr $area + [$bbox getDX] * [$bbox getDY]]
208+ }
209+ return [expr $area / $scale_to_um ]
210+ }
211+
212+ # $REPORTS_DIR/2_1_area.txt has three columns:
213+ #
214+ # name - name of module
215+ # area - area of instances within module, excluding submodules
216+ # area_leaf - area of instances within module and submodules
217+ set f [open $::env(REPORTS_DIR) /2_1_area.txt w]
218+ foreach module [$block getModules] {
219+ puts $f " [ $module getName] [ module_area [$module getInsts] ] [ module_area [$module getLeafInsts] ]"
220+ }
221+ close $f
222+
196223write_db $::env(RESULTS_DIR) /2_1_floorplan.odb
197224write_sdc -no_timestamp $::env(RESULTS_DIR) /2_1_floorplan.sdc
You can’t perform that action at this time.
0 commit comments