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?
Several things wrong with this code.
>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
It's probably simplest to implement that as a set of when statements:
tokenCount=0when(APS tokenCount=tokenCount+2)when(paraRed tokenCount=tokenCount+2)
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.
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.
We're running IC6.14 and the commands that you suggested are not recognized. Did I miss something?
*Error* eval: undefined function - asiGetHighPerformanceOptionVal
*Error* toplevel: undefined variable - asiGetHighPerformanceOptionVal