Skip to content

Commit 74de515

Browse files
authored
Update testLFSR.cxx
1 parent 189b3cb commit 74de515

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

math/mathcore/test/testLFSR.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
TEST(LFSR, GenerateSequence)
66
{
77
// PRBS3
8-
std::array<std::uint16_t, 2> taps3 = {2, 3}; // Exponents of the monic polynomial
8+
std::array<std::uint16_t, 2> taps3 = {3, 2}; // Exponents of the monic polynomial
99
auto prbs3 = ROOT::Math::LFSR::GenerateSequence<3, 2, bool>(std::bitset<3>().flip(), taps3); // Start value all high
1010
EXPECT_EQ(prbs3, std::vector<bool>({false, false, true, false, true, true, true}));
1111

1212
// PRBS4
13-
std::array<std::uint16_t, 2> taps4 = {3, 4}; // Exponents of the monic polynomial
13+
std::array<std::uint16_t, 2> taps4 = {4, 3}; // Exponents of the monic polynomial
1414
auto prbs4 = ROOT::Math::LFSR::GenerateSequence<4, 2, bool>(std::bitset<4>().flip(), taps4); // Start value all high
1515
EXPECT_EQ(prbs4, std::vector<bool>({false, false, false, true, false, false, true, true, false, true, false, true,
1616
true, true, true}));
@@ -22,5 +22,6 @@ TEST(LFSR, GenerateSequence)
2222
false, true, false, false, false, false, true, false, false, true, false,
2323
true, true, false, false, true, true, true, true, true}));
2424

25-
// Exponents of the monic polynomial extracted from Keysight waveform generator manual p. 284
25+
// Exponents of the monic polynomial were extracted from
26+
// Keysight Trueform Series Operating and Service Guide p. 284-285. More examples in tutorials/math/PRBS.C
2627
}

0 commit comments

Comments
 (0)