Home > Community > Forums > Custom IC SKILL > How to programtically rename a selected pin

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 How to programtically rename a selected pin 

Last post Mon, Sep 7 2009 1:37 AM by Andrew Beckett. 4 replies.
Started by polygon pusher 07 Jul 2009 04:29 PM. Topic has 4 replies and 2015 views
Page 1 of 1 (5 items)
Sort Posts:
  • Tue, Jul 7 2009 4:29 PM

    How to programtically rename a selected pin Reply

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

    • Post Points: 20
  • Wed, Jul 8 2009 12:40 AM

    Re: How to programtically rename a selected pin Reply

    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.

     

    • Post Points: 35
  • Wed, Jul 8 2009 9:09 AM

    Re: How to programtically rename a selected pin Reply

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

     Marvin 

    • Post Points: 5
  • Fri, Sep 4 2009 1:07 PM

    • tingm
    • Not Ranked
    • Joined on Fri, Sep 4 2009
    • Posts 1
    • Points 20
    Re: How to programtically rename a selected pin Reply

     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

    • Post Points: 20
  • Mon, Sep 7 2009 1:37 AM

    Re: How to programtically rename a selected pin Reply

    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.

    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by polygon pusher at 07 Jul 2009 04:29 PM. Topic has 4 replies.