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.
In reply to Andrew Beckett:
>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
In reply to ejm20:
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
They were added in IC614 ISR7 (220.127.116.110.7). Use:
asiEnvGetVal(asiSession "turboOpts" "mtOption")
there's also asiEnvSetVal(session partition prop value)
The variable in your case is called asiSess, not asiSession. That's why it fails.
In reply to Riad KACED:
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.
thanks for your prompt reply ! Doing pretty good in the US, thanks :-)
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?
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:
Hopefully this will answer your question.