Various pseudo random codes are generated using LFSR(Linear Feedback Shift Register). The generator polynomial governs all the characteristics of the generator. For a given generator polynomial, there are two ways [2] of implementing LFSR. Galois feedback generator uses only the output bit to add (in Galois field) several stages of the shift register and is desirable for high speed hardware implementation as well as software implementation. The other known as Fibonacci feedback generator can generate several delays of sequences without any additional logic.
Shift-register sequences having the maximum possible
period for an r-stage shift register are called maximal
length sequences or m-sequences. A primitive generator
polynomial [2] always yield an m-sequence.
The maximum period of an r-stage shift register can be proven
to be 2r - 1. The m-sequences has three important
properties, i.e., balance property, run-length property and
shift-and-add property. The periodic autocorrelation function Ra(k)
is two-valued and is given by
The software implementation of Galois construction for a given generator polynomial is straight forward and well known [3]. mseq module is written to generate arbitrary m-sequences with the degree of polynomial less than 32. This restriction is due to the fact that the LFSR state is represented by an unsigned long int variable. If an m-sequence generator with the degree of greater than 31 is required, use lmseq module instead of mseq. lmseq handles higher degrees up to 63. mseq module is the foundation module for other PN sequences such as Gold codes, orthogonal Gold codes and Kasami sequences.