Home > Community > Forums > Custom IC SKILL > Sorting ADE variables and outputs

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

 Sorting ADE variables and outputs 

Last post Wed, Jul 28 2010 11:09 AM by edogd. 4 replies.
Started by edogd 27 Jul 2010 11:48 AM. Topic has 4 replies and 2003 views
Page 1 of 1 (5 items)
Sort Posts:
  • Tue, Jul 27 2010 11:48 AM

    • edogd
    • Not Ranked
    • Joined on Tue, Jul 27 2010
    • Irvine, CA
    • Posts 3
    • Points 45
    Sorting ADE variables and outputs Reply

    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

    Filed under:
    • Post Points: 20
  • Tue, Jul 27 2010 10:17 PM

    Re: Sorting ADE variables and outputs Reply
    Which version are you using? This is a standard feature in IC614 - you can sort and also manually reorder using drag and drop.

    I have some code to reorder the outputs for earlier releases but it uses private SKILL functions so I don't want to publish it here. I don't think you can do what you want without using private functions.

    So, if you're using an IC6 based release, moving to IC614 would be the easiest solution!

    Regards,

    Andrew
    • Post Points: 20
  • Wed, Jul 28 2010 9:30 AM

    • edogd
    • Not Ranked
    • Joined on Tue, Jul 27 2010
    • Irvine, CA
    • Posts 3
    • Points 45
    Re: Sorting ADE variables and outputs Reply

     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.

    • Post Points: 20
  • Wed, Jul 28 2010 10:24 AM

    Re: Sorting ADE variables and outputs Reply

    It's not a matter of the functions being "kept private". The vast majority of SKILL that runs in IC5141 will also work in IC61 too. If we make a function public in IC5141, it puts the onus on Cadence to ensure that the function continues to be supported in IC61X releases as well. This means that we cannot change those functions, we need to document all those functions, and so on. 

    So it's a practical trade off, I'm afraid.

    That said, I'm happy to provide the code to you as an individual, provided that it is used with care and not used beyond its expected life (i.e. no need to use it in IC614). Please log a service request via support.cadence.com and ask the AE to contact me and I'll provide the code. I just don't want to post it here as it's then effectively documenting the functions for all.

    Best Regards,

    Andrew.

    • Post Points: 5
  • Wed, Jul 28 2010 11:09 AM

    • edogd
    • Not Ranked
    • Joined on Tue, Jul 27 2010
    • Irvine, CA
    • Posts 3
    • Points 45
    Re: Sorting ADE variables and outputs Reply
    Hi Andrew,

    Thank you for the honest response.  There are many good features in IC6 that as an engineer we would love to use; however, it'll be a slow migration.

    In the mean time, I'll ask our Cadence coordinator to send in the service request as you detailed below.

    Again thank,

    E.D.
    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by edogd at 27 Jul 2010 11:48 AM. Topic has 4 replies.