#include <max_pn.h>
Public Member Functions | |
max_pn (int g=0x006d, int len=63, int init=-1) | |
Constructor. | |
void | reset () |
Reset. | |
signed char | out () |
Get output (fast method). | |
bool | get_bit () |
Fast method. | |
signed char | out1 () |
Get output (alternative method). | |
int | state () |
Protected Attributes | |
int | lenp1 |
int | gen |
int | u |
: Simple implementation of a maximal length pseudorandom sequence used for spread spectrum PN generation, BER testing etc. G is the generator Len is the PN length (must be 2^N - 1) Init is an initialization seed Two methods supported out : exclusive or (XOR) shift register with Generator out1 : feedback with XOR reduction Note: G, LEN must be correct (need to get from book).
|
Constructor.
|
|
Fast method.
|
|
Get output (fast method).
|
|
Get output (alternative method). returns {0,1} instead of {-1,1} |
|
Reset.
|
|
|
|
|
|
|
|
|