ranjang
Junior Member
Offline
Posts: 13
india
|
Hi Geoffery,
I wanted to use the verilog ams laplace_nd and my code looks like below.
`include "disciplines.vams" `include "constants.vams" module bpass_fltr_tf(vin,vout); inout vin; output vout; electrical vin; electrical vout; real Q; parameter c_freq=31622.8 from [0:inf); parameter F1=1K; parameter F2=1000K; //Bandwidth 999000Hz //c_freq=sqrt(Fh,Fl); //Q=F0/(FH-FL); //BW=FH-FL; //**************Band Pass Filter TF********************* //((w0/Q)s)/(s^2+(w0/Q)s+w0^2) initial Q =c_freq/(F2-F1);
analog V(vout)<+ laplace_nd(V(vin), {0,((`M_TWO_PI*c_freq)/Q)},{((`M_TWO_PI*c_freq)**2),((`M_TWO_PI*c_freq)/Q),1}); endmodule
and I am expecting the pass band as 1KHz to 1000KHz.
But when I give an input sine wave with very high frequency or low frequency (which is not in this pass band).Still the o/p of the filter is sine with same magnitude ie there is not much attenuation.
I wanted to know what is wrong with this also is there any wave to give varying frequency input using spectre or spice options for ultrasim.I am not sure how the testbench should look for this.
|