Sie sind auf Seite 1von 5

[Links and navigation control disabled in this window]

Useful single line dbGet scripts

Problem
Some basic dbGet scripts to explore the design.

Solution
The dbGet command can used interactively to explore the design. Below are some useful single line dbGet
scripts:

1. To get a list of unplaced instances in the design:


dbGet [dbGet -p top.insts.pStatus unplaced].name

2. To list all the placed instances in the design:


dbGet [dbGet -p top.insts.pStatus placed].name

3. To list all the fixed instances in the design:


dbGet [dbGet -p top.insts.pStatus fixed].name

4. To see what metal layers your block's IO pins are on:


dbGet top.terms.pins.allShapes.layer.name

5. To get a list of NONDEFAULT rules in the design:


dbGet head.rules.name

6. To get NDR applied on a specified net:


dbGet [dbGet -p top.nets.name netName].rule.name

7. To get the placement status of an instance:


dbGet [dbGetInstByName instName].pStatus

8. To get the points of a rectangular routing blockage:


dbGet top.fplan.rBlkgs.shapes.rect

9. To get the points of a rectilinear routing blockage:


dbGet top.fplan.rBlkgs.shapes.poly

10. To get a list of all cell types used in the design:


dbGet -u top.insts.cell.name
(The "-u" filters out duplicate objects.)

11. To 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

12. To 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

13. To make sure 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
(Should return "0x0" if all connections have tie cells.
If "1"s are returned, use the following 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

14. To get all insTerm names which are tied to tieLo cells:
dbGet [dbGet -p [dbGet -p2 top.insts.cell.subClass coreTieLo].instTerms.net.allTerms.isInput
1].name

15. To change the routing status of a net (for example, from FIXED to ROUTED):
dbSet [dbGet -p top.nets.name netName].wires.status routed

16. To get the status of your design:


dbGet top.statusIoPlaced
dbGet top.statusPlaced
dbGet top.statusClockSynthesized
dbGet top.statusRouted
dbGet top.statusRCExtracted
dbGet top.statusPowerAnalyzed

17. To find out which layers are used in a net:


dbGet [dbGet -p top.nets.name netName].wires.layer.name

18. To find all the instances of a certain cell type:


dbGet [dbGet -p2 top.insts.cell.name cellName].name

19. To get the size of a cell in the library, but not necessarily in the current design:
dbGet [dbGetCellByName cellName].size

20. To get nets that are marked in the db as clock net:


dbGet [dbGet -p top.nets.isClock 1].name
** Users need to run timeDesign before the above command to build a timing graph. Then users will get
the desired data by querying like above.
21. To set all instances with a particular pattern in its name to fixed status:
dbSet [dbGet p top.insts.name *clk*].pStatus fixed

22. To get database units:


dbGet head.dbUnits

23. To get manufacturing grid:


dbGet head.mfgGrid

24. To get physical only cells like filler cell, end cap cell etc:
dbGet [dbGet -p top.insts.isPhysOnly 1].name

25. To 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

26. To get class and subClass of a cell:


dbGet [dbGetCellByName cellName].baseClass
dbGet [dbGetCellByName cellName].subClass

27. To find out 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]"

28. To list all layers for the pin of a cell:


dbGet [dbGet -p selected.cell.terms.name pinName].pins.allShapes.layer.extName

29. Report points of polyon that forms the die area:


dbShape -output polygon [dbGet top.fPlan.boxes]

30. To query the max_cap for a list of cells


set cellPtrList [dbGet -p head.allCells.name BUF*]
foreach cellPtr $cellPtrList {puts "[dbGet $cellPtr.name] [dbFTermMaxCap [dbGet -p
$cellPtr.terms.name <termName>] 1]"}

31. To 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]"

32. To find non-clock ports in a design


dbGet [dbGet -p [dbGet -p2 top.terms.net.isClock 0].isInput 1].name

33. To 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
e.g. 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 names (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

34. To print all the module names in a design loaded in EDI


foreach module_name [dbGet top.hInst.treeHInsts.cell.name] {
Puts "$module_name"
}
This will not include top module name. To get the top module name use
dbGet top.name
35. To get all the leaf cells used in the design, use
foreach leaf_name [dbGet -u top.insts.cell.name] {
Puts "$leaf_name"
}
36. To set_dont_touch on selected instances
Select the instances to set_dont_touch on. eg, select all level shifter instances with prefix "LS":
dbGet top.insts.name LS*
Then use:
foreach term [dbGet selected.instTerms.net.term e] {
set_dont_touch [dbGet $term.net.name] true
}

Related Solutions
Getting started with DB Tcl scripting in EDI System
How to get the coordinates of top level ports and block pin in the design
How to use dbGet command for database access in EDI?
Return to the top of the page

Document attributes

Solution ID: 11598038


Created: 11/04/2009 09:05:41
Last Modified: 10/06/2013 21:10:40
Product: Encounter Digital Implementation

Copyright 2014 Cadence Design Systems, Inc. All Rights Reserved

Das könnte Ihnen auch gefallen