Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Random number generation using VHDL

Status
Not open for further replies.

akp494

Member level 1
Member level 1
Joined
Jan 13, 2004
Messages
32
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
317
vhdl random number generator

Hello
Can some one tell me how to generate a random number using VHDL??

If any one can give me a reference as to how to get the following paper, it would be of great help.
ESNUG 81: A Better VHDL Random Number Generator

Thx
AKP
 

random number generator vhdl

Only aware of pseudo-random generators with XOR:

hxxp://www.maxim-ic.com/appnotes.cfm/appnote_number/1743/ln/en


or maybe google for "noise generator" or something similar...
 

vhdl random

http://www.deeps.org/hdl_models/
http://www.easics.be/webtools/crctool
**broken link removed**

procedure RANDOM (variable Seed: inout integer; variable X: out real) is
----------------------------------------------------------------------
-- Random Number generator from:
-- The Art of Computer Systems Performance Analysis, R.Jain 1991 (p443)
-- x(n) := 7^5x(n-1) mod (2^31 - 1)
-- This has period 2^31 - 2, and it works with odd or even seeds
-- This code does not overflow for 32 bit integers.
----------------------------------------------------------------------
constant a : integer := 16807; -- multiplier 7**5
constant m : integer := 2147483647;-- modulus 2**31 - 1
constant q : integer := 127773; -- m DIV a
constant r : integer := 2836; -- m MOD a
constant m_real : real := real(M);

variable seed_div_q : integer;
variable seed_mod_q : integer;
variable new_seed : integer;

begin
seed_div_q := seed / q; -- truncating integer division
seed_mod_q := seed MOD q; -- modulus
new_seed := a * seed_mod_q - r * seed_div_q;
if (new_seed > 0) then
seed := new_seed;
else
seed := new_seed + m;
end if;
X := real(seed) / m_real;
end RANDOM;
 

vhdl random function

You can use LFSR method to generate p-random data
 

heRe is code.. the code is also synthesizable..
**broken link removed**
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top