The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> Hspice question
https://designers-guide.org/forum/YaBB.pl?num=1233267652

Message started by sutapanaki on Jan 29th, 2009, 2:20pm

Title: Hspice question
Post by sutapanaki on Jan 29th, 2009, 2:20pm

I usually use a different simulator -eldo, but now I need to do things with Hspice, so I hope you'll excuse me if the question is too stupid. How can I define, probe (and plot with cosmos scope) expressions of waveforms? What is the syntax? For example, a simple one as Vout/Vin to a more complex 20*log(Vin/Vout) and so on, you get the idea. In eldo I can do .defwave and the expression, (or .LET in SmartSpice) but in Hspice it seems not the same. Thanks.

Title: Re: Hspice question
Post by nobody on Jan 29th, 2009, 7:33pm

I think cosmoscope can give you a complex expression directly like 20*log(Vin/Vout) . If you want to get the relation like vout/vin, you can use the calculator. For example, get the signal of "vout" on your cosmoscope, then use the middle button of your mouse to select and put it on the calculator. Do above step to get vin, then you will have vout and vin in your calculator. Divide vout with vin and click a button with a waveform to generate vout/vin. Or you can do that with an easy way.  Probe vout and vin and do the multiplication. To get vout/vin, use the statement like follows.


.probe gain = par('vout/vin')


Title: Re: Hspice question
Post by sutapanaki on Jan 30th, 2009, 10:39am

Yes, I tried that and it kind of works, but the ac response I get for V(out)/V(in) is wrong, the -3dB frequency is much higher than that of both V(out) and V(in) individually. DC gain is correct. Individually both Vout  and Vin are correct too, but when I combine them in an expression the result is wrong. Can't understand why.

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