How to get location of all terminals in layout view?

Discussion in 'Cadence' started by Reotaro Hashemoto, Jun 23, 2009.

  1. Hi,

    In layout view, I have instances placed from a PDK, I want to get x,y
    location of all terminals for their pCells, how can I do that?

    I've tried to use something like: cv~>instTerms~>... but it always
    leads to nil.

    What I particularly need to do is to add label on each net that is
    port/pin (whatever u name it) in the layout.


    P.S. I have only floating instances (defaults from PDK) in layout with
    no nets...

    Can anybody help me out?

    Thanks and best regards,
    Ahmad
     
    Reotaro Hashemoto, Jun 23, 2009
    #1
  2. Reotaro Hashemoto wrote, on 06/23/09 14:03:
    Ahmad,

    Starting from a cellView doesn't make much sense - I assume you'd start from an
    instance id.

    So for example:

    ; if the instance is selected
    inst=car(geGetSelSet())
    ; or if you know the instance name
    ; inst=dbFindAnyInstByName(cv "I1")
    ; or a loop over all instances
    ; foreach(inst cv~>instances ...)

    You can't use instTerms unless it was created with something like Virtuoso XL.
    So you'll probably want:

    master=inst~>master
    transform=inst~>transform
    foreach(term master~>terminals
    foreach(pin term~>pins
    ; the reason for the || is so that this works in both CDB and OA. In
    ; OA, pins can have multiple figures, but in CDB only have one.
    foreach(fig pin~>figs || list(pin~>fig)
    pinBBox=fig~>bBox
    pinCenter=dbTransformPoint(centerBox(pinBBox) transform)
    printf("Term %L is at %L on layer %L\n"
    term~>name pinCenter fig~>layerName
    )
    )
    )
    )

    This gives the coordinates transformed to the containing cellView.

    Regards,

    Andrew.
     
    Andrew Beckett, Jun 23, 2009
    #2
  3. Reotaro Hashemoto

    Ahmad Guest

    Hello Andrew,

    Thanks a lot, I want to understand the logical meaning of
    "transformation", can u please explain it?

    One more thing, where do more details about ~> elements can be found
    explained within manuals? Since trials and guessing from using "~>?"
    doesn't always succeed...

    Best regards,
    Ahmad
     
    Ahmad, Jun 24, 2009
    #3
  4. Ahmad wrote, on 06/24/09 10:40:
    Ahmad,

    If the pin figures are being found in the master of the cell that is being
    instantiated, the coordinates will be in the coordinate space of the master's
    cellView - i.e. 0,0 will be the origin of that layout.

    When the cell is instantiated, it will be instantiated at a particular x,y
    location, and with a specified orientation (possibly a magnification too if in
    IC5141). I was presuming you wanted to find the location of the pins on each
    instance, in the coordinate system of the cellView containing the instance. So
    this means that I need to take the coordinates of the pin figure within the
    instantiated master, and then transform to the coordinate system of the
    containing cellView - this means applying the same transformation that was
    applied to the instance when placed.

    Is that clearer?

    As for details about the ~> attributes, these are covered in the Cadence Design
    Framework II SKILL Functions Reference manual
    (<instdir>/doc/skdfref/skdfref.pdf), in Chapter 2 "Database Access", at the end
    of the chapter in the section called "Description of Database Objects"

    In IC613 it's the same PDF filename, but the title is "Virtuoso Design
    Environment SKILL Reference".

    Regards,

    Andrew.
     
    Andrew Beckett, Jun 24, 2009
    #4
  5. Reotaro Hashemoto

    Ahmad Guest

    Thanks, it's perfectly clear now.

    Regards,
    Ahmad
     
    Ahmad, Jun 24, 2009
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.