Electronic Dice ( 3 die ) In VHDL

My humblest apologies to all, and the OP in particular. You are of course quite correct.

Unfortunately, this makes the problem even harder. As I'm sure you're aware, standard methods for detecting the randomness of radioactive decay mandate the use of a cat, a sealed box and a vial of some toxic substance. Since the cat has a 0.5 probability of survival in each measurement to determine one bit, and a 6-position die requires an average of approximately

2.5849625007211561814537389439478 bits of data, it's clear that this mechanism will entail a mean loss of 1.2924812503605780907268694719739 cats per displayed value, or nearly 4 cats per 3-dice roll. In order to achieve this with a 20% margin of spare bandwidth, it's clearly necessary to use CAT-5 cable for all the interfaces.

Superb. ROFL.

-- Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how VHDL * Verilog * SystemC * Perl * Tcl/Tk * Verification * Project Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24 1AW, UK Tel: +44 (0)1425 471223 mail: snipped-for-privacy@doulos.com Fax: +44 (0)1425 471573 Web:

formatting link

The contents of this message may contain personal views which are not the views of Doulos Ltd., unless specifically stated.

Reply to
Jonathan Bromley
Loading thread data ...

How about using one LFSR per die pip? Using the SRL16s in Xilinx chips (don't know A, sorry), that would mean somewhere around 9 slices (for 3x6 pips), plus overhead, decoding logic, etc..., if I'm not mistaken? Incidentally, would using different polynomials effectively (as far as the human is concerned) decorrelate the LFSRs? Or would varying lengths (16, 32, etc...) do the trick? Or even, would different seeds be enough? I've never gotten around to studying the math, and never been great with statistics anyway... Pierre-Olivier -- to contact me directly, remove the obvious from my email --

Reply to
PO Laprise

in

Just because 16 sided dice aren't used doesn't mean they can't be done. I could supply three different types of 16 sided polyhedra, all with equal faces.

I was, after all, responsible for getting the 30 sided die on the market (back in the summer of '82).

Now it's FPGA design for me.

- John_H

Reply to
John_H

There are two forms of an LFSR. One where the bits are just delayed versions and you have a huge adder that feeds the chain (good ol' Google says this is called the Fibonacci form). And there's another one where there are adders inbetween the registers so that the bits are not delayed versions of each other (called the Galois form).

Even in the case of the Fibonacci form, I have a feeling that grabbing a few adjacent bits will still produce a "random" number. Of course it depends on what you consider random, and I don't know much about the measurements they use for that.

Rejecting illegal combinations should be okay. The legal combinations will remain uniform. Unfortunately I don't know a good way to explain this. But you can take a six sided dice, reject values of 5 and 6, and have it act like a uniform four sided dice.

The only problem with the rejection method is you're not guaranteed a valid value every clock cycle, which is no big deal in this human operated push button application, but for some deterministic applications, you can't afford to wait for a "reroll" of the number.

--Vinh

Reply to
Vinh Pham

--

--Ray Andraka, P.E. President, the Andraka Consulting Group, Inc.

401/884-7930 Fax 401/884-7950 email snipped-for-privacy@andraka.com
formatting link

"They that give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin, 1759

Reply to
Ray Andraka

--

--Ray Andraka, P.E. President, the Andraka Consulting Group, Inc.

401/884-7930 Fax 401/884-7950 email snipped-for-privacy@andraka.com
formatting link

"They that give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin, 1759

Reply to
Ray Andraka

Superb answer, Jonathan. I suspect that, even as you read this, someone is talking to their dean about transferring from electrical engineering to political science or animal husbandry.

And should you need it, I can give you the name of an excellent removing-tongue-from-cheek surgeon.

Take care, Bob Perlman Cambrian Design Works

Reply to
Bob Perlman

I agree that you have to implement the full PRNG and not just use some bits of the LFSR, to get the full quality of the PRNG.

However, rejecting illegal values is IMHO a "good" thing to do, meaning that it doesn't bias. After all, each and every output value of the PRNG is "unpredictable" (within the quality limits of the PRNG). Thus, rejecting all 0x6 and 0x7 doesn't reveal more information than that the final output won't ever be 0x6 or 0x7. Still, an attacker can't predict any output value, given that he couldn't predict them already before we added the reject circuit.

It's a consequence of the lack of feedback into the PRNG. The PRNGs internal state is only changed through the intended means - by going from state n to n+1 (next value) etc. All cryptographic study that the PRNG design has received, inherently also applies to the combination of PRNG and rejection circuit.

The only disadvantage of this method is that the execution time is not predictable. Although highly unprobable, the PRNG could output 0x6 / 0x7 for a lot of cycles in sequence. Thus you don't know how long it takes to get an acceptable (legal) output. In this particular application (dice) however, I don't think that it will be a problem of significance.

Marc

Reply to
jetmarc

arranged

Correct - and the design also does not have to have Mod 6 counting ->

Decoder; it is possible to count directly in either 7 segment Font patterns, or in Ray's Dice-Font pattern.

I have actually done a design that counts directly in 7 segment Font patterns (0..9) - the student can explain why that might be a good idea.

-jg

Reply to
Jim Granville

arranged

--

--Ray Andraka, P.E. President, the Andraka Consulting Group, Inc.

401/884-7930 Fax 401/884-7950 email snipped-for-privacy@andraka.com
formatting link

"They that give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin, 1759

Reply to
Ray Andraka

--

--Ray Andraka, P.E. President, the Andraka Consulting Group, Inc.

401/884-7930 Fax 401/884-7950 email snipped-for-privacy@andraka.com
formatting link

"They that give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin, 1759

Reply to
Ray Andraka

in the

Yeah adder isn't the best word, because the adders we normally think of have a carry chain. Modulo-2 addition has no carry, so it simplifies to an XOR.

Reply to
Vinh Pham

Coming from Northern Ireland my 'irony detector' is stuck at

Nial

------------------------------------------------ Nial Stewart Developments Ltd FPGA and High Speed Digital Design

formatting link

Reply to
Nial Stewart

Then you've seen

formatting link
? The 'Drumcree VII' edition, featuring "Vatican sends Holy Water Cannon", is a favourite! cheers, Syms.

Reply to
Symon

could easily be done in a small CPLD and a short time with

With some care (challenge for todays students ?) I believe one can pack 2 dice into a 16V8 - smallest/cheapest programmable logic device made.

Ideal for backgammon etc....

What games need 3 dice ?

-jg

Reply to
Jim Granville

It was for a bar game, although there are several board games that use more than

2 dice. Yahtzee, for example uses 5 as I recall.

Jim Granville wrote:

could easily be done in a small CPLD and a short time with

--

--Ray Andraka, P.E. President, the Andraka Consulting Group, Inc.

401/884-7930 Fax 401/884-7950 email snipped-for-privacy@andraka.com
formatting link

"They that give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin, 1759

Reply to
Ray Andraka

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.