maeRunSimulation
maeRunSimulation( [?sessiont_sessionName] [?runModet_runMode] [?callbackt_callback] [?runt_runPlan] [?waitUntilDoneg_waitUntilDone] [ ?returnRunIdg_returnRunId] ) =>t_histname/x_runID/ nil
Description
Sets the given run mode for the given session and runs simulation.
Arguments
Value Returned
|
This value is returned only when the |
|
Examples
The following example code runs simulation in Single Run, Sweeps, and Corners modes for the current session:
maeOpenSetup("solutions" "amptest" "maestro" ?mode "a")
=> "session1"
maeRunSimulation()
=> "Interactive.1"
;; returns the name of the history created by the run
The following example code runs Monte Carlo Sampling for the current session and executes the code given with the ?callback argument after completing the run:
maeRunSimulation(?runMode "Monte Carlo Sampling" ?callback "printf(\"Run Complete\")")
=> "MonteCarlo.1"
The following example code runs a simulation for the current session and executes a callback procedure after completion:
;; Loading setup
maeOpenSetup("testLib" "demo_top" "maestro" ?mode "a")
;; Post-simulation callback. Called after each run.
define( RunFinishedCallback(session runID)
printf("Run ID %L has finished" runID)
)
; Execute simulation
maeRunSimulation(?callback "RunFinishedCallback")
The following example code shows how you can run simulations for multiple sessions together:
;; Loading setup
session1 = maeOpenSetup("testLib" "demo_top" "maestro" ?mode "a")
session2 = maeOpenSetup("testLib" "block1" "maestro" ?mode "a")
;; Post-simulation callback. Called after each run.
define( RunFinishedCallback(session runID)
printf("Run ID %L has finished" runID)
)
; Run simulations
history1 = maeRunSimulation(?session session1 ?callback "RunFinishedCallback")
history2 = maeRunSimulation(?session session2 ?callback "RunFinishedCallback")
maeWaitUntilDone('All) ;;Generate unique file names where you want to save results file1=strcat(history1 "_" axlGetSessionLibName(session1) "_" axlGetSessionCellName(session1) "_" axlGetSessionViewName(session1)) file2=strcat(history2 "_" axlGetSessionLibName(session2) "_" axlGetSessionCellName(session2) "_" axlGetSessionViewName(session2)) ; file names are now available in file1 and file2 variables ;; Export Results to CSV maeExportOutputView(?fileName file1 ?session session1 ?historyName history1) maeExportOutputView(?fileName file2 ?session session2 ?historyName history2) exit()
The following example code shows how to check the simulation status for each point:
maeRunSimulation()
x_history=axlGetHistoryEntry(x_mainSDB "Interactive.3")
rdbPath=axlGetHistoryResults(x_history)
r=axlOpenResDB(rdbPath)
r->testStatus("myTest1_1" 1) ; myTest1 is the test name, 1 is the point ID
; returns an integer indicating the simulation status of a point
; 1 - Pending
; 2- Running
; 3- Done
;10 -Disabled status
Return to top