JP3940409B2 - Memory controller, flash memory system, and control method - Google Patents

Memory controller, flash memory system, and control method Download PDF

Info

Publication number
JP3940409B2
JP3940409B2 JP2004161339A JP2004161339A JP3940409B2 JP 3940409 B2 JP3940409 B2 JP 3940409B2 JP 2004161339 A JP2004161339 A JP 2004161339A JP 2004161339 A JP2004161339 A JP 2004161339A JP 3940409 B2 JP3940409 B2 JP 3940409B2
Authority
JP
Japan
Prior art keywords
block address
address
virtual
flash memory
block
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.)
Active
Application number
JP2004161339A
Other languages
Japanese (ja)
Other versions
JP2005209140A5 (en
JP2005209140A (en
Inventor
健三 木田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TDK Corp
Original Assignee
TDK Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TDK Corp filed Critical TDK Corp
Priority to JP2004161339A priority Critical patent/JP3940409B2/en
Publication of JP2005209140A publication Critical patent/JP2005209140A/en
Publication of JP2005209140A5 publication Critical patent/JP2005209140A5/ja
Application granted granted Critical
Publication of JP3940409B2 publication Critical patent/JP3940409B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、メモリコントローラ、フラッシュメモリシステム、及びホストシステムとフラッシュメモリとの間でのデータ交換動作を制御するための制御方法に関する。   The present invention relates to a memory controller, a flash memory system, and a control method for controlling a data exchange operation between a host system and a flash memory.

近年、メモリーカードやシリコンディスクといったメモリシステムにて使用される半導体メモリに、フラッシュメモリが広く採用されている。フラッシュメモリは、不揮発性メモリの一種である。フラッシュメモリに格納されたデータは、電力が供給されていないときでも保持されていることが要求される。   In recent years, flash memories have been widely adopted as semiconductor memories used in memory systems such as memory cards and silicon disks. A flash memory is a kind of nonvolatile memory. Data stored in the flash memory is required to be retained even when power is not supplied.

NAND型フラッシュメモリは、上記のメモリシステムで特に多く用いられるフラッシュメモリの一種である。NAND型フラッシュメモリに含まれている複数のメモリセルのそれぞれは、他のメモリセルとは独立して、論理値“1”を示すデータが格納されている消去状態から、論理値“0”を示すデータが格納されている書込状態へと変化することができる。   A NAND flash memory is a type of flash memory that is particularly frequently used in the above memory system. Each of the plurality of memory cells included in the NAND flash memory receives a logical value “0” from an erased state in which data indicating a logical value “1” is stored, independently of the other memory cells. It is possible to change to a writing state in which the indicated data is stored.

これとは対照的に、複数のメモリセルのうちの少なくとも1つが書込状態から消去状態へと変化しなければならないときには、各メモリセルは他のメモリセルと独立して変化することができない。このときには、ブロックと称される予め定められた数のメモリセルにおいて、全てのメモリセルが同時に消去状態とならなければならない。この一括消去動作は、一般的に、"ブロック消去"と称されている。ブロック消去が行われたブロックは、消去済ブロックと称される。   In contrast, when at least one of the plurality of memory cells must change from a written state to an erased state, each memory cell cannot change independently of the other memory cells. At this time, in a predetermined number of memory cells called blocks, all the memory cells must be simultaneously erased. This batch erase operation is generally called “block erase”. A block that has been subjected to block erase is referred to as an erased block.

上記のような特徴により、NAND型フラッシュメモリでは、データを上書きすることが不可能である。メモリセルにおける格納データを書き換えるためには、新しいデータを含んだブロックデータが消去済ブロックに書き込まれた後に、古いデータを格納しているブロックのためのブロック消去が行われなければならない。   Due to the above characteristics, data cannot be overwritten in the NAND flash memory. In order to rewrite the stored data in the memory cell, after the block data including the new data is written into the erased block, the block erasure for the block storing the old data must be performed.

書き換えられたデータは、以前に格納されていたブロックとは異なるブロックに書き込まれる。そのため、ホストシステムから供給されるアドレス信号によって指定される論理ブロックアドレスと、フラッシュメモリ内での実際のブロックアドレスを示す物理ブロックアドレスとの間の対応関係は、フラッシュメモリにてデータが書き換えられる毎に、コントローラによって動的に調整される。例えば、論理ブロックアドレスと物理ブロックアドレスの間の対応関係は、コントローラに設けられたアドレス変換テーブルに記載される。   The rewritten data is written in a block different from the previously stored block. Therefore, the correspondence between the logical block address specified by the address signal supplied from the host system and the physical block address indicating the actual block address in the flash memory is the same every time data is rewritten in the flash memory. Dynamically adjusted by the controller. For example, the correspondence between logical block addresses and physical block addresses is described in an address conversion table provided in the controller.

フラッシュメモリに含まれる全てのブロックについて、論理ブロックアドレスと物理ブロックアドレスの間の対応関係がアドレス変換テーブルに記載されるときには、データ容量が大きなフラッシュメモリに対応して、大きなサイズのアドレス変換テーブルが必要とされる。大きなサイズのアドレス変換テーブルを作成するためには、大きなシステムリソースや長い処理時間が費やされる。   When the correspondence between the logical block address and the physical block address is described in the address conversion table for all the blocks included in the flash memory, a large size address conversion table corresponding to the flash memory having a large data capacity is provided. Needed. In order to create a large size address translation table, large system resources and long processing time are consumed.

この問題を解決するために、後述する特許文献1では、フラッシュメモリ上のメモリ空間を複数のゾーンに分割し、各ゾーンに割り当てられたブロックについてのアドレス変換テーブルを作成するための技術を開示している。また、特許文献2は、フラッシュメモリに格納されているアドレス変換テーブルの一部分をRAM上のメモリ空間にコピーすることにより、アドレス変換テーブルを使用するために必要となるメモリ容量の増大を防止するアドレス変換方法を開示している。   In order to solve this problem, Patent Document 1 described later discloses a technique for dividing the memory space on the flash memory into a plurality of zones and creating an address conversion table for blocks allocated to each zone. ing. Further, Patent Document 2 discloses an address that prevents an increase in memory capacity required for using the address conversion table by copying a part of the address conversion table stored in the flash memory to a memory space on the RAM. A conversion method is disclosed.

さらに、特許文献3は、フラッシュメモリにおける一連のデータ書込動作を並行して実行できるようにしたメモリコントローラを開示している。その文献で開示されているメモリコントローラは、互いに異なるグループに属する複数の物理ブロックを仮想的に結合することにより形成された複数の仮想ブロックを使用するよう設計されている。   Furthermore, Patent Document 3 discloses a memory controller that can execute a series of data write operations in a flash memory in parallel. The memory controller disclosed in that document is designed to use a plurality of virtual blocks formed by virtually combining a plurality of physical blocks belonging to different groups.

特許文献1で開示されているような複数のゾーンに分割されたメモリ空間を有するフラッシュメモリでは、ホストシステムに含まれるデータ領域に対する各ゾーンの割り当てにおいて、不良ブロックの存在が考慮されるべきである。言い換えると、ホストシステムに含まれる所定範囲のデータ領域に割り当てられるゾーンの記憶容量は、そのデータ領域で取り扱われるデータの上限よりも大きくするべく設計されることが好ましい。
このとき、各ゾーンでは、全ブロック数に対する予備的なブロックの比率が所定値となるように、少なくとも1つの予備的なブロック(冗長なブロック)が配置される。
特開2000−284996号公報 特開2002−73409号公報 特開2003−15946号公報
In a flash memory having a memory space divided into a plurality of zones as disclosed in Patent Document 1, the existence of bad blocks should be considered in the allocation of each zone to the data area included in the host system. . In other words, it is preferable that the storage capacity of a zone allocated to a predetermined range of data area included in the host system is designed to be larger than the upper limit of data handled in the data area.
At this time, in each zone, at least one spare block (redundant block) is arranged so that the ratio of the spare block to the total number of blocks becomes a predetermined value.
JP 2000-284996 A JP 2002-73409 A JP 2003-15946 A

しかしながら、フラッシュメモリの一部分に多くの不良ブロックが存在するときには、その一部分が割り当てられたゾーンに、不良ブロックが集中する。1つのゾーンに含まれている不良ブロックの数がそのゾーンに含まれている予備的なブロックの数よりも大きくなったときには、消去済みのブロックを確保できなくなり、動作が停止してしまう。   However, when there are many bad blocks in a part of the flash memory, the bad blocks are concentrated in the zone to which the part is assigned. When the number of defective blocks included in one zone becomes larger than the number of preliminary blocks included in the zone, erased blocks cannot be secured and the operation stops.

上記のように、特定のゾーンに多くの不良ブロックが集中するときには、フラッシュメモリ全体の不良ブロックの数が正常動作のための許容量を越えていなくても、データを正しく記憶できない不具合が発生することがある。   As described above, when many bad blocks are concentrated in a specific zone, there is a problem that data cannot be stored correctly even if the number of bad blocks in the entire flash memory does not exceed the allowable amount for normal operation. Sometimes.

本発明の目的は、フラッシュメモリの一部分に多くの不良ブロックが存在するときに、フラッシュメモリにおける不具合の発生を抑制することである。   An object of the present invention is to suppress the occurrence of defects in a flash memory when there are many defective blocks in a part of the flash memory.

上記目的を達成するために、本発明のメモリコントローラは、ホストシステムから与えられるアドレスに基づいて、物理ブロック単位で記憶データの消去が行われるフラッシュメモリに対するアクセスを制御するメモリコントローラであって、
前記フラッシュメモリ内の物理ブロックに付けられている物理ブロックアドレスに仮想ブロックアドレスを割り当てる初期設定手段と、
前記ホストシステム側のアドレス空間における論理ブロックアドレスが割り当てられている複数ブロックの領域で構成された論理ゾーンを形成する論理ゾーン形成手段と、
連続する前記仮想ブロックアドレスが割り当てられている複数ブロックの領域で構成された仮想ゾーンを形成する仮想ゾーン形成手段と、
前記論理ゾーンと前記仮想ゾーンとの対応関係を管理するゾーン管理手段と、
前記論理ゾーンに含まれる前記論理ブロックアドレスと、該論理ゾーンと対応する前記仮想ゾーンに含まれる前記仮想ブロックアドレスとの対応関係を管理するアドレス管理手段と、
前記初期設定手段によって設定された割り当てに従って、前記仮想ブロックアドレスを、該仮想ブロックアドレスに割り当てられている前記物理ブロックアドレスに変換するアドレス変換手段とを備え、
前記初期設定手段は、前記各仮想ゾーンに割り当てられる不良の物理ブロックの個数が均等化されるように、前記物理ブロックアドレスに前記仮想ブロックアドレスを割り当てることを特徴とする。
In order to achieve the above object, a memory controller of the present invention is a memory controller that controls access to a flash memory in which stored data is erased in units of physical blocks based on an address given from a host system.
Initial setting means for assigning a virtual block address to a physical block address attached to a physical block in the flash memory;
Logical zone forming means for forming a logical zone composed of areas of a plurality of blocks to which logical block addresses in the address space on the host system side are assigned;
Virtual zone forming means for forming a virtual zone composed of areas of a plurality of blocks to which the continuous virtual block addresses are assigned;
Zone management means for managing the correspondence between the logical zone and the virtual zone;
Address management means for managing a correspondence relationship between the logical block address included in the logical zone and the virtual block address included in the virtual zone corresponding to the logical zone;
Address conversion means for converting the virtual block address to the physical block address assigned to the virtual block address according to the assignment set by the initial setting means,
The initial setting means assigns the virtual block address to the physical block address so that the number of defective physical blocks assigned to each virtual zone is equalized .

例えば、前記物理ブロックアドレスに対する前記仮想ブロックアドレスの割り当てを記述したテーブルを複数個記憶しているテーブル記憶手段を備え、前記初期設定手段は、複数個の前記テーブルの中から1個のテーブルを選択し、前記アドレス変換手段は、前記初期設定手段によって選択された前記テーブルを用いて前記仮想ブロックアドレスを前記物理ブロックアドレスに変換する For example, it comprises table storage means for storing a plurality of tables describing assignment of the virtual block addresses to the physical block addresses, and the initial setting means selects one table from the plurality of tables The address converting unit converts the virtual block address into the physical block address using the table selected by the initial setting unit .

1対1の写像を生成する関数を複数個記憶している関数記憶手段を配置し、前記初期設定手段は、複数個の前記関数の中から1個の関数を選択し、前記アドレス変換手段は、前記初期設定手段によって選択された前記関数を用いて前記仮想ブロックアドレスを前記物理ブロックアドレスに変換するようにしてもよい。  Function storage means storing a plurality of functions for generating a one-to-one mapping is arranged, the initial setting means selects one function from the plurality of functions, and the address conversion means The virtual block address may be converted into the physical block address using the function selected by the initial setting means.

例えば、前記アドレス変換手段は、1対1の写像を生成する周期性を有する写像関数を用いて前記仮想ブロックアドレスを前記物理ブロックアドレスに変換し、前記初期設定手段は、アドレス変換手段が前記写像関数を用いて前記仮想ブロックアドレスを前記物理ブロックアドレスに変換するときの変換回数を設定する For example, the address converting unit converts the virtual block address to the physical block address using a mapping function having a periodicity for generating a one-to-one mapping, and the initial setting unit is configured such that the address converting unit includes the mapping unit. The number of conversions when the virtual block address is converted into the physical block address using a function is set .

前記写像関数は、例えば、テント写像を生成する写像関数である例えば、前記テント写像を生成する写像関数の循環周期がTであり、前記仮想ブロックアドレスが割り当てられている前記フラッシュメモリ内の物理ブロックの個数がNであるときに、TとNが
N=2 (T−1) の関係を満たす
The mapping function is, for example, a mapping function that generates a tent map . For example, when the circulation cycle of the mapping function for generating the tent mapping is T and the number of physical blocks in the flash memory to which the virtual block address is assigned is N, T and N are
The relationship of N = 2 (T-1) is satisfied .

本発明のフラッシュメモリシステムは、上述のメモリコントローラと、物理ブロック単位で記憶データの消去が行われるフラッシュメモリとを備えることを特徴とする。A flash memory system according to the present invention includes the above-described memory controller and a flash memory in which stored data is erased in units of physical blocks.

本発明のフラッシュメモリの制御方法は、  The control method of the flash memory of the present invention is:
ホストシステムから与えられるアドレスに基づいて、物理ブロック単位で記憶データの消去が行われるフラッシュメモリに対するアクセスを制御するフラッシュメモリの制御方法であって、  A flash memory control method for controlling access to a flash memory in which stored data is erased in units of physical blocks based on an address given from a host system,
前記フラッシュメモリ内の物理ブロックに付けられている物理ブロックアドレスに仮想ブロックアドレスを割り当てる初期設定ステップと、  An initial setting step of assigning a virtual block address to a physical block address attached to a physical block in the flash memory;
前記ホストシステムから与えられるアドレスに基づいてアクセス対象領域に対応する論理ブロックアドレスを求める演算ステップと、  An operation step of obtaining a logical block address corresponding to the access target area based on an address given from the host system;
前記論理ブロックアドレスが割り当てられている複数ブロックの領域で構成された論理ゾーンと、連続する前記仮想ブロックアドレスが割り当てられている複数ブロックの領域で構成された仮想ゾーンとの対応関係に従って、前記論理ゾーンに含まれる前記論理ブロックアドレスを、該論理ゾーンと対応する前記仮想ゾーンに含まれる前記仮想ブロックアドレスに変換する第1の変換ステップと、  In accordance with the correspondence relationship between a logical zone composed of a plurality of block areas to which the logical block address is allocated and a virtual zone composed of a plurality of block areas to which the continuous virtual block address is allocated, A first conversion step of converting the logical block address included in the zone into the virtual block address included in the virtual zone corresponding to the logical zone;
前記初期設定ステップで設定された割り当てに従って、前記仮想ブロックアドレスを、該仮想ブロックアドレスに割り当てられている物理ブロックアドレスに変換する第2の変換ステップを含み、  A second conversion step of converting the virtual block address to a physical block address assigned to the virtual block address according to the assignment set in the initial setting step;
前記初期設定ステップでは、前記各仮想ゾーンに割り当てられる不良の物理ブロックの個数が均等化されるように、前記物理ブロックアドレスに前記仮想ブロックアドレスを割り当てることを特徴とする。  In the initial setting step, the virtual block address is allocated to the physical block address so that the number of defective physical blocks allocated to each virtual zone is equalized.

例えば、前記初期設定ステップでは、前記物理ブロックアドレスに対する前記仮想ブロックアドレスの割り当てを記述した複数個のテーブルの中から1個のテーブルを選択し、前記第2の変換ステップでは、前記初期設定ステップで選択された前記テーブルを用いて前記仮想ブロックアドレスを前記物理ブロックアドレスに変換する。  For example, in the initial setting step, one table is selected from a plurality of tables describing assignment of the virtual block address to the physical block address, and in the second conversion step, the initial setting step The virtual block address is converted into the physical block address using the selected table.

例えば、前記初期設定ステップでは、1対1の写像を生成する複数個の関数の中から1個の関数を選択し、前記第2の変換ステップでは、前記初期設定ステップで選択された前記関数を用いて前記仮想ブロックアドレスを前記物理ブロックアドレスに変換する。  For example, in the initial setting step, one function is selected from a plurality of functions that generate a one-to-one mapping, and in the second conversion step, the function selected in the initial setting step is selected. Used to convert the virtual block address to the physical block address.

例えば、前記第2の変換ステップでは、1対1の写像を生成する周期性を有する写像関数を用いて前記仮想ブロックアドレスを前記物理ブロックアドレスに変換し、前記初期設定ステップでは、前記第2の変換ステップで前記写像関数を用いて前記仮想ブロックアドレスを前記物理ブロックアドレスに変換するときの変換回数を設定する。  For example, in the second conversion step, the virtual block address is converted into the physical block address using a mapping function having a periodicity for generating a one-to-one mapping, and in the initial setting step, the second conversion step is performed. In the conversion step, the number of conversions when the virtual block address is converted into the physical block address using the mapping function is set.

例えば、前記写像関数は、テント写像を生成する写像関数である。例えば、前記テント写像を生成する写像関数の循環周期がTであり、前記仮想ブロックアドレスが割り当てられている前記フラッシュメモリ内の物理ブロックの個数がNであるときに、TとNが N=2  For example, the mapping function is a mapping function that generates a tent map. For example, when the circulation cycle of the mapping function for generating the tent mapping is T and the number of physical blocks in the flash memory to which the virtual block address is assigned is N, T and N are N = 2 (T−1)(T-1) の関係を満たす。  Satisfy the relationship.

本発明によれば、フラッシュメモリの一部分に多くの不良ブロックが存在するときに、フラッシュメモリにおける不具合の発生を抑制することができる。   According to the present invention, when there are many defective blocks in a part of the flash memory, it is possible to suppress the occurrence of problems in the flash memory.

図1は、本発明にかかるフラッシュメモリシステム1を概略的に示すブロック図である。
フラッシュメモリシステム1は、フラッシュメモリ2と、コントローラ3とを有している。フラッシュメモリシステム1は、ホストシステム4が有するメモリインタフェースに装着されることができる。
FIG. 1 is a block diagram schematically showing a flash memory system 1 according to the present invention.
The flash memory system 1 includes a flash memory 2 and a controller 3. The flash memory system 1 can be attached to a memory interface included in the host system 4.

ホストシステム4にフラッシュメモリシステム1を装着することにより、ホストシステム4は、フラッシュメモリシステム1を外部記憶装置として動作させることができる。   By attaching the flash memory system 1 to the host system 4, the host system 4 can operate the flash memory system 1 as an external storage device.

ホストシステム4は、文字情報、音声情報あるいは画像情報などといった様々な情報を処理するためのパーソナルコンピュータや、デジタルカメラに代表される情報処理システム等であってもよい。例えば、ホストシステム4は、CPU(Central Processing Unit)といった、メインプロセッサを含んでいてもよい。   The host system 4 may be a personal computer for processing various information such as character information, voice information, or image information, an information processing system represented by a digital camera, or the like. For example, the host system 4 may include a main processor such as a CPU (Central Processing Unit).

図1に示されたフラッシュメモリ2は、不揮発性メモリである。フラッシュメモリ2において、データ読出動作およびデータ書込動作はともに、いわゆるページ単位で実行される。他方、フラッシュメモリ2に格納されたデータは、いわゆるブロック単位で消去される。例えば、1つのブロックは、32個のページを含んでいる。1つのページは、512バイトのユーザ領域25(図4にて示される)と、16バイトの冗長領域26(図4にて示される)とを含んでいる。   The flash memory 2 shown in FIG. 1 is a nonvolatile memory. In the flash memory 2, both the data read operation and the data write operation are performed in so-called page units. On the other hand, the data stored in the flash memory 2 is erased in so-called block units. For example, one block includes 32 pages. One page includes a 512-byte user area 25 (shown in FIG. 4) and a 16-byte redundant area 26 (shown in FIG. 4).

図1において、コントローラ3は、ホストインタフェース制御ブロック5と、マイクロプロセッサ6と、ホストインタフェースブロック7と、ワークエリア8と、バッファ9と、フラッシュメモリインタフェースブロック10と、ECCブロック11と、フラッシュシーケンサブロック12とを有している。例えば、コントローラ3は、1つの半導体チップ上に集積される。以下に、コントローラ3の各部位の機能を説明する。   In FIG. 1, the controller 3 includes a host interface control block 5, a microprocessor 6, a host interface block 7, a work area 8, a buffer 9, a flash memory interface block 10, an ECC block 11, and a flash sequencer block. 12. For example, the controller 3 is integrated on one semiconductor chip. Below, the function of each part of the controller 3 will be described.

ホストインタフェース制御ブロック5は、ホストインタフェースブロック7の動作を制御するための機能ブロックである。ホストインタフェース制御ブロック5は、複数のレジスタ(図示せず)を有している。ホストインタフェース制御ブロック5は、各レジスタに設定された情報に基づいて、ホストインタフェースブロック7の動作を制御する。   The host interface control block 5 is a functional block for controlling the operation of the host interface block 7. The host interface control block 5 has a plurality of registers (not shown). The host interface control block 5 controls the operation of the host interface block 7 based on information set in each register.

マイクロプロセッサ6は、コントローラ3全体の動作を制御するための機能ブロックである。
ホストインタフェースブロック7は、マイクロプロセッサ6による制御により、データ、アドレス、ステータス、外部コマンド等を示す情報を、ホストシステム4との間で交換するための機能ブロックである。フラッシュメモリシステム1がホストシステム4に装着されたとき、フラッシュメモリシステム1とホストシステム4とは、外部バス13を介して相互に接続される。ホストシステム4からフラッシュメモリシステム1に供給される情報は、ホストインタフェースブロック7を通してコントローラ3の内部に取り込まれる。フラッシュメモリシステム1からホストシステム4に供給される情報は、ホストインタフェースブロック7を通してホストシステム4へ出力される。
The microprocessor 6 is a functional block for controlling the operation of the entire controller 3.
The host interface block 7 is a functional block for exchanging information indicating data, addresses, statuses, external commands and the like with the host system 4 under the control of the microprocessor 6. When the flash memory system 1 is mounted on the host system 4, the flash memory system 1 and the host system 4 are connected to each other via the external bus 13. Information supplied from the host system 4 to the flash memory system 1 is taken into the controller 3 through the host interface block 7. Information supplied from the flash memory system 1 to the host system 4 is output to the host system 4 through the host interface block 7.

ワークエリア8は、フラッシュメモリ2の制御に使用されるデータを一時的に格納するためのメモリモジュールである。例えば、ワークエリア8は、複数のSRAM(Static Random Access Memory)セルを含んでいる。   The work area 8 is a memory module for temporarily storing data used for controlling the flash memory 2. For example, the work area 8 includes a plurality of SRAM (Static Random Access Memory) cells.

バッファ9は、フラッシュメモリ2から読み出されたデータ及びフラッシュメモリ2に書き込まれるべきデータを、保持するための機能ブロックである。フラッシュメモリ2から読み出されたデータは、ホストシステム4に出力されるまで、バッファ9に保持される。フラッシュメモリ2に書き込まれるべきデータは、フラッシュメモリ2のデータ書込動作の準備ができるまで、バッファ9に保持される。   The buffer 9 is a functional block for holding data read from the flash memory 2 and data to be written to the flash memory 2. Data read from the flash memory 2 is held in the buffer 9 until it is output to the host system 4. Data to be written to the flash memory 2 is held in the buffer 9 until the data write operation of the flash memory 2 is ready.

フラッシュメモリインタフェースブロック10は、内部バス14を介して、データ、アドレス、ステータス及び内部コマンド等を示す情報を、フラッシュメモリ2との間で交換するための機能ブロックである。
内部コマンドは、コントローラ3からフラッシュメモリ2に与えられるコマンドであり、ホストシステム4からフラッシュメモリシステム1に与えられる外部コマンドとは区別される。
The flash memory interface block 10 is a functional block for exchanging information indicating data, address, status, internal command and the like with the flash memory 2 via the internal bus 14.
The internal command is a command given from the controller 3 to the flash memory 2 and is distinguished from an external command given from the host system 4 to the flash memory system 1.

ECCブロック11は、フラッシュメモリ2への書込データに付加されるエラーコレクションコードを生成するための機能ブロックである。加えて、ECCブロック11は、フラッシュメモリ2から読み出されたデータに含まれるエラーコレクションコードに基づいて、読出データに含まれる誤りの検出及び訂正を行う。   The ECC block 11 is a functional block for generating an error correction code to be added to write data to the flash memory 2. In addition, the ECC block 11 detects and corrects an error included in the read data based on an error correction code included in the data read from the flash memory 2.

フラッシュシーケンサブロック12は、内部コマンドに基づいて、フラッシュメモリ2の動作を制御するための機能ブロックである。フラッシュシーケンサブロック12は、複数のレジスタ(図示せず)を有している。フラッシュシーケンサブロック12は、マイクロプロセッサ6による制御のもと、内部コマンドが実行されるときに使用される情報を、複数のレジスタに設定する。複数のレジスタに情報を設定した後、フラッシュシーケンサブロック12は、各レジスタに設定された情報に基づいて、内部コマンドに従った動作を行う。加えて、フラッシュシーケンサブロック12は、1つのブロックに割り付けられる複数のブロックをフラッシュメモリ2内で分散させるための分散処理を実行する。   The flash sequencer block 12 is a functional block for controlling the operation of the flash memory 2 based on an internal command. The flash sequencer block 12 has a plurality of registers (not shown). The flash sequencer block 12 sets information used when an internal command is executed in a plurality of registers under the control of the microprocessor 6. After setting information in a plurality of registers, the flash sequencer block 12 performs an operation according to an internal command based on the information set in each register. In addition, the flash sequencer block 12 executes a distributed process for distributing a plurality of blocks allocated to one block in the flash memory 2.

以下に、図2及び図3を参照することにより、フラッシュメモリ2に含まれるメモリセル16の構造を説明する。図2及び図3は、フラッシュメモリ2に含まれている1つのメモリセル16の構造を概略的に示す断面図である。図2では、メモリセル16にデータが書き込まれていない。図3では、メモリセル16にデータが書き込まれている。   The structure of the memory cell 16 included in the flash memory 2 will be described below with reference to FIGS. 2 and 3 are cross-sectional views schematically showing the structure of one memory cell 16 included in the flash memory 2. In FIG. 2, no data is written in the memory cell 16. In FIG. 3, data is written in the memory cell 16.

図2及び図3に示されているように、メモリセル16は、P型半導体基板17と、N型ソース拡散領域18と、N型ドレイン拡散領域19と、トンネル酸化膜20と、フローティングゲート電極21と、絶縁膜22と、コントロールゲート電極23とを含んでいる。   As shown in FIGS. 2 and 3, the memory cell 16 includes a P-type semiconductor substrate 17, an N-type source diffusion region 18, an N-type drain diffusion region 19, a tunnel oxide film 20, and a floating gate electrode. 21, an insulating film 22, and a control gate electrode 23.

ソース拡散領域18及びドレイン拡散領域19は、共にP型半導体基板17上に形成されている。トンネル酸化膜20は、ソース拡散領域18とドレイン拡散領域19との間において、P型半導体基板17を覆っている。フローティングゲート電極21は、トンネル酸化膜20上に形成されている。絶縁膜22は、フローティングゲート電極21上に形成されている。コントロールゲート電極23は、絶縁膜22上に形成されている。フラッシュメモリ2では、複数のメモリセル16が直列に接続されている。1つのメモリセル16は、1ビットのデータを格納する。   Both the source diffusion region 18 and the drain diffusion region 19 are formed on the P-type semiconductor substrate 17. The tunnel oxide film 20 covers the P-type semiconductor substrate 17 between the source diffusion region 18 and the drain diffusion region 19. The floating gate electrode 21 is formed on the tunnel oxide film 20. The insulating film 22 is formed on the floating gate electrode 21. The control gate electrode 23 is formed on the insulating film 22. In the flash memory 2, a plurality of memory cells 16 are connected in series. One memory cell 16 stores 1-bit data.

図2に示されているように、フローティングゲート電極21に電子が蓄積されていないとき、メモリセル16は、消去状態にある。他方、フローティングゲート電極21に電子が蓄積されているとき、メモリセル16は、書込状態にある。消去状態のメモリセル16は、論理値“1”を示すデータを格納している。書込状態のメモリセル16は、論理値“0”を示すデータを格納している。   As shown in FIG. 2, when no electrons are stored in the floating gate electrode 21, the memory cell 16 is in an erased state. On the other hand, when electrons are accumulated in the floating gate electrode 21, the memory cell 16 is in a write state. The memory cell 16 in the erased state stores data indicating a logical value “1”. The memory cell 16 in the written state stores data indicating a logical value “0”.

メモリセル16に格納されたデータを読み出すために予め定められた読出電圧が、消去状態となっているメモリセル16のコントロールゲート電極23に印加されていないときには、ソース拡散領域18とドレイン拡散領域19との間のP型半導体基板17の表面に、チャネルが形成されない。従って、ソース拡散領域18とドレイン拡散領域19は、互いに電気的に絶縁される。   When a predetermined read voltage for reading data stored in the memory cell 16 is not applied to the control gate electrode 23 of the memory cell 16 in the erased state, the source diffusion region 18 and the drain diffusion region 19 No channel is formed on the surface of the P-type semiconductor substrate 17 between the two. Accordingly, the source diffusion region 18 and the drain diffusion region 19 are electrically insulated from each other.

これに対して、消去状態となっているメモリセル16のコントロールゲート電極23に読出電圧が印加されているときには、ソース拡散領域18とドレイン拡散領域19との間のP型半導体基板17の表面に、チャネル(図示せず)が形成される。ソース拡散領域18とドレイン拡散領域19は、そのチャネルによって電気的に接続される。   On the other hand, when a read voltage is applied to the control gate electrode 23 of the memory cell 16 in the erased state, the surface of the P-type semiconductor substrate 17 between the source diffusion region 18 and the drain diffusion region 19 is applied. A channel (not shown) is formed. The source diffusion region 18 and the drain diffusion region 19 are electrically connected by the channel.

上述のように、消去状態となっているメモリセル16のコントロールゲート電極23に読出電圧が印加されていないときには、ソース拡散領域18とドレイン拡散領域19が電気的に絶縁される。消去状態となっているメモリセル16のコントロールゲート電極23に読出電圧が印加されているときには、ソース拡散領域18とドレイン拡散領域19が電気的に接続される。   As described above, when the read voltage is not applied to the control gate electrode 23 of the memory cell 16 in the erased state, the source diffusion region 18 and the drain diffusion region 19 are electrically insulated. When a read voltage is applied to the control gate electrode 23 of the memory cell 16 in the erased state, the source diffusion region 18 and the drain diffusion region 19 are electrically connected.

図3に示されているように、フローティングゲート電極21に電子が蓄積されているとき、メモリセル16は書込状態にある。フローティングゲート電極21はトンネル酸化膜20と絶縁膜22に挟まれている。そのため、電子が一旦フローティングゲート電極21に注入されると、電位障壁により、きわめて長時間にわたり電子がフローティングゲート電極21内にとどまる。   As shown in FIG. 3, when electrons are accumulated in the floating gate electrode 21, the memory cell 16 is in a write state. The floating gate electrode 21 is sandwiched between the tunnel oxide film 20 and the insulating film 22. For this reason, once electrons are injected into the floating gate electrode 21, the electrons remain in the floating gate electrode 21 for a very long time due to the potential barrier.

フローティングゲート電極21に電子を蓄積することにより書込状態となっているメモリセル16では、コントロールゲート電極23に読出電圧が印加されているか否かにかかわらず、チャネル24がソース拡散領域18とドレイン拡散領域19との間のP型半導体基板17の表面に形成される。従って、メモリセル16が書込状態となっているときには、コントロールゲート電極23に読出電圧が印加されているか否かにかかわらず、ソース拡散領域18とドレイン拡散領域19が電気的に接続される。   In the memory cell 16 which is in the write state by accumulating electrons in the floating gate electrode 21, the channel 24 is connected to the source diffusion region 18 and the drain regardless of whether or not the read voltage is applied to the control gate electrode 23. It is formed on the surface of P-type semiconductor substrate 17 between diffusion region 19. Therefore, when the memory cell 16 is in the write state, the source diffusion region 18 and the drain diffusion region 19 are electrically connected regardless of whether or not the read voltage is applied to the control gate electrode 23.

メモリセル16が消去状態であるか書込状態であるかを特定するためのデータ読出動作を、以下に説明する。フラッシュメモリ2では、複数のメモリセル16が直列に接続されている。その複数のメモリセル16のうちの1つが、格納データの読み出しのためにコントローラ3によって選択される。
所定の低レベル電圧が、その選択された1つのメモリセル16に取り付けられたコントロールゲート電極23に印加される。低レベル電圧よりも高い所定の高レベル電圧(読出電圧)が、複数のメモリセル16のうちの他のものに取り付けられたコントロールゲート電極23に印加される。この状況で、一連のメモリセル16が導通しているか否かを、所定の検出器により検出する。検出器が導通を検出したとき、選択されたメモリセル16は、書込状態である。検出器が不導通を検出したとき、選択されたメモリセル16は、消去状態である。
A data read operation for specifying whether memory cell 16 is in the erased state or the written state will be described below. In the flash memory 2, a plurality of memory cells 16 are connected in series. One of the plurality of memory cells 16 is selected by the controller 3 for reading stored data.
A predetermined low level voltage is applied to the control gate electrode 23 attached to the selected one memory cell 16. A predetermined high level voltage (read voltage) higher than the low level voltage is applied to the control gate electrode 23 attached to the other one of the plurality of memory cells 16. In this situation, it is detected by a predetermined detector whether or not a series of memory cells 16 are conductive. When the detector detects conduction, the selected memory cell 16 is in the write state. When the detector detects non-conduction, the selected memory cell 16 is in the erased state.

上記のように、フラッシュメモリ2は、直列に接続された一連のメモリセル16のうちの任意の1つから論理値“0”又は“1”を示す格納データを読み出すように、設計されている。
メモリセル16の状態を消去状態と書込状態との間で変更するときには、メモリセル16のデータ読出動作にて使用される電圧よりも大きい消去電圧又は書込電圧が使用される。
As described above, the flash memory 2 is designed to read stored data indicating a logical value “0” or “1” from any one of a series of memory cells 16 connected in series. .
When the state of the memory cell 16 is changed between the erased state and the written state, an erase voltage or a write voltage larger than the voltage used in the data read operation of the memory cell 16 is used.

消去状態となっているメモリセル16を書込状態に変更するときには、コントロールゲート電極23の電位がフローティングゲート電極21の電位よりも高くなるように、書込電圧がコントロールゲート電極23に印加される。この書込電圧によって、P型半導体基板17とフローティングゲート電極21の間に、トンネル酸化膜20を介してFN(ファウラーノルトハイム;Fowler-Nordhaim)トンネル電流が流れる。この結果、電子がフローティングゲート電極21に注入される。   When the memory cell 16 in the erased state is changed to the written state, the write voltage is applied to the control gate electrode 23 so that the potential of the control gate electrode 23 is higher than the potential of the floating gate electrode 21. . By this write voltage, an FN (Fowler-Nordhaim) tunnel current flows between the P-type semiconductor substrate 17 and the floating gate electrode 21 via the tunnel oxide film 20. As a result, electrons are injected into the floating gate electrode 21.

他方、書込状態となっているメモリセル16を消去状態に変更するときには、コントロールゲート電極23の電位がフローティングゲート電極21の電位よりも低くなるように、消去電圧がコントロールゲート電極23に印加される。この消去電圧によって、フローティングゲート電極21に蓄積されている電子がトンネル酸化膜20を介してP型半導体基板17に排出される。   On the other hand, when the memory cell 16 in the write state is changed to the erase state, an erase voltage is applied to the control gate electrode 23 so that the potential of the control gate electrode 23 is lower than the potential of the floating gate electrode 21. The With this erase voltage, electrons accumulated in the floating gate electrode 21 are discharged to the P-type semiconductor substrate 17 through the tunnel oxide film 20.

以下に、フラッシュメモリ2にデータを格納するための構造を説明する。図4は、フラッシュメモリ2のアドレス空間を概略的に示している。図4に示された構造において、フラッシュメモリ2のアドレス空間は、"ページ"と"ブロック"に基づいて分割されている。ページは、フラッシュメモリ2にて行われるデータ読出動作及びデータ書込動作での処理単位である。ブロックは、フラッシュメモリ2にて行われるデータ消去動作での処理単位である。   Hereinafter, a structure for storing data in the flash memory 2 will be described. FIG. 4 schematically shows the address space of the flash memory 2. In the structure shown in FIG. 4, the address space of the flash memory 2 is divided based on “page” and “block”. A page is a processing unit in a data read operation and a data write operation performed in the flash memory 2. A block is a processing unit in a data erasing operation performed in the flash memory 2.

1つのページは、512バイトのユーザ領域25と、16バイトの冗長領域26とを含んでいる。ユーザ領域25は、ホストシステム4から供給されるユーザデータを格納する。冗長領域26は、エラーコレクションコード(ECC)、対応論理ブロックアドレスあるいはブロックステータス等を示す付加情報を格納する。エラーコレクションコードは、ユーザ領域25に格納されたデータに含まれる誤りを訂正するために使用される。ユーザ領域25に格納されたデータに含まれる誤りの数が予め定められた閾値以下であるときには、その誤りは、エラーコレクションコードによって訂正されることができる。このとき、ユーザ領域25から読み出されたデータは、エラーコレクションコードによって正しいデータに修正される。   One page includes a 512-byte user area 25 and a 16-byte redundant area 26. The user area 25 stores user data supplied from the host system 4. The redundant area 26 stores additional information indicating an error correction code (ECC), a corresponding logical block address, a block status, or the like. The error collection code is used to correct an error included in the data stored in the user area 25. When the number of errors included in the data stored in the user area 25 is equal to or less than a predetermined threshold, the errors can be corrected by an error correction code. At this time, the data read from the user area 25 is corrected to correct data by the error collection code.

対応論理ブロックアドレスは、1つのブロックに含まれている少なくとも1つのユーザ領域25に有効なデータが格納されているときに、そのブロックが対応付けられている論理ブロックのアドレスを示す。論理ブロックアドレスは、ホストシステム4から与えられるホストアドレスに基づいて決定されるブロックのアドレスである。他方、フラッシュメモリ2内における実際のブロックのアドレスは、物理ブロックアドレスと称される。   The corresponding logical block address indicates the address of the logical block with which the block is associated when valid data is stored in at least one user area 25 included in one block. The logical block address is a block address determined based on the host address given from the host system 4. On the other hand, the actual block address in the flash memory 2 is referred to as a physical block address.

1つのブロックに含まれている全てのユーザ領域25に有効なデータが全く格納されていないときには、そのブロックに含まれている冗長領域26に、対応論理ブロックアドレスが格納されていない。従って、冗長領域26に対応論理ブロックアドレスが格納されているか否かを判定することにより、その冗長領域26が含まれているブロックにてデータが消去されたか否かを判定することができる。冗長領域26に対応論理ブロックアドレスが格納されていないとき、その冗長領域26が含まれているブロックは、データが消去された状態にある。   When no valid data is stored in all user areas 25 included in one block, the corresponding logical block address is not stored in the redundant area 26 included in the block. Therefore, by determining whether or not the corresponding logical block address is stored in the redundant area 26, it is possible to determine whether or not the data has been erased in the block including the redundant area 26. When the corresponding logical block address is not stored in the redundant area 26, the block including the redundant area 26 is in a state where data has been erased.

ブロックステータスは、各ブロックが正常にデータを格納することができない不良ブロックであるか否かを示す。例えば、あるブロックが不良ブロックであるときには、そのブロックに対応して設けられたブロックステータスフラグがオン状態に設定される。   The block status indicates whether each block is a bad block that cannot normally store data. For example, when a certain block is a bad block, a block status flag provided corresponding to the block is set to an on state.

フラッシュメモリ2において、メモリセル16の状態は、セル単位で書込状態から消去状態に変化することができず、その状態変化はブロック単位でのみ行われることができる。このため、あるページに新しいデータを格納するには、その新しいデータを含んだブロックデータが消去済ブロックに書き込まれた後に、古いデータを格納しているブロックのためのブロック消去が行われなければならない。ブロック消去はブロック単位で実行されるので、古いデータを格納していたページを含むブロックでは、全てのページの格納データが消去される。従って、あるページの格納データを書き換えるときには、そのページが含まれているブロック内の他のページの格納データも、消去済ブロックに移転させるための処理が必要となる。   In the flash memory 2, the state of the memory cell 16 cannot change from the written state to the erased state in cell units, and the state change can be performed only in block units. Therefore, in order to store new data on a page, after block data including the new data is written to the erased block, block erasure for the block storing old data must be performed. Don't be. Since block erasure is executed in units of blocks, the stored data of all pages is erased in a block including a page in which old data has been stored. Therefore, when the stored data of a page is rewritten, a process for transferring the stored data of another page in the block including the page to the erased block is required.

書き換えられるべき新しいデータを格納するブロックは、古いデータを格納するブロックとは異なる。従って、ホストシステム4から与えられるアドレス信号によって指定される論理ブロックアドレスと、フラッシュメモリ2における実際のブロックアドレスである物理ブロックアドレスとの対応関係は、フラッシュメモリ2にてデータが書き換えられる毎に、コントローラ3によって動的に調整されなければならない。   The block that stores new data to be rewritten is different from the block that stores old data. Accordingly, the correspondence between the logical block address specified by the address signal given from the host system 4 and the physical block address which is the actual block address in the flash memory 2 is as follows each time data is rewritten in the flash memory 2. It must be adjusted dynamically by the controller 3.

こうした観点に基づき、コントローラ3は、ユーザ領域25へのデータ書込動作に対応して論理ブロックアドレス(対応論理ブロックアドレス)を示す付加情報を冗長領域26に書き込むことにより、論理ブロックアドレスと物理ブロックアドレスの対応関係を管理できるようにしている。   Based on such a viewpoint, the controller 3 writes additional information indicating a logical block address (corresponding logical block address) in response to a data write operation to the user area 25 in the redundant area 26, so that the logical block address and the physical block Address correspondences can be managed.

フラッシュメモリ2のアドレス空間においては、複数のブロックが複数のゾーンのうちの1つに分類される。以下に、ホストシステム4における論理ブロックアドレス空間への、フラッシュメモリ2におけるゾーンの割付例について説明する。   In the address space of the flash memory 2, a plurality of blocks are classified into one of a plurality of zones. An example of zone allocation in the flash memory 2 to the logical block address space in the host system 4 will be described below.

図5に示された例では、1つのゾーンが1024個のブロック#0〜#1023を有している。ブロック#0〜#1023のそれぞれは、32個のページP00〜P31を有している。ブロックは、データ消去動作における処理単位である。ページは、データ読出動作及びデータ書込動作における処理単位である。図5に示されたゾーンは、ホストシステム4において所定範囲の論理ブロックアドレス空間に割り付けられている。   In the example shown in FIG. 5, one zone has 1024 blocks # 0 to # 1023. Each of the blocks # 0 to # 1023 has 32 pages P00 to P31. A block is a processing unit in the data erasing operation. A page is a processing unit in a data read operation and a data write operation. The zones shown in FIG. 5 are allocated to a predetermined range of logical block address spaces in the host system 4.

例えば、1024個のブロックを含んだゾーンは、1000ブロックに相当するデータ容量を有する論理ブロックアドレス空間に割り付けられる。この例では、1つのゾーンにおける記憶容量が、24個のブロックに相当するデータ量分だけ、対応する論理ブロックアドレス空間のデータ容量よりも大きい。この割付では、不良ブロックが考慮されている。フラッシュメモリ2にて格納データが書き換えられるときには、新しいデータを書き込むための予備的なブロックが1つ必要となる。従って、実質的には、1つのゾーンで23個のブロックが余剰ブロックとして扱われる。
1つのゾーンに含まれるブロックの数は、フラッシュメモリシステム1の用途やフラッシュメモリ2の仕様などに基づいて、適宜設定されてもよい。
For example, a zone including 1024 blocks is allocated to a logical block address space having a data capacity corresponding to 1000 blocks. In this example, the storage capacity in one zone is larger than the data capacity of the corresponding logical block address space by the amount of data corresponding to 24 blocks. In this allocation, bad blocks are taken into account. When the stored data is rewritten in the flash memory 2, one preliminary block for writing new data is required. Therefore, substantially 23 blocks are treated as surplus blocks in one zone.
The number of blocks included in one zone may be appropriately set based on the usage of the flash memory system 1 or the specifications of the flash memory 2.

以下に、各ゾーンにおける複数のブロックの分類例について説明する。フラッシュメモリ2内の複数のブロックは、物理ブロックアドレスの順に各ゾーンに分類されることもできる。しかしながら、この場合には、不良ブロックがフラッシュメモリ2の一部分に偏在することにより、特定のゾーンに多くの不良ブロックが分類されることがある。
他方、本発明にかかるフラッシュメモリシステム1では、特定のゾーンに不良ブロックが集中することを防止するために、1つのゾーンに含まれる複数のブロックが、フラッシュメモリ2内で分散されている。
Hereinafter, an example of classification of a plurality of blocks in each zone will be described. A plurality of blocks in the flash memory 2 can be classified into zones in the order of physical block addresses. However, in this case, many bad blocks may be classified into a specific zone due to the bad blocks being unevenly distributed in a part of the flash memory 2.
On the other hand, in the flash memory system 1 according to the present invention, a plurality of blocks included in one zone are distributed in the flash memory 2 in order to prevent bad blocks from being concentrated in a specific zone.

図6は、フラッシュメモリ2が有する複数のブロックを複数のゾーンのうちの1つに分類するための処理を示す概略図である。図6において、ホストシステム4から与えられる論理ブロックアドレスLBAは、アドレス変換テーブル31によって、仮想ブロックアドレスVBAに変換される。例えば、アドレス変換テーブル31は、ワークエリア8に格納され、ホストインタフェース制御ブロック5によって参照される。仮想ブロックアドレスVBAは、分散処理部32により、物理ブロックアドレスPBAと関連づけられる。例えば、フラッシュシーケンサブロック12は、所定のプログラムを実行することにより、図6に示す分散処理部32として機能することが好ましい。   FIG. 6 is a schematic diagram showing a process for classifying a plurality of blocks included in the flash memory 2 into one of a plurality of zones. In FIG. 6, the logical block address LBA given from the host system 4 is converted into a virtual block address VBA by the address conversion table 31. For example, the address conversion table 31 is stored in the work area 8 and is referred to by the host interface control block 5. The virtual block address VBA is associated with the physical block address PBA by the distributed processing unit 32. For example, the flash sequencer block 12 preferably functions as the distributed processing unit 32 shown in FIG. 6 by executing a predetermined program.

仮想ブロックアドレスVBAは、1つのゾーンに含まれる複数のブロックに付けられたシリアル番号を、そのゾーンに対応するオフセット値に加算することにより、与えられる。図7に示した例では、各ゾーンに対して1024個のブロックが分類される。従って、1つのゾーン内では、各ブロックに対して“0”から"1023"までのシリアル番号が付されている。各ゾーンに対応するオフセット値は、以下の通りである。
ゾーン#0:0,
ゾーン#1:1024×1,
ゾーン#2:1024×2,
......
ゾーン#N:1024×N.
The virtual block address VBA is given by adding serial numbers attached to a plurality of blocks included in one zone to an offset value corresponding to the zone. In the example shown in FIG. 7, 1024 blocks are classified for each zone. Therefore, in one zone, serial numbers from “0” to “1023” are assigned to each block. The offset values corresponding to each zone are as follows.
Zone # 0: 0
Zone # 1: 1024x1,
Zone # 2: 1024 × 2,
. . . . . .
Zone #N: 1024 × N.

仮想ブロックアドレス空間では、フラッシュメモリ2内の全てのブロックが、仮想ブロックアドレスVBAが1ずつ増加するように配置されている。ブロックのシリアル番号及び仮想ブロックアドレスVBAがビットデータ(バイナリデータ)の形式であるときには、各ゾーンに割り振られたゾーン番号(バイナリデータ)をブロックのシリアル番号よりも上位のビットに挿入することにより、仮想ブロックアドレスVBAが与えられる。ゾーン#0〜#7のそれぞれが1024個のブロックを含んでいるとき、ブロックのシリアル番号は、10ビットのデータ("00 0000 0000"から"11 1111 1111"まで)によって表示される。   In the virtual block address space, all the blocks in the flash memory 2 are arranged so that the virtual block address VBA increases by one. When the block serial number and the virtual block address VBA are in the form of bit data (binary data), the zone number (binary data) assigned to each zone is inserted into the higher order bits than the block serial number, A virtual block address VBA is given. When each of the zones # 0 to # 7 includes 1024 blocks, the serial number of the block is displayed by 10-bit data (from “00 0000 0000” to “11 1111 1111”).

8個のゾーン#0〜#7には、3ビットのデータ("000"から"111"まで)が、ゾーン番号として割り振られる。この場合には、ブロックのシリアル番号よりも上位のビットにゾーン番号を挿入することによって、13ビットの仮想ブロックアドレスVBAが作成される。例えば、ゾーン番号が"100"であるゾーン#4内でシリアル番号"16"(2進数形式で"00 0001 0000")を有するブロックの仮想ブロックアドレスVBAは、2進数形式で"1 0000 0001 0000"となる。分散処理部32は、仮想ブロックアドレスVBAを物理ブロックアドレスPBAと関連づけるために、予め用意された関数またはテーブルを参照する。   Three bits of data (from “000” to “111”) are allocated to the eight zones # 0 to # 7 as zone numbers. In this case, a 13-bit virtual block address VBA is created by inserting a zone number into bits higher than the block serial number. For example, the virtual block address VBA of the block having the serial number “16” (“00 0001 0000” in binary format) in the zone # 4 having the zone number “100” is “1 0000 0001 0000” in binary format. "Become. The distributed processing unit 32 refers to a function or table prepared in advance in order to associate the virtual block address VBA with the physical block address PBA.

図7は、論理ブロックアドレスLBAと、仮想ブロックアドレスVBAと、物理ブロックアドレスPBAとの間での相関関係を示している。図7では、1000個のブロック毎に分割された複数の論理ブロックアドレス空間のそれぞれが、1024個のブロックを含む複数のゾーン#0〜#Nのそれぞれに割り付けられている。ゾーン#Kにおける仮想ブロックアドレスの最小値は、ゾーン#(K−1)における仮想ブロックアドレスVBAの最大値よりも1だけ大きい(1≦K≦N)。   FIG. 7 shows the correlation among the logical block address LBA, the virtual block address VBA, and the physical block address PBA. In FIG. 7, each of a plurality of logical block address spaces divided every 1000 blocks is assigned to each of a plurality of zones # 0 to #N including 1024 blocks. The minimum value of the virtual block address in the zone #K is 1 larger than the maximum value of the virtual block address VBA in the zone # (K−1) (1 ≦ K ≦ N).

この仮想ブロックアドレスVBAの設定により、仮想ブロックアドレス空間では、ゾーン#0〜#Nのうちで互いに隣り合っている任意の2つのゾーンが仮想ブロックアドレスVBAを媒介して連結されている。仮想ブロックアドレスVBAは、分散処理部32により、予め用意された関数またはテーブルの設定に従って、物理ブロックアドレスPBAと関連づけられる。分散処理部32によって参照される関数またはテーブルは、互いに大きく異なる物理ブロックアドレスPBAを有する複数のブロックを、ゾーン#0〜#7のうちの1つに分類するべく設計されていればよい。この結果として、1000ブロック毎に分割された論理ブロックアドレス空間に、フラッシュメモリ2内で分散されている1024個のブロックが含まれるゾーンを割り付けることができる。   By setting the virtual block address VBA, in the virtual block address space, any two adjacent zones among the zones # 0 to #N are connected via the virtual block address VBA. The virtual block address VBA is associated with the physical block address PBA by the distributed processing unit 32 according to the function or table setting prepared in advance. The function or table referred to by the distributed processing unit 32 only needs to be designed to classify a plurality of blocks having greatly different physical block addresses PBA into one of zones # 0 to # 7. As a result, a zone including 1024 blocks distributed in the flash memory 2 can be allocated to the logical block address space divided every 1000 blocks.

以下に、分散処理部32によって実行される分散処理を説明する。フラッシュメモリ2内で分散されている複数のブロックは、分散処理が実行されることにより、複数のゾーンのうちの1つに分類される。この分散処理において、分散処理部32は、仮想ブロックアドレスVBAを物理ブロックアドレスPBAと関連づける。分散処理を実行するために、分散処理部32は、図8に示されるようなアドレスレジスタ33と、処理設定レジスタ34とを使用する。例えば、アドレスレジスタ33及び処理設定レジスタ34は、フラッシュシーケンサブロック12内に含まれていてもよい。   Hereinafter, distributed processing executed by the distributed processing unit 32 will be described. The plurality of blocks distributed in the flash memory 2 are classified into one of the plurality of zones by executing the distributed processing. In this distributed processing, the distributed processing unit 32 associates the virtual block address VBA with the physical block address PBA. In order to execute the distributed processing, the distributed processing unit 32 uses an address register 33 and a processing setting register 34 as shown in FIG. For example, the address register 33 and the process setting register 34 may be included in the flash sequencer block 12.

仮想ブロックアドレスVBAは、フラッシュメモリ2の仮想アドレス空間内で複数のページのそれぞれに割り当てられた複数の仮想ページアドレスのそれぞれに、含まれている。仮想ページアドレスは、仮想ブロックアドレスVBAと、5ビットのページ番号とを含んでいる。5ビットのページ番号は、1つのブロックに含まれる32個のページのそれぞれを識別するために使用される。アドレスレジスタ33は、仮想ページアドレスを一時的に格納する。処理設定レジスタ34は、仮想ブロックアドレスVBAと物理ブロックアドレスPBAとの対応関係を示す情報を格納する。   The virtual block address VBA is included in each of a plurality of virtual page addresses assigned to each of a plurality of pages in the virtual address space of the flash memory 2. The virtual page address includes a virtual block address VBA and a 5-bit page number. The 5-bit page number is used to identify each of the 32 pages included in one block. The address register 33 temporarily stores the virtual page address. The process setting register 34 stores information indicating the correspondence between the virtual block address VBA and the physical block address PBA.

分散処理部32は、物理ブロックアドレスPBAを生成するために、アドレスレジスタ33に格納されている仮想ページアドレスに含まれている仮想ブロックアドレスVBAを読み出す。そして、分散処理部32は、処理設定レジスタ34に格納されている情報に基づいて、アドレスレジスタ33に格納されている仮想ブロックアドレスVBAを、物理ブロックアドレスPBAに置き換える。
アドレスレジスタ33に格納されている仮想ページアドレスに含まれているページ番号を、分散処理部32によって生成された物理ブロックアドレスPBAに付加することにより、物理ページアドレスが作成される。その物理ページアドレスは、フラッシュメモリ2のメモリ空間35へと提供される。
The distribution processing unit 32 reads the virtual block address VBA included in the virtual page address stored in the address register 33 in order to generate the physical block address PBA. Then, the distributed processing unit 32 replaces the virtual block address VBA stored in the address register 33 with the physical block address PBA based on the information stored in the process setting register 34.
A physical page address is created by adding the page number included in the virtual page address stored in the address register 33 to the physical block address PBA generated by the distributed processing unit 32. The physical page address is provided to the memory space 35 of the flash memory 2.

図9は、アドレスレジスタ33に格納された仮想ページアドレスに基づいて物理ページアドレスを作成するための動作を示している。
図9に示されている仮想ページアドレスは、ページ番号を示す下位の5ビットデータと、仮想ブロックアドレスVBAを示す上位の13ビットデータとに分割される。
FIG. 9 shows an operation for creating a physical page address based on the virtual page address stored in the address register 33.
The virtual page address shown in FIG. 9 is divided into lower 5-bit data indicating the page number and upper 13-bit data indicating the virtual block address VBA.

分散処理部32は、仮想ブロックアドレスVBAを示す上位の13ビットデータを、物理ブロックアドレスPBAを示す別の13ビットデータに置き換える。図9に示された例では、仮想ページアドレスに含まれている上位の13ビットデータが、仮想ブロックアドレスVBAとして、"0 0001 0001 0001"を示している。"0 0001 0001 0001"は、分散処理部32によって、物理ブロックアドレスPBAとしての"1 1001 1001 1001"に置き換えられる。
分散処理部32によって実行される分散処理では、仮想ブロックアドレスVBAを示すビットデータは物理ブロックアドレスPBAを示すビットデータに置き換えられるが、ページ番号を示す5ビットデータは変更されない。仮想ページアドレス内で仮想ブロックアドレスVBAを示すビットの数は、フラッシュメモリ2に設けられたブロックの数に対応して決定される。
The distributed processing unit 32 replaces the upper 13-bit data indicating the virtual block address VBA with another 13-bit data indicating the physical block address PBA. In the example shown in FIG. 9, the upper 13-bit data included in the virtual page address indicates “0 0001 0001 0001” as the virtual block address VBA. “0 0001 0001 0001” is replaced by “1 1001 1001 1001” as the physical block address PBA by the distributed processing unit 32.
In the distributed processing executed by the distributed processing unit 32, bit data indicating the virtual block address VBA is replaced with bit data indicating the physical block address PBA, but 5-bit data indicating the page number is not changed. The number of bits indicating the virtual block address VBA in the virtual page address is determined corresponding to the number of blocks provided in the flash memory 2.

仮想ページアドレス内でページ番号を示すビットの数は、1つのブロックに含まれるページの数に対応して決定される。例えば、フラッシュメモリ2において、メモリ空間が8192個のブロックに分割されており、1つのブロックが32個のページを有しているとき、13ビットのデータによって仮想ブロックアドレスVBAが識別されるとともに、5ビットのデータによってページ番号が識別される。   The number of bits indicating the page number in the virtual page address is determined corresponding to the number of pages included in one block. For example, in the flash memory 2, when the memory space is divided into 8192 blocks and one block has 32 pages, the virtual block address VBA is identified by 13-bit data, The page number is identified by 5-bit data.

次に、仮想ブロックアドレスVBAと物理ブロックアドレスPBAとの間の対応関係を設定するための処理について説明する。
図10は、仮想ブロックアドレスVBAが直接的に物理ブロックアドレスPBAに割り当てられている場合の、仮想ブロックアドレスVBAと物理ブロックアドレスPBAとの間の対応関係を示している。
図10に示す例では、分散処理部32が分散処理を実行しない。この場合、フラッシュメモリ2内の各ブロックが有する物理ブロックアドレスPBAは、仮想ブロックアドレスVBAと一致する。
Next, processing for setting the correspondence between the virtual block address VBA and the physical block address PBA will be described.
FIG. 10 shows the correspondence between the virtual block address VBA and the physical block address PBA when the virtual block address VBA is directly assigned to the physical block address PBA.
In the example illustrated in FIG. 10, the distributed processing unit 32 does not execute the distributed processing. In this case, the physical block address PBA of each block in the flash memory 2 matches the virtual block address VBA.

従って、仮想アドレス空間におけるゾーン#0〜#7のそれぞれは、物理ブロックアドレスPBAに従って、フラッシュメモリ2における複数の物理的な区域のそれぞれに、割り付けられている。この場合、例えば、物理ブロックアドレスPBAとして"0 0100 0000 0000(1024)"から"0 0111 1111 1111(2047)"までが割り振られた1024個のメモリセル16で構成されるメモリ区域に30個の不良ブロックが含まれているとき、その30個の不良ブロックがゾーン#1に分類される。   Accordingly, each of the zones # 0 to # 7 in the virtual address space is allocated to each of a plurality of physical areas in the flash memory 2 according to the physical block address PBA. In this case, for example, there are 30 memory areas composed of 1024 memory cells 16 allocated from “0 0100 0000 0000 (1024)” to “0 0111 1111 1111 (2047)” as physical block addresses PBA. When bad blocks are included, the 30 bad blocks are classified into zone # 1.

この場合、ホストシステム4においてゾーン#1に対応する論理ブロックアドレス空間に対して提供されたデータの全てがフラッシュメモリ2において正しく格納される保証はない。不良ブロックがデータを格納するために使用される有効ブロックから排除される場合には、ゾーン#1において有効ブロックとして使用するためのブロックが不足する。   In this case, there is no guarantee that all data provided to the logical block address space corresponding to zone # 1 in the host system 4 is correctly stored in the flash memory 2. When the bad block is excluded from the valid blocks used for storing data, there are not enough blocks to be used as valid blocks in the zone # 1.

不良ブロックが論理ブロックアドレス空間の一部分に割り当てられたときには、ホストシステム4がその一部分に対して提供したデータは、フラッシュメモリ2において適切に格納されることができない。本発明にかかるフラッシュメモリシステム1は、複数のゾーンのそれぞれに分類される不良ブロックの数が平均化されるように、仮想ブロックアドレスVBAと物理ブロックアドレスPBAの対応関係を設定する。   When a bad block is assigned to a part of the logical block address space, the data provided by the host system 4 to that part cannot be properly stored in the flash memory 2. The flash memory system 1 according to the present invention sets the correspondence relationship between the virtual block address VBA and the physical block address PBA so that the number of bad blocks classified into each of a plurality of zones is averaged.

例えば、フラッシュメモリシステム1は、仮想ブロックアドレスVBAと物理ブロックアドレスPBAの対応関係を記述する複数の置換テーブルを備えている。複数の置換テーブルは、コントローラ3内で固定的なデータ及びプログラムを記憶するROM(Read Only Memory)に予め記憶されてもよい。あるいは、複数の置換テーブルは、フラッシュメモリ2内で所定の記憶領域に予め記憶され、コントローラ3によって読み出されてもよい。   For example, the flash memory system 1 includes a plurality of replacement tables that describe the correspondence between the virtual block address VBA and the physical block address PBA. The plurality of replacement tables may be stored in advance in a ROM (Read Only Memory) that stores fixed data and programs in the controller 3. Alternatively, the plurality of replacement tables may be stored in advance in a predetermined storage area in the flash memory 2 and read by the controller 3.

図11は、置換テーブルの一例を示している。置換テーブルは、仮想ブロックアドレスVBAを物理ブロックアドレスPBAと関連付けている。フラッシュメモリシステム1は、分散処理を実行するために、各ゾーンに分類される不良ブロックの最大数を最小化する置換テーブルの1つを選択する。   FIG. 11 shows an example of the replacement table. The replacement table associates the virtual block address VBA with the physical block address PBA. The flash memory system 1 selects one of the replacement tables that minimizes the maximum number of bad blocks classified in each zone in order to execute distributed processing.

複数の置換テーブルのうちの1つを選択するために、コントローラ3は、フラッシュメモリ2内にある全ての不良ブロックを検出し、置換テーブルのうちの1つに従って各不良ブロックに対応した仮想ブロックアドレスVBAを特定する。続いて、コントローラ3は、不良ブロックに対応した仮想ブロックアドレスVBAに基づいて、各ゾーンに含まれる不良ブロックの数を集計する。コントローラ3は、各置換テーブルに対応した集計結果を参照することにより、各ゾーンに分類される不良ブロックの最大数を最小化する置換テーブルを検出する。   In order to select one of the plurality of replacement tables, the controller 3 detects all bad blocks in the flash memory 2, and the virtual block address corresponding to each bad block according to one of the replacement tables Specify the VBA. Subsequently, the controller 3 counts the number of defective blocks included in each zone based on the virtual block address VBA corresponding to the defective blocks. The controller 3 detects a replacement table that minimizes the maximum number of defective blocks classified into each zone by referring to the aggregation result corresponding to each replacement table.

不良ブロックが分類されているゾーンを特定するために、コントローラ3は、不良ブロックに付された物理ブロックアドレスPBAを、置換テーブル内にて検索する。不良ブロックに付された物理ブロックアドレスPBAが検出されたときには、その置換テーブルにて当該物理ブロックアドレスPBAと関連付けられた仮想ブロックアドレスVBAが読み出される。仮想ブロックアドレスVBAは、1024個ごとに、複数のゾーンのうちの1つに割り付けられている。従って、1つの不良ブロックに付された1つの仮想ブロックアドレスVBAに対応して、1つのゾーンが特定される。   In order to specify the zone in which the bad block is classified, the controller 3 searches the replacement table for the physical block address PBA assigned to the bad block. When the physical block address PBA assigned to the bad block is detected, the virtual block address VBA associated with the physical block address PBA in the replacement table is read. The virtual block address VBA is assigned to one of a plurality of zones every 1024. Accordingly, one zone is specified corresponding to one virtual block address VBA assigned to one bad block.

例えば、コントローラ3によって検出された不良ブロックは、図12に示すような物理ブロックアドレスPBAを有する。
図12にて示される不良ブロックのリストにおいて不良ブロックの物理ブロックアドレスPBAとして一番上に記されている"0 0100 0000 0001"は、図11にて示される置換テーブルで物理ブロックアドレスPBAを記した列において、上から8番目に記述されている。従って、図11にて示される置換テーブルにより、"0 0000 0000 0111"が、物理ブロックアドレスPBAとしての"0 0100 0000 0001"に対応した不良ブロックの仮想ブロックアドレスVBAとして、特定される。物理ブロックアドレスPBAにおける"0 0100 0000 0001"は、ゾーン#0に割り付けられた"0 0000 0000 0000"から"0 0011 1111 1111"までの仮想アドレス範囲に含まれている。上記のようにして、図12にて一番上に記されている不良ブロックはゾーン#0に分類されていることが、特定される。
For example, the bad block detected by the controller 3 has a physical block address PBA as shown in FIG.
In the list of bad blocks shown in FIG. 12, “0 0100 0000 0001”, which is written at the top as the physical block address PBA of the bad block, describes the physical block address PBA in the replacement table shown in FIG. In the above column, it is described eighth from the top. Therefore, “0 0000 0000 0111” is specified as the virtual block address VBA of the defective block corresponding to “0 0100 0000 0001” as the physical block address PBA by the replacement table shown in FIG. “0 0100 0000 0001” in the physical block address PBA is included in a virtual address range from “0 0000 0000 0000” to “0 0011 1111 1111” assigned to the zone # 0. As described above, it is specified that the defective block shown at the top in FIG. 12 is classified into zone # 0.

フラッシュメモリ2における8192個のブロックが、図13に示すように8つのゾーンに分類されているとき、ゾーン#0〜#7のそれぞれに分類されている不良ブロックの総数として、変数Nb0〜Nb7のそれぞれが算定される。変数Nb0〜Nb7のうちの最大値は、各ゾーンに分類される不良ブロックの最大数を示す。   When 8192 blocks in the flash memory 2 are classified into 8 zones as shown in FIG. 13, the total number of defective blocks classified in each of the zones # 0 to # 7 is represented by variables Nb0 to Nb7. Each is calculated. The maximum value among the variables Nb0 to Nb7 indicates the maximum number of defective blocks classified into each zone.

例えば、変数Nb0〜Nb7のそれぞれが、以下のように算定される。
Nb0=5,
Nb1=3,
Nb2=8,
Nb3=2,
Nb4=6,
Nb5=4,
Nb6=9,
Nb7=7.
この場合、ゾーン#6に分類される不良ブロックの数を示す変数Nb6が、変数Nb0〜Nb7のうちの最大値となる。従って、変数Nb6によって示される"9"が、各ゾーンに分類される不良ブロックの最大数である。
For example, each of the variables Nb0 to Nb7 is calculated as follows.
Nb0 = 5
Nb1 = 3
Nb2 = 8,
Nb3 = 2
Nb4 = 6
Nb5 = 4
Nb6 = 9,
Nb7 = 7.
In this case, the variable Nb6 indicating the number of defective blocks classified into the zone # 6 is the maximum value among the variables Nb0 to Nb7. Therefore, “9” indicated by the variable Nb6 is the maximum number of defective blocks classified into each zone.

複数の置換テーブルのそれぞれに対応して、各ゾーンに分類される不良ブロックの最大数が特定された後、その最大数を最小化する置換テーブルの1つが、分散処理を実行するために選択される。例えば、フラッシュメモリシステム1が5つの置換テーブルTb1〜Tb5を有している。置換テーブルTb1に対応して算定された変数Nb0〜Nb7の最大値は、Nb3=9である。置換テーブルTb2に対応して算定された変数Nb0〜Nb7の最大値は、Nb6=8である。置換テーブルTb3に対応して算定された変数Nb0〜Nb7の最大値は、Nb7=10である。置換テーブルTb4に対応して算定された変数Nb0〜Nb7の最大値は、Nb0=15である。置換テーブルTb5に対応して算定された変数Nb0〜Nb7の最大値は、Nb4=6である。この場合、不良ブロックの最大数を最小化するテーブルとして、置換テーブルTb5が選択される。   Corresponding to each of the plurality of replacement tables, after the maximum number of bad blocks classified into each zone is identified, one of the replacement tables that minimizes the maximum number is selected to perform the distributed processing. The For example, the flash memory system 1 has five replacement tables Tb1 to Tb5. The maximum value of the variables Nb0 to Nb7 calculated corresponding to the replacement table Tb1 is Nb3 = 9. The maximum value of the variables Nb0 to Nb7 calculated corresponding to the replacement table Tb2 is Nb6 = 8. The maximum value of the variables Nb0 to Nb7 calculated corresponding to the replacement table Tb3 is Nb7 = 10. The maximum value of the variables Nb0 to Nb7 calculated corresponding to the replacement table Tb4 is Nb0 = 15. The maximum value of the variables Nb0 to Nb7 calculated corresponding to the replacement table Tb5 is Nb4 = 6. In this case, the replacement table Tb5 is selected as a table that minimizes the maximum number of defective blocks.

分散処理を実行するために選択された置換テーブルは、図8にて示される処理設定レジスタ34に格納された情報によって特定される。上記のようにして選択された置換テーブルは、仮想ブロックアドレスVBAを物理ブロックアドレスPBAに置き換えるために、分散処理部32によって参照される。   The replacement table selected to execute the distributed processing is specified by the information stored in the processing setting register 34 shown in FIG. The replacement table selected as described above is referred to by the distributed processing unit 32 in order to replace the virtual block address VBA with the physical block address PBA.

仮想ブロックアドレス(VBA)と物理ブロックアドレス(PBA)の対応関係は、予め定められた関数によって設定されてもよい。この場合、フラッシュメモリシステム1において、コントローラ3は、複数種類の関数を定義する情報を予め記憶している。   The correspondence relationship between the virtual block address (VBA) and the physical block address (PBA) may be set by a predetermined function. In this case, in the flash memory system 1, the controller 3 stores in advance information defining a plurality of types of functions.

コントローラ3は、各ゾーンに分類される不良ブロックの最大数を最小化する関数を選択する。コントローラ3において定義されている関数は、仮想ブロックアドレス空間と物理ブロックアドレス空間の間で1対1写像を行うためのものである。各不良ブロックが分類されるゾーンは、分散処理部32による分散処理で使用される関数に対する逆関数によって、特定することができる。   The controller 3 selects a function that minimizes the maximum number of bad blocks classified into each zone. The function defined in the controller 3 is for performing a one-to-one mapping between the virtual block address space and the physical block address space. The zone into which each bad block is classified can be specified by an inverse function with respect to a function used in distributed processing by the distributed processing unit 32.

コントローラ3において定義されている関数によって生成される写像は、周期軌道を描くことが望ましい。言い換えると、コントローラ3において定義されている関数は、写像循環を生成するためのものであることが望ましい。周期軌道を形成するための写像の一例として、テント写像が用いられてもよい。テント写像は、以下の等式(1)、(2)で定義される関数F(x)を使用することによって、実行される。   The map generated by the function defined in the controller 3 preferably draws a periodic trajectory. In other words, it is desirable that the function defined in the controller 3 is for generating a mapping cycle. As an example of a map for forming a periodic orbit, a tent map may be used. The tent mapping is performed by using the function F (x) defined by the following equations (1) and (2).

変数xが0≦x<2(n−1)のとき
F(x)=2x (1)
変数xが2(n−1)≦x<2のとき
F(x)=−2x+2(n+1)−1 (2)
When variable x is 0 ≦ x <2 (n−1) F (x) = 2x (1)
When variable x is 2 (n-1) ≤x < 2n F (x) =-2x + 2 (n + 1) -1 (2)

分散処理の対象となるブロックには、0から順番にシリアル番号が付される。等式(1)、(2)において、変数nには、ブロックに付されたシリアル番号を2進数コードの形式で表示するために必要な桁数が代入される。例えば、8192個のブロックが分散処理の対象となるとき、ブロックに付されたシリアル番号の最大値"8191"は、2進数コードの形式で"1 1111 1111 1111"となる。このとき、変数nには、"13"が代入される。   Serial numbers are assigned in order from 0 to the blocks to be distributed. In equations (1) and (2), the variable n is assigned the number of digits necessary to display the serial number assigned to the block in the form of a binary code. For example, when 8192 blocks are to be distributed, the maximum serial number “8191” assigned to the block is “1 1111 1111 1111” in binary code format. At this time, “13” is assigned to the variable n.

等式(1)、(2)で示される関数F(x)を使用した変換をn+1回実行することにより得られる関数値は、元の値と一致する。言い換えると、等式(1)、(2)で示される関数F(x)による写像は、循環周期T=n+1を有している。例えば、変数nに"4"が代入されるとともに、元の値として変数xに“1”が代入されたときには、関数F(x)を使用した変換を5回実行することにより得られる関数値は、下記のように、元の値“1”と一致する。
F(1)=2×1=2,
F(2)=2×2=4,
F(4)=2×4=8,
F(8)=−2×8+32−1=15,
F(15)=−2×15+32−1=1.
The function value obtained by executing the conversion using the function F (x) represented by the equations (1) and (2) n + 1 times coincides with the original value. In other words, the mapping by the function F (x) shown in equations (1) and (2) has a circulation period T = n + 1. For example, when “4” is assigned to the variable n and “1” is assigned to the variable x as the original value, the function value obtained by executing the conversion using the function F (x) five times. Matches the original value “1” as follows:
F (1) = 2 × 1 = 2
F (2) = 2 × 2 = 4
F (4) = 2 × 4 = 8,
F (8) = − 2 × 8 + 32−1 = 15,
F (15) =-2 * 15 + 32-1 = 1.

関数F(x)を使用した変換の実行回数を示す変数a及びbが、以下の等式(3)で示される関係を有すると仮定する。
a+b=n+1 (3)
この場合、等式(1)、(2)で示される関数F(x)による写像は循環周期T=n+1を有していることから、関数F(x)を使用したa回の変換は、b回の変換の逆変換となる。例えば、変数nに"4"が代入されるとともに、元の値として変数xに“1”が代入されたときには、関数F(x)を使用した変換を2回実行することにより、関数値"4"が得られる。他方、変数nに "4"が代入されるとともに、元の値として変数xに"4"が代入されたときには、関数F(x)を使用した変換を3回実行することにより、関数値“1”が得られる。関数F(x)による写像の循環周期Tと、各ゾーンに分類されるブロックの総数Mは、以下の等式(4)で示される関係を満たすことが望ましい。
M=2(T−1) (4)
Assume that the variables a and b indicating the number of executions of the conversion using the function F (x) have a relationship represented by the following equation (3).
a + b = n + 1 (3)
In this case, since the mapping by the function F (x) represented by the equations (1) and (2) has a circulation period T = n + 1, a conversion using the function F (x) is performed as follows: This is an inverse conversion of b conversions. For example, when “4” is assigned to the variable n and “1” is assigned to the variable x as the original value, the transformation using the function F (x) is executed twice, thereby obtaining the function value “ 4 "is obtained. On the other hand, when “4” is assigned to the variable n and “4” is assigned to the variable x as the original value, the conversion using the function F (x) is executed three times to obtain the function value “ 1 "is obtained. It is desirable that the mapping cycle T by the function F (x) and the total number M of blocks classified in each zone satisfy the relationship represented by the following equation (4).
M = 2 (T-1) (4)

図13は、上記の等式(1)、(2)で示される関数F(x)を用いた仮想ブロックアドレス空間と物理ブロックアドレス空間との間のマッピング例を示している。
図13において、フラッシュメモリ2の物理ブロックアドレス空間は、8192個のブロックに分割されている。等式(1)、(2)で示される関数F(x)を用いた分散処理を実行するために、図14に示すような分散処理部32からの出力をチェックするモニタレジスタ36が適用される。処理設定レジスタ34には、関数F(x)を用いた変換の実行回数を示す情報が格納される。
FIG. 13 shows an example of mapping between the virtual block address space and the physical block address space using the function F (x) expressed by the above equations (1) and (2).
In FIG. 13, the physical block address space of the flash memory 2 is divided into 8192 blocks. In order to execute the distributed processing using the function F (x) represented by the equations (1) and (2), a monitor register 36 for checking the output from the distributed processing unit 32 as shown in FIG. 14 is applied. The The process setting register 34 stores information indicating the number of executions of conversion using the function F (x).

フラッシュメモリ2に8192個のブロックが含まれているときには、関数F(x)における変数nが"13"に設定される。処理設定レジスタ34に格納された情報が示す変換の実行回数は、“0”から"13"までの範囲内にある。変換の実行回数は、各ゾーンに分類される不良ブロックの最大数を最小化する数値に設定される。   When the flash memory 2 includes 8192 blocks, the variable n in the function F (x) is set to “13”. The number of conversions indicated by the information stored in the process setting register 34 is in the range from “0” to “13”. The number of executions of conversion is set to a numerical value that minimizes the maximum number of defective blocks classified into each zone.

各ゾーンに分類される不良ブロックの最大数を最小化する変換の実行回数は、以下のようにして決定される。始めに、コントローラ3は、フラッシュメモリ2内にある全ての不良ブロックを検出する。この検出処理において、処理設定レジスタ34に変換の実行回数として“0”を示す情報が設定される。   The number of conversions that minimizes the maximum number of bad blocks classified in each zone is determined as follows. First, the controller 3 detects all defective blocks in the flash memory 2. In this detection process, information indicating “0” is set in the process setting register 34 as the number of executions of conversion.

すなわち、仮想ブロックアドレスVBAが直接的に物理ブロックアドレスPBAへと変換される状態において、フラッシュメモリ2におけるデータの消去、書込み、読出し等によって、コントローラ3は不良ブロックを検出する。これに続いて、分散処理部32は、処理設定レジスタ34に変換の実行回数として“1”を示す情報を設定した後に、上記の検出処理において検出された不良ブロックに付された物理ブロックアドレスPBAを変数xに設定することにより、関数F(x)の写像を生成する。   That is, in a state where the virtual block address VBA is directly converted into the physical block address PBA, the controller 3 detects a defective block by erasing, writing, reading, or the like in the flash memory 2. Subsequently, the distribution processing unit 32 sets information indicating “1” as the number of executions of conversion in the processing setting register 34, and then the physical block address PBA assigned to the defective block detected in the detection processing described above. Is set to a variable x to generate a mapping of the function F (x).

モニタレジスタ36は、分散処理部32による変換結果を蓄積する。モニタレジスタ36に蓄積された値は、不良ブロックの仮想ブロックアドレスVBAとして読み出される。コントローラ3は、不良ブロックの仮想ブロックアドレスVBAに基づいて、各ゾーンに含まれる不良ブロックの数を集計する。コントローラ3は、処理設定レジスタ34に格納される情報を、変換の実行回数が1ずつ増加するべく更新する。   The monitor register 36 stores the conversion result obtained by the distributed processing unit 32. The value stored in the monitor register 36 is read as the virtual block address VBA of the bad block. The controller 3 totals the number of bad blocks included in each zone based on the virtual block address VBA of the bad block. The controller 3 updates the information stored in the process setting register 34 so that the number of conversion executions increases by one.

処理設定レジスタ34に格納された情報によって示される変換の実行回数に対応した写像のグループが分散処理部32によって生成されるごとに、コントローラ3は、各ゾーンに含まれる不良ブロックの数を集計する。コントローラ3は、変換の実行回数に対応した集計結果を参照することにより、各ゾーンに分類される不良ブロックの最大数を最小化する変換の実行回数を検出する。   Each time the distributed processing unit 32 generates a mapping group corresponding to the number of conversions indicated by the information stored in the processing setting register 34, the controller 3 counts the number of defective blocks included in each zone. . The controller 3 detects the number of conversion executions that minimizes the maximum number of defective blocks classified in each zone by referring to the total result corresponding to the number of conversion executions.

例えば、関数F(x)を用いた変換の実行回数に対応して、各ゾーンにおける不良ブロックの最大数が、次のように特定されたとする。
変換の実行回数が1回のとき、変数Nb0〜Nb7のうちの最大値がNb4=8。
変換の実行回数が2回のとき、変数Nb0〜Nb7のうちの最大値がNb6=10。
変換の実行回数が3回のとき、変数Nb0〜Nb7のうちの最大値がNb1=9。
変換の実行回数が4回のとき、変数Nb0〜Nb7のうちの最大値がNb5=11。
変換の実行回数が5回のとき、変数Nb0〜Nb7のうちの最大値がNb3=13。
変換の実行回数が6回のとき、変数Nb0〜Nb7のうちの最大値がNb2=9。
変換の実行回数が7回のとき、変数Nb0〜Nb7のうちの最大値がNb0=8。
変換の実行回数が8回のとき、変数Nb0〜Nb7のうちの最大値がNb6=6。
変換の実行回数が9回のとき、変数Nb0〜Nb7のうちの最大値がNb4=8。
変換の実行回数が10回のとき、変数Nb0〜Nb7のうちの最大値がNb7=10。
変換の実行回数が11回のとき、変数Nb0〜Nb7のうちの最大値がNb2=7。
変換の実行回数が12回のとき、変数Nb0〜Nb7のうちの最大値がNb0=9。
変換の実行回数が13回のとき、変数Nb0〜Nb7のうちの最大値がNb3=12。
For example, it is assumed that the maximum number of defective blocks in each zone is specified as follows, corresponding to the number of times of conversion using the function F (x).
When the number of conversions is one, the maximum value among the variables Nb0 to Nb7 is Nb4 = 8.
When the conversion execution number is 2, the maximum value among the variables Nb0 to Nb7 is Nb6 = 10.
When the number of conversion executions is 3, the maximum value among the variables Nb0 to Nb7 is Nb1 = 9.
When the number of conversions is four, the maximum value among the variables Nb0 to Nb7 is Nb5 = 11.
When the number of executions of the conversion is 5, the maximum value among the variables Nb0 to Nb7 is Nb3 = 13.
When the number of conversion executions is 6, the maximum value among the variables Nb0 to Nb7 is Nb2 = 9.
When the conversion execution number is 7, the maximum value among the variables Nb0 to Nb7 is Nb0 = 8.
When the conversion execution number is 8, the maximum value among the variables Nb0 to Nb7 is Nb6 = 6.
When the conversion execution number is 9, the maximum value among the variables Nb0 to Nb7 is Nb4 = 8.
When the conversion execution number is 10, the maximum value among the variables Nb0 to Nb7 is Nb7 = 10.
When the conversion execution count is 11, the maximum value among the variables Nb0 to Nb7 is Nb2 = 7.
When the conversion execution count is 12, the maximum value among the variables Nb0 to Nb7 is Nb0 = 9.
When the number of conversions is 13, the maximum value among the variables Nb0 to Nb7 is Nb3 = 12.

この場合には、変換の実行回数が8回であるときに、各ゾーンに分類される不良ブロックの最大数が最小化される。各ゾーンに分類される不良ブロックの数が集計されるときには、不良ブロックの物理ブロックアドレスPBAが仮想ブロックアドレスVBAに変換される。   In this case, when the number of conversion executions is 8, the maximum number of defective blocks classified into each zone is minimized. When the number of bad blocks classified into each zone is counted, the physical block address PBA of the bad block is converted into a virtual block address VBA.

これとは逆に、仮想ブロックアドレスVBAが物理ブロックアドレスPBAに変換されるときには、上記のような実行回数に対応した変換の逆変換が実行される。等式(3)を満たす変数a及び変数bに基づいて、関数F(x)による変換がb回繰り返されたときの写像は、関数F(x)による変換がa回繰り返されたときの逆写像となっている。   On the contrary, when the virtual block address VBA is converted to the physical block address PBA, the reverse conversion corresponding to the number of executions as described above is executed. Based on the variables a and b satisfying equation (3), the mapping when the transformation by the function F (x) is repeated b times is the inverse of the transformation by the transformation by the function F (x) a times. It is a mapping.

従って、物理ブロックアドレスPBAから仮想ブロックアドレスVBAへの変換によって特定された不良ブロックの最大数を最小化させる変換の実行回数が変数aで示されるとき、以下に示すような等式(5)によって特定される変数bに対応する回数だけ変換を繰り返すことで、不良ブロックの最大数を最小化するべく、仮想ブロックアドレスVBAが物理ブロックアドレスPBAに変換される。
b=n+1−a (5)
Therefore, when the number of executions of conversion that minimizes the maximum number of defective blocks specified by conversion from the physical block address PBA to the virtual block address VBA is indicated by the variable a, the following equation (5) By repeating the conversion for the number of times corresponding to the specified variable b, the virtual block address VBA is converted to the physical block address PBA in order to minimize the maximum number of defective blocks.
b = n + 1−a (5)

上記の例では、変数n=13、変数a=8に対応して、変数bが"6"となる。そこで、処理設定レジスタ34に、変換の実行回数として"6"を示す情報が設定される。   In the above example, the variable b is “6” corresponding to the variable n = 13 and the variable a = 8. Therefore, information indicating “6” is set in the process setting register 34 as the number of executions of conversion.

ホストシステム4からフラッシュメモリ2へのアクセスが要求されたとき、コントローラ3は、処理設定レジスタ34に変換の実行回数を示す情報を設定した後、アドレスレジスタ33に設定された仮想ページアドレスを示す情報に基づいて、データ読出動作やデータ書込動作等を開始する。   When access to the flash memory 2 is requested from the host system 4, the controller 3 sets information indicating the number of executions of conversion in the processing setting register 34 and then indicates information indicating the virtual page address set in the address register 33. Based on the above, a data read operation, a data write operation, etc. are started.

分散処理部32は、ホストシステム4からの要求に応答して、仮想ページアドレスにおいて仮想ブロックアドレスVBAを示す一部分を、物理ブロックアドレスPBAに置き換える。分散処理部32によって生成された物理ページアドレスは、フラッシュメモリ2のメモリ空間35に供給される。ブロック消去が実行されるときには、仮想ブロックアドレスVBAを示す情報をアドレスレジスタ33に設定することにより、物理ブロックアドレスPBAがフラッシュメモリ2のメモリ空間35に供給される。   In response to the request from the host system 4, the distributed processing unit 32 replaces a part indicating the virtual block address VBA in the virtual page address with the physical block address PBA. The physical page address generated by the distributed processing unit 32 is supplied to the memory space 35 of the flash memory 2. When block erasure is executed, the physical block address PBA is supplied to the memory space 35 of the flash memory 2 by setting information indicating the virtual block address VBA in the address register 33.

仮想ブロックアドレス空間が多くのゾーンに分割されているときには、各ゾーンが複数のグループに分類されてもよい。この場合、分散処理部32は、グループ単位で、仮想ブロックアドレスVBAと物理ブロックアドレスPBAの間の変換を行うようにしてもよい。   When the virtual block address space is divided into many zones, each zone may be classified into a plurality of groups. In this case, the distributed processing unit 32 may perform conversion between the virtual block address VBA and the physical block address PBA in units of groups.

例えば、32個のゾーンのそれぞれが4つのグループに分類されているとき、分散処理部32は、8個のゾーンごとに、仮想ブロックアドレスVBAと物理ブロックアドレスPBAの間の変換を行う。フラッシュメモリ2が複数のメモリチップを含んでいるときには、分散処理部32が1つのチップごとに、仮想ブロックアドレスVBAと物理ブロックアドレスPBAの間の変換を行うようにしてもよい。置換テーブル、関数、変換の実行回数等についての設定は、グループごと、又はチップごとに、異なっていてもよい。   For example, when each of the 32 zones is classified into 4 groups, the distributed processing unit 32 performs conversion between the virtual block address VBA and the physical block address PBA for every 8 zones. When the flash memory 2 includes a plurality of memory chips, the distributed processing unit 32 may perform conversion between the virtual block address VBA and the physical block address PBA for each chip. Settings for the replacement table, function, number of executions of conversion, and the like may be different for each group or for each chip.

仮想ブロックアドレスVBAと物理ブロックアドレスPBAとの対応関係を規定する関数は、任意に設定されてもよい。例えば、その関数は、ベルヌイ写像といった、周期軌道を形成する任意の写像関数であってもよい。   A function that defines the correspondence between the virtual block address VBA and the physical block address PBA may be arbitrarily set. For example, the function may be any mapping function that forms a periodic orbit, such as Bernoulli mapping.

図15にて示されるようなアドレスレジスタ33に格納された情報に基づいて、データ読出動作又はデータ書込動作が行われるときには、コントローラ3が、論理ブロックアドレスLBAと仮想ブロックアドレスVBAの対応関係を示すアドレス変換テーブルを使用することにより、ホストシステム4に対してフラッシュメモリ2へのアクセスを提供することが望ましい。   When the data read operation or data write operation is performed based on the information stored in the address register 33 as shown in FIG. 15, the controller 3 determines the correspondence between the logical block address LBA and the virtual block address VBA. It is desirable to provide the host system 4 with access to the flash memory 2 by using the address translation table shown.

アドレス変換テーブルは、複数のゾーンのそれぞれに対応して、コントローラ3によって作成される。例えば、アドレス変換テーブルでは、図15に示すように、仮想ブロックアドレス空間において各ブロックに付されたシリアル番号が、論理ブロックアドレスLBAの順に記述されている。仮想ブロックアドレス空間において各ブロックに付されたシリアル番号は、より上位のビットにゾーン番号を挿入することで、仮想ブロックアドレスVBAに変換される。   The address conversion table is created by the controller 3 corresponding to each of the plurality of zones. For example, in the address conversion table, as shown in FIG. 15, serial numbers assigned to the respective blocks in the virtual block address space are described in the order of logical block addresses LBA. A serial number assigned to each block in the virtual block address space is converted into a virtual block address VBA by inserting a zone number into higher bits.

例えば、ゾーン#0において、2進数コードの形式で"000"をシリアル番号より上位のビットに挿入することにより、ゾーン#0に対応した仮想ブロックアドレスVBAが生成される。   For example, in zone # 0, a virtual block address VBA corresponding to zone # 0 is generated by inserting “000” in a higher-order bit than the serial number in the binary code format.

アドレス変換テーブルには、空きフラグを示す情報も含まれている。空きフラグは、論理ブロックアドレスLBAに対応するブロックにデータが格納されているか否かを識別できるようにする。図15に示す例では、空きフラグが“1”を示すことによって、論理ブロックアドレスLBAに対応する仮想ブロックアドレスVBAは存在しないことが識別される。アドレス変換テーブルにて対応付けられた仮想ブロックアドレスVBAを持たない論理ブロックアドレスLBAでは、データが格納されていない。   The address conversion table also includes information indicating an empty flag. The empty flag makes it possible to identify whether data is stored in a block corresponding to the logical block address LBA. In the example shown in FIG. 15, when the empty flag indicates “1”, it is identified that there is no virtual block address VBA corresponding to the logical block address LBA. No data is stored in the logical block address LBA that does not have the virtual block address VBA associated in the address conversion table.

コントローラ3が図15にて示されるようなアドレス変換テーブルを作成するときには、始めに、ワークエリア8において、1000ブロックに対応したシリアル番号と空きフラグとを示す情報を格納するための領域が確保される。このとき、確保された領域における格納データは、全て論理値“1”に設定される。続いて、アドレス変換テーブルが論理ブロックアドレスLBAとの対応関係を管理する範囲において、仮想ブロックアドレスVBAの順にブロックの冗長領域26における格納データが読み出される。   When the controller 3 creates an address conversion table as shown in FIG. 15, first, an area for storing information indicating a serial number and an empty flag corresponding to 1000 blocks is secured in the work area 8. The At this time, all the stored data in the secured area is set to the logical value “1”. Subsequently, the stored data in the redundant area 26 of the block is read in the order of the virtual block address VBA within the range in which the address conversion table manages the correspondence relationship with the logical block address LBA.

冗長領域26における格納データが、対応論理ブロックアドレスとして特定の論理ブロックアドレスLBAを示しているときには、アドレス変換テーブル内でその論理ブロックアドレスLBAの行に、ブロックのシリアル番号が書き込まれる。また、その論理ブロックアドレスLBAに対応する空きフラグは、論理値“0”に設定される。   When the stored data in the redundant area 26 indicates a specific logical block address LBA as the corresponding logical block address, the block serial number is written in the row of the logical block address LBA in the address conversion table. Further, the empty flag corresponding to the logical block address LBA is set to the logical value “0”.

コントローラ3は、仮想ブロックアドレスVBAからゾーン番号を示すビットを取り除くことにより、仮想ブロックアドレスVBAをブロックのシリアル番号に変換することができる。アドレス変換テーブルにおいて、冗長領域26の格納データによって示されていなかった論理ブロックアドレスLBAの行では、空きフラグが初期設定としての論理値“1”のまま保持される。   The controller 3 can convert the virtual block address VBA into a block serial number by removing the bit indicating the zone number from the virtual block address VBA. In the address conversion table, in the row of the logical block address LBA which is not indicated by the data stored in the redundant area 26, the empty flag is held with the logical value “1” as the initial setting.

フラッシュメモリ2の格納データが書き換えられるときには、新たなデータを含んだ書換用のデータを書き込むための消去済ブロックが特定されなければならない。以下に、消去済ブロックを特定するための処理を説明する。   When the data stored in the flash memory 2 is rewritten, an erased block for writing rewrite data including new data must be specified. In the following, a process for specifying an erased block will be described.

この処理では、図16(a)にて示されるような検索用テーブル40が使用される。この検索用テーブル40では、複数のビットのそれぞれが、特定のゾーンに分類されている複数のブロックが有する仮想ブロックアドレスVBAのそれぞれと、関連付けられている。検索用テーブル40は、コントローラ3によって、複数のゾーンに対応して複数作成されることが好ましい。   In this process, a search table 40 as shown in FIG. 16A is used. In the search table 40, each of the plurality of bits is associated with each of the virtual block addresses VBA included in the plurality of blocks classified into the specific zone. A plurality of search tables 40 are preferably created by the controller 3 corresponding to a plurality of zones.

図16(a)にて示される例では、検索用テーブル40上で左から右、及び上から下へと進むに従って、仮想ブロックアドレスVBAが増加する。例えば、図16(a)にて示される検索用テーブル40における左上のビットは、その検索用テーブル40に対応したゾーンにおける先頭の仮想ブロックアドレスVBAと関連付けられている。   In the example shown in FIG. 16A, the virtual block address VBA increases as the search table 40 advances from left to right and from top to bottom. For example, the upper left bit in the search table 40 shown in FIG. 16A is associated with the head virtual block address VBA in the zone corresponding to the search table 40.

図16(a)にて示される検索用テーブル40における右下のビットは、その検索用テーブル40に対応したゾーンにおける最終の仮想ブロックアドレスVBAと関連付けられている。図16にて示される検索用テーブル40において、論理値“0”を示すビットは、関連付けられた仮想ブロックアドレスVBAを有するブロックが、データを格納しているか、不良ブロックであるかのいずれかであることを表している。その検索テーブル40において、論理値“1”を示すビットは、関連付けられた仮想ブロックアドレスVBAを有するブロックが、消去された状態であることを表している。   The lower right bit in the search table 40 shown in FIG. 16A is associated with the final virtual block address VBA in the zone corresponding to the search table 40. In the search table 40 shown in FIG. 16, the bit indicating the logical value “0” indicates whether the block having the associated virtual block address VBA stores data or is a bad block. It represents something. In the search table 40, the bit indicating the logical value “1” indicates that the block having the associated virtual block address VBA is in an erased state.

検索用テーブル40は、アドレス変換テーブルが作成されるときに、同時に作成されることができる。例えば、検索用テーブル40では、初期状態として、全てのビットに対して論理値“0”が設定される。その後、コントローラ3は、各ビットと関連付けられた仮想ブロックアドレスVBAを有するブロックにおいて、対応論理ブロックアドレス、あるいは不良ブロックであることを示すブロックステータスが、冗長領域26に格納されているか否かを判定する。   The search table 40 can be created at the same time as the address conversion table is created. For example, in the search table 40, a logical value “0” is set for all bits as an initial state. Thereafter, the controller 3 determines whether or not a corresponding logical block address or a block status indicating a bad block is stored in the redundant area 26 in the block having the virtual block address VBA associated with each bit. To do.

コントローラ3が、対応論理ブロックアドレスも、不良ブロックであることを示すブロックステータスも格納されていないと判別したときには、その仮想ブロックアドレスVBAに対応するビットが、論理値“1”に設定される。こうして、検索用テーブル40では、消去済ブロックと関連付けられたビットだけ論理値“1”に設定され、他のビットは論理値“0”のまま保持される。   When the controller 3 determines that neither the corresponding logical block address nor the block status indicating a bad block is stored, the bit corresponding to the virtual block address VBA is set to the logical value “1”. Thus, in the search table 40, only the bit associated with the erased block is set to the logical value “1”, and the other bits are held with the logical value “0”.

検索用テーブル40が作成された後、消去済ブロックに対してデータが書き込まれたときには、検索用テーブル40において、そのブロックと関連付けられたビットが論理値“1”から論理値“0”へと更新される。データを格納していたブロックに対するブロック消去が行われたときには、検索用テーブル40において、そのブロックと関連付けられたビットが論理値“0”から論理値“1”へと更新される。   When data is written to an erased block after the search table 40 is created, the bit associated with the block in the search table 40 changes from a logical value “1” to a logical value “0”. Updated. When block erasure is performed on a block in which data is stored, the bit associated with the block is updated from the logical value “0” to the logical value “1” in the search table 40.

以下に、検索用テーブル40を用いることによって消去済ブロックを検索するための処理を、図16(b)を参照することにより説明する。
この処理では、コントローラ3が、検索用テーブル40を、特定のゾーンにおける先頭の仮想ブロックアドレスVBAと関連付けられた左上のビットから、最終の仮想ブロックアドレスVBAと関連付けられた右下のビットへと向かう方向で、スキャンする。例えば、コントローラ3は、検索用テーブル40のある行において、左から右へと順次にビットをチェックした後、1つ下の行において、同様にビットをチェックする。コントローラ3は、消去済ブロックに対応した論理値“1”を示すビットを検出する。
Hereinafter, processing for searching for an erased block by using the search table 40 will be described with reference to FIG.
In this process, the controller 3 moves the search table 40 from the upper left bit associated with the first virtual block address VBA in the specific zone to the lower right bit associated with the last virtual block address VBA. Scan in direction. For example, the controller 3 sequentially checks the bits from left to right in a certain row of the search table 40, and similarly checks the bits in the next lower row. The controller 3 detects a bit indicating a logical value “1” corresponding to the erased block.

図16(b)にて示される検索用テーブル40では、第4行第5列において、論理値“1”を示すビットが検出される。コントローラ3は、論理値“1”を示すビットが検出されたことに応答して、検索用テーブル40における検索を終了する。このとき、コントローラ3は、論理値“1”を示すビットと関連付けられた仮想ブロックアドレスVBAを特定する。   In the search table 40 shown in FIG. 16B, a bit indicating a logical value “1” is detected in the fourth row and the fifth column. The controller 3 ends the search in the search table 40 in response to detection of the bit indicating the logical value “1”. At this time, the controller 3 specifies the virtual block address VBA associated with the bit indicating the logical value “1”.

コントローラ3は、こうして特定された仮想ブロックアドレスVBAを有するブロックに、新たなデータを含んだ書換用のデータを書き込む。検索処理の終了点の次のビットは、次回の検索処理における開始点となってもよい。例えば、図16(b)にて示される検索用テーブル40では、第4行第6列を開始点として、次回の検索処理が開始される。検索処理において、右下のビットがチェックされた後には、チェック動作が左上のビットに戻る。   The controller 3 writes rewrite data including new data in the block having the virtual block address VBA thus specified. The bit next to the end point of the search process may be the start point in the next search process. For example, in the search table 40 shown in FIG. 16B, the next search process is started with the fourth row and sixth column as the starting point. In the search process, after the lower right bit is checked, the check operation returns to the upper left bit.

以下に、ホストシステム4からの要求に応答してフラッシュメモリ2からデータを読み出すためのデータ読出動作を説明する。このデータ読出動作では、ホストシステム4からコントローラ3へと出力されるアドレス信号によって指定される論理ブロックアドレスLBAが、図15にて示されるアドレス変換テーブルを使用することにより、仮想ブロックアドレスVBAへと変換される。フラッシュシーケンサブロック12が有する複数のレジスタには、次のような情報が設定される。第1に、内部読出コマンドは、フラッシュシーケンサブロック12内の予め定められた第1のレジスタ(図示せず)に、内部コマンドとして設定される。第2に、アドレス変換テーブルによって特定された仮想ブロックアドレスVBAと、ページ番号を示す5ビットデータ(1つのブロックが32個のページを含むとき)とを含んだ仮想ページアドレスは、図8及び図14にて示されるアドレスレジスタ33に設定される。   Hereinafter, a data read operation for reading data from the flash memory 2 in response to a request from the host system 4 will be described. In this data read operation, the logical block address LBA specified by the address signal output from the host system 4 to the controller 3 is changed to the virtual block address VBA by using the address conversion table shown in FIG. Converted. The following information is set in a plurality of registers included in the flash sequencer block 12. First, the internal read command is set as an internal command in a predetermined first register (not shown) in the flash sequencer block 12. Secondly, the virtual page address including the virtual block address VBA specified by the address conversion table and the 5-bit data indicating the page number (when one block includes 32 pages) is shown in FIGS. 14 is set in the address register 33 indicated by 14.

上記のようなデータ読出動作のために設定された情報に基づいて、フラッシュシーケンサブロック12は、内部コマンドに従ってフラッシュメモリインタフェースブロック10を制御する。フラッシュメモリインタフェースブロック10は、内部バス14を介してフラッシュメモリ2に、内部コマンドを示す情報、及びアドレスを示す情報等を提供する。   Based on the information set for the data read operation as described above, the flash sequencer block 12 controls the flash memory interface block 10 according to the internal command. The flash memory interface block 10 provides information indicating an internal command, information indicating an address, and the like to the flash memory 2 via the internal bus 14.

仮想ページアドレスは、例えば図8及び図14にて示される分散処理部32によって物理ページアドレスに変換される。従って、フラッシュメモリ2に提供される情報は、物理ページアドレスを示している。フラッシュメモリ2では、コントローラ3から提供された情報によって指定される物理ページアドレスに対応するデータ領域から格納データが読み出される。フラッシュメモリ2から読み出されたデータは、内部バス14を介してバッファ9に転送される。この結果として、アドレスレジスタ33に設定された仮想ページアドレスと関連付けられた物理ページアドレスを有するデータ領域の格納データが、バッファ9によって保持される。   The virtual page address is converted into a physical page address by the distributed processing unit 32 shown in FIGS. 8 and 14, for example. Therefore, the information provided to the flash memory 2 indicates a physical page address. In the flash memory 2, the stored data is read from the data area corresponding to the physical page address specified by the information provided from the controller 3. Data read from the flash memory 2 is transferred to the buffer 9 via the internal bus 14. As a result, the data stored in the data area having the physical page address associated with the virtual page address set in the address register 33 is held by the buffer 9.

次に、ホストシステム4からの要求に応答してフラッシュメモリ2にデータを書き込むためのデータ書込動作を説明する。このデータ書込動作では、フラッシュシーケンサブロック12が有する複数のレジスタに、次のような情報が設定される。第1に、内部書込コマンドは、フラッシュシーケンサブロック12内の第1のレジスタに、内部コマンドとして書き込まれる。第2に、検索用テーブル40により特定された消去済ブロックの仮想ブロックアドレスVBAと、ページ番号を示す5ビットデータ(1つのブロックが32個のページを含むとき)とを含んだ仮想ページアドレスは、図8及び図14にて示されるアドレスレジスタ33に設定される。   Next, a data write operation for writing data to the flash memory 2 in response to a request from the host system 4 will be described. In this data write operation, the following information is set in a plurality of registers included in the flash sequencer block 12. First, the internal write command is written to the first register in the flash sequencer block 12 as an internal command. Second, the virtual page address VBA of the erased block specified by the search table 40 and the 5-bit data indicating the page number (when one block includes 32 pages) is The address register 33 shown in FIGS. 8 and 14 is set.

上記のようなデータ書込動作のために設定された情報に基づいて、フラッシュシーケンサブロック12は、内部コマンドに従ってフラッシュメモリインタフェースブロック10を制御する。フラッシュメモリインタフェースブロック10は、内部バス14を介してフラッシュメモリ2に、内部コマンドを示す情報、及びアドレスを示す情報等を提供する。   Based on the information set for the data write operation as described above, the flash sequencer block 12 controls the flash memory interface block 10 according to the internal command. The flash memory interface block 10 provides information indicating an internal command, information indicating an address, and the like to the flash memory 2 via the internal bus 14.

仮想ページアドレスは、例えば図8及び図14にて示される分散処理部32によって物理ページアドレスに変換される。従って、フラッシュメモリ2に提供される情報は、物理ページアドレスを示している。フラッシュメモリインタフェースブロック10は、バッファ9の格納データを、内部バス14を介してフラッシュメモリ2へと転送する。この結果として、アドレスレジスタ33に設定された仮想ページアドレスと関連付けられた物理ページアドレスを有するデータ領域に、コントローラ3からフラッシュメモリ2へと供給されたデータが書き込まれる。   The virtual page address is converted into a physical page address by the distributed processing unit 32 shown in FIGS. 8 and 14, for example. Therefore, the information provided to the flash memory 2 indicates a physical page address. The flash memory interface block 10 transfers the data stored in the buffer 9 to the flash memory 2 via the internal bus 14. As a result, the data supplied from the controller 3 to the flash memory 2 is written into the data area having the physical page address associated with the virtual page address set in the address register 33.

上記のようなデータ書込動作において、消去されるべき古いデータがフラッシュメモリ2に格納されているときには、データ書込動作に続いて、古いデータが格納されているブロックに対するデータ消去動作が実行される。古いデータが格納されているブロックが有する仮想ブロックアドレスVBAは、図15にて示されるアドレス変換テーブルを使用することによって特定されることができる。   In the data write operation as described above, when old data to be erased is stored in the flash memory 2, a data erase operation is performed on the block in which the old data is stored following the data write operation. The The virtual block address VBA included in the block in which the old data is stored can be specified by using the address conversion table shown in FIG.

このデータ消去動作では、フラッシュシーケンサブロック12が有する複数のレジスタに、次のような情報が設定される。第1に、内部消去コマンドは、フラッシュシーケンサブロック12内の第1のレジスタに、内部コマンドとして書き込まれる。第2に、古いデータが格納されているブロックの仮想ブロックアドレスVBAと、ページ番号を示す5ビットデータ(1つのブロックが32個のページを含むとき)とを含んだ仮想ページアドレスは、図8及び図14にて示されるアドレスレジスタ33に設定される。   In this data erasing operation, the following information is set in a plurality of registers included in the flash sequencer block 12. First, the internal erase command is written to the first register in the flash sequencer block 12 as an internal command. Secondly, a virtual page address VBA of a block storing old data and a virtual page address including 5-bit data indicating a page number (when one block includes 32 pages) is shown in FIG. And the address register 33 shown in FIG.

上記のようなデータ消去動作のために設定された情報に基づいて、フラッシュシーケンサブロック12は、内部コマンドに従ってフラッシュメモリインタフェースブロック10を制御する。フラッシュメモリインタフェースブロック10は、内部バス14を介してフラッシュメモリ2に、データ消去動作に対応した内部コマンドを示す情報、及びアドレスを示す情報等を提供する。   Based on the information set for the data erasing operation as described above, the flash sequencer block 12 controls the flash memory interface block 10 according to the internal command. The flash memory interface block 10 provides information indicating an internal command corresponding to a data erasing operation, information indicating an address, and the like to the flash memory 2 via the internal bus 14.

仮想ページアドレスは、図8及び図14にて示される分散処理部32によって物理ページアドレスに変換される。従って、フラッシュメモリ2に提供される情報は、物理ページアドレスを示している。この結果として、コントローラ3は、フラッシュメモリ2において古いデータが格納されていたブロックに対するデータ消去動作を完了させる。   The virtual page address is converted into a physical page address by the distributed processing unit 32 shown in FIGS. Therefore, the information provided to the flash memory 2 indicates a physical page address. As a result, the controller 3 completes the data erasing operation for the block in which the old data is stored in the flash memory 2.

コントローラ3は、複数の置換テーブル又は複数の関数を用いることにより、各ゾーンに分類される不良ブロックの最大数を最小化するための処理を実行する。これにより、コントローラ3は、フラッシュメモリ2の一部分に多くの不良ブロックが存在するときでも、複数のゾーンのそれぞれにおいてホストシステム4から提供されたデータを適切に格納させることができる。   The controller 3 executes a process for minimizing the maximum number of defective blocks classified into each zone by using a plurality of replacement tables or a plurality of functions. Thus, the controller 3 can appropriately store the data provided from the host system 4 in each of the plurality of zones even when there are many bad blocks in a part of the flash memory 2.

本発明は、様々な変形及び応用が可能である。例えば、図6に示した分散処理部32をフラッシュメモリ2内に設けてもよい。コントローラ3は、フラッシュメモリシステム1とは独立して、フラッシュメモリ2とホストシステム4との間でのデータ交換を制御してもよい。コントローラ3は、ホストシステム4に内蔵されていてもよい。アドレスレジスタ33及び処理設定レジスタ34は、SRAMやDRAM(Dynamic RAM)などといった、任意のメモリに置き換えられてもよい。   The present invention can be variously modified and applied. For example, the distributed processing unit 32 illustrated in FIG. 6 may be provided in the flash memory 2. The controller 3 may control data exchange between the flash memory 2 and the host system 4 independently of the flash memory system 1. The controller 3 may be built in the host system 4. The address register 33 and the processing setting register 34 may be replaced with arbitrary memories such as SRAM and DRAM (Dynamic RAM).

本発明にかかるフラッシュメモリシステムのブロック図である。1 is a block diagram of a flash memory system according to the present invention. メモリセルの構造を概略的に示す断面図である。It is sectional drawing which shows the structure of a memory cell roughly. 書込状態となっているメモリセルの断面図である。It is sectional drawing of the memory cell which is in the writing state. フラッシュメモリにおけるアドレス空間の概略図である。It is the schematic of the address space in flash memory. フラッシュメモリにおけるゾーンの割付例の概略図である。It is the schematic of the example of allocation of the zone in flash memory. ブロックを分類するための処理の概略図である。It is the schematic of the process for classifying a block. 論理ブロックアドレス、仮想ブロックアドレス、物理ブロックアドレスの間での相関関係の一例を示す概略図である。It is the schematic which shows an example of the correlation between a logical block address, a virtual block address, and a physical block address. 分散処理部、アドレスレジスタ、処理設定レジスタ等を示すブロック図である。It is a block diagram which shows a distributed processing part, an address register, a process setting register, etc. 仮想ページアドレスを物理ページアドレスに変換するための動作の概略図である。It is the schematic of the operation | movement for converting a virtual page address into a physical page address. 仮想ブロックアドレスが物理ブロックアドレスに直接的に割り当てられている場合の概略図である。It is the schematic when the virtual block address is directly assigned to the physical block address. 置換テーブルの構成例を示す概略図である。It is the schematic which shows the structural example of a replacement table. 不良ブロックのリストの一例を示す概略図である。It is the schematic which shows an example of the list | wrist of a bad block. 分散処理によって仮想ブロックアドレスが物理ブロックアドレスと関連付けられる動作の概略図である。It is the schematic of the operation | movement with which a virtual block address is linked | related with a physical block address by distributed processing. モニタレジスタを備える構成例を示す概略図である。It is the schematic which shows the structural example provided with a monitor register. アドレス変換テーブルの一構成例を示す概略図である。It is the schematic which shows the example of 1 structure of an address conversion table. 検索用テーブルの一構成例を示す概略図である。It is the schematic which shows one structural example of the table for a search.

符号の説明Explanation of symbols

1 フラッシュメモリシステム
2 フラッシュメモリ
3 コントローラ
4 ホストシステム
5 ホストインタフェース制御ブロック
6 マイクロプロセッサ
7 ホストインタフェースブロック
8 ワークエリア
9 バッファ
10 フラッシュメモリインタフェースブロック
11 ECCブロック
12 フラッシュシーケンサブロック
13 外部バス
14 内部バス
16 メモリセル
17 P型半導体基板
18 ソース拡散領域
19 ドレイン拡散領域
20 トンネル酸化膜
21 フローティングゲート電極
22 絶縁膜
23 コントロールゲート電極
24 チャネル
25 ユーザ領域
26 冗長領域
31 アドレス変換テーブル
32 分散処理部
33 アドレスレジスタ
34 処理設定レジスタ
35 メモリ空間
36 モニタレジスタ
DESCRIPTION OF SYMBOLS 1 Flash memory system 2 Flash memory 3 Controller 4 Host system 5 Host interface control block 6 Microprocessor 7 Host interface block 8 Work area 9 Buffer 10 Flash memory interface block 11 ECC block 12 Flash sequencer block 13 External bus 14 Internal bus 16 Memory cell 17 P-type semiconductor substrate 18 Source diffusion region 19 Drain diffusion region 20 Tunnel oxide film 21 Floating gate electrode 22 Insulating film 23 Control gate electrode 24 Channel 25 User region 26 Redundant region 31 Address conversion table 32 Distribution processing unit 33 Address register 34 Processing setting Register 35 Memory space 36 Monitor register

Claims (13)

ホストシステムから与えられるアドレスに基づいて、物理ブロック単位で記憶データの消去が行われるフラッシュメモリに対するアクセスを制御するメモリコントローラであって、
前記フラッシュメモリ内の物理ブロックに付けられている物理ブロックアドレスに仮想ブロックアドレスを割り当てる初期設定手段と、
前記ホストシステム側のアドレス空間における論理ブロックアドレスが割り当てられている複数ブロックの領域で構成された論理ゾーンを形成する論理ゾーン形成手段と、
連続する前記仮想ブロックアドレスが割り当てられている複数ブロックの領域で構成された仮想ゾーンを形成する仮想ゾーン形成手段と、
前記論理ゾーンと前記仮想ゾーンとの対応関係を管理するゾーン管理手段と、
前記論理ゾーンに含まれる前記論理ブロックアドレスと、該論理ゾーンと対応する前記仮想ゾーンに含まれる前記仮想ブロックアドレスとの対応関係を管理するアドレス管理手段と、
前記初期設定手段によって設定された割り当てに従って、前記仮想ブロックアドレスを、該仮想ブロックアドレスが割り当てられている前記物理ブロックアドレスに変換するアドレス変換手段とを備え、
前記初期設定手段は、前記各仮想ゾーンに割り当てられる不良の物理ブロックの個数が均等化されるように、前記物理ブロックアドレスに前記仮想ブロックアドレスを割り当てることを特徴とするメモリコントローラ。
A memory controller that controls access to a flash memory in which stored data is erased in units of physical blocks based on an address given from a host system,
Initial setting means for assigning a virtual block address to a physical block address attached to a physical block in the flash memory;
Logical zone forming means for forming a logical zone composed of areas of a plurality of blocks to which logical block addresses in the address space on the host system side are assigned;
Virtual zone forming means for forming a virtual zone composed of areas of a plurality of blocks to which the continuous virtual block addresses are assigned;
Zone management means for managing the correspondence between the logical zone and the virtual zone;
Address management means for managing a correspondence relationship between the logical block address included in the logical zone and the virtual block address included in the virtual zone corresponding to the logical zone;
Address conversion means for converting the virtual block address to the physical block address to which the virtual block address is assigned according to the assignment set by the initial setting means,
The memory controller , wherein the initial setting means assigns the virtual block address to the physical block address so that the number of defective physical blocks assigned to the virtual zones is equalized .
前記物理ブロックアドレスに対する前記仮想ブロックアドレスの割り当てを記述したテーブルを複数個記憶しているテーブル記憶手段を備え、
前記初期設定手段は、複数個の前記テーブルの中から1個のテーブルを選択し、
前記アドレス変換手段は、前記初期設定手段によって選択された前記テーブルを用いて前記仮想ブロックアドレスを前記物理ブロックアドレスに変換することを特徴とする請求項1に記載のメモリコントローラ。
Table storage means for storing a plurality of tables describing assignment of the virtual block address to the physical block address;
The initial setting means selects one table from the plurality of tables,
2. The memory controller according to claim 1, wherein the address conversion unit converts the virtual block address into the physical block address using the table selected by the initial setting unit .
1対1の写像を生成する関数を複数個記憶している関数記憶手段を備え、
前記初期設定手段は、複数個の前記関数の中から1個の関数を選択し、
前記アドレス変換手段は、前記初期設定手段によって選択された前記関数を用いて前記仮想ブロックアドレスを前記物理ブロックアドレスに変換することを特徴とする請求項に記載のメモリコントローラ。
A function storage means for storing a plurality of functions for generating a one-to-one mapping;
The initial setting means selects one function from the plurality of functions,
2. The memory controller according to claim 1 , wherein the address conversion unit converts the virtual block address to the physical block address using the function selected by the initial setting unit .
前記アドレス変換手段は、1対1の写像を生成する周期性を有する写像関数を用いて前記仮想ブロックアドレスを前記物理ブロックアドレスに変換し、
前記初期設定手段は、前記アドレス変換手段が前記写像関数を用いて前記仮想ブロックアドレスを前記物理ブロックアドレスに変換するときの変換回数を設定することを特徴とする請求項1に記載のメモリコントローラ。
The address conversion means converts the virtual block address to the physical block address using a mapping function having a periodicity that generates a one-to-one mapping,
The memory controller according to claim 1, wherein the initial setting unit sets the number of conversions when the address conversion unit converts the virtual block address to the physical block address using the mapping function .
前記写像関数は、テント写像を生成する写像関数であることを特徴とする請求項4に記載のメモリコントローラ。 The memory controller according to claim 4, wherein the mapping function is a mapping function that generates a tent map . 前記テント写像を生成する写像関数の循環周期がTであり、前記仮想ブロックアドレスが割り当てられている前記フラッシュメモリ内の物理ブロックの個数がNであるときに、TとNが
N=2 (T−1)
の関係を満たす、
ことを特徴とする請求項5に記載のメモリコントローラ。
When the cycle period of the mapping function for generating the tent map is T and the number of physical blocks in the flash memory to which the virtual block address is assigned is N, T and N are
N = 2 (T-1)
Satisfy the relationship
The memory controller according to claim 5.
請求項1乃至6のいずれか1項に記載のメモリコントローラと、物理ブロック単位で記憶データの消去が行われるフラッシュメモリとを備えることを特徴とするフラッシュメモリシステム。  A flash memory system comprising: the memory controller according to claim 1; and a flash memory in which stored data is erased in units of physical blocks. ホストシステムから与えられるアドレスに基づいて、物理ブロック単位で記憶データの消去が行われるフラッシュメモリに対するアクセスを制御するフラッシュメモリの制御方法であって、  A flash memory control method for controlling access to a flash memory in which stored data is erased in units of physical blocks based on an address given from a host system,
前記フラッシュメモリ内の物理ブロックに付けられている物理ブロックアドレスに仮想ブロックアドレスを割り当てる初期設定ステップと、  An initial setting step of assigning a virtual block address to a physical block address attached to a physical block in the flash memory;
前記ホストシステムから与えられるアドレスに基づいてアクセス対象領域に対応する論理ブロックアドレスを求める演算ステップと、  An operation step of obtaining a logical block address corresponding to the access target area based on an address given from the host system;
前記論理ブロックアドレスが割り当てられている複数ブロックの領域で構成された論理ゾーンと、連続する前記仮想ブロックアドレスが割り当てられている複数ブロックの領域で構成された仮想ゾーンとの対応関係に従って、前記論理ゾーンに含まれる前記論理ブロックアドレスを、該論理ゾーンと対応する前記仮想ゾーンに含まれる前記仮想ブロックアドレスに変換する第1の変換ステップと、  In accordance with the correspondence relationship between a logical zone composed of a plurality of block areas to which the logical block address is allocated and a virtual zone composed of a plurality of block areas to which the continuous virtual block address is allocated, A first conversion step of converting the logical block address included in the zone into the virtual block address included in the virtual zone corresponding to the logical zone;
前記初期設定ステップで設定された割り当てに従って、前記仮想ブロックアドレスを、該仮想ブロックアドレスが割り当てられている物理ブロックアドレスに変換する第2の変換ステップを含み、  A second conversion step of converting the virtual block address to a physical block address to which the virtual block address is assigned according to the assignment set in the initial setting step;
前記初期設定ステップでは、前記各仮想ゾーンに割り当てられる不良の物理ブロックの個数が均等化されるように、前記物理ブロックアドレスに前記仮想ブロックアドレスを割り当てることを特徴とするフラッシュメモリの制御方法。  In the initial setting step, the virtual block address is allocated to the physical block address so that the number of defective physical blocks allocated to each virtual zone is equalized.
前記初期設定ステップでは、前記物理ブロックアドレスに対する前記仮想ブロックアドレスの割り当てを記述した複数個のテーブルの中から1個のテーブルを選択し、  In the initial setting step, one table is selected from a plurality of tables describing assignment of the virtual block address to the physical block address,
前記第2の変換ステップでは、前記初期設定ステップで選択された前記テーブルを用いて前記仮想ブロックアドレスを前記物理ブロックアドレスに変換することを特徴とする請求項8に記載のフラッシュメモリの制御方法。  9. The flash memory control method according to claim 8, wherein, in the second conversion step, the virtual block address is converted into the physical block address using the table selected in the initial setting step.
前記初期設定ステップでは、1対1の写像を生成する複数個の関数の中から1個の関数を選択し、  In the initial setting step, one function is selected from a plurality of functions that generate a one-to-one mapping,
前記第2の変換ステップでは、前記初期設定ステップで選択された前記関数を用いて前記仮想ブロックアドレスを前記物理ブロックアドレスに変換することを特徴とする請求項8に記載のフラッシュメモリの制御方法。  9. The method of controlling a flash memory according to claim 8, wherein, in the second conversion step, the virtual block address is converted to the physical block address using the function selected in the initial setting step.
前記第2の変換ステップでは、1対1の写像を生成する周期性を有する写像関数を用いて前記仮想ブロックアドレスを前記物理ブロックアドレスに変換し、  In the second conversion step, the virtual block address is converted into the physical block address using a mapping function having a periodicity that generates a one-to-one mapping,
前記初期設定ステップでは、前記第2の変換ステップで前記写像関数を用いて前記仮想ブロックアドレスを前記物理ブロックアドレスに変換するときの変換回数を設定することを特徴とする請求項8に記載のフラッシュメモリの制御方法。  9. The flash according to claim 8, wherein in the initial setting step, the number of conversions when the virtual block address is converted into the physical block address is set using the mapping function in the second conversion step. Memory control method.
前記写像関数は、テント写像を生成する写像関数であることを特徴とする請求項11に記載のフラッシュメモリの制御方法。  12. The flash memory control method according to claim 11, wherein the mapping function is a mapping function for generating a tent map. 前記テント写像を生成する写像関数の循環周期がTであり、前記仮想ブロックアドレスが割り当てられている前記フラッシュメモリ内の物理ブロックの個数がNであるときに、TとNが  When the cycle period of the mapping function for generating the tent map is T and the number of physical blocks in the flash memory to which the virtual block address is assigned is N, T and N are
N=2  N = 2 (T−1)(T-1)
の関係を満たす、Satisfy the relationship
ことを特徴とする請求項12に記載のフラッシュメモリの制御方法。  The flash memory control method according to claim 12.
JP2004161339A 2003-12-26 2004-05-31 Memory controller, flash memory system, and control method Active JP3940409B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004161339A JP3940409B2 (en) 2003-12-26 2004-05-31 Memory controller, flash memory system, and control method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2003435662 2003-12-26
JP2004161339A JP3940409B2 (en) 2003-12-26 2004-05-31 Memory controller, flash memory system, and control method

Publications (3)

Publication Number Publication Date
JP2005209140A JP2005209140A (en) 2005-08-04
JP2005209140A5 JP2005209140A5 (en) 2007-03-15
JP3940409B2 true JP3940409B2 (en) 2007-07-04

Family

ID=34914379

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004161339A Active JP3940409B2 (en) 2003-12-26 2004-05-31 Memory controller, flash memory system, and control method

Country Status (1)

Country Link
JP (1) JP3940409B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5956791B2 (en) * 2012-03-13 2016-07-27 株式会社メガチップス Semiconductor memory reuse processing apparatus and semiconductor memory
JP5952036B2 (en) * 2012-03-13 2016-07-13 株式会社メガチップス Semiconductor memory reuse processing apparatus and semiconductor memory
WO2015042778A1 (en) * 2013-09-24 2015-04-02 华为技术有限公司 Data migration method, data migration apparatus and storage device
JP2014238871A (en) * 2014-08-01 2014-12-18 マイクロン テクノロジー, インク. Controller providing single virtualized ecc algorithm, storage system including this controller, and method of managing this storage system

Also Published As

Publication number Publication date
JP2005209140A (en) 2005-08-04

Similar Documents

Publication Publication Date Title
US7779226B2 (en) Memory controller, flash memory system, and method of controlling operation for data exchange between host system and flash memory
US8332576B2 (en) Data reading method for flash memory and controller and storage system using the same
US8200891B2 (en) Memory controller, memory system with memory controller, and method of controlling flash memory
KR20070046864A (en) Virtual-to-physical address translation in a flash file system
US9383929B2 (en) Data storing method and memory controller and memory storage device using the same
US20050283647A1 (en) External storage device
JP2006018373A (en) Memory controller, flash memory system and control method for flash memory
JP2023044518A (en) Memory system and method
JP4231841B2 (en) Memory controller, flash memory system, and flash memory control method
JP3940409B2 (en) Memory controller, flash memory system, and control method
JP4636005B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
US7606993B2 (en) Flash memory controller, memory control circuit, flash memory system, and method for controlling data exchange between host computer and flash memory
JP4661191B2 (en) Memory controller, flash memory system, and flash memory control method
JP4153535B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4433792B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4241741B2 (en) Memory controller and flash memory system
US20170262212A1 (en) Memory controller, method of controlling nonvolatile memory and memory system
JP4434171B2 (en) Memory controller and flash memory system
JP4461754B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4068594B2 (en) Flash memory controller, flash memory system, and flash memory control method
JP3934659B1 (en) Memory controller and flash memory system
JP6260395B2 (en) Memory controller, memory system, and memory control method
JP4419525B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4569554B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
US20240069723A1 (en) Memory system and method for controlling the same

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070131

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070322

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: 20070327

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070330

R150 Certificate of patent or registration of utility model

Ref document number: 3940409

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110406

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110406

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120406

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130406

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140406

Year of fee payment: 7