Home |
Search |
Today's Posts |
|
Electronic Schematics (alt.binaries.schematics.electronic) A place to show and share your electronics schematic drawings. |
Reply |
|
|
LinkBack | Thread Tools | Display Modes |
#1
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
I'd like to conjure up a random bit generator.
Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) Thanks! ...Jim Thompson -- | James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food. |
#2
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
In article ,
Jim Thompson writes: I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) Do you want real random or just pseudo random? If pseudo random is good enough, google for LFSR. With the right polynomial, you get a random sequence of (2^N)-1 bits. There are tables of polynomials that do that. Some of them need only 1 XOR gate. -- These are my opinions, not necessarily my employer's. I hate spam. |
#3
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
On Wed, 20 Oct 2010 14:34:38 -0700, Jim Thompson
wrote: I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) --- Whoopeee!!! Right up my alley! Do you want truly random or pseudorandom, and if pseudorandom how long do you want the output to be before it repeats? --- JF |
#4
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
On Wed, 20 Oct 2010 17:23:54 -0500, John Fields
wrote: On Wed, 20 Oct 2010 14:34:38 -0700, Jim Thompson wrote: I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) --- Whoopeee!!! Right up my alley! Do you want truly random or pseudorandom, and if pseudorandom how long do you want the output to be before it repeats? --- JF Pseudo-random is just fine. I just need it to test an encoding/decoding chip design. A hundred bits or so before repeat would be quite adequate. No security involved... just testing to be sure of no decoding hiccups. Thanks! ...Jim Thompson -- | James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I can see November from my house :-) |
#5
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) How random do you need it to be? If you want truly or statistically-close-to-really random, it's a Hard Problem. You'd probably want something like an avalanche or other noise diode, amplified, and then fed into a comparator... shield and filter the bleep out of it to keep it from being pulled around by external noise. Latch the output of the comparator on each clock pulse and you've got reasonably random bits. If you're willing to accept pseudo-random bits (chaotic-looking, but actually predictable), a cheap and easy solution is a maximal-length linear feedback shift register. These require a shift register of suitable width (feel free to daisy-chain several 74HC595 or similar) and an N-input XOR. You simply XOR several of the parallel outputs of the shift register together and feed this back into the shift-register inputs. If you pick these tapped outputs correctly (creating a primitive polynomial mod 2), the output bitstream will have a period of 2^N-1 before it repeats (where N is the width of the shift register). You have to be careful to pre-load the register with at least one "1" bit at reset time... it'll stick at zero, otherwise. Schneier's "Applied Cryptography" has a table of suitable primitive polynomials on pages 376-377. Some of them are rather huge... if you want a 3217-bit shift register version, he's got two of them! There are several which would be pretty easy to implement, and have a good long repeat period... 60 to 64 bits, with at most 5 inputs to the XOR. For more sophisticated LFSRs, you can: - Run several of them of different lengths (each with its own feedback chain), and XOR the results. - Use an "alternating stop and go" generator, which uses three LFSRs of different lengths and feedback taps. One generator "A" is shifted on every clock; its output controls which of the other two "B" and "C" is shifted during that clock; the final output is taken by XORing the output bits of "B" and "C". This architecture has the effect of "hiding" the raw outputs of the LFSRs from visibility, and makes determining the LFSR feedback coefficients quite a bit harder. -- Dave Platt AE6EO Friends of Jade Warrior home page: http://www.radagast.org/jade-warrior I do _not_ wish to receive unsolicited commercial email, and I will boycott any company which has the gall to send me such ads! |
#6
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
Jim Thompson wrote: On Wed, 20 Oct 2010 17:23:54 -0500, John Fields wrote: On Wed, 20 Oct 2010 14:34:38 -0700, Jim Thompson wrote: I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) --- Whoopeee!!! Right up my alley! Do you want truly random or pseudorandom, and if pseudorandom how long do you want the output to be before it repeats? --- JF OT: Question: Why it is impossible to have sex in the middle of the Red Square in Moscow? Answer: Because every idiot bystander will be eager to give his invaluable advice. Here is my invaluable advice: make a ring of the odd number of invertors, compute a logical function from this ring. Pseudo-random is just fine. I just need it to test an encoding/decoding chip design. A hundred bits or so before repeat would be quite adequate. No security involved... just testing to be sure of no decoding hiccups. Take a binary counter, compute some ugly logical function from its output. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com |
#7
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
On Wed, 20 Oct 2010 18:04:19 -0500, Vladimir Vassilevsky
wrote: Jim Thompson wrote: On Wed, 20 Oct 2010 17:23:54 -0500, John Fields wrote: On Wed, 20 Oct 2010 14:34:38 -0700, Jim Thompson wrote: I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) --- Whoopeee!!! Right up my alley! Do you want truly random or pseudorandom, and if pseudorandom how long do you want the output to be before it repeats? --- JF OT: Question: Why it is impossible to have sex in the middle of the Red Square in Moscow? Answer: Because every idiot bystander will be eager to give his invaluable advice. Here is my invaluable advice: make a ring of the odd number of invertors, compute a logical function from this ring. Pseudo-random is just fine. I just need it to test an encoding/decoding chip design. A hundred bits or so before repeat would be quite adequate. No security involved... just testing to be sure of no decoding hiccups. Take a binary counter, compute some ugly logical function from its output. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com Vladimir, What's your definition of "ugly" ?:-) ...Jim Thompson -- | James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I can see November from my house :-) |
#8
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
"Jim Thompson" schreef
in bericht ... I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) Thanks! ...Jim Thompson -- | James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food. Ever saved the schematic below. FAIK it's from John Fields. petrus bitbyter Version 4 SHEET 1 1140 680 WIRE 1008 -496 -320 -496 WIRE -384 -480 -432 -480 WIRE -432 -448 -432 -480 WIRE -432 -448 -480 -448 WIRE 464 -432 -320 -432 WIRE -544 -400 -880 -400 WIRE -432 -384 -480 -384 WIRE 224 -368 -320 -368 WIRE -432 -352 -432 -384 WIRE -384 -352 -432 -352 WIRE -256 -304 -320 -304 WIRE 704 -224 96 -224 WIRE -880 -192 -880 -400 WIRE -880 -192 -928 -192 WIRE 464 -192 464 -432 WIRE 464 -192 96 -192 WIRE 32 -176 -784 -176 WIRE -16 -160 -784 -160 WIRE 224 -160 224 -368 WIRE 224 -160 96 -160 WIRE -992 -144 -1056 -144 WIRE -256 -144 -256 -304 WIRE -256 -144 -784 -144 WIRE -848 -128 -928 -128 WIRE -496 -128 -784 -128 WIRE -736 -112 -784 -112 WIRE 944 64 -1216 64 WIRE -864 112 -1136 112 WIRE -624 112 -864 112 WIRE -384 112 -624 112 WIRE -144 112 -384 112 WIRE 96 112 -144 112 WIRE 336 112 96 112 WIRE 576 112 336 112 WIRE 816 112 576 112 WIRE -864 160 -864 112 WIRE -624 160 -624 112 WIRE -384 160 -384 112 WIRE -144 160 -144 112 WIRE 96 160 96 112 WIRE 336 160 336 112 WIRE 576 160 576 112 WIRE 816 160 816 112 WIRE -1056 208 -1056 -144 WIRE -944 208 -1056 208 WIRE -736 208 -736 -112 WIRE -736 208 -784 208 WIRE -704 208 -736 208 WIRE -496 208 -496 -128 WIRE -496 208 -544 208 WIRE -464 208 -496 208 WIRE -256 208 -256 -144 WIRE -256 208 -304 208 WIRE -224 208 -256 208 WIRE -16 208 -16 -160 WIRE -16 208 -64 208 WIRE 16 208 -16 208 WIRE 224 208 224 -160 WIRE 224 208 176 208 WIRE 256 208 224 208 WIRE 464 208 464 -192 WIRE 464 208 416 208 WIRE 496 208 464 208 WIRE 704 208 704 -224 WIRE 704 208 656 208 WIRE 736 208 704 208 WIRE 1008 208 1008 -496 WIRE 1008 208 896 208 WIRE -976 256 -1056 256 WIRE -944 256 -976 256 WIRE -704 256 -736 256 WIRE -464 256 -496 256 WIRE -224 256 -256 256 WIRE 16 256 -16 256 WIRE 256 256 224 256 WIRE 496 256 464 256 WIRE 736 256 704 256 WIRE -1216 288 -1216 64 WIRE -1056 288 -1056 256 WIRE -976 352 -976 256 WIRE -736 352 -736 256 WIRE -736 352 -976 352 WIRE -496 352 -496 256 WIRE -496 352 -736 352 WIRE -256 352 -256 256 WIRE -256 352 -496 352 WIRE -16 352 -16 256 WIRE -16 352 -256 352 WIRE 224 352 224 256 WIRE 224 352 -16 352 WIRE 464 352 464 256 WIRE 464 352 224 352 WIRE 704 352 704 256 WIRE 704 352 464 352 WIRE -1216 384 -1216 368 WIRE -1136 384 -1136 112 WIRE -1136 384 -1216 384 WIRE -1056 384 -1056 368 WIRE -1056 384 -1136 384 WIRE -864 384 -864 304 WIRE -624 384 -624 304 WIRE -624 384 -864 384 WIRE -384 384 -384 304 WIRE -384 384 -624 384 WIRE -144 384 -144 304 WIRE -144 384 -384 384 WIRE 96 384 96 304 WIRE 96 384 -144 384 WIRE 336 384 336 304 WIRE 336 384 96 384 WIRE 576 384 576 304 WIRE 576 384 336 384 WIRE 816 384 816 304 WIRE 816 384 576 384 WIRE 944 384 944 64 WIRE 944 384 816 384 WIRE -1216 432 -1216 384 FLAG -1216 432 0 SYMBOL voltage -1056 272 R0 WINDOW 3 24 104 Invisible 0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR Value PULSE(0 5 0 1e-6 1e-6 .001 .002) SYMATTR InstName V1 SYMBOL Digital\\dflop -864 160 R0 SYMATTR InstName A5 SYMATTR SpiceLine Td=10n tripdt=10n trise=30n vhigh=5 SYMBOL Digital\\xor -976 -96 R180 WINDOW 3 16 112 Invisible 0 SYMATTR Value trise 10e-9 vhigh 5v SYMATTR InstName A14 SYMBOL Digital\\dflop -624 160 R0 SYMATTR InstName A1 SYMATTR SpiceLine Td=10n tripdt=10n trise=30n vhigh=5 SYMBOL Digital\\dflop -384 160 R0 SYMATTR InstName A2 SYMATTR SpiceLine Td=10n tripdt=10n trise=30n vhigh=5 SYMBOL Digital\\dflop -144 160 R0 SYMATTR InstName A3 SYMATTR SpiceLine Td=10n tripdt=10n trise=30n vhigh=5 SYMBOL Digital\\dflop 96 160 R0 SYMATTR InstName A6 SYMATTR SpiceLine Td=10n tripdt=10n trise=30n vhigh=5 SYMBOL Digital\\dflop 336 160 R0 SYMATTR InstName A7 SYMATTR SpiceLine Td=10n tripdt=10n trise=30n vhigh=5 SYMBOL Digital\\dflop 576 160 R0 SYMATTR InstName A8 SYMATTR SpiceLine Td=10n tripdt=10n trise=30n vhigh=5 SYMBOL Digital\\dflop 816 160 R0 SYMATTR InstName A9 SYMATTR SpiceLine Td=10n tripdt=10n trise=30n vhigh=5 SYMBOL Digital\\xor -528 -352 R180 WINDOW 3 16 112 Invisible 0 SYMATTR Value trise 10e-9 vhigh 5v SYMATTR InstName A4 SYMBOL Digital\\xor -368 -528 M0 WINDOW 3 16 112 Invisible 0 SYMATTR Value trise 10e-9 vhigh 5v SYMATTR InstName A10 SYMBOL Digital\\xor -368 -400 M0 WINDOW 3 16 112 Invisible 0 SYMATTR Value trise 10e-9 vhigh 5v SYMATTR InstName A11 SYMBOL Digital\\or 64 -128 R180 WINDOW 3 -8 128 Invisible 0 SYMATTR Value trise 10e-9 vhigh 5v SYMATTR InstName A12 SYMBOL Digital\\or -816 -208 M0 WINDOW 3 -8 128 Invisible 0 SYMATTR Value trise 10e-9 vhigh 5v SYMATTR InstName A13 SYMBOL voltage -1216 272 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 WINDOW 3 24 104 Invisible 0 SYMATTR InstName V2 SYMATTR Value PULSE(5 0 1e-6) TEXT -1192 408 Left 0 !.tran 0 .512 0 |
#9
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
On Wed, 20 Oct 2010 18:04:19 -0500, Vladimir Vassilevsky
wrote: Jim Thompson wrote: On Wed, 20 Oct 2010 17:23:54 -0500, John Fields wrote: On Wed, 20 Oct 2010 14:34:38 -0700, Jim Thompson wrote: I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) --- Whoopeee!!! Right up my alley! Do you want truly random or pseudorandom, and if pseudorandom how long do you want the output to be before it repeats? --- JF OT: Question: Why it is impossible to have sex in the middle of the Red Square in Moscow? Answer: Because every idiot bystander will be eager to give his invaluable advice. --- You, included? --- Here is my invaluable advice: make a ring of the odd number of invertors, compute a logical function from this ring. Pseudo-random is just fine. I just need it to test an encoding/decoding chip design. A hundred bits or so before repeat would be quite adequate. No security involved... just testing to be sure of no decoding hiccups. Take a binary counter, compute some ugly logical function from its output. --- Ouch! I'm sadly disappointed, since from your earlier posts I thought that you were more sophisticated than you now seem to be. --- JF |
#10
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
Xilinx XAPP052 - Efficient Shift Registers, LFSR Counters, and Long Pseudo-Random Sequence Generators. Gives tables for LFSR generators from 3 to 168 bits in length. In article , Jim Thompson wrote: I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) Thanks! ...Jim Thompson -- |
#11
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
On Wed, 20 Oct 2010 18:03:32 -0700, artie
wrote: Xilinx XAPP052 - Efficient Shift Registers, LFSR Counters, and Long Pseudo-Random Sequence Generators. Gives tables for LFSR generators from 3 to 168 bits in length. In article , Jim Thompson wrote: I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) Thanks! ...Jim Thompson 74HCxxxx ?? ...Jim Thompson -- | James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I can see November from my house :-) |
#12
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
Jim Thompson wrote:
I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) I'd like to see somebody hack into one of those radioactive smoke detectors, and use the radioactive decay, maybe XOR it into a PSRG. Cheers! Rich |
#13
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
Vladimir Vassilevsky wrote:
Question: Why it is impossible to have sex in the middle of the Red Square in Moscow? Answer: Because every idiot bystander will be eager to give his invaluable advice. Here is my invaluable advice: make a ring of the odd number of invertors, compute a logical function from this ring. If you're going hiking alone, be sure to bring along a deck of cards. That way, if you get lost, you can sit down, start to play solitaire, and someone will show up to help. ;-) Cheers! Rich |
#14
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
Xilinx XAPP052 - Efficient Shift Registers, LFSR Counters, and Long
Pseudo-Random Sequence Generators. Gives tables for LFSR generators from 3 to 168 bits in length. 74HCxxxx ?? It's just FFs and an XOR gate. It's pretty easy to translate to 74HC. -- These are my opinions, not necessarily my employer's. I hate spam. |
#15
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
Take a binary counter, compute some ugly logical function from its output. The problem is that "ugly" functions have a long history of being not as random as you would like. You could use a ROM and some software to generate the contents. But I don't know any 74HC parts that are ROMs. LFSR is best solution to Jim's problem that I know of. -- These are my opinions, not necessarily my employer's. I hate spam. |
#16
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
On Wed, 20 Oct 2010 15:45:35 -0700, Jim Thompson
wrote: On Wed, 20 Oct 2010 17:23:54 -0500, John Fields wrote: On Wed, 20 Oct 2010 14:34:38 -0700, Jim Thompson wrote: I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) --- Whoopeee!!! Right up my alley! Do you want truly random or pseudorandom, and if pseudorandom how long do you want the output to be before it repeats? --- JF Pseudo-random is just fine. I just need it to test an encoding/decoding chip design. A hundred bits or so before repeat would be quite adequate. No security involved... just testing to be sure of no decoding hiccups. Try a 74hc164 and a 74hc7266. Connect QF and QG to A input through one of the gates in the 7266. Apply clear and clock to 164. You should get a 127 bit PRBS. -- Muzaffer Kal DSPIA INC. ASIC/FPGA Design Services http://www.dspia.com |
#17
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
On Wed, 20 Oct 2010 22:41:22 -0700, Muzaffer Kal
wrote: On Wed, 20 Oct 2010 15:45:35 -0700, Jim Thompson wrote: On Wed, 20 Oct 2010 17:23:54 -0500, John Fields wrote: On Wed, 20 Oct 2010 14:34:38 -0700, Jim Thompson wrote: I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) --- Whoopeee!!! Right up my alley! Do you want truly random or pseudorandom, and if pseudorandom how long do you want the output to be before it repeats? --- JF Pseudo-random is just fine. I just need it to test an encoding/decoding chip design. A hundred bits or so before repeat would be quite adequate. No security involved... just testing to be sure of no decoding hiccups. Try a 74hc164 and a 74hc7266. Connect QF and QG to A input through one of the gates in the 7266. Apply clear and clock to 164. You should get a 127 bit PRBS. Thanks! That's pretty much what I had decided... except all the LFSR/PRBS pages are all confusing as hell to an Analog guy :-) ...Jim Thompson -- | James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I can see November from my house :-) |
#18
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
On Thu, 21 Oct 2010 10:10:56 -0700, Jim Thompson
wrote: On Thu, 21 Oct 2010 08:13:45 -0500, John Fields wrote: Unlabeled gate below.... My 'HC164 has A, B as inputs, which I assumed were your D1, D2 inputs until I noticed the unlabeled device. --- Sorry about that, it's one of the gates in an HC86. --- JF |
#19
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
On Thu, 21 Oct 2010 12:59:08 -0500, John Fields
wrote: On Thu, 21 Oct 2010 10:10:56 -0700, Jim Thompson wrote: On Thu, 21 Oct 2010 08:13:45 -0500, John Fields wrote: Unlabeled gate below.... My 'HC164 has A, B as inputs, which I assumed were your D1, D2 inputs until I noticed the unlabeled device. --- Sorry about that, it's one of the gates in an HC86. --- JF OK. Thanks! ...Jim Thompson -- | James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I can see November from my house :-) |
#20
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
On 21/10/2010 7:34 AM, Jim Thompson wrote:
I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) Thanks! ...Jim Thompson I posted some pages of Applied Cryptography he http://www.filedropper.com/lfsr The pages contain the information you need to build dozens of different LFSR's of maximum period using a couple of 74... series. IIRC you can replace the XOR function with NXOR and get a maximal period LSFR that will self start (the all zero startup state becomes a valid state for the LSFR) |
#21
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
On Fri, 22 Oct 2010 07:54:13 +1000, David Eather
wrote: On 21/10/2010 7:34 AM, Jim Thompson wrote: I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) Thanks! ...Jim Thompson I posted some pages of Applied Cryptography he http://www.filedropper.com/lfsr The pages contain the information you need to build dozens of different LFSR's of maximum period using a couple of 74... series. IIRC you can replace the XOR function with NXOR and get a maximal period LSFR that will self start (the all zero startup state becomes a valid state for the LSFR) Link times out :-( ...Jim Thompson -- | James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I can see November from my house :-) |
#22
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
On Fri, 22 Oct 2010 07:54:13 +1000, David Eather
wrote: On 21/10/2010 7:34 AM, Jim Thompson wrote: I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) Thanks! ...Jim Thompson I posted some pages of Applied Cryptography he http://www.filedropper.com/lfsr The pages contain the information you need to build dozens of different LFSR's of maximum period using a couple of 74... series. IIRC you can replace the XOR function with NXOR and get a maximal period LSFR that will self start (the all zero startup state becomes a valid state for the LSFR) Link times out :-( ...Jim Thompson -- | James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I can see November from my house :-) |
#23
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
On 22/10/2010 8:23 AM, Jim Thompson wrote:
On Fri, 22 Oct 2010 07:54:13 +1000, David wrote: On 21/10/2010 7:34 AM, Jim Thompson wrote: I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) Thanks! ...Jim Thompson I posted some pages of Applied Cryptography he http://www.filedropper.com/lfsr The pages contain the information you need to build dozens of different LFSR's of maximum period using a couple of 74... series. IIRC you can replace the XOR function with NXOR and get a maximal period LSFR that will self start (the all zero startup state becomes a valid state for the LSFR) Link times out :-( ...Jim Thompson Send PM - I'll PM the zip file (0.5 Mb) |
#24
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
I'm only getting 52 before a repeat :-(
(I'm looking at the serial stream.) Get rid of that reset kludgery. LFSRs with the right taps will cycle through 2^N-1 states. The other state is stable. The stable state is all 0s or all 1s. You can switch to the other one with an inverter. -- These are my opinions, not necessarily my employer's. I hate spam. |
#25
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
Thanks! That's pretty much what I had decided... except all the LFSR/PRBS pages are all confusing as hell to an Analog guy :-) It will click when you see it. The key idea is Finite State Machine. With N flip-flops, the best you can do is 2^N states. A counter gets them all, but it's not random. A LFSR with the right taps gets 2^N-1, and they happen to be a "nice" random pattern. They are widely used in gear for testing communication links. Horowitz and Hill, Art of Electronics, has a nice section starting on page 655. It's only 3 pages, no hairy math. The Wikipedia article on LFSRs is good: http://en.wikipedia.org/wiki/Linear_...shift_register -- These are my opinions, not necessarily my employer's. I hate spam. |
#26
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
Thanks! That's pretty much what I had decided... except all the LFSR/PRBS pages are all confusing as hell to an Analog guy :-) It will click when you see it. The key idea is Finite State Machine. With N flip-flops, the best you can do is 2^N states. A counter gets them all, but it's not random. A LFSR with the right taps gets 2^N-1, and they happen to be a "nice" random pattern. They are widely used in gear for testing communication links. Horowitz and Hill, Art of Electronics, has a nice section starting on page 655. It's only 3 pages, no hairy math. The Wikipedia article on LFSRs is good: http://en.wikipedia.org/wiki/Linear_...shift_register -- These are my opinions, not necessarily my employer's. I hate spam. |
#27
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
On Fri, 22 Oct 2010 08:25:17 +1000, David Eather
wrote: On 22/10/2010 8:23 AM, Jim Thompson wrote: On Fri, 22 Oct 2010 07:54:13 +1000, David wrote: On 21/10/2010 7:34 AM, Jim Thompson wrote: I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) Thanks! ...Jim Thompson I posted some pages of Applied Cryptography he http://www.filedropper.com/lfsr The pages contain the information you need to build dozens of different LFSR's of maximum period using a couple of 74... series. IIRC you can replace the XOR function with NXOR and get a maximal period LSFR that will self start (the all zero startup state becomes a valid state for the LSFR) Link times out :-( ...Jim Thompson Send PM - I'll PM the zip file (0.5 Mb) OK. Got it working. Repeats at 255. What was confusing me was the double-talk about numbering the shift-register stages. Must be Physics majors who still have their direction of current reversed ;-) Thanks again, David! ...Jim Thompson -- | James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I can see November from my house :-) |
#28
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
On Fri, 22 Oct 2010 08:25:17 +1000, David Eather
wrote: On 22/10/2010 8:23 AM, Jim Thompson wrote: On Fri, 22 Oct 2010 07:54:13 +1000, David wrote: On 21/10/2010 7:34 AM, Jim Thompson wrote: I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) Thanks! ...Jim Thompson I posted some pages of Applied Cryptography he http://www.filedropper.com/lfsr The pages contain the information you need to build dozens of different LFSR's of maximum period using a couple of 74... series. IIRC you can replace the XOR function with NXOR and get a maximal period LSFR that will self start (the all zero startup state becomes a valid state for the LSFR) Link times out :-( ...Jim Thompson Send PM - I'll PM the zip file (0.5 Mb) OK. Got it working. Repeats at 255. What was confusing me was the double-talk about numbering the shift-register stages. Must be Physics majors who still have their direction of current reversed ;-) Thanks again, David! ...Jim Thompson -- | James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I can see November from my house :-) |
#29
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
Jim Thompson wrote:
On Fri, 22 Oct 2010 08:25:17 +1000, David Eather On 22/10/2010 8:23 AM, Jim Thompson wrote: On Fri, 22 Oct 2010 07:54:13 +1000, David http://www.filedropper.com/lfsr The pages contain the information you need to build dozens of different LFSR's of maximum period using a couple of 74... series. IIRC you can replace the XOR function with NXOR and get a maximal period LSFR that will self start (the all zero startup state becomes a valid state for the LSFR) Link times out :-( Send PM - I'll PM the zip file (0.5 Mb) OK. Got it working. Repeats at 255. What was confusing me was the double-talk about numbering the shift-register stages. Must be Physics majors who still have their direction of current reversed ;-) Nah - it's a digital nerd thing - Typically, for a binary output, Q0, Q1, ... Qn, the bit position corresponds to that power of two. As far as which way you shift, there's a holy war between little-endian and big-endian, but ssentially, it's a coin toss. :-) Cheers! Rich |
#30
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
John Fields wrote:
On Thu, 21 Oct 2010 15:01:42 -0700, Jim Thompson On Thu, 21 Oct 2010 08:13:45 -0500, John Fields On Wed, 20 Oct 2010 15:45:35 -0700, Jim Thompson On Wed, 20 Oct 2010 17:23:54 -0500, John Fields On Wed, 20 Oct 2010 14:34:38 -0700, Jim Thompson I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) Whoopeee!!! Right up my alley! Do you want truly random or pseudorandom, and if pseudorandom how long do you want the output to be before it repeats? Pseudo-random is just fine. I just need it to test an encoding/decoding chip design. A hundred bits or so before repeat would be quite adequate. No security involved... just testing to be sure of no decoding hiccups. [ASCIImatic snipped] The diodes and the inverter make a 7 input NOR which keeps the thing from latching up, ever, and gives you all 256 states from 00 to ff. I'm only getting 52 before a repeat :-( (I'm looking at the serial stream.) Strange. Those taps are supposed to yield a maximal length sequence (2^n-1), and the pulse-stuffer is supposed to force the sequence to include the lockup state, yielding 2^n states between repeats. I'll get on it tomorrow and, hopefully, find where the problem lies. In the meantime, I apologize for the inconvenience. Do I dare mention Don Lancaster's TTL Cookbook? He's got schematics up to some fairly long length - I don't recall off the top of my head how long, but it's definitely more than 16. Cheers! Rich |
#31
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
Hal Murray wrote:
I'm only getting 52 before a repeat :-( (I'm looking at the serial stream.) Get rid of that reset kludgery. LFSRs with the right taps will cycle through 2^N-1 states. The other state is stable. The stable state is all 0s or all 1s. You can switch to the other one with an inverter. That's there in case some random glitch inserts or removes a bit, accidentally leading to the stuck state. Cheers! Rich |
#32
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
Jim Thompson wrote: I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) XOR some of Sloman's messages. ;-) -- Politicians should only get paid if the budget is balanced, and there is enough left over to pay them. |
#33
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
On Thu, 21 Oct 2010 15:01:42 -0700, Jim Thompson
wrote: I'm only getting 52 before a repeat :-( (I'm looking at the serial stream.) ...Jim Thompson Aaargh! Sorry about that... Normally the counter jumps over the all-zeroes lockup state and runs at a length of 2^n - 1. The error here (egg on face) was that by forcing the counter into the all-zeroes state, once every cycle, a lot (all?) of the states which would have existed on the other side of the jump are killed off. The right way, if starting up in (or accidentally falling into) the all zeroes state is a concern, is to NOR all the Q's and feed the NOR output to the XOR, as shown. That way, the counter runs at maximal length normally, but forces a 1 into the shift register's serial input if its outputs all go to 0, for whatever reason. --- JF |
#34
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
Jim Thompson wrote: I'd like to conjure up a random bit generator. Question: Why it is impossible to have sex in the middle of the Red Square in Moscow? Answer: Because every idiot bystander will be eager to give his invaluable advice. So everybody is suggesting the LSFR. LSFRs are trivial; zero state problem has to be dealt with. I try doing something different just for the sake ot it. Take a binary counter, compute some ugly logical function from its output. Vladimir, What's your definition of "ugly" ?:-) Take two binary counters. One counts to 2^N, the other one counts to some odd number. Compute parity function of both counters. Here you go. Take a binary adder and a register. Add some odd number at every cycle. Tale a bit somewhere from the middle of the register. Take a binary adder and a register. Multiply by (2^N - 1), i.e. leftshift and subtract. Set the LSB to 1 to avoid all zero state. There is approximately a zillion of ways of making quazi random (or true random) generator from whatever stuff you got in the drawers. BTW, some 25 years ago I made random generator from relays. However, that was LSFR :-) Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com |
#35
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
Vladimir Vassilevsky wrote:
Jim Thompson wrote: I'd like to conjure up a random bit generator. Question: Why it is impossible to have sex in the middle of the Red Square in Moscow? Answer: Because every idiot bystander will be eager to give his invaluable advice. So everybody is suggesting the LSFR. LSFRs are trivial; zero state problem has to be dealt with. I try doing something different just for the sake ot it. Take a binary counter, compute some ugly logical function from its output. Vladimir, What's your definition of "ugly" ?:-) Take two binary counters. One counts to 2^N, the other one counts to some odd number. Compute parity function of both counters. Here you go. Take a binary adder and a register. Add some odd number at every cycle. Tale a bit somewhere from the middle of the register. Take a binary adder and a register. Multiply by (2^N - 1), i.e. leftshift and subtract. Set the LSB to 1 to avoid all zero state. There is approximately a zillion of ways of making quazi random (or true random) generator from whatever stuff you got in the drawers. BTW, some 25 years ago I made random generator from relays. However, that was LSFR :-) Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com One CANNOT compute (or generate from logic) a truly random number. Now, quasi-random number generators are a dime a dozen, like you imply. |
#36
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
On Fri, 22 Oct 2010 00:53:55 -0400, "Michael A. Terrell"
wrote: Jim Thompson wrote: I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) XOR some of Sloman's messages. ;-) Those aren't very random. He keeps saying the same stuff, over and over. John |
#37
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
John Larkin wrote: On Fri, 22 Oct 2010 00:53:55 -0400, "Michael A. Terrell" wrote: Jim Thompson wrote: I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) XOR some of Sloman's messages. ;-) Those aren't very random. He keeps saying the same stuff, over and over. If you XOR enough of them, the typos add up into a random mess. -- Politicians should only get paid if the budget is balanced, and there is enough left over to pay them. |
#38
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
Robert Baer wrote: Vladimir Vassilevsky wrote: There is approximately a zillion of ways of making quazi random (or true random) generator from whatever stuff you got in the drawers. One CANNOT compute (or generate from logic) a truly random number. Sure you can. Just make a long enough daisy chain of logic gates and compute a logic function from the input and the output of the chain. Now apply a clock to the input. As pulse propagates through the chain, the RMS jitter will add up and the output of the function will be truly random. Ring Oscillators are the other example, but they are asynchronous. Now, quasi-random number generators are a dime a dozen, like you imply. Oh, I forgot to mention the whole class of PRNGs where one counter acts as a source of the clock for the other counter. That is simple and allows generation of the variety of random looking sequencies. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com |
#39
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
On Sat, 23 Oct 2010 20:00:32 -0700, Robert Baer
wrote: Vladimir Vassilevsky wrote: Jim Thompson wrote: I'd like to conjure up a random bit generator. Question: Why it is impossible to have sex in the middle of the Red Square in Moscow? Answer: Because every idiot bystander will be eager to give his invaluable advice. So everybody is suggesting the LSFR. LSFRs are trivial; zero state problem has to be dealt with. I try doing something different just for the sake ot it. Take a binary counter, compute some ugly logical function from its output. Vladimir, What's your definition of "ugly" ?:-) Take two binary counters. One counts to 2^N, the other one counts to some odd number. Compute parity function of both counters. Here you go. Take a binary adder and a register. Add some odd number at every cycle. Tale a bit somewhere from the middle of the register. Take a binary adder and a register. Multiply by (2^N - 1), i.e. leftshift and subtract. Set the LSB to 1 to avoid all zero state. There is approximately a zillion of ways of making quazi random (or true random) generator from whatever stuff you got in the drawers. BTW, some 25 years ago I made random generator from relays. However, that was LSFR :-) Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com One CANNOT compute (or generate from logic) a truly random number. Now, quasi-random number generators are a dime a dozen, like you imply. There are lots of digital chips, including some Intel processors, that have cryptographic-grade random number generators on-chip. One common technique is to use a bunch of asynchronous ring oscillators to scramble pseudo-random shift registers. Lots of references on the web. I have a technique that uses an i/o pin as a noisy/chaotic RC ramp generator. Fun, but essentially useless. John |
#40
Posted to sci.electronics.design,alt.binaries.schematics.electronic,sci.electronics.cad
|
|||
|
|||
Random Bit Generator
On Sun, 24 Oct 2010 00:45:57 -0400, "Michael A. Terrell"
wrote: John Larkin wrote: On Fri, 22 Oct 2010 00:53:55 -0400, "Michael A. Terrell" wrote: Jim Thompson wrote: I'd like to conjure up a random bit generator. Just feed it a clock and have it generate random bits. 74HC... components preferred... I have most everything in that family in my parts bin ;-) XOR some of Sloman's messages. ;-) Those aren't very random. He keeps saying the same stuff, over and over. If you XOR enough of them, the typos add up into a random mess. Good point. John |
Reply |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Random Question... | Metalworking | |||
Random RCD tripping | UK diy | |||
Random RCD tripping | UK diy | |||
random | Electronics |