JPH02101824A - Cyclic redundancy inspection code generator - Google Patents

Cyclic redundancy inspection code generator

Info

Publication number
JPH02101824A
JPH02101824A JP63253921A JP25392188A JPH02101824A JP H02101824 A JPH02101824 A JP H02101824A JP 63253921 A JP63253921 A JP 63253921A JP 25392188 A JP25392188 A JP 25392188A JP H02101824 A JPH02101824 A JP H02101824A
Authority
JP
Japan
Prior art keywords
circuit
data
cyclic redundancy
parallel data
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.)
Pending
Application number
JP63253921A
Other languages
Japanese (ja)
Inventor
Nobuaki Tanaka
伸明 田中
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP63253921A priority Critical patent/JPH02101824A/en
Publication of JPH02101824A publication Critical patent/JPH02101824A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To generate a cyclic redundancy code from a parallel data with simple constitution and to attain high speed processing by outputting the cyclic redundancy check code from an arithmetic circuit as a parallel data when the processing of a data block generating the cyclic redundancy check code is finished. CONSTITUTION:Parallel data D0-D7 latched in a shift register 1 are sequentially inputted to a cyclic redundancy check code (CRC code)arithmetic circuit 4 and the arithmetic operation based on a predetermined generation polynomial is applied. Results of operation C0-C7 are latched in an FF circuit 3 and the circuit 5 supplies a data for each bit to the circuit 4 during the arithmetic period. When the processing of data block is finished, the CRC code is outputted as parallel data d0-d7 from the circuit 4. Thus, the CRC code is generated by the arithmetic operation circuit with simple constitution and hardware, high speed processing is applied and the load of a CPU is relieved.

Description

【発明の詳細な説明】 〔概 要〕 データ伝送においてデータブロックごとに誤り検出・訂
正を行なうために用いられるブロック訂正符号である巡
回冗長検査符号(CRC符号)の生成装置に関し、 パラレルデータからCRC符号を生成する装置を得るこ
とを目的とし、 パラレルデータをラッチするシフトレジスタと、このシ
フトレジスタからのシフト出力が入力される演算回路と
、この演算回路による演算結果をビットごとにラッチす
るとともに上記シフトレジスタからのシフト出力の演算
期間中に各ビットごとのデータを上記演算回路に供給す
るフリップ・フロップ回路と、巡回冗長検査符号を生成
すべきデータブロックの処理が終了したときに上記演算
回路から巡回冗長検査符号をパラレルデータとして出力
するように構成する。
[Detailed Description of the Invention] [Summary] A device for generating a cyclic redundancy check code (CRC code), which is a block correction code used to perform error detection and correction for each data block in data transmission. The aim is to obtain a device that generates codes, and includes a shift register that latches parallel data, an arithmetic circuit that receives the shift output from this shift register, and latches the arithmetic results of this arithmetic circuit bit by bit. A flip-flop circuit supplies each bit of data to the arithmetic circuit during the calculation period of the shift output from the shift register, and a flip-flop circuit supplies data for each bit to the arithmetic circuit when the processing of the data block for which a cyclic redundancy check code is to be generated is completed. The cyclic redundancy check code is configured to be output as parallel data.

〔産業上の利用分野〕[Industrial application field]

データ伝送においてデータブロックごとに誤り検出・訂
正を行なうために用いられるブロック訂正符号である巡
回冗長検査符号(Cyclic redundancy
 check code )  (以下、CRC符号、
という)の生成装置に関する。
Cyclic redundancy check code is a block correction code used to detect and correct errors for each data block during data transmission.
check code) (hereinafter referred to as CRC code,
) generation device.

〔従来の技術〕[Conventional technology]

CRC符号はシリアルデータの転送中に発生する符号誤
りを訂正するために広く用いられているが、従来はシリ
アルデータからこのCRC符号を生成するものであって
、パラレルデータがらCRC符号を生成する装置は知ら
れてぃなかった。
CRC codes are widely used to correct code errors that occur during the transfer of serial data. Conventionally, CRC codes are generated from serial data, and devices that generate CRC codes from parallel data are used. was not known.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

本発明は、パラレルデータからCRC符号を生成する装
置を得ることを目的とする。
An object of the present invention is to obtain a device that generates a CRC code from parallel data.

〔課題を解決する手段〕[Means to solve problems]

第1図に示すように、パラレルデータをラッチするシフ
トレジスタlと、このシフトレジスタからのシフト出力
が入力される演算回路4と、この演算回路4による演算
結果をビットごとにラッチするとともに、上記シフトレ
ジスタ1からのシフト出力の演算期間中に各ビットごと
のデータを上記演算回路4に供給するようにしたフリッ
プ・フロップ回路5と、巡回冗長検査を生成すべきデー
タブロックの処理が終了したときに上記演算回路4から
CRC符号をパラレルデータとして出力するように構成
する。
As shown in FIG. 1, there is a shift register l that latches parallel data, an arithmetic circuit 4 into which the shift output from this shift register is input, and an arithmetic circuit 4 that latches the arithmetic results of this arithmetic circuit 4 bit by bit. When the flip-flop circuit 5 supplies each bit of data to the arithmetic circuit 4 during the calculation period of the shift output from the shift register 1, and the processing of the data block for which the cyclic redundancy check is to be generated is completed. The arithmetic circuit 4 is configured to output the CRC code as parallel data.

〔作 用〕[For production]

シフトレジスタ1にラッチされたパラレルデータは順次
シフト出力されて演算回路4に入力して演算される。演
算結果はビットごとにフリップ・フロップ回路5にラッ
チされ、またフリップ・フロップ回路5は演算期間中に
各ビットごとのデータを演算回路4に供給する。データ
ブロックの処理が終了したとき演算回路4からCRC符
号をパラレルデータとして出力する。
The parallel data latched in the shift register 1 is sequentially shifted out and input to the arithmetic circuit 4 for calculation. The operation result is latched bit by bit in the flip-flop circuit 5, and the flip-flop circuit 5 supplies data for each bit to the operation circuit 4 during the operation period. When the processing of the data block is completed, the arithmetic circuit 4 outputs the CRC code as parallel data.

〔実施例〕〔Example〕

この第1図は本発明を8ビツトパラレルデータについて
のCRC符号を生成するCRC符号生成装置に適用した
場合の実施例の構成を示す図であって、第2図に示した
動作説明のためのタイムチャートを参照しながら説明す
る。
FIG. 1 is a diagram showing the configuration of an embodiment in which the present invention is applied to a CRC code generation device that generates a CRC code for 8-bit parallel data. This will be explained with reference to the time chart.

工6進カウンタ2は第2図に(alで示した#lクロン
クCKから同図(e)、 (r)に示した互いに逆相の
#2クロックck、ck’を発生するためのものであっ
て、上記の#1クロックCKの立下がりに同期した同図
(d)に示すスタート信号Sがこのカウンタ2のリセッ
ト端子に印加されると、その立上がりから#lクロック
の計数を開始し、同図(e)。
The hexadecimal counter 2 is used to generate the #2 clocks ck and ck' shown in FIG. Then, when the start signal S shown in FIG. 6(d) synchronized with the fall of the #1 clock CK is applied to the reset terminal of the counter 2, counting of the #1 clock starts from the rise of the start signal S, Same figure (e).

(f)に示すように周期が上記#1クロツタの2倍であ
る計数出力を互いに逆相の#2クロックck。
As shown in (f), the #2 clock ck has a count output whose period is twice that of the #1 clock and has opposite phases to each other.

ck’としてシフトレジスタ1のクロック端子、フリッ
プ・フロップ回路5のクロック端子に供給する。
ck' is supplied to the clock terminal of the shift register 1 and the clock terminal of the flip-flop circuit 5.

そして、第2図のタイミング[相]′、[相]に示した
ようにこの16進カウンタ2が“15”を計数したとき
に同図(g)に示すキャリーCを出力し、このキャリー
Cは前記#1クロックGKが一方の入力端子に供給され
ているオア回路3の他方の端子に供給されるので、この
カウンタ2が“15”を計数し終わったときから前記#
1クロックがこのカウンタ2へ入力されても上記オア回
路3の出力はキャリー信号波形となり、このカウンタは
計数を停止して上記#2クロックck、ck’の供給を
停止する。
Then, when this hexadecimal counter 2 counts "15" as shown in the timing [phase]' and [phase] of FIG. 2, the carry C shown in FIG. is supplied to the other terminal of the OR circuit 3 whose one input terminal is supplied with the #1 clock GK.
Even if one clock is input to this counter 2, the output of the OR circuit 3 becomes a carry signal waveform, and this counter stops counting and stops supplying the #2 clocks ck and ck'.

一方、上記シフトレジスタ1のパラレルデータ入力端子
には最上位桁がD7で最下位桁がDoである8ビツトパ
ラレルデータD(第2図(b))が供給されており、#
1クロックGKの立下がりに同期して供給されるモード
信号Mが“Ooであってカウンタ2がスタート信号Sに
よってリセットされて新たにカウントが開始されるとき
の#2クロックck’の立上がりのタイミングので上記
パラレルデータDをこのシフトレジスタlにラッチする
On the other hand, the parallel data input terminal of the shift register 1 is supplied with 8-bit parallel data D (FIG. 2(b)) in which the most significant digit is D7 and the least significant digit is Do.
The timing of the rise of the #2 clock ck' when the mode signal M supplied in synchronization with the fall of the first clock GK is "Oo" and the counter 2 is reset by the start signal S and starts counting anew. Therefore, the parallel data D is latched into this shift register I.

第2図(hlに示すように、このラッチのタイミング■
で最上位桁D7ビツトが出力されるが、この出力される
ビットはシフトモードでクロックが入るごとにDs、D
s・・・−と順次変化することはこの図に示したとおり
である。
As shown in Figure 2 (hl), the timing of this latch is
The most significant digit D7 bit is output, but this output bit changes Ds and D every time the clock is input in shift mode.
As shown in this figure, the values change sequentially from s...-.

続いて、予め定められている生成多項式の演算を行なう
ための演算回路4における演算結果を各桁c0〜C1ご
とに■で示したタイミングにおいて各ビットに対応する
例えばD−フリップ・フロップによって構成されている
フリップ・フロップ回路5に各ビットごとに書込んでラ
ッチする。
Subsequently, the calculation result in the calculation circuit 4 for calculating a predetermined generator polynomial is calculated for each digit c0 to C1 at the timing indicated by ■, for example, by a D-flip-flop corresponding to each bit. Each bit is written into the flip-flop circuit 5 and latched.

次の■のタイミングにおいては、上記シフトレジスタ1
にラッチされていた8ビツトパラレルデータの2桁目の
ビットD、がシフトアウトされて演算回路4に入力され
、この演算が行なわれた結果は■のタイミングで各ビッ
トごとにフリップ・フロップ回路5にランチされる。
At the next timing ■, the shift register 1
The second digit bit D of the 8-bit parallel data latched in is shifted out and input to the arithmetic circuit 4, and the result of this arithmetic operation is sent to the flip-flop circuit 5 for each bit at the timing of Lunch will be served.

次の#2クロックによる■のタイミングにおいては、上
位から3桁目のビットD、がシフトレジスタから演算回
路4にシフトアウトされ、D。
At the timing of ■ by the next #2 clock, the third digit from the high-order bit D is shifted out from the shift register to the arithmetic circuit 4.

Dbビットについての処理結果をラッチしている上記フ
リップ・フロップ回路からの各桁ごとのデータとともに
演算が行なわれ、その結果は次の■のタイミングで再び
フリップ・フロップ回路5に各桁ごとにラッチされる。
An operation is performed together with the data for each digit from the flip-flop circuit that latches the processing result for the Db bit, and the result is latched again for each digit in the flip-flop circuit 5 at the next timing (■). be done.

このようにしてパラレルデータを構成している最下位桁
D0までの演算が[相]のタイミングで終了したとき、
16進カウンタ2からキャリーが出力されて前述のよう
にこのカウンタの計数動作は停止し、1つのパラレルデ
ータD0〜D7についての処理は終了する。
In this way, when the calculation up to the least significant digit D0 that constitutes the parallel data is completed at the timing of [phase],
A carry is output from the hexadecimal counter 2, and the counting operation of this counter is stopped as described above, and the processing for one parallel data D0 to D7 is completed.

なお、[相]の時点でのシフトアウトとフリップ・フロ
ップ回路5の出力とによる演算回路4での演算結果は、
次の8ビツトパラレルデータについてのスタート信号S
が“0”になって#2クロックck’が立上がる[相]
のタイミングでラッチされる。
Note that the calculation result in the calculation circuit 4 based on the shift out at the time of [phase] and the output of the flip-flop circuit 5 is as follows.
Start signal S for next 8-bit parallel data
becomes “0” and #2 clock ck' rises [phase]
It is latched at the timing of

このような処理をCRC符号を生成すべきデータブロッ
クに属するパラレルデータごとに繰り返し、このデータ
ブロックに属するすべてのパラレルデータの処理が終了
したときにゲート6をオンにして演算回路4の出力C0
〜C6を取り出すことによって、このデータブロックに
ついての所要のCRC符号がパラレルデータd0〜d7
として得られる。
Such processing is repeated for each parallel data belonging to the data block for which a CRC code is to be generated, and when the processing of all the parallel data belonging to this data block is completed, the gate 6 is turned on and the output C0 of the arithmetic circuit 4 is
~C6, the required CRC code for this data block becomes parallel data d0~d7.
obtained as.

この第1図図示の実施例におけるCRC符号演算回路4
は、その生成多項式として x” +x’ +x’ +x” +1 を用いた場合の例であって、FOR回路41.4z+4
z、4aを含むハードウェアによって上記多項式の演算
を行なうものであるが、この種の生成多項式およびその
演算回路は公知であるからその動作についての詳細な説
明は省略する。
CRC code calculation circuit 4 in the embodiment shown in FIG.
is an example when x"+x'+x'+x" +1 is used as the generating polynomial, and the FOR circuit 41.4z+4
The above polynomial is calculated by hardware including z and 4a, but since this type of generating polynomial and its calculation circuit are well known, a detailed explanation of its operation will be omitted.

第3図は本発明のCRC符号生成装置を適用したデータ
処理装置の構成図を示すもので、第1図について説明し
たCRC符号生成装置10はcpUllとの間をデータ
バス12、モード信号線、スタート信号線、#lクロッ
ク伝送線、ゲート信号線およびリセット信号線で接続さ
れており、またこのCPUはコントロールバス13、ア
ドレスバス14および上記データバス12でメモリ15
に接続されている。
FIG. 3 shows a configuration diagram of a data processing device to which the CRC code generation device of the present invention is applied. The CRC code generation device 10 explained with reference to FIG. The CPU is connected to the memory 15 by the control bus 13, address bus 14, and data bus 12.
It is connected to the.

CRC符号生成装置10はCRC符号を生成すぺきデー
タブロックの最初のパラレルデータを処理する前にCP
UIIからのリセット信号によってリセットされており
、このCPUはメモリ15のバッファ領域からデータを
1バイトずつ取出してパラレルデータとしてこのCRC
符号生成装置10のシフトレジスタ(第1図1)に供給
する。
The CRC code generator 10 generates a CRC code before processing the first parallel data of the data block.
It is reset by a reset signal from UII, and this CPU takes out data one byte at a time from the buffer area of memory 15 and stores this CRC as parallel data.
The signal is supplied to the shift register (FIG. 1) of the code generation device 10.

また、このCPUはアドレスストローブ信号、I10ラ
イト信号などから第2図(C)のモード信号および同図
(d)のスタート信号を生成してこのCRC符号生成装
置に供給して上述のようにCRC符号を生成させる。
Further, this CPU generates the mode signal shown in FIG. 2(C) and the start signal shown in FIG. Generate a code.

CRC符号生成の対象とするデータブロックの処理が終
了するとCPUIIは第1図のゲート6を導通させるた
めのゲート信号をこのCRC符号生成装置に印加してそ
の演算結果をCRC符号として読出してデータバス上に
出力し、このデータバス上のCRC符号は上記データブ
ロックの最後に付加されて受信側に伝送される。
When the processing of the data block for which the CRC code is to be generated is completed, the CPU II applies a gate signal to the CRC code generator to turn on the gate 6 shown in FIG. The CRC code on this data bus is added to the end of the data block and transmitted to the receiving side.

なお、受信側では受信データの誤りをこのCRC符号を
用いて検出・訂正するために使用することはいうまでも
ない。
It goes without saying that the receiving side uses this CRC code to detect and correct errors in received data.

なお、以上の説明では8ビツトのパラレルデータを例に
とって説明したが、16ビツトのパラレルデータの場合
には第1図の16進カウンタ2を32進カウンタに、ま
たシフトレジスタ1およびフリップ・フロップ回路5を
16個の素子によってそれぞれ構成すればよいことは明
かであろう。
In the above explanation, 8-bit parallel data was used as an example, but in the case of 16-bit parallel data, the hexadecimal counter 2 in FIG. It is obvious that each of the elements 5 may be constructed of 16 elements.

また、このときの演算回路4としては、16進データに
ついての所要の生成多項式の演算を行い得るものでなけ
ればならないことはいうまでもない。
Further, it goes without saying that the arithmetic circuit 4 at this time must be able to perform the required generator polynomial arithmetic on hexadecimal data.

同様に16ビツト以上のパラレルデータについてのCR
C符号生成装置を構成し得ることもいうまでもなく明か
であろう。
Similarly, CR for parallel data of 16 bits or more
Needless to say, it is also possible to configure a C code generation device.

す、CPUの負担も少ないという格別の効果が達成でき
る。
The special effect of reducing the burden on the CPU can be achieved.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の実施例の構成を示すブロック図、第2
図はその動作を説明するためのタイムチャート、 第3図は本発明によるCRC符号生成装置を適用したデ
ータ処理装置の構成図である。 1・・・シフトレジスタ、4・・・演算回路、5・・・
フリップ・フロップ回路、6・・・ゲート回路。 〔発明の効果〕
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention, and FIG.
The figure is a time chart for explaining its operation, and FIG. 3 is a block diagram of a data processing apparatus to which the CRC code generation apparatus according to the present invention is applied. 1...Shift register, 4...Arithmetic circuit, 5...
Flip-flop circuit, 6... gate circuit. 〔Effect of the invention〕

Claims (1)

【特許請求の範囲】 パラレルデータをラッチするシフトレジスタ(1)と、 このシフトレジスタからのシフト出力が入力される演算
回路(4)と、 この演算回路(4)による演算結果をビットごとにラッ
チするとともに、上記シフトレジスタからのシフト出力
の演算期間中に各ビットごとのデータを上記演算回路(
4)に供給するフリップ・フロップ回路(5)とを備え
、 巡回冗長検査符号を生成すべきデータブロックの処理が
終了したときに上記演算回路(4)から巡回冗長検査符
号をパラレルデータとして出力することを特徴とする巡
回冗長検査符号生成装置。
[Claims] A shift register (1) that latches parallel data, an arithmetic circuit (4) into which the shift output from the shift register is input, and latches the arithmetic results of the arithmetic circuit (4) bit by bit. At the same time, during the calculation period of the shift output from the shift register, each bit of data is sent to the calculation circuit (
4), and outputs the cyclic redundancy check code as parallel data from the arithmetic circuit (4) when the processing of the data block for which the cyclic redundancy check code is to be generated is completed. A cyclic redundancy check code generation device characterized by:
JP63253921A 1988-10-11 1988-10-11 Cyclic redundancy inspection code generator Pending JPH02101824A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63253921A JPH02101824A (en) 1988-10-11 1988-10-11 Cyclic redundancy inspection code generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63253921A JPH02101824A (en) 1988-10-11 1988-10-11 Cyclic redundancy inspection code generator

Publications (1)

Publication Number Publication Date
JPH02101824A true JPH02101824A (en) 1990-04-13

Family

ID=17257878

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63253921A Pending JPH02101824A (en) 1988-10-11 1988-10-11 Cyclic redundancy inspection code generator

Country Status (1)

Country Link
JP (1) JPH02101824A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6560746B1 (en) 1998-08-26 2003-05-06 Telefonaktiebolaget Lm Ericsson Parallel CRC generation circuit for generating a CRC code
KR100433632B1 (en) * 2002-04-09 2004-05-31 한국전자통신연구원 Apparatus and method for calculating CRC in parallel

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6560746B1 (en) 1998-08-26 2003-05-06 Telefonaktiebolaget Lm Ericsson Parallel CRC generation circuit for generating a CRC code
KR100433632B1 (en) * 2002-04-09 2004-05-31 한국전자통신연구원 Apparatus and method for calculating CRC in parallel

Similar Documents

Publication Publication Date Title
JPS648374B2 (en)
JPH02101824A (en) Cyclic redundancy inspection code generator
US5694405A (en) Encoder and decoder of an error correcting code
JPS62233932A (en) Decoding circuit for bch code
KR100439225B1 (en) A circuit of error inspection for high rate data
JP2536435Y2 (en) Parity counting circuit
JP2725419B2 (en) Counting circuit
SU785868A2 (en) Device for correcting counter check digit
JP2003037504A (en) Device for generating gray code
JP3513399B2 (en) Variable timing device using serial data
JPS6194151A (en) Parity check circuit
JPH03119835A (en) Error correction circuit
JPH05151007A (en) Crc arithmetic unit
JPS62216446A (en) Frame synchronism protecting system
SU651418A1 (en) Shift register
JPS6165680A (en) Error correction circuit
JP4114722B2 (en) State circuit
JP2848734B2 (en) Error detection and correction device
KR950009689B1 (en) Crc apparatus cepable of dividing block boundary in byte synchronized data
JPS6159547A (en) Device for checking error correcting function
JPH08125494A (en) Moving average filter
JPH02162823A (en) Pseudo generation pattern checking device
JPS61169952A (en) Automatic checking method of one-bit error correcting function of memory
JPS61161026A (en) Code error detection circuit
JPS62263542A (en) Parity bit generating circuit