Product Documentation
Virtuoso ADE SKILL Reference
Product Version IC23.1, November 2023

maeRunSimulation

maeRunSimulation(
[ ?session t_sessionName ] 
[ ?runMode t_runMode ]
[ ?callback t_callback ]
[ ?run t_runPlan ]
[ ?waitUntilDone g_waitUntilDone ]
[ ?returnRunId g_returnRunId ]
)
=> t_histname / x_runID / nil

Description

Sets the given run mode for the given session and runs simulation.

Arguments

?session t_sessionName

Name of the ADE Explorer or ADE Assembler session.

Default: Current session

?runMode t_runMode

Name of the run mode to be run.

The valid values are:

  • "Single Run, Sweeps and Corners”
  • "Monte Carlo Sampling"
  • "Global Optimization"
  • "Local Optimization"
  • "Improve Yield"
  • "Sensitivity Analysis"
  • "Conjugate Gradient Optimization"
  • "Feasibility Analysis"
  • "Create Worst Case Corners"
  • "Manual Optimization"
  • "Manual Tuning"
  • "Run Plan"
  • "Fault Simulation"
  • "Size Over Corners"

Default: "Single Run, Sweeps and Corners"

For ADE Explorer, you can set this argument to only "Single Run, Sweeps and Corners" or "Monte Carlo Sampling".

?callback t_callback

A callback procedure to be executed after completing the simulation.

?run t_runPlan

Name of the run plan. Use this argument in the scripts you save to run the plans created in the Run Plan assistant in ADE Assembler.

To run simulation for all the runs in the run plan, set this argument to "All".

?waitUntilDone g_waitUntilDone

Boolean value that determines if the tool should wait for this run to complete before executing the next command in the script.

Valid values are:

  • t: Specifies that the tool should wait for the completion of this run.
  • nil: Specifies that the tool should not wait for the completion of this run. You can use this option when you intend to run multiple runs in parallel. This is the default value.

?returnRunId g_returnRunId

Boolean value that determines if the tool should return the run ID instead of the default return value, history name.

Valid values:

  • t: Returns the run ID of the simulation run. You can use this run ID as an argument in other SKILL functions that require run ID instead of history name.
  • nil: Returns the history name of the simulation run. This is the default value.

Value Returned

t_histName

Name of the history created after the simulation run.

x_runID

Run ID of the simulation run

This value is returned only when the ?returnRunId argument is set to nil.

nil

The command was not successful.

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
 ⠀
X