Noisy temp sensor providing random input for a roulette sele

C

Chris Hinsley

Guest
Folks, I have a project I'm working on and I need a good source of randomness.

The FPGA kit I have has a temp sensor, and I wondered if the
lower/lowest bits could be used to feed an entropy collector for a
hardware roulette selector ?

I need a _lot_ of random bits, and plenty fast if this is going to run
at a decent pace.

Has anybody got experience on this ? Should I just use it to seed a
hardware pseudo random number ?

Chris
 
On 2011-06-22 22:33:17 +0100, rickman said:

On Jun 21, 4:13 pm, Chris Hinsley <chris.hins...@gmail.com> wrote:
Folks, I have a project I'm working on and I need a good source of randomness.

The FPGA kit I have has a temp sensor, and I wondered if the
lower/lowest bits could be used to feed an entropy collector for a
hardware roulette selector ?

I need a _lot_ of random bits, and plenty fast if this is going to run
at a decent pace.

Has anybody got experience on this ? Should I just use it to seed a
hardware pseudo random number ?

Chris

How random does this need to be? I have read papers about using diode
noise to try to generate truly random numbers and they always have a
bias of some sort. It can be very hard to generate truly random data
from physical events. It is far easier to generate pseudo-random
numbers based on time or other input that is constantly changing. For
a roulette wheel I don't know what to suggest. How random do you need
it? Is this a toy or are you trying to create a commercial product to
be used for gambling?
As random as possible, but seeding a good psuedo random generator
frequently might be good enough. I was wondering how noisy the temp
sensor low bit would be ? Might it be similar to the noisy diode,
that's what I was hopeing.

It's not for gambling, a Roulette selector is for doing a Genetic
Algorithum selection of the next population ! I have a GA app I've done
on my Mac and I'm thinking about doing a hardware version for the FPGA,
if I could manage 100MHz per world sym cycle and do 100,000 cycles
befor each fitness test, crossover, mutate and Roulette select the next
population then I'd be reall happy. I have to leave my Mac going for
1hour or so to get things evolving behavoiur I like to see. I want to
turbocharge this.

Along the way I'll need a good source of random bits, they feed the
crossover, mutator, and the selector, plus feed the positions and
movment vector of the creatures in the enviroment, so I need lots of it
and _fast_.

I'll also need to look into doing a hardware sorting network to sort
the creaturs by fitness, and the roullette selector is driven from a
random soucre, that goes into a priority encoder that indexes the
output of the sort network etc. That won't give exactly what the GA
folks call a roulette slector, but somthing close and fast.

Chris
 
On 2011-06-23 00:26:43 +0100, Chris Hinsley said:

On 2011-06-22 22:33:17 +0100, rickman said:

On Jun 21, 4:13 pm, Chris Hinsley <chris.hins...@gmail.com> wrote:
Folks, I have a project I'm working on and I need a good source of randomness.

The FPGA kit I have has a temp sensor, and I wondered if the
lower/lowest bits could be used to feed an entropy collector for a
hardware roulette selector ?

I need a _lot_ of random bits, and plenty fast if this is going to run
at a decent pace.

Has anybody got experience on this ? Should I just use it to seed a
hardware pseudo random number ?

Chris

How random does this need to be? I have read papers about using diode
noise to try to generate truly random numbers and they always have a
bias of some sort. It can be very hard to generate truly random data
from physical events. It is far easier to generate pseudo-random
numbers based on time or other input that is constantly changing. For
a roulette wheel I don't know what to suggest. How random do you need
it? Is this a toy or are you trying to create a commercial product to
be used for gambling?

As random as possible, but seeding a good psuedo random generator
frequently might be good enough. I was wondering how noisy the temp
sensor low bit would be ? Might it be similar to the noisy diode,
that's what I was hopeing.

It's not for gambling, a Roulette selector is for doing a Genetic
Algorithum selection of the next population ! I have a GA app I've done
on my Mac and I'm thinking about doing a hardware version for the FPGA,
if I could manage 100MHz per world sym cycle and do 100,000 cycles
befor each fitness test, crossover, mutate and Roulette select the next
population then I'd be reall happy. I have to leave my Mac going for
1hour or so to get things evolving behavoiur I like to see. I want to
turbocharge this.

Along the way I'll need a good source of random bits, they feed the
crossover, mutator, and the selector, plus feed the positions and
movment vector of the creatures in the enviroment, so I need lots of it
and _fast_.

I'll also need to look into doing a hardware sorting network to sort
the creaturs by fitness, and the roullette selector is driven from a
random soucre, that goes into a priority encoder that indexes the
output of the sort network etc. That won't give exactly what the GA
folks call a roulette slector, but somthing close and fast.

Chris
I do have a mate who has a hardware random number generator on a USB
stick, it plus in and there's a driver that feeds the entropy pool from
it on Linux. I was hopeing I might be able to do my own cheap version
on the FPGA board supplied temp sensor.

I'll have to look more into the spec of it to see exactly what temp
sensor it's got on there and what you get from reading it. It's a
BeMicro II FPGA kit BTW.

Chris
 
On Jun 21, 4:13 pm, Chris Hinsley <chris.hins...@gmail.com> wrote:
Folks, I have a project I'm working on and I need a good source of randomness.

The FPGA kit I have has a temp sensor, and I wondered if the
lower/lowest bits could be used to feed an entropy collector for a
hardware roulette selector ?

I need a _lot_ of random bits, and plenty fast if this is going to run
at a decent pace.

Has anybody got experience on this ? Should I just use it to seed a
hardware pseudo random number ?

Chris
How random does this need to be? I have read papers about using diode
noise to try to generate truly random numbers and they always have a
bias of some sort. It can be very hard to generate truly random data
from physical events. It is far easier to generate pseudo-random
numbers based on time or other input that is constantly changing. For
a roulette wheel I don't know what to suggest. How random do you need
it? Is this a toy or are you trying to create a commercial product to
be used for gambling?

I think if I were a casino I would not want a truly random device
since it can produce some unfavorable results in the short term.
Using a pseudo-random number generator I can produce controlled data
which I can have confidence will not break the bank.

Rick
 
rickman <gnuarm@gmail.com> wrote:
On Jun 21, 4:13 pm, Chris Hinsley <chris.hins...@gmail.com> wrote:
(snip)

I need a _lot_ of random bits, and plenty fast if this is going
to run at a decent pace.

Has anybody got experience on this ? Should I just use it to seed a
hardware pseudo random number ?

How random does this need to be? I have read papers about using diode
noise to try to generate truly random numbers and they always have a
bias of some sort.
Intel used to have a device that included one of these. There
is also an algorithm to remove the bias from a biased random
bit stream. There was in intel white paper describing the
hardware and bias removal algorithm.

-- glen
 
Chris Hinsley <chris.hinsley@gmail.com> wrote:
(snip, someone wrote)

How random does this need to be?
(snip)
As random as possible, but seeding a good psuedo random generator
frequently might be good enough. I was wondering how noisy the temp
sensor low bit would be ? Might it be similar to the noisy diode,
that's what I was hopeing.

It's not for gambling, a Roulette selector is for doing a Genetic
Algorithum selection of the next population ! I have a GA app I've done
on my Mac and I'm thinking about doing a hardware version for the FPGA,
if I could manage 100MHz per world sym cycle and do 100,000 cycles
befor each fitness test, crossover, mutate and Roulette select the next
population then I'd be reall happy. I have to leave my Mac going for
1hour or so to get things evolving behavoiur I like to see. I want to
turbocharge this.
I always liked LFSR (Linear Feedback Shift Register) based random
number generators, especially for hardware implementation.
No multiply required, as with linear congruential generators.

As some FPGAs have special logic for shift registers, it should
be very easy to make one (or more) and as long as needed.

-- glen
 
On Jun 22, 7:49 pm, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
Chris Hinsley <chris.hins...@gmail.com> wrote:

(snip, someone wrote)

How random does this need to be?  

(snip)

As random as possible, but seeding a good psuedo random generator
frequently might be good enough. I was wondering how noisy the temp
sensor low bit would be ? Might it be similar to the noisy diode,
that's what I was hopeing.
It's not for gambling, a Roulette selector is for doing a Genetic
Algorithum selection of the next population ! I have a GA app I've done
on my Mac and I'm thinking about doing a hardware version for the FPGA,
if I could manage 100MHz per world sym cycle and do 100,000 cycles
befor each fitness test, crossover, mutate and Roulette select the next
population then I'd be reall happy. I have to leave my Mac going for
1hour or so to get things evolving behavoiur I like to see. I want to
turbocharge this.

I always liked LFSR (Linear Feedback Shift Register) based random
number generators, especially for hardware implementation.  
No multiply required, as with linear congruential generators.

As some FPGAs have special logic for shift registers, it should
be very easy to make one (or more) and as long as needed.

-- glen
Now that we know what this is for, I don't see the need for anything
truly random. A pseudo-random sequence should do the job just fine.
I doubt that the OP even needs one that is very long. An LFSR can run
at near the highest clock rates of an FPGA and if you need more than
one bit per clock they can be designed to provide that as well.

I remember having a program that would spit out VHDL or Verilog code
once you give it the spec on your LFSR. I believe I have seen any
number of these on the web since.

Rick
 
rickman wrote:
On Jun 22, 7:49 pm, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
Chris Hinsley <chris.hins...@gmail.com> wrote:

(snip, someone wrote)

How random does this need to be?
(snip)

As random as possible, but seeding a good psuedo random generator
frequently might be good enough. I was wondering how noisy the temp
sensor low bit would be ? Might it be similar to the noisy diode,
that's what I was hopeing.
It's not for gambling, a Roulette selector is for doing a Genetic
Algorithum selection of the next population ! I have a GA app I've done
on my Mac and I'm thinking about doing a hardware version for the FPGA,
if I could manage 100MHz per world sym cycle and do 100,000 cycles
befor each fitness test, crossover, mutate and Roulette select the next
population then I'd be reall happy. I have to leave my Mac going for
1hour or so to get things evolving behavoiur I like to see. I want to
turbocharge this.
I always liked LFSR (Linear Feedback Shift Register) based random
number generators, especially for hardware implementation.
No multiply required, as with linear congruential generators.

As some FPGAs have special logic for shift registers, it should
be very easy to make one (or more) and as long as needed.

-- glen

Now that we know what this is for, I don't see the need for anything
truly random. A pseudo-random sequence should do the job just fine.
I doubt that the OP even needs one that is very long. An LFSR can run
at near the highest clock rates of an FPGA and if you need more than
one bit per clock they can be designed to provide that as well.

I remember having a program that would spit out VHDL or Verilog code
once you give it the spec on your LFSR. I believe I have seen any
number of these on the web since.

Rick
Xilinx has a great appnote which includes the tap positions for maximal
LFSR's up to 168 bits:

http://www.xilinx.com/support/documentation/application_notes/xapp052.pdf

I'm not sure what sort of temp sensor you have, but the ones I'm
familiar with have integrated A/D conversion and run *really* slow
like maybe 400 milliseconds per conversion. One reason is to filter
out the noise. Another is that obviously temperature doesn't change
very fast (usually). In any case I don't see it as a big win for
generating random bits.

Cheers,
Gabor
 
On Jun 23, 5:29 pm, Gabor <ga...@szakacs.invalid> wrote:
rickman wrote:
On Jun 22, 7:49 pm, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
Chris Hinsley <chris.hins...@gmail.com> wrote:

(snip, someone wrote)

How random does this need to be?  
(snip)

As random as possible, but seeding a good psuedo random generator
frequently might be good enough. I was wondering how noisy the temp
sensor low bit would be ? Might it be similar to the noisy diode,
that's what I was hopeing.
It's not for gambling, a Roulette selector is for doing a Genetic
Algorithum selection of the next population ! I have a GA app I've done
on my Mac and I'm thinking about doing a hardware version for the FPGA,
if I could manage 100MHz per world sym cycle and do 100,000 cycles
befor each fitness test, crossover, mutate and Roulette select the next
population then I'd be reall happy. I have to leave my Mac going for
1hour or so to get things evolving behavoiur I like to see. I want to
turbocharge this.
I always liked LFSR (Linear Feedback Shift Register) based random
number generators, especially for hardware implementation.  
No multiply required, as with linear congruential generators.

As some FPGAs have special logic for shift registers, it should
be very easy to make one (or more) and as long as needed.

-- glen

Now that we know what this is for, I don't see the need for anything
truly random.  A pseudo-random sequence should do the job just fine.
I doubt that the OP even needs one that is very long.  An LFSR can run
at near the highest clock rates of an FPGA and if you need more than
one bit per clock they can be designed to provide that as well.

I remember having a program that would spit out VHDL or Verilog code
once you give it the spec on your LFSR.  I believe I have seen any
number of these on the web since.

Rick

Xilinx has a great appnote which includes the tap positions for maximal
LFSR's up to 168 bits:

http://www.xilinx.com/support/documentation/application_notes/xapp052...

I'm not sure what sort of temp sensor you have, but the ones I'm
familiar with have integrated A/D conversion and run *really* slow
like maybe 400 milliseconds per conversion.  One reason is to filter
out the noise.  Another is that obviously temperature doesn't change
very fast (usually).  In any case I don't see it as a big win for
generating random bits.

Cheers,
Gabor
May want to check out this paper for an interesting design to produce
an onboard TRNG

http://teal.gmu.edu/courses/ECE746/project/F06_Project_resources/Fischer_et_al_TRNG.pdf

It uses on die PLL jitter to produce the random bits.

William
 
On 2011-06-29 22:52:47 +0100, WilliamGibb@gmail.com said:

On Jun 23, 5:29 pm, Gabor <ga...@szakacs.invalid> wrote:
rickman wrote:
On Jun 22, 7:49 pm, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
Chris Hinsley <chris.hins...@gmail.com> wrote:

(snip, someone wrote)

How random does this need to be?  
(snip)

As random as possible, but seeding a good psuedo random generator
frequently might be good enough. I was wondering how noisy the temp
sensor low bit would be ? Might it be similar to the noisy diode,
that's what I was hopeing.
It's not for gambling, a Roulette selector is for doing a Genetic
Algorithum selection of the next population ! I have a GA app I've done
on my Mac and I'm thinking about doing a hardware version for the FPGA,
if I could manage 100MHz per world sym cycle and do 100,000 cycles
befor each fitness test, crossover, mutate and Roulette select the next
population then I'd be reall happy. I have to leave my Mac going for
1hour or so to get things evolving behavoiur I like to see. I want to
turbocharge this.
I always liked LFSR (Linear Feedback Shift Register) based random
number generators, especially for hardware implementation.  
No multiply required, as with linear congruential generators.

As some FPGAs have special logic for shift registers, it should
be very easy to make one (or more) and as long as needed.

-- glen

Now that we know what this is for, I don't see the need for anything
truly random.  A pseudo-random sequence should do the job just fine.
I doubt that the OP even needs one that is very long.  An LFSR can run
at near the highest clock rates of an FPGA and if you need more than
one bit per clock they can be designed to provide that as well.

I remember having a program that would spit out VHDL or Verilog code
once you give it the spec on your LFSR.  I believe I have seen any
number of these on the web since.

Rick

Xilinx has a great appnote which includes the tap positions for maximal
LFSR's up to 168 bits:

http://www.xilinx.com/support/documentation/application_notes/xapp052...

I'm not sure what sort of temp sensor you have, but the ones I'm
familiar with have integrated A/D conversion and run *really* slow
like maybe 400 milliseconds per conversion.  One reason is to filter
out the noise.  Another is that obviously temperature doesn't change
very fast (usually).  In any case I don't see it as a big win for
generating random bits.

Cheers,
Gabor

May want to check out this paper for an interesting design to produce
an onboard TRNG


http://teal.gmu.edu/courses/ECE746/project/F06_Project_resources/Fischer_et_al_TRNG.pdf
It
uses on die PLL jitter to produce the random bits.

William
Thanks.

Chris
 

Welcome to EDABoard.com

Sponsor

Back
Top