JP2010026878A - Memory controller, flash memory system equipped with memory controller, and control method of flash memory - Google Patents

Memory controller, flash memory system equipped with memory controller, and control method of flash memory Download PDF

Info

Publication number
JP2010026878A
JP2010026878A JP2008189052A JP2008189052A JP2010026878A JP 2010026878 A JP2010026878 A JP 2010026878A JP 2008189052 A JP2008189052 A JP 2008189052A JP 2008189052 A JP2008189052 A JP 2008189052A JP 2010026878 A JP2010026878 A JP 2010026878A
Authority
JP
Japan
Prior art keywords
block
logical
physical
data
flash memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2008189052A
Other languages
Japanese (ja)
Other versions
JP4840415B2 (en
Inventor
Katsuo Sarashina
克雄 晒科
Norikazu Okako
典和 岡固
Shun Furukawa
俊 古川
Takeshi Kamono
武志 鴨野
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 JP2008189052A priority Critical patent/JP4840415B2/en
Publication of JP2010026878A publication Critical patent/JP2010026878A/en
Application granted granted Critical
Publication of JP4840415B2 publication Critical patent/JP4840415B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To improve reliability of file management data included in user data provided from a host system side, in a flash memory system storing system data in a flash memory. <P>SOLUTION: The flash memory system stores the system data in a physical block (system block) reserved in advance. When a memory controller in the flash memory system cannot detect an empty block allocated to any logical block, whether the logical block corresponds to a predetermined logical block is determined. Only when determining that the logical block corresponds to the predetermined logical block, the memory controller allocates a system block storing no valid system data, to the logical block. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

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

フラッシュメモリを記憶媒体として用いた記憶装置では、特許文献1に記載されているように、ホストシステムから与えられるユーザーデータの他に、アドレス変換テーブルのような、記憶データを管理するための管理情報が、フラッシュメモリに書き込まれる。従って、このような管理情報を保存するための領域が、フラッシュメモリ内に確保される。   In a storage device using a flash memory as a storage medium, as described in Patent Document 1, in addition to user data provided from a host system, management information for managing storage data such as an address conversion table Are written into the flash memory. Therefore, an area for storing such management information is secured in the flash memory.

特開2001−142774号公報JP 2001-142774 A

フラッシュメモリを記憶媒体として用いたフラッシュメモリシステムでは、管理情報の保存先の領域を、フラッシュメモリ内に適宜設定することができる。従って、管理情報の保存先の物理ブロックを固定せずに、任意の物理ブロックを管理情報の保存先として使用したり、ユーザーデータの保存先として使用したりするようにしてもよい。しかしながら、このように管理情報の保存先の物理ブロックを固定しなかった場合、管理情報の保存先の管理が煩雑になる。   In a flash memory system using a flash memory as a storage medium, an area for storing management information can be appropriately set in the flash memory. Therefore, an arbitrary physical block may be used as a management information storage destination or a user data storage destination without fixing the management information storage destination physical block. However, if the physical block of the management information storage destination is not fixed in this way, management of the management information storage destination becomes complicated.

従って、フラッシュメモリシステムでは、管理情報の保存先として使用する物理ブロックを予約しておき、その物理ブロックに管理情報が保存される場合が多い。又、フラッシュメモリに対するアクセスを制御するためのファームウェアを、そのフラッシュメモリ内に保存するような場合も、その保存先の物理ブロックを予約しておくことが好ましい。   Therefore, in a flash memory system, a physical block to be used as a storage destination for management information is reserved and management information is often stored in the physical block. Also, in the case where firmware for controlling access to the flash memory is stored in the flash memory, it is preferable to reserve the physical block of the storage destination.

管理情報やファームウェア等のシステムデータの保存先として使用する物理ブロックの予約は、フォーマット(初期化)の際に行われる。予約された物理ブロックには、システムデータだけが保存されるため、予約された物理ブロックがシステムデータの保存先として使用されていない場合(予約された物理ブロックに有効なシステムデータが保存されていない場合)であっても、ユーザーデータの保存先として使用されない。従って、このようなフラッシュメモリシステムでは、ユーザーデータの保存先の物理ブロックを確保することができないような場合であっても、システムデータの保存先として予約された物理ブロックにユーザーデータを保存しない。   Reservation of a physical block used as a storage location for system data such as management information and firmware is performed at the time of formatting (initialization). Since only the system data is stored in the reserved physical block, if the reserved physical block is not used as the storage destination of the system data (valid system data is not stored in the reserved physical block) ), It is not used as a storage location for user data. Therefore, in such a flash memory system, even when it is not possible to secure a physical block as a storage destination of user data, user data is not stored in a physical block reserved as a storage destination of system data.

フラッシュメモリシステムでは、ホストシステムから与えられる論理アドレスに基づいてユーザーデータの書き込み又は読み出しが行われる。フラッシュメモリシステムは、このユーザーデータの書き込み又は読み出しを制御するときにシステムデータを使用する。例えば、ユーザーデータに関連付けられている論理アドレスと、そのユーザーデータが保存されているフラッシュメモリ内の物理アドレスとの対応関係は、システムデータによって管理されている。   In a flash memory system, user data is written or read based on a logical address given from a host system. The flash memory system uses system data when controlling writing or reading of the user data. For example, the correspondence between a logical address associated with user data and a physical address in a flash memory in which the user data is stored is managed by system data.

ホストシステムから与えられるユーザーデータには、ファイルデータとそのファイルデータを管理するための情報(以下、「ファイル管理データ」と言う)が含まれている。従って、フラッシュメモリシステムには、ファイルデータだけでなく、ファイル管理データも保存される。ファイルデータは、通常、FAT(File Allocation Table)ファイルシステム・NTファイルシステム等のファイルシステムで管理されているので、例えば、FATファイルシステムの場合には、ルートディレクトリを含む情報や、ファイルが使用するクラスタの番号等がファイル管理データとして保存され、NTファイルシステムの場合には、ファイル名やインデックス等がファイル管理データとして保存される。   The user data provided from the host system includes file data and information for managing the file data (hereinafter referred to as “file management data”). Accordingly, not only file data but also file management data is stored in the flash memory system. Since the file data is normally managed by a file system such as a FAT (File Allocation Table) file system or NT file system, for example, in the case of a FAT file system, information including a root directory and a file are used. A cluster number or the like is stored as file management data. In the case of the NT file system, a file name, an index, or the like is stored as file management data.

このように、システムデータは、ファイルデータ及びファイル管理データを含むユーザーデータをフラッシュメモリに書き込んだり、フラッシュメモリから読み出したりするときにフラッシュメモリシステム内で使用される。一方、ユーザーデータに含まれるファイル管理データは、ユーザーデータに含まれるファイルデータを管理するためにホストシステム側で使用される。   As described above, the system data is used in the flash memory system when user data including file data and file management data is written to the flash memory or read from the flash memory. On the other hand, the file management data included in the user data is used on the host system side in order to manage the file data included in the user data.

従って、システムデータが破損又は消失した場合には、ホストシステム側からファイルデータ及びファイル管理データを含むユーザーデータを読み出すことができなくなってしまうことがある。また、システムデータが正常に保存されていても、ファイル管理データが破損又は消失した場合には、ホストシステム側でのファイルデータの管理に支障が生じる。これらを考慮すれ、フラッシュメモリシステム内では、システムデータと同様にファイル管理データの信頼性を向上させる必要がある。   Therefore, when system data is damaged or lost, user data including file data and file management data cannot be read from the host system side. Even if the system data is stored normally, if the file management data is damaged or lost, the management of the file data on the host system side will be hindered. Considering these, it is necessary to improve the reliability of the file management data in the flash memory system as well as the system data.

そこで、本発明は、システムデータをフラッシュメモリ内に保存するフラッシュメモリシステムにおいて、ホストシステム側から与えられるユーザーデータに含まれるファイル管理データの信頼性を向上させることのできるフラッシュメモリシステムを提供することを目的とする。   Therefore, the present invention provides a flash memory system that can improve the reliability of file management data included in user data given from the host system side in a flash memory system that stores system data in the flash memory. With the goal.

本発明の第一の観点に従うメモリコントローラは、ホストシステムから与えられるアクセス指示に従って、物理ブロック単位で消去が行われるフラッシュメモリに対するアクセスを制御するメモリコントローラであって、
前記フラッシュメモリ内の物理ブロックを、前記フラッシュメモリに対するアクセスを制御又は管理するためのシステムデータの保存先として使用するシステムブロックとして予約する予約手段と、
前記予約手段により予約された前記システムブロックに対して前記システムデータを書き込むシステムデータ書き込み手段と、
前記システムブロックとして予約されていない前記フラッシュメモリ内の物理ブロックであって、有効なデータが記憶されていない空きブロックを検索する空きブロック検索手段と、
前記アクセス指示により指定される論理アドレスが割り当てられているセクタ単位の領域が複数個含まれる論理ブロックに対して、前記空きブロック検索手段により検出された前記空きブロックを割り当てる物理ブロック割り当て手段と、
前記アクセス指示により指定される前記論理アドレスが属する前記論理ブロックと対応する物理ブロックに、前記アクセス指示と共に与えられるデータを書き込むデータ書き込み手段と、
前記アクセス指示により指定される前記論理アドレスが属する前記論理ブロックが、所定の前記論理ブロックに該当するか否かを判断する判断手段と、
を備え、
前記物理ブロック割り当て手段は、いずれかの前記論理ブロックに対して前記空きブロックを割り当てるときに、前記空きブロック検索手段が前記空きブロックを検出することができなかった場合、前記判断手段が前記いずれかの前記論理ブロックが前記所定の前記論理ブロックに該当すると判断したときにだけ、前記いずれかの前記論理ブロックに対して、有効な前記システムデータが記憶されていない前記システムブロックを割り当てる。
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 physical block units in accordance with an access instruction given from a host system,
Reserving means for reserving a physical block in the flash memory as a system block used as a storage destination of system data for controlling or managing access to the flash memory;
System data writing means for writing the system data to the system block reserved by the reservation means;
A free block search means for searching for a free block in the flash memory that is not reserved as the system block and in which valid data is not stored;
Physical block allocation means for allocating the free block detected by the free block search means to a logical block including a plurality of sector unit areas to which the logical address specified by the access instruction is assigned;
Data writing means for writing data given together with the access instruction to a physical block corresponding to the logical block to which the logical address specified by the access instruction belongs;
Determining means for determining whether the logical block to which the logical address specified by the access instruction belongs corresponds to the predetermined logical block;
With
When the physical block allocating unit allocates the vacant block to any of the logical blocks, and the vacant block searching unit cannot detect the vacant block, the determination unit is Only when it is determined that the logical block corresponds to the predetermined logical block, the system block in which valid system data is not stored is assigned to any of the logical blocks.

好適な実施形態では、前記ホストシステムから与えられる設定情報に基づいて前記所定の前記論理ブロックを設定する第1の設定手段が備えられる。前記設定情報には、前記論理アドレスの範囲を指定する情報が含まれる。前記第1の設定手段は、前記設定情報に含まれる前記論理アドレスの範囲が属する前記論理ブロックを前記所定の前記論理ブロックとして設定する。   In a preferred embodiment, there is provided a first setting means for setting the predetermined logical block based on setting information given from the host system. The setting information includes information specifying the range of the logical address. The first setting means sets the logical block to which the range of the logical address included in the setting information belongs as the predetermined logical block.

好適な実施形態では、第2の設定手段が備えられる。前記第2の設定手段は、それぞれの前記論理ブロック内の領域に対する、所定セクタ数より少ない容量の領域を指定したデータの書き込みが、前記アクセス指示により指示される回数に基づいて、前記所定の前記論理ブロックを設定する。前記第2の設定手段は、前記回数が所定回数以上の前記論理ブロックを前記所定の前記論理ブロックとして設定する。   In a preferred embodiment, a second setting means is provided. The second setting means, based on the number of times specified by the access instruction, to write data specifying an area having a capacity smaller than a predetermined number of sectors in each logical block. Set a logical block. The second setting means sets the logical block having the predetermined number of times or more as the predetermined logical block.

好適な実施形態では、前記フラッシュメモリが複数個ある。前記アクセス指示で指定されるアドレスが割り当てられているセクタ単位の領域が複数個含まれる論理ブロックと、異なる前記フラッシュメモリに含まれるアドレスが同一の物理ブロックを複数個集めた物理ブロック群との対応関係を管理するブロック管理手段が更に備えられる。前記データ書き込み手段が、前記アクセス指示により指定される前記論理アドレスが属する前記論理ブロックと対応する前記物理ブロック群に、前記アクセス指示と共に与えられるデータを書き込む。前記予約手段は、不良ブロックが含まれる前記物理ブロック群内の良品ブロックを、不良ブロックが含まれていない前記物理ブロック群内の物理ブロックよりも優先的に前記システムブロックとして予約する。   In a preferred embodiment, there are a plurality of the flash memories. Correspondence between a logical block including a plurality of sector unit areas to which an address specified by the access instruction is allocated and a physical block group including a plurality of physical blocks having the same address included in different flash memories Block management means for managing the relationship is further provided. The data writing means writes data given together with the access instruction to the physical block group corresponding to the logical block to which the logical address designated by the access instruction belongs. The reservation means reserves a non-defective block in the physical block group including a defective block as the system block preferentially over a physical block in the physical block group not including a defective block.

本発明の第二の観点に従うフラッシュメモリシステムは、前述した第一の観点及び複数の実施形態のうちのいずれかのメモリコントローラと、前記メモリコントローラによってアクセス制御されるフラッシュメモリとを備える。   A flash memory system according to a second aspect of the present invention includes the memory controller of any one of the first aspect and the plurality of embodiments described above, and a flash memory that is access-controlled by the memory controller.

本発明の第三の観点に従う方法は、ホストシステムから与えられるアクセス指示に従って、物理ブロック単位で消去が行われるフラッシュメモリに対するアクセスを制御するフラッシュメモリの制御方法であって、
前記フラッシュメモリ内の物理ブロックを、前記フラッシュメモリに対するアクセスを制御又は管理するためのシステムデータの保存先として使用するシステムブロックとして予約する予約ステップと、
前記予約ステップにより予約された前記システムブロックに対して前記システムデータを書き込むシステムデータ書き込みステップと、
前記システムブロックとして予約されていない前記フラッシュメモリ内の物理ブロックであって、有効なデータが記憶されていない空きブロックを検索する空きブロック検索ステップと、
前記アクセス指示により指定される論理アドレスが割り当てられているセクタ単位の領域が複数個含まれる論理ブロックに対して、前記空きブロック検索ステップにより検出された前記空きブロックを割り当てる物理ブロック割り当てステップと、
前記アクセス指示により指定される前記論理アドレスが属する前記論理ブロックと対応する物理ブロックに、前記アクセス指示と共に与えられるデータを書き込むデータ書き込みステップと、
前記アクセス指示により指定される前記論理アドレスが属する前記論理ブロックが、所定の前記論理ブロックに該当するか否かを判断する判断ステップと、
を備える。前記物理ブロック割り当てステップでは、いずれかの前記論理ブロックに対して前記空きブロックを割り当てるときに、前記空きブロック検索ステップにより前記空きブロックを検出することができなかった場合、前記判断ステップにより前記いずれかの前記論理ブロックが前記所定の前記論理ブロックに該当すると判断されたときにだけ、前記いずれかの前記論理ブロックに対して、有効な前記システムデータが記憶されていない前記システムブロックが割り当てられる。
A method according to a third aspect of the present invention is a flash memory control method for controlling access to a flash memory to be erased in physical block units in accordance with an access instruction given from a host system,
A reservation step of reserving a physical block in the flash memory as a system block used as a storage destination of system data for controlling or managing access to the flash memory;
A system data writing step of writing the system data to the system block reserved by the reservation step;
A free block search step for searching for a free block in the flash memory that is not reserved as the system block and in which valid data is not stored;
A physical block allocation step for allocating the empty block detected by the empty block search step to a logical block including a plurality of sector unit areas to which a logical address specified by the access instruction is allocated;
A data writing step of writing data given together with the access instruction to a physical block corresponding to the logical block to which the logical address specified by the access instruction belongs;
A determination step of determining whether the logical block to which the logical address specified by the access instruction belongs corresponds to the predetermined logical block;
Is provided. In the physical block allocating step, when the vacant block cannot be detected by the vacant block search step when allocating the vacant block to any of the logical blocks, the determination step determines any of the above Only when it is determined that the logical block corresponds to the predetermined logical block, the system block in which valid system data is not stored is assigned to any of the logical blocks.

好適な実施形態では、前記ホストシステムから与えられる設定情報に基づいて前記所定の前記論理ブロックを設定する第1の設定ステップが備えられる。前記設定情報には、前記論理アドレスの範囲を指定する情報が含まれる。   In a preferred embodiment, a first setting step of setting the predetermined logical block based on setting information given from the host system is provided. The setting information includes information specifying the range of the logical address.

前記第1の設定ステップでは、前記設定情報に含まれる前記論理アドレスの範囲が属する前記論理ブロックが前記所定の前記論理ブロックとして設定される。   In the first setting step, the logical block to which the range of the logical address included in the setting information belongs is set as the predetermined logical block.

好適な実施形態では、第2の設定ステップが備えられる。前記第2の設定ステップでは、それぞれの前記論理ブロック内の領域に対する、所定セクタ数より少ない容量の領域を指定したデータの書き込みが、前記アクセス指示により指示される回数に基づいて、前記所定の前記論理ブロックが設定される。前記第2の設定ステップでは、前記回数が所定回数以上の前記論理ブロックが前記所定の前記論理ブロックとして設定される。   In a preferred embodiment, a second setting step is provided. In the second setting step, based on the number of times instructed by the access instruction, the data write specifying the area having a capacity smaller than the predetermined number of sectors to the area in each of the logical blocks is performed. A logical block is set. In the second setting step, the logical block having the predetermined number of times or more is set as the predetermined logical block.

好適な実施形態では、前記フラッシュメモリが複数個ある。前記アクセス指示で指定されるアドレスが割り当てられているセクタ単位の領域が複数個含まれる論理ブロックと、異なる前記フラッシュメモリに含まれるアドレスが同一の物理ブロックを複数個集めた物理ブロック群との対応関係を管理するブロック管理ステップが更に備えられる。前記データ書き込み手段では、前記アクセス指示により指定される前記論理アドレスが属する前記論理ブロックと対応する前記物理ブロック群に、前記アクセス指示と共に与えられるデータが書き込まれる。前記予約ステップでは、不良ブロックが含まれる前記物理ブロック群内の良品ブロックが、不良ブロックが含まれていない前記物理ブロック群内の物理ブロックよりも優先的に前記システムブロックとして予約される。   In a preferred embodiment, there are a plurality of the flash memories. Correspondence between a logical block including a plurality of sector unit areas to which an address specified by the access instruction is allocated and a physical block group including a plurality of physical blocks having the same address included in different flash memories A block management step for managing the relationship is further provided. In the data writing means, data given together with the access instruction is written into the physical block group corresponding to the logical block to which the logical address designated by the access instruction belongs. In the reservation step, a non-defective block in the physical block group including a defective block is reserved as the system block preferentially over a physical block in the physical block group including no defective block.

本発明によれば、システムデータをフラッシュメモリ内に保存するフラッシュメモリシステムにおいて、ファイル管理データを保存するための空きブロックを確保することができないときに、ファイル管理データの保存先として、システムデータを保存するために予約されている物理ブロックを代用できる。このため、フラッシュメモリシステムに保存されるファイル管理データの信頼性を向上させることができる。更に、ホストシステムから与えられるアクセス指示に従って書き込まれるユーザーデータの容量(書き込み先の領域の容量)、つまり、書き込みを指示するアクセス指示により指定されるデータのセクタ数(書き込み先の領域のセクタ数)に基づいて、ファイル管理データが割り当てられている論理アドレスの範囲(論理ブロック)を特定するようにすれば、ファイル管理データが割り当てられている論理アドレスを予め設定しなくても本発明を適用することができる。   According to the present invention, in a flash memory system that stores system data in a flash memory, when an empty block for storing file management data cannot be secured, the system data is stored as a file management data storage destination. You can substitute physical blocks reserved for storage. For this reason, the reliability of the file management data stored in the flash memory system can be improved. Furthermore, the capacity of user data written according to the access instruction given from the host system (capacity of the write destination area), that is, the number of sectors of data specified by the access instruction instructing writing (the number of sectors of the write destination area) If the logical address range (logical block) to which the file management data is assigned is specified based on the above, the present invention is applied without setting the logical address to which the file management data is assigned in advance. be able to.

図1は、本発明の一実施形態に係るフラッシュメモリシステム1を概略的に示すブロック図である。本実施形態では、互いに異なるフラッシュメモリ2A,2Bに属する2個の物理ブロックで仮想ブロックを形成したフラッシュメモリシステムに、本発明を適用する場合にいて説明する。尚、仮想ブロックの構成については後述する。   FIG. 1 is a block diagram schematically showing a flash memory system 1 according to an embodiment of the present invention. In the present embodiment, a case will be described where the present invention is applied to a flash memory system in which a virtual block is formed by two physical blocks belonging to different flash memories 2A and 2B. The configuration of the virtual block will be described later.

図1に示すように、フラッシュメモリシステム1は、2個のフラッシュメモリ2A,2Bと、それを制御するメモリコントローラ3とで構成されている。以下の説明では、2個のフラッシュメモリ2A、2Bを総称して「フラッシュメモリ2」と言うことがある。   As shown in FIG. 1, the flash memory system 1 is composed of two flash memories 2A and 2B and a memory controller 3 for controlling the flash memories 2A and 2B. In the following description, the two flash memories 2A and 2B may be collectively referred to as “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と、SRAM8と、バッファ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, an SRAM 8, a buffer 9, a flash memory interface block 10, an ECC (Error-Correcting Code) block 11, 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) using the host interface block 7 as an entrance. Data supplied from the flash memory system 1 to the host system 4 is supplied to the host system 4 through the host interface block 7 as an exit.

SRAM(Static Random Access Memory)8は、揮発性の記憶素子であり、フラッシュメモリ2の制御に必要なデータを一時的に格納するために使用される。本実施形態においては、不良ブロックテーブル、アドレス変換テーブル及び空きブロックテーブルがシステムデータ(フラッシュメモリ2に対するアクセスを制御又は管理するためのシステムデータであり、管理情報及びファームウェア等のデータが含まれる)としてフラッシュメモリ2に保存されている。そして、不良ブロックテーブル、アドレス変換テーブル及び空きブロックテーブルは、必要なときにフラッシュメモリ2から読み出されSRAM8に保持される。ここで、不良ブロックテーブルは、不良ブロックを示す情報を保持するテーブルである。アドレス変換テーブルは、論理ブロックと物理ブロックとの対応関係を示したテーブルである。空きブロックテーブルは、消去状態の物理ブロック(又は、有効なデータが書き込まれていない物理ブロック)を検索するためのテーブルである。なお、フラッシュメモリ2にファームウェアが保存されている場合、ファームウェアは、起動後又は必要なときにフラッシュメモリ2から読み出されSRAM8に保持される。   An SRAM (Static Random Access Memory) 8 is a volatile storage element, and is used for temporarily storing data necessary for controlling the flash memory 2. In the present embodiment, the bad block table, the address conversion table, and the empty block table are system data (system data for controlling or managing access to the flash memory 2 and includes management information and data such as firmware). It is stored in the flash memory 2. The defective block table, the address conversion table, and the empty block table are read from the flash memory 2 and held in the SRAM 8 when necessary. Here, the bad block table is a table that holds information indicating a bad block. The address conversion table is a table showing the correspondence between logical blocks and physical blocks. The empty block table is a table for searching for an erased physical block (or a physical block to which valid data is not written). When firmware is stored in the flash memory 2, the firmware is read from the flash memory 2 and stored in the SRAM 8 after activation or when necessary.

ROM12は、不揮発性の記憶素子である。ROM12には、フラッシュメモリ2の制御に必要なファームウェアが書き込まれている。なお、フラッシュメモリ2にファームウェアが保存されている場合、ROM12には、起動時に必要な最低限のファームウェア(以下、「起動用ファームウェア」と言う)だけが記憶されている。   The ROM 12 is a nonvolatile storage element. Firmware required for controlling the flash memory 2 is written in the ROM 12. When the firmware is stored in the flash memory 2, the ROM 12 stores only the minimum firmware necessary for activation (hereinafter referred to as “activation firmware”).

バッファ9は、ホストシステム4から与えられたデータやフラッシュメモリ2から読み出されたデータを一時的に保持する。例えば、フラッシュメモリ2に書き込まれるデータは、フラッシュメモリ2が書き込み可能な状態になるまでバッファ9に保持される。また、フラッシュメモリ2から読み出されたデータは、ホストシステム4が受け取り可能な状態になるまでバッファ9に保持される。   The buffer 9 temporarily holds data given from the host system 4 or data read from the flash memory 2. For example, data written to the flash memory 2 is held in the buffer 9 until the flash memory 2 is in a writable state. The data read from the flash memory 2 is held in the buffer 9 until the host system 4 can receive the data.

フラッシュメモリインターフェースブロック10は、ROM12又はSRAM8にファームウェアとして保存されている各種の処理を規定したシーケンスコードを読み込み、読込んだシーケンスコードに従って、フラッシュメモリ2に対する各種の処理を実行する。このシーケンスコードは、フラッシュメモリインターフェースブロック10が実行するシーケンス処理毎に設定されたコードセットであり、それぞれのコードセットが複数個のコードで構成されている。このシーケンスコードに基づいて実行される処理では、フラッシュメモリインターフェースブロック10とフラッシュメモリ2との間で、データ、アドレス情報、ステータス情報、内部コマンド等の授受が、内部バス14を介して行なわれる。ここで、内部コマンドとは、メモリコントローラ3がフラッシュメモリ2に処理の実行を指示するためのコマンドであり、フラッシュメモリ2は、メモリコントローラ3から与えられる内部コマンドに従って動作する。   The flash memory interface block 10 reads sequence codes defining various processes stored as firmware in the ROM 12 or the SRAM 8 and executes various processes for the flash memory 2 according to the read sequence codes. This sequence code is a code set set for each sequence process executed by the flash memory interface block 10, and each code set includes a plurality of codes. In processing executed based on this sequence code, data, address information, status information, internal commands, etc. are exchanged between the flash memory interface block 10 and 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 correction code (ECC) added to the data to be written to the flash memory 2 and reads the read data based on the error correction code added to the read data. Detect and correct errors contained in.

マイクロプロセッサ6は、ROM12又はSRAM8上にファームウェアとして保存されているプログラムコードを読み込み、読み込んだプログラムコードに従って、メモリコントローラ3の全体の動作を制御する。このプログラムコードは、マイクロプロセッサ6の動作を規定したプログラムであり、マイクロプロセッサ6は、読込んだプログラムコードに基づいて、フラッシュメモリ2に対するアクセスを制御する。   The microprocessor 6 reads a program code stored as firmware on the ROM 12 or the SRAM 8 and controls the overall operation of the memory controller 3 according to the read program code. This program code is a program that defines the operation of the microprocessor 6, and the microprocessor 6 controls access to the flash memory 2 based on the read program code.

フラッシュメモリ2A,2Bは、それぞれ、NAND型フラッシュメモリからなる。NAND型フラッシュメモリは、レジスタと、複数のメモリセルが2次元的に配列されたメモリセルアレイを備えている。メモリセルアレイは、複数のメモリセル群と、ワード線とを備える。ここで、メモリセル群は、複数のメモリセルが直列に接続されたものである。各ワード線は、メモリセル群の特定のメモリセルを選択するためのものである。このワード線を介して選択されたメモリセルとレジスタとの間で、レジスタから選択されたメモリセルへのデータの書き込み又は選択されたメモリセルからレジスタへのデータの読み出しが行われる。   Each of the flash memories 2A and 2B 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個の物理ページは、所定セクタ数のユーザー領域(例えば4セクタ(2048バイト)の領域)と、所定バイト数の冗長領域(例えば64バイトの領域)とで構成され、1個の物理ブロックは、所定個数(例えば64個)の物理ページで構成されている。ユーザー領域は、主にホストシステムから与えられるユーザーデータが書き込まれる領域であり、冗長領域は、誤り訂正符号(ECC:Error-Correcting Code))、論理アドレス情報、ブロックステータス(フラグ)等の付加データが記憶される領域である。   In the NAND flash memory, data reading and writing are performed in units of pages (physical pages), and data erasing 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 is composed of a user area of a predetermined number of sectors (for example, an area of 4 sectors (2048 bytes)) and a redundant area of a predetermined number of bytes (for example, an area of 64 bytes). A block is composed of a predetermined number (for example, 64) of physical pages. The user area is an area in which user data given mainly by the host system is written, and the redundant area is additional data such as error correction code (ECC), logical address information, block status (flag), etc. Is an area in which is stored.

論理アドレス情報は、その物理ブロックに割り当てられた論理ブロックを示す情報であり、この情報に基づいて物理ブロックと論理ブロックの対応関係が判別される。ブロックステータス(フラグ)は、物理ブロックの良否を示すフラグであり、このブロックステータス(フラグ)に基づいて、正常にデータの書き込み等を行うことができない物理ブロックである不良ブロックが判別される。尚、不良ブロックには、出荷時から不良である初期不良の物理ブロック(以下、「初期不良ブロック」と言う)と、使用開始後に劣化して不良ブロックになった後発不良の物理ブロック(以下、「後発不良ブロック」と言う)があり、初期不良ブロックについては、不良ブロックであることを示すブロックステータス(フラグ)が製造メーカによって書き込まれている。また、この初期不良ブロックを示すブロックステータス(フラグ)を、ユーザー領域に書き込んでいる製造メーカもある。後発不良ブロックの判断基準については、設計の際に設計者が適宜設定することができる。例えば、書き込み又は消去を行った際にフラッシュメモリから出力される処理ステータスがフェイルであった場合、読み出されたデータに予め定められた閾値以上の誤りが含まれていた場合、又はこれらの組合せにより、後発不良理ブロックであるとの判断が行われてもよい。   The logical address information is information indicating the logical block assigned to the physical block, and the correspondence between the physical block and the logical block is determined based on this information. The block status (flag) is a flag indicating whether the physical block is good or bad. Based on the block status (flag), a defective block that is a physical block to which data cannot be normally written is determined. The defective block includes an initial defective physical block that is defective from the time of shipment (hereinafter referred to as “initial defective block”) and a late defective physical block that has deteriorated to become a defective block after the start of use (hereinafter referred to as “failure block”). For the initial defective block, a block status (flag) indicating that it is a defective block is written by the manufacturer. There is also a manufacturer that writes a block status (flag) indicating the initial defective block in the user area. The criteria for determining the late defective block can be appropriately set by the designer at the time of designing. For example, when the processing status output from the flash memory when writing or erasing is “fail”, when the read data includes an error exceeding a predetermined threshold, or a combination thereof Thus, it may be determined that the block is a late failure reason block.

本実施形態では、図2に示すように、互いに異なるフラッシュメモリ2A,2Bに属する2個の物理ブロックで仮想ブロックが形成され、この仮想ブロックに対して、1個の論理ブロックが割り当てられる。従って、ホストシステム4から書き込みを指示するアクセス指示が与えられた場合、メモリコントローラ3は、そのアクセス指示で指定されるアクセス対象の領域が属する論理ブロックと対応関係にある仮想ブロックを特定し、その仮想ブロックを形成する2個の物理ブロックに対して、そのアクセス指示に対応するデータを書き込む。このデータ書き込み処理で、メモリコントローラ3は、フラッシュメモリ2Aに属する物理ブロック対するデータの書き込みとフラッシュメモリ2Bに属する物理ブロック対するデータの書き込みとを並行して行っても良いし、フラッシュメモリ2Aに属する物理ブロック対するデータの書き込みとフラッシュメモリ2Bに属する物理ブロック対するデータの書き込みとを交互に行っても良い。後者は、いわゆるインターリーブ方式であり、この方式では、一方のフラッシュメモリがビジー状態のとき(フラッシュメモリ内で書き込みが実行されているとき)にビジー状態ではない(フラッシュメモリ内で書き込みが実行されていない)他方のフラッシュメモリに対するデータの書き込みが行われる。   In this embodiment, as shown in FIG. 2, a virtual block is formed by two physical blocks belonging to different flash memories 2A and 2B, and one logical block is allocated to this virtual block. Accordingly, when an access instruction for instructing writing is given from the host system 4, the memory controller 3 identifies a virtual block corresponding to the logical block to which the area to be accessed designated by the access instruction belongs, Data corresponding to the access instruction is written into the two physical blocks forming the virtual block. In this data writing process, the memory controller 3 may perform the writing of data to the physical block belonging to the flash memory 2A and the writing of data to the physical block belonging to the flash memory 2B in parallel, or belong to the flash memory 2A. Data writing to the physical block and data writing to the physical block belonging to the flash memory 2B may be alternately performed. The latter is a so-called interleaving method. In this method, when one flash memory is busy (when writing is executed in the flash memory), it is not busy (writing is executed within the flash memory). No) Data is written to the other flash memory.

ホストシステム4側のアドレス空間は、セクタ(512バイト)単位で分割した領域(以下、「論理セクタ領域」と言う)に付けた通番であるLBA(Logical Block Address)で管理されている。メモリコントローラ3内で行われるアドレス管理では、複数個の論理セクタ領域で論理ブロックが形成され、この論理ブロックに対して、仮想ブロックが割り当てられる。本実施形態では、1個の物理ブロックが、256セクタのユーザー領域で構成されており、1個の仮想ブロックが、2個の物理ブロックで形成されている。このため、図3に示したように、LBAが連続する512個の論理セクタ領域をまとめたものが論理ブロックとされ、この論理ブロックに、通し番号が付けられている。以下、論理ブロックに付けられている通し番号を、「論理ブロック番号(LBN)」と言う。例えば、LBA#0−#511の512個の論理セクタ領域は、LBN#0の論理ブロックに対応する。   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). In address management performed in the memory controller 3, a logical block is formed by a plurality of logical sector areas, and a virtual block is assigned to the logical block. In this embodiment, one physical block is configured by a 256-sector user area, and one virtual block is formed by two physical blocks. For this reason, as shown in FIG. 3, a group of 512 logical sector areas with continuous LBAs is a logical block, and a serial number is assigned to this logical block. Hereinafter, the serial number assigned to the logical block is referred to as “logical block number (LBN)”. For example, 512 logical sector areas LBA # 0 to # 511 correspond to logical blocks of LBN # 0.

また、本実施形態では、図2に示すように、物理ブロックアドレス(PBA)が同一の2個の物理ブロックで仮想ブロックを形成している。すなわち、仮想ブロックは、互いに異なるフラッシュメモリ2A,2Bに属するPBAが同一の物理ブロックで形成されている。このようにすることにより、PBAが異なる2個の物理ブロックで仮想ブロックが形成される場合に比べて、仮想ブロックの管理が容易になる。つまり、PBAが同一の2個の物理ブロックで仮想ブロックが形成されていない場合、メモリコントローラ3は、論理ブロックと物理ブロックの対応関係(LBNとPBAの対応関係)を、フラッシュメモリ2Aとフラッシュメモリ2Bとで別々に管理しなければならない。これに対し、本実施形態のように、PBAが同一の2個の物理ブロックで仮想ブロックが形成されている場合、各論理ブロックには必ずPBAが同一の物理ブロックが割り当てられるので、メモリコントローラ3は、2個のフラッシュメモリ2A,2Bのうちのいずれか一方について、論理ブロックと物理ブロックの対応関係(LBNとPBAの対応関係)を管理すればよい。   In this embodiment, as shown in FIG. 2, a virtual block is formed by two physical blocks having the same physical block address (PBA). That is, the virtual block is formed of the same physical block with PBAs belonging to different flash memories 2A and 2B. By doing so, the management of the virtual block becomes easier as compared with the case where the virtual block is formed by two physical blocks having different PBAs. That is, when a virtual block is not formed by two physical blocks having the same PBA, the memory controller 3 sets the correspondence relationship between the logical block and the physical block (correspondence relationship between LBN and PBA) to the flash memory 2A and the flash memory. 2B must be managed separately. On the other hand, when a virtual block is formed by two physical blocks having the same PBA as in the present embodiment, a physical block having the same PBA is always assigned to each logical block. May manage the correspondence between logical blocks and physical blocks (correspondence between LBN and PBA) for one of the two flash memories 2A and 2B.

図2に示すように、仮想ブロックには、不良ブロック(図2で“NG”と記載された物理ブロック)が含まれていない仮想ブロック(以下、「良品仮想ブロック」と言う)と、不良ブロックが含まれている仮想ブロック(以下、「不良仮想ブロック」と言う)との2種類がある。つまり、良品仮想ブロックは、仮想ブロックを形成する2個の物理ブロックが両方とも良品の仮想ブロックであり、不良仮想ブロックは、仮想ブロックを形成する2個の物理ブロックのうち、いずれか一方又は両方のブロックが不良の仮想ブロックである。   As shown in FIG. 2, the virtual block does not include a bad block (physical block described as “NG” in FIG. 2) (hereinafter referred to as “non-defective virtual block”), and a bad block. There are two types of virtual blocks (hereinafter referred to as “bad virtual blocks”). That is, the non-defective virtual block is a virtual block in which both two physical blocks forming the virtual block are non-defective, and the defective virtual block is either one or both of the two physical blocks forming the virtual block. This block is a defective virtual block.

良品仮想ブロック(例えば、PBA#2の2個の物理ブロックで構成される仮想ブロック)は、メモリコントローラ3がユーザーデータの書き込み先として使用することができる仮想ブロックである。言い換えれば、良品仮想ブロックは、論理ブロック(例えば、LBN#0の論理ブロック)に割り当てられ得る仮想ブロックである。   A non-defective virtual block (for example, a virtual block composed of two physical blocks of PBA # 2) is a virtual block that can be used by the memory controller 3 as a user data write destination. In other words, the non-defective virtual block is a virtual block that can be assigned to a logical block (for example, a logical block of LBN # 0).

一方、不良仮想ブロック(例えば、PBA#6の2個の物理ブロックで構成される仮想ブロック)は、メモリコントローラ3がユーザーデータの書き込み先として使用することができない仮想ブロックである。言い換えれば、不良仮想ブロックは、論理ブロックに割り当てられない仮想ブロックである。   On the other hand, a defective virtual block (for example, a virtual block composed of two physical blocks of PBA # 6) is a virtual block that the memory controller 3 cannot use as a user data write destination. In other words, a bad virtual block is a virtual block that is not assigned to a logical block.

本実施形態では、不良仮想ブロック内の良品の物理ブロック(不良ブロックでない物理ブロック)が、システムデータの書き込み先として使用される物理ブロック(以下、「システムブロック」と言う)として優先的に予約される。つまり、不良仮想ブロックに含まれる良品の物理ブロックが、良品仮想ブロックに含まれる物理ブロックよりも優先的にシステムブロックとして予約される。このようにすることにより、不良仮想ブロックに含まれる良品の物理ブロックを有効に活用することができる。   In this embodiment, a non-defective physical block (non-defective physical block) in a defective virtual block is preferentially reserved as a physical block (hereinafter referred to as “system block”) used as a system data write destination. The In other words, the non-defective physical block included in the defective virtual block is reserved as a system block preferentially over the physical block included in the non-defective virtual block. By doing so, a good physical block included in the defective virtual block can be effectively used.

システムブロックの予約は、フォーマット(初期化)の際に行われることが好ましい。本実施形態では、フォーマット(初期化)の際に、メモリコントローラ3によって、不良ブロックが検出され、検出された不良ブロックが含まれる不良仮想ブロック内の良品の物理ブロックが、良品仮想ブロックに含まれる物理ブロックよりも優先的にシステムブロックとして予約される。システムブロックとして予約される物理ブロックの個数については、システムデータの容量を考慮して決定される。更に、この物理ブロックの個数を決定するときには、システムデータの更新処理やシステムブロックとして予約された物理ブロックが後発不良ブロックになること等も考慮される。フォーマット(初期化)の際には、これらのことを考慮して決定された所定個数の物理ブロックがシステムブロックとして予約される。   The reservation of the system block is preferably performed at the time of formatting (initialization). In the present embodiment, a defective block is detected by the memory controller 3 during formatting (initialization), and a non-defective physical block in the defective virtual block including the detected defective block is included in the non-defective virtual block. Reserved as a system block in preference to a physical block. The number of physical blocks reserved as system blocks is determined in consideration of the capacity of system data. Furthermore, when determining the number of physical blocks, it is also considered that the system data update process, a physical block reserved as a system block becomes a late defective block, and the like. At the time of formatting (initialization), a predetermined number of physical blocks determined in consideration of these matters are reserved as system blocks.

ここで、もし、不良仮想ブロック内の良品の物理ブロックだけでは、所定個数の物理ブロックをシステムブロックとして予約することができない場合、つまり、不良仮想ブロック内の良品の物理ブロックの総数が所定個数に満たない場合、良品仮想ブロック内の物理ブロックが、システムブロックとして予約される。   Here, if it is not possible to reserve a predetermined number of physical blocks as system blocks only with good physical blocks in the defective virtual block, that is, the total number of good physical blocks in the defective virtual block becomes the predetermined number. If not, the physical block in the non-defective virtual block is reserved as a system block.

なお、本実施形態では、互いに異なるフラッシュメモリ2A,2Bに属するPBAが同一の物理ブロックで仮想ブロックを形成し、この仮想ブロックに対して論理ブロックが割り当てられる。従って、仮想ブロックに含まれる一方の物理ブロックだけがユーザーデータの書き込み先として使用されることはない。この点を考慮して、本実施形態では、仮想ブロック単位でシステムブロックの予約が行われる。つまり、良品仮想ブロック内の一方の物理ブロックがシステムブロックとして予約される場合には、他方の物理ブロックもシステムブロックとして予約される。このように仮想ブロック単位でシステムブロックの予約が行われることにより、所定個数を超える個数の物理ブロックがシステムブロックとして予約されることがあっても構わない。   In the present embodiment, PBAs belonging to different flash memories 2A and 2B form a virtual block with the same physical block, and a logical block is assigned to this virtual block. Therefore, only one physical block included in the virtual block is not used as a user data write destination. In consideration of this point, in this embodiment, reservation of system blocks is performed in units of virtual blocks. That is, when one physical block in the non-defective virtual block is reserved as a system block, the other physical block is also reserved as a system block. Thus, by reserving system blocks in units of virtual blocks, a number of physical blocks exceeding a predetermined number may be reserved as system blocks.

また、システムブロックの予約は、フォーマット(初期化)の際に行われるが、ユーザーデータの書き込み先として使用されていた物理ブロック(良品ブロック)が劣化して後発不良ブロックになったときには、その後発不良ブロックが含まれる不良仮想ブロック内の良品ブロックが、システムブロックとして追加予約される。このような追加予約により、システムブロックの個数が増加した場合には、良品仮想ブロック内の物理ブロックに対するシステムブロックの予約が解除されるようにしてもよい。   System block reservation is performed at the time of formatting (initialization), but when a physical block (non-defective block) used as a user data write destination deteriorates and becomes a late defective block, it is issued later. A non-defective block in the defective virtual block including the defective block is additionally reserved as a system block. When the number of system blocks increases due to such additional reservation, the reservation of the system block for the physical block in the non-defective virtual block may be canceled.

つまり、このような追加予約によりシステムブロックの個数が増加し、良品仮想ブロック内の物理ブロックがシステムブロックとして予約されている必要がなくなった場合には、良品仮想ブロック内の物理ブロックに対するシステムブロックの予約が解除されるようにしてもよい。なお、本実施形態では、不良仮想ブロック内の良品ブロックがユーザーデータの書き込み先としては使用されることはないため、不良仮想ブロック内の良品ブロックについては、システムブロックの予約が解除される必要がない。従って、システムブロックとして予約されている物理ブロックの個数が所定個数よりも多くなった場合であっても、システムブロックとして予約されている物理ブロックが全て不良仮想ブロック内の良品ブロックであるときには、システムブロックの予約解除は行われない。   In other words, if the number of system blocks increases due to such additional reservation, and the physical block in the non-defective virtual block does not need to be reserved as a system block, the system block for the physical block in the good virtual block is not necessary. The reservation may be canceled. In this embodiment, since the non-defective block in the defective virtual block is not used as the user data write destination, the reservation of the system block needs to be canceled for the good block in the defective virtual block. Absent. Therefore, even when the number of physical blocks reserved as system blocks is larger than the predetermined number, when all the physical blocks reserved as system blocks are non-defective blocks in the defective virtual block, the system Block reservation is not released.

また、本実施形態では、互いに異なるフラッシュメモリ2A,2Bに属する2個の物理ブロックで仮想ブロックが形成され、この仮想ブロックに対して、1個の論理ブロックが割り当てられるので、仮想ブロックを形成する2個の物理ブロックのうち、一方の物理ブロックに対するシステムブロックの予約だけが解除されても、その物理ブロックはユーザーデータの書き込み先として使用されない。従って、システムブロックの予約の解除も仮想ブロック単位で行われる。仮想ブロック単位でシステムブロックの予約が解除された場合、予約が解除された良品仮想ブロックはユーザーデータの書き込み先として使用可能な状態になる。   Further, in this embodiment, a virtual block is formed by two physical blocks belonging to different flash memories 2A and 2B, and one logical block is allocated to this virtual block, so a virtual block is formed. Even if the reservation of the system block for one of the two physical blocks is canceled, the physical block is not used as the user data write destination. Accordingly, system block reservation cancellation is also performed in units of virtual blocks. When the reservation of the system block is canceled in units of virtual blocks, the non-defective virtual block whose reservation has been canceled becomes usable as a user data write destination.

次に、システムデータとしてフラッシュメモリ2に保存される不良ブロックテーブル、アドレス変換テーブル及び空きブロックテーブルの3種類のテーブルについて説明する。   Next, three types of tables, that is, a defective block table, an address conversion table, and an empty block table stored in the flash memory 2 as system data will be described.

図3は、不良ブロックテーブルを示す。   FIG. 3 shows a bad block table.

不良ブロックテーブルは、不良ブロック(初期不良又は後発不良の物理ブロック)を示す情報を保持するテーブルである。不良ブロックテーブルには、不良ブロックを示す情報として、例えば、不良ブロックが属するフラッシュメモリ2A,2Bを判別するためのチップ番号と、その不良ブロックのPBAとが書き込まれる。   The bad block table is a table that holds information indicating a bad block (physical block of initial failure or late failure). In the defective block table, for example, a chip number for determining the flash memory 2A, 2B to which the defective block belongs and the PBA of the defective block are written as information indicating the defective block.

不良ブロックテーブルは、フォーマット(初期化)の際に作成される。例えば、フォーマット(初期化)の際に不良ブロックの検索が行われ、検出された不良ブロックが属するフラッシュメモリ2A,2Bのチップ番号及びその不良ブロックのPBAが、SRAM8上に確保された不良ブロックテーブルの作成領域に書き込まれる。このようにして不良ブロックテーブルが作成された後に、作成された不良ブロックテーブルに基づいて上述のシステムブロックの予約が行われる。そして、SRAM8上に作成された不良ブロックテーブルは、不良ブロックテーブルの書き込み先として予約されているシステムブロックに書き込まれる。その後、後発不良ブロックが新たに検出されたときには、SRAM8上で不良ブロックテーブルが更新され(その新たに検出された後発不良ブロックに対応したチップ番号及びPBAが不良ブロックテーブルに追加され)、更新後の不良ブロックテーブルが、再び、不良ブロックテーブルの書き込み先として予約されているシステムブロックに書き込まれる。   The bad block table is created at the time of formatting (initialization). For example, a bad block search is performed at the time of formatting (initialization), and the chip number of the flash memory 2A, 2B to which the detected bad block belongs and the PBA of the bad block are secured on the SRAM 8. Written in the creation area. After the defective block table is created in this way, the above-described system block reservation is made based on the created bad block table. Then, the bad block table created on the SRAM 8 is written into a system block reserved as a write destination of the bad block table. Thereafter, when a new defective block is newly detected, the defective block table is updated on the SRAM 8 (the chip number and PBA corresponding to the newly detected subsequent defective block are added to the defective block table), and after the update The defective block table is written again to the system block reserved as the write destination of the defective block table.

図4は、論理グループとアドレス変換テーブルの対応関係を示す。   FIG. 4 shows the correspondence between logical groups and address conversion tables.

論理グループとは、論理ブロックを複数個まとめることで形成されたグループである。以下、論理グループに付けられた通し番号を、「論理グループ番号(LGN)」と言う。図4の例では、LBNが連続する論理ブロックが、異なる論理グループに順次振り分けられるようにして、論理グループが形成されている。例えば、LBN#0の論理ブロックはLGN#0の論理グループに、LBN#1の論理ブロックはLGN#1の論理グループに、LBN#2の論理ブロックはLGN#2の論理グループにという順番で、LBN#0−#7の論理ブロックがLGN#0−#7の論理グループに順次振り分けられていく。以下、同様に、LBN#8の論理ブロックがLGN#0の論理グループに、LBN#9の論理ブロックがLGN#1の論理グループに、LBN#10の論理ブロックがLGN#2の論理グループに振り分けられていく。このようにして、8個の論理グループが形成される。   A logical group is a group formed by collecting a plurality of logical blocks. Hereinafter, a serial number assigned to a logical group is referred to as a “logical group number (LGN)”. In the example of FIG. 4, logical groups are formed such that logical blocks having consecutive LBNs are sequentially distributed to different logical groups. For example, the logical block of LBN # 0 is in the logical group of LGN # 0, the logical block of LBN # 1 is in the logical group of LGN # 1, the logical block of LBN # 2 is in the logical group of LGN # 2, The logical blocks of LBN # 0- # 7 are sequentially allocated to the logical groups of LGN # 0- # 7. Similarly, the logical block of LBN # 8 is assigned to the logical group of LGN # 0, the logical block of LBN # 9 is assigned to the logical group of LGN # 1, and the logical block of LBN # 10 is assigned to the logical group of LGN # 2. It will be. In this way, eight logical groups are formed.

論理グループは、図4に示すように、単なるアドレス変換テーブルの作成単位であり、各論理ブロックが割り当てられる物理ブロックは、その物理ブロックが属する論理グループに依存しない。つまり、どの論理ブロックがどの物理ブロックに割り当てられても良い。このアドレス変換テーブルは、論理ブロックと物理ブロックとの対応関係を記述したテーブルであり、図4に示した例では、各論理グループに対応する8個のテーブルに分割してアドレス変換テーブルの管理(作成、更新及び保存)を行っているが、全ての論理ブロックと物理ブロックとの対応関係を含む1個のテーブル、つまり、8個のテーブルを1個にまとめたアドレス変換テーブルであっても良い。   As shown in FIG. 4, the logical group is simply a unit for creating an address translation table, and the physical block to which each logical block is assigned does not depend on the logical group to which the physical block belongs. That is, which logical block may be assigned to which physical block. This address conversion table is a table that describes the correspondence between logical blocks and physical blocks. In the example shown in FIG. 4, the address conversion table is divided into eight tables corresponding to each logical group. Creation, update, and storage), but it may be a single table including the correspondence between all logical blocks and physical blocks, that is, an address conversion table in which eight tables are combined into one. .

アドレス変換テーブルの一例として、図5に、LGN#0の論理グループに対応したアドレス変換テーブル#0を示す。図5から分かるように、アドレス変換テーブル#0には、LGN#0の論理グループに属する論理ブロックに関して、各論理ブロックに対応する物理ブロックのPBAが書き込まれている。このアドレス変換テーブル#0がシステムブロックに保存されていない場合は、アドレス変換テーブル#0はSRAM8上で作成された後、そのテーブルの書き込み先として予約されているシステムブロックに保存される。また、アドレス変換テーブル#0がシステムブロックに保存されている場合は、必要なときにSRAM8に読み出される。そして、アドレス変換テーブル#0に関する論理ブロックと物理ブロックの対応関係が変化したときは、SRAM8上でそのテーブルが更新され、更新後のアドレス変換テーブル#0が、再び、そのテーブルの書き込み先として予約されているシステムブロックに書き込まれる。   As an example of the address conversion table, FIG. 5 shows an address conversion table # 0 corresponding to a logical group of LGN # 0. As can be seen from FIG. 5, the PBA of the physical block corresponding to each logical block is written in the address translation table # 0 for the logical block belonging to the logical group of LGN # 0. If this address conversion table # 0 is not stored in the system block, the address conversion table # 0 is created on the SRAM 8 and then stored in the system block reserved as the writing destination of the table. When the address conversion table # 0 is stored in the system block, it is read out to the SRAM 8 when necessary. When the correspondence between the logical block and the physical block relating to the address translation table # 0 changes, the table is updated on the SRAM 8, and the updated address translation table # 0 is reserved again as the writing destination of the table. Is written to the current system block.

図6は、空きブロックテーブルを示す。   FIG. 6 shows an empty block table.

空きブロックテーブルは、各物理ブロックが空きブロックであるか否かを示すテーブルである。空きブロックテーブルは、例えば、各ビットの論理値で、各ビットに割り当てられている物理ブロックが空きブロックであるか否かを示す。つまり、この空きブロックテーブルでは、0”又は“1”のいずれか一方の論理値が空きブロック(データが消去されている物理ブロック又はデータが無効化されている物理ブロック)を示し、他方の論理値が空きブロックではない物理ブロック(例えば、有効なユーザーデータが書き込まれている物理ブロック、システムブロック又は不良ブロック)を示す。この空きブロックテーブルもSRAM8上で作成又は更新され、このテーブルの書き込み先として予約されているシステムブロックに保存される。   The empty block table is a table indicating whether each physical block is an empty block. The free block table is, for example, a logical value of each bit and indicates whether or not a physical block assigned to each bit is a free block. In other words, in this empty block table, one of the logical values of 0 ”or“ 1 ”indicates an empty block (a physical block from which data has been erased or a physical block from which data has been invalidated), and the other logical value. A physical block whose value is not a free block (for example, a physical block, a system block, or a bad block in which valid user data is written) This free block table is also created or updated on the SRAM 8, and this table is written to Saved in the system block reserved as.

図6に示した空きブロックテーブルでは、各行(8ビット)の連続した2個のビットが、一つの仮想ブロックを形成する2個の物理ブロックに対応している。つまり、フラッシュメモリ2Aに属する物理ブロックとフラッシュメモリ2Bに属する物理ブロックとが、PBAの順番で各行(8ビット)のビットに交互に割り当てられている。この物理ブロックの割り当ては、上の行から下の行に向かって、各行においては下位ビット側から上位ビット側に向かって行われる。このように、仮想ブロックを構成する各物理ブロックが空きブロックであるか否かに関する情報は、1つの空きブロックテーブル上で管理されることが好ましい。尚、本実施形態のようにPBAが同一の物理ブロックで仮想ブロックを形成し、この仮想ブロックに対して論理ブロックが割り当てられる場合には、仮想ブロック単位(PBAが同一の2個の物理ブロック単位)で空きブロックになるので、本実施形態における空きブロックテーブルは仮想ブロック単位で空きブロックであるか否かを示すようなテーブルであっても良い。つまり、本実施形態における空きブロックテーブルでは、各ビットに対して仮想ブロックが割り当てられ、各ビットの論理値がそのビットに割り当てられた仮想ブロック(PBAが同一の2個の物理ブロック)が空きブロックであるか否かを示すテーブルであっても良い。このように各ビットに対して仮想ブロック(PBAが同一の2個の物理ブロック)が割り当てられるようにすれば、空きブロックテーブルの容量を小さくすることができる。例えば、本実施形態のように2個の物理ブロックで仮想ブロックが形成されている場合、その仮想ブロックが各ビットに対して割り当てられれば、空きブロックテーブルの容量は1/2になる。   In the empty block table shown in FIG. 6, two consecutive bits in each row (8 bits) correspond to two physical blocks forming one virtual block. That is, the physical blocks belonging to the flash memory 2A and the physical blocks belonging to the flash memory 2B are alternately assigned to the bits of each row (8 bits) in the order of PBA. This physical block allocation is performed from the upper row to the lower row, and in each row, from the lower bit side to the upper bit side. Thus, it is preferable that information regarding whether or not each physical block constituting a virtual block is a free block is managed on one free block table. When a virtual block is formed by physical blocks having the same PBA and a logical block is allocated to the virtual block as in this embodiment, a unit of virtual block (unit of two physical blocks having the same PBA) is used. Therefore, the empty block table in this embodiment may be a table indicating whether or not it is an empty block on a virtual block basis. That is, in the free block table in the present embodiment, a virtual block is assigned to each bit, and a virtual block (two physical blocks having the same PBA) in which the logical value of each bit is assigned to that bit is a free block. It may be a table indicating whether or not. Thus, if a virtual block (two physical blocks having the same PBA) is allocated to each bit, the capacity of the free block table can be reduced. For example, when a virtual block is formed by two physical blocks as in this embodiment, if the virtual block is assigned to each bit, the capacity of the free block table is halved.

また、不良ブロックテーブル、アドレス変換テーブル及び空きブロックテーブルのそれぞれのテーブルの容量は、1セクタの領域(1個の物理セクタ領域)又は1個の物理ページに保存することができる容量であることが好ましい。つまり、それぞれテーブルは、1セクタ単位又は1ページ単位のテーブルに分割されて管理され、その単位でシステムブロックに保存されることが好ましい。   The capacity of each of the bad block table, the address conversion table, and the empty block table may be a capacity that can be stored in one sector area (one physical sector area) or one physical page. preferable. That is, it is preferable that each table is divided into one sector unit or one page table, and is stored in the system block in that unit.

以上が、不良ブロックテーブル、アドレス変換テーブル及び空きブロックテーブルについての説明である。これらのテーブルの書き込み先として予約されたシステムブロックを示す情報(以下、「システムブロック情報」と言う)は、例えば、フォーマット(初期化)の際に作成され、フラッシュメモリ2A及び/又は2B内の先頭ブロックに保存される。本実施形態では、図7A乃至図7Cに示すように、不良ブロックテーブル、アドレス変換テーブル及び空きブロックテーブルの書き込み先として予約されたシステムブロックを特定するためのチップ番号及びPBAがシステムブロック情報として管理される。図7Aに示す情報は、不良ブロックテーブルの書き込み先として予約されたシステムブロックを特定するためのチップ番号及びPBAを示す不良ブロックテーブル格納領域情報である。図7Bに示す情報は、アドレス変換テーブルの書き込み先として予約されたシステムブロックを特定するためのチップ番号及びPBAを示すアドレス変換テーブル毎のアドレス変換テーブル格納領域情報である。また、図7Cに示す情報は、空きブロックテーブルの書き込み先として予約されたシステムブロックを特定するためのチップ番号及びPBAを示す空きブロックテーブル毎の空きブロックテーブル格納領域情報である。このように、本実施形態におけるシステムブロックの予約は、不良ブロックテーブル格納領域情報、アドレス変換テーブル格納領域情報及び空きブロックテーブル格納領域情報を含むシステムブロック情報によって管理されている。   This completes the description of the defective block table, the address conversion table, and the empty block table. Information indicating a system block reserved as a writing destination of these tables (hereinafter referred to as “system block information”) is created, for example, at the time of formatting (initialization), and is stored in the flash memory 2A and / or 2B. Saved in the first block. In this embodiment, as shown in FIGS. 7A to 7C, the chip number and PBA for specifying the system block reserved as the write destination of the bad block table, the address conversion table, and the empty block table are managed as system block information. Is done. The information shown in FIG. 7A is bad block table storage area information indicating a chip number and PBA for specifying a system block reserved as a write destination of the bad block table. The information shown in FIG. 7B is address conversion table storage area information for each address conversion table indicating a chip number and PBA for specifying a system block reserved as a write destination of the address conversion table. The information shown in FIG. 7C is empty block table storage area information for each empty block table indicating a chip number and PBA for specifying a system block reserved as a write destination of the empty block table. As described above, the reservation of the system block in the present embodiment is managed by the system block information including the defective block table storage area information, the address conversion table storage area information, and the free block table storage area information.

尚、各テーブルが1個の物理ページに保存されるようにすれば、テーブルが更新される毎に、更新されたテーブルが物理ブロック(システムブロック)内の次の物理ページに保存されることになる。従って、最新のテーブルは、物理ブロック(システムブロック)内のデータ(テーブルのデータ)が書き込まれている末尾の物理ページに保存されていることになる。   If each table is stored in one physical page, the updated table is stored in the next physical page in the physical block (system block) every time the table is updated. Become. Therefore, the latest table is stored in the last physical page in which data (table data) in the physical block (system block) is written.

尚、各物理ページに対して物理セクタ領域単位でデータを書き込んでいくことができるフラッシュメモリの場合には、各テーブルの容量が一個の物理セクタ領域に収まる容量(例えば、物理セクタ領域と同じ容量)であってもよい。このようにすれば、1個の物理セクタ領域に1個のテーブルが保存され、最新のテーブルは、物理ブロック(システムブロック)内のデータ(テーブルのデータ)が書き込まれている末尾の物理セクタ領域に保存されていることになる。   In the case of a flash memory in which data can be written to each physical page in units of physical sector areas, the capacity of each table can be stored in one physical sector area (for example, the same capacity as the physical sector area). ). In this way, one table is stored in one physical sector area, and the latest table is the last physical sector area in which data (table data) in the physical block (system block) is written. Will be saved.

本実施形態では、各テーブルに対して、2個のシステムブロックが予約される。従って、2個のシステムブロックのうち、一方は、テーブルの書き込み先として使用されているシステムブロック(以下、「現行ブロック」と言う)になっており、他方はテーブルの書き込み先として使用されていない控えのシステムブロック(以下、「控えブロック」と言う)になっている。そして、現行ブロック内にテーブルを書き込むための空き領域(データの書き込まれていない物理ページ又は物理セクタ領域)が無くなった場合は、控えブロックが現行ブロックになり、現行ブロックが控えブロックになる。つまり、各テーブルに対して予約された2個のシステムブロックは、交互に現行ブロック(又は、控えブロック)になる。   In this embodiment, two system blocks are reserved for each table. Therefore, one of the two system blocks is a system block used as a table write destination (hereinafter referred to as “current block”), and the other is not used as a table write destination. It is a reserved system block (hereinafter referred to as “reserved block”). When there is no free area (physical page or physical sector area in which data is not written) for writing the table in the current block, the reserved block becomes the current block, and the current block becomes the reserved block. That is, the two system blocks reserved for each table alternately become the current block (or reserved block).

システムブロック情報は、起動時にフラッシュメモリ2A及び/又は2Bの先頭ブロックから読み出され、SRAM8に保持されている。そして、テーブルの書き込み先として予約されているシステムブロックが変更される場合、システムブロック情報は、SRAM8上で更新される。システムブロック情報が更新された場合は、更新後のシステムブロック情報がフラッシュメモリ2A及び/又は2Bの先頭ブロックに書き込まれる。なお、本実施形態で、フラッシュメモリ2A及び/又は2Bの先頭ブロックがシステムブロック情報の書き込み先として設定されているのは、一般に、先頭ブロックは、不良ブロックではないことが製造メーカによって保証されているためである。このため、通常、先頭ブロックには、属性情報(例えば、フラッシュメモリシステム1がどういうものであって、どういうフラッシュメモリが幾つ搭載されているか等を表す情報)が書き込まれていることが多く、先頭ブロックにユーザーデータ(ホストシステムから与えられるデータ)が書き込まれることは殆ど無い。   The system block information is read from the head block of the flash memory 2A and / or 2B at the time of activation and is held in the SRAM 8. When the system block reserved as the table write destination is changed, the system block information is updated on the SRAM 8. When the system block information is updated, the updated system block information is written in the first block of the flash memory 2A and / or 2B. In the present embodiment, the first block of the flash memory 2A and / or 2B is set as the writing destination of the system block information. Generally, the manufacturer guarantees that the first block is not a defective block. Because it is. For this reason, usually, attribute information (for example, information indicating what the flash memory system 1 is and how many flash memories are mounted) is written in the first block. User data (data given from the host system) is hardly written to the block.

本実施形態では、各テーブルに対して、2個のシステムブロックが割り当てられ、それらのシステムブロックが交互に現行ブロックになる。つまり、2個のシステムブロックが交互に各テーブルの保存先として使用される。従って、いずれかのテーブルに対して割り当てられている2個のシステムブロックのうち、少なくとも一方が後発不良ブロックになってしまった場合には、そのテーブルに対して別のシステムブロックが新たに割り当てられる必要がある。   In the present embodiment, two system blocks are assigned to each table, and these system blocks alternately become current blocks. That is, two system blocks are alternately used as storage destinations for each table. Therefore, when at least one of the two system blocks assigned to any table becomes a late defective block, another system block is newly assigned to that table. There is a need.

本実施形態では、このようにシステムブロックが新たに割り当てられる必要が生じたときに、システムブロックが追加予約されるのではなく、予め予備のシステムブロック(以下、「予備ブロック」と言う)が確保されている。そして、いずれかのテーブルに対して割り当てられているシステムブロックが後発不良ブロックになってしまった場合には、後発不良ブロックになってしまったシステムブロックに換えて、予め確保されている予備ブロックがそのテーブルに対して新たに割り当てられる。つまり、本実施形態では、フォーマット(初期化)の際に、予備ブロックもシステムブロックとして予約される。   In the present embodiment, when a system block needs to be newly allocated in this way, a system block is not reserved additionally, but a spare system block (hereinafter referred to as a “spare block”) is secured in advance. Has been. If a system block assigned to any table becomes a late defective block, a spare block reserved in advance is used instead of the system block that has become a late defective block. A new allocation is made for the table. That is, in this embodiment, a spare block is also reserved as a system block at the time of formatting (initialization).

従って、本実施形態では、予備ブロックとして予約されたシステムブロックを特定するための情報(以下、「予備ブロック情報」と言う)もシステムブロック情報として保存される。図8に示す情報は、予備ブロックとして予約されたシステムブロックを特定するためのチップ番号及びPBAを示す予備ブロック情報である。この予備ブロック情報も不良ブロックテーブル格納領域情報、アドレス変換テーブル格納領域情報及び空きブロックテーブル格納領域情報と同様にシステムブロック情報として保存される。また、この予備ブロック情報も他のシステムブロック情報と同様に、SRAM8上で更新され、更新された予備ブロック情報はフラッシュメモリ2A及び/又は2Bの先頭ブロックに保存される。   Therefore, in the present embodiment, information for specifying a system block reserved as a spare block (hereinafter referred to as “spare block information”) is also stored as system block information. The information shown in FIG. 8 is spare block information indicating a chip number and PBA for specifying a system block reserved as a spare block. This spare block information is also stored as system block information in the same manner as the defective block table storage area information, the address conversion table storage area information, and the free block table storage area information. The spare block information is also updated on the SRAM 8 like the other system block information, and the updated spare block information is stored in the first block of the flash memory 2A and / or 2B.

本実施形態では、不良ブロックテーブルについては、2個のシステムブロックが予約され、アドレス変換テーブルについては、8個のアドレス変換テーブル#0〜#7があるため(図7B参照)、8×2=16個のシステムブロックが予約され、空きブロックテーブルについては、2個の空きブロックテーブル#0及び#1があるため(図7C参照)、2×2=4個のシステムブロックが予約される。尚、予備ブロックの個数は適宜設定されるが、予備ブロック用のシステムブロックの個数を3個とした場合、前述したシステムブロックとして予約される物理ブロックの所定個数は、2+16+4+3=25個になる。   In the present embodiment, two system blocks are reserved for the bad block table, and there are eight address conversion tables # 0 to # 7 for the address conversion table (see FIG. 7B), so that 8 × 2 = Since 16 system blocks are reserved and there are two empty block tables # 0 and # 1 (see FIG. 7C), 2 × 2 = 4 system blocks are reserved. The number of spare blocks is set as appropriate. However, when the number of system blocks for spare blocks is three, the predetermined number of physical blocks reserved as system blocks described above is 2 + 16 + 4 + 3 = 25.

次に、不良ブロックテーブル、アドレス変換テーブル又は空きブロックテーブルに対して予約されているシステムブロックのうち、いずれかのシステムブロックが後発不良ブロックになった場合に行われるシステムブロックの新たな割り当てについて説明する。尚、後発不良ブロックであるか否かは、通常、現行ブロックにおいてデータの書き込み又はデータの読み出しが行われたときや、控えブロックにおいて記憶データの消去が行われたときに判断される。従って、後発不良ブロックになったと判断されたときに、そのシステムブロックが現行ブロックである場合と控えブロックである場合とがある。   Next, a description will be given of new allocation of system blocks that is performed when any one of the system blocks reserved for the bad block table, the address conversion table, or the empty block table becomes a late defective block. To do. Whether or not the block is a late defective block is normally determined when data is written or read in the current block, or when stored data is erased in the backup block. Therefore, when it is determined that the block is a late defective block, the system block may be a current block or a reserved block.

後発不良ブロックになったと判断されたシステムブロックが現行ブロックであった場合には、そのシステムブロックの代わりに補充されるシステムブロック(予備ブロックとして予約されていたシステムブロック)に最新のテーブルが書き込まれると共に、システムブロック情報の更新が行われる。一方、後発不良ブロックになったと判断されたシステムブロックが控えブロックであった場合には、システムブロック情報の更新だけが行われる。   If the system block determined to be a late defective block is the current block, the latest table is written to the system block that is replenished instead of the system block (the system block reserved as a spare block). At the same time, the system block information is updated. On the other hand, when the system block determined to have become a late defective block is a reserved block, only the system block information is updated.

このシステムブロック情報の更新では、後発不良ブロックになったシステムブロックのチップ番号及びPBAが不良ブロックテーブルに書き込まれる。この不良ブロックテーブルの更新は、SRAM8上で行われ、更新された不良ブロックテーブルは、そのテーブルの書き込み先として予約されているシステムブロックに保存される。   In the update of the system block information, the chip number and PBA of the system block that has become the late defective block are written in the defective block table. This bad block table is updated on the SRAM 8, and the updated bad block table is stored in a system block reserved as a writing destination of the table.

不良ブロックテーブル格納領域情報、アドレス変換テーブル格納領域情報及び空きブロックテーブル格納領域情報に記載されているシステムブロックのチップ番号及びPBAのうち、後発不良ブロックになったと判断されたシステムブロックのチップ番号及びPBAが削除され、そのシステムブロックの代わりに割り当てられるシステムブロック(予備ブロックとして予約されていたシステムブロック)のチップ番号及びPBAが、削除されたチップ番号及びPBAの代わりに新たに書き込まれる。   Of the system block chip number and PBA described in the bad block table storage area information, the address translation table storage area information, and the free block table storage area information, the chip number of the system block determined to have become the late defective block, and The PBA is deleted, and the chip number and PBA of the system block (system block reserved as a spare block) allocated instead of the system block are newly written instead of the deleted chip number and PBA.

続いて、予備ブロック情報に記載されているシステムブロックのチップ番号及びPBAから、後発不良ブロックになったと判断されたシステムブロックの代わりに割り当てられるシステムブロック(予備ブロックとして予約されていたシステムブロック)のチップ番号及びPBAが削除される。この更新はSRAM8上で行われ、更新されたシステムブロック情報はフラッシュメモリ2A及び/又は2Bの先頭ブロックに保存される。   Subsequently, the system block (the system block reserved as the spare block) to be assigned instead of the system block determined to have become the late defective block from the chip number and PBA of the system block described in the spare block information The chip number and PBA are deleted. This update is performed on the SRAM 8, and the updated system block information is stored in the first block of the flash memory 2A and / or 2B.

不良ブロックテーブル、アドレス変換テーブル又は空きブロックテーブルに対して予約されているシステムブロックのうちのいずれかのシステムブロックが後発不良ブロックになった場合には、予備ブロックによりその補充が行われるため、予備ブロック用のシステムブロックの個数が減少する。従って、予備ブロック用のシステムブロックの個数が減少したときは、適宜、予備ブロックの補充が行われることが好ましい。例えば、予備ブロックの個数が0個になったときや、予め設定した最低個数以下になったときに、予備ブロック用のシステムブロックの予約(追加予約)を行うことが好ましい。   If any of the system blocks reserved for the bad block table, address translation table, or empty block table becomes a late defective block, the spare block will replenish it. The number of system blocks for blocks is reduced. Therefore, when the number of system blocks for spare blocks decreases, it is preferable to supplement spare blocks as appropriate. For example, it is preferable to reserve a system block for a spare block (additional reservation) when the number of spare blocks becomes zero, or when the number of spare blocks falls below a preset minimum number.

尚、このように予備ブロック用のシステムブロックの個数が減少した場合でなくても、良品仮想ブロック内の物理ブロックが劣化して後発不良ブロックになったときには、その後発不良ブロックが含まれる仮想ブロック内の良品ブロックが、予備ブロック用のシステムブロックとして追加予約される。この追加予約が行われたときには、その良品ブロックのチップ番号及びPBAは、予備ブロック情報に書き込まれる。   Even if the number of system blocks for spare blocks is not reduced in this way, when a physical block in a non-defective virtual block deteriorates to become a subsequent defective block, a virtual block including the subsequent defective block is included. The non-defective block is additionally reserved as a system block for a spare block. When this additional reservation is made, the chip number and PBA of the good block are written in the spare block information.

また、このシステムブロックの追加予約により予備ブロックの個数が増加し、良品仮想ブロック内の物理ブロックをシステムブロックとして確保しておく必要がなくなった場合には、良品仮想ブロック内の良品ブロックに対する予約が解除される。予約が解除された物理ブロックのチップ番号及びPBAは、予備ブロック情報から削除される。   In addition, if the number of spare blocks increases due to this additional reservation of system blocks, and it is no longer necessary to reserve physical blocks in good virtual blocks as system blocks, reservations for good blocks in good virtual blocks will be made. Canceled. The chip number and PBA of the physical block whose reservation has been canceled are deleted from the spare block information.

ここで、「良品仮想ブロック内の物理ブロックをシステムブロックとして確保しておく必要がなくなった場合」とは、予備ブロックの総数が、予め定められている予備ブロック用のシステムブロックの個数(以下、「所定予備個数」と言う)よりも多いことを意味している。なお、システムブロックの予約の解除は仮想ブロック単位で行われるため、システムブロックの予約の解除は、所定予備個数を超えた予備ブロック用のシステムブロックの個数が仮想ブロックを形成する物理ブロックの個数以上(つまり、本実施形態では2個以上)になった場合に行われる。   Here, “when it is no longer necessary to reserve physical blocks in good virtual blocks as system blocks” means that the total number of spare blocks is the number of system blocks for spare blocks (hereinafter, It means more than “predetermined spare number”. Since system block reservation cancellation is performed in units of virtual blocks, system block reservation cancellation requires that the number of system blocks for spare blocks exceeding a predetermined number of spare blocks be equal to or greater than the number of physical blocks forming the virtual block. This is performed when it becomes (that is, two or more in this embodiment).

以下、システムブロックの予約及びその解除に関するメモリコントローラ3の動作について説明する。   Hereinafter, the operation of the memory controller 3 relating to reservation and release of the system block will be described.

フォーマット(初期化)の際、不良ブロックが検出され、検出された不良ブロックに対応したチップ番号及びPBAが、不良ブロックテーブルに書き込まれる。ここで検出される不良ブロックは、初期不良ブロックであっても後発不良ブロックであっても良い。例えば、このフォーマット(初期化)の処理が、フラッシュメモリシステム1が一旦使用された後に行われる場合には、後発不良ブロックが存在することがある。そのような場合は、初期不良ブロックだけでなく後発不良ブロックも不良ブロックとして検出される。   During formatting (initialization), a defective block is detected, and a chip number and PBA corresponding to the detected defective block are written in the defective block table. The defective block detected here may be an initial defective block or a late defective block. For example, when the format (initialization) process is performed after the flash memory system 1 is once used, there may be a late defective block. In such a case, not only the initial defective block but also the subsequent defective block are detected as defective blocks.

次に、作成された不良ブロックテーブルに基づいて不良仮想ブロックに含まれる良品ブロックがシステムブロックとして予約される。不良仮想ブロックに含まれる良品ブロックだけでは、所定個数のシステムブロックを確保することができなかった場合は、良品仮想ブロックに含まれる良品ブロックがシステムブロックとして予約される。このシステムブロックの予約は、仮想ブロック単位で行われる。   Next, a non-defective block included in the defective virtual block is reserved as a system block based on the generated defective block table. If a predetermined number of system blocks cannot be secured with only the non-defective blocks included in the defective virtual block, the non-defective blocks included in the good virtual block are reserved as system blocks. This system block reservation is performed in units of virtual blocks.

このシステムブロックの予約では、まず、不良仮想ブロック内の良品ブロックに対応したチップ番号及びPBAが、システムブロック情報に書き込まれる。次に、不良仮想ブロック内の良品ブロックだけでは、所定個数のシステムブロックが確保されない場合には、良品仮想ブロックが適宜選択され、選択された良品仮想ブロックに含まれる物理ブロックのチップ番号及びPBAが、システムブロック情報に書き込まれる。   In the reservation of the system block, first, the chip number and PBA corresponding to the non-defective block in the defective virtual block are written in the system block information. Next, when a predetermined number of system blocks are not secured with only the non-defective blocks in the defective virtual block, the non-defective virtual block is appropriately selected, and the chip number and PBA of the physical block included in the selected good virtual block are Written in the system block information.

以上のようにして、フォーマット(初期化)の際に、所定個数以上のシステムブロックが予約される。   As described above, a predetermined number or more of system blocks are reserved at the time of formatting (initialization).

不良ブロックテーブル、アドレス変換テーブル及び空きブロックテーブルがシステムブロックに保存されるときは、システムブロック情報に基づいて各テーブルの保存先のシステムブロックが特定される。   When the bad block table, the address conversion table, and the empty block table are stored in the system block, the system block as the storage destination of each table is specified based on the system block information.

その後、後発不良ブロックが検出されたときには、その後発不良ブロックに対応したチップ番号及びPBAが不良ブロックテーブルに追記される。この不良ブロックテーブルの更新はSRAM8上で行われ、追記後の不良ブロックテーブルが、そのテーブルに対応するシステムブロック(現行ブロック)に書き込まれる。   Thereafter, when a late defective block is detected, the chip number and PBA corresponding to the subsequent defective block are added to the bad block table. The defective block table is updated on the SRAM 8, and the defective block table after the additional writing is written in the system block (current block) corresponding to the table.

続いて、その後発不良ブロックが含まれている仮想ブロック内の良品ブロックが予備ブロック用のシステムブロックとして追加予約される。この追加予約では、その良品ブロックのチップ番号及びPBAが、予備ブロック情報に書き込まれる。この追加予約により予備ブロック用のシステムブロックの個数が所定予備個数より多くなった場合には、予備ブロック用のシステムブロックとして予約されている良品仮想ブロック内の物理ブロックに対するシステムブロックの予約が仮想ブロック単位で解除される。この予約解除では、システムブロックの予約が解除される良品仮想ブロック内の物理ブロックのチップ番号及びPBAが、予備ブロック情報から削除される。   Subsequently, the non-defective block in the virtual block including the subsequent defective block is additionally reserved as a system block for the spare block. In this additional reservation, the chip number and PBA of the good block are written in the spare block information. When the number of system blocks for spare blocks exceeds the predetermined spare number due to this additional reservation, the system block reservation for the physical block in the non-defective virtual block reserved as the system block for the spare block is the virtual block. Canceled in units. In this reservation cancellation, the chip number and PBA of the physical block in the non-defective virtual block whose system block reservation is canceled are deleted from the spare block information.

また、不良ブロックテーブル、アドレス変換テーブル又は空きブロックテーブルの保存先のシステムブロックとして良品仮想ブロック内の物理ブロックが割り当てられている場合には、その良品仮想ブロック内の物理ブロックが、予備ブロック用のシステムブロックとして予約されている不良仮想ブロック内の物理ブロックと交換されることが好ましい。上述のようなシステムブロックの予約の解除が円滑に行われるためには、このようなシステムブロックの交換が適宜行われることが好ましい。尚、このようなシステムブロックの交換は、交換対象のシステムブロックが控えブロックになったときに行われることが好ましい。   In addition, when a physical block in a non-defective virtual block is assigned as a storage block system block for a bad block table, an address conversion table, or an empty block table, the physical block in the good virtual block is used as a spare block. It is preferably exchanged for a physical block in a bad virtual block reserved as a system block. In order to smoothly cancel the reservation of the system block as described above, it is preferable that such replacement of the system block is appropriately performed. It should be noted that such system block replacement is preferably performed when the system block to be replaced becomes a reserve block.

次に、ホストシステム4から与えられるユーザーデータの書き込み処理について説明する。ユーザーデータの書き込み処理は、ホストシステム4から与えられるアクセス指示に従って実行される。   Next, a process for writing user data given from the host system 4 will be described. The user data writing process is executed in accordance with an access instruction given from the host system 4.

書き込み処理の場合、ホストシステム4から与えられるアクセス指示には、ユーザーデータの書き込み先の領域を指示する論理アドレスが含まれている。ホストシステム4側のアドレス空間がセクタ(512バイト)単位の領域に付けられたLBAで管理されている場合、このLBAでユーザーデータの書き込み先の領域が指示される。例えば、ユーザーデータの書き込み先の先頭領域(先頭の論理セクタ領域)のLBAと書き込み先の領域のセクタ数(容量)で、ユーザーデータの書き込み先の領域が指示される。   In the case of the writing process, the access instruction given from the host system 4 includes a logical address indicating the area where the user data is written. When the address space on the host system 4 side is managed by an LBA attached to a sector (512 bytes) unit area, the user data write destination area is indicated by this LBA. For example, the user data write destination area is indicated by the LBA of the user data write destination head area (first logical sector area) and the number of sectors (capacity) of the write destination area.

メモリコントローラ3は、ホストシステム4から与えられるアクセス指示により、このユーザーデータの書き込み先の領域に対応するLBA又はLBAの範囲を特定し、更に、そのLBA又はLBAの範囲が属する論理ブロックを特定する。特定された論理ブロックと対応する物理ブロックにユーザーデータを書き込むことが可能な場合は、その物理ブロックに対してユーザーデータが書き込まれる。   The memory controller 3 specifies the LBA or LBA range corresponding to the user data write destination area according to the access instruction given from the host system 4, and further specifies the logical block to which the LBA or LBA range belongs. . If user data can be written to the physical block corresponding to the identified logical block, the user data is written to the physical block.

一方、特定された論理ブロックと対応する物理ブロックにユーザーデータを書き込むことができない場合、例えば、そのユーザーデータを書き込むための空き領域が無い場合には、空きブロックテーブルを用いた空きブロックの検索が行われる。この空きブロックの検索で空きブロックが検出された場合には、その空きブロックにユーザーデータが書き込まれる。また、特定された論理ブロックと対応する物理ブロックが存在しない場合にも、同様に、空きブロックテーブルを用いた空きブロックの検索が行われ、検出された空きブロックにユーザーデータが書き込まれる。   On the other hand, when the user data cannot be written to the physical block corresponding to the specified logical block, for example, when there is no free area for writing the user data, the free block search using the free block table is performed. Done. When an empty block is detected by this empty block search, user data is written to the empty block. Similarly, when there is no physical block corresponding to the specified logical block, a search for a free block using the free block table is performed, and user data is written to the detected free block.

この空きブロックの検索で、空きブロックが検出されなかった場合、メモリコントローラ3は、ユーザーデータの書き込みを行わず、ホストシステム4側からアクセス可能なレジスタに、書き込み処理が正常に実行されなかったことを通知するエラーステータスを設定する。   If no empty block is detected in this empty block search, the memory controller 3 did not write user data, and the writing process to the register accessible from the host system 4 side was not executed normally. Set the error status to notify.

尚、この空きブロックテーブルを用いた空きブロックの検索では、システムブロックは、検索対象から除外されているため、予備ブロックや控えブロックが空きブロックとして検出されることはない。   In the search for the empty block using this empty block table, the system block is excluded from the search target, so that the spare block and the reserved block are not detected as the empty block.

本実施形態では、予め重要なデータに対応するLBAの範囲(以下、「所定LBA範囲」と言う)が予め設定され、そのLBAの範囲が属する論理ブロックについては、空きブロックの検索で空きブロックの検出ができなかった場合に、システムブロック(例えば、予備ブロックや控えブロック)が、ユーザーデータの書き込み先として使用される。つまり、空きブロックの検索で空きブロックを検出することができなかった場合、特定された論理ブロック(書き込み先の領域が属する論理ブロック)が、所定LBA範囲に対応する論理ブロック(所定LBA範囲の論理セクタ領域が属する論理ブロック)と一致するか否かが判断される。ここで、双方の論理ブロックが一致した場合には、システムブロック(例えば、予備ブロックや控えブロック)がユーザーデータの書き込み先として使用される。一方、双方の論理ブロックが一致しなかった場合には、システムブロック(例えば、予備ブロックや控えブロック)がユーザーデータの書き込み先として使用されない。   In this embodiment, an LBA range (hereinafter referred to as “predetermined LBA range”) corresponding to important data is set in advance, and for a logical block to which the LBA range belongs, an empty block search is performed. When the detection cannot be performed, a system block (for example, a spare block or a copy block) is used as a user data write destination. That is, when an empty block cannot be detected by searching for an empty block, the specified logical block (the logical block to which the write destination area belongs) corresponds to the logical block corresponding to the predetermined LBA range (the logical in the predetermined LBA range). It is determined whether or not it matches the logical block to which the sector area belongs. Here, if both logical blocks match, a system block (for example, a spare block or a copy block) is used as a user data write destination. On the other hand, when both logical blocks do not match, a system block (for example, a spare block or a copy block) is not used as a user data write destination.

例えば、LBA#512−#1023の範囲が所定LBA範囲として設定されていた場合、LBA#512−#1023の512個の論理セクタ領域は、図2に示したようにLBN#1の論理ブロックに属している。従って、LBN#1の論理ブロックに新たに割り当てる空きブロックの検索を行ったときに空きブロックを検出することができなかった場合には、LBN#1の論理ブロックに対してシステムブロック(例えば、予備ブロックや控えブロック)が割り当てられる。尚、LBN#1の論理ブロックに割り当てられる2個のシステムブロックのPBAは同じアドレスでなくてもよい。   For example, when the range of LBA # 512- # 1023 is set as the predetermined LBA range, the 512 logical sector areas of LBA # 512- # 1023 become logical blocks of LBN # 1 as shown in FIG. belong to. Therefore, if a free block cannot be detected when searching for a free block newly allocated to the logical block of LBN # 1, a system block (for example, a spare block) is detected for the logical block of LBN # 1. Block or copy block). Note that the PBAs of the two system blocks allocated to the logical block of LBN # 1 need not be the same address.

ここで、ホストシステムから与えられるユーザーデータには、ファイルデータとそのファイルデータを管理するためのファイル管理データが含まれているが、このファイル管理データに対応するLBAの範囲を所定LBA範囲として設定しておけば、ファイル管理データの信頼性を向上させることができる。   Here, the user data given from the host system includes file data and file management data for managing the file data. The LBA range corresponding to the file management data is set as a predetermined LBA range. If so, the reliability of the file management data can be improved.

尚、システムブロックに保存されたユーザーデータについては、空きブロックを確保することができるようになったときに、その空きブロックに転送される。   The user data stored in the system block is transferred to the empty block when the empty block can be secured.

次に、メモリコントローラ3が、書き込みを指示するアクセス指示により指定される領域のセクタ数に基づいて、ファイル管理データに対応する論理アドレスの範囲が属する論理ブロックを特定し、特定された論理ブロックを所定LBA範囲に対応する論理ブロック(所定LBA範囲の論理セクタ領域が属する論理ブロック)に設定する場合について説明する。   Next, the memory controller 3 identifies the logical block to which the logical address range corresponding to the file management data belongs based on the number of sectors in the area specified by the access instruction that instructs writing, and the identified logical block is A case will be described in which a logical block corresponding to a predetermined LBA range (a logical block to which a logical sector area within a predetermined LBA range belongs) is set.

メモリコントローラ3のホストインターフェースブロック7は、ホストシステム4からアクセス可能な各種のレジスタ(以下、「ホストインターフェースレジスタ」と言う)を備えている。ホストシステム4からメモリコントローラ3に与えられるアクセス指示は、このホストインターフェースレジスタに書き込まれる。ホストシステム4がメモリコントローラ3に対してデータの書き込みを指示する場合には、「データの書き込みを指示する外部コマンド」、「先頭データの書き込みを指示するLBA」及び「データを書き込む領域のセクタ数(書き込むデータの容量に対応するセクタ数)」がホストインターフェースレジスタに書き込まれる。   The host interface block 7 of the memory controller 3 includes various registers accessible from the host system 4 (hereinafter referred to as “host interface registers”). An access instruction given from the host system 4 to the memory controller 3 is written in the host interface register. When the host system 4 instructs the memory controller 3 to write data, “external command for instructing data writing”, “LBA for instructing writing of head data”, and “number of sectors in the data writing area” (The number of sectors corresponding to the capacity of data to be written) "is written to the host interface register.

本実施形態では、ホストインターフェースレジスタに書き込まれる「データを書き込む領域のセクタ数(書き込むデータの容量に対応するセクタ数)」に基づいて、アクセス指示と共に与えられるユーザーデータがファイルデータであるか、又はファイル管理データであるかが判別される。この判別を行うため、ホストインターフェースレジスタに書き込まれる「データを書き込む領域のセクタ数(書き込むデータの容量に対応するセクタ数)」に対して閾値(以下、「セクタ数設定値」と言う)が設定される。メモリコントローラ3は、「データを書き込む領域のセクタ数(書き込むデータの容量に対応するセクタ数)」がセクタ数設定値以上の場合には、ホストシステムから与えられるユーザーデータがファイルデータであると判断し、セクタ数設定値より小さい場合には、アクセス指示と共に与えられるユーザーデータがファイル管理データであると判断する。   In the present embodiment, the user data given together with the access instruction is file data based on “the number of sectors in the data writing area (the number of sectors corresponding to the capacity of the data to be written)” written in the host interface register, or It is determined whether it is file management data. In order to make this determination, a threshold value (hereinafter referred to as “sector number setting value”) is set for “the number of sectors in the data writing area (the number of sectors corresponding to the capacity of the data to be written)” written in the host interface register. Is done. The memory controller 3 determines that the user data provided from the host system is file data when “the number of sectors in the data writing area (the number of sectors corresponding to the capacity of the data to be written)” is equal to or larger than the sector number setting value. If it is smaller than the sector number setting value, it is determined that the user data given together with the access instruction is file management data.

ここで、アクセス指示と共に与えられるユーザーデータがファイルデータであれば、クラスタ単位でデータの書き込みが行われるため、セクタ数設定値はクラスタのセクタ数に合わせて設定されることが好ましい。但し、セクタ数設定値がクラスタのセクタ数よりも小さい値であっても構わない。例えば、クラスタのセクタ数が8セクタの場合に、セクタ数設定値が“4”であっても構わない。   Here, if the user data given together with the access instruction is file data, the data is written in units of clusters, so the sector number setting value is preferably set in accordance with the number of sectors in the cluster. However, the sector number setting value may be smaller than the cluster sector number. For example, when the number of sectors in the cluster is 8, the sector number setting value may be “4”.

次に、ファイル管理データに対応する論理アドレスの範囲が属する論理ブロックを特定するために使用されるテーブル(以下、「小容量書き込み管理テーブル」と言う)について図9を参照して説明する。図9に示した小容量書き込み管理テーブルには、それぞれの論理ブロックがファイル管理データに対応する論理アドレスの範囲が属する論理ブロックであるか否かを示す設定フラグと、セクタ数設定値より小さいセクタ数のデータの書き込みが指示された回数(以下、「小容量書き込み指示回数」と言う)とが書き込まれる。小容量書き込み管理テーブルに書き込まれる設定フラグと小容量書き込み指示回数は、各LBNに関連付けられている。設定フラグの“0”は、その論理ブロックがファイル管理データに対応する論理アドレスの範囲が属する論理ブロックでないことを示し、設定フラグの“1”は、その論理ブロックがファイル管理データに対応する論理アドレスの範囲が属する論理ブロックであることを示している。   Next, a table used for specifying a logical block to which a logical address range corresponding to file management data belongs (hereinafter referred to as “small capacity write management table”) will be described with reference to FIG. The small capacity write management table shown in FIG. 9 includes a setting flag indicating whether each logical block is a logical block to which a logical address range corresponding to file management data belongs, and a sector smaller than the sector number setting value. The number of times data writing is instructed (hereinafter referred to as “small capacity writing instructing frequency”) is written. The setting flag written to the small-capacity write management table and the small-capacity write instruction count are associated with each LBN. The setting flag “0” indicates that the logical block is not the logical block to which the logical address range corresponding to the file management data belongs, and the setting flag “1” indicates that the logical block corresponds to the file management data. It indicates that the logical block belongs to the address range.

尚、この小容量書き込み管理テーブルもSRAM8上で作成又は更新され、他のテーブルと同様に、この小容量書き込み管理テーブルに割り当てられたシステムブロックに保存される。従って、この小容量書き込み管理テーブルがシステムブロックに保存されていないときには、設定フラグが“0”に設定され小容量書き込み指示回数が“0”に設定された小容量書き込み管理テーブル(図9(a)参照)が、SRAM8上に作成され、作成された小容量書き込み管理テーブルは、システムブロックに保存される。   This small-capacity write management table is also created or updated on the SRAM 8, and is stored in the system block assigned to this small-capacity write management table, as with other tables. Therefore, when this small-capacity write management table is not stored in the system block, the small-capacity write management table (FIG. 9A) in which the setting flag is set to “0” and the small-capacity write instruction count is set to “0”. )) Is created on the SRAM 8 and the created small capacity write management table is stored in the system block.

ホストシステム4から書き込みを指示するアクセス指示が与えられたとき、つまり、ホストインターフェースレジスタに「データの書き込みを指示する外部コマンド」が書き込まれたとき、メモリコントローラ3は、その外部コマンドと共にホストインターフェースレジスタに書き込まれた「データを書き込む領域のセクタ数(書き込むデータの容量に対応するセクタ数)」がセクタ数設定値より小さいか否かを判断する。セクタ数設定値より小さいと判断した場合、メモリコントローラ3は、更に、その外部コマンドに対応するデータの書き込み先の領域が属する論理ブロックを特定する。つまり、この処理では、セクタ数設定値より小さいセクタ数のデータの書き込みが指示された領域が属する論理ブロックが特定される。例えば、セクタ数設定値が“4”の場合に、ホストインターフェースレジスタにデータの書き込みを指示する外部コマンドと共に、先頭データの書き込みを指示するLBAとして“512”が、データを書き込む領域のセクタ数(書き込むデータの容量に対応するセクタ数)として“1”が書き込まれたときは、LBN#2の論理ブロックがセクタ数設定値より小さいセクタ数のデータの書き込みが指示された領域が属する論理ブロックとして特定される。   When an access instruction for instructing writing is given from the host system 4, that is, when an "external command for instructing data writing" is written in the host interface register, the memory controller 3 sends the host interface register together with the external command. It is determined whether or not “the number of sectors in the area in which data is written (the number of sectors corresponding to the capacity of the data to be written)” written in is smaller than the sector number setting value. If it is determined that the value is smaller than the sector number setting value, the memory controller 3 further specifies the logical block to which the data write destination area corresponding to the external command belongs. That is, in this process, the logical block to which the area instructed to write the data having the sector number smaller than the sector number setting value belongs is specified. For example, when the sector number setting value is “4”, “512” is set as the LBA for instructing the writing of the head data together with the external command for instructing the host interface register to write the data. When “1” is written as the number of sectors corresponding to the capacity of the data to be written), the logical block of LBN # 2 is the logical block to which the area instructed to write the data with the sector number smaller than the sector number setting value belongs. Identified.

小容量書き込み管理テーブルは、セクタ数設定値より小さいセクタ数のデータの書き込みが指示された領域が属する論理ブロックが特定されたときに更新される。この更新処理では、小容量書き込み管理テーブル上の、セクタ数設定値より小さいセクタ数のデータの書き込みが指示された領域が属する論理ブロックのLBNに関連付けられている小容量書き込み指示回数が1回増やされる。例えば、セクタ数設定値より小さいセクタ数のデータの書き込みが指示された領域が属する論理ブロックがLBN#2の論理ブロックである場合、小容量書き込み管理テーブル上のLBN#2に関連付けられている小容量書き込み指示回数が“10”であったとすれば、その小容量書き込み指示回数が“11”に書き換えられる。   The small-capacity write management table is updated when a logical block to which an area instructed to write data having a sector number smaller than the sector number set value belongs is specified. In this update process, the small-capacity write instruction count associated with the LBN of the logical block to which the area instructed to write data having a sector number smaller than the sector count setting value on the small-capacity write management table is increased by one. It is. For example, if the logical block to which the area instructed to write data with a sector number smaller than the sector number setting value belongs is the logical block of LBN # 2, the small block associated with LBN # 2 on the small-capacity write management table. If the capacity write instruction count is “10”, the small capacity write instruction count is rewritten to “11”.

本実施形態では、小容量書き込み管理テーブル上の小容量書き込み指示回数に対しても閾値(以下、「書き込み回数設定値」と言う)が設けられている。そして、小容量書き込み管理テーブル上のいずれかの小容量書き込み指示回数が書き込み回数設定値以上になったときには、その小容量書き込み指示回数に関連付けられているLBNの論理ブロック
が、所定LBA範囲に対応する論理ブロック(所定LBA範囲の論理セクタ領域が属する論理ブロック)に設定される。また、その論理ブロックのLBNに関連付けられている設定フラグが“0”から“1”に書き換えられる。例えば、書き込み回数設定値が“128”に設定されている場合に、LBN#2に関連付けられている小容量書き込み指示回数が“128”に達したときには、LBN#2の論理ブロックが、所定LBA範囲に対応する論理ブロック(所定LBA範囲の論理セクタ領域が属する論理ブロック)に設定される。また、LBN#2に関連付けられている設定フラグが“0”から“1”に書き換えられる(図9(b)参照)。
In the present embodiment, a threshold value (hereinafter referred to as “write count setting value”) is also provided for the small-capacity write instruction count on the small-capacity write management table. When any of the small-capacity write instruction counts on the small-capacity write management table becomes equal to or larger than the write count setting value, the LBN logical block associated with the small-capacity write instruction count corresponds to the predetermined LBA range. To a logical block (a logical block to which a logical sector area within a predetermined LBA range belongs). In addition, the setting flag associated with the LBN of the logical block is rewritten from “0” to “1”. For example, when the write count setting value is set to “128” and the small capacity write instruction count associated with LBN # 2 reaches “128”, the logical block of LBN # 2 A logical block corresponding to a range (a logical block to which a logical sector area in a predetermined LBA range belongs) is set. Also, the setting flag associated with LBN # 2 is rewritten from “0” to “1” (see FIG. 9B).

次に、ファイル管理データに対応するLBAの範囲が、ホストシステム4側で変更された場合について説明する。このような変更が行われた場合、ファイル管理データに対応するLBAの範囲を含んでいる論理ブロックが、異なる論理ブロックになってしまうことがある。このよう場合、メモリコントローラ3は、所定LBA範囲に対応する論理ブロック(所定LBA範囲の論理セクタ領域が属する論理ブロック)を再設定する必要がある。   Next, a case where the LBA range corresponding to the file management data is changed on the host system 4 side will be described. When such a change is made, the logical block including the LBA range corresponding to the file management data may become a different logical block. In such a case, the memory controller 3 needs to reset the logical block corresponding to the predetermined LBA range (the logical block to which the logical sector area in the predetermined LBA range belongs).

従って、メモリコントローラ3は、ファイル管理データに対応するLBAの範囲に対応する論理セクタ領域を含まなくなってしまった論理ブロックを特定し、その論理ブロックに対する設定を解除する(所定LBA範囲に対応する論理ブロック(所定LBA範囲の論理セクタ領域が属する論理ブロック)としての設定を解除する)必要がある。   Therefore, the memory controller 3 identifies the logical block that no longer includes the logical sector area corresponding to the LBA range corresponding to the file management data, and cancels the setting for the logical block (the logical block corresponding to the predetermined LBA range). It is necessary to cancel the setting as a block (a logical block to which a logical sector area within a predetermined LBA range belongs).

次に、図9に示したような小容量書き込み管理テーブルを用いて、メモリコントローラ3が、ファイル管理データに対応するLBAの範囲を含まなくなってしまった論理ブロックを特定し、その論理ブロックに対する設定を解除する(所定LBA範囲に対応する論理ブロック(所定LBA範囲の論理セクタ領域が属する論理ブロック)としての設定を解除する)動作について説明する。   Next, using the small-capacity write management table as shown in FIG. 9, the memory controller 3 identifies the logical block that no longer includes the LBA range corresponding to the file management data, and sets the logical block. Will be described (the setting as a logical block corresponding to a predetermined LBA range (a logical block to which a logical sector area in the predetermined LBA range belongs)) is released.

この例では、メモリコントローラ3が、所定期間毎(例えば、ホストシステムからデータの書き込み指示を所定回数与えられる毎)に、小容量書き込み管理テーブル上の全ての小容量書き込み指示回数を“0”に戻すリセット処理を実行する(図9(c)参照)。従って、このリセット処理を実行する際に、それぞれLBNに関連付けられている小容量書き込み指示回数は、所定期間中にセクタ数設定値より小さいセクタ数のデータの書き込みが指示され回数に対応する。   In this example, the memory controller 3 sets all the small-capacity write instruction counts on the small-capacity write management table to “0” every predetermined period (for example, every time a data write instruction is given from the host system). A reset process for returning is executed (see FIG. 9C). Therefore, when this reset process is executed, the number of small capacity write instructions associated with each LBN corresponds to the number of times of writing data having a sector number smaller than the sector number set value during a predetermined period.

メモリコントローラ3は、このリセット処理を実行する際に、設定フラグが“1”に設定されているLBNに関連付けられている小容量書き込み指示回数を参照し、小容量書き込み指示回数が“0”であった場合は、そのLBNの書き込み設定フラグを“0”に変更する。つまり、そのLBNの論理ブロックについて、所定LBA範囲に対応する論理ブロック(所定LBA範囲の論理セクタ領域が属する論理ブロック)としての設定が解除される。   When the memory controller 3 executes this reset process, the memory controller 3 refers to the small capacity write instruction count associated with the LBN whose setting flag is set to “1”, and the small capacity write instruction count is “0”. If there is, the write setting flag of the LBN is changed to “0”. That is, the setting of the logical block of the LBN as the logical block corresponding to the predetermined LBA range (the logical block to which the logical sector area of the predetermined LBA range belongs) is released.

メモリコントローラ3がこのように動作することにより、所定期間中にセクタ数設定値より小さいセクタ数のデータの書き込みが指示されなかった論理ブロックについては、所定LBA範囲に対応する論理ブロック(所定LBA範囲の論理セクタ領域が属する論理ブロック)としての設定が解除される。   As a result of the memory controller 3 operating in this manner, a logical block corresponding to a predetermined LBA range (predetermined LBA range) for a logical block that is not instructed to write data having a sector number smaller than the sector number set value during a predetermined period. The setting as the logical block to which the logical sector area belongs is released.

尚、リセット処理を実行する際に、設定フラグが“1”に設定されているLBNに関連付けられている小容量書き込み指示回数が、予め定められていた回数より少なかった場合に、そのLBNの書き込み設定フラグが“0”に変更されるようにしてもよい。このようにした場合には、所定期間中にセクタ数設定値より小さいセクタ数のデータの書き込みが指示された回数が所定回数より少なかった論理ブロックについては、所定LBA範囲に対応する論理ブロック(所定LBA範囲の論理セクタ領域が属する論理ブロック)としての設定が解除される。   When executing the reset process, if the number of small-capacity write instructions associated with the LBN for which the setting flag is set to “1” is less than a predetermined number, the write of the LBN is performed. The setting flag may be changed to “0”. In this case, a logical block corresponding to a predetermined LBA range (predetermined for a logical block in which the number of times of writing data of a sector number smaller than the sector number setting value is instructed during the predetermined period is less than the predetermined number of times. The setting as the logical block to which the logical sector area in the LBA range belongs is canceled.

尚、いずれかの論理ブロックが割り当てられている物理ブロック内の冗長領域には、その物理ブロックに対応する論理ブロックに関する設定フラグ及び小容量書き込み指示回数が書き込まれることが好ましい。   Note that it is preferable that a setting flag and a small-capacity write instruction count regarding the logical block corresponding to the physical block are written in the redundant area in the physical block to which any logical block is allocated.

以上、本発明の実施形態を説明したが、これは本発明の説明のための例示であって、本発明の範囲をこの実施形態にのみ限定する趣旨ではない。本発明の要旨を逸脱しない範囲内において種々変更を加え得ることは勿論である。例えば、システムブロックに保存されるシステムデータは、各種のテーブルやファームウェア以外の情報であってもよい。また、ファイル管理データ以外の重要データに対応するLBAの範囲を含んでいる論理ブロックを、所定LBA範囲に対応する論理ブロック(所定LBA範囲の論理セクタ領域が属する論理ブロック)に設定してもよい。また、仮想ブロックを構成しない場合であっても本発明を実施することができる。   As mentioned above, although embodiment of this invention was described, this is an illustration for description of this invention, Comprising: It is not the meaning which limits the scope of the present invention only to this embodiment. Of course, various modifications can be made without departing from the scope of the present invention. For example, the system data stored in the system block may be information other than various tables and firmware. Also, a logical block including an LBA range corresponding to important data other than file management data may be set as a logical block corresponding to a predetermined LBA range (a logical block to which a logical sector area within a predetermined LBA range belongs). . Further, the present invention can be implemented even when a virtual block is not configured.

本発明の一実施形態によるフラッシュメモリシステムの概略構成を示すブロック図である。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 group. 不良ブロックテーブルの構成例を示す図である。It is a figure which shows the structural example of a bad block table. 論理グループとアドレス変換テーブルの対応関係を示す図である。It is a figure which shows the correspondence of a logical group and an address conversion table. アドレス変換テーブル#0の構成例を示す図である。It is a figure which shows the structural example of address conversion table # 0. 空きブロックテーブルの構成例を示す図である。It is a figure which shows the structural example of an empty block table. 図7Aは、不良ブロックテーブル格納領域情報の構成例を示す図である。図7Bは、アドレス変換テーブル格納領域情報の構成例を示す図である。図7Cは、空きブロックテーブル格納領域情報の構成例を示す図である。FIG. 7A is a diagram illustrating a configuration example of bad block table storage area information. FIG. 7B is a diagram illustrating a configuration example of address conversion table storage area information. FIG. 7C is a diagram illustrating a configuration example of empty block table storage area information. 予備ブロック情報の構成例を示す図である。It is a figure which shows the structural example of spare block information. 小容量書き込み管理テーブルを説明するための図である。It is a figure for demonstrating a small capacity write management table.

符号の説明Explanation of symbols

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

Claims (9)

ホストシステムから与えられるアクセス指示に従って、物理ブロック単位で消去が行われるフラッシュメモリに対するアクセスを制御するメモリコントローラであって、
前記フラッシュメモリ内の物理ブロックを、前記フラッシュメモリに対するアクセスを制御又は管理するためのシステムデータの保存先として使用するシステムブロックとして予約する予約手段と、
前記予約手段により予約された前記システムブロックに対して前記システムデータを書き込むシステムデータ書き込み手段と、
前記システムブロックとして予約されていない前記フラッシュメモリ内の物理ブロックであって、有効なデータが記憶されていない空きブロックを検索する空きブロック検索手段と、
前記アクセス指示により指定される論理アドレスが割り当てられているセクタ単位の領域が複数個含まれる論理ブロックに対して、前記空きブロック検索手段により検出された前記空きブロックを割り当てる物理ブロック割り当て手段と、
前記アクセス指示により指定される前記論理アドレスが属する前記論理ブロックと対応する物理ブロックに、前記アクセス指示と共に与えられるデータを書き込むデータ書き込み手段と、
前記アクセス指示により指定される前記論理アドレスが属する前記論理ブロックが、所定の前記論理ブロックに該当するか否かを判断する判断手段と、
を備え、
前記物理ブロック割り当て手段は、いずれかの前記論理ブロックに対して前記空きブロックを割り当てるときに、前記空きブロック検索手段が前記空きブロックを検出することができなかった場合、前記判断手段が前記いずれかの前記論理ブロックが前記所定の前記論理ブロックに該当すると判断したときにだけ、前記いずれかの前記論理ブロックに対して、有効な前記システムデータが記憶されていない前記システムブロックを割り当てる
ことを特徴とするメモリコントローラ。
A memory controller that controls access to a flash memory that is erased in physical block units according to an access instruction given from a host system,
Reserving means for reserving a physical block in the flash memory as a system block used as a storage destination of system data for controlling or managing access to the flash memory;
System data writing means for writing the system data to the system block reserved by the reservation means;
A free block search means for searching for a free block in the flash memory that is not reserved as the system block and in which valid data is not stored;
Physical block allocating means for allocating the empty block detected by the empty block searching means to a logical block including a plurality of sector unit areas to which the logical address specified by the access instruction is allocated;
Data writing means for writing data given together with the access instruction to a physical block corresponding to the logical block to which the logical address specified by the access instruction belongs;
Determining means for determining whether the logical block to which the logical address specified by the access instruction belongs corresponds to the predetermined logical block;
With
When the physical block allocating unit allocates the vacant block to any of the logical blocks, and the vacant block searching unit cannot detect the vacant block, the determination unit is The system block in which valid system data is not stored is allocated to any one of the logical blocks only when it is determined that the logical block corresponds to the predetermined logical block. Memory controller.
前記ホストシステムから与えられる設定情報に基づいて前記所定の前記論理ブロックを設定する第1の設定手段を備え、
前記設定情報には、前記論理アドレスの範囲を指定する情報が含まれ、
前記第1の設定手段は、前記設定情報に含まれる前記論理アドレスの範囲が属する前記論理ブロックを前記所定の前記論理ブロックとして設定する
ことを特徴とする請求項1に記載のメモリコントローラ。
First setting means for setting the predetermined logical block based on setting information given from the host system;
The setting information includes information specifying a range of the logical address,
2. The memory controller according to claim 1, wherein the first setting unit sets the logical block to which the range of the logical address included in the setting information belongs as the predetermined logical block.
それぞれの前記論理ブロック内の領域に対する、所定セクタ数より少ない容量の領域を指定したデータの書き込みが、前記アクセス指示により指示される回数に基づいて、前記所定の前記論理ブロックを設定する第2の設定手段を備え、
前記第2の設定手段は、前記回数が所定回数以上の前記論理ブロックを前記所定の前記論理ブロックとして設定する
ことを特徴とする請求項1に記載のメモリコントローラ。
The second logical block is configured to set the predetermined logical block based on the number of times the data specifying the area having a capacity smaller than the predetermined number of sectors to the area in each logical block is instructed by the access instruction. Comprising setting means,
The memory controller according to claim 1, wherein the second setting unit sets the logical block having the number of times equal to or greater than a predetermined number as the predetermined logical block.
前記フラッシュメモリが複数個あり、
前記アクセス指示で指定されるアドレスが割り当てられているセクタ単位の領域が複数個含まれる論理ブロックと、異なる前記フラッシュメモリに含まれるアドレスが同一の物理ブロックを複数個集めた物理ブロック群との対応関係を管理するブロック管理手段、
を更に備え、
前記データ書き込み手段が、前記アクセス指示により指定される前記論理アドレスが属する前記論理ブロックと対応する前記物理ブロック群に、前記アクセス指示と共に与えられるデータを書き込み、
前記予約手段は、不良ブロックが含まれる前記物理ブロック群内の良品ブロックを、不良ブロックが含まれていない前記物理ブロック群内の物理ブロックよりも優先的に前記システムブロックとして予約する、
ことを特徴とする請求項1乃至3のうちのいずれか1項に記載のメモリコントローラ。
There are a plurality of the flash memories,
Correspondence between a logical block including a plurality of sector unit areas to which an address specified by the access instruction is allocated and a physical block group including a plurality of physical blocks having the same address included in different flash memories Block management means to manage the relationship,
Further comprising
The data writing means writes data given together with the access instruction to the physical block group corresponding to the logical block to which the logical address specified by the access instruction belongs;
The reservation means reserves a non-defective block in the physical block group including a defective block as the system block preferentially over a physical block in the physical block group that does not include a defective block.
The memory controller according to claim 1, wherein the memory controller is a memory controller.
請求項1乃至4のうちのいずれか1項に記載のメモリコントローラと、
前記メモリコントローラによってアクセス制御されるフラッシュメモリと、
を備えるフラッシュメモリシステム。
A memory controller according to any one of claims 1 to 4,
A flash memory whose access is controlled by the memory controller;
A flash memory system.
ホストシステムから与えられるアクセス指示に従って、物理ブロック単位で消去が行われるフラッシュメモリに対するアクセスを制御するフラッシュメモリの制御方法であって、
前記フラッシュメモリ内の物理ブロックを、前記フラッシュメモリに対するアクセスを制御又は管理するためのシステムデータの保存先として使用するシステムブロックとして予約する予約ステップと、
前記予約ステップにより予約された前記システムブロックに対して前記システムデータを書き込むシステムデータ書き込みステップと、
前記システムブロックとして予約されていない前記フラッシュメモリ内の物理ブロックであって、有効なデータが記憶されていない空きブロックを検索する空きブロック検索ステップと、
前記アクセス指示により指定される論理アドレスが割り当てられているセクタ単位の領域が複数個含まれる論理ブロックに対して、前記空きブロック検索ステップにより検出された前記空きブロックを割り当てる物理ブロック割り当てステップと、
前記アクセス指示により指定される前記論理アドレスが属する前記論理ブロックと対応する物理ブロックに、前記アクセス指示と共に与えられるデータを書き込むデータ書き込みステップと、
前記アクセス指示により指定される前記論理アドレスが属する前記論理ブロックが、所定の前記論理ブロックに該当するか否かを判断する判断ステップと、
を備え、
前記物理ブロック割り当てステップでは、いずれかの前記論理ブロックに対して前記空きブロックを割り当てるときに、前記空きブロック検索ステップにより前記空きブロックを検出することができなかった場合、前記判断ステップにより前記いずれかの前記論理ブロックが前記所定の前記論理ブロックに該当すると判断されたときにだけ、前記いずれかの前記論理ブロックに対して、有効な前記システムデータが記憶されていない前記システムブロックが割り当てられる
ことを特徴とするフラッシュメモリの制御方法。
A flash memory control method for controlling access to a flash memory to be erased in units of physical blocks in accordance with an access instruction given from a host system,
A reservation step of reserving a physical block in the flash memory as a system block used as a storage destination of system data for controlling or managing access to the flash memory;
A system data writing step of writing the system data to the system block reserved by the reservation step;
A free block search step for searching for a free block in the flash memory that is not reserved as the system block and in which valid data is not stored;
A physical block allocation step for allocating the empty block detected by the empty block search step to a logical block including a plurality of sector unit areas to which a logical address specified by the access instruction is allocated;
A data writing step of writing data given together with the access instruction to a physical block corresponding to the logical block to which the logical address specified by the access instruction belongs;
A determination step of determining whether the logical block to which the logical address specified by the access instruction belongs corresponds to the predetermined logical block;
With
In the physical block allocation step, when the free block cannot be detected by the free block search step when the free block is allocated to any of the logical blocks, the determination step determines any of the above Only when it is determined that the logical block of the system corresponds to the predetermined logical block, the system block in which valid system data is not stored is allocated to any of the logical blocks. A flash memory control method.
前記ホストシステムから与えられる設定情報に基づいて前記所定の前記論理ブロックを設定する第1の設定ステップを備え、
前記設定情報には、前記論理アドレスの範囲を指定する情報が含まれ、
前記第1の設定ステップでは、前記設定情報に含まれる前記論理アドレスの範囲が属する前記論理ブロックが前記所定の前記論理ブロックとして設定される
ことを特徴とする請求項6に記載のフラッシュメモリの制御方法。
A first setting step of setting the predetermined logical block based on setting information given from the host system;
The setting information includes information specifying a range of the logical address,
7. The flash memory control according to claim 6, wherein, in the first setting step, the logical block to which the range of the logical address included in the setting information belongs is set as the predetermined logical block. Method.
それぞれの前記論理ブロック内の領域に対する、所定セクタ数より少ない容量の領域を指定したデータの書き込みが、前記アクセス指示により指示される回数に基づいて、前記所定の前記論理ブロックを設定する第2の設定ステップを備え、
前記第2の設定ステップでは、前記回数が所定回数以上の前記論理ブロックが前記所定の前記論理ブロックとして設定される
ことを特徴とする請求項6に記載のフラッシュメモリの制御方法。
The second logical block is configured to set the predetermined logical block based on the number of times the data specifying the area having a capacity smaller than the predetermined number of sectors to the area in each logical block is instructed by the access instruction. With setup steps,
7. The flash memory control method according to claim 6, wherein, in the second setting step, the logical block having the predetermined number of times or more is set as the predetermined logical block.
前記フラッシュメモリが複数個あり、
前記アクセス指示で指定されるアドレスが割り当てられているセクタ単位の領域が複数個含まれる論理ブロックと、異なる前記フラッシュメモリに含まれるアドレスが同一の物理ブロックを複数個集めた物理ブロック群との対応関係を管理するブロック管理ステップ、
を更に備え、
前記データ書き込みステップでは、前記アクセス指示により指定される前記論理アドレスが属する前記論理ブロックと対応する前記物理ブロック群に、前記アクセス指示と共に与えられるデータが書き込まれ、
前記予約ステップでは、不良ブロックが含まれる前記物理ブロック群内の良品ブロックが、不良ブロックが含まれていない前記物理ブロック群内の物理ブロックよりも優先的に前記システムブロックとして予約される、
ことを特徴とする請求項6乃至8のうちのいずれか1項に記載のメモリコントローラ。
There are a plurality of the flash memories,
Correspondence between a logical block including a plurality of sector unit areas to which an address specified by the access instruction is allocated and a physical block group including a plurality of physical blocks having the same address included in different flash memories Block management steps to manage relationships,
Further comprising
In the data writing step, data given together with the access instruction is written to the physical block group corresponding to the logical block to which the logical address specified by the access instruction belongs,
In the reservation step, a non-defective block in the physical block group including a defective block is reserved as the system block preferentially over a physical block in the physical block group not including a defective block.
The memory controller according to claim 6, wherein the memory controller is a memory controller.
JP2008189052A 2008-07-22 2008-07-22 MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD Expired - Fee Related JP4840415B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008189052A JP4840415B2 (en) 2008-07-22 2008-07-22 MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008189052A JP4840415B2 (en) 2008-07-22 2008-07-22 MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD

Publications (2)

Publication Number Publication Date
JP2010026878A true JP2010026878A (en) 2010-02-04
JP4840415B2 JP4840415B2 (en) 2011-12-21

Family

ID=41732639

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008189052A Expired - Fee Related JP4840415B2 (en) 2008-07-22 2008-07-22 MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD

Country Status (1)

Country Link
JP (1) JP4840415B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012104974A1 (en) * 2011-01-31 2012-08-09 三菱電機株式会社 Memory controller
JP2013190959A (en) * 2012-03-13 2013-09-26 Mega Chips Corp Semiconductor memory reuse processor and semiconductor memory
JP2013190960A (en) * 2012-03-13 2013-09-26 Mega Chips Corp Semiconductor memory reuse processor and semiconductor memory

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09134312A (en) * 1995-11-08 1997-05-20 Olympus Optical Co Ltd Flash memory device
JP2007286892A (en) * 2006-04-17 2007-11-01 Tdk Corp Memory controller and flash memory system
JP2009199242A (en) * 2008-02-20 2009-09-03 Tdk Corp Memory controller, flash memory system equipped with memory controller, and control method for flash memory
JP2009245163A (en) * 2008-03-31 2009-10-22 Tdk Corp Memory controller, flash memory system having memory controller and control method for flash memory

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09134312A (en) * 1995-11-08 1997-05-20 Olympus Optical Co Ltd Flash memory device
JP2007286892A (en) * 2006-04-17 2007-11-01 Tdk Corp Memory controller and flash memory system
JP2009199242A (en) * 2008-02-20 2009-09-03 Tdk Corp Memory controller, flash memory system equipped with memory controller, and control method for flash memory
JP2009245163A (en) * 2008-03-31 2009-10-22 Tdk Corp Memory controller, flash memory system having memory controller and control method for flash memory

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012104974A1 (en) * 2011-01-31 2012-08-09 三菱電機株式会社 Memory controller
CN103354926A (en) * 2011-01-31 2013-10-16 三菱电机株式会社 Memory controller
JP5452735B2 (en) * 2011-01-31 2014-03-26 三菱電機株式会社 Memory controller and memory access method
US9286204B2 (en) 2011-01-31 2016-03-15 Mitsubishi Electric Corporation Memory controller
JP2013190959A (en) * 2012-03-13 2013-09-26 Mega Chips Corp Semiconductor memory reuse processor and semiconductor memory
JP2013190960A (en) * 2012-03-13 2013-09-26 Mega Chips Corp Semiconductor memory reuse processor and semiconductor memory

Also Published As

Publication number Publication date
JP4840415B2 (en) 2011-12-21

Similar Documents

Publication Publication Date Title
JP4844639B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4666080B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4632180B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP5525605B2 (en) Flash memory module
JP4702387B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
US8239615B2 (en) Memory controller, flash memory system with memory controller, and method of controlling flash memory
JP2009064251A (en) Semiconductor storage device, and method of controlling semiconductor storage device
WO2009118917A1 (en) Storage device using flash memory
JP4666081B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
US20140075099A1 (en) Control method and memory system of non-volatile semiconductor memory
JP5093294B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP2023044518A (en) Memory system and method
JP4737223B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP2009015364A (en) Memory controller, flash memory system with memory controller and control method for flash memory
JP4840415B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4582232B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4720891B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4710918B2 (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
JP4636046B2 (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
JP4952742B2 (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
JP4760826B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4661809B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110630

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110705

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110811

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

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

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4840415

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20141014

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees