The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> Printing magnitude in "AC" analysis
https://designers-guide.org/forum/YaBB.pl?num=1180608763

Message started by Venkateshr on May 31st, 2007, 3:52am

Title: Printing magnitude in "AC" analysis
Post by Venkateshr on May 31st, 2007, 3:52am

hello ,

            I want my verilogA block to recognize the input vsin source magnitude but it is not doing so.what is the reason ? I am just  using $display("%r",V(Vin));  but it is saying 0.0000.

However if I give some dc voltage to the vsin it is printing that.

Is there any way to get the magnitude ?

Please help me guys.

Title: Re: Printing magnitude in "AC" analysis
Post by Geoffrey_Coram on Jun 1st, 2007, 9:13am

You can't get the ac magnitude from within the verilog-a module.  Only the simulator knows the ac small-signal quantities.  The modules have to evaluate their operating points at the dc voltages, but then the simulator takes the dc currents and conductances and builds the small-signal equivalent circuit.  The simulator doesn't evaluate the modules when solving the small-signal circuit.

Title: Re: Printing magnitude in "AC" analysis
Post by Venkateshr on Jun 1st, 2007, 11:11pm

Thanks. I thought the same.But desperately I want to build a frequenncy meter which works in ac that is why trying this sorts of things.

whether the ac_stim function will work inside veriloga in  correspondence to external ac frequency sweep ? I mean whether the freq. of ac_stim will be same as external frequency  :-/ ?

is there any way to build a frequency meter which works in ac & is it possible to measure the ac magnitude  so that amnt of peaking & 3db mmt, drop at specified frequency etc etc can be automated instead of manual mmt?

Title: Re: Printing magnitude in "AC" analysis
Post by Ken Kundert on Jun 2nd, 2007, 10:48am

You would need to use a results processing language to automate the measurement of peaking and bandwidth. Something like MDL if you are using Spectre.

-Ken

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