The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 17th, 2024, 1:36am
Pages: 1
Send Topic Print
Hspice question (Read 2631 times)
sutapanaki
Community Member
***
Offline



Posts: 41

Hspice question
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.
Back to top
 
 
View Profile   IP Logged
nobody
Community Member
***
Offline



Posts: 75

Re: Hspice question
Reply #1 - 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')

Back to top
 
 
View Profile   IP Logged
sutapanaki
Community Member
***
Offline



Posts: 41

Re: Hspice question
Reply #2 - 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.
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.