• 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. Generating Schematic pin list

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 20345
  • 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

Generating Schematic pin list

LakshmanQual
LakshmanQual over 7 years ago

Hi Team, I am generating the pin list from schematic as

cv=geGetEditCellView()
pins=cv~>terminals~>name .

If any bus is input or output, its coming directly as a bus only like Q<3:0>. But i want them as individual pins like Q<0> Q<1> Q<2> Q<3>.

There are 10's of buses in schematic, so i want all of them to come as individual pins.

Is there any way to generate them as individual pins? I want them to compare with layout pins?

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 7 years ago

    Are you asking how to create pins on the schematic, or just how to get a list of the member names? I think it's the latter you're asking for, then:

    dbProduceMemName("Q<3:0>")

    which outputs:

    ("Q<3>" "Q<2>" "Q<1>" "Q<0>")

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • iDave
    iDave over 7 years ago in reply to Andrew Beckett

    Hi Andrew,

    Assuming that I have a list like (“q<1>“ “q<0>”), Is there any function that can rebuild it to q<1:0>?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 7 years ago in reply to iDave

    Here's a bit of code I wrote a little over 10 years ago to do this (the comment at the top which talks about the case of nets is related to the code that this was part of, so you can ignore that):

    There's nothing built in which does it though. Make sure this code goes in a file with an ".ils" suffix, so that when loaded it uses SKILL++ semantics (needed for the local function that is defined within the outer function). Without that, it may not work...

    Regards,

    Andrew.

    /****************************************************************
    *                                                               *
    *              abCollapseAdjacentSignals(sigNames)              *
    *                                                               *
    *   A wild attempt to reduce an expanded set of member names    *
    * to a shorter net name expression. Will spot simple sequences, *
    *   such as adjacent repetitions and bus ranges, but will not   *
    *  spot repeated sequences of signals (e.g. will not collapse   *
    *  a,b,a,b to <*2>(a,b) ). This is used after having converted  *
    * the case on internal/external signals to recreate wire labels *
    *                                                               *
    ****************************************************************/
    
    defun(abCollapseAdjacentSignals (sigNames)
        let((prev prevBusRoot curBusRoot prevBusInd curBusInd
            prevDelta curDelta startInd sigList indCount curBusInfo)
    
            /******************************************************************
            *                                                                 *
            *             addToSignalList (sigList root busInfo)              *
            *                                                                 *
            *  Local function which updates a signal list, for a given root   *
            * and collected bus information. busInfo will contain information *
            *      about repeated (simple) sequences and bus ranges etc.      *
            *                                                                 *
            ******************************************************************/
    
            defun(addToSignalList (sigList root busInfo)
                ;------------------------------------------------------------
                ; Each entry in the busInfo is of this form
                ; list(startInd prevBusInd prevDelta indCount)
                ;------------------------------------------------------------
                let((sigName busRanges)
                    if(!cdr(busInfo) && !caar(busInfo) then
                        if(cadddr(car(busInfo))==1 then
                            sigName=root
                        else
                            sprintf(sigName "<*%d>%s" cadddr(car(busInfo))
                                root)
                        )
                    else
                        busRanges=foreach(mapcar busData busInfo
                            cond(
                                (caddr(busData)==nil || caddr(busData)==0 &&
                                    cadddr(busData)==1
                                    sprintf(nil "%d" cadr(busData))
                                )
                                (caddr(busData)==nil || caddr(busData)==0
                                    sprintf(nil "%d*%d" cadr(busData) 
                                        cadddr(busData)
                                    )
                                )
                                (caddr(busData)==1 || caddr(busData)==-1
                                    sprintf(nil "%d:%d" car(busData) cadr(busData))
                                )
                                (t
                                    sprintf(nil "%d:%d:%d" car(busData) 
                                        cadr(busData) abs(caddr(busData))
                                    )
                                )
                            )
                        )
                        sprintf(sigName "%s<%s>" root
                            buildString(busRanges ",")
                        )
                    )
                    sigList=tconc(sigList sigName)
                )
            )
    
            prev=car(sigNames)
            rexCompile("^\\([^<]*\\)<\\(.*\\)>$")
            if(rexExecute(prev) then
                prevBusRoot=rexSubstitute("\\1")
                prevBusInd=atoi(rexSubstitute("\\2"))
            else
                prevBusRoot=prev
                prevBusInd=nil
            )
            startInd=prevBusInd
            prevDelta=nil
            indCount=1
            foreach(sigName cdr(sigNames)
                if(rexExecute(sigName) then
                    curBusRoot=rexSubstitute("\\1")
                    curBusInd=atoi(rexSubstitute("\\2"))
                else
                    curBusRoot=sigName
                    curBusInd=nil
                )
                if(curBusRoot==prevBusRoot then
                    if(curBusInd && prevBusInd then
                        curDelta=curBusInd-prevBusInd
                    else
                        curDelta=nil
                    )
                    if(!prevDelta || curDelta==prevDelta then
                        indCount++
                    else
                        ;------------------------------------------------
                        ; Record previous range, and then start again
                        ;------------------------------------------------
                        curBusInfo=tconc(curBusInfo 
                            list(startInd prevBusInd prevDelta indCount)
                        )
                        startInd=curBusInd
                        indCount=1
                        curDelta=nil
                    )
                    prevDelta=curDelta
                    prevBusInd=curBusInd
                else
                    ;----------------------------------------------------
                    ; Record previous range, and then start again
                    ;----------------------------------------------------
                    curBusInfo=tconc(curBusInfo 
                        list(startInd prevBusInd prevDelta indCount)
                    )
                    sigList=addToSignalList(sigList prevBusRoot car(curBusInfo))
                    curBusInfo=nil
                    prevBusRoot=curBusRoot
                    prevBusInd=curBusInd
                    prevDelta=nil
                    indCount=1
                    startInd=prevBusInd
                )
            )
            ;----------------------------------------------------
            ; Record previous range, and then output
            ;----------------------------------------------------
            curBusInfo=tconc(curBusInfo 
                list(startInd prevBusInd prevDelta indCount)
            )
            sigList=addToSignalList(sigList prevBusRoot car(curBusInfo))
            car(sigList)
    ))
                

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 7 years ago in reply to iDave

    Here's a bit of code I wrote a little over 10 years ago to do this (the comment at the top which talks about the case of nets is related to the code that this was part of, so you can ignore that):

    There's nothing built in which does it though. Make sure this code goes in a file with an ".ils" suffix, so that when loaded it uses SKILL++ semantics (needed for the local function that is defined within the outer function). Without that, it may not work...

    Regards,

    Andrew.

    /****************************************************************
    *                                                               *
    *              abCollapseAdjacentSignals(sigNames)              *
    *                                                               *
    *   A wild attempt to reduce an expanded set of member names    *
    * to a shorter net name expression. Will spot simple sequences, *
    *   such as adjacent repetitions and bus ranges, but will not   *
    *  spot repeated sequences of signals (e.g. will not collapse   *
    *  a,b,a,b to <*2>(a,b) ). This is used after having converted  *
    * the case on internal/external signals to recreate wire labels *
    *                                                               *
    ****************************************************************/
    
    defun(abCollapseAdjacentSignals (sigNames)
        let((prev prevBusRoot curBusRoot prevBusInd curBusInd
            prevDelta curDelta startInd sigList indCount curBusInfo)
    
            /******************************************************************
            *                                                                 *
            *             addToSignalList (sigList root busInfo)              *
            *                                                                 *
            *  Local function which updates a signal list, for a given root   *
            * and collected bus information. busInfo will contain information *
            *      about repeated (simple) sequences and bus ranges etc.      *
            *                                                                 *
            ******************************************************************/
    
            defun(addToSignalList (sigList root busInfo)
                ;------------------------------------------------------------
                ; Each entry in the busInfo is of this form
                ; list(startInd prevBusInd prevDelta indCount)
                ;------------------------------------------------------------
                let((sigName busRanges)
                    if(!cdr(busInfo) && !caar(busInfo) then
                        if(cadddr(car(busInfo))==1 then
                            sigName=root
                        else
                            sprintf(sigName "<*%d>%s" cadddr(car(busInfo))
                                root)
                        )
                    else
                        busRanges=foreach(mapcar busData busInfo
                            cond(
                                (caddr(busData)==nil || caddr(busData)==0 &&
                                    cadddr(busData)==1
                                    sprintf(nil "%d" cadr(busData))
                                )
                                (caddr(busData)==nil || caddr(busData)==0
                                    sprintf(nil "%d*%d" cadr(busData) 
                                        cadddr(busData)
                                    )
                                )
                                (caddr(busData)==1 || caddr(busData)==-1
                                    sprintf(nil "%d:%d" car(busData) cadr(busData))
                                )
                                (t
                                    sprintf(nil "%d:%d:%d" car(busData) 
                                        cadr(busData) abs(caddr(busData))
                                    )
                                )
                            )
                        )
                        sprintf(sigName "%s<%s>" root
                            buildString(busRanges ",")
                        )
                    )
                    sigList=tconc(sigList sigName)
                )
            )
    
            prev=car(sigNames)
            rexCompile("^\\([^<]*\\)<\\(.*\\)>$")
            if(rexExecute(prev) then
                prevBusRoot=rexSubstitute("\\1")
                prevBusInd=atoi(rexSubstitute("\\2"))
            else
                prevBusRoot=prev
                prevBusInd=nil
            )
            startInd=prevBusInd
            prevDelta=nil
            indCount=1
            foreach(sigName cdr(sigNames)
                if(rexExecute(sigName) then
                    curBusRoot=rexSubstitute("\\1")
                    curBusInd=atoi(rexSubstitute("\\2"))
                else
                    curBusRoot=sigName
                    curBusInd=nil
                )
                if(curBusRoot==prevBusRoot then
                    if(curBusInd && prevBusInd then
                        curDelta=curBusInd-prevBusInd
                    else
                        curDelta=nil
                    )
                    if(!prevDelta || curDelta==prevDelta then
                        indCount++
                    else
                        ;------------------------------------------------
                        ; Record previous range, and then start again
                        ;------------------------------------------------
                        curBusInfo=tconc(curBusInfo 
                            list(startInd prevBusInd prevDelta indCount)
                        )
                        startInd=curBusInd
                        indCount=1
                        curDelta=nil
                    )
                    prevDelta=curDelta
                    prevBusInd=curBusInd
                else
                    ;----------------------------------------------------
                    ; Record previous range, and then start again
                    ;----------------------------------------------------
                    curBusInfo=tconc(curBusInfo 
                        list(startInd prevBusInd prevDelta indCount)
                    )
                    sigList=addToSignalList(sigList prevBusRoot car(curBusInfo))
                    curBusInfo=nil
                    prevBusRoot=curBusRoot
                    prevBusInd=curBusInd
                    prevDelta=nil
                    indCount=1
                    startInd=prevBusInd
                )
            )
            ;----------------------------------------------------
            ; Record previous range, and then output
            ;----------------------------------------------------
            curBusInfo=tconc(curBusInfo 
                list(startInd prevBusInd prevDelta indCount)
            )
            sigList=addToSignalList(sigList prevBusRoot car(curBusInfo))
            car(sigList)
    ))
                

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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