itpp::LFSR Class Reference
[Sequences]
Binary Linear Feedback Shift Register (
LFSR)
- The LFSR is on Fibonacci form (see p. 104 in Peterson, Ziemer and Borth, "Introduction to Spread Spctrum communications", Prentice-Hall, 1995)
- If the connect_polynomial=1+g1*D+g2*D^2+...+gr*D^r is a primitive polynomial, a Maximum Length Sequence (m-sequence) of length N=2^r-1 is constructed. Use an arbitrary state not equal to zero, to get a phase of the m-sequence
- For a table of primtive polynomials see p. 117 in the reference above or a suitable book on coding.
More...
#include <sequence.h>
List of all members.
|
Public Member Functions |
| LFSR (void) |
| Constructor.
|
| LFSR (const bvec &connections) |
| Input connect_polynomial=1+g1*D+g2*D^2+...+gr*D^r in bvec format [g0,g1,...,gr].
|
| LFSR (const ivec &connections) |
| Input connect_polynomial=1+g1*D+g2*D^2+...+gr*D^r in octal format.
|
void | set_connections (const bvec &connections) |
| Input connect_polynomial=1+g1*D+g2*D^2+...+gr*D^r in bvec format [g0,g1,...,gr].
|
void | set_connections (const ivec &connections) |
| Input connect_polynomial=1+g1*D+g2*D^2+...+gr*D^r in octal format.
|
void | set_state (const bvec &state) |
| Set state (contents in the shift registers) in bvec format.
|
void | set_state (const ivec &state) |
| Set state (contents in the shift registers) in octal format.
|
bin | shift (void) |
| Shift one step and output binary symbol.
|
bvec | shift (int no_shifts) |
| Shift no_shifts steps and output bvec.
|
int | get_length (void) |
| Return length of shift register.
|
bvec | get_state (void) |
| Returns the state of the shift register.
|
Detailed Description
Binary Linear Feedback Shift Register (
LFSR)
- The LFSR is on Fibonacci form (see p. 104 in Peterson, Ziemer and Borth, "Introduction to Spread Spctrum communications", Prentice-Hall, 1995)
- If the connect_polynomial=1+g1*D+g2*D^2+...+gr*D^r is a primitive polynomial, a Maximum Length Sequence (m-sequence) of length N=2^r-1 is constructed. Use an arbitrary state not equal to zero, to get a phase of the m-sequence
- For a table of primtive polynomials see p. 117 in the reference above or a suitable book on coding.
The documentation for this class was generated from the following files: