The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> NOISE FILTERING using VerilogAMS
https://designers-guide.org/forum/YaBB.pl?num=1340369113

Message started by orciatichino on Jun 22nd, 2012, 5:45am

Title: NOISE FILTERING using VerilogAMS
Post by orciatichino on Jun 22nd, 2012, 5:45am

Hello!
I'm trying use VerilogAMS to filter a gaussian_distribution that represents a white noise source; to obtain a desired noise-shaping, I'm using a cascade of 5 stages of 1st order zero-pole filters.

I'm experiencing unconsistencies: the output amplitude, instead of being highly attenuated as required in a lowpass filtering, is several order of magnitudes greater than the input source.

Do anyone has suggestions or can identify mistakes?


I enclose an extract from my code.

parameter real fp1 = 7;  
  parameter real fp2 = 1e3;
  parameter real fp3 = 4e3;
  parameter real fz3 = 60e3;
  parameter real NFB_db = -160;

  real        sp1, sp2, sp3, sz3, K;
  real       unif_jitt, filtered_jitt1, filtered_jitt2, filtered_jitt3, filtered_jitt4, filtered_jitt_out, filtered_jitt_5;
   
  integer     seed;

analog begin
     @(initial_step) begin         //Initial step declarations
       sp1 = 2*`M_PI*fp1;
       sp2 = 2*`M_PI*fp2;
       sp3 = 2*`M_PI*fp3;
       sz3 = 2*`M_PI*fz3;
       K = sz3/sp3*100*100*pow(10, NFB_db/20);

       seed = -561;
     end  

     unif_jitt = $rdist_normal(seed, 0, 1);

     filtered_jitt1 = laplace_nd(unif_jitt, {1, 1/(10*sp1)}, {1, 1/(sp1)});
     filtered_jitt2 = laplace_nd(filtered_jitt1, {1, 1/(10*sp1)}, {1, 1/(sp1)});
     filtered_jitt3 = laplace_nd(filtered_jitt2, {1, 1/(10*sp2)}, {1, 1/(sp2)});
     filtered_jitt4 = laplace_nd(filtered_jitt3, {1, 1/(10*sp2)}, {1, 1/(sp2)});
     filtered_jitt_5 = laplace_nd(filtered_jitt4, {1, 1/(sz3)}, {1, 1/(sp3)});
     filtered_jitt_out = filtered_jitt_5 * K;
end




Thank you for the collaboration.
Gianni

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