• 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. Change symbol pin array size

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 144
  • Views 16321
  • 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

Change symbol pin array size

psill00
psill00 over 11 years ago

How to change symbol pin terminal array size?

I have tried to find the pin property to change the array size but get errors when i try to change the value.

 I am assuming I have to delete the pin and recreate the pin with the function, schCreateSymbolPin.

 schCreateSymbolPin(
d_cvId  ( cellview ID ) 
d_master ( can I get the master from the old pin? )
t_termName ( new name create )
t_direction ( get from old pin )
l_origin ( get from old pin )
t_orientation ( get from old pin )

If the is another method or function can you point me in the correct direction.

 Do I have to delete or add the new nets/terminals from the symbol view with the new array size?

Thanks

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    Normally you could do:

    term=dbFindTermByName(cvId "pinA")
    term~>name="pinB"

    and this works fine. It works OK with vector terminals too, provided that the width remains the same.

    If the size is changing, you can do:

    term=dbFindTermByName(cv "a<7:0>")
    pinFigs=term~>pins~>fig
    dbDeleteObject(term)
    newNet=dbMakeNet(cv "a<15:0>")
    foreach(pinFig pinFigs dbCreatePin(newNet pinFig))

    This will preserve all the existing pin figures and just associate them with the newly named terminals. The nets will all get sorted out when you do an schCheck(cv)

    So you don't really have to recreate the pins. Ah, just realised you were talking about symbols not schematics, but I think the method would be the same for a symbol too. You'd probably have to fix any pin labels because these will be wrong too.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • psill00
    psill00 over 11 years ago

     I am creating the new nets, but the pin/terminals are still the same.

     

     Paul

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

    Paul,

    The above example works fine for me with a symbol. You didn't really give any clues as to what didn't work...

    As I said, the pin labels didn't work, but that would just be a matter of updating the text of any children labels. For example changing the foreach loop which creates the pins to also update the labels:

    rexCompile("a<7:0>")
    foreach(pinFig pinFigs
      dbCreatePin(newNet pinFig)
      foreach(child pinFig~>children
        when(child~>objType=="label" && rexExecute(child~>theLabel)
         child~>theLabel=rexReplace(child~>theLabel newNet~>name 1)
        )
      )
    )

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • psill000
    psill000 over 11 years ago

     Thanks for the help.

    The script changes array size as I wanted. I don't know if to continue on this thread or start another for an issue after the change relating to the schematic and symbol terminals.

    I have another script that changes the schematic array instance, terminal, and wire net size,so the schematic and the symbol match terminals

    I get the warning:

    Warning: Terminal "setsa<14>" in view symbol not found in "test schematic".
    Warning: Terminal "setsa<12>" in view symbol not found in "test schematic".
    Warning: Terminal "setsa<13>" in view symbol not found in "test schematic".

    But the terminals in both the schematic and symbol match.Check and save does not change the problem

    Is there addition process I need to add to the script to get rid of the warnings?

    Paul

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

    Paul,

    I think I'd need to see what your code is doing...

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • psill000
    psill000 over 11 years ago

     The Schematic code:

     procedure(genNewSch(cv read write nRead nWrite)
    let(    (rdStr wrStr prefix netPrefix mstr dir netName
        lab xy txt jst ort fnt ht netPre netLab nWire pts termName
        ;(cv geGetWindowCellView())
        )
    rdStr    = sprintf(nil "<%n:0>" read-1)
    wrStr    = sprintf(nil "<%n:0>" write-1)

    foreach(inst cv~>instances
        prefix        = car(parseString(inst~>name "<"))
        cond(    (equal(inst~>numInst read)
                inst~>name = sprintf(nil "%s<%n:0>" prefix nRead-1))
            (equal(inst~>numInst write)
                inst~>name = sprintf(nil "%s<%n:0>" prefix nWrite-1))
            (inst~>pin && rexMatchp(rdStr inst~>pin~>net~>name)
                netPrefix    = car(parseString(inst~>pin~>net~>name "<"))
                mstr    = inst~>master
                dir    = inst~>pin~>term~>direction
                xy    = inst~>xy
                ort    = inst~>orient
                sprintf(termName "%s<%n:0>" netPrefix nRead-1)
                schCreatePin(cv mstr termName dir nil xy ort)
                dbDeleteObject(inst))
            (inst~>pin && rexMatchp(wrStr inst~>pin~>net~>name)
                netPrefix    = car(parseString(inst~>pin~>net~>name "<"))
                mstr    = inst~>master
                dir    = inst~>pin~>term~>direction
                xy    = inst~>xy
                ort    = inst~>orient
                sprintf(termName "%s<%n:0>" netPrefix nWrite-1)
                schCreatePin(cv mstr termName dir nil xy ort)
                dbDeleteObject(inst))
        )
    )

    foreach(shp cv~>shapes
        netName = shp~>net~>name
        when(equal(shp~>objType "line") && netName
            when(rexMatchp(rdStr netName) || rexMatchp(wrStr netName)
                pts    = shp~>points
                txt    = nil
                when(shp~>children
                    lab    = car(shp~>children)
                    xy    = lab~>xy
                    txt    = lab~>theLabel
                    jst    = lab~>justify
                    ort    = lab~>orient
                    fnt    = lab~>font
                    ht    = lab~>height
                    netPre    = car(parseString(txt "<"))
                    if(rexMatchp(rdStr netName) then
                        sprintf(netLab "%s<%n:0>" netPre nRead-1)
                    else    sprintf(netLab "%s<%n:0>" netPre nWrite-1))
                )
                when(pts
                    dbDeleteObject(shp)
                    schCreateWire(cv "route" "full" pts 0.0625 0.0625 0.0)
                    if(txt    schCreateWireLabel(cv nWire xy netLab jst ort fnt ht nil))
                )
            )
        )
    )
    schCheck(cv)
    dbSave(cv)
    dbClose(cv)
    t
    ); end of let
    ); end of genNewSch

     

    The symbol code:

     procedure(symbolPinSzChng(read write nRead nWrite)
    let(    (rdStr wrStr nRdStr nWrStr arrTxt newNet newTerm pinFigLst term
        (cv geGetWindowCellView())
        )
    rdStr    = sprintf(nil "<%n:0>" read-1)
    wrStr    = sprintf(nil "<%n:0>" write-1)
    nRdStr    = sprintf(nil "<%n:0>" nRead-1)
    nWrStr    = sprintf(nil "<%n:0>" nWrite-1)

    foreach(tName setof(x cv~>terminals~>name rexMatchp(rdStr x) || rexMatchp(wrStr x))
        term        = dbFindTermByName(cv tName)
        pinFigLst    = term~>pins~>fig
        dbDeleteObject(term)
        if(rexMatchp(rdStr tName) then
            rexCompile(rdStr)
            arrTxt    = nRdStr
            newTerm    = rexReplace(tName nRdStr 1)
            newNet    = dbMakeNet(cv newTerm)
        else    rexCompile(wrStr)
            arrTxt    = nWrStr
            newTerm    = rexReplace(tName nWrStr 1)
            newNet    = dbMakeNet(cv newTerm))
        foreach(pinFig pinFigLst
            dbCreatePin(newNet pinFig)
            foreach(child pinFig~>children
                when(child~>objType=="label" && rexExecute(child~>theLabel)
                    child~>theLabel = rexReplace(child~>theLabel arrTxt 1)
                )
            )
        )
    )
    t
    ;schCheck(cv)
    ;dbSave(cv)
    ;dbClose(cv)
    ); end of let
    ); end of symbolPinSzChng

    • 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