• 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. Sorting ADE variables and outputs

Stats

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

Sorting ADE variables and outputs

edogd
edogd over 15 years ago

In my ADE enviroment, I tend to end up with many variables and outputs.  ADE does not these lists and when you have a lot of variables and outputs it gets hard to find the one you are looking for.  So I wrote a small script to sort the lists,  but in order to see the results I have either: Save state and reload it to see sorted variables and outputs. Or create and then delete a dummy variable or output to update variables and outputs lists. Does anyone know how to update those lists in the ADE windows without doing the work around I mentioned?

Here is my code for sorting:

 cs=window(30)->sevSession ; Get session by using its window number

qq=copy(cs->variables) ; Get copy of variables

; Sort the variables
rr=sort( qq 'lambda( ( a b ) ( strcmp( a->name  b->name ) <= 0 ) ) )

; Renumber the variable index
cntr=1
foreach( x rr
       x->index=cntr
       cntr++
)
cs->variables=rr


qq2=copy(cs->outputs) ; Get copy of outputs

; Sort the outputs
rr2=sort( qq2 'lambda(
               ( a b )
               ; use non-nil fields for strcmp
               if( a~>name != nil
                 then name1 = a~>name
                 else if( a~>signal != nil
                    then name1 = a~>signal
                    else name1 = expression
                    )
                 )
               if( b~>name != nil
                 then name2 = b~>name
                 else if( b~>signal != nil
                    then name2 = b~>signal
                    else name2 = expression
                    )
                 )

               ( strcmp( name1  name2 ) <= 0 )
               )
       
       )

; Renumber the output index
cntr=1
foreach( x2 rr2
       x2->index=cntr
       cntr++
)
cs->outputs=rr2

  • Cancel
Parents
  • edogd
    edogd over 15 years ago

     I am using IC51.  It's unfortunate, that IC51 functions are still being kept private.   We won't be using IC6 for a while, we are too heavily entrenched with IC51.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • edogd
    edogd over 15 years ago

     I am using IC51.  It's unfortunate, that IC51 functions are still being kept private.   We won't be using IC6 for a while, we are too heavily entrenched with IC51.

    • 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