Select a different number of taps (we chose 8 above).That generates a string of 255 0's and 1's that looks random (although it repeats itself after 255 clocks). choose any of the flip-flops to make the output, keep the other seven internal). Now, instead of outputting the full eight bits, we could output just one bit (i.e. That's because 0 is a dead-end state, so we can choose any start value but 0.Īfter that, the LFSR changes value at each clock cycle but never reaches 0, so it goes through only 255 8bit values (out of 256 possible combinations of a 8bit output) before starting again. Output reg LFSR = 255 // put here the initial value The output sequence starts as follow (assuming all the flip-flops start at '1'): The one shown above is an 8-taps LFSR (it uses 8 flip-flops). Let's say you want a counter that counts more or less "randomly", you can use an LFSR.Īs you can see, an LFSR is a shift-register with some XOR gates.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |