dbGet is a new access mechanism for FE-Tcl.
The purpose of dbGet is to facilitate navigation of the database.
It make easy for a new user to explore a design interactively.
It make easy to script common operations.
It is case insensitive.
dbGet, dbget are both accepted
dbget top.fPlan, dbget TOP.FPlan, etc.
A few object names have been changed to align better with Virtuoso and OpenAccess terminology. For example:
term in dbGet is FTerm in the FEDB (dbForEachCellFTerm)
instTerm in dbGet is Term in the FEDB (dbForEachInstTerm)
dbGet pointers can be used by equivalent FE-TCL DB access functions.
FE-TCL DB pointers can be used by equivalent dbget object
although dbGet does not support all FE DB objects
Using "." with dbGet: 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: 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: 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 (*, ?)
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
> dbGet top.nets.name {clk[1]} #need {} to turn off Tcl eval of []
clk[1]
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" - Specifies one or more object pointers as the starting point.
> dbGet 0x1b03dbb0.name #0x1b03dbb0 is pointer to top cell
DTMF_CHIP
Using "head" - Specifies the pointer for the root, or head of the design as the starting point.
To get database units in the design:
> dbGet head.dbUnits
2000
To get 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" - Specifies the pointer to the top cell in the design as the starting point
To list of all instances in the design
> dbGet top.insts
To list of all instance names in the design
> dbGet top.insts.name
To list of all instances that belong to TDSP_CORE_INST
> dbGet top.insts.name DTMF_INST/TDSP_CORE_INST/*
To list of all instance pointers of above
> dbGet –p top.insts.name DTMF_INST/TDSP_CORE_INST/*
Using "selected" - 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 name of selected object:
> dbGet selected.name
DTMF_INST/RESULTS_CONV_INST/r770_reg_9
To get cell name of selected instance:
> dbGet selected.cell.name
SDFFNX1
Using "-p" with dbGet: Specifies the level to traverse back through the specified objects for the query.
–p | -p1 | -p2 | -p3 … levels for back traversal of objects (p or p1 = 1 level, p2 = 2 levels, etc.)
> dbGet top.insts.instTerms.name DTMF_INST/TDSP_CORE_INST/DATA_BUS_MACH_INST/done_reg/CK
The -p or -p1 option returns the pointer of the object .
To get the pointer of instance term DTMF_INST/TDSP_CORE_INST/DATA_BUS_MACH_INST/done_reg/CK
> dbGet -p top.insts.instTerms.name DTMF_INST/TDSP_CORE_INST/DATA_BUS_MACH_INST/done_reg/CK
0x1b275044
To get the net name associate with this term:
> dbGet [ dbGet -p top.insts.instTerms.name DTMF_INST/TDSP_CORE_INST/DATA_BUS_MACH_INST/done_reg/CK].net.name
DTMF_INST/m_clk
The –p2 option goes back 2 levels of objects, -p3 goes back 3 levels, etc.
To get the pointer of the instance of this terminal:
> dbGet -p2 top.insts.instTerms.name DTMF_INST/TDSP_CORE_INST/DATA_BUS_MACH_INST/done_reg/CK
0x1b273dd4
To get the cell name of this instance:
> dbGet [dbGet -p2 top.insts.instTerms.name DTMF_INST/TDSP_CORE_INST/DATA_BUS_MACH_INST/done_reg/CK].cell.name
SDFFRHQX1
Using "-u" with dbGet: This removes duplicate objects from the query results so that the results list only contains unique entries. Sometimes, the results list can have the same entry multiple times, like cell name.
> dbGet top.insts.cell.name
DFFHQX1 BUFX2 DFFHQX1 BUFX4 DFFHQX1 BUFX4 AND2X1 DFFHQX1
You can use the -u parameter to filter the results, so that the software only returns a unique list of different cell names.
> dbGet -u top.insts.cell.name
DFFHQX1 BUFX2 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
https://www.edaboard.com/threads/219064/#3