View Single Post
  #5 (permalink)  
Old 07-05-2009, 08:55 AM
Steve Pope
Guest
 
Posts: n/a
Default Re: Generating Maximum Length Sequence using Galois LFSR

robert bristow-johnson <[email protected]> wrote:

>you need to select your taps word correctly. first of all, for m=12,
>then taps > 2048, but there is more to it. somewhere on the web,
>there is a resource of "primitive polynomials". find that and use one
>of them (ignore the least significant bit, which is always 1, the
>other m bits of the primitive polynomial are the m bits of your taps
>word). for m=12, you could write a program that guesses at a 12-bit
>word, try it out (see if it goes through all 2^12 - 1 non-zero
>states), and if it fails, try another word for taps.


Here is the simplest one for m=12:

0x05eb

It is probably bit reversed from the OP's set-up,
The leadign coefficient of one is deleted from
this constant.

(Unlike the OP, I always put the LS term of the polynomial
in the lsb of a binary word, but after looking at OP's
code it seems more compact to do it his way.)

Steve
Reply With Quote