People, please, I'm new in the use of HSPICE, so I need some helps. I tried to simulate somethings with a mosfet. and I tried to find the maximun point in the deriv('sqrt(id(mn1))') and the Vgs for that point, and the sqrt(id(mn1)) for the same Vgs point. I know that I can do that using par functions and plotting in cosmo scope, but I want to use the Measure command. I did something like this to find the maximun point in the deriv('sqrt(id(mn1))') and the Vgs for that point:
Code:
.measure dc deriv_sqrt_id_max max deriv'(sqrt(id(mn1)))'
The hspice gave me the good answer : deriv_sqrt_id_max= 5.7847E-03 at= 1.1300E+00
But the problem is when a tried to use the same command .measure to find the sqrt(id(mn1)) in that point. I tried something like this:
Code:
.measure dc deriv_sqrt_id_max max deriv'(sqrt(id(mn1)))'
.measure dc sqrt_id find par('sqrt(id(mn1))') when par='max(deriv(sqrt(id(mn1))))'
I know that I wrong in the last code, but I tried to explain what I want, something like "to nested" or "to link" the measure command. Is it possible?
Hi erikl ! thanks a lot for your help! but the code didn't work yet. Now I'll tried to do a better explanation about the simulation that I want. The circuit is like this:
Code:
Vdd 1 0 gs
mn1 1 1 0 0 n L=2u W=2u
.dc gs 0 2 1m
.option probe
.options dcon=1
.probe dc id(mn1)
.probe dc sqrt_id=par('sqrt(id(mn1))')
.probe dc deriv_sqrt_id=deriv'(sqrt(id(mn1)))'
.end
And in cosmoscope I see two graphs:
plot 1: deriv_sqrt_id vs. vgs. Here I take the maximun point of the derivative of the square root of id(mn1) with the corresponding value of vgs, say "vgs_o".
plot 2: sqrt_id vs vgs. Here I take the value of the square root of id(mn1) at "vgs_o". This voltage "vgs_o" is already known from the plot 1.
So, if I use the .measured statement to know the same results that in plot 1, I write:
Code:
.measure dc deriv_sqrt_id_max max deriv'(sqrt(id(mn1)))'
and the hspice answer: deriv_sqrt_id_max= 5.7847E-03 at= 1.1300E+00. That's ok!
But I don't know how can I get -using the .measure command- the square root of id(mn1) at the "v_gso " value, obtained in the former .measure, where it was gotten 1.1300E+00. Is there any way to link the "v_gso" that gets HSPICE to evaluate in sqrt_id=par('sqrt(id(mn1))') function to get the proper sqrt(id(mn1)) in that "v_gso" value?
... and the hspice answer: deriv_sqrt_id_max= 5.7847E-03 at= 1.1300E+00. That's ok!
But I don't know how can I get -using the .measure command- the square root of id(mn1) at the "v_gso " value, obtained in the former .measure, where it was gotten 1.1300E+00. Is there any way to link the "v_gso" that gets HSPICE to evaluate in sqrt_id=par('sqrt(id(mn1))') function to get the proper sqrt(id(mn1)) in that "v_gso" value?