Hi,
I'm very new to scripted simulation and I'm trying ocean script. I'm trying to simulate a ring oscillator to see how frequencies vary with FET width. I'm trying a script without using parametric analysis because I want to understand how to use the loop statements like for, while etc.
This is my code.
Code:simulator( 'spectre )
design( "/scratch/mjahan/simulation/ring/spectre/schematic/netlist/netlist")
resultsDir( "/scratch/mjahan/simulation/ring/spectre/schematic" )
modelFile(
'("/research/isis/users/mjahan/cadence/8RF-IC6/models/allModels.scs" "tt")
'("/research/isis/users/mjahan/cadence/8RF-IC6/models/design.scs" "")
)
wlist = '( 250n 300n 350n 400n 450n 500n )
analysis('dc ?saveOppoint t )
analysis('tran ?stop "1u" ?errpreset "conservative" )
desVar( "i" 10u )
envOption(
'analysisOrder list("dc" "tran")
)
saveOption( 'currents "selected" )
saveOption( 'save "selected" )
save( 'v "/out" )
converge( 'ic "/out" "0" )
temp( 27 )
i = 1
while ( (i<7)
desVar( "w" nthelem(i wlist) )
run()
fout = (freq v("/out" ?result "tran-tran") "rising" ?xName "time" ?mode "auto" ?threshold 1.2)
plot( fout ?expr '( "fout" ) )
v\ \/out\;\ tran\ \(V\) = v("/out" ?result "tran")
plot( v\ \/out\;\ tran\ \(V\) ?expr '( "v /out; tran (V)" ) )
f_final = value( fout 1u )
printf( "final frequency = %f GHz\n", f_final/1e9 )
i = i+1
)
It's giving an error saying "too few arguments (at least 2 expected, 1 given)". Could someone please tell me what I'm doing wrong here? Thanks in advance.