JP3606443B2 - Error detection apparatus, CRC check method, and recording medium - Google Patents
Error detection apparatus, CRC check method, and recording medium Download PDFInfo
- Publication number
- JP3606443B2 JP3606443B2 JP2000054468A JP2000054468A JP3606443B2 JP 3606443 B2 JP3606443 B2 JP 3606443B2 JP 2000054468 A JP2000054468 A JP 2000054468A JP 2000054468 A JP2000054468 A JP 2000054468A JP 3606443 B2 JP3606443 B2 JP 3606443B2
- Authority
- JP
- Japan
- Prior art keywords
- calculation
- data
- input
- generated
- bit
- 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.)
- Expired - Fee Related
Links
- 238000001514 detection method Methods 0.000 title claims description 62
- 238000000034 method Methods 0.000 title claims description 38
- 125000004122 cyclic group Chemical group 0.000 claims description 10
- 238000010586 diagram Methods 0.000 description 14
- 230000003287 optical effect Effects 0.000 description 9
- 230000005540 biological transmission Effects 0.000 description 5
- 238000003491 array Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
Images
Landscapes
- Detection And Correction Of Errors (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
- Error Detection And Correction (AREA)
- Detection And Prevention Of Errors In Transmission (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、取得したデータの誤りをCRC(Cyclic Redundancy Check)方式により検出する誤り検出装置に関し、特にCRCチェックを高速に処理することのできる誤り検出装置、CRCチェック方法及び記録媒体に関する。
【0002】
【従来の技術】
従来から、送信されたデータや所定の媒体から読み出したデータ等が誤りなく取得できたか否かを判別するために、データの誤り検出が行われている。この誤り検出には、パリティチェック方式やチェックサム方式が用いられてきた。
パリティチェック方式は、例えば、送信側にて、7ないし8ビットで表される1文字分のデータに別の1ビットを付加し、全体の「1」のビット数が常に奇数(又は、偶数)個になるようにしてデータを生成する。そして、受信側にて、取得したデータ(1文字分)の「1」のビット数が、奇数(又は、偶数)個でない場合に、エラーが発生したと判断する。
また、チェックサム方式は、例えば、送信側にて、一定の長さのブロック内のデータ列を足し合わせた総和を求め、求めた合計値の最下桁1バイトをブロックの最後尾に付加したデータを生成する。そして、受信側にて、取得したデータのブロック内の合計値を求め、合計値の最下桁1バイトと最後尾の1バイトとを比較して、一致しない場合に、エラーが発生したと判断する。
【0003】
近年では、これらパリティチェック方式等よりもエラーの検出能力が高く、状況によってはエラーの訂正も可能という点等の理由により、CRC(Cyclic Redundancy Check)方式が誤り検出に用いられるようになっている。CRC方式は、例えば、送信側にて、ブロック単位のデータ毎に所定の生成多項式を使用して巡回符号を求め、求めた巡回符号をそれぞれ付加したデータを生成する。そして、受信側にて、取得したデータをブロック単位に同一の生成多項式にて除算し、割り切れなかった(剰余が生じた)場合に、エラーが発生したと判断する。
【0004】
以下、このCRC方式について、伝送すべきデータをデータD(D=X23+X21+X18+X17+X14+X13+X12+X11+X10+X6+X4+X3+1)とし、生成多項式を多項式G(G=X6+X4+X3+1)とした場合を一例として説明する。
送信側は、データDに多項式Gの最高次の項であるX6を乗じたデータDX(DX=X29+X27+X24+X23+X20+X19+X18+X17+X16+X12+X10+X9+X6)を多項式Gで割り、その剰余を巡回符号として求める。
すなわち、送信側は、図9に示すように、データDXを多項式Gで割り、剰余として、X3+X2+Xを求める。このX3+X2+Xが巡回符号となる。
【0005】
より具体的に説明すると、この場合、データDXは、「101001100111110001011001000000」と表され、また、多項式Gは、「1011001」と表される。
そして、データDXを多項式Gで除算する際において、実際には剰余しか必要としないため(商が不要であるため)、送信側は、図10に示すように、データDXと多項式Gとの排他的論理和(xor)を順次演算し、剰余として「1110」(すなわち、X3+X2+X)を求める。
送信側は、この剰余、つまり巡回符号をデータDXに付加したデータ(「101001100111110001011001001110」)を生成して受信側に向けて送信する。
【0006】
受信側は、受信したデータを同一の多項式Gで除算し、剰余が生じた場合に、エラーが発生したと判断する。すなわち、受信側は、図11に示すように、受信したデータ(「101001100111110001011001001110」)と多項式G(「1011001」)との排他的論理和を順次演算して、剰余の有無を判別する。
このように、受信したデータと多項式Gとを使用した演算により剰余の有無を判別し、受信データの誤り検出を精度良く行うことができる。
【0007】
【発明が解決しようとする課題】
しかし、上述の図10や図11を参照して説明したように、多項式Gによるデータの除算は、チェック対象データ等の上位ビットが「1」の場合に、ビット配置を合わせた多項式Gとの排他的論理和を演算し、また、「0」の場合に、シフトさせて次のビットを参照するという演算処理を繰り返し行う必要がある。
すなわち、ビット単位で演算処理を行っており、排他的論理和等の演算を数多く行う必要があるため、誤り検出のための処理負荷が大きくなり、全体の処理効率の低下を招いていた。
【0008】
また、例えば、CD−ROM内に記録したデータ等を読み出す際には、1セクタ分のデータ量である2060バイトものデータに対して、誤り検出を行う必要がある。この際、生成多項式には、誤り検出の精度の向上から、より高次の多項式、例えば、多項式G(x)=X32+X31+X16+X15+X4+X3+X+1が用いられることとなる。
この場合、2060バイトものデータのビット毎に排他的論理和等の演算を繰り返し行うため、処理負荷が極めて大きくなり、誤り検出のために長時間に渡って処理を行わなければならないといった問題があった。
【0009】
本発明は、上記実状に鑑みてなされたもので、CRCチェックを高速に行うことのできる誤り検出装置、CRCチェック方法及び記録媒体を提供することを目的とする。
【0010】
【課題を解決するための手段】
上記目的を達成するため、本発明の第1の観点に係る誤り検出装置は、
複数ビット分のビット配列に従って、所定の生成多項式が合算されて生成された合算生成データを予め記憶する記憶手段と、
ビット列同士の排他的論理和を演算する演算手段と、
CRC(Cyclic Redundancy Check)チェック対象のデータを入力する入力手段と、
前記入力手段が入力したデータ又は、前記演算手段により前回演算されて生じた演算結果データから複数ビット分のビット配列を特定し、特定したビット配列に対応する合算生成データを前記記憶手段から取得する取得手段と、
前記入力手段が入力したデータ又は、前記演算手段により前回演算されて生じた演算結果データと、前記取得手段が取得した合算生成データとの演算を前記演算手段に所定回数行わせる制御手段と、
前記制御手段の制御により前記演算手段にて所定回数繰り返された演算により生じた演算結果に従って、前記入力手段が入力したデータの誤りを検出するエラー検出手段と、
を備えることを特徴とする。
【0011】
この発明によれば、記憶手段は、複数ビット分のビット配列に従って、所定の生成多項式が合算されて生成された合算生成データを予め記憶する。演算手段は、ビット列同士の排他的論理和を演算する。入力手段は、CRCチェック対象のデータを入力する。取得手段は、入力手段が入力したデータ又は、演算手段により前回演算されて生じた演算結果データから複数ビット分のビット配列を特定し、特定したビット配列に対応する合算生成データを記憶手段から取得する。制御手段は、入力手段が入力したデータ又は、演算手段により前回演算されて生じた演算結果データと、取得手段が取得した合算生成データとの演算を演算手段に所定回数行わせる。エラー検出手段は、制御手段の制御により演算手段にて所定回数繰り返された演算により生じた演算結果に従って、入力手段が入力したデータの誤りを検出する。このように、チェック対象データと合算生成データとの演算を、チェック対象データの複数ビット単位に繰り返すことにより、チェック対象データの生成多項式による除算を少ない演算処理にて実現できる。この結果、CRCチェックを高速に行うことができる。
【0012】
上記目的を達成するため、本発明の第2の観点に係る誤り検出装置は、
1バイト分のビット配列に従って、ビット配置のそれぞれ異なる生成多項式が合算されて生成された合算生成データを予め記憶する記憶手段と、
ビット列同士の排他的論理和を演算する演算手段と、
CRCチェック対象のデータを入力する入力手段と、
前記入力手段が入力したデータ又は、前記演算手段により前回演算されて生じた演算結果データから1バイト分のビット配列を特定し、特定したビット配列に対応する合算生成データを前記記憶手段から取得する取得手段と、
前記入力手段が入力したデータ又は、前記演算手段により前回演算されて生じた演算結果データと、前記取得手段が取得した合算生成データとの演算を前記演算手段に所定回数行わせる制御手段と、
前記制御手段の制御により前記演算手段にて所定回数繰り返された演算により生じた演算結果に剰余が含まれる場合に、前記入力手段が入力したデータの誤りを検出するエラー検出手段と、
を備えることを特徴とする。
【0013】
この発明によれば、記憶手段は、1バイト分のビット配列に従って、ビット配置のそれぞれ異なる生成多項式が合算されて生成された合算生成データを予め記憶する。演算手段は、ビット列同士の排他的論理和を演算する。入力手段は、CRCチェック対象のデータを入力する。取得手段は、入力手段が入力したデータ又は、演算手段により前回演算されて生じた演算結果データから1バイト分のビット配列を特定し、特定したビット配列に対応する合算生成データを記憶手段から取得する。制御手段は、入力手段が入力したデータ又は、演算手段により前回演算されて生じた演算結果データと、取得手段が取得した合算生成データとの演算を演算手段に所定回数行わせる。エラー検出手段は、制御手段の制御により演算手段にて所定回数繰り返された演算により生じた演算結果に剰余が含まれる場合に、入力手段が入力したデータの誤りを検出する。このように、チェック対象データと合算生成データとの演算を、チェック対象データの1バイト単位に繰り返すことにより、チェック対象データの生成多項式による除算を少ない演算処理にて実現できる。この結果、CRCチェックを高速に行うことができる。
【0014】
上記目的を達成するため、本発明の第3の観点に係るCRCチェック方法は、
ビット列同士の排他的論理和を演算する演算ステップと、
CRCチェック対象のデータを入力する入力ステップと、
前記入力ステップにて入力されたデータ又は、前記演算ステップにて前回演算されて生じた演算結果データから複数ビット分のビット配列を特定し、特定したビット配列により定まる生成多項式が合算されて生成された合算生成データを所定の記憶部から取得する取得ステップと、
前記入力ステップにて入力されたデータ又は、前記演算ステップにて前回演算されて生じた演算結果データと、前記取得ステップにて取得された合算生成データとの演算を前記演算ステップにて所定回数行わせる制御ステップと、
前記制御ステップの制御により前記演算ステップにて所定回数繰り返された演算により生じた演算結果に従って、前記入力ステップにて入力されたデータの誤りを検出するエラー検出ステップと、
を備えることを特徴とする。
【0015】
この発明によれば、演算ステップは、ビット列同士の排他的論理和を演算する。入力ステップは、CRCチェック対象のデータを入力する。取得ステップは、入力ステップにて入力されたデータ又は、演算ステップにて前回演算されて生じた演算結果データから複数ビット分のビット配列を特定し、特定したビット配列により定まる生成多項式が合算されて生成された合算生成データを所定の記憶部から取得する。制御ステップは、入力ステップにて入力されたデータ又は、演算ステップにて前回演算されて生じた演算結果データと、取得ステップにて取得された合算生成データとの演算を演算ステップにて所定回数行わせる。エラー検出ステップは、制御ステップの制御により演算ステップにて所定回数繰り返された演算により生じた演算結果に従って、入力ステップにて入力されたデータの誤りを検出する。このように、チェック対象データと合算生成データとの演算を、チェック対象データの複数ビット単位に繰り返すことにより、チェック対象データの生成多項式による除算を少ない演算処理にて実現できる。この結果、CRCチェックを高速に行うことができる。
【0016】
上記目的を達成するため、本発明の第4の観点に係るCRCチェック方法は、
ビット列同士の排他的論理和を演算する演算ステップと、
CRCチェック対象のデータを入力する入力ステップと、
前記入力ステップにて入力されたデータ又は、前記演算ステップにて前回演算されて生じた演算結果データから1バイト分のビット配列を特定し、特定したビット配列により定まるビット配置のそれぞれ異なる生成多項式が合算されて生成された合算生成データを所定の記憶部から取得する取得ステップと、
前記入力ステップにて入力されたデータ又は、前記演算ステップにて前回演算されて生じた演算結果データと、前記取得ステップにて取得された合算生成データとの演算を前記演算ステップにて所定回数行わせる制御ステップと、
前記制御ステップの制御により前記演算ステップにて所定回数繰り返された演算により生じた演算結果に剰余が含まれる場合に、前記入力ステップにて入力されたデータの誤りを検出するエラー検出ステップと、
を備えることを特徴とする。
【0017】
この発明によれば、演算ステップは、ビット列同士の排他的論理和を演算する。入力ステップは、CRCチェック対象のデータを入力する。取得ステップは、入力ステップにて入力されたデータ又は、演算ステップにて前回演算されて生じた演算結果データから1バイト分のビット配列を特定し、特定したビット配列により定まるビット配置のそれぞれ異なる生成多項式が合算されて生成された合算生成データを所定の記憶部から取得する。制御ステップは、入力ステップにて入力されたデータ又は、演算ステップにて前回演算されて生じた演算結果データと、取得ステップにて取得された合算生成データとの演算を演算ステップにて所定回数行わせる。エラー検出ステップは、制御ステップの制御により演算ステップにて所定回数繰り返された演算により生じた演算結果に剰余が含まれる場合に、入力ステップにて入力されたデータの誤りを検出する。このように、チェック対象データと合算生成データとの演算を、チェック対象データの1バイト単位に繰り返すことにより、チェック対象データの生成多項式による除算を少ない演算処理にて実現できる。この結果、CRCチェックを高速に行うことができる。
【0018】
上記目的を達成するため、本発明の第5の観点に係る記録媒体は、
ビット列同士の排他的論理和を演算する演算ステップと、CRCチェック対象のデータを入力する入力ステップと、前記入力ステップにて入力されたデータ又は、前記演算ステップにて前回演算されて生じた演算結果データから複数ビット分のビット配列を特定し、特定したビット配列により定まる生成多項式が合算されて生成された合算生成データを所定の記憶部から取得する取得ステップと、前記入力ステップにて入力されたデータ又は、前記演算ステップにて前回演算されて生じた演算結果データと、前記取得ステップにて取得された合算生成データとの演算を前記演算ステップにて所定回数行わせる制御ステップと、前記制御ステップの制御により前記演算ステップにて所定回数繰り返された演算により生じた演算結果に従って、前記入力ステップにて入力されたデータの誤りを検出するエラー検出ステップとを有するCRCチェック方法をコンピュータに実行させるためのプログラムを記録する。
【0019】
【発明の実施の形態】
本発明の実施の形態にかかる誤り検出装置について、以下図面を参照して説明する。
【0020】
図1は、この発明の実施の形態に適用される誤り検出装置の一例を示すブロック図である。図示するように、誤り検出装置1は、データ入力部11と、演算処理部12と、記憶部13と、エラー出力部14とを備えて構成される。
データ入力部11は、チェック対象となるデータを順次入力し、入力したデータを演算処理部12に供給する。
【0021】
演算処置部12は、CPU(Central Processing Unit)等からなり、データ入力部11から供給されたチェック対象データを演算処理することにより、データエラーが生じているか否かを判別する。具体的に演算処理部12は、後述するCRCチェック処理を実行し、チェック対象データ中の例えば、対象4ビットから定まる合算生成データを使用した演算処理の結果に従ってエラーの有無を判別する。なお、合算生成データについては、後述する。
【0022】
記憶部13は、ROM(Read Only Memory)等からなり、例えば、図2に示すような生成データテーブル131を予め記憶する。
生成データテーブル131は、チェック対象データ中の対象4ビットと、合算生成データとの対応関係を規定するテーブルである。すなわち、生成データテーブル131は、16個の対象4ビット(「0000」〜「1111」)に対応する合算生成データ(「0000000000」〜「1111110101」)を規定するテーブルである。
【0023】
この合算生成データは、排他的論理和の演算に使用される生成多項式を対象4ビットのビット配列に従って合算したデータである。なお、生成多項式には、多項式G(G=X6+X4+X3+1)が用いられる。以下、合算生成データについて、具体的に説明する。
【0024】
例えば、チェック対象データにおける対象4ビット(上位4ビット)のビット配列が「1111」である場合、図3に示すように、多項式Gの先頭位置(ビット配置)をずらしたL1、L2及びL4がそれぞれ合算され(排他的論理和が演算され)、ΣLとして合算生成データが求められる。
【0025】
ところで従来の除算の場合、例えば図4(a)に示すように、チェック対象データ(「1111・・・」)と多項式G(「1011001」)との排他的論理和を順次演算する。具体的には、まず対象データとL1との排他的論理和を演算し、その演算結果とL2との排他的論理和を演算し、そして、更に演算結果とL4との排他的論理和を演算する。
すなわち、チェック対象データの対象4ビットが「1111」の場合、データに対して、以下の数式1に示すような演算が行われる。なお、数式1中に示される(D)’は、データDを1回、多項式Gで割った結果を示すものとする。
【0026】
【数1】
(D)’ = D xor L1
(D)’’ =(D)’ xor L2
(D)’’’ =(D)’’ xor L4
【0027】
この数式1から、(D)’’’とDとの関係を導くと、数式2にて示される関係が成立する。
【0028】
【数2】
【0029】
数式2に示すように、データDと、多項式Gのビット配置をずらしたL1、L2及びL4の合算(排他的論理和)の演算結果との排他的論理和を演算することにより、数式1と同一となる最終的な演算結果を得ることができる。
つまり、図4(b)に示すチェック対象のデータと、L1、L2及びL4が合算されたΣLとの排他的論理和の演算結果(「00000111・・・」)は、図4(a)に示す最終的な演算結果と等しくなる。
このことから、数式3が成立することとなる。
【0030】
【数3】
(D)’’’ = D xor ΣL
【0031】
すなわち、排他的論理和に使用される多項式Gを合算して生成されるΣL、すなわち、合算生成データを使用することにより、図4(a)に示すような対象4ビット(「1111」)に対して3回必要であった排他的論理和の演算を、図4(b)に示すように1回にまとめて行うことができる。
このような合算生成データが、対象4ビットの16種類のビット配列(「0000」〜「1111」)に応じて予め求められ、それぞれのビット配列に対応づけられた生成データテーブル131が記憶部13に記憶されている。
【0032】
図1に戻って、エラー出力部14は、演算処理部12の演算処理結果に従って、エラーが検出された場合に、データの誤りを検出したことを示す所定のエラー検出情報を出力する。
【0033】
以下、この誤り検出装置1の動作を、図5を参照して説明する。図5は、誤り検出装置1が行うCRCチェック処理を説明するためのフローチャートである。図5に示すCRCチェック処理は、データ入力部11にチェック対象のデータが入力された際に、逐次開始される。
【0034】
まず、演算処理部12は、データ入力部11から入力データを取得する(ステップS11)。例えば、演算処理部12は、チェック対象となる30ビットのデータを取得する。
【0035】
演算処理部12は、変数iに初期値の「1」をセットする(ステップS12)。なお、この変数iは、チェック対象データと合算生成データとの排他的論理和の回数をカウントするために使用される。
【0036】
演算処理部12は、対象4ビットに対応する合算生成データを取得する(ステップS13)。すなわち、演算処理部12は、チェック対象データ中の対象4ビットを特定し、特定した対象4ビットに対応する合算生成データを記憶部13に記憶された生成データテーブル131から取得する。
例えば、演算処理部12は、図6(a)に示すような30ビットのチェック対象データから対象4ビット(「1010」)を特定し、特定した対象4ビットに対応する合算生成データ(「1010010001」)を図2に示す生成データテーブル131から取得する。
【0037】
演算処理部12は、取得した合算生成データと入力データとの排他的論理和を演算する(ステップS14)。例えば、演算処理部12は、図6(a)に示すように、チェック対象データと合算生成データ(「1010010001」)との排他的論理和を演算する。
【0038】
演算処理部12は、変数iが「6」より小さいか否かを判別する(ステップS15)。演算処理部12は、変数iが「6」より小さいと判別した場合、変数iに「1」を加算して(ステップS16)、上述のステップS13に処理を戻す。そして、演算処理部12は、前回のステップS14にて演算された結果(演算結果)から次の対象4ビットを特定し、特定した対象4ビットに対応する合算生成データを生成データテーブル131から取得する。更に、演算処理部12は、取得した合算生成データと前回の演算結果との排他的論理和を演算する。
このようなステップS13、S14の処理を、演算処理部12は、変数iが「6」となるまで繰り返す。
【0039】
すなわち、演算処理部12は、変数iが「2」のときに、図6(b)に示すように対象4ビット(「0010」)に対応する合算生成データ(「0010110010」)を生成データテーブル131から取得し、演算結果と合算生成データとの排他的論理和を演算する。
また、演算処理部12は、変数iが「3」のときに、図6(c)に示すように対象4ビット(「1111」)に対応する合算生成データ(「1111110101」)を取得し、排他的論理和を演算する。
以下同様に、演算処理部12は、変数iが「4」のときに、図6(d)に示すように排他的論理和を演算し、変数iが「5」のときに、図6(e)に示すように排他的論理和を演算し、そして、変数iが「6」のときに、図6(f)に示すように排他的論理和を演算する。
【0040】
図5に戻って、演算処理部12は、ステップS15にて、変数iが「6」以上である(「6」より小さくない)と判別した場合、剰余が発生しているか否かを判別する(ステップS17)。すなわち、上述の6回にわたるチェック対象データ(前回の演算結果)と合算生成データとの排他的論理和の演算により得られた演算結果に、剰余が含まれているか否かを判別する。
【0041】
演算処理部12は、剰余が発生していると判別した場合、所定のエラー検出情報を生成して、エラー出力部14に供給する(ステップS18)。演算処理部12は、エラー検出情報をエラー出力部14に供給すると、CRCチェック処理を終了する。
【0042】
一方、剰余が発生していないと判別した場合、演算処理部12は、全データのCRCチェックが完了したか否かを判別する(ステップS19)。すなわち、データ入力部11が入力したデータを全て処理したか否かを判別する。
【0043】
演算処理部12は、全データの処理が完了していないと判別した場合、ステップS11に処理を戻し、上述のステップS11〜S19の処理を繰り返し実行する。一方、全データの処理が完了したと判別した場合、演算処理部12は、CRCチェック処理を終了する。
【0044】
このように、チェック対象データと合算生成データとの演算を、チェック対象データの4ビット単位に繰り返すことにより、チェック対象データの生成多項式による除算を少ない演算処理にて実現できる。この結果、CRCチェックを高速に行うことができる。
【0045】
次に、上述した誤り検出装置1を構成に含んだ具体的な機器について、CD−ROM装置を一例として説明する。
図7は、本発明の他の実施の形態に係るCD−ROM装置の一例を示す模式図である。図示するように、CD−ROM装置100は、誤り検出装置1と、処理制御部2と、制御信号入力部3と、信号処理回路4と、トラッキングスレッドサーボ回路5と、光ピックアップ6と、スピンドルサーボ回路7と、データバッファ8とを備えて構成される。
【0046】
誤り検出装置1は、上述の図1に示したように、データ入力部11と、演算処理部12と、記憶部13と、エラー出力部14とからなり、信号処理回路4から供給された例えば、2060バイトのデータを演算処理し、データエラーが生じているか否かを判別する。
【0047】
なお、記憶部13には、上述の図2と異なり、図8(a)に示すような生成データテーブル132が予め記憶される。この生成データテーブル132は、チェック対象データ中の対象1バイトと、合算生成データとの対応関係を規定するテーブルである。すなわち、生成データテーブル132は、256個の対象1バイト(「00000000」〜「11111111」)に対応する合算生成データを規定するテーブルである。
【0048】
この合算生成データは、排他的論理和の演算に使用される生成多項式を対象1バイトのビット配列に従って合算したデータである。なお、生成多項式には、多項式G(x)=X32+X31+X16+X15+X4+X3+X+1が用いられる。これは、チェック対象のデータが2060バイトであることから、誤り検出の精度を向上させるためである。また、対象を1バイトとしたのは、CRCチェック処理をバイト単位に行うことにより、処理効率を更に高めるためである。
【0049】
合算生成データについて具体的に説明すると、合算生成データは、例えば、チェック対象データにおける対象1バイト(上位1バイト)のビット配列が「11111111」である場合、図8(b)に示すように、多項式G(x)の先頭位置(ビット配置)をずらしたL1、L3、L5及びL7がそれぞれ合算され(排他的論理和が演算され)、ΣLとして求められる。同様に他の合算生成データも、対象1バイトのビット配列に応じて予め求めらる。
このような、合算生成データが、対象1バイトの256種類のビット配列に応じて予め求められ、それぞれのビット配列に対応づけられた生成データテーブル132が記憶部13に記憶されている。
【0050】
図7に戻って、処理制御部2は、CPU及び周辺LSI(Large Scale Integration)を含んだ1チップマイコン等からなり、CD−ROM装置100全体を制御する。
すなわち、処理制御部2は、信号処理回路4を制御して、信号処理回路4が図示せぬCD−ROMから光ピックアップ6を介して読み出したデータを誤り検出装置1に供給させる。また、処理制御部2は、誤り検出装置1からエラー検出情報を取得すると、信号処理回路4に対してデータの再読み出しを指示する。
【0051】
制御信号入力部3は、所定のパーソナルコンピュータ等の機器から送られる制御信号を入力し、処理制御部2に供給する。
【0052】
信号処理回路4は、トラッキングスレッドサーボ回路5、光ピックアップ6及び、スピンドルサーボ回路7等を制御する。そして、信号処理回路4は、光ピックアップ6を介して、CD−ROMに記録されたデータを読み出す。
例えば、信号処理回路4は、1セクタ分となる2060バイトのデータをCD−ROMから読み出し、読み出した情報を誤り検出装置1等に供給する。
【0053】
トラッキングスレッドサーボ回路5は、光ピックアップ6をCD−ROMの径方向に平行移動させるための図示せぬスレッドモータを駆動制御し、光ピックアップ6をCD−ROMの記録面上の所定の位置へ移動させる。
【0054】
光ピックアップ6は、所定の波長のレーザ光をCD−ROMの記録面に向けて照射し、その反射光を受けて電気信号に変換する。光ピックアップ6は、変換した電気信号を読み出したデータとして信号処理回路4に供給する。
【0055】
スピンドルサーボ回路7は、CD−ROMを搭載する所定のターンテーブルを回転させるための図示せぬスピンドルモータを駆動制御し、所定の回転速度で回転駆動させる。
【0056】
データバッファ8は、誤り検出装置1にてCRCチェックがなされたデータを信号処理回路4から取得し、所定のパーソナルコンピュータ等に向けて出力する。
【0057】
以下、上述のCD−ROM装置100における誤り検出装置1の動作を、簡単に説明する。
誤り検出装置1は、信号処理回路4から送られる2060バイトのチェック対象データを取得する。誤り検出装置1は、チェック対象データ中の対象1バイトを特定し、特定した1バイトのビット配列に対応する合算生成データを生成データテーブル132から取得する。
誤り検出装置1は、取得した合算生成データとチェック対象データとの排他的論理和を演算する。
そして、誤り検出装置1は、前回の演算結果から次の対象1バイトを特定し、特定した対象1バイトのビット配列に対応する合算生成データを生成データテーブル132から取得する。更に、演算処理部12は、取得した合算生成データと前回の演算結果との排他的論理和を演算する。
このような演算処理を所定回数繰り返した後に、誤り検出装置1は、最終的に得られた演算結果に、剰余が含まれているか否かを判別する。誤り検出装置1は、剰余が含まれていると判別した場合、処理制御部2にエラー検出情報を出力する。
【0058】
このように、チェック対象データと合算生成データとの演算を、チェック対象データの1バイト単位に繰り返すことにより、チェック対象データの生成多項式による除算を少ない演算処理にて実現できる。この結果、CRCチェックを高速に行うことができる。
【0059】
なお、上記の実施の形態では、CD−ROM装置等におけるCRCチェックについて説明したが、CRCチェックの対象は任意である。例えば、FDドライブ、メモリ、MPEG変換装置、通信装置、及び、ハードディスク等種々の機器にて行われるCRCチェックに適用可能である。
【0060】
なお、この発明の誤り検出装置は、専用のシステムによらず、通常のコンピュータシステムを用いて実現可能である。例えば、コンピュータに上述のいずれかを実行するためのプログラムを格納した媒体(フロッピーディスク、CD−ROM等)から該プログラムをインストールすることにより、上述の処理を実行する誤り検出装置を構成することができる。
【0061】
また、コンピュータにプログラムを供給するための手法は、任意である。例えば、通信回線、通信ネットワーク、通信システム等を介して供給してもよい。一例を挙げると、通信ネットワークの掲示板(BBS)に当該プログラムを掲示し、これをネットワークを介して配信する。
そして、このプログラムを起動し、OSの制御下で、他のアプリケーションプログラムと同様に実行することにより、上述の処理を実行することができる。
【0062】
【発明の効果】
以上説明したように、本発明によれば、CRCチェックを高速に行うことができる。
【図面の簡単な説明】
【図1】本発明の実施の形態に係る誤り検出装置の構成の一例を示すブロック図である。
【図2】記憶部に記憶される生成データテーブルの一例を示す模式図である。
【図3】合算生成データの算出について説明する模式図である。
【図4】(a)が従来の多項式を使用して排他的論理和の演算を順次行う様子を説明するための模式図であり、(b)が合算生成データを使用して排他的論理和の演算を行う様子を説明するための模式図である。
【図5】本発明の実施の形態に係るCRCチェック処理を説明するためのフローチャートである。
【図6】CRCチェック処理により、チェック対象データと合算生成データとの排他的論理和の演算が順次行われる様子を説明するための模式図である。
【図7】誤り検出装置が含まれるCD−ROM装置の構成の一例を説明するための模式図である。
【図8】(a)が記憶部に記憶される生成データテーブルの一例を示す模式図であり、(b)が合算生成データの算出について説明する模式図である。
【図9】生成多項式にてデータが除算される様子を説明するための模式図である。
【図10】従来の巡回符号生成処理において演算される対象データと多項式との排他的論理和について説明するための模式図である。
【図11】従来のCRCチェック処理において演算される対象データと多項式との排他的論理和について説明するための模式図である。
【符号の説明】
1 誤り検出装置
2 処理制御部
3 制御信号入力部
4 信号処理回路
5 トラッキングスレッドサーボ回路
6 光ピックアップ
7 スピンドルサーボ回路
8 データバッファ
11 データ入力部
12 演算処理部
13 記憶部
14 エラー出力部[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an error detection apparatus that detects an error in acquired data using a CRC (Cyclic Redundancy Check) method, and more particularly to an error detection apparatus, a CRC check method, and a recording medium that can process a CRC check at high speed.
[0002]
[Prior art]
Conventionally, data error detection has been performed in order to determine whether transmitted data, data read from a predetermined medium, and the like have been acquired without error. For this error detection, a parity check method or a checksum method has been used.
In the parity check method, for example, on the transmission side, another 1 bit is added to the data for one character represented by 7 to 8 bits, and the total number of bits of “1” is always odd (or even). Data is generated in such a way that it becomes individual. The receiving side determines that an error has occurred when the number of bits of “1” in the acquired data (for one character) is not an odd number (or an even number).
In the checksum method, for example, on the transmission side, a sum total of data strings in a block of a certain length is obtained, and the
[0003]
In recent years, the CRC (Cyclic Redundancy Check) method has been used for error detection because the error detection capability is higher than those of the parity check method and the like, and the error can be corrected depending on the situation. . In the CRC method, for example, a cyclic code is obtained using a predetermined generation polynomial for each block of data on the transmission side, and data to which the obtained cyclic code is added is generated. Then, the receiving side divides the acquired data by the same generator polynomial for each block, and determines that an error has occurred when it is not divisible (a remainder has occurred).
[0004]
Hereinafter, for this CRC system, data to be transmitted is data D (D = X 23 + X 21 + X 18 + X 17 + X 14 + X 13 + X 12 + X 11 + X 10 + X 6 + X 4 + X 3 +1) and the generator polynomial is a polynomial G (G = X 6 + X 4 + X 3 +1) will be described as an example.
The transmitting side adds X to the data D as the highest order term of the polynomial G 6 Data DX multiplied by (DX = X 29 + X 27 + X 24 + X 23 + X 20 + X 19 + X 18 + X 17 + X 16 + X 12 + X 10 + X 9 + X 6 ) Is divided by the polynomial G, and the remainder is obtained as a cyclic code.
That is, as shown in FIG. 9, the transmission side divides the data DX by the polynomial G and uses X as the remainder. 3 + X 2 Find + X. This X 3 + X 2 + X is a cyclic code.
[0005]
More specifically, in this case, the data DX is expressed as “10100110011111000101100100000”, and the polynomial G is expressed as “1011001”.
When the data DX is divided by the polynomial G, only the remainder is actually required (because the quotient is not necessary), so that the transmission side excludes the data DX and the polynomial G as shown in FIG. The logical OR (xor) is sequentially calculated, and “1110” (that is, X 3 + X 2 + X).
The transmitting side generates this remainder, that is, data obtained by adding the cyclic code to the data DX (“101001100111110001011001001110”), and transmits it to the receiving side.
[0006]
The receiving side divides the received data by the same polynomial G, and determines that an error has occurred when a remainder occurs. That is, as shown in FIG. 11, the receiving side sequentially calculates an exclusive OR of the received data (“101001100111110001011001001110”) and the polynomial G (“1011001”) to determine whether there is a remainder.
In this way, the presence / absence of the remainder can be determined by the calculation using the received data and the polynomial G, and the error detection of the received data can be performed with high accuracy.
[0007]
[Problems to be solved by the invention]
However, as described with reference to FIG. 10 and FIG. 11 described above, the division of data by the polynomial G is different from the polynomial G combined with the bit arrangement when the upper bit of the check target data or the like is “1”. It is necessary to perform an exclusive OR operation, and in the case of “0”, it is necessary to repeatedly perform an operation process of shifting and referring to the next bit.
In other words, since arithmetic processing is performed in units of bits and it is necessary to perform a large number of operations such as exclusive OR, the processing load for error detection increases and the overall processing efficiency is reduced.
[0008]
Further, for example, when reading data recorded in a CD-ROM, it is necessary to perform error detection on data of 2060 bytes, which is the data amount for one sector. At this time, the generator polynomial has a higher order polynomial, for example, a polynomial G (x) = X because of the improvement in error detection accuracy. 32 + X 31 + X 16 + X 15 + X 4 + X 3 + X + 1 will be used.
In this case, since an operation such as exclusive OR is repeatedly performed for each bit of 2060 bytes of data, the processing load becomes extremely large, and there is a problem that processing must be performed for a long time for error detection. It was.
[0009]
The present invention has been made in view of the above circumstances, and an object thereof is to provide an error detection device, a CRC check method, and a recording medium that can perform a CRC check at high speed.
[0010]
[Means for Solving the Problems]
In order to achieve the above object, an error detection apparatus according to the first aspect of the present invention provides:
Storage means for preliminarily storing sum generation data generated by summing a predetermined generator polynomial according to a bit arrangement for a plurality of bits;
An arithmetic means for calculating an exclusive OR of the bit strings;
Input means for inputting CRC (Cyclic Redundancy Check) check target data;
The bit arrangement for a plurality of bits is specified from the data input by the input means or the calculation result data previously generated by the calculation means, and the sum generation data corresponding to the specified bit arrangement is acquired from the storage means. Acquisition means;
Control means for causing the calculation means to perform a predetermined number of calculations on the data input by the input means or calculation result data generated by the previous calculation by the calculation means and the sum generation data acquired by the acquisition means;
An error detection means for detecting an error in data input by the input means according to a calculation result generated by a calculation repeated a predetermined number of times by the calculation means under the control of the control means;
It is characterized by providing.
[0011]
According to the present invention, the storage unit stores in advance the combined generation data generated by adding the predetermined generation polynomials according to the bit arrangement for a plurality of bits. The computing means computes an exclusive OR of the bit strings. The input means inputs data for CRC check. The acquisition unit specifies a bit array for a plurality of bits from the data input by the input unit or the calculation result data generated by the previous calculation by the calculation unit, and acquires the sum generation data corresponding to the specified bit arrangement from the storage unit. To do. The control unit causes the calculation unit to perform a predetermined number of calculations on the data input by the input unit or the calculation result data generated by the previous calculation by the calculation unit and the sum generation data acquired by the acquisition unit. The error detection means detects an error in the data input by the input means according to the calculation result generated by the calculation repeated a predetermined number of times by the calculation means under the control of the control means. In this way, by repeating the calculation of the check target data and the sum generation data in units of a plurality of bits of the check target data, the division of the check target data by the generating polynomial can be realized with a small number of calculation processes. As a result, the CRC check can be performed at high speed.
[0012]
In order to achieve the above object, an error detection apparatus according to the second aspect of the present invention provides:
Storage means for preliminarily storing the sum generation data generated by summing the generator polynomials having different bit arrangements according to the bit arrangement for 1 byte;
An arithmetic means for calculating an exclusive OR of the bit strings;
An input means for inputting CRC check target data;
The bit arrangement for 1 byte is specified from the data input by the input means or the calculation result data generated by the previous calculation by the calculation means, and the sum generation data corresponding to the specified bit arrangement is acquired from the storage means. Acquisition means;
Control means for causing the calculation means to perform a predetermined number of calculations on the data input by the input means or calculation result data generated by the previous calculation by the calculation means and the sum generation data acquired by the acquisition means;
An error detection means for detecting an error in the data input by the input means when a remainder is included in the calculation result generated by the calculation repeated a predetermined number of times by the control means under the control of the control means;
It is characterized by providing.
[0013]
According to the present invention, the storage means stores in advance the combined generation data generated by adding the generator polynomials having different bit arrangements according to the bit arrangement for 1 byte. The computing means computes an exclusive OR of the bit strings. The input means inputs data for CRC check. The acquisition unit specifies the bit array for one byte from the data input by the input unit or the calculation result data generated by the previous calculation by the calculation unit, and acquires the total generation data corresponding to the specified bit arrangement from the storage unit. To do. The control unit causes the calculation unit to perform a predetermined number of calculations on the data input by the input unit or the calculation result data generated by the previous calculation by the calculation unit and the sum generation data acquired by the acquisition unit. The error detection means detects an error in the data input by the input means when the calculation result generated by the calculation repeated by the calculation means a predetermined number of times under the control of the control means includes a remainder. As described above, by repeating the calculation of the check target data and the sum generation data in units of 1 byte of the check target data, the division of the check target data by the generating polynomial can be realized with a small number of arithmetic processes. As a result, the CRC check can be performed at high speed.
[0014]
In order to achieve the above object, a CRC check method according to a third aspect of the present invention includes:
An operation step of calculating an exclusive OR of the bit strings;
An input step for inputting data subject to CRC check;
A bit array for a plurality of bits is specified from the data input in the input step or the calculation result data generated previously in the calculation step, and a generator polynomial determined by the specified bit array is added and generated. An acquisition step of acquiring the combined generation data from a predetermined storage unit;
The calculation step is performed a predetermined number of times in the calculation step with the data input in the input step or the calculation result data generated by the previous calculation in the calculation step and the sum generation data acquired in the acquisition step. Control steps
An error detection step for detecting an error in the data input in the input step according to a calculation result generated by the calculation repeated a predetermined number of times in the calculation step by the control step;
It is characterized by providing.
[0015]
According to this invention, the operation step calculates an exclusive OR of the bit strings. In the input step, data for CRC check is input. The acquisition step specifies a bit array for a plurality of bits from the data input in the input step or the operation result data generated by the previous operation in the operation step, and the generator polynomial determined by the specified bit array is added together. The generated sum generation data is acquired from a predetermined storage unit. The control step performs a predetermined number of operations in the calculation step on the data input in the input step or the calculation result data generated in the previous calculation step and the sum generation data acquired in the acquisition step. Make it. In the error detection step, an error in the data input in the input step is detected according to the calculation result generated by the calculation repeated a predetermined number of times in the calculation step under the control of the control step. In this way, by repeating the calculation of the check target data and the sum generation data in units of a plurality of bits of the check target data, the division of the check target data by the generating polynomial can be realized with a small number of calculation processes. As a result, the CRC check can be performed at high speed.
[0016]
In order to achieve the above object, a CRC check method according to a fourth aspect of the present invention includes:
An operation step of calculating an exclusive OR of the bit strings;
An input step for inputting data subject to CRC check;
From the data input in the input step or the calculation result data generated by the previous calculation in the calculation step, the bit arrangement for 1 byte is specified, and different generator polynomials having different bit arrangements determined by the specified bit arrangement are provided. An acquisition step of acquiring the combined generation data generated by the addition from a predetermined storage unit;
The calculation step is performed a predetermined number of times in the calculation step with the data input in the input step or the calculation result data generated by the previous calculation in the calculation step and the sum generation data acquired in the acquisition step. Control steps
An error detection step of detecting an error in the data input in the input step when a remainder is included in the calculation result generated by the calculation repeated a predetermined number of times in the calculation step by the control step;
It is characterized by providing.
[0017]
According to this invention, the operation step calculates an exclusive OR of the bit strings. In the input step, data for CRC check is input. The acquisition step specifies the bit arrangement for one byte from the data input in the input step or the calculation result data generated in the previous calculation step, and generates different bit arrangements determined by the specified bit arrangement. The total generation data generated by adding the polynomials is acquired from a predetermined storage unit. The control step performs a predetermined number of operations in the calculation step on the data input in the input step or the calculation result data generated in the previous calculation step and the sum generation data acquired in the acquisition step. Make it. The error detection step detects an error in the data input in the input step when a remainder is included in the calculation result generated by the calculation repeated a predetermined number of times in the calculation step under the control of the control step. As described above, by repeating the calculation of the check target data and the sum generation data in units of 1 byte of the check target data, the division of the check target data by the generating polynomial can be realized with a small number of arithmetic processes. As a result, the CRC check can be performed at high speed.
[0018]
In order to achieve the above object, a recording medium according to the fifth aspect of the present invention provides:
Calculation step for calculating exclusive OR of bit strings, input step for inputting CRC check target data, data input in the input step, or calculation result generated by previous calculation in the calculation step A bit sequence for a plurality of bits is specified from data, an acquisition step for acquiring a total generation data generated by adding a generator polynomial determined by the specified bit sequence from a predetermined storage unit, and input in the input step A control step for causing the calculation step to perform a predetermined number of calculations on the data or the calculation result data generated by the previous calculation in the calculation step and the sum generation data acquired in the acquisition step; and the control step According to the calculation result generated by the calculation repeated a predetermined number of times in the calculation step by the control of Recording a program for executing a CRC checking method having an error detection step of detecting an error in data input by the input step into the computer.
[0019]
DETAILED DESCRIPTION OF THE INVENTION
An error detection apparatus according to an embodiment of the present invention will be described below with reference to the drawings.
[0020]
FIG. 1 is a block diagram showing an example of an error detection apparatus applied to the embodiment of the present invention. As shown in the figure, the
The
[0021]
The
[0022]
The
The generation data table 131 is a table that defines the correspondence between the target 4 bits in the check target data and the combined generation data. That is, the generation data table 131 is a table that defines the total generation data (“0000000” to “1111110101”) corresponding to 16 target 4 bits (“0000” to “1111”).
[0023]
This sum generation data is data obtained by summing the generator polynomial used for the exclusive OR operation according to the target 4-bit bit array. The generator polynomial is a polynomial G (G = X 6 + X 4 + X 3 +1) is used. Hereinafter, the combined generation data will be specifically described.
[0024]
For example, when the bit arrangement of the target 4 bits (upper 4 bits) in the check target data is “1111”, as shown in FIG. 3, L1, L2, and L4 obtained by shifting the start position (bit arrangement) of the polynomial G are Each is summed (exclusive OR is computed), and summed data is obtained as ΣL.
[0025]
By the way, in the case of the conventional division, for example, as shown in FIG. 4A, exclusive OR of the check target data (“1111...”) And the polynomial G (“1011001”) is sequentially calculated. Specifically, the exclusive OR of the target data and L1 is calculated first, the exclusive OR of the operation result and L2 is calculated, and the exclusive OR of the operation result and L4 is further calculated. To do.
That is, when the target 4 bits of the check target data is “1111”, the calculation shown in the following
[0026]
[Expression 1]
(D) '= D xor L1
(D) '' = (D) 'xor L2
(D) '''=(D)''xor L4
[0027]
If the relationship between (D) ″ ′ and D is derived from
[0028]
[Expression 2]
[0029]
As shown in
That is, the operation result (“00000111...”) Of the exclusive OR of the data to be checked shown in FIG. 4B and ΣL obtained by adding L1, L2, and L4 is shown in FIG. It becomes equal to the final calculation result shown.
From this,
[0030]
[Equation 3]
(D) '''= D xor ΣL
[0031]
That is, by using ΣL generated by adding up the polynomial G used for exclusive OR, that is, by using the generated data, 4 bits (“1111”) as shown in FIG. On the other hand, the exclusive OR operation, which is required three times, can be performed all at once as shown in FIG.
Such combined generation data is obtained in advance according to 16 types of bit arrays (“0000” to “1111”) of the target 4 bits, and a generation data table 131 associated with each bit array is stored in the
[0032]
Returning to FIG. 1, the
[0033]
Hereinafter, the operation of the
[0034]
First, the
[0035]
The
[0036]
The
For example, the
[0037]
The
[0038]
The
The
[0039]
That is, when the variable i is “2”, the
Further, when the variable i is “3”, the
Similarly, when the variable i is “4”, the
[0040]
Returning to FIG. 5, when the
[0041]
If it is determined that a remainder has occurred, the
[0042]
On the other hand, if it is determined that no remainder has occurred, the
[0043]
If it is determined that the processing of all data has not been completed, the
[0044]
As described above, by repeating the calculation of the check target data and the sum generation data in units of 4 bits of the check target data, division by the generation polynomial of the check target data can be realized with a small number of arithmetic processing. As a result, the CRC check can be performed at high speed.
[0045]
Next, specific devices including the above-described
FIG. 7 is a schematic diagram showing an example of a CD-ROM device according to another embodiment of the present invention. As shown in the figure, the CD-
[0046]
As shown in FIG. 1, the
[0047]
Note that, unlike the above-described FIG. 2, the
[0048]
This sum generation data is data obtained by summing generator polynomials used for exclusive OR operation according to the bit array of the
[0049]
The combined generation data will be specifically described. For example, when the bit array of the
Such combined generation data is obtained in advance according to 256 types of bit arrangements of the
[0050]
Returning to FIG. 7, the
That is, the
[0051]
The control
[0052]
The signal processing circuit 4 controls the tracking
For example, the signal processing circuit 4 reads 2060-byte data corresponding to one sector from the CD-ROM, and supplies the read information to the
[0053]
The tracking
[0054]
The
[0055]
The
[0056]
The data buffer 8 acquires the data that has been CRC checked by the
[0057]
Hereinafter, the operation of the
The
The
Then, the
After repeating such arithmetic processing a predetermined number of times, the
[0058]
As described above, by repeating the calculation of the check target data and the sum generation data in units of 1 byte of the check target data, the division of the check target data by the generating polynomial can be realized with a small number of arithmetic processes. As a result, the CRC check can be performed at high speed.
[0059]
In the above embodiment, the CRC check in the CD-ROM device or the like has been described, but the CRC check target is arbitrary. For example, the present invention can be applied to CRC check performed in various devices such as an FD drive, a memory, an MPEG conversion device, a communication device, and a hard disk.
[0060]
Note that the error detection apparatus of the present invention can be realized using a normal computer system, not a dedicated system. For example, by installing the program from a medium (floppy disk, CD-ROM, etc.) storing a program for executing any of the above in a computer, an error detection apparatus that executes the above-described processing may be configured. it can.
[0061]
A method for supplying the program to the computer is arbitrary. For example, you may supply via a communication line, a communication network, a communication system, etc. As an example, the program is posted on a bulletin board (BBS) of a communication network, and is distributed via the network.
Then, the above-described processing can be executed by starting this program and executing it in the same manner as other application programs under the control of the OS.
[0062]
【The invention's effect】
As described above, according to the present invention, the CRC check can be performed at high speed.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an example of the configuration of an error detection apparatus according to an embodiment of the present invention.
FIG. 2 is a schematic diagram illustrating an example of a generated data table stored in a storage unit.
FIG. 3 is a schematic diagram illustrating calculation of sum generation data.
FIG. 4A is a schematic diagram for explaining a state in which exclusive OR operation is sequentially performed using a conventional polynomial, and FIG. 4B is an exclusive OR using sum generation data. It is a schematic diagram for demonstrating a mode that this calculation is performed.
FIG. 5 is a flowchart for explaining CRC check processing according to the embodiment of the present invention;
FIG. 6 is a schematic diagram for explaining a state in which an exclusive OR operation of check target data and sum generation data is sequentially performed by CRC check processing.
FIG. 7 is a schematic diagram for explaining an example of the configuration of a CD-ROM device including an error detection device.
FIG. 8A is a schematic diagram illustrating an example of a generated data table stored in a storage unit, and FIG. 8B is a schematic diagram illustrating calculation of combined generated data.
FIG. 9 is a schematic diagram for explaining how data is divided by a generator polynomial.
FIG. 10 is a schematic diagram for explaining exclusive OR of target data and a polynomial calculated in a conventional cyclic code generation process.
FIG. 11 is a schematic diagram for explaining an exclusive OR of target data and a polynomial calculated in a conventional CRC check process.
[Explanation of symbols]
1 Error detection device
2 Processing control unit
3 Control signal input section
4 signal processing circuit
5 Tracking thread servo circuit
6 Optical pickup
7 Spindle servo circuit
8 Data buffer
11 Data input part
12 Arithmetic processing part
13 Memory unit
14 Error output section
Claims (5)
ビット列同士の排他的論理和を演算する演算手段と、
CRC(Cyclic Redundancy Check)チェック対象のデータを入力する入力手段と、
前記入力手段が入力したデータ又は、前記演算手段により前回演算されて生じた演算結果データから複数ビット分のビット配列を特定し、特定したビット配列に対応する合算生成データを前記記憶手段から取得する取得手段と、
前記入力手段が入力したデータ又は、前記演算手段により前回演算されて生じた演算結果データと、前記取得手段が取得した合算生成データとの演算を前記演算手段に所定回数行わせる制御手段と、
前記制御手段の制御により前記演算手段にて所定回数繰り返された演算により生じた演算結果に従って、前記入力手段が入力したデータの誤りを検出するエラー検出手段と、
を備えることを特徴とする誤り検出装置。Storage means for preliminarily storing sum generation data generated by summing a predetermined generator polynomial according to a bit arrangement for a plurality of bits;
An arithmetic means for calculating an exclusive OR of the bit strings;
Input means for inputting CRC (Cyclic Redundancy Check) check target data;
The bit arrangement for a plurality of bits is specified from the data input by the input means or the calculation result data previously generated by the calculation means, and the sum generation data corresponding to the specified bit arrangement is acquired from the storage means. Acquisition means;
Control means for causing the calculation means to perform a predetermined number of calculations on the data input by the input means or calculation result data generated by the previous calculation by the calculation means and the sum generation data acquired by the acquisition means;
An error detection means for detecting an error in data input by the input means according to a calculation result generated by a calculation repeated a predetermined number of times by the calculation means under the control of the control means;
An error detection apparatus comprising:
ビット列同士の排他的論理和を演算する演算手段と、
CRCチェック対象のデータを入力する入力手段と、
前記入力手段が入力したデータ又は、前記演算手段により前回演算されて生じた演算結果データから1バイト分のビット配列を特定し、特定したビット配列に対応する合算生成データを前記記憶手段から取得する取得手段と、
前記入力手段が入力したデータ又は、前記演算手段により前回演算されて生じた演算結果データと、前記取得手段が取得した合算生成データとの演算を前記演算手段に所定回数行わせる制御手段と、
前記制御手段の制御により前記演算手段にて所定回数繰り返された演算により生じた演算結果に剰余が含まれる場合に、前記入力手段が入力したデータの誤りを検出するエラー検出手段と、
を備えることを特徴とする誤り検出装置。Storage means for preliminarily storing the sum generation data generated by summing the generator polynomials having different bit arrangements according to the bit arrangement for 1 byte;
An arithmetic means for calculating an exclusive OR of the bit strings;
An input means for inputting CRC check target data;
The bit arrangement for 1 byte is specified from the data input by the input means or the calculation result data generated by the previous calculation by the calculation means, and the sum generation data corresponding to the specified bit arrangement is acquired from the storage means. Acquisition means;
Control means for causing the calculation means to perform a predetermined number of calculations on the data input by the input means or calculation result data generated by the previous calculation by the calculation means and the sum generation data acquired by the acquisition means;
An error detection means for detecting an error in the data input by the input means when a remainder is included in the calculation result generated by the calculation repeated a predetermined number of times by the control means under the control of the control means;
An error detection apparatus comprising:
CRCチェック対象のデータを入力する入力ステップと、
前記入力ステップにて入力されたデータ又は、前記演算ステップにて前回演算されて生じた演算結果データから複数ビット分のビット配列を特定し、特定したビット配列により定まる生成多項式が合算されて生成された合算生成データを所定の記憶部から取得する取得ステップと、
前記入力ステップにて入力されたデータ又は、前記演算ステップにて前回演算されて生じた演算結果データと、前記取得ステップにて取得された合算生成データとの演算を前記演算ステップにて所定回数行わせる制御ステップと、
前記制御ステップの制御により前記演算ステップにて所定回数繰り返された演算により生じた演算結果に従って、前記入力ステップにて入力されたデータの誤りを検出するエラー検出ステップと、
を備えることを特徴とするCRCチェック方法。An operation step of calculating an exclusive OR of the bit strings;
An input step for inputting data subject to CRC check;
A bit array for a plurality of bits is specified from the data input in the input step or the calculation result data generated previously in the calculation step, and a generator polynomial determined by the specified bit array is added and generated. An acquisition step of acquiring the combined generation data from a predetermined storage unit;
The calculation step is performed a predetermined number of times in the calculation step with the data input in the input step or the calculation result data generated by the previous calculation in the calculation step and the sum generation data acquired in the acquisition step. Control steps
An error detection step for detecting an error in the data input in the input step according to a calculation result generated by the calculation repeated a predetermined number of times in the calculation step by the control step;
A CRC check method comprising:
CRCチェック対象のデータを入力する入力ステップと、
前記入力ステップにて入力されたデータ又は、前記演算ステップにて前回演算されて生じた演算結果データから1バイト分のビット配列を特定し、特定したビット配列により定まるビット配置のそれぞれ異なる生成多項式が合算されて生成された合算生成データを所定の記憶部から取得する取得ステップと、
前記入力ステップにて入力されたデータ又は、前記演算ステップにて前回演算されて生じた演算結果データと、前記取得ステップにて取得された合算生成データとの演算を前記演算ステップにて所定回数行わせる制御ステップと、
前記制御ステップの制御により前記演算ステップにて所定回数繰り返された演算により生じた演算結果に剰余が含まれる場合に、前記入力ステップにて入力されたデータの誤りを検出するエラー検出ステップと、
を備えることを特徴とするCRCチェック方法。An operation step of calculating an exclusive OR of the bit strings;
An input step for inputting data subject to CRC check;
From the data input in the input step or the calculation result data generated by the previous calculation in the calculation step, the bit array for 1 byte is specified, and different generator polynomials having different bit arrangements determined by the specified bit arrangement are provided. An acquisition step of acquiring the combined generation data generated by the addition from a predetermined storage unit;
The calculation step is performed a predetermined number of times in the calculation step with the data input in the input step or the calculation result data generated by the previous calculation in the calculation step and the sum generation data acquired in the acquisition step. Control steps
An error detection step for detecting an error in the data input in the input step when a remainder is included in the calculation result generated by the calculation repeated a predetermined number of times in the calculation step by the control step;
A CRC check method comprising:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000054468A JP3606443B2 (en) | 2000-02-29 | 2000-02-29 | Error detection apparatus, CRC check method, and recording medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000054468A JP3606443B2 (en) | 2000-02-29 | 2000-02-29 | Error detection apparatus, CRC check method, and recording medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2001244820A JP2001244820A (en) | 2001-09-07 |
| JP3606443B2 true JP3606443B2 (en) | 2005-01-05 |
Family
ID=18575716
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2000054468A Expired - Fee Related JP3606443B2 (en) | 2000-02-29 | 2000-02-29 | Error detection apparatus, CRC check method, and recording medium |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3606443B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3880934B2 (en) | 2003-01-28 | 2007-02-14 | Necエレクトロニクス株式会社 | CRC code generation method |
-
2000
- 2000-02-29 JP JP2000054468A patent/JP3606443B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2001244820A (en) | 2001-09-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP0781470B1 (en) | Versatile error correction system | |
| US6594796B1 (en) | Simultaneous processing for error detection and P-parity and Q-parity ECC encoding | |
| US7296209B2 (en) | Apparatus for encoding and decoding | |
| EP3082046B1 (en) | Data error correcting method and device, and computer storage medium | |
| WO2008027734A1 (en) | Apparatus and method for generating a galois-field syndrome | |
| CN1113474C (en) | CRC/EDC checker system and method | |
| US6738947B1 (en) | Method and apparatus for error correction | |
| US20080162806A1 (en) | Storage Accelerator | |
| JP3260421B2 (en) | CD-ROM playback device | |
| JP3606443B2 (en) | Error detection apparatus, CRC check method, and recording medium | |
| US5555516A (en) | Multipurpose error correction calculation circuit | |
| US10198302B2 (en) | Residue prediction of packed data | |
| US12148491B2 (en) | Processing-in-memory (PIM) devices | |
| US6470471B1 (en) | Data error correction apparatus | |
| JP2008011025A (en) | Remainder calculator for cyclic redundancy check | |
| JP2001044853A (en) | Chain search circuit, error correction device and disk driver | |
| JP3255130B2 (en) | Data inspection method and apparatus, and recording medium | |
| CN116048868B (en) | Code generation method, device, equipment and storage medium | |
| JP3239866B2 (en) | Data inspection method and apparatus based on CRC and recording medium | |
| JPH11282703A (en) | Device and method for error correction | |
| JP2553571B2 (en) | Galois field arithmetic unit | |
| CN116560899A (en) | Check value generator and generation method | |
| JP2008112522A (en) | Error detection apparatus and error detection method | |
| JP3259688B2 (en) | Data processing circuit | |
| JPH0738533A (en) | Error detecting method for data |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20040831 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20040930 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20071015 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081015 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081015 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091015 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091015 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101015 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111015 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121015 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121015 Year of fee payment: 8 |
|
| S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121015 Year of fee payment: 8 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131015 Year of fee payment: 9 |
|
| LAPS | Cancellation because of no payment of annual fees |