• 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 make a pin from net (or wire)?

Stats

  • Locked Locked
  • Replies 15
  • Subscribers 144
  • Views 20279
  • 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 make a pin from net (or wire)?

shyoon
shyoon over 3 years ago

Hello Guys,

I want to automatically make pins from Net name or symbols.

(Cadence version : 6.1.8)

And I do not know the SKill well. 

Can I get some help?

Thank you!

  • Cancel
Parents
  • Kevin Buck
    Kevin Buck over 3 years ago

    This should get you started. The first line creates a net in the object newSchView, the second line creates a terminal and the third line generates a pin on the schematic canvas. The last line also draws a wire but that part is not explicitly necessary. You should be able to find these functions in the documentation to figure out exactly what you're trying to do as it's not totally clear from your post.


    newInputNet = dbCreateNet(newSchView nth(0 nth(0 term~>pins~>figs~>net~>name)))
    newInputTerm = dbCreateTerm(newInputNet nil "input")
    schCreatePin(newSchView inputCVId nth(0 nth(0 term~>pins~>figs~>net~>name)) "input" nil 0:ypin_ofs "R0")
    schCreateWire(newSchView "draw" "full" list(0:ypin_ofs xpin_ofs:ypin_ofs) 0.0625 0.0625 0.0 )

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to Kevin Buck
    Kevin Buck said:
    newInputNet = dbCreateNet(newSchView nth(0 nth(0 term~>pins~>figs~>net~>name)))
    newInputTerm = dbCreateTerm(newInputNet nil "input")
    schCreatePin(newSchView inputCVId nth(0 nth(0 term~>pins~>figs~>net~>name)) "input" nil 0:ypin_ofs "R0")
    schCreateWire(newSchView "draw" "full" list(0:ypin_ofs xpin_ofs:ypin_ofs) 0.0625 0.0625 0.0 )

    Kevin,

    Note that the first two lines are redundant - if you call schCreatePin and tell it the terminal name and direction, it will automatically create the net and terminal objects in the database. It's also a bit odd that you are starting from a terminal on the first line, creating a net with the same name (which must already exist, unless the variable term is in a different cellView?).

    This code can also be used to conveniently get the pin master used for creating the pin based on the same choices that appear in the schematic editor when creating pins:

    ; the variable "direction" needs to be set to the terminal direction
    ; you want
    ;
    ; assume that pinUsage is the type of pin to use 
    pinUsage="schematic"
    ;----------------------------------------------------------------
    ; Determine the pin master to use given the direction
    ; and pinUsage (normally schematic)
    ;----------------------------------------------------------------
    offsheet=cadr(assoc(pinUsage car(schPinMasters)))
    pinOptions=foreach(mapcar (usageInfo pinInfo)
            car(schPinMasters)
            cddr(assoc(direction schPinMasters))
        cons(car(usageInfo) pinInfo)
    )
    pinMasterInfo=cdr(assoc(pinUsage pinOptions))
    if(pinMasterInfo then
        pinMaster=dbOpenCellViewByType(
            car(pinMasterInfo) cadr(pinMasterInfo) caddr(pinMasterInfo)
        )
        unless(pinMaster
            error("Could not open pin master %L\n" pinMasterInfo)
        )
    else
        error("Could not find pin master for direction %L usage %L\n"
            direction pinUsage)
    )
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to Kevin Buck
    Kevin Buck said:
    newInputNet = dbCreateNet(newSchView nth(0 nth(0 term~>pins~>figs~>net~>name)))
    newInputTerm = dbCreateTerm(newInputNet nil "input")
    schCreatePin(newSchView inputCVId nth(0 nth(0 term~>pins~>figs~>net~>name)) "input" nil 0:ypin_ofs "R0")
    schCreateWire(newSchView "draw" "full" list(0:ypin_ofs xpin_ofs:ypin_ofs) 0.0625 0.0625 0.0 )

    Kevin,

    Note that the first two lines are redundant - if you call schCreatePin and tell it the terminal name and direction, it will automatically create the net and terminal objects in the database. It's also a bit odd that you are starting from a terminal on the first line, creating a net with the same name (which must already exist, unless the variable term is in a different cellView?).

    This code can also be used to conveniently get the pin master used for creating the pin based on the same choices that appear in the schematic editor when creating pins:

    ; the variable "direction" needs to be set to the terminal direction
    ; you want
    ;
    ; assume that pinUsage is the type of pin to use 
    pinUsage="schematic"
    ;----------------------------------------------------------------
    ; Determine the pin master to use given the direction
    ; and pinUsage (normally schematic)
    ;----------------------------------------------------------------
    offsheet=cadr(assoc(pinUsage car(schPinMasters)))
    pinOptions=foreach(mapcar (usageInfo pinInfo)
            car(schPinMasters)
            cddr(assoc(direction schPinMasters))
        cons(car(usageInfo) pinInfo)
    )
    pinMasterInfo=cdr(assoc(pinUsage pinOptions))
    if(pinMasterInfo then
        pinMaster=dbOpenCellViewByType(
            car(pinMasterInfo) cadr(pinMasterInfo) caddr(pinMasterInfo)
        )
        unless(pinMaster
            error("Could not open pin master %L\n" pinMasterInfo)
        )
    else
        error("Could not find pin master for direction %L usage %L\n"
            direction pinUsage)
    )
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Kevin Buck
    Kevin Buck over 3 years ago in reply to Andrew Beckett

    Good to know. I was not aware that schCreatePin did these functions implicitly, I can cut a few lines from my scripts if that is the case.

    • 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