The present application is a National Phase of International Application Number PCT/SG2015/050119, filed May 20, 2015.
The present invention pertains to the field of error correction in digital data processing and, more particularly, to an algorithm for generating system to calculate CRC independent of the length of polynomial generator and data stream.
Error correction techniques and architectures are well known in digital data processing and communications systems, including systems having data storage subsystems such as magnetic, optical, or semiconductor based memory stores.
Detection and, where possible, correction of erroneous data has been achieved by using an encoder circuit to construct some number of “redundant” m-bit error check symbol, which mathematically characterize the information in a selected block of data. The error check symbol is then appended to the data block and transferred through a communication channel. When the data block is received, or later retrieved from memory, the accuracy or reliability of the data can be evaluated by use of these appended error check symbol.
Cyclic Redundancy check (CRC) is a classical error detection mechanism that is widely known in the art and used in numerous applications as a means to detect errors from a transmitted stream of information. Its general acceptance is due to the simplicity of implementation by which it can be used to encode into a stream of information to be transmitted and subsequently checked at the receiver.
CRC calculation is performed in polynomial arithmetic, whereby the basis of the algorithm is; that given both transmitter and receiver mutually acknowledge the use of the same polynomial generator, which is essentially a sequence of information used to construct and verify the error check symbol (in the context of CRC, it is also known as checksum) from the data stream, a stream of information (also known as packets or frames) is transmitted, whereby calculation of the error check symbol is created by performing polynomial division on the data stream against the chosen polynomial generator.
In prior art, in order to optimize the speed at which the error check symbol can be calculated, some have opted for the solution of deriving Boolean or logical expressions that are valid for specific polynomial generators with fixed data width, while other methodologies optimize the idea of using LFSR (linear feedback shift registers), but instead of single bit shifts, many bits or bytes may be shifted per clock cycle, however this then imposes additional rules for the algorithm. Further still, some methodologies proposed by the prior art attempts to optimize operation of performing CRC by checking for unchanged parts of certain streams of information, while others attempt to improve methodology by calculating partial remainders based on segments of the packet of information.
The present invention provides a method of arrangement of an algorithm to perform parallel cyclic redundancy check (CRC) comprising the step of: (i) considering a polynomial generator g(x)=gk−1xk−1+gk−2xk−2+gk−2xk−2+ . . . g0, and f(x)=m(x)xk−1+c(x); and m(x)=mL−1xL−1+mL−2xL−2+mL−2xL−2+. . . m0; (ii) transforming f(x) and g(x) into a table as a function of each other; (iii) considering an exemplary case whereby k=7 and L=7, obtaining fn−1=A, fn−1=A+B, fn−1=A+B+C . . . f2=E+F+G, f1=F+G, f0=G, wherein A, B, C . . . G are divisor coefficient, and (iv) obtaining ck-2=fk−2, ck−2=fk−2. . . c1=f1, c0=f0.
It is an object of the present invention to provide a method of arrangement of an algorithm that calculate the checksum used in cyclic redundancy checks, which is generic and independent of the length of the polynomial generator and data stream, and the method can be realized in digital logic implementation limited only by the propagation delay of the slowest synthesized combinatorial logic path and typically calculated within a period of a single system clock cycle.
Another object of the present invention is to provide a method of arrangement of an algorithm that calculates the checksum used in cyclic redundancy check, wherein a sequence of information and the corresponding polynomial generator are transformed into a table to simplify the realization and implementation of the method in synthesizable logic.
These and other objects, aspects, advantages and features of the present invention will be more fully understood and appreciated by those skilled in the art upon consideration of the following detailed description of a preferred embodiment, presented in conjunction with the accompanying drawings.
It is to be understood that the accompanying drawings are provided for the purpose of illustration only, and are not intended as a definition of the limits of the invention. The drawings illustrate a preferred embodiment of the present invention, in which:
CRC calculation is performed in polynomial arithmetic, whereby the basis of an algorithm is given that both the transmitter and the receiver use the same polynomial generator sequence, before a stream of information (also known as packets or frames) is transmitted, calculation will be made against the selected polynomial generator via polynomial division. The remainder of the result of the polynomial division is appended against the original packet of information to be transmitted. Thence when the information is transmitted and received by the receiver, a verification can be made by performing the same polynomial division to the received packet of information and checking if the resultant remainder is equal to zero, and hence an error is easily determined for cases when the remainder is not.
In the present invention, the method is employed to provide a method of arrangement of an algorithm that calculates the checksum used in CRC. With respect to mathematical context, the disclosure above can be explained by the following representation.
Suppose that the data stream is represented by m(x) with coefficients mL−1, mL−2, . . . and each polynomial degree is represented by xn-1 where n is the degree of the polynomial ranging from {0,n−1}, then the data stream can be said that
m(x)=mL−1xL−1+mL−2xL−2+mL−2xL−2+ . . . m0
Where L is the length of the data packet.
Additionally the polynomial generator can be similarly represented by
g(x)=gk−1xk−1+gk−2xk−2+gk−2xk−2+ . . . g0
Where k is the length of the polynomial generator. In the present invention, the CRC checksum calculated can be represented by
c(x)=ck−2xk−2+ck−3xk−3+ck−4xk−4+ . . . c0
The final frame of information to be transmitted after CRC has been calculated and appended to m(L) can be represented as:
f(x)=m(x)xk−1+c(x)
And let q(x) be the quotient product of data stream (appended by k−1 bits) and the polynomial generator and m(x) can be rewritten as
m(x)xk−1=g(x)q(x)+c(x)
Where the solution is derived from the following equation:
In prior art,
As a result, it would require minimum of k−1 number of clock cycles (where k−1 is the highest degree associated with the polynomial generator) in order to calculate the CRC for a given transmitted stream at the receiver side.
As shown in
In the preferred embodiment of the present invention, in order to effectively work out the algorithm, f(x) and g(x) are transformed into a table as a function of each other as shown in
Considering a special case where the polynomial generator is such that all the coefficients from the kth degree 0 to 6 are all one, and let n be the length of the data stream plus the length of the CRC check sum (L+(k−1)), it can be derived that
fn−1=A,fn−1=A+B,fn−1=A+B+C . . . f2=E+F+G,f1=F+G,f0=G
And therefore,
ck−2=fk−2,ck−2=fk−2 . . . c1=f1,c0=f0
If the polynomial generator is not special case, then the derivation above would require an extra multiplication factor based on the row index of the polynomial generator as shown in
In accordance with the present invention, the algorithm is being used as disclosed to generate a system for CRC checksum which is independent of data or polynomial generator length typically calculated within one clock cycle, limited only by the propagation delay of the slowest synthesized combinatorial logic path.
The generation of the system determines the resultant reminder from performing polynomial division on a data sequence from a configurable polynomial generator without requiring knowledge about the past or having to implement feedback which implies memory. The present invention provides a novel approach by determining the coefficients of the quotient of the result from performing polynomial division by assuming that the remainder is zero, which infers that the remaining k−1 bits of the overall quotient is what would be the remainder of the polynomial division.
Thus, it would be apparent to those skilled in the art that many more modifications are possible without departing from the inventive concepts herein. The invention, therefore, is not to be restricted except in the spirit of the appended claims.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/SG2015/050119 | 5/20/2015 | WO | 00 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2016/186571 | 11/24/2016 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
8185811 | Li | May 2012 | B2 |
20050066257 | Tsai et al. | Mar 2005 | A1 |
20050114614 | Anderson | May 2005 | A1 |
20050149818 | Tsai et al. | Jul 2005 | A1 |
20080320370 | Shinagawa et al. | Dec 2008 | A1 |
20110314346 | Vas | Dec 2011 | A1 |
20140281817 | Grube | Sep 2014 | A1 |
20140351624 | Resch | Nov 2014 | A1 |
Number | Date | Country |
---|---|---|
0840462 | Dec 2004 | EP |
Entry |
---|
International Search Report, PCT/SG2015/050119, dated Apr. 22, 2016, 3 pages. |
International Written Opinion, PCT/SG2015/050119, dated Apr. 22, 2016, 5 pages. |
Ming-Der Shien et al., “A Systematic Approach for Parallel CRC Computations”, Journal of Information Science and Engineering, vol. 17, pp. 445-461, May 2001. |
Number | Date | Country | |
---|---|---|---|
20180131388 A1 | May 2018 | US |