• 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
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    Several things wrong with this code.

    1. When comparing strings, don't use eq() on the result of a strcmp. eq should not really be used with anything other than symbols or lists. Better to just do if(tool_opt=="Spectre" ... ) - much clearer and more concise
    2. You are delving into the internal data structures (which are not public). You should use the public API. For example:
      asiSess=sevEnvironment(testSession)
      mt_opt=asiGetHighPerformanceOptionVal(asiSession "mtOption")
      uniMode=asiGetHighPerformanceOptionVal(asiSession "uniMode")
      paraRed_opt=asiGetHighPerformanceOptionVal(asiSess "psrSwitch")
    3. Comparing a boolean is easy. In SKILL, nil is false, and anything else is true. So you can just use:
      printf("parasitic reduction %s\n"
        if(paraRed_opt then "enabled" else "disabled")
      )
    4. Similarly setting the mtOption can be done with:
      asiSetHighPerformanceOptionVal(asiSess "mtOption" "Disable")
    5. You could use a cond() to implement your various conditions (your truth table?)
      cond(
        (mt_opt=="Auto" && paraRed_opt printf("this combo\n"))
        (mt_opt=="Disable" && uniMode=="spectre" printf("that combo\n"))
        (t printf("default combo\n"))
      )
    6. I don't know what you mean by "increment command"

    Regards,

    Andrew.

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

     >6) I don't know what you mean by "increment command"

    As mentioned, I need to calculate the required token count so this can be implemented in a number of of ways one of which would be a table for each options:

    reset the token count to 0

    if APS then increment then token count   +2

    if parasitic reducution  then increment then token count   +2

     this would give a token total of 4

     

    Hope that helps

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

    It's probably simplest to implement that as a set of when statements:

    tokenCount=0
    when(APS tokenCount=tokenCount+2)
    when(paraRed tokenCount=tokenCount+2)

    etc.

    Or you might just want to run spectre to find out the number of tokens - spectre +query input.scs will tell you how many. It would have to have all the same command line arguments as would get passed to spectre, so it may not be that easy to implement.

    That way you've not hardcoded some dependency which may change in different releases.

    Regards,

    Andrew.

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

     unfortunately, the +query and +lreport option does not allow the job run, I have filed an enhancement request to also allow the job to run.  I need the token count for the NC job scheduler so it knows how many tokens are required for the job.  ADE works great but ADEXL has very different files systtem. 

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

    We're running IC6.14 and the commands that you suggested are not recognized. Did I miss something?

    asiSess=sevEnvironment(testSession)

    nil

    mt_opt=asiGetHighPerformanceOptionVal(asiSession "mtOption")

    *Error* eval: undefined function - asiGetHighPerformanceOptionVal

     

    *Error* toplevel: undefined variable - asiGetHighPerformanceOptionVal

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

    They were added in IC614 ISR7 (6.1.4.500.7). Use:

    asiEnvGetVal(asiSession "turboOpts" "mtOption")

    there's also asiEnvSetVal(session partition prop value)

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ejm20
    ejm20 over 14 years ago
    We have ISR4

    asiSess=sevEnvironment(testSession)

    nil

    asiEnvGetVal(asiSession "turboOpts" "mtOption")

    *Error* eval: unbound variable - asiSession

    asiEnvGetVal(asiSession "turboOpts" "mtOption")

    *Error* eval: unbound variable - asiSession
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    The variable in your case is called asiSess, not asiSession. That's why it fails.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ejm20
    ejm20 over 14 years ago
    I am so sorry but still no luck

    asiSession=sevEnvironment(testSession)

    nil

    asiEnvGetVal(asiSession "turboOpts" "mtOption")

    *Error* The default SKILL generic function has not been defined for the function "asiEnvGetVar". Ensure that this function is called with the correct argument(s) (tool partition name).

    asiSession=sevEnvironment(testSession)

    nil

    asiGetHighPerformanceOptionVal(asiSession "mtOption")

    *Error* eval: undefined function - asiGetHighPerformanceOptionVal
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago
    If sevEnvironment is returning nil, it suggests that testSession isn't correct...

    May be best to log a service request, then somebody in your time zone can help (I'm in England, so it's a bit late for me).

    In your first example you were getting the asiSession object via ->simID - that should be all that sevEnvironment is doing.

    So it suggests that something is wrong in an earlier step.

    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