100% found this document useful (1 vote)
273 views4 pages

Useful DbGet One

The document provides an introduction to using the dbGet command in Cadence Encounter to access and retrieve information from the design database. It demonstrates how to use dbGet to list available attributes at different levels of the design hierarchy, view attribute values, and get information about specific selections. The document also shares some useful dbGet one-liners collected from other users for tasks like listing unplaced cells, viewing block routing settings, and checking design status.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
273 views4 pages

Useful DbGet One

The document provides an introduction to using the dbGet command in Cadence Encounter to access and retrieve information from the design database. It demonstrates how to use dbGet to list available attributes at different levels of the design hierarchy, view attribute values, and get information about specific selections. The document also shares some useful dbGet one-liners collected from other users for tasks like listing unplaced cells, viewing block routing settings, and checking design status.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Getting Started with dbGet

If you've been checking out the other blogs here in the Digital Implementation community,
you've probably seen mention of the database access mechanism dbGet/dbSet. Back in the SoC-
Encounter 6.x days, our very own BobD gave me a quick demo of dbGet. I couldn't wait for 7.1
to come out, so I could start using it. Of course I got busy with customer projects and never quite
found the time to play with it and get up-to-speed. Today, I'm still far from a dbGet power-user,
but I have started exploring it and using it in my work. Instead of starting off by reading the
documentation (although the docs are a great reference), I've found that the best way to learn
dbGet is to just start playing with it.

With a design open in Encounter, type: dbGet

The return line specifying the usage may look cryptic at first, but let's check out a few things.
The most interesting keywords at first glance are head, top, and selected.

Using a single question mark will show you a list of the attributes available at this level.
> dbGet head.?
> head: allCells dbUnits layers mfgGrid objType props

The most interesting items to me in this list are dbUnits and mfgGrid:
> dbGet head.dbUnits
> 1000
> dbGet head.mfgGrid
> 0.005

You can also list all the attributes AND their values with a double question mark:
> dbGet head.??

The results may not always be readable text, as in the example of layers:
> dbGet head.layers
> 0x118781e0 0x13ff8cd0 0x13ff97c0 0x13ffa2b0 0x13ffada0 0x13ffb890 0x13ffc380
0x13ffcea0 0x13ffda10 0x13ffe500 0x13ff77e8 0x13ff9248 0x13ff9d38 0x13ffa828 0x13ffb318
0x13ffbe08 0x13ffc8f8 0x13ffd418 0x13ffdf88 0x13ffea78

So, just keep on going with the ? method:


> dbGet head.layers.?
> layer: extName name objType props type

Ah! The name attribute looks like what we want:


> dbGet head.layers.name
> M0 M1 M2 M3 M4 M5 M6 M7 M8 M9 CA V1 V2 V3 V4 V5 V6 V7 V8 OVERLAP

Let's look at top now:


> dbGet top.?
> topCell: fPlan hInst insts name nets numBidirs numInputs numInsts numNets numPhysInsts
numPhysNets numTerms objType pgTerms physInsts physNets props statusClockSynthesized
statusGRouted statusIoPlaced statusPlaced statusPowerAnalyzed statusRCExtracted
statusRouted statusScanOpted terms

Cool, lots of stuff to play with here! Try out various attributes and start thinking about how you
can use the results in scripts, or just to poke around your design and check out a few things.

Finally, select one of the instances in your design (I selected a RAM), then:
> dbGet selected.?
> inst: box cell instTerms isDontTouch isHaloBlock isJtagElem isPhysOnly isSpareGate name
objType orient pStatus pgCellTerms pgTermNets pt

This is a quick way to get information for just the things you've selected. (Try selecting more
than one thing and see how the results look.)

This has been a VERY brief introduction to playing with dbGet. (We didn't even get to dbSet
yet!) I'd love to hear in the comments if you are already using dbGet, if you know about it but
haven't used it yet, or if you didn't even know about it but think you might use it now. Have fun
playing around and finding some useful dbGet combinations - then save those for a future post,
where I'll ask everyone for their favorites.

Useful dbGet One-Liners

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.

You might also like