The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> AMS modeling of thermal noise in IUS62
https://designers-guide.org/forum/YaBB.pl?num=1239123478

Message started by fet on Apr 7th, 2009, 9:57am

Title: AMS modeling of thermal noise in IUS62
Post by fet on Apr 7th, 2009, 9:57am

Hi, thank you in advance for your time and kindness.

I'm trying to model white noise using verilogams. However, the version I'm using (IUS62) does not support noise statement. So alternatively I'm trying to use random number generator. The code is quite straightforward:

-------------------------------------
noise_seed=1234;
rms_vthermal_noise=10m;
rthermal_noise = $rdist_normal(noise_seed, 0, rms_vthermal_noise)
$display ("Random noise is %g", rthermal_noise);
-------------------------------------

According to the Verilog-AMS Language Reference (version 5.7, March 2006), page 125, the generated random number changes at every time step. However, I found this not true by using the $display statement.

Anyone has the same problem? Thank you very much!

Title: Re: AMS modeling of thermal noise in IUS62
Post by jbdavid on Apr 8th, 2009, 7:20pm

Generally you only want to initialize the noise seed at the beginning, this is setting it on each timestep too..
reset the seed to the same value, you'll get the same result.

Title: Re: AMS modeling of thermal noise in IUS62
Post by Geoffrey_Coram on Apr 14th, 2009, 4:58am

@(initial_step)
 noise_seed=1234;

Title: Re: AMS modeling of thermal noise in IUS62
Post by fet on Apr 20th, 2009, 9:29am

Thank both of you! I included it in the initial step. It works. The random number keeps changing.

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