From Brian Willoughby Sent Wed, Feb 7th 2018, 01:44
This is a decent idea, Andy, but the first LFSR that is used as a seed = would need to be guaranteed to be non-zero, otherwise the second LFSR = would not actually generate anything but a constant stream of zeroes. = Thankfully, in the software world, it=E2=80=99s easy enough to run the = first LFSR multiple times until it generates a non-zero seed for the = second LFSR. This would take additional CPU time, but only rarely. = Today=E2=80=99s processors should be fast enough to handle the = occasional overhead. Note that the eighties processors might be running slow enough that this = workaround would not be sufficient. Even the electric druid White Noise = Source (thanks, Tom) runs on cycle-counted assembly code, so there=E2=80=99= s no guarantee that a =E2=80=9Cmodern=E2=80=9D processor could handle = the overhead. Thankfully, Mike=E2=80=99s requirements would only need the first LFSR = to run when triggered by a fairly slow Gate input signal, so the = overhead could be hidden in between other events. Brian By the way, an LFSR is primarily a single-bit random source. When used = to generate multiple bits, such as the seed for another LFSR, the total = shift register length must be larger than the number of bits being = pulled out at any one time. Normally, if you need to pull out an 8-bit = number, you need to clock the LFSR 8 times, otherwise you end up reusing = all but 1 of the previous bits, which is even less than pseudo-random. = In the design case we=E2=80=99re discussing, if the current LFSR value = is all zeroes, then perhaps only a single bit shift would be needed to = make the next 8-bit code be non-zero. On Feb 6, 2018, at 4:51 PM, Andrew Simper <xxxx@xxxxxxx.xxx> wrote: > It sounds like the easiest approach will be a software based one. You = need a step sequencer with a gate input hooked up to both the reset to = 0th step and randomise all step values. Pretty easy to write one = yourself in any programming language you have access to, or in any = digital modular environment you have to hand if you have a random number = generating module that can be triggered and a mux based on clock (have = 32 random value modules all feed into the muxer which steps through them = based on clock). >=20 > You could use an LFSR if you can manually set the seed / state number, = you have another LFSR running on gate on which seeds the second one, the = second one starts generating its sequence, then at the loop point you = re-seed it from the first LFSR, which hasn't changed and you get the = same sequence again. >=20 > Cheers, >=20 > Andy