From 15f9d95f5f44db3ff92ee157c37e4915bffb9129 Mon Sep 17 00:00:00 2001 From: Alexander Chemeris Date: Fri, 24 Mar 2017 22:56:08 -0700 Subject: BitVector: Remove Generator class. It is not used in osmo-trx, because we're not doing FEC or CRC checks. Change-Id: I1509e785c1187ebdafe5b2518bd298fbbd1cd036 --- CommonLibs/BitVector.cpp | 19 -------------- CommonLibs/BitVector.h | 67 ------------------------------------------------ 2 files changed, 86 deletions(-) diff --git a/CommonLibs/BitVector.cpp b/CommonLibs/BitVector.cpp index 3b556b9..cf408cd 100644 --- a/CommonLibs/BitVector.cpp +++ b/CommonLibs/BitVector.cpp @@ -200,25 +200,6 @@ void BitVector::LSB8MSB() -uint64_t BitVector::syndrome(Generator& gen) const -{ - gen.clear(); - const char *dp = mStart; - while (dp -class BitVector; -class SoftVector; - - - -/** Shift-register (LFSR) generator. */ -class Generator { - - private: - - uint64_t mCoeff; ///< polynomial coefficients. LSB is zero exponent. - uint64_t mState; ///< shift register state. LSB is most recent. - uint64_t mMask; ///< mask for reading state - unsigned mLen; ///< number of bits used in shift register - unsigned mLen_1; ///< mLen - 1 - - public: - - Generator(uint64_t wCoeff, unsigned wLen) - :mCoeff(wCoeff),mState(0), - mMask((1ULL<>(mLen_1)) & 0x01; - mState = (mState<<1) ^ (inBit & 0x01); - if (fb) mState ^= mCoeff; - } - - /** - Update the generator state by one cycle. - This is in the .h for inlining. - */ - void encoderShift(unsigned inBit) - { - const unsigned fb = ((mState>>(mLen_1)) ^ inBit) & 0x01; - mState <<= 1; - if (fb) mState ^= mCoeff; - } - - -}; - - - class BitVector : public Vector { @@ -146,14 +87,6 @@ class BitVector : public Vector { void zero() { fill(0); } - /**@name FEC operations. */ - //@{ - /** Calculate the syndrome of the vector with the given Generator. */ - uint64_t syndrome(Generator& gen) const; - /** Calculate the parity word for the vector with the given Generator. */ - uint64_t parity(Generator& gen) const; - //@} - /** Invert 0<->1. */ void invert(); -- cgit v1.2.3