(basics)
Open Command Environment for Analysis aka OCEAN Uses the Cadence SKILL language to configure the design environment. SKILL is a full-fledged language with the usual data types, operators, loops and constructs, FILE IO commands, linked lists etc.
Use Ocean based Scripts when :You have lots of simulations to run i.e. multiple Processes , Voltage & Temperature. When you cannot use Parametric Analysis, for ex. Process(SS,FF,TT) cannot be varied in the parametric analysis GUI . If you vary voltage, the measurement commands like rise and fall times for ex, vary with the voltage. Changing parameters in the GUI becomes painful. When you want to document your results and save them without errors. Lot of regression needs to be done. Do not use Ocean scripts when You have small sims and you want to do a quick analysis. You are feeling lazy to a write a small script :-)
Starting Point
From the session menu, save the file anywhere as a .ocn file.
Red Ellipse -> Basic Simulator Settings Green Ellipse -> Design Specific Settings
Simulation Loops
i=1 foreach(corner corners -> Looping structure , Can use FOR and While loops too
printf("Iteration no. %s \n",corner) -> Simple print command for debug resultsDir(strcat(defaultDir "/" corner)) -> Setting up the result Dir, Strcat is to set the path modelFile( list("/home/ameya/stm130/setupfile_typ_fast_slow.scs" sprintf( nil "%s" corner ) )) -> set the corner file, sprintf is the string print function analysis('tran ?stop "2m" ?errpreset "moderate" ) -> analysis type, change the accuracy, step time ,stop time as needed desVar( "fsample" 12K ) -> Setting up the design variables and temp desVar( "vsupply" 1.2 ) desVar( "trise" 150p ) option( 'temp nthelem(i temper) ) -> Accessing the ith element in temper temp( nthelem(i temper) ) run() -> Running the sim i = i+1 ) ## Sim completed :-)
References
http://www.cadence.com
Summary
Also possible to do almost any analysis in this way. AC/DC/MonteCarlo/Parametric etc. Maybe troublesome in the beginning. Long term is very helpful and improves efficiency for quick regressions.