JPS61277230A - Error detecting and correcting code generating system - Google Patents

Error detecting and correcting code generating system

Info

Publication number
JPS61277230A
JPS61277230A JP11847085A JP11847085A JPS61277230A JP S61277230 A JPS61277230 A JP S61277230A JP 11847085 A JP11847085 A JP 11847085A JP 11847085 A JP11847085 A JP 11847085A JP S61277230 A JPS61277230 A JP S61277230A
Authority
JP
Japan
Prior art keywords
data
bits
bit
ecc
circuit
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
JP11847085A
Other languages
Japanese (ja)
Inventor
Makoto Sato
誠 佐藤
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP11847085A priority Critical patent/JPS61277230A/en
Publication of JPS61277230A publication Critical patent/JPS61277230A/en
Pending legal-status Critical Current

Links

Landscapes

  • Error Detection And Correction (AREA)

Abstract

PURPOSE:To detect and correct errors with a small scale circuit by providing a fundamental generating pattern operating circuit, which generates a prescribed code word from data divided by a data dividing circuit, and an accumulating circuit which accumulates operated code words. CONSTITUTION:128-bit data is divided to 4 blocks by 32 bits and 8-bit generated ECC is divided to 4 blocks by 2 bits in the circuit, and 2-bit ECC is added to 32-bit data when viewed from the external, and for example, a required area of a memory for ECC is reduced with respect to handling of ECC in an external connecting device. The constitution of the circuit is made small-scale and simple because the number of bits of fundamental data is 32. In the ECC generating method, 128-bit input block units are operated regularly in 8-bit units to simplify very much the constitution of a fundamental part as an ECC generating means. Thus, errors are detected and corrected with the small-scale circuit constitution.

Description

【発明の詳細な説明】 〔産業上の利用分野] 本発明はデータ列に数ビットのコードを付加して、デー
タ列中に生じた誤りを検出訂正することを可能にする誤
り検出訂正符号発生方式に関するものである。
[Detailed Description of the Invention] [Industrial Application Field] The present invention is an error detection and correction code generation method that adds a several-bit code to a data string and makes it possible to detect and correct errors occurring in the data string. It is related to the method.

L開示の概要] 本明細書及び図面は、データ列に数ビットの例えばハミ
ングコード等の線形符号を付加してデータ列中に生じた
誤りを検出訂正する誤り検出訂正符号発生方式において
、前記線形符号の生成マトリクスを複数のマトリクスブ
ロックに分割し、入力データを前記マトリクスブロック
の列方向と同じ長さの複数個のブロックに分割し、前記
線形符号を生成する時は前記ブロック毎に前記マトリク
スブロックにより符号語を生成して、該符号語の組合せ
から前記線形符号を再構成する事により、誤り訂正のた
めの符号の冗長度を減らして、かつ回路規模を小さくす
る技術を開示する。
[Summary of Disclosure] This specification and drawings describe an error detection and correction code generation method that detects and corrects errors occurring in a data string by adding a linear code of several bits, such as a Hamming code, to a data string. The code generation matrix is divided into a plurality of matrix blocks, the input data is divided into a plurality of blocks having the same length as the column direction of the matrix block, and when the linear code is generated, the matrix block is divided for each block. This invention discloses a technique for reducing the redundancy of codes for error correction and reducing the circuit size by generating code words and reconstructing the linear code from a combination of the code words.

[従来の技術] ランダムに発生するデータ誤りを訂正する符号として線
形符号が有名であり、従来の例えばハミングコード等の
線形符号を用いた誤り検出訂正符号発生方式において付
加されるエラーチェックコード(以下、ECCという)
のビットの数は、データ長内で発生する1ビツトの誤り
を訂正するためには 2nビツトの長さをもつデータに
対して最小(n+ 1)ビットであることが知られてい
る0例として32ビツトのデータを取り扱う場合この中
に生じる1ビツトの誤りを訂正するためには6ビツトの
ECCを付加する必要がある。このような機能を有する
従来の誤り検出訂正符号発生方式においては、連続して
入力される4個の32ビツトデータ、即ち128ビツト
長のデータに対しては6ビツトずつの4回で計24ビッ
トのECCが付方lされることになり、伝送速度を表わ
す情報率は128/ (128+24)=0.84であ
る。一方、128 (=27)ビットのデータから直接
ECCを生成すれば、その符号長は8ビツトであるから
その情報率は128/(128+8)=0.94である
から、32ビツト毎にECCを生成した時はかなり能率
が悪化している事がわかる。しかし128ビツトのデー
タから直接8ビツトのECCを生成し、それをもって1
ビツトの誤り訂正をする回路は、前記32ビツトデータ
に対して6ビツトのECCでもって誤り訂正をする回路
に比べてはるかに複雑になってしまう。
[Prior Art] Linear codes are well-known as codes for correcting data errors that occur randomly, and error check codes (hereinafter referred to as , ECC)
As an example, it is known that the number of bits is the minimum (n + 1) bits for data with a length of 2n bits in order to correct a 1-bit error that occurs within the data length. When handling 32-bit data, it is necessary to add 6-bit ECC to correct a 1-bit error that occurs in the data. In the conventional error detection and correction code generation system having such a function, for four consecutively input 32-bit data, that is, 128-bit data, 6 bits each are generated four times for a total of 24 bits. ECC is added, and the information rate representing the transmission rate is 128/(128+24)=0.84. On the other hand, if ECC is directly generated from 128 (=27) bits of data, the code length is 8 bits and the information rate is 128/(128+8)=0.94, so ECC is generated every 32 bits. You can see that the efficiency has deteriorated considerably when it is generated. However, it is possible to generate 8-bit ECC directly from 128-bit data and use it to generate 1
A circuit that corrects bit errors is much more complicated than a circuit that corrects errors using 6-bit ECC for 32-bit data.

またECCを生成する手段は、リード・ソロモン法で行
なうと、生成のための演算は複雑で扱うデータのビット
数が増えるに従って更に繁雑になる。
Furthermore, when the Reed-Solomon method is used as the means for generating ECC, the calculation for generation is complex and becomes more complicated as the number of bits of data to be handled increases.

[発明が解決しようとする問題点] このように従来技術では回路規模を小さくしようと思え
ば冗長度が増え効率が下がり、冗長度を減らそうと思え
ば回路規模が大きくなってしまうというように、冗長度
と回路規模は反比例する関係にあった0本発明は上述し
た従来技術の欠点に鑑みなされたもので、その目的は冗
長度を低く押えた上で、回路規模の小さい誤り検出訂正
符号発生方式を提供する事を課題とする。
[Problems to be solved by the invention] In this way, with conventional technology, if you try to reduce the circuit scale, redundancy increases and efficiency decreases, and if you try to reduce redundancy, the circuit scale increases. , redundancy and circuit scale were inversely proportional to each other.The present invention was made in view of the above-mentioned drawbacks of the prior art, and its purpose is to reduce redundancy and create an error detection and correction code with a small circuit scale. The challenge is to provide a generation method.

[問題点を解決するための手段] 上記課題を達成するために、例えば第113]に示され
た実施例の誤り検出訂正符号発生方式は、線形符号とし
て例えばハミングコードを用い、入力データを所定の長
さに分割するデータ分割回路lOOと、ハミングコード
の生成マトリクスを複数のマトリクスブロックに分割し
て得た基本生成パターンに基ずいて、データ分割回路1
00により分割されたデータから所定の符号語102を
生成する基本生成パターン演算回路101と、該基本生
成パターン演算回路101により演算された符号語10
2を累積する累積回路103とを有する。
[Means for Solving the Problems] In order to achieve the above-mentioned problems, the error detection and correction code generation system of the embodiment shown in, for example, No. 113 uses, for example, a Hamming code as a linear code, and input data is Based on the data division circuit lOO that divides the Hamming code into lengths, and the basic generation pattern obtained by dividing the Hamming code generation matrix into multiple matrix blocks, the data division circuit 1
A basic generation pattern calculation circuit 101 that generates a predetermined code word 102 from data divided by 00, and a code word 10 calculated by the basic generation pattern calculation circuit 101.
It has an accumulation circuit 103 that accumulates 2.

[作用] 上記構成において、累積回路103は前記分割した個数
の回数だけ符号語102を累積して、入力データ全体の
誤り検出訂正符号104を発生する。
[Operation] In the above configuration, the accumulation circuit 103 accumulates the code words 102 as many times as the divided number, and generates the error detection and correction code 104 for the entire input data.

[実施例J 以下、添付図面に基ずいて本発嘴の実施例に係る誤り検
出訂正符号発生方式を128ビツトデータの誤り検出訂
正に適用した場合の回路を例にして説明する。
[Embodiment J] Hereinafter, a circuit in which the error detection and correction code generation system according to the embodiment of the present invention is applied to error detection and correction of 128-bit data will be explained based on the accompanying drawings.

実施例回路の概略は以下のようである。128ビツトの
入力データに対して最終的に8ビツトのECCを付加す
るために、回路は32ビット単位で動作するように構成
して回路の共通化と小規模 ・化を図る。即ち、回路内
において128ビツトのデータは32ビツトずつ、生成
された8ビツトのECCは2ビツトずつ、それぞれ4つ
のブロックに分割し、外部から見た場合32ビツトのデ
ータに対して2ビツトのみのECCを付加している形に
なり、外部接続装置のECCに関する取り扱い、例えば
メモリの必要領域が少なくて済むことになる。また回路
の構成も、基本となるデータのビット数が32であるの
で小規模かつ単純な構成で実現できる。ざらにECCの
生成方法は128ビツトの入力のブロック単位さらに8
ビット単位で規則的な演算で実行できるようにし、EC
Cの生成手段としての基本的な部分を非常に単純な構成
でできるようになっている。
The outline of the example circuit is as follows. In order to finally add 8-bit ECC to 128-bit input data, the circuit is configured to operate in units of 32 bits to make the circuit common and smaller. That is, within the circuit, 128-bit data is divided into four blocks each of 32 bits, and the generated 8-bit ECC is divided into four blocks of 2 bits each. When viewed from the outside, 32-bit data is divided into only 2-bit blocks. Since ECC is added, handling of the ECC of the externally connected device, for example, the required memory area can be reduced. Furthermore, since the basic number of bits of data is 32, the circuit configuration can be realized with a small scale and simple configuration. Roughly speaking, ECC is generated in block units of 128-bit input and 8
Enables execution of regular operations on a bit-by-bit basis, and EC
The basic part of the C generation means can be done with a very simple configuration.

第2図(a) 〜(d)は、128ビツト長の入力デー
タに8ビツトのECCC本例の場合はハミングコード〕
を生成するためのマトリクスパターンである。マトリク
ス中の°X”は排他的論理和(以後Ex−ORという)
をとることを示し、入力した128ビツトデータの中で
行方向の” x ”に対応するデータビットのEx−O
Rをとり、8ビツトのECCを得る0例えば、第2図(
IL)の例では、入力データビットをDo ”’D31
とすればECCo−Dz■D3■D5■D7ΦD9■D
11■013■015Φ017■DI9■D21■D2
3■D25■027■D29ΦD31となる(Φは排他
論理和を表す)。又は、X印に対応する位置のデータ成
分の“l”である個数とその行に対応するECCのビッ
トとが奇数になるようにECCのビットを生成するとい
うものであってもよい。
Figures 2 (a) to (d) show 8-bit ECCC Hamming code for 128-bit input data.]
This is a matrix pattern for generating . °X” in the matrix is exclusive OR (hereinafter referred to as Ex-OR)
Ex-O of the data bit corresponding to "x" in the row direction in the input 128-bit data.
For example, in Figure 2 (
In the example of IL), the input data bits are Do ”'D31
Then, ECCo-Dz■D3■D5■D7ΦD9■D
11■013■015Φ017■DI9■D21■D2
3■D25■027■D29ΦD31 (Φ represents exclusive OR). Alternatively, the ECC bits may be generated so that the number "l" of data components at the position corresponding to the X mark and the ECC bit corresponding to that row are odd numbers.

この全体として8X128のマトリクスパターンを32
ビツトずつの4個の8×32の大ブロックに分けた場合
の個々の大ブロックを第2図(a)〜(d)に表す、更
に各32ビツトの大ブロックを4等分(点線にて表示)
して、8×8の小ブロックに分割してみると次の事がわ
かる。
As a whole, 32 8x128 matrix patterns are used.
Figures 2(a) to (d) show the individual large blocks when divided into four 8x32 large blocks each containing 32 bits. Furthermore, each large block of 32 bits is divided into four equal parts (indicated by dotted lines). display)
When we divide it into 8x8 small blocks, we find the following.

先ず、ECCの下位5ピツ) Co NC4に対応する
°゛X″のパターンは大ブロツク間では、同一の小ブロ
ツク同士では共通である事、次にECCの上位3ピツ)
C5〜C7がその小ブロツク固有のパターンで構成され
ている事である。尚、0から昇順に上位となるものとす
る。
First, the ゛X'' pattern corresponding to Co NC4 (lower 5 pits of ECC) is common between large blocks and the same small blocks, and secondly, the upper 3 pits of ECC)
C5 to C7 are composed of a pattern unique to that small block. It is assumed that the numbers are ranked in ascending order starting from 0.

つまり、小ブロックの下位3ビツトに対応する・・工・
・のパターン3×8は全ての小ブロックでいずれも同一
になっている。従ってECCを得るための最小限必要な
x ”の基本変換パターンは第3図の如きマド9クスで
あって、基本人力データ8ビツト毎に対して第3図の5
X8マトリクスに示された変換パターンの組合せにより
、ECCの基本用力5ビットが得られるのである。
In other words, corresponding to the lower 3 bits of the small block...
The pattern 3×8 is the same in all small blocks. Therefore, the minimum required basic conversion pattern for x'' to obtain ECC is the Mad9x pattern as shown in Figure 3.
By combining the conversion patterns shown in the X8 matrix, 5 bits of ECC basic utility can be obtained.

以上の生成マトリクスの分割は次の事から正しいと言え
る。Ex−OR演算に対しては結合体(法則)が成立す
る。従って、128ビツト/データのデータから生成し
たECC8ビットと、32ビツト/データに対して第2
図(a)〜(d)の生成マトリクスによりECC8ビッ
トを各大ブロツク毎に生成し、各大ブロツク毎に生成さ
れたECC8ビット同士でEx−ORして生成した8ビ
ツトの・ECCとは等しい。この事は小ブロックの8ビ
ツト/データに対しても同様にあてはまる。従って8ビ
ツト/データに対してEx−OR@箕を行っても、最終
的には128ビツト/データに対するEx−OR出力で
あるECCは得られるのである。
The above division of the generation matrix can be said to be correct from the following points. A combination (law) holds true for the Ex-OR operation. Therefore, the ECC 8 bits generated from 128 bits/data and the second ECC for 32 bits/data.
It is equal to the 8-bit ECC generated by generating 8 bits of ECC for each large block using the generation matrix shown in Figures (a) to (d), and performing Ex-OR of the 8 bits of ECC generated for each large block. . This also applies to small blocks of 8 bits/data. Therefore, even if Ex-OR@win is performed for 8 bits/data, ECC, which is the Ex-OR output for 128 bits/data, is finally obtained.

又、128ビツトデータに対して、実施例の特徴がよく
認識され、かつ回路規模との兼ね合いで適当な単位デー
タ長は32ビツト長が適当である。従って以下の実施例
では32ビツトを処理の基本単位とする。
Further, for 128-bit data, the characteristics of the embodiment are well recognized, and in view of the circuit scale, an appropriate unit data length is 32 bits. Therefore, in the following embodiment, 32 bits are used as the basic unit of processing.

以上の事を踏まえて、第4図(a)に詳細なECCの生
成回路(以下、ECCGという)の構成を示す、第4図
(IL)のECCGIOの入力は、32ビツトのデータ
、大ブロックの番号1〜4を示す2ビツトの信号及び出
力ストローブであるストローブ信号とが入力し、出力は
ECC8ビットである。
Based on the above, the detailed configuration of the ECC generation circuit (hereinafter referred to as ECCG) is shown in Figure 4 (a).The input to ECCGIO in Figure 4 (IL) is 32-bit data, large block A 2-bit signal indicating numbers 1 to 4 and a strobe signal which is an output strobe are input, and the output is an ECC 8-bit signal.

32ビツトのデータ(DoxD3x)は8ビツト毎にR
OM1〜4に入り(例えば、第2図(a)の例では小ブ
ロック1のデータがROMIに、小ブロック2のデータ
がROM2に、小ブロック3のデータがROM3に、小
ブロック4のデータがROM4に入力される)、それぞ
れ5ビツト合計20ビットのコードとして出力される。
32-bit data (DoxD3x) is R every 8 bits.
OM1 to OM4 (for example, in the example of Fig. 2(a), the data of small block 1 is stored in ROMI, the data of small block 2 is stored in ROM2, the data of small block 3 is stored in ROM3, and the data of small block 4 is stored in ROMI). (input into the ROM 4) and output as a 5-bit code for a total of 20 bits.

この8ビツト・データ入力に対するROM1〜4は4個
とも前述の第3図に示すようなEx−ORを行うパター
ンで構成されており、8ビツトのアドレス入力を持つ汎
用のROMであり、概略を第4図(b)に示す。
All four ROMs 1 to 4 for this 8-bit data input are configured with a pattern that performs Ex-OR as shown in Figure 3 above, and are general-purpose ROMs with an 8-bit address input. It is shown in FIG. 4(b).

先ずROM1〜4の出力0uto ”0ut2  (第
4図)について説明する。ROM1〜4はアドレス入力
AO〜A7に8ビツトデータを入力し、その出力である
例えばOutoは第3図の基本変換パターンツバターン
″0パに基づいてEx−ORを予め行って記憶されてい
るものを出力する。例えばROMIにDo−D7= ”
01100101”が入力した場合の出力Outoは第
3図のパターンOに従ってD1■D3■D5■D7=”
l”となる(■は排他論理和を表す)。同様に、Out
lは第3図のパターン1に従ってOutz = D 2
■D3■D6■p7=“O” 、0ut2 =D4ΦD
5■D8■D7=”O”である、このようなROMの4
つが夫々Do ND? 、 Da 〜Dz 5 、 D
z 6〜D23、D24〜031を入力して、0uto
 、 0utz、0ut2を4組w力する。Ex−OR
回路5はこれら12ビツトを入力して各ROMのOut
毎にEx−ORを取り、3ビツトの排他的論理和を出力
する。このEx−OR回路5の排他的論理和出力は結局
32ビツト/データのECC8ビットの下位3ビツトで
ある。
First, the outputs 0uto "0ut2 (Fig. 4) of ROM1-4 will be explained. ROM1-4 input 8-bit data to address inputs AO-A7, and the output, for example, Outo, is the basic conversion pattern block shown in Fig. 3. Ex-OR is performed in advance on the basis of turn "0" and the stored value is output. For example, Do-D7=” in ROMI
When “01100101” is input, the output Out is D1■D3■D5■D7=” according to pattern O in Figure 3.
l” (■ represents exclusive OR).Similarly, Out
l is Outz = D 2 according to pattern 1 in Figure 3.
■D3■D6■p7=“O”, 0ut2=D4ΦD
5■D8■D7="O", 4 of such ROM
Do each one do ND? , Da ~ Dz 5, D
Input z 6~D23, D24~031, 0uto
, 0utz, 0ut2 are applied four times. Ex-OR
Circuit 5 inputs these 12 bits and outputs each ROM's Out.
Ex-OR is performed for each time, and a 3-bit exclusive OR is output. The exclusive OR output of this Ex-OR circuit 5 is the lower 3 bits of the 8 bits of ECC of 32 bits/data.

Ex−OR回路5は第4図(b)(7)ようにROM1
からのROM4までの8ビツト/データに対する0ut
o テE x −ORを取り、ROM1〜4OM4まで
の8ビツト/データに対する0utzのEx−ORを取
り、ROMl−ROM4tで17)8ビツト/データに
対するO ut3のEx−ORを取り、これらの3つの
Ex−OR出力をデータとして夫々出力する。即ち、E
x−OR回路5の3ビツトの田方は大ブロックである3
2ビツト/データに対するECCビット0〜2となる。
The Ex-OR circuit 5 is connected to the ROM1 as shown in FIG. 4(b)(7).
0ut for 8 bits/data from to ROM4
o Take Te Ex-OR, take Ex-OR of 0utz for 8 bits/data from ROM1 to 4OM4, take Ex-OR of Out3 for 17) 8 bits/data from ROM1-ROM4t, and calculate these 3 The two Ex-OR outputs are respectively output as data. That is, E
The 3 bits of the x-OR circuit 5 are large blocks 3
ECC bits 0 to 2 for 2 bits/data.

尚、Ex−OR回路5は論理ゲートで構成してもよいが
、ROMで構成すれば回路構成がより簡単となる。
Note that the Ex-OR circuit 5 may be constructed from logic gates, but the circuit construction will be simpler if it is constructed from a ROM.

32ビツト/゛データのECC8ビットのうち残りの上
位5ビツト3〜7は、第4fgJ(a)に示すようにR
OM1〜4の各出力のうち、必要な5ビツト及び前記ブ
ロック番号を表わす2ビツトの信号とともに6のエンコ
ーダによって得られる。以下、詳細に説明する。
The remaining upper 5 bits 3 to 7 of the 8 ECC bits of 32 bits/' data are R as shown in 4th fgJ(a).
Out of each output of OM1-4, the necessary 5 bits and a 2-bit signal representing the block number are obtained by encoder 6. This will be explained in detail below.

前述したように1から4までの8×32の各大ブロック
を比較検討してみると、小ブロックlの下位(θ〜4)
5ビツトの5×8のマトリクスパターンは大ブロツク間
で全て同じである。又、32ビツト/データのECCの
上位3ビツト(5〜7)を決定する生成パターンは、第
3図のパターン3とパターン4との組合せである。従っ
て32ビツト/データのECC8ビットの上位3ビツト
を得るためにはROM1〜4の各ROMから出力すべき
2ビツトの情報とブロック番号を表す情報2ビツトの計
10ビットでエンコーダROM6を構成して、内部でE
x−OR演算を行えば原理的に32ビツト/データのE
CC8ビットの上位5ビツトが得られる。第4図(a)
の回路では、エンコーダROM6へのROM1〜4から
の入力が5ビツトであるのは次の理由による。ECC8
ビットの上位5ビツトを得るには各ビットについて16
個の小ブロックが対応し、5X16=80であるから、
27=12’8>80であるから、全部で7ビツトの入
力、即ちブロック番号の2ビツトを除いた5ビツトをR
OM1〜4から入力すればよい事になる。
As mentioned above, when we compare and examine each 8×32 large block from 1 to 4, we find that the lower order of small block l (θ~4)
The 5-bit 5x8 matrix pattern is all the same between large blocks. The generation pattern for determining the upper three bits (5 to 7) of the 32-bit/data ECC is a combination of patterns 3 and 4 in FIG. Therefore, in order to obtain the upper 3 bits of the 8 bits of ECC of 32 bits/data, encoder ROM 6 is configured with 2 bits of information to be output from each ROM 1 to 4 and 2 bits of information representing the block number, a total of 10 bits. , internally E
In principle, if you perform an x-OR operation, E of 32 bits/data
The upper 5 bits of CC8 bits are obtained. Figure 4(a)
In this circuit, the input from ROMs 1 to 4 to encoder ROM 6 is 5 bits for the following reason. ECC8
16 for each bit to get the top 5 bits
Since there are 5x16=80 corresponding small blocks,
Since 27=12'8>80, a total of 7 bits of input, that is, 5 bits excluding 2 bits of the block number, are input to R.
It is sufficient to input from OM1 to OM4.

こうして生成された32ビツト/データ毎の8ビツトの
ECCは、尽前の32ビツト/データで生成された8ビ
ツトのECCと共にEx−OR回路7において対応する
ビット毎にEx−ORが取られて、ラッチ8に大ブロツ
ク毎にラッチされる。上記操作を大ブロック1から大ブ
ロック4まで繰返せば128ビツト/データに対するE
CC8ビットが得られる。尚、ゲート回路9は、前述し
たように32ビツト毎にECC8ビットをEx−ORし
てラッチ8に累積していくためのフィードバックのため
の回路であり、又、128ビツト毎(っまり4ブロツク
毎に)ラッチ8をクリアする1動きをもつ。つまり、ブ
ロック番号4の32ビツト/データに対するECCに、
Ex−OR回路7でEx−ORM算が為され、ラッチ8
にラッチされて始めて、128ビツトのデータに対する
8ビツトのECCが得られることになる。こうして、1
28ビツトという長いデータに対しても回路規模を大き
くする事なく、最小の冗長度でECCが得られる。
The 8-bit ECC for each 32 bits/data thus generated is Ex-ORed for each corresponding bit in the Ex-OR circuit 7 together with the 8-bit ECC generated for the previous 32 bits/data. , are latched in latch 8 for each large block. If the above operation is repeated from large block 1 to large block 4, E for 128 bits/data
CC8 bits are obtained. As mentioned above, the gate circuit 9 is a feedback circuit for Ex-ORing the 8 ECC bits every 32 bits and accumulating them in the latch 8. each time) has one movement that clears latch 8. In other words, the ECC for 32 bits/data of block number 4 is
Ex-ORM calculation is performed in Ex-OR circuit 7, and latch 8
An 8-bit ECC for 128-bit data is obtained only after the data is latched. In this way, 1
Even for long data of 28 bits, ECC can be obtained with minimum redundancy without increasing the circuit scale.

以上に示したEC:CG10は、以下のECC付加回路
(第5図)及び誤り検出訂正回路(第6図)において共
通のものである。
The EC:CG 10 shown above is common to the following ECC addition circuit (FIG. 5) and error detection and correction circuit (FIG. 6).

次にECC付加回路について第5図を用いて説明する。Next, the ECC addition circuit will be explained using FIG. 5.

ECC付加回路には外部データバスを介して外部入力デ
ータが、またこのデータが有効であることを示す入力イ
ネーブル信号が入力する。
External input data and an input enable signal indicating that this data is valid are input to the ECC addition circuit via an external data bus.

11は入力するデータを32ビット単位のデータに変換
するとともに、外部データバスからの次のデータが合計
32ビツト入力されるまで前の32ビツトのデータを保
持する機能を有するラッチである。12は前記入力デー
タに対するイネーブル信号から32ビツトのブロック単
位のデータに対するイネーブル信号及びこのイネーブル
信号を利用してブロック番号1〜4を表わす2ビツトの
信号を送出するもので、F/F等で構成されるタイミン
グ回路でめ゛る。10は前述のECC生成回路(E C
CG)である。128ビツトのデータに対するECCが
10から送出されるまで、ラッチ11からは32ビツト
のデータを順に送出する必要があるので、各32ビツト
/ブロツクのデータに対しラッチ13で4ブロツク分遅
延させる必要がある。14はECCG 10で得られた
8ビツトのECCを1サイクル(4ブロツクのデータを
処理する時間)の間保持するラッチである。15は8ビ
ツトのECCを2ビツトずつ4つに分割し、各32ビツ
ト/ブロツクに対し2ビツトずつ振り分けるもので、前
記ブロック番号の表わす2ビツトの信号を利用してデー
タセレクタ等で構成できる。16は出力ラッチで、32
ビツトのデータと15で得られた2ビツトのECCを一
緒に外部に送出して、例えばメモリ等の記憶装置等に送
出する。つまり、128ビツト十ECC8ビツト計13
6ビツトを(32ビツト+2ビツト)X4回送出する。
A latch 11 has the function of converting input data into data in units of 32 bits and holding the previous 32 bits of data until the next data of 32 bits in total is input from the external data bus. Reference numeral 12 is a device that sends out an enable signal for the input data to 32-bit block data and a 2-bit signal representing block numbers 1 to 4 using this enable signal, and is composed of F/F etc. The timing circuit used is amazing. 10 is the aforementioned ECC generation circuit (ECC
CG). Since it is necessary to sequentially send 32-bit data from latch 11 until the ECC for 128-bit data is sent from 10, it is necessary to delay each 32-bit/block data by 4 blocks in latch 13. be. 14 is a latch that holds the 8-bit ECC obtained by ECCG 10 for one cycle (time to process 4 blocks of data). 15 divides the 8-bit ECC into four parts of 2 bits each and distributes 2 bits to each 32 bits/block, and can be configured with a data selector or the like using the 2-bit signal represented by the block number. 16 is the output latch, 32
The bit data and the 2-bit ECC obtained in step 15 are sent to the outside together, for example, to a storage device such as a memory. In other words, 128 bits + 8 bits ECC, total 13
Send 6 bits (32 bits + 2 bits) x 4 times.

勿論、ECC8ビットを2ビツトずつに振り分けないで
計136ビツトを一括してもよい。
Of course, the 8 ECC bits may not be divided into 2 bits at a time, but a total of 136 bits may be used all at once.

次に誤り検出訂正回路について$6図を用いて説明する
0本実施例の誤り検出訂正符号発生方式は入力するデー
タからいわゆるエラーシンドロームを算出して、得られ
たエラーシンドロームとECCGIOにて生成されたE
CC8ビットとから、エラービットの位置を検出し訂正
するものである。
Next, the error detection and correction circuit will be explained using the $6 diagram.The error detection and correction code generation method of this embodiment calculates the so-called error syndrome from the input data, and uses the obtained error syndrome and ECCGIO to generate the error detection and correction code. E
The position of the error bit is detected and corrected from the CC8 bits.

誤り検出訂正回路には例えばメモリ回路等の外部から3
2ビツトのデータ及び2ビツトのECC1さらにこれら
の入力データに対するイネーブル信号が入るものとする
。20は入力ラッチである。21はイネーブル信号から
ブロック番号を表わす2ビツトの信号を生成するタイミ
ング発生回路で、F/F等で構成される。10は前述の
・ECCGである。22はブロック毎に入力した2ビツ
トのECCを4ブロツク分まとめて8ビツトのECCに
復元再生するラッチである。24はECCGIOにおい
て入力データから生成したECCと、ラッチ22におい
て再生した、前述の第4図(a)のECC付加回路で生
成したECCとからシンドロームを生成するシンドロー
ム生成回路で、ビット毎のEx−OR回路から構成され
る。
For example, the error detection and correction circuit is connected to a
It is assumed that 2-bit data, 2-bit ECC1, and an enable signal for these input data are input. 20 is an input latch. 21 is a timing generation circuit that generates a 2-bit signal representing a block number from an enable signal, and is composed of an F/F and the like. 10 is the aforementioned ECCG. Reference numeral 22 denotes a latch that restores and reproduces the 2-bit ECC input for each block into 8-bit ECC for four blocks at a time. 24 is a syndrome generation circuit that generates a syndrome from the ECC generated from the input data in the ECCGIO and the ECC generated by the ECC adding circuit shown in FIG. Consists of an OR circuit.

で5はシンドローム生成回路24で得られたシンドロー
ムから、エラーの生じたビットのアドレス(0〜127
〕を得るシンドロームデータ生成回路であり、8ビツト
アドレス入力のROM等で構成される。シンドロームデ
ータ生成回路25で得られたデータ8ビツトのうち下位
7ビツトは(0〜127)の2進表現でエラービットア
ドレスを表わし、最上位ビットはエラーの有無を表わし
ている。ラッチ26でこのアドレス・データはlサイク
ル間ラッチされる。このアドレス−データのうち上から
2ビツト目、3ビツト目は、ブロック番号を表わすよう
にすれば、デコーダ27において、タイミング発生回路
21で作ったブロック番号の信号と比較しエラーの生じ
たアドレスの属するブロック番号と一致し、かつラッチ
26からのエラー有無の信号を見てエラー有りと判断さ
れた場合に、訂正指示回路28はこのエラー情報とエラ
ーアドレス情報とからEx−OR回路29内の所定のブ
ロック番号の所定のアドレスの32ビツトデータの1ビ
ツトを反転させる。この訂正指示回路28はエラーが無
かった場合、若しくはエラー有りと認められても出力し
ようとするデータのブロック番号と、エラーの生じたビ
ットのアドレスが属するブロック番号と違う時には各ビ
ットとも“0″を送出し、訂正は行わない。
5 is the address (0 to 127) of the bit where the error occurred from the syndrome obtained by the syndrome generation circuit 24.
This is a syndrome data generation circuit that obtains the following information: Of the 8 bits of data obtained by the syndrome data generation circuit 25, the lower 7 bits represent an error bit address in binary representation (0 to 127), and the most significant bit represents the presence or absence of an error. This address data is latched in latch 26 for l cycles. If the second and third bits from the top of this address data represent the block number, the decoder 27 compares it with the block number signal generated by the timing generation circuit 21 and determines the address where the error occurred. If it matches the block number to which it belongs and it is determined that there is an error by looking at the error presence/absence signal from the latch 26, the correction instruction circuit 28 uses this error information and error address information to select a predetermined value in the Ex-OR circuit 29. 1 bit of the 32-bit data at the predetermined address of the block number is inverted. This correction instruction circuit 28 outputs "0" for each bit when there is no error or when the block number of the data to be output and the address of the bit where the error occurs are different from the block number to which it belongs even if it is recognized that there is an error. will be sent and no corrections will be made.

Ex−OR回路29において訂正された32ビツトのデ
ータは変換器30において外部データバスのビット数に
変換される。31は出力ラッチである。こうして、エラ
ーシンドロームは前記小規模のECCG lOにて生成
されるので第6図の誤り検出訂正回路も小規模となり、
このような小規模の回路であっても128ビツト/デー
タに1ビツトの誤りが検出訂正される。
The 32-bit data corrected by the Ex-OR circuit 29 is converted by the converter 30 into the number of bits of the external data bus. 31 is an output latch. In this way, since the error syndrome is generated in the small-scale ECCG IO, the error detection and correction circuit in FIG. 6 is also small-scale.
Even with such a small-scale circuit, a 1-bit error in 128 bits/data can be detected and corrected.

前記実施例は128ビツトの入力データに8ビツトのE
CCを付加して誤り訂正を行なったが、他にも今回のデ
ータ分割方法がうまく適用さがる例としては、64ビツ
トのデータ長内で1ビット誤り訂正、及び2ビット誤り
検出を行なう場合必要な付加ビット数は8ビツトである
から、データ及びECCを4ブロツクに分は外部には1
6ビツトのデータ+2ビツトのECCとして扱うことが
できる。
In the above embodiment, 8 bits of E are input to 128 bits of input data.
Error correction was performed by adding CC, but another example of how this data division method can be applied successfully is when performing 1-bit error correction and 2-bit error detection within a data length of 64 bits. Since the number of additional bits is 8 bits, 4 blocks of data and ECC require 1 external bit.
It can be handled as 6-bit data + 2-bit ECC.

又、前記実施例のように扱うデータ長は128ビツトと
大きいものであるが、回路内部及びメモリ、伝送路等の
外部接続媒体においては32ビツトのデータ長で表現さ
れ、処理上非常に扱い易い。さらに誤り訂正のためのE
CCは見かけ上32ビットのデータに対して2ビツトと
、ECCのデータ内で占める割合〔情報率〕が1/17
となり、ECCに対するコストが小さくて済む。
Furthermore, although the data length handled in the above embodiment is as large as 128 bits, it is expressed as a 32-bit data length inside the circuit and in external connection media such as memory and transmission lines, making it very easy to handle in terms of processing. . E for further error correction
CC is 2 bits compared to the apparently 32 bit data, and the ratio [information rate] of ECC data is 1/17.
Therefore, the cost for ECC is small.

また、ECCの生成方法はブロック単位さらに8ビット
単位の規則的なパターンの演算で実行できるので、複雑
なゲート回路を必要とせず、今回の実施例の如く2種の
パターンのROM (第3図のパターン1及び3)で済
むことになる。
In addition, since the ECC generation method can be executed by calculating regular patterns in block units and 8-bit units, there is no need for complex gate circuits, and as in this example, two types of ROM patterns (Fig. 3) are used. Patterns 1 and 3) will suffice.

[発明の効果コ 以上説明したように本発明によれば、冗長度を増やさず
に、小規模の回路構成で、エラー検出訂正が可能となる
[Effects of the Invention] As explained above, according to the present invention, error detection and correction can be performed with a small-scale circuit configuration without increasing redundancy.

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

第1図は本発明に係る実施例の基本構成図、第2図(&
)〜(d)は128ビツトのデータから8ビツトのEC
Cを得るビット単位の演算操作のためのマトリクスパタ
ーン図、 第3図は8ビツトのデータから5ビツトの基本コードを
得るビット単位の演算操作パターンを説明する図、 第4図(a)〜(C)は実施例のECC生成回路及び内
部構成要素の回路図、 第5図は実施例のECC付加回路の実施例の図、 第6図は実施例の誤り検出訂正回路図である。 図中、1,2,3.4・ROM、5,7.29・・・E
x−OR回路、6・・・エンコーダROM、8.11.
13,14,20,22,23,26.31・・・ラッ
チ 、9・・・ゲート回路、lO・・・ECCG、12
.21・・・タイミング発生回路、15・・・データセ
レクタ、16・・・出力ラッチ、24・・・シンドロー
ム生成回路、25・・・シンドロームデータ生成回路、
27・・・デコーダ、28・・・訂正指示回路、30・
・・変換器である。 第4図(b) 第4図(C)
Figure 1 is a basic configuration diagram of an embodiment according to the present invention, Figure 2 (&
) to (d) are 8-bit EC from 128-bit data.
A matrix pattern diagram for bit-wise arithmetic operation to obtain C. Figure 3 is a diagram explaining a bit-wise arithmetic operation pattern to obtain a 5-bit basic code from 8-bit data. C) is a circuit diagram of the ECC generation circuit and internal components of the embodiment, FIG. 5 is a diagram of the ECC addition circuit of the embodiment, and FIG. 6 is an error detection and correction circuit diagram of the embodiment. In the figure, 1, 2, 3.4・ROM, 5, 7.29...E
x-OR circuit, 6... encoder ROM, 8.11.
13, 14, 20, 22, 23, 26.31...Latch, 9...Gate circuit, lO...ECCG, 12
.. 21... Timing generation circuit, 15... Data selector, 16... Output latch, 24... Syndrome generation circuit, 25... Syndrome data generation circuit,
27... Decoder, 28... Correction instruction circuit, 30...
...It is a converter. Figure 4 (b) Figure 4 (C)

Claims (3)

【特許請求の範囲】[Claims] (1)所定のビット長の入力データに線形符号を付加し
て入力データの誤り検出訂正を行う誤り検出訂正方式に
おいて、前記線形符号の生成マトリクスを複数のマトリ
クスブロックに分割し、入力データを前記マトリクスブ
ロックの列方向と同じ長さの複数個のブロックに分割し
、前記線形符号を生成する時は前記ブロック毎に前記マ
トリクスブロックにより符号語を生成して、該符号語の
組合せから前記線形符号を再構成する事を特徴とする誤
り検出訂正符号発生方式。
(1) In an error detection and correction method that performs error detection and correction of input data by adding a linear code to input data of a predetermined bit length, the generation matrix of the linear code is divided into a plurality of matrix blocks, and the input data is When the matrix block is divided into a plurality of blocks having the same length in the column direction and the linear code is generated, a code word is generated from the matrix block for each block, and the linear code is generated from the combination of the code words. An error detection and correction code generation method characterized by reconstructing.
(2)生成マトリクスからマトリクスブロックに分割す
るときは、分割語のマトリクスブロックがすくなくとも
共通の基本的な生成パターンをもつように配列してから
分割し、符号語を生成する時は前記基本的な生成パター
ンに基ずいて符号語を生成する事を特徴とする特許請求
の範囲第1項に記載の誤り検出訂正符号発生方式。
(2) When dividing a generation matrix into matrix blocks, arrange the matrix blocks of the divided words so that they have at least a common basic generation pattern before dividing, and when generating code words, The error detection and correction code generation method according to claim 1, characterized in that a code word is generated based on a generation pattern.
(3)線形符号はハミング符号である事を特徴とする特
許請求の範囲第1項又は第2項に記載の誤り検出訂正符
号発生方式。
(3) The error detection and correction code generation system according to claim 1 or 2, wherein the linear code is a Hamming code.
JP11847085A 1985-05-31 1985-05-31 Error detecting and correcting code generating system Pending JPS61277230A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11847085A JPS61277230A (en) 1985-05-31 1985-05-31 Error detecting and correcting code generating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11847085A JPS61277230A (en) 1985-05-31 1985-05-31 Error detecting and correcting code generating system

Publications (1)

Publication Number Publication Date
JPS61277230A true JPS61277230A (en) 1986-12-08

Family

ID=14737468

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11847085A Pending JPS61277230A (en) 1985-05-31 1985-05-31 Error detecting and correcting code generating system

Country Status (1)

Country Link
JP (1) JPS61277230A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62163421A (en) * 1985-10-25 1987-07-20 セコイア・システムス・インコ−ポレ−テツド Encoder
CN114765056A (en) * 2021-01-14 2022-07-19 长鑫存储技术有限公司 Storage system
US11791009B2 (en) 2021-01-14 2023-10-17 Changxin Memory Technologies, Inc. Error correction system
US11935616B2 (en) 2021-01-14 2024-03-19 Changxin Memory Technologies, Inc. Comparison system
US11990201B2 (en) 2021-01-14 2024-05-21 Changxin Memory Technologies, Inc. Storage system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62163421A (en) * 1985-10-25 1987-07-20 セコイア・システムス・インコ−ポレ−テツド Encoder
CN114765056A (en) * 2021-01-14 2022-07-19 长鑫存储技术有限公司 Storage system
JP2023512893A (en) * 2021-01-14 2023-03-30 チャンシン メモリー テクノロジーズ インコーポレイテッド memory system
US11791009B2 (en) 2021-01-14 2023-10-17 Changxin Memory Technologies, Inc. Error correction system
US11886292B2 (en) 2021-01-14 2024-01-30 Changxin Memory Technologies, Inc. Memory system
US11935616B2 (en) 2021-01-14 2024-03-19 Changxin Memory Technologies, Inc. Comparison system
US11990201B2 (en) 2021-01-14 2024-05-21 Changxin Memory Technologies, Inc. Storage system

Similar Documents

Publication Publication Date Title
US4402045A (en) Multi-processor computer system
US4958350A (en) Error detecting/correction code and apparatus
JPS6250943A (en) Memory device
EP0793174A2 (en) Error detection and correction method and apparatus for computer memory
CN1113474C (en) CRC/EDC checker system
JPH02178738A (en) Detection of errors in arithmetic computation of at least two operands
US20020188909A1 (en) Symbol level error correction codes which protect against memory chip and bus line failures
JPS61277230A (en) Error detecting and correcting code generating system
RU2417409C2 (en) Fault-tolerant processor
JP5617776B2 (en) MEMORY CIRCUIT, MEMORY DEVICE, AND MEMORY DATA ERROR CORRECTION METHOD
JP6600146B2 (en) Data processing circuit and error correction method
JPH0345020A (en) Cyclic code processing circuit
JPH10327080A (en) Syndrome calculation device
RU51428U1 (en) FAULT-RESISTANT PROCESSOR OF INCREASED FUNCTIONAL RELIABILITY
US20200313699A1 (en) Method and apparatus for generating optimal h matrix
JP2691973B2 (en) Decoding device for single error correction and multiple error detection BCH code
CN113595560B (en) Information error correction method, device, equipment and storage medium
US20230342246A1 (en) Semiconductor chip for correcting aligned error, semiconductor system for correcting aligned error, and method for correcting aligned error
JPS5825295B2 (en) Error system
JPH10334697A (en) Semiconductor storage device nd error correction method therefor
TWM551333U (en) 128 bits dual code error detection devices
JP3595271B2 (en) Error correction decoding method and apparatus
JP2703633B2 (en) Error correction decoder
JPH0964754A (en) Error check code generating circuit
JPS61101857A (en) Memory error detecting correcting circuit