Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[Moved]: using measure in HSpice

Status
Not open for further replies.

Renato_PERU_1979

Newbie level 2
Joined
Oct 8, 2017
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
30
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?

Thanks!
 

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))))'

In your 1st .measure statement (which worked), you used 'quote signs' for the deriv expression term. Try this in your 2nd statement, too:
Code:
 .measure dc sqrt_id find par('sqrt(id(mn1))') when par='max(deriv '(sqrt(id(mn1)))')'

If this doesn't work either, try a comparison within the when expression:
Code:
 .measure dc sqrt_id find par('sqrt(id(mn1))') when par('sqrt(id(mn1))') = par(max(deriv '(sqrt(id(mn1)))'))
 

In your 1st .measure statement (which worked), you used 'quote signs' for the deriv expression term. Try this in your 2nd statement, too:
Code:
 .measure dc sqrt_id find par('sqrt(id(mn1))') when par='max(deriv '(sqrt(id(mn1)))')'

If this doesn't work either, try a comparison within the when expression:
Code:
 .measure dc sqrt_id find par('sqrt(id(mn1))') when par('sqrt(id(mn1))') = par(max(deriv '(sqrt(id(mn1)))'))

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?

thanks a lot!!!
 
Last edited:

... 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?

It's possible, but I don't know exactly how. Here a few snippets from the HSPICE® User Guide: Simulation and Analysis B-2008.09 which possibly might help you:
A_.MEASURE_statement_produces_a_measurement_parameter.png result_of_previous_.meas_statement.png To_get_new_measurements_from_a_previous_simulation.png View attachment Running_HSPICE_Interactively.pdf

Perhaps you can use the parameter deriv_sqrt_id_max directly. Try a few of these variations, either with at or when:
Code:
.measure dc sqrt_id find param=”sqrt(id(mn1)” at= deriv_sqrt_id_max
.measure dc sqrt_id find param=”sqrt(id(mn1)” at= par(deriv_sqrt_id_max)
.measure dc sqrt_id find param=”sqrt(id(mn1)” at= par=’deriv_sqrt_id_max’
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top