JPH08330976A - Method and circuit for crc code operation - Google Patents

Method and circuit for crc code operation

Info

Publication number
JPH08330976A
JPH08330976A JP7130729A JP13072995A JPH08330976A JP H08330976 A JPH08330976 A JP H08330976A JP 7130729 A JP7130729 A JP 7130729A JP 13072995 A JP13072995 A JP 13072995A JP H08330976 A JPH08330976 A JP H08330976A
Authority
JP
Japan
Prior art keywords
circuit
data
word
crc code
polynomial
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.)
Granted
Application number
JP7130729A
Other languages
Japanese (ja)
Other versions
JP2822928B2 (en
Inventor
Satoshi Kamiya
聡史 神谷
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP7130729A priority Critical patent/JP2822928B2/en
Publication of JPH08330976A publication Critical patent/JPH08330976A/en
Application granted granted Critical
Publication of JP2822928B2 publication Critical patent/JP2822928B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Detection And Correction Of Errors (AREA)
  • Error Detection And Correction (AREA)

Abstract

PURPOSE: To increase the operation processing speed by re-expanding parallel input data and performing partial operation of division by pipeline processing with respect to operation or CRC(cyclic redundancy check) based on parallel input data and suppressing the increase of the number of circuit stages in an exclusive OR circuit network accompanied with parallel expansion. CONSTITUTION: Data inputted from an input terminal 10 is expanded into two in the unit of words by an expansion circuit 6, and a CRC code for input data is calculated by two first partial operation circuits 2 and one second partial operation circuit 3. At the time of generation of the CRC code, the CRC code is added to the last data word by a selector circuit 4, and data and the CRC code are outputted from an even word output terminal 15 and an add word output terminal 16. At the time of check of the CRC code, it is discriminated whether data error is detected or not by a discrimination circuit 5 after input of all of data; and if the error is detected, a signal in the high level is outputted to an output terminal 17 of the discrimination circuit 5.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、ディジタルデータの誤
り検出用符号として用いられているCRC(Cyclic Red
undancy Check :巡回冗長検査)符号の生成および検査
方法ならびにCRC符号演算回路に利用する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a CRC (Cyclic Red) used as a code for error detection of digital data.
undancy Check: Used for a method of generating and checking a code and a CRC code operation circuit.

【0002】本発明は、データ入力のクロック速度を高
速化するとともに、LSIによる集積化をはかることが
できるCRC符号演算方法および回路に関する。
The present invention relates to a CRC code calculation method and circuit which can increase the clock speed of data input and can be integrated by an LSI.

【0003】[0003]

【従来の技術】ディジタルデータの誤り検出用符号とし
てCRC符号が通信やディジタル記録の分野で広く用い
られている。
2. Description of the Related Art As a code for error detection of digital data, a CRC code is widely used in the fields of communication and digital recording.

【0004】CRC符号は、情報信号を多項式表現した
情報多項式を生成多項式で除算したときの剰余として与
えられる。mビットのCRC符号はm次の生成多項式G
(x)を用いることにより得られる。CRC符号の検査
原理は、情報信号がk−1次の多項式で表現されている
際に、m+kビットのコードで与えられるxの(m+k
−1)次の多項式F(x)がG(x)で割り切れるよう
に構成しておき、符号多項式F(x)を受信した際にF
(x)がG(x)で割り切れるか否かを検査するもので
ある。
The CRC code is given as a remainder when an information polynomial in which an information signal is represented by a polynomial is divided by a generator polynomial. An m-bit CRC code is an m-th order generator polynomial G
It is obtained by using (x). The check principle of the CRC code is that when the information signal is expressed by a polynomial of k−1 degree, (m + k) of x given by a code of m + k bits.
-1) The following polynomial F (x) is configured to be divisible by G (x), and when the code polynomial F (x) is received, F
It is to check whether (x) is divisible by G (x).

【0005】このCRC符号は巡回符号であるため、生
成多項式が定まればシフトレジスタと排他的論理和回路
を用いたハードウェアにて構成することが可能である。
また、データ列を並列に展開することによって演算速度
を向上させることが可能である。
Since this CRC code is a cyclic code, it can be constructed by hardware using a shift register and an exclusive OR circuit if the generator polynomial is determined.
Further, it is possible to improve the calculation speed by expanding the data string in parallel.

【0006】従来のデータ並列展開型CRC演算回路の
一例が、特開平4−284541号公報に記載されてい
る。この公報に記載されたCRC演算回路は、整数バイ
ト単位のパラレルデータを剰余生成回路に順次入力し
て、生成多項式でパラレルのまま割り算を施して剰余を
算出している。並列展開数は生成多項式の次数と同等の
場合と、半分の場合とについて言及している。
An example of a conventional data parallel expansion type CRC arithmetic circuit is described in Japanese Patent Application Laid-Open No. 4-284541. The CRC calculation circuit described in this publication sequentially inputs parallel data in units of integer bytes to a remainder generation circuit, and divides the parallel in a generator polynomial to calculate the remainder. The case where the number of parallel expansions is equal to the order of the generator polynomial and the case where it is half is mentioned.

【0007】図5は従来のデータ並列展開型CRC演算
回路構成の一例を示すブロック図である。ここでは生成
多項式G(x)が、 G(x)= x32+x26+x23+x22+x16+x12+x
11+x10+x8 +x7 +x5 +x4 +x2 +x+1 であり、32パラレルに並列展開した場合の一般的な例
が示されている。
FIG. 5 is a block diagram showing an example of a conventional data parallel expansion type CRC arithmetic circuit configuration. Here is generator polynomial G (x), G (x) = x 32 + x 26 + x 23 + x 22 + x 16 + x 12 + x
11 + x is 10 + x 8 + x 7 + x 5 + x 4 + x 2 + x + 1, common example in the case of parallel development in 32 parallel is shown.

【0008】まずCRC演算の基本構成について説明す
る。いま、A(x)、R(x)を、 A(x):情報多項式(kビット) R(x):冗長ビット多項式(mビット) とするとき、A(x)にR(x)を付加してk+mビッ
トの符号F(x)を構成する。このときの生成多項式G
(x)と、A(x)、R(x)、F(x)の関係は、 xm A(x)+R(x)=G(x)・Q(x)=F
(x) となる。ここで、Q(x)はxm A(x)をG(x)で
割ったときの商であり、R(x)はそのときの剰余とな
っている。
First, the basic structure of the CRC calculation will be described. When A (x) and R (x) are A (x): information polynomial (k bits) R (x): redundant bit polynomial (m bits), R (x) is A (x) A code F (x) of k + m bits is added to form the code. Generator polynomial G at this time
The relationship between (x) and A (x), R (x), F (x) is x m A (x) + R (x) = G (x) .Q (x) = F
(X). Here, Q (x) is the quotient when x m A (x) is divided by G (x), and R (x) is the remainder at that time.

【0009】このCRC演算を並列展開して行う方法に
ついて説明する。ここでは、A(x)のビット数がnワ
ード、すなわち32nビット(nは1以上の自然数)で
あり、並列展開数を32とする。
A method of expanding the CRC calculation in parallel will be described. Here, the number of bits of A (x) is n words, that is, 32n bits (n is a natural number of 1 or more), and the number of parallel expansions is 32.

【0010】1ワードのデータとしてw(x)を考え
る。w(x)は〔数1〕で示す。
Consider w (x) as 1-word data. w (x) is shown in [Equation 1].

【0011】[0011]

【数1】 ここでx32w(x)をG(x)で割ったときの剰余Rw
(x)を求める。Rw (x)は〔数2〕に示す。
[Equation 1] Here, the remainder R w when x 32 w (x) is divided by G (x)
Find (x). R w (x) is shown in [Equation 2].

【0012】[0012]

【数2】 w(x)、Rw (x)の係数を成分とする列ベクトルを
wとRw とする。
[Equation 2] The column vectors having the coefficients of w (x) and Rw (x) as components are w and Rw .

【0013】w=[w0 1 …w32T 、 Rw =[Rw,0 w,1 …Rw,31T (Tは転置行列を
示す) CRC演算をシリアルで行う場合の、1クロックにおけ
る各フリップフロップの状態遷移を示す行列をTs とす
ると〔数3〕のように表現できる。
W = [w 0 w 1 ... W 32 ] T , R w = [R w, 0 R w, 1 ... R w, 31 ] T (T represents transposed matrix) When CRC operation is performed serially If T s is a matrix showing the state transition of each flip-flop in one clock, it can be expressed as in [Equation 3].

【0014】[0014]

【数3】 ベクトルwとベクトルRw の関係はM=Ts 32で定まる
変換行列Mによって次のうに与えられる。
(Equation 3) The relationship between the vector w and the vector R w is given by the transformation matrix M determined by M = T s 32 .

【0015】Rw =Mw ここで、A(x)をワード(32ビット)単位に見ると
〔数4〕のようになる。
R w = Mw Here, when A (x) is viewed in word (32 bits) units, it becomes as shown in [Equation 4].

【0016】[0016]

【数4】 従って、x32A(x)をG(x)で割った剰余R(x)
は行列表現を用いると、〔数5〕のようなベクトルRと
なる。
[Equation 4] Therefore, the remainder R (x) obtained by dividing x 32 A (x) by G (x)
Using a matrix expression, becomes a vector R as in [Equation 5].

【0017】[0017]

【数5】 ここで、図5に示される並列展開型のCRC演算回路に
ついて説明する。このCRC演算回路は、32ビット幅
(ワード)のラッチ回路33、34、フリップフロップ
9、ビット毎の排他的論理和回路20、排他的論理和回
路網23、データゲート回路32によって構成される。
(Equation 5) Here, the parallel expansion type CRC arithmetic circuit shown in FIG. 5 will be described. This CRC calculation circuit is composed of latch circuits 33 and 34 having a 32-bit width (word), flip-flops 9, an exclusive OR circuit 20 for each bit, an exclusive OR circuit network 23, and a data gate circuit 32.

【0018】次に、CRC符号生成時の動作について説
明する。まず、ラッチ回路33、34に初期化する。ク
ロックに同期して32ビット単位(ワード単位)にデー
タが入力端子28より入力される。排他的論理和回路2
0と、排他的論理和回路網23において、入力されたデ
ータについて逐次剰余計算を行う。最終データワードが
入力され、排他的論理和回路網23の出力をラッチ回路
34がラッチした時点で、ラッチ回路34の出力にCR
C符号が現れる。セレクタ回路4を切り替えることによ
り、最終データワードに続けて、次のクロックでCRC
符号を出力端子29より出力する。
Next, the operation at the time of generating the CRC code will be described. First, the latch circuits 33 and 34 are initialized. Data is input from the input terminal 28 in 32-bit units (word units) in synchronization with the clock. Exclusive OR circuit 2
0 and the exclusive OR circuit network 23 sequentially calculates the remainder for the input data. When the final data word is input and the output of the exclusive OR network 23 is latched by the latch circuit 34, CR is output to the output of the latch circuit 34.
The C code appears. By switching the selector circuit 4, the CRC is performed at the next clock after the last data word.
The code is output from the output terminal 29.

【0019】CRC符号による検査時の動作について
は、生成時と同様に初期化後データを入力する。最終デ
ータワードが入力された時点で、ラッチ回路34の出力
にCRC符号があらわれる。この符号値と、伝送されて
きてラッチ回路33から出力されるCRC符号とを比較
器30にて比較することにより判定する。
Regarding the operation at the time of checking by the CRC code, the data after initialization is input as in the case of generation. A CRC code appears in the output of the latch circuit 34 when the final data word is input. The comparator 30 compares this code value with the CRC code transmitted and output from the latch circuit 33 to make a determination.

【0020】[0020]

【発明が解決しようとする課題】図5に示した並列展開
型のCRC演算回路が正常に動作するためには、クロッ
クが入力されてから排他的論理和回路20および排他的
論理和回路網23による遅延が1クロック未満でなけれ
ばならない。しかし、排他的論理和回路20および排他
的論理和回路網23がCRC演算を一度に行うために
は、多段に接続された排他的論理和回路に信号を通過さ
せる必要がある。図5に示した例では、最大で5段の排
他的論理和回路を通過する信号線が存在する。そのた
め、その信号線の部分が回路上のクリティカルパスとな
り、クロック速度の上限を決めてしまう。
In order for the parallel expansion type CRC arithmetic circuit shown in FIG. 5 to operate normally, the exclusive OR circuit 20 and the exclusive OR network 23 after the clock is input. Must be less than one clock. However, in order for the exclusive OR circuit 20 and the exclusive OR circuit network 23 to perform the CRC operation at once, it is necessary to pass the signal to the exclusive OR circuits connected in multiple stages. In the example shown in FIG. 5, there is a signal line that passes through the exclusive OR circuits of up to 5 stages. Therefore, the part of the signal line becomes a critical path on the circuit, and the upper limit of the clock speed is determined.

【0021】このように、次数が高く項数の多い生成多
項式を用いたCRC符号の生成および検査方式において
は、従来よりソフトウェア処理による方法が行われてい
る。しかしソフトウェア処理による方法では、一般にデ
ータ処理の速度がハードウェア処理に比べて遅いため高
速処理には不向きである。
As described above, in the CRC code generation and check method using the generator polynomial having a high degree and a large number of terms, a software processing method has been conventionally used. However, the software processing method is generally unsuitable for high-speed processing because the speed of data processing is slower than that of hardware processing.

【0022】本発明は、上述した課題を解決するもの
で、次数が高く項数の多い生成多項式によるCRC演算
方法において、従来より行われていたソフトウェア処理
による方法に対し、ハードウェア処理による高速処理を
行うことができ、回路構成上高速動作を可能にし集積化
を容易に行うことができるCRC演算方法および回路を
提供することを目的とする。
The present invention solves the above-mentioned problems, and in a CRC calculation method by a generator polynomial having a high degree and a large number of terms, a high-speed processing by hardware processing is performed as compared with a conventional software processing method. It is an object of the present invention to provide a CRC calculation method and a circuit which can perform high speed operation in terms of circuit configuration and can be easily integrated.

【0023】[0023]

【課題を解決するための手段】本発明は、並列入力デー
タによるCRCの演算を並列入力データを再展開し、割
り算の部分演算をパイプライン処理によって行い、並列
展開にともなう排他的論理和回路網内の回路段数の増加
を抑制し演算処理を高速化するとこを特徴とする。
DISCLOSURE OF THE INVENTION According to the present invention, a CRC operation based on parallel input data is re-expanded in parallel input data, and a partial operation of division is performed by pipeline processing. The feature is that the increase in the number of circuit stages in the inside is suppressed and the arithmetic processing is speeded up.

【0024】すなわち、本発明の第一の観点は、データ
多項式に対して生成多項式による割算を並列演算により
行いその剰余を算出するCRC符号演算方法において、
前記データ多項式が、1クロック信号に同期して読出さ
れたxビット幅のワードを単位としてさらに複数iワー
ド(x×i、iは2以上の自然数)に並列展開されたこ
とを特徴とする。
That is, a first aspect of the present invention is, in a CRC code operation method for calculating a remainder by dividing a data polynomial by a generator polynomial by parallel operation,
It is characterized in that the data polynomial is further expanded in parallel into a plurality of i words (x × i, i is a natural number of 2 or more) in units of x-bit wide words read in synchronization with one clock signal.

【0025】前記xは生成多項式の次数mに等しく設定
され、前記複数iワードに並列展開してできるj番目
(jは1以上の自然数)のワード列(第i×(j−1)
+1ワード(mビット幅)から第i×jワードまで)と
j+1番目のワード列(第i×(j+1)ワードから第
i×(j+1)ワードまで)について、第i×(j−
1)+hワード(hは1≦h≦iを満たす自然数)を係
数に持つ符号多項式に次数m×iのべき数を乗じた後に
生成多項式によって除算して剰余を算出し、この剰余と
第i×j+hワードを係数に持つ符号多項式との和に次
数m×iのべき数を乗じた後に生成多項式によって除算
して剰余を算出する操作を1番目からi番目まで各ワー
ド行について分離して独立に行い、上記操作を最終デー
タワードを入力するまで繰り返し、最終データワードの
入力後に1番目からi番目までの各ワード行の剰余項を
用いて、全データワードによる符号多項式に対する生成
多項式の剰余を算出することが望ましい。
The x is set equal to the degree m of the generator polynomial, and the j-th (j is a natural number of 1 or more) word sequence (i × (j−1)) formed by parallel expansion into the plurality of i words.
For the +1 word (m-bit width) to the i × j word) and the j + 1th word string (i × (j + 1) word to i × (j + 1) word), the i × (j−
1) + h words (where h is a natural number satisfying 1 ≦ h ≦ i) are multiplied by a power polynomial of degree m × i and then divided by a generator polynomial to calculate a remainder. The operation of multiplying the sum with a code polynomial having × j + h words as a coefficient by a power of degree m × i and then dividing by the generator polynomial to calculate the remainder is independent for each word row from the 1st to the i-th row. Then, the above operation is repeated until the final data word is input, and after the final data word is input, the remainder of the generator polynomial for the code polynomial for all the data words is used by using the remainder term of each word row from the 1st to the i-th. It is desirable to calculate.

【0026】本発明の第二の観点は、CRC符号演算回
路において、入力端子(10)と、この入力端子にクロ
ック信号に同期して入力するxビット幅の並列データを
ワード単位にi個(iは2以上の自然数)に展開する展
開回路(6)と、この展開回路の出力データをi個並列
にそれぞれ演算する演算回路(2、3)とを備えたこと
を特徴とする。
A second aspect of the present invention is, in a CRC code arithmetic circuit, an input terminal (10) and i pieces of x-bit-width parallel data input to this input terminal in synchronization with a clock signal in word units ( i is an expansion circuit (6) that expands to a natural number of 2 or more, and an operation circuit (2, 3) that operates i output data of the expansion circuit in parallel.

【0027】前記演算回路は、i個並列に設けられ各ワ
ードの剰余を算出する第一部分演算回路(2)と、その
i個の第一部分演算回路が出力する剰余を取込み全ワー
ドについての符号多項式に対する生成多項式の剰余を算
出する1個の第二部分演算回路(3)とを含み、前記展
開回路(6)が出力するi個のデータについて前記演算
回路(2、3)の遅延時間に相当する遅延を与える遅延
手段(7)と、この遅延手段の出力データのうちのi番
目のデータに前記演算回路が出力するCRC符号を付加
するセレクタ回路(4)とを備え、前記演算回路(2、
3)の全ワードに対する出力を判定基準と照合して判定
出力(17)を送出する判定回路(5)を備えることが
望ましい。
The arithmetic circuit is a first partial arithmetic circuit (2) which is provided in parallel and calculates the remainder of each word, and the residuals output from the i first partial arithmetic circuits are taken in and code polynomials for all words are taken. Corresponding to the delay time of the arithmetic circuit (2, 3) with respect to i pieces of data output by the expansion circuit (6). And a selector circuit (4) for adding the CRC code output by the arithmetic circuit to the i-th data of the output data of the delay means, the arithmetic circuit (2) ,
It is desirable to provide a decision circuit (5) that outputs the decision output (17) by comparing the outputs for all the words in 3) with the decision standard.

【0028】[0028]

【作用】CRC符号の生成および検査は、ワード(xビ
ット幅)単位のパラレルデータとして読み出したデータ
多項式をさらに複数ワード(x×i、iは2以上の自然
数)に並列展開し、生成多項式による割り算を並列演算
にて行い剰余を算出し、CRC符号の生成および検査を
行う。
The CRC code is generated and tested by expanding the data polynomial read as parallel data in units of words (x bit width) into a plurality of words (x × i, i is a natural number of 2 or more) in parallel, and using the generator polynomial. The division is performed in parallel to calculate the remainder, and the CRC code is generated and checked.

【0029】また、CRC符号の演算は、生成多項式の
次数mの整数倍(m×i、iは2以上の自然数)で展開
したデータに対して、各ワード(mビット幅)毎に割り
算の部分演算を分割しパイプライン処理によって行う。
In addition, the CRC code operation is performed by dividing each word (m bit width) with respect to the data developed by an integer multiple of the degree m of the generator polynomial (m × i, i is a natural number of 2 or more). The partial operation is divided and pipeline processing is performed.

【0030】情報多項式A(x)が〔数6〕で表されて
いるとする。
It is assumed that the information polynomial A (x) is represented by [Equation 6].

【0031】[0031]

【数6】 ここで、ワード展開数をjとしてn+1がjで割り切れ
る(n+1=j×k)とする。
(Equation 6) Here, it is assumed that the number of word expansions is j and n + 1 is divisible by j (n + 1 = j × k).

【0032】CRC符号多項式R(x)は〔数7〕で示
すベクトル表現Rで表現される。
The CRC code polynomial R (x) is expressed by the vector expression R shown in [Equation 7].

【0033】[0033]

【数7】 これにより、Rを求める演算を2種類の演算ブロックに
分割する。1番目は(Mj i (iは0≦i≦k−1を
満たす整数)を乗じる演算ブロックである。2番目はw
u +Mwu-1 +M2 u-2 +…+Mj-1 u-j+1 (uは
j≦u≦n−1を満たす整数)の演算を行うブロックで
ある。
(Equation 7) As a result, the calculation for obtaining R is divided into two types of calculation blocks. The first is an operation block for multiplying (M j ) i (i is an integer satisfying 0 ≦ i ≦ k−1). The second is w
This is a block for performing an operation of u + Mw u-1 + M 2 w u-2 + ... + M j-1 w u-j + 1 (u is an integer satisfying j ≦ u ≦ n−1).

【0034】まず、(Mj i (iは0≦i≦k−1を
満たす整数)を乗じる演算は、Mjに対応する排他的論
理和回路網を用意して、処理データをフィードバックに
よって排他的論理和回路網をi回通過させることにより
処理できる。このとき、各入力ワードwu を添字uにつ
いてjによる剰余類で分類すると、同じ剰余類の入力ワ
ードwu は同一データバス上に存在し、他のデータバス
上には出現しない。したがって、各バス毎に独立にデー
タの処理を行うことが可能となる。また、uが小さい入
力ワードほど入力時刻の早いデータとなっている。した
がって入力端子に到着したデータの順に逐次処理を行え
ばよいことになる。図2は、同じ剰余類の入力ワードw
u について、〔数8〕で表現される計算を行う第一部分
演算回路の構成を示すブロック図である。
First, for the operation of multiplying (M j ) i (i is an integer satisfying 0 ≦ i ≦ k−1), an exclusive OR circuit network corresponding to M j is prepared, and the processed data is fed back. It can be processed by passing the exclusive OR network i times. At this time, when each input word w u is classified by the coset of j with respect to the subscript u, the input words w u of the same coset exist on the same data bus and do not appear on other data buses. Therefore, it is possible to process data independently for each bus. In addition, the smaller the u is, the faster the input time of the data is. Therefore, it is sufficient to sequentially perform the processing in the order of the data that has arrived at the input terminal. FIG. 2 shows the input word w of the same coset
FIG. 11 is a block diagram showing a configuration of a first partial arithmetic circuit that performs a calculation represented by [Equation 8] for u .

【0035】[0035]

【数8】 例としてm=32の場合を示している。演算ブロック2
は、Mj に対応する排他的論理和回路網19、ビット毎
の排他的論理和回路20、ラッチ回路7で構成される。
その演算は以下の手順によって行う。 1:ラッチ回路7を初期化する。 2:入力端子21より入力ワードをラッチ回路7へ入力
する。 3:ラッチ回路7の出力信号を排他的論理和回路網19
内を通過させ演算を行う。 4:その出力ワードと次の入力ワードとのビット毎の排
他的論理和を排他的論理和回路20にてとる。 5:排他的論理和をとったワードをラッチ回路7へ入力
する。 6:2から5までの操作を最終ワードを入力するまで繰
り返すと、出力端子22に演算結果が出力される。
(Equation 8) As an example, the case of m = 32 is shown. Arithmetic block 2
Is composed of an exclusive OR circuit network 19 corresponding to M j , an exclusive OR circuit 20 for each bit, and a latch circuit 7.
The calculation is performed by the following procedure. 1: Initialize the latch circuit 7. 2: Input the input word from the input terminal 21 to the latch circuit 7. 3: The output signal of the latch circuit 7 is set to the exclusive OR circuit network 19
The inside is passed and the calculation is performed. 4: The exclusive OR circuit 20 takes the exclusive OR of the output word and the next input word for each bit. 5: The word obtained by the exclusive OR is input to the latch circuit 7. When the operation from 6: 2 to 5 is repeated until the final word is input, the operation result is output to the output terminal 22.

【0036】次にwu +Mwu-1 +M2 u-2 +…+M
j-1 u-j+1 (uはj≦u≦n−1を満たす整数)の演
算についてはM0 、M、M2 、…Mj-1 に対応する排他
的論理和回路網を用意して、処理データWu はM0 に対
応する各排他的論理和回路網を処理データwu-j+1 はM
j-1 に対応する各排他的論理和回路網を通過させた後に
各ビット毎に排他的論理和をとればよい。
Next, w u + Mw u-1 + M 2 w u-2 + ... + M
j-1 w u-j + 1 (u is an integer satisfying j ≦ u ≦ n-1) M 0 for calculation, M, M 2, an exclusive OR circuitry corresponding to ... M j-1 Prepare the processed data W u for each exclusive OR circuit network corresponding to M 0 , and the processed data w u-j + 1 is M.
After passing through each exclusive OR network corresponding to j-1 , exclusive OR may be taken for each bit.

【0037】また、この発明に係るCRC符号の演算回
路は、生成多項式の次数mの整数倍(m×i、iは2以
上の自然数)で展開したデータに対して、各ワード(m
ビット幅)毎に割り算の部分演算をパイプライン処理に
よって行うことにより、並列展開に伴う排他的論理和回
路網内の回路段数の増加を抑制し、データ入力のクロッ
ク速度の高速化を可能とすることができる。
In addition, the CRC code operation circuit according to the present invention is applied to each word (m) for data expanded by an integer multiple of the degree m of the generator polynomial (m × i, i is a natural number of 2 or more).
By performing a partial operation of division for each (bit width) by pipeline processing, it is possible to suppress an increase in the number of circuit stages in the exclusive OR circuit network due to parallel expansion, and to increase the data input clock speed. be able to.

【0038】すなわち、従来の方式として図5に示した
並列展開型のCRC演算回路を一般化した場合、並列展
開数がmビットのとき最大で log2 m段の排他的論理和
回路を通過する信号線が存在する。この場合、並列展開
数mに対し排他的論理和回路の段数はO( log2 m)の
規模で増加するため、並列展開数を大きくしていくと排
他的論理和回路網における遅延がO( log2 m)の速度
で増加する。従って、クロックが入力されてから排他的
論理回路網による遅延は1クロック未満、という遅延に
関する回路の動作条件のために、並列展開数を大きくす
るとクロック速度の上限が減少してしまう。
That is, when the parallel expansion type CRC arithmetic circuit shown in FIG. 5 is generalized as a conventional method, when the parallel expansion number is m bits, it passes through the exclusive OR circuit of log 2 m stages at the maximum. There is a signal line. In this case, the number of stages of the exclusive OR circuit increases on a scale of O (log 2 m) with respect to the number of parallel expansions m. Therefore, as the number of parallel expansions increases, the delay in the exclusive OR circuit network becomes O (log 2 m). increase at a rate of log 2 m). Therefore, due to the operating condition of the circuit regarding the delay that the delay due to the exclusive logic circuit network is less than one clock after the clock is input, the upper limit of the clock speed decreases when the number of parallel expansions is increased.

【0039】一方、この発明に係るCRC符号の演算回
路のクリティカルパスは、図2における排他的論理和回
路網19の部分に存在する。並列展開数がmビットのと
き、排他的論理和回路20の段数は高々 log2 mであ
る。排他的論理和回路網19の動作クロック速度は、i
ワードに展開しているため、データ入力クロックのi分
の1に低減されている。これより、排他的論理和回路網
19の動作クロック速度が遅延に関する回路の動作条件
を満たすようにワード展開数iを大きくとることによっ
て、従来の方式に比べデータ入力クロックの高速化をは
かることができる。従って、CRC演算処理の高速化が
可能となる。
On the other hand, the critical path of the CRC code arithmetic circuit according to the present invention exists in the portion of the exclusive OR circuit network 19 in FIG. When the number of parallel expansions is m bits, the number of stages of the exclusive OR circuit 20 is at most log 2 m. The operating clock speed of the exclusive OR network 19 is i
Since it is expanded into words, it is reduced to 1 / i of the data input clock. From this, by increasing the word expansion number i so that the operation clock speed of the exclusive OR circuit network 19 satisfies the operation condition of the circuit regarding the delay, the speed of the data input clock can be increased as compared with the conventional method. it can. Therefore, the CRC calculation process can be speeded up.

【0040】[0040]

【実施例】次に、本発明実施例を図面に基づいて説明す
る。
Embodiments of the present invention will now be described with reference to the drawings.

【0041】(第一実施例)図1は本発明第一実施例の
構成を示すブロック図である。
(First Embodiment) FIG. 1 is a block diagram showing the configuration of the first embodiment of the present invention.

【0042】本発明第一実施例におけるCRC符号生成
検査回路18は、入力端子10と、この入力端子10に
クロック信号に同期して入力するxビット幅の並列デー
タをワード単位にi個(iは2以上の自然数)に展開す
る展開回路6と、この展開回路6の出力データをi個並
列にそれぞれ演算する演算回路とを備え、前記演算回路
は、i個並列に設けられ各ワードの剰余を算出する第一
部分演算回路2と、そのi個の第一部分演算回路2が出
力する剰余を取込み全ワードについての符号多項式に対
する生成多項式の剰余を算出する1個の第二部分演算回
路3とを含み、展開回路6が出力するi個のデータにつ
いて第一部分演算回路2および第二部分演算回路3の遅
延時間に相当する遅延を与える遅延手段としてのラッチ
回路7と、このラッチ回路7の出力データのうちのi番
目のデータに第一部分演算回路2および第二部分演算回
路3が出力するCRC符号を付加するセレクタ回路4
と、第一部分演算回路2および第二部分演算回路3の全
ワードに対する出力を判定基準と照合して判定出力を出
力端子17から送出する判定回路5とを備える。
The CRC code generation / inspection circuit 18 in the first embodiment of the present invention includes an input terminal 10 and i pieces (i) of parallel data of x-bit width input to the input terminal 10 in synchronization with a clock signal. Is a natural number greater than or equal to 2), and an arithmetic circuit that arithmetically operates i output data of the expansion circuit 6 in parallel. The arithmetic circuit is provided in parallel and the remainder of each word is provided. And a second partial arithmetic circuit 3 for calculating the remainders of the generator polynomials for the code polynomials for all the words that take in the residuals output from the i first partial arithmetic circuits 2. Including the latch circuit 7 as a delay means for giving a delay corresponding to the delay time of the first partial arithmetic circuit 2 and the second partial arithmetic circuit 3 to the i data output from the expansion circuit 6, and the latch circuit 7. The selector circuit 4 for adding the CRC code first partial operation circuit 2 and the second part calculation circuit 3 outputs the i-th data of the output data of the latch circuit 7
And a decision circuit 5 for comparing the outputs of all the words of the first partial arithmetic circuit 2 and the second partial arithmetic circuit 3 with the criterion and sending the judgment output from the output terminal 17.

【0043】このように構成された本発明第一実施例
は、データ多項式に対して生成多項式による割算を並列
演算により行いその剰余を算出する。この演算の際に前
記データ多項式が、1クロック信号に同期して読出され
たxビット幅のワードを単位としてさらに複数iワード
(x×i、iは2以上の自然数)に並列展開される。ま
た、前記xは生成多項式の次数mに等しく設定され、前
記複数iワードに並列展開してできるj番目(jは1以
上の自然数)のワード列(第i×(j−1)+1ワード
(mビット幅)から第i×jワードまで)とj+1番目
のワード列(第i×(j+1)ワードから第i×(j+
1)ワードまで)について、第i×(j−1)+hワー
ド(hは1≦h≦iを満たす自然数)を係数に持つ符号
多項式に次数m×iのべき数を乗じた後に生成多項式に
よって除算されて剰余が算出され、この剰余と第i×j
+hワードを係数に持つ符号多項式との和に次数m×i
のべき数を乗じた後に生成多項式によって除算して剰余
を算出する操作を1番目からi番目まで各ワード行につ
いて分離して独立に行われ、上記操作を最終データワー
ドを入力するまで繰り返され、最終データワードの入力
後に1番目からi番目までの各ワード行の剰余項を用い
て、全データワードによる符号多項式に対する生成多項
式の剰余が算出される。
In the first embodiment of the present invention thus constructed, the data polynomial is divided by the generator polynomial by parallel operation to calculate the remainder. At the time of this operation, the data polynomial is further expanded in parallel into a plurality of i words (x × i, i is a natural number of 2 or more) in units of a word of x-bit width read in synchronization with one clock signal. The x is set equal to the degree m of the generator polynomial, and the j-th (j is a natural number of 1 or more) word string (i × (j−1) +1 word ( (m-bit width) to the i × j word) and the j + 1th word string (i × (j + 1) word to i × (j +)
1) up to words), a code polynomial having a coefficient of i × (j−1) + h word (h is a natural number satisfying 1 ≦ h ≦ i) is multiplied by a power of degree m × i The remainder is calculated by division, and this remainder and the i × jth
The sum of a code polynomial having + h words as coefficients is added to the degree m × i
The operation of multiplying by the power of and dividing by the generator polynomial to calculate the remainder is independently performed for each word row from the 1st to the i-th row, and the above operation is repeated until the final data word is input. After the input of the final data word, the remainder of the generator polynomial with respect to the code polynomial of all the data words is calculated using the remainder term of each of the first to i-th word rows.

【0044】図1に示す例は、生成多項式G(x)が G(x)= x32+x26+x23+x22+x16+x12+x
11+x10+x8 +x7 +x5 +x4 +x2 +x+1 (次数mが32)であり、1ワードのビット幅が32、
ワード単位での展開数が2の場合を示したものである。
ここで具体的にその動作について説明する。
The example shown in Figure 1, generator polynomial G (x) is G (x) = x 32 + x 26 + x 23 + x 22 + x 16 + x 12 + x
11 + x 10 + x 8 + x 7 + x 5 + x 4 + x 2 + x + 1 (degree m is 32), and the bit width of one word is 32,
This shows the case where the number of expansions in word units is two.
Here, the operation will be specifically described.

【0045】入力端子10から入力したデータは展開回
路6によってワード単位に二つに展開され、二つの第一
部分演算回路2および一つの第二部分演算回路3によっ
て入力データに対するCRC符号が計算される。
The data input from the input terminal 10 is expanded into two in word units by the expansion circuit 6, and the two first partial operation circuits 2 and one second partial operation circuit 3 calculate the CRC code for the input data. .

【0046】CRC符号の演算結果は、展開回路6の偶
数ワード側出力端子11、奇数ワード側出力端子12に
データが出力されてから2クロック後に第二部分演算回
路3から出力される。
The operation result of the CRC code is output from the second partial operation circuit 3 two clocks after the data is output to the even word side output terminal 11 and the odd word side output terminal 12 of the expansion circuit 6.

【0047】CRC符号生成時はセレクタ回路4によっ
て最終データワードにCRC符号が付加されて偶数ワー
ド側出力端子15および奇数ワード側出力端子16から
データおよびCRC符号が出力される。
When the CRC code is generated, the selector circuit 4 adds the CRC code to the final data word, and the even-numbered word side output terminal 15 and the odd-numbered word side output terminal 16 output the data and the CRC code.

【0048】CRC符号検査時は、全データを入力後に
判定回路5によってデータ誤りの可否について判定さ
れ、誤りが検出されれば判定回路5の出力端子17にh
igh信号が出力される。
At the time of CRC code inspection, the decision circuit 5 decides whether or not a data error is possible after inputting all the data, and if an error is detected, the output terminal 17 of the decision circuit 5 is set to h.
The high signal is output.

【0049】ここで、符号長が(2×3)ワード(情報
長(2×3−1)ワード(k=5×32ビット)、CR
C符号1ワード)の場合の動作について説明する。
Here, the code length is (2 × 3) words (information length (2 × 3-1) words (k = 5 × 32 bits), CR
The operation in the case of C code 1 word) will be described.

【0050】CRC符号多項式R(x)のベクトル表現
をRとして、入力される情報多項式A(x)が〔数9〕
で示されるとする。
When the vector expression of the CRC code polynomial R (x) is R, the input information polynomial A (x) is [Equation 9].
Is indicated by.

【0051】[0051]

【数9】 A(x)をワード単位にベクトル表現すると、w0 、w
1 、w2 、w3 、w4 となる。w0 が最初に入力され、
4 の次にCRC符号ワードであるRが最後に入力され
る。
[Equation 9] When A (x) is expressed as a vector in word units, w 0 , w
1 , w 2 , w 3 , w 4 . w 0 is entered first,
After w 4 , the CRC code word R is input last.

【0052】はじめに32ビット幅のラッチ回路7、8
を初期化する。入力データワードw0 、w1 、w2 、w
3 、w4 および未演算のCRC符号ワード(R=0)が
入力データクロックCLK_Hに同期して入力端子10
より入力される。展開回路6ではw0 とw1 、w2 とw
3 、w4 とRが並列展開され、CLK_Hの2分周クロ
ックである演算処理クロックCLK_Lに同期して、w
0 などの偶数ワードは偶数ワード側出力端子11より、
1 などの奇数ワードは奇数ワード側出力端子12より
出力され、各々第一部分演算回路2に入力される。
First, 32-bit wide latch circuits 7 and 8
Is initialized. Input data words w 0 , w 1 , w 2 , w
3 , w 4 and the uncalculated CRC code word (R = 0) are synchronized with the input data clock CLK_H to the input terminal 10
Will be entered more. In the expansion circuit 6, w 0 and w 1 , w 2 and w
3 , w 4 and R are developed in parallel, and w is synchronized with the arithmetic processing clock CLK_L which is a clock obtained by dividing CLK_H by two.
Even words such as 0 are output from the even word side output terminal 11,
The odd-numbered words such as w 1 are output from the odd-numbered word side output terminal 12 and input to the first partial arithmetic circuit 2.

【0053】全ワードが展開回路6の偶数ワード側出力
端子11および奇数ワード側出力端子12より出力され
てから演算処理クロックCLK_Lにおける2クロック
後に第二部分演算回路3の出力にCRC演算結果が出力
される。
The CRC calculation result is output to the output of the second partial arithmetic circuit 3 2 clocks after the arithmetic processing clock CLK_L after all the words are output from the even-numbered word side output terminal 11 and the odd-numbered word side output terminal 12 of the expansion circuit 6. To be done.

【0054】送信時は、遅延用のラッチ回路7でデータ
ワードが2クロック遅延され、データ列内の未演算のC
RC符号ワードがセレクタ回路4にて計算されCRC符
号の結果に置き換えられる。そして偶数ワード側出力端
子15と奇数ワード側出力端子16からタイミングがそ
ろえられてデータおよびCRC符号が出力される。
At the time of transmission, the delay latch circuit 7 delays the data word by 2 clocks, and the uncomputed C in the data string is delayed.
The RC code word is calculated by the selector circuit 4 and replaced with the result of the CRC code. Then, the even-numbered word-side output terminal 15 and the odd-numbered word-side output terminal 16 output the data and the CRC code at the same timing.

【0055】受信時は、CRC符号ワードRには送信側
で計算したCRC演算の結果が格納されている。CRC
符号ワードを含む全データに誤りがなければ、第二部分
演算回路3の出力に0が出力される。したがって、判定
回路5で誤りが検出されれば出力端子17にhigh信
号が出力される。
Upon reception, the CRC code word R stores the result of the CRC calculation calculated on the transmission side. CRC
If there is no error in all the data including the code word, 0 is output to the output of the second partial operation circuit 3. Therefore, if the decision circuit 5 detects an error, a high signal is output to the output terminal 17.

【0056】図2は本発明第一実施例における第一部分
演算回路の構成を示すブロック図である。まず、ラッチ
回路7に保持されていた前データに対するCRC演算の
部分演算が排他的論理和回路網19によって行われる。
入力端子21よりデータワードが入力されると、前デー
タに対するCRC演算の部分演算の結果とのビット毎の
排他的論理和がビット毎の排他的論理和回路20によっ
て計算される。その計算結果が改めてラッチ回路7に保
持される。
FIG. 2 is a block diagram showing the configuration of the first partial arithmetic circuit in the first embodiment of the present invention. First, the partial operation of the CRC operation on the previous data held in the latch circuit 7 is performed by the exclusive OR circuit network 19.
When a data word is input from the input terminal 21, the bitwise exclusive OR of the result of the partial operation of the CRC operation on the previous data is calculated by the bitwise exclusive OR circuit 20. The calculation result is held in the latch circuit 7 again.

【0057】図3は本発明第一実施例における第二部分
演算回路の構成を示すブロック図である。偶数ワード側
入力端子13に入力されたデータに対するCRC演算の
部分演算が排他的論理和回路網23によって行われる。
演算結果と奇数ワード側入力端子14に入力されたデー
タとのビット毎の排他的論理和が排他的論理和回路20
によって計算される。その計算結果がラッチ回路7に保
持される。
FIG. 3 is a block diagram showing the configuration of the second partial arithmetic circuit in the first embodiment of the present invention. The partial operation of the CRC operation on the data input to the even word side input terminal 13 is performed by the exclusive OR circuit network 23.
The exclusive OR for each bit of the operation result and the data input to the odd word side input terminal 14 is the exclusive OR circuit 20.
Calculated by The calculation result is held in the latch circuit 7.

【0058】CRC符号多項式R(x)はベクトル表現
Rを用いると〔数10〕のようになる。
The CRC code polynomial R (x) is as shown in [Equation 10] when the vector expression R is used.

【0059】[0059]

【数10】 第一部分演算回路2内の排他的論理和回路網19はM2
に対応し、〔数11〕のように表される。
[Equation 10] The exclusive OR network 19 in the first partial arithmetic circuit 2 is M 2
And is expressed as in [Equation 11].

【0060】[0060]

【数11】 第二部分演算回路3内の排他的論理和回路網23はMに
対応し、〔数12〕のように表される。
[Equation 11] The exclusive OR circuit network 23 in the second partial operation circuit 3 corresponds to M and is represented by [Equation 12].

【0061】[0061]

【数12】 排他的論理和回路網19、23における排他的論理和の
段数は最大で5段( log2 19=4.25)である。こ
れは図5に示した従来のCRC演算回路と同程度であ
る。したがって、従来型ではデータ入力のクロック周波
数はCRC演算動作のクロック周波数と等しいが、本実
施例では2ワード展開であるのでデータ入力のクロック
周波数を2倍まで上げることが可能である。これにより
CRC演算処理の高速化を図ることができる。
(Equation 12) The maximum number of exclusive ORs in the exclusive OR circuits 19 and 23 is 5 (log 2 19 = 4.25). This is about the same as the conventional CRC calculation circuit shown in FIG. Therefore, in the conventional type, the clock frequency of the data input is equal to the clock frequency of the CRC calculation operation, but in the present embodiment, since the word expansion is performed, the clock frequency of the data input can be doubled. As a result, the CRC calculation process can be speeded up.

【0062】(第二実施例)図4は本発明第二実施例の
構成を示すブロック図である。この例は、ITU−T勧
告I.363のATM Adaption Type5
におけるCRC32の生成検出回路の例を示したもので
ある。生成多項式G(x)は G(x)= x32+x26+x23+x22+x16+x12+x
11+x10+x8 +x7 +x5 +x4 +x2 +x+1 (次数mが32)であり、1ワードのビット幅が32、
ワード単位での展開数が2の場合の例である。
(Second Embodiment) FIG. 4 is a block diagram showing the configuration of the second embodiment of the present invention. This example is based on ITU-T Recommendation I.S. 363 ATM Adaptation Type5
3 shows an example of a generation / detection circuit of CRC32 in FIG. Generator polynomial G (x) G (x) = x 32 + x 26 + x 23 + x 22 + x 16 + x 12 + x
11 + x 10 + x 8 + x 7 + x 5 + x 4 + x 2 + x + 1 (degree m is 32), and the bit width of one word is 32,
In this example, the number of expansions in word units is two.

【0063】ITU−T勧告I.363のCRC32の
計算方法は、次のようになっている。
ITU-T Recommendation I. The calculation method of the CRC32 of 363 is as follows.

【0064】情報多項式(kビット、k=32n、n+
1は12の倍数)をA(x)とする。xk (x31+x30
+…+x+1)を生成多項式G(x)で割ったときの余
りと、x32A(x)を生成多項式G(x)で割ったとき
の余りを加算して、ビット反転をしたものをCRC符号
多項式R(x)とする。
Information polynomial (k bits, k = 32n, n +
1 is a multiple of 12) is A (x). x k (x 31 + x 30
+ ... + x + 1) is divided by the generator polynomial G (x) and the remainder when x 32 A (x) is divided by the generator polynomial G (x) is added, and bit-inverted is CRC. Let the code polynomial R (x).

【0065】この演算方法では、CRC符号生成時は、
A(x)をワード単位に表現した際に最初のワードであ
るw0 をビット反転して演算を開始し、演算終了時に剰
余に対して再度ビット反転を施すことになる。
According to this calculation method, when the CRC code is generated,
When A (x) is expressed in word units, w 0 , which is the first word, is bit-inverted to start the operation, and at the end of the operation, bit inversion is performed again on the remainder.

【0066】また、CRC符号検査時は、やはり最初の
ワードであるw0 をビット反転して演算を開始する。符
号列に誤りがなければ割算終了時に剰余がFFFFFF
FFHとなっている。
When the CRC code is checked, the first word w 0 is bit-inverted, and the operation is started. If there is no error in the code string, the remainder is FFFFFF at the end of division.
It is FFH.

【0067】図4に示す本発明第二実施例は、入力デー
タクロックCLK_Hに同期して動作するラッチ回路7
と展開回路6と、演算処理クロックCLK_Lに同期し
て動作するCRC符号生成検査回路18とにより構成さ
れる。
The second embodiment of the present invention shown in FIG. 4 is a latch circuit 7 which operates in synchronization with the input data clock CLK_H.
The expansion circuit 6 and the CRC code generation / inspection circuit 18 that operates in synchronization with the arithmetic processing clock CLK_L.

【0068】入力端子10より入力したデータは展開回
路6によってワード単位に二つに展開される。最初のデ
ータワードに対してのみビット反転器25によってビッ
ト反転が行われ、二つの第一部分演算回路2と、一つの
第二部分演算回路3によって入力データに対するCRC
符号が計算される。
The data input from the input terminal 10 is expanded into two by word unit by the expansion circuit 6. Only the first data word is bit-inverted by the bit inverter 25, and the two first partial operation circuits 2 and one second partial operation circuit 3 perform CRC on the input data.
The sign is calculated.

【0069】CRC符号の演算結果は、展開回路6の偶
数ワード側出力端子11および奇数ワード側出力端子1
2にデータが出力されてから2クロック後に第二部分演
算回路3から出力される。
The operation result of the CRC code is the even word side output terminal 11 and the odd word side output terminal 1 of the expansion circuit 6.
It is output from the second partial arithmetic circuit 3 two clocks after the data is output to 2.

【0070】CRC符号生成時は演算結果をビット反転
器25によって再度ビット反転し、セレクタ回路4によ
って最終データワードにCRC符号を付加して偶数ワー
ド側出力端子15および奇数ワード側出力端子16から
データおよびCRC符号が出力される。
When the CRC code is generated, the operation result is bit-inverted again by the bit inverter 25, the CRC code is added to the final data word by the selector circuit 4, and the data is output from the even word side output terminal 15 and the odd word side output terminal 16. And the CRC code is output.

【0071】CRC符号検査時は、全データを入力後に
比較器26によってデータ誤りの可否について判定が行
われ、誤りが検出されれば比較器26の出力17にhi
gh信号が出力される。
During CRC code check, the comparator 26 determines whether or not a data error is possible after inputting all the data, and if an error is detected, the output 17 of the comparator 26 is hi.
The gh signal is output.

【0072】[0072]

【発明の効果】以上説明したように本発明によれば、C
RC符号の演算において、ワード単位の並列展開を行っ
たデータに対して、各ワード毎に割算の部分演算をパイ
プライン処理によって行うことにより、並列展開にとも
なう排他的論理和回路網内の回路段数の増加を抑制し、
データ入力のクロック速度を高速化することができ、同
一ブロックへのデータのフィードバックにより、ブロッ
ク個数低減化を図るとともに、LSIによる集積化を行
うことができる。
As described above, according to the present invention, C
In the operation of the RC code, a circuit in the exclusive OR circuit network accompanying the parallel expansion is performed by performing a partial operation of division for each word by pipeline processing on the data subjected to the parallel expansion in word units. Control the increase in the number of steps,
The data input clock speed can be increased, and by feeding back data to the same block, the number of blocks can be reduced and LSI integration can be performed.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明第一実施例の構成を示すブロック図。FIG. 1 is a block diagram showing the configuration of a first embodiment of the present invention.

【図2】本発明第一実施例における第一部分演算回路の
構成を示すブロック図。
FIG. 2 is a block diagram showing the configuration of a first partial arithmetic circuit in the first embodiment of the present invention.

【図3】本発明第一実施例における第二部分演算回路の
構成を示すブロック図。
FIG. 3 is a block diagram showing the configuration of a second partial arithmetic circuit in the first embodiment of the present invention.

【図4】本発明第二実施例の構成を示すブロック図。FIG. 4 is a block diagram showing the configuration of a second embodiment of the present invention.

【図5】従来例におけるデータ並列展開型CRC演算回
路の構成の一例を示すブロック図。
FIG. 5 is a block diagram showing an example of a configuration of a data parallel expansion type CRC arithmetic circuit in a conventional example.

【符号の説明】[Explanation of symbols]

1 CRC符号演算回路 2 第一部分演算回路 3 第二部分演算回路 4 セレクタ回路 5 判定回路 6 展開回路 7、8、33、34 ラッチ回路 9 フリップフロップ 10、21、28 入力端子 11、13、15 偶数ワード側出力端子 12、14、16 奇数ワード側出力端子 17、22、24、29、31 出力端子 18 CRC符号生成検査回路 19、23 排他的論理和回路網 20 排他的論理和回路 25 ビット反転器 26、30 比較器 32 データゲート回路 1 CRC code arithmetic circuit 2 First partial arithmetic circuit 3 Second partial arithmetic circuit 4 Selector circuit 5 Judgment circuit 6 Expansion circuit 7, 8, 33, 34 Latch circuit 9 Flip-flops 10, 21, 28 Input terminals 11, 13, 15 Even number Word side output terminals 12, 14, 16 Odd word side output terminals 17, 22, 24, 29, 31 Output terminals 18 CRC code generation inspection circuit 19, 23 Exclusive OR circuit network 20 Exclusive OR circuit 25 bit inverter 26, 30 comparator 32 data gate circuit

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 データ多項式に対して生成多項式による
割算を並列演算により行いその剰余を算出するCRC符
号演算方法において、 前記データ多項式が、1クロック信号に同期して読出さ
れたxビット幅のワードを単位としてさらに複数iワー
ド(x×i、iは2以上の自然数)に並列展開されたこ
とを特徴とするCRC符号演算方法。
1. A CRC code operation method for calculating a remainder by dividing a data polynomial by a generator polynomial by parallel operation, wherein the data polynomial has an x-bit width read in synchronization with one clock signal. A CRC code calculation method characterized in that it is further expanded in parallel into a plurality of i words (x × i, i is a natural number of 2 or more) in units of words.
【請求項2】 前記xは生成多項式の次数mに等しく設
定され、前記複数iワードに並列展開してできるj番目
(jは1以上の自然数)のワード列(第i×(j−1)
+1ワード(mビット幅)から第i×jワードまで)と
j+1番目のワード列(第i×(j+1)ワードから第
i×(j+1)ワードまで)について、第i×(j−
1)+hワード(hは1≦h≦iを満たす自然数)を係
数に持つ符号多項式に次数m×iのべき数を乗じた後に
生成多項式によって除算して剰余を算出し、この剰余と
第i×j+hワードを係数に持つ符号多項式との和に次
数m×iのべき数を乗じた後に生成多項式によって除算
して剰余を算出する操作を1番目からi番目まで各ワー
ド行について分離して独立に行い、上記操作を最終デー
タワードを入力するまで繰り返し、最終データワードの
入力後に1番目からi番目までの各ワード行の剰余項を
用いて、全データワードによる符号多項式に対する生成
多項式の剰余を算出する請求項1記載のCRC符号演算
方法。
2. The x is set equal to the degree m of the generator polynomial, and the j-th (j is a natural number of 1 or more) word string (i × (j−1)) formed by parallel expansion into the plurality of i words.
For the +1 word (m-bit width) to the i × j word) and the j + 1th word string (i × (j + 1) word to i × (j + 1) word), the i × (j−
1) + h words (where h is a natural number satisfying 1 ≦ h ≦ i) are multiplied by a power polynomial of degree m × i and then divided by a generator polynomial to calculate a remainder. The operation of multiplying the sum with a code polynomial having × j + h words as a coefficient by a power of degree m × i and then dividing by the generator polynomial to calculate the remainder is independent for each word row from the 1st to the i-th row. Then, the above operation is repeated until the final data word is input, and after the final data word is input, the remainder of the generator polynomial for the code polynomial for all the data words is used by using the remainder term of each word row from the 1st to the i-th. The CRC code calculation method according to claim 1, wherein the calculation is performed.
【請求項3】 入力端子(10)と、この入力端子にク
ロック信号に同期して入力するxビット幅の並列データ
をワード単位にi個(iは2以上の自然数)に展開する
展開回路(6)と、この展開回路の出力データをi個並
列にそれぞれ演算する演算回路(2、3)とを備えたこ
とを特徴とするCRC符号演算回路。
3. An input terminal (10) and an expansion circuit (i is a natural number of 2 or more) for expanding, in word units, parallel data of x-bit width input to this input terminal in synchronization with a clock signal. 6) and an arithmetic circuit (2, 3) for arithmetically operating i output data of the expansion circuit in parallel, respectively, a CRC code arithmetic circuit.
【請求項4】 前記演算回路は、i個並列に設けられ各
ワードの剰余を算出する第一部分演算回路(2)と、そ
のi個の第一部分演算回路が出力する剰余を取込み全ワ
ードについての符号多項式に対する生成多項式の剰余を
算出する1個の第二部分演算回路(3)とを含む請求項
3記載のCRC符号演算回路。
4. The arithmetic circuit comprises a first partial arithmetic circuit (2) which is provided in parallel and calculates the remainder of each word, and the residuals output from the i first partial arithmetic circuits are taken for all words. The CRC code operation circuit according to claim 3, further comprising: one second partial operation circuit (3) for calculating a remainder of the generator polynomial with respect to the code polynomial.
【請求項5】 前記展開回路(6)が出力するi個のデ
ータについて前記演算回路(2、3)の遅延時間に相当
する遅延を与える遅延手段(7)と、この遅延手段の出
力データのうちのi番目のデータに前記演算回路が出力
するCRC符号を付加するセレクタ回路(4)とを備え
た請求項4記載のCRC符号演算回路。
5. A delay means (7) for giving a delay corresponding to the delay time of the arithmetic circuit (2, 3) for i data output from the expansion circuit (6), and output data of the delay means. The CRC code operation circuit according to claim 4, further comprising a selector circuit (4) for adding a CRC code output from the operation circuit to the i-th data.
【請求項6】 前記演算回路(2、3)の全ワードに対
する出力を判定基準と照合して判定出力(17)を送出
する判定回路(5)を備えたCRC符号演算回路。
6. A CRC code arithmetic circuit comprising a judgment circuit (5) which compares the outputs of all the words of the arithmetic circuits (2, 3) with a judgment standard and sends a judgment output (17).
JP7130729A 1995-05-29 1995-05-29 CRC code calculation method and circuit Expired - Fee Related JP2822928B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7130729A JP2822928B2 (en) 1995-05-29 1995-05-29 CRC code calculation method and circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7130729A JP2822928B2 (en) 1995-05-29 1995-05-29 CRC code calculation method and circuit

Publications (2)

Publication Number Publication Date
JPH08330976A true JPH08330976A (en) 1996-12-13
JP2822928B2 JP2822928B2 (en) 1998-11-11

Family

ID=15041243

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7130729A Expired - Fee Related JP2822928B2 (en) 1995-05-29 1995-05-29 CRC code calculation method and circuit

Country Status (1)

Country Link
JP (1) JP2822928B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8433974B2 (en) 2009-12-21 2013-04-30 Fujitsu Limited Cyclic redundancy check code generating circuit and cyclic redundancy check code generating method
CN105844901A (en) * 2016-05-23 2016-08-10 光科技股份有限公司 Security energy efficiency monitoring terminal based on tamper-proof technology and monitoring method of security energy efficiency monitoring terminal
CN107451008A (en) * 2017-06-29 2017-12-08 北京邮电大学 A kind of CRC computational methods and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01265332A (en) * 1988-04-18 1989-10-23 Fujitsu Ltd Production of determinant of crc parallel arithmetic circuit
JPH03119835A (en) * 1989-10-03 1991-05-22 Nippon Telegr & Teleph Corp <Ntt> Error correction circuit
JPH04192735A (en) * 1990-11-26 1992-07-10 Nippon Telegr & Teleph Corp <Ntt> Cell synchronizing circuit
JPH04285541A (en) * 1990-11-22 1992-10-09 Planmed Oy Method and device for radiographing
JPH0795096A (en) * 1993-09-20 1995-04-07 Fujitsu Ltd Programmable parallel crc generator

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01265332A (en) * 1988-04-18 1989-10-23 Fujitsu Ltd Production of determinant of crc parallel arithmetic circuit
JPH03119835A (en) * 1989-10-03 1991-05-22 Nippon Telegr & Teleph Corp <Ntt> Error correction circuit
JPH04285541A (en) * 1990-11-22 1992-10-09 Planmed Oy Method and device for radiographing
JPH04192735A (en) * 1990-11-26 1992-07-10 Nippon Telegr & Teleph Corp <Ntt> Cell synchronizing circuit
JPH0795096A (en) * 1993-09-20 1995-04-07 Fujitsu Ltd Programmable parallel crc generator

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8433974B2 (en) 2009-12-21 2013-04-30 Fujitsu Limited Cyclic redundancy check code generating circuit and cyclic redundancy check code generating method
CN105844901A (en) * 2016-05-23 2016-08-10 光科技股份有限公司 Security energy efficiency monitoring terminal based on tamper-proof technology and monitoring method of security energy efficiency monitoring terminal
CN107451008A (en) * 2017-06-29 2017-12-08 北京邮电大学 A kind of CRC computational methods and device

Also Published As

Publication number Publication date
JP2822928B2 (en) 1998-11-11

Similar Documents

Publication Publication Date Title
US4723243A (en) CRC calculation machine with variable bit boundary
JP4764973B2 (en) CRC value calculation device
US20020032551A1 (en) Systems and methods for implementing hash algorithms
EP0480621A2 (en) Apparatus and method for parallel generation of cyclic redundancy check (CRC) codes
US7539918B2 (en) System and method for generating cyclic codes for error control in digital communications
US5694407A (en) Method and an apparatus for modifying a FCS
EP0537407B1 (en) Flexible encoding method and architecture for high-speed data transmission and storage
US4720831A (en) CRC calculation machine with concurrent preset and CRC calculation function
US7886210B2 (en) Apparatus for pipelined cyclic redundancy check circuit with multiple intermediate outputs
US6295626B1 (en) Symbol based algorithm for hardware implementation of cyclic redundancy check
US7080348B2 (en) Creating polynomial division logical devices
US6370667B1 (en) CRC operating calculating method and CRC operational calculation circuit
US7895499B2 (en) Method and apparatus for checking pipelined parallel cyclic redundancy
US6374384B1 (en) Reed Solomon error correcting circuit and method and device for Euclidean mutual division
US5408476A (en) One bit error correction method having actual data reproduction function
US7320101B1 (en) Fast parallel calculation of cyclic redundancy checks
JP2822928B2 (en) CRC code calculation method and circuit
US7299398B2 (en) Data generating method for forming desired CRC code
US6442747B1 (en) Method of synthesizing a cycle redundancy code generator circuit using hardware description language
EP0723342A2 (en) Error correction apparatus
EP0938206B1 (en) Parallel synchronous header correction machine for ATM
JPH0787090A (en) Method and device for detecting cyclic code
JP3269415B2 (en) CRC operation circuit
US7075461B2 (en) Method of generating pseudo 8B/10B code and apparatus for generating the same
EP0431416A2 (en) Apparatus and method for accessing a cyclic redundancy error check code generated in parallel

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080904

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080904

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090904

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090904

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100904

Year of fee payment: 12

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110904

Year of fee payment: 13

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120904

Year of fee payment: 14

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130904

Year of fee payment: 15

LAPS Cancellation because of no payment of annual fees