regarding dbtcl programming

Status
Not open for further replies.

venkatramanan

Member level 4
Joined
Sep 24, 2011
Messages
69
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
bangalore
Activity points
1,685
how to extract ly macroname from the design using db commands.and how to find macroname location orientation of the particular macro from the topcell.can u any one help me how to write program for this using db/tcl.
 
Last edited:

######################################
# 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
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…