Skill Qn: How to change pin name using skill code

Discussion in 'Cadence' started by suresh j, Jan 20, 2004.

  1. suresh j

    suresh j Guest

    Hi,
    We create pins using the interactive command leHiCreateChoiceOfPin().
    This has options so that the pin name is displayed as a label and
    attached to the metal layer. When we change the pin name in the
    interactive mode, the label text also gets changed automatically.
    I want to do this using skill. Could somebody suggest a way?

    Thanks.

    regards,
    Suresh J
     
    suresh j, Jan 20, 2004
    #1
  2. Hi Suresh,

    The label created is a textDisplay (I think for that command), and shows the
    name of the terminal for the pin. If the terminal name changes, it automatically
    will change what it displays. So all you'd have to do is change the terminal
    associated with the pin object. Should be doable with db functions.
    (sorry about the brief answer; I'm in a hotel (as usual...))

    Andrew.
     
    Andrew Beckett, Jan 20, 2004
    #2
  3. suresh j

    Trevor Bowen Guest

    It is possible for the database to support a net name that is different
    than the attached terminal name. However, changing the terminal name,
    as you suggested, and then performing a "Check and Save" will update the
    old net to the new name.

    In case you do not want to have run "Check and Save", and you want your
    code to do it for you, try this:

    dbMergeNet(dbCreateNet(term~>cellView new_name) term~>net)
    term~>name = new_name

    Currently, you cannot rename a net directly, as you can for a terminal,
    (I think this should be possible, personally) so you have to create a
    new net with the new name and merge the old net into the new net.
     
    Trevor Bowen, Nov 21, 2005
    #3
  4. I assume you're talking about the labels attached to wires attached to the pin
    you just renamed (by changing the terminal name)? If so, these will not change
    automatically at check-and-save time as was suggested.

    Say you have three variables already set:

    cv - database object of cellView
    oldName - old terminal name
    newName - new terminal name

    then:

    term=dbFindTermByName(cv oldName)
    term~>name=newName
    foreach(fig term~>net~>figs
    foreach(child fig~>children
    when(child~>objType=="label" && child~>theLabel==oldName
    child~>theLabel=newName
    ) ; when
    ) ; foreach
    ) ; foreach

    will do it. This looks at all the figures associated with the net (e.g the
    wires), and then looks for children of these wires (the attached labels) and
    changes them.

    Regards,

    Andrew.
     
    Andrew Beckett, Nov 24, 2005
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.