######################################
# Script to Dump the Macro Locations
######################################
set fid [open macro_locations.tcl w]
dbForEachCellInst [dbgTopCell] inst {
set cellName [dbInstCellName $inst]
if [dbIsCellBlock $cellName] {
selectInst [dbInstName $inst]
set obj [dbInstName $inst]
#puts $cellName
set loc [dbInstLoc $inst]
set x [dbDBUToMicrons [dbLocX $loc]]
set y [dbDBUToMicrons [dbLocY $loc]]
set orient [dbInstOrient $inst]
regsub dbc $orient {} orient
if {[dbIsInstPreplaced $inst]} {
puts $fid "placeInstance $obj $x $y $orient -fixed"
puts "placeInstance $obj $x $y $orient -fixed"
} else {
puts $fid "placeInstance $obj $x $y $orient -fixed"
puts "placeInstance $obj $x $y $orient -fixed"
}
}
}
close $fid
This scripts will dump location of all macros in your design in file name macro_locations.tcl