26 printf(
"\nLFSR::GenerateSequence PRBS3, PRBS4 and PRBS5 tests\n");
27 printf(
"==========================\n");
30 std::array<std::uint16_t, 2> taps3 = {3, 2};
34 std::array<std::uint16_t, 2> taps4 = {4, 3};
38 std::array<std::uint16_t, 2> taps5 = {5, 3};
41 for (
auto prbs : {prbs3, prbs4, prbs5}) {
42 std::cout <<
"PRBS period " << prbs.size() <<
":\t";
44 std::cout << static_cast<unsigned short>(p) <<
" ";
46 std::cout << std::endl;
std::vector< Output > GenerateSequence(std::bitset< k > start, std::array< std::uint16_t, nTaps > taps, bool left=true, bool wrapping=false, bool oppositeBit=false)
Generation of a sequence of pseudo-random bits using a linear feedback shift register (LFSR),...