![]() ![]() ![]() ![]() The execution time for a single bit changes depending on whether a 0 or 1 is present in the LSB, this may or may not be acceptable depending on your precise requirements. The mask for the software type is the same as for the hardware type, except for being bit reversed, that is the MSB of one is the LSB of the other. This only works easily for word lengths up to the native word length of the processor, but extension to multi-word operation is trivial. Pseudocode for this is if (state&1 = 1)Īll state bits that correspond to the mask get conditionally XOR'd at the same time, when the LSB is 1, and left unaltered when it's 0. Then there's the software implementation, which works on a whole word at a time. It's the computation of the parity that will tend not have a single cycle bitcount() operation available. This maps well onto hardware shift registers, but is not software efficient. There's the hardware implementation, which computes parity = (bitcount(state&mask))&1, and shifts the parity bit into the end of the word. There are two forms of the LSFR algorithm. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |