• 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 Design
  3. skill to detect ADEXL options

Stats

  • Locked Locked
  • Replies 38
  • Subscribers 127
  • Views 26295
  • 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

skill to detect ADEXL options

ejm20
ejm20 over 14 years ago

Im trying to create a skill script that will look at the ADEXL HPO options to calculate the required tokens.  Ive been able to read the options on the HPO panel but need some help with the rest.   Heres the beginning of the code:


;; defining the PreRun function
(define (PreRun session_name sdb_highandle mode_string test_name)
        (printf "Launching a new run %L %L %L %L\n" session_name sdb_highandle mode_string test_name)
       

       tests=axlGetTests(sdb_highandle)
            
    jobPolicyName=axlGetAttachedJobPolicy()->name
    distmethod=axlGetAttachedJobPolicy()->distributionmethod

         ;; traversing all the tests and changing the mt option as per the requirement

   foreach(  test_name cadr(tests)
      if(  axlGetEnabled(axlGetTest(sdb_highandle test_name)) then
          printf("test %s is enabled\n" test_name)
          testSession=axlGetToolSession(session_name test_name)
        
    println( "check MT options")        
    
          mt_opt=testSession~>simID~>data~>env~>data~>turboOpts~>data~>mtOption~>value
          if(eq(strcmp(mt_opt "Manual")  0) printf("  Manual MT will be disabled!!! \n"))
          if(eq(strcmp(mt_opt "Disable")    0) printf("Disabled MT \n"))
          if(eq(strcmp(mt_opt "Auto")     0) printf(" Auto MT will be disabled!!! \n"))
          if(eq(strcmp(distmethod "Local") 0) then printf(" Turning off the MT options for this test \n")
            testSession~>simID~>data~>env~>data~>turboOpts~>data~>mtOption~>value="Disable" )

    println( "check tool options")        

      tool_opt=testSession~>simID~>data~>env~>data~>turboOpts~>data~>uniMode~>value
       if(eq(strcmp(tool_opt "Spectre")  0) printf(" This is a Spectre run \n"))
       if(eq(strcmp(tool_opt "Turbo")  0) printf(" This is a Turbo run    \n"))
       if(eq(strcmp(tool_opt "APS")  0) printf(" This is an APS  run \n"))
       
    println( "check parasitic reduction option")        
 
       paraRed_opt=testSession~>simID~>data~>env~>data~>turboOpts~>data~>psrSwitch~>value
       if(eq(strcmp(paraRed_opt t )  0) printf(" parasitic reduction enabled \n"))
       if(eq(strcmp(paraRed_opt nil )  0) printf(" parasitic reduction disabled \n")

 The first issue is that paraRed_opt is either a nil or t  so strcmp wont work, is a simular command for t/nil ?

 Once I have the options gathered, I can use a series of if/thens but is there a more elegant way to handle this like with a truth table or increment command?

 Thanks

 

  • Cancel
  • ejm20
    ejm20 over 14 years ago

     Ive switch everthing over to public calls and it does work but I get an error when ultrasim is selected so how can I query the ADEXL simulator option so I can bypass this routine if ultrasim is selected?

     
    p, li { white-space: pre-wrap

    ERROR (ADE-5021): asiEnvGetVar: Variable 'turboOpts mtOption' is not declared for tool 'UltraSim21'.

    ERROR (ADE-5021): asiEnvGetVar: Variable 'turboOpts uniMode' is not declared for tool 'UltraSim21'.

    ERROR (ADE-5021): asiEnvGetVar: Variable 'turboOpts psrSwitch' is not declared for tool 'UltraSim21'.

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

     My wild guess without trying it (just from a quick scan of the documentation would be):

    asiGetSimName(asiSession)

    and then have a conditional statement using that:

    when(asiGetSimName(asiSession)=="spectre"
      ...
    )

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ejm20
    ejm20 over 14 years ago
    p, li { white-space: pre-wrap; }

    There is also asiGetToolName, both work but with different results shown below. Not sure if the quotes mean that ones a string the other is not?? Do you recommend using a when instead of an if/then? Is there a whenNot or something. I was thinking about doing if toolName=! "UltraSim" then

     

    simName=asiGetSimName(asiSession)
    println(simName)

     

    ==> "UltraSim"

     

     

    toolName=asiGetToolName(asiSession)
    println(toolName)

     

    ==> UltraSim

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

    asiGetToolName is not public (it's not documented). So use asiGetSimName. The difference is that one returns a string (asiGetSimName), and one returns a symbol - for details on the difference, I suggest either reading the SKILL Language User Guide, or better still attending some SKILL Language training.

    when() is fractionally more efficient (and more readable) than if() with a then part only. The opposite is unless(). I wouldn't have thought using toolName!="UltraSim" makes sense, because your code is specific to spectre - so if the simulator is hspiceD, ams, or anything else, it will also fail... surely it's best to use when(simName=="spectre" ...)

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ejm20
    ejm20 over 14 years ago

     asiGetSImName works.   There are actually quite a few simulators that need to addressed, specrtre and aps.   Can a when(   use an   "OR" funciton   when(  spectre || aps )?

     Thanks

     

     

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

    Aside from the fact that "aps" as a simulator choice in ADE is obsolete and should not be used any more (it even tells you this), you really should read the SKILL Language User Guide, which covers absolute basics like this.

    It doesn't matter whether you're using when() or if(), or unless() - they all take a conditional expression. You could do:

    simName=asiGetSimName(asiSession)
    when(simName=="spectre" || simName="somethingElse" ...
    )

    or

    when(member(simName '("spectre" "somethingElse" "yetAnotherMatch"))
      ...
    )

    The second checks to see whether the value is the member of a list.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ejm20
    ejm20 over 14 years ago

    This script is only triggered by ADEXL so APS should be valid.   For ADE, we use the HPO form for the simulator settings.

     

     

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

    Huh? "aps" is an obsolete simulator choice, regardless of where you pick it - it is equally obsolete in ADE XL as it is in ADE L. In ADE XL you would also use "spectre" as the simulator, and the High Performance Options form to pick aps as the simulation mode.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ejm20
    ejm20 over 14 years ago

    Lets backup a bit.....are you saying that APS is no longer valid as a executable or as an enhancer   spectre +aps   ?   I thought the APS option was faster than Turbo but used the same tokens count.    You can select the APS two ways:

    1)  ADEXL-->test-->simulator

    2)  ADEXL-->test editor which pops the ADE panel then either the simulator or the HPO form.

    Is this still correct?

     

     

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

    What I'm saying is that you should not use ADE L->Setup->Simulator/Dir/Host and set the simulator to "aps", nor should you do ADE XL->test->simulator and set that to "aps". The reason being that this interface was added initially to avoid breaking anything in spectre, but it does not support anything other than DC or transient analyses. It will be removed at some point in the future.

    The way to do it is to set the simulator to "spectre", and then set the "high performance options" form to "aps". The APS option on this form is definitely worth using - you'll get good speed improvement. Since APS (this way) supports all spectre analyses, having it as a separate simulator choice made no sense - better to be an option to spectre - hence the "High Performance Options" form.

    The plan is also to drop "Turbo" ultimately. With MMSIM101, APS on a single core takes the same number of tokens as "Turbo".

    The "aps" executable is essentially equivalent  to "spectre +aps" from the command line - it's kept for legacy for anyone with existing scripts.

    So given this, asiGetSimName() should never return "aps" unless you've used obsolete settings in ADE L or XL.

    Regards,

    Andrew.

    • 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