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
> dbGet head.mfgGrid
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.