• 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 do I rename a net which does not have net attribute...

Stats

  • Replies 8
  • Subscribers 149
  • Views 641
  • Members are here 0

How do I rename a net which does not have net attributes

GB20250109498
GB20250109498 20 days ago

Hi, How do I rename a net which does not have a net attribute, ie, netId~>net=nil using Skill. dbRenameNet works only when net has some names already.

  • Cancel
  • Sign in to reply
  • Andrew Beckett
    Andrew Beckett 20 days ago

    It's unclear what you are doing. If netId is a net object, it wouldn't have a net attribute, so doing netId~>net would be looking for a user-defined property called net, and if not present it would return nil.

    What does netId~>objType show?

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • LE202511197417
    LE202511197417 19 days ago

    You can use dbSetName on the net object itself, even if it has no existing name, to assign a new name.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 19 days ago in reply to LE202511197417
    LE202511197417 said:
    You can use dbSetName on the net object itself, even if it has no existing name, to assign a new name.

    No you can't. There's no such function as dbSetName and there's no such thing as a net object without a name.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • GB20250109498
    GB20250109498 18 days ago in reply to Andrew Beckett

    geGetSelectedSet()~>??
    ((db:0x74142d69 cellView db:0x7047971a objType "path"
    prop nil bBox
    ((186.112 43.828)
    (186.952 43.868)
    ) children
    nil groupMembers nil isAnyInst nil
    isShape t matchPoints nil net
    nil parent nil pin nil
    purpose "drawing" textDisplays nil assocTextDisplays
    nil markers nil figGroup nil
    isUnshielded nil shieldedNet1 nil shieldedNet2
    nil layerName "M4" layerNum 34
    lpp
    ("M4" "drawing") connRoutes nil routeStatus
    "normal" beginExt 0.0 endExt 0.0
    nPoints 2 points
    ((186.112 43.848)
    (186.952 43.848)
    ) pathStyle
    "truncateExtend" width 0.04
    )
    )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 18 days ago in reply to GB20250109498

    OK, so you have a figure selected (a path in this case) - the object you are looking at is not a "net".

    You'd need to do:

    cv=geGetEditCellView()
    net=dbMakeNet(cv "myNetName") ; whatever you want it to be
    ; either add all of the selected shapes to the net:
    foreach(fig geGetSelSet()
      dbAddFigToNet(fig net)
    )
    ; or just the first
    ; dbAddFigToNet(car(geGetSelSet()) net)

    Note that the reason I used dbMakeNet rather than dbCreateNet is that dbMakeNet works if the net already exists.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • GB20250109498
    GB20250109498 17 days ago in reply to Andrew Beckett

    Thanks Andrew, it worked Slight smile

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • GB20250109498
    GB20250109498 17 days ago in reply to GB20250109498

    Hi Andrew, I got some problem when I was handling bus names.  Idea is to select the paths and automatically assign the netnames like sig<0> sig<1>, sig<2>, sig<3>  ..... so on,  ascending or descending order. 

    cv=geGetEditCellView()
    busname="sig<0>"
    first_bit=atoi(nth(0 parseString(nth(1 parseString(busname "<")) ">")))
    signame=nth(0 parseString(busname "<"))
    count=first_bit
    foreach(fig geGetSelSet()
    sig_name=concat(signame "<" count ">")
    net=dbMakeNet(cv sig_name)
    dbAddFigToNet(fig net)

    count=count+1
    );foreach

    Error:

    Entering new debug toplevel due to error:
    *Error* eval: unbound variable - sig
    *Error* dbMakeNet: Invalid net name - sig\<0\>

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • GB20250109498
    GB20250109498 17 days ago in reply to GB20250109498

    Hi, Issue got fixed now. Let me know if any modifications are needed in the code, Thanks.

    cv=geGetWindowCellView()
    busname="sig<0>"
    first_bit=atoi(nth(0 parseString(nth(1 parseString(busname "<")) ">")))
    signame=nth(0 parseString(busname "<"))
    count=first_bit
    foreach(fig geGetSelSet()
    sig_name=concat(signame "<" count ">")
    sigName_s=sprintf(nil "%s" sig_name)
    net=dbMakeNet(cv sigName_s)
    fig~>route~>objects=remove(fig fig~>route~>objects)
    dbAddFigToNet(fig net)
    count=count+1
    );foreach

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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