JPH0351008B2 - - Google Patents

Info

Publication number
JPH0351008B2
JPH0351008B2 JP58003098A JP309883A JPH0351008B2 JP H0351008 B2 JPH0351008 B2 JP H0351008B2 JP 58003098 A JP58003098 A JP 58003098A JP 309883 A JP309883 A JP 309883A JP H0351008 B2 JPH0351008 B2 JP H0351008B2
Authority
JP
Japan
Prior art keywords
circuit
syndrome
matrix
byte
register
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 - Lifetime
Application number
JP58003098A
Other languages
Japanese (ja)
Other versions
JPS59128650A (en
Inventor
Toshio Horiguchi
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
Nippon Electric Co 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP58003098A priority Critical patent/JPS59128650A/en
Publication of JPS59128650A publication Critical patent/JPS59128650A/en
Publication of JPH0351008B2 publication Critical patent/JPH0351008B2/ja
Granted legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M13/00Coding, decoding or code conversion, for error detection or error correction; Coding theory basic assumptions; Coding bounds; Error probability evaluation methods; Channel models; Simulation or testing of codes
    • H03M13/03Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words
    • H03M13/05Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words using block codes, i.e. a predetermined number of check bits joined to a predetermined number of information bits
    • H03M13/13Linear codes
    • H03M13/15Cyclic codes, i.e. cyclic shifts of codewords produce other codewords, e.g. codes defined by a generator polynomial, Bose-Chaudhuri-Hocquenghem [BCH] codes

Landscapes

  • Physics & Mathematics (AREA)
  • Algebra (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Detection And Correction Of Errors (AREA)

Description

【発明の詳細な説明】 本発明は単一バイト誤りを訂正する回路に関
し、特に高速に誤りを訂正する回路に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a circuit for correcting single byte errors, and more particularly to a circuit for correcting errors at high speed.

磁気デイスクフアイル等のフアイル装置のデー
タ信頼性を向上するためにしばしばフアイア
(Fire)符号、さらにフアイア符号を高速復号可
能なように修正した修正フアイア符号が使用され
ている。しかしながら、最近の傾向としてデータ
の符号化をバイト単位の処理で行えるb隣接誤り
訂正符号(以下ではバイト誤り訂正符号と呼ぶ)
が用いられるようになつた。しかしながら、バイ
ト誤り訂正符号を高速復号可能なように修正する
方法とその回路的構成はこれまで知られていな
い。
In order to improve the data reliability of file devices such as magnetic disk files, Fire codes and modified Fire codes that are modified to enable high-speed decoding of Fire codes are often used. However, as a recent trend, b-adjacent error correction codes (hereinafter referred to as byte error correction codes) can encode data in byte-by-byte processing.
came to be used. However, a method for modifying a byte error correction code so that it can be decoded at high speed and its circuit configuration have not been known so far.

従つて本発明の目的は、高速復号可能なバイト
誤り訂正符号と、その復号回路を提供するにあ
る。
SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to provide a byte error correction code that can be decoded at high speed and a decoding circuit thereof.

本発明の語り訂正回路は、パリテイ検査行列
H、 H=I I ……I…II00 T1 K-1T1 K-2…T1 i…T0 o0I0 T2 K-1T2 K-2…T2 i…T2 o00I (1) に従つてデータを符号化するシステムにおいて、
K+3バイト(Kは情報バイト数)の符号ブロツ
クに生じた単一バイト誤りを高速に復号する回路
を提供する。ここで、mを任意の偶数の正整数と
した時、Iはm×m単位行列、T1はG1(X)=P1
(X)2のm×mコンパニオン行列である。但しP1
(X)は次数m/2、位数e1の任意の既約多項式であ る。T2は次数m、位数e2の任意の既約多項式G2
(X)のm×mコンパニオン行列である。e1とe2
は互いに素で、情報バイト数KはK=e1・e2で与
えられ、バイトはmビツトを表わす。
The story correction circuit of the present invention has a parity check matrix H, H=I I...I...II00 T 1 K-1 T 1 K-2 ...T 1 i ...T 0 o 0I0 T 2 K-1 T 2 K- 2 …T 2 i …T 2 o 00I In a system that encodes data according to (1),
A circuit is provided for quickly decoding a single byte error occurring in a code block of K+3 bytes (K is the number of information bytes). Here, when m is an arbitrary even positive integer, I is an m×m identity matrix, and T 1 is G 1 (X)=P 1
(X) is an m×m companion matrix of 2 . However, P 1
(X) is an arbitrary irreducible polynomial with degree m/2 and order e 1 . T 2 is any irreducible polynomial G 2 of degree m and order e 2
(X) is an m×m companion matrix of (X). e 1 and e 2
are relatively prime, the number of information bytes K is given by K=e 1 ·e 2 , and a byte represents m bits.

本発明の誤り訂正回路は前記検査行列Hの第1
行,第2行および第3行にそれぞれ対応するシン
ドロームS0,S1およびS2を生成するシンドローム
生成回路と、シンドロームS0,S1及びS2から誤り
のあるバイトの位置を求める復号回路とから構成
される。シンドロームS0,S1及びS2の生成回路は
それぞれmビツトのフイードバツク・シフトレジ
スタで構成される。S1生成回路の場合にはフイー
ドバツク・ループ内に行列T1の乗算回路が、S2
生成回路の場合には行列T2の乗算回路がそれぞ
れ挿入される。(S0生成回路には単位行列Iの乗
算回路が挿入されるが、これは何も挿入しないの
と同一である)。
The error correction circuit of the present invention has the first error correction circuit of the parity check matrix H.
A syndrome generation circuit that generates syndromes S 0 , S 1 and S 2 corresponding to the second and third rows, respectively, and a decoding circuit that determines the position of the erroneous byte from the syndromes S 0 , S 1 and S 2 . It consists of The generation circuits for the syndromes S 0 , S 1 and S 2 are each composed of m-bit feedback shift registers. In the case of the S 1 generation circuit, there is a multiplication circuit for the matrix T 1 in the feedback loop, and an S 2
In the case of a generation circuit, a multiplication circuit of matrix T 2 is inserted respectively. (Although a multiplication circuit for the unit matrix I is inserted into the S 0 generation circuit, this is the same as not inserting anything.)

復号回路はシンドロームS1及びS2生成回路のシ
フト・レジスタの内容がシンドロームS0の内容と
一致するまでS1及びS2のレジスタをそれぞれシフ
トし、それぞれのシフト回路に基づいて誤りのあ
るバイト位置を計算する回路である。
The decoding circuit shifts the registers of S 1 and S 2 , respectively, until the contents of the shift registers of the syndrome S 1 and S 2 generation circuit match the contents of syndrome S 0 , and detects the erroneous bytes based on the respective shift circuits. This is a circuit that calculates position.

本発明の誤り訂正回路の特徴は前式(1)のパリテ
イ検査行列Hで表わされるバイト誤り訂正符号を
用いる点にある。
A feature of the error correction circuit of the present invention is that it uses a byte error correction code expressed by the parity check matrix H of the above equation (1).

行列Hの中の行列I,T1,T2は次の通りであ
る。
The matrices I, T 1 , and T 2 in the matrix H are as follows.

I:m×m行列 T1:G1(X)=P1(X)2のコンパニオン行列(m×
m行列)。P1(X)は次数m/2、位数e1の既約 多項式。G1(X)の周期は2e1で、これより
T1 2e1=T0 o=I T2:次数m、位数e2の既約多項式G2(X)のコン
パニオン行列(m×m行列)。位数e2より
T2 e2=T2 o=I K:情報バイト数。バイト=mビツト。e1とe2
互に素とするとK=e1・e2 ここでG1(X)=P1(X)2=a0+a1x+a2x2+……
+an-1xm-1(ai=0又は1)とするとコンパニオ
ン行列T1である。コンパニオン行列T1は次の性質を持つ
ことが容易に証明される。ベクトルE=(d0d1
dn-1t(tは転置記号で、di=0又は1)に対応
する多項式をE(X)=d0+d1x+d2x2+……+
dn-1xm-1とすると、 性質(a)E(X)がP1(X)で割り切れる時(す
なわちE(X)≡0modP1(X)の時)、T1 i
E+T1 jE=0となるのはi−j≡0mode1
の時に限られる。但し、T1 iはm×m行列
T1のi乗を表わし、T1 i・Eは行列T1 iとベ
クトルEのモジユロ2の上での積を表わ
す。
I: m×m matrix T 1 :G 1 (X)=P 1 (X) 2 companion matrix (m×
m matrix). P 1 (X) is an irreducible polynomial with degree m/2 and order e 1 . The period of G 1 (X) is 2e 1 , and from this
T 1 2e1 = T 0 o = I T 2 : Companion matrix (m×m matrix) of irreducible polynomial G 2 (X) with degree m and order e 2 . From order e 2
T 2 e2 = T 2 o = I K: Number of information bytes. Byte = m bits. If e 1 and e 2 are mutually prime, then K = e 1・e 2 where G 1 (X) = P 1 (X) 2 = a 0 + a 1 x + a 2 x 2 +...
+a n-1 x m-1 (a i = 0 or 1), the companion matrix T 1 is It is. It is easily proven that the companion matrix T 1 has the following properties. Vector E=(d 0 d 1 ...
d n-1 ) t (t is the transpose symbol, d i =0 or 1) is the polynomial corresponding to E(X) = d 0 + d 1 x + d 2 x 2 +...+
Assuming d n-1 x m-1 , property (a) When E(X) is divisible by P 1 (X) (that is, when E(X)≡0modP 1 (X)), T 1 i
E+T 1 j E=0 is i−j≡0mode 1
limited to the time of However, T 1 i is an m×m matrix
It represents T 1 to the i power, and T 1 i ·E represents the product of matrix T 1 i and vector E, modulo 2.

性質(b)E(X)がP1(X)で割り切れない時
(すなわちE(X)≡0modP1(X)の時)、
T1 iE+T1 jE=0となるのはi−j≡
0mod2e1の時に限られる。
Property (b) When E(X) is not divisible by P 1 (X) (that is, when E(X)≡0modP 1 (X)),
T 1 i E+T 1 j E=0 when i−j≡
Limited to 0mod2e 1 .

同様に、既約多項式G2(X)=b0+b1x+b2x2
……+bn-1xm-1(bi=0又は1)のコンパニオン
行列T2である。行列T2に関しては次の性質が知られて
いる。
Similarly, the irreducible polynomial G 2 (X) = b 0 + b 1 x + b 2 x 2 +
...+b n-1 x m-1 (b i = 0 or 1) companion matrix T 2 is It is. The following properties of matrix T 2 are known.

性質(c)T2 iE+T2 jE=0となるのはi−j≡
0mod e2の時に限られる。
Property (c)T 2 i E+T 2 j E=0 if i−j≡
Limited to 0mod e 2 .

前記パリテイ検査行列Hが単一バイト誤り訂正
能力を有することは前記性質(a),(b),(c)を用いて
容易に証明される。
That the parity check matrix H has a single-byte error correction capability is easily proven using the properties (a), (b), and (c).

以下図面を用いて本発明を詳細に説明する。 The present invention will be explained in detail below using the drawings.

第1図は前記パリテイ検査行列Hに則したエン
コーダ回路(符号化回路)を示すブロツク図であ
る。第1図において回路1,2および3はそれぞ
れmビツトのレジスタである。回路4,5および
6はそれぞれmビツトの排他的O
(EXCLUSIVE−OR)回路である。又、回路7
は前記行列T1の乗算回路、回路8は前記行列T2
の乗算回路である。K(=e1・e2)個の情報バイ
トをDK-1,DK-2,DK-3,……,D1,D0(Diはm次
元列ベクトル)と表わせば、チエツクバイトC0
C1,C2(Ciはm次元列ベクトル)は次式で生成さ
れる。
FIG. 1 is a block diagram showing an encoder circuit (encoding circuit) conforming to the parity check matrix H. In FIG. 1, circuits 1, 2 and 3 are each m-bit registers. Circuits 4, 5 and 6 each have an exclusive OR of m bits.
(EXCLUSIVE-OR) circuit. Also, circuit 7
is a multiplication circuit for the matrix T 1 , and circuit 8 is a multiplication circuit for the matrix T 2.
This is a multiplication circuit. If K (=e 1・e 2 ) information bytes are expressed as D K-1 , D K-2 , D K-3 , ..., D 1 , D 0 (D i is an m-dimensional column vector), then Check bite C 0 ,
C 1 and C 2 (C i is an m-dimensional column vector) are generated using the following equation.

(ここでT1 i,T2 iはそれぞれ行列T1,T2のi
乗を表わす。)第1図の回路において、データ入
力線を介して情報バイトDK-1,DK-2,……,D1
D0をこの順に入力すれば前式(2)に則したチエツ
クバイトC0,C1及びC2が生成される。ここで、
C0,C1及びC2はそれぞれレジスタ1,2及び3
の出力である。前記T1乗算回路7及びT2乗算回
路8は次のように構成される。例えばG1(X)=
X4+X2+1とすると、コンパニオンマトリクス
T1は次式で表わされる。
(Here, T 1 i and T 2 i are the i of matrices T 1 and T 2 , respectively.
represents the power. ) In the circuit of FIG. 1, the information bytes D K-1 , D K-2 , ..., D 1 ,
If D 0 is input in this order, check bytes C 0 , C 1 and C 2 are generated according to the above equation (2). here,
C 0 , C 1 and C 2 are registers 1, 2 and 3 respectively
This is the output of The T 1 multiplication circuit 7 and the T 2 multiplication circuit 8 are constructed as follows. For example, G 1 (X)=
If X 4 +X 2 +1, then the companion matrix
T 1 is expressed by the following formula.

T1=0001 1000 0101 0010 T1乗算回路7への入力をベクトルA=(a0,a1
a2,a3t(ここで、ai=0又は1、tは転置記
号)、出力をベクトルB=(b0,b1,b2,b3t(こ
こで、bi=0又は1)とするとT1乗算回路の出力
BはB=T・Aで表わされる。すなわち b0 b1 b2 b3=0001 1000 0101 0010 a0 a1 a2 a3 である。この式より、b0=a3,b1=a0,b2=a1
a3,b3=a2となる。(ここでb2=a1+a3における
記号+はモジユロ2の加算すなわち排他的ORで
ある。) 第2図はT1による乗算回路の例を示すブロツ
ク図である。第2図において回路100は2入力
の排他的OR回路である。一般のG1(X),G2(X)
に対応するコンパニオン行列T1及びT2による乗
算回路も同様に構成されるので、これ以上の説明
は要しない。第1図のエンコーダ回路はシンドロ
ーム生成にも利用される。受信された情報バイト
及びチエツク・バイトをD′K-1,D′K-2,D′K-3
……,D′1,D′0,C′0,C′1,C′2とするとシンドロ
ームS0,S1,及びS2は次式で生成される。
T 1 = 0001 1000 0101 0010 T 1 The input to the multiplier circuit 7 is vector A = (a 0 , a 1 ,
a 2 , a 3 ) t (where a i = 0 or 1, t is the transpose symbol), and the output as vector B = (b 0 , b 1 , b 2 , b 3 ) t (where b i = 0 or 1), the output B of the T1 multiplier circuit is expressed as B=T·A. That is, b 0 b 1 b 2 b 3 =0001 1000 0101 0010 a 0 a 1 a 2 a 3 . From this formula, b 0 = a 3 , b 1 = a 0 , b 2 = a 1 +
a 3 , b 3 = a 2 . (Here, the symbol + in b 2 = a 1 + a 3 is an addition modulo 2, or exclusive OR.) FIG. 2 is a block diagram showing an example of a multiplication circuit using T 1 . In FIG. 2, circuit 100 is a two-input exclusive OR circuit. General G 1 (X), G 2 (X)
Since the multiplication circuits using the companion matrices T 1 and T 2 corresponding to T 1 and T 2 are similarly configured, no further explanation is necessary. The encoder circuit of FIG. 1 is also used for syndrome generation. The received information bytes and check bytes are denoted as D′ K-1 , D′ K-2 , D′ K-3 ,
..., D′ 1 , D′ 0 , C′ 0 , C′ 1 , C′ 2 , syndromes S 0 , S 1 , and S 2 are generated by the following equations.

(ここで、Si,D′j,C′eはそれぞれm次元行列
ベクトル。Tiはm×m行列。)前式(3)に従つたシ
ンドロームを前記第1図の回路を用いて生成する
には、受信情報バイトD′K-1,D′K-2,……,D′2
D′1,D′0をこの順に第1図の回路に入力し、つい
でチエツクバイトC′0,C′1,C′2をこの順に入力
する。但し、C′0はレジスタ1のみに、C′1はレジ
スタ2のみに、C′2はレジスタ3のみにそれぞれ
に入力するように制御する。受信バイトの入力が
終了するとレジスタ1,2及び3からは前式(3)で
表わされるシンドロームS0,S1及びS2がそれぞれ
出力される。符号化(チエツクバイトの生成)と
シンドロームの生成は以上のように行われる。次
にシンドロームから誤りバイトのパターンと位置
を解読する復号回路を説明する。
(Here, S i , D′ j , and C′ e are each m-dimensional matrix vectors. T i is an m×m matrix.) A syndrome according to the previous equation (3) is generated using the circuit shown in Figure 1 above. To do this, the received information bytes D′ K-1 , D′ K-2 , ..., D′ 2 ,
D' 1 and D' 0 are input in this order to the circuit of FIG. 1, and then check bytes C' 0 , C' 1 and C' 2 are input in this order. However, C' 0 is controlled to be input only to register 1, C' 1 to only register 2, and C' 2 to only register 3. When the input of the received byte is completed, syndromes S 0 , S 1 and S 2 expressed by the above equation (3) are output from registers 1, 2 and 3, respectively. Encoding (generation of check bytes) and generation of syndromes are performed as described above. Next, a decoding circuit for decoding the pattern and position of an error byte from the syndrome will be described.

いま、j番目(0jK−1)の情報バイト
に誤りパターンE(Eはm次元列ベクトル)の誤
りが生じたとすると、シンドロームS0,S1,S2
次式で表わされたことが前記(2),(3)より容易に示
される。
Now, if an error of error pattern E (E is an m-dimensional column vector) occurs in the j-th (0jK-1) information byte, the syndromes S 0 , S 1 , and S 2 can be expressed by the following equations. This can be easily demonstrated from (2) and (3) above.

S0=E S1=T1 jE S2=T2 jE (4) ここで、シンドロームS0,S1及びS2のみが既知
であり、誤りパターンEと誤り位置jは未知数で
ある。復号は既知数S0,S1およびS2から誤りパタ
ーンEと誤り位置jを求めることである。式(4)よ
り誤りパターンEはS0と一致するから、EはS0
り直ちに求められる。誤り位置jは次のように求
められる。誤り位置を求めるためには、第1図の
回路においてシンドロームS1のレジスタ2とシン
ドロームS2のレジスタ3を、それぞれシンドロー
ムS0のレジスタ1の出力に一致するまでシフトす
る。但し、このシフトにおいてデータ入力線は論
理ゼロに保持し、又S0のレジスタ1はシフトしな
い。S1レジスタ2およびS2レジスタ3の出力はl
回目のシフトでそれぞれT1 lS1,T2 lS2(但し、S1
およびS2はレジスタの内容の初期値)となる。既
に述べたようにT1 2e1=I,T2 e2=Iであるから
レジスタ2及びレジスタ3の最大シフト回数は、
それぞれ2e1−1,及びe2−1である。
S 0 = E S 1 = T 1 j E S 2 = T 2 j E (4) Here, only the syndromes S 0 , S 1 and S 2 are known, and the error pattern E and error position j are unknown. . Decoding involves finding the error pattern E and error position j from the known numbers S 0 , S 1 and S 2 . Since error pattern E matches S 0 from equation (4), E can be immediately obtained from S 0 . The error position j is determined as follows. To find the error location, register 2 of syndrome S 1 and register 3 of syndrome S 2 are shifted in the circuit of FIG. 1 until they respectively match the output of register 1 of syndrome S 0 . However, in this shift, the data input line is held at logic zero, and register 1 of S 0 is not shifted. The outputs of S1 register 2 and S2 register 3 are l
At the second shift, T 1 l S 1 and T 2 l S 2 (however, S 1
and S 2 is the initial value of the contents of the register). As mentioned above, since T 1 2e1 = I and T 2 e2 = I, the maximum number of shifts for register 2 and register 3 is
2e 1 -1 and e 2 -1, respectively.

いま、l1回目のシフトでS1レジスタ2の内容が
S0レジスタ1に一致したとすると前式(4)よりS0
T1 l1S1=T1 l1+jE=E(0l12e1−1)である。
従つて、前記性質(a)および(b)より、l1+j≡
0mod e1又はl1+j≡0mod 2e1,換言すれば、 l1=−jmod e1又はl1=−jmod 2e1 (5) が成立する。
Now, the contents of S 1 register 2 are changed by l 1st shift.
If it matches S 0 register 1, then from the previous equation (4), S 0 =
T 1 l1 S 1 =T 1 l1+j E=E(0l 1 2e 1 -1).
Therefore, from the above properties (a) and (b), l 1 +j≡
0mod e 1 or l 1 +j≡0mod 2e 1 , in other words, l 1 =−jmod e 1 or l 1 =−jmod 2e 1 (5) holds true.

前記(5)に含まれるふたつの式は r1≡l1mod e1 (但し、0r1e1-1,0l12e1-1) (6) なる新しい数r1を導入すれば下式(7)のようにひと
つの式に統一される。
The two equations included in the above (5) are r 1 ≡l 1 mod e 1 (however, 0r 1 e 1 -1, 0l 1 2e 1 -1) (6) If we introduce a new number r 1 , the following equation becomes It is unified into one formula as shown in (7).

r1≡−jmod e1,(0r1e1−1) (7) なぜならば前式(5)におけるl1≡jmod2e1と前記(6)
におけるr1≡l1mod e1はそれぞれ、−j=a・2e1
+l1(−a,l1はそれぞれ−jを2e1で割つた時の
商と余り)及びl1=b・e1+r1(B,r1はそれぞれ
l1をe1で割つた時の商と余り)で書き表わされ、
これより−j=a・2e1+b・e1+r1=(2a+b)
e1+r1となり、r1−jmod e1が成立することにな
るからである。
r 1 ≡−jmod e 1 , (0r 1 e 1 −1) (7) Because l 1 ≡jmod2e 1 in the previous equation (5) and the above (6)
r 1 ≡l 1 mod e 1 in -j=a・2e 1
+l 1 (-a, l 1 are the quotient and remainder when -j is divided by 2e 1, respectively) and l 1 = b・e 1 + r 1 (B, r 1 are respectively
It is expressed as the quotient and remainder when l 1 is divided by e 1 ,
From this -j=a・2e 1 +b・e 1 +r 1 = (2a+b)
This is because e 1 + r 1 and r 1 − jmod e 1 holds true.

同様に、r2回目のシフトでS2レジスタ3の内容
がS0レジスタ1に一致したとすると前式(4)より S0=T2 r2S2=T2 r2+jE=E である。前記性質(c)よりr2+j≡0mod e2,換言
すれば r2≡−jmod e2,(0r2e2−1) (8) が成立する。以上をまとめると r1≡−jmod e1(但しr1≡l1mod e1) r2=−jmod e2 (10) となる。
Similarly, if the contents of S 2 register 3 match S 0 register 1 in the second shift of r, then from the previous equation (4), S 0 = T 2 r2 S 2 = T 2 r2+j E = E. . From the above property (c), r 2 +j≡0mod e 2 , in other words, r 2 ≡−jmod e 2 , (0r 2 e 2 −1) (8) holds true. To summarize the above, r 1 ≡−jmod e 1 (however, r 1 ≡l 1 mod e 1 ) r 2 =−jmod e 2 (10).

ここで、r1とr2は既知であり、jが未知数であ
る。前記(10)は“中国人の剰余定理(Chinese
Remainder Theorem)”によつて容易に解くこ
とができる。
Here, r 1 and r 2 are known, and j is unknown. (10) above is “Chinese Remainder Theorem”
It can be easily solved by ``Remainder Theorem''.

すなわち、前式(10)を満たすj(0jK−1,
K=e1・e2)は下式で求められる。
That is, j(0jK−1,
K=e 1 ·e 2 ) is obtained by the following formula.

j=K−(A1r1+A2r2)modK (11) ここで(A1r1+A2r2)modKはA1r1+A2r2をKで
割つた時の余りを示す。但し、K=e1・e2,A1
a1e2,A2=a2e1pa1及びa2は a1e2+a2e1≡1modK (12) を満たす定数で、 a1e2≡1mod e1 a2e1≡1mod e2 (13) から求められる。式(10)のようにjはr1,r2にそれ
ぞれ定数A1及びA2を掛けて加算して得られる数
A1r1+A2r2をKで割つた時の余りをKから引き
算したものに等しい。
j=K-(A 1 r 1 + A 2 r 2 ) mod K (11) Here, (A 1 r 1 + A 2 r 2 ) mod K is the remainder when A 1 r 1 + A 2 r 2 is divided by K. shows. However, K=e 1・e 2 , A 1 =
a 1 e 2 , A 2 = a 2 e 1p a 1 and a 2 are constants that satisfy a 1 e 2 + a 2 e 1 ≡1mod K (12), a 1 e 2 ≡1mod e 1 a 2 e 1 ≡ 1mod e 2 (13). As shown in equation (10), j is the number obtained by multiplying r 1 and r 2 by constants A 1 and A 2 , respectively, and adding them.
It is equal to the remainder when A 1 r 1 + A 2 r 2 is divided by K and the remainder is subtracted from K.

第3図のa及びbは以上の原理を用いた復号の
フローチヤートを示す。但し、第3図aと第3図
bは行先/帰先記号Aを介してつながつている。
図のように、シンドロームに関して、S0=S1=S2
=0の時は誤り無しである。S0,S1及びS2の中の
1個のみが非ゼロの時はチエツクバイトC0,C1
又はC0の中の1バイト誤りと判定する。例えば
S0≠0,S2=0,S2=0の時はチエツクバイト
C0に誤りがある(情報バイト及びチエツクバイ
トC1,C2には誤りがない)。
Figures 3a and 3b show a flowchart of decoding using the above principle. However, FIG. 3a and FIG. 3b are connected via a destination/return symbol A.
As shown in the figure, for the syndrome, S 0 = S 1 = S 2
When = 0, there is no error. If only one of S 0 , S 1 and S 2 is non-zero, check bytes C 0 , C 1
Or it is determined that there is a 1-byte error in C 0 . for example
Check byte when S 0 ≠ 0, S 2 = 0, S 2 = 0
There is an error in C 0 (there is no error in the information byte and check bytes C 1 and C 2 ).

また、S0,S1,S2の中の2個の非零の時(例え
ば、S0=0,S1≠0,S2≠の時)は訂正不可能誤
りすなわち2バイト以上の誤りが生じたと判定す
る。
In addition, when two of S 0 , S 1 , and S 2 are nonzero (for example, when S 0 = 0, S 1 ≠ 0, and S 2 ≠), it is an uncorrectable error, that is, an error of 2 or more bytes. It is determined that this has occurred.

S0≠0,S1≠0かつS2≠0の時は情報バイトに
誤りが生じていると判定し、前述した復号手順を
実行する。すなわち、シンドローム・レジスタS1
及びシンドローム・レジスタS2の内容がシンドロ
ームS0に一致するまでシフトする。但し、第3図
のフローのように、レジスタS1の内容が2e1−1
回以内でシフトでレジスタS0に一致しない場合、
又はレジスタS2の内容がe2−1以内のシフトでレ
ジスタS0に一致しない場合には訂正不可能誤り、
すなわち2バイト以上の誤りが生じたと判定す
る。ここで、第3図のフローチヤートではシンド
ローム・レジスタS1のシフトが終了した後にシン
ドローム・レジスタS2のシフトを開始するように
書いてあるが、実際にはレジスタS1とS2のシフト
を同時に並行して行う。
When S 0 ≠0, S 1 ≠0 and S 2 ≠0, it is determined that an error has occurred in the information byte, and the above-described decoding procedure is executed. That is, the syndrome register S 1
and shift the contents of syndrome register S2 until it matches syndrome S0 . However, as shown in the flow in Figure 3, the contents of register S 1 are 2e 1 -1
If the shift does not match register S 0 within times,
or an uncorrectable error if the contents of register S 2 do not match register S 0 within a shift of e 2 −1;
In other words, it is determined that an error of 2 bytes or more has occurred. Here, in the flowchart in Figure 3, it is written that the shift of syndrome register S 2 is started after the shift of syndrome register S 1 is completed, but in reality, the shift of registers S 1 and S 2 is started. Do it in parallel at the same time.

第4図は以上の復号原理を実現した復号回路を
示すブロツク図であ。図において、回路1,2及
び3はそれぞれ既に述べたシンドローム・レジス
タS0,S1及びS2、回路7,8はそれぞれ既に述べ
たT1,T2乗算回路である。図において、シンド
ローム・レジスタS1とS2は同時にシフトされる。
回路12はシンドローム・レジスタS1のシフト回
数を計数するカウンタであり、回路13はシンド
ローム・レジスタS2のシフト回数を計数するカウ
ンタである。回路10,11はそれぞれレジスタ
S0とS1及びレジスタS0とS2を比較する比較回路で
ある。S0とS1が一致すると回路10は出力信号線
20を介してカウンタ12の計数動作を停止させ
る。同様にS0とS2が一致すると回路11は出力信
号線21を介してカウンタ13の計数動作を停止
させる。従つて、カウンタ12にはS1がS0に一致
するまでに要したシフト回数l1が保持され、カウ
ンタ13にはS2がS0に一致するまで要したシフト
回数r2が保持される。ここで、前記第3図のフロ
ーチヤートより、シンドローム・レジスタS1に必
要なシフト回数は最大2e1−1回、シンドロー
ム・レジスタS2に必要なシフト回数は最大e2−1
回である。
FIG. 4 is a block diagram showing a decoding circuit that realizes the above decoding principle. In the figure, circuits 1, 2 and 3 are the previously mentioned syndrome registers S 0 , S 1 and S 2 respectively, and circuits 7 and 8 are the previously mentioned T 1 and T 2 multiplication circuits, respectively. In the figure, syndrome registers S 1 and S 2 are shifted simultaneously.
The circuit 12 is a counter that counts the number of shifts of the syndrome register S1 , and the circuit 13 is a counter that counts the number of shifts of the syndrome register S2 . Circuits 10 and 11 are each a register
This is a comparison circuit that compares S 0 and S 1 and registers S 0 and S 2 . When S 0 and S 1 match, the circuit 10 stops the counting operation of the counter 12 via the output signal line 20. Similarly, when S 0 and S 2 match, the circuit 11 stops the counting operation of the counter 13 via the output signal line 21. Therefore, the counter 12 holds the number of shifts l 1 required until S 1 matches S 0 , and the counter 13 holds the number of shifts r 2 required until S 2 matches S 0 . . Here, from the flowchart in FIG. 3, the number of shifts required for syndrome register S 1 is at most 2e 1 -1 times, and the number of shifts required for syndrome register S 2 is at most e 2 -1.
times.

シンドローム・レジスタS1とS2は同時に並行し
てシフトされるから、シンドローム・レジスタに
必要な最大シフト数は2e1−1とe1−1のいづれ
か大きい方に等しい。
Since the syndrome registers S 1 and S 2 are shifted simultaneously and in parallel, the maximum number of shifts required for the syndrome registers is equal to the greater of 2e 1 -1 and e 1 -1.

カウンタ12の計数値が2e1−1を越えてもS1
がS0に一致しない場合、またはカウンタ13の計
数値がe2−1を越えてもS2がS0に一致しない場合
には訂正不可能誤りが生じたとして、誤り訂正動
作は終了する。そうでない場合、すなわちシンド
ロームS1及びS2がシンドロームS0に、それぞれ
2e1−1回、e2−1回以内のシフト回数で一致し
た場合には回路14及び回路15によつて誤り位
置が計算される。
Even if the count value of counter 12 exceeds 2e 1 -1, S 1
If does not match S0 , or if S2 does not match S0 even if the count value of the counter 13 exceeds e2-1 , it is assumed that an uncorrectable error has occurred, and the error correction operation ends. If not, i.e. syndromes S 1 and S 2 become syndrome S 0 , respectively
If there is a match within the number of shifts within 2e 1 -1 times and e 2 -1 times, the error position is calculated by circuits 14 and 15.

回路14は前記カウンタ12に保持された前記
シフト回数l1(0l12e1−1)を前式(6)に従つ
てシフト回数r1に変換する回路である。すなわち
回路14は入力l1をe1で割つた時の余りr1(0r1
e1−1)を求め出力する回路である。回路15
は前記シフト回数r1及びr2(0r2e2−1)か
ら、前式(11)に従つて誤り位置jを計算する回路で
ある。すなわち、回路15はj=K−(A1r1
A2r2)modKを計算する回路である。
The circuit 14 is a circuit that converts the number of shifts l 1 (0l 1 2e 1 -1) held in the counter 12 into the number of shifts r 1 according to the above equation (6). In other words , the circuit 14 receives the remainder r 1 ( 0r 1
This is a circuit that calculates and outputs e 1 -1). circuit 15
is a circuit that calculates the error position j from the number of shifts r 1 and r 2 (0r 2 e 2 -1) according to the above equation (11). That is, the circuit 15 has j=K−(A 1 r 1 +
A 2 r 2 ) This is a circuit that calculates mod K.

ここで、比較回路10と11、カウンタ12と
13は市販の集積回路(IC)を用いてハードウ
エア的に容易に実施できる。また、回路14及び
回路15はハードウエア的にも実現できるが、フ
アームウエア方式でも実現できる。多くの磁気デ
イスク装置はマイクロプログラム制御方式(フア
ームウエア方式)を採用しているので、回路14
及び15の計算機能をフアームウエアで実施する
のは比較的容易であるし、この場合回路14,1
5を実現するに必要なハードウエア回路がいらな
くなる利点がある。
Here, the comparison circuits 10 and 11 and the counters 12 and 13 can be easily implemented in terms of hardware using commercially available integrated circuits (ICs). Furthermore, although the circuit 14 and the circuit 15 can be realized by hardware, they can also be realized by firmware. Since many magnetic disk devices employ a microprogram control method (firmware method), the circuit 14
It is relatively easy to implement the calculation functions of circuits 14 and 15 in firmware, and in this case, circuits 14, 1
There is an advantage that the hardware circuit required to realize 5 is not required.

以上の説明から明らかなように、本発明の復号
回路では、シンドロームレジスタS1の最大シフト
回数は2e1−1回、シンドロームレジスタS2の最
大シフト回数はe2−1回である。シンドロームレ
ジスタS1とS2は同時にシフトされるから、復号に
必要なシンドローム・レジスタのシフト回数は
2e1−1とe2−1のいづれか大きい方に等しい。
従つて、復号時間はシンドローム・レジスタのシ
フト時間(2e1−1とe2のいづれか大きい方)と
計算時間(j=K−(A1r1+A2r2)modKを計算す
る時間)の和に等しい。一方、通常の復号方法で
は、情報バイト数K(=e1・e2)に等しいシフト
回数が必要とされるから、本発明により復号時間
をかなり短縮することが可能である。
As is clear from the above description, in the decoding circuit of the present invention, the maximum number of shifts of the syndrome register S 1 is 2e 1 -1 times, and the maximum number of shifts of the syndrome register S 2 is e 2 -1 times. Since syndrome registers S 1 and S 2 are shifted simultaneously, the number of syndrome register shifts required for decoding is
Equal to the greater of 2e 1 -1 and e 2 -1.
Therefore, the decoding time is the shift time of the syndrome register (the larger of 2e 1 - 1 and e 2 ) and the calculation time (time to calculate j = K - (A 1 r 1 + A 2 r 2 ) mod K ) is equal to the sum of On the other hand, since the normal decoding method requires a number of shifts equal to the number of information bytes K (=e 1 ·e 2 ), the present invention can considerably shorten the decoding time.

以下において、具体例を用いて本発明をより詳
しく説明する。G1(X),G2(X)として4次(m
=4)の多項式を用いるものとする。従つて、バ
イト=4ビツト(m=4)である。
In the following, the present invention will be explained in more detail using specific examples. As G 1 (X) and G 2 (X), the fourth order (m
=4) is used. Therefore, byte=4 bits (m=4).

G1(X):G1(X)=P1(X)2=X4+X2+1。但
し、P1(X)=X2+X +1は位数e1=3の
既約多項式である。
G 1 (X): G 1 (X) = P 1 (X) 2 = X 4 +X 2 +1. However, P 1 (X)=X 2 +X +1 is an irreducible polynomial with order e 1 =3.

G2(X):G2(X)=X4+X3+X2+X+1pG2(X)
は位数e2=5の既約多項式。
G 2 (X): G 2 (X) = X 4 +X 3 +X 2 +X+1 p G 2 (X)
is an irreducible polynomial of order e 2 =5.

G1(X),G2(X)に対応するコンパニオン行列
(4×4行列)をそれぞれT1,T2とし、4×4単
位行列をIとするとこれらは次のように表わされ
る。
Let T 1 and T 2 be the companion matrices (4×4 matrices) corresponding to G 1 (X) and G 2 (X), respectively, and let I be the 4×4 identity matrix, and these can be expressed as follows.

I=1000 0100 0010 0001,T1=0001 1000 0101 0010,T2=0001 1001 0101 0011 ここで情報バイト数KはK=e1・e2=15であ
る。又、位数e1=3よりT1の周期は6(=2e2)、
すなわちT1 6=Iである。位数e2=5よりT2の周
期は5、すなわちT2 5=Iである。これらは次の
ように確かめられる。
I=1000 0100 0010 0001, T 1 =0001 1000 0101 0010, T 2 =0001 1001 0101 0011 Here, the number of information bytes K is K=e 1 ·e 2 =15. Also, from the order e 1 = 3, the period of T 1 is 6 (= 2e 2 ),
That is, T 1 6 =I. Since the order e 2 =5, the period of T 2 is 5, that is, T 2 5 =I. These can be confirmed as follows.

T1に関しては次の通りである。 Regarding T 1 , it is as follows.

T1=0001 1000 0101 0010 T1 2=0010 0001 1010 0101 T1 3=0101 0010 0100 1010 T1 4=1010 0101 1000 0100 T1 5=0100 1010 0001 1000 T1 6=I=1000 0100 0010 0001 さらにT2に関して次の通りである。T 1 =0001 1000 0101 0010 T 1 2 =0010 0001 1010 0101 T 1 3 =0101 0010 0100 1010 T 1 4 =1010 0101 1000 0100 T 1 5 =0100 1010 0001 1000 T 1 6 = I = 1000 0100 0010 0001 Furthermore Regarding T 2 , it is as follows.

T2=0001 1001 0101 0011 T2 2=0011 0010 1010 0110 T2 3=0110 0101 0100 1100 T2 4=1100 1010 1001 1000 T2 5=I=1000 0100 0010 0001 i番目の情報バイト(ここでバイト=4ビツト)
に誤りパターンEが生じたとするとシンドローム
S0,S1,S2は次式で表わされる。
T 2 =0001 1001 0101 0011 T 2 2 =0011 0010 1010 0110 T 2 3 =0110 0101 0100 1100 T 2 4 =1100 1010 1001 1000 T 2 5 =I=1000 0100 001 0 0001 i-th information byte (here byte = 4 bits)
If error pattern E occurs in
S 0 , S 1 , and S 2 are expressed by the following equations.

S0=E S1=T1 iE S2=T2 iE ここで、0i14である。 S 0 =E S 1 =T 1 i E S 2 =T 2 i E where 0i14.

復号は次のステツプ1〜3に従つて行なわれ
る。
Decoding is performed according to the following steps 1-3.

〔ステツプ 1〕 シンドローム・レジスタS1とS2をシフトし、レ
ジスタS0と比較する。レジスタS1とS0はl1回目
(0l12e1−1=5)、レジスタS2とS0はr2回目
(0r2e2−1=4)でそれぞれ一致したとす
る。すなわちS0=T1 l1S1,S0=T2 r2S2とする。
[Step 1] Shift syndrome registers S1 and S2 and compare with register S0 . Assume that registers S 1 and S 0 match at the first time (0l 1 2e 1 -1=5), and registers S 2 and S 0 match at the second time (0r 2 e 2 -1=4). That is, S 0 =T 1 l1 S 1 and S 0 =T 2 r2 S 2 .

〔ステツプ 2〕 r1=(l1)mod e1=(l1)mod3を求める。[Step 2] Find r 1 = (l 1 ) mod e 1 = (l 1 ) mod 3 .

〔ステツプ 3〕 誤り位置j=K−(A1r1+A2r2)modK =15−(10r1+6r2)mod15 を求める。[Step 3] Find the error position j = K - (A 1 r 1 + A 2 r 2 ) mod K = 15 - (10 r 1 + 6 r 2 ) mod 15 .

ここで、定数A1=10及びA2=6は次のように
求められる。前式(13)、すなわちa1e2≡1mod
e1,a2e1≡1mod e2より、まずa1とa2を求める。
Here, the constants A 1 =10 and A 2 =6 are determined as follows. The previous equation (13), that is, a 1 e 2 ≡1mod
First, find a 1 and a 2 from e 1 , a 2 e 1 ≡1mod e 2 .

(a1e2)mod e1=(5a1)mod3=1及び (a2e1)mod e2=(3a2)mod5=1よりa1=2,a2
2。従つて、A1=a1e2=2×5=10,A2=a2e1
=2×3=6である。
(a 1 e 2 )mod e 1 = (5a 1 )mod 3 = 1 and (a 2 e 1 )mod e 2 = (3a 2 )mod 5 = 1, so a 1 = 2, a 2 =
2. Therefore, A 1 =a 1 e 2 =2×5=10, A 2 =a 2 e 1
=2×3=6.

次に以上のステツプを用いて実際に誤り位置が
求められることを例示する。
Next, an example will be given of how the error position is actually determined using the above steps.

〔例 1〕 14番目の情報バイトに誤りパターンE=(1011)
t(tは転置記号)が生じたと仮定する。ここで
ベクトルEに対応する多項式E(X)=X3+X2
1はP1(X)=X2+X+1で割り切れない。すな
わちE(X)/≡0modP1(X)である。シンドロー
ムS0,S1,S2は次のようになる。
[Example 1] Error pattern E = (1011) in the 14th information byte
Suppose that t (t is the transpose symbol) occurs. Here, polynomial E(X) corresponding to vector E=X 3 +X 2 +
1 is not divisible by P 1 (X)=X 2 +X+1. That is, E(X)/≡0modP 1 (X). The syndromes S 0 , S 1 , and S 2 are as follows.

S0=E=1 0 1 1 S1=T1 14E=T1 2E=0010 0001 1010 0101 1 0 1 1=1 1 01 S2=T2 14E=T2 4E=1100 1010 1001 1000 1 0 1 1=1 0 0 1 次に前記ステツプに従つて誤り位置j=14が求
められることを示す。
S 0 =E=1 0 1 1 S 1 =T 1 14 E=T 1 2 E=0010 0001 1010 0101 1 0 1 1=1 1 01 S 2 =T 2 14 E=T 2 4 E=1100 1010 1001 1000 1 0 1 1=1 0 0 1 Next, it will be shown that the error position j=14 is found according to the above steps.

〔ステツプ 1〕 第5図に示す。これよりl1=4,r2=1 〔ステツプ 2〕 r1=(l1)mod3=1 〔ステツプ 3〕 j=15−(10×1+6×1)mod15=15−1=14 次に誤りパターンE(X)がP1(X)で割り切
れる場合について例示する。
[Step 1] Shown in Figure 5. From this, l 1 = 4, r 2 = 1 [Step 2] r 1 = (l 1 ) mod 3 = 1 [Step 3] j = 15 - (10 × 1 + 6 × 1) mod 15 = 15 - 1 = 14 Next, a case where the error pattern E(X) is divisible by P 1 (X) will be exemplified.

〔例 2〕 7番目の情報バイトに誤りパターンE=(1001)
tが生じたと仮定する。ここで、E(X)=X3+1
=(X+1)(X2+X+1)=(X+1)P1(X)、
すなわちE(X)≡0modP1(X)である。シンド
ロームは S0=E=1 0 0 1 S1=T1 7E=T1 1E=0001 1000 0101 0010 1 0 0 1=1 1 1 1 S2=T2 7E=T2 2E=0011 0010 1010 0110 1 0 0 1=1 0 1 0 である。
[Example 2] Error pattern E = (1001) in the 7th information byte
Suppose that t has occurred. Here, E(X)=X 3 +1
=(X+1)( X2 +X+1)=(X+1) P1 (X),
That is, E(X)≡0modP 1 (X). The syndrome is S 0 = E = 1 0 0 1 S 1 = T 1 7 E = T 1 1 E = 0001 1000 0101 0010 1 0 0 1 = 1 1 1 1 S 2 = T 2 7 E = T 2 2 E = 0011 0010 1010 0110 1 0 0 1=1 0 1 0.

〔ステツプ 1〕 第6図に示す。これよりl1=2,r2=3。[Step 1] Shown in Figure 6. From this, l 1 = 2, r 2 = 3.

〔ステツプ 2〕 r1=(l1)mod3=2 〔ステツプ 3〕 j=15−(10×2+6×3)mod15=15−8=
7 以上より、本発明により誤りが正しく復号され
ることが示された。
[Step 2] r 1 = (l 1 ) mod 3 = 2 [Step 3] j = 15 - (10 x 2 + 6 x 3) mod 15 = 15 - 8 =
7 From the above, it has been shown that errors can be correctly decoded by the present invention.

しかしながら、本発明の復号回路の利点は以上
の短かいバイト幅の符号では十分に理解すること
はできない。本発明の復号回路は長いバイト幅
(ここでバイト幅はバイト=mビツトにおけるm
の値である)の符号に最も適している。例えば、
バイト=16ビツト(m=16)の場合を考えれば、
本発明の利点を十分に理解することができる。生
成多項式G1(X),G2(X)として次の次数16(m
=16)の多項式を選ぶものとする。
However, the advantages of the decoding circuit of the present invention cannot be fully appreciated with such short byte-width codes. The decoding circuit of the present invention has a long byte width (where the byte width is m in byte=m bits).
is the value of ). for example,
Considering the case where byte = 16 bits (m = 16),
The advantages of the present invention can be fully understood. The following order 16 (m
= 16).

G1(X):G1(X)=P1(X)2=X16+X8+X6+X2
+1。但し、P1(X)は次数8、位数e1=51
の既約多項式でP1(X)=X8+X4+X3+X+
1。
G 1 (X): G 1 (X) = P 1 (X) 2 = X 16 +X 8 +X 6 +X 2
+1. However, P 1 (X) has order 8 and order e 1 = 51
The irreducible polynomial of P 1 (X) = X 8 +X 4 +X 3 +X+
1.

G2(X):G2(X)=X16+X15+X14+X13+X9
X8+X7+X3+X2+X+1。但し、G2(X)
は位数e2=257の既約多項式。
G 2 (X): G 2 (X) = X 16 +X 15 +X 14 +X 13 +X 9 +
X 8 +X 7 +X 3 +X 2 +X+1. However, G 2 (X)
is an irreducible polynomial of order e 2 = 257.

情報バイト数K:K=e1・e2=13107バイト。但
し、バイト=16ビツト。
Number of information bytes K: K= e1e2 =13107 bytes. However, byte = 16 bits.

ここで、G1(X),G2(X)に対応するコンパニ
オン行列は次の通りである。
Here, companion matrices corresponding to G 1 (X) and G 2 (X) are as follows.

この符号の場合、誤り位置jは次式で求められ
る。
In the case of this code, the error position j is determined by the following equation.

j=K−(A1r1+A2r2)modK=K−(6682r1
6426r2)modK 但し、K=13107である。
j=K−(A 1 r 1 +A 2 r 2 )mod K =K−(6682r 1 +
6426r 2 ) mod K However, K=13107.

ここで、定数A1およびA2は次のように求めら
れる。A1A2はA1=a1e2=257a,A2=a2e1=51a2
である。又、a1,a2は(257a1)mod51=1,
(51a2)mod257=1を満たす整数であり、次のよ
うにユークリツドの互除法で得られる。
Here, the constants A 1 and A 2 are determined as follows. A 1 A 2 is A 1 = a 1 e 2 = 257a, A 2 = a 2 e 1 = 51a 2
It is. Also, a 1 and a 2 are (257a 1 ) mod 51 = 1,
(51a 2 ) is an integer that satisfies mod 257 = 1, and can be obtained by Euclid's algorithm as follows.

257=5×51+2,51=25×2+1,これより
1=51−2×25=51−25×(257−5×51)=126×
51−25×257。これより、(126×51)mod257
1、従つてa2=126。又、((−25)×257)mod51
=(26×257)mod51=1、従つてa1=26。
257=5×51+2, 51=25×2+1, from this 1=51−2×25=51−25×(257−5×51)=126×
51−25×257. From this, (126×51) mod 257 =
1, so a 2 = 126. Also, ((-25) x 257) mod 51
= (26 x 257) mod 51 = 1, so a 1 = 26.

以上より、A1=a1e2=26×257=6682、A2
a2e1=126×51=6426である。
From the above, A 1 = a 1 e 2 = 26 x 257 = 6682, A 2 =
a 2 e 1 = 126 x 51 = 6426.

ここで、従来の復号法では、シンドローム・レ
ジスタを情報バイト数K=13107に等しい回数だ
けシフトする必要がある。従つて従来の復号法の
復号時間をT1とすればT1=13107シフト時間、で
ある。
Here, in the conventional decoding method, it is necessary to shift the syndrome register a number of times equal to the number of information bytes K=13107. Therefore, if the decoding time of the conventional decoding method is T 1 , then T 1 =13107 shift times.

一方、本発明の復号法ではシンドローム・レジ
スタを2e1−1(=101)又はe2−1(=256)のい
づれか大きい方に等しい回数だけシフトすれば良
い。すなわち必要なシフト回数は256回である。
従つて、本発明の復号回路の復号時間をT2とす
ればT2=256シフト時間+計算時間、である。こ
こで計算時間はj=K−(6682r1+6426r2)modK
の計算に要する時間である。ワアームウエアを用
いれば、この計算を高速に実行可能であるから、
本発明による復号時間T2を従来の復号時間T1
りもかなり小さくすることが可能である。
On the other hand, in the decoding method of the present invention, it is sufficient to shift the syndrome register a number of times equal to the larger of 2e 1 -1 (=101) or e 2 -1 (=256). In other words, the required number of shifts is 256.
Therefore, if the decoding time of the decoding circuit of the present invention is T2 , then T2 =256 shift time+calculation time. Here, the calculation time is j = K - (6682r 1 + 6426r 2 ) mod K
This is the time required to calculate . This calculation can be performed at high speed by using software, so
It is possible to make the decoding time T 2 according to the invention considerably smaller than the conventional decoding time T 1 .

以上より、本発明のバイト誤り訂正回路は高速
に誤りを復号することが可能であり、本発明の目
的を十分に達成できる。
As described above, the byte error correction circuit of the present invention is capable of decoding errors at high speed, and the object of the present invention can be fully achieved.

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

第1図は本発明によるバイト誤り訂正符号の符
号化回路を示すブロツク図、第2図はG(X)=
X4+X2+1のコンパニオン行列Tを乗算する回
路を示すブロツク図、第3図a,bは復号法を示
すフローチヤート、第4図は復号回路のブロツク
図、第5図及び第6図はそれぞれ復号過程の例を
示す図である。 図において、1,2,3はシンドローム・レジ
スタ、4,5,6は排他的OR回路、7,8はそ
れぞれG1(X)及びG1(X)のコンパニオン行列
T1及びT2を乗算する回路、100は排他的OR回
路、10,11は一致を検出するための比較回
路、14は入力信号l1を出力信号r1にr1=(l1
mod e1に従つて変換する回路、15は信号l1
びr1に基づいて誤りのあるバイトの位置を計算す
る回路をそれぞれ減示す。
FIG. 1 is a block diagram showing a coding circuit for a byte error correction code according to the present invention, and FIG.
A block diagram showing a circuit for multiplying the companion matrix T of X 4 + FIG. 6 is a diagram showing an example of a decoding process. In the figure, 1, 2, and 3 are syndrome registers, 4, 5, and 6 are exclusive OR circuits, and 7 and 8 are companion matrices of G 1 (X) and G 1 (X), respectively.
A circuit for multiplying T 1 and T 2 , 100 is an exclusive OR circuit, 10 and 11 are comparison circuits for detecting a match, 14 is an input signal l 1 to an output signal r 1 , r 1 = (l 1 )
A circuit for converting according to mod e 1 , 15 respectively subtracts a circuit for calculating the position of the erroneous byte on the basis of the signals l 1 and r 1 .

Claims (1)

【特許請求の範囲】 1 パリテイ検査行列 I I I…I…I I00 T1 K-1T1 K-2T1 K-3…T1 i…T1 00I0 T2 K-1T2 K-2T2 K-3…T2 i…T2 000I (ここで、mを任意の偶数の正整数とすると、
Iはm×1単位行列、T1はG1(X)=P1(X)2のm
×mコンパニオン行列。P1(X)は次数m/2、位 数e1の任意の既約多項式である。T2は次数m、
位数e2の任意の既約多項式G2(X)のm×mコン
パニオン行列。e1とe2は互いに素で、情報バイト
数KはK=e1・e2pバイトはmビツトを表わす。)
に従つてデータを符号化するシステムにおいて、
受信データバイトから前記検査行列の第1,第2
及び第3行に対応してシンドロームS0,S1及びS2
をそれぞれ生成する第1,第2および第3のシン
ドローム・レジスタと、シンドロームの生成終了
後前記第2及び第3のシンドローム・レジスタを
シフトし、前記第2のシンドローム・レジスタの
内容S1が前記第1のシンドローム・レジスタの内
容S0に一致するまでに要したシフト回数を計数し
保持する第1のカウンタと、前記第3のシンドロ
ーム・レジスタの内容S2が前記第1のシンドロー
ム・レジスタの内容S0に一致するまでに要したシ
フト回数を計数し保持する第2のカウンタと、前
記第1及び第2のカウンタに保持されたシフト回
数に基づいて誤りのあるバイトの位置を計算する
回路とから構成される高速バイト誤り訂正回路。
[Claims] 1 Parity check matrix I I I...I...I I00 T 1 K-1 T 1 K-2 T 1 K-3 ...T 1 i ...T 1 0 0I0 T 2 K-1 T 2 K -2 T 2 K-3 ...T 2 i ...T 2 0 00I (Here, if m is any even positive integer,
I is m × 1 identity matrix, T 1 is m of G 1 (X) = P 1 (X) 2
×m companion matrix. P 1 (X) is an arbitrary irreducible polynomial with degree m/2 and order e 1 . T 2 is of order m,
m×m companion matrix of any irreducible polynomial G 2 (X) of order e 2 . e 1 and e 2 are relatively prime, and the number of information bytes K is K=e 1 ·e 2p . A byte represents m bits. )
In a system that encodes data according to
From the received data bytes, the first and second parity check matrix
and the syndromes S 0 , S 1 and S 2 corresponding to the third row
and shift the second and third syndrome registers after the generation of the syndrome respectively, so that the content S1 of the second syndrome register becomes the a first counter that counts and holds the number of shifts required until the content S2 of the third syndrome register matches the content S0 of the first syndrome register; a second counter that counts and holds the number of shifts required to match the content S 0 ; and a circuit that calculates the position of the erroneous byte based on the number of shifts held in the first and second counters. A high-speed byte error correction circuit consisting of.
JP58003098A 1983-01-12 1983-01-12 High speed correcting circuit of byte error Granted JPS59128650A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58003098A JPS59128650A (en) 1983-01-12 1983-01-12 High speed correcting circuit of byte error

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58003098A JPS59128650A (en) 1983-01-12 1983-01-12 High speed correcting circuit of byte error

Publications (2)

Publication Number Publication Date
JPS59128650A JPS59128650A (en) 1984-07-24
JPH0351008B2 true JPH0351008B2 (en) 1991-08-05

Family

ID=11547864

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58003098A Granted JPS59128650A (en) 1983-01-12 1983-01-12 High speed correcting circuit of byte error

Country Status (1)

Country Link
JP (1) JPS59128650A (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2532917B2 (en) * 1988-04-20 1996-09-11 三洋電機株式会社 Data error detection circuit
JPH0264956U (en) * 1988-11-04 1990-05-16
JPH02206887A (en) * 1989-02-06 1990-08-16 Fuji Xerox Co Ltd Data input converting device
JP2665268B2 (en) * 1990-05-25 1997-10-22 ナショナル サイエンス カウンシル Step-by-step decoding method and decoder for cyclic code

Also Published As

Publication number Publication date
JPS59128650A (en) 1984-07-24

Similar Documents

Publication Publication Date Title
EP0114938A2 (en) On-the-fly multibyte error correction
US5778009A (en) Dedicated ALU architecture for 10-bit Reed-Solomon error correction module
US5856987A (en) Encoder and decoder for an SEC-DED-S4ED rotational code
EP0233075B1 (en) Method and apparatus for generating error detection check bytes for a data record
US3811108A (en) Reverse cyclic code error correction
JPS63244935A (en) Method and system for detecting and correcting errors
JPH03136524A (en) Error detection and correction system to long burst error
JPS6273336A (en) Correcting method and system for multibyte error
US7539918B2 (en) System and method for generating cyclic codes for error control in digital communications
JPH0728227B2 (en) Decoding device for BCH code
JPH0936753A (en) Data-block encoding method for generating redundant information based on symbol length code, symbol length reed-solomon code-based encoding method for block-wise formated data received by encoder as a series of data word, and word type encoder
JPS6316929B2 (en)
US5107506A (en) Error trapping decoding method and apparatus
EP1102406A2 (en) Apparatus and method for decoding digital data
Patel A multi-channel CRC register
EP0723342B1 (en) Error correction apparatus
JPH0351008B2 (en)
WO1994015406A1 (en) Method of and circuit for correcting errors
EP0329775A1 (en) High bandwidth reed-solomon encoding, decoding and error correcting circuit
JP2665268B2 (en) Step-by-step decoding method and decoder for cyclic code
JP2726902B2 (en) Wide bandwidth Reed-Solomon encoding, decoding and error correction circuits
JP2585361B2 (en) Error position and error pattern extraction device for Reed-Solomon code
JPS59163650A (en) High-speed correcting circuit for byte error
JP2797569B2 (en) Euclidean circuit
JPH0133055B2 (en)