Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

Real Random Number Generation

Status
Not open for further replies.

RBB

Full Member level 5
Joined
Jul 2, 2007
Messages
304
Helped
71
Reputation
142
Reaction score
36
Trophy points
1,308
Location
USA
Activity points
2,559
As opposed to a "Fake" one?

Have you look at LSF registers (Linear shift feedback)? It is well explained in Hdl Chip Design by Smith.

They are really easy to realize.
 

aji_vlsi

Advanced Member level 2
Joined
Sep 10, 2004
Messages
646
Helped
84
Reputation
168
Reaction score
12
Trophy points
1,298
Location
Bangalore, India
Activity points
4,975
angadir said:
Hi E'Body!

I would like to if its possible to generate "Real" RANDOM Number in HDL (Verilog)?
If yes...How?

Thanks,
Ravi
What is "Real RANDOM number"?

1. $random - pure random number generator, returns 32-bit.
2. If you want to randomize a "real my_real" variable, then use:

Code:
  real my_real;
  integer lsb, msb;
  reg [63:0] my_64_bits;
  
  lsb = $random; msb = $random;
  my_64_bits = {msb, lsb};
  my_real = $bitstoreal (my_64_bits);
HTH
Ajeetha, CVC
www.noveldv.com
 

avimit

Banned
Joined
Nov 16, 2005
Messages
413
Helped
91
Reputation
182
Reaction score
23
Trophy points
1,298
Location
Fleet, UK
Activity points
0
Unfortunately you cannot generage "real random numbers" in HDL. All you will have to settle for would be : pseudo random numbers, which may be generaged as said by the use of LFSRs.
Well $random as suggested, is not HDL, so dont think it would help.
As far as my knowlede is concerned, $random is also not "true random".
 

angadir

Member level 1
Joined
Aug 24, 2006
Messages
37
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Bengaluru ( Bangalore - Karnataka) INDIA
Activity points
1,490
--> By Real I meant pure random numbers....i.e All number are equally probable...In other words they are not Pseudo random but completely random and not generated by any definite logic.

--> As far as $random is concerned, it can be used only for simulation/verification purpose,whereas i am looking for generation of pure random numbers in Hardware.

Added after 32 seconds:

aji_vlsi said:
angadir said:
Hi E'Body!

I would like to if its possible to generate "Real" RANDOM Number in HDL (Verilog)?
If yes...How?

Thanks,
Ravi
What is "Real RANDOM number"?

1. $random - pure random number generator, returns 32-bit.
2. If you want to randomize a "real my_real" variable, then use:

Code:
  real my_real;
  integer lsb, msb;
  reg [63:0] my_64_bits;
  
  lsb = $random; msb = $random;
  my_64_bits = {msb, lsb};
  my_real = $bitstoreal (my_64_bits);
HTH
Ajeetha, CVC
www.noveldv.com

-> By Real I meant pure random numbers....i.e All number are equally probable...In other words they are not Pseudo random but completely random and not generated by any definite logic.

--> As far as $random is concerned, it can be used only for simulation/verification purpose,whereas i am looking for generation of pure random numbers in Hardware.
 

avimit

Banned
Joined
Nov 16, 2005
Messages
413
Helped
91
Reputation
182
Reaction score
23
Trophy points
1,298
Location
Fleet, UK
Activity points
0
I am curious what do you need them for.
I can only say it isn't possible my dear.
 

avimit

Banned
Joined
Nov 16, 2005
Messages
413
Helped
91
Reputation
182
Reaction score
23
Trophy points
1,298
Location
Fleet, UK
Activity points
0
Simply because computers are designed to be deterministic.
OK, tell me how can you do it otherwise, just let me know how you would generate a random number anyway, leave aside vhdl verilog C or java.
 

rsrinivas

Advanced Member level 1
Joined
Oct 10, 2006
Messages
415
Helped
50
Reputation
100
Reaction score
12
Trophy points
1,298
Location
bengalooru
Activity points
3,704
check matlab randn function and check how it's implemented there.
as far as i know matlab is the tool from which best possible random can be generated.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top