罗风 · 2021年06月24日

innovus | dbGet 一文打尽

有驴友在后台问Innovus 的dbGet, 老驴是从Common UI 开始学习Innovus 的,所以并不熟悉dbGet, Common UI 的get\_db 也很好用。在support.cadence.com 上有两篇写dbGet 的文章,简单明了都不用翻译的,有需要的可以看一下—— 其实老驴今天打算发另一些东西,但是因为资料还没消化,时间又紧凑,就把这两篇文章搬运一下充个数。。。

List all unplaced instances in the design

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

List all placed instances in the design

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

List all fixed instances in the design

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

List the metal layers on which the I/O pins of the block r****eside

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

List the non default rules (NDR) in the design

  • dbGet head.rules.name

List the NDRs applied on a specified net

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

List net names with specific max or min voltage

  • dbGet [dbGet top.nets.maxVoltage value –p].name
  • dbGet [dbGet top.nets.minVoltage value –p].name

Get the placement status of an instance

  • dbGet [dbGetInstByName instName].pStatus

To avoid splitting of a specified multibit flop, during multibit Optimization

  • dbSet [dbGetInstByName <flop\_name>].dontSplitMultibit 1

To avoid merging of a specified multibit flop, during multibit Optimizatio****n

  • dbSet [dbGetInstByName <flop\_name>].dontMergeMultibit 1

Get the coordinates of a rectangular routing blockage

  • dbGet top.fplan.rBlkgs.shapes.rect

Get the coordinates of a rectilinear routing blockage

  • dbGet top.fplan.rBlkgs.shapes.poly

List all cell types used in the design

  • dbGet -u top.insts.cell.name
  • Note: The "-u" parameter filters out the duplicate objects.

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

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

Ensure all your tiehi/tielo 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 "1s" 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

Get all instTerm names that are tied to tieLo cells

  • dbGet [dbGet -p [dbGet -p2 top.insts.cell.subClass coreTieLo].instTerms.net.allTerms.isInput 1].name

Change the routing status of a net (for example, from FIXED to ROUTED)

  • dbSet [dbGet -p top.nets.name netName].wires.status route

Get the status of the design

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

List the layers used in a net

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

Selecting Shield Nets of a net 

  • dbSelectObj [dbget [dbget -p [dbGet -p top.nets.name $net].shieldNets.name GND].sWires.shieldNet.name $net -p2]
  • NOTE: $net is the net for which you want to select the shield.

Find all instances of a certain cell type

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

Determine the size of a cell in the library, but not necessarily in the current design

  • dbGet [dbGetCellByName cellName].size

List the nets 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.

Set all instances with a particular pattern in the name to fixed status

  • dbSet [dbGet –p top.insts.name *clk*].pStatus fixed

Get top and bottom routing layers for a route\_type

  • dbGet [dbGet -p head.routeTypes.name routeTypeName].topPreferredLayer.num
  • dbGet [dbGet -p head.routeTypes.name routeTypeName].bottomPreferredLayer.num

Get database units

  • dbGet head.dbUnits

Get the manufacturing grid

  • dbGet head.mfgGrid

Get physical only cells such as filler cell, end cap cell, and so on

  • dbGet [dbGet -p top.insts.isPhysOnly 1].name

Report Dont Touch instances:

  • dbGet [dbGet -p top.insts.dontTouch true].name

Report Dont Use cells in the database  

  • dbGet [dbGet -p head.libCells.dontUse 1].name

Report JTag elements:

  • dbGet [dbGet -p top.insts.isJtagElem 1].name

Report spare instances:

  • dbGet [dbGet -p top.insts.isSpareGate 1].name

Filter all PG pins with direction bidi of a specific instance

  • dbGet [dbGet -p [dbGet -p top.insts.name instName].pgCellTerms.inOutDir bidi].name

Get PG pins connections of a specific instance
proc getInstPGConnect {c} {

set inst [dbget -p top.insts.name $c]

puts "PG connection of instance $c:"

*foreach PGT [dbget $inst.pgCellTerms.name] { *

puts "\tPin : $PGT --> Net: [dbget [dbPGTermNet [dbGetPGTermByName $inst $PGT]].name]" }

}

Get class and subClass of a cell

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

Selecting all Macros/Blocks of a particular module (or Hierarchical instance)

  • selectInst [dbGet [dbGet top.hInst.allTreeInsts.cell.baseClass block -p2].name <specify\_module\_name> ]

Get all the sequential cells of a particular module

  • selectModule <module\_name>
  • dbGet [dbGet selected.insts.cell.isSequential 1 -p2].name

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]"

List all layers for the pin of a cell

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

Report points of the polygon that forms the die area

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

Get Verilog module ports

  • dbGet [ dbGet -p1 top.hInst.allTreeInsts.name $moduleInstName].hInstTerms.hTerm.name

To query top level term pin coordinates and layer number

  • lindex [dbGet [dbGet top.hinst.hinstTerms.term.name <pin\_name> - p].pins.allShapes.shapes.rect] 0
  • dbGet [dbGet top.hinst.hinstTerms.term.name <pin\_name>  -p].pins.allShapes.layer.num

Query max\_cap for a list of cells

  • cellPtrList [dbGet -p head.allCells.n ame BUF*]
  • foreach cellPtr $cellPtrList \{puts "\[dbGet $cellPtr.name] [dbFTermMaxCap [dbGet -p $cellPtr.terms.name termName] 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]"

Find non-clock ports in a design

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

To get information on all tech sites in the design

  • dbGet head.sites.name
  • dbGet head.sites.size
  • dbIsTechSiteVDDOnBottom [dbGet head.sites.name \<name> -p]

Identify and report ‘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 the following command:
  • 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 the following command:

  • 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), use the following command:

  • dbGet [dbGet -p head.libCells.subclass coreEndCap*].name

Similarly, to query filler cells with ‘CLASS CORE SPACER’ in the LEF syntax, you can use the following command (similar to other physical-only cells): 

  • dbGet [dbGet -p head.libCells.subClass coreSpacer].name

Print all 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

Get all leaf cells used in the design
foreach leaf\_name [dbGet -u top.insts.cell.name] {

            Puts "$leaf\_name"

}

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 the "LS" prefix:

  • 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

}

Skip routes hierarchical hard macro nets
proc skiproutesOnHmsNets {hmInstPattern} {

deselectAll

selectInst *$hmInstPattern*

dbset selected.hinst.hnets.net.skipRouting 1

deselectAll

}

Removing nets over the Macros along with pitches and vias, Incase some nets are routed over the Hard Macros, you can remove such nets along with pitches and vias using following command:
*foreach c [dbGet [dbGet -p2 top.insts.cell.baseClass block].name] {       *

*set j [dbGet -p top.insts.name $c ]       *

*dbSelectObj  [dbQuery -area  [dbGet $j.box ] -objType regular]   *

puts "Deleting object at [dbGet $j.box ] within Block [dbget $j.name]"

editDelete -selected  -type Signal  -use SIGNAL             

***}*

Get the number of vias that are not power in a routed design

  • llength [dbGet [dbGet -p top.nets.isPwrOrGnd 0].vias]

Break the DFM flow if metal fills are not added to design using run\_pvs\_metal\_fill.

1.png

Report instance pin shape mask

2.png

Report latency of all memories in the design, Following script prints the latency of all memories with cell name *RAM* and clock pin name *CLK. You can change *RAM* with cell name of the desired memories, or as per your design.

3.png

Report all flop instances with reset pin connected to the supply

4.jpg

To get the status of a design:

encounter> dbGet top.?? status* // reports the list of status at particular stage

statusClockSynthesized: 0

statusGRouted: 0

statusIoPlaced: 1

statusPlaced: 1

statusPowerAnalyzed: 0

statusRCExtracted: 0

statusRouted: 1

statusScanOpted: 0

Create SDP(structured data path) groups of clock gates and flops, ****The following script will find the clock gates and the flops connected to the clk pin in the design and group them together using createSdpGroup

5.png

Note: Please use cell name and clock pins name(cgc and clk used for example) as per the library specifications.

Using "." with dbGet: This returns the value of the specified object attribute. dbGet uses "." as a separator for object/attribute traversal.

dbGet top.insts.cell.name
AND2 OR2 INV1 AND2 …

  • top is a cell pointer for the top cell
  • insts is the list of inst pointers in top
  • cell is the master cell pointers for each inst
  • name is the master cell name

**Using "?" with dbGet:**This returns a list of the available objects and attributes for the last object in the query.
dbGet head.?

**Using "??" with dbGet:**Returns a list of the objects and attributes, and their values, for the last object in the query.

dbGet head.??

Using ".?h" with dbGet: This returns a list of the available objects and attributes for the last object in the query, and also includes; a short description for each object and attribute, the type for each object, the legal enum values for each attribute, and whether the attribute value can be set (whether it is editable).

dbget head.?h

Pattern matching with dbGet:

  • Can be used to match field names or values
  • Simple wildcard matching used by default (* and ?)
  • use -regexp option for regular expression matching
  • Value matching

*dbGet top.nets.name *clk* -> *a\_clk1 clk2 clk3 clk[1] clk\_2
*dbGet top.nets.name *clk? -> *a\_clk1 clk2 clk3

  • Field name matching (for .? .?? .?h) also useful to get just one field

dbGet top.insts.?h pstat*

pStatus(settable): enum(cover fixed placed unplaced), Instance placement status

Using "pointer"****: This specifies one or more object pointers as the starting point.
*dbGet 0x1b03dbb0.name   #0x1b03dbb0 is pointer to top cell *DTMF\_CHIP
Using "head": This specifies the pointer for the root or head of the design as the starting point.

  • To get the database units in the design:

dbGet head.dbUnits -> 2000

  • To get the manufacturing grid in the design:

dbGet head.mfgGrid ->* 0.005*

  • To get a list of NONDEFAULT rules in the design:

dbGet head.rules.name

Using "top"****: This specifies the pointer to the top cell in the design as the starting point.

  • To get a list of all occurrences in the design:

dbGet top.insts

  • To get a list of all occurrences of names in the design:

dbGet top.insts.name

  • To get a list of all occurrences that belong to TDSP\_CORE\_INST:

dbGet top.insts.name DTMF\_INST/TDSP\_CORE\_INST/*

  • To get a list of all instance pointers of the previous occurrences:

dbGet –p top.insts.name DTMF\_INST/TDSP\_CORE\_INST/*

Using "selected": This specifies that the selected objects are the starting point.
selectInst DTMF\_INST/RESULTS\_CONV\_INST/r770\_reg\_9

  • To get the pointer of selected objects:

dbGet selected -> 0x1b340ac0

  • To get the name of a selected object:

dbGet selected.name -> DTMF\_INST/RESULTS\_CONV\_INST/r770\_reg\_9

  • To get the cell name of a selected occurrence:

dbGet selected.cell.name -> SDFFNX1

Using "-p" with dbGet: This specifies the level to traverse back through the specified objects for the query.
–p | -p2 | -p3 … levels for back traversal of objects (p = 1 level\, p2 = 2 levels\, and so on).
The –p2 option goes back 2 levels of objects, -p3 goes back 3 levels, and so on.
Note: –p | -p2 | -p3 .... option returns the pointer of the object.

  • To get the pointer of instTerm i\_160/Y, use option "-p" for 1 level.

innovus 21> dbGet top.insts.instTerms.name -p i\_160/

  • To get the pointer of the instance of term i\_160/Y , use option "-p2" for 2 level.

innovus 22> dbGet top.insts.instTerms.name -p2 i\_160/Y

  • To get the net name associate with this term:

innovus 23> dbGet [dbGet top.insts.instTerms.name -p i\_160/Y].net.name

  • To get the cell name of this instance:

*innovus 24> dbGet [dbGet top.insts.instTerms.name -p2 i\_160/Y].cell.name *

Using "-u" with dbGet: This removes duplicate objects from the query results and the results list only contains unique entries. Sometimes, the results list can have the same entry multiple times, such as cell name.

dbGet top.insts.cell.name -> AND2X1 DFFHQX1

You can use the -u parameter to filter the results, and the software only returns a unique list of different cell names.
dbGet -u top*.insts.cell.name -> BUFX4 AND2X1*



Using "-d" with dbGet****:By default, dbGet returns values in user units rather than dbu (use –d for dbu).

dbGet top.fplan.pblkgs.shapes.rect -> {337.92 668.64 587.4 935.76}
dbGet -d top.fplan.pblkgs.shapes.rect -> {675840 1337280 1174800 1871520}

Command chaining with dbGet:

set instPtr [dbGet -p top.insts.name F1] -> 0x179df5d8
dbGet $instPtr.cell.isSequential -> 1
dbGet [dbGet -p top.insts.name F1].cell.isSequential -> 1

作者:陌上风骑驴看IC
原文链接:https://mp.weixin.qq.com/s/vONjqy1mP3VlkfqxxQTadg
微信公众号:
陌上风.jpg

相关文章推荐

更多IC设计技术干货请关注IC设计技术专栏。
推荐阅读
关注数
19605
内容数
1303
主要交流IC以及SoC设计流程相关的技术和知识
目录
极术微信服务号
关注极术微信号
实时接收点赞提醒和评论通知
安谋科技学堂公众号
关注安谋科技学堂
实时获取安谋科技及 Arm 教学资源
安谋科技招聘公众号
关注安谋科技招聘
实时获取安谋科技中国职位信息