Real Random Number Generation

Status
Not open for further replies.
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.
 

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
 

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".
 

--> 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:



-> 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.
 

I am curious what do you need them for.
I can only say it isn't possible my dear.
 

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.
 

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.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…