• 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 get/set name of the selected pin in schematic

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 143
  • Views 4648
  • 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 get/set name of the selected pin in schematic

alexstepanov75
alexstepanov75 over 3 years ago

After I select a pin in a schematic, how can I get/change the name of the pin? 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    I'm assuming you want the terminal name not the pin name (the pin name is not very useful). If it's selected, then it would be:

    car(geGetSelSet())~>pin~>term~>name

    This is because what you select in the Schematic is the pin figure which is associated with a pin object (which links the logical terminal to physical objects representing it), and then the pin object has a link to the terminal object (which has a name and an associated net object).

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • alexstepanov75
    alexstepanov75 over 3 years ago in reply to Andrew Beckett

    Andrew Beckett

    Andrew,

    Yes, you are right i am talking about the terminal name.

    If I want to get terminal name car(geGetSelSet())~>pin~>term~>name givs me the name

    If I want to set the terminal name

     car(geGetSelSet())~>pin~>term~>name="thename" works fine but

    car(geGetSelSet())~>pin~>term~>name="theName<1:0>" gives error

    How can I set name for the bus?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to alexstepanov75

    You can get away with changing the name of the terminal provided that the width of the terminal name matches the width of the net associated with the terminal. That's because the terminal name and net name do not have to match, although in general the schematic extractor (if you ran schCheck() again) would take care of making them match unless the wire is labelled with a different name than the pin name.

    So if you need to change the width, you'd have to do something like this:

    pinFig=car(geGetSelSet())
    oldPin=pinFig~>pin
    cv=pinFig~>cellView
    newNet=dbMakeNet(cv "theName<1:0>")
    newTerm=dbCreateTerm(newNet newNet~>name oldPin~>term~>direction)
    dbSubFigFromPin(oldPin pinFig)
    dbCreatePin(newNet pinFig)
    dbDeleteObject(oldPin)

    There's a bit of cleanup with textDisplays on the pins (you'll see some overlapping text most likely), but running schCheck() would fix that.

    In essence, the above is taking the old pin figure and the direction, and then creating a new pin using the pin figure having detached it from the previous pin).

    Quite a bit of housekeeping needed in practice! It might be simpler to just create a new pin to replace the old one:

    pinFig=car(geGetSelSet())
    newPin=schCreatePin(pinFig~>cellView pinFig~>master "theName<1:0>" pinFig~>pin~>term~>direction nil pinFig~>xy pinFig~>orient)
    dbDeleteObject(pinFig)

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • alexstepanov75
    alexstepanov75 over 3 years ago in reply to Andrew Beckett

    Andrew,

    Thank you for the explanation. If it is so complicated, it is strange that there is still no function to change pin name including bus width. There is definitely already a code for this running when I change pin name from the GUI. Why don't make it into a public function?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to alexstepanov75

    It's probably because nobody has asked for it. To be honest, I wouldn't have thought it terribly common to change an existing pin to be a bus pin (or vice versa) with SKILL - there are likely to be all sorts of other consequences of changing a bus width because everything you are connected to would need to be sorted out. So that's probably why there's no public function to do this (the UI will be doing this at a lower level than in SKILL most likely). I think this is the first time I've come across anyone asking this (I've got no code lying around to do this anyway), so that probably means it's a fairly rare requirement.

    In the early days of the schematic editor there weren't many SKILL procedural interfaces, and then a bunch were added (over 25 years ago) for the most common tasks. This probably didn't make the cut as one of the most common...

    There is this article (I didn't check the code): SKILL: How to change a given pin name in a symbol / schematic ?

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • alexstepanov75
    alexstepanov75 over 3 years ago in reply to Andrew Beckett

    Andrew,

    As you know, analog changed a lot over the past 25 years :) When you have a fixed size transistor, and the only thing you can change is the number of fingers, analog design became very much like digital with a lot of buses. Indeed we rarely need to change existing non-bus pins to bus. But we need to change bus sizes of existing pins all the time.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to alexstepanov75

    Alex,

    Of course, needs change; my comment was really that I'd not seen requests for this being done in SKILL rather than through the UI. Perhaps you could request an enhancement for a schematic API to do this via customer support?

    Regards,

    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