• 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 programtically rename a selected pin

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 145
  • Views 17071
  • 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 programtically rename a selected pin

polygon pusher
polygon pusher over 16 years ago

 What would the skill code look like to rename a selected pin in a layout(Virtuoso)?

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 16 years ago

    Not exactly what you want, but hopefully enough to get you started...

     

    /* abReplaceTermNames.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Jun 26, 2007 
    Modified   
    By         
    
    Function to replace a substring in a terminal - uses regular
    expression functions. For more details, see the comments below,
    but:
    
    abReplaceTermNames(cvId "from" "to")
    
    is a typical usage.
    
    ***************************************************
    
    SCCS Info: @(#) abReplaceTermNames.il 06/26/07.13:26:16 1.1
    
    */
    
    /******************************************************************
    *                                                                 *
    *  abReplaceTermNames(cvId pattern replace @optional (index 1))   *
    *                                                                 *
    *    Look for any terminal names in the view with a name which    *
    *   matches the regular expression pattern. When found, replace   *
    *    the matching pattern with the string replace. Normally it    *
    * will replace the first occurrence, but that can be changed with *
    * the optional index argument. Returns t if anything was changed. *
    *                                                                 *
    ******************************************************************/
    
    procedure(abReplaceTermNames(cvId pattern replace @optional (index 1))
        let((existTerm newName newNet changed)
    	rexCompile(pattern)
    	foreach(term cvId~>terminals
    	    when(rexExecute(term~>name)
    		newName=rexReplace(term~>name replace index)
    		existTerm=dbFindTermByName(cvId newName)
    		if(existTerm then
    		    warn("Cannot rename %s to %s as terminal already exists with that name" term~>name newName)
    		else
    		    ;----------------------------------------------------
    		    ; Update the name, and update the net too
    		    ; (by creating a new one and merging it)
    		    ;----------------------------------------------------
    		    term~>name=newName
    		    newNet=dbMakeNet(cvId newName)
    		    dbMergeNet(newNet term~>net)
    		    ;----------------------------------------------------
    		    ; Then update any labels attached to pin figures;
    		    ; textDisplays will be updated automatically, so it's
    		    ; only conventional labels we need to worry about
    		    ;----------------------------------------------------
    		    foreach(pin term~>pins
    			foreach(child pin~>fig~>children
    			    when(child~>objType=="label"
    				child~>theLabel=
    				    rexReplace(
    					child~>theLabel
    					replace
    					index
    				    )
    			    ) ; when label
    			) ; foreach child
    		    ) ; foreach pin
    		    changed=t
    		) ; if
    	    ) ; when
    	) ; foreach
    	changed
        ) ; let
    ) ; procedure
    
    

    Regards,

    Andrew.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • polygon pusher
    polygon pusher over 16 years ago

    Thanks Andrew, I think that's exactly what I'm looking for.

     Marvin 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tingm
    tingm over 16 years ago

     Hi,

    I used  "abReplaceTermNames" function to change the pin names in my layout. There is one interesting thing that the net name of the terminal is not changed with the code but only the terminal name is changed.

    However, if I manually edited the terminal name once, then use the code to change the terminal name and merge the net, both the terminal name and net name would be changed. Could you give me some idea why this is happening?

     My purpose is to rename the "vdd" pin to "vdd!" in order to match with the schematic to pass LVS. By only changing the terminal name without merging the net, the LVS does not complain, I am wondering what would be the issue if I only change the terminal name without merging the net.

     Thanks,

     Min

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    As I responded to this question on the comp.cad.cadence news group, I won't also respond here (too tricky to keep track of two separate threads; I'm a bear of very little brain).

    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