OCEAN是基于字符界面的SKILL语言脚本,可以运行于字符界面活Cadence CIW界面。使用spectre仿真器可以实现的功能用OCEAN基本都可以实现,因此用OCEAN做corner扫描可以尽可能的节省人力。
Reference:OCEAN Reference
simulator( 'spectre ) ;;;-> Choose a simulator
design( "/home/hx/simulation/ADC_ANA_GSMC_tb/spectre/schematic/netlist/netlist") ;;;-> netlist
resultsDir( "/home/hx/simulation/ADC_ANA_GSMC_tb/spectre/schematic_ocean" ) ;;;-> Results area path
i=1
corners = list("ss" "tt" "ff") ;;;-> Setting corners, LIST data structure
foreach(corner corners ;;;-> Looping structure, for or while can used too
printf( strcat("The corner is " corner "\n")) ;;;-> print to CIW for debug
modelFile(
'("/home/GSMC/SIM_130SOIG_PDK_V0D2/SPICE_MODELS_FOR_0.13um_SOI_CMOS_PROCESS/SM_130SOIG/SM_130SOIG.scs" strcat(corner "tt_rvt"))
;printf(strcat(corner "tt_rvt" "\n"))
'("/home/GSMC/SIM_130SOIG_PDK_V0D2/SPICE_MODELS_FOR_0.13um_SOI_CMOS_PROCESS/SM_130SOIG/SM_130SOIG.scs" strcat("res_tt" corner))
;printf(strcat("res_tt" corner "\n"))
'("/home/GSMC/SIM_130SOIG_PDK_V0D2/SPICE_MODELS_FOR_0.13um_SOI_CMOS_PROCESS/SM_130SOIG/SM_130SOIG_RF.scs" strcat("cap_tt" corner))
;printf(strcat("cap_tt" corner "\n"))
) ;;;-> modelfile according to different corners, "strcat" function used here
temperature = list(-30 27 80) ;;;-> Setting temperatures
foreach(T temperature
printf( "The temperature is %d\n", T)
analysis('tran ?stop "(500 / VAR(\"Fs\"))" ?errpreset "conservative" ?maxstep "5p" )
desVar( "VCMO" 850m ) ;;;-> Setting up the design variables and temp
desVar( "vdd" 1.2 )
desVar( "VRP" 1.25 )
desVar( "VRN" 450m )
desVar( "Fs" 300M )
desVar( "jitter" 0 )
desVar( "fi" 2 )
desVar( "td" 2p )
desVar( "tr" 2p )
desVar( "tf" 2p )
desVar( "Temp" T );;;-> Temp will be used later as string
desVar( "N" i )
i=i+1
envOption(
'cmd64bit t
'analysisOrder list("tran" "dc")
)
option( 'nthreads "32"
'multithread "on"
'temp "27.0"
)
option( ?categ 'turboOpts
'numThreads "16"
'mtOption "Manual"
'uniMode "APS"
)
saveOption( ?outputParamInfo nil )
saveOption( ?elementInfo nil )
saveOption( ?modelParamInfo nil )
saveOption( 'pwr "none" )
saveOption( 'save "selected" )
save( 'v "/DA_OUT" )
temp( T )
;run() ;;;-> Running the sim
selectResult( 'tran )
newWindow()
plot(getData("/DA_OUT") ) ;;;-> Plot any stored waveforms
addTitle( strcat( "NO." desVar("N")))
addWindowLabel( list( 0.75 0.75) strcat( "T=" desVar("Temp") " corner=" corner))
Ts=1.0/evalstring(desVar("Fs"))
Sampler_Start = (39.5/40.0)*Ts
Sampler_Stop = 450*Ts
ocnPrint(?output strcat("/home/hx/opus/GSMC/Pipeline_ADC/oceanScript/Results/" desVar("Temp") "_" corner) ?precision 10 ?numberNotation 'none ?numSpaces 4 ?width 14 ?from Sampler_Start ?to Sampler_Stop ?step Ts v("/DA_OUT")) ;;;-> output the node "DA_OUT" to file
);;;-> temperature foreach ends"waveform_" desVar("i ") desVar("T ")
);;;-> corners foreach ends