JP2005209184A - Memory controller, flash memory system and method for controlling flash memory - Google Patents

Memory controller, flash memory system and method for controlling flash memory Download PDF

Info

Publication number
JP2005209184A
JP2005209184A JP2004375627A JP2004375627A JP2005209184A JP 2005209184 A JP2005209184 A JP 2005209184A JP 2004375627 A JP2004375627 A JP 2004375627A JP 2004375627 A JP2004375627 A JP 2004375627A JP 2005209184 A JP2005209184 A JP 2005209184A
Authority
JP
Japan
Prior art keywords
zones
classified
flash memory
zone
blocks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2004375627A
Other languages
Japanese (ja)
Other versions
JP4231841B2 (en
Inventor
Kenzo Kida
健三 木田
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 JP2004375627A priority Critical patent/JP4231841B2/en
Publication of JP2005209184A publication Critical patent/JP2005209184A/en
Application granted granted Critical
Publication of JP4231841B2 publication Critical patent/JP4231841B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To avoid any failure due to the uneven distribution of defective blocks by distributing the defective blocks to each zone of a flash memory. <P>SOLUTION: This memory controller is provided with a zone management function for managing a relative relation between a zone constituted of a plurality of blocks in a flash memory and a logical block address space at a host system side to be assigned to the zone, a block assignment function for deciding the blocks to be assigned to the zone based on a table where the blocks to be assigned to each zone are described and an access control function for controlling access to the zone. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

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

上記目的を達成するために、本発明の第1の観点に係るメモリコントローラは、
予め定められた数のブロックを含んだ複数のゾーンに分割されたフラッシュメモリの仮想アドレス空間とホストシステムにおける論理アドレス空間との対応関係を管理するよう構成された管理モジュールと、
前記複数のゾーンの各々に分類されるブロックの仮想アドレスと前記フラッシュメモリにおける物理アドレスとの対応関係を管理することにより、前記複数のゾーンの各々に分類されるブロックを決定する分類制御モジュールと、
前記各ゾーンに含まれる不良ブロック数が許容数を超えているか否かを診断する診断モジュールとを備え、
前記診断モジュールにより、前記複数のゾーンのうちの1以上に前記許容数を超える不良ブロックが含まれていると診断された場合に、前記仮想アドレスと物理アドレスとの対応関係を変更することを特徴とする。
In order to achieve the above object, a memory controller according to the first aspect of the present invention provides:
A management module configured to manage the correspondence between the virtual address space of the flash memory divided into a plurality of zones including a predetermined number of blocks and the logical address space in the host system;
A classification control module for determining a block classified into each of the plurality of zones by managing a correspondence relationship between a virtual address of a block classified into each of the plurality of zones and a physical address in the flash memory;
A diagnostic module for diagnosing whether the number of bad blocks included in each zone exceeds an allowable number,
When the diagnostic module diagnoses that one or more of the plurality of zones includes a defective block exceeding the allowable number, the correspondence relationship between the virtual address and the physical address is changed. And

尚、前記分類制御モジュールは、
前記複数のゾーンの各々に分類されるブロックの仮想アドレスを前記フラッシュメモリにおける物理アドレスと関連付ける複数の関連テーブルを予め保持し、
前記複数の関連テーブルのうちの1つを参照することにより、前記複数のゾーンの各々に分類されるブロックを決定してもよい。
The classification control module is
A plurality of association tables for associating virtual addresses of blocks classified into each of the plurality of zones with physical addresses in the flash memory in advance,
Blocks classified into each of the plurality of zones may be determined by referring to one of the plurality of association tables.

また、前記分類制御モジュールは、
前記複数のゾーンの各々に分類される不良ブロックの最大数を最小化するべく、前記複数の関連テーブルのうちの1つを選択し、
選択された前記関連テーブルを参照することにより、前記複数のゾーンの各々に分類されるブロックを決定してもよい。
Further, the classification control module includes:
Selecting one of the plurality of association tables to minimize the maximum number of bad blocks classified into each of the plurality of zones;
Blocks classified into each of the plurality of zones may be determined by referring to the selected association table.

また、前記分類制御モジュールは、
前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、前記複数のゾーンの各々に分類される不良ブロック数が2番目に大きいゾーンの不良ブロック数を最小化するべく、前記複数の関連テーブルのうちの1つを選択し、
選択された前記関連テーブルを参照することにより、前記複数のゾーンの各々に分類されるブロックを決定すると共に、分類される不良ブロック数が最大となるゾーンを使用禁止状態にしてもよい。
Further, the classification control module includes:
The number of defective blocks in the second largest zone classified into each of the plurality of zones when the maximum number of defective blocks classified into each of the plurality of zones cannot be less than the allowable number To select one of the plurality of related tables,
By referring to the selected association table, blocks classified into each of the plurality of zones may be determined, and a zone having the largest number of classified defective blocks may be disabled.

また、前記分類制御モジュールは、
前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、前記複数のゾーンの各々に分類される不良ブロック数がn番目(nは3以上の自然数)に大きいゾーンの不良ブロック数を最小化するべく、前記複数の関連テーブルのうちの1つを選択し、
選択された前記関連テーブルを参照することにより、前記複数のゾーンの各々に分類されるブロックを決定すると共に、分類される不良ブロック数が1番目に大きいゾーンからn−1番目に大きいゾーンまでを使用禁止状態にしてもよい。
Further, the classification control module includes:
When the maximum number of defective blocks classified into each of the plurality of zones cannot be less than the allowable number, the number of defective blocks classified into each of the plurality of zones is nth (n is a natural number of 3 or more) ) Select one of the plurality of related tables to minimize the number of bad blocks in a large zone,
By referring to the selected relation table, the blocks classified into each of the plurality of zones are determined, and the number of defective blocks to be classified is changed from the first largest zone to the n−1th largest zone. You may make it a use prohibition state.

さらに、また、前記分類制御モジュールは、
前記複数のゾーンの各々に分類されるブロックの仮想アドレスを前記フラッシュメモリにおける物理アドレスと関連付けるための複数の関数を予め保持し、
前記複数の関数のうちの1つを使用することにより、前記複数のゾーンの各々に分類されるブロックを決定してもよい。
Furthermore, the classification control module includes:
A plurality of functions for previously associating virtual addresses of blocks classified into each of the plurality of zones with physical addresses in the flash memory;
A block classified into each of the plurality of zones may be determined by using one of the plurality of functions.

この場合、前記分類制御モジュールは、
前記複数のゾーンの各々に分類される不良ブロックの最大数を最小化するべく、前記複数の関数のうちの1つを選択し、
選択された関数を使用することにより、前記複数のゾーンの各々に分類されるブロックを決定してもよい。
In this case, the classification control module
Selecting one of the plurality of functions to minimize the maximum number of bad blocks classified into each of the plurality of zones;
By using the selected function, the blocks classified into each of the plurality of zones may be determined.

また、前記分類制御モジュールは、
前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、前記複数のゾーンの各々に分類される不良ブロック数が2番目に大きいゾーンの不良ブロック数を最小化するべく、前記複数の関数のうちの1つを選択し、
選択された関数を使用することにより、前記複数のゾーンの各々に分類されるブロックを決定すると共に、分類される不良ブロック数が最大となるゾーンを使用禁止状態にしてもよい。
Further, the classification control module includes:
The number of defective blocks in the second largest zone classified into each of the plurality of zones when the maximum number of defective blocks classified into each of the plurality of zones cannot be less than the allowable number Select one of the plurality of functions to minimize
By using the selected function, a block classified into each of the plurality of zones may be determined, and a zone where the number of classified defective blocks is maximized may be disabled.

また、前記分類制御モジュールは、
前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、前記複数のゾーンの各々に分類される不良ブロック数がn番目(nは3以上の自然数)に大きいゾーンの不良ブロック数を最小化するべく、前記複数の関数のうちの1つを選択し、
選択された関数を使用することにより、前記複数のゾーンの各々に分類されるブロックを決定すると共に、分類される不良ブロック数が1番目に大きいゾーンからn−1番目に大きいゾーンまでを使用禁止状態にしてもよい。
Further, the classification control module includes:
When the maximum number of defective blocks classified into each of the plurality of zones cannot be less than the allowable number, the number of defective blocks classified into each of the plurality of zones is nth (n is a natural number of 3 or more) ) Select one of the plurality of functions to minimize the number of bad blocks in a large zone,
By using the selected function, the blocks classified into each of the plurality of zones are determined, and the use of the zone from the first largest defective block to the n−1th largest zone is prohibited. It may be in a state.

さらに、また、前記分類制御モジュールは、
前記複数のゾーンの各々に分類されるブロックの仮想アドレスを前記フラッシュメモリにおける物理アドレスと関連付けるべく、1対1の写像循環を生成する関数を予め保持し、
前記関数による変換の実行回数を設定することにより、前記複数のゾーンの各々に分類されるブロックを決定してもよい。
Furthermore, the classification control module includes:
In order to associate a virtual address of a block classified into each of the plurality of zones with a physical address in the flash memory, a function for generating a one-to-one mapping cycle is stored in advance.
A block classified into each of the plurality of zones may be determined by setting the number of times of execution of conversion by the function.

この場合、前記関数は、テント写像を生成する関数であってもよい。   In this case, the function may be a function that generates a tent map.

また、前記テント写像における循環周期がTであり、前記複数のゾーンのいずれかに分類されるブロックの総数がNであるときに、TとNが
N=2(T−1)
の関係を満たしてもよい。
Further, when the circulation period in the tent map is T and the total number of blocks classified into any of the plurality of zones is N, T and N are N = 2 (T−1)
May be satisfied.

また、前記分類制御モジュールは、
前記複数のゾーンの各々に分類される不良ブロックの最大数を最小化するべく、前記関数による変換の実行回数を設定し、
設定された変換の実行回数により、前記複数のゾーンの各々に分類されるブロックを決定してもよい。
Further, the classification control module includes:
In order to minimize the maximum number of bad blocks classified into each of the plurality of zones, the number of conversions performed by the function is set,
Blocks classified into each of the plurality of zones may be determined according to the set number of conversions.

また、前記分類制御モジュールは、
前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、前記複数のゾーンの各々に分類される不良ブロック数が2番目に大きいゾーンの不良ブロック数を最小化するべく、前記関数による変換の実行回数を設定し、
設定された変換の実行回数により、前記複数のゾーンの各々に分類されるブロックを決定すると共に、分類される不良ブロック数が最大となるゾーンを使用禁止状態にしてもよい。
Further, the classification control module includes:
The number of defective blocks in the second largest zone classified into each of the plurality of zones when the maximum number of defective blocks classified into each of the plurality of zones cannot be less than the allowable number Set the number of conversions performed by the function
The blocks classified into each of the plurality of zones may be determined based on the set number of conversions performed, and the zone having the maximum number of classified defective blocks may be disabled.

また、前記分類制御モジュールは、
前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、前記複数のゾーンの各々に分類される不良ブロック数がn番目(nは3以上の自然数)に大きいゾーンの不良ブロック数を最小化するべく、前記関数による変換の実行回数を設定し、
設定された変換の実行回数により、前記複数のゾーンの各々に分類されるブロックを決定すると共に、分類される不良ブロック数が1番目に大きいゾーンからn−1番目に大きいゾーンまでを使用禁止状態にしてもよい。
Further, the classification control module includes:
When the maximum number of defective blocks classified into each of the plurality of zones cannot be less than the allowable number, the number of defective blocks classified into each of the plurality of zones is nth (n is a natural number of 3 or more) ) To minimize the number of bad blocks in a large zone, set the number of conversions performed by the function,
Blocks classified into each of the plurality of zones are determined based on the set number of times of conversion, and the use-prohibited state from the zone having the largest number of defective blocks to the n−1th largest zone is prohibited. It may be.

上記目的を達成するために、本発明の第2の観点に係るフラッシュメモリシステムは、本発明の第1の観点に係るメモリコントローラとフラッシュメモリを備えることを特徴とする。   In order to achieve the above object, a flash memory system according to a second aspect of the present invention includes a memory controller and a flash memory according to the first aspect of the present invention.

上記目的を達成するために、本発明の第3の観点に係るフラッシュメモリの制御方法は、
ホストシステムにおける論理アドレス空間に対して予め定められた数のブロックを含んだ複数のゾーンに分割されたフラッシュメモリの仮想アドレス空間を割り当て、
更に、前記複数のゾーンの各々に分類されるブロックの仮想アドレスに対して物理アドレスを割り当てることにより、
ホストシステムとフラッシュメモリとの間でのデータ交換動作を制御するフラッシュメモリの制御方法であって、
前記ゾーンに含まれる不良ブロック数が許容数を超えているか否かを診断する処理と、
前記診断により、前記複数のゾーンのうちの1以上に許容数を超える不良ブロックが含まれていると診断された場合に、仮想アドレスと前記物理アドレスとの対応関係を変更する処理と、
を含むことを特徴とする。
In order to achieve the above object, a flash memory control method according to a third aspect of the present invention includes:
Allocating a virtual address space of flash memory divided into a plurality of zones including a predetermined number of blocks with respect to the logical address space in the host system,
Further, by assigning a physical address to a virtual address of a block classified into each of the plurality of zones,
A flash memory control method for controlling data exchange operation between a host system and flash memory,
A process for diagnosing whether or not the number of bad blocks included in the zone exceeds an allowable number; and
A process of changing a correspondence relationship between a virtual address and the physical address when it is diagnosed by the diagnosis that a defective block exceeding an allowable number is included in one or more of the plurality of zones;
It is characterized by including.

尚、前記仮想アドレスと前記物理アドレスとの対応関係は、
前記複数のゾーンの各々に分類されるブロックの仮想アドレスを前記フラッシュメモリにおける物理アドレスと関連付ける複数の関連テーブルを予め保持し、
前記複数の関連テーブルのうちの1つを参照することにより決定されてもよい。
The correspondence between the virtual address and the physical address is
A plurality of association tables for associating virtual addresses of blocks classified into each of the plurality of zones with physical addresses in the flash memory in advance,
It may be determined by referring to one of the plurality of related tables.

この場合、前記仮想アドレスと前記物理アドレスとの対応関係は、
前記複数のゾーンの各々に分類される不良ブロックの最大数を最小化するべく、前記複数の関連テーブルのうちの1つが選択され、
選択された前記関連テーブルを参照することにより決定されてもよい。
In this case, the correspondence between the virtual address and the physical address is
One of the plurality of related tables is selected to minimize the maximum number of bad blocks classified into each of the plurality of zones;
It may be determined by referring to the selected association table.

また、前記複数のっゾーンの各々に分類される不良ブロックの最大数を最小化するべく、前記複数の関連テーブルのうちの1つが選択され、
選択された前記関連テーブルを参照することにより決定されてもよい。
In addition, one of the plurality of related tables is selected to minimize the maximum number of bad blocks classified into each of the plurality of zones.
It may be determined by referring to the selected association table.

また、前記仮想アドレスと前記物理アドレスとの対応関係を変更する処理を実行しても、前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、
前記複数のゾーンの各々に分類される不良ブロック数が2番目に大きいゾーンの不良ブロック数を最小化するべく、前記複数の関連テーブルのうちの1つが選択され、
選択された前記関連テーブルを参照することにより、前記仮想アドレスと前記物理アドレスとの対応関係が決定されると共に、分類される不良ブロック数が最大となるゾーンの使用が禁止されてもよい。
In addition, even when the process of changing the correspondence relationship between the virtual address and the physical address is performed, when the maximum number of defective blocks classified into each of the plurality of zones cannot be reduced to an allowable number or less,
One of the plurality of related tables is selected in order to minimize the number of bad blocks in a zone having the second largest number of bad blocks classified into each of the plurality of zones;
By referring to the selected association table, the correspondence relationship between the virtual address and the physical address may be determined, and use of a zone in which the number of classified bad blocks is maximized may be prohibited.

また、前記仮想アドレスと前記物理アドレスとの対応関係を変更する処理を実行しても、前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、
前記複数のゾーンの各々に分類される不良ブロック数がn番目(nは3以上の自然数)に大きいゾーンの不良ブロック数を最小化するべく、前記複数の関連テーブルのうちの1つが選択され、
選択された前記関連テーブルを参照することにより、前記仮想アドレスと前記物理アドレスとの対応関係が決定されると共に、分類される不良ブロック数が1番目に大きいゾーンからn−1番目に大きいゾーンまでの使用が禁止されてもよい。
In addition, even when the process of changing the correspondence relationship between the virtual address and the physical address is performed, when the maximum number of defective blocks classified into each of the plurality of zones cannot be reduced to an allowable number or less,
One of the plurality of related tables is selected to minimize the number of bad blocks in a zone where the number of bad blocks classified into each of the plurality of zones is nth (n is a natural number of 3 or more);
By referring to the selected association table, the correspondence relationship between the virtual address and the physical address is determined, and the number of defective blocks to be classified is from the first largest zone to the n−1th largest zone. The use of may be prohibited.

さらに、また、前記仮想アドレスと前記物理アドレスとの対応関係は、
前記複数のゾーンの各々に分類されるブロックの仮想アドレスを前記フラッシュメモリにおける物理アドレスと関連付けるための複数の関数を予め保持し、
前記複数の関数のうちの1つを使用することにより決定されてもよい。
Furthermore, the correspondence between the virtual address and the physical address is:
A plurality of functions for previously associating virtual addresses of blocks classified into each of the plurality of zones with physical addresses in the flash memory;
It may be determined by using one of the plurality of functions.

この場合、前記仮想アドレスと前記物理アドレスとの対応関係は、
前記複数のゾーンの各々に分類される不良ブロックの最大数を最小化するべく、前記複数の関数のうちの1つが選択され、
選択された関数を使用することにより決定されてもよい。
In this case, the correspondence between the virtual address and the physical address is
One of the plurality of functions is selected to minimize the maximum number of bad blocks classified into each of the plurality of zones;
It may be determined by using the selected function.

また、前記仮想アドレスと前記物理アドレスとの対応関係を変更する処理を実行しても、前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、
前記複数のゾーンの各々に分類される不良ブロック数が2番目に大きいゾーンの不良ブロック数を最小化するべく、前記複数の関数のうちの1つが選択され、
選択された関数を使用することにより、前記仮想アドレスと前記物理アドレスとの対応関係が決定されると共に、分類される不良ブロック数が最大となるゾーンの使用が禁止されてもよい。
In addition, even when the process of changing the correspondence relationship between the virtual address and the physical address is performed, when the maximum number of defective blocks classified into each of the plurality of zones cannot be reduced to an allowable number or less,
One of the plurality of functions is selected to minimize the number of bad blocks in the second largest zone classified into each of the plurality of zones;
By using the selected function, the correspondence relationship between the virtual address and the physical address may be determined, and the use of a zone that maximizes the number of classified bad blocks may be prohibited.

また、前記仮想アドレスと前記物理アドレスとの対応関係を変更する処理を実行しても、前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、
前記複数のゾーンの各々に分類される不良ブロック数がn番目(nは3以上の自然数)に大きいゾーンの不良ブロック数を最小化するべく、前記複数の関数のうちの1つが選択され、
選択された関数を使用することにより、前記仮想アドレスと前記物理アドレスとの対応関係が決定されると共に、分類される不良ブロック数が1番目に大きいゾーンからn−1番目に大きいゾーンまでの使用が禁止されてもよい。
In addition, even when the process of changing the correspondence relationship between the virtual address and the physical address is performed, when the maximum number of defective blocks classified into each of the plurality of zones cannot be reduced to an allowable number or less,
One of the plurality of functions is selected to minimize the number of bad blocks in a zone where the number of bad blocks classified into each of the plurality of zones is nth (n is a natural number of 3 or more);
By using the selected function, the correspondence between the virtual address and the physical address is determined, and the number of bad blocks to be classified is used from the zone with the first largest to the zone with the n-1st largest. May be prohibited.

さらに、また、前記仮想アドレスと前記物理アドレスとの対応関係は、
前記複数のゾーンの各々に分類されるブロックの仮想アドレスを前記フラッシュメモリにおける物理アドレスと関連付けるべく、1対1の写像循環を生成する関数を予め保持し、
前記関数による変換の実行回数を設定することにより決定されてもよい。
Furthermore, the correspondence between the virtual address and the physical address is:
In order to associate a virtual address of a block classified into each of the plurality of zones with a physical address in the flash memory, a function for generating a one-to-one mapping cycle is stored in advance.
It may be determined by setting the number of executions of conversion by the function.

この場合、前記関数が、テント写像を生成する関数であってもよい。
また、前記テント写像における循環周期がTであり、前記複数のゾーンのいずれかに分類されるブロックの総数がNであるときに、TとNが
N=2(T−1)
の関係を満たしてもよい。
また、前記仮想アドレスと前記物理アドレスとの対応関係は、
前記複数のゾーンの各々に分類される不良ブロックの最大数を最小化するべく、前記関数による変換の実行回数が設定され、
設定された変換の実行回数により決定されてもよい。
また、前記仮想アドレスと前記物理アドレスとの対応関係を変更する処理を実行しても、前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、
前記複数のゾーンの各々に分類される不良ブロック数が2番目に大きいゾーンの不良ブロック数を最小化するべく、前記関数による変換の実行回数が設定され、
設定された変換の実行回数により、前記仮想アドレスと前記物理アドレスとの対応関係が決定されると共に、分類される不良ブロック数が最大となるゾーンの使用が禁止されてもよい。
In this case, the function may be a function that generates a tent map.
Further, when the circulation period in the tent map is T and the total number of blocks classified into any of the plurality of zones is N, T and N are N = 2 (T−1)
May be satisfied.
The correspondence between the virtual address and the physical address is
In order to minimize the maximum number of bad blocks classified into each of the plurality of zones, the number of executions of conversion by the function is set,
It may be determined by the set number of executions of conversion.
In addition, even when the process of changing the correspondence relationship between the virtual address and the physical address is performed, when the maximum number of defective blocks classified into each of the plurality of zones cannot be reduced to an allowable number or less,
In order to minimize the number of bad blocks in the zone having the second largest number of bad blocks classified into each of the plurality of zones, the number of executions of conversion by the function is set,
The correspondence relationship between the virtual address and the physical address may be determined according to the set number of conversions performed, and the use of a zone that maximizes the number of classified bad blocks may be prohibited.

また、前記仮想アドレスと前記物理アドレスとの対応関係を変更する処理を実行しても、前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、
前記複数のゾーンの各々に分類される不良ブロック数がn番目(nは3以上の自然数)に大きいゾーンの不良ブロック数を最小化するべく、前記関数による変換の実行回数が設定され、
設定された変換の実行回数により、前記仮想アドレスと前記物理アドレスとの対応関係が決定されると共に、分類される不良ブロック数が1番目に大きいゾーンからn−1番目に大きいゾーンまでの使用が禁止されてもよい。
In addition, even when the process of changing the correspondence relationship between the virtual address and the physical address is performed, when the maximum number of defective blocks classified into each of the plurality of zones cannot be reduced to an allowable number or less,
In order to minimize the number of bad blocks in a zone where the number of bad blocks classified into each of the plurality of zones is nth (n is a natural number of 3 or more), the number of times of performing conversion by the function is set,
The correspondence between the virtual address and the physical address is determined based on the set number of conversions performed, and the use from the zone having the largest number of defective blocks to the n−1th largest zone is used. It may be prohibited.

本発明によれば、フラッシュメモリの一部分に多くの不良ブロックが存在するときに、フラッシュメモリにおける不具合の発生を抑制することができる。   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 are written. 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<2nのとき
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 the 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 a range where 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では、特定のゾーンに不良ブロックが集中することを防止するために、1つのゾーンに含まれる複数のブロックを、フラッシュメモリ2内に分散させている。ここで、各ゾーンに含まれる仮想ブロックアドレスVBAと物理ブロックアドレスの対応関係は、フラッシュメモリシステム1を初期化したときに設定される。この初期化の際には、各ゾーンに含まれる不良ブロックの最大数が最小になるように仮想ブロックアドレスVBAと物理ブロックアドレスPBAの対応関係が設定される。実質的には、各ゾーンに含まれる不良ブロックの数が均一化されるように仮想ブロックアドレスVBAと物理ブロックアドレスPBAの対応関係が設定される。   As described above, in the flash memory system 1 according to the present invention, a plurality of blocks included in one zone are dispersed in the flash memory 2 in order to prevent concentration of defective blocks in a specific zone. . Here, the correspondence between the virtual block address VBA and the physical block address included in each zone is set when the flash memory system 1 is initialized. At the time of this initialization, the correspondence between the virtual block address VBA and the physical block address PBA is set so that the maximum number of defective blocks included in each zone is minimized. In effect, the correspondence between the virtual block address VBA and the physical block address PBA is set so that the number of bad blocks included in each zone is made uniform.

しかしながら、不良ブロックでなかったブロックが、その後の使用により不良ブロックとなることがあり、そのような不良ブロックが特定のゾーンに集中し、不良ブロックの数が許容数(ゾーンに割り当てられた予備的なブロックの数)を超えてしまった場合、フラッシュメモリシステム1は動作を停止してしまう。   However, a block that was not a bad block may become a bad block by subsequent use, and such bad blocks are concentrated in a specific zone, and the number of bad blocks is an allowable number (preliminary number assigned to the zone). If the number of blocks exceeds the number of blocks, the flash memory system 1 stops its operation.

フラッシュメモリシステム1が動作を停止したときに、その動作の停止が、ゾーンに含まれる不良ブロックの数が許容数を超えてしまったことに起因するのであれば、再度、仮想ブロックアドレスVBAと物理ブロックアドレスPBAの対応関係を設定し直せば使用することができるようになることが多い。従って、このような場合には、各ゾーンに含まれる不良ブロックの数が、許容数を超えているか否かの診断(以下、不良ブロック数の診断と言う。)を実行することが好ましい。   When the flash memory system 1 stops operating, if the stop of the operation is caused by the fact that the number of defective blocks included in the zone exceeds the allowable number, the virtual block address VBA and the physical block again. It is often possible to use the block address PBA by resetting the correspondence relationship. Therefore, in such a case, it is preferable to execute a diagnosis of whether or not the number of defective blocks included in each zone exceeds an allowable number (hereinafter referred to as a diagnosis of the number of defective blocks).

この不良ブロック数の診断では、現状の仮想ブロックアドレスVBAと物理ブロックアドレスPBAの対応関係で、各ゾーンに含まれる不良ブロックの数をブロックステータス(不良ブロックであることを示すブロックステータス)に基づいて集計する。尚、ブロックステータスに基づいて集計する場合には、各ブロックのブロックステータスを読み出して集計しなければならないが、各ゾーンに含まれる不良ブロックの仮想ブロックアドレスVBA、又は各ゾーンに含まれる不良ブロックの数を、特定のブロックに書き込むようにすれば、そのブロックに書き込まれているこれらの情報に基づいて不良ブロックの数を知得することができる。   In the diagnosis of the number of defective blocks, the number of defective blocks included in each zone is determined based on the block status (block status indicating that it is a defective block) based on the current correspondence between the virtual block address VBA and the physical block address PBA. Tally. In addition, when counting based on the block status, the block status of each block must be read and counted, but the virtual block address VBA of the defective block included in each zone or the defective block included in each zone If the number is written in a specific block, the number of defective blocks can be known based on the information written in the block.

このようにして得られた各ゾーンの不良ブロック数が許容数を超えているか否かを診断し、許容数を超えているゾーンが存在する場合には、各ゾーンに含まれる不良ブロックの最大数を最小化するように仮想ブロックアドレスVBAと物理ブロックアドレスPBAの対応関係を再設定する。つまり、上述のように各ゾーンに分類される不良ブロックの最大数を最小化するように置換テーブル若しくは関数を再度選択したり、又は、写像循環を生成する関数による変換の実行回数を再度設定したりする。   Diagnose whether the number of bad blocks in each zone obtained in this way exceeds the allowable number, and if there are zones exceeding the allowable number, the maximum number of bad blocks in each zone The correspondence relationship between the virtual block address VBA and the physical block address PBA is reset. In other words, as described above, the replacement table or function is selected again so as to minimize the maximum number of bad blocks classified into each zone, or the number of conversions executed by the function that generates the mapping cycle is set again. Or

この仮想ブロックアドレスVBAと物理ブロックアドレスPBAの対応関係の再設定を行っても、不良ブロックの数が許容数を超えているゾーンが存在する場合には、前記複数のゾーンの各々に分類される不良ブロック数が2番目に大きいゾーンの不良ブロック数を最小化するように仮想ブロックアドレスVBAと物理ブロックアドレスPBAの対応関係を再設定する。このように設定した場合、分類された不良ブロック数が最大となるゾーンは、不良ブロックの数が許容数を超えてしまうので、そのゾーンを使用禁止状態にする。つまり、この設定では、特定のゾーンに不良ブロックを集中させることにより、その他のゾーンに分類される不良ブロック数を小さくしている。   Even if the correspondence between the virtual block address VBA and the physical block address PBA is reset, if there is a zone where the number of bad blocks exceeds the allowable number, the zone is classified into each of the plurality of zones. The correspondence relationship between the virtual block address VBA and the physical block address PBA is reset so as to minimize the number of bad blocks in the zone having the second largest number of bad blocks. In such a setting, since the number of defective blocks exceeds the allowable number, the zone in which the number of classified defective blocks is maximized is set in a use-prohibited state. That is, in this setting, the number of defective blocks classified into other zones is reduced by concentrating defective blocks in a specific zone.

上記のように使用禁止状態にするゾーンは、2個以上であってもよい。例えば、前記複数のゾーンの各々に分類される不良ブロック数が3(=n)番目に大きいゾーンの不良ブロック数を最小化するように仮想ブロックアドレスVBAと物理ブロックアドレスPBAの対応関係を再設定し、分類された不良ブロック数が1番目と2(=n−1)番目に大きいゾーンを使用禁止状態にする。同様に、不良ブロック数が4(=n)番目に大きいゾーンの不良ブロック数を最小化するように仮想ブロックアドレスVBAと物理ブロックアドレスPBAの対応関係を再設定した場合は、分類された不良ブロック数が1番目、2番目及び3(=n−1)番目に大きいゾーンを使用禁止状態にする。つまり、この設定では、使用禁止状態にするゾーンを除いたゾーンに分類される不良ブロック数の最大数を最小化するように仮想ブロックアドレスVBAと物理ブロックアドレスPBAの対応関係を再設定している。   As described above, there may be two or more zones that are disabled. For example, the correspondence relationship between the virtual block address VBA and the physical block address PBA is reset so as to minimize the number of bad blocks in the zone where the number of bad blocks classified into each of the plurality of zones is 3 (= n). Then, the zones with the first and second (= n−1) th largest number of defective blocks are disabled. Similarly, when the correspondence relationship between the virtual block address VBA and the physical block address PBA is reset so as to minimize the number of bad blocks in the zone where the number of bad blocks is 4 (= n), the classified bad blocks The zones having the first, second and third (= n-1) th largest numbers are disabled. In other words, in this setting, the correspondence relationship between the virtual block address VBA and the physical block address PBA is reset so as to minimize the maximum number of bad blocks classified into zones excluding the zone to be disabled. .

上述のような仮想ブロックアドレスVBAと物理ブロックアドレスPBAの対応関係の再設定を行うことにより、一旦、使用不能となったフラッシュメモリシステム1を再び使用できる状態に戻すことができる。又、上記の不良ブロック数診断、置換テーブル若しくは関数の再選択、及び写像循環を生成する関数による変換の実行回数の再設定は、これらの処理に対応する外部コマンドを設定しておき、ホストシステム4側から与えられる外部コマンドに基づいて実行されるようにしてもよい。   By resetting the correspondence between the virtual block address VBA and the physical block address PBA as described above, the flash memory system 1 that has become unusable once can be returned to a usable state. In addition, the above-mentioned fault block count diagnosis, replacement table or function reselection, and resetting of the number of executions of conversion by a function that generates a map circulation are performed by setting external commands corresponding to these processes, and the host system. It may be executed based on an external command given from the 4th side.

又、上記の不良ブロック数診断は、いずれかのゾーンに含まれる不良ブロックの数が許容数を超えていることを検知できれば十分なので、ホストシステム4から与えられる外部コマンドに基づいた書込み処理で、新たなデータを書き込む消去済みのブロックを確保できなくなった場合は、それを不良ブロック数診断の診断結果としてもよい。従って、新たなデータを書き込む消去済みのブロックを確保できなくなった場合は、このエラーに基づいて置換テーブル若しくは関数の再選択、又は写像循環を生成する関数による変換の実行回数の再設定を行うようにしてもよい。   In addition, the above-described bad block number diagnosis is sufficient if it is possible to detect that the number of bad blocks included in any of the zones exceeds the allowable number, so in the writing process based on the external command given from the host system 4, When it becomes impossible to secure an erased block for writing new data, it may be used as a diagnosis result of the defective block number diagnosis. Therefore, when it becomes impossible to secure an erased block to which new data is written, the replacement table or function is reselected based on this error, or the number of executions of conversion by the function that generates mapping circulation is reset. It may be.

尚、仮想ブロックアドレスVBAと物理ブロックアドレスPBAの対応関係を再設定する場合には、予めフラッシュメモリ2に書き込まれているデータをホストシステム4側のSRAMやDRAMに退避しておくことが好ましい。又、分類された不良ブロック数が最大となるゾーンを使用禁止状態にした場合には、それに応じて、フラッシュメモリに書き込まれている記憶容量等の管理情報を変更する。   When resetting the correspondence between the virtual block address VBA and the physical block address PBA, it is preferable to save the data previously written in the flash memory 2 in the SRAM or DRAM on the host system 4 side. In addition, when the zone having the maximum number of classified defective blocks is disabled, the management information such as the storage capacity written in the flash memory is changed accordingly.

本発明にかかるフラッシュメモリシステムのブロック図である。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 allocated 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 (31)

予め定められた数のブロックを含んだ複数のゾーンに分割されたフラッシュメモリの仮想アドレス空間とホストシステムにおける論理アドレス空間との対応関係を管理するよう構成された管理モジュールと、
前記複数のゾーンの各々に分類されるブロックの仮想アドレスと前記フラッシュメモリにおける物理アドレスとの対応関係を管理することにより、前記複数のゾーンの各々に分類されるブロックを決定する分類制御モジュールと、
前記各ゾーンに含まれる不良ブロック数が許容数を超えているか否かを診断する診断モジュールとを備え、
前記診断モジュールにより、前記複数のゾーンのうちの1以上に前記許容数を超える不良ブロックが含まれていると診断された場合に、前記仮想アドレスと物理アドレスとの対応関係を変更することを特徴とするメモリコントローラ。
A management module configured to manage the correspondence between the virtual address space of the flash memory divided into a plurality of zones including a predetermined number of blocks and the logical address space in the host system;
A classification control module for determining a block classified into each of the plurality of zones by managing a correspondence relationship between a virtual address of a block classified into each of the plurality of zones and a physical address in the flash memory;
A diagnostic module for diagnosing whether the number of bad blocks included in each zone exceeds an allowable number,
When the diagnostic module diagnoses that one or more of the plurality of zones includes a defective block exceeding the allowable number, the correspondence relationship between the virtual address and the physical address is changed. And memory controller.
前記分類制御モジュールは、
前記複数のゾーンの各々に分類されるブロックの仮想アドレスを前記フラッシュメモリにおける物理アドレスと関連付ける複数の関連テーブルを予め保持し、
前記複数の関連テーブルのうちの1つを参照することにより、前記複数のゾーンの各々に分類されるブロックを決定する、
ことを特徴とする請求項1に記載のメモリコントローラ。
The classification control module includes:
A plurality of association tables for associating virtual addresses of blocks classified into each of the plurality of zones with physical addresses in the flash memory in advance,
Determining blocks classified into each of the plurality of zones by referring to one of the plurality of association tables;
The memory controller according to claim 1.
前記分類制御モジュールは、
前記複数のゾーンの各々に分類される不良ブロックの最大数を最小化するべく、前記複数の関連テーブルのうちの1つを選択し、
選択された前記関連テーブルを参照することにより、前記複数のゾーンの各々に分類されるブロックを決定する、
ことを特徴とする請求項2に記載のメモリコントローラ。
The classification control module includes:
Selecting one of the plurality of association tables to minimize the maximum number of bad blocks classified into each of the plurality of zones;
Determining blocks classified into each of the plurality of zones by referring to the selected association table;
The memory controller according to claim 2.
前記分類制御モジュールは、
前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、前記複数のゾーンの各々に分類される不良ブロック数が2番目に大きいゾーンの不良ブロック数を最小化するべく、前記複数の関連テーブルのうちの1つを選択し、
選択された前記関連テーブルを参照することにより、前記複数のゾーンの各々に分類されるブロックを決定すると共に、分類される不良ブロック数が最大となるゾーンを使用禁止状態にする、
ことを特徴とする請求項2に記載のメモリコントローラ。
The classification control module includes:
The number of defective blocks in the second largest zone classified into each of the plurality of zones when the maximum number of defective blocks classified into each of the plurality of zones cannot be less than the allowable number To select one of the plurality of related tables,
By referring to the selected association table, a block classified into each of the plurality of zones is determined, and a zone where the number of classified bad blocks is maximized is disabled.
The memory controller according to claim 2.
前記分類制御モジュールは、
前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、前記複数のゾーンの各々に分類される不良ブロック数がn番目(nは3以上の自然数)に大きいゾーンの不良ブロック数を最小化するべく、前記複数の関連テーブルのうちの1つを選択し、
選択された前記関連テーブルを参照することにより、前記複数のゾーンの各々に分類されるブロックを決定すると共に、分類される不良ブロック数が1番目に大きいゾーンからn−1番目に大きいゾーンまでを使用禁止状態にする、
ことを特徴とする請求項2に記載のメモリコントローラ。
The classification control module includes:
When the maximum number of defective blocks classified into each of the plurality of zones cannot be less than the allowable number, the number of defective blocks classified into each of the plurality of zones is nth (n is a natural number of 3 or more) ) Select one of the plurality of related tables to minimize the number of bad blocks in a large zone,
By referring to the selected relation table, the blocks classified into each of the plurality of zones are determined, and the number of defective blocks to be classified is changed from the first largest zone to the n−1th largest zone. Disable it,
The memory controller according to claim 2.
前記分類制御モジュールは、
前記複数のゾーンの各々に分類されるブロックの仮想アドレスを前記フラッシュメモリにおける物理アドレスと関連付けるための複数の関数を予め保持し、
前記複数の関数のうちの1つを使用することにより、前記複数のゾーンの各々に分類されるブロックを決定する、
ことを特徴とする請求項1に記載のメモリコントローラ。
The classification control module includes:
A plurality of functions for previously associating virtual addresses of blocks classified into each of the plurality of zones with physical addresses in the flash memory;
Determining a block classified into each of the plurality of zones by using one of the plurality of functions;
The memory controller according to claim 1.
前記分類制御モジュールは、
前記複数のゾーンの各々に分類される不良ブロックの最大数を最小化するべく、前記複数の関数のうちの1つを選択し、
選択された関数を使用することにより、前記複数のゾーンの各々に分類されるブロックを決定する、
ことを特徴とする請求項6に記載のメモリコントローラ。
The classification control module includes:
Selecting one of the plurality of functions to minimize the maximum number of bad blocks classified into each of the plurality of zones;
Determining a block classified into each of the plurality of zones by using a selected function;
The memory controller according to claim 6.
前記分類制御モジュールは、
前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、前記複数のゾーンの各々に分類される不良ブロック数が2番目に大きいゾーンの不良ブロック数を最小化するべく、前記複数の関数のうちの1つを選択し、
選択された関数を使用することにより、前記複数のゾーンの各々に分類されるブロックを決定すると共に、分類される不良ブロック数が最大となるゾーンを使用禁止状態にする、
ことを特徴とする請求項6に記載のメモリコントローラ。
The classification control module includes:
The number of defective blocks in the second largest zone classified into each of the plurality of zones when the maximum number of defective blocks classified into each of the plurality of zones cannot be less than the allowable number Select one of the plurality of functions to minimize
Determining a block classified into each of the plurality of zones by using the selected function, and disabling a zone in which the number of classified bad blocks is maximized;
The memory controller according to claim 6.
前記分類制御モジュールは、
前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、前記複数のゾーンの各々に分類される不良ブロック数がn番目(nは3以上の自然数)に大きいゾーンの不良ブロック数を最小化するべく、前記複数の関数のうちの1つを選択し、
選択された関数を使用することにより、前記複数のゾーンの各々に分類されるブロックを決定すると共に、分類される不良ブロック数が1番目に大きいゾーンからn−1番目に大きいゾーンまでを使用禁止状態にする、
ことを特徴とする請求項6に記載のメモリコントローラ。
The classification control module includes:
When the maximum number of defective blocks classified into each of the plurality of zones cannot be less than the allowable number, the number of defective blocks classified into each of the plurality of zones is nth (n is a natural number of 3 or more) ) Select one of the plurality of functions to minimize the number of bad blocks in a large zone,
By using the selected function, the blocks classified into each of the plurality of zones are determined, and the use of the zone from the first largest defective block to the n−1th largest zone is prohibited. State
The memory controller according to claim 6.
前記分類制御モジュールは、
前記複数のゾーンの各々に分類されるブロックの仮想アドレスを前記フラッシュメモリにおける物理アドレスと関連付けるべく、1対1の写像循環を生成する関数を予め保持し、
前記関数による変換の実行回数を設定することにより、前記複数のゾーンの各々に分類されるブロックを決定する、
ことを特徴とする請求項1に記載のメモリコントローラ。
The classification control module includes:
In order to associate a virtual address of a block classified into each of the plurality of zones with a physical address in the flash memory, a function for generating a one-to-one mapping cycle is stored in advance.
By determining the number of executions of conversion by the function, the blocks classified into each of the plurality of zones are determined.
The memory controller according to claim 1.
前記関数は、テント写像を生成する関数である、
ことを特徴とする請求項10に記載のメモリコントローラ。
The function is a function that generates a tent map.
The memory controller according to claim 10.
前記テント写像における循環周期がTであり、前記複数のゾーンのいずれかに分類されるブロックの総数がNであるときに、TとNが
N=2(T−1)
の関係を満たす、
ことを特徴とする請求項10に記載のメモリコントローラ。
When the circulation period in the tent map is T and the total number of blocks classified into any of the plurality of zones is N, T and N are N = 2 (T−1)
Satisfy the relationship
The memory controller according to claim 10.
前記分類制御モジュールは、
前記複数のゾーンの各々に分類される不良ブロックの最大数を最小化するべく、前記関数による変換の実行回数を設定し、
設定された変換の実行回数により、前記複数のゾーンの各々に分類されるブロックを決定する、
ことを特徴とする請求項10乃至12のいずれか1項に記載のメモリコントローラ。
The classification control module includes:
In order to minimize the maximum number of bad blocks classified into each of the plurality of zones, the number of conversions performed by the function is set,
A block classified into each of the plurality of zones is determined according to the set number of times of conversion.
The memory controller according to claim 10, wherein the memory controller is a memory controller.
前記分類制御モジュールは、
前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、前記複数のゾーンの各々に分類される不良ブロック数が2番目に大きいゾーンの不良ブロック数を最小化するべく、前記関数による変換の実行回数を設定し、
設定された変換の実行回数により、前記複数のゾーンの各々に分類されるブロックを決定すると共に、分類される不良ブロック数が最大となるゾーンを使用禁止状態にする、
ことを特徴とする請求項10乃至12のいずれか1項に記載のメモリコントローラ。
The classification control module includes:
The number of defective blocks in the second largest zone classified into each of the plurality of zones when the maximum number of defective blocks classified into each of the plurality of zones cannot be less than the allowable number Set the number of conversions performed by the function
A block that is classified into each of the plurality of zones is determined based on the set number of times of conversion, and a zone in which the number of defective blocks that are classified is maximized is disabled.
The memory controller according to claim 10, wherein the memory controller is a memory controller.
前記分類制御モジュールは、
前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、前記複数のゾーンの各々に分類される不良ブロック数がn番目(nは3以上の自然数)に大きいゾーンの不良ブロック数を最小化するべく、前記関数による変換の実行回数を設定し、
設定された変換の実行回数により、前記複数のゾーンの各々に分類されるブロックを決定すると共に、分類される不良ブロック数が1番目に大きいゾーンからn−1番目に大きいゾーンまでを使用禁止状態にする、
ことを特徴とする請求項10乃至12のいずれか1項に記載のメモリコントローラ。
The classification control module includes:
When the maximum number of defective blocks classified into each of the plurality of zones cannot be less than the allowable number, the number of defective blocks classified into each of the plurality of zones is nth (n is a natural number of 3 or more) ) To minimize the number of bad blocks in a large zone, set the number of conversions performed by the function,
Blocks classified into each of the plurality of zones are determined based on the set number of times of conversion, and the use-prohibited state from the zone having the largest number of defective blocks to the n−1th largest zone is prohibited. To
The memory controller according to claim 10, wherein the memory controller is a memory controller.
請求項1乃至15のいずれか1項に記載のメモリコントローラとフラッシュメモリを備えることを特徴とするフラッシュメモリシステム。   16. A flash memory system comprising the memory controller according to claim 1 and a flash memory. ホストシステムにおける論理アドレス空間に対して予め定められた数のブロックを含んだ複数のゾーンに分割されたフラッシュメモリの仮想アドレス空間を割り当て、
更に、前記複数のゾーンの各々に分類されるブロックの仮想アドレスに対して物理アドレスを割り当てることにより、
ホストシステムとフラッシュメモリとの間でのデータ交換動作を制御するフラッシュメモリの制御方法であって、
前記ゾーンに含まれる不良ブロック数が許容数を超えているか否かを診断する処理と、
前記診断により、前記複数のゾーンのうちの1以上に許容数を超える不良ブロックが含まれていると診断された場合に、仮想アドレスと前記物理アドレスとの対応関係を変更する処理と、
を含むことを特徴とするフラッシュメモリの制御方法。
Allocating a virtual address space of flash memory divided into a plurality of zones including a predetermined number of blocks with respect to the logical address space in the host system,
Further, by assigning a physical address to a virtual address of a block classified into each of the plurality of zones,
A flash memory control method for controlling data exchange operation between a host system and flash memory,
A process for diagnosing whether or not the number of bad blocks included in the zone exceeds an allowable number; and
A process of changing a correspondence relationship between a virtual address and the physical address when it is diagnosed by the diagnosis that a defective block exceeding an allowable number is included in one or more of the plurality of zones;
A method for controlling a flash memory, comprising:
前記仮想アドレスと前記物理アドレスとの対応関係は、
前記複数のゾーンの各々に分類されるブロックの仮想アドレスを前記フラッシュメモリにおける物理アドレスと関連付ける複数の関連テーブルを予め保持し、
前記複数の関連テーブルのうちの1つを参照することにより決定される、
ことを特徴とする請求項17に記載のフラッシュメモリの制御方法。
The correspondence between the virtual address and the physical address is:
A plurality of association tables for associating virtual addresses of blocks classified into each of the plurality of zones with physical addresses in the flash memory in advance,
Determined by referring to one of the plurality of related tables;
The method of controlling a flash memory according to claim 17.
前記仮想アドレスと前記物理アドレスとの対応関係は、
前記複数のゾーンの各々に分類される不良ブロックの最大数を最小化するべく、前記複数の関連テーブルのうちの1つが選択され、
選択された前記関連テーブルを参照することにより決定される、
ことを特徴とする請求項18に記載のフラッシュメモリの制御方法。
The correspondence between the virtual address and the physical address is:
One of the plurality of related tables is selected to minimize the maximum number of bad blocks classified into each of the plurality of zones;
Determined by referring to the selected association table;
The method of controlling a flash memory according to claim 18.
前記仮想アドレスと前記物理アドレスとの対応関係を変更する処理を実行しても、前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、
前記複数のゾーンの各々に分類される不良ブロック数が2番目に大きいゾーンの不良ブロック数を最小化するべく、前記複数の関連テーブルのうちの1つが選択され、
選択された前記関連テーブルを参照することにより、前記仮想アドレスと前記物理アドレスとの対応関係が決定されると共に、分類される不良ブロック数が最大となるゾーンの使用が禁止される、
ことを特徴とする請求項18に記載のフラッシュメモリの制御方法。
Even when executing the process of changing the correspondence between the virtual address and the physical address, when the maximum number of bad blocks classified into each of the plurality of zones cannot be less than the allowable number,
One of the plurality of related tables is selected in order to minimize the number of bad blocks in a zone having the second largest number of bad blocks classified into each of the plurality of zones;
By referring to the selected association table, the correspondence between the virtual address and the physical address is determined, and the use of a zone in which the number of classified bad blocks is maximized is prohibited.
The method of controlling a flash memory according to claim 18.
前記仮想アドレスと前記物理アドレスとの対応関係を変更する処理を実行しても、前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、
前記複数のゾーンの各々に分類される不良ブロック数がn番目(nは3以上の自然数)に大きいゾーンの不良ブロック数を最小化するべく、前記複数の関連テーブルのうちの1つが選択され、
選択された前記関連テーブルを参照することにより、前記仮想アドレスと前記物理アドレスとの対応関係が決定されると共に、分類される不良ブロック数が1番目に大きいゾーンからn−1番目に大きいゾーンまでの使用が禁止される、
ことを特徴とする請求項18に記載のフラッシュメモリの制御方法。
Even when executing the process of changing the correspondence between the virtual address and the physical address, when the maximum number of bad blocks classified into each of the plurality of zones cannot be less than the allowable number,
One of the plurality of related tables is selected to minimize the number of bad blocks in a zone where the number of bad blocks classified into each of the plurality of zones is nth (n is a natural number of 3 or more);
By referring to the selected association table, the correspondence relationship between the virtual address and the physical address is determined, and the number of defective blocks to be classified is from the first largest zone to the n−1th largest zone. Use is prohibited,
The method of controlling a flash memory according to claim 18.
前記仮想アドレスと前記物理アドレスとの対応関係は、
前記複数のゾーンの各々に分類されるブロックの仮想アドレスを前記フラッシュメモリにおける物理アドレスと関連付けるための複数の関数を予め保持し、
前記複数の関数のうちの1つを使用することにより決定される、
ことを特徴とする請求項17に記載のフラッシュメモリの制御方法。
The correspondence between the virtual address and the physical address is:
A plurality of functions for previously associating virtual addresses of blocks classified into each of the plurality of zones with physical addresses in the flash memory;
Determined by using one of the plurality of functions;
The method of controlling a flash memory according to claim 17.
前記仮想アドレスと前記物理アドレスとの対応関係は、
前記複数のゾーンの各々に分類される不良ブロックの最大数を最小化するべく、前記複数の関数のうちの1つが選択され、
選択された関数を使用することにより決定される、
ことを特徴とする請求項22に記載のフラッシュメモリの制御方法。
The correspondence between the virtual address and the physical address is:
One of the plurality of functions is selected to minimize the maximum number of bad blocks classified into each of the plurality of zones;
Determined by using the selected function,
23. The method of controlling a flash memory according to claim 22,
前記仮想アドレスと前記物理アドレスとの対応関係を変更する処理を実行しても、前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、
前記複数のゾーンの各々に分類される不良ブロック数が2番目に大きいゾーンの不良ブロック数を最小化するべく、前記複数の関数のうちの1つが選択され、
選択された関数を使用することにより、前記仮想アドレスと前記物理アドレスとの対応関係が決定されると共に、分類される不良ブロック数が最大となるゾーンの使用が禁止される、
ことを特徴とする請求項22に記載のフラッシュメモリの制御方法。
Even when executing the process of changing the correspondence between the virtual address and the physical address, when the maximum number of bad blocks classified into each of the plurality of zones cannot be less than the allowable number,
One of the plurality of functions is selected to minimize the number of bad blocks in the second largest zone classified into each of the plurality of zones;
By using the selected function, the correspondence relationship between the virtual address and the physical address is determined, and the use of the zone in which the number of classified bad blocks is maximized is prohibited.
23. The method of controlling a flash memory according to claim 22,
前記仮想アドレスと前記物理アドレスとの対応関係を変更する処理を実行しても、前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、
前記複数のゾーンの各々に分類される不良ブロック数がn番目(nは3以上の自然数)に大きいゾーンの不良ブロック数を最小化するべく、前記複数の関数のうちの1つが選択され、
選択された関数を使用することにより、前記仮想アドレスと前記物理アドレスとの対応関係が決定されると共に、分類される不良ブロック数が1番目に大きいゾーンからn−1番目に大きいゾーンまでの使用が禁止される、
ことを特徴とする請求項22に記載のフラッシュメモリの制御方法。
Even when executing the process of changing the correspondence between the virtual address and the physical address, when the maximum number of bad blocks classified into each of the plurality of zones cannot be less than the allowable number,
One of the plurality of functions is selected to minimize the number of bad blocks in a zone where the number of bad blocks classified into each of the plurality of zones is nth (n is a natural number of 3 or more);
By using the selected function, the correspondence between the virtual address and the physical address is determined, and the number of bad blocks to be classified is used from the zone with the first largest to the zone with the n-1st largest. Is prohibited,
23. The method of controlling a flash memory according to claim 22,
前記仮想アドレスと前記物理アドレスとの対応関係は、
前記複数のゾーンの各々に分類されるブロックの仮想アドレスを前記フラッシュメモリにおける物理アドレスと関連付けるべく、1対1の写像循環を生成する関数を予め保持し、
前記関数による変換の実行回数を設定することにより決定される、
ことを特徴とする請求項17に記載のフラッシュメモリの制御方法。
The correspondence between the virtual address and the physical address is:
In order to associate a virtual address of a block classified into each of the plurality of zones with a physical address in the flash memory, a function for generating a one-to-one mapping cycle is stored in advance.
Determined by setting the number of executions of conversion by the function,
The method of controlling a flash memory according to claim 17.
前記関数が、テント写像を生成する関数である、
ことを特徴とする請求項26に記載のフラッシュメモリの制御方法。
The function is a function for generating a tent map.
27. The flash memory control method according to claim 26.
前記テント写像における循環周期がTであり、前記複数のゾーンのいずれかに分類されるブロックの総数がNであるときに、TとNが
N=2(T−1)
の関係を満たす、
ことを特徴とする請求項27に記載のフラッシュメモリの制御方法。
When the circulation period in the tent map is T and the total number of blocks classified into any of the plurality of zones is N, T and N are N = 2 (T−1)
Satisfy the relationship
28. The flash memory control method according to claim 27.
前記仮想アドレスと前記物理アドレスとの対応関係は、
前記複数のゾーンの各々に分類される不良ブロックの最大数を最小化するべく、前記関数による変換の実行回数が設定され、
設定された変換の実行回数により決定される、
ことを特徴とする請求項26乃至28のいずれか1項に記載のフラッシュメモリの制御方法。
The correspondence between the virtual address and the physical address is:
In order to minimize the maximum number of bad blocks classified into each of the plurality of zones, the number of executions of conversion by the function is set,
Determined by the number of conversions that have been set,
29. The flash memory control method according to claim 26, wherein the flash memory control method is used.
前記仮想アドレスと前記物理アドレスとの対応関係を変更する処理を実行しても、前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、
前記複数のゾーンの各々に分類される不良ブロック数が2番目に大きいゾーンの不良ブロック数を最小化するべく、前記関数による変換の実行回数が設定され、
設定された変換の実行回数により、前記仮想アドレスと前記物理アドレスとの対応関係が決定されると共に、分類される不良ブロック数が最大となるゾーンの使用が禁止される、
ことを特徴とする請求項26乃至28のいずれか1項に記載のフラッシュメモリの制御方法。
Even when executing the process of changing the correspondence between the virtual address and the physical address, when the maximum number of bad blocks classified into each of the plurality of zones cannot be less than the allowable number,
In order to minimize the number of bad blocks in the zone having the second largest number of bad blocks classified into each of the plurality of zones, the number of executions of conversion by the function is set,
The correspondence between the virtual address and the physical address is determined according to the set number of conversions executed, and the use of a zone in which the number of classified bad blocks is maximized is prohibited.
29. The flash memory control method according to claim 26, wherein the flash memory control method is used.
前記仮想アドレスと前記物理アドレスとの対応関係を変更する処理を実行しても、前記複数のゾーンの各々に分類される不良ブロックの最大数を許容数以下にすることができない場合に、
前記複数のゾーンの各々に分類される不良ブロック数がn番目(nは3以上の自然数)に大きいゾーンの不良ブロック数を最小化するべく、前記関数による変換の実行回数が設定され、
設定された変換の実行回数により、前記仮想アドレスと前記物理アドレスとの対応関係が決定されると共に、分類される不良ブロック数が1番目に大きいゾーンからn−1番目に大きいゾーンまでの使用が禁止される、
ことを特徴とする請求項26乃至28のいずれか1項に記載のフラッシュメモリの制御方法。
Even when executing the process of changing the correspondence between the virtual address and the physical address, when the maximum number of bad blocks classified into each of the plurality of zones cannot be less than the allowable number,
In order to minimize the number of bad blocks in a zone where the number of bad blocks classified into each of the plurality of zones is nth (n is a natural number of 3 or more), the number of times of performing conversion by the function is set,
The correspondence between the virtual address and the physical address is determined based on the set number of conversions performed, and the use from the zone having the largest number of defective blocks to the n−1th largest zone is used. prohibited,
29. The flash memory control method according to claim 26, wherein the flash memory control method is used.
JP2004375627A 2003-12-26 2004-12-27 Memory controller, flash memory system, and flash memory control method Expired - Fee Related JP4231841B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004375627A JP4231841B2 (en) 2003-12-26 2004-12-27 Memory controller, flash memory system, and flash memory control method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2003435662 2003-12-26
JP2004375627A JP4231841B2 (en) 2003-12-26 2004-12-27 Memory controller, flash memory system, and flash memory control method

Publications (2)

Publication Number Publication Date
JP2005209184A true JP2005209184A (en) 2005-08-04
JP4231841B2 JP4231841B2 (en) 2009-03-04

Family

ID=34914380

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004375627A Expired - Fee Related JP4231841B2 (en) 2003-12-26 2004-12-27 Memory controller, flash memory system, and flash memory control method

Country Status (1)

Country Link
JP (1) JP4231841B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013190959A (en) * 2012-03-13 2013-09-26 Mega Chips Corp Semiconductor memory reuse processor and semiconductor memory
JP2013190960A (en) * 2012-03-13 2013-09-26 Mega Chips Corp Semiconductor memory reuse processor and semiconductor memory
JP2014157635A (en) * 2014-06-06 2014-08-28 Lapis Semiconductor Co Ltd Semiconductor memory device
US8935460B2 (en) 2011-07-19 2015-01-13 Samsung Electronics Co., Ltd. Memory apparatus
US9070482B2 (en) 2010-06-17 2015-06-30 Lapis Semiconductor Co., Ltd. Multi-chip package semiconductor memory device
JP2019212103A (en) * 2018-06-06 2019-12-12 東芝メモリ株式会社 Memory system
JP7168731B1 (en) 2021-07-19 2022-11-09 Necプラットフォームズ株式会社 MEMORY ACCESS CONTROL DEVICE, MEMORY ACCESS CONTROL METHOD, AND MEMORY ACCESS CONTROL PROGRAM

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9070482B2 (en) 2010-06-17 2015-06-30 Lapis Semiconductor Co., Ltd. Multi-chip package semiconductor memory device
US8935460B2 (en) 2011-07-19 2015-01-13 Samsung Electronics Co., Ltd. Memory apparatus
JP2013190959A (en) * 2012-03-13 2013-09-26 Mega Chips Corp Semiconductor memory reuse processor and semiconductor memory
JP2013190960A (en) * 2012-03-13 2013-09-26 Mega Chips Corp Semiconductor memory reuse processor and semiconductor memory
JP2014157635A (en) * 2014-06-06 2014-08-28 Lapis Semiconductor Co Ltd Semiconductor memory device
JP2019212103A (en) * 2018-06-06 2019-12-12 東芝メモリ株式会社 Memory system
JP7077151B2 (en) 2018-06-06 2022-05-30 キオクシア株式会社 Memory system
JP7168731B1 (en) 2021-07-19 2022-11-09 Necプラットフォームズ株式会社 MEMORY ACCESS CONTROL DEVICE, MEMORY ACCESS CONTROL METHOD, AND MEMORY ACCESS CONTROL PROGRAM
JP2023014466A (en) * 2021-07-19 2023-01-31 Necプラットフォームズ株式会社 Memory access control apparatus, memory access control method, and memory access control program

Also Published As

Publication number Publication date
JP4231841B2 (en) 2009-03-04

Similar Documents

Publication Publication Date Title
US7281114B2 (en) Memory controller, flash memory system, and method of controlling operation for data exchange between host system and flash memory
US10275165B2 (en) Memory controller
US8332576B2 (en) Data reading method for flash memory and controller and storage system using the same
TWI470426B (en) Memory management device and memory management method
US8255614B2 (en) Information processing device that accesses memory, processor and memory management method
KR101393622B1 (en) System comprising multi-bit flash memory device and data manage method thereof
US8200891B2 (en) Memory controller, memory system with memory controller, and method of controlling flash memory
TWI476590B (en) Memory management method, and memory controller and memory storage device using the same
US8161320B2 (en) Apparatus, memory device controller and method of controlling a memory device
KR20070046864A (en) Virtual-to-physical address translation in a flash file system
JP2009217755A (en) Memory system
JP2006018373A (en) Memory controller, flash memory system and control method for flash memory
US20050283647A1 (en) External storage device
JP2023044518A (en) Memory system and method
JP4231841B2 (en) Memory controller, flash memory system, and flash memory control method
US20230032639A1 (en) Hot data management in a data storage system
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
JP4433792B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4241741B2 (en) Memory controller and flash memory system
US9830077B2 (en) Data writing method, memory control circuit unit and memory storage apparatus
JP2007293726A (en) Memory controller and flash memory system
JP4068594B2 (en) Flash memory controller, flash memory system, and flash memory control method
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

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060313

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080910

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080916

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081107

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20081208

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20111212

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20111212

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20121212

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees