• 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 26282
  • 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
  • Riad KACED
    Riad KACED over 14 years ago
    Hi Andrew, I don't seem to be finding any documentation about asiEnvGetVal. neither in finder nor in the cdnshelp. I'm on IC6.1.4-64b.500.10. What do you think ? Regards, Riad ... from the other side of the pond :-)
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    Hi Riad,

    It's not documented. I was suggesting it because it's better than accessing the internal data structures; better still,  use the asiGetHighPerformanceOptionVal function which is public and documented (certainly in IC615, but it's available in IC614 ISR10 too). In general there should be a public specific function to get the right "OptionVal" - asiEnvGetVal was just the fallback because that was missing in this case, until the public function got added in IC614 ISR7.

    Good to hear from you! Hope things are going OK now you're in the US.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Riad KACED
    Riad KACED over 14 years ago

    Hi Andrew,

    thanks for your prompt reply ! Doing pretty good in the US, thanks :-)

    Riad.

     

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

     I pretty much got the routine working but I need to add a safeguard.  Im creating the file at the end of the routine with this:

     myPort = outfile( "runSimulation" )
     fprintf(myPort "%s %s %s\n" tool  multiThread  paraReduction_opt )
     close(myPort)

     I need to add some code at the beginning to see if the file exists and delete if it does.  What is the syntax to do this?

    Thanks

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

     Hi Rick,

    You can give an additional argument to the outfile function which is the mode, though the default mode is "w" for write or over-write which is what you would want I think, so I'm not quite sure why you need this (or why you think you might need it).  However, to answer your question more directly, you may do something like the following:

    when(isFile("runSimulation")
    deleteFile("runSimulation")
    ); when

    Hopefully this will answer your question.

    Cheers,

    Lawrence.

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

    Hi Lawrence - I wanted to add this just in case that there is hole in the logic where a condition is not met and the variables are not updated which could cause the wrong file contents to be generated.   I would rather have an empty file than a wrong one.   This is exactly what I need

    Thanks!!

    Rick

     

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

    Hi Rick,

    Ok, that makes sense - though in this case it would be "no file" wouldn't it ?  You could test the variables prior to deciding to open/update the file, to avoid writing something like "nil nil nil" out to the file, forall would be good for this:

    when(forall(var list(tool multiThread paraReduction_opt) var)
    myPort = outfile( "runSimulation" )
    fprintf(myPort "%s %s %s\n" tool multiThread paraReduction_opt )
    close(myPort)
    ); when the variables are all non-nil

     Hope this helps,

    Lawrence.

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

    Hi Lawrence - your working very late!....but I do appreciate it!!!

    So I would delete the file at the beginning and then this code would only allow a write if the variables are non-nil.....is that right?   BTW, paraReduction_opt  will be either   nil or t  . Does that change the code?  Perhaps using %L instead of %s  ?

     Thanks

    Rick

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

     Hi Rik,

    Yes, that's right, the first code snippet ("when(isFile...") would delete the file if it exists, and then the recent "when(forall"  statement would only ouput the variables if there are non-nil (assuming this is what you want, you can change the condition to whatever you need).   Yes also to changing the %s to %L for the paraReduction_opt, if this variable is of 'boolean' data type would avoid an error from fprintf about the format specifier.

    Cheers, and good night!

    Lawrence.

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

    HI Lawrence - Just wanted to thank you for making the suggestion about adding the extra file logic.   I found a condition where it would create a file with no contents which is caused an error.  

    Thanks again!!!!

     Rick

    • 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