• 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 to perform a function on selected pins in sc...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 14859
  • 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 to perform a function on selected pins in schematic

SteveRFIC
SteveRFIC over 9 years ago

Hi,

I have a schematic, which has several symbols (instance) in it. Each symbol has a certain number of pins. I want to select a few pins from different symbols (by Ctrl clicking on the pins), and then call some functions for each of the pin, for instance print the pin names of each selected pin. How can I achieve this through SKILL?

I think I should use foreach but I don't know how to call the selected pins inside foreach.

Really appreciate the help. Thanks a lot!

Gang

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Hi Gang,

    Because the objects you are selecting are not in the schematic itself, you can't use the normal geGetSelSet() or geGetSelectedSet() functions. Instead you have to use geGetObjectSelectedSet(). This provides information not only on the object selected, but it's hierarchical context - in this case it has the instance id of the instance on which the pin resides. The actual object you're selecting is the pin figure, so you have to get from the rectangle (say) to the pin, to the terminal to find its name. 

    Here's what geGetObjectSelectedSet() returns (in my case, with a few such pins selected):

    ((db:0x1bb1b392
         ((db:0x1bb1e412 0 0 0))
       )
       (db:0x1bb1b39a
         ((db:0x1bb1e412 0 0 0))
       )
       (db:0x1bb1b396
         ((db:0x1bb1e412 0 0 0))
       )
       (db:0x1bb1bda0
         ((db:0x1bb1e415 0 0 0))
       )
    )

    Here's some code to use that information to show something interesting:

    foreach(objInfo geGetObjectSelectedSet()
      printf("Pin %s on instances %s\n" car(objInfo)->pin~>term~>name caaadr(objInfo)~>name)
    )

    In my case, this prints:

    Pin vtune on instance I1
    Pin vcobnd<4:0> on instance I1
    Pin vcocalen on instance I1
    Pin PLUS on instance V2

    The caaadr is just a shorthand to pull out the instance object. We don't care too much about the other values (the three zeros) - these are related to iterated instances, and mosaic arrays and columns (which won't be relevant here - I think in a schematic these would always be zero).

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Hi Gang,

    Because the objects you are selecting are not in the schematic itself, you can't use the normal geGetSelSet() or geGetSelectedSet() functions. Instead you have to use geGetObjectSelectedSet(). This provides information not only on the object selected, but it's hierarchical context - in this case it has the instance id of the instance on which the pin resides. The actual object you're selecting is the pin figure, so you have to get from the rectangle (say) to the pin, to the terminal to find its name. 

    Here's what geGetObjectSelectedSet() returns (in my case, with a few such pins selected):

    ((db:0x1bb1b392
         ((db:0x1bb1e412 0 0 0))
       )
       (db:0x1bb1b39a
         ((db:0x1bb1e412 0 0 0))
       )
       (db:0x1bb1b396
         ((db:0x1bb1e412 0 0 0))
       )
       (db:0x1bb1bda0
         ((db:0x1bb1e415 0 0 0))
       )
    )

    Here's some code to use that information to show something interesting:

    foreach(objInfo geGetObjectSelectedSet()
      printf("Pin %s on instances %s\n" car(objInfo)->pin~>term~>name caaadr(objInfo)~>name)
    )

    In my case, this prints:

    Pin vtune on instance I1
    Pin vcobnd<4:0> on instance I1
    Pin vcocalen on instance I1
    Pin PLUS on instance V2

    The caaadr is just a shorthand to pull out the instance object. We don't care too much about the other values (the three zeros) - these are related to iterated instances, and mosaic arrays and columns (which won't be relevant here - I think in a schematic these would always be zero).

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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