The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 25th, 2024, 1:15pm
Pages: 1
Send Topic Print
problem in iterative simulation in ocean script (Read 3248 times)
Shahriar
Junior Member
**
Offline



Posts: 19
Chelsmford, MA
problem in iterative simulation in ocean script
Nov 20th, 2013, 3:33pm
 
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.
Back to top
 
« Last Edit: Nov 20th, 2013, 6:20pm by Shahriar »  

Shahriar
View Profile Shahriar   IP Logged
Shahriar
Junior Member
**
Offline



Posts: 19
Chelsmford, MA
Re: problem in iterative simulation in ocean script
Reply #1 - Nov 21st, 2013, 10:35am
 
Never mind. I found out the problem. I put a " " after while. It should "while(..." instead of "while (..."
Back to top
 
 

Shahriar
View Profile Shahriar   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.