Real Random Number Generation

Status
Not open for further replies.

Member level 1
Hi E'Body!

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

Thanks,
Ravi

RBB

Full Member level 5
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

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

Member level 1
--> 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
I am curious what do you need them for.
I can only say it isn't possible my dear.

Member level 1
Its just a study........
Can u telme me why is it not possible?

Thanks !!!

avimit

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

Member level 1
For the time being I dont have answer for this....But trying to find....
Let me know if you come across something by which we can implement it.

Thanks.

rsrinivas

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.