• 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. Community Forums
  2. Digital Implementation
  3. db command to get power pin co-ordinates for a given Ma...

Stats

  • Locked Locked
  • Replies 11
  • Subscribers 92
  • Views 20403
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

db command to get power pin co-ordinates for a given Macro

deeps
deeps over 16 years ago

 Hi,

    I am trying to get the power pin co-ordinate details for a given Macro, 

        Is there a way by using db commands we can get the exact co-ordinate details of the power pins that are present on the Macro.I am using dbGet command to get the co-ordinate details of the macro location.

 

thanks

deepak. 

  • Cancel
  • jgentry
    jgentry over 16 years ago

    Deepak,

      You'll have to go through the macro instance's cell to get the details that you are looking for:

    set instPtr [dbGetInstByName MacroName]
    dbGet $instPtr.cell.pgTerms.pins.allShapes.shapes.rect
    dbGet $instPtr.cell.pgTerms.pins.allShapes.layer.name

       After that, you'll have to code up some translation scripts to put the cell coordinates into inst coordinates.

     

    JG 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • BobD
    BobD over 16 years ago

    Thanks JG,

    That's the way I'd do it too.  One additional command to be aware of is "dbTransform" that performs the translation you're referring to which converts the cell-level coords to chip-level.

    For example, if you have a cell that's instantated at 0, 884.82 with R270 orientation, you can translate each of the pgTerm rects to chip coordinates like this:

    encounter 26> dbGet selected.pt
    {0 884.82}
    encounter 27> dbGet selected.orient
    R270

    encounter 28>dbGet selected.cell.pgTerms.pins.allShapes.shapes.rect                                                                             
    {5.355 226.625 34.645 235} {5.355 226.625 34.645 235} {5.355 226.625 34.645 235} {5.355 226.625 34.645 235} {5.355 207.72 34.645 235} {5.355 207.72 34.645 235}

    encounter 29> foreach rect [dbGet selected.cell.pgTerms.pins.allShapes.shapes.rect] {puts "[dbTransform -localPt $rect -inst [dbGet selected]]"}
    {226.625 919.465} {235 890.175}
    {226.625 919.465} {235 890.175}
    {226.625 919.465} {235 890.175}
    {226.625 919.465} {235 890.175}
    {207.72 919.465} {235 890.175}
    {207.72 919.465} {235 890.175}

    Hope this helps,
    Bob

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • jgentry
    jgentry over 16 years ago

     Nice!  That will definitely come in handy.  Do you know which version that appeared in?  I have my own translation utilities that I can probably now replace with the dbTranslate command.

    JG

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • BobD
    BobD over 16 years ago

    It's been around since 7.1 I believe.  Here's the usage:

    encounter 1> dbTransform -help

    Usage: dbTransform [-help] [-d] -localPt {{x1 y1} {x2 y2}...} {-inst <instPtr> | {-cell <cellPtr> -orient <orientEnum> -pt {x y}}}

    -help                             # Prints out the command usage
    -d                                # Specifies if points are in dbUnit: default
                                      # is um (bool, optional)
    -inst <instPtr>                   # instance object (db object, optional)
    -cell <cellPtr>                   # cell object (db object, optional)
    -orient {dbcR0|dbcR90|dbcR180|dbcR270|dbcMX|dbcMX90|dbcMY|dbcMY90}
                                      # orientation (enum, optional)
    -pt {x y}                         # location (point, optional)
    -localPt {{x1 y1} {x2 y2}...}     # a pt {x y} or list of pts {{x1 y1} {x2
                                      # y2}...} inside cell (point list, required)

    One other thing to mention: In 9.1, dbTransform will automatically handle lists, so the foreach I used in my example could be removed and dbTrasnform could be called like this:

    [DEV]encounter 1> dbTransform -localPt [dbGet selected.cell.pgTerms.pins.allShapes.shapes.rect] -inst [dbGet selected]
    {226.625 919.465 235 890.175} {226.625 919.465 235 890.175} {226.625 919.465 235 890.175} {226.625 919.465 235 890.175} {207.72 919.465 235 890.175} {207.72 919.465 235 890.175}

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • jgentry
    jgentry over 16 years ago

     Very, VERY promising:

    encounter> time {dbTransform -d -localPt $cbox -inst $instPtr}
    104 microseconds per iteration

    encounter> time {eval "agConvertCellCoordsToInstCoords $cellPtr $instPtr $cbox"}
    810 microseconds per iteration

    I may have to do some coordinate rearranging to ensure I always get my data back as llx lly urx ury but that should be quick...

    proc dbTransform_and_legalize {cbox instPtr} {
      foreach {llx lly urx ury} [join [dbTransform -d -localPt $cbox -inst $instPtr]] {break}
      if {$urx < $llx} {
        set tmp $llx
        set llx $urx
        set urx $tmp
      }
      if {$ury < $lly} {
        set tmp $lly
        set lly $ury
        set ury $tmp
      }
      return [list $llx $lly $urx $ury]
    }

    dbTransform
    104 microseconds per iteration
    agConvertCellCoordsToInstCoords
    810 microseconds per iteration
    dbTransform_and_legalize
    155 microseconds per iteration

     50% overhead, ouch, still better than my in-house version.  I assume this can be used to convert inst coordinates to cell coordinates as well?  I'll play around with it some more.

    Thanks!

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • jgentry
    jgentry over 16 years ago

     Well, can't totally replace my functionality just yet.  dbTransform only supports objects of type 'dbcObjInst'.  My version supports objects of type 'dbcObjInst', 'dbcObjHInst' and 'dbcObjBump'.  Can I put in a request for that?  Also, I couldn't figure out how to go from inst to cell instead of cell to inst.

    Thanks,
    JG

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • BobD
    BobD over 16 years ago

    Hi JG,

    I did some asking around and some testing, and I see that dbcObjBump is supported as of 8.1.USR2. I will file an enhancement request for dbcObjHInst support.

    dbTransform currently only supports transforming from the inst level to the cell level and not the other way around. I will file an enhancement request for that as well.  I'll keep you informed on the status as we move along.

    Thanks for your feedback- we appreciate it.

    -Bob

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • jgentry
    jgentry over 16 years ago

     Thanks Bob.  I'll keep aneye out for the dbcObjHInst support (any idea the targetted release, I would think this would be fairly simple to implement).

      Regarding the inst-to-cell, cell-to-inst, I ended up creating a pretty generic 'transform-this-to-that' procedure that would take a reference box, reference orient, new box, new orient along with the base coordinates (with respect to the reference box) and do the transform.  Then it doesn't matter what you throw at it (insts, hinsts, bumps, grass, etc.) it simply does the transform asked of it.  When transforming from a cell's coords to an inst's coords, the reference box/orient is {0 0 urx ury}/dbcR0.

    JG

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • PradyK
    PradyK over 14 years ago

    Hi,

    Can I filter the cordinales by pin name? 

     Thakns,

    Pradeep

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • BobD
    BobD over 14 years ago

    Sure - you could filter on the pgTerm name and nest it within another dbGet call:

    dbGet [dbGet -p $instPtr.cell.pgTerms.name VDD].pins.allShapes.shapes.rect

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
>

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.

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

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