JP2008158908A - Memory controller, flash memory system, and control method of flash memory - Google Patents
Memory controller, flash memory system, and control method of flash memory Download PDFInfo
- Publication number
- JP2008158908A JP2008158908A JP2006348664A JP2006348664A JP2008158908A JP 2008158908 A JP2008158908 A JP 2008158908A JP 2006348664 A JP2006348664 A JP 2006348664A JP 2006348664 A JP2006348664 A JP 2006348664A JP 2008158908 A JP2008158908 A JP 2008158908A
- Authority
- JP
- Japan
- Prior art keywords
- data
- flash memory
- page
- correction
- read
- 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.)
- Granted
Links
Images
Abstract
Description
本発明は、メモリコントローラ、当該メモリコントローラを備えるフラッシュメモリシステム及びフラッシュメモリの制御方法に関する。 The present invention relates to a memory controller, a flash memory system including the memory controller, and a flash memory control method.
近年、不揮発性の記憶媒体であるフラッシュメモリの開発が盛んに行われ、デジタルカメラ等の情報機器(ホストシステム)の記憶媒体として普及している。そして、このような情報機器が扱うデータが大容量化したことに伴い、フラッシュメモリの記憶容量も大容量化が進んでいる。そのため、集積度に優れ、大容量化が容易なNAND型フラッシュメモリが注目されている。 In recent years, flash memory, which is a non-volatile storage medium, has been actively developed, and is widely used as a storage medium for information devices (host systems) such as digital cameras. As the data handled by such information devices has increased in capacity, the storage capacity of the flash memory has been increased. For this reason, attention has been focused on NAND flash memories that have a high degree of integration and are easy to increase in capacity.
フラッシュメモリは、メモリセルを消去状態(論理値=1)から書込状態(論理値=0)に変化させる場合には、メモリセル単位で行うことができる。しかし、メモリセルを書込状態(論理値=0)から消去状態(論理値=1)に変化させる場合には、複数のメモリセルからなる所定の消去単位(ブロック単位)でしかこれを行うことができない。 The flash memory can be performed in units of memory cells when the memory cells are changed from the erased state (logical value = 1) to the written state (logical value = 0). However, when the memory cell is changed from the write state (logic value = 0) to the erase state (logic value = 1), this is performed only in a predetermined erase unit (block unit) composed of a plurality of memory cells. I can't.
また、NAND型フラッシュメモリにおいては、上記ブロックは複数のページで構成されている。このページは、データの読み出し及び書き込みにおける処理単位であるが、上記特性によりデータの上書きができないため、記憶されているデータを書き換える場合には、書き換えデータを元のブロックとは異なる消去済みのブロックに書き込まなければならない。 In the NAND flash memory, the block is composed of a plurality of pages. This page is a processing unit for reading and writing data. However, because the data cannot be overwritten due to the above characteristics, when rewriting the stored data, the rewritten data is different from the original block. Must be written to.
さらに、フラッシュメモリは、その特性上、あるメモリセルに対する読み出しや書き込みが実行された場合に、そのメモリセルとビット線を共通にする他のメモリセルの状態が変化してしまうことがある。この現象はディスターブ現象と呼ばれ、メモリセルに対して書き込み動作・消去動作が繰り返されることにより発生率が高くなることが知られている。このディスターブ現象によって、一旦書き込まれたデータが変化し、データに誤りが混入してしまう。 Further, due to the characteristics of a flash memory, when reading or writing is performed on a certain memory cell, the state of another memory cell that shares the bit line with that memory cell may change. This phenomenon is called a disturb phenomenon, and it is known that the occurrence rate is increased by repeating the write / erase operations on the memory cells. Due to the disturb phenomenon, the data once written changes, and an error is mixed in the data.
このような場合、誤りが混入したページのデータをフラッシュメモリから読み出し、その誤りを訂正した後に、再度、フラッシュメモリに書き込むことが好ましい。例えば、特許文献1には、フラッシュメモリから読み出したデータに含まれる誤りが検出されたときに、その誤りを訂正したデータを他のブロックに書き込む発明が開示されている。
しかしながら、特許文献1に記載された処理では、誤りが検出されたページに記憶されているデータをフラッシュメモリから読み出してメモリコントローラ内のバッファに保持し、そのデータに含まれる誤りを訂正した後、訂正したデータをフラッシュメモリに書き込んでいる。つまり、この処理では、1ページ分のデータをフラッシュメモリからメモリコントローラに転送した後、更に、1ページ分のデータをメモリコントローラからフラッシュメモリに転送しなければならない。従って、特許文献1に記載された処理では、訂正済データをフラッシュメモリに保存し直すときの効率が良くなかった。
However, in the process described in
本発明は、上記実状に鑑みてなされたものであり、フラッシュメモリに記憶されているデータの誤りを、効率良く訂正して、フラッシュメモリに保存し直すことができるメモリコントローラ、フラッシュメモリシステム等を提供することを目的とする。 The present invention has been made in view of the above circumstances, and provides a memory controller, a flash memory system, and the like that can efficiently correct an error in data stored in a flash memory and save the data in the flash memory again. The purpose is to provide.
上記目的を達成するため、本発明の第1の観点に係るメモリコントローラは、複数のページで構成されたメモリセルアレイと、該メモリセルアレイに書き込むデータ又は該メモリセルアレイから読み出したデータをページ単位で保持する内部レジスタとを備えるフラッシュメモリに対して、前記メモリセルアレイ内の第1のページに記憶されているデータを前記内部レジスタに読み出すことを指示する読み出し指示と、該読み出し指示に基づいて前記内部レジスタに読み出されたデータを前記第1のページとは異なる第2のページに書き込むことを指示する書き込み指示とを与えるデータ複写指示手段と、
前記第1のページに記憶されているデータを、前記フラッシュメモリのデータバスを介して前記フラッシュメモリから読み出す読み出し手段と、
前記読み出し手段により前記フラッシュメモリから読み出された前記第1のページに記憶されているデータに含まれる誤りの訂正値を求める誤り訂正手段と、
前記データバスのバス幅に対応するビット数単位で、前記訂正値を含む訂正データを保持する訂正データ保持手段と、
前記訂正データ保持手段に保持されている前記訂正データを、前記データバスを介して前記フラッシュメモリに転送し、前記内部レジスタに保持されているデータの一部を前記訂正データで置き換えるデータ置換手段と、を備え、
前記データ複写指示手段は、前記第1のページに記憶されているデータに誤りが含まれている場合に、前記第1のページから前記内部レジスタに読み出されたデータの一部が前記訂正データで置き換えられた後に、前記第2のページに書き込むことを指示する書き込み指示を前記フラッシュメモリに与えることを特徴とする。
To achieve the above object, a memory controller according to a first aspect of the present invention holds a memory cell array composed of a plurality of pages and data to be written to or read from the memory cell array in units of pages. A read instruction that instructs the internal register to read data stored in the first page in the memory cell array, and the internal register based on the read instruction A data copy instruction means for giving a write instruction for instructing to write the data read into the second page different from the first page;
Reading means for reading data stored in the first page from the flash memory via the data bus of the flash memory;
Error correction means for obtaining a correction value of an error included in the data stored in the first page read from the flash memory by the reading means;
Correction data holding means for holding correction data including the correction value in units of bits corresponding to the bus width of the data bus;
Data replacement means for transferring the correction data held in the correction data holding means to the flash memory via the data bus and replacing a part of the data held in the internal register with the correction data; With
When the data stored in the first page includes an error, a part of the data read from the first page to the internal register is the correction data After the replacement, the flash memory is provided with a write instruction for instructing to write to the second page.
上記本発明に係るメモリコントローラでは、フラッシュメモリから読み出したデータに含まれる誤りが検出されたときに、その誤り部分を訂正するための訂正データが、フラッシュメモリに対するデータ転送の単位に相当する前記データバスのバス幅に対応するビット数単位で保持される。更に、この訂正データに対応するデータが保持されている内部レジスタにこの訂正データが転送され、内部レジスタに保持されているデータに含まれる誤りが訂正された後に、内部レジスタに保持されているデータがメモリセルアレイに書き込まれる。つまり、上記本発明に係るメモリコントローラでは、フラッシュメモリから読み出したデータに含まれる誤りが検出されたときに、その誤り部分を訂正するための訂正データだけが内部レジスタに転送され、内部レジスタ上で内部レジスタに保持されているデータの誤りの訂正が行われる。 In the memory controller according to the present invention, when an error included in the data read from the flash memory is detected, the correction data for correcting the error portion is the data corresponding to a unit of data transfer to the flash memory. It is held in units of the number of bits corresponding to the bus width of the bus. Further, after the correction data is transferred to the internal register holding the data corresponding to the correction data, and the error included in the data held in the internal register is corrected, the data held in the internal register Are written into the memory cell array. That is, in the memory controller according to the present invention, when an error included in the data read from the flash memory is detected, only the correction data for correcting the error part is transferred to the internal register, and on the internal register. An error in data held in the internal register is corrected.
前記訂正データ保持手段は、前記訂正データで置き換えられるデータの前記内部レジスタ内での位置を示す位置情報を保持し、前記データ置換手段は該位置情報に対応する部分のデータを前記訂正データと置き換えることを特徴とする。 The correction data holding unit holds position information indicating a position in the internal register of data to be replaced with the correction data, and the data replacement unit replaces a portion of data corresponding to the position information with the correction data. It is characterized by that.
上記目的を達成するため、本発明の第2の観点に係るフラッシュメモリシステムは、
上記メモリコントローラと、フラッシュメモリとを備えることを特徴とする。
In order to achieve the above object, a flash memory system according to a second aspect of the present invention provides:
The memory controller and a flash memory are provided.
上記目的を達成するため、本発明の第3の観点に係るフラッシュメモリの制御方法は、
複数のページで構成されたメモリセルアレイと、該メモリセルアレイに書き込むデータ又は該メモリセルアレイから読み出したデータをページ単位で保持する内部レジスタとを備えるフラッシュメモリに対して、前記メモリセルアレイ内の第1のページに記憶されているデータを前記内部レジスタに読み出すことを指示する第1のステップと、
前記第1のステップで前記内部レジスタに読み出されたデータを、前記フラッシュメモリのデータバスを介して前記内部レジスタから読み出す第2のステップと、
前記第2のステップで読み出されたデータに含まれる誤りの訂正値を求める第3のステップと、
前記第3のステップで求められた前記訂正値を含む訂正データを、前記データバスのバス幅に対応するビット数単位で保持する第4のステップと、
前記第4のステップで保持された前記訂正データを、前記データバスを介して前記内部レジスタに転送し、前記内部レジスタに保持されているデータの一部を前記訂正データで置き換える第5のステップと、
前記第5のステップで前記内部レジスタに保持されているデータの一部が前記訂正データで置き換えられた後に、前記フラッシュメモリに対して、前記内部レジスタに保持されているデータを前記第1のページとは異なる第2のページに書き込むことを指示する第6のステップと、
を含むことを特徴とする。
In order to achieve the above object, a flash memory control method according to a third aspect of the present invention includes:
For a flash memory comprising a memory cell array composed of a plurality of pages and an internal register for holding data to be written to the memory cell array or data read from the memory cell array in units of pages, the first in the memory cell array A first step for instructing reading of data stored in a page to the internal register;
A second step of reading data read into the internal register in the first step from the internal register via a data bus of the flash memory;
A third step for obtaining a correction value of an error included in the data read in the second step;
A fourth step of holding correction data including the correction value obtained in the third step in units of bits corresponding to the bus width of the data bus;
A fifth step of transferring the correction data held in the fourth step to the internal register via the data bus, and replacing a part of the data held in the internal register with the correction data; ,
After a part of the data held in the internal register in the fifth step is replaced with the correction data, the data held in the internal register is transferred to the first page with respect to the flash memory. A sixth step for instructing to write to a second page different from
It is characterized by including.
上記目的を達成するため、本発明の第4の観点に係るフラッシュメモリの制御方法は、
複数のページで構成されたメモリセルアレイと、該メモリセルアレイに書き込むデータ又は該メモリセルアレイから読み出したデータをページ単位で保持する内部レジスタとを備えるフラッシュメモリに対して、前記メモリセルアレイ内の第1のページに記憶されているデータを前記内部レジスタに読み出すことを指示する第1のステップと、
前記第1のステップで前記内部レジスタに読み出されたデータを、前記フラッシュメモリのデータバスを介して前記内部レジスタから読み出す第2のステップと、
前記第2のステップで読み出されたデータに含まれる誤りの訂正値を求める第3のステップと、
前記第3のステップで求められた前記訂正値を含む訂正データを、前記データバスのバス幅に対応するビット数単位で保持する第4のステップと、
前記フラッシュメモリに対して、前記第1のページに記憶されているデータを前記内部レジスタに読み出すことを指示する第5のステップと、
前記第4のステップで保持された前記訂正データを、前記第5のステップで前記内部レジスタに読み出されたデータが保持されている前記内部レジスタに前記データバスを介して転送し、前記内部レジスタに保持されているデータの一部を前記訂正データで置き換える第6のステップと、
前記第6のステップで前記内部レジスタに保持されているデータの一部が前記訂正データで置き換えられた後に、前記フラッシュメモリに対して、前記内部レジスタに保持されているデータを前記第1のページとは異なる第2のページに書き込むことを指示する第7のステップと、
を含むことを特徴とする。
In order to achieve the above object, a flash memory control method according to a fourth aspect of the present invention includes:
For a flash memory comprising a memory cell array composed of a plurality of pages and an internal register for holding data to be written to the memory cell array or data read from the memory cell array in units of pages, the first in the memory cell array A first step for instructing reading of data stored in a page to the internal register;
A second step of reading data read into the internal register in the first step from the internal register via a data bus of the flash memory;
A third step for obtaining a correction value of an error included in the data read in the second step;
A fourth step of holding correction data including the correction value obtained in the third step in units of bits corresponding to the bus width of the data bus;
A fifth step for instructing the flash memory to read the data stored in the first page into the internal register;
The correction data held in the fourth step is transferred via the data bus to the internal register in which the data read in the internal register in the fifth step is held, and the internal register A sixth step of replacing a part of the data held in the data with the corrected data;
After a part of the data held in the internal register in the sixth step is replaced with the correction data, the data held in the internal register is transferred to the first page with respect to the flash memory. A seventh step for instructing to write to a second page different from
It is characterized by including.
本発明によれば、フラッシュメモリに記憶されているデータの誤りを、効率良く訂正して、フラッシュメモリに保存し直すことができる。 According to the present invention, it is possible to efficiently correct an error in data stored in the flash memory and save it again in the flash memory.
以下、図面に基づき、本発明の実施の形態について詳細に説明する。
図1は、本発明の実施の形態に係るフラッシュメモリシステム1の構成を概略的に示すブロック図である。
図1に示すように、フラッシュメモリシステム1は、フラッシュメモリ2と、それを制御するフラッシュメモリコントローラ3とから構成され、外部バス13を介してホストシステム4と接続される。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a block diagram schematically showing a configuration of a
As shown in FIG. 1, the
ホストシステム4は、ホストシステム4の全体の動作を制御するためのCPU(Central Processing Unit)、フラッシュメモリシステム1との情報の授受を担うコンパニオンチップ等から構成される。ホストシステム4は、例えば、文字、音声、あるいは画像情報等の種々の情報を処理するパーソナルコンピュータやデジタルスチルカメラをはじめとする各種情報処理装置であってもよい。
The
フラッシュメモリ2は、不揮発性メモリであり、メモリセルアレイ21と、ページレジスタ(内部レジスタ)22とを備えている。メモリセルアレイ21に書き込まれるデータ、又はメモリセルアレイ21から読み出されたデータはページレジスタ(内部レジスタ)22に一時的に保持される。
The
フラッシュメモリコントローラ3はホストシステム4から供給されるデータをフラッシュメモリ2に転送し、フラッシュメモリ2内のページレジスタ(内部レジスタ)22を介してメモリセルアレイ21に書き込み、メモリセルアレイ21に書き込まれているデータをページレジスタ(内部レジスタ)22を介して読み出し、ホストシステム4に提供する。つまり、フラッシュメモリコントローラ3はページレジスタ22へのデータの書き込み又はページレジスタ22からのデータの読み出しを行い、フラッシュメモリ2はフラッシュメモリコントローラ3から与えられるコマンドに従ってページレジスタ22からメモリセルアレイ21へのデータの書き込み(複写)又はメモリセルアレイ21からページレジスタ22へのデータの読み出し(複写)を行う。
The
フラッシュメモリ2のアドレス空間は、「ページ」及び「ブロック(物理ブロック)」で構成されている。
ページは、フラッシュメモリ2にて行われるデータ読み出し動作及びデータ書き込み動作の処理単位である。つまり、データ読み出し動作及びデータ書き込み動作では、メモリセルアレイ21内のメモリセルがページ単位で選択され、このページ単位で、ページレジスタ22からメモリセルへのデータの書き込み(複写)、又はメモリセルからページレジスタ22へのデータの読み出し(複写)が行われる。
The address space of the
A page is a processing unit of a data read operation and a data write operation performed in the
物理ブロックは、フラッシュメモリ2で行われるデータ消去動作の処理単位であり、複数のページで構成されている。従って、データ消去動作では同じ物理ブロックに属する複数のページに記憶されているデータが一緒に消去される。
The physical block is a processing unit of data erasing operation performed in the
尚、ページレジスタ22からメモリセルアレイ21へのデータの書き込み、メモリセルアレイ21からページレジスタ22へのデータの読み出し、及びメモリセルアレイ21に記憶されているデータの消去が行われているとき、フラッシュメモリ2は、データ、アドレス情報、内部コマンド等の授受を行うことができないビジー状態になる。
The
図2は、フラッシュメモリ2のアドレス空間の構造を概略的に示す図である。
図2に示した例では、フラッシュメモリ2のアドレス空間は、ブロック0〜4095の4096個の物理ブロックで構成されている。また、各物理ブロックは、ページ0〜ページ63の64個のページで構成されている。更に、各ページは、4セクタ(512バイト×4セクタ=2048バイト)のユーザ領域25と、64バイトの冗長領域26と、で構成されている。
FIG. 2 is a diagram schematically showing the structure of the address space of the
In the example shown in FIG. 2, the address space of the
ここで、ユーザ領域25は、ホストシステム4から供給されるユーザデータを格納するための領域である。また、冗長領域26は、付加データを記録するための領域である。付加データは、後述するエラーコレクションコード(ECC)、その物理ブロックと対応関係にある論理ブロックを特定するための論理アドレス情報、その物理ブロックが不良ブロックであるか否かを示すブロックステータス等を含んでいる。
Here, the
このフラッシュメモリ2が有する4096個の物理ブロックに含まれるすべてのページ、つまり262144個のページには、ロウアドレス(0〜262143)が割り当てられている。このロウアドレスにより、書き込み又は読み出しの対象のページが特定される。更に、各ページ内では、ビットb0〜b7のビットからなる1バイト単位で、カラムアドレス(0〜2111)が割り当てられている。このカラムアドレスにより、書き込み又は読み出しの対象のページ内での位置が特定される。ここで、カラムアドレスが0〜2047の2048バイト(4セクタ)の領域がユーザ領域25に対応し、カラムアドレスが2048〜2111の64バイトの領域が冗長領域26に対応している。
Row addresses (0 to 262143) are assigned to all pages included in 4096 physical blocks of the
尚、フラッシュメモリ2のデータ入出力バス(データを入出力するためのデータバス)が8ビット(8端子)の場合、ページレジスタ(内部レジスタ)22には上記のような1バイト(8ビット)単位のカラムアドレスが割り当てられ、ページレジスタ22に書き込まれるデータは1バイト単位でフラッシュメモリコントローラ3からフラッシュメモリ2に入力(供給)され、ページレジスタ22から読み出されるデータは1バイト単位でフラッシュメモリ2から出力され、フラッシュメモリコントローラ3に入力される。又、フラッシュメモリ2のデータ入出力バス(データを入出力するためのデータバス)が16ビット(16端子)の場合、ページレジスタ22に書き込まれるデータは2バイト単位でフラッシュメモリコントローラ3からフラッシュメモリ2に入力(供給)され、ページレジスタ22から読み出されるデータは2バイト単位でフラッシュメモリ2から出力されるので、ページレジスタ(内部レジスタ)22には2バイト(16ビット)単位のカラムアドレス(0〜1055)が割り当てられている。
When the data input / output bus (data bus for inputting / outputting data) of the
図3は、4セクタ(2048バイト)のユーザ領域25と64バイトの冗長領域26とで構成されているページの記憶領域を示す図である。図3を参照しているページの記憶領域の構成について説明する。尚、ページに書き込むデータ又はページから読み出したデータを一時的に保持するページレジスタ(内部レジスタ)22の構成は、ページの記憶領域の構成と同じになっている。
ユーザ領域25は、第1セクタ領域251、第2セクタ領域252、第3セクタ領域253、第4セクタ領域254の4つの領域に分割して使用される。第1セクタ領域251はカラムアドレスの0〜511に対応する領域であり、第2セクタ領域252はカラムアドレスの512〜1023に対応する領域であり、第3セクタ領域253はカラムアドレスの1024〜1535に対応する領域であり、第4セクタ領域254はカラムアドレスの1536〜2047に対応する領域である。ユーザ領域25を4分割した512バイトの領域である第1セクタ領域251〜第4セクタ領域254には、それぞれ、ホストシステム4から供給される1セクタ(512バイト)のユーザデータが格納される。
FIG. 3 is a diagram showing a storage area of a page configured by a
The
冗長領域26は、共通領域260、第1個別領域261、第2個別領域262、第3個別領域263、第4個別領域264に分割して使用される。共通領域260は、カラムアドレスの2048〜2011に対応する8バイトの領域であり、論理アドレス情報、ブロックステータス等が記憶される。なお、論理アドレス情報及びブロックステータスは、物理ブロックに含まれる64個のページに共通の管理情報であるため、通常は物理ブロックの先頭ページの共通領域260にだけ書き込まれる。
The
第1個別領域261は、カラムアドレスの2056〜2069に対応する14バイトの領域であり、第1セクタ領域251に書き込まれたデータに関する情報が記憶される。第2個別領域262は、カラムアドレスの2070〜2083に対応する14バイトの領域であり、第2セクタ領域252に書き込まれたデータに関する情報が記憶される。第3個別領域263は、カラムアドレスの2084〜2097に対応する14バイトの領域であり、第3セクタ領域253に書き込まれたデータに関する情報が記憶される。第4個別領域264は、カラムアドレス2098〜2111に対応する14バイトの領域であり、第4セクタ領域254に書き込まれたデータに関する情報が記憶される。
The first
例えば、第1個別領域261には、第1セクタ領域251に記憶されるデータに対応するエラーコレクションコード等が記憶される。以下同様に、第2セクタ領域252、第3セクタ領域253、第4セクタ領域254にそれぞれ記憶されるデータに対応するエラーコレクションコード等は、第2個別領域262、第3個別領域263、第4個別領域264にそれぞれ記憶される。
For example, in the first
エラーコレクションコードは、第1セクタ領域251から第4セクタ領域254に書き込まれる各ユーザデータに基づいてECCブロック11で生成され、上記の対応関係に従って第1個別領域261から第4個別領域264にそれぞれ書き込まれる。従って、第1セクタ領域251から読み出されたユーザデータに含まれる誤りは、第1個別領域261から読み出されたエラーコレクションコードに基づいて訂正され、第2セクタ領域252から読み出されたユーザデータに含まれる誤りは、第2個別領域262から読み出されたエラーコレクションコードに基づいて訂正され、第3セクタ領域253から読み出されたユーザデータに含まれる誤りは、第3個別領域263から読み出されたエラーコレクションコードに基づいて訂正され、第4セクタ領域254から読み出されたユーザデータに含まれる誤りは、第4個別領域264から読み出されたエラーコレクションコードに基づいて訂正される。
The error collection code is generated by the
なお、エラーコレクションコードのデータ量は誤りの訂正能力に応じて適宜設定することができる。例えば、リードソロモン符号をエラーコレクションコードとして使用し、10ビットを1シンボルとして、4シンボル以下の誤りを訂正できるようにしたい場合には、8シンボル(10バイト)のエラーコレクションコードが第1個別領域261〜第4個別領域264にそれぞれ書き込まれる。
The data amount of the error correction code can be set as appropriate according to the error correction capability. For example, when Reed-Solomon code is used as an error collection code and 10 bits are used as one symbol and an error of 4 symbols or less is to be corrected, an error collection code of 8 symbols (10 bytes) is the first individual area. 261 to the fourth
図4は、ホストシステム4側のアドレス空間(論理アドレス)とフラッシュメモリ2側のアドレス空間(物理アドレス)の対応関係を示す図である。
フラッシュメモリ2内の各物理ブロックには、物理ブロックアドレス(PBA)が割り当てられている。この物理ブロックアドレス(PBA)によりフラッシュメモリ2内の物理ブロックが特定される。複数の物理ブロックで構成されたフラッシュメモリ2内の記憶領域を複数のゾーンに分割して管理する場合には、複数の物理ブロックで物理ゾーンを構成して、各物理ゾーンに物理ゾーン番号(PZN)を割り当てる。この物理ゾーン番号(PZN)により物理ゾーンが特定される。また、各物理ゾーンに含まれる物理ブロックの、各物理ゾーン内での通番を物理ゾーン内ブロック番号(PZIBN)と呼んでいる。
FIG. 4 is a diagram showing the correspondence between the address space (logical address) on the
A physical block address (PBA) is assigned to each physical block in the
一方、ホストシステム4側のアドレス空間は、セクタ(512バイト)単位で分割した領域に付けた通番であるLBA(Logical Block Address)で管理されている。ホストシステム4は、このLBAでフラッシュメモリ2内のアクセス領域を指定する。
On the other hand, the address space on the
フラッシュメモリコントローラ3の内部では、複数のセクタをまとめたものを論理ブロックとして取り扱っている。各論理ブロックに対応するデータは、その論理ブロックに割り当てられた物理ブロックに書き込まれる。フラッシュメモリコントローラ3は、論理ブロックと物理ブロックとの対応関係を、冗長領域26に書き込まれている論理アドレス情報に基づいて判断する。
Inside the
この論理ブロックに付けられた通番を論理ブロック番号(LBN)と呼び、各論理ブロックに含まれるセクタの、各論理ブロック内での通番をセクタ番号(SN)と呼んでいる。 A serial number assigned to this logical block is called a logical block number (LBN), and a serial number in each logical block of sectors included in each logical block is called a sector number (SN).
本実施の形態では、256セクタをまとめたものを論理ブロックとしている。従って、LBAの下位8ビットがSNに対応し、下位8ビットを除いた上位ビット側がLBNに対応する。例えば、LBAが0〜255のセクタで構成された論理ブロックのLBNは0になり、LBAが256〜511のセクタで構成された論理ブロックのLBNは1になる。 In this embodiment, a combination of 256 sectors is used as a logical block. Therefore, the lower 8 bits of the LBA correspond to the SN, and the upper bit side excluding the lower 8 bits corresponds to the LBN. For example, the LBN of a logical block composed of sectors with an LBA of 0 to 255 is 0, and the LBN of a logical block composed of sectors with an LBA of 256 to 511 is 1.
LBAで特定されるセクタが、ページ0〜ページ63のいずれのページであるかは、LBAの下位側から数えて3ビット目から8ビット目の値に基づいて特定される。また、第1セクタ領域251〜第4セクタ領域254のいずれの領域であるかは、LBAの下位2ビット(LBAの下位側から数えて1ビット目と2ビット目)の値に基づいて特定される。例えば、LBAの下位8ビットの値が「00000100」〜「00000111」のセクタは、ページ1に対応する。また、LBAの下位2ビットの値が「00」のセクタは第1セクタ領域251に対応し、「01」のセクタは第2セクタ領域252に対応し、「10」のセクタは第3セクタ領域253に対応し、「11」のセクタは第4セクタ領域254に対応する。
Whether the sector specified by the LBA is any of
また、複数の論理ブロックをまとめたものを論理ゾーンと呼んでいる。そして、論理ゾーンに付けられた通番を論理ゾーン番号(LZN)と呼び、各論理ゾーンに含まれる論理ブロックの、各論理ゾーン内での通番を論理ゾーン内ブロック番号(LZIBN)と呼んでいる。従って、各論理ゾーンに含まれる論理ブロック数をkとした場合、LBNをkで割ったときの商がLZNに対応し、余りがLZIBNに対応する。 A group of a plurality of logical blocks is called a logical zone. A serial number assigned to the logical zone is called a logical zone number (LZN), and a serial number in each logical zone of a logical block included in each logical zone is called a logical zone block number (LZIBN). Therefore, when the number of logical blocks included in each logical zone is k, the quotient when LBN is divided by k corresponds to LZN, and the remainder corresponds to LZIBN.
また、各論理ゾーンにはそれぞれ1個の物理ゾーンが割り当てられ、論理ゾーンに含まれる各論理ブロックに対応するデータは、その論理ゾーンに割り当てられた物理ゾーンに含まれる物理ブロックに書き込まれる。従って、1個の論理ブロックに含まれるセクタ数は、1個の物理ブロックに含まれるセクタ領域の個数に応じて設定される。但し、1個の論理ブロックを複数個の物理ブロックに割り当てることもでき、その場合には、その複数個の物理ブロックを1個の物理ブロックとみなして1個の論理ブロックに含まれるセクタ数を設定する。 In addition, one physical zone is allocated to each logical zone, and data corresponding to each logical block included in the logical zone is written to a physical block included in the physical zone allocated to the logical zone. Therefore, the number of sectors included in one logical block is set according to the number of sector areas included in one physical block. However, one logical block can be assigned to a plurality of physical blocks. In this case, the plurality of physical blocks are regarded as one physical block, and the number of sectors included in one logical block is determined. Set.
図4に示した例では、1個の物理ブロックが64個のページを含み、1個のページが4個のセクタに対応するフラッシュメモリ、つまり1個の物理ブロックが256個のセクタ領域で構成されたフラッシュメモリを想定している。そのため、256セクタが1個の論理ブロックに対応している。従って、LBN#0〜#499の500個の論理ブロックで構成されたLZN#0の論理ゾーンは、LBA#0〜#127999の128000セクタの領域に対応している。以下同様に、LZN#1の論理ゾーンは、LBA#128000〜#255999の128000セクタの領域に対応し、LZN#2の論理ゾーンは、LBA#256000〜#383999の128000セクタの領域に対応し、・・・、LZN#7の論理ゾーンは、LBA#896000〜#1023999の128000セクタの領域に対応している。
In the example shown in FIG. 4, one physical block includes 64 pages, and one page is a flash memory corresponding to 4 sectors, that is, one physical block is composed of 256 sector areas. Assumed flash memory. Therefore, 256 sectors correspond to one logical block. Therefore, the logical zone of
また、LBN#0〜#499の500個の論理ブロックで構成されたLZN#0の論理ゾーンは、PBA#0〜#511の512個の物理ブロックで構成されたPZN#0の物理ゾーンに割り当てられている。以下同様に、LZN#1の論理ゾーンは、PZN#1の物理ゾーンに割り当てられ、LZN#2の論理ゾーンは、PZN#2の物理ゾーンに割り当てられ、・・・、LZN#7の論理ゾーンは、PZN#7の物理ゾーンに割り当てられている。ここで、物理ゾーンに含まれる物理ブロックの個数を、論理ゾーンに含まれる論理ブロックの個数より多くしているのは、同一の論理ブロックに対応する新データと旧データとが別々の物理ブロックに並存する場合や、データを正常に書き込むことができない不良ブロックが発生した場合等に対応するためである。
In addition, the logical zone of
また、本実施の形態では、各物理ブロックに、その物理ブロックに割り当てられた論理ブロックのデータがLBAの順番で書き込まれる。このため、物理ブロックと論理ブロックとの対応関係を管理することによって、ホストシステム4から与えられるLBAとフラッシュメモリ2内の記憶領域との対応関係を管理することができる。
In the present embodiment, data of logical blocks assigned to the physical block is written in each physical block in the LBA order. Therefore, by managing the correspondence between the physical block and the logical block, the correspondence between the LBA given from the
フラッシュメモリ2においては、データの消去がブロック単位で行われ、物理ブロックを構成しているページにデータを上書きすることができない。従って、物理ブロック内の一部のページに記憶されているデータを書き換える場合には、書き換え対象のページの書き換えデータと、その書き換え対象のページと同一の物理ブロックに含まれている書き換え対象でないページの記憶データが、消去済みの別の物理ブロックに書き込まれる。
In the
このようなデータの書き換えでは、書き換えられたデータは、以前に格納されていた物理ブロックとは異なる物理ブロックに書き込まれる。従って、データの書き換えが行われる毎に、論理ブロックと物理ブロックの対応関係が変化する。 In such data rewriting, the rewritten data is written in a physical block different from the physical block stored previously. Therefore, each time data is rewritten, the correspondence between the logical block and the physical block changes.
そこで、個々の時点における両者の対応関係を管理するためのアドレス変換テーブルが作成され、両者の対応関係が変化する毎に更新される。このアドレス変換テーブルにより、ホストシステム4側の論理アドレスと、フラッシュメモリ2内の物理アドレスと、の対応関係が管理される。なお、論理ゾーンと物理ゾーンとの対応関係は予め設定されており、アドレス変換テーブルは論理ゾーン毎に作成される。
Therefore, an address conversion table for managing the correspondence between the two at each time point is created and updated whenever the correspondence between the two changes. With this address conversion table, the correspondence between the logical address on the
アドレス変換テーブルは、物理ブロックの先頭ページの冗長領域26に書き込まれている論理アドレス情報(対応関係にある論理ブロックを示す情報)に基づいて作成される。論理アドレス情報としては、論理ブロック番号(LBN)等の論理ブロックを特定するための情報が用いられる。なお、論理ゾーンと物理ゾーンとの対応関係が予め設定されている場合には、論理ゾーン内ブロック番号(LZIBN)に基づいてアドレス変換テーブルを作成することができるので、LBNよりデータ量の少ないLZIBNを論理アドレス情報として用いることが好ましい。その場合、アドレス変換テーブルは、対応する論理ゾーンと物理ゾーンの組毎に、論理ゾーン内ブロック番号(LZIBN)と物理ゾーン内ブロック番号(PZIBN)との対応関係を記憶する。
The address conversion table is created based on logical address information (information indicating logical blocks having a correspondence relationship) written in the
なお、論理アドレス情報は、ユーザ領域25にデータが記憶されている物理ブロックに対応する論理ブロックを特定するための情報であるため、ユーザ領域25に有効なデータが格納されていない物理ブロックについては、論理アドレス情報は格納されていない。
The logical address information is information for specifying a logical block corresponding to a physical block in which data is stored in the
従って、冗長領域26に論理アドレス情報が格納されているか否かを判定することにより、その冗長領域26が含まれている物理ブロックに有効なデータが格納されているか否かを判断することができる。
Therefore, by determining whether or not logical address information is stored in the
また、物理ブロックの先頭ページの冗長領域26には、その物理ブロックが不良ブロックであるか否かを示すブロックステータスが格納されている。正常にデータの書き込み等を行うことができない物理ブロックは、不良ブロックと判別され、冗長領域26に不良ブロックである旨のブロックステータスが書き込まれる。
The
有効なデータが格納されていないブロックであって且つ不良ブロックでない物理ブロックは、データの書き込み先とすることができる。そこで、そのような物理ブロックを消去済みブロック(空きブロック)として管理するために、消去済みブロックテーブルが作成される。この消去済みブロックテーブルは、物理ブロックの先頭ページの冗長領域26に書き込まれている論理アドレス情報とブロックステータスに基づいて物理ゾーン毎に作成される。この消去済みブロックテーブルの例としては、消去済みブロックを特定できる情報(PBA、PZIBN等)を記述したテーブルが挙げられる。
A physical block that does not store valid data and is not a bad block can be a data write destination. In order to manage such physical blocks as erased blocks (empty blocks), an erased block table is created. This erased block table is created for each physical zone based on logical address information and block status written in the
フラッシュメモリ2に記憶されているデータを書き換えるときには、消去済みブロックテーブルから消去済みブロックを選択し、選択した消去済みブロックに、書き換えデータを書き込む。また、消去済みブロックにデータを書き込んだときや、物理ブロックに記憶されているデータを消去したときは、消去済みブロックテーブルを更新する。
When the data stored in the
次に、フラッシュメモリ2に対するアクセスを制御するフラッシュメモリコントローラ3について説明する。
フラッシュメモリコントローラ3は、フラッシュメモリ2にデータ、アドレス情報、内部コマンド等を供給することにより、読み出し処理、書き込み処理、ブロック消去処理、データ複写処理等の各処理を行う。
Next, the
The
ここで、内部コマンドとは、フラッシュメモリコントローラ3がフラッシュメモリ2に処理の実行を指示するためのコマンドであり、フラッシュメモリ2はフラッシュメモリコントローラ3から与えられる内部コマンドに従って動作する。これに対し、ホストシステム4からフラッシュメモリコントローラ3に与えられるコマンドを外部コマンドと言う。
Here, the internal command is a command for the
図1に示したように、フラッシュメモリコントローラ3は、マイクロプロセッサ6と、ホストインターフェースブロック7と、ワークエリア8と、バッファ9と、フラッシュメモリインターフェースブロック10と、ECC(エラー・コレクション・コード)ブロック11と、ROM(Read Only Memory)12と、を備えている。これら機能ブロックによって構成されるフラッシュメモリコントローラ3は、一つの半導体チップ上に集積される。以下に各機能ブロックについて説明する。
As shown in FIG. 1, the
マイクロプロセッサ6は、ROM12に記憶されているプログラムに従って、フラッシュメモリコントローラ3を構成する各機能ブロックの動作を制御することにより、フラッシュメモリコントローラ3の全体の動作を制御する。
The
ホストインターフェースブロック7は、ホストシステム4との間で、外部バス13を介し、データ、アドレス情報、外部コマンド等の授受を行う。ホストシステム4からフラッシュメモリシステム1に供給されるデータ等は、ホストインターフェースブロック7を入口としてフラッシュメモリシステム1の内部(例えばバッファ9)に取り込まれる。また、フラッシュメモリシステム1からホストシステム4に供給されるデータ等は、ホストインターフェースブロック7を出口としてホストシステム4に供給される。
The
ワークエリア8は、マイクロプロセッサ6によるフラッシュメモリ2の制御に必要なデータが一時的に格納される作業領域であり、複数のSRAM(Static Random Access Memory)セルによって構成される。ワークエリア8には、例えば、上述のアドレス変換テーブル、消去済みブロックテーブル等が記憶される。
The
バッファ9は、フラッシュメモリ2から読み出されたデータ及びフラッシュメモリ2に書き込まれるデータを一時的に蓄積する。即ち、フラッシュメモリ2から読み出されたデータは、ホストシステム4が受け取り可能な状態となるまでバッファ9に保持される。また、フラッシュメモリ2に書き込まれるデータは、フラッシュメモリ2が書き込み可能な状態となるまでバッファ9に保持される。
The
フラッシュメモリインターフェースブロック10は、マイクロプロセッサ6によってROM12から読み出される各種処理を定義したコマンドセット(以下、シーケンスコマンドと言う)に従って、データの読み出しや書き込み等の各種処理を実行する。具体的には、フラッシュメモリインターフェースブロック10は、シーケンスコマンドに従って、フラッシュメモリ2のデータ入出力バスに対してデータ、アドレス情報、ステータス情報、内部コマンド等を入出力する。
The flash
ここで、フラッシュメモリ2は、コマンドラッチイネーブル(CLE)、アドレスラッチイネーブル(ALE)、ライトイネーブル(WE)、リードイネーブル(RE)等の制御信号端子を備えている。これらの制御信号端子とデータ入出力バスは内部バス14を介してフラッシュメモリコントローラ3に接続されている。コマンドラッチイネーブル(CLE)とアドレスラッチイネーブル(ALE)の制御信号端子に与えられる信号の信号レベルにより、データ入出力バスに供給される情報の種別が指定される。又、ライトイネーブル(WE)の制御信号端子に与えられる信号の信号レベルが遷移するタイミングでデータ、アドレス情報、内部コマンド等の情報がフラッシュメモリ2に取り込まれ、リードイネーブル(RE)の制御信号端子に与えられる信号の信号レベルが遷移するタイミングでデータ等の情報がフラッシュメモリ2から出力される。
Here, the
ECCブロック11は、フラッシュメモリ2に書き込むデータに付加されるエラーコレクションコード(ECC)を生成するとともに、読み出しデータに付加されているエラーコレクションコードに基づいて、読み出したデータに含まれる誤りを検出・訂正する。なお、本実施の形態では、エラーコレクションコード(ECC)として、リードソロモン符号を使用し、10ビットを1シンボルとして、シンボル単位でエラーを訂正するものとする。
The
ROM12は、不揮発性の記憶素子であり、フラッシュメモリコントローラ3の全体の動作を制御するプログラム、上述のシーケンスコマンド等を記憶している。
The
図5は、ホストインターフェースブロック7及びフラッシュメモリインターフェースブロック10の構成を示すブロック図である。ホストインターフェースブロック7は、コマンドレジスタR1、セクタ数レジスタR2、LBAレジスタR3等を備えている。また、フラッシュメモリインターフェースブロック10は、物理ブロックアドレスレジスタR11、セクタ番号レジスタR12、カウンタR13等を備えている。更に、フラッシュメモリインターフェースブロック10は、後述する訂正データレジスタ(図8参照)を備えている。
FIG. 5 is a block diagram showing the configuration of the
コマンドレジスタR1、セクタ数レジスタR2及びLBAレジスタR3には、ホストシステム4から与えられる情報が書き込まれる。コマンドレジスタR1には、書き込みコマンド、読み出しコマンド等の外部コマンドが書き込まれる。セクタ数レジスタR2にはアクセス対象領域のセクタ数が書き込まれる。LBAレジスタR3には、アクセス対象領域の先頭のLBAが書き込まれる。
Information given from the
物理ブロックアドレスレジスタR11、セクタ番号レジスタR12及びカウンタR13には、ホストインターフェースブロック7のセクタ数レジスタR2及びLBAレジスタR3に書き込まれた情報に基づいて、フラッシュメモリ2内のアクセス対象領域を指示する情報が書き込まれる。
つまり、セクタ数レジスタR2及びLBAレジスタR3に書き込まれた情報に基づいて特定されるLBAの範囲が複数の論理ブロックに跨っていない場合、そのLBAの範囲が含まれる論理ブロックと対応関係にある物理ブロック(消去済みブロックにデータを書き込む場合は消去済みブロック検索用テーブルを用いて選択した消去済みブロック)の物理ブロックアドレス(PBA)が物理ブロックアドレスレジスタR11に設定される。更に、そのLBAの範囲に含まれる先頭セクタのセクタ番号(SN)がセクタ番号レジスタR12に設定され、そのLBAの範囲に含まれセクタの数がカウンタR13に設定される。
In the physical block address register R11, the sector number register R12, and the counter R13, information that indicates an access target area in the
That is, when the LBA range specified based on the information written in the sector number register R2 and the LBA register R3 does not extend over a plurality of logical blocks, the physical relationship corresponding to the logical block including the LBA range is included. The physical block address (PBA) of the block (the erased block selected using the erased block search table when data is written in the erased block) is set in the physical block address register R11. Further, the sector number (SN) of the head sector included in the LBA range is set in the sector number register R12, and the number of sectors included in the LBA range is set in the counter R13.
尚、セクタ数レジスタR2及びLBAレジスタR3に書き込まれた情報に基づいて特定されるLBAの範囲が複数の論理ブロックに跨っている場合は、論理ブロック毎に上記の設定が行われる。 If the LBA range specified based on the information written in the sector number register R2 and the LBA register R3 extends over a plurality of logical blocks, the above setting is performed for each logical block.
読み出し、書き込み等の動作では、物理ブロックアドレスレジスタR11及びセクタ番号レジスタR12に設定された情報に基づいて、フラッシュメモリ2に与えられるロウアドレス及びカラムアドレスが生成される。この読み出し、書き込み等の動作で1セクタ分のユーザデータ及び付加データがフラッシュメモリ2に入力又はフラッシュメモリ2から出力される毎にセクタ番号レジスタR12に設定されている値がインクリメント(1ずつ増加)され、カウンタR13に設定されている値がデクリメント(1ずつ減少)される。このセクタ番号レジスタR12に設定されている値のインクリメントとカウンタR13に設定されている値のデクリメントは、カウンタR13の設定値が0になるまで繰り返される。従って、セクタ番号レジスタR12に初期設定されたSNに基づいて特定されるページ内のセクタ領域から、カウンタR13に初期設定されたセクタ数分の領域が読み出し又は書き込みの対象となる。
In operations such as reading and writing, a row address and a column address given to the
本実施の形態のように、1個のページが4個のセクタ領域で構成され、1個の物理ブロックが64個のページで構成されている場合には、セクタ番号レジスタR12に、8ビットのSN(0〜255)が設定される。フラッシュメモリ2に与えるロウアドレスは、物理ブロックアドレスレジスタR11に設定されているPBAの下位側にセクタ番号レジスタR12に設定されているSNの上位6ビットを連結することにより求めることができる。一方、フラッシュメモリ2に与えるカラムアドレスはSNの下位2ビットに基づいて求めることができる。つまり、SNの下位2ビットに基づいて第1セクタ領域251〜第4セクタ領域254のいずれかのセクタ領域が特定され、第1セクタ領域251〜第4セクタ領域254のカラムアドレスは予め設定されているので、SNの下位2ビットに基づいてフラッシュメモリ2に与えるカラムアドレスを求めることができる。
As in this embodiment, when one page is composed of four sector areas and one physical block is composed of 64 pages, the sector number register R12 has an 8-bit value. SN (0-255) is set. The row address to be given to the
次に、図6を参照して、1個のページに記憶されている4セクタのデータを、フラッシュメモリコントローラ3内のバッファ9を介して、異なる物理ブロック内のページ、又は同じ物理ブロック内の異なるページに転送(複写)する従来の転送処理について説明する。尚、転送元のページに記憶されているデータを読み出す処理は図6(a)を参照し、転送先のページにデータを書き込む処理は図6(b)を参照して説明する。又、説明を簡略化するため、フラッシュメモリ2から読み出されたデータには訂正不能な誤り(5シンボル以上の誤り)は含まれていないものとする。
Next, referring to FIG. 6, the data of 4 sectors stored in one page is transferred to a page in a different physical block or a same physical block via a
この転送処理では、まず、転送元のページからデータを読み出すための情報が物理ブロックアドレスレジスタR11、セクタ番号レジスタR12及びカウンタR13に設定される。つまり、物理ブロックアドレスレジスタR11には、転送元のページが含まれる物理ブロックの物理ブロックアドレス(PBA)が設定される。セクタ番号レジスタR12は、転送元のページ内の第1セクタ領域251に対応するセクタ番号(SN)が設定される。カウンタR13には、1個のページに含まれるセクタ領域の数である4が設定される。
In this transfer process, first, information for reading data from the transfer source page is set in the physical block address register R11, the sector number register R12, and the counter R13. That is, the physical block address (PBA) of the physical block including the transfer source page is set in the physical block address register R11. In the sector number register R12, a sector number (SN) corresponding to the
これらの設定に基づいて、読み出しコマンド、ロウアドレス(転送元のページに対応するロウアドレス)及びカラムアドレス(第1セクタ領域251に対応するカラムアドレス)がフラッシュメモリ2に与えられる(フラッシュメモリ2のデータ入出力バスに入力される)。これに応答して、ロウアドレスに対応するページに記憶されているデータが、メモリセルアレイ21からページレジスタ22に読み出される(複写される)。ページレジスタ22に読み出されたデータは、リードイネーブル(RE)端子に与えられる信号の信号レベルがハイからローに遷移するタイミングでデータ入出力バスから順次出力される。データ入出力バスに出力されるデータのカラムアドレスは、フラッシュメモリ2に与えたカラムアドレスから始まって、順次カウントアップされていく。
Based on these settings, a read command, a row address (a row address corresponding to the transfer source page), and a column address (a column address corresponding to the first sector area 251) are given to the flash memory 2 (of the flash memory 2). Input to the data input / output bus). In response to this, the data stored in the page corresponding to the row address is read (copied) from the
ページレジスタ22からは、第1セクタ領域251に記憶されているデータ、第1個別領域261に記憶されているエラーコレクションコード、第2セクタ領域252に記憶されているデータ、第2個別領域262に記憶されているエラーコレクションコード、第3セクタ領域253に記憶されているデータ、第3個別領域263に記憶されているエラーコレクションコード、第4セクタ領域254に記憶されているデータ、第4個別領域264に記憶されているエラーコレクションコードの順番でデータとエラーコレクションコードが読み出される。
From the
第1セクタ領域251に記憶されているデータを読み出した後に、第1個別領域261に記憶されているエラーコレクションコードを読み出すときは、ランダムデータ出力コマンドとカラムアドレス(第1個別領域261に対応するカラムアドレス)がフラッシュメモリ2に与えられる(フラッシュメモリ2のデータ入出力バスに入力される)。第2セクタ領域252に記憶されているデータ、第2個別領域262に記憶されているエラーコレクションコード、第3セクタ領域253に記憶されているデータ、第3個別領域263に記憶されているエラーコレクションコード、第4セクタ領域254に記憶されているデータ、第4個別領域264に記憶されているエラーコレクションコードを読み出すときも、同様に、ランダムデータ出力コマンドとカラムアドレス(それぞれの領域に対応するカラムアドレス)がフラッシュメモリ2に与えられる(フラッシュメモリ2のデータ入出力バスに入力される)。
When reading the error correction code stored in the first
第1セクタ領域251、第2セクタ領域252、第3セクタ領域253及び第4セクタ領域254から読み出されたデータは、バッファ9とECCブロック11の双方に入力される。第1個別領域261、第2個別領域262、第3個別領域263及び第4個別領域264から読み出されたエラーコレクションコードはECCブロック11に入力される。
Data read from the
第1セクタ領域251から読み出されたデータは、バッファ9の第1バッファ領域91に保持され、第2セクタ領域252から読み出されたデータは、バッファ9の第2バッファ領域92に保持され、第3セクタ領域253から読み出されたデータは、バッファ9の第3バッファ領域93に保持され、第4セクタ領域254から読み出されたデータは、バッファ9の第4バッファ領域94に保持される。
Data read from the
ECCブロック11は、第1セクタ領域251から読み出されたデータと第1個別領域261から読み出されたエラーコレクションコードに基づいて、第1セクタ領域251から読み出されたデータに含まれる誤りの検出を行い、誤りが検出された場合は、バッファ9の第1バッファ領域91に保持されているデータに対して誤りの訂正を行う。同様に、第2セクタ領域252、第3セクタ領域253及び第4セクタ領域254から読み出されたデータと第2個別領域262、第3個別領域263及び第4個別領域264から読み出されたエラーコレクションコードに基づいて、各データに含まれる誤りの検出を行い、誤りが検出された場合は、バッファ9の第2バッファ領域92〜第4バッファ領域94に保持されているデータに対して誤りの訂正を行う。
The
次に、転送先のページにデータを書き込むための情報が物理ブロックアドレスレジスタR11、セクタ番号レジスタR12及びカウンタR13に設定される。つまり、物理ブロックアドレスレジスタR11には、転送先のページが含まれる物理ブロックの物理ブロックアドレス(PBA)が設定される。セクタ番号レジスタR12は、転送先のページ内の第1セクタ領域251に対応するセクタ番号(SN)が設定される。カウンタR13には、1個のページに含まれるセクタ領域の数である4が設定される。
Next, information for writing data to the transfer destination page is set in the physical block address register R11, the sector number register R12, and the counter R13. That is, the physical block address (PBA) of the physical block including the transfer destination page is set in the physical block address register R11. In the sector number register R12, a sector number (SN) corresponding to the
これらの設定に基づいて、データ入力コマンド、ロウアドレス(転送先のページに対応するロウアドレス)及びカラムアドレス(第1セクタ領域251に対応するカラムアドレス)が、フラッシュメモリ2に与えられる(フラッシュメモリ2のデータ入出力バスに入力される)。 Based on these settings, a data input command, a row address (a row address corresponding to the transfer destination page), and a column address (a column address corresponding to the first sector area 251) are given to the flash memory 2 (flash memory). 2 input / output bus).
続いて、バッファ9の第1バッファ領域91に保持されている1セクタ(512バイト)のデータが、バッファ9から順次出力される。バッファ9から出力されたデータはフラッシュメモリ2のデータ入出力バスに入力されると共に、ECCブロック11にも入力される。バッファ9の第1バッファ領域91に保持されている1セクタ(512バイト)のデータがフラッシュメモリ2のデータ入出力バスに入力された後に、ランダムデータ入力コマンドとカラムアドレス(第1個別領域261に対応するカラムアドレス)がフラッシュメモリ2に与えられる(フラッシュメモリ2のデータ入出力バスに入力される)。更に、ECCブロックから出力されるエラーコレクションコード(バッファ9の第1バッファ領域91に保持されている1セクタ(512バイト)のデータに基づいて生成されたエラーコレクションコード)がフラッシュメモリ2のデータ入出力バスに入力される。
Subsequently, data of one sector (512 bytes) held in the
以下同様にして、ランダムデータ入力コマンド及びカラムアドレスと共に、バッファ9の第2バッファ領域92、第3バッファ領域93及び第4バッファ領域94に保持されているデータと、これらのデータに対応するエラーコレクションコード(ECCブロック11で生成されたエラーコレクションコード)がフラッシュメモリ2のデータ入出力バスに入力される。以上のようにして、データ入出力バスに入力されたデータとエラーコレクションコードはページレジスタ22に保持される。
In the same manner, the data held in the
バッファ9の第1バッファ領域91、第2バッファ領域92、第3バッファ領域93及び第4バッファ領域94に保持されているデータと、これらのデータに対応するエラーコレクションコード(ECCブロック11で生成されたエラーコレクションコード)がフラッシュメモリ2のデータ入出力バスに入力された後に、書き込みコマンドがフラッシュメモリ2に与えられる(フラッシュメモリ2のデータ入出力バスに入力される)。
Data held in the
この書き込みコマンドに応答して、ページレジスタ22に保持されているデータが、メモリセルアレイ21内の転送先のページに書き込まれる(複写される)。
In response to this write command, the data held in the
尚、ECCブロック11は、入力された1バイト(8ビット)単位のデータとエラーコレクションコードを10ビット単位のシンボルに変換して処理する。一方、エラーコレクションコードを出力するときは、10ビットのシンボルを1バイト(8ビット)単位の情報に変換して出力する。尚、1セクタのデータは、末尾に予め設定されている4ビットのダミーデータを付加することにより、410個のシンボルに変換される。一方、ECCブロック11で生成された8シンボルのエラーコレクションコードは、10バイトの情報に変換される。又、ECCブロック11は、記憶データが消去された物理ブロックにおけるデータとエラーコレクションコードの不整合を解消するため、生成した8シンボルのエラーコレクションコードに対してマスク処理を施している。このマスク処理では、1セクタのデータに含まれる全てのビットの論理値が1(消去状態の論理値)のときに、このデータに対する8シンボルのエラーコレクションコードに含まれる全てのビットの論理値が1(消去状態の論理値)になるような変換が行われる。つまり、1セクタのデータに含まれる全てのビットの論理値が1(消去状態の論理値)のときに、生成された8シンボルのエラーコレクションコードには論理値が0のビットが含まれているが、マスク処理が施された後は、全てのビットの論理値が1(消去状態の論理値)になる。一方、フラッシュメモリ2の冗長領域26から読み出され、ECCブロック11に入力されたエラーコレクションコードに対しては、生成時に施したマスク処理を解除するための処理が施される。
The
次に、本発明に係る転送処理を、図7を参照して説明する。この転送処理では、1個のページに記憶されている4セクタのデータが、異なる物理ブロック内のページ、又は同じ物理ブロック内の異なるページに転送(複写)される。尚、転送元のページに記憶されているデータを読み出す処理は図7(a)を参照し、転送先のページにデータを書き込む処理は図7(b)を参照して説明する。又、説明を簡略化するため、フラッシュメモリ2から読み出されたデータには訂正不能な誤り(5シンボル以上の誤り)は含まれていないものとする。
Next, transfer processing according to the present invention will be described with reference to FIG. In this transfer process, data of four sectors stored in one page is transferred (copied) to a page in a different physical block or a different page in the same physical block. The process of reading data stored in the transfer source page will be described with reference to FIG. 7A, and the process of writing data to the transfer destination page will be described with reference to FIG. 7B. For simplicity of explanation, it is assumed that the data read from the
従来の転送処理の場合と同様に、転送元のページからデータを読み出すための情報が物理ブロックアドレスレジスタR11、セクタ番号レジスタR12及びカウンタR13に設定される。つまり、物理ブロックアドレスレジスタR11には、転送元のページが含まれる物理ブロックの物理ブロックアドレス(PBA)が設定される。セクタ番号レジスタR12は、転送元のページ内の第1セクタ領域251に対応するセクタ番号(SN)が設定される。カウンタR13には、1個のページに含まれるセクタ領域の数である4が設定される。
As in the conventional transfer process, information for reading data from the transfer source page is set in the physical block address register R11, the sector number register R12, and the counter R13. That is, the physical block address (PBA) of the physical block including the transfer source page is set in the physical block address register R11. In the sector number register R12, a sector number (SN) corresponding to the
これらの設定に基づいて、読み出しコマンド、ロウアドレス(転送元のページに対応するロウアドレス)及びカラムアドレス(第1セクタ領域251に対応するカラムアドレス)がフラッシュメモリ2に与えられる(フラッシュメモリ2のデータ入出力バスに入力される)。これ応答して、ロウアドレスに対応するページに記憶されているデータが、メモリセルアレイ21からページレジスタ22に読み出される(複写される)。ページレジスタ22に読み出されたデータは、リードイネーブル(RE)端子に与えられる信号の信号レベルがハイからローに遷移するタイミングでデータ入出力バスから順次出力される。データ入出力バスに出力されるデータのカラムアドレスは、フラッシュメモリ2に与えたカラムアドレスから始まって、順次カウントアップされていく。
Based on these settings, a read command, a row address (a row address corresponding to the transfer source page), and a column address (a column address corresponding to the first sector area 251) are given to the flash memory 2 (of the flash memory 2). Input to the data input / output bus). In response, the data stored in the page corresponding to the row address is read (copied) from the
ここでフラッシュメモリ2に与える読み出しコマンドは、コピーバック用の読み出しコマンドであっても、通常の読み出しコマンドであってもよいが、コピーバック用の読み出しコマンドの方が好ましい。但し、通常の読み出しコマンドでなければ、ページレジスタ22に読み出されたデータを、データ入出力バスを介して出力させることができない仕様のフラッシュメモリの場合は、通常の読み出しコマンドを用いる。
Here, the read command given to the
ページレジスタ22からは、第1セクタ領域251に記憶されているデータ、第1個別領域261に記憶されているエラーコレクションコード、第2セクタ領域252に記憶されているデータ、第2個別領域262に記憶されているエラーコレクションコード、第3セクタ領域253に記憶されているデータ、第3個別領域263に記憶されているエラーコレクションコード、第4セクタ領域254に記憶されているデータ、第4個別領域264に記憶されているエラーコレクションコードの順番でデータとエラーコレクションコードが読み出される。
From the
第1セクタ領域251に記憶されているデータを読み出した後に、第1個別領域261に記憶されているエラーコレクションコードを読み出すときは、ランダムデータ出力コマンドとカラムアドレス(第1個別領域261に対応するカラムアドレス)がフラッシュメモリ2に与えられる(フラッシュメモリ2のデータ入出力バスに入力される)。第2セクタ領域252に記憶されているデータ、第2個別領域262に記憶されているエラーコレクションコード、第3セクタ領域253に記憶されているデータ、第3個別領域263に記憶されているエラーコレクションコード、第4セクタ領域254に記憶されているデータ、第4個別領域264に記憶されているエラーコレクションコードを読み出すときも、同様に、ランダムデータ出力コマンドとカラムアドレス(それぞれの領域に対応するカラムアドレス)がフラッシュメモリ2に与えられる(フラッシュメモリ2のデータ入出力バスに入力される)。
When reading the error correction code stored in the first
第1セクタ領域251、第2セクタ領域252、第3セクタ領域253及び第4セクタ領域254から読み出されたデータは、バッファ9とECCブロック11の双方に入力される。第1個別領域261、第2個別領域262、第3個別領域263及び第4個別領域264から読み出されたエラーコレクションコードはECCブロック11に入力される。
Data read from the
ECCブロック11は、第1セクタ領域251から読み出されたデータと第1個別領域261から読み出されたエラーコレクションコードに基づいて、第1セクタ領域251から読み出されたデータに含まれる誤りの検出を行う。誤りが検出された場合は、バッファ9に保持されている第1セクタ領域251から読み出されたデータに対する誤りの訂正を行う。更に、訂正されたビットを含むバイト単位の訂正データと、この訂正データに対応するカラムアドレスが訂正レジスタR20に書き込まれる。
The
例えば、第1セクタ領域251から読み出された512バイトのデータ(カラムアドレスが0〜511のデータ)の先頭から15バイト目のデータに含まれる一部のビットが訂正された場合は、15バイト目のデータ(訂正後のデータ)が訂正データとして訂正レジスタR20に書き込まれる。訂正レジスタR20には、この訂正データと共に訂正データのカラムアドレスとして14が書き込まれる。 For example, if some of the bits included in the 15th byte data from the beginning of the 512-byte data read from the first sector area 251 (data having a column address of 0 to 511) are corrected, 15 bytes The eye data (corrected data) is written as correction data in the correction register R20. 14 is written in the correction register R20 as the column address of the correction data together with the correction data.
第1セクタ領域251から読み出されたデータに対応する訂正データと、そのカラムアドレスが訂正レジスタR20に書き込まれ後に、第2セクタ領域252から読み出されたデータに含まれる誤りの検出が行われる。この誤りの検出は、第2セクタ領域252から読み出されたデータと第2個別領域262から読み出されたエラーコレクションコードに基づいて行われる。誤りが検出された場合は、バッファ9に保持されている第2セクタ領域252から読み出されたデータに対する誤りの訂正が行われる。更に、訂正されたビットを含むバイト単位の訂正データと、この訂正データに対応するカラムアドレスが訂正レジスタR20に書き込まれる。
After the correction data corresponding to the data read from the
尚、第2セクタ領域252から読み出された512バイトのデータのカラムアドレスは、512〜1023に対応している。従って、第2セクタ領域252から読み出されたデータの先頭から15バイト目のデータが訂正データとして訂正レジスタR20に書き込まれた場合、訂正レジスタR20には、この訂正データのカラムアドレスとして526が書き込まれる。
The column address of 512-byte data read from the
以下同様に、第3セクタ領域253及び第4セクタ領域254から読み出されたデータに誤りが含まれていた場合は、訂正データと、そのカラムアドレスが訂正レジスタR20に書き込まれる。又、第3セクタ領域253から読み出された512バイトのデータのカラムアドレスは、1024〜1535に対応し、第4セクタ領域254から読み出された512バイトのデータのカラムアドレスは、1536〜2047に対応している。又、冗長領域26(第1個別領域261〜第4個別領域264)から読み出されたエラーコレクションコードに含まれる誤りが検出された場合も、それに対応する訂正データと、そのカラムアドレスが訂正レジスタR20に書き込まれる。
Similarly, when an error is included in the data read from the
尚、本発明に係る転送処理では、従来の転送処理のように、第1セクタ領域251、第2セクタ領域252、第3セクタ領域253及び第4セクタ領域254の各領域から読み出したデータを、バッファ9内の異なる領域(例えば、第1バッファ領域91〜第4バッファ領域94)に保持しておく必要はなく、バッファ9内の同じ領域に、第1セクタ領域251、第2セクタ領域252、第3セクタ領域253及び第4セクタ領域254の各領域から読み出したデータを、順次上書きしていってもよい。
In the transfer process according to the present invention, data read from each of the
上述のようにして訂正レジスタR20に訂正データとそのカラムアドレスが書き込まれた後に、転送先のページへのデータの書き込みが開始される。尚、転送元のページからデータを読み出すときに、コピーバック用の読み出しコマンドではなく、通常の読み出しコマンドでデータを読み出した場合は、以下の処理を開始する前に、コピーバック用の読み出しコマンドにより、転送元のページに記憶されているデータをメモリセルアレイ21からページレジスタ22に読み出しておかなければならない。
After the correction data and its column address are written in the correction register R20 as described above, the writing of data to the transfer destination page is started. When reading data from the transfer source page, if the data is read using a normal read command instead of a copyback read command, the copyback read command should be used before starting the following processing. The data stored in the transfer source page must be read from the
次に、転送先のページにデータを書き込むための情報が物理ブロックアドレスレジスタR11、セクタ番号レジスタR12に設定される。つまり、物理ブロックアドレスレジスタR11には、転送先のページが含まれる物理ブロックの物理ブロックアドレス(PBA)が設定される。セクタ番号レジスタR12は、転送先のページ内の第1セクタ領域251に対応するセクタ番号(SN)が設定される。
Next, information for writing data to the transfer destination page is set in the physical block address register R11 and the sector number register R12. That is, the physical block address (PBA) of the physical block including the transfer destination page is set in the physical block address register R11. In the sector number register R12, a sector number (SN) corresponding to the
物理ブロックアドレスレジスタR11及びセクタ番号レジスタR12に設定されている情報、並びに訂正レジスタR20に書き込まれている訂正データのカラムアドレスに基づいてコピーバック書き込みするためのデータ入力コマンド、ロウアドレス(転送先のページに対応するロウアドレス)及びカラムアドレス(訂正レジスタR20に書き込まれている先頭の訂正データの書き込み先に対応するカラムアドレス)が、フラッシュメモリ2に与えられる(フラッシュメモリ2のデータ入出力バスに入力される)。続いて、訂正レジスタR20に書き込まれている先頭の訂正データがフラッシュメモリ2のデータ入出力バスに入力される。
Based on the information set in the physical block address register R11 and the sector number register R12 and the column address of the correction data written in the correction register R20, a data input command for copyback writing, a row address (transfer destination A row address corresponding to a page) and a column address (a column address corresponding to a write destination of the first correction data written in the correction register R20) are given to the flash memory 2 (to the data input / output bus of the flash memory 2). Entered). Subsequently, the first correction data written in the correction register R 20 is input to the data input / output bus of the
この後、ランダムデータ入力コマンドと共に、訂正レジスタR20に書き込まれている2番目以降の訂正データとそのカラムアドレスがフラッシュメモリ2のデータ入出力バスに順次入力される。この処理により、ページレジスタ22に保持されている転送元のデータの一部が訂正レジスタR20に保持されている訂正データによって置き換えられる。この置き換えにより、ページレジスタ22に保持されている転送元のデータに含まれる誤りが訂正される。
Thereafter, the second and subsequent correction data written in the correction register R20 and the column address thereof are sequentially input to the data input / output bus of the
訂正レジスタR20に書き込まれている全ての訂正データがフラッシュメモリ2のデータ入出力バスに入力された後に、コピーバック書き込みするための書き込みコマンドがフラッシュメモリ2のデータ入出力バスに入力される。この書き込みコマンドに応答して、ページレジスタ22に保持されている転送元のデータが、メモリセルアレイ21内の転送先のページに書き込まれる(複写される)。
After all the correction data written in the correction register R20 is input to the data input / output bus of the
次に、訂正レジスタR20に書き込まれている訂正データで、ページレジスタ22に保持されているデータの一部を置き換える処理を詳細に説明する。訂正レジスタR20には、ページレジスタ22に保持されている転送元のデータを訂正するための訂正データと、この訂正データに対応するカラムアドレスが書き込まれている。つまり、訂正レジスタR20には、ページレジスタ22のカラムアドレス単位の訂正データが書き込まれている。従って、図2に示したように、1個のページが2048バイトのユーザ領域25と64バイトの冗長領域26で構成されているデータ入出力バスが8ビットのフラッシュメモリ2の場合、訂正レジスタR20には、8ビット単位で訂正データが書き込まれ、書き込まれた各訂正データのカラムアドレスは0〜2111のいずれかに対応する。
Next, a process for replacing a part of the data held in the
図8は、訂正レジスタR20に書き込まれている訂正データ(訂正データ#0〜訂正データ#n−1)及びカラムアドレス(カラムアドレス#0〜カラムアドレスn−1)と、フラッシュメモリ2のデータ入出力バスに入力されるカラムアドレス及び訂正データの対応関係を示している。ここで、訂正データ#0〜訂正データ#n−1は、ページレジスタ22に保持されているデータに上書きされる1バイト(8ビット)のデータである。訂正データ#0〜訂正データ#n−1が上書きされるページレジスタ22内の位置は、カラムアドレス#0〜カラムアドレスn−1によって特定される。図8に示した例では、訂正データ#0にはカラムアドレス#0が対応し、訂正データ#1にはカラムアドレス#1が対応し、以下同様に、訂正データ#n−1にはカラムアドレスn−1が対応している。
FIG. 8 shows correction data (
次に、フラッシュメモリ2のデータ入出力バスに入力されるカラムアドレス及び訂正データについて説明する。最初の訂正データ(訂正データ#0)を入力するときは、データ入力コマンド(In−cmd)、カラムアドレス(C−add)、ロウアドレス(R−add)及び訂正データ(Data)がこの順番でデータ入出力バスに入力される。ページレジスタ22に保持されているデータの書き込み先のページ(転送先のページ)は、ここで与えるカラムアドレス(C−add)により特定される。この後の訂正データ(訂正データ#1〜訂正データ#n−1)を入力するときは、ランダムデータ入力コマンド(In−cmd’)、カラムアドレス(C−add)、ロウアドレス(R−add)及び訂正データ(Data)がこの順番でデータ入出力バスに入力される。
Next, the column address and correction data input to the data input / output bus of the
図8に示したステップ#0では、カラムアドレス(C−add)としてカラムアドレス#0が入力され、訂正データ(Data)として訂正データ#0が入力される。ステップ#1では、カラムアドレス(C−add)としてカラムアドレス#1が入力され、訂正データ(Data)として訂正データ#1が入力される。例えば、カラムアドレス#0が256で、カラムアドレス#1が511の場合、カラムアドレスが256の1バイトのデータが訂正データ#0で置き換えられ、カラムアドレスが511の1バイトのデータが訂正データ#0で置き換えられる。
In
以下同様に、訂正レジスタR20に書き込まれている訂正データとカラムアドレスが入力され、ステップ#n−1では、カラムアドレス(C−add)としてカラムアドレス#n−1が入力され、訂正データ(Data)として訂正データ#n−1が入力される。ステップ#n−1では、更に、書き込みコマンド(P−cmd)が入力され、この書き込みコマンド(P−cmd)に応答して、ページレジスタ22に保持されているデータが、ステップ#0で入力されたロウアドレス(R−add)に対応するメモリセルアレイ21内のページに書き込まれる(複写される)。
Similarly, the correction data and the column address written in the correction register R20 are input. In step # n-1, the column address # n-1 is input as the column address (C-add), and the correction data (Data ) Is input correction data # n-1. In step # n-1, a write command (P-cmd) is further input. In response to the write command (P-cmd), the data held in the
上述のように、図8に示した例では、ページレジスタ22に保持されている2112バイトのデータのうちのnバイトのデータが、訂正レジスタR20に書き込まれている訂正データ#0〜訂正データ#n−1で置き換えられた後に、転送先のページに書き込まれる。つまり、この処理では、n個の訂正データ(nバイトの訂正データ)をフラッシュメモリ2に転送することにより、ページレジスタ22に保持されている2112バイトのデータに含まれる誤りが訂正される。ここで、ページレジスタ22に保持されている2112バイトのデータは、転送元のページに記憶されているデータなので、実質的には、n個の訂正データ(nバイトの訂正データ)により転送元のページに記憶されているデータに含まれる誤りが訂正されたことになる。
As described above, in the example illustrated in FIG. 8, n bytes of the 2112 bytes of data held in the
以上に説明したように、本発明に係る転送処理では、転送元のページから読み出されたデータはページレジスタ22に保持され、このデータに誤りがあるときは、ページレジスタ22に保持されているこのデータの一部(誤り部分)がメモリコントローラ側から与える訂正データで置き換えられ、この置き換えにより誤りが訂正されたデータが転送先のページに書き込まれる。従って、メモリコントローラ側から訂正データだけを与えることにより、転送元のページが記憶されているデータの誤りを訂正することができる。
As described above, in the transfer process according to the present invention, the data read from the transfer source page is held in the
尚、上記実施の形態においては、エラーコレクションコードとしてリードソロモン符号を使用したが、エラーコレクションコードはBCH符号、ハミング符号等の他の符号化方式のエラーコレクションコードであってもよい。他の符号化方式のエラーコレクションコードの場合であっても、訂正されるビットを含むカラムアドレス単位(例えば、1バイト単位)の訂正データとそのカラムアドレスを訂正レジスタR20に書き込むようにすれば同様に実施することができる。 In the above embodiment, the Reed-Solomon code is used as the error collection code. However, the error collection code may be an error collection code of another encoding method such as a BCH code or a Hamming code. Even in the case of error correction codes of other encoding methods, the same applies if correction data in column address units (for example, in units of 1 byte) including the bits to be corrected and their column addresses are written in the correction register R20. Can be implemented.
1 フラッシュメモリシステム
2 フラッシュメモリ
3 フラッシュメモリコントローラ
4 ホストシステム
6 マイクロプロセッサ
7 ホストインターフェースブロック
8 ワークエリア
9 バッファ
10 フラッシュメモリインタフェースブロック
11 ECCブロック
21 メモリセルアレイ
22 ページレジスタ
1
Claims (5)
前記第1のページに記憶されているデータを、前記フラッシュメモリのデータバスを介して前記フラッシュメモリから読み出す読み出し手段と、
前記読み出し手段により前記フラッシュメモリから読み出された前記第1のページに記憶されているデータに含まれる誤りの訂正値を求める誤り訂正手段と、
前記データバスのバス幅に対応するビット数単位で、前記訂正値を含む訂正データを保持する訂正データ保持手段と、
前記訂正データ保持手段に保持されている前記訂正データを、前記データバスを介して前記フラッシュメモリに転送し、前記内部レジスタに保持されているデータの一部を前記訂正データで置き換えるデータ置換手段とを備え、
前記データ複写指示手段は、前記第1のページに記憶されているデータに誤りが含まれている場合に、前記第1のページから前記内部レジスタに読み出されたデータの一部が前記訂正データで置き換えられた後に、前記第2のページに書き込むことを指示する書き込み指示を前記フラッシュメモリに与えることを特徴とするメモリコントローラ。 For a flash memory comprising a memory cell array composed of a plurality of pages and an internal register for holding data to be written to the memory cell array or data read from the memory cell array in units of pages, the first in the memory cell array A read instruction for instructing reading of data stored in a page to the internal register, and data read into the internal register based on the read instruction are transferred to a second page different from the first page Data copying instruction means for giving a writing instruction for instructing writing;
Reading means for reading data stored in the first page from the flash memory via the data bus of the flash memory;
Error correction means for obtaining a correction value of an error included in the data stored in the first page read from the flash memory by the reading means;
Correction data holding means for holding correction data including the correction value in units of bits corresponding to the bus width of the data bus;
Data replacement means for transferring the correction data held in the correction data holding means to the flash memory via the data bus and replacing a part of the data held in the internal register with the correction data; With
When the data stored in the first page includes an error, a part of the data read from the first page to the internal register is the correction data A memory controller, wherein after the replacement, the flash memory is provided with a write instruction for instructing writing to the second page.
フラッシュメモリと、
を備えるフラッシュメモリシステム。 Memory controller according to claim 1 or 2,
Flash memory,
A flash memory system.
前記第1のステップで前記内部レジスタに読み出されたデータを、前記フラッシュメモリのデータバスを介して前記内部レジスタから読み出す第2のステップと、
前記第2のステップで読み出されたデータに含まれる誤りの訂正値を求める第3のステップと、
前記第3のステップで求められた前記訂正値を含む訂正データを、前記データバスのバス幅に対応するビット数単位で保持する第4のステップと、
前記第4のステップで保持された前記訂正データを、前記データバスを介して前記内部レジスタに転送し、前記内部レジスタに保持されているデータの一部を前記訂正データで置き換える第5のステップと、
前記第5のステップで前記内部レジスタに保持されているデータの一部が前記訂正データで置き換えられた後に、前記フラッシュメモリに対して、前記内部レジスタに保持されているデータを前記第1のページとは異なる第2のページに書き込むことを指示する第6のステップと、
を含むことを特徴とするフラッシュメモリの制御方法。 For a flash memory comprising a memory cell array composed of a plurality of pages and an internal register for holding data to be written to the memory cell array or data read from the memory cell array in units of pages, the first in the memory cell array A first step for instructing reading of data stored in a page to the internal register;
A second step of reading data read into the internal register in the first step from the internal register via a data bus of the flash memory;
A third step for obtaining a correction value of an error included in the data read in the second step;
A fourth step of holding correction data including the correction value obtained in the third step in units of bits corresponding to the bus width of the data bus;
A fifth step of transferring the correction data held in the fourth step to the internal register via the data bus, and replacing a part of the data held in the internal register with the correction data; ,
After a part of the data held in the internal register in the fifth step is replaced with the correction data, the data held in the internal register is transferred to the first page with respect to the flash memory. A sixth step for instructing to write to a second page different from
A method for controlling a flash memory, comprising:
前記第1のステップで前記内部レジスタに読み出されたデータを、前記フラッシュメモリのデータバスを介して前記内部レジスタから読み出す第2のステップと、
前記第2のステップで読み出されたデータに含まれる誤りの訂正値を求める第3のステップと、
前記第3のステップで求められた前記訂正値を含む訂正データを、前記データバスのバス幅に対応するビット数単位で保持する第4のステップと、
前記フラッシュメモリに対して、前記第1のページに記憶されているデータを前記内部レジスタに読み出すことを指示する第5のステップと、
前記第4のステップで保持された前記訂正データを、前記第5のステップで前記内部レジスタに読み出されたデータが保持されている前記内部レジスタに前記データバスを介して転送し、前記内部レジスタに保持されているデータの一部を前記訂正データで置き換える第6のステップと、
前記第6のステップで前記内部レジスタに保持されているデータの一部が前記訂正データで置き換えられた後に、前記フラッシュメモリに対して、前記内部レジスタに保持されているデータを前記第1のページとは異なる第2のページに書き込むことを指示する第7のステップと、
を含むことを特徴とするフラッシュメモリの制御方法。 For a flash memory comprising a memory cell array composed of a plurality of pages and an internal register for holding data to be written to the memory cell array or data read from the memory cell array in units of pages, the first in the memory cell array A first step for instructing reading of data stored in a page to the internal register;
A second step of reading data read into the internal register in the first step from the internal register via a data bus of the flash memory;
A third step for obtaining a correction value of an error included in the data read in the second step;
A fourth step of holding correction data including the correction value obtained in the third step in units of bits corresponding to the bus width of the data bus;
A fifth step for instructing the flash memory to read the data stored in the first page into the internal register;
The correction data held in the fourth step is transferred via the data bus to the internal register in which the data read in the internal register in the fifth step is held, and the internal register A sixth step of replacing a part of the data held in the data with the corrected data;
After a part of the data held in the internal register in the sixth step is replaced with the correction data, the data held in the internal register is transferred to the first page with respect to the flash memory. A seventh step for instructing to write to a second page different from
A method for controlling a flash memory, comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006348664A JP4655034B2 (en) | 2006-12-25 | 2006-12-25 | Memory controller, flash memory system, and flash memory control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006348664A JP4655034B2 (en) | 2006-12-25 | 2006-12-25 | Memory controller, flash memory system, and flash memory control method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008158908A true JP2008158908A (en) | 2008-07-10 |
JP4655034B2 JP4655034B2 (en) | 2011-03-23 |
Family
ID=39659725
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006348664A Expired - Fee Related JP4655034B2 (en) | 2006-12-25 | 2006-12-25 | Memory controller, flash memory system, and flash memory control method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4655034B2 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010198592A (en) * | 2009-01-29 | 2010-09-09 | Nec Corp | Mobile terminal apparatus, software update method, operation control method, and program |
US8255643B2 (en) | 2009-02-24 | 2012-08-28 | Samsung Electronics Co., Ltd. | Memory system and data processing method thereof |
CN107195329A (en) * | 2017-05-17 | 2017-09-22 | 西安紫光国芯半导体有限公司 | The wrong method and DRAM of storage array in DRAM are corrected in read operation |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10302485A (en) * | 1997-04-28 | 1998-11-13 | Hitachi Inf Technol:Kk | Information processor having flash memory |
JP2004311010A (en) * | 2003-04-03 | 2004-11-04 | Samsung Electronics Co Ltd | Flash memory device with error correction function |
JP2006244017A (en) * | 2005-03-02 | 2006-09-14 | Matsushita Electric Ind Co Ltd | Data copy method |
-
2006
- 2006-12-25 JP JP2006348664A patent/JP4655034B2/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10302485A (en) * | 1997-04-28 | 1998-11-13 | Hitachi Inf Technol:Kk | Information processor having flash memory |
JP2004311010A (en) * | 2003-04-03 | 2004-11-04 | Samsung Electronics Co Ltd | Flash memory device with error correction function |
JP2006244017A (en) * | 2005-03-02 | 2006-09-14 | Matsushita Electric Ind Co Ltd | Data copy method |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010198592A (en) * | 2009-01-29 | 2010-09-09 | Nec Corp | Mobile terminal apparatus, software update method, operation control method, and program |
US8255643B2 (en) | 2009-02-24 | 2012-08-28 | Samsung Electronics Co., Ltd. | Memory system and data processing method thereof |
KR101563647B1 (en) | 2009-02-24 | 2015-10-28 | 삼성전자주식회사 | Memory system and data processing method thereof |
CN107195329A (en) * | 2017-05-17 | 2017-09-22 | 西安紫光国芯半导体有限公司 | The wrong method and DRAM of storage array in DRAM are corrected in read operation |
CN107195329B (en) * | 2017-05-17 | 2024-04-02 | 西安紫光国芯半导体有限公司 | Method for correcting errors of memory array in DRAM during read operation and DRAM |
Also Published As
Publication number | Publication date |
---|---|
JP4655034B2 (en) | 2011-03-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5592478B2 (en) | Nonvolatile storage device and memory controller | |
JP4956230B2 (en) | Memory controller | |
JP2007094639A (en) | Memory controller and flash memory system | |
JP4655034B2 (en) | Memory controller, flash memory system, and flash memory control method | |
JP4235646B2 (en) | Memory controller and flash memory system | |
JP4501881B2 (en) | Memory controller and flash memory system | |
JP2007094571A (en) | Memory controller, flash memory system, and control method of flash memory | |
JP4513786B2 (en) | Memory controller, memory system, and memory control method | |
JP4241741B2 (en) | Memory controller and flash memory system | |
JP4582078B2 (en) | Memory controller, flash memory system, and flash memory control method | |
JP4697146B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD | |
JP3934659B1 (en) | Memory controller and flash memory system | |
JP4692843B2 (en) | Memory controller, flash memory system, and flash memory control method | |
JP2005292925A (en) | Memory controller, flash memory system, and control method for flash memory | |
JP4254933B2 (en) | Memory controller and flash memory system | |
JP2008251063A (en) | Storage device | |
JP4000124B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD | |
JP2006244017A (en) | Data copy method | |
JP4332108B2 (en) | Memory controller, flash memory system, and flash memory control method | |
JP4304167B2 (en) | Memory controller, flash memory system, and flash memory control method | |
JP4273109B2 (en) | Memory controller and flash memory system | |
JP4366283B2 (en) | Memory controller and flash memory system including the memory controller | |
JP2007066119A (en) | Memory controller, flash memory system and control method of flash memory | |
JP4245594B2 (en) | Memory controller and flash memory system | |
JP4227989B2 (en) | Memory controller and flash memory system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100526 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20101116 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20101124 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20101207 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140107 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4655034 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |