[英]Single-bit Error Detection through CRC(Cyclic Redundancy Check)
I was going through some problems related to the single bit error detection based on the CRC generators and was trying to analyse which generator detect single-bit error and which don't. 我正在经历一些与基于CRC生成器的单比特错误检测相关的问题,并试图分析哪个发生器检测到单比特错误,哪个不检测。
Suppose, If I have a CRC generator polynomial as x 4 + x 2 . 假设,如果我有一个CRC生成多项式为x 4 + x 2 。 Now I want to know whether it guarantees the detection of a single-bit error or not ?
现在我想知道它是否能保证检测到单比特错误?
According to references 1 and 2 , I am concluding some points :- 根据参考文献1和2 ,我总结了一些观点: -
1) If k=1,2,3 for error polynomial x k , then remainders will be x,x 2 ,x 3 respectively in the case of polynomial division by generator polynomial x 4 + x 2 and according to the references, if generator has more than one term and coefficient of x 0 is 1 then all the single bit errors can be caught. 1)如果对于误差多项式x k ,k = 1,2,3,则在通过生成多项式x 4 + x 2进行多项式除法的情况下,余数将分别为x,x 2 ,x 3 ,并且根据参考,如果是生成器如果有一个以上的项,x 0的系数为1则可以捕获所有单个位错误。 But It does not say that if coefficient of x 0 is not 1 then single bit error can't be detected.
但是没有说如果x 0的系数不是1则不能检测到单比特错误。 It is saying that "In a cyclic code , those e(x) errors that are divisible by g(x) are not caught."
它说“在循环代码中,那些可被g(x)整除的e(x)错误不会被捕获。”
2) I have to check the remainder of E(x)/g(x) where E(x)(suppose, it is x k ) where, k=1,2,3,... is error polynomial and g(x) is generator polynomial. 2)我必须检查E(x)/ g(x)的余数,其中E(x)(假设,它是x k )其中,k = 1,2,3,...是误差多项式和g( x)是生成多项式。 If remainder is zero then I can't detect error and when it is non-zero then I can detect it.
如果余数为零,那么我无法检测到错误,当它为非零时,我就可以检测到它。
So, According to me, generator polynomial x 4 +x 2 guarantees the detection of single-bit error based on the above 2 points.Please confirm whether I am right or not. 所以,据我所知,生成多项式x 4 + x 2保证了基于上述两点的单比特错误的检测。请确认我是否正确。
if coefficient of x 0 is not 1 then single bit error can't be detected?
如果x 0的系数不是1,则无法检测到单比特错误?
If the coefficient of x 0 is not 1, it is the same as shifting the CRC polynomial left by 1 (or more) bits (multiplying by some power of x). 如果x 0的系数不是1,则将CRC多项式向左移位1(或更多)位(乘以x的某个幂)相同。 Shifting a CRC polynomial left 1 or more bits won't affect it's ability to detect errors, it just appends 1 or more zero bits to the end of codewords.
将CRC多项式移位1位或更多位不会影响它检测错误的能力,它只是在码字末尾附加1位或更多位零位。
generator polynomial x 4 + x 2 guarantees the detection of single-bit error
生成多项式x 4 + x 2保证检测单比特错误
Correct. 正确。 x 4 + x 2 is x 2 + 1 shifted left two bits, x 4 + x 2 = (x 2 ) (x 2 + 1) = (x 2 ) (x + 1) (x + 1) , and since x 2 + 1 can detect any single bit error, then so can x 4 + x 2 .
x 4 + x 2是x 2 + 1左移两位,x 4 + x 2 =(x 2 )(x 2 + 1)=(x 2 )(x + 1)(x + 1),并且因为x 2 + 1可以检测到任何单个位错误,那么x 4 + x 2也可以。 Also with the (x + 1) term (two of these), it adds an even parity check and can detect any odd number of bit errors.
同样使用(x + 1)项(其中两个),它会添加偶数奇偶校验,并可以检测任何奇数位错误。
In general, all CRC polynomials can detect a single bit error regardless of message length. 通常,无论消息长度如何,所有CRC多项式都可以检测单个位错误。 All CRC polynomials have a "cylic" period: if you use the CRC polynomial as the basis for a Linear Feedback Shift Register , and the initial value is 000...0001, then after some fixed number of cycles, it will cycle back to 000...0001.
所有CRC多项式都有一个“循环”周期:如果你使用CRC多项式作为线性反馈移位寄存器的基础,并且初始值是000 ... 0001,那么在经过一定数量的循环后,它将循环回到000 ... 0001。 The simplest failure for a CRC is to have a 2 bit error, where the 2 bits are separated by a distance equal to the cyclic period.
CRC的最简单的失败是具有2比特的错误,其中2比特被分开等于循环周期的距离。 Say the period is 255 for an 8 bit CRC (9 bit polynomial), then a 2 bit error, one at bit[0] and one at bit[255] will result in a CRC = 0, and fail to be detected, This can't happen with a single bit error, it will just continue to go through the cycles, none of which include the value 0. If the period is n cycles, then no 2 bit error can fail if the number of bits in the message + CRC is <= n.
假设8位CRC(9位多项式)的周期为255,那么2位错误,一位[0]位和一位[255]将导致CRC = 0,并且无法检测到,单个位错误不会发生,它只会继续经历周期,其中没有一个包含值0.如果周期是n个周期,那么如果消息中的位数没有2位错误可能会失败+ CRC <= n。 All CRC polynomials that are a product of any polynomial times (x + 1) can detect any odd number of bit errors (since x + 1 is essentially adds an even parity check).
作为任何多项式时间(x + 1)的乘积的所有CRC多项式可以检测任何奇数个比特错误(因为x + 1实质上是添加偶校验检查)。
Shifting a CRC polynomial left by z
bits means that every codeword will have z
trailing zero bits. 将
z
多项式左移z
位意味着每个码字将具有z
尾随零位。 There are cases where this is done. 有些情况下这样做。 Say you have a fast 32 bit CRC algorithm.
假设你有一个快速的32位CRC算法。 To use that algorithm for a 16 bit CRC, the 17 bit CRC polynomial is shifted left 16 bits so that the least significant non-zero term is x 16 .
为了将该算法用于16位CRC,将17位CRC多项式向左移位16位,使得最低有效非零项为x 16 。 After computing using the 32 bit CRC algorithm, the 32 bit CRC is shifted right 16 bits to produce the 16 bit CRC.
在使用32位CRC算法进行计算之后,32位CRC右移16位以产生16位CRC。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.