Problem
Some basic dbGet scripts to explore the design.
Solution
You can use the following single-line dbGet scripts to explore various aspects of your design:
1. List all unplaced instances in the design
dbGet [dbGet -p top.insts.pStatus unplaced].name
1. List all placed instances in the design
dbGet [dbGet -p top.insts.pStatus placed].name
1. List all fixed instances in the design
dbGet [dbGet -p top.insts.pStatus fixed].name
1. List the metal layers on which the I/O pins of the block reside
dbGet top.terms.pins.allShapes.layer.name
1. List the NONDEFAULT rules in the design
dbGet head.rules.name
1. List the NONDEFAULT rules applied on a specified net
dbGet [dbGet -p top.nets.name netName].rule.name
1. Get the placement status of an instance
dbGet [dbGetInstByName instName].pStatus
1. Get the coordinates of a rectangular routing blockage
dbGet top.fplan.rBlkgs.shapes.rect
1. Get the coordinates of a rectilinear routing blockage:
dbGet top.fplan.rBlkgs.shapes.poly
1. List all cell types used in the design:
dbGet -u top.insts.cell.name
Note: The "-u" parameter filters out the duplicate objects.
1. Get the size of block placement halos
dbGet [dbGet -p2 top.insts.cell.subClass block*].pHaloTop
dbGet [dbGet -p2 top.insts.cell.subClass block*].pHaloBot
dbGet [dbGet -p2 top.insts.cell.subClass block*].pHaloLeft
dbGet [dbGet -p2 top.insts.cell.subClass block*].pHaloRight
1. Get the size and top/bottom layers of block routing halos
dbGet [dbGet -p2 top.insts.cell.subClass block*].rHaloSideSize
dbGet [dbGet -p2 top.insts.cell.subClass block*].rHaloBotLayer.name
dbGet [dbGet -p2 top.insts.cell.subClass block*].rHaloTopLayer.name
1. Ensure that all your tiehi/lo connections have tie cells (and are not connected to a rail instead)
dbGet top.insts.instTerms.isTieHi 1
dbGet top.insts.instTerms.isTieLo 1
The previous commands should return "0x0" if all connections have tie cells. If "1"s are returned, use the
following commands to find the terms that still need a tie cell:
dbGet [dbGet -p top.insts.instTerms.isTieHi 1].name
dbGet [dbGet -p top.insts.instTerms.isTieLo 1].name
1. Get all insTerm names that are tied to tieLo cells
dbGet [dbGet -p [dbGet -p2 top.insts.cell.subClass
coreTieLo].instTerms.net.allTerms.isInput 1].name
1. Change the routing status of a net (for example, from FIXED to ROUTED)
dbSet [dbGet -p top.nets.name netName].wires.status route
1. Get the status of the design
dbGet top.statusIoPlaced
dbGet top.statusPlaced
dbGet top.statusClockSynthesized
dbGet top.statusRouted
dbGet top.statusRCExtracted
dbGet top.statusPowerAnalyzed
1. List the layers that are used in a net
dbGet [dbGet -p top.nets.name netName].wires.layer.name
1. Find all instances of a certain cell type
dbGet [dbGet -p2 top.insts.cell.name cellName].name
1. Determine the size of a cell in the library, but not necessarily in the current design
dbGet [dbGetCellByName cellName].size
1. List the nets that are marked in the db as clock net
dbGet [dbGet -p top.nets.isClock 1].name
Note: Before running the previous command, build a timing graph using the timeDesign command.
1. Set all instances with a particular pattern in the name to fixed status:
dbSet [dbGet –p top.insts.name *clk*].pStatus fixed
1. Get database units
dbGet head.dbUnits
1. Get the manufacturing grid
dbGet head.mfgGrid
1. Get physical-only cells such as filler cell, end cap cell, and so on
dbGet [dbGet -p top.insts.isPhysOnly 1].name
1. Filter all the PG pins with direction bidi of a specific instance
dbGet [dbGet -p [dbGet -p top.insts.name instName].pgCellTerms.inOutDir
bidi].name
1. Get class and subClass of a cell
dbGet [dbGetCellByName cellName].baseClass
dbGet [dbGetCellByName cellName].subClass
1. Get the instname/cellname of the driver driving a specific net
set netName netName
set inst [dbGet [dbGet -p [dbGet -p top.nets.name
$netName].allTerms.isOutput 1].inst]
Puts "Net: $netName, driving inst name: [dbGet $inst.name], driving
cell name: [dbGet $inst.cell.name]"
1. List all layers for the pin of a cell:
dbGet [dbGet -p selected.cell.terms.name
pinName].pins.allShapes.layer.extName
1. Report the points of the polyon that forms the die area
dbShape -output polygon [dbGet top.fPlan.boxes]
1. Query the max_cap for a list of cells
set cellPtrList [dbGet -p head.allCells.n ame BUF*]
foreach cellPtr $cellPtrList {puts "[dbGet $cellPtr.name]
[dbFTermMaxCap [dbGet -p $cellPtr.terms.name termName] 1]"}
1. Find all instances with a specify property name "myProp" (string property type) and value "xyzzy"
set inst_ptrs [dbGet -p top.insts.props {.name == "myProp" && .value
== "xyzzy"]
Puts "Instances with property myProp and value xyzzy: [dbGet
$inst_ptrs.name]"
1. Find non-clock ports in a design
dbGet [dbGet -p [dbGet -p2 top.terms.net.isClock 0].isInput 1].name
1. Identify ‘physical only’ types of cells (well tap, tie hi/lo, filler, endcap/decap)
You can query the subclass for a cell to check whether it is welltap, tiehigh, tielow or end cap:
dbGet [dbGet -p head.libCells.subClass <subClassName>].name
For example, to get names of well tap cells (specified as ‘CLASS CORE WELLTAP ‘ in LEF), you can use
dbGet [dbGet -p head.libCells.subClass coreWellTap].name
Similarly, to get names of tie high / tie low cells (specified as ‘CLASS CORE TIEHIGH’ or ‘CLASS CORE
TIELOW’ in LEF), use
dbGet [dbGet -p head.libCells.subClass coreTieHigh].name
or
dbGet [dbGet -p head.libCells.subClass coreTieLow].name
To report endcap cells (specified as ‘CLASS ENDCAP’ in LEF) :
dbGet [dbGet -p head.libCells.subclass coreEndCap*].name
Similarly, to query filler cells with ‘CLASS CORE SPACER’ in LEF syntax, you can use following (similar
to other physical-only cells)
dbGet [dbGet -p head.libCells.subClass coreSpacer].name
1. Print all the module names in the design
foreach module_name [dbGet top.hInst.treeHInsts.cell.name] {
Puts "$module_name"
This will not include the top module name. To get the top module name, run the following command:
dbGet top.name
1. Get all the leaf cells used in the design
foreach leaf_name [dbGet -u top.insts.cell.name] {
Puts "$leaf_name"
1. Apply set_dont_touch on selected instances:
Select the instances on which to apply set_dont_touch. For example, select all level shifter instances
with prefix "LS":
dbGet top.insts.name LS*
Then run the following command:
foreach term [dbGet selected.instTerms.net.term –e] {
set_dont_touch [dbGet $term.net.name] true