Home > Community > Forums > Custom IC Design > Skill Code to modify pin names

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: *

 Skill Code to modify pin names 

Last post Thu, Nov 29 2012 9:01 AM by W Relyveld. 1 replies.
Started by bouhoume 27 Nov 2012 12:57 PM. Topic has 1 replies and 1577 views
Page 1 of 1 (2 items)
Sort Posts:
  • Tue, Nov 27 2012 12:57 PM

    • bouhoume
    • Not Ranked
    • Joined on Fri, Nov 23 2012
    • Posts 1
    • Points 20
    Skill Code to modify pin names Reply

    I've written a skill code that is supposed to change one of the pin names of a given cell from an old value to a new one in the schematic and symbol views. It works well on the surface but gives a warning that I have to fix: the pin name gets changed as wanted in both views but there's a warning that the pin list of the symbol does not match the pins on the symbol. In other words, although the pin on the symbol is changed, the pin name in the pin list is unchanged and I'm stumped as to how to reconcile the two.

    Here's the code and if anyone has any insights on this issue, please let me know:

     

    /* To be run on a single cell; the cell will have to be checked out first; lib and cell will be provided as argument*/

     

    procedure(cellChangePinName(myLib myCell oldName newName)

    let( ( myInstList myInstances myInst mycv myListOfNets myNet)

            ;cv=geGetEditCellView()

            if(!dbOpenCellViewByType(myLib myCell "schematic" "schematic" "a" )==t then

                    printf("\nCell is unwritable, make sure it's checked out and try again\n")

            else

     

                    mycv = dbOpenCellViewByType(myLib myCell "schematic" "schematic" "a" )

                    ;mycv = dbOpenCellViewByType("temp_brou" mycv~>cellName "schematic" "schematic" "a" )

     

                    myInstList=nil

                    myInstList = setof( myInstances mycv~>instances  myInstances~>pin~>term~>name == oldName )

                    ;myInstList = setof( myInstances mycv~>instances  myInstances~>pin~>term~>name == "VDD" )

                    if(length(myInstList)==0 then

                            printf("\nThere are no pin names of that name in the schematic of this cell:\n%s......%s/%s\n" oldName myLib myCell)

                    else

                            foreach(myInst myInstList

                                myInst~>pin~>term~>name = newName

                                ;myInst~>pin~>term~>name = "VDD_brou"

    myListOfNets=setof(myNets mycv~>nets myNets~>name==oldName)

    foreach(myNet myListOfNets

    dbMergeNet(dbMakeNet(myNet~>cellView newName) myNet~>term~>net)

    myNet~>name=newName

    );foreach

                            );foreach 

    schVIC(mycv)

                    ;dbSave(mycv)

                    dbClose(mycv)

                    );if

            );if 

    if(!dbOpenCellViewByType(myLib myCell "symbol" nil "a" )==t then

                printf("\nCell is unwritable, make sure it's checked out and try again\n")

            else

     

    mycvS = dbOpenCellViewByType(myLib myCell "symbol" nil "a" )

                myInstList=nil

                myInstList = setof( myInstances mycvS~>shapes  myInstances~>pin~>term~>name == oldName )

                if(length(myInstList)==0 then

                    printf("\nThere are no pin names of that name in the symbol of this cell:\n%s......%s/%s\n" oldName myLib myCell)

                else

                    foreach(myInst myInstList

                        myInst~>pin~>term~>name = newName

    ;myInst~>pin~>term~>name = "VDD_brou"

    myListOfNets=setof(myNets mycv~>nets myNets~>name==oldName)

    foreach(myNet myListOfNets

    dbMergeNet(dbMakeNet(myNet~>cellView newName) myNet~>term~>net)

    myNet~>name=newName

    );foreach

                    );foreach

    schVIC(mycvS)

    ;dbSave(mycvS)

    dbClose(mycvS)

                );if

     

            );if   

    );let 

    ) ;proc

     

    • Post Points: 20
  • Thu, Nov 29 2012 9:01 AM

    • W Relyveld
    • Not Ranked
    • Joined on Tue, Nov 10 2009
    • Eindhoven, Netherlands
    • Posts 2
    • Points 25
    Re: Skill Code to modify pin names Reply

    Hello Bouhoume,

     I think you need to check if the new name is a valid net and terminal. If not you need to create them. As example:

    Net = dbFindNetByName( Cell newName)

    unless( Net Net = dbCreateNet( Cell newName))

    Term = dbFindTermByName( Cell newName)

    unless( Term Term = dbCreateTerm( Net newName IOType)) 

     You need to define IOType ( "input" etc. ) Cell is mycv.

     

    Greetings, William 

    • Post Points: 5
Page 1 of 1 (2 items)
Sort Posts:
Started by bouhoume at 27 Nov 2012 12:57 PM. Topic has 1 replies.