有驴友在后台问Innovus 的dbGet, 老驴是从Common UI 开始学习Innovus 的,所以并不熟悉dbGet, Common UI 的get_db 也很好用。在support.cadence.com 上有两篇写dbGet 的文章,简单明了都不用翻译的,有需要的可以看一下—— 其实老驴今天打算发另一些东西,但是因为资料还没消化,时间又紧凑,就把这两篇文章搬运一下充个数。。。
List all unplaced instances in the design
List all placed instances in the design
List all fixed instances in the design
List the metal layers on which the I/O pins of the block reside
List the non default rules (NDR) in the design
List the NDRs applied on a specified net
List net names with specific max or min voltage
Get the placement status of an instance
To avoid splitting of a specified multibit flop, during multibit Optimization
To avoid merging of a specified multibit flop, during multibit Optimization
Get the coordinates of a rectangular routing blockage
Get the coordinates of a rectilinear routing blockage
List all cell types used in the design
Get the size of block placement halos
Get the size and top/bottom layers of block routing halos
Ensure all your tiehi/tielo connections have tie cells (and are not connected to a rail instead)
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:
Get all instTerm names that are tied to tieLo cells
Change the routing status of a net (for example, from FIXED to ROUTED)
Get the status of the design
List the layers used in a net
Selecting Shield Nets of a net
Find all instances of a certain cell type
Determine the size of a cell in the library, but not necessarily in the current design
List the nets marked in the db as clock net
Set all instances with a particular pattern in the name to fixed status
Get top and bottom routing layers for a route_type
Get database units
Get the manufacturing grid
Get physical only cells such as filler cell, end cap cell, and so on
Report Dont Touch instances:
Report Dont Use cells in the database
Report JTag elements:
Report spare instances:
Filter all PG pins with direction bidi of a specific instance
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 :
}
Get class and subClass of a cell
Selecting all Macros/Blocks of a particular module (or Hierarchical instance)
Get all the sequential cells of a particular module
Get the instname / cellname of the driver driving a specific net
List all layers for the pin of a cell
Report points of the polygon that forms the die area
Get Verilog module ports
To query top level term pin coordinates and layer number
Query max_cap for a list of cells
Find all instances with a specify property name "myProp" (string property type) and value "xyzzy"
Find non-clock ports in a design
To get information on all tech sites in the design
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:
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:
To report endcap cells (specified as ‘CLASS ENDCAP’ in LEF), use the following command:
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):
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:
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:
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
editDelete -selected -type Signal -use SIGNAL
}
Get the number of vias that are not power in a routed design
Break the DFM flow if metal fills are not added to design using run_pvs_metal_fill.
Report instance pin shape mask
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.
Report all flop instances with reset pin connected to the supply
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
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 …
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:
dbGet top.nets.name *clk* -> a_clk1 clk2 clk3 clk[1] clk_2
dbGet top.nets.name *clk? -> a_clk1 clk2 clk3
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.
dbGet head.dbUnits -> 2000
dbGet head.mfgGrid -> 0.005
dbGet head.rules.name
Using "top": This specifies the pointer to the top cell in the design as the starting point.
dbGet top.insts
dbGet top.insts.name
dbGet top.insts.name DTMF_INST/TDSP_CORE_INST/*
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
dbGet selected -> 0x1b340ac0
dbGet selected.name -> DTMF_INST/RESULTS_CONV_INST/r770_reg_9
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.
innovus 21> dbGet top.insts.instTerms.name -p i_160/
innovus 22> dbGet top.insts.instTerms.name -p2 i_160/Y
innovus 23> dbGet [dbGet top.insts.instTerms.name -p i_160/Y].net.name
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