The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> oceanEval statement in Monte Carlo simulation in Spectre to expert current
https://designers-guide.org/forum/YaBB.pl?num=1529558382

Message started by pennyWWW on Jun 20th, 2018, 10:19pm

Title: oceanEval statement in Monte Carlo simulation in Spectre to expert current
Post by pennyWWW on Jun 20th, 2018, 10:19pm

Hi all,
I try to export the current in the monte Carlo simulation but failed.
Could someone help me?
The following is an example of a PMOS.
I want to record the PMOS source-drain current.
It seems in the export mc.mcdata file the export values are just voltage of Dp(3.3) and Sp(0). I could not get the current value flowing through Sp node.
Is there some one can help with the oceanEval statement?

Follows are my script.

...
parameters vgp=3.3
parameters vdp=3.3
parameters wp=1.15u

nP (Dp Gp Sp vdd) pch_33 l=500n w=wp
VSp (Sp 0) vsource dc=0
VDp (Dp 0) vsource dc=vdp
VGp (Gp 0) vsource dc=0

mc1 montecarlo variations=process seed=10000 numruns=37 savefamilyplots=yes {
dc1 dc
export i1=oceanEval("i(\"Sp\")")
export v=oceanEval("v(\"Dp\")")
}

Thanks!

Penny


Title: Re: oceanEval statement in Monte Carlo simulation in Spectre to expert current
Post by Andrew Beckett on Jun 23rd, 2018, 2:16am

Hi Penny,

You appear to be trying to measure the current on a node, which makes no sense (currents flow through branches or through device terminals). It should be:


Code:
export i1=oceanEval("i(\"VSp:p\")")


This is the "p" terminal of the voltage source connected to the source. You could also use :1 instead of :p.

In case you add more analyses, for safety the expression should also say which analysis it's from too:


Code:
export i1=oceanEval("i(\"VSp:p\" ?result 'dc)")


Regards,

Andrew.

Title: Re: oceanEval statement in Monte Carlo simulation in Spectre to expert current
Post by pennyWWW on Jun 26th, 2018, 3:59pm

Thanks so much!
It works!

Best,
Penny

Andrew Beckett wrote on Jun 23rd, 2018, 2:16am:
Hi Penny,

You appear to be trying to measure the current on a node, which makes no sense (currents flow through branches or through device terminals). It should be:


Code:
export i1=oceanEval("i(\"VSp:p\")")


This is the "p" terminal of the voltage source connected to the source. You could also use :1 instead of :p.

In case you add more analyses, for safety the expression should also say which analysis it's from too:


Code:
export i1=oceanEval("i(\"VSp:p\" ?result 'dc)")


Regards,

Andrew.


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