JP4952741B2 - MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD - Google Patents

MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD Download PDF

Info

Publication number
JP4952741B2
JP4952741B2 JP2009098863A JP2009098863A JP4952741B2 JP 4952741 B2 JP4952741 B2 JP 4952741B2 JP 2009098863 A JP2009098863 A JP 2009098863A JP 2009098863 A JP2009098863 A JP 2009098863A JP 4952741 B2 JP4952741 B2 JP 4952741B2
Authority
JP
Japan
Prior art keywords
block
earliest
logical
physical
group
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2009098863A
Other languages
Japanese (ja)
Other versions
JP2010250533A (en
Inventor
直樹 向田
武志 鴨野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TDK Corp
Original Assignee
TDK Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TDK Corp filed Critical TDK Corp
Priority to JP2009098863A priority Critical patent/JP4952741B2/en
Publication of JP2010250533A publication Critical patent/JP2010250533A/en
Application granted granted Critical
Publication of JP4952741B2 publication Critical patent/JP4952741B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Description

本発明は、メモリコントローラ及びメモリコントローラを備えるフラッシュメモリシステム、並びにフラッシュメモリの制御方法に関する。   The present invention relates to a memory controller, a flash memory system including the memory controller, and a flash memory control method.

例えば、特許文献1に開示されているように、フラッシュメモリを用いたメモリシステムでは、フラッシュメモリを構成する複数個の物理ブロックにおいて消去回数に偏りが生じないようにウェアー・レベリング(Wear-leveling)制御が行われている。このウェアー・レベリング制御には、大きくは2つの方式がある。   For example, as disclosed in Patent Document 1, in a memory system using a flash memory, wear leveling (Wear-leveling) is performed so that there is no bias in the number of erasures in a plurality of physical blocks constituting the flash memory. Control is taking place. There are roughly two types of wear leveling control.

1つは、書き換えが行われないデータが記憶されている物理ブロックを放置しておき、それ以外の物理ブロックの消去回数又は書き換え回数が平均化されるように制御するウェアー・レベリング制御(ダイナミック・ウェアー・レベリング(Dynamic-wear-leveling)制御方式又はパッシブ・ウェアー・レベリング(Passive-wear-leveling)制御方式と呼ばれている制御方式であり、以下、ダイナミック・ウェアー・レベリングと言う)である。もう一つは、書き換えが行われないデータが記憶されている物理ブロックを含めて、全ての物理ブロックの消去回数又は書き換え回数が平均化されるように制御するウェアー・レベリング制御(スタティック・ウェアー・レベリング(Static-wear-leveling)制御方式又はアクティブ・ウェアー・レベリング(Active-wear-leveling)制御方式と呼ばれている制御方式であり、以下、スタティック・ウェアー・レベリングと言う)である。   One is a hardware leveling control (dynamic level control) in which a physical block in which data that is not rewritten is stored is left and the number of times of erasure or rewrite of other physical blocks is averaged. This is a control method called a wear-leveling (Dynamic-wear-leveling) control method or a passive wear-leveling control method (hereinafter referred to as dynamic wear leveling). The other is wear leveling control (static wear control) that controls the number of erasures or rewrites of all physical blocks, including physical blocks that store data that will not be rewritten. This is a control method called a static-wear-leveling control method or an active wear-leveling control method (hereinafter referred to as static wear leveling).

ここで、書き換えが行わないデータが記憶されている物理ブロックが少ない場合は、ダイナミック・ウェアー・レベリング制御方式が適している。しかし、書き換えが行われないデータが記憶されている物理ブロックが多い場合は、スタティック・ウェアー・レベリング制御方式が適している。従って、特許文献1には、メモリシステムに記憶されるデータの書き換え頻度に応じて(つまり、書き換えが行われないデータが記憶されている物理ブロックが多いか少ないかに応じて)、ダイナミック・ウェアー・レベリング制御方式、スタティック・ウェアー・レベリング制御方式又はこれらを組み合わせたウェアー・レベリング制御方式のうちのいずれかのウェアー・レベリング制御を行うことが記載されている。   Here, when there are few physical blocks in which data that is not rewritten is stored, the dynamic wear leveling control method is suitable. However, when there are many physical blocks in which data that is not rewritten is stored, the static wear leveling control method is suitable. Therefore, Patent Document 1 discloses dynamic wear according to the frequency of rewriting data stored in the memory system (that is, depending on whether there are many or few physical blocks storing data that is not rewritten). It is described that the wear leveling control is performed among the leveling control method, the static wear leveling control method, or the wear leveling control method combining these.

特開2007−133683号公報JP 2007-133683 A

上述した特許文献1では、ウェアー・レベリング制御方式の選択や条件設定を、ユーザが行うようになっている。しかしながら、メモリシステムに記憶されるデータの書き換え頻度に応じて、適切なウェアー・レベリング制御方式を選択することは、必ずしも容易でない。   In Patent Document 1 described above, a user selects a wear leveling control method and sets conditions. However, it is not always easy to select an appropriate wear leveling control method according to the frequency of rewriting data stored in the memory system.

そして、ウェアー・レベリング制御方式の選択が適切でなかった場合、スタティック・ウェアー・レベリング制御方式を選択しなかったために消去回数が極端に少ない物理ブロックがウェアー・レベリング制御の対象にならずに放置されることや、スタティック・ウェアー・レベリング制御方式を選択したために物理ブロック間で不必要なデータ転送が行われることがある。また、スタティック・ウェアー・レベリング制御方式において、それぞれの物理ブロックの消去回数が平均的に増加していくように制御すれば、消去回数を平均化するためのデータ転送が増加し、その結果、フラッシュメモリ全体としての消去回数が増加してしまう。このような物理ブロック間でのデータ転送による消去回数の増加は、フラッシュメモリの劣化を加速する。   If the wear leveling control method is not properly selected, the physical wear level control method is not selected, and the physical block with an extremely small number of erasures is left without being subjected to wear leveling control. Or because the static wear leveling control method is selected, unnecessary data transfer may occur between physical blocks. Also, in the static wear leveling control system, if the number of times of erasing each physical block is controlled to increase on average, the data transfer for averaging the number of times of erasure increases, and as a result, the flash The number of erasures as a whole memory increases. Such an increase in the number of erases due to data transfer between physical blocks accelerates the deterioration of the flash memory.

そこで、本発明は、フラッシュメモリを構成する複数個の物理ブロックにおける極端な消去回数の偏りと、フラッシュメモリ全体としての消去回数の増加を抑制することにより、フラッシュメモリの劣化速度を低減することができるメモリコントローラ、フラッシュメモリシステム、及びフラッシュメモリの制御方法を提供することを目的とする。   Therefore, the present invention can reduce the deterioration rate of the flash memory by suppressing an extreme bias in the number of erases in a plurality of physical blocks constituting the flash memory and an increase in the number of erases as the entire flash memory. An object of the present invention is to provide a memory controller, a flash memory system, and a flash memory control method.

本発明の第1の側面に従うメモリコントローラは、ホストシステムから与えられるアクセス指示に基づいて、物理ブロック単位で消去が行われるフラッシュメモリに対するアクセスを制御するメモリコントローラであって、
フラッシュメモリを構成するそれぞれの物理ブロックの消去回数を管理する消去回数管理手段と、
前記アクセス指示として与えられる論理アドレスが割り当てられているセクタ単位の領域を複数個集めた複数セクタの領域を論理ブロックとして管理し、フラッシュメモリを構成する物理ブロックを前記論理ブロックに割り当てるブロック管理手段と、
有効なデータが格納されていない物理ブロックである空きブロックを検索するための空きブロックテーブルを、物理ブロックの消去回数について設けられた1又は複数の閾値を基に定義された物理ブロックのグループ毎に有し、それぞれの前記空きブロックテーブルを用いてそれぞれの前記グループに属する前記空きブロックを検索する空きブロック検索手段と、
前記論理ブロックに割り当てられている物理ブロックのうちで最も先に前記論理ブロックに割り当てられた物理ブロックである最先ブロックを検索するための最先ブロックテーブルを前記グループ毎に有し、それぞれの前記最先ブロックテーブルを用いてそれぞれの前記グループに属する前記最先ブロックを検索する最先ブロック検索手段と、
所定の前記論理ブロックに割り当てられた物理ブロックを前記最先ブロックテーブルに登録するテーブル登録手段と、
前記所定の前記論理ブロックを特定するための情報を保持する情報保持手段と、
前記アクセス指示に基づいてアクセス対象の領域が属する前記論理ブロックを特定し、特定した前記論理ブロックに割り当てられている物理ブロックにホストシステムから与えられるデータを格納するデータ格納手段と、
前記最先ブロック検索手段により検出された前記最先ブロックに格納されているデータを前記空きブロック検索手段により検出された前記空きブロックに転送するデータ転送手段とを備え、
前記アクセス指示に応答して前記ブロック管理手段により物理ブロックが前記論理ブロックに割り当てられるときに、前記空きブロック検索手段は消去回数の少ない物理ブロックが属する側の前記グループである下位側の前記グループに対応する前記空きブロックテーブルの方を優先的に用いて前記空きブロックの検索を行い、
前記空きブロック検索手段により検出された前記空きブロックが属する前記グループよりも下位側の前記グループに属する物理ブロックが前記最先ブロックテーブルに登録されていないときに、前記ブロック管理手段は前記空きブロック検索手段により検出された前記空きブロックを前記論理ブロックに割り当て、
前記空きブロック検索手段により検出された前記空きブロックが属する前記グループよりも下位側の前記グループに属する物理ブロックが前記最先ブロックテーブルに登録されているときに、前記最先ブロック検索手段は前記空きブロックが属する前記グループよりも下位側の前記グループに属する前記最先ブロックを検索し、前記データ転送手段は前記最先ブロック検索手段により検出された前記最先ブロックに格納されているデータを前記空きブロック検索手段により検出された前記空きブロックに転送し、前記ブロック管理手段は前記最先ブロック検索手段により検出された前記最先ブロックを前記論理ブロックに割り当てる。
A memory controller according to a first aspect of the present invention is a memory controller that controls access to a flash memory to be erased in units of physical blocks based on an access instruction given from a host system,
An erase count management means for managing the erase count of each physical block constituting the flash memory;
Block management means for managing a plurality of sector areas as a logical block by collecting a plurality of sector unit areas to which a logical address given as the access instruction is assigned, and allocating a physical block constituting a flash memory to the logical block; ,
A free block table for searching for a free block that is a physical block in which no valid data is stored is provided for each group of physical blocks defined on the basis of one or more thresholds provided for the number of physical block erasures. A free block search means for searching for the free block belonging to each group using the free block table;
Each group has an earliest block table for searching for the earliest block that is the earliest physical block assigned to the logical block among the physical blocks assigned to the logical block. Earliest block search means for searching for the earliest block belonging to each of the groups using an earliest block table;
Table registration means for registering a physical block assigned to a predetermined logical block in the earliest block table;
Information holding means for holding information for specifying the predetermined logical block;
Data storage means for specifying the logical block to which the area to be accessed belongs based on the access instruction, and storing data given from the host system in the physical block assigned to the specified logical block;
Data transfer means for transferring the data stored in the earliest block detected by the earliest block search means to the empty block detected by the empty block search means;
When a physical block is allocated to the logical block by the block management means in response to the access instruction, the free block search means assigns the group on the lower side, which is the group to which the physical block with a small number of erasures belongs. Search for the free block using the corresponding free block table preferentially,
When a physical block belonging to the group lower than the group to which the free block detected by the free block search means belongs is not registered in the earliest block table, the block management means performs the free block search. Assigning the free block detected by the means to the logical block;
When the physical block belonging to the group lower than the group to which the empty block detected by the empty block searching means belongs is registered in the earliest block table, the earliest block searching means The earliest block belonging to the group lower than the group to which the block belongs is searched, and the data transfer means stores the data stored in the earliest block detected by the earliest block search means as the empty block The block management means assigns the earliest block detected by the earliest block search means to the logical block.

本発明の第2の側面に従うメモリコントローラは、ホストシステムから与えられるアクセス指示に基づいて、物理ブロック単位で消去が行われるフラッシュメモリに対するアクセスを制御するメモリコントローラであって、
フラッシュメモリを構成する物理ブロックを複数個集めた仮想ブロックを複数個形成する仮想ブロック形成手段と、
前記仮想ブロック単位で消去回数を管理する消去回数管理手段と、
前記アクセス指示として与えられる論理アドレスが割り当てられているセクタ単位の領域を複数個集めた複数セクタの領域を論理ブロックとして管理し、前記仮想ブロックを前記論理ブロックに割り当てるブロック管理手段と、
有効なデータが格納されていない前記仮想ブロックである空きブロックを検索するための空きブロックテーブルを、前記仮想ブロックの消去回数について設けられた1又は複数の閾値を基に定義された前記仮想ブロックのグループ毎に有し、それぞれの前記空きブロックテーブルを用いてそれぞれの前記グループに属する前記空きブロックを検索する空きブロック検索手段と、
前記論理ブロックに割り当てられている前記仮想ブロックのうちで最も先に前記論理ブロックに割り当てられた前記仮想ブロックである最先ブロックを検索するための最先ブロックテーブルを前記グループ毎に有し、それぞれの前記最先ブロックテーブルを用いてそれぞれの前記グループに属する前記最先ブロックを検索する最先ブロック検索手段と、
所定の前記論理ブロックに割り当てられた前記仮想ブロックを前記最先ブロックテーブルに登録するテーブル登録手段と、
前記所定の前記論理ブロックを特定するための情報を保持する情報保持手段と、
前記アクセス指示に基づいてアクセス対象の領域が属する前記論理ブロックを特定し、特定した前記論理ブロックに割り当てられている前記仮想ブロックにホストシステムから与えられるデータを格納するデータ格納手段と、
前記最先ブロック検索手段により検出された前記最先ブロックに格納されているデータを前記空きブロック検索手段により検出された前記空きブロックに転送するデータ転送手段とを備え、
前記アクセス指示に応答して前記ブロック管理手段により前記仮想ブロックが前記論理ブロックに割り当てられるときに、前記空きブロック検索手段は消去回数の少ない前記仮想ブロックが属する側の前記グループである下位側の前記グループに対応する前記空きブロックテーブルの方を優先的に用いて前記空きブロックの検索を行い、
前記空きブロック検索手段により検出された前記空きブロックが属する前記グループよりも下位側の前記グループに属する前記仮想ブロックが前記最先ブロックテーブルに登録されていないときに、前記ブロック管理手段は前記空きブロック検索手段により検出された前記空きブロックを前記論理ブロックに割り当て、
前記空きブロック検索手段により検出された前記空きブロックが属する前記グループよりも下位側の前記グループに属する前記仮想ブロックが前記最先ブロックテーブルに登録されているときに、前記最先ブロック検索手段は前記空きブロックが属する前記グループよりも下位側の前記グループに属する前記最先ブロックを検索し、前記データ転送手段は前記最先ブロック検索手段により検出された前記最先ブロックに格納されているデータを前記空きブロック検索手段により検出された前記空きブロックに転送し、前記ブロック管理手段は前記最先ブロック検索手段により検出された前記最先ブロックを前記論理ブロックに割り当てる。
A memory controller according to a second aspect of the present invention is a memory controller that controls access to a flash memory to be erased in units of physical blocks based on an access instruction given from a host system,
Virtual block forming means for forming a plurality of virtual blocks obtained by collecting a plurality of physical blocks constituting the flash memory;
Erasure count management means for managing the erasure count in units of virtual blocks;
A block management means for managing a plurality of sector areas as a logical block by collecting a plurality of sector unit areas to which a logical address given as the access instruction is assigned, and assigning the virtual block to the logical block;
An empty block table for searching for an empty block which is the virtual block in which no valid data is stored is stored in the virtual block defined based on one or more thresholds provided for the number of times of erasing the virtual block. A free block search means for searching for the free blocks belonging to each of the groups using each free block table;
Each group has an earliest block table for searching for the earliest block that is the virtual block assigned to the logical block first among the virtual blocks assigned to the logical block, The earliest block search means for searching for the earliest block belonging to each of the groups using the earliest block table of
Table registration means for registering the virtual block assigned to the predetermined logical block in the earliest block table;
Information holding means for holding information for specifying the predetermined logical block;
Data storage means for specifying the logical block to which the area to be accessed belongs based on the access instruction, and storing data given from a host system in the virtual block assigned to the specified logical block;
Data transfer means for transferring the data stored in the earliest block detected by the earliest block search means to the empty block detected by the empty block search means;
When the virtual block is allocated to the logical block by the block management means in response to the access instruction, the empty block search means is the group on the lower side that is the group to which the virtual block to which the erasure count is small belongs. Search for the free block using the free block table corresponding to the group preferentially,
When the virtual block belonging to the group lower than the group to which the free block detected by the free block searching means belongs is not registered in the earliest block table, the block management means Assigning the free block detected by the search means to the logical block;
When the virtual block belonging to the group lower than the group to which the empty block detected by the empty block searching means belongs is registered in the earliest block table, the earliest block searching means The earliest block belonging to the group lower than the group to which the empty block belongs is searched, and the data transfer means stores the data stored in the earliest block detected by the earliest block search means. Transfer is made to the empty block detected by the empty block search means, and the block management means assigns the earliest block detected by the earliest block search means to the logical block.

本発明の第3の側面に従うメモリコントローラでは、前記第1又は第2の側面において、前記所定の前記論理ブロックを特定するための情報が、ホストシステムから与えられる情報に基づいて設定される。   In the memory controller according to the third aspect of the present invention, in the first or second aspect, information for specifying the predetermined logical block is set based on information given from a host system.

本発明の第4の側面に従うフラッシュメモリシステムは、前記第1乃至第3のうちのいずれかの側面に従うメモリコントローラと、このメモリコントローラにより制御される複数個のフラッシュメモリとを備える。   A flash memory system according to a fourth aspect of the present invention includes a memory controller according to any one of the first to third aspects, and a plurality of flash memories controlled by the memory controller.

本発明の第5の側面に従う方法は、ホストシステムから与えられるアクセス指示に基づいて、物理ブロック単位で消去が行われるフラッシュメモリに対するアクセスを制御するフラッシュメモリの制御方法であって、
フラッシュメモリを構成するそれぞれの物理ブロックの消去回数を管理する消去回数管理ステップと、
前記アクセス指示として与えられる論理アドレスが割り当てられているセクタ単位の領域を複数個集めた複数セクタの領域を論理ブロックとして管理し、フラッシュメモリを構成する物理ブロックを前記論理ブロックに割り当てるブロック管理ステップと、
有効なデータが格納されていない物理ブロックである空きブロックを検索するための空きブロックテーブルを、物理ブロックの消去回数について設けられた1又は複数の閾値を基に定義された物理ブロックのグループ毎に有し、それぞれの前記空きブロックテーブルを用いてそれぞれの前記グループに属する前記空きブロックを検索する空きブロック検索ステップと、
前記論理ブロックに割り当てられている物理ブロックのうちで最も先に前記論理ブロックに割り当てられた物理ブロックである最先ブロックを検索するための最先ブロックテーブルを前記グループ毎に有し、それぞれの前記最先ブロックテーブルを用いてそれぞれの前記グループに属する前記最先ブロックを検索する最先ブロック検索ステップと、
所定の前記論理ブロックに割り当てられた物理ブロックを前記最先ブロックテーブルに登録するテーブル登録ステップと、
前記アクセス指示に基づいてアクセス対象の領域が属する前記論理ブロックを特定し、特定した前記論理ブロックに割り当てられている物理ブロックにホストシステムから与えられるデータを格納するデータ格納ステップと、
前記最先ブロック検索ステップにより検出された前記最先ブロックに格納されているデータを前記空きブロック検索ステップにより検出された前記空きブロックに転送するデータ転送ステップとを備え、
前記アクセス指示に応答して前記ブロック管理ステップにより物理ブロックが前記論理ブロックに割り当てられるときに、前記空きブロック検索ステップでは消去回数の少ない物理ブロックが属する側の前記グループである下位側の前記グループに対応する前記空きブロックテーブルの方が優先的に用いられる前記空きブロックの検索が行われ、
前記空きブロック検索ステップにより検出された前記空きブロックが属する前記グループよりも下位側の前記グループに属する物理ブロックが前記最先ブロックテーブルに登録されていないときに、前記ブロック管理ステップでは前記空きブロック検索ステップにより検出された前記空きブロックが前記論理ブロックに割り当てられ、
前記空きブロック検索ステップにより検出された前記空きブロックが属する前記グループよりも下位側の前記グループに属する物理ブロックが前記最先ブロックテーブルに登録されているときに、前記最先ブロック検索ステップでは前記空きブロックが属する前記グループよりも下位側の前記グループに属する前記最先ブロックが検索され、前記データ転送ステップでは前記最先ブロック検索ステップにより検出された前記最先ブロックに格納されているデータが前記空きブロック検索ステップにより検出された前記空きブロックに転送され、前記ブロック管理ステップでは前記最先ブロック検索ステップにより検出された前記最先ブロックが前記論理ブロックに割り当てられる。
A method according to a fifth aspect of the present invention is a flash memory control method for controlling access to a flash memory to be erased in units of physical blocks based on an access instruction given from a host system,
An erase count management step for managing the erase count of each physical block constituting the flash memory;
A block management step of managing a plurality of sector areas obtained by collecting a plurality of sector unit areas to which a logical address given as an access instruction is assigned as a logical block, and allocating a physical block constituting a flash memory to the logical block; ,
A free block table for searching for a free block that is a physical block in which no valid data is stored is provided for each group of physical blocks defined on the basis of one or more thresholds provided for the number of physical block erasures. A free block search step of searching for the free block belonging to each of the groups using each of the free block tables;
Each group has an earliest block table for searching for the earliest block that is the earliest physical block assigned to the logical block among the physical blocks assigned to the logical block. An earliest block search step of searching for the earliest block belonging to each of the groups using an earliest block table;
A table registration step of registering a physical block assigned to a predetermined logical block in the earliest block table;
A data storage step of identifying the logical block to which the area to be accessed belongs based on the access instruction, and storing data provided from a host system in a physical block allocated to the identified logical block;
A data transfer step of transferring data stored in the earliest block detected in the earliest block search step to the empty block detected in the empty block search step;
When a physical block is allocated to the logical block by the block management step in response to the access instruction, the free block search step adds the low-order group to the group to which the physical block with a small number of erases belongs. A search for the free block that is preferentially used in the corresponding free block table is performed,
When a physical block belonging to the group lower than the group to which the free block detected by the free block search step belongs is not registered in the earliest block table, the free block search is performed in the block management step. The free block detected by the step is assigned to the logical block;
When a physical block belonging to the group lower than the group to which the empty block detected by the empty block searching step belongs is registered in the earliest block table, the earliest block searching step includes the empty block. The earliest block belonging to the group lower than the group to which the block belongs is searched, and in the data transfer step, the data stored in the earliest block detected by the earliest block search step is free. It is transferred to the empty block detected by the block search step, and the earliest block detected by the earliest block search step is assigned to the logical block in the block management step.

本発明の第6の側面に従う方法は、ホストシステムから与えられるアクセス指示に基づいて、物理ブロック単位で消去が行われるフラッシュメモリに対するアクセスを制御するフラッシュメモリの制御方法であって、
フラッシュメモリを構成する物理ブロックを複数個集めた仮想ブロックを複数個形成する仮想ブロック形成ステップと
前記仮想ブロック単位で消去回数を管理する消去回数管理ステップと、
前記アクセス指示として与えられる論理アドレスが割り当てられているセクタ単位の領域を複数個集めた複数セクタの領域を論理ブロックとして管理し、前記仮想ブロックを前記論理ブロックに割り当てるブロック管理ステップと、
有効なデータが格納されていない前記仮想ブロックである空きブロックを検索するための空きブロックテーブルを、前記仮想ブロックの消去回数について設けられた1又は複数の閾値を基に定義された前記仮想ブロックのグループ毎に有し、それぞれの前記空きブロックテーブルを用いてそれぞれの前記グループに属する前記空きブロックを検索する空きブロック検索ステップと、
前記論理ブロックに割り当てられている前記仮想ブロックのうちで最も先に前記論理ブロックに割り当てられた前記仮想ブロックである最先ブロックを検索するための最先ブロックテーブルを前記グループ毎に有し、それぞれの前記最先ブロックテーブルを用いてそれぞれの前記グループに属する前記最先ブロックを検索する最先ブロック検索ステップと、
所定の前記論理ブロックに割り当てられた前記仮想ブロックを前記最先ブロックテーブルに登録するテーブル登録ステップと、
前記アクセス指示に基づいてアクセス対象の領域が属する前記論理ブロックを特定し、特定した前記論理ブロックに割り当てられている前記仮想ブロックにホストシステムから与えられるデータを格納するデータ格納ステップと、
前記最先ブロック検索ステップにより検出された前記最先ブロックに格納されているデータを前記空きブロック検索ステップにより検出された前記空きブロックに転送するデータ転送ステップとを備え、
前記アクセス指示に応答して前記ブロック管理ステップにより前記仮想ブロックが前記論理ブロックに割り当てられるときに、前記空きブロック検索ステップでは消去回数の少ない前記仮想ブロックが属する側の前記グループである下位側の前記グループに対応する前記空きブロックテーブルの方が優先的に用いられる前記空きブロックの検索が行われ、
前記空きブロック検索ステップにより検出された前記空きブロックが属する前記グループよりも下位側の前記グループに属する前記仮想ブロックが前記最先ブロックテーブルに登録されていないときに、前記ブロック管理ステップでは前記空きブロック検索ステップにより検出された前記空きブロックが前記論理ブロックに割り当てられ、
前記空きブロック検索ステップにより検出された前記空きブロックが属する前記グループよりも下位側の前記グループに属する前記仮想ブロックが前記最先ブロックテーブルに登録されているときに、前記最先ブロック検索ステップでは前記空きブロックが属する前記グループよりも下位側の前記グループに属する前記最先ブロックが検索され、前記データ転送ステップでは前記最先ブロック検索ステップにより検出された前記最先ブロックに格納されているデータが前記空きブロック検索ステップにより検出された前記空きブロックに転送され、前記ブロック管理ステップでは前記最先ブロック検索ステップにより検出された前記最先ブロックが前記論理ブロックに割り当てられる。
A method according to a sixth aspect of the present invention is a flash memory control method for controlling access to a flash memory that is erased in units of physical blocks based on an access instruction given from a host system,
A virtual block forming step of forming a plurality of virtual blocks obtained by collecting a plurality of physical blocks constituting a flash memory; and an erasure count management step of managing the erase count in units of the virtual blocks;
A block management step of managing a plurality of sector areas obtained by collecting a plurality of sector unit areas to which a logical address given as the access instruction is assigned as a logical block, and assigning the virtual block to the logical block;
An empty block table for searching for an empty block which is the virtual block in which no valid data is stored is stored in the virtual block defined based on one or more thresholds provided for the number of times of erasing the virtual block. A free block search step for searching for the free block belonging to each group using each free block table, which is provided for each group;
Each group has an earliest block table for searching for the earliest block that is the virtual block assigned to the logical block first among the virtual blocks assigned to the logical block, The earliest block search step of searching for the earliest block belonging to each of the groups using the earliest block table of
A table registration step of registering the virtual block assigned to the predetermined logical block in the earliest block table;
A data storage step of identifying the logical block to which the area to be accessed belongs based on the access instruction, and storing data given from a host system in the virtual block allocated to the identified logical block;
A data transfer step of transferring data stored in the earliest block detected in the earliest block search step to the empty block detected in the empty block search step;
When the virtual block is allocated to the logical block by the block management step in response to the access instruction, the lower block that is the group to which the virtual block to which the erasure count is small belongs in the empty block search step belongs to The search for the free block that is preferentially used in the free block table corresponding to the group is performed,
When the virtual block belonging to the group lower than the group to which the free block detected by the free block searching step belongs is not registered in the earliest block table, the free block is used in the block management step. The free block detected by the search step is assigned to the logical block;
When the virtual block belonging to the group lower than the group to which the empty block detected by the empty block searching step belongs is registered in the earliest block table, in the earliest block searching step, The earliest block belonging to the group lower than the group to which the empty block belongs is searched, and the data stored in the earliest block detected by the earliest block search step is the data transfer step. The block is transferred to the empty block detected in the empty block search step, and the earliest block detected in the earliest block search step is assigned to the logical block in the block management step.

本発明の第7の側面に従う方法では、前記第5又は第6の側面において、ホストシステムから与えられる情報に基づいて前記所定の前記論理ブロックが設定される。   In the method according to the seventh aspect of the present invention, in the fifth or sixth aspect, the predetermined logical block is set based on information given from a host system.

本発明によれば、物理ブロックの消去回数について1又は複数の閾値が設けられ、消去回数がその閾値を越えた物理ブロックの消去回数が抑制されるような制御が行われる。この制御では、所定の条件の下、物理ブロック間でのデータ転送が行われ、その結果、フラッシュメモリを構成する複数個の物理ブロックにおける極端な消去回数の偏りが抑制されると共に、フラッシュメモリ全体としての消去回数の増加も抑制される。   According to the present invention, one or a plurality of threshold values are provided for the number of times of erasing a physical block, and control is performed such that the number of times of erasing a physical block whose number of erasures exceeds the threshold is suppressed. In this control, data transfer is performed between physical blocks under a predetermined condition. As a result, the extreme number of erase times in a plurality of physical blocks constituting the flash memory is suppressed, and the entire flash memory is controlled. As a result, an increase in the number of erasures is suppressed.

そして、このデータ転送において転送元となる物理ブロックは、特定の論理ブロックに割り当てられた物理ブロックに限定される。このようにすることにより、特定の論理ブロックに対応するデータのみがデータ転送の対象とされ、特定の論理ブロック以外の論理ブロックに対応するデータがデータ転送の対象から除外される。   In this data transfer, a physical block that is a transfer source is limited to a physical block assigned to a specific logical block. In this way, only data corresponding to a specific logical block is targeted for data transfer, and data corresponding to logical blocks other than the specific logical block is excluded from data transfer targets.

本発明の実施の形態に係るフラッシュメモリシステムの概略構成を示すブロック図である。1 is a block diagram showing a schematic configuration of a flash memory system according to an embodiment of the present invention. 論理ブロックと物理ブロックの対応関係を示す図である。It is a figure which shows the correspondence of a logical block and a physical block. 最先ブロックテーブルにおける優先順位管理を示す説明図である。It is explanatory drawing which shows the priority management in a earliest block table. 最先ブロックテーブルへの登録に関する説明図である。It is explanatory drawing regarding registration to the earliest block table. 空きブロックテーブルの構成を示す説明図である。It is explanatory drawing which shows the structure of an empty block table. 空きブロックテーブルへの登録に関する説明図である。It is explanatory drawing regarding the registration to an empty block table. 物理ブロックの消去回数の管理と先後管理のための優先順位管理に用いられるテーブルの説明図である。It is explanatory drawing of the table used for the priority management for the management of the frequency | count of erasure | elimination of a physical block, and prior management.

図1は、本実施の形態に係るフラッシュメモリシステム1を概略的に示すブロック図である。   FIG. 1 is a block diagram schematically showing a flash memory system 1 according to the present embodiment.

図1に示すように、フラッシュメモリシステム1は、フラッシュメモリ2と、それを制御するメモリコントローラ3とで構成されている。   As shown in FIG. 1, the flash memory system 1 includes a flash memory 2 and a memory controller 3 that controls the flash memory 2.

フラッシュメモリシステム1は、外部バス13を介してホストシステム4と接続されている。ホストシステム4は、ホストシステム4の全体の動作を制御するためのCPU(Central Processing Unit)、フラッシュメモリシステム1との情報の授受を担うコンパニオンチップ等から構成されている。ホストシステム4は、例えば、文字、音声、あるいは画像情報等の種々の情報を処理するパーソナルコンピュータやデジタルスチルカメラをはじめとする各種情報処理装置であってもよい。   The flash memory system 1 is connected to the host system 4 via the external bus 13. The host system 4 is composed of a CPU (Central Processing Unit) for controlling the entire operation of the host system 4, a companion chip for transferring information to and from the flash memory system 1, and the like. The host system 4 may be various information processing apparatuses such as a personal computer and a digital still camera that process various types of information such as characters, sounds, and image information.

メモリコントローラ3は、図1に示すように、マイクロプロセッサ6と、ホストインターフェースブロック7と、ワークエリア8と、バッファ9と、フラッシュメモリインターフェースブロック10と、ECC(Error Correcting Code)ブロック11と、ROM(Read Only Memory)12とから構成される。メモリコントローラ3は、内部バス14を介してフラッシュメモリ2と接続されている。これら機能ブロックによって構成されるメモリコントローラ3は、一つの半導体チップ上に集積される。以下、各機能ブロックについて説明する。   As shown in FIG. 1, the memory controller 3 includes a microprocessor 6, a host interface block 7, a work area 8, a buffer 9, a flash memory interface block 10, an ECC (Error Correcting Code) block 11, and a ROM. (Read Only Memory) 12. The memory controller 3 is connected to the flash memory 2 via the internal bus 14. The memory controller 3 constituted by these functional blocks is integrated on one semiconductor chip. Hereinafter, each functional block will be described.

ホストインターフェースブロック7は、ホストシステム4との間でデータ、アドレス情報、ステータス情報、外部コマンド等の授受を行う。外部コマンドとは、ホストシステム4がフラッシュメモリシステム1に対して処理の実行を指示するためのコマンドである。ホストシステム4よりフラッシュメモリシステム1に供給されるデータ等は、ホストインターフェースブロック7を介してフラッシュメモリシステム1の内部(例えば、バッファ9)に取り込まれる。また、フラッシュメモリシステム1からホストシステム4に供給されるデータ等は、ホストインターフェースブロック7を介してホストシステム4に供給される。   The host interface block 7 exchanges data, address information, status information, external commands and the like with the host system 4. The external command is a command for the host system 4 to instruct the flash memory system 1 to execute processing. Data or the like supplied from the host system 4 to the flash memory system 1 is taken into the flash memory system 1 (for example, the buffer 9) via the host interface block 7. Data supplied from the flash memory system 1 to the host system 4 is supplied to the host system 4 via the host interface block 7.

ホストインターフェースブロック7は、コマンドレジスタR1、セクタ数レジスタR2及びLBAレジスタR3を備えている。コマンドレジスタR1、セクタ数レジスタR2及びLBAレジスタR3には、ホストシステム4から与えられる情報が書き込まれる。コマンドレジスタR1には、書き込みコマンド、読み出しコマンド等の外部コマンドが書き込まれる。セクタ数レジスタR2には、アクセス対象領域のセクタ数が書き込まれる。LBAレジスタR3には、アクセス対象領域の先頭セクタのLBA(Logical Block Address)(後述)が書き込まれる。   The host interface block 7 includes a command register R1, a sector number register R2, and an LBA register R3. Information given from the host system 4 is written in the command register R1, the sector number register R2, and the LBA register R3. External commands such as a write command and a read command are written in the command register R1. The number of sectors in the access target area is written in the sector number register R2. In the LBA register R3, an LBA (Logical Block Address) (described later) of the head sector of the access target area is written.

ワークエリア8は、フラッシュメモリ2の制御に必要なデータを一時的に格納する作業領域であり、複数のSRAM(Static Random Access Memory)セルによって構成されている。ワークエリア8には、例えば、論理ブロックと物理ブロックとの対応関係を示したアドレス変換テーブル等が格納される。   The work area 8 is a work area for temporarily storing data necessary for controlling the flash memory 2, and is composed of a plurality of SRAM (Static Random Access Memory) cells. The work area 8 stores, for example, an address conversion table indicating the correspondence between logical blocks and physical blocks.

バッファ9は、フラッシュメモリ2から読み出したデータを、ホストシステム4が受け取り可能な状態となるまで保持する。また、バッファ9は、フラッシュメモリ2に書き込むデータを、フラッシュメモリ2が書き込み可能な状態となるまで保持する。   The buffer 9 holds the data read from the flash memory 2 until the host system 4 can receive the data. The buffer 9 holds data to be written to the flash memory 2 until the flash memory 2 is in a writable state.

フラッシュメモリインターフェースブロック10は、内部バス14を介して、フラッシュメモリ2との間でデータ、アドレス情報、ステータス情報、内部コマンド等の授受を行う。ここで、内部コマンドとは、メモリコントローラ3がフラッシュメモリ2に処理の実行を指示するためのコマンドであり、フラッシュメモリ2は、メモリコントローラ3から与えられる内部コマンドに従って動作する。   The flash memory interface block 10 exchanges data, address information, status information, internal commands, and the like with the flash memory 2 via the internal bus 14. Here, the internal command is a command for the memory controller 3 to instruct the flash memory 2 to execute processing, and the flash memory 2 operates in accordance with the internal command given from the memory controller 3.

ECCブロック11は、フラッシュメモリ2に書き込むデータに付加される誤り訂正符号(ECC:Error Correcting Code)を生成するとともに、読み出したデータに付加されている誤り訂正符号に基づいて、読み出したデータに含まれる誤りを検出・訂正する。   The ECC block 11 generates an error correcting code (ECC) added to data to be written to the flash memory 2 and is included in the read data based on the error correcting code added to the read data. Detect and correct errors.

ROM12は、マイクロプロセッサ6による処理の手順を定義するプログラムを格納する不揮発性の記憶素子である。例えば、アドレス変換テーブルの作成等の処理手順を定義するプログラムが格納されている。   The ROM 12 is a non-volatile storage element that stores a program that defines a processing procedure performed by the microprocessor 6. For example, a program that defines a processing procedure such as creation of an address conversion table is stored.

マイクロプロセッサ6は、ROM12に記憶されているプログラムに従って、メモリコントローラ3の全体の動作を制御する。例えば、マイクロプロセッサ6は、ROM12から読み出した各種処理を定義したコマンドセットに基づいてフラッシュメモリインターフェースブロック10に処理を実行させる。   The microprocessor 6 controls the overall operation of the memory controller 3 in accordance with a program stored in the ROM 12. For example, the microprocessor 6 causes the flash memory interface block 10 to execute processes based on a command set that defines various processes read from the ROM 12.

フラッシュメモリ2は、NAND型フラッシュメモリからなる。NAND型フラッシュメモリは、レジスタと、複数のメモリセルが2次元的に配列されたメモリセルアレイを備えている。メモリセルアレイは、複数のメモリセル群と、ワード線とを備える。ここで、メモリセル群は、複数のメモリセルが直列に接続されたものである。各ワード線は、メモリセル群の特定のメモリセルを選択するためのものである。このワード線を介して選択されたメモリセルとレジスタとの間で、レジスタから選択されたメモリセルへのデータの書き込み又は選択されたメモリセルからレジスタへのデータの読み出しが行われる。   The flash memory 2 is a NAND flash memory. The NAND flash memory includes a register and a memory cell array in which a plurality of memory cells are two-dimensionally arranged. The memory cell array includes a plurality of memory cell groups and word lines. Here, the memory cell group is a group in which a plurality of memory cells are connected in series. Each word line is for selecting a specific memory cell in the memory cell group. Data is written from the register to the selected memory cell or data is read from the selected memory cell to the register between the selected memory cell and the register via the word line.

NAND型フラッシュメモリでは、データ読み出し動作及びデータ書き込み動作はページ単位で行われ、データ消去動作はブロック(物理ブロック)単位で行われる。物理ブロックは、複数のページ(物理ページ)で構成される。例えば、1個の物理ページは、所定サイズ(例えば2048バイト)のユーザ領域と、所定サイズ(例えば64バイト)の冗長領域とで構成され、1個の物理ブロックが、所定個数(例えば64個)の物理ページで構成されている。ユーザ領域は、ホストシステム4から与えられるデータを記憶するための領域であり、通常、512バイト単位の記憶領域(以下、「論理セクタ領域」と言う)に分割して管理されている。冗長領域は、誤り訂正符号(ECC:Error Correcting Code)、論理アドレス情報、ブロックステータス(フラグ)等の付加データを記憶するための領域である。   In the NAND flash memory, a data read operation and a data write operation are performed in units of pages, and a data erase operation is performed in units of blocks (physical blocks). A physical block is composed of a plurality of pages (physical pages). For example, one physical page includes a user area of a predetermined size (for example, 2048 bytes) and a redundant area of a predetermined size (for example, 64 bytes), and one physical block has a predetermined number (for example, 64). It consists of physical pages. The user area is an area for storing data given from the host system 4 and is normally divided into 512-byte storage areas (hereinafter referred to as “logical sector areas”) and managed. The redundant area is an area for storing additional data such as an error correcting code (ECC), logical address information, and a block status (flag).

論理アドレス情報は、物理ブロックと論理ブロックの対応関係を判別するための情報である。ブロックステータス(フラグ)は、物理ブロックの良否を示すフラグである。尚、初期不良の物理ブロックについては、不良ブロック(正常にデータの書き込み等を行うことができない物理ブロック)であることを示すブロックステータス(フラグ)が製造メーカによって書き込まれている。また、この初期不良の物理ブロックを示すブロックステータス(フラグ)を、ユーザ領域に書き込んでいる製造メーカもある。   The logical address information is information for determining the correspondence between physical blocks and logical blocks. The block status (flag) is a flag indicating pass / fail of the physical block. For the initial defective physical block, a block status (flag) indicating a defective block (physical block in which data cannot be normally written) is written by the manufacturer. Some manufacturers also write a block status (flag) indicating the initial defective physical block in the user area.

本実施の形態の書き込み処理では、ホストシステム4によって、コマンドレジスタR1に、書き込みコマンドを示すコマンドコードが書き込まれ、セクタ数レジスタR2に、書き込むデータのセクタ数が書き込まれ、LBAレジスタR3には、書き込みを開始する先頭データに対応するLBAが書き込まれる。セクタ数レジスタR2及びLBAレジスタR3に書き込まれた情報に基づいて、アクセス対象の領域である論理アクセス領域が判別され、その論理アクセス領域が含まれる論理ブロックに対応する物理ブロックにホストシステム4から与えられるデータが書き込まれる。   In the writing process of the present embodiment, the host system 4 writes a command code indicating a write command in the command register R1, writes the number of sectors of data to be written in the sector number register R2, and stores in the LBA register R3 The LBA corresponding to the top data to start writing is written. Based on the information written in the sector number register R2 and the LBA register R3, a logical access area that is an access target area is determined and given to the physical block corresponding to the logical block including the logical access area from the host system 4. Data is written.

セクタ数レジスタR2及びLBAレジスタR3に書き込まれた情報に基づいて判別される論理アクセス領域が複数個の論理ブロックに跨っている場合は、論理アクセス領域が属する論理ブロック毎に領域を分割してデータの書き込み処理が行われる。例えば、論理アクセス領域が2個の論理ブロック(第1の論理ブロックと第2の論理ブロック)に跨っている場合は、第1の論理ブロックに対応する物理ブロックに対する書き込み処理と、第2の論理ブロックに対応する物理ブロックに対する書き込み処理とが行われる。第1の論理ブロックに属する論理アクセス領域に対して書き込むことが指示されたデータは、第1の論理ブロックに対応する物理ブロックに書き込まれる。第2の論理ブロックに属する論理アクセス領域に対して書き込むことが指示されたデータは、第2の論理ブロックに対応する物理ブロックに書き込まれる。   When the logical access area determined based on the information written in the sector number register R2 and the LBA register R3 extends over a plurality of logical blocks, the data is obtained by dividing the area for each logical block to which the logical access area belongs. Is written. For example, when the logical access area extends over two logical blocks (the first logical block and the second logical block), the write processing for the physical block corresponding to the first logical block and the second logical block Write processing is performed on the physical block corresponding to the block. Data instructed to be written to the logical access area belonging to the first logical block is written to the physical block corresponding to the first logical block. Data instructed to be written to the logical access area belonging to the second logical block is written to the physical block corresponding to the second logical block.

ホストシステム4側のアドレス空間は、セクタ(512バイト)単位で分割した領域(以下、「論理セクタ領域」と言う)に付けた通し番号であるLBA(Logical Block Address)で管理されている。又、複数個の論理セクタ領域で構成された論理ブロックが形成され、この論理ブロックに対して、1個又は複数個の物理ブロックが割り当てられる。   The address space on the host system 4 side is managed by an LBA (Logical Block Address) which is a serial number assigned to an area (hereinafter referred to as “logical sector area”) divided in units of sectors (512 bytes). Also, a logical block composed of a plurality of logical sector areas is formed, and one or a plurality of physical blocks are assigned to the logical block.

この論理ブロックと物理ブロックの対応関係は、ゾーン単位で管理されることが多い。具体的には、複数個の論理ブロックで1個の論理ゾーンが構成され、この論理ゾーン単位で論理ブロックと物理ブロックの対応関係を示すアドレス変換テーブルの作成処理や更新処理が行われる。   The correspondence between logical blocks and physical blocks is often managed on a zone basis. Specifically, one logical zone is composed of a plurality of logical blocks, and address conversion table creation processing and update processing indicating the correspondence between logical blocks and physical blocks are performed in units of logical zones.

このアドレス変換テーブルの作成処理や更新処理は、通常、ワークエリア8上で行われる。アドレス変換テーブルは、一般に、起動時又はアクセス時に、各物理ブロックの冗長領域に記憶されている論理アドレス情報に基づいて作成されるが、フラッシュメモリ2に格納しておき、必要なときにフラッシュメモリ2から読み出すようにしてもよい。こうすることより、各物理ブロックの冗長領域から論理アドレス情報を読み出してアドレス変換テーブルを作成する場合に比べて、短時間で、アドレス変換テーブルを得ることができる。   The address conversion table creation process and update process are normally performed on the work area 8. The address conversion table is generally created based on logical address information stored in the redundant area of each physical block at the time of start-up or access, but is stored in the flash memory 2 and flash memory when necessary. 2 may be read out. By doing so, it is possible to obtain the address conversion table in a shorter time than when the logical address information is read from the redundant area of each physical block and the address conversion table is created.

また、アドレス変換テーブルをフラッシュメモリ2に格納する場合は、突然の電源遮断に対応するため、常に最新のアドレス変換テーブルがフラッシュメモリ2に格納されているようにすることが好ましい。つまり、論理ブロックと物理ブロックとの対応関係が変化する毎に(つまりワークエリア8上でアドレス変換テーブルが更新される毎に)、最新のアドレス変換テーブルがフラッシュメモリ2に保存されることが好ましい。このアドレス変換テーブルの格納処理も、作成処理や更新処理と同様に論理ゾーン単位で行われる。   When the address conversion table is stored in the flash memory 2, it is preferable that the latest address conversion table is always stored in the flash memory 2 in order to cope with a sudden power shutdown. That is, it is preferable that the latest address translation table is stored in the flash memory 2 every time the correspondence between the logical block and the physical block changes (that is, every time the address translation table is updated on the work area 8). . This address conversion table storage process is also performed in units of logical zones, similar to the creation process and update process.

図2を参照して、論理ブロックと物理ブロックの対応関係の一例を説明する。   An example of the correspondence between logical blocks and physical blocks will be described with reference to FIG.

図2に示した例では、LBA#0−#2047999からなる2048000個の論理セクタ領域が、フラッシュメモリ2を構成する8192個の物理ブロックからなる記憶領域に割り当てられている。   In the example shown in FIG. 2, 2048000 logical sector areas composed of LBA # 0 to # 20479999 are allocated to storage areas composed of 8192 physical blocks constituting the flash memory 2.

それぞれの物理ブロックは、複数個の論理セクタ領域で構成された論理ブロックに割り当てられる。以下、この論理ブロックに付けられた通し番号を「論理ブロック番号(LBN)」と言う。この例では、セクタ単位の論理アドレスであるLBAが連続する256個の論理セクタ領域をまとめたものを論理ブロックとしている。つまり、LBA#0−#255の256個の論理セクタ領域によりLBN#0の論理ブロックが構成され、LBA#256−#511の256個の論理セクタ領域によりLBN#1の論理ブロックが構成されている。このように、LBA#0−#2047999の2048000個の論理セクタ領域によりLBN#0−#7999の8000個の論理ブロックが構成されている。   Each physical block is assigned to a logical block composed of a plurality of logical sector areas. Hereinafter, the serial number assigned to the logical block is referred to as “logical block number (LBN)”. In this example, a logical block is composed of 256 logical sector areas in which LBAs, which are logical addresses in units of sectors, are continuous. That is, the logical block of LBN # 0 is composed of 256 logical sector areas of LBA # 0- # 255, and the logical block of LBN # 1 is composed of 256 logical sector areas of LBA # 256- # 511. Yes. In this way, 8000 logical blocks LBN # 0- # 7999 are configured by 2048000 logical sector areas of LBA # 0- # 20479999.

更に、この論理ブロックを複数個まとめたものを論理ゾーンとしている。以下、この論理ゾーンに付けられた通し番号を「論理ゾーン番号(LZN)」と言う。この例では、LBN#0−#7999の8000個の論理ブロックが、LZN#0−#7の8個の論理ゾーンに対して1000個ずつ割り当てられている。つまり、LBN#0−#999の論理ブロックがLZN#0の論理ゾーンに、LBN#1000−#1999の論理ブロックがLZN#1の論理ゾーンに、LBN#2000−#2999の論理ブロックがLZN#2の論理ゾーンに、以下、同様に、LBN#7000−#7999の論理ブロックがLZN#7の論理ゾーンに割り当てられている。   Further, a plurality of logical blocks are collected as a logical zone. Hereinafter, the serial number assigned to this logical zone is referred to as “logical zone number (LZN)”. In this example, 8000 logical blocks of LBN # 0- # 7999 are allocated 1000 by 8 to the eight logical zones of LZN # 0- # 7. That is, the logical blocks of LBN # 0- # 999 are in the logical zone of LZN # 0, the logical blocks of LBN # 1000- # 1999 are in the logical zone of LZN # 1, and the logical blocks of LBN # 2000- # 2999 are in LZN #. Similarly, the logical blocks of LBN # 7000- # 7999 are assigned to the logical zone of LZN # 7 in the second logical zone.

フラッシュメモリ2を構成する8192個の物理ブロックには、固有の物理ブロックアドレス(PBA)が付されている。フラッシュメモリ2を構成する物理ブロックには、出荷時からデータの書き込みや消去を正常に行うができない不良ブロックである先天性の不良ブロックと、書き込みや消去を繰返すことにより不良ブロックになった後天性の不良ブロックとがある。フラッシュメモリ2を構成する物理ブロックに含まれる後天性の不良ブロックの個数は、一般に、メーカにより規定されている保証消去回数を超えると顕著に増加する。   A unique physical block address (PBA) is assigned to 8192 physical blocks constituting the flash memory 2. The physical blocks constituting the flash memory 2 include a congenital defective block that cannot be normally written or erased from the time of shipment, and an acquired block that has become defective due to repeated writing or erasing. There are bad blocks. In general, the number of acquired defective blocks included in the physical block constituting the flash memory 2 is significantly increased when the number of guaranteed erases specified by the manufacturer is exceeded.

また、一般的に使用されているNAND型フラッシュメモリには、SLC(single level cell)タイプのメモリセルで構成されているものと、MLC(multi level cell)タイプのメモリセルで構成されているものとがある。MLCタイプのメモリセルで構成されたフラッシュメモリは、一般に、SLCタイプのメモリセルで構成されたフラッシュメモリに比べデータ保持期間が短く、そのデータ保持期間は、所定の消去回数を超えると顕著に短くなる。従って、MLCタイプのメモリセルで構成されたフラッシュメモリでは、保証消去回数に達していない物理ブロックであっても、所定の消去回数を超えると、その物理ブロックに格納されているデータの信頼性が低下する。   Also, commonly used NAND flash memories are composed of SLC (single level cell) type memory cells and MLC (multi level cell) type memory cells. There is. A flash memory composed of MLC type memory cells generally has a shorter data retention period than a flash memory composed of SLC type memory cells, and the data retention period is significantly shorter when a predetermined number of erasures is exceeded. Become. Therefore, in a flash memory composed of MLC type memory cells, even if a physical block has not reached the guaranteed erase count, the reliability of the data stored in the physical block exceeds the predetermined erase count. descend.

それぞれの論理ブロックに対応するデータは、その論理ブロックに割り当てられた物理ブロックに格納される。この論理ブロックと物理ブロックとの対応関係は、上述したアドレス変換テーブルによって管理されている。論理ブロックに割り当てる物理ブロックは、有効なデータが格納されていない物理ブロックを検索するためのテーブルである空きブロック検索テーブルを用いて検索される。   Data corresponding to each logical block is stored in a physical block assigned to the logical block. The correspondence between the logical block and the physical block is managed by the address conversion table described above. The physical block to be allocated to the logical block is searched using a free block search table that is a table for searching for a physical block in which valid data is not stored.

フラッシュメモリに格納されているデータを更新するときには、旧データが格納されている物理ブロックと同じ論理ブロックに、有効なデータが格納されていない別の物理ブロックを新たに割り当て、その別の物理ブロックに新データが格納される。そして、全ての旧データが新データで置き換えられたとき、旧データが格納されている物理ブロックは、有効なデータが格納されていない物理ブロック(以下、「無効ブロック」と言う)になる。   When updating the data stored in the flash memory, another physical block that does not contain valid data is newly allocated to the same logical block as the physical block in which the old data is stored. New data is stored in. When all the old data is replaced with new data, the physical block in which the old data is stored becomes a physical block in which valid data is not stored (hereinafter referred to as “invalid block”).

つまり、いずれかの論理ブロックに対応するデータが格納されている物理ブロック内の全てのデータが、別の物理ブロックに格納されているデータにより置き換えられたとき、その物理ブロックは無効ブロックになる。尚、無効ブロックの消去処理は、別の物理ブロックに格納されているデータにより全ての有効なデータが置き換えられたときに行われても(つまり、物理ブロックが無効ブロックになったときに行われても)、又は、その無効ブロックが論理ブロックに割り当てられる直前に行われてもよい。   That is, when all data in a physical block storing data corresponding to any logical block is replaced by data stored in another physical block, the physical block becomes an invalid block. Note that invalid block erasure processing is performed even when all valid data is replaced by data stored in another physical block (that is, when a physical block becomes an invalid block). Or just before the invalid block is assigned to a logical block.

フラッシュメモリに格納されているデータは、通常、更新される毎に格納先の物理ブロックが遷移していく。この格納先の物理ブロックの遷移は、更新頻度が高いデータに関しては多くなり、更新頻度が低いデータに関しては少なくなる。従って、格納されたデータの更新頻度の差異により、それぞれの物理ブロックの消去回数に偏りが生じる。この消去回数の偏りが過度に進行すると、消去回数が多い一部の物理ブロックが、他の物理ブロックよりも早く不良ブロックになったり、他の物理ブロックよりも早くデータ保持期間が著しく短くなったりして好ましいない。   In the data stored in the flash memory, the physical block of the storage destination usually changes every time it is updated. The transition of the physical block at the storage destination increases for data with a high update frequency, and decreases for data with a low update frequency. Accordingly, the number of times of erasing each physical block is biased due to the difference in the update frequency of the stored data. If this bias in the number of erasures progresses excessively, some physical blocks with a large number of erasures become defective blocks earlier than other physical blocks, or the data retention period becomes significantly shorter than other physical blocks. It is not preferable.

このような問題を回避するため、本発明の一実施形態に係るメモリコントローラ3は、消去回数に閾値を設け、消去回数がその閾値に達した物理ブロックの消去回数の増加が抑制されるような制御を行っている。次に、この制御方法について説明する。   In order to avoid such a problem, the memory controller 3 according to an embodiment of the present invention sets a threshold value for the number of erase times, and suppresses an increase in the number of erase times of a physical block that has reached the threshold value. Control is in progress. Next, this control method will be described.

本実施の形態では、消去回数に2つの閾値が設けられ、この閾値に基づいて、フラッシュメモリ2を構成する複数個の物理ブロックが3個のグループに分割される。尚、設定される閾値の数は、適宜に設定される。例えば、3つの閾値により4個のグループに分割されるようにしても、4つの閾値により5個のグループに分割されるようにしても良い(つまり、フラッシュメモリ2を構成する複数個の物理ブロックは、N個の閾値があれば(N+1)個のグループに分割される)。また、閾値の値(閾値となる消去回数)は、フラッシュメモリの特性に応じて適宜設定される。   In the present embodiment, two threshold values are provided for the number of times of erasure, and based on these threshold values, a plurality of physical blocks constituting the flash memory 2 are divided into three groups. Note that the number of threshold values to be set is set as appropriate. For example, it may be divided into four groups by three thresholds, or may be divided into five groups by four thresholds (that is, a plurality of physical blocks constituting the flash memory 2). Is divided into (N + 1) groups if there are N thresholds). Further, the threshold value (the number of erasures serving as the threshold) is appropriately set according to the characteristics of the flash memory.

本実施の形態では、第1の閾値mが、第2の閾値nより1000小さい値に設定され、第2の閾値nが、データ保持期間の減少が顕著になる消去回数と一致するように設定されている。例えば、消去回数が5000回を超えるとデータ保持期間の減少が顕著になるフラッシュメモリの場合には、第1の閾値mが4000に、第2の閾値nが5000に設定される。メモリコントローラ3は、この2つの閾値に基づいて、フラッシュメモリ2を構成する複数個の物理ブロックを3個のグループに分割する。つまり、フラッシュメモリ2を構成する複数個の物理ブロックは、消去回数がm回未満の物理ブロックが属する第1のグループと、消去回数がm回以上n回未満の物理ブロックが属する第2のグループと、消去回数がn回以上の物理ブロックが属する第3のグループとに分割される。   In the present embodiment, the first threshold value m is set to a value 1000 smaller than the second threshold value n, and the second threshold value n is set so as to coincide with the number of erasures in which the decrease in the data holding period becomes significant. Has been. For example, in the case of a flash memory in which the decrease in the data retention period becomes significant when the number of erases exceeds 5000, the first threshold value m is set to 4000 and the second threshold value n is set to 5000. The memory controller 3 divides a plurality of physical blocks constituting the flash memory 2 into three groups based on the two threshold values. That is, the plurality of physical blocks constituting the flash memory 2 include a first group to which a physical block having an erase count of less than m and a second group to which a physical block having an erase count of m to less than n belongs. And the third group to which the physical block having the erase count of n times or more belongs.

本実施の形態では、メモリコントローラ3により、それぞれの物理ブロックを論理ブロックに割り当てた順番の先後が管理される。以下、この管理を「先後管理」と言う。   In this embodiment, the memory controller 3 manages the order in which the physical blocks are assigned to the logical blocks. Hereinafter, this management is referred to as “advanced management”.

次に、この先後管理を図3及び図4を参照して説明する。この先後管理は、グループ毎に行われており、第1のグループに属する物理ブロックの先後管理は、図3(a)に示した第1の最先ブロックテーブルに基づいて行なわれ、第2のグループに属する物理ブロックの先後管理は、図3(b)に示した第2の最先ブロックテーブルに基づいて行なわれ、第3のグループに属する物理ブロックの先後管理は、図3(c)に示した第3の最先ブロックテーブルに基づいて行なわれる。   Next, this later management will be described with reference to FIGS. This prior management is performed for each group, and the subsequent management of physical blocks belonging to the first group is performed based on the first earliest block table shown in FIG. The prior management of the physical blocks belonging to the group is performed based on the second earliest block table shown in FIG. 3B, and the prior management of the physical blocks belonging to the third group is shown in FIG. This is performed based on the third earliest block table shown.

この先後管理では、次のような優先順位の管理、すなわち、論理ブロックに対して物理ブロックが新たに割り当てられたときに、新たに割り当てられたその物理ブロックの優先順位が最上位になる優先順位の管理が行われている。従って、論理ブロックに対して先に割り当てられた物理ブロックの方が、優先順位が下位になる。そして、優先順位が最下位の物理ブロックは、論理ブロックに割り当てられている物理ブロックのうちで最も先に論理ブロックに割り当てられた物理ブロックに対応する。メモリコントローラ3は、このような優先順位の管理を行うことにより、論理ブロックに割り当てられている物理ブロックのうちで最も先に論理ブロックに割り当てられた物理ブロックを特定することができる。   In this prior management, the following priority management, that is, when a physical block is newly assigned to a logical block, the priority of the newly assigned physical block is the highest priority. Management is done. Therefore, the physical block that has been assigned to the logical block has a lower priority. The physical block with the lowest priority corresponds to the physical block assigned to the logical block first among the physical blocks assigned to the logical block. The memory controller 3 can identify the physical block assigned to the logical block first among the physical blocks assigned to the logical block by performing such priority order management.

また、この先後管理はグループ毎に行われているため、第1のグループに属する物理ブロックの先後管理における優先順位が最下位の物理ブロックは、第1のグループに属する物理ブロックのうちで最も先に論理ブロックに割り当てられた物理ブロックに対応する。同様に、第2のグループに属する物理ブロックの先後管理における優先順位が最下位の物理ブロックは、第2のグループに属する物理ブロックのうちで最も先に論理ブロックに割り当てられた物理ブロックに対応し、第3のグループに属する物理ブロックの先後管理における優先順位が最下位の物理ブロックは、第3のグループに属する物理ブロックのうちで最も先に論理ブロックに割り当てられた物理ブロックに対応する。   In addition, since this prior management is performed for each group, the physical block with the lowest priority in the physical management belonging to the first group is the first physical block belonging to the first group. Corresponds to the physical block assigned to the logical block. Similarly, the physical block with the lowest priority in the prior management of physical blocks belonging to the second group corresponds to the physical block assigned to the logical block first among the physical blocks belonging to the second group. The physical block having the lowest priority in the subsequent management of the physical block belonging to the third group corresponds to the physical block assigned to the logical block first among the physical blocks belonging to the third group.

例えば、図3(a)に示した第1の最先ブロックテーブルでは、論理ブロックに割り当てられている物理ブロックのうちで、第1のグループに属する物理ブロックの優先順位が管理されている。この第1の最先ブロックテーブルでは、PBN#36の物理ブロックの優先順位が最上位になっており、PBN#857の物理ブロックの優先順位が最下位になっている。従って、PBN#857の物理ブロックが、第1のグループに属する物理ブロックのうちで最も先に論理ブロックに割り当てられた物理ブロックに対応する。ここで、第1のグループに属するPBN#523の物理ブロックが論理ブロックに新たに割り当てられた場合、PBN#523の物理ブロックの優先順位が最上位になり、PBN#36の物理ブロックの優先順位は2番目になる。また、PBN#234の物理ブロックが無効ブロックになった場合、又はPBN#234の物理ブロックに格納されているデータが消去された場合、PBN#234の物理ブロックが優先順位の管理対象から外される。つまり、PBN#995の物理ブロック、PBN#234の物理ブロック、PBN#645の物理ブロックという順番であった優先順位が、PBN#995の物理ブロック、PBN#645の物理ブロックという順番になる。   For example, in the first earliest block table shown in FIG. 3A, the priority order of the physical blocks belonging to the first group among the physical blocks assigned to the logical block is managed. In the first earliest block table, the physical block priority of PBN # 36 is the highest and the physical block priority of PBN # 857 is the lowest. Therefore, the physical block of PBN # 857 corresponds to the physical block assigned to the logical block first among the physical blocks belonging to the first group. Here, when the physical block of PBN # 523 belonging to the first group is newly assigned to the logical block, the priority of the physical block of PBN # 523 becomes the highest, and the priority of the physical block of PBN # 36 Will be second. Also, when the physical block of PBN # 234 becomes an invalid block, or when the data stored in the physical block of PBN # 234 is erased, the physical block of PBN # 234 is removed from the priority management target. The That is, the priority order of the physical block of PBN # 995, the physical block of PBN # 234, and the physical block of PBN # 645 becomes the order of the physical block of PBN # 995 and the physical block of PBN # 645.

また、図3(b)に示した第2の最先ブロックテーブルでは、論理ブロックに割り当てられている物理ブロックのうちで、第2のグループに属する物理ブロックの優先順位が管理されている。この第2の最先ブロックテーブルでは、PBN#936の物理ブロックの優先順位が最上位になっており、PBN#975の物理ブロックの優先順位が最下位になっている。従って、PBN#957の物理ブロックが、第2のグループに属する物理ブロックのうちで最も先に論理ブロックに割り当てられた物理ブロックに対応する。図3(c)に示した第3の最先ブロックテーブルでは、論理ブロックに割り当てられている物理ブロックのうちで、第3のグループに属する物理ブロックの優先順位が管理されている。この第3の最先ブロックテーブルでは、PBN#977の物理ブロックの優先順位が最上位になっており、PBN#1111の物理ブロックの優先順位が最下位になっている。尚、第2の最先ブロックテーブル及び第3の最先ブロックテーブルの更新も第1の最先ブロックテーブルの更新と同様に行なわれる。つまり、論理ブロックに対して新たに割り当てられた物理ブロックの優先順位が最上位になり、有効なデータが格納されていない物理ブロックになった場合は、優先順位の管理対象から外される。   In the second earliest block table shown in FIG. 3B, the priority order of the physical blocks belonging to the second group among the physical blocks assigned to the logical block is managed. In the second earliest block table, the physical block priority of PBN # 936 is the highest and the physical block priority of PBN # 975 is the lowest. Therefore, the physical block of PBN # 957 corresponds to the physical block assigned to the logical block first among the physical blocks belonging to the second group. In the third earliest block table shown in FIG. 3C, the priorities of the physical blocks belonging to the third group among the physical blocks assigned to the logical block are managed. In the third earliest block table, the physical block priority of PBN # 977 is the highest, and the physical block priority of PBN # 1111 is the lowest. The second earliest block table and the third earliest block table are updated in the same manner as the update of the first earliest block table. That is, when a physical block newly assigned to a logical block has the highest priority and becomes a physical block that does not store valid data, it is removed from the management target of the priority.

本実施の形態では、先後管理がグループ毎に行われているため、メモリコントローラ3は、論理ブロックに対して新たに割り当てられた物理ブロックの消去回数に基づいて、その物理ブロックの登録先となる最先ブロックテーブルを決定する。つまり、図4に示したように、メモリコントローラ3は、論理ブロックに対して新たに割り当てられた物理ブロックの消去回数がm回未満の場合、その物理ブロックを第1のグループに対応する第1の最先ブロックテーブルに登録し、その物理ブロックの消去回数がm回以上n回未満の場合、その物理ブロックを第2のグループに対応する第2の最先ブロックテーブルに登録し、その物理ブロックの消去回数がn回以上の場合、その物理ブロックを第3のグループに対応する第3の最先ブロックテーブルに登録する。   In the present embodiment, since the prior management is performed for each group, the memory controller 3 becomes the registration destination of the physical block based on the number of erases of the physical block newly assigned to the logical block. Determine the earliest block table. That is, as shown in FIG. 4, when the number of erases of the physical block newly assigned to the logical block is less than m times, the memory controller 3 assigns the physical block to the first group corresponding to the first group. When the physical block erase count is m times or more and less than n times, the physical block is registered in the second earliest block table corresponding to the second group, and the physical block is registered. If the number of erases is n or more, the physical block is registered in the third earliest block table corresponding to the third group.

本実施の形態では、論理ブロックに対して割り当てる物理ブロック(つまり、有効なデータが格納されていない物理ブロック)を検索するための空きブロックテーブルもグループ毎に管理されている。この空きブロックテーブルの管理を、図5及び図6を参照して説明する。   In this embodiment, an empty block table for searching for a physical block to be allocated to a logical block (that is, a physical block in which valid data is not stored) is also managed for each group. The management of this empty block table will be described with reference to FIGS.

図5(a)に示した第1の空きブロックテーブル、図5(b)に示した第2の空きブロックテーブル及び図5(c)に示した第3の空きブロックテーブルは、テーブル上のそれぞれのビットがいずれかの物理ブロックに対応しており、それぞれのビットの論理値が、論理ブロックに対して割り当てることが可能な物理ブロックであるか否かを示している。ここで、論理ブロックに対して割り当てることが可能な物理ブロックとは、不良ブロックではない物理ブロックであって、記憶データが消去されている物理ブロック又は有効なデータが格納されていない物理ブロック(無効ブロック)であることを意味する。以下、不良ブロックではない物理ブロックであって、記憶データが消去されている物理ブロック又は有効なデータが格納されていない物理ブロック(無効ブロック)を「空きブロック」と総称する(つまり、記憶データが消去されていない無効ブロックを含めて「空きブロック」と言う)。   The first empty block table shown in FIG. 5A, the second empty block table shown in FIG. 5B, and the third empty block table shown in FIG. These bits correspond to any physical block, and the logical value of each bit indicates whether or not the physical block can be assigned to the logical block. Here, a physical block that can be allocated to a logical block is a physical block that is not a bad block, and a physical block in which stored data is erased or a physical block in which valid data is not stored (invalid Block). Hereinafter, a physical block that is not a bad block and has a storage data erased or a physical block in which valid data is not stored (invalid block) is collectively referred to as an “empty block” (that is, the storage data is Including empty blocks that have not been erased.

本実施の形態では、空きブロックに該当する物理ブロックの論理値を“1”とし、空きブロックに該当しない物理ブロックの論理値を“0”としている。また、第1乃至3の空きブロックテーブルにおいて、一番上の8ビットは下位ビット側から順番に(右側のビットから順番に)PBA#0−#7の物理ブロックに対応し、上から2番目の8ビットは下位ビット側から順番に(右側のビットから順番に)PBA#8−#15の物理ブロックに対応し、上から3番目の8ビットは下位ビット側から順番に(右側のビットから順番に)PBA#16−#24の物理ブロックに対応しており、以下同様に、それぞれビットに対してPBAの順番で物理ブロックが対応している。従って、図5(a)に示した第1の空きブロックテーブルの例では、PBA#8の物理ブロック及びPBA#15の物理ブロック等が空きブロックに該当し、図5(b)に示した第2の空きブロックテーブルの例では、PBA#0の物理ブロック等が空きブロックに該当する。   In this embodiment, the logical value of a physical block corresponding to an empty block is “1”, and the logical value of a physical block not corresponding to an empty block is “0”. In the first to third empty block tables, the uppermost 8 bits correspond to the physical blocks of PBA # 0 to # 7 in order from the lower bit side (in order from the right bit), and the second from the top. Correspond to the physical block of PBA # 8- # 15 in order from the lower bit side (in order from the right bit), and the third 8 bits from the top in order from the lower bit side (from the right bit) Corresponding to the physical blocks of PBA # 16- # 24, and in the same manner, the physical blocks correspond to the bits in the order of PBA. Therefore, in the example of the first empty block table shown in FIG. 5A, the physical block of PBA # 8, the physical block of PBA # 15, and the like correspond to the empty blocks, and the first block shown in FIG. In the example of the empty block table 2, the physical block of PBA # 0 corresponds to the empty block.

また、空きブロックとなった物理ブロックに対応するビットの論理値が“1”に変更されるときには、第1乃至3の空きブロックテーブルのうちのいずれか1つのテーブル上のビットの論理値だけが“1”に変更される。この変更されるビットが属するテーブルについては、空きブロックとなった物理ブロックの消去回数に基づいて選択される。つまり、図6に示したように、メモリコントローラ3は、空きブロックとなった物理ブロックの消去回数がm回未満の場合、第1のグループに対応する第1の空きブロックテーブルが選択され、その物理ブロックの消去回数がm回以上n回未満の場合、第2のグループに対応する第2の空きブロックテーブルが選択され、その物理ブロックの消去回数がn回以上の場合、第3のグループに対応する第3の空きブロックテーブルが選択される。   Further, when the logical value of the bit corresponding to the physical block that has become an empty block is changed to “1”, only the logical value of the bit on any one of the first to third empty block tables is obtained. It is changed to “1”. The table to which the bit to be changed belongs is selected based on the number of times of erasing the physical block that has become an empty block. That is, as shown in FIG. 6, when the number of times of erasing a physical block that has become a free block is less than m times, the memory controller 3 selects the first free block table corresponding to the first group, When the physical block erase count is m times or more and less than n times, the second empty block table corresponding to the second group is selected, and when the physical block erase count is n times or more, the third group is assigned. A corresponding third free block table is selected.

第1乃至3の空きブロックテーブルを用いた空きブロックの検索は、通常、ホストシステム4から与えられるデータの書き込み先として指定された論理ブロックに物理ブロックが割り当てられていないとき、又は、その論理ブロックに割り当てられている物理ブロックにホストシステム4から与えられるデータを書き込むための空き領域が無いときに行われる。そして、空きブロックの検索で検出された空きブロックは、ホストシステム4から与えられるデータの書き込み先として指定された論理ブロックに割り当てられ、ホストシステム4から与えられるデータが格納される。   The search for empty blocks using the first to third empty block tables is usually performed when a physical block is not allocated to a logical block designated as a data write destination given from the host system 4 or when the logical block is specified. This is performed when there is no free area for writing the data given from the host system 4 in the physical block assigned to. The free block detected by the search for the free block is assigned to the logical block designated as the write destination of the data supplied from the host system 4, and the data supplied from the host system 4 is stored.

本実施の形態では、消去回数が少ない下位側のグループから消去回数が多い上位側のグループに向かって、第1のグループ、第2のグループ、第3のグループという順番でグループ分けされている。そして、空きブロックを検索するときには、下位側のグループに対応するテーブルが優先的に使用される。つまり、第1のグループに対応する第1の空きブロックテーブルを使用した空きブロックの検索で空きブロックが検出されなかったときに、第2のグループに対応する第2の空きブロックテーブルを使用した空きブロックの検索が行われ、更に、第2のグループに対応する第2の空きブロックテーブルを使用した空きブロックの検索で空きブロックが検出されなかったときに、第3のグループに対応する第3の空きブロックテーブルを使用した空きブロックの検索が行われる。このようにすることにより、空きブロックのうち下位側のグループに属する物理ブロックが優先的に論理ブロック割り当てられる。その結果、上位側のグループに属する物理ブロックの消去回数の増加が抑制される。   In the present embodiment, the first group, the second group, and the third group are grouped in order from the lower group having a smaller number of erasures to the upper group having a larger number of erasures. When searching for an empty block, the table corresponding to the lower group is preferentially used. That is, when a free block is not detected in the search for a free block using the first free block table corresponding to the first group, the free space using the second free block table corresponding to the second group is used. When a block search is performed and an empty block is not detected in the search for an empty block using the second empty block table corresponding to the second group, the third corresponding to the third group is detected. An empty block search using the empty block table is performed. By doing so, physical blocks belonging to the lower group among the empty blocks are preferentially assigned logical blocks. As a result, an increase in the number of erases of physical blocks belonging to the upper group is suppressed.

しかし、このように下位側のグループに対応するテーブルが優先的に使用されるようにしただけでは、上位側のグループに属する物理ブロックの消去回数の増加が適切に抑制されない場合がある。例えば、下位側のグループに属する物理ブロックに書き換え頻度の低いデータが格納されてしまった場合、上位側のグループに属する物理ブロックの消去回数の増加が適切に抑制されない。このような場合、書き換え頻度の低いデータを上位側のグループに属する物理ブロックに格納されるようにすれば、上位側のグループに属する物理ブロックの消去回数の増加が適切に抑制される。従って、本実施の形態では、空きブロックの検索により空きブロックが検出されたときに、その空きブロックが属するグループよりも下位のグループに属する物理ブロックが存在する場合には、その下位のグループに属する物理ブロックのうちで最も先に論理ブロックに割り当てられた物理ブロックに格納されているデータが、空きブロックの検索により検出された空きブロックに転送される。このデータ転送後に、その転送元の物理ブロックが、空きブロックの検索により検出された空きブロックの代替になる。つまり、その転送元の物理ブロックが、ホストシステム4から与えられるデータの書き込み先として指定された論理ブロックに割り当てられ、ホストシステム4から与えられるデータが格納される。このようなデータ転送が行われることより、上位側のグループに属する物理ブロックに書き換え頻度の低いデータが格納され、上位側のグループに属する物理ブロックの消去回数の増加が効果的に抑制される。   However, if the table corresponding to the lower group is preferentially used in this way, an increase in the number of erases of physical blocks belonging to the upper group may not be appropriately suppressed. For example, if data with a low rewrite frequency is stored in a physical block belonging to the lower group, an increase in the number of erases of the physical block belonging to the upper group is not appropriately suppressed. In such a case, if data with low rewrite frequency is stored in a physical block belonging to the upper group, an increase in the number of erasures of the physical block belonging to the upper group is appropriately suppressed. Therefore, in this embodiment, when a free block is detected by searching for a free block, if there is a physical block belonging to a group lower than the group to which the free block belongs, it belongs to the lower group. The data stored in the physical block assigned to the logical block first among the physical blocks is transferred to the empty block detected by the search for the empty block. After this data transfer, the physical block of the transfer source replaces the empty block detected by the empty block search. That is, the physical block of the transfer source is assigned to the logical block designated as the write destination of the data given from the host system 4, and the data given from the host system 4 is stored. By performing such data transfer, data with a low rewrite frequency is stored in the physical block belonging to the upper group, and an increase in the number of erasures of the physical block belonging to the upper group is effectively suppressed.

本実施の形態では、下位側のグループから上位側のグループに向かって、第1のグループ、第2のグループ、第3のグループという順番でグループ分けされている。従って、第2のグループに対応する第2の空きブロックテーブル又は第3のグループに対応する第3の空きブロックテーブルを使用した空きブロックの検索により空きブロックが検出された場合に、その空きブロックが属するグループよりも下位のグループに属する物理ブロックが存在することがある。つまり、第2の空きブロックテーブルを使用した空きブロックの検索により空きブロックが検出された場合、第1のグループに属する物理ブロックが、その空きブロックが属するグループよりも下位のグループに属する物理ブロックに該当し、第3の空きブロックテーブルを使用した空きブロックの検索により空きブロックが検出された場合、第1のグループ及び第2のグループに属する物理ブロックが、その空きブロックが属するグループよりも下位のグループに属する物理ブロックに該当する。   In the present embodiment, the grouping is performed in the order of the first group, the second group, and the third group from the lower group to the upper group. Therefore, when an empty block is detected by searching for an empty block using the second empty block table corresponding to the second group or the third empty block table corresponding to the third group, the empty block is There may be a physical block belonging to a lower group than the group to which it belongs. That is, when an empty block is detected by searching for an empty block using the second empty block table, a physical block belonging to the first group becomes a physical block belonging to a group lower than the group to which the empty block belongs. When a free block is detected by searching for a free block using the third free block table, the physical block belonging to the first group and the second group is lower than the group to which the free block belongs. Corresponds to a physical block belonging to a group.

例えば、第2の空きブロックテーブルを使用した空きブロックの検索により空きブロックが検出された場合、第1の最先ブロックテーブルを使用した検索(つまり、第1のグループに属する物理ブロックのうちで最も先に論理ブロックに割り当てられた物理ブロックの検索)が行われる。そして、この第1の最先ブロックテーブルを使用した検索により検出された物理ブロック(つまり、第1のグループに属する物理ブロックのうちで最も先に論理ブロックに割り当てられた物理ブロック)に格納されているデータが、第2の空きブロックテーブルを使用した空きブロックの検索により検出された空きブロック(つまり、第2のグループに属する空きブロック)に転送される。このデータ転送の終了後、転送元の物理ブロック(第1の最先ブロックテーブルを使用した検索により検出された物理ブロック)が論理ブロックに割り当てられ、その転送元の物理ブロックにホストシステム4から与えられるデータが格納される。尚、第1の最先ブロックテーブルに登録されている物理ブロックが存在しない場合には、このデータ転送は行われず、第2の空きブロックテーブルを使用した空きブロックの検索により検出された空きブロックがそのまま使用される。つまり、第2の空きブロックテーブルを使用した空きブロックの検索により検出された空きブロック(つまり、第2のグループに属する空きブロック)が論理ブロックに割り当てられ、その空きブロックにホストシステム4から与えられるデータが格納される。   For example, when an empty block is detected by searching for an empty block using the second empty block table, the search using the first earliest block table (that is, the most physical block belonging to the first group). The search of the physical block previously assigned to the logical block is performed. Then, it is stored in the physical block detected by the search using the first earliest block table (that is, the physical block assigned to the logical block first among the physical blocks belonging to the first group). Existing data is transferred to a free block detected by a search for a free block using the second free block table (that is, a free block belonging to the second group). After this data transfer is completed, the transfer source physical block (the physical block detected by the search using the first earliest block table) is assigned to the logical block, and is given to the transfer source physical block from the host system 4. Stored data is stored. If there is no physical block registered in the first earliest block table, this data transfer is not performed, and an empty block detected by searching for an empty block using the second empty block table is not found. Used as is. That is, an empty block detected by searching for an empty block using the second empty block table (that is, an empty block belonging to the second group) is allocated to the logical block, and is given to the empty block from the host system 4. Data is stored.

また、第3の空きブロックテーブルを使用した空きブロックの検索により空きブロックが検出された場合、まず第1の最先ブロックテーブルを使用した検索(つまり、第1のグループに属する物理ブロックのうちで最も先に論理ブロックに割り当てられた物理ブロックの検索)が行われる。そして、この第1の最先ブロックテーブルを使用した検索により検出された物理ブロック(つまり、第1のグループに属する物理ブロックのうちで最も先に論理ブロックに割り当てられた物理ブロック)に格納されているデータが、第3の空きブロックテーブルを使用した空きブロックの検索により検出された空きブロック(つまり、第3のグループに属する空きブロック)に転送される。このデータ転送の終了後、転送元の物理ブロック(第1の最先ブロックテーブルを使用した検索により検出された物理ブロック)が論理ブロックに割り当てられ、その転送元の物理ブロックにホストシステム4から与えられるデータが格納される。尚、第1の最先ブロックテーブルに登録されている物理ブロックが存在しない場合には、第2の最先ブロックテーブルを使用した検索(つまり、第2のグループに属する物理ブロックのうちで最も先に論理ブロックに割り当てられた物理ブロックの検索)が行われる。そして、この第2の最先ブロックテーブルを使用した検索により検出された物理ブロック(つまり、第2のグループに属する物理ブロックのうちで最も先に論理ブロックに割り当てられた物理ブロック)に格納されているデータが、第3の空きブロックテーブルを使用した空きブロックの検索により検出された空きブロック(つまり、第3のグループに属する空きブロック)に転送される。このデータ転送の終了後、転送元の物理ブロック(第2の最先ブロックテーブルを使用した検索により検出された物理ブロック)が論理ブロックに割り当てられ、その転送元の物理ブロックにホストシステム4から与えられるデータが格納される。尚、第2の最先ブロックテーブルにも登録されている物理ブロックが存在しない場合には、このデータ転送は行われず、第3の空きブロックテーブルを使用した空きブロックの検索により検出された空きブロックがそのまま使用される。つまり、第3の空きブロックテーブルを使用した空きブロックの検索により検出された空きブロック(つまり、第3のグループに属する空きブロック)が論理ブロックに割り当てられ、その空きブロックにホストシステム4から与えられるデータが格納される。   When an empty block is detected by searching for an empty block using the third empty block table, first, a search using the first earliest block table (that is, among the physical blocks belonging to the first group). The search of the physical block assigned to the logical block first) is performed. Then, it is stored in the physical block detected by the search using the first earliest block table (that is, the physical block assigned to the logical block first among the physical blocks belonging to the first group). Existing data is transferred to a free block detected by a free block search using the third free block table (that is, a free block belonging to the third group). After this data transfer is completed, the transfer source physical block (the physical block detected by the search using the first earliest block table) is assigned to the logical block, and is given to the transfer source physical block from the host system 4. Stored data is stored. If there is no physical block registered in the first earliest block table, a search using the second earliest block table (that is, the earliest physical block belonging to the second group). (Retrieval of physical block assigned to logical block) is performed. And it is stored in the physical block detected by the search using the second earliest block table (that is, the physical block assigned to the logical block first among the physical blocks belonging to the second group). Existing data is transferred to a free block detected by a free block search using the third free block table (that is, a free block belonging to the third group). After this data transfer is completed, the transfer source physical block (physical block detected by the search using the second earliest block table) is allocated to the logical block, and given to the transfer source physical block from the host system 4 Stored data is stored. If there is no physical block registered in the second earliest block table, this data transfer is not performed, and an empty block detected by searching for an empty block using the third empty block table. Is used as is. That is, an empty block (that is, an empty block belonging to the third group) detected by searching for an empty block using the third empty block table is assigned to the logical block, and is given to the empty block from the host system 4. Data is stored.

次に、フラッシュメモリ2を構成する物理ブロックの消去回数の管理と先後管理のための優先順位管理の方法を、図7に示した例を参照して説明する。図7に示したテーブルには、PBAの順番で、各物理ブロックの優先順位リンク番号と消去回数が記載されている。このテーブルには、その物理ブロックより優先順位が1つ上の物理ブロックのPBAと、その物理ブロックより優先順位が1つ下の物理ブロックのPBAが、優先順位リンク番号として書き込まれる。従って、論理ブロックに割り当てられていない物理ブロックについては、優先順位リンク番号が消去される。また、優先順位が最上位の物理ブロックについては、その物理ブロックより優先順位が1つ上の物理ブロックのPBAが書き込まれておらず、優先順位が最下位の物理ブロックについては、その物理ブロックより優先順位が1つ下の物理ブロックのPBAが書き込まれていない。   Next, a management method of the number of times of erasing the physical blocks constituting the flash memory 2 and a priority management method for the prior management will be described with reference to the example shown in FIG. In the table shown in FIG. 7, the priority order link number and the number of erasures of each physical block are described in the order of PBA. In this table, the PBA of the physical block whose priority is one higher than the physical block and the PBA of the physical block whose priority is one lower than the physical block are written as the priority link number. Therefore, the priority link number is deleted for a physical block that is not assigned to a logical block. For the physical block with the highest priority, the PBA of the physical block one priority higher than the physical block is not written, and for the physical block with the lowest priority, the physical block The PBA of the physical block with the next lower priority is not written.

このテーブルを参照することにより、例えば、PBA#0の物理ブロックの場合、その物理ブロックより優先順位が1つ上の物理ブロックはPBA#118であり、その物理ブロックより優先順位が1つ下の物理ブロックはPBA#572であることが分かる。   By referring to this table, for example, in the case of a physical block of PBA # 0, the physical block whose priority is one higher than that physical block is PBA # 118, and whose priority is one lower than that physical block. It can be seen that the physical block is PBA # 572.

このテーブルには、各グループの優先順位が最上位の物理ブロックと最下位の物理ブロックのPBAも記載されている。従って、論理ブロックに新たに物理ブロックが割り当てられたときは、優先順位が最上位の物理ブロックが変わるので、優先順位が最上位の物理ブロックを示すPBAの記載が変更される。また、優先順位が最下位の物理ブロックが有効なデータが格納されていない物理ブロックになったときや、優先順位が最下位の物理ブロックに格納されている全てのデータが別のブロックに転送されたときは、優先順位が最下位の物理ブロックが変わるので、優先順位が最下位の物理ブロックを示すPBAの記載が変更される。   This table also describes the PBA of the physical block with the highest priority and the physical block with the lowest priority of each group. Therefore, when a physical block is newly assigned to a logical block, the physical block with the highest priority changes, so that the description of the PBA indicating the physical block with the highest priority is changed. Also, when the physical block with the lowest priority becomes a physical block that does not store valid data, or all the data stored in the physical block with the lowest priority is transferred to another block. Since the physical block with the lowest priority changes, the description of the PBA indicating the physical block with the lowest priority is changed.

例えば、第1のグループに属するPBA#523の物理ブロックが、論理ブロックに新たに割り当てられた場合、第1のグループに属する優先順位が最上位の物理ブロックを示すPBAが、#36から#523に変更される。また、PBAが#36の物理ブロックの優先順位リンク番号として、優先順位が1つ上の物理ブロックを示すPBAである#523が記載される。PBAが#523の物理ブロックの優先順位リンク番号として、優先順位が1つ下の物理ブロックを示すPBAである#36が記載される。   For example, when the physical block of PBA # 523 belonging to the first group is newly assigned to the logical block, the PBA indicating the highest priority physical block belonging to the first group is changed from # 36 to # 523. Changed to Also, as the priority link number of the physical block with PBA # 36, # 523, which is the PBA indicating the physical block with the next higher priority, is described. As the priority link number of the physical block whose PBA is # 523, # 36 which is the PBA indicating the physical block whose priority is one lower is described.

各物理ブロックの消去回数は、各物理ブロックに格納されているデータが消去される毎に更新される。例えば、PBAが#0の物理ブロックに格納されているデータが消去された場合には、テーブルに記載されている消去回数が1000から1001に変更され、テーブルに記載されている優先順位リンク番号は消去される。また、PBA#118の物理ブロックより優先順位が1つ下の物理ブロックは、PBA#572の物理ブロックになるので、PBA#118の物理ブロックとPBA#572の物理ブロックの優先順位リンク番号が更新される。つまり、PBA#118の物理ブロックの優先順位リンク番号については、優先順位が1つ下の物理ブロックを示すPBAが#0から#572に変更される。また、PBA#572の物理ブロックの優先順位リンク番号については、優先順位が1つ上の物理ブロックを示すPBAが#0から#118に変更される。   The number of times of erasing each physical block is updated every time data stored in each physical block is erased. For example, when the data stored in the physical block with PBA # 0 is deleted, the number of times of deletion described in the table is changed from 1000 to 1001, and the priority link number described in the table is Erased. In addition, since the physical block whose priority is one lower than the physical block of PBA # 118 becomes the physical block of PBA # 572, the priority link number of the physical block of PBA # 118 and the physical block of PBA # 572 is updated. Is done. That is, for the priority link number of the physical block of PBA # 118, the PBA indicating the physical block with the next lower priority is changed from # 0 to # 572. Also, for the priority order link number of the physical block of PBA # 572, the PBA indicating the physical block with the next higher priority is changed from # 0 to # 118.

尚、上述した実施の形態では、論理ブロックに割り当てられた全ての物理ブロックを対象に先後管理が行われたが、先後管理の対象となる物理ブロックが特定の論理ブロックに割り当てられた物理ブロックに限定されるようにしてもよい。例えば、先後管理の対象となる物理ブロックは、それぞれの物理ブロックに割り当てられている論理ブロックの論理ブロック番号(LBN)の範囲により限定されるようにしてもよい。   In the above-described embodiment, the post-management is performed for all physical blocks assigned to the logical block. However, the physical block to be pre-managed is assigned to the physical block assigned to the specific logical block. It may be limited. For example, the physical block that is the target of the previous management may be limited by the range of the logical block number (LBN) of the logical block assigned to each physical block.

また、この先後管理の対象の設定は、ホストシステム4からの指示により行われるようにしてもよい。例えば、先後管理の対象とするLBAの範囲(以下、対象LBA範囲と言う)、又は対象としないLBAの範囲(以下、対象外LBA範囲と言う)が、ホストシステム4から与えられるようにしてもよい。   Further, the setting of the target of the later management may be performed by an instruction from the host system 4. For example, the host system 4 may be provided with an LBA range (hereinafter referred to as a target LBA range) that is a target of prior management or a non-target LBA range (hereinafter referred to as a non-target LBA range). Good.

このような先後管理の対象の設定が行われた場合、その設定に関する情報は、フラッシュメモリ2に格納され、起動時にメモリコントローラ3により読み出され保持されることが好ましい。例えば、メモリコントローラ3は、メモリコントローラ3が有する記憶領域(例えば、ワークメモリ8、或いはマイクロプロセッサ6内のレジスタ)に、ホストシステム4から指示された対象LBA範囲又は対象外LBA範囲を表す情報を保持する。そして、メモリコントローラ3は、その情報を基に、先後管理の対象となる論理ブロック(以下、対象論理ブロックと言う)を特定し、対象論理ブロックに割り当てられた物理ブロックだけを対象に先後管理を行い、先後管理の対象とならない論理ブロック(以下、対象外論理ブロックと言う)に割り当てられた物理ブロックは先後管理の対象としない。   When such a setting of the target of the prior management is performed, information regarding the setting is preferably stored in the flash memory 2 and read and held by the memory controller 3 at the time of activation. For example, the memory controller 3 stores information indicating the target LBA range or the non-target LBA range instructed from the host system 4 in a storage area (for example, a work memory 8 or a register in the microprocessor 6) included in the memory controller 3. Hold. Then, the memory controller 3 identifies a logical block (hereinafter referred to as a target logical block) that is subject to prior management based on the information, and performs prior management for only the physical block assigned to the target logical block. The physical block allocated to the logical block that is not subject to the prior management (hereinafter referred to as the non-target logical block) is not subject to the prior management.

つまり、対象論理ブロックに割り当てられた物理ブロックだけが最先ブロックテーブルに登録され、対象外論理ブロックに割り当てられた物理ブロックは最先ブロックテーブルに登録されない。従って、対象論理ブロックに割り当てられた物理ブロックだけが、最先ブロックテーブルを使用した検索により検出された物理ブロックから空きブロックへのデータ転送(以下、複写転送と言う)における転送元の物理ブロックになり、対象外論理ブロックに割り当てられた物理ブロックは、この複写転送における転送元の物理ブロックにならない。   That is, only the physical block assigned to the target logical block is registered in the earliest block table, and the physical block assigned to the non-target logical block is not registered in the earliest block table. Therefore, only the physical block assigned to the target logical block becomes the transfer source physical block in the data transfer from the physical block detected by the search using the earliest block table to the empty block (hereinafter referred to as copy transfer). Therefore, the physical block assigned to the non-target logical block does not become the transfer source physical block in this copy transfer.

従って、ホストシステム4は、対象外LBA範囲を指示することにより、物理ブロック間でのデータ転送の対象となることが好ましくないデータを、複写転送の対象外とすることができる。つまり、この対象外LBA範囲の指示により、物理ブロック間でのデータ転送の対象となることが好ましくないデータが記憶されている物理ブロックが、複写転送における転送元の物理ブロックにならないように設定される。   Therefore, the host system 4 can exclude data that is not preferably subject to data transfer between physical blocks by instructing a non-target LBA range. In other words, the physical block that stores data that is not preferably subject to data transfer between physical blocks is set so that it does not become the physical block that is the transfer source in copy transfer, according to the instruction of the non-target LBA range. The

ホストシステム4から対象LBA範囲が指示される場合、そのLBAの範囲に含まれる論理ブロックは先後管理の対象となるが、そのLBAの範囲に含まれない論理ブロックは先後管理の対象とならない。ホストシステム4から対象外LBA範囲が指示される場合、そのLBAの範囲に含まれる論理ブロックは先後管理の対象とならないが、そのLBAの範囲に含まれない論理ブロックは先後管理の対象となる。尚、一部が対象LBA範囲に含まれ、その他の部分が対象外LBA範囲に含まれる論理ブロックを先後管理の対象とするか否かは適宜設定することができる。つまり、対象LBA範囲と対象外LBA範囲の両方を含んだLBA範囲に対応する論理ブロックを先後管理の対象とするか否かは適宜設定することができる。例えば、論理ブロックに対応するLBA範囲のうち対象LBA範囲と対象外LBA範囲のどちらの比率が多いかに応じて、その論理ブロックが先後管理の対象とするか否かがメモリコントローラ3によって自動で決定されても良い。具体的には、例えば、対象LBA範囲が対象外LBA範囲よりも多い論理ブロックは、先後管理の対象とされ、対象外LBA範囲が対象LBA範囲よりも多い論理ブロックは、先後管理の対象とされない。   When the target LBA range is instructed from the host system 4, logical blocks included in the LBA range are subject to prior management, but logical blocks not included in the LBA range are not subject to prior management. When a non-target LBA range is instructed from the host system 4, logical blocks included in the LBA range are not subject to prior management, but logical blocks not included in the LBA range are subject to prior management. It should be noted that whether or not a logical block whose part is included in the target LBA range and the other part is included in the non-target LBA range is subject to the previous management can be appropriately set. In other words, whether or not the logical block corresponding to the LBA range including both the target LBA range and the non-target LBA range is to be subject to prior management can be set as appropriate. For example, depending on which ratio of the target LBA range and the non-target LBA range among the LBA ranges corresponding to the logical block is larger, the memory controller 3 automatically determines whether or not the logical block is the target of the previous management. May be. Specifically, for example, a logical block having a target LBA range larger than the non-target LBA range is a target of prior management, and a logical block having a non-target LBA range larger than the target LBA range is not a target of prior management. .

以上、本発明の実施の形態を説明したが、これは本発明の説明のための例示であって、本発明の範囲をこの実施の形態にのみ限定する趣旨ではない。本発明の要旨を逸脱しない範囲内において種々変更を加え得ることは勿論である。   Although the embodiment of the present invention has been described above, this is an example for explaining the present invention, and the scope of the present invention is not limited to this embodiment. Of course, various modifications can be made without departing from the scope of the present invention.

例えば、上述の実施の形態では、物理ブロック単位で物理ブロックの消去回数の管理、先後管理及び空きブロックテーブルの管理を行っていたが、論理ブロックに対して複数個の物理ブロックで構成された仮想ブロックを割り当てる場合には、これらの管理を仮想ブロック単位で行うようにしてもよい。つまり、それぞれの仮想ブロックを構成する物理ブロックが初期設定等により決められている場合には、同じ仮想ブロックに属する物理ブロックの消去回数は同じなる。また、論理ブロックへの割り当てとデータの消去が仮想ブロック単位で行われるため、先後管理及び空きブロックテーブルの管理も仮想ブロック単位で行うことができる。先後管理を仮想ブロック単位で行う場合には、仮想ブロック単位で上述の優先順位を管理(つまり、優先順位リンク番号を仮想ブロックに付けた通し番号で管理)すればよい。空きブロックテーブルの管理を仮想ブロック単位で行う場合には、テーブル上の各ビットに仮想ブロックを割り当てる(つまり、1つのビットに1個の仮想ブ
ロックを割り当てる)ようにすればよい。
For example, in the above-described embodiment, management of the number of physical block erasures, management of the previous block, and management of the empty block table are performed in units of physical blocks. However, a virtual block composed of a plurality of physical blocks for a logical block When assigning blocks, these managements may be performed in units of virtual blocks. That is, when the physical blocks constituting each virtual block are determined by the initial setting or the like, the number of erasures of the physical blocks belonging to the same virtual block is the same. Further, since allocation to logical blocks and erasure of data are performed in units of virtual blocks, post-management and free block table management can also be performed in units of virtual blocks. When the prior management is performed in units of virtual blocks, the above-described priorities may be managed in units of virtual blocks (that is, management is performed using a serial number assigned to the priority link number for the virtual block). When managing the free block table in units of virtual blocks, a virtual block may be assigned to each bit on the table (that is, one virtual block is assigned to one bit).

また、第3の空きブロックテーブルを使用した空きブロックの検索により空きブロックが検出されたときに、第1の最先ブロックテーブル及び第2の最先ブロックテーブルのいずれのテーブルにも登録されている物理ブロックが存在しない場合には、第3の最先ブロックテーブルを使用した検索(つまり、第3グループに属する物理ブロックのうちで最も先に論理ブロックに割り当てられた物理ブロックの検索)が行われるようにしてもよい。そして、第3の最先ブロックテーブルを使用した検索により検出された物理ブロックの消去回数が、第3の空きブロックテーブルを使用した空きブロックの検索により検出された空きブロックの消去回数よりも所定回数以上少ない場合には、第3の最先ブロックテーブルを使用した検索により検出された物理ブロックに格納されているデータが、第3の空きブロックテーブルを使用した空きブロックの検索により検出された空きブロックに転送されるようにしてもよい。このようにすることにより、第3グループに属する物理ブロック間で消去回数の差が大きくなることが抑制される。   In addition, when an empty block is detected by searching for an empty block using the third empty block table, it is registered in both the first earliest block table and the second earliest block table. When the physical block does not exist, a search using the third earliest block table (that is, the search of the physical block assigned to the logical block first among the physical blocks belonging to the third group) is performed. You may do it. Then, the number of erasures of the physical block detected by the search using the third earliest block table is a predetermined number of times than the number of erasures of the empty block detected by the search of the empty block using the third empty block table. If the number is less than the above, the data stored in the physical block detected by the search using the third earliest block table is the empty block detected by the search for the empty block using the third empty block table. You may make it forward to. By doing so, an increase in the difference in the number of erases between physical blocks belonging to the third group is suppressed.

尚、物理ブロックの消去回数の管理、先後管理及び空きブロックテーブルの管理の方法については、上述の方法以外の方法であってもよい。例えば、先後管理は、最も先に論理ブロックに割り当てられた物理ブロックを特定することができれば、上述の優先順位による管理を用いなくてよい。   Note that methods other than the above-described method may be used for the management of the number of physical block erases, the prior management, and the management of the free block table. For example, if the physical block assigned to the logical block first can be specified, the management based on the above-mentioned priority order does not have to be used for the prior management.

1…フラッシュメモリシステム、2…フラッシュメモリ、3…メモリコントローラ、6…マイクロプロセッサ DESCRIPTION OF SYMBOLS 1 ... Flash memory system, 2 ... Flash memory, 3 ... Memory controller, 6 ... Microprocessor

Claims (5)

ホストシステムから与えられるアクセス指示に基づいて、物理ブロック単位で消去が行われるフラッシュメモリに対するアクセスを制御するメモリコントローラであって、
フラッシュメモリを構成するそれぞれの物理ブロックの消去回数を管理する消去回数管理手段と、
前記アクセス指示として与えられる論理アドレスが割り当てられているセクタ単位の領域を複数個集めた複数セクタの領域を論理ブロックとして管理し、フラッシュメモリを構成する物理ブロックを前記論理ブロックに割り当てるブロック管理手段と、
有効なデータが格納されていない物理ブロックである空きブロックを検索するための空きブロックテーブルを、物理ブロックの消去回数について設けられた1又は複数の閾値を基に定義された物理ブロックのグループ毎に有し、それぞれの前記空きブロックテーブルを用いてそれぞれの前記グループに属する前記空きブロックを検索する空きブロック検索手段と、
前記論理ブロックに割り当てられている物理ブロックのうちで最も先に前記論理ブロックに割り当てられた物理ブロックである最先ブロックを検索するための最先ブロックテーブルを前記グループ毎に有し、それぞれの前記最先ブロックテーブルを用いてそれぞれの前記グループに属する前記最先ブロックを検索する最先ブロック検索手段と、
前記ホストシステムから指定された対象論理アドレス範囲又は対象外論理アドレス範囲を表す情報を保持する情報保持手段と、
複数の前記論理ブロックのうちの一部の前記論理ブロックであって前記対象論理アドレス範囲に属する前記論理ブロック又は前記対象外論理アドレス範囲に属さない前記論理ブロックに割り当てられた物理ブロックを前記最先ブロックテーブルに登録するテーブル登録手段と、
前記アクセス指示に基づいてアクセス対象の領域が属する前記論理ブロックを特定し、特定した前記論理ブロックに割り当てられている物理ブロックにホストシステムから与えられるデータを格納するデータ格納手段と、
前記最先ブロック検索手段により検出された前記最先ブロックに格納されているデータを前記空きブロック検索手段により検出された前記空きブロックに転送するデータ転送手段と
を備え、
前記アクセス指示に応答して前記ブロック管理手段により物理ブロックが前記論理ブロックに割り当てられるときに、前記空きブロック検索手段は消去回数の少ない物理ブロックが属する側の前記グループである下位側の前記グループに対応する前記空きブロックテーブルの方を優先的に用いて前記空きブロックの検索を行い、
前記空きブロック検索手段により検出された前記空きブロックが属する前記グループよりも下位側の前記グループに属する物理ブロックが前記最先ブロックテーブルに登録されていないときに、前記ブロック管理手段は前記空きブロック検索手段により検出された前記空きブロックを前記論理ブロックに割り当て、
前記空きブロック検索手段により検出された前記空きブロックが属する前記グループよりも下位側の前記グループに属する物理ブロックが前記最先ブロックテーブルに登録されているときに、前記最先ブロック検索手段は前記空きブロックが属する前記グループよりも下位側の前記グループに属する前記最先ブロックを検索し、前記データ転送手段は前記最先ブロック検索手段により検出された前記最先ブロックに格納されているデータを前記空きブロック検索手段により検出された前記空きブロックに転送し、前記ブロック管理手段は前記最先ブロック検索手段により検出された前記最先ブロックを前記論理ブロックに割り当てる、
メモリコントローラ。
A memory controller that controls access to a flash memory that is erased in units of physical blocks based on an access instruction given from a host system,
An erase count management means for managing the erase count of each physical block constituting the flash memory;
Block management means for managing a plurality of sector areas as a logical block by collecting a plurality of sector unit areas to which a logical address given as the access instruction is assigned, and allocating a physical block constituting a flash memory to the logical block; ,
A free block table for searching for a free block that is a physical block in which no valid data is stored is provided for each group of physical blocks defined on the basis of one or more thresholds provided for the number of physical block erasures. A free block search means for searching for the free block belonging to each group using the free block table;
Each group has an earliest block table for searching for the earliest block that is the earliest physical block assigned to the logical block among the physical blocks assigned to the logical block. Earliest block search means for searching for the earliest block belonging to each of the groups using an earliest block table;
Information holding means for holding information representing a target logical address range or a non-target logical address range specified by the host system;
A physical block allocated to the logical block that is a part of the plurality of logical blocks and that does not belong to the target logical address range or the target logical address range is the first block. Table registration means for registering in the block table;
Data storage means for specifying the logical block to which the area to be accessed belongs based on the access instruction, and storing data given from the host system in the physical block assigned to the specified logical block;
Data transfer means for transferring the data stored in the earliest block detected by the earliest block search means to the empty block detected by the empty block search means;
When a physical block is allocated to the logical block by the block management means in response to the access instruction, the free block search means assigns the group on the lower side, which is the group to which the physical block with a small number of erasures belongs. Search for the free block using the corresponding free block table preferentially,
When a physical block belonging to the group lower than the group to which the free block detected by the free block search means belongs is not registered in the earliest block table, the block management means performs the free block search. Assigning the free block detected by the means to the logical block;
When the physical block belonging to the group lower than the group to which the empty block detected by the empty block searching means belongs is registered in the earliest block table, the earliest block searching means The earliest block belonging to the group lower than the group to which the block belongs is searched, and the data transfer means stores the data stored in the earliest block detected by the earliest block search means as the empty block Transferring to the empty block detected by the block search means, the block management means assigns the earliest block detected by the earliest block search means to the logical block;
Memory controller.
ホストシステムから与えられるアクセス指示に基づいて、物理ブロック単位で消去が行われるフラッシュメモリに対するアクセスを制御するメモリコントローラであって、
フラッシュメモリを構成する物理ブロックを複数個集めた仮想ブロックを複数個形成する仮想ブロック形成手段と、
前記仮想ブロック単位で消去回数を管理する消去回数管理手段と、
前記アクセス指示として与えられる論理アドレスが割り当てられているセクタ単位の領域を複数個集めた複数セクタの領域を論理ブロックとして管理し、前記仮想ブロックを前記論理ブロックに割り当てるブロック管理手段と、
有効なデータが格納されていない前記仮想ブロックである空きブロックを検索するための空きブロックテーブルを、前記仮想ブロックの消去回数について設けられた1又は複数の閾値を基に定義された前記仮想ブロックのグループ毎に有し、それぞれの前記空きブロックテーブルを用いてそれぞれの前記グループに属する前記空きブロックを検索する空きブロック検索手段と、
前記論理ブロックに割り当てられている前記仮想ブロックのうちで最も先に前記論理ブロックに割り当てられた前記仮想ブロックである最先ブロックを検索するための最先ブロックテーブルを前記グループ毎に有し、それぞれの前記最先ブロックテーブルを用いてそれぞれの前記グループに属する前記最先ブロックを検索する最先ブロック検索手段と、
前記ホストシステムから指定された対象論理アドレス範囲又は対象外論理アドレス範囲を表す情報を保持する情報保持手段と、
複数の前記論理ブロックのうちの一部の前記論理ブロックであって前記対象論理アドレス範囲に属する前記論理ブロック又は前記対象外論理アドレス範囲に属さない前記論理ブロックに割り当てられた前記仮想ブロックを前記最先ブロックテーブルに登録するテーブル登録手段と、
前記アクセス指示に基づいてアクセス対象の領域が属する前記論理ブロックを特定し、特定した前記論理ブロックに割り当てられている前記仮想ブロックにホストシステムから与えられるデータを格納するデータ格納手段と、
前記最先ブロック検索手段により検出された前記最先ブロックに格納されているデータを前記空きブロック検索手段により検出された前記空きブロックに転送するデータ転送手段と
を備え、
前記アクセス指示に応答して前記ブロック管理手段により前記仮想ブロックが前記論理ブロックに割り当てられるときに、前記空きブロック検索手段は消去回数の少ない前記仮想ブロックが属する側の前記グループである下位側の前記グループに対応する前記空きブロックテーブルの方を優先的に用いて前記空きブロックの検索を行い、
前記空きブロック検索手段により検出された前記空きブロックが属する前記グループよりも下位側の前記グループに属する前記仮想ブロックが前記最先ブロックテーブルに登録されていないときに、前記ブロック管理手段は前記空きブロック検索手段により検出された前記空きブロックを前記論理ブロックに割り当て、
前記空きブロック検索手段により検出された前記空きブロックが属する前記グループよりも下位側の前記グループに属する前記仮想ブロックが前記最先ブロックテーブルに登録されているときに、前記最先ブロック検索手段は前記空きブロックが属する前記グループよりも下位側の前記グループに属する前記最先ブロックを検索し、前記データ転送手段は前記最先ブロック検索手段により検出された前記最先ブロックに格納されているデータを前記空きブロック検索手段により検出された前記空きブロックに転送し、前記ブロック管理手段は前記最先ブロック検索手段により検出された前記最先ブロックを前記論理ブロックに割り当てる、
メモリコントローラ。
A memory controller that controls access to a flash memory that is erased in units of physical blocks based on an access instruction given from a host system,
Virtual block forming means for forming a plurality of virtual blocks obtained by collecting a plurality of physical blocks constituting the flash memory;
Erasure count management means for managing the erasure count in units of virtual blocks;
A block management means for managing a plurality of sector areas as a logical block by collecting a plurality of sector unit areas to which a logical address given as the access instruction is assigned, and assigning the virtual block to the logical block;
An empty block table for searching for an empty block which is the virtual block in which no valid data is stored is stored in the virtual block defined based on one or more thresholds provided for the number of times of erasing the virtual block. A free block search means for searching for the free blocks belonging to each of the groups using each free block table;
Each group has an earliest block table for searching for the earliest block that is the virtual block assigned to the logical block first among the virtual blocks assigned to the logical block, The earliest block search means for searching for the earliest block belonging to each of the groups using the earliest block table of
Information holding means for holding information representing a target logical address range or a non-target logical address range specified by the host system;
The virtual block allocated to the logical block that is part of the plurality of logical blocks and belongs to the logical block that does not belong to the target logical address range or the non-target logical address range. Table registration means for registering in the destination block table;
Data storage means for specifying the logical block to which the area to be accessed belongs based on the access instruction, and storing data given from a host system in the virtual block assigned to the specified logical block;
Data transfer means for transferring the data stored in the earliest block detected by the earliest block search means to the empty block detected by the empty block search means;
When the virtual block is allocated to the logical block by the block management means in response to the access instruction, the empty block search means is the group on the lower side that is the group to which the virtual block to which the erasure count is small belongs. Search for the free block using the free block table corresponding to the group preferentially,
When the virtual block belonging to the group lower than the group to which the free block detected by the free block searching means belongs is not registered in the earliest block table, the block management means Assigning the free block detected by the search means to the logical block;
When the virtual block belonging to the group lower than the group to which the empty block detected by the empty block searching means belongs is registered in the earliest block table, the earliest block searching means The earliest block belonging to the group lower than the group to which the empty block belongs is searched, and the data transfer means stores the data stored in the earliest block detected by the earliest block search means. Transferring to the empty block detected by the empty block search means, the block management means assigns the earliest block detected by the earliest block search means to the logical block;
Memory controller.
請求項1又は2記載のメモリコントローラと、このメモリコントローラにより制御される複数個のフラッシュメモリを備えるフラッシュメモリシステム。 Flash memory system comprising a memory controller according to claim 1 or 2, wherein a plurality of flash memory controlled by the memory controller. ホストシステムから与えられるアクセス指示に基づいて、物理ブロック単位で消去が行われるフラッシュメモリに対するアクセスを制御するフラッシュメモリの制御方法であって、
フラッシュメモリを構成するそれぞれの物理ブロックの消去回数を管理する消去回数管理ステップと、
前記アクセス指示として与えられる論理アドレスが割り当てられているセクタ単位の領域を複数個集めた複数セクタの領域を論理ブロックとして管理し、フラッシュメモリを構成する物理ブロックを前記論理ブロックに割り当てるブロック管理ステップと、
有効なデータが格納されていない物理ブロックである空きブロックを検索するための空きブロックテーブルを、物理ブロックの消去回数について設けられた1又は複数の閾値を基に定義された物理ブロックのグループ毎に有し、それぞれの前記空きブロックテーブルを用いてそれぞれの前記グループに属する前記空きブロックを検索する空きブロック検索ステップと、
前記論理ブロックに割り当てられている物理ブロックのうちで最も先に前記論理ブロックに割り当てられた物理ブロックである最先ブロックを検索するための最先ブロックテーブルを前記グループ毎に有し、それぞれの前記最先ブロックテーブルを用いてそれぞれの前記グループに属する前記最先ブロックを検索する最先ブロック検索ステップと、
前記ホストシステムから指定された対象論理アドレス範囲又は対象外論理アドレス範囲を表す情報を保持する情報保持ステップと、
複数の前記論理ブロックのうちの一部の前記論理ブロックであって前記対象論理アドレス範囲に属する前記論理ブロック又は前記対象外論理アドレス範囲に属さない前記論理ブロックに割り当てられた物理ブロックを前記最先ブロックテーブルに登録するテーブル登録ステップと、
前記アクセス指示に基づいてアクセス対象の領域が属する前記論理ブロックを特定し、特定した前記論理ブロックに割り当てられている物理ブロックにホストシステムから与えられるデータを格納するデータ格納ステップと、
前記最先ブロック検索ステップにより検出された前記最先ブロックに格納されているデータを前記空きブロック検索ステップにより検出された前記空きブロックに転送するデータ転送ステップと
を備え、
前記アクセス指示に応答して前記ブロック管理ステップにより物理ブロックが前記論理ブロックに割り当てられるときに、前記空きブロック検索ステップでは消去回数の少ない物理ブロックが属する側の前記グループである下位側の前記グループに対応する前記空きブロックテーブルの方が優先的に用いられる前記空きブロックの検索が行われ、
前記空きブロック検索ステップにより検出された前記空きブロックが属する前記グループよりも下位側の前記グループに属する物理ブロックが前記最先ブロックテーブルに登録されていないときに、前記ブロック管理ステップでは前記空きブロック検索ステップにより検出された前記空きブロックが前記論理ブロックに割り当てられ、
前記空きブロック検索ステップにより検出された前記空きブロックが属する前記グループよりも下位側の前記グループに属する物理ブロックが前記最先ブロックテーブルに登録されているときに、前記最先ブロック検索ステップでは前記空きブロックが属する前記グループよりも下位側の前記グループに属する前記最先ブロックが検索され、前記データ転送ステップでは前記最先ブロック検索ステップにより検出された前記最先ブロックに格納されているデータが前記空きブロック検索ステップにより検出された前記空きブロックに転送され、前記ブロック管理ステップでは前記最先ブロック検索ステップにより検出された前記最先ブロックが前記論理ブロックに割り当てられる
フラッシュメモリの制御方法。
A flash memory control method for controlling access to a flash memory that is erased in units of physical blocks based on an access instruction given from a host system,
An erase count management step for managing the erase count of each physical block constituting the flash memory;
A block management step of managing a plurality of sector areas obtained by collecting a plurality of sector unit areas to which a logical address given as an access instruction is assigned as a logical block, and allocating a physical block constituting a flash memory to the logical block; ,
A free block table for searching for a free block that is a physical block in which no valid data is stored is provided for each group of physical blocks defined on the basis of one or more thresholds provided for the number of physical block erasures. A free block search step of searching for the free block belonging to each of the groups using each of the free block tables;
Each group has an earliest block table for searching for the earliest block that is the earliest physical block assigned to the logical block among the physical blocks assigned to the logical block. An earliest block search step of searching for the earliest block belonging to each of the groups using an earliest block table;
An information holding step for holding information representing a target logical address range or a non-target logical address range specified by the host system;
A physical block allocated to the logical block that is a part of the plurality of logical blocks and that does not belong to the target logical address range or the target logical address range is the first block. A table registration step to register in the block table;
A data storage step of identifying the logical block to which the area to be accessed belongs based on the access instruction, and storing data provided from a host system in a physical block allocated to the identified logical block;
A data transfer step of transferring data stored in the earliest block detected in the earliest block search step to the empty block detected in the empty block search step;
When a physical block is allocated to the logical block by the block management step in response to the access instruction, the free block search step adds the low-order group to the group to which the physical block with a small number of erases belongs. A search for the free block that is preferentially used in the corresponding free block table is performed,
When a physical block belonging to the group lower than the group to which the free block detected by the free block search step belongs is not registered in the earliest block table, the free block search is performed in the block management step. The free block detected by the step is assigned to the logical block;
When a physical block belonging to the group lower than the group to which the empty block detected by the empty block searching step belongs is registered in the earliest block table, the earliest block searching step includes the empty block. The earliest block belonging to the group lower than the group to which the block belongs is searched, and in the data transfer step, the data stored in the earliest block detected by the earliest block search step is free. Transferred to the empty block detected by the block search step, and in the block management step, the earliest block detected by the earliest block search step is assigned to the logical block .
Flash memory control method.
ホストシステムから与えられるアクセス指示に基づいて、物理ブロック単位で消去が行われるフラッシュメモリに対するアクセスを制御するフラッシュメモリの制御方法であって、
フラッシュメモリを構成する物理ブロックを複数個集めた仮想ブロックを複数個形成する仮想ブロック形成ステップと
前記仮想ブロック単位で消去回数を管理する消去回数管理ステップと、
前記アクセス指示として与えられる論理アドレスが割り当てられているセクタ単位の領域を複数個集めた複数セクタの領域を論理ブロックとして管理し、前記仮想ブロックを前記論理ブロックに割り当てるブロック管理ステップと、
有効なデータが格納されていない前記仮想ブロックである空きブロックを検索するための空きブロックテーブルを、前記仮想ブロックの消去回数について設けられた1又は複数の閾値を基に定義された前記仮想ブロックのグループ毎に有し、それぞれの前記空きブロックテーブルを用いてそれぞれの前記グループに属する前記空きブロックを検索する空きブロック検索ステップと、
前記論理ブロックに割り当てられている前記仮想ブロックのうちで最も先に前記論理ブロックに割り当てられた前記仮想ブロックである最先ブロックを検索するための最先ブロックテーブルを前記グループ毎に有し、それぞれの前記最先ブロックテーブルを用いてそれぞれの前記グループに属する前記最先ブロックを検索する最先ブロック検索ステップと、
前記ホストシステムから指定された対象論理アドレス範囲又は対象外論理アドレス範囲を表す情報を保持する情報保持ステップと、
複数の前記論理ブロックのうちの一部の前記論理ブロックであって前記対象論理アドレス範囲に属する前記論理ブロック又は前記対象外論理アドレス範囲に属さない前記論理ブロックに割り当てられた前記仮想ブロックを前記最先ブロックテーブルに登録するテーブル登録ステップと、
前記アクセス指示に基づいてアクセス対象の領域が属する前記論理ブロックを特定し、特定した前記論理ブロックに割り当てられている前記仮想ブロックにホストシステムから与えられるデータを格納するデータ格納ステップと、
前記最先ブロック検索ステップにより検出された前記最先ブロックに格納されているデータを前記空きブロック検索ステップにより検出された前記空きブロックに転送するデータ転送ステップと
を備え、
前記アクセス指示に応答して前記ブロック管理ステップにより前記仮想ブロックが前記論理ブロックに割り当てられるときに、前記空きブロック検索ステップでは消去回数の少ない前記仮想ブロックが属する側の前記グループである下位側の前記グループに対応する前記空きブロックテーブルの方が優先的に用いられる前記空きブロックの検索が行われ、
前記空きブロック検索ステップにより検出された前記空きブロックが属する前記グループよりも下位側の前記グループに属する前記仮想ブロックが前記最先ブロックテーブルに登録されていないときに、前記ブロック管理ステップでは前記空きブロック検索ステップにより検出された前記空きブロックが前記論理ブロックに割り当てられ、
前記空きブロック検索ステップにより検出された前記空きブロックが属する前記グループよりも下位側の前記グループに属する前記仮想ブロックが前記最先ブロックテーブルに登録されているときに、前記最先ブロック検索ステップでは前記空きブロックが属する前記グループよりも下位側の前記グループに属する前記最先ブロックが検索され、前記データ転送ステップでは前記最先ブロック検索ステップにより検出された前記最先ブロックに格納されているデータが前記空きブロック検索ステップにより検出された前記空きブロックに転送され、前記ブロック管理ステップでは前記最先ブロック検索ステップにより検出された前記最先ブロックが前記論理ブロックに割り当てられる
フラッシュメモリの制御方法。
A flash memory control method for controlling access to a flash memory that is erased in units of physical blocks based on an access instruction given from a host system,
A virtual block forming step of forming a plurality of virtual blocks obtained by collecting a plurality of physical blocks constituting a flash memory; and an erasure count management step of managing the erase count in units of the virtual blocks;
A block management step of managing a plurality of sector areas obtained by collecting a plurality of sector unit areas to which a logical address given as the access instruction is assigned as a logical block, and assigning the virtual block to the logical block;
An empty block table for searching for an empty block which is the virtual block in which no valid data is stored is stored in the virtual block defined based on one or more thresholds provided for the number of times of erasing the virtual block. A free block search step for searching for the free block belonging to each group using each free block table, which is provided for each group;
Each group has an earliest block table for searching for the earliest block that is the virtual block assigned to the logical block first among the virtual blocks assigned to the logical block, The earliest block search step of searching for the earliest block belonging to each of the groups using the earliest block table of
An information holding step for holding information representing a target logical address range or a non-target logical address range specified by the host system;
The virtual block allocated to the logical block that is part of the plurality of logical blocks and belongs to the logical block that does not belong to the target logical address range or the non-target logical address range. A table registration step to register in the destination block table;
A data storage step of identifying the logical block to which the area to be accessed belongs based on the access instruction, and storing data given from a host system in the virtual block allocated to the identified logical block;
A data transfer step of transferring data stored in the earliest block detected in the earliest block search step to the empty block detected in the empty block search step;
When the virtual block is allocated to the logical block by the block management step in response to the access instruction, the lower block that is the group to which the virtual block to which the erasure count is small belongs in the empty block search step belongs to The search for the free block that is preferentially used in the free block table corresponding to the group is performed,
When the virtual block belonging to the group lower than the group to which the free block detected by the free block searching step belongs is not registered in the earliest block table, the free block is used in the block management step. The free block detected by the search step is assigned to the logical block;
When the virtual block belonging to the group lower than the group to which the empty block detected by the empty block searching step belongs is registered in the earliest block table, in the earliest block searching step, The earliest block belonging to the group lower than the group to which the empty block belongs is searched, and the data stored in the earliest block detected by the earliest block search step is the data transfer step. Transferred to the empty block detected in the empty block search step, and in the block management step, the earliest block detected in the earliest block search step is assigned to the logical block ;
Flash memory control method.
JP2009098863A 2009-04-15 2009-04-15 MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD Active JP4952741B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009098863A JP4952741B2 (en) 2009-04-15 2009-04-15 MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009098863A JP4952741B2 (en) 2009-04-15 2009-04-15 MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD

Publications (2)

Publication Number Publication Date
JP2010250533A JP2010250533A (en) 2010-11-04
JP4952741B2 true JP4952741B2 (en) 2012-06-13

Family

ID=43312790

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009098863A Active JP4952741B2 (en) 2009-04-15 2009-04-15 MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD

Country Status (1)

Country Link
JP (1) JP4952741B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6028670B2 (en) * 2013-04-22 2016-11-16 株式会社デンソー Data storage
JP6248921B2 (en) * 2014-12-22 2017-12-20 ソニー株式会社 Memory controller, storage device, and information processing system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3507132B2 (en) * 1994-06-29 2004-03-15 株式会社日立製作所 Storage device using flash memory and storage control method thereof
JP4316824B2 (en) * 2001-05-31 2009-08-19 Tdk株式会社 MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
US6985992B1 (en) * 2002-10-28 2006-01-10 Sandisk Corporation Wear-leveling in non-volatile storage systems
JP2007164318A (en) * 2005-12-12 2007-06-28 Renesas Technology Corp Storage system
JP2008146254A (en) * 2006-12-07 2008-06-26 Sony Corp Storage device, computer system and data processing method for storage device
JP4666080B2 (en) * 2009-02-09 2011-04-06 Tdk株式会社 MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD

Also Published As

Publication number Publication date
JP2010250533A (en) 2010-11-04

Similar Documents

Publication Publication Date Title
JP4666080B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4844639B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4666081B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
US8214579B2 (en) Memory controller, flash memory system with memory controller, and method of controlling flash memory
US8219742B2 (en) Memory controller, flash memory system with memory controller, and method of controlling flash memory
JP5093294B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP2009245163A (en) Memory controller, flash memory system having memory controller and control method for flash memory
JP4952740B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4488048B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4821845B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP5858081B2 (en) Memory controller, memory system, and memory control method
JP4366420B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4952741B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP2012068765A (en) Memory controller, flash memory system with memory controller, and control method of flash memory
JP4952742B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
US8200890B2 (en) Memory controller, flash memory system with memory controller, and method of controlling flash memory
JP4720891B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP2012068764A (en) Memory controller, nonvolatile memory system with memory controller, and control method of nonvolatile memory
JP4821844B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4569554B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP2010092200A (en) Memory controller, flash memory system equipped with memory controller and method of controlling flash memory

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111128

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A132

Effective date: 20111206

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120126

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

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

R150 Certificate of patent or registration of utility model

Ref document number: 4952741

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20150323

Year of fee payment: 3