View Single Post
  #2 (permalink)  
Old 07-04-2009, 06:12 PM
Vladimir Vassilevsky
Guest
 
Posts: n/a
Default STUPIDENT::Re: Generating Maximum Length Sequence using Galois LFSR



Nicholas Kinar wrote:

> Hello--
>
> I am trying to generate a Maximum Length Sequence (MLS) using a Linear
> Feedback Shift Register (LFSR). Assuming that the taps have been loaded
> into variable "taps," and that "lfsr" is the variable being used in the
> shift register computation, I am trying to generate the sequence using
> code similar to that found on Wikipedia at the page
> http://en.wikipedia.org/wiki/Linear_...shift_register. Here is a
> code snippet:
>
>
> // generate sequence
> for(int i = 0; i < L; i++)
> {
> lfsr = (lfsr >> 1) ^ (-(lfsr & 1u) & taps);
>
> // if I have an output array with L elements,
> // what do I set it equal to in this loop?
> // output[i] = ??
> }
>
>
> However, how do I determine the output of the LFSR? For m = 12, it
> follows that L = (2^m) - 1 = 4095. How would I generate an MLS sequence
> with a length of 4095 using the above code? The loop should repeat 4095
> times. What is the "output stream"? Is it simply the lowest bit in the
> sequence? Is this the bit that is fed back into the sequence after
> passing through the logic gates?
>
> Is there a way to test if my output is an MLS? Does the Galois LFSR
> generate exactly the same output as a Fibonacci LFSR?
>
>
>

Reply With Quote