JP2000349652A - Storage device provided with error correction means - Google Patents

Storage device provided with error correction means

Info

Publication number
JP2000349652A
JP2000349652A JP11159613A JP15961399A JP2000349652A JP 2000349652 A JP2000349652 A JP 2000349652A JP 11159613 A JP11159613 A JP 11159613A JP 15961399 A JP15961399 A JP 15961399A JP 2000349652 A JP2000349652 A JP 2000349652A
Authority
JP
Japan
Prior art keywords
data
error
code
error correction
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
JP11159613A
Other languages
Japanese (ja)
Inventor
Minoru Tsukada
稔 塚田
Kazuo Nakamura
一男 中村
Tetsuji Karashima
哲次 辛島
Hiroaki Kotani
博昭 小谷
Atsushi Nozoe
敦史 野副
Takuji Nishitani
卓史 西谷
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP11159613A priority Critical patent/JP2000349652A/en
Publication of JP2000349652A publication Critical patent/JP2000349652A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To obtain a storage device where sufficient data reliability is obtained and that flexibly copes with a change in the data reliability of a storage element of a memory chip. SOLUTION: In a flush memory card 501 provided with a memory chip 102 and an interface LSI 106, the memory chip 102 is provided with an internal ECC circuit 104 and the interface LSI 106 is provided with an external ECC circuit 1061. In the case of conducting coding by a product code, first the external ECC circuit 1061 conducts external coding, and then the internal ECC circuit 104 conducts inner coding. Moreover, in the case of reading data, the internal ECC circuit 104 conducts decoding of the internal code and outputs reliability information of line data to the outside of the memory chip 102. In the case of decoding the external code, the external ECC circuit 1061 uses the reliability information of the line data for decoding.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、ディジタル情報を
記憶する記憶装置、特に、フラッシュメモリ等の半導体
メモリを使った記憶装置に関する。
The present invention relates to a storage device for storing digital information, and more particularly to a storage device using a semiconductor memory such as a flash memory.

【0002】[0002]

【従来の技術】従来、コンピュータの主記憶装置には、
RAM等の半導体メモリが記憶媒体として利用されてき
たが、このような記憶媒体における誤り訂正方式は、例
えば、特開平3-5995号公報に記載されているように、ビ
ット単位の誤り訂正符号(Error Correcting Code:E
CC)を用いて誤りを訂正していた。これは、半導体記
憶媒体の1素子あたりの記録単位が1ビットで、素子の
データ誤り確率がランダムであることに起因している。
この傾向は不揮発性メモリであるフラッシュメモリでも
同様である。
2. Description of the Related Art Conventionally, a main storage device of a computer includes:
A semiconductor memory such as a RAM has been used as a storage medium, and an error correction method in such a storage medium is described in, for example, Japanese Patent Application Laid-Open No. 3-5995. Error Correcting Code: E
CC) to correct the error. This is because the recording unit per element of the semiconductor storage medium is 1 bit and the data error probability of the element is random.
This tendency is the same in a flash memory which is a nonvolatile memory.

【0003】一方、ハードディスクやCD−ROMな
ど、ランダム誤りとバースト誤りが混在する媒体におい
ては、データをバースト誤り訂正ECCと、ランダム誤
り訂正ECCとで二重に符号化し、データ復号時に制御
信号により、それぞれの復号結果のうち1つを選択して
出力する方法や、同じECCを用いて、二重に符号化
し、それぞれのECCを連携させて、データを高信頼化
させる積符号と呼ばれる方法が採用されている。前者の
方法は、例えば、特開平2−301226号公報や特開平3−21
2026公報に記載されている。また、後者の方法は、特開
平7−202717号公報に記載されている。
On the other hand, in a medium in which a random error and a burst error coexist, such as a hard disk and a CD-ROM, data is double encoded by a burst error correction ECC and a random error correction ECC, and a control signal is used at the time of data decoding. One method is to select and output one of the decoding results, or a method called a product code is used in which the same ECC is used to perform double encoding, and each ECC is linked to make data highly reliable. Has been adopted. The former method is disclosed in, for example, JP-A-2-301226 and JP-A-3-21.
It is described in 2026 publication. The latter method is described in JP-A-7-202717.

【0004】以下、誤り訂正ECCと積符号について説
明する。まず、誤り訂正ECCについて説明する。誤り
訂正で用いられているECCにはいろいろあるが、まと
まったバイトを1ブロックとして誤り訂正/検出を行う
ECCとして、リードソロモン符号(以下、RS符号と
いう)がある。RS符号は、組織符号となる巡回符号で
ある。組織符号とは、情報データ部と冗長データ部とが
分離できる符号で、符号中に情報データの成分がそのま
まあらわれるため、データを扱いやすい。また、巡回符
号は、符号に周期性があるため、復号時は一定の規則に
従って順に検索できるため、誤り検索がシフトレジスタ
とバッファを用いて簡単に行える。
Hereinafter, the error correction ECC and the product code will be described. First, the error correction ECC will be described. There are various types of ECC used for error correction, and a Reed-Solomon code (hereinafter, referred to as an RS code) is an ECC that performs error correction / detection with a set of bytes as one block. The RS code is a cyclic code serving as a systematic code. The systematic code is a code that can separate the information data part and the redundant data part. Since the information data component appears in the code as it is, the data is easy to handle. Further, since the cyclic code has periodicity and can be searched sequentially according to a certain rule at the time of decoding, error search can be easily performed using a shift register and a buffer.

【0005】次に、組織符号の生成方法と復号方法につ
いて説明する。データ多項式D(x)、冗長多項式R(x)、符
号生成多項式G(x)、誤り多項式E(x)を以下のように定
義する。
Next, a method of generating and decoding a systematic code will be described. A data polynomial D (x), a redundant polynomial R (x), a code generation polynomial G (x), and an error polynomial E (x) are defined as follows.

【0006】データ多項式D(x)は、数式(1)に示すよ
うに、sバイト目の情報バイト Dsを、xの(k-s)次項の係
数としたxの多項式とする。
The data polynomial D (x) is a polynomial of x, where the s-th information byte Ds is a coefficient of the (ks) next term of x, as shown in equation (1).

【0007】[0007]

【数1】 (Equation 1)

【0008】冗長多項式R(x)は、数式(2)に示すよう
に、sバイト目の冗長バイト Rsを、xの(2t-s)次項の係
数としたxの多項式とする。R(x)は、訂正能力をtバイ
トとすると、最低2tバイトの冗長バイトが必要となる。
As shown in equation (2), the redundant polynomial R (x) is a polynomial of x in which the s-th redundant byte Rs is a coefficient of the (2t-s) -order term of x. R (x) requires at least 2t redundant bytes if the correction capability is t bytes.

【0009】[0009]

【数2】 (Equation 2)

【0010】符号生成多項式G(x)は、数式(3)に示す
ように、D(x)を、符号語多項式W(x)に符号化するための
xの多項式とする。訂正能力をtバイトとすると最低2t次
の多項式を用いる必要がある。
The code generation polynomial G (x) is used to encode D (x) into a codeword polynomial W (x), as shown in equation (3).
Let x be a polynomial. Assuming that the correction capability is t bytes, it is necessary to use a polynomial of at least 2t order.

【0011】[0011]

【数3】 (Equation 3)

【0012】G(x)の根αには数式(4)に示すような巡
回性がある。
The root α of G (x) has a cyclic property as shown in equation (4).

【0013】[0013]

【数4】 (Equation 4)

【0014】ここで、Nは、G(x)が含まれるガロア体の
元の数で、G(x)によって作られる符号の最大シンボル
(=1訂正単位)長は(N−1)シンボルとなる。この巡
回性を利用して、N=(2のn乗)とおくと、W(x)、D
(x)、G(x)の係数は、G(x)の根αのべき乗の形と、最大
(n−1)次のα多項式、つまりnビットのビット列の
形の両方で記述することが出来る。
Here, N is the original number of the Galois field containing G (x), and the largest symbol of the code formed by G (x)
The length of (= 1 correction unit) is (N-1) symbols. Taking advantage of this cyclic property, if N = (2 n), W (x), D
The coefficients of (x) and G (x) can be described both in the form of a power of the root α of G (x) and in the form of a maximum (n−1) -order α polynomial, that is, an n-bit bit string. I can do it.

【0015】次に、RS符号の符号化について説明す
る。RS符号の符号化は、数式(5)に示すように、W
(x)がG(x)で割り切れ、かつ、R(x)とD(x)の係数の次数
が重ならないように、D(x)をxの2t乗して符号化する。
Next, the encoding of the RS code will be described. The encoding of the RS code is performed as shown in Equation (5).
D (x) is coded by raising x (2) to the power of 2t so that (x) is not divisible by G (x) and the order of the coefficients of R (x) and D (x) does not overlap.

【0016】[0016]

【数5】 (Equation 5)

【0017】この時、R(x)は、数式(6)のようにな
る。ここで、「AmodB」は、AをBで割った時の剰余
多項式である。
At this time, R (x) is as shown in equation (6). Here, “AmodB” is a remainder polynomial when A is divided by B.

【0018】[0018]

【数6】 (Equation 6)

【0019】[0019]

【数7】 (Equation 7)

【0020】次に、RS符号の復号について説明する。
記録媒体から読取った符号をY(x)、誤り位置多項式をE
(x)とおく。Y(x)は、数式(8)に示すように、読み取
ったnバイトのデータのsバイト目の情報バイトYsを、
xの(n-s)次の項の係数としたxの多項式とする。
Next, decoding of the RS code will be described.
The code read from the recording medium is Y (x), and the error locator polynomial is E
(x). Y (x) is, as shown in Expression (8), the s-th information byte Ys of the read n-byte data,
x is a polynomial of x which is a coefficient of the next term of (ns).

【0021】[0021]

【数8】 (Equation 8)

【0022】E(x)は、数式(9)に示すように、誤りバ
イトの位置とパターンを示すxの多項式とする。i,
j,・・・バイトにビットパターンEi,Ej,・・・の誤りが
発生したとする。Y(x)、E(x)の係数もW(x)、D(x)と同
じく、nビットのビット列で表現する事が出来る。
E (x) is a polynomial in x indicating the position and pattern of the error byte, as shown in equation (9). i,
Assume that an error in the bit pattern Ei, Ej,. The coefficients of Y (x) and E (x) can be represented by an n-bit bit string, similarly to W (x) and D (x).

【0023】[0023]

【数9】 (Equation 9)

【0024】この時、Y(x)modG(x)を計算すると、誤り
多項式E(x)の値によって数式(10)の関係が成り立
つ。
At this time, when Y (x) modG (x) is calculated, the relationship of equation (10) is established by the value of the error polynomial E (x).

【0025】[0025]

【数10】 (Equation 10)

【0026】誤りが1バイトの場合は、数式(10)よ
り数式(11)を得て、xにαのべき乗を順に代入する
ことで簡単にEi、iを求められる。
When the error is 1 byte, Ei and i can be easily obtained by obtaining Expression (11) from Expression (10) and sequentially substituting the power of α for x.

【0027】[0027]

【数11】 [Equation 11]

【0028】しかし、誤りが2バイト以上の場合、E
(x)modG(x)は、数式(12)に示すようになる。このた
め、数式(12)に、G(x)の根(αのn乗)(n=0,1,・・・
2t−1)を代入して得られる2t本の方程式 S(αのn乗)
=Sn(数式(13))を用いて誤り位置と誤りパターン
を検索する。この検索には数式(14)のように定義さ
れる誤り位置多項式σ(x)を用いる。
However, when the error is 2 bytes or more, E
(x) modG (x) is as shown in Expression (12). Therefore, the root of G (x) (α raised to the nth power) (n = 0, 1,...)
2t equations obtained by substituting 2t-1) S (α to the nth power)
= Sn (Equation (13)) to search for an error position and an error pattern. For this search, an error locator polynomial σ (x) defined as Expression (14) is used.

【0029】[0029]

【数12】 (Equation 12)

【0030】[0030]

【数13】 (Equation 13)

【0031】[0031]

【数14】 [Equation 14]

【0032】数式(13)から数式(14)を求め、数
式(14)に、x = αの−i乗(i=0,1,・・・n-1)を順
に代入してiを求める。求めたiを数式(13)に代入
してEiを求める。
Expression (14) is obtained from Expression (13), and i is obtained by sequentially substituting x = α to the -ith power (i = 0, 1,..., N-1) in Expression (14). . The obtained i is substituted into Expression (13) to obtain Ei.

【0033】次に、積符号について説明する。積符号
は、データをn1行×n2列のマトリクスと考え、各行、各
列ごとにそれぞれ符号化を行い、復号時に各行の復号結
果を利用して、各列の誤り訂正能力を向上させる方法で
ある。ここで、最初に符号化を行う方を外符号C1、後
に符号化を行う方を内符号C2とする。C1、C2の訂
正能力をそれぞれ、t1バイト、t2バイトとすると、積符
号の訂正能力は、最大で|_(d−1)/2_|バイトまで
訂正することが可能である。ここで、d=(2×t1+1)(2
×t2+1)であり、|_A_|はAを超えない最大の整数を表
す。積符号の復号方法にはいろいろあるが、ここでは、
例としてレディ・ロビンソン法について説明する。
Next, the product code will be described. Product code is a method that considers data as a matrix of n1 rows × n2 columns, performs encoding for each row and each column, and uses the decoding result of each row at the time of decoding to improve the error correction capability of each column. is there. Here, the first to perform encoding is referred to as an outer code C1, and the later to perform encoding is referred to as an inner code C2. Assuming that the correction capability of C1 and C2 is t1 byte and t2 byte, respectively, the correction capability of the product code can correct up to | _ (d-1) / 2_ | bytes at the maximum. Here, d = (2 × t1 + 1) (2
× t2 + 1), and | _A_ | represents the largest integer not exceeding A. There are various methods for decoding the product code. Here,
The Lady Robinson method will be described as an example.

【0034】最初に内符号C2について、t2バイトまで
の誤りを訂正する。この時、行列のi行目のデータ信頼
性情報を数式(15)のように定義する。ここで、d2=
2×t1+1である。なお、訂正能力を超える誤りが検出さ
れた場合は、ai=0とする。
First, for the inner code C2, errors up to t2 bytes are corrected. At this time, the data reliability information of the i-th row of the matrix is defined as in Expression (15). Where d2 =
2 × t1 + 1. If an error exceeding the correction capability is detected, ai = 0.

【0035】[0035]

【数15】 (Equation 15)

【0036】次に、外符号C1について、誤り位置iの
集合Fを定義する。Fの初期値は、空集合φとする。ま
た、Fに含まれる誤り位置iの総数をhとする。
Next, a set F of error positions i is defined for the outer code C1. The initial value of F is an empty set φ. Further, the total number of error positions i included in F is set to h.

【0037】次に、外符号C1について、hを消失誤り
とおいて、|_(d1−h−1)/2_|バイトまでの誤り訂正処
理を行う。ここで、d1=2×t1+1である。訂正能力を超
える誤りが検出された場合は集合Fへの消失位置の追加
処理に進む。
Next, as for the outer code C1, error correction processing up to | _ (d1−h−1) / 2_ | bytes is performed with h as an erasure error. Here, d1 = 2 × t1 + 1. When an error exceeding the correction capability is detected, the process proceeds to the process of adding the erasure position to the set F.

【0038】次に、誤り訂正処理後と誤り訂正処理前の
符号について、数式(16)が成立するか判定を行う。
Next, it is determined whether the equation (16) holds for the codes after the error correction processing and before the error correction processing.

【0039】[0039]

【数16】 (Equation 16)

【0040】数式(16)が成立した場合は、復号処理
を終了する。成立しない場合は、集合Fへの消失位置の
追加処理に進む。
When the equation (16) is satisfied, the decoding process ends. If the condition is not satisfied, the process proceeds to the process of adding the disappearance position to the set F.

【0041】次に、集合Fへの消失位置追加処理を行
う。Fに含まれない位置iで、aiが最小のものをすべて
追加し、誤り訂正処理に戻る。ただし、hがd1以上とな
った場合は、訂正能力を超える誤りが発生したと判定
し、復号処理を終了する。
Next, a process of adding a lost position to the set F is performed. At the position i not included in F, all the items having the smallest ai are added, and the process returns to the error correction processing. However, when h becomes d1 or more, it is determined that an error exceeding the correction capability has occurred, and the decoding process ends.

【0042】[0042]

【発明が解決しようとする課題】記憶装置の記憶媒体と
して利用されるフラッシュメモリは、図21に示すよう
に、通常のMOSトランジスタのコントロールゲート直
下に、電荷を担持及び放出することができる浮遊ゲート
を有する。そして、浮遊ゲートに担持する電荷量を制御
することで、図22に示すように、MOSトランジスタ
のドレイン−ソース間の電流の流れを制御するコントロ
ール電圧の閾値(スレッシュホールド電圧)Vthを変化
させ、その変化を電流値として読み取っている。従来の
フラッシュメモリでは、メモリ1素子に対し1ビットを
対応させていたため、素子のランダム不良によるデータ
誤りは、1ビット誤りであった。
As shown in FIG. 21, a flash memory used as a storage medium of a storage device has a floating gate capable of carrying and discharging electric charges immediately below a control gate of a normal MOS transistor. Having. Then, by controlling the amount of charge carried on the floating gate, the threshold (threshold voltage) Vth of the control voltage for controlling the current flow between the drain and the source of the MOS transistor is changed as shown in FIG. The change is read as a current value. In a conventional flash memory, one bit corresponds to one memory element, so that a data error due to a random defect of the element is a one-bit error.

【0043】しかし、近年、フラッシュメモリに対する
大容量化、低コスト化の要求からフラッシュメモリにお
いて、メモリ1素子に対し、2ビット以上を対応させる
多値記録技術が必要となってきている。このような多値
記録技術においては、一つの素子に対し、4つ以上のV
thを設定することが必要となり、各Vth間の間隔が狭く
なるため、メモリ素子からのデータ読み出しエラーは必
然的に増加する。また、素子不良によりVthが固定され
た場合は、1素子に2ビット以上の誤りが発生する可能
性が生じる。
However, in recent years, a multi-level recording technique has been required for a flash memory in which two or more bits correspond to one element of the memory due to a demand for a large capacity and a low cost of the flash memory. In such a multilevel recording technique, four or more V
It is necessary to set th, and the interval between each Vth becomes narrower, so that the data read error from the memory element necessarily increases. Further, when Vth is fixed due to an element defect, there is a possibility that an error of two bits or more occurs in one element.

【0044】このため、特開平3-5995号公報のように、
ビット単位で誤り訂正を行う場合、十分なデータ信頼率
を得られなくなるおそれがある。
For this reason, as disclosed in JP-A-3-5995,
When error correction is performed in bit units, there is a possibility that a sufficient data reliability cannot be obtained.

【0045】また、特開平2−301226号公報や特開平7−
202717号公報のように、符号化率を固定してデータを二
重に符号化すると、メモリチップの記憶素子のデータ信
頼率の変化に対応出来ず、メモリチップの歩留まり率を
上げるために、符号化効率を低めに設定する場合等、多
値記録化による記憶容量の増加を有効に利用できない可
能性がある。
In addition, Japanese Patent Application Laid-Open Nos.
As in Japanese Patent Publication No. 202717, if data is double-coded with a fixed coding rate, it is impossible to cope with a change in the data reliability of the memory element of the memory chip, and to increase the yield rate of the memory chip, For example, when the conversion efficiency is set lower, the increase in the storage capacity due to the multi-value recording may not be effectively used.

【0046】本発明の目的は、十分なデータ信頼率が得
られるとともに、メモリチップの記憶素子のデータ信頼
率の変化に柔軟に対応することができる記憶装置を提供
することにある。
An object of the present invention is to provide a storage device which can obtain a sufficient data reliability and can flexibly cope with a change in the data reliability of a storage element of a memory chip.

【0047】[0047]

【課題を解決するための手段】本発明に係る記憶装置
は、データを記憶する記憶手段と、当該記憶手段に対す
るデータの読み書きを制御する制御手段とを備えた記憶
装置である。そして、前記記憶手段は、データを格納す
るメモリ手段と、当該メモリ手段に書き込むデータの誤
り訂正符号化を行い、また、前記メモリ手段から読み出
したデータの誤り検出及び誤り訂正を行う内部ECC手
段とを備え、当該内部ECC手段によって行った誤り訂
正に関する信頼性情報を出力し、前記制御手段は、前記
記憶手段に書き込むデータの誤り訂正符号化を行い、ま
た、前記記憶手段から読み出したデータの誤り検出及び
誤り訂正を行う外部ECC手段を備え、前記外部ECC
手段は、前記記憶手段から出力された信頼性情報を利用
して誤り訂正を行うことを特徴とする。
A storage device according to the present invention is a storage device comprising storage means for storing data, and control means for controlling reading and writing of data from and to the storage means. The storage means includes a memory means for storing data, an internal ECC means for performing error correction encoding of data written to the memory means, and an error detection and error correction of data read from the memory means. And outputting reliability information relating to error correction performed by the internal ECC means. The control means performs error correction encoding of data to be written in the storage means, and outputs error information of the data read from the storage means. An external ECC means for performing detection and error correction;
The means performs error correction using the reliability information output from the storage means.

【0048】この場合、前記制御手段は、ホストから書
き込まれたデータを、外部ECC手段によって、外符号
化し、前記記憶手段は、前記制御手段によって書き込ま
れた外符号を、内部ECC手段によって、内符号化し、
前記メモリ手段に書き込むようにしてもよい。
In this case, the control means externally codes the data written from the host by the external ECC means, and the storage means stores the external code written by the control means in the internal ECC means. Encoding,
The data may be written in the memory means.

【0049】また、複数の動作モードを持ち、例えば、
第1の動作モードでは、前記外部ECC手段のみによる
符号化を行い、第2の動作モードでは、前記内部ECC
手段のみによる符号化を行い、第3の動作モードでは、
前記外部ECC手段及び内部ECC手段による積符号化
を行うようにしてもよい。
Further, it has a plurality of operation modes, for example,
In the first operation mode, encoding is performed only by the external ECC means, and in the second operation mode, the internal ECC
Encoding is performed only by means, and in the third operation mode,
Product coding by the external ECC means and the internal ECC means may be performed.

【0050】本発明に係るコントローラは、データの記
憶を行う記憶手段に対するデータの読み書きを制御する
コントローラである。そして、前記記憶手段に書き込む
データを誤り訂正符号化し、また、前記記憶手段から読
み出したデータの誤りの有無を検出し、誤りが検出され
た場合に当該データの誤りを訂正する外部ECC手段を
有し、前記外部ECC手段は、前記記憶手段から出力さ
れた、誤り訂正に関する信頼性情報を利用して、読み出
しデータの誤り訂正を行うことを特徴とする。
The controller according to the present invention is a controller that controls reading and writing of data from and to storage means for storing data. And an external ECC unit for performing error correction coding on the data to be written to the storage unit, detecting the presence or absence of an error in the data read from the storage unit, and correcting the error of the data when the error is detected. The external ECC unit performs error correction of read data using reliability information on error correction output from the storage unit.

【0051】本発明に係るメモリチップは、データを格
納するメモリ手段と、当該メモリ手段に書き込むデータ
の誤り訂正符号化を行い、また、前記メモリ手段から読
み出したデータの誤り検出及び誤り訂正処理を行う内部
ECC手段とを備え、当該内部ECC手段で行われた誤
り訂正処理に関する信頼性情報を出力することを特徴と
する。
The memory chip according to the present invention comprises a memory means for storing data, an error correction encoding of data to be written in the memory means, and an error detection and error correction process for data read from the memory means. And an internal ECC unit for outputting reliability information relating to the error correction processing performed by the internal ECC unit.

【0052】この場合において、前記内部ECC回路
は、その動作モードに応じて、誤り訂正能力を変更でき
るようにしてもよい。
In this case, the internal ECC circuit may be capable of changing the error correction capability according to the operation mode.

【0053】また、以上の場合において、前記内部EC
C手段及び外部ECC手段は、誤り訂正符号としてシン
ボル単位訂正符号で、組織符号となる巡回符号(例え
ば、リードソロモン符号)を用いるようにしてもよい。
In the above case, the internal EC
The C unit and the external ECC unit may use a cyclic code (for example, a Reed-Solomon code) that is a systematic code with a symbol unit correction code as the error correction code.

【0054】また、前記内部ECC手段及び外部ECC
手段は、それぞれ、データの誤り訂正符号化を行う誤り
訂正符号生成手段と、データの誤りの有無を検出する誤
り検出手段と、データに誤りが検出された場合に、当該
データの誤りを訂正する誤り訂正手段とを備えるように
してもよい。
The internal ECC means and the external ECC
The error correction means includes an error correction code generating means for performing error correction coding of the data, an error detection means for detecting the presence or absence of an error in the data, and correcting an error in the data when an error is detected in the data. Error correction means may be provided.

【0055】また、前記信頼性情報は、ある特定の規則
によって重み付けがなされるようにしてもよい。
Further, the reliability information may be weighted by a specific rule.

【0056】[0056]

【発明の実施の形態】以下、図面を参照しつつ、本発明
の実施の形態について詳細に説明する。
Embodiments of the present invention will be described below in detail with reference to the drawings.

【0057】図1は、本発明によるディジタル情報記憶
装置の概要を示す図である。同図に示すように、本発明
によるディジタル情報記憶装置101は、メモリチップ
102とインターフェースLSI106とを備え、シス
テムバス109に接続される。ディジタル情報記憶装置
101は、システムバス109を介して、ホスト等とデ
ィジタル情報の受け渡しを行い、ホストから書き込まれ
たディジタル情報を記憶する。
FIG. 1 is a diagram showing an outline of a digital information storage device according to the present invention. As shown in FIG. 1, a digital information storage device 101 according to the present invention includes a memory chip 102 and an interface LSI 106, and is connected to a system bus 109. The digital information storage device 101 exchanges digital information with a host or the like via the system bus 109 and stores digital information written from the host.

【0058】メモリチップ102は、メモリ103と内
部ECC回路104とを備える。メモリ103は、半導
体を利用した記憶媒体で、データの記憶を行う。内部E
CC回路104は、メモリチップ102に書き込まれた
データのECC符号化や、メモリ103から読み出され
たデータの誤り検出・訂正を行う。また、メモリチップ
102は、内部ECC回路104で行った誤り訂正に関
する信頼性情報をチップ外部に出力する。
The memory chip 102 includes a memory 103 and an internal ECC circuit 104. The memory 103 is a storage medium using a semiconductor and stores data. Internal E
The CC circuit 104 performs ECC encoding of data written to the memory chip 102 and performs error detection and correction of data read from the memory 103. Further, the memory chip 102 outputs reliability information relating to the error correction performed by the internal ECC circuit 104 to the outside of the chip.

【0059】インターフェースLSI106は、システ
ムバス109とのインターフェース制御を行う。また、
インターフェースLSI106は、外部ECC回路10
61を備える。外部ECC回路1061は、システムバ
ス109を介して、ホスト等から渡されたデータのEC
C符号化及びメモリチップ102から読み出されたデー
タの誤り検出・訂正を行う。外部ECC回路1061
は、その動作モードに応じて、内部ECC回路104か
ら出力される信頼性情報を利用して、誤り訂正を行う。
The interface LSI 106 controls the interface with the system bus 109. Also,
The interface LSI 106 is connected to the external ECC circuit 10
61 is provided. The external ECC circuit 1061 controls the EC of data passed from the host or the like via the system bus 109.
It performs C encoding and error detection / correction of data read from the memory chip 102. External ECC circuit 1061
Performs error correction using reliability information output from the internal ECC circuit 104 according to the operation mode.

【0060】図2は、本発明によるディジタル情報記憶
装置のより具体的な構成を示す図である。本記憶装置
は、記憶媒体として、フラッシュメモリを用いたもので
あり、フラッシュメモリカード(PC−ATAカード)
として実現したものである。
FIG. 2 is a diagram showing a more specific configuration of the digital information storage device according to the present invention. This storage device uses a flash memory as a storage medium, and a flash memory card (PC-ATA card)
It was realized as.

【0061】同図に示すように、フラッシュメモリカー
ド501は、メモリチップ102と、インターフェース
LSI106と、マイコン504と、DRAM505と
を備える。各構成要素は、制御信号線、ローカルアドレ
スバス、ローカルデータバスによって接続されている。
As shown in the figure, the flash memory card 501 includes a memory chip 102, an interface LSI 106, a microcomputer 504, and a DRAM 505. Each component is connected by a control signal line, a local address bus, and a local data bus.

【0062】メモリチップ102は、メモリ103と内
部ECC回路104を含むICチップである。インター
フェースLSI106は、システムバス109とのイン
ターフェース制御を行うLSIであり、外部ECC回路
1061を備える。
The memory chip 102 is an IC chip including a memory 103 and an internal ECC circuit 104. The interface LSI 106 is an LSI that controls an interface with the system bus 109, and includes an external ECC circuit 1061.

【0063】マイコン504は、フラッシュメモリカー
ド501のコントローラの役割を担っており、中央処理
装置(CPU)5041と、ROMと、RAMとを備え
る。CPU5041は、システムバス109を介して、
ホストから送られてきた命令を解釈し、解釈結果に応じ
て、メモリチップ102に対するデータの読み書きや、
DRAM505に対するデータの読み書きを制御する。
The microcomputer 504 plays a role of a controller of the flash memory card 501, and includes a central processing unit (CPU) 5041, a ROM, and a RAM. The CPU 5041 via the system bus 109
It interprets the command sent from the host, and reads and writes data to and from the memory chip 102 according to the interpretation result.
It controls reading and writing of data from and to the DRAM 505.

【0064】DRAM505は、ホストとメモリチップ
102との間でデータのやり取りを行う際、データのバ
ッファの役目を担う補助メモリである。
The DRAM 505 is an auxiliary memory that serves as a data buffer when data is exchanged between the host and the memory chip 102.

【0065】図3は、図2に示したフラッシュメモリカ
ード501の具体的な実装イメージを示す図である。フ
ラッシュメモリカード501は、I/Fコネクタ201
を介して、例えば、ノート型PCのPCカード・スロッ
トに装着されて、記憶装置として利用される。
FIG. 3 is a diagram showing a specific mounting image of the flash memory card 501 shown in FIG. The flash memory card 501 has the I / F connector 201
For example, it is attached to a PC card slot of a notebook PC and used as a storage device.

【0066】次に、メモリチップ102の構成について
説明する。図4は、メモリチップ102の構成を示す図
である。同図に示すように、メモリチップ102は、メ
モリ103と、デコーダ602と、内部コントローラ6
04と、スイッチ/セレクタ603と、センスアンプ・
ラッチ605と、内部ECC回路104と、I/Oバッ
ファ601とを備える。図4は、メモリバンクが2つあ
る場合を示しており、各バンク毎に、デコーダ602と
センスアンプ・ラッチ605を備えている。
Next, the configuration of the memory chip 102 will be described. FIG. 4 is a diagram showing a configuration of the memory chip 102. As shown in the figure, the memory chip 102 includes a memory 103, a decoder 602, and an internal controller 6.
04, the switch / selector 603, and the sense amplifier
It includes a latch 605, an internal ECC circuit 104, and an I / O buffer 601. FIG. 4 shows a case where there are two memory banks. Each bank is provided with a decoder 602 and a sense amplifier / latch 605.

【0067】メモリ103は、データの記憶を行う記憶
媒体である。I/Oバッファ601は、メモリチップ1
02の外部からローカルデータバスを介して送られてき
たデータや、内部ECC回路104から送られてきたデ
ータのバッファの役目を担う補助メモリである。デコー
ダ602は、データの読み書きを行う際、ローカルアド
レスバスを介して渡されるアドレスをデコードし、メモ
リ103上でのデータアクセス位置を制御する。スイッ
チ/セレクタ603は、メモリ103へのデータ書き込
み時あるいはメモリ103からのデータ読み出し時に、
内部コントローラ604からの制御信号に応じて、メモ
リ103の各バンクと内部ECC回路104との間のデ
ータ入出力の切り替えを行う回路である。
The memory 103 is a storage medium for storing data. The I / O buffer 601 is connected to the memory chip 1
02 is an auxiliary memory that serves as a buffer for data sent from the outside of the H.02 via a local data bus and data sent from the internal ECC circuit 104. When reading / writing data, the decoder 602 decodes an address passed through a local address bus and controls a data access position on the memory 103. When the switch / selector 603 writes data to the memory 103 or reads data from the memory 103,
This circuit switches data input / output between each bank of the memory 103 and the internal ECC circuit 104 in accordance with a control signal from the internal controller 604.

【0068】内部コントローラ604は、メモリチップ
102内部の各構成要素の制御を行う回路である。セン
スアンプ・ラッチ605は、メモリ103に対するデー
タの読み書き時に、読み出しデータの検出及び増幅やデ
ータの保持を行う。
The internal controller 604 is a circuit for controlling each component inside the memory chip 102. The sense amplifier / latch 605 detects and amplifies read data and holds data when reading / writing data from / to the memory 103.

【0069】内部ECC回路104は、メモリ103に
書き込むデータの符号化を行い、また、メモリ103か
ら読み出したデータの誤り検出及び誤り訂正を行う。
The internal ECC circuit 104 encodes data to be written to the memory 103, and performs error detection and error correction on data read from the memory 103.

【0070】次に、内部ECC回路104及び外部EC
C回路1061について説明する。
Next, the internal ECC circuit 104 and the external EC
The C circuit 1061 will be described.

【0071】本実施形態では、内部ECC回路104と
外部ECC回路1061で共有して用いるECCにRS
符号を用いる。なお、データの誤り訂正、検出に用いる
ECCは、これに限られず、シンボル単位訂正符号で、
組織符号となる巡回符号であれば何を用いても構わな
い。
In this embodiment, the ECC used by the internal ECC circuit 104 and the external ECC circuit 1061 is RS
Use the sign. The ECC used for error correction and detection of data is not limited to this, and is a symbol unit correction code.
Any cyclic code may be used as long as it is a systematic code.

【0072】また、内部ECC回路104の訂正能力
は、2バイト、外部ECC回路1061の訂正能力は、
5バイトとする。なお、内部ECC回路104の訂正能
力をaバイト、外部ECC回路1061の訂正能力をb
バイトとすると、a,bは、a≦bなる整数であれば、
どのような値でもよい。
The correction capability of the internal ECC circuit 104 is 2 bytes, and the correction capability of the external ECC circuit 1061 is
It shall be 5 bytes. The correction capability of the internal ECC circuit 104 is a byte, and the correction capability of the external ECC circuit 1061 is b.
If a and b are integers such that a ≦ b,
Any value is acceptable.

【0073】また、本実施形態では、システムバスを介
したホスト等からの情報データの読み込み/書き込み単
位は、512バイトとし、用いるガロア体は、512バ
イトの情報データを一括して変換でき、1シンボルを1
バイトに対応させることができる最小のガロア体という
条件から、2の10乗とする。すなわち、1シンボルの
ビット数は、10ビットである。
In this embodiment, the unit for reading / writing information data from the host or the like via the system bus is 512 bytes, and the Galois field used is capable of converting 512 bytes of information data at a time. 1 symbol
From the condition of the minimum Galois field that can be made to correspond to bytes, it is set to 2 10. That is, the number of bits of one symbol is 10 bits.

【0074】この場合、情報データ部については、各E
CC回路内部では、8ビットのデータに、例えば、2ビ
ットの0をつけて、10ビットのシンボルとして扱い、
実際にメモリ103に格納するときは、8ビットのまま
記録する。一方、冗長データ部を格納する際には、バイ
ト単位で情報を記録するとした時の最小バイト数で書き
込むものとする。例えば、4シンボル(=40ビット)
の冗長データ部は、5バイトの領域を使って格納する。
なお、冗長データ部の格納方法は、これに限られず、例
えば、各シンボルを2バイトの領域に格納するようにし
てもよい。以下では、シンボルという言葉を、ECC回
路内部での演算を行う際の単位を指す言葉として用い
る。
In this case, for the information data portion, each E
Inside the CC circuit, 8-bit data is treated as a 10-bit symbol by adding, for example, 2-bit 0,
When the data is actually stored in the memory 103, the data is recorded with 8 bits. On the other hand, when storing the redundant data portion, it is assumed that the information is written with the minimum number of bytes when information is recorded in byte units. For example, 4 symbols (= 40 bits)
Is stored using a 5-byte area.
The method of storing the redundant data portion is not limited to this, and for example, each symbol may be stored in a 2-byte area. Hereinafter, the term “symbol” is used as a term indicating a unit when performing an operation inside the ECC circuit.

【0075】本実施形態は、動作モード制御信号sig_1
で指定される動作モードによって、外部ECC回路10
61及び内部ECC回路104の符号化時及び復号時の
動作が異なる。なお、動作モード制御信号sig_1の値
は、例えば、特定のレジスタの設定や、ジャンパーピン
の設定で指定される。
In this embodiment, the operation mode control signal sig_1
Depending on the operation mode specified by
61 and the internal ECC circuit 104 are different in encoding and decoding operations. The value of the operation mode control signal sig_1 is specified, for example, by setting a specific register or setting a jumper pin.

【0076】図5は、動作モード制御信号sig_1と各E
CC回路104、1061の動作との対応関係を示す表
である。この場合、動作モード制御信号sig_1は、4ビ
ットの信号で、図5の表の示した値以外の値は用いない
こととする。
FIG. 5 shows the operation mode control signal sig_1 and each E
4 is a table showing a correspondence relationship between operations of CC circuits 104 and 1061. In this case, the operation mode control signal sig_1 is a 4-bit signal, and no value other than the values shown in the table of FIG. 5 is used.

【0077】図5のECC回路の動作の欄で、1行で表
記されている場合は、符号化時と復号時とで、訂正能力
(符号化の単位となるバイト長および付加する冗長シン
ボル数)及び訂正処理が一致していることを示す。一
方、上下二段に表記されている個所は、符号化時と復号
時とで各ECC回路における動作が異なることを示す。
この場合、上段が符号化時の動作、下段が復号時の動作
を示す。
In the column of the operation of the ECC circuit shown in FIG. 5, when it is described in one line, the correction capability (the byte length as a unit of encoding and the number of redundant symbols to be added) can be determined at the time of encoding and decoding. ) And the correction process match. On the other hand, the portions described in the upper and lower two stages indicate that the operation in each ECC circuit differs between the time of encoding and the time of decoding.
In this case, the upper part shows the operation at the time of encoding, and the lower part shows the operation at the time of decoding.

【0078】同図に示すように、動作モード制御信号si
g_1=「0010」の場合、内部ECC回路104は、動作
せず、外部ECC回路1061は、512バイトの情報
データに対して、5バイトまでの誤り訂正可能な誤り訂
正符号化及び誤り訂正処理を行う。
As shown in the figure, the operation mode control signal si
When g_1 = “0010”, the internal ECC circuit 104 does not operate, and the external ECC circuit 1061 performs error correction encoding and error correction processing on 512-byte information data, which can correct up to 5 bytes of error data. Do.

【0079】動作モード制御信号sig_1=「1111」の場
合は、積符号による誤り訂正符号化及び復号を行う。積
符号では、情報データが正方マトリクスデータに近いほ
ど符号化効率が良いため、本実施形態では、512バイ
トの情報データを、16バイト×32バイトのマトリク
スデータとして扱う。すなわち、内部ECC回路104
は、16バイトの情報データに対して、2バイトまでの
誤り訂正可能な誤り訂正符号化及び誤り訂正処理を行
う。また、外部ECC回路1061は、32バイトの情
報データに対して、5バイトまでの誤り訂正可能な誤り
訂正符号化及び誤り訂正処理を行う。
When the operation mode control signal sig_1 = “1111”, error correction encoding and decoding using a product code are performed. In the product code, since the encoding efficiency is higher as the information data is closer to the square matrix data, in the present embodiment, the 512-byte information data is treated as 16-byte × 32-byte matrix data. That is, the internal ECC circuit 104
Performs error correction coding and error correction processing on 16-byte information data that can correct up to 2 bytes of error. Further, the external ECC circuit 1061 performs error correction encoding and error correction processing on up to 5 bytes of error data for 32-byte information data.

【0080】動作モード制御信号sig_1=「1000」の場
合は、内部ECC回路104は、512バイトの情報デ
ータに対して、2バイトまでの誤り訂正可能な誤り訂正
符号化及び誤り訂正処理を行う。この場合、外部ECC
回路1061は、動作を行わない。
When the operation mode control signal sig_1 = “1000”, the internal ECC circuit 104 performs error correction coding and error correction processing on 512 bytes of information data, which can correct up to 2 bytes of error data. In this case, the external ECC
The circuit 1061 does not operate.

【0081】動作モード制御信号sig_1=「0100」の場
合は、内部ECC回路104は、符号化時、512バイ
トの情報データに対して、5バイトまでの誤り訂正可能
な誤り訂正符号化を行う。一方、復号時には、512バ
イトの情報データ及び10シンボルの冗長データに対し
て、内部ECC回路104で可能な2バイトまでの誤り
訂正処理を行う。なお、内部ECC回路104では、5
バイトまでの誤り検出は可能である。また、この場合
も、外部ECC回路1061は、動作を行わない。
When the operation mode control signal sig_1 is “0100”, the internal ECC circuit 104 performs error correction coding for 512 bytes of information data, which can correct up to 5 bytes of error data, at the time of coding. On the other hand, at the time of decoding, error correction processing of up to 2 bytes possible by the internal ECC circuit 104 is performed on 512 bytes of information data and 10 symbols of redundant data. In the internal ECC circuit 104, 5
Error detection up to bytes is possible. Also in this case, the external ECC circuit 1061 does not operate.

【0082】動作モード制御信号sig_1=「0110」の場
合は、内部ECC回路104は、符号化時、512バイ
トの情報データに対して、5バイトまでの誤り訂正可能
な誤り訂正符号化を行う。一方、復号時には、動作を行
わない。また、外部ECC回路1061は、符号化時、
動作を行わず、復号時に、512バイトの情報データ及
び10シンボルの冗長データに対して、5バイトまでの
誤り訂正可能な誤り訂正処理を行う。すなわち、動作モ
ード制御信号sig_1=「0110」の場合、誤り訂正符号化
は、内部ECC回路104で行い、誤り訂正処理は、外
部ECC回路1061で行う。
When the operation mode control signal sig_1 = “0110”, the internal ECC circuit 104 performs error correction coding for 512 bytes of information data, which can correct up to 5 bytes of error data, at the time of coding. On the other hand, no operation is performed during decoding. Also, the external ECC circuit 1061 performs
At the time of decoding, an error correction process is performed on 512-byte information data and 10-symbol redundant data, which enables error correction of up to 5 bytes. That is, when the operation mode control signal sig_1 is “0110”, error correction coding is performed by the internal ECC circuit 104 and error correction processing is performed by the external ECC circuit 1061.

【0083】次に、外部ECC回路1061の構成につ
いて説明する。図6は、外部ECC回路1061の構成
を示す図である。
Next, the configuration of the external ECC circuit 1061 will be described. FIG. 6 is a diagram showing a configuration of the external ECC circuit 1061.

【0084】同図に示すように、外部ECC回路106
1は、8−10変換器1701と、シンドローム/符号
生成手段1702と、誤り訂正処理開始判定手段170
3と、誤り評価式生成手段1704と、誤り位置・誤り
値検索手段1705と、消失位置計算手段1706と、
訂正不能誤り検出手段1707と、誤り訂正手段170
8と、10−8変換器1709とを備える。
As shown in FIG.
1 is an 8-10 converter 1701, a syndrome / code generation unit 1702, and an error correction process start determination unit 170
3, an error evaluation formula generation unit 1704, an error position / error value search unit 1705, an erasure position calculation unit 1706,
Uncorrectable error detecting means 1707 and error correcting means 170
8 and a 10-8 converter 1709.

【0085】8−10変換器1701は、外部ECC回
路1061に入力される8ビットのデータを10ビット
のシンボルに変換する。例えば、情報データ部の場合
は、2ビットの0を追加する。また、冗長データの場合
は、例えば、2つのバイトから、10ビットのシンボル
を抽出する。
The 8-10 converter 1701 converts 8-bit data input to the external ECC circuit 1061 into 10-bit symbols. For example, in the case of the information data section, 2-bit 0 is added. In the case of redundant data, for example, a 10-bit symbol is extracted from two bytes.

【0086】シンドローム/符号生成手段1702は、
ホストから渡されたデータを符号化し、また、メモリチ
ップ102から読み出したデータからシンドロームを生
成する。シンドローム/符号生成手段1702の詳細に
ついては、後述する。
The syndrome / code generation means 1702
It encodes data passed from the host, and generates a syndrome from data read from the memory chip 102. Details of the syndrome / code generation means 1702 will be described later.

【0087】誤り訂正処理開始判定手段1703は、符
号化時には、シンドローム/符号生成手段1702によ
って生成された符号を10−8変換器1709に出力
し、復号時には、誤り訂正処理の開始を判定する。
The error correction processing start determination means 1703 outputs the code generated by the syndrome / code generation means 1702 to the 10-8 converter 1709 at the time of encoding, and determines the start of error correction processing at the time of decoding.

【0088】誤り評価式生成手段1704は、シンドロ
ームまたは行データ信頼性情報からデータ誤り個数を判
定する。誤り位置・誤り値検索手段1705は、誤り評
価式生成手段1704によって生成された情報から、デ
ータ誤りの位置および誤り値の検索を行う。
The error evaluation formula generating means 1704 determines the number of data errors from the syndrome or row data reliability information. The error position / error value search unit 1705 searches for the position and error value of a data error from the information generated by the error evaluation expression generation unit 1704.

【0089】消失位置計算手段1706は、内部ECC
回路104から渡される行データ信頼性情報から消失位
置を計算する。訂正不能誤り検出手段1707は、デー
タ誤りの位置および誤り値を用いて、訂正能力を超えた
誤りを検出する。
The erasure position calculation means 1706 uses the internal ECC
The erasure position is calculated from the row data reliability information passed from the circuit 104. The uncorrectable error detecting unit 1707 detects an error exceeding the correction capability using the position and the error value of the data error.

【0090】誤り訂正手段1708は、誤り位置・誤り
値検索手段1705から得られた誤り位置、誤り値を用
いて、メモリチップ102から読み出したデータの誤り
を訂正する。例えば、誤り位置のシンボルに対して、誤
り値をXORすることで訂正を行う。
The error correcting means 1708 corrects an error in the data read from the memory chip 102 using the error position and error value obtained from the error position / error value searching means 1705. For example, correction is performed by XORing the error value with respect to the symbol at the error position.

【0091】10−8変換器1709は、10ビットの
シンボルを8ビットデータに変換する。例えば、情報デ
ータ部の場合は、8−10変換器1701で追加した2
ビットを削除する。また、冗長データ部の場合は、10
ビットのシンボルを、2つのバイトに分けて出力する。
The 10-8 converter 1709 converts a 10-bit symbol into 8-bit data. For example, in the case of the information data section, 2 which is added by the 8-10 converter 1701
Remove bits. In the case of the redundant data section, 10
The bit symbol is output in two bytes.

【0092】次に、前述したシンドローム/符号生成手
段1702の詳細について説明する。図7は、シンドロ
ーム/符号生成手段1702の構成を示す図である。
Next, details of the syndrome / code generation means 1702 will be described. FIG. 7 is a diagram showing a configuration of the syndrome / code generation unit 1702.

【0093】同図に示すように、シンドローム/符号生
成手段1702は、シフトレジスタ部2101と、ビッ
ト乗算部2102と、スイッチSW11、SW12、S
W13とを備える。
As shown in the figure, the syndrome / code generation means 1702 includes a shift register section 2101, a bit multiplication section 2102, switches SW11, SW12, S
W13.

【0094】シフトレジスタ部2101は、10ビット
のフリップフロップDが10段構成になったものであ
る。ビット乗算部2102は、入力されたデータに次数
に応じた定数を乗じるビット乗算器gが10段構成にな
ったものである。スイッチSW11とSW12は、オン
オフスイッチで、スイッチSW13は、a、bの2接点
を持つ3点スイッチである。
The shift register section 2101 is a 10-bit flip-flop D having 10 stages. The bit multiplying unit 2102 has 10 stages of bit multipliers g for multiplying input data by a constant according to the order. The switches SW11 and SW12 are on / off switches, and the switch SW13 is a three-point switch having two contacts a and b.

【0095】次に、内部ECC回路104の構成につい
て説明する。図8は、内部ECC回路104の構成を示
す図である。
Next, the configuration of the internal ECC circuit 104 will be described. FIG. 8 is a diagram showing a configuration of the internal ECC circuit 104.

【0096】同図に示すように、内部ECC回路104
は、8−10変換器1801と、シンドローム/符号生
成手段1802と、誤り訂正処理開始判定手段1803
と、誤り評価式生成手段1804と、誤り位置・誤り値
検索手段1805と、訂正不能誤り検出手段1806
と、行データ信頼性情報生成手段1807と、誤り訂正
手段1808と、10−8変換器1809とを備える。
As shown in FIG.
Is an 8-10 converter 1801, a syndrome / code generation unit 1802, and an error correction processing start determination unit 1803
Error evaluation expression generating means 1804, error position / error value searching means 1805, and uncorrectable error detecting means 1806
, A row data reliability information generating unit 1807, an error correcting unit 1808, and a 10-8 converter 1809.

【0097】8−10変換器1801は、前述した8−
10変換器1701と同様にして、入力された8ビット
データを10ビットのシンボルに変換する。
The 8-10 converter 1801 is the same as the above-described 8-10 converter.
Similarly to the 10 converter 1701, the input 8-bit data is converted into a 10-bit symbol.

【0098】シンドローム/符号生成手段1802は、
メモリ103に書き込むデータを符号化し、また、メモ
リ103から読み出したデータからシンドロームを生成
する。シンドローム/符号生成手段1802の詳細につ
いては、後述する。
The syndrome / code generation means 1802
The data to be written to the memory 103 is encoded, and a syndrome is generated from the data read from the memory 103. The details of the syndrome / code generation means 1802 will be described later.

【0099】誤り訂正処理開始判定手段1803は、符
号化時には、符号化されたデータを、10−8変換器1
809に出力し、復号時には、誤り訂正処理の開始の判
定をする。
At the time of encoding, the error correction processing start judging means 1803 converts the encoded data into a 10-8 converter 1
809, and at the time of decoding, the start of error correction processing is determined.

【0100】誤り評価式生成手段1804は、シンドロ
ームからデータ誤り個数を判定する。誤り位置・誤り値
検索手段1805は、誤り評価式生成手段1804によ
って生成された情報から、データ誤りの位置および誤り
値の検索を行う。
The error evaluation formula generation means 1804 determines the number of data errors from the syndrome. The error position / error value search unit 1805 searches for the position of the data error and the error value from the information generated by the error evaluation expression generation unit 1804.

【0101】訂正不能誤り検出手段1806は、データ
誤りの位置および誤り値を用いて、訂正能力を超えた誤
りを検出する。行データ信頼性情報生成手段1807
は、誤り位置・誤り値検索手段1805で得られた誤り
位置情報から行データ信頼性情報を生成する。
The uncorrectable error detecting means 1806 detects an error exceeding the correction capability by using the position and the error value of the data error. Row data reliability information generating means 1807
Generates row data reliability information from the error position information obtained by the error position / error value search unit 1805.

【0102】誤り訂正手段1808は、誤り位置・誤り
値検索手段1805が出力する誤り位置、誤り値を用い
て、メモリ103から読み出したデータの誤りを訂正す
る。10−8変換器1809は、前述した10−8変換
器1709と同様にして、10ビットのシンボルを8ビ
ットデータに変換する。
The error correction means 1808 corrects an error in the data read from the memory 103 using the error position and error value output from the error position / error value search means 1805. The 10-8 converter 1809 converts a 10-bit symbol into 8-bit data in the same manner as the 10-8 converter 1709 described above.

【0103】次に、前述したシンドローム/符号生成手
段1802の構成について説明する。
Next, the configuration of the syndrome / code generation means 1802 will be described.

【0104】図9は、シンドローム/符号生成手段18
02の構成を示す図である。同図に示すように、シンド
ローム/符号生成手段1802は、低次側シンドローム
生成器16Aと、高次側シンドローム生成器16Bと、
データ出力部16Cと、セレクタ部16Dとを備える。
各構成要素の接続形態は、動作モード制御信号sig_1の
値によって変化する。
FIG. 9 shows the syndrome / code generation means 18.
FIG. 2 is a diagram illustrating a configuration of a second embodiment. As shown in the figure, the syndrome / code generation means 1802 includes a lower-order syndrome generator 16A, a higher-order syndrome generator 16B,
It includes a data output unit 16C and a selector unit 16D.
The connection form of each component changes depending on the value of the operation mode control signal sig_1.

【0105】低次側シンドローム生成器16Aは、シフ
トレジスタ部1601と、ビット乗算部1602と、ス
イッチSW1〜SW3とを備える。シフトレジスタ部1
601は、10ビットのフリップフロップDが4段構成
になったものである。ビット乗算部1602は、入力さ
れたデータに次数に応じた定数を乗じるビット乗算器g
が4段構成になったものである。スイッチSW1〜SW
3は、オンオフスイッチである。
The lower-order syndrome generator 16A includes a shift register 1601, a bit multiplier 1602, and switches SW1 to SW3. Shift register unit 1
Reference numeral 601 denotes a 10-bit flip-flop D having a four-stage configuration. The bit multiplication unit 1602 multiplies the input data by a constant according to the order.
Is a four-stage configuration. Switches SW1 to SW
Reference numeral 3 denotes an on / off switch.

【0106】高次側シンドローム生成器16Bは、シフ
トレジスタ部1604と、ビット乗算部1605と、ス
イッチSW5、SW7とを備える。シフトレジスタ部1
604は、10ビットのフリップフロップDが6段構成
になったものである。ビット乗算部1605は、入力さ
れたデータに、次数に応じた定数を乗じるビット乗算器
gが6段構成になったものである。スイッチSW5、S
W7は、オンオフスイッチである。
The higher-order syndrome generator 16B includes a shift register 1604, a bit multiplier 1605, and switches SW5 and SW7. Shift register unit 1
Reference numeral 604 denotes a six-stage 10-bit flip-flop D. The bit multiplying unit 1605 has six stages of bit multipliers g for multiplying input data by a constant according to the order. Switch SW5, S
W7 is an on / off switch.

【0107】データ出力部16Cは、a、bの2接点を
持つ3点スイッチSW6を備える。
The data output section 16C includes a three-point switch SW6 having two contacts a and b.

【0108】セレクタ部16Dは、動作モード制御信号
sig_1の値によって、低次側シンドローム生成器16A
と、高次側シンドローム生成器16Bと、データ出力部
16Cとの間の接続を変更する。セレクタ部16Dは、
セレクタ1〜5と、インバータINVとを備える。
The selector section 16D outputs an operation mode control signal.
Depending on the value of sig_1, the lower side syndrome generator 16A
Then, the connection between the higher-order syndrome generator 16B and the data output unit 16C is changed. The selector unit 16D includes:
It includes selectors 1 to 5 and an inverter INV.

【0109】セレクタ1及びセレクタ2は、2入力1出
力セレクタで、動作モード制御信号sig_1の最上位ビッ
トの値が「1」の時、黒丸側を選択し、「0」の時、白
丸側を選択するセレクタである。
The selector 1 and the selector 2 are two-input and one-output selectors. When the value of the most significant bit of the operation mode control signal sig_1 is “1”, the black circle is selected. When the value is “0”, the white circle is selected. The selector to select.

【0110】セレクタ3、セレクタ4及びセレクタ5
は、1入力1出力ゲートで、セレクタ信号線2の値が
「1」の時、すなわち、動作モード制御信号sig_1の最
上位ビットが「0」の時、入力されたデータをそのまま
出力し、セレクタ信号線2の値が「0」の時、すなわ
ち、動作モード制御信号sig_1の最上位ビットが「1」
のとき、入力されたデータを出力しない。
Selector 3, Selector 4, and Selector 5
Is a one-input one-output gate, which outputs the input data as it is when the value of the selector signal line 2 is “1”, that is, when the most significant bit of the operation mode control signal sig_1 is “0”. When the value of the signal line 2 is “0”, that is, when the most significant bit of the operation mode control signal sig_1 is “1”
When, input data is not output.

【0111】低次側シンドローム生成器16A及び高次
側シンドローム生成器16Bは、外部ECC回路106
1のシンドローム/符号生成手段1702と、符号生成
時のガロア体の元を同一にするためフリップフロップD
のビット数を同一にし、符号生成多項式が同一になるよ
うに、ビット乗算部の各定数gを定めている。
The lower-order syndrome generator 16A and the higher-order syndrome generator 16B are connected to the external ECC circuit 106.
1 and the flip-flop D to make the element of the Galois field the same at the time of code generation.
Are set to be the same, and each constant g of the bit multiplication unit is determined so that the code generation polynomial becomes the same.

【0112】次に、以上説明したような構成を有するフ
ラッシュメモリカード501におけるデータ書き込み時
の処理について説明する。
Next, the processing at the time of writing data in the flash memory card 501 having the configuration described above will be described.

【0113】まず、データ書き込み時のデータパスにつ
いて説明する。
First, the data path for writing data will be described.

【0114】図10は、動作モード制御信号sig_1の値
に応じたデータパスの変化の様子を概念的に示す図であ
る。
FIG. 10 conceptually shows how the data path changes in accordance with the value of operation mode control signal sig_1.

【0115】前述したように、動作モード制御信号sig_
1の値が「0010」の場合、内部ECC回路104は使用
されない。従って、データパスは、1、2,4,6,8
の順になる。すなわち、ホスト等からフラッシュメモリ
カード501に書き込まれたデータは、まず、外部EC
C回路1061に渡され、外部ECC回路1061によ
って符号化され、その後、内部ECC回路104によっ
て符号化されることなく、メモリ103に書き込まれ
る。
As described above, the operation mode control signal sig_
When the value of 1 is “0010”, the internal ECC circuit 104 is not used. Therefore, the data paths are 1, 2, 4, 6, 8
It becomes in order. That is, the data written to the flash memory card 501 from the host or the like
The data is passed to the C circuit 1061, encoded by the external ECC circuit 1061, and then written to the memory 103 without being encoded by the internal ECC circuit 104.

【0116】また、動作モード制御信号sig_1の値が「1
111」の場合、データパスは1,2,4,5,7,8と
なる。すなわち、ホスト等からフラッシュメモリカード
501に書き込まれたデータは、まず、外部ECC回路
1061に渡され、外部ECC回路1061によって、
外符号に符号化される。その後、内部ECC回路104
に渡され、内部ECC回路104によって内符号に符号
化され、メモリ103に書き込まれる。
When the value of the operation mode control signal sig_1 is "1"
In the case of “111”, the data paths are 1, 2, 4, 5, 7, and 8. That is, data written to the flash memory card 501 from the host or the like is first passed to the external ECC circuit 1061, and the external ECC circuit 1061
Encoded into an outer code. Then, the internal ECC circuit 104
And is encoded into an inner code by the internal ECC circuit 104 and written to the memory 103.

【0117】動作モード制御信号sig_1の値が「100
0」、「0100」、「0110」の場合、データパスは1,
3,5,7,8となる。すなわち、ホスト等からフラッ
シュメモリカード501に書き込まれたデータは、外部
ECC回路1061によって符号化されることなく、メ
モリチップ102に書き込まれ、内部ECC回路104
によって符号化された後、メモリ103に書き込まれ
る。
The value of the operation mode control signal sig_1 is "100
For "0", "0100", and "0110", the data path is 1,
3, 5, 7, and 8. That is, data written to the flash memory card 501 from the host or the like is written to the memory chip 102 without being encoded by the external ECC circuit 1061, and is written to the internal ECC circuit 104.
After that, it is written to the memory 103.

【0118】次に、データ書き込み時の符号化処理の詳
細について説明する。
Next, details of the encoding process at the time of writing data will be described.

【0119】図11は、データ書き込み時の符号化処理
の流れを示す図である。
FIG. 11 is a diagram showing the flow of the encoding process at the time of data writing.

【0120】フラッシュメモリカード501では、前述
したように、その動作モードによって行う符号化処理が
異なるので、まず、動作モード制御信号sig_1の値が「1
111」であるか否かを判別する(S1101)。
As described above, in the flash memory card 501, since the encoding process to be performed differs depending on the operation mode, first, the value of the operation mode control signal sig_1 is set to “1”.
It is determined whether it is "111" (S1101).

【0121】その結果、動作モード制御信号sig_1の値
が「1111」の場合(S1101:YES)、512バイトのデー
タを積符号化(外符号化)するため、外部ECC回路1
061に入力する前に、情報データの並べ替えを行う
(S1102)。前述したように、本実施形態では、512
バイトの情報データを、16バイト×32バイトのマト
リクスデータとして扱う。外部ECC回路1061は、
適宜並べ替えて入力される512バイトのデータを、3
2バイトごとに符号化する(S1104)。情報データの並
べ替え及び符号化処理の詳細については、後述する。
As a result, when the value of the operation mode control signal sig_1 is “1111” (S1101: YES), the external ECC circuit 1 performs product coding (outer coding) of 512-byte data.
Before inputting to 061, information data is rearranged (S1102). As described above, in the present embodiment, 512
Byte information data is handled as 16-byte × 32-byte matrix data. The external ECC circuit 1061 is
The 512-byte data that is rearranged and input as appropriate
Encoding is performed every two bytes (S1104). Details of the information data rearrangement and encoding processing will be described later.

【0122】一方、動作モード制御信号sig_1の値が「1
111」でない場合は(S1101:NO)、続けて、動作モード
制御信号sig_1の値が「0010」であるか否かを判定する
(S1103)。その結果、動作モード制御信号sig_1の値が
「0010」の場合(S1103:YES)、外部ECC回路106
1は、入力される512バイトの情報データを、5バイ
トまでの誤り訂正が可能な(512+10)シンボルの
符号に符号化する(S1104)。ここでの外部ECC回路
1061による符号化処理の詳細については、後述す
る。
On the other hand, when the value of the operation mode control signal sig_1 is “1”
If it is not “111” (S1101: NO), it is determined whether the value of the operation mode control signal sig_1 is “0010” (S1103). As a result, when the value of the operation mode control signal sig_1 is “0010” (S1103: YES), the external ECC circuit 106
1 encodes the input 512-byte information data into a (512 + 10) symbol code capable of error correction of up to 5 bytes (S1104). The details of the encoding process performed by the external ECC circuit 1061 will be described later.

【0123】一方、動作モード制御信号sig_1の値が「0
010」でない場合(S1103:NO)、すなわち、「1000」、
「0100」又は「0110」の場合、512バイトのデータ
は、外部ECC回路1061による符号化を行うことな
しに、そのまま内部ECC回路104に渡される。
On the other hand, if the value of the operation mode control signal sig_1 is "0"
010 "(S1103: NO), that is," 1000 ",
In the case of “0100” or “0110”, 512-byte data is passed to the internal ECC circuit 104 without being encoded by the external ECC circuit 1061.

【0124】以上のようにして、メモリチップ102外
部での処理が終了すると、続いて、メモリチップ102
内部での符号化処理に移る。メモリチップ102内部の
符号化処理もその動作モードによって異なるので、ま
ず、動作モード制御信号sig_1の値が「0010」であるか
否かの判定を行う(S1105)。
When the processing outside the memory chip 102 is completed as described above, the memory chip 102
Move on to internal encoding processing. Since the encoding process inside the memory chip 102 also differs depending on the operation mode, first, it is determined whether or not the value of the operation mode control signal sig_1 is “0010” (S1105).

【0125】その結果、動作モード制御信号sig_1の値
が「0010」の場合(S1105:YES)、内部ECC回路10
4では符号化を行わず、例えば、メモリチップ102
に、バイト単位でシーケンシャルに書き込まれる512
バイトの情報データ+10シンボルの冗長データを、メ
モリ103にそのまま書き込み(S1107)、データ書き
込み処理が終了する。
As a result, when the value of the operation mode control signal sig_1 is “0010” (S1105: YES), the internal ECC circuit 10
4, no encoding is performed, for example, the memory chip 102
Are sequentially written in units of bytes.
The byte information data + redundant data of 10 symbols are directly written into the memory 103 (S1107), and the data writing process ends.

【0126】一方、動作モード制御信号sig_1の値が「0
010」でない場合(S1105:NO)、内部ECC回路104
は、その動作モードに応じた内部符号化を行う(S110
6)。ここでの内部ECC回路104による符号化処理
の詳細については、後述する。内部ECC回路104に
よって符号化された情報データは、メモリ103に書き
込まれ(S1107)、データ書き込み処理が終了する。
On the other hand, when the value of the operation mode control signal sig_1 is “0”
If it is not "010" (S1105: NO), the internal ECC circuit 104
Performs internal coding according to the operation mode (S110).
6). The details of the encoding process by the internal ECC circuit 104 will be described later. The information data encoded by the internal ECC circuit 104 is written to the memory 103 (S1107), and the data writing process ends.

【0127】次に、外部ECC回路1061及び内部E
CC回路104による符号化処理の詳細について説明す
る。
Next, the external ECC circuit 1061 and the internal ECC
Details of the encoding process by the CC circuit 104 will be described.

【0128】まず、外部ECC回路1061及び内部E
CC回路104によって、512バイトの情報データを
積符号化する場合(動作モード制御信号sig_1=「111
1」の場合)について説明する。
First, the external ECC circuit 1061 and the internal E
When the 512-byte information data is product-coded by the CC circuit 104 (operation mode control signal sig_1 = “111
1) will be described.

【0129】図12は、本実施形態で採用する積符号の
構成の概念を示す図である。同図に示すように、512
バイトの情報データを、16バイト×32バイトのマト
リクスデータとして考え、外符号C1は、32バイトの
列データを符号化し、内符号C2は16バイトの行デー
タを符号化する。符号化する情報量は、1行あたり16
×8=128ビット、1列あたり32×8=256ビッ
トになる。
FIG. 12 is a diagram showing the concept of the structure of the product code used in the present embodiment. As shown in FIG.
The byte information data is considered as 16-byte × 32-byte matrix data. The outer code C1 encodes 32-byte column data, and the inner code C2 encodes 16-byte row data. The amount of information to be encoded is 16 per line
× 8 = 128 bits, and 32 × 8 = 256 bits per column.

【0130】また、外部ECC回路1061の訂正能力
は5シンボルだから、1つの列データの符号化に必要な
冗長シンボル長は、10シンボル(=10×10÷8=
13バイト)になる。また、内部ECC回路104の訂
正能力は、2シンボルだから、1つの行データの符号化
に必要な冗長シンボル長は4シンボル(4×10÷8=
5バイト)になる。
Since the correction capability of the external ECC circuit 1061 is 5 symbols, the redundant symbol length required for encoding one column data is 10 symbols (= 10 × 10 ÷ 8 =
13 bytes). Further, since the correction capability of the internal ECC circuit 104 is two symbols, the redundant symbol length required for encoding one row data is four symbols (4 × 10 ÷ 8 =
5 bytes).

【0131】前述したように、本実施形態では、冗長シ
ンボルは、バイト単位で情報を記録するとした時の最小
バイト数で書き込むものとするので、外符号C1の冗長
データ部R1の格納には、13×16=208バイトの
領域が必要となる。また、内符号C2の冗長データ部R
2の格納には、5×42=210バイトの領域が必要と
なる。
As described above, in the present embodiment, since the redundant symbol is written with the minimum number of bytes when information is recorded in byte units, the redundant data portion R1 of the outer code C1 is stored in the redundant symbol. An area of 13 × 16 = 208 bytes is required. Also, the redundant data portion R of the inner code C2
The storage of 2 requires an area of 5 × 42 = 210 bytes.

【0132】実際にメモリ103に格納されるときは、
情報データは、512バイトの1次元配列データとして
格納されるため、マトリクスデータへの実際の変換は必
ずしも必要ではなく、1次元配列データのままで扱って
もよい。以下の説明では情報データを1次元配列データ
として扱う。
When actually stored in the memory 103,
Since the information data is stored as 512-byte one-dimensional array data, actual conversion to matrix data is not necessarily required, and the information data may be handled as it is. In the following description, information data is treated as one-dimensional array data.

【0133】図13は、512バイトの1次元配列デー
タから外符号C1の情報データ部を抽出し、冗長データ
部を生成する方法を示す図である。ホストからフラッシ
ュメモリカード501に書き込まれた512バイトのデ
ータは、一旦、DRAM505に格納される。そして、
マイコン504は、まず、先頭の1バイトのデータを読
み出し、外部ECC回路1061に入力する。次に、デ
ータアドレスを15バイトスキップして、1バイトのデ
ータを読み出し、外部ECC回路1061に入力する。
このように、16バイト毎のデータを順次読み出して、
読み出したデータを順次、外部ECC回路1061に入
力する。これを32回繰り返し、32バイトの列データ
を外部ECC回路1061に入力する。32バイトの列
データの入力が終了すると、今度は、この32バイトの
列データに対して生成された10シンボルの冗長データ
を外部ECC回路1061から読み出して、これをDR
AM505の所定の領域、例えば、情報データ部の後ろ
に格納する。
FIG. 13 is a diagram showing a method of extracting the information data portion of the outer code C1 from the 512-byte one-dimensional array data and generating a redundant data portion. The 512-byte data written from the host to the flash memory card 501 is temporarily stored in the DRAM 505. And
The microcomputer 504 first reads the first byte of data and inputs the data to the external ECC circuit 1061. Next, the data address is skipped by 15 bytes, 1-byte data is read, and input to the external ECC circuit 1061.
In this way, data of every 16 bytes is sequentially read out,
The read data is sequentially input to the external ECC circuit 1061. This is repeated 32 times, and the 32-byte column data is input to the external ECC circuit 1061. When the input of the 32-byte column data is completed, the 10-symbol redundant data generated for the 32-byte column data is read out from the external ECC circuit 1061, and is read out from the external ECC circuit 1061.
It is stored in a predetermined area of the AM 505, for example, behind the information data section.

【0134】以上の操作が終了すると、今度は、前から
2バイト目から、16バイト毎にデータを読み出し、以
上と同様の操作を行う。このような処理を16回、すな
わち、図12に示したマトリックスの第1列〜第16列
について行い、10シンボルの冗長データを16個分生
成する。
When the above operation is completed, data is read out every 16 bytes from the second byte from the beginning, and the same operation as above is performed. Such processing is performed 16 times, that is, for the first to 16th columns of the matrix shown in FIG. 12, and 16 redundant data of 10 symbols are generated.

【0135】以上のようにして、外部ECC回路106
1は、512バイトのデータを32バイトごとに符号化
する。
As described above, the external ECC circuit 106
1 encodes 512-byte data every 32 bytes.

【0136】次に、この時の外部ECC回路1061内
の動作について説明する。
Next, the operation in external ECC circuit 1061 at this time will be described.

【0137】外部ECC回路1061に入力された8ビ
ットのデータは、まず、8−10変換器1701によ
り、10ビットに変換されたあと、シンドローム/符号
生成生手段1702に入力される。
The 8-bit data input to the external ECC circuit 1061 is first converted to 10 bits by the 8-10 converter 1701, and then input to the syndrome / code generator 1702.

【0138】このとき、図7に示したシンドローム/符
号生成生手段1702では、スイッチSW11、SW1
2がオンにされ、SW13のb側が選択されている。こ
のような状態のシンドローム/符号生成生手段1702
において、情報データは、1シンボルずつ、入力端子か
ら、スイッチSW11、SW12を介して、ビット乗算
部2102及びシフトレジスタ部2101に順次入力さ
れる。また、情報データは、それと同時に、スイッチS
W13を通って、そのまま出力端子に出力される。そし
て、32バイトすべての情報データの入力が終了する
と、シフトレジスタ部2101に、10段×10ビット
の冗長データが保持されていることになる。以上のよう
にして、32バイトの情報データに対して、10シンボ
ルの冗長データが生成される。
At this time, the syndrome / code generation means 1702 shown in FIG.
2 is turned on, and the b side of SW13 is selected. Syndrome / code generator 1702 in such a state
In, the information data is sequentially input from the input terminal to the bit multiplication unit 2102 and the shift register unit 2101 via the switches SW11 and SW12 one symbol at a time. At the same time, the information data is read from the switch S
The signal is output to the output terminal as it is through W13. When the input of the information data of all 32 bytes is completed, the shift register unit 2101 holds 10-stage × 10-bit redundant data. As described above, redundant data of 10 symbols is generated for 32 bytes of information data.

【0139】次に、以上のようにして生成された10シ
ンボルの冗長データを出力端子から出力する。そのた
め、スイッチSW13のa側を選択し、スイッチSW1
1、SW12を、オフとする。このとき、ビット乗算部
2102には、0が入力されるため、シフトレジスタ部
2101の各フリップフロップDの値、すなわち、冗長
データは、そのまま高次の項からSW13を通って出力
される。
Next, the redundant data of 10 symbols generated as described above is output from the output terminal. Therefore, the a side of the switch SW13 is selected and the switch SW1 is selected.
1. SW12 is turned off. At this time, since 0 is input to the bit multiplying unit 2102, the value of each flip-flop D of the shift register unit 2101, that is, redundant data is output as it is from the higher-order term through the SW 13.

【0140】シンドローム/符号生成手段1702から
出力された10ビットのデータは、10−8変換器17
09で、8ビットのデータに変換された後、外部ECC
回路1061の外部に出力される。
The 10-bit data output from the syndrome / code generation means 1702 is
09, after being converted to 8-bit data, the external ECC
The signal is output outside the circuit 1061.

【0141】以上の操作が16回繰り返されることで、
512バイトのデータから42×16シンボルの外符号
が生成される。
By repeating the above operation 16 times,
An outer code of 42 × 16 symbols is generated from 512 bytes of data.

【0142】以上のようにして外符号化が終了すると、
次に、生成された外符号のメモリチップ102に対する
書き込みが行われる。この外符号のメモリチップ102
への書き込みでは、冗長データ部は、10シンボル×1
6個からなるR1を16シンボル×10個のデータへ変
換して書き込まれる。
When outer coding is completed as described above,
Next, writing of the generated outer code to the memory chip 102 is performed. This outer code memory chip 102
In writing to the redundant data section, the redundant data portion is 10 symbols × 1
Six R1s are converted into 16 symbols × 10 data and written.

【0143】図13の場合、冗長データ部R1におい
て、1シンボル読み取るごとにデータアドレスを9シン
ボルずつスキップする。これを16回繰り返し16シン
ボルの列データを生成する。この操作を10回繰り返し
て、10個の列データを生成する。
In the case of FIG. 13, in the redundant data section R1, the data address is skipped by 9 symbols each time one symbol is read. This is repeated 16 times to generate column data of 16 symbols. This operation is repeated ten times to generate ten column data.

【0144】以上のようにしてメモリチップ102に書
き込まれる16×42シンボルのデータは、8ビット毎
に、内部ECC回路104に順次入力され、16シンボ
ル単位で、内符号C2に符号化される。
The data of 16 × 42 symbols written in the memory chip 102 as described above is sequentially input to the internal ECC circuit 104 every 8 bits, and is encoded into the internal code C2 in units of 16 symbols.

【0145】次に、この時の内部ECC回路104内の
動作について説明する。
Next, the operation in internal ECC circuit 104 at this time will be described.

【0146】内部ECC回路104に入力された8ビッ
トのデータは、まず、8−10変換器1801で10ビ
ットのシンボルに変換された後、シンドローム/符号生
成手段1802に入力される。
The 8-bit data input to the internal ECC circuit 104 is first converted into a 10-bit symbol by the 8-10 converter 1801, and then input to the syndrome / code generation means 1802.

【0147】このとき、図9に示したシンドローム/符
号生成手段1802では、セレクタ部16Dによって、
端子1と端子9、端子3と端子10が接続され、低次側
シンドローム生成器16Aとデータ出力部16Cが接続
される。また、スイッチSW1、SW2、SW3がオン
とされ、スイッチSW6は、a側が選択される。
At this time, in the syndrome / code generation means 1802 shown in FIG.
The terminal 1 is connected to the terminal 9, the terminal 3 is connected to the terminal 10, and the lower-order syndrome generator 16A is connected to the data output unit 16C. The switches SW1, SW2, and SW3 are turned on, and the switch SW6 is selected on the a side.

【0148】このような状態において、情報データは、
1シンボルずつ、スイッチSW1、SW2を介して、ビ
ット乗算部1602及びシフトレジスタ部1601に順
次入力されると同時に、スイッチSW6を通って、出力
端子に出力される。16バイトの情報データの入力が終
了すると、シフトレジスタ部1601に、4段×10ビ
ットの冗長データが保持されていることになる。
In such a state, the information data is
One symbol at a time is sequentially input to the bit multiplier 1602 and the shift register 1601 via the switches SW1 and SW2, and at the same time, is output to the output terminal via the switch SW6. When the input of the 16-byte information data is completed, the shift register 1601 holds the 4-stage × 10-bit redundant data.

【0149】次に、この4シンボルの冗長データをシン
ドローム/符号生成手段1802から出力する。そのた
め、スイッチSW6のb側を選択し、スイッチSW1、
SW2、SW3は、オフとする。このとき、ビット乗算
部1602には、0が入力されるため、シフトレジスタ
部1601の各フリップフロップDの値、すなわち、冗
長データは、そのまま高次の項からスイッチSW6を通
って出力される。
Next, the four-symbol redundant data is output from the syndrome / code generation means 1802. Therefore, the b side of the switch SW6 is selected, and the switches SW1,
SW2 and SW3 are turned off. At this time, since 0 is input to the bit multiplying unit 1602, the value of each flip-flop D of the shift register unit 1601, that is, redundant data is output as it is from the higher-order term through the switch SW6.

【0150】シンドローム/符号生成手段1802から
出力された10ビットのデータは、10−8変換器18
09で、8ビットのデータに変換された後、内部ECC
回路104の外部に出力され、メモリ103に書き込ま
れる。
The 10-bit data output from the syndrome / code generation means 1802 is
09, after being converted to 8-bit data, the internal ECC
The data is output to the outside of the circuit 104 and written to the memory 103.

【0151】以上のような操作を(32+10)回繰り
返すことで、内符号C2の生成が終了する。
By repeating the above operation (32 + 10) times, the generation of the inner code C2 is completed.

【0152】次に、積符号化以外の符号化処理の詳細に
ついて説明する。
Next, details of the encoding process other than the product encoding will be described.

【0153】まず、外部ECC回路1061によって、
512バイトの情報データを、5バイトまでの誤り訂正
可能な(512+10)シンボルの符号に符号化する場
合(動作モード制御信号sig_1=「0010」の場合)につ
いて説明する。
First, the external ECC circuit 1061
A case in which 512-byte information data is encoded into a code of (512 + 10) symbols that can be error-corrected up to 5 bytes (when the operation mode control signal sig_1 = “0010”) will be described.

【0154】この時の外部ECC回路1061のシンド
ローム/符号生成生手段1702における動作は、前述
した積符号化時の場合(動作モード制御信号sig_1の値
=「1111」の場合)とほぼ同様である。
At this time, the operation of the syndrome / code generation means 1702 of the external ECC circuit 1061 is almost the same as in the case of the above-described product coding (when the value of the operation mode control signal sig_1 = “1111”). .

【0155】すなわち、スイッチSW11、SW12が
オンにされ、SW13のb側が選択されたシンドローム
/符号生成生手段1702において、情報データは、1
シンボルずつ、入力端子から、スイッチSW11、SW
12を介して、ビット乗算部2102及びシフトレジス
タ部2101に順次入力され、それと同時に、スイッチ
SW13を通って、そのまま出力端子に出力される。そ
して、512バイトの情報データの入力が終了すると、
シフトレジスタ部2101に、10段×10ビットの冗
長データが保持されていることになる。以上のようにし
て、512バイトの情報データに対して、10シンボル
の冗長データが生成される。
That is, when the switches SW11 and SW12 are turned on and the b side of the switch SW13 is selected, the information data is
Switches SW11, SW
The signal is sequentially input to the bit multiplication unit 2102 and the shift register unit 2101 via the switch 12, and at the same time, is output to the output terminal as it is via the switch SW13. When the input of 512 bytes of information data is completed,
This means that the shift register unit 2101 holds 10-stage × 10-bit redundant data. As described above, redundant data of 10 symbols is generated for 512 bytes of information data.

【0156】次に、このようにして生成された冗長デー
タを、前述した積符号化時の場合と同様にして、シンド
ローム/符号生成手段1702から出力する。
Next, the thus generated redundant data is output from the syndrome / code generating means 1702 in the same manner as in the case of the above-described product coding.

【0157】以上のようにして、512バイトの情報デ
ータから、(512+10)シンボルの符号が生成され
る。
As described above, a code of (512 + 10) symbols is generated from 512 bytes of information data.

【0158】次に、内部ECC回路104によって、5
12バイトのデータを2バイトまでの誤り訂正可能な
(512+4)シンボルの符号に符号化する場合(動作
モード制御信号sig_1=「1000」の場合)について説明
する。
Next, the internal ECC circuit 104
A case in which 12-byte data is encoded into an error-correctable (512 + 4) symbol code of up to 2 bytes (when the operation mode control signal sig_1 = “1000”) will be described.

【0159】この場合の内部ECC回路104のシンド
ローム/符号生成手段1802における動作も、前述し
た積符号化時の場合とほぼ同様である。
In this case, the operation of the syndrome / code generation means 1802 of the internal ECC circuit 104 is almost the same as in the case of the above-described product coding.

【0160】すなわち、セレクタ部16Dによって、低
次側シンドローム生成器16Aとデータ出力部16Cが
接続され、スイッチSW1、SW2、SW3がオンとさ
れ、スイッチSW6のa側が選択されたシンドローム/
符号生成手段1802において、情報データは、1シン
ボルずつ、スイッチSW1、SW2を介して、ビット乗
算部1602及びシフトレジスタ部1601に順次入力
されると同時に、スイッチSW6を通って、出力端子に
出力される。512バイトすべての情報データの入力が
終了すると、シフトレジスタ部1601に、4段×10
ビットの冗長データが保持されていることになる。
That is, the selector 16D connects the lower-order syndrome generator 16A and the data output unit 16C, turns on the switches SW1, SW2, and SW3, and selects the a / side of the switch SW6 for the selected syndrome / switch SW6.
In the code generation means 1802, the information data is sequentially input to the bit multiplication unit 1602 and the shift register unit 1601 via the switches SW1 and SW2 one symbol at a time, and at the same time, is output to the output terminal via the switch SW6. You. When the input of the information data for all 512 bytes is completed, the shift register 1601 stores 4 rows × 10
This means that bit redundant data is held.

【0161】次に、この4シンボルの冗長データを、前
述したのと同様にして、シンドローム/符号生成手段1
802から出力する。
Next, the four-symbol redundant data is transmitted to the syndrome / code generation means 1 in the same manner as described above.
802.

【0162】以上のようにして、512バイトの情報デ
ータから、(512+4)シンボルの符号が生成され
る。
As described above, a code of (512 + 4) symbols is generated from 512 bytes of information data.

【0163】次に、内部ECC回路104によって、5
12バイトのデータを5バイトまでの誤り訂正可能な
(512+10)シンボルの符号に符号化する場合(動
作モード制御信号sig_1=「0100」または「0110」の場
合)について説明する。
Next, the internal ECC circuit 104
A case in which 12-byte data is encoded into up to 5 bytes of error-correctable (512 + 10) symbol codes (when the operation mode control signal sig_1 is “0100” or “0110”) will be described.

【0164】この場合、内部ECC回路104のシンド
ローム/符号生成回路1802は、右から低次側シンド
ローム生成器16A、高次側シンドローム生成器16
B、データ出力部16Cの順に接続され、外部ECC回
路1061のシンドローム/符号生成回路1702と同
様の構成になる。そして、動作モード制御信号sig_1の
値が「0010」の場合の外部ECC回路1061と同様に
して、10シンボルの冗長データを生成し、512バイ
トの情報データを5バイト訂正可能な符号へ符号化す
る。
In this case, the syndrome / code generation circuit 1802 of the internal ECC circuit 104 includes, from the right, a lower-order syndrome generator 16A and a higher-order syndrome generator 16A.
B and the data output unit 16C are connected in this order, and have the same configuration as the syndrome / code generation circuit 1702 of the external ECC circuit 1061. Then, similarly to the external ECC circuit 1061 when the value of the operation mode control signal sig_1 is “0010”, redundant data of 10 symbols is generated, and information data of 512 bytes is encoded into a code capable of correcting 5 bytes. .

【0165】次に、データ読み出し時の処理について説
明する。
Next, the processing at the time of reading data will be described.

【0166】まず、データ読み出し時のデータパスの変
化について説明する。図14は、動作モード制御信号si
g_1の値に応じたデータパスの変化の様子を概念的に示
す図である。同図において、例えば、「**10」とある場
合、「**」の部分は、任意の値を意味する。
First, a change in the data path at the time of reading data will be described. FIG. 14 shows the operation mode control signal si
FIG. 7 is a diagram conceptually showing a state of a change of a data path according to a value of g_1. In the figure, for example, when there is "** 10", the part of "**" means an arbitrary value.

【0167】まず、前述したように、動作モード制御信
号sig_1の値が「0010」又は「0110」(すなわち、「**1
0」)の場合、内部ECC回路104による誤り検出・
訂正処理は行わない。従って、データパスは、図14に
示した8、6、4、2、1の順になる。すなわち、メモ
リ103から読み出されたデータは、内部ECC回路1
04で誤り検出・訂正処理が行われることなく、そのま
ま、メモリチップ102の外部に出力される。メモリチ
ップ102の外部に出力されたデータは、外部ECC回
路1061に入力され、誤り検出・訂正処理が行われ
る。外部ECC回路1061により誤り検出・訂正処理
が行われたデータは、フラッシュメモリカード501の
外部に渡される。
First, as described above, the value of the operation mode control signal sig_1 is "0010" or "0110" (that is, "** 1
0 ”), the error is detected by the internal ECC circuit 104.
No correction processing is performed. Therefore, the data paths are in the order of 8, 6, 4, 2, 1 shown in FIG. That is, the data read from the memory 103 is stored in the internal ECC circuit 1
The data is output to the outside of the memory chip 102 as it is without performing the error detection / correction processing at 04. The data output to the outside of the memory chip 102 is input to the external ECC circuit 1061, where error detection and correction processing is performed. The data subjected to the error detection / correction processing by the external ECC circuit 1061 is transferred to the outside of the flash memory card 501.

【0168】また、動作モード制御信号sig_1の値が「1
000」又は「0100」(すなわち、「**00」)の場合、デ
ータパスは、8、7、5、3、1となる。すなわち、メ
モリ103から読み出されたデータは、内部ECC回路
104に入力され、誤り検出・訂正処理が行われる。内
部ECC回路104によって誤り検出・訂正が行われた
データは、メモリチップ102の外部に出力される。メ
モリチップ102から出力されたデータは、外部ECC
回路1061で誤り検出・訂正処理が行われることな
く、フラッシュメモリカード501の外部に出力され
る。
When the value of the operation mode control signal sig_1 is “1”
In the case of “000” or “0100” (that is, “** 00”), the data paths are 8, 7, 5, 3, and 1. That is, the data read from the memory 103 is input to the internal ECC circuit 104, where error detection / correction processing is performed. The data subjected to the error detection and correction by the internal ECC circuit 104 is output to the outside of the memory chip 102. Data output from the memory chip 102 is stored in an external ECC
The data is output to the outside of the flash memory card 501 without the error detection / correction processing being performed in the circuit 1061.

【0169】また、動作モード制御信号sig_1の値が「1
111」の場合、データパスは、8、7、5、4、2、1
となる。すなわち、メモリ103から読み出されたデー
タは、内部ECC回路104及び外部ECC回路106
1の両方で、積符号による誤り検出・訂正処理が行われ
る。
When the value of the operation mode control signal sig_1 is "1"
111 ”, the data path is 8, 7, 5, 4, 2, 1
Becomes That is, the data read from the memory 103 is stored in the internal ECC circuit 104 and the external ECC circuit 106.
In both cases, the error detection / correction processing using the product code is performed.

【0170】次に、内部ECC回路104による復号処
理について説明する。図15は、内部ECC回路104
による復号処理の流れを示す図である。
Next, a decoding process by the internal ECC circuit 104 will be described. FIG. 15 shows the internal ECC circuit 104.
Is a diagram showing a flow of a decoding process according to FIG.

【0171】メモリ103から読み出されたデータを内
部ECC回路104で復号するか否かは、前述したよう
に、その動作モードによるので、まず、動作モード制御
信号sig_1が「**10」であるか否かを判別する(S120
1)。その結果、動作モード制御信号sig_1の値が「**1
0」(具体的には、「0010」または「0110」)の場合(S
1201:YES)、内部ECC回路104では復号を行わ
ず、メモリ103から読み出されたデータ(情報データ
+冗長データ)をそのまま外部ECC回路1061に出
力する。
Whether or not the data read from the memory 103 is decoded by the internal ECC circuit 104 depends on the operation mode, as described above. First, the operation mode control signal sig_1 is "** 10". Is determined (S120
1). As a result, the value of the operation mode control signal sig_1 becomes “** 1
0 ”(specifically,“ 0010 ”or“ 0110 ”) (S
1201: YES), the internal ECC circuit 104 does not perform decoding, and outputs the data (information data + redundant data) read from the memory 103 to the external ECC circuit 1061 as it is.

【0172】一方、動作モード制御信号sig_1の値が「*
*10」でない場合は(S1201:NO)、内部ECC回路10
4による復号処理を行う。符号の復号単位は、動作モー
ド制御信号sig_1の値が「1000」の場合、(512+
4)シンボル、「1111」の場合は、(16+4)シンボ
ル、「0100」の場合、(512+10)シンボルであ
る。
On the other hand, when the value of the operation mode control signal sig_1 is “*
* 10 ”(S1201: NO), the internal ECC circuit 10
4 is performed. When the value of the operation mode control signal sig_1 is “1000”, the decoding unit of the code is (512+
4) In the case of a symbol "1111", it is a (16 + 4) symbol, and in the case of "0100", it is a (512 + 10) symbol.

【0173】内部ECC回路104による復号を行う場
合は、最初に、前述した復号単位について、Snの値を
計算する(S1203)。この計算は、シンドローム/符号
生成手段1802で行われる。
When decoding is performed by the internal ECC circuit 104, first, the value of Sn is calculated for the above-described decoding unit (S1203). This calculation is performed by the syndrome / code generation unit 1802.

【0174】このときのシンドローム/符号生成手段1
802の回路構成は、動作モード制御信号sig_1の値が
「1111」又は「1000」の場合は、右から低次側シンドロ
ーム生成器16A、データ出力部16Cの順に接続さ
れ、動作モード制御信号sig_1の値が「0100」の場合
は、低次側シンドローム生成器16A、高次側シンドロ
ーム生成器16B、データ出力部16Cの順に接続され
る。これは、符号生成時と符号長を一致させてSnを計
算するためである。
At this time, the syndrome / code generation means 1
When the value of the operation mode control signal sig_1 is “1111” or “1000”, the circuit configuration of 802 is connected from the right to the lower-order syndrome generator 16A and the data output unit 16C in that order, and the operation mode control signal sig_1 When the value is “0100”, the lower-order syndrome generator 16A, the higher-order syndrome generator 16B, and the data output unit 16C are connected in this order. This is because Sn is calculated by making the code length coincide with the code length.

【0175】そして、情報データ及び冗長データを、シ
ンドローム/符号生成手段1802に順次入力し、前述
した一復号単位の入力が終了すると、読み出したデータ
に対する誤りの有無を調べるため、Sn=all0である
か否かの判定を行う(S1204)。これは、シンドローム
/符号生成手段1802のシフトレジスタ部の各フリッ
プフロップDの値で判定する。フリップフロップDの値
がすべて0の場合が、Sn=all0に相当する。
Then, the information data and the redundant data are sequentially input to the syndrome / code generation means 1802. When the input of one decoding unit is completed, Sn = all0 to check whether there is an error in the read data. It is determined whether or not this is the case (S1204). This is determined by the value of each flip-flop D of the shift register unit of the syndrome / code generation unit 1802. The case where the values of the flip-flops D are all 0 corresponds to Sn = all0.

【0176】判定の結果、Sn=all0の場合は(S120
4:YES)、読み出したデータに誤りがないと判断し、内
部ECC回路104における符号の情報データ部を、メ
モリチップ102の外部に出力し、内部ECC回路10
4の復号処理を終了する。
If the result of the determination is that Sn = all0 (S120
4: YES), it is determined that there is no error in the read data, and the information data portion of the code in the internal ECC circuit 104 is output to the outside of the memory chip 102.
The decoding process of No. 4 ends.

【0177】一方、Sn=all0でない場合は(S1204:
NO)、読み出したデータに誤りが発生したと判断し、誤
り位置多項式σ(x)を計算する。これは、図8に示した
誤り評価式生成手段1804が行う。そして、誤り位置
多項式σ(x)が求まるか否かを判別する(S1205)。
On the other hand, when Sn = all0 is not satisfied (S1204:
NO), it is determined that an error has occurred in the read data, and an error position polynomial σ (x) is calculated. This is performed by the error evaluation formula generation means 1804 shown in FIG. Then, it is determined whether or not the error locator polynomial σ (x) is obtained (S1205).

【0178】その結果、誤り位置多項式σ(x)が求まる
場合は(S1205:YES)、誤り位置・誤り値検索手段18
05を用いて、誤りの位置、値を計算し、誤り訂正処理
を行う(S1206)。その後、誤り訂正処理が正常に終了
したか否かを判別する(S1207)。
As a result, when the error position polynomial σ (x) is obtained (S1205: YES), the error position / error value search means 18
05, the error position and value are calculated, and error correction processing is performed (S1206). Thereafter, it is determined whether or not the error correction processing has been completed normally (S1207).

【0179】その結果、誤り訂正処理が正常に終了した
場合は(S1207:YES)、誤り訂正の個数に応じ
て、行データの信頼性情報aiを算出する。行データ信頼
性情報aiの算出は、行データ信頼性情報生成手段180
7が行う。内部ECC回路104の訂正能力が2バイト
の場合、数式(15)を用いて計算すると、aiの値は、
訂正不能、2バイト訂正、1バイト訂正、訂正無しの順
に、0、1/5、3/5、1の4値となる。
As a result, when the error correction processing is completed normally (S1207: YES), the reliability information ai of the row data is calculated according to the number of error corrections. The row data reliability information ai is calculated by the row data reliability information generation unit 180.
7 does. When the correction capability of the internal ECC circuit 104 is 2 bytes, when calculated using Expression (15), the value of ai is:
There are four values of 0, 1/5, 3/5, and 1 in the order of uncorrectable, 2-byte corrected, 1-byte corrected, and no correction.

【0180】そして、内部ECC回路104における符
号の情報データ部及び行データの信頼性情報aiを外部に
出力し(S1209)、内部ECC回路104の復号処理を
終了する。
Then, the information data portion of the code in the internal ECC circuit 104 and the reliability information ai of the row data are output to the outside (S1209), and the decoding processing of the internal ECC circuit 104 is completed.

【0181】一方、誤り訂正処理が正常に終了しなかっ
た場合は(S1207:NO)、訂正能力を超える誤りが発生
したと判定し、訂正不能誤り検出情報を出力し、行デー
タの信頼性情報aiを0とする(S1208)。そして、内部
ECC回路104における符号の情報データ部及び行デ
ータの信頼性情報aiを出力し(S1209)、内部ECC回
路104の復号処理を終了する。
On the other hand, if the error correction processing has not been completed normally (S1207: NO), it is determined that an error exceeding the correction capability has occurred, uncorrectable error detection information is output, and the reliability information of the row data is output. ai is set to 0 (S1208). Then, the information data portion of the code in the internal ECC circuit 104 and the reliability information ai of the row data are output (S1209), and the decoding process of the internal ECC circuit 104 is completed.

【0182】また、誤り位置多項式σ(x)が求まらない
場合(S1205:NO)、つまり、Snからσ(x)を求めた後
でσ(x)の解が求まらない場合、あるいは解が範囲外の
場合も、訂正能力を超える誤りが発生したと判定し、訂
正不能誤り検出情報を出力し(S1208)、更に、行デー
タの信頼性情報aiを0として出力する(S1209)。
When the error locator polynomial σ (x) is not obtained (S1205: NO), that is, when the solution of σ (x) is not obtained after obtaining σ (x) from Sn, Alternatively, even when the solution is out of the range, it is determined that an error exceeding the correction capability has occurred, uncorrectable error detection information is output (S1208), and the reliability information ai of the row data is output as 0 (S1209). .

【0183】以上のようにして、内部ECC回路104
による復号処理が行われる。
As described above, the internal ECC circuit 104
Is performed.

【0184】次に、外部ECC回路1061による復号
処理について説明する。
Next, decoding processing by the external ECC circuit 1061 will be described.

【0185】図16は、外部ECC回路1061による
復号処理の流れを示す図である。
FIG. 16 is a diagram showing the flow of the decoding process by the external ECC circuit 1061.

【0186】最初に、外部ECC回路1061に入力さ
れたデータについて、どのような復号処理を行うかを判
断するため、まず、動作モード制御信号sig_1の値が、
「**00」か否かを判定する(S1301)。
First, in order to determine what kind of decoding processing is performed on the data input to the external ECC circuit 1061, first, the value of the operation mode control signal sig_1 is set as follows.
It is determined whether it is “** 00” (S1301).

【0187】その結果、動作モード制御信号sig_1の値
が、「**00」(具体的には、「1000」又は「0100」)の
場合(S1301:YES)、外部ECC回路1061による復
号処理は行われず、メモリチップ102から出力される
データがそのままホスト等に渡される。一方、動作モー
ド制御信号sig_1の値が「**00」ではない場合(S1301:
NO)、続いて、動作モード制御信号sig_1の値が「111
1」か否かを判定する(S1302)。その結果、動作モード
制御信号sig_1の値が「1111」の場合は(S1302:YE
S)、積符号復号を行う。この場合、メモリチップ10
2から読み出したデータを符号長42シンボルの外符号
C1として復号するため、データの並べ替えを行う(S1
303)。そして、並べ替えて入力したデータについて、
外部ECC回路1061において積符号復号を行う(S1
305)。データの並べ替え及び復号処理の詳細について
は、後述する。
As a result, when the value of the operation mode control signal sig_1 is “** 00” (specifically, “1000” or “0100”) (S1301: YES), the decoding process by the external ECC circuit 1061 is not performed. No, the data output from the memory chip 102 is passed to the host or the like as it is. On the other hand, when the value of the operation mode control signal sig_1 is not “** 00” (S1301:
NO), and then the value of the operation mode control signal sig_1 becomes “111”.
It is determined whether it is "1" (S1302). As a result, when the value of the operation mode control signal sig_1 is “1111” (S1302: YE
S), perform product code decoding. In this case, the memory chip 10
In order to decode the data read from No. 2 as an outer code C1 having a code length of 42 symbols, the data is rearranged (S1
303). Then, for the data entered after sorting,
Product code decoding is performed in the external ECC circuit 1061 (S1
305). Details of the data rearrangement and decoding processing will be described later.

【0188】また、動作モード制御信号sig_1の値が「1
111」でない場合は(S1302:NO)、外部ECC回路10
61により、符号長(512+10)シンボルの符号
(訂正能力5バイト)の復号処理を行う(S1304)。
When the value of the operation mode control signal sig_1 is “1”
If it is not "111" (S1302: NO), the external ECC circuit 10
According to 61, decoding processing of a code of code length (512 + 10) symbols (correction capability 5 bytes) is performed (S1304).

【0189】次に、この外部ECC回路1061による
5バイト訂正復号処理S1304の詳細について説明す
る。図17は、外部ECC回路1061による5バイト
訂正復号処理の流れを示す図である。
Next, the details of the 5-byte correction decoding processing S1304 by the external ECC circuit 1061 will be described. FIG. 17 is a diagram showing the flow of the 5-byte correction decoding process by the external ECC circuit 1061.

【0190】同図に示すように、外部ECC回路106
1では、まず、メモリチップ102から読み出した(5
12+10)シンボルのデータがシンドローム/符号生
成手段1702に順次入力され、Snが計算される(S1
401)。
As shown in FIG.
In the first case, the data is read from the memory chip 102 (5
Data of (12 + 10) symbols are sequentially input to the syndrome / code generation means 1702, and Sn is calculated (S1).
401).

【0191】そして、読み出したデータに対する誤りの
有無を調べるため、Sn=all0の判定を行う(S140
2)。これは、前述した内部ECC回路104の場合と
同様に、シンドローム/符号生成手段1702のシフト
レジスタ部2101のフリップフロップDの値で判定す
る。
Then, in order to check whether or not there is an error in the read data, it is determined that Sn = all0 (S140).
2). This is determined by the value of the flip-flop D of the shift register unit 2101 of the syndrome / code generation unit 1702 as in the case of the internal ECC circuit 104 described above.

【0192】判定の結果、Sn=all0である場合は(S
1402:YES)、入力されたデータに誤りがないと判定
し、外部ECC回路1061は、データの誤り訂正処理
を行わない。
As a result of the judgment, if Sn = all0, (S
1402: YES), it is determined that there is no error in the input data, and the external ECC circuit 1061 does not perform data error correction processing.

【0193】一方、Sn=all0でない場合は(S1402:
NO)、データに誤りが生じていると判定し、続けて、誤
り評価式生成手段1704を用いて、誤り訂正処理を行
うための誤り位置多項式σ(x)が求まるか否かを判定す
る(S1403)。
On the other hand, if Sn = all0 is not satisfied (S1402:
NO), it is determined that an error has occurred in the data, and subsequently, it is determined whether or not the error locator polynomial σ (x) for performing the error correction process is obtained using the error evaluation formula generation means 1704 ( S1403).

【0194】その結果、σ(x)が求まった場合は(S140
3:YES)、誤り訂正処理を行う(S1404)。すなわち、
誤り位置・誤り値検索手段1705を用いて、すべての
シンボルについて誤り検索を行った後、読み込んだデー
タの誤り訂正処理を行う。そして、誤り訂正処理が正常
に終了したか否かを判定する(S1405)。
As a result, when σ (x) is obtained (S140
3: YES), an error correction process is performed (S1404). That is,
After performing error search for all symbols using the error position / error value search unit 1705, error correction processing of the read data is performed. Then, it is determined whether or not the error correction processing has been completed normally (S1405).

【0195】その結果、誤り訂正処理が正常に終了した
場合は(S1405:YES)、訂正された情報データ部を出力
する。
As a result, when the error correction processing is completed normally (S1405: YES), the corrected information data part is output.

【0196】一方、誤り訂正処理が正常に終了しなかっ
た場合は(S1405:NO)、訂正能力を超えた誤りが発生
したと判定し、訂正不能誤り検出手段1707を用い
て、訂正不能誤り検出情報を出力し(S1406)、情報デ
ータ部を訂正せずに出力する。
On the other hand, if the error correction processing has not been completed normally (S1405: NO), it is determined that an error exceeding the correction capability has occurred, and the uncorrectable error detection means 1707 detects the error. The information is output (S1406), and the information data portion is output without correction.

【0197】また、誤り評価式生成手段1704を用い
てσ(x)が求まらない場合も(S1403:NO)、訂正能力を
超えた誤りが発生したと判定し、訂正不能誤り検出手段
1707を用いて、訂正不能誤り検出情報を出力し(S1
406)、復号処理を終了する。
Also, when σ (x) is not obtained by using the error evaluation formula generation means 1704 (S1403: NO), it is determined that an error exceeding the correction capability has occurred, and the uncorrectable error detection means 1707 To output uncorrectable error detection information (S1
406), and terminate the decoding process.

【0198】そして、外部ECC回路1061で付加し
た冗長データを削除し、未訂正の情報データを出力す
る。
Then, the redundant data added by the external ECC circuit 1061 is deleted, and the uncorrected information data is output.

【0199】次に、外部ECC回路1061による積符
号の復号処理S1305の詳細について説明する。この
場合、前述したように、復号処理を行う前に、メモリチ
ップ102から読み出した512バイトの情報データと
160シンボルの冗長データを外符号に変換する必要が
ある。
Next, the details of the product code decoding processing S1305 by the external ECC circuit 1061 will be described. In this case, as described above, it is necessary to convert the 512-byte information data and 160-symbol redundant data read from the memory chip 102 into outer codes before performing the decoding process.

【0200】図18は、メモリチップ102から読み出
された16×32(=512)シンボル(バイト)の情
報データ部と16×10(=160)シンボルの冗長デ
ータ部R1からなる1次元配列データを外符号に変換す
る方法を示す図である。
FIG. 18 shows one-dimensional array data comprising an information data portion of 16 × 32 (= 512) symbols (bytes) read from the memory chip 102 and a redundant data portion R1 of 16 × 10 (= 160) symbols. FIG. 6 is a diagram illustrating a method of converting into an outer code.

【0201】最初に、1次元配列データから、32シン
ボルの外符号C1の情報データ部を抽出する。そのた
め、データを1シンボル読み取るごとにデータアドレス
を15シンボルずつスキップする。これを32回繰り返
し32シンボルの列データ(情報データ部)を生成す
る。
First, the information data part of the outer code C1 of 32 symbols is extracted from the one-dimensional array data. Therefore, every time one symbol of data is read, the data address is skipped by 15 symbols. This is repeated 32 times to generate column data (information data section) of 32 symbols.

【0202】同様に、外符号C1の冗長データ部R1
も、1シンボル読み取るごとにデータアドレスを15シ
ンボルずつスキップする。これを10回繰り返し10シ
ンボルの列データを生成する。こうして生成された10
シンボルの冗長データ部と、32シンボルに変換した情
報データ部とを合わせて、42シンボルの列データ(外
符号)とする。
Similarly, redundant data portion R1 of outer code C1
Also, every time one symbol is read, the data address is skipped by 15 symbols. This is repeated 10 times to generate column data of 10 symbols. The 10 thus generated
The redundant data portion of the symbol and the information data portion converted into 32 symbols are combined to form column data (outer code) of 42 symbols.

【0203】この操作をデータの先頭から順に16回繰
り返す。
This operation is repeated 16 times from the beginning of the data.

【0204】以上のようにして生成された外符号C1に
対して、外部ECC回路1061によって復号処理を行
う。図19は、外部ECC回路1061による外符号の
復号処理の流れを示す図である。
The outer code C1 generated as described above is decoded by the external ECC circuit 1061. FIG. 19 is a diagram showing the flow of the decoding process of the outer code by the outer ECC circuit 1061.

【0205】同図に示すように、まず、シンドローム/
符号生成手段1702を用いて、前述した5バイト訂正
復号の場合と同様に、Snを計算する(S1501)。そし
て、入力された42シンボルの符号について、誤りの有
無を判別するため、Sn=all0であるか否かを調べる
(S1502)。
As shown in the figure, first, the syndrome /
Using the code generation means 1702, Sn is calculated as in the case of the 5-byte correction decoding described above (S1501). Then, in order to determine whether or not there is an error in the input 42-symbol code, it is checked whether or not Sn = all0 (S1502).

【0206】その結果、Sn=all0の場合は(S1502:
YES)、データに誤りがないと判定し、誤り訂正処理を
行わず、復号処理を終了する。
As a result, when Sn = all0 (S1502:
YES), it is determined that there is no error in the data, the error correction processing is not performed, and the decoding processing ends.

【0207】一方、Sn=all0でない場合は(S1502:
NO)、データに誤りが生じていると判定し、続けて、誤
り評価式生成手段1704を用いて、誤り訂正処理を行
うための誤り位置多項式σ(x)が求まるか否かを判定す
る(S1503)。これは、積符号の復号において、誤り位
置iの集合Fを空集合(初期値)とした場合の誤り訂正
処理に相当する。
On the other hand, if Sn = all0 is not satisfied (S1502:
NO), it is determined that an error has occurred in the data, and subsequently, it is determined whether or not the error locator polynomial σ (x) for performing the error correction process is obtained using the error evaluation formula generation means 1704 ( S1503). This corresponds to an error correction process when the set F of the error position i is set to an empty set (initial value) in decoding the product code.

【0208】その結果、誤り位置多項式σ(x)が求まる
場合は(S1503:YES)、次に、誤り訂正処理を行う(S1
504)。すなわち、誤り位置・誤り値検索手段1705
を用いて、すべてのシンボルについて誤り検索を行う。
そして、数式(16)が成立するか否か判定する(S150
5)。本実施形態の場合、nの初期値は0で、d1は、
11(=2×5+1)となる。
As a result, if the error locator polynomial σ (x) is obtained (S1503: YES), then error correction processing is performed (S1).
504). That is, error position / error value searching means 1705
Is used to perform an error search for all symbols.
Then, it is determined whether Expression (16) holds (S150).
Five). In the case of the present embodiment, the initial value of n is 0, and d1 is
11 (= 2 × 5 + 1).

【0209】その結果、数式(16)が成立する場合は
(S1505:YES)、訂正された符号のうちの情報データ部
を出力する。
As a result, when the equation (16) is satisfied (S1505: YES), the information data part of the corrected code is output.

【0210】一方、数式(16)が成立しない場合は
(S1505:NO)、誤り位置の集合Fへ消失位置追加を行
う(S1506)。ここでは、消失位置計算手段1706を
用いて、集合Fに含まれない位置iで、aiが0でない
最小のもの(この場合、aiの値が1/5の値をもつ情
報)を誤り位置の集合Fへすべて追加する。また、nの
値をインクリメントする。
On the other hand, if the equation (16) does not hold (S1505: NO), the erasure position is added to the error position set F (S1506). Here, by using the erasure position calculation means 1706, the smallest position ai not included in the set F and having ai other than 0 (in this case, information having ai value of 1/5) is used as the error position Add all to set F. Also, the value of n is incremented.

【0211】そして、消失位置iの総数hがd1より小
さいか否かを判別する(S1507)。hがd1より小さい場
合は(S1507:YES)、誤り評価式生成手段1704を用
いてσ(x)を再計算し(S1503)、以後前述した処理を繰
り返す。
Then, it is determined whether or not the total number h of the erasure positions i is smaller than d1 (S1507). If h is smaller than d1 (S1507: YES), σ (x) is recalculated using the error evaluation formula generation means 1704 (S1503), and the above-described processing is repeated thereafter.

【0212】一方、hがd1以上の場合は(S1507:N
O)、訂正能力を超えた誤りが発生したと判定し、訂正
不能誤り検出手段1707を用いて、訂正不能誤り検出
情報を出力し(S1508)、誤り訂正処理を行うことな
く、符号から冗長データを削除し、情報データを出力し
た後に復号処理を終了する。
On the other hand, when h is d1 or more (S1507: N
O), it is determined that an error exceeding the correction capability has occurred, and uncorrectable error detection information is output by using uncorrectable error detection means 1707 (S1508). Is deleted, and the decoding process ends after outputting the information data.

【0213】また、誤り位置多項式σ(x)が求まらない
場合も(S1503:NO)、誤り位置の集合Fへ消失位置追
加を行い(S1506)、以後前述した処理を繰り返す。
If the error location polynomial σ (x) is not obtained (S1503: NO), the erasure location is added to the error location set F (S1506), and the above-described processing is repeated thereafter.

【0214】以上説明したようなフラッシュメモリカー
ド501においては、メモリ103の多値記憶化に伴う
データ読み出し率エラーの増加に対して十分な誤り訂正
能力を持たせる事ができる。
In the flash memory card 501 as described above, it is possible to provide a sufficient error correction capability with respect to an increase in a data reading rate error accompanying the multi-value storage of the memory 103.

【0215】また、RS符号を用いた内部ECC回路1
04をメモリチップ102内部に設けているので、チッ
プ単体で使用するユーザにも対応可能になる。
The internal ECC circuit 1 using the RS code
Since the memory chip 102 is provided inside the memory chip 102, it is possible to cope with a user who uses the chip alone.

【0216】また、動作モード制御信号sig_1の値によ
って、データの符号化方法や復号方法を変更することが
出来るため、メモリチップ102のデータ信頼率に合わ
せて、符号化率や訂正能力を変更することも可能で、記
憶媒体の記憶容量の有効利用を図ることが出来る。
Further, since the data encoding method and the data decoding method can be changed depending on the value of the operation mode control signal sig_1, the coding rate and the correction capability are changed in accordance with the data reliability of the memory chip 102. It is also possible to make effective use of the storage capacity of the storage medium.

【0217】また、メモリチップ102の性能にばらつ
きがあっても、メモリチップ102内部の内部ECC回
路104および外側の外部ECC回路1061の復号方
法を変更することで、フラッシュメモリカード501全
体としてのデータ信頼率を上げることができる。そのた
め、チップの歩留まり率を上げることも可能である。
Even if the performance of the memory chip 102 varies, the decoding method of the internal ECC circuit 104 inside the memory chip 102 and the decoding method of the external ECC circuit 1061 outside the memory chip 102 are changed, so that the data of the entire flash memory card 501 is changed. Can increase the reliability. Therefore, it is possible to increase the yield rate of chips.

【0218】なお、前述した実施形態では、積符号化時
においても外符号C1の訂正能力を5バイトとしたが、
積符号を用いた場合では、最大訂正能力まで訂正するこ
とで誤訂正が生じることを防ぐため、最大訂正能力まで
訂正しないようにしてもよい。
In the above-described embodiment, the correction capability of the outer code C1 is set to 5 bytes even during product coding.
In the case where the product code is used, the correction may not be performed up to the maximum correction capability in order to prevent erroneous correction by correcting up to the maximum correction capability.

【0219】また、メモリチップ102のデータ信頼率
によっては、積符号時は、例えば、訂正能力3バイト、
冗長シンボル6シンボルとして訂正能力を変更して、符
号化効率を上げることも可能である。
Further, depending on the data reliability of the memory chip 102, for example, when the product code is used, the correction capability is 3 bytes,
It is also possible to increase the coding efficiency by changing the correction capability as six redundant symbols.

【0220】なお、前述したような本発明によるディジ
タル情報記憶装置は、図20に示すように、デジタルカ
メラや携帯情報端末機器、携帯電話、PHSに着脱可能
な可搬型記憶装置にも使用することができる。この場
合、記憶装置には、メモリチップ102のみを実装し、
外部ECC回路1061で行っていた誤り訂正処理等
は、PCやデジタルカメラ等の機器本体側で行うように
してもよい。
As shown in FIG. 20, the digital information storage device according to the present invention is also used for a portable storage device that can be attached to and detached from a digital camera, a portable information terminal device, a portable telephone, or a PHS. Can be. In this case, only the memory chip 102 is mounted on the storage device,
The error correction processing and the like performed by the external ECC circuit 1061 may be performed by a device body such as a PC or a digital camera.

【0221】[0221]

【発明の効果】以上詳細に説明したように、本発明で
は、シンボル単位訂正を行うリードソロモン符号方式を
用いているので、多値技術を使った場合でも、十分なデ
ータ信頼率が得られる。
As described in detail above, in the present invention, since the Reed-Solomon coding scheme for performing symbol unit correction is used, a sufficient data reliability can be obtained even when the multi-value technique is used.

【0222】また、本発明では、符号化方法及び復号方
法を切り替えることができるので、メモリチップの記憶
素子のデータ信頼率の変化に柔軟に対応することができ
る。
In the present invention, since the encoding method and the decoding method can be switched, it is possible to flexibly cope with a change in the data reliability of the storage element of the memory chip.

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

【図1】 本発明によるディジタル情報記憶装置の概要
を示す図である。
FIG. 1 is a diagram showing an outline of a digital information storage device according to the present invention.

【図2】 本発明によるフラッシュメモリカード501
の構成を示す図である。
FIG. 2 shows a flash memory card 501 according to the present invention.
FIG. 3 is a diagram showing the configuration of FIG.

【図3】 フラッシュメモリカード501の具体的な実
装イメージを示す図である。
FIG. 3 is a view showing a specific mounting image of the flash memory card 501;

【図4】 メモリチップ102の構成を示す図である。FIG. 4 is a diagram showing a configuration of a memory chip 102;

【図5】 動作モード制御信号sig_1と各ECC回路の
動作との対応関係を示す表である。
FIG. 5 is a table showing the correspondence between the operation mode control signal sig_1 and the operation of each ECC circuit.

【図6】 外部ECC回路1061の構成を示す図であ
る。
FIG. 6 is a diagram illustrating a configuration of an external ECC circuit 1061.

【図7】 シンドローム/符号生成手段1702の構成
を示す図である。
FIG. 7 is a diagram showing a configuration of a syndrome / code generation unit 1702.

【図8】 内部ECC回路104の構成を示す図であ
る。
FIG. 8 is a diagram showing a configuration of an internal ECC circuit 104.

【図9】 シンドローム/符号生成手段1802の構成
を示す図である。
FIG. 9 is a diagram showing a configuration of a syndrome / code generation unit 1802.

【図10】 データ書き込み時のデータパスの変化の様
子を概念的に示す図である。
FIG. 10 is a diagram conceptually showing how a data path changes when data is written.

【図11】 データ書き込み時の符号化処理の流れを示
す図である。
FIG. 11 is a diagram showing a flow of an encoding process at the time of data writing.

【図12】 実施形態で採用する積符号の構成の概念を
示す図である。
FIG. 12 is a diagram illustrating a concept of a configuration of a product code adopted in the embodiment.

【図13】 1次元配列データから外符号C1の情報デ
ータ部を抽出し、冗長データ部を生成する方法を示す図
である。
FIG. 13 is a diagram illustrating a method of extracting an information data portion of an outer code C1 from one-dimensional array data and generating a redundant data portion.

【図14】 データ読み出し時のデータパスの変化の様
子を概念的に示す図である。
FIG. 14 is a diagram conceptually showing how a data path changes when data is read.

【図15】 内部ECC回路104による復号処理の流
れを示す図である。
FIG. 15 is a diagram showing a flow of a decoding process by the internal ECC circuit 104.

【図16】 外部ECC回路1061による復号処理の
流れを示す図である。
FIG. 16 is a diagram showing a flow of a decoding process by the external ECC circuit 1061.

【図17】 外部ECC回路1061による5バイト訂
正復号処理の流れを示す図である。
FIG. 17 is a diagram showing a flow of a 5-byte correction decoding process by the external ECC circuit 1061.

【図18】 メモリチップ102から読み出された1次
元配列データを外符号に変換する方法を示す図である。
FIG. 18 is a diagram showing a method of converting one-dimensional array data read from the memory chip 102 into an outer code.

【図19】 外部ECC回路1061による復号処理の
流れを示す図である。
FIG. 19 is a diagram showing a flow of a decoding process by the external ECC circuit 1061.

【図20】 本発明によるディジタル情報記憶装置の適
用例を示す図である。
FIG. 20 is a diagram showing an application example of a digital information storage device according to the present invention.

【図21】 フラッシュメモリの構成を示す図である。FIG. 21 is a diagram showing a configuration of a flash memory.

【図22】 コントロールゲート電圧とドレイン電流の
関係を示す図である。
FIG. 22 is a diagram showing a relationship between a control gate voltage and a drain current.

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

101 ディジタル情報記憶装置 102 メモリチップ 103 メモリ 104 内部ECC回路 106、503 インターフェースLSI 1061 外部ECC回路 Reference Signs List 101 digital information storage device 102 memory chip 103 memory 104 internal ECC circuit 106, 503 interface LSI 1061 external ECC circuit

フロントページの続き (72)発明者 辛島 哲次 東京都小平市上水本町五丁目20番1号 株 式会社日立製作所半導体グループ内 (72)発明者 小谷 博昭 東京都青梅市今井2326番地 株式会社日立 製作所デバイス開発センタ内 (72)発明者 野副 敦史 東京都青梅市今井2326番地 株式会社日立 製作所デバイス開発センタ内 (72)発明者 西谷 卓史 神奈川県川崎市麻生区王禅寺1099番地 株 式会社日立製作所システム開発研究所内 Fターム(参考) 5J065 AA01 AB01 AC03 AD03 AD04 AD11 AD13 AF02 AH06 Continued on the front page (72) Inventor Tetsuji Karashima 5-2-1, Josuihoncho, Kodaira-shi, Tokyo Within the Semiconductor Group, Hitachi, Ltd. (72) Hiroaki Kotani 2326, Imai, Ome-shi, Tokyo Hitachi, Ltd. Inside the Device Development Center (72) Atsushi Nozoe 2326 Imai, Ome-shi, Tokyo Inside the Device Development Center, Hitachi, Ltd. In-house F-term (reference) 5J065 AA01 AB01 AC03 AD03 AD04 AD11 AD13 AF02 AH06

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 データを記憶する記憶手段と、 当該記憶手段に対するデータの読み書きを制御する制御
手段とを備えた記憶装置であって、 前記記憶手段は、 データを格納するメモリ手段と、 当該メモリ手段に書き込むデータの誤り訂正符号化を行
い、また、前記メモリ手段から読み出したデータの誤り
検出及び誤り訂正を行う内部ECC手段とを備え、 当該内部ECC手段によって行った誤り訂正に関する信
頼性情報を出力し、前記制御手段は、 前記記憶手段に書き込むデータの誤り訂正符号化を行
い、また、前記記憶手段から読み出したデータの誤り検
出及び誤り訂正を行う外部ECC手段を備え、 当該外部ECC手段は、前記記憶手段から出力された信
頼性情報を利用して誤り訂正を行うことを特徴とする記
憶装置。
1. A storage device comprising: storage means for storing data; and control means for controlling reading / writing of data from / to the storage means, wherein the storage means comprises: memory means for storing data; Means for performing error correction encoding of data to be written into the means, and detecting and correcting errors in the data read from the memory means. The reliability information on the error correction performed by the internal ECC means is provided. The control means performs error correction encoding of data to be written to the storage means, and further comprises an external ECC means for performing error detection and error correction of data read from the storage means. A storage device for performing error correction using the reliability information output from the storage unit.
【請求項2】 前記制御手段は、 ホストから書き込まれたデータを、外部ECC手段によ
って、外符号化し、 前記記憶手段は、 前記制御手段によって書き込まれた外符号を、内部EC
C手段によって、内符号化し、前記メモリ手段に書き込
むことを特徴とする請求項1に記載の記憶装置。
2. The control unit externally codes data written from a host by an external ECC unit, and the storage unit converts the external code written by the control unit into an internal EC.
2. The storage device according to claim 1, wherein the data is internally coded by the C means and written into the memory means.
【請求項3】 第1の動作モードでは、前記外部ECC
手段のみによる符号化を行い、第2の動作モードでは、
前記内部ECC手段のみによる符号化を行い、第3の動
作モードでは、前記外部ECC手段及び内部ECC手段
による積符号化を行うことを特徴とする請求項1又は請
求項2に記載の記憶装置。
3. In the first operation mode, the external ECC
Encoding is performed only by means, and in the second operation mode,
3. The storage device according to claim 1, wherein encoding is performed only by the internal ECC unit, and in a third operation mode, product encoding is performed by the external ECC unit and the internal ECC unit.
【請求項4】 前記内部ECC手段及び外部ECC手段
は、誤り訂正符号として、シンボル単位訂正符号で、組
織符号となる巡回符号を用いることを特徴とする請求項
1〜3のいずれか一項に記載の記憶装置。
4. The method according to claim 1, wherein the internal ECC means and the external ECC means use a cyclic code which is a systematic code in a symbol unit correction code as an error correction code. A storage device as described.
【請求項5】 データの記憶を行う記憶手段に対するデ
ータの読み書きを制御するコントローラであって、 前記記憶手段に書き込むデータを誤り訂正符号化し、ま
た、前記記憶手段から読み出したデータの誤りの有無を
検出し、誤りが検出された場合に当該データの誤りを訂
正する外部ECC手段を有し、 当該外部ECC手段は、 前記記憶手段から出力された、誤り訂正に関する信頼性
情報を利用して、読み出しデータの誤り訂正を行うこと
を特徴とするコントローラ。
5. A controller for controlling reading / writing of data from / to a storage means for storing data, the data being written to the storage means being subjected to error correction coding, and determining whether or not the data read from the storage means has an error. External ECC means for detecting and correcting an error in the data when an error is detected, wherein the external ECC means reads out using the reliability information on error correction output from the storage means. A controller for performing data error correction.
【請求項6】 前記外部ECC手段は、誤り訂正符号と
して、シンボル単位訂正符号で、組織符号となる巡回符
号を用いることを特徴とする請求項5に記載のコントロ
ーラ。
6. The controller according to claim 5, wherein said external ECC means uses a cyclic code that is a systematic code in a symbol unit correction code as an error correction code.
【請求項7】 データを格納するメモリ手段と、 当該メモリ手段に書き込むデータの誤り訂正符号化を行
い、また、前記メモリ手段から読み出したデータの誤り
検出及び誤り訂正処理を行う内部ECC手段とを備え、 当該内部ECC手段で行われた誤り訂正処理に関する信
頼性情報を出力することを特徴とするメモリチップ。
7. A memory means for storing data, and an internal ECC means for performing error correction coding of data to be written in the memory means and performing error detection and error correction processing of data read from the memory means. A memory chip for outputting reliability information relating to error correction processing performed by said internal ECC means.
【請求項8】 前記内部ECC回路は、誤り訂正能力を
変更できることを特徴とする請求項7に記載のメモリチ
ップ。
8. The memory chip according to claim 7, wherein said internal ECC circuit can change an error correction capability.
【請求項9】 前記内部ECC手段は、誤り訂正符号と
して、シンボル単位訂正符号で、組織符号となる巡回符
号を用いることを特徴とする請求項7又は請求項8に記
載のメモリチップ。
9. The memory chip according to claim 7, wherein said internal ECC means uses a cyclic code serving as a systematic code in a symbol unit correction code as an error correction code.
JP11159613A 1999-06-07 1999-06-07 Storage device provided with error correction means Pending JP2000349652A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11159613A JP2000349652A (en) 1999-06-07 1999-06-07 Storage device provided with error correction means

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11159613A JP2000349652A (en) 1999-06-07 1999-06-07 Storage device provided with error correction means

Publications (1)

Publication Number Publication Date
JP2000349652A true JP2000349652A (en) 2000-12-15

Family

ID=15697550

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11159613A Pending JP2000349652A (en) 1999-06-07 1999-06-07 Storage device provided with error correction means

Country Status (1)

Country Link
JP (1) JP2000349652A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001073952A1 (en) * 2000-03-27 2001-10-04 Matsushita Electric Industrial Co., Ltd. Decoder and decoding method
US7516371B2 (en) 2003-02-28 2009-04-07 Kabushiki Kaisha Toshiba ECC control apparatus
US9013921B2 (en) 2012-12-06 2015-04-21 Samsung Electronics Co., Ltd. Semiconductor memory device
CN110196783A (en) * 2018-02-26 2019-09-03 爱思开海力士有限公司 The storage system of reconfigurable error correction operations is executed using ECC Engine
JP2022137391A (en) * 2021-03-09 2022-09-22 ウィンボンド エレクトロニクス コーポレーション Semiconductor storage device and error detection/correction method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001073952A1 (en) * 2000-03-27 2001-10-04 Matsushita Electric Industrial Co., Ltd. Decoder and decoding method
US7516371B2 (en) 2003-02-28 2009-04-07 Kabushiki Kaisha Toshiba ECC control apparatus
US9013921B2 (en) 2012-12-06 2015-04-21 Samsung Electronics Co., Ltd. Semiconductor memory device
CN110196783A (en) * 2018-02-26 2019-09-03 爱思开海力士有限公司 The storage system of reconfigurable error correction operations is executed using ECC Engine
JP2022137391A (en) * 2021-03-09 2022-09-22 ウィンボンド エレクトロニクス コーポレーション Semiconductor storage device and error detection/correction method
US11755209B2 (en) 2021-03-09 2023-09-12 Winbond Electronics Corp. Semiconductor memory device and error detection and correction method

Similar Documents

Publication Publication Date Title
KR100391240B1 (en) Recording/reproduction device, semiconductor memory, and memory card using the semiconductor memory
US6336203B1 (en) Error correction coding and decoding method, and circuit using said method
JP3256517B2 (en) Encoding circuit, circuit, parity generation method, and storage medium
KR930001071B1 (en) Error correction circuit
US7844880B2 (en) Error correction for flash memory
JP3737204B2 (en) Error correction method and apparatus
KR100535291B1 (en) Encoding method and memory apparatus
US7231585B2 (en) Error correction for flash memory
US7890846B2 (en) Electronic data flash card with Reed Solomon error detection and correction capability
JPH10207726A (en) Semiconductor disk device
JPH11283396A (en) Memory device
JPH08255111A (en) Error correcting and detecting circuit and semiconductor storage device
US20020157059A1 (en) Multipurpose method for constructing an error-control code for multilevel memory cells operating with a variable number of storage levels, and multipurpose error-control method using said error-control code
JP3502583B2 (en) Error correction method and error correction device
JP2000349652A (en) Storage device provided with error correction means
JPH11143787A (en) Recording and reproducing device
JPH10208405A (en) Decoding system and decoding method in efm format and efm-plus format in optical disk (cd and dvd) reading apparatus
KR100539261B1 (en) Digital Data Coding and Recording Device for DVD and Method thereof
JP4099844B2 (en) Memory device
JP3743915B2 (en) Spotty byte error correction / detection method and apparatus
JPH11272568A (en) Storage reproducer, error correction method, portable information terminal and digital camera using the same
JPH11212876A (en) Coding method and memory using the same
KR100290964B1 (en) Memory reproduction device and error correction method thereof
JPH11213693A (en) Memory device
KR100239798B1 (en) Error correction method in the reproduction of digital signal and apparatus therefor