• 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. How to sort instances in layout based on instance name?

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 144
  • Views 17115
  • 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

How to sort instances in layout based on instance name?

ssram
ssram over 5 years ago

Hi,

How can i sort instances in layout based on instance name?

For example, if i've 50 instances named "inv<0:49>", how do i sort them all based on the instance name in an ascending/descending order?

Is there an built-in function that can do this? Or anyone has got a SKILL solution/approach to this?

Thanks

Ram

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

    By sort, do you mean to sort them physically (so they are placed in order, left to right or top to bottom)? Or do you just mean sort a SKILL list of such instances?

    If it's the latter, then:

    listOfInsts=sort(listOfInsts lambda((a b) minusp(alphaNumCmp(a~>name b~>name))))

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ssram
    ssram over 5 years ago in reply to Andrew Beckett

    Yes, sort them physically and place them in a row.


    Thanks

    Ram

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to ssram

    I don't have any code that does that, but having sorted the list of instances as above, you could step through the list updating the ~>xy of each instance to an incrementing location, so it would be easy enough to write...

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to ssram

    I don't have any code that does that, but having sorted the list of instances as above, you could step through the list updating the ~>xy of each instance to an incrementing location, so it would be easy enough to write...

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • ssram
    ssram over 5 years ago in reply to Andrew Beckett

    Finally... looks like there's a built-in function in the tool itself. It was hiding inside Align option, took some time figure it out.

    Thanks!

    • 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