• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Blogs
  2. Digital Design
  3. Encounter How-To: Selecting Objects By Pointer With dbGet…
BobD
BobD

Community Member

Blog Activity
Options
  • Subscribe by email
  • More
  • Cancel
CDNS - RequestDemo

Have a question? Need more information?

Contact Us
database access
dbGet
Digital Implementation
Encounter Digital Implementation

Encounter How-To: Selecting Objects By Pointer With dbGet And dbSelectObj

16 Dec 2009 • 3 minute read

I just got back from a trip to California where I met with a couple of customers and presented database access with dbGet in the Encounter Digital Implementation System (EDI for short).  I took notes on the questions that came up- in particular those common between both sets of users.  One item in particular that was helpful was understanding how to select objects by pointer with dbGet.  In this post, I'll explain the basics of object selection by type with existing mechanisms in Encounter, and then show how you would use dbSelectObj in conjunction with dbGet to select objects by criteria and pointer.

Say for example, you'd like to select all of the instances in the design that have the cell master "BUFX1".  How could we do that?

First, we naturally like to use the most polished, productized piece of functionality available that does what we're looking for.  There is a nice piece of functionality that can select many different objects by name, type and criteria under: Edit->Find/Select Object... If we ask it to select all instances whose "Cell" Matches "BUFX1" it will find, display, and select 11 instances in my design:

 

Find and Select Object Dialog Box

 

If we look at our .cmd file (which logs the commands executed at the command line -or- via GUI actions) we see:

selectObjByProp Instance <Cell>Match<BUFX1>

We could certainly use this command to select a number of objects by type, and this is a useful utility.  But invariably, our requirements are become more complex than what the utility supports.  Say we want to find and select all the hard macros in the design with an area greater than some amount so we can set them FIXED?  How would we do that?

This is where db access can be useful.  In EDI, dbGet provides a simple but powerful way to probe the database.  We can use it to find objects based on a number of criteria.  For example, if we wanted to perform the same action as we did above with the Find/Select Object utility using dbGet we'd do it like this:

dbGet -p2 top.insts.cell.name BUFX1
0x2aa72affb8 0x2aa72b0050 0x2aa72b00e8 ... (truncated, but 11 pointers would be returned)

This would return a list of all the pointers to instances in the design that are of cell type "BUFX1".  BUFX1 is used as a filter in this case, and we use "-p2" to instruct dbGet to "walk" 2 levels back up the structure that was traversed to get inst pointers.  Let's say that we wanted to select all of those instances- how would we do that?  One way to do this is get a list of the inst *names* (as opposed to pointers):

dbGet [dbGet -p2 top.insts.cell.name BUFX1].name
DTMF_INST/TDSP_CORE_INST/i_10181 DTMF_INST/TDSP_CORE_INST/i_10155 DTMF_INST/TDSP_CORE_INST/i_10084 ...

...and then select them using selectInst within a foreach loop:

foreach instName [dbGet [dbGet -p2 top.insts.cell.name BUFX1].name] {
     selectInst $instName
}

->This would find -and- select all of these instances, similarly as Find/Select Object did

But what if the object you're trying to select isn't easily identified by name because it's a floorplanning object?  Like placement obstructions for example?  For things like this, it is often more conventient (or even mandatory) to select by pointer.  We can use the dbSelectObj command for this:

foreach pBlkg [dbGet top.fplan.pBlkgs] {
     dbSelectObj $pBlkg
}

For our BUFX1 example above, it would look like this (we select by pointer instead of by name):

foreach instPtr [dbGet -p2 top.insts.cell.name BUFX1] {
     dbSelectObj $instPtr
} 

To make things easier and not require a foreach loop, dbSelectObj is being enhanced to operate on lists of pointers.  In 9.1.USR1 (not released yet) we'll be able to use dbSelect Obj as follows:

dbSelectObj [dbGet top.fplan.pBlkgs]

As you work with dbGet, I think you'll find lots of situations where by selecting by pointer is more sensible than selected by name.

Further Reading:

  • Getting Started with dbGet
  • Getting Started with dbSet

Hope this is helpful,
Bob Dwyer

Related Resources:

  • First Encounter Design Exploration and Prototyping
  • Faster Timing Signoff Closure with the EDI/Tempus ECO Flow

CDNS - RequestDemo

Try Cadence Software for your next design!

Free Trials

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information