• 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 select the pins in preferred sequence

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 142
  • Views 15814
  • 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 select the pins in preferred sequence

Bala Sowjanya
Bala Sowjanya over 6 years ago

Hi,

I want to select the pins in the layout LEF in particular order either even or odd. How to implement that in skill?

Or

In the selected set how to deselect even or odd  pins in particular sequence?

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago

    I don't understand your question. LEF is a text format, so what does this even mean?

    What are you actually trying to do? Assuming you really are talking about selecting the pins in the layout editor in sequence, what are you doing with the results of that selection that the order matters?

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Bala Sowjanya
    Bala Sowjanya over 6 years ago in reply to Andrew Beckett

    Yes, I have series of pins in the layout editor. I need to change the layer of alternatives pins 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to Bala Sowjanya

    One way is to use the find command. For example, in the picture below, I have a bus of pins which was for a<31:0> - so there are 32 different pins a<31> through to a<0>. I then use Tools->Find/Replace and find them - I could select them or replace the layer directly on the form. I use the regular expression pattern to pick the even bits - could use a similar approach to pick the odd bits:

    If however your pins are just arbitrarily named and you want to select every other one, there's nothing really built-in to do that. It's easy to write some SKILL code to do it though. In this case, select all the pins (doesn't matter if you select non-pin objects too, because the code deselects the stuff you don't need) and then use this:

    /****************************************************************
    *                                                               *
    *      CCFdeselectEveryNthPin(@key (first 0) (step 2) byY)      *
    *                                                               *
    * Find all the selected objects, deselect everything other than *
    *  pins, and then sort in order by the centre of the bounding   *
    *  box. Default is to sort by x coord, but with ?byY t it will  *
    *     sort by increasing y coordinate. Then you can ask to      *
    *  deselect the 0th entry then every 2nd - or give a different  *
    *        ?first or ?step to alter what gets deselected.         *
    *                                                               *
    ****************************************************************/
    
    procedure(CCFdeselectEveryNthPin(@key (first 0) (step 2) byY)
        let((count sorted)
            foreach(object geGetSelSet()
                unless(object~>pin
                    geDeselectFig(object)
                )
            )
            sorted=sort(geGetSelSet() 
                lambda((a b)
                    let((aXY bXY)
                        aXY=centerBox(a~>bBox)
                        bXY=centerBox(b~>bBox)
                        if(byY then
                            yCoord(aXY)<yCoord(bXY)
                        else
                            xCoord(aXY)<xCoord(bXY)
                        )
                    )
                )
            )
            count=0
            foreach(object sorted
                when(count>=first && mod(count-first step)==0
                    geDeselectFig(object)
                )
                count++
            )
            t
        )
    )

    You'd then use CCFdeselectEveryNthPin() or CCFdeselectEveryNthPin(?first 1) to offset by 1, or CCFdeselectEveryNthPin(?byY t) if the pins are arranged vertically. This requires no knowledge of the pin names - it's purely based on the ordering of the centre of the pins.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Bala Sowjanya
    Bala Sowjanya over 6 years ago in reply to Andrew Beckett

    Thank you so much Andrew. I got the answer.

    Best Regards,

    Bala

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Bala Sowjanya
    Bala Sowjanya over 6 years ago in reply to Andrew Beckett

    Hi Andrew,

    While executing this program geqp: can't handle (0>="0") this error is coming. What is the reason for this?

    Best Regards,

    Bala

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to Bala Sowjanya

    Hi Bala,

    How are you calling the function? The only way I can see this could happen would be if you did CCFdeselectEveryNthPin(?first "0") - if so, you should omit the quotation marks around the 0 and use CCFdeselectEveryNthPin(?first 0).

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Bala Sowjanya
    Bala Sowjanya over 6 years ago in reply to Andrew Beckett

    Hi Andrew,

    Yes I got it. Thank you so much

    Best Regards,

    Bala

    • 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