Home > Community > Blogs > Digital Implementation > useful dbget one liners
 
Login with a Cadence account.
Not a member yet?
Create a permanent login account to make interactions with Cadence more conveniennt.

Register | Membership benefits
Get email delivery of the Digital Implementation blog (individual posts).
 

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

Useful dbGet One-Liners

Comments(4)Filed under: Digital Implementation, dbGet, dbSet

We've gotten some good feedback about posts in this forum relating to dbGet and dbSet (the database access mechanism inside SoC-Encounter). I've been collecting interesting dbGet/dbSet lines over the past several months that I think are very useful. Some of these may be something you've wanted to do as well, or maybe they will serve as a starting point for a different idea or even a longer script. I gave credit to the people whose emails I extracted these from:

Get a list of unplaced cells: (Laurent Lefebure)
    dbGet [dbGet -p top.insts.pStatus unplaced].name

See what metal layers your block's IO pins are on: (Bob Dwyer)
    dbGet top.terms.pins.allShapes.layer.name

Get a list of NONDEFAULT rules in the design: (Gary Nunn)
    dbGet head.rules.name

Get the placement status of an instance: (Ali Aslani)
    dbGet [dbGetInstByName instName].pStatus

Get the points of a rectangular routing blockage: (Bob Dwyer)
    dbGet top.fplan.rBlkgs.shapes.rect

Get the points of a rectilinear routing blockage: (Jon Cooper)
    dbGet top.fplan.rBlkgs.shapes.poly

Get a list of all cell types used in the design: (Gary Nunn)
    dbGet -u top.insts.cell.name
    (The "-u" filters out duplicate objects.)

Get the size of block placement halos: (Kari Summers / Bob Dwyer)
    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: (Bob Dwyer)
    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

Make sure all your tiehi/lo connections have tie cells (and are not connected to a rail instead): (Gary Nunn)
    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

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

Get the status of your design: (Siva Kumar)
    dbGet top.statusIoPlaced
    dbGet top.statusPlaced
    dbGet top.statusClockSynthesized
    dbGet top.statusRouted
    dbGet top.statusRCExtracted
    dbGet top.statusPowerAnalyzed

List all the FIXED instances in your design: (Bob Dwyer)
    dbGet [dbGet -p top.insts.pStatus fixed].name

Find out which layers are used in a net: (Bob Dwyer)
    dbGet [dbGet -p top.nets.name netName].wires.layer.name

Find all the instances of a certain cell type: (Laurent Lefebure)
    dbGet [dbGet -p2 top.insts.cell.name cellName].name

Get the size of a cell in the library, but not necessarily in the current design: (Rob Lipsey)
    dbGet [dbGetCellByName cellName].size

I'm sure there are many more useful dbGet/dbSet one-liners out there; let's hear yours! Please post in the comments some of the dbGet lines that you have come up with.

 

Comments(4)

By eminemshow on August 20, 2009
Hi, Kari,
I have added this page to my fav list, thank you for this and for those who contribute one-liners.

By ifab on September 29, 2009
Hi,
This is very useful for me since I didn't kknow the database commands existed.
I can find database commands in the "Encounter Database Access Command Reference" (soceDBAref.pdf ) but where do I find documentations for commands such as "isDRVClean"  and "isTimingMet" ?
I've been using them a long time ago & forgot where I got them from.
Maybe someone could help me with this?

By Kari Summers on October 7, 2009
Hi ifab, The commands you mention are from extremely old versions of Encounter and don't exist anymore. However, the document you're looking for is called the Encounter Text Command Reference. I use it almost every day! The commands dbGet and dbSet are actually part of the Command Reference now.

By Dominic on July 30, 2013
To verify existence of route/place blockages prior to remove them, avoiding unwanted error :
  if {[dbGet Top.FPlan.rBlkgs.name BLK_BEOL_M1M6_TCD*] != 0x0} {deleteRouteBlk -name BLK_BEOL_M1M6_TCD*}
  if {[dbGet Top.FPlan.pBlkgs.name BLK_PLACE_TCD*] != 0x0} {deletePlaceBlockage -name BLK_PLACE_TCD*}

Leave a Comment


Name
E-mail (will not be published)
Comment
 I have read and agree to the Terms of use and Community Guidelines.
Community Guidelines
The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.