The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Mar 28th, 2024, 1:59pm
Pages: 1
Send Topic Print
array of random numbers (Read 2751 times)
Jeremy Lubkin
Guest




array of random numbers
Jul 02nd, 2004, 2:51pm
 
I am trying to generate an array of uniformly distributed numbers at the beginning of a verilogA module.  I want this array to be initialized at startup.


The ultimate goal is to generate a noise signal - this signal would consist of equal spaced, equal magnitude, random phase sine waves that are added to the input.  The way I am doing this is going thru a for loop (i = num noise sources) and adding in a sine wave to a running noise signal - which I add to the input signal at the end.

I discovered I cannot have a random function in a loop - so I was going to pre-generate an array (longer than any expected number of sources) of random variables and just access this array within my loop.

I dont know how to set up this array of unif. random numbers.

Would appreciate input.
Thanks,
Jeremy
Back to top
 
 
  IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: array of random numbers
Reply #1 - Jul 6th, 2004, 8:46pm
 
This is due to be fixed in this PCR:

   PCR: 585550
 Title: random, dist_normal etc cannot be used in iterations

It was supposed to be in IC5033USR2 and IC5141, but for some reason isn't, which I'm looking into right now.

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.