CN107667475A - 一种用于循环冗余校验的排列演算方法 - Google Patents

一种用于循环冗余校验的排列演算方法 Download PDF

Info

Publication number
CN107667475A
CN107667475A CN201580080126.7A CN201580080126A CN107667475A CN 107667475 A CN107667475 A CN 107667475A CN 201580080126 A CN201580080126 A CN 201580080126A CN 107667475 A CN107667475 A CN 107667475A
Authority
CN
China
Prior art keywords
calculation method
generator polynomial
crc
arrangement calculation
divisor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201580080126.7A
Other languages
English (en)
Inventor
陈泗伽
江永明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
AKRIBIS SYSTEMS Pte Ltd
Original Assignee
AKRIBIS SYSTEMS Pte Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by AKRIBIS SYSTEMS Pte Ltd filed Critical AKRIBIS SYSTEMS Pte Ltd
Publication of CN107667475A publication Critical patent/CN107667475A/zh
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M13/00Coding, decoding or code conversion, for error detection or error correction; Coding theory basic assumptions; Coding bounds; Error probability evaluation methods; Channel models; Simulation or testing of codes
    • H03M13/03Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words
    • H03M13/05Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words using block codes, i.e. a predetermined number of check bits joined to a predetermined number of information bits
    • H03M13/09Error detection only, e.g. using cyclic redundancy check [CRC] codes or single parity bit
    • H03M13/091Parallel or block-wise CRC computation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/17Function evaluation by approximation methods, e.g. inter- or extrapolation, smoothing, least mean square method
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M13/00Coding, decoding or code conversion, for error detection or error correction; Coding theory basic assumptions; Coding bounds; Error probability evaluation methods; Channel models; Simulation or testing of codes
    • H03M13/61Aspects and characteristics of methods and arrangements for error correction or error detection, not provided for otherwise
    • H03M13/615Use of computational or mathematical techniques
    • H03M13/617Polynomial operations, e.g. operations related to generator polynomials or parity-check polynomials
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0045Arrangements at the receiver end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0057Block codes

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Error Detection And Correction (AREA)
  • Detection And Correction Of Errors (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)

Abstract

一种用于计算与生成多项式和数据流长度无关的循环冗余校验码(CRC)的排列演算方法,其能够在数字应用中用一个时钟周期计算时延来实现。该方法允许信息序列和相应生成多项式被排列在一个转换表中。

Description

一种用于循环冗余校验的排列演算方法
技术领域
本发明涉及数字数据处理中的错误修正领域,更具体而言,涉及一种演算方法,用于生成***来计算与生成多项式和数据流长度无关的CRC。
背景技术
错误修正技术和架构在数字数据处理和通信***中是众所周知的,数字数据处理和通信***包括具有诸如基于磁性、光学或半导体存储器的数据存储子***的***。通过使用编码器电路构建一些“冗余”的m位错误校验码,在数学上特征化所选数据块中的信息,检测并在可能的情况下纠正错误数据已经被实现。然后将错误校验码附加到数据块并通过通信信道传送。当数据块被接收或者稍后从存储器中取回时,通过使用这些附加的错误校验码来评估数据的准确性或可靠性。
循环冗余校验(CRC)是一种经典错误检测机制,其在本领域中众所周知并且在许多应用中用作从传输信息流中检测错误的手段。它的普遍接受是因为其实现简单,其可以被用来编码到要发送的信息流中,并随后在接收端进行校验。
利用多项式算法进行CRC计算,演算法的基本原理是:假设发送端和接收端都相互确认使用同一个生成多项式,发送信息流(也称为封包或帧),该生成多项式本质上是用于构造和验证数据流的错误校验码(上下文中的CRC,也被称为校验和)的信息序列,藉此通过将数据流除以所选择生成多项式执行多项式除法来生成错误校验码的计算。
在现有技术中,为了优化错误校验码的计算速度,一些方法选择了推导出对于具有固定数据宽度的特定生成多项式有效的布尔或者逻辑表达式的解决方案,而其他方法优化了使用LFSR(线性反馈移位寄存器)的想法,但不是单个位移位,而是每个时钟周期可以移位多个位或字节,然而,这因此给演算法增加了额外的规则。更进一步而言,现有技术提出的一些方法试图通过检查具体信息流的未改变部分来优化执行CRC的操作,而另一些方法则通过基于信息包片段计算部分余数来尝试改进方法。
发明内容
本发明提供了一种用于执行并行循环冗余校验(CRC)的排列演算方法,该方法包括以下步骤:(i)考虑生成多项式g(x)=gk-1xk-1+gk-2xk-2+gk-2xk-2+...g0和f(x)=m(x)xk-1+c(x);和m(x)=mL-1xL-1+mL-2xL-2+mL-2xL-2+…mO;(ii)将f(x)和g(x)转换成表格作为彼此的函数;(iii)考虑k=7和L=7的示例性情况,获得fn-1=A,fn-1=A+B,fn-1=A+B+C,...f2=E+F+G,f1=F+G,f0=G,其中A、B、C...G是除数系数,以及(iv)获得ck-2=fk-2,ck-2=fk-2…c1=f1,c0=f0
本发明的一个目的是提供一种排列演算方法,该方法计算在循环冗余校验中使用的校验和,校验和是通用的并且与生成多项式和数据流的长度无关,该方法在数字逻辑应用中实现,该方法仅受最慢合成组合逻辑路径的传播延迟所限制并且通常在单个***时钟周期的时间段内计算。
本发明的另一个目的是提供一种计算在循环冗余校验中使用的校验和的排列演算方法,其中信息序列和相应生成多项式被转换成表格以简化该方法在合成逻辑中的实现和应用。
本领域技术人员在结合附图考虑优选实施例的以下详细描述的情况下将更充分地理解和领会本发明的这些和其他目的,方面,优点以及特征。
附图说明
应当理解提供的附图仅用于说明的目的,并不意图定义本发明的局限。附图显示本发明的优选实施例,其中:
图1根据本发明显示包含7位数据流和7位生成多项式的转换表。
图2根据本发明显示示例性CRC校验和计算。
图3显示使用传统方法生成多项式G(x)=x5+x2+1的USB CRC5实现作为LFSR。
具体实施方式
利用多项式算法进行CRC计算,演算法的基本原理是假设发送端和接收端都使用相同的生成多项式序列,在发送信息流(也称为封包或帧)之前,通过多项式除法对选定生成多项式进行计算。多项式除法结果的余数被附加到要发送的原始信息封包。因此,当信息被发送并且被接收端接收时,通过对接收到的信息包执行相同的多项式除法并检查结果余数是否等于零来进行验证,因此在当余数不等于零的情形时容易确定错误。
在本发明中,采用该方法来提供一种计算在CRC中使用的校验和的排列演算方法。关于数学语境,以上公开可以通过以下描述来解释。
假设数据流表示为m(x),其系数为mL-1,mL-2...,并且每个多项式阶次表示为xn-1,其中n是多项式的次数,范围从{0,n-1},那么数据流能够表达为:
m(x)=mL-1xL-1+mL-2xL-2+mL-2xL-2+...m0
其中L是数据包的长度。
另外,生成多项式能够类似地表示为:
g(x)=gk-1xk-1+gk-2xk-2+gk-2xk-2+...g0
其中k是生成多项式的长度。在本发明中,所计算的CRC校验和表示为:
c(x)=ck-2xk-2+ck-2xk-3+ck-4xk-4+...c0
在CRC被计算出并且附加到m(L)之后,被传送的最终信息帧表示为:
f(x)=m(x)xk-1+c(x)
且令q(x)为数据流(添加了k-1位)与生成多项式的商,则m(x)可以重写为:
m(x)xk-1=g(x)q(x)+c(x)
由以下等式推导出解法:
在现有技术中,图2显示如何实现c(x),并且可以看出,目前的多项式除法推断需要保留关于过去的信息,以便将其推进并且最终达到作为余数的结果值。在数字逻辑***中,多个线性反馈移位寄存器(LFSR)中的每一个对应于与生成多项式相关的多项式次数直到最高次数,多个线性反馈移位寄存器在生成多项式的次数为1的地方与额外的异或(XOR)逻辑逐级串联。在图3中显示其示例。
因此,为了在接收端侧计算给定发送流的CRC,需要最少k-1个时钟周期(其中k-1是与生成多项式相关的最高次数)。
图1根据本发明显示将7位数据流和7位生成多项式示例性转换为表格。如图所示,本发明所述转换表的数据流加上CRC校验和(f(x):f0,f1,f2,f3...f10,f11,f12),除以生成多项式序列(g(x):g0,g1...g5,g6),生成除数系数A、B...F、G。根据本发明,除数系数被用来计算CRC序列。
图2所示,额外添加了0000的数据流1100100111对多项式序列10101或x4+X2+1执行除法。在本优选实施例中,底部的余数将替换附加到数据流的额外0000作为CRC校验和。
在本发明的优选实施例中,为了有效地实现演算方法,如图1所示,f(x)和g(x)被转换为表格作为彼此的函数。以L=7和k=7为例,其中推断空白表格的值为空。在进行变换之后,q(x)的数学意义变得没有意义,并且可以看出生成系数A、B、C...F、G,并且将这些系数命名为除数系数。
考虑一种特例,其中生成多项式使得从0次到6次中第k次的所有系数全部为1,令n是数据流的长度加上CRC校验和的长度(L+(k-1)),可以推导出来:
fn-1=A,fn-1=A+B,fn-1=A+B+C...f2=E+F+G,f1
=F+G,f0=G
因此,
ck-2=fk-2,ck-2=fk-2…c1=f1,c0=f0
如果生成多项式不是特例,随着除数系数行的移位,则上面的推导将需要基于生成多项式的行标的额外乘法因数,如图1所示。
根据本发明,所公开的演算方法生成与数据流或生成多项式长度无关的CRC校验和的***,该***通常在一个时钟周期内计算并且仅由最慢合成组合逻辑路径的传播延迟所限制。生成的***通过将数据序列对可配置生成多项式执行多项式除法来确定最终余数,而不需要知道关于过去的信息或实现需要存储的反馈。本发明提供了一种新颖的方法,通过假定余数为零来确定执行多项式除法结果的商的系数,推断出整个商的剩余k-1位是多项式除法的余数。
因此,对于本领域技术人员显而易见的是,在不脱离本发明构思的情况下,可以进行更多修改。因此,除了所附权利要求的精神之外,本发明不受限制。

Claims (5)

1.一种用于执行并行循环冗余校验(CRC)的排列演算方法,其特征在于,包括以下步骤:(i)考虑生成多项式g(x)gk-1xk-1+gk-2xk-2+gk-2xk-2+...g0、和∫(x)=m(x)xk-1+c(x);和m(x)=mL-1xL-1+mL-2xL-2+mL-2xL-2+...m0;(ii)将f(x)和g(x)转换成表格作为彼此的函数;(iii)考虑k=7和L=7的示例性情况,获得fn-1=A,fn-1=A+B,fn-1=A+B+C...f2=E+F+G,f1=F+G,f0=G,其中A、B、C...G是除数系数,以及(iv)获得
ck-2=fk-2,ck-2=fk-2...c1=f1,c0f0
2.根据权利要求1所述的排列演算方法,其特征在于,在步骤(iii)中,如果生成多项式g(x)的系数不全部等于1,则上述推导需要基于生成多项式的除数系数的额外乘法因数。
3.根据权利要求1所述的排列演算方法,其特征在于,通过使用权利要求1的步骤(iii)所能实现的数学公式,除数系数A、B...F、G用于从数据流获得对生成多项式序列的CRC校验和。
4.根据权利要求1所述的排列演算方法,其特征在于,所述演算方法与生成多项式和数据流的长度无关。
5.根据权利要求1所述的排列演算方法,其特征在于,在数字逻辑应用中实现的所述演算方法在速度上仅受最慢合成的组合逻辑路径的传播延迟所限制,而具有一个***时钟周期的标准时延。
CN201580080126.7A 2015-05-20 2015-05-20 一种用于循环冗余校验的排列演算方法 Pending CN107667475A (zh)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/SG2015/050119 WO2016186571A1 (en) 2015-05-20 2015-05-20 A method of arrangement of an algorithm in cyclic redundancy check

Publications (1)

Publication Number Publication Date
CN107667475A true CN107667475A (zh) 2018-02-06

Family

ID=57318907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201580080126.7A Pending CN107667475A (zh) 2015-05-20 2015-05-20 一种用于循环冗余校验的排列演算方法

Country Status (8)

Country Link
US (1) US10623018B2 (zh)
JP (1) JP2018515985A (zh)
KR (1) KR102353983B1 (zh)
CN (1) CN107667475A (zh)
DE (1) DE112015006550T5 (zh)
IL (1) IL255381B (zh)
MY (1) MY185222A (zh)
WO (1) WO2016186571A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116861493B (zh) * 2023-08-31 2024-03-29 上海芯联芯智能科技有限公司 一种校验码生成方法、处理器及电子设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1411630A (zh) * 2000-02-17 2003-04-16 模拟装置公司 用于生成循环余数核对代码以及生成其他基于余数的编码的方法、设备和产品
CN1431594A (zh) * 2003-01-27 2003-07-23 西安电子科技大学 一种多通道多位并行计算crc码的方法
CN101783688A (zh) * 2010-03-05 2010-07-21 苏州和迈微电子技术有限公司 一种64位并行多模式crc码生成电路的设计方法

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0840462B1 (en) * 1996-10-29 2004-12-15 International Business Machines Corporation A method and apparatus for a two-step calculation of CRC-32
US7257257B2 (en) * 2003-08-19 2007-08-14 Intel Corporation Method and apparatus for differential, bandwidth-efficient and storage-efficient backups
US7181671B2 (en) * 2003-09-23 2007-02-20 Macronix International Co., Ltd. Parallelized CRC calculation method and system
US7219293B2 (en) * 2003-12-17 2007-05-15 Macronix International Co., Ltd. High performance CRC calculation method and system with a matrix transformation strategy
US8341510B2 (en) * 2007-06-22 2012-12-25 Sony Corporation CRC generator polynomial select method, CRC coding method and CRC coding circuit
US8185811B2 (en) * 2007-08-17 2012-05-22 Kan Ling Capital, L.L.C. Robust joint erasure marking viterbi algorithm decoder
JP4831018B2 (ja) * 2007-08-28 2011-12-07 日本電気株式会社 並列巡回符号生成装置および並列巡回符号検査装置
US9311185B2 (en) * 2009-10-30 2016-04-12 Cleversafe, Inc. Dispersed storage unit solicitation method and apparatus
US8782227B2 (en) * 2010-06-22 2014-07-15 Cleversafe, Inc. Identifying and correcting an undesired condition of a dispersed storage network access request

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1411630A (zh) * 2000-02-17 2003-04-16 模拟装置公司 用于生成循环余数核对代码以及生成其他基于余数的编码的方法、设备和产品
CN1431594A (zh) * 2003-01-27 2003-07-23 西安电子科技大学 一种多通道多位并行计算crc码的方法
CN101783688A (zh) * 2010-03-05 2010-07-21 苏州和迈微电子技术有限公司 一种64位并行多模式crc码生成电路的设计方法

Also Published As

Publication number Publication date
US10623018B2 (en) 2020-04-14
KR102353983B1 (ko) 2022-01-20
DE112015006550T5 (de) 2018-02-15
MY185222A (en) 2021-04-30
IL255381B (en) 2021-06-30
US20180131388A1 (en) 2018-05-10
IL255381A0 (en) 2017-12-31
KR20180008484A (ko) 2018-01-24
JP2018515985A (ja) 2018-06-14
WO2016186571A1 (en) 2016-11-24

Similar Documents

Publication Publication Date Title
US8468439B2 (en) Speed-optimized computation of cyclic redundancy check codes
US9823960B2 (en) Apparatus and method for parallel CRC units for variably-sized data frames
CN101946230B (zh) 用于检测和校正所接收的符号串中的定相突发差错、删除、符号差错和位差错的方法和***
JP2006244259A (ja) 誤りバイト数を制限したバイト内複数スポッティバイト誤り訂正・検出方法及び装置
RU2010100829A (ru) Способы и устройство для вычисления crc для множества кодовых блоков в системе связи
CN110071727B (zh) 编码方法、译码方法、纠错方法及装置
JPS59124011A (ja) 多数バイトエラ−訂正システム
JP2019110522A (ja) バイト誤り位置信号の決定および使用
CN107239362B (zh) 一种并行crc校验码的计算方法及***
US9471416B2 (en) Partitioned error code computation
US7539918B2 (en) System and method for generating cyclic codes for error control in digital communications
JP2008011025A (ja) 巡回冗長検査のための剰余計算装置
Wang et al. Reliable and secure memories based on algebraic manipulation correction codes
JP2009094605A (ja) 符号誤り検出装置および誤り検出符号生成装置
US7216285B2 (en) System and method for generating cyclic redundancy check
Morii et al. Error-trapping decoding for cyclic codes over symbol-pair read channels
CN107667475A (zh) 一种用于循环冗余校验的排列演算方法
US7299398B2 (en) Data generating method for forming desired CRC code
CN108628698B (zh) 计算crc编码的方法和装置
CN103151078A (zh) 一种存储器检错纠错码生成方法
US11362679B2 (en) Method and apparatus for generating redundant bits for error detection
CN103916138B (zh) 一种钱搜索电路及基于该钱搜索电路的ecc解码装置及方法
CN111130562A (zh) Crc并行计算方法及***
JP2015019276A (ja) 記憶装置、crc生成装置およびcrc生成方法
JP2002261624A (ja) 巡回冗長検査演算方法及び巡回冗長検査演算回路

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180206

RJ01 Rejection of invention patent application after publication