# NAME
Math::PRBS - Generate Pseudorandom Binary Sequences using an iterator-based Linear Feedback Shift Register
# SYNOPSIS
use Math::PRBS;
my $x3x2 = Math::PRBS->new( taps => [3,2] );
my $prbs7 = Math::PRBS->new( prbs => 7 );
my ($i, $value) = $x3x2t->next();
my @p7 = $prbs7->generate_all();
my @ints = $prbs7->generate_all_int();
# DESCRIPTION
This module will generate various Pseudorandom Binary Sequences (PRBS). This module creates a iterator object, and you can use that object to generate the sequence one value at a time, or _en masse_.
The generated sequence is a series of 0s and 1s which appears random for a certain length, and then repeats thereafter. (You can also convert the bitstream into a sequence of integers using the `generate_int` and `generate_all_int` methods.)
It is implemented using an XOR-based Linear Feedback Shift Register (LFSR), which is described using a feedback polynomial (or reciprocal characteristic polynomial). The terms that appear in the polynomial are called the 'taps', because you tap off of that bit of the shift register for generating the feedback for the next value in the sequence.
# INSTALLATION
To install this module, use your favorite CPAN client.
For a manual install, type the following:
perl Makefile.PL
make
make test
make install
(On Windows machines, you may need to use "dmake" or "gmake" instead of "make", depending on your setup.)
# AUTHOR
Peter C. Jones ``
Please report any bugs or feature requests thru the web interface at
[https://github.com/pryrt/Math-PRBS/issues](https://github.com/pryrt/Math-PRBS/issues)
# COPYRIGHT
Copyright (C) 2016,2018 Peter C. Jones
# LICENSE
This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.
See [http://dev.perl.org/licenses/](http://dev.perl.org/licenses/) for more information.