The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 6:39pm
Pages: 1
Send Topic Print
VCO OCEAN SCRIPT CONVERGENCE PROBLEM (Read 3170 times)
jm1974
New Member
*
Offline



Posts: 5

VCO OCEAN SCRIPT CONVERGENCE PROBLEM
Oct 02nd, 2005, 3:23pm
 
I am doing corners analysis using an ocean script I created for VCO.
I'm running the following pss and pnoise analysis and calculating the noise using an expression.

analysis('pnoise ?sweeptype "relative"  ?relharmnum "1"  ?start "1k"  
           ?stop "20M"  ?maxsideband "10"  ?p "/out"  ?n "/gnd"  
           ?oprobe ""  ?iprobe ""  ?refsideband ""  )
analysis('pss ?fund "2G"  ?harms "2"  ?errpreset "conservative"  
           ?tstab "171n"  ?saveinit "yes"  ?p "/out"  ?n "/gnd"  
           ?method "gear2only"  ?tstabmethod "gear2only"  ?tstart "40n"  )

run()
;*******************************************************************************

;                                Output results
;*******************************************************************************

;*******************************************************************************

;                                Run analyses
;*******************************************************************************


pn10k = value((-dB20(ymax(mag((v "/out" ?result "pss-fd.pss" ?resultsDir "/proj/work_libs/jm/cds/simulation/vco_sim1/spectre/schematic")))) + dB20(getData("/out" ?result "pnoise-pnoise" ?resultsDir "/proj/work_libs/jm/cds/simulation/vco_sim1/spectre/schematic"))
+ 3) 10000)
printf( "%6.2e \n" pn10k)

Half way through the 400 iterations my script goes through a convergence problem. PSS does not converge. This causes evaluation of expression to fail ( cannot evaluate ymax of nil) and the script stops running and exit the iteration. But what I want to do is ignore this one corner and move to the next iteration.   I will address the bad convergence corners later. I can't find a way to work around this and I was hoping you all might be of help.

Thanks
JM
Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: VCO OCEAN SCRIPT CONVERGENCE PROBLEM
Reply #1 - Oct 4th, 2005, 9:56pm
 
Surround the processing with some conditional statements which check for results being present. For example:

Code:
when(mysig=v("/out" ?result "pss-fd.pss" ?resultsDir "/proj/work_libs/jm/cds/simulation/vco_sim1/spectre/schematic")
   pn10k = value((-dB20(ymax(mag(mysig)) ...
   printf( "%6.2e \n" pn10k)
) ; when
 



If the v("/out") returns nil, it won't execute the code which fails due to invalid values.

Regards,

Andrew.
Back to top
 
 
View Profile WWW   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.