TAMS / Java / Hades / applets: contents | previous | next | ||||
Hades Applets contents visual index introduction std_logic_1164 gatelevel circuits delay models flipflops adders and arithm... counters LFSR and selftest linear feedb... signature an... LFSR statistics LFSR-based t... BILBO register memories programmable logic state-machine editor misc. demos I/O and displays DCF-77 clock relays (switch-le... CMOS circuits (sw... RTLIB logic RTLIB registers Prima processor D*CORE MicroJava Pic16 cosimulation Mips R3000 cosimu... Intel MCS4 (i4004) image processing ... [Sch04] Codeumsetzer [Sch04] Addierer [Sch04] Flipflops [Sch04] Schaltwerke [Sch04] RALU, Min... [Fer05] State-Mac... [Fer05] PIC16F84/... [Fer05] Miscellan... [Fer05] Femtojava FreeTTS | LFSR linear feedback shift register (8-bit) Circuit Description A simple 8-bit linear feedback shift register built from D-flipflops. In this example, the outputs of flipflops 8,6,5,4 are summed via XNOR gates (this is a linear operation, hence the name) and fed back into the first flipflop. Just wait for a few clock impulses and watch the output values of the register, which should appear more or less random. Depending on the logic used in the feedback path, the register follows a predefined sequence of states, with a maximum sequence length of (2^n)-1 in a n-bit register. Perhaps the most important use of LFSRs is as pseudorandom number generators, especially for automatic selftest, because the generators are very cheap and can be run at very high clock frequencies. With a register of n+1 bits, each n-bit input value can be generated. Naturally, subsequent output values are highly correlated, as only the first bit changes while all other bits are simply shifted. Note that the feedback logic used in many textbooks has the stable state 0000..00, while all other states are in the single large pseudorandom sequence of the primitive polynom corresponding to the feedback path. Unfortunately, this means that a default realization with a power-on initialization to the all-zero state will not work, because the register would stay forever in the all-zero state. One obvious workaround is to use a power-on initialization to some other state, e.g. all-ones via flipflops with set inputs. The other possibility, used in this applet, is to change the feedback path so that the all-zero state is not stable. | |||
Print version | Run this demo in the Hades editor (via Java WebStart) | ||||
Usage | FAQ | About | License | Feedback | Tutorial (PDF) | Referenzkarte (PDF, in German) | ||||
Impressum | http://tams.informatik.uni-hamburg.de/applets/hades/webdemos/35-selftest/30-lfsr/lfsr-8654.html |