• 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 edit Pin attributes (locations, terminal name etc...

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 143
  • Views 7306
  • 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 edit Pin attributes (locations, terminal name etc.) on layout?

RuihW
RuihW over 1 year ago

Hello,

I have a layout that contains 900+ output pins. All the routings are finished and the only thing left is to connect them to the pins. These pins will be placed on the top of the boundary.

I can generate all the pins from schematic, but the pin placer would place then in a sequential order (P0, P1, P2 ...). My layout has a different pin order as shown below. So I'd like to use SKILL to place them since I know the coordinate of each pin.

But I'm stuck on getting and setting the attributes of the pins. I'm thinking to do something like this, but couldn't figure out what to put in for the fields in red.

foreach(inst geGetSelSet() ; select all from layout

    when(inst~>[type] == "[Pin]"  ; if the instance is a pin

        pin_name = inst~>[name] ;Parse pin's name, ie extract "0" from "P0"

        (calculate left_x_coord based on pin_name)

        inst~>[left_edge] = left_x_coord

        inst~>[right_edge] = left_x_coord+pin_width

    )

)

  • Cancel
  • AurelBuche
    AurelBuche over 1 year ago

    There you go

    inst~>[type] == "[Pin]" inst->pin if the instance is a pin
    inst~>[name] inst->pin->net->name Parse pin's name, ie extract "0" from "P0"
    inst~>[left_edge] leftEdge(inst)
    inst~>[right_edge] rightEdge(inst)

    You can extract pin number from pin name using the following expression

    rexMagic(t) && inst->pin->net->name && pcreMatchp("([0-9]+)$" inst->pin->net->name) && pcreSubstitute("\\1")

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago in reply to AurelBuche

    A minor addition to Aurélien's post - what people refer to as the "pin name" is usually the terminal name, which is often but not always the same as the net name. So rather than using inst->pin->net->name it's better to use inst->pin->term->name .

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • RuihW
    RuihW over 1 year ago in reply to AurelBuche

    Thanks Aurelien and Andrew!

    A general question: where can I find such info? Is there a manual or reference? I had a similar issue when editing schematic instances but was lucky enough to guess the attribute name correctly.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RuihW
    RuihW over 1 year ago in reply to RuihW

    Update: I found it from Cadence Function Reference.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RuihW
    RuihW over 1 year ago in reply to AurelBuche

    Hi Aurel, theleftEdge() and rightEdge() can only return the x coordinate of the instance. How do I set the left and right edge of an instance? I tried inst~>xy = (x_coord:y_coord) but it didn't move the pin to that location.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago in reply to RuihW

    The pins are almost certainly not instances (you variable naming is likely to be confusing). They are probably rectangles, and so you would need to update the bBox of the rectangle to do this. You can set rect~>bBox to the new bounding box, and the bounding box needs to be of the form list(lowerLeftX:lowerLeftY upperLeftX:upperRightY)

    Andrew

    • 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