• 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. Custom IC SKILL
  3. Skill code for getting coordinates of both ends of inst...

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 143
  • Views 17717
  • 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

Skill code for getting coordinates of both ends of instances

Skill User
Skill User over 11 years ago

Hello

 I am getting coordinates of instance using code given below but is only giving of one end. How can I get of other end? 

cv = geGetEditCellView()
foreach(inst cv~>instances
    geSelectFig(inst)
    printf("Inst name: %s  xy: %L  bBox: %L \n" inst~>name inst~>xy inst~>bBox)
)

Varun 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    Hi Varun,

    What do you mean by "one end" or "other end"? The code have shown is printing the location of the origin of the instance and the bounding box of the instance (i.e. the lower left and upper right coordinates of the extent of the instance). There is no "end" of an instance, so I don't know what you mean.

    When you place an instance, you give the coordinates (the "xy") of where you want 0,0 inside the instance master to be placed.

    So please clarify what you're after here. Maybe with pictures...

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Skill User
    Skill User over 11 years ago

    Hi Andrew

    My question is if I already have one resistor instance in schematic and I will use command like inst~>xy, it will give me value like (0.625  0.312) which are XY coordinates of only one point of resistor. What about other point means wire connects from 2 ends of resistor. I have one end coordinate how to get of another end?

    Hope it is clear now.

    Regards

    Varun 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    Hi Varun,

    As I explained, the ~>xy is the coordinate of where the origin of the resistor instance is placed. Whilst it might coincide with a pin on the resistor, it could also be anywhere - it could be in the middle of the symbol, say. So there is no guarantee that the ~>xy would be useful.

    If you are trying to locate the coordinates of the pins on the instance, then typically you'd do something like this:

    procedure(CCFgetPinCoordinates(inst)
      foreach(mapcar instTerm inst~>instTerms
        list(instTerm~>name
          dbTransformPoint(centerBox(car(instTerm~>term~>pins)~>fig~>bBox) inst~>transform)
        )
      )
    )

    This will return a list of lists, where each sublist is the name of the terminal and the coordinate of where the centre of the pin is.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • FormerMember
    FormerMember over 7 years ago in reply to Andrew Beckett

    Hi Andrew,

    I am trying to use the same code for finding the coordinates of all the four terminals of a mosfet(to be able to draw wire through it). But dbTransformPoint function is throwing an error mentioned below.

    a=geGetSelSet()

    foreach(mapcar instTerm a~>instTerms
    list(instTerm~>name
    dbTransformPoint(centerBox(caar(instTerm~>term~>pins)~>fig~>bBox) a~>transform)
    )
    )
    *Error* dbTransformPoint: Invalid transform - (((1.0 1.0) "R0" 1.0))
    <<< Stack Trace >>>
    dbTransformPoint(centerBox(((&~>fig)~>bBox)) (a~>transform))
    list((instTerm~>name) dbTransformPoint(centerBox((&~>bBox)) (a~>transform)))
    mapcar(lambda((instTerm) list((instTerm~>name) dbTransformPoint(& &))) (a~>instTerms)

    Please let me know how to resolve this issue.

    Thanks 
    Utkarsh

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dmay
    dmay over 7 years ago in reply to FormerMember

    Looks like the variable "a" is a list. You'll need to take the car of the list - car(a)~>transform, or car(a~>transform)

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • FormerMember
    FormerMember over 7 years ago in reply to dmay

    Hi dmay

    Thanks for the reply, with a little further modification I am able to get the coordinates of all 4 terminals on the instance.

    Regards
    Utkarsh

    • 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