JP2012022508A - Semiconductor storage device, control device, and method for controlling semiconductor storage device - Google Patents
Semiconductor storage device, control device, and method for controlling semiconductor storage device Download PDFInfo
- Publication number
- JP2012022508A JP2012022508A JP2010159685A JP2010159685A JP2012022508A JP 2012022508 A JP2012022508 A JP 2012022508A JP 2010159685 A JP2010159685 A JP 2010159685A JP 2010159685 A JP2010159685 A JP 2010159685A JP 2012022508 A JP2012022508 A JP 2012022508A
- Authority
- JP
- Japan
- Prior art keywords
- data
- flag
- valid
- error correction
- invalid
- 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
Links
Images
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
- Read Only Memory (AREA)
Abstract
Description
本発明は、半導体記憶装置、制御装置、及び半導体記憶装置の制御方法に関する。 The present invention relates to a semiconductor memory device, a control device, and a method for controlling a semiconductor memory device.
SSD(Solid State Drive)に内蔵されるNAND型フラッシュメモリのコントローラでは、内部的なデータ管理のために使用する管理テーブルのサイズの都合やECC符号長などの関係で、基本データ転送サイズ(セクタ)よりも大きなサイズでデータ管理を行うことが多い。 In a NAND flash memory controller built in an SSD (Solid State Drive), the basic data transfer size (sector) depends on the convenience of the size of the management table used for internal data management and the ECC code length. In many cases, data management is performed with a larger size.
NAND型フラッシュメモリの経年劣化などにより、NAND型フラッシュメモリから読み出したデータのうちECC(Error Checking and Correction)処理により訂正不能なデータが生じた場合、その訂正不能なデータは、読み出し不能なデータとして管理することが必要である。 When uncorrectable data is generated by ECC (Error Checking and Correction) processing among the data read from the NAND flash memory due to aging degradation of the NAND flash memory, the uncorrectable data is regarded as unreadable data. It is necessary to manage.
特許文献1には、SSDにおいて、NANDメモリ内でECCエラーの発生した読み出し不能なデータをセクタ単位に管理テーブルに登録して管理することが記載されている。また、このような管理データは、不揮発化する必要があるため、特許文献1では、管理テーブルをNANDメモリに保存している。
このように、従来技術では、読み出し不能なデータを管理するための管理テーブルを用意し、この管理テーブルをNANDメモリに保存しているので、NANDメモリ(不揮発性メモリ)の記憶領域が管理テーブルのために消費されるという問題がある。 As described above, in the conventional technique, a management table for managing unreadable data is prepared, and this management table is stored in the NAND memory. Therefore, the storage area of the NAND memory (nonvolatile memory) is stored in the management table. There is a problem of being consumed.
本発明は、不揮発性メモリの記憶領域を消費することなく、訂正不能なデータを管理できる半導体記憶装置、制御装置、及び半導体記憶装置の制御方法を提供する。 The present invention provides a semiconductor memory device, a control device, and a semiconductor memory device control method capable of managing uncorrectable data without consuming a storage area of a nonvolatile memory.
本願発明の一態様によれば、データを記憶する不揮発性メモリと、前記不揮発性メモリへのデータの書き込みと前記不揮発性メモリからのデータの読み出しとを制御する制御部とを備え、前記制御部は、データが有効であるのか無効であるのかを示す第1のフラグをデータに付加して誤り訂正処理を行うことにより生成された誤り訂正符号を前記データに付加して前記不揮発性メモリへ書き込む書き込み制御部と、前記データと前記誤り訂正符号とを前記不揮発性メモリから読み出し、有効及び無効の何れか一方に固定された第2のフラグを前記読み出されたデータに付加し、前記読み出された誤り訂正符号を用いた誤り訂正処理を前記第2のフラグが付加されたデータに対して行う読み出し制御部とを有することを特徴とする半導体記憶装置が提供される。 According to an aspect of the present invention, the control unit includes: a non-volatile memory that stores data; and a control unit that controls writing of data into the non-volatile memory and reading of data from the non-volatile memory. Adds an error correction code generated by adding a first flag indicating whether the data is valid or invalid to the data and performing error correction processing, and writes the error correction code to the nonvolatile memory. A write control unit, reading the data and the error correction code from the nonvolatile memory, adding a second flag fixed to either valid or invalid to the read data, and reading the data A read control unit for performing error correction processing using the error correction code on the data to which the second flag is added. There is provided.
また、本願発明の一態様によれば、不揮発性メモリへのデータの書き込み及び前記不揮発性メモリからのデータの読み出しを制御する制御装置であって、データが有効であるのか無効であるのかを示す第1のフラグをデータに付加して誤り訂正処理を行うことにより生成された誤り訂正符号を前記データに付加して前記不揮発性メモリへ書き込む書き込み制御部と、前記データと前記誤り訂正符号とを前記不揮発性メモリから読み出し、有効及び無効の何れか一方に固定された第2のフラグを前記読み出されたデータに付加し、前記読み出された誤り訂正符号を用いた誤り訂正処理を前記第2のフラグが付加されたデータに対して行う読み出し制御部とを有することを特徴とする制御装置が提供される。 According to another aspect of the present invention, there is provided a control device that controls writing of data into a nonvolatile memory and reading of data from the nonvolatile memory, and indicates whether the data is valid or invalid. A write control unit for adding an error correction code generated by adding an error correction process by adding a first flag to the data and writing the data to the nonvolatile memory; and the data and the error correction code. A second flag read from the non-volatile memory and fixed to either valid or invalid is added to the read data, and error correction processing using the read error correction code is performed. There is provided a control device including a read control unit that performs data read with respect to data with 2 flags.
また、本願発明の一態様によれば、データを記憶する不揮発性メモリを有する半導体記憶装置の制御方法であって、前記不揮発性メモリへ書き込むべきデータが有効であるのか無効であるのかを示す第1のフラグを前記書き込むべきデータに付加して誤り訂正処理を行うことにより誤り訂正符号を生成する第1のステップと、前記書き込むべきデータに前記第1のステップで生成された誤り訂正符号を付加して前記不揮発性メモリへ書き込む第2のステップと、前記データと前記誤り訂正符号とを前記不揮発性メモリから読み出す第3のステップと、有効及び無効の何れか一方に固定された第2のフラグを前記第3のステップで読み出されたデータに付加して、前記第3のステップで読み出された誤り訂正符号を用いた誤り訂正処理を前記第2のフラグが付加されたデータに対して行う第4のステップと、有効に固定された前記第2のフラグが誤りであることを検出した場合、又は無効に固定された前記第2のフラグが正しいことを検出した場合、前記第2のフラグが付加されたデータが無効であると判定し、有効に固定された前記第2のフラグが正しいことを検出した場合、又は無効に固定された前記第2のフラグが誤りであることを検出した場合、前記第2のフラグが付加されたデータが有効であると判定する第5のステップとを備えたことを特徴とする半導体記憶装置の制御方法が提供される。 According to another aspect of the present invention, there is provided a method for controlling a semiconductor memory device having a nonvolatile memory for storing data, wherein the data to be written to the nonvolatile memory is valid or invalid. A first step of generating an error correction code by adding an error flag to the data to be written and performing error correction processing, and adding the error correction code generated in the first step to the data to be written A second step of writing to the non-volatile memory, a third step of reading the data and the error correction code from the non-volatile memory, and a second flag fixed to either valid or invalid Is added to the data read in the third step, and error correction processing using the error correction code read in the third step is performed. The fourth step to be performed on the data to which the flag is added, and when the second flag fixed to valid is detected to be an error, or the second flag fixed to invalid is correct If it is detected that the data to which the second flag has been added is invalid, and the second flag that has been effectively fixed is detected to be correct, or the second flag that has been fixed to invalid is detected. And a fifth step of determining that the data to which the second flag is added is valid when it is detected that the second flag is incorrect. A method for controlling a semiconductor memory device, comprising: Provided.
本発明によれば、不揮発性メモリの記憶領域を消費することなく、訂正不能なデータを管理できる。 According to the present invention, uncorrectable data can be managed without consuming the storage area of the nonvolatile memory.
以下に添付図面を参照して、本発明の実施の形態にかかる半導体記憶装置を詳細に説明する。なお、この実施の形態により本発明が限定されるものではない。
(第1の実施の形態)
A semiconductor memory device according to an embodiment of the present invention will be described below in detail with reference to the accompanying drawings. In addition, this invention is not limited by this embodiment.
(First embodiment)
図1は、第1の実施の形態にかかる半導体記憶装置の構成をハードウェア的な側面から示すブロック図である。半導体記憶装置1は、通信媒体を介してホスト装置HAの外部に接続され、ホスト装置HAに対する外部記憶媒体として機能する。ホスト装置HAは、例えば、パーソナルコンピュータ又はCPUコアを含む。半導体記憶装置1は、例えば、SSD(Solid State Drive)を含む。
FIG. 1 is a block diagram showing the configuration of the semiconductor memory device according to the first embodiment from the hardware side. The
半導体記憶装置1は、図1に示すように、MPU(プロセッサ)2、不揮発性半導体メモリとしてのNAND型フラッシュメモリ(以下、NANDメモリと略す)30、NANDメモリ30よりも高速動作が可能なメモリ40、通信I/F60、NANDコントローラ10、L2デコーダ20及び内部バス50を備える。NANDメモリ30、メモリ40、通信I/F60、L2デコーダ20及びMPU2は、内部バス50を介して互いに接続されている。
As shown in FIG. 1, the
NANDメモリ30は、複数のメモリセルがマトリクス状に配列されたメモリセルアレイを有し、個々のメモリセルは上位ページ及び下位ページを使用して多値記憶が可能である。NANDメモリ30では、データの消去がブロック単位で行われるのに対して、データの書き込み及び読み出しがページ単位で行われる。ブロックは、複数のページをひとまとめにした単位である。また、NANDメモリ30では、MPU2による内部的なデータ管理がクラスタ単位で行われ、データの更新がセクタ単位で行われる。この実施の形態では、ページは、複数のクラスタをひとまとめにした単位であるとし、クラスタは、複数のセクタをひとまとめにした単位であるとする。セクタは、ホスト装置HAからのデータの最小アクセス単位であり、例えば、512Bのサイズを有する。ホスト装置HAは、セクタ単位のLBA(Logical Block Addressing)によってアクセスするデータを指定する。
The
メモリ40は、図3に示すように、ホスト装置HAとNANDメモリ30との間でのデータ転送用のキャッシュ領域41として、並びに、MPU2が使用する作業領域42として機能する。メモリ40としては、例えば、DRAM(Dynamic Random Access Memory)、又はFeRAM(Ferroelectric Random Access Memory)、MRAM(Magnetoresistive Random Access Memory)、PRAMなど(Phase Change Random Access Memory)を含む。また、メモリ40は、NANDメモリ30から読み出した各種管理テーブルを作業領域42に一時的に記憶する。
As shown in FIG. 3, the
通信I/F60は、ATAインタフェース(ATA I/F)などのメモリ接続インタフェースであり、ホスト装置HAから受信した命令、データなどを内部バス50に出力し、内部バス50経由で入力されたデータ、MPU2からの応答通知(命令の実行完了を示す通知など)などをホスト装置HAへ送信する。
The communication I /
MPU2は、半導体記憶装置1の各構成要素を統括的に制御するもので、ホスト装置HAから通信I/F60及び内部バス50経由での命令を受けた場合に、その命令に従った制御を行う。例えば、MPU2は、NANDコントローラ10と協働して、ホスト装置HAからの命令に従って、NANDメモリ30へのデータの書き込み、NANDメモリ30からのデータの読み出しなどを制御する。すなわち、機能的な側面から見ると、MPU2及びNANDコントローラ10を含む1つの制御部70(図2参照)が実現されている。
The MPU 2 comprehensively controls each component of the
NANDコントローラ10は、NANDメモリ30とメモリ40との間のデータ転送を制御するもので、命令制御部11、コマンド制御部12、DMAコントローラ13、バッファメモリ14、L1/L2エンコーダ15、L1デコーダ16、及びメモリI/F17を有する。
The
命令制御部11は、MPU2から受けた命令をNANDコントローラ10用のコマンドに変換してコマンド制御部12へ供給する。コマンド制御部12は、供給されたコマンドに従って、DMAコントローラ13、バッファメモリ14、L1/L2エンコーダ、L1デコーダ16、L2デコーダ20、及びメモリI/F17を制御する。
The
DMAコントローラ13は、コマンド制御部12による制御に従って、バッファメモリ14、L2デコーダ20及びメモリ40の間のデータ転送制御をDMA(Direct Memory Access)方式に従って行う。バッファメモリ14は、DMAコントローラ13からL1/L2エンコーダ15へのデータ転送と、L1デコーダ16からDMAコントローラ13へのデータ転送とのそれぞれにおけるバッファ領域として機能する。
The
L1/L2エンコーダ15は、コマンド制御部12による制御に従って、DMAコントローラ13からバッファメモリ14を介して転送されたデータに対して、ECC処理(誤り訂正処理)におけるエンコード処理を行い、エンコード結果をデータに付加して出力する。L1/L2エンコーダ15では、第1のECC符号(L1、誤り訂正符号)及び第2のECC符号(L2、誤り訂正符号)を用いてエンコード処理を行う。第1のECC符号(L1)、第2のECC符号(L2)としては、例えば、ハミング符号、BCH(Bose Chaudhuri Hocqenghem)符号、RS(Reed Solomon)符号、或いはLDPC(Low Density Parity Check)符号等を採用する。第2のECC符号(L2)の訂正能力は、第1のECC符号(L1)の訂正能力よりも高い。
The L1 /
L1デコーダ16は、コマンド制御部12による制御に従って、メモリI/F17から転送されたデータに対して、第1のECC符号(L1)を用いたECC処理におけるデコード処理(誤り訂正符号を用いた誤り訂正処理)を行い、誤り訂正されたデータをバッファメモリ14に出力する。メモリI/F17は、L1/L2エンコーダ15から出力されるECC符号が付加されたデータをNANDメモリ30に出力するとともに、NANDメモリ30から入力されたECC符号が付加されたデータをL1デコーダ16に出力する。
Under the control of the
L2デコーダ20は、NANDコントローラ10の外部に設けられ、L1デコーダ16の第1のECC符号(L1)を用いたECC処理におけるデコード処理で、訂正不可能な誤りが生じた場合(ECCエラーが発生した場合)にのみ活性化される。L2デコーダ20は、DMAコントローラ13から転送された、L1デコーダ16で訂正不可能なデータに対して、第2のECC符号(L2)を用いたECC処理におけるデコード処理を行う。
The
NANDメモリ30にデータを書き込む場合、L1/L2エンコーダ15は、書き込み対象のデータに対して、セクタデータ毎に、例えば、誤り検出符号(例えば、CRC符号)及びMビットの訂正能力がある第1のECC符号(例えば、ハミング符号)を生成して付加する。また、L1/L2エンコーダ15は、複数のセクタデータから構成されるクラスタに、N(N>M)ビットの訂正能力がある第2のECC符号(例えば、BCH符号)を生成して付加する。誤り検出符号、第1のECC符号、及び第2のECC符号が付加されたデータが、メモリI/F17を介してNANDメモリ30に書き込まれる。
When writing data to the
また、NANDメモリ30からデータを読み出す場合は、L1デコーダ16は、NANDメモリ30から読み出されたデータに対して、まず、第1のECC符号による誤り訂正を行った後、誤り検出符号を用いて誤訂正が発生しているか否かを検出する。L2デコーダ20は、L1デコーダ16によって誤訂正が発生していると判定された場合(L1−ECCエラー)に、すなわち、第1のECC符号の訂正能力以上の誤りが生じて誤訂正が発生した場合に、第2のECC符号による誤り訂正を行う。第2のECC符号による誤り訂正が失敗した場合(L2−ECCエラー)、半導体記憶装置1は、ホスト装置HAに対して読み出しエラーを示す応答を返す。
When reading data from the
図2は、第1の実施の形態にかかる半導体記憶装置の構成を機能的な側面から示すブロック図である。半導体記憶装置1は、図2に示すように、データを記憶するNANDメモリ30と、NANDメモリ30へのデータの書き込みとNANDメモリ30からのデータの読み出しとを制御する制御部70とを備える。制御部70は、NANDメモリ30へのデータの書き込みを制御する書き込み制御部71と、NANDメモリ30からのデータの読み出しとを制御する読み出し制御部72とを有する。ここで、書き込み制御部71は、MPU2、命令制御部11、コマンド制御部12、DMAコントローラ13、バッファメモリ14、メモリI/F17のそれぞれにおける書き込み処理に関連した部分と、L1/L2エンコーダ15とに対応している。読み出し制御部72は、MPU2、命令制御部11、コマンド制御部12、DMAコントローラ13、バッファメモリ14、メモリI/F17のそれぞれにおける読み出し処理に関連した部分と、L1デコーダ16と、L2デコーダ20とに対応している。
FIG. 2 is a functional block diagram of the configuration of the semiconductor memory device according to the first embodiment. As shown in FIG. 2, the
つぎに、ECCエラーが発生した誤り訂正不能なデータを、ホスト装置HAからのデータの最小アクセス単位であるセクタ単位に管理する必要性について図4を用いて説明する。例えば、第2のECC符号による誤り訂正が失敗した結果として、図4(a)に示す複数のセクタ(LBA=N〜N+7のセクタ)が誤り訂正不能(invalid)であるとする。このような誤り訂正不能な複数のセクタの一部が、図4(b)に示すように、新たな書き込み要求によって更新される場合、訂正不能なデータと更新された有効データ(valid)とを組み合わせ、組み合わせたデータから新たなECC符号を作成し、作成したECC符号が付加された組み合わせデータを新たなページに書き込むといった処理が行われる。したがって、この後は、新たなページから読み出した有効セクタ、訂正不能セクタを含む組み合わせデータを、組み合わせデータに付加されたECC符号によって誤り訂正することが可能になる。しかし、更新された有効セクタ以外は依然として誤りを含んでいる可能性があり信頼できるデータとは言えないため、更新セクタ以外は、元々が不正なデータであったことを管理する必要がある。 Next, the necessity of managing the uncorrectable data in which the ECC error has occurred in the sector unit, which is the minimum access unit of the data from the host device HA, will be described with reference to FIG. For example, suppose that a plurality of sectors (sectors LBA = N to N + 7) shown in FIG. 4A are invalid as a result of error correction by the second ECC code. As shown in FIG. 4B, when a part of such a plurality of uncorrectable sectors is updated by a new write request, uncorrectable data and updated valid data (valid) are displayed. A process of creating a new ECC code from the combined data and the combined data and writing the combined data to which the created ECC code is added to a new page is performed. Therefore, thereafter, it becomes possible to correct the error of the combination data including the valid sector and the uncorrectable sector read from the new page by the ECC code added to the combination data. However, since the data other than the updated valid sector may still contain errors and cannot be said to be reliable data, it is necessary to manage that the data other than the updated sector was originally invalid data.
従来は、訂正不能なクラスタ/セクタを管理するための管理テーブルを用意し、この管理テーブルをNANDメモリ30に保存しており、NANDメモリ30の記憶領域が管理テーブルのために消費されている。そこで、本半導体記憶装置1においては、データの有効/無効を示す無効フラグを利用してECC処理を行うことで、管理テーブルを使用することなく、誤り訂正不能なセクタの管理を可能とする。なお、この種の半導体記憶装置においては、無効なデータとは、同一論理アドレスのデータが他の場所に書きこまれ、参照されることがなくなったデータのことを言う場合が多いが、本明細書では、無効なデータとは、特に明記しないかぎり、誤り訂正不能なデータと同じ意味であるとする。
Conventionally, a management table for managing uncorrectable clusters / sectors is prepared, and this management table is stored in the
図5は、L1/L2エンコーダ15、L1デコーダ16の内部機能構成例を示すものである。L1/L2エンコーダ15は、フラグ付加部15a、ECCモジュール15b及びECC合成部15cを有する。
FIG. 5 shows an internal functional configuration example of the L1 /
フラグ付加部15aは、NANDメモリ30へ書き込むべきデータが有効であるのか無効であるのかを示す1〜複数ビットで構成される有効/無効フラグ(第1のフラグ)F1を、セクタ毎に、書き込むべきセクタデータDに付加し、有効/無効フラグF1が付加されたセクタデータDをECCモジュール15bに出力する。すなわち、フラグ付加部15aは、命令制御部11、コマンド制御部12を介して入力されるMPU2からのセレクト信号SLに従って、無効/有効を示す有効/無効フラグF1を選択するセレクタ15aaと、セレクタ15aaから出力される有効/無効フラグF1をセクタデータDの例えば先頭(あるいは最後尾)に付加する付加部15abとを有する。
The
ECCモジュール15bは、有効/無効フラグF1が付加されたセクタデータD毎に、すなわち有効/無効フラグF1+セクタデータDから構成されるフラグ付きデータ毎に、第1のECC処理(誤り訂正処理)におけるエンコード処理を行い第1のECC符号(L1)Eを生成する。すなわち、ECCモジュール15bは、図6(a)に示すように、有効/無効フラグF11〜F1kが付加された複数セクタのデータD1〜Dkのそれぞれに第1のECC処理(誤り訂正処理)におけるエンコード処理を行う。これにより、ECCモジュール15bは、有効/無効フラグ付きセクタデータ(F11+D1)、(F12+D2)、…、(F1k+Dk)ごとに、第1のECC符号(L1)E1〜Ekを生成する。なお、ECCモジュール15bは、図6(a)に示すように、有効/無効フラグF11〜F1kが付加されたデータD1〜DkのそれぞれにさらにCRC(Cyclic Redundancy Check)符号が追加された形のデータ(有効/無効フラグF1+データD+CRC)にエンコード処理を行うことにより、第1のECC符号(L1)を生成してもよい。
The
また、ECCモジュール15bは、有効/無効フラグF11〜F1kがそれぞれ付加された複数のセクタデータD1〜Dkから構成されるクラスタに第2のECC処理(誤り訂正処理)におけるエンコード処理を行う。これにより、ECCモジュール15bは、有効/無効フラグ付きセクタデータの全体(F11+D1、F12+D2、…、F1k+Dk)に対して、第2のECC符号(L2)G1kを生成する(図6(a)参照)。なお、ECCモジュール15bは、図6(a)に示すように、有効/無効フラグF11〜F1kが付加された複数セクタのデータD1〜DkのそれぞれにさらにCRC(Cyclic Redundancy Check)符号が追加された形のデータ(F11+D1+CRC、F12+D2+CRC、…、F1k+Dk+CRC)にエンコード処理を行うことにより、第2のECC符号(L2)を生成してもよい。
The
すなわち、L1/L2エンコーダ15は、有効/無効フラグ付きセクタごとに第1のECC符号(L1)を生成するとともに、複数の有効/無効フラグ付きセクタをひとまとめにした有効/無効フラグ付きクラスタごとに第2のECC符号(L2)を生成する。
In other words, the L1 /
ECC合成部15cは、DMAコントローラ13からバッファメモリ14を介して転送されたデータに、L1/L2エンコーダ15から供給された第1のECC符号(L1)及び第2のECC符号(L2)を付加して、図6(b)に示すような、ECC符号付きデータを形成し、形成したデータをメモリI/F17に出力することで、NANDメモリ30に書き込む。例えば、ECC合成部15cは、各セクタのデータD1〜Dkの後に対応する第1のECC符号(L1)E1〜Ekを追加するとともに、複数セクタのデータD1〜Dkの全体の後に第2のECC符号(L2)G1kを追加する。ただし、有効/無効フラグF1は、ECCモジュール15bのエンコードの際にのみ使用され、図6(b)に示されているように、NANDメモリ30に書き込まれるデータには、有効/無効フラグフィールドは存在しない。
The
L1デコーダ16は、図5に示すように、フラグ付加部16a、ECCモジュール16bを有する。L1デコーダ16には、NANDメモリ30から読み出された第1のECC符号(L1)及びCRC符号付きのデータが、メモリI/F17を介して入力される。データは、バッファメモリ14に一時記憶され、CRCは、L1デコーダ16内のCRCバッファ(図示せず)に一時記憶される。
As shown in FIG. 5, the
フラグ付加部16aは、有効であることを示す1〜複数ビットの有効フラグ(有効に固定された第2のフラグ)F2を、メモリI/F17から転送された各セクタのデータDの例えば先頭(あるいは最後尾)に付加する。この有効フラグF2の挿入位置は、有効/無効フラグF1の挿入位置に対応し、有効/無効フラグF1をデータの先頭に付加した場合は、有効フラグF2をデータの先頭に付加するようにし、有効/無効フラグF1をデータの最後尾に付加した場合は、有効フラグF2をデータの最後尾に付加する。すなわち、フラグ付加部16aは、有効フラグF2を発生する有効フラグ発生部16aaと、発生した有効フラグF2を、データDの先頭に付加し、有効フラグF2、データD、第1のECC符号(L1)及びCRCをECCモジュール16bに入力する付加部16abとを有する。
The
ECCモジュール16bは、有効フラグF2が付加された複数セクタのデータD1〜Dkのそれぞれに、第1のECC符号(L1)を用いた第1のECC処理(誤り訂正処理)におけるデコード処理を行う。ECCモジュール16bは、デコード処理の結果に応じて、第1のECC処理におけるエラー有無及び訂正位置情報をMPU2に通知する。
The
より具体的には、ECCモジュール16bは、有効フラグF2が付加された各セクタのデータに対して、その対応する第1のECC符号(L1)を用いて誤り訂正および復号化を行い、さらに対応する誤り検出符号(CRC)を用いて第1のECC符号(L1)の訂正能力以上の誤りが生じているか否かを判断する。すなわち、ECCモジュール16bは、各セクタデータについて、第1のECC処理が成功したか、あるいは失敗したかを判断する。
More specifically, the
ECCモジュール16bは、第1のECC処理が成功である(エラー無し)と判断した場合に、この判断結果及び誤りビット発生位置(訂正位置情報)をMPU2に通知する。MPU2は、誤りビット発生位置が有効フラグF2のビット部分であるか否かを判定し、有効フラグF2のビット部分が正しいことを検出した場合、その有効フラグF2が付加されたセクタデータDが有効であると判定し、一方、有効フラグF2のビット部分が誤りであることを検出した場合、その有効フラグF2が付加されたセクタデータDが無効であると判定する。MPU2は、読出し命令に応答する際において、有効フラグF2が付加されたセクタデータDが無効であると判定した場合は、読み出しエラーをホストHAに通知する。また、ECCモジュール16bは、第1のECC処理が失敗である(エラー有り)と判断した場合は、この判断結果をMPU2に通知し、L2デコーダ20を活性化させるよう要求する。
When the
第1のECC処理により訂正不能な誤りが生じている場合(L1−ECCエラー)、MPU2の制御によって、NANDコントローラ10の外部に配置されるL2デコーダ20には、クラスタを構成する複数のセクタデータD1〜Dk、第2のECC符号(L2)及びCRCが、バッファメモリ14、DMAコントローラ13、及び内部バス50を経由して転送される。
When an uncorrectable error has occurred due to the first ECC processing (L1-ECC error), a plurality of sector data constituting a cluster is stored in the
L2デコーダ20は、図5に示すように、フラグ付加部20a及びECCモジュール20bを有する。フラグ付加部20aは、“有効”に固定された有効フラグF2を、メモリI/F17から転送されたクラスタを構成する全てのセクタデータD1〜Dkに付加する。ECCモジュール20bは、有効フラグF2がそれぞれ付加された複数のセクタデータD1〜Dk、各CRCの全体に対して、第2のECC符号(L2)を用いた第2のECC処理(誤り訂正処理)におけるデコード処理を行う。
As shown in FIG. 5, the
より具体的には、ECCモジュール20bは、第2のECC符号(L2)を用いて有効フラグ(有効を示す第2のフラグ)F2がそれぞれ付加された複数のセクタデータD1〜Dk、各CRCを含むクラスタ全体に対して誤り訂正および復号化を行い、さらに誤り検出符号(CRC)を用いて第2のECC符号(L2)の訂正能力以上の誤りが生じているか否かを判断する。すなわち、ECCモジュール20bは、第1のECC処理に失敗したセクタを含むクラスタについて、第2のECC処理が成功したか、あるいは失敗したかを判断する。
More specifically, the
ECCモジュール20bは、第2のECC処理が成功である(エラー無し)と判断した場合に、この判断結果及び誤りビット発生位置(訂正位置情報)をMPU2に通知する。MPU2は、誤りビット発生位置が有効フラグF2のビット部分であるか否かを判定し、有効フラグF2のビット部分が正しいことを検出した場合、その有効フラグF2が付加されたセクタデータDが有効であると判定し、一方、有効フラグF2のビット部分が誤りであることを検出した場合、その有効フラグF2が付加されたセクタデータDが無効であると判定する。MPU2は、読出し命令に応答する際において、有効フラグF2が付加されたセクタデータDが無効であると判定した場合は、読み出しエラーをホストHAに通知する。
When the
また、ECCモジュール20bは、第2のECC処理が失敗である(エラー有り)と判断した場合は、この判断結果をMPU2に通知する。MPU2は、読出し命令に応答する際において、第2のECC処理が失敗である(L2−ECCエラー)との判断結果を受信した場合、読み出しエラーをホストHAに通知する。更に、MPU2は、第2のECC処理に失敗したクラスタを構成する全てのセクタデータD1〜Dkについて、セレクト信号SLとして無効を選択した上で、L1/L2エンコーダ15によって有効/無効フラグF1を付加し、メモリI/F17を介してNANDメモリ30に書き込む。
Further, when the
MPU2は、NANDメモリ30に対してデータの書き込みを行う際、セクタ毎にセレクト信号SLを有効にするか無効にするかを決定し、その決定結果を命令制御部11、コマンド制御部12を介してL1/L2エンコーダ15に出力する。セレクト信号SLは、ホストHAからの書き込み要求にしたがって、ホストHAから入力されたデータをNANDメモリ10に書き込む際、ホストHAから入力されたデータに関しては、有効が選択される。すなわち、NANDメモリ10で未使用(データが記憶されていない)の論理アドレス(LBA)に対してホストHAから書き込みが発生したときや、クラスタ内の一部セクタの更新ではなくクラスタ全体の更新のためのNANDメモリ10に対する書き込みのときには、セレクト信号SLとして、有効が選択される。
When writing data to the
また、クラスタ内の一部セクタの更新を行うときなど、NANDメモリ30の記憶データを読み取って、変更を加えて、書き戻すリード・モディファイ・ライト(RMW)の場合のNANDメモリ30への書き込みの際は、L1デコーダ16及びL2デコーダ20でのデコード結果に基づいて、NANDメモリ30から読み出したデータの各セクタが有効であるか無効であるかを判定し、その判定結果と、加えられる変更内容に基づいて有効を選択させるか無効を選択させるかを決定する。デコード結果に基づき有効と判定されたセクタは有効/無効フラグF1で有効を選択させ、無効と判定されたセクタは、このセクタにホストHAからの更新が発生していない限り、有効/無効フラグF1で無効を選択させる。したがって、リード・モディファイ・ライト時においては、L1デコーダ16及びL2デコーダ20でのデコード結果に基づいて得られた各セクタの有効/無効の判定結果は、NANDメモリ30から読み出されたデータが、有効/無効フラグF1が付加されて再度NANDメモリ30に再記憶されるまでは、例えばメモリ40などの記憶部に一時記憶させておく。
In addition, when updating some sectors in the cluster, the data stored in the
次に、半導体記憶装置1のECC処理に関連した動作を、図7〜図9を用いて説明する。図7は、書き込み処理の動作を示すフローチャートであり、図8は、読み出し処理の動作を示すフローチャートであり、図9は、RMW(リード・モディファイ・ライト)処理の動作を示すフローチャートである。
Next, operations related to the ECC processing of the
まず、図7を用いて書き込み処理の動作を説明する。まず、MPU2は、ホストHAから入力されたコマンドが書き込み命令であるか否かを判定し(ステップS1)、入力コマンドが書き込み命令である場合は、この書込み命令に含まれるLBAと、管理情報として例えばメモリ40に登録されているNANDメモリ10に既に記憶されているデータのLBAとを照合することにより、今回の書き込みが前述したリード・モディファイ・ライト(RMW)処理を必要とするか否かを判定し(ステップS2)、リード・モディファイ・ライト(RMW)処理を必要とすると判断した場合は、図9で説明するRMW処理を実行する(ステップS3)。
First, the operation of the writing process will be described with reference to FIG. First, the
MPU2は、今回の書き込みがリード・モディファイ・ライト(RMW)処理を必要とせず、例えば未使用のLBAに対する書き込みであると判断すると、ホストHAから通信I/F60を介して入力された書き込みデータを、メモリ40、DMAコントローラ13、バッファメモリ14を経由してL1/L2エンコーダ15に入力して、セレクト信号SLを有効側にする。この結果、L1/L2エンコーダ15のフラグ付加部15aにおいて、有効“0000h”を示す有効/無効フラグF1が書き込みデータのセクタデータD毎に付加される(ステップS4)。つぎに、L1/L2エンコーダ15のECCモジュール15bは、有効“0000h”を示す有効/無効フラグF1が付加されたセクタデータD毎にCRCおよび第1のECC符号(L1)を生成し、さらにクラスタ毎に第2のECC符号を生成する(ステップS5)。つぎに、ECC合成部15cは、DMAコントローラ13からバッファメモリ14を介して転送されたデータと、L1/L2エンコーダ15から供給されたCRC、第1および第2のECC符号(L1、L2)とをマージして(図6(b)参照)、メモリI/F17を介してNANDメモリ30に書き込む(ステップS6)。
When the
つぎに、図8を用いて読み出し処理の動作を説明する。MPU2は、ホストHAから入力されたコマンドが読み出し命令であるか否かを判定し(ステップS10)、入力コマンドが読み出し命令であると判定した場合は、NANDコントローラ10を制御して、読み出し命令によってアドレスが指定されたデータをNANDメモリ30から読み出させる(ステップS11)。NANDメモリ30からL1デコーダ16に読み出されたデータには、第1および第2のECC符号(L1、L2)が付加されている。
Next, the read processing operation will be described with reference to FIG. The
L1デコーダ16のフラグ付加部16aは、第1および第2のECC符号(L1、L2)が付加された読み出しデータに、有効“0000h”を示す有効フラグF2をセクタ毎に付加する(ステップS12)。L1デコーダ16のECCモジュール16bは、有効フラグF2が付加された各セクタデータDに、第1のECC符号(L1)を用いて誤り訂正復号処理を行う(ステップS13)。具体的には、ECCモジュール16bは、第1のECC符号(L1)を用いてセクタ毎に誤り訂正および復号化を行い、さらに誤り検出符号(CRC)を用いて第1のECC符号(L1)の訂正能力以上の誤りが生じているか否かをセクタ毎に判断する(ステップS14)。
The
L1デコーダ16のECCモジュール16bは、第1のECC符号(L1)を用いた誤り訂正に成功したと判断した場合に、この判断結果及び誤りビットの発生位置をMPU2に通知する。MPU2は、誤りビット発生位置が有効フラグF2のビット部分であるか否かを判定する(ステップS16)。MPU2は、有効フラグF2のビット部分が誤りであることを検出した場合は、その有効フラグF2が付加されたセクタデータDが無効であると判定し(ステップS17)、読み出しエラーをホストHAに通知する(ステップS18)。
When the
一方、MPU2は、有効フラグF2のビット部分が正しいことを検出した場合(ステップS16 NO)、その有効フラグF2が付加されたセクタデータDが有効であると判定し(ステップS19)、第1のECC符号(L1)による誤り訂正後のセクタデータDをメモリ40(キャッシュ領域41)、通信I/F60を介してホストHAに出力する(ステップS20)。
On the other hand, when the
一方、ECCモジュール16bは、第1のECC符号(L1)を用いた誤り訂正に失敗したと判断した場合は(ステップS14 NO)、MPU2に対してL2デコーダ20を活性化させるよう要求する。MPU2によって活性化されたL2デコーダ20のECCモジュール20bは、第2のECC符号(L2)を用いて有効フラグ(有効を示す第2のフラグ)F2がそれぞれ付加された複数のセクタデータD1〜Dk、各CRCを含むクラスタ全体に対して誤り訂正および復号化を行い、さらに誤り検出符号(CRC)を用いて第2のECC符号(L2)の訂正能力以上の誤りが生じているか否かを判断する(ステップS15)。
On the other hand, if the
ECCモジュール20bは、第2のECC符号(L2)を用いた誤り訂正に成功したと判断した場合は、この判断結果及び誤りビット発生位置をMPU2に通知する。MPU2は、誤りビット発生位置が有効フラグF2のビット部分であるか否かを判定する(ステップS16)。MPU2は、有効フラグF2のビット部分が誤りであることを検出した場合は、その有効フラグF2が付加されたセクタデータDが無効であると判定し(ステップS17)、読み出しエラーをホストHAに通知する(ステップS18)。
If the
一方、MPU2は、有効フラグF2のビット部分が正しいことを検出した場合(ステップS16 NO)、その有効フラグF2が付加されたセクタデータDが有効であると判定し(ステップS19)、第2のECC符号(L1)による誤り訂正後のセクタデータDをメモリ40(キャッシュ領域41)、通信I/F60を介してホストHAに出力する(ステップS20)。
On the other hand, when the
しかし、L2デコーダ20のECCモジュール20bは、第2のECC符号(L2)の訂正能力以上の誤りが生じていることを検出した場合(L2ECCエラー)は、その旨をMPU2に報告する。MPU2は、L2−ECCエラーを受信した場合、読み出しエラーをホストHAに通知する。更に、MPU2は、第2のECC処理に失敗したクラスタを構成する全てのセクタデータD1〜Dkについて、セレクト信号SLとして無効を選択した上で、L1/L2エンコーダ15によって有効/無効フラグF1を付加し、メモリI/F17を介してNANDメモリ30に書き込む(ステップS21)。
However, when the
つぎに、図9を用いてリード・モディファイ・ライト(RMW)処理の動作を説明する。MPU2は、今回の処理がRMW処理であるか否かを判定し(ステップS40)、RMW処理であると判断した場合は、NANDコントローラ10を制御して、該当するクラスタデータをNANDメモリ30から読み出させる(ステップS41)。L1デコーダ16のフラグ付加部16aは、第1および第2のECC符号(L1、L2)が付加された読み出しデータに、有効“0000h”を示す有効フラグF2をセクタ毎に付加する(ステップS42)。L1デコーダ16のECCモジュール16bは、有効フラグF2が付加された各セクタデータDに、前記同様、第1のECC符号(L1)を用いて誤り訂正復号処理を行い(ステップS43)、誤り検出符号(CRC)を用いて第1のECC符号(L1)の訂正能力以上の誤りが生じているか否かをセクタ毎に判断する(ステップS44)。
Next, the operation of the read-modify-write (RMW) process will be described with reference to FIG. The
L1デコーダ16のECCモジュール16bは、第1のECC符号(L1)を用いて誤り訂正が不可能と判断した場合は(ステップS44 NO)、MPU2に対してL2デコーダ20を活性化させるよう要求する。MPU2によって活性化されたL2デコーダ20のECCモジュール20bは、第2のECC符号(L2)を用いて有効フラグ(有効を示す第2のフラグ)F2がそれぞれ付加された複数のセクタデータD1〜Dk、各CRCを含むクラスタ全体に対して誤り訂正および復号化を行い、さらに誤り検出符号(CRC)を用いて第2のECC符号(L2)の訂正能力以上の誤りが生じているか否かを判断する(ステップS45)。L2デコーダ20のECCモジュール20bは、第2のECC符号(L2)の訂正能力以上の誤りが生じていることを検出した場合(L2ECCエラー)は、その旨をMPU2に報告する。MPU2は、L2−ECCエラーを受信した場合、そのクラスタを無効にするべく、当該クラスタを構成する全てのセクタデータD1〜Dkにそれぞれ対応するフラグF2部分での判定結果を無効に設定する(ステップS53)。
If the
L1デコーダ16またはL2デコーダ20の何れかによって誤り訂正が可能である場合は、L1デコーダ16(またはL2デコーダ20)は、エラーの有無およびエラービット位置情報をMPU2に通知する。MPU2は、エラービット位置情報によって有効フラグF2のビット部分が誤りであるか否かを判定し(ステップS46)、有効フラグF2のビット部分が誤りであることを検出した場合は、その有効フラグF2が付加されたセクタデータDが無効であると判定し(ステップS47)、有効フラグF2のビット部分が正しいことを検出した場合、その有効フラグF2が付加されたセクタデータDが有効であると判定する(ステップS48)。クラスタ内の各セクタについてのフラグ判定結果は、前述したように一時記憶しておく。
When error correction is possible by either the
L1デコーダ16(またはL2デコーダ20)で処理された各セクタデータは、バッファメモリ14、DMAコントローラ13を介してメモリ40の作業領域42に書き込まれ、メモリ40の作業領域42で、ホストHAから受信した更新データ(書き込みデータ)との置換処理が実行され、図4(b)に示したような、組み合わせデータが形成される(ステップS49)。MPU2は、一時記憶していたフラグ判定結果のうちのホストHAから受信した更新データに対応するセクタに対応するフラグ判定結果を有効に変更し(ステップS50)、変更したフラグを有効/無効フラグF1として各セクタに付加してL1/L2符号化を行わせる(ステップS51)。すなわち、メモリ40の作業領域42で作成した組み合わせデータを、DMAコントローラ13,バッファメモリ14を経由してL1/L2エンコーダ15に入力して、各セクタの無効/有効に応じてセレクト信号SLを切り替えることでL1/L2エンコーダ15において、有効“0000h”または無効“0001h”を示す有効/無効フラグF1を書き込みデータのセクタデータD毎に付加し、さらに有効/無効フラグF1が付加された各セクタデータD毎にCRCおよび第1のECC符号(L1)を生成し、さらにクラスタ毎に第2のECC符号を生成する。そして、生成したCRC、第1および第2のECC符号(L1、L2)を、バッファメモリ14を介して転送されたデータとマージして、メモリI/F17を介してNANDメモリ30に書き込む(ステップS52)。
Each sector data processed by the L1 decoder 16 (or L2 decoder 20) is written to the
図4に示したような、無効なセクタ部分に対する一部更新処理が発生した場合の本実施の形態でRMW動作は次のようになる。図4(a)に示した無効セクタは、L1デコーダ16またはL2デコーダ20でのデコード処理によって検出される。すなわち、L1デコーダ16またはL2デコーダ20でのデコード処理の際に誤り訂正不可能になり、L2ECCエラーが発生することにより、MPU2で無効セクタ化(invalid化)される。この結果、これらの無効セクタには、L1/L2エンコーダ15で無効を示す有効/無効フラグF1が付加されてエンコード処理が行われ、それらのエンコード結果が各セクタに付加されてNANDメモリ30に書き込まれる。
In the present embodiment when the partial update process for the invalid sector portion as shown in FIG. 4 occurs, the RMW operation is as follows. The invalid sector shown in FIG. 4A is detected by the decoding process in the
このような状態で、複数の連続した無効セクタの一部に図4(b)に示すような更新が発生したとする。このような場合、MPU2では、リード・モディファイ・ライト動作を実行する。すなわち、まず、更新セクタを含むクラスタを含むページまたはブロックをNANDメモリ30からリードする。リードされたデータは、L1デコーダ16及びL2デコーダ20で、リードされた各セクタに有効フラグF2が付加される前述のデコード処理が行われ、この結果有効フラグF2部分に誤りがあるとして検出され、これによりMPU2は、これらリードされたセクタは誤り訂正不可能な無効セクタであると判定する。
In such a state, it is assumed that an update as shown in FIG. 4B occurs in a part of a plurality of consecutive invalid sectors. In such a case, the
無効と判定されたセクタは、バッファメモリ14、DMAコントローラ13を介してメモリ40の作業領域42に書き込まれ、メモリ40の作業領域42で、ホストHAから受信した更新データと組み合わされて、図4(b)に示すような、組み合わせデータが形成される。この組み合わせデータは、メモリ40の作業領域42からDMAコントローラ13、バッファメモリ14に転送される。
The sector determined to be invalid is written into the
MPU2は、組み合わせデータ中の無効セクタ部分については、有効/無効フラグF1の無効フラグを選択し、更新セクタ部分については、有効/無効フラグF1の有効フラグを選択するよう、NANDコントローラ10の命令制御部11に指令を与える。この結果、L1/L2エンコーダ15では、無効セクタには、無効の有効/無効フラグF1を付加してECC符号を作成し、更新セクタには有効の有効/無効フラグF1を付加してECC符号を作成し、作成した各ECC符号を該当セクタにそれぞれ付加してNANDメモリ30の新たなページまたはブロックに書き込む。したがって、このような有効セクタ及び無効セクタが組み合わされたデータをリードした際には、L1デコーダ16及びL2デコーダ20で前述のデコード処理が行われることにより、各セクタが有効であるか無効であるかを適正に判別することが可能となる。
The
図10は、有効/無効フラグF1が、ECC処理単位における未使用領域を効率的に利用して付加され得ることを示すものである。図10では、L1/L2エンコーダ15は、データ部分及びCRC部分に、更に未使用領域「DR」を加えたデータを処理単位として、第1のECC処理を行う。ここで未使用領域とは、エンコード処理及びデコード処理において使用されるが、実際にはNANDメモリ30に書き込まれないデータのことである。なお、未使用領域の一部データについては、実際にNANDメモリ30に書き込んでも良い。このような未使用領域は、ECC処理単位にデータ部分以外のCRC部分等を含める場合に端数として発生し得る。本実施形態では、例えば、この様なECC処理単位における未使用領域の少なくとも一部のビットを、有効/無効フラグF1として利用することができる。この場合、元々活用されていなかったECC処理単位内の未使用領域を効率的に利用することができる。
FIG. 10 shows that the valid / invalid flag F1 can be added by efficiently using an unused area in the ECC processing unit. In FIG. 10, the L1 /
未使用領域内の各ビットには、例えば、仮想的に“0”データを割り当てることでデコード処理がなされる。この場合、本実施形態では、有効フラグ表すビットについても同様に“0”データ(“0000h”)に設定する。これにより、エンコード処理時に有効フラグをセットしてECC処理を行った有効データについては通常通りデコード処理が実行され、エンコード処理時に無効フラグをセットしてECC処理を行った無効データについては、未使用領域内のフラグ位置に誤りが検出されることで、有効データ/無効データを判別することが可能になる。従って、ECC処理単位における未使用領域の少なくとも一部のビットを仮想的な有効/無効フラグとして効率的に利用することが可能になる。 Each bit in the unused area is decoded, for example, by virtually assigning “0” data. In this case, in this embodiment, the bit representing the valid flag is similarly set to “0” data (“0000h”). As a result, the valid data that has been subjected to ECC processing by setting the valid flag during the encoding process is decoded as usual, and the invalid data that has been subjected to ECC processing by setting the invalid flag during the encoding process is unused. By detecting an error at the flag position in the area, it is possible to determine valid data / invalid data. Therefore, it is possible to efficiently use at least some bits of the unused area in the ECC processing unit as a virtual valid / invalid flag.
以上のように、本実施の形態においては、ECC符号生成時に、データに加え、データの有効/無効を識別する仮想的なフラグについても処理単位に含める。NANDメモリ30への書き込み時にはECC演算で使用したフラグは対象としない。NANDメモリ30からの読み出し時には、上記フラグ情報は書き込んでいないため存在しないので、仮に有効フラグが付与されているものとしてECC演算を行う。ECC演算結果として、当該フラグに誤りがあるとして検出された場合は無効データとして扱い、当該フラグに誤りがなければ有効データとして扱うことができる。
As described above, in the present embodiment, at the time of ECC code generation, in addition to data, a virtual flag for identifying validity / invalidity of data is also included in the processing unit. At the time of writing to the
セクタデータの有効/無効を示す有効/無効フラグF1をセクタデータに付加してECC処理を行うことにより、ECC符号(L1、L2)を生成するので、ECC処理単位における未使用領域にフラグF1の値を示す情報(セクタデータの有効/無効を示す情報)を含ませることができる。そして、そのように生成されたECC符号(L1、L2)をセクタデータに付加してNANDメモリ30へ書き込むので、セクタデータの有効/無効を管理するための情報により、NANDメモリ30の記憶領域が消費されないようにすることができる。ここで、データ+付加情報の組でECC符号化処理を行うが、NANDメモリ30に対してはデータのみ、もしくはデータ+付加情報の一部のみを書き込み対象として取り扱い、読み出し時は削除した付加情報を予め準備した値で補完してECC復号処理を行う。
The ECC code (L1, L2) is generated by adding the valid / invalid flag F1 indicating the validity / invalidity of the sector data to the sector data, so that the ECC code (L1, L2) is generated. Information indicating a value (information indicating validity / invalidity of sector data) can be included. Then, since the ECC code (L1, L2) generated in this way is added to the sector data and written to the
また、セクタデータとECC符号との組を複数含むデータをNANDメモリから読み出し、有効に固定された有効フラグF2を読み出されたセクタデータ毎に付加し、読み出された(フラグF1の値を示す情報が含まれた)ECC符号を用いたECC処理を有効フラグF2が付加されたセクタデータに対して行う。これにより、有効フラグF2が誤りであるか否かを検出して、エンコード処理時に付加した有効/無効フラグF1の値を推定することができる。すなわち、ECC処理により有効フラグF2が誤りであることを検出した場合、有効フラグF2が付加されたセクタデータが無効であると判定することができる。また、ECC処理により有効フラグF2が正しいことを検出した場合、有効フラグF2が付加されたセクタデータが有効であると判定することができる。 Also, data including a plurality of sets of sector data and ECC codes is read from the NAND memory, and a valid flag F2 that is effectively fixed is added to each read sector data and read (the value of the flag F1 is changed). ECC processing using an ECC code (including information indicating the above) is performed on the sector data to which the valid flag F2 is added. As a result, it is possible to detect whether the validity flag F2 is an error and to estimate the value of the validity / invalidity flag F1 added during the encoding process. That is, when it is detected by ECC processing that the valid flag F2 is incorrect, it can be determined that the sector data to which the valid flag F2 is added is invalid. Further, when it is detected by the ECC process that the valid flag F2 is correct, it can be determined that the sector data to which the valid flag F2 is added is valid.
したがって、第1の実施の形態によれば、NANDメモリ30の記憶領域を消費することなく、セクタデータの有効/無効を管理することができる。例えば、バッドクラスタテーブル、及びバッドクラスタテーブルに登録されたクラスタを構成する各セクタの有効/無効を示すセクタビットマップ等を作成する必要が無くなる。
Therefore, according to the first embodiment, the validity / invalidity of the sector data can be managed without consuming the storage area of the
なお、本実施の形態では、2段階のECC処理(L1、L2)を行うようにしたが、第1のECC処理(L1)及び第2のECC処理(L2)のいずれか一方のみを行うようにしてもよい。あるいは、第1のECC処理および第2のECC処理とは異なるフォーマットで誤り訂正符号を生成し、3段階以上のECC処理を行うようにしてもよい。 In this embodiment, the two-stage ECC processing (L1, L2) is performed, but only one of the first ECC processing (L1) and the second ECC processing (L2) is performed. It may be. Alternatively, an error correction code may be generated in a format different from the first ECC process and the second ECC process, and three or more stages of ECC processes may be performed.
また、上記実施の形態では、L1デコーダ16、L2デコーダ20で使用するフラグF2として、有効フラグを採用したが、無効フラグを採用してもよい。この場合、MPU2は、ECC処理により無効フラグ(無効に固定された第2のフラグ)F2のビット部分が誤りであることを検出した場合、無効フラグF2が付加されたセクタデータDが有効であると判定する。MPU2は、ECC処理により無効フラグF2のビット部分が正しいことを検出した場合、無効フラグF2が付加されたセクタデータDが無効であると判定する。
In the above embodiment, the valid flag is employed as the flag F2 used in the
1 半導体記憶装置、 2 MPU、 10 NANDコントローラ、 11 命令制御部、 12 コマンド制御部、 13 DMAコントローラ、 14 バッファメモリ、 15 L1/L2エンコーダ、 15a フラグ付加部、 15aa セレクタ、 15ab 付加部、 15b ECCモジュール、 15c ECC合成部、 16 L1デコーダ、 16a フラグ付加部、 16aa 有効フラグ発生部、 16ab 付加部、 16b ECCモジュール、 17 メモリI/F、 20 L2デコーダ、 20a フラグ付加部、 20b ECCモジュール、 30 NANDメモリ、 40 メモリ、 41 キャッシュ領域、 42 作業領域、 50 内部バス、 60 通信I/F、 70 制御部、 71 書き込み制御部、 72 読み出し制御部、 F1、F11〜F1k 有効/無効フラグ、 F2 有効フラグ
DESCRIPTION OF
Claims (7)
前記不揮発性メモリへのデータの書き込みと前記不揮発性メモリからのデータの読み出しとを制御する制御部と、
を備え、
前記制御部は、
データが有効であるのか無効であるのかを示す第1のフラグをデータに付加して誤り訂正処理を行うことにより生成された誤り訂正符号を前記データに付加して前記不揮発性メモリへ書き込む書き込み制御部と、
前記データと前記誤り訂正符号とを前記不揮発性メモリから読み出し、有効及び無効の何れか一方に固定された第2のフラグを前記読み出されたデータに付加し、前記読み出された誤り訂正符号を用いた誤り訂正処理を前記第2のフラグが付加されたデータに対して行う読み出し制御部と、
を有する
ことを特徴とする半導体記憶装置。 Non-volatile memory for storing data;
A control unit that controls writing of data to the nonvolatile memory and reading of data from the nonvolatile memory;
With
The controller is
Write control for adding an error correction code generated by adding a first flag indicating whether the data is valid or invalid to the data and performing error correction processing to the data and writing to the nonvolatile memory And
The data and the error correction code are read from the nonvolatile memory, a second flag fixed to either valid or invalid is added to the read data, and the read error correction code A read control unit that performs error correction processing on the data with the second flag added thereto;
A semiconductor memory device comprising:
前記書き込み制御部は、前記読み出し制御部により無効であると判定されたデータに、無効であることを示す前記第1のフラグを付加し、前記読み出し制御部により有効であると判定されたデータに、有効であることを示す前記第1のフラグを付加する
ことを特徴とする請求項1に記載の半導体記憶装置。 The read control unit detects that the second flag effectively fixed by the error correction process is an error, or detects that the second flag fixed invalid by the error correction process is correct If it is determined that the data to which the second flag has been added is invalid and it is detected that the second flag, which is effectively fixed by error correction processing, is correct, or invalidated by error correction processing. When it is detected that the fixed second flag is an error, it is determined that the data with the second flag added is valid;
The write control unit adds the first flag indicating invalidity to data determined to be invalid by the read control unit, and sets the data determined to be valid by the read control unit. 2. The semiconductor memory device according to claim 1, wherein the first flag indicating validity is added.
ことを特徴とする請求項2に記載の半導体記憶装置。 The write control unit, when writing data input from a host device into the nonvolatile memory, adds the first flag indicating that the data is valid for the write data. Semiconductor memory device.
データが有効であるのか無効であるのかを示す第1のフラグをデータに付加して誤り訂正処理を行うことにより生成された誤り訂正符号を前記データに付加して前記不揮発性メモリへ書き込む書き込み制御部と、
前記データと前記誤り訂正符号とを前記不揮発性メモリから読み出し、有効及び無効の何れか一方に固定された第2のフラグを前記読み出されたデータに付加し、前記読み出された誤り訂正符号を用いた誤り訂正処理を前記第2のフラグが付加されたデータに対して行う読み出し制御部と、
を有する
ことを特徴とする制御装置。 A control device for controlling writing of data to a nonvolatile memory and reading of data from the nonvolatile memory,
Write control for adding an error correction code generated by adding a first flag indicating whether the data is valid or invalid to the data and performing error correction processing to the data and writing to the nonvolatile memory And
The data and the error correction code are read from the nonvolatile memory, a second flag fixed to either valid or invalid is added to the read data, and the read error correction code A read control unit that performs error correction processing on the data with the second flag added thereto;
A control device comprising:
前記書き込み制御部は、前記読み出し制御部により無効であると判定されたデータに、無効であることを示す前記第1のフラグを付加し、前記読み出し制御部により有効であると判定されたデータに、有効であることを示す前記第1のフラグを付加する
ことを特徴とする請求項4に記載の制御装置。 The read control unit detects that the second flag effectively fixed by the error correction process is an error, or detects that the second flag fixed invalid by the error correction process is correct If it is determined that the data to which the second flag has been added is invalid and it is detected that the second flag, which is effectively fixed by error correction processing, is correct, or invalidated by error correction processing. When it is detected that the fixed second flag is an error, it is determined that the data with the second flag added is valid;
The write control unit adds the first flag indicating invalidity to data determined to be invalid by the read control unit, and sets the data determined to be valid by the read control unit. The control device according to claim 4, wherein the first flag indicating that it is valid is added.
ことを特徴とする請求項5に記載の制御装置。 The write control unit, when writing data input from a host device to the nonvolatile memory, adds the first flag indicating that the data is valid for the write data. Control device.
前記不揮発性メモリへ書き込むべきデータが有効であるのか無効であるのかを示す第1のフラグを前記書き込むべきデータに付加して誤り訂正処理を行うことにより誤り訂正符号を生成する第1のステップと、
前記書き込むべきデータに前記第1のステップで生成された誤り訂正符号を付加して前記不揮発性メモリへ書き込む第2のステップと、
前記データと前記誤り訂正符号とを前記不揮発性メモリから読み出す第3のステップと、
有効及び無効の何れか一方に固定された第2のフラグを前記第3のステップで読み出されたデータに付加して、前記第3のステップで読み出された誤り訂正符号を用いた誤り訂正処理を前記第2のフラグが付加されたデータに対して行う第4のステップと、
有効に固定された前記第2のフラグが誤りであることを検出した場合、又は無効に固定された前記第2のフラグが正しいことを検出した場合、前記第2のフラグが付加されたデータが無効であると判定し、有効に固定された前記第2のフラグが正しいことを検出した場合、又は無効に固定された前記第2のフラグが誤りであることを検出した場合、前記第2のフラグが付加されたデータが有効であると判定する第5のステップと、
を備えたことを特徴とする半導体記憶装置の制御方法。 A method for controlling a semiconductor memory device having a nonvolatile memory for storing data,
A first step of generating an error correction code by performing error correction processing by adding a first flag indicating whether data to be written to the nonvolatile memory is valid or invalid to the data to be written; ,
A second step of adding the error correction code generated in the first step to the data to be written and writing to the nonvolatile memory;
A third step of reading the data and the error correction code from the nonvolatile memory;
Error correction using the error correction code read in the third step by adding a second flag fixed to either valid or invalid to the data read in the third step A fourth step of performing processing on the data to which the second flag is added;
When it is detected that the second flag fixed to valid is an error, or when the second flag fixed to invalid is detected to be correct, the data to which the second flag is added is When it is determined that the second flag fixed to be valid is correct, or when the second flag fixed to be invalid is detected to be erroneous, the second flag is determined to be invalid. A fifth step of determining that the data to which the flag is added is valid;
A method of controlling a semiconductor memory device, comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010159685A JP2012022508A (en) | 2010-07-14 | 2010-07-14 | Semiconductor storage device, control device, and method for controlling semiconductor storage device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010159685A JP2012022508A (en) | 2010-07-14 | 2010-07-14 | Semiconductor storage device, control device, and method for controlling semiconductor storage device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2012022508A true JP2012022508A (en) | 2012-02-02 |
Family
ID=45776753
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010159685A Pending JP2012022508A (en) | 2010-07-14 | 2010-07-14 | Semiconductor storage device, control device, and method for controlling semiconductor storage device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2012022508A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9170934B2 (en) | 2012-06-14 | 2015-10-27 | Kabushiki Kaisha Toshiba | Server and drive control device |
-
2010
- 2010-07-14 JP JP2010159685A patent/JP2012022508A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9170934B2 (en) | 2012-06-14 | 2015-10-27 | Kabushiki Kaisha Toshiba | Server and drive control device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8281065B2 (en) | Systems and methods for determining the status of memory locations in a non-volatile memory | |
US9135112B2 (en) | Policy for read operations addressing on-the-fly decoding failure in non-volatile memory | |
US7437597B1 (en) | Write-back cache with different ECC codings for clean and dirty lines with refetching of uncorrectable clean lines | |
KR101730510B1 (en) | Non-regular parity distribution detection via metadata tag | |
JP4901987B1 (en) | Storage device, electronic device, and error data correction method | |
JP5202130B2 (en) | Cache memory, computer system, and memory access method | |
TWI703499B (en) | Data storage device and method for sharing memory of controller thereof | |
US20130191705A1 (en) | Semiconductor storage device | |
JP2012234363A (en) | Memory system | |
JP2015018451A (en) | Memory controller, storage device, and memory control method | |
JP2012155430A (en) | Memory system and operation method thereof | |
JP2011165063A (en) | Semiconductor storage device | |
JP2011081776A (en) | Nonvolatile memory apparatus, memory controller, and memory system | |
JP2011198272A (en) | Semiconductor storage device and control method thereof | |
JP2011180831A (en) | Semiconductor memory device | |
JP2009301194A (en) | System for controlling semiconductor memory device | |
JP2016143085A (en) | Device and method | |
WO2015102035A1 (en) | Techniques for storing data in bandwidth optimized or coding rate optimized code words based on data access frequency | |
JP7177338B2 (en) | MEMORY CONTROLLER DEVICE, MEMORY DEVICE HAVING MEMORY CONTROLLER DEVICE, AND MEMORY CONTROL METHOD | |
TWI550627B (en) | Storage device and operating method thereof | |
JP2012003569A (en) | Memory controller, flash memory system including memory controller, and method of controlling flash memory | |
JP2012022508A (en) | Semiconductor storage device, control device, and method for controlling semiconductor storage device | |
US11182231B2 (en) | Host system and computing system including the host system | |
CN114333968A (en) | Memory control method, memory controller and electronic device | |
US10922025B2 (en) | Nonvolatile memory bad row management |