The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Measurements >> Phase Noise and Jitter Measurements >> VCO OCEAN SCRIPT CONVERGENCE PROBLEM
https://designers-guide.org/forum/YaBB.pl?num=1128291821

Message started by jm1974 on Oct 2nd, 2005, 3:23pm

Title: VCO OCEAN SCRIPT CONVERGENCE PROBLEM
Post by jm1974 on Oct 2nd, 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

Title: Re: VCO OCEAN SCRIPT CONVERGENCE PROBLEM
Post by Andrew Beckett on 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.

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.