The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Design Languages >> Verilog-AMS >> Frequency response for verilog A models https://designers-guide.org/forum/YaBB.pl?num=1098062042 Message started by Voldemort on Oct 17th, 2004, 6:14pm |
Title: Frequency response for verilog A models Post by Voldemort on Oct 17th, 2004, 6:14pm Hi What is the procedure for obtaining the frequency response of a second order system designed using verilog a. The verilog model I am using is as follows `include "discipline.h" `include "constants.h" // model strans // S-domain in Numerator-Denominator form // Filter order is: 1 / 3 module strans (vin, vout) ; input vin; output vout; electrical vin, vout; // nxN is numerator of degree N. // dxN is denominator of degree N. parameter real nx0 = 1.0; parameter real dx0 = 202.2; parameter real dx1 = 1.202e5; parameter real dx2 = 1.67e-10; analog begin V(vout) <+ laplace_nd( V(vin), [ nx0 ], [ dx0, dx1, dx2 ]); end endmodule I created a symbol for this model and I connected a vsin source at the vin node and a 1k resistor at the vout node to ground. I ran an ac simulation in spectre. The ac magnitude I obtain is just some really low constant value (-6.7k). The system is a second order system with a resonant frequency around 180kHz. Can someone explain the correct way to do this ? Thank You |
Title: Re: Frequency response for verilog A models Post by Mighty Mouse on Oct 17th, 2004, 10:20pm You must specify the AC magnitude of the input source. Using a value of 1 is usually the most convienent. |
Title: Re: Frequency response for verilog A models Post by Voldemort on Oct 18th, 2004, 8:38am Mighty Mouse, Thank you for your help/ I did include the AC magnitude and amplitude in my simulation Here is my netliist. ------------------------------- //Genenerated for: spectre // Generated on: Oct 18 11:21:25 2004 // Design library name: clloop // Design cell name: cf_uphone // Design view name: schematic simulator lang=spectre global 0 // Library name: clloop // Cell name: cf_uphone // View name: schematic V0 (net3 0) vsource type=sine mag=1 ampl=1 freq=1K R0 (net6 0) resistor r=1K m=1 I0 (net3 net6) strans nx0=10000 dx0=1 dx1=100 dx2=10000 simulatorOptions options reltol=1e-3 vabstol=1e-6 iabstol=1e-12 temp=27 \ tnom=27 scalem=1.0 scale=1.0 gmin=1e-12 rforce=1 maxnotes=5 maxwarns=5 \ digits=5 cols=80 pivrel=1e-3 ckptclock=1800 \ sensfile="../psf/sens.output" ac ac start=1 stop=1G annotate=status modelParameter info what=models where=rawfile element info what=inst where=rawfile outputParameter info what=output where=rawfile designParamVals info what=parameters where=rawfile saveOptions options save=allpub ahdl_include "/home/users/2/xxxxxx/clloop/uphonel/veriloga/veriloga.va" ---------------------------- I did change the parameters of my second order system to a simpler one in this. The system has a gain of 1, with a resonant frequency at 100Hz and a damping ratio of 0.5 Thanks |
Title: Re: Frequency response for verilog A models Post by Voldemort on Oct 18th, 2004, 11:57am Hi I figured out the problem. It was my model :-( I had my s domain coefficients reversed and another mistake I made was that the s domain coef are in radians and not in Hz. Hence the screw up. Thanks for your reply mighty mouse |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |