JP4866114B2 - MEMORY CONTROLLER, NONVOLATILE MEMORY DEVICE, NONVOLATILE MEMORY SYSTEM, AND MEMORY CONTROL METHOD - Google Patents

MEMORY CONTROLLER, NONVOLATILE MEMORY DEVICE, NONVOLATILE MEMORY SYSTEM, AND MEMORY CONTROL METHOD Download PDF

Info

Publication number
JP4866114B2
JP4866114B2 JP2006071019A JP2006071019A JP4866114B2 JP 4866114 B2 JP4866114 B2 JP 4866114B2 JP 2006071019 A JP2006071019 A JP 2006071019A JP 2006071019 A JP2006071019 A JP 2006071019A JP 4866114 B2 JP4866114 B2 JP 4866114B2
Authority
JP
Japan
Prior art keywords
block
management block
management
blocks
data
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.)
Expired - Fee Related
Application number
JP2006071019A
Other languages
Japanese (ja)
Other versions
JP2007249508A (en
Inventor
重一 小来田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
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 Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP2006071019A priority Critical patent/JP4866114B2/en
Publication of JP2007249508A publication Critical patent/JP2007249508A/en
Application granted granted Critical
Publication of JP4866114B2 publication Critical patent/JP4866114B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、書換え可能な不揮発性メモリをデータ記憶媒体として有する半導体メモリカード等の不揮発性記憶装置と、これに内蔵されるメモリコントローラと、さらに、アクセス装置を構成要素に加えた不揮発性記憶システム、及びメモリコントローラにおけるメモリ制御方法とに関するものである。   The present invention relates to a nonvolatile storage device such as a semiconductor memory card having a rewritable nonvolatile memory as a data storage medium, a memory controller incorporated therein, and a nonvolatile storage system in which an access device is added as a component. And a memory control method in the memory controller.

書き換え可能な不揮発性メモリを備えた不揮発性記憶装置は、半導体メモリカードを中心に広く用いられており、この半導体メモリカードを使った不揮発性記憶装置は、デジタルスチルカメラやパーソナルコンピュータ等と組み合わせた不揮発性記憶システムとして、その需要が広まっている。現在様々な種類の半導体メモリカードが存在している。   Nonvolatile storage devices having a rewritable nonvolatile memory are widely used mainly for semiconductor memory cards. Nonvolatile storage devices using this semiconductor memory card are combined with a digital still camera, a personal computer, or the like. The demand for non-volatile storage systems is increasing. Currently, there are various types of semiconductor memory cards.

メモリカードは、データを記憶するフラッシュメモリと、それを制御するメモリコントローラLSIとから構成されている。メモリコントローラLSIは、デジタルスチルカメラ等のアクセス装置の読み書き指示に対応して、フラッシュメモリへのデータの読み書きを制御するデバイスである。フラッシュメモリは、代表的なものにNANDタイプやANDタイプなどがある。   The memory card includes a flash memory that stores data and a memory controller LSI that controls the flash memory. The memory controller LSI is a device that controls reading and writing of data to and from the flash memory in response to reading and writing instructions of an access device such as a digital still camera. Typical flash memories include NAND type and AND type.

これらのメモリチップの中には、データの消去単位となるブロックが複数存在しており、さらにひとつのブロック内には、データの書き込み単位となるページが複数存在している。即ち、書込み単位であるページのサイズは、消去単位であるブロックのサイズよりも小さい。また、フラッシュメモリは、書込みと消去を繰り返すにつれて読み出しや書込みが不能となった不良ブロックが増加するので、発生した不良ブロックを回避しつつフラッシュメモリの使用を続ける必要がある。不良ブロックを回避する方法としては、特許文献1に開示されたような方法がある。   In these memory chips, there are a plurality of blocks serving as data erasing units, and there are a plurality of pages serving as data writing units in one block. That is, the size of the page that is the writing unit is smaller than the size of the block that is the erasing unit. In addition, since the number of defective blocks that cannot be read or written increases as writing and erasing are repeated in the flash memory, it is necessary to continue using the flash memory while avoiding the generated defective blocks. As a method for avoiding a bad block, there is a method as disclosed in Patent Document 1.

この方法は、まずエラーが発生すると元のエラー情報に新しいエラーの情報を加えてエラー情報を更新する。次に、エラー情報を格納しているエラー情報領域を一旦消去してから、更新されたエラー情報をエラー情報領域に書き込む。このようにエラー情報の書換えを行なって不良ブロックの使用を回避している。
特許第3609739号
In this method, when an error occurs, new error information is added to the original error information to update the error information. Next, the error information area storing the error information is once erased, and the updated error information is written in the error information area. In this way, error information is rewritten to avoid the use of defective blocks.
Patent No. 36060939

書込み単位であるページにページの容量より小さいデータを書き込むと、そのページには、データが書き込まれていない空白の部分が生じる。この空白の部分を有効利用するには、ページの容量を満たすまで、空白の部分にデータを書き足せばよい。しかし実際には、フラッシュメモリの特性を考慮して同一ページへデータを書き足せる回数には上限が決められている。   When data smaller than the page capacity is written to a page which is a unit of writing, a blank portion where no data is written is generated on the page. In order to make effective use of this blank portion, data can be added to the blank portion until the page capacity is satisfied. However, in practice, an upper limit is set for the number of times data can be written to the same page in consideration of the characteristics of the flash memory.

特許文献1のような構成では、エラー情報領域がフラッシュメモリ上に1箇所しか確保されていないので、エラー情報領域のエラー情報の更新の手順は、まず既にあるエラー情報を消去してから、新しく更新されたエラー情報を書き込むようになっている。このような更新の手順では、消去もしくは書き込みの途中でエラーが発生したり、外的要因により電源遮断が発生したりすると、消去前にエラー情報領域に存在した直前のエラー情報が既に失われてしまっているので、エラー情報を復旧することができなくなってしまう。   In the configuration as in Patent Document 1, since only one error information area is secured on the flash memory, the procedure for updating error information in the error information area is to first delete the existing error information, and then update the error information area. The updated error information is written. In such an update procedure, if an error occurs during erasing or writing, or if the power is cut off due to an external factor, the previous error information that existed in the error information area before erasing is already lost. As a result, the error information cannot be recovered.

上述のような電源遮断によるエラー情報の消失を防ぐために、エラー情報領域のデータを消失することなくエラー情報を書き足す方法が考えられる。しかし、エラー情報領域の1つの書込み単位であるページの容量に対して、エラー情報が非常に小さいため上限の回数までエラー情報を書き足してもエラー情報はページの容量を満たさないのでデータが書き込まれていない空白の部分が生じてしまう。このように、フラッシュメモリの容量に含まれるエラー情報領域の容量は有効に利用されていない。   In order to prevent the loss of error information due to power interruption as described above, a method of adding error information without losing data in the error information area is conceivable. However, since the error information is very small compared to the page capacity that is one writing unit in the error information area, even if the error information is added up to the maximum number of times, the error information does not satisfy the page capacity, so the data is written. An empty space is generated. As described above, the capacity of the error information area included in the capacity of the flash memory is not effectively used.

本発明は、エラー情報の格納の際に不揮発性メモリの容量を有効に利用することと、エラー情報の更新の際にエラーや電源遮断が発生しても既に書き込まれている直前のエラー情報を失わないようにすることとを目的としている。   The present invention makes effective use of the capacity of the nonvolatile memory when storing error information, and the error information immediately before being written even if an error or power interruption occurs when updating the error information. The purpose is not to lose.

この課題を解決するため、本発明のメモリコントローラは、データの消去単位であるブロックを複数有し、前記ブロックはデータを保持する複数のデータブロックと、前記複数のブロック中の不良ブロックのアドレスを登録する複数の管理ブロックとを含む不揮発性メモリに対してデータの書き込み及び読み出しを制御するメモリコントローラであって、
前記複数の管理ブロック中の不良ブロックとしてアドレスが登録されたブロックを除いて1つずつ巡回的に管理ブロックを取得して、新たに発生した不良ブロックのアドレスを当該取得した管理ブロックに登録する制御部を有することを特徴とするものである。
In order to solve this problem, the memory controller according to the present invention has a plurality of blocks which are data erasing units, and the block has a plurality of data blocks holding data and addresses of defective blocks in the plurality of blocks. A memory controller that controls writing and reading of data to and from a nonvolatile memory including a plurality of management blocks to be registered,
Control that acquires management blocks cyclically one by one except for blocks whose addresses are registered as defective blocks in the plurality of management blocks, and registers the addresses of newly generated defective blocks in the acquired management blocks It has the part.

この課題を解決するため、本発明の不揮発性記憶装置は、データの消去単位であるブロックを複数有し、前記ブロックはデータを保持する複数のデータブロックと、前記複数のブロック中の不良ブロックのアドレスを登録する複数の管理ブロックとを含む不揮発性メモリと、前記不揮発性メモリに対してデータの書き込み及び読み出しを制御するメモリコントローラと、を具備する不揮発性記憶装置であって、前記メモリコントローラは、前記複数の管理ブロック中の不良ブロックとしてアドレスが登録されたブロックを除いて1つずつ巡回的に管理ブロックを取得して、新たに発生した不良ブロックのアドレスを当該取得した管理ブロックに登録する制御部を有することを特徴とするものである。   In order to solve this problem, a nonvolatile memory device according to the present invention includes a plurality of blocks that are data erasing units, and the blocks include a plurality of data blocks that hold data and defective blocks in the plurality of blocks. A non-volatile memory device comprising: a non-volatile memory including a plurality of management blocks for registering addresses; and a memory controller that controls writing and reading of data to and from the non-volatile memory, wherein the memory controller is The management block is acquired cyclically one by one except for the block in which the address is registered as a defective block in the plurality of management blocks, and the address of the newly generated defective block is registered in the acquired management block. It has a control part.

この課題を解決するため、本発明の不揮発性記憶システムは、データの消去単位であるブロックを複数有し、前記ブロックはデータを保持する複数のデータブロックと、前記複数のブロック中の不良ブロックのアドレスを登録する複数の管理ブロックとを含む不揮発性メモリと、前記不揮発性メモリに対してデータの書き込み及び読み出しを制御するメモリコントローラと、前記メモリコントローラに対して、前記不揮発性メモリへのデータの書き込みと読み出しとを指示するアクセス装置と、を具備する不揮発性記憶システムであって、前記メモリコントローラは、前記複数の管理ブロック中の不良ブロックとしてアドレスが登録されたブロックを除いて1つずつ巡回的に管理ブロックを取得して、新たに発生した不良ブロックのアドレスを当該取得した管理ブロックに登録する制御部を有することを特徴とするものである。   In order to solve this problem, the nonvolatile storage system of the present invention includes a plurality of blocks which are data erasing units, and the blocks include a plurality of data blocks holding data and defective blocks in the plurality of blocks. A non-volatile memory including a plurality of management blocks for registering addresses; a memory controller that controls writing and reading of data to and from the non-volatile memory; and An access device for instructing writing and reading, wherein the memory controller cycles through each of the plurality of management blocks except for a block in which an address is registered as a defective block. Newly acquired management block, and the address of the newly generated bad block It is characterized in that it has a control unit to be registered in the acquired management block.

ここで前記制御部は、不良ブロックのアドレスを前記複数の管理ブロックのうちの1つの管理ブロックに登録する際に、当該管理ブロックが不良ブロックとなった場合、当該管理ブロックに登録する予定であった前記不良ブロックのアドレスを含む全ての不良ブロックのアドレスを、巡回的に取得した別の管理ブロックに登録するようにしてもよい。   Here, when the address of the bad block is registered in one management block among the plurality of management blocks, the control unit is scheduled to register the management block in the management block if it becomes a bad block. The addresses of all the defective blocks including the addresses of the defective blocks may be registered in another management block acquired cyclically.

ここで前記制御部は、不良ブロックのアドレスを前記管理ブロックに登録する際に、当該管理ブロックが不良ブロックとなった場合、当該管理ブロックに登録する予定であった前記不良ブロックのアドレスを含む全ての不良ブロックのアドレスの登録を、巡回的に取得した別の管理ブロックに対して最大リトライ回数まで行なうようにしてもよい。   Here, when the address of the bad block is registered in the management block, the control unit, when the management block becomes a bad block, includes all the addresses of the bad block that were scheduled to be registered in the management block. Registration of the address of the defective block may be performed up to the maximum number of retries for another management block acquired cyclically.

ここで前記制御部は、前記複数の管理ブロックから最新のデータが存在する管理ブロックを検索する際、それぞれの管理ブロックにおいて登録されている不良ブロックの数を調べ、その数が最大の管理ブロックを最新のデータが存在する管理ブロックであると判断するようにしてもよい。   Here, when searching for a management block in which the latest data exists from the plurality of management blocks, the control unit checks the number of defective blocks registered in each management block, and determines the management block with the largest number. It may be determined that the management block includes the latest data.

ここで前記制御部は、前記管理ブロックに不良ブロックのアドレスを登録する際に不良ブロック数も書き込み、前記複数の管理ブロックから最新のデータが存在する管理ブロックを検索する際、前記管理ブロックに書き込まれている前記不良ブロック数から、最新のデータが存在する管理ブロックを判断するようにしてもよい。   Here, the control unit also writes the number of defective blocks when registering the address of the defective block in the management block, and writes to the management block when searching for a management block having the latest data from the plurality of management blocks. The management block in which the latest data exists may be determined from the number of defective blocks.

ここで前記制御部は、前記管理ブロックのデータを更新する際、前記巡回的に取得した別の管理ブロックに書き込みを行い、書き込んだデータにエラーがないことを確認した後、元の管理ブロックのデータを消去するようにしてもよい。   Here, when updating the data of the management block, the control unit writes to the other management block acquired cyclically, confirms that the written data has no error, and then updates the data of the original management block. Data may be erased.

ここで前記制御部は、前記複数の管理ブロックから最新のデータが存在する管理ブロックを検索する際、不良ブロックの発生とは無関係に更新する必要のある第1の情報の更新に伴って、別の管理ブロックに前記更新された第1の情報が書き込まれるときに更新されるカウンタの値が最新で、かつ不良ブロックが登録されている数が最大のものを最新の管理ブロックであると判断するようにしてもよい。   Here, when the control unit searches for a management block in which the latest data is present from the plurality of management blocks, the control unit separately updates the first information that needs to be updated regardless of the occurrence of a defective block. When the updated first information is written in the management block, the counter value updated when the updated first information is the latest and the largest number of registered bad blocks is determined to be the latest management block. You may do it.

ここで前記第1の情報は、論理アドレスと前記不揮発性メモリの物理アドレスとの対応関係を示す情報としてもよい。   Here, the first information may be information indicating a correspondence relationship between a logical address and a physical address of the nonvolatile memory.

ここで前記制御部は、最新のデータが存在する管理ブロックを検索する際、少なくとも前記不良ブロックのアドレス情報、前記第1の情報、及び前記カウンタとから計算されるチェックコードを検査し、前記チェックコードが不正である管理ブロックを除外して最新のデータが存在する管理ブロックを検索するようにしてもよい。   Here, the controller checks a check code calculated from at least the address information of the defective block, the first information, and the counter when searching for a management block having the latest data. A management block in which the latest data exists may be searched by excluding the management block whose code is invalid.

ここで前記制御部は、前記管理ブロックのデータの書き込み単位であるページの数以下の複数の領域に前記管理ブロックを分割し、1つの管理ブロックについて前記複数の領域に順次データの書き込みを行い、前記複数の領域全てにデータが書き込まれた後に、別の管理ブロックを新たに使用するようにしてもよい。   Here, the control unit divides the management block into a plurality of areas equal to or less than the number of pages, which is a data writing unit of the management block, and sequentially writes data to the plurality of areas for one management block, Another management block may be newly used after data is written in all the plurality of areas.

ここで前記制御部は、前記管理ブロックはデータの書き込み単位であるページの数以下の複数の領域に前記管理ブロックを分割し、1つの管理ブロックについて前記複数の領域に順次データの書き込みを行い、前記複数の領域全てにデータが書き込まれた後に、別の管理ブロックを新たに使用し、前記管理ブロックが分割されてできた前記複数の領域のうち、最初の領域にデータを書き込む際は、前記不良ブロックのアドレスと前記第1の情報とを書き込み、前記第1の情報を更新する際は、前記更新された第1の情報を次の領域に書き込むようにしてもよい。   Here, the control unit divides the management block into a plurality of areas equal to or less than the number of pages, which is a data writing unit, and sequentially writes data to the plurality of areas for one management block, After data is written to all the plurality of areas, another management block is newly used, and when writing data to the first area among the plurality of areas formed by dividing the management block, When the defective block address and the first information are written and the first information is updated, the updated first information may be written in the next area.

ここで前記不揮発性メモリは、フラッシュメモリとしてもよい。   Here, the nonvolatile memory may be a flash memory.

この課題を解決するため、本発明のメモリ制御方法は、データの消去単位であるブロックを複数有し、前記ブロックはデータを保持する複数のデータブロックと、前記複数のブロック中の不良ブロックのアドレスを登録する複数の管理ブロックとを含む不揮発性メモリに対してデータの書き込み及び読み出しを制御するメモリ制御方法であって、前記複数の管理ブロック中の不良ブロックとしてアドレスが登録されたブロックを除いて1つずつ巡回的に管理ブロックを取得し、新たに発生した不良ブロックのアドレスを当該取得した管理ブロックに登録することを特徴とするものである。   In order to solve this problem, a memory control method according to the present invention includes a plurality of blocks which are data erasing units, and the blocks include a plurality of data blocks holding data and addresses of defective blocks in the plurality of blocks. A memory control method for controlling writing and reading of data to and from a non-volatile memory including a plurality of management blocks for registering a memory block, excluding blocks whose addresses are registered as defective blocks in the plurality of management blocks The management block is acquired cyclically one by one, and the address of the newly generated defective block is registered in the acquired management block.

ここで不良ブロックのアドレスを前記複数の管理ブロックのうちの1つの管理ブロックに登録する際に、当該管理ブロックが不良ブロックとなった場合、当該管理ブロックに登録する予定であった前記不良ブロックのアドレスを含む全ての不良ブロックのアドレスを、巡回的に取得した別の管理ブロックに登録するようにしてもよい。   Here, when the address of the bad block is registered in one management block of the plurality of management blocks, if the management block becomes a bad block, the bad block that was scheduled to be registered in the management block You may make it register the address of all the bad blocks containing an address in another management block acquired cyclically.

ここで不良ブロックのアドレスを前記管理ブロックに登録する際に、当該管理ブロックが不良ブロックとなった場合、当該管理ブロックに登録する予定であった前記不良ブロックのアドレスを含む全ての不良ブロックのアドレスの登録を、巡回的に取得した別の管理ブロックに対して最大リトライ回数まで行なうようにしてもよい。   Here, when registering the address of the defective block in the management block, if the management block becomes a defective block, the addresses of all the defective blocks including the address of the defective block scheduled to be registered in the management block May be registered up to the maximum number of retries for another management block acquired cyclically.

ここで前記複数の管理ブロックから最新のデータが存在する管理ブロックを検索する際、それぞれの管理ブロックにおいて登録されている不良ブロックの数を調べ、その数が最大の管理ブロックを最新のデータが存在する管理ブロックであると判断するようにしてもよい。   Here, when searching for a management block in which the latest data exists from the plurality of management blocks, the number of defective blocks registered in each management block is checked, and the management block with the largest number has the latest data. You may make it judge that it is a management block.

ここで前記管理ブロックに不良ブロックのアドレスを登録する際に不良ブロック数も書き込み、前記複数の管理ブロックから最新のデータが存在する管理ブロックを検索する際、前記管理ブロックに書き込まれている前記不良ブロック数から、最新のデータが存在する管理ブロックを判断するようにしてもよい。   Here, the number of defective blocks is also written when registering the address of the defective block in the management block, and when the management block having the latest data is searched from the plurality of management blocks, the defect written in the management block The management block in which the latest data exists may be determined from the number of blocks.

ここで前記管理ブロックのデータを更新する際、前記巡回的に取得した別の管理ブロックに書き込みをし、書き込んだデータにエラーがないことを確認した後、元の管理ブロックのデータを消去するようにしてもよい。   Here, when updating the data of the management block, it writes to the other management block acquired cyclically, confirms that the written data has no error, and then erases the data of the original management block It may be.

ここで前記複数の管理ブロックから最新のデータが存在する管理ブロックを検索する際、不良ブロックの発生とは無関係に更新する必要のある第1の情報の更新に伴って別の管理ブロックに前記更新された第1の情報が書き込まれるときに更新されるカウンタの値が最新で、かつ不良ブロックが登録されている数が最大のものを最新の管理ブロックであると判断するようにしてもよい。   Here, when searching for a management block having the latest data from the plurality of management blocks, the update to the other management block is performed in accordance with the update of the first information that needs to be updated regardless of the occurrence of the bad block. The counter value updated when the first information is written is the latest, and the largest number of registered bad blocks may be determined as the latest management block.

ここで前記第1の情報は、論理アドレスと前記不揮発性メモリの物理アドレスとの対応関係を示す情報としてもよい。   Here, the first information may be information indicating a correspondence relationship between a logical address and a physical address of the nonvolatile memory.

ここで最新のデータが存在する管理ブロックを検索する際、少なくとも前記不良ブロックのアドレス情報、前記第1の情報、及び前記カウンタとから計算されるチェックコードを検査し、前記チェックコードが不正である管理ブロックを除外して最新のデータが存在する管理ブロックを検索するようにしてもよい。   Here, when searching for a management block in which the latest data exists, at least the check information calculated from the address information of the defective block, the first information, and the counter is inspected, and the check code is invalid. A management block in which the latest data exists may be searched by excluding the management block.

ここで前記管理ブロックのデータの書き込み単位であるページの数以下の複数の領域に前記管理ブロックを分割し、1つの管理ブロックについて前記複数の領域に順次データを書き込み、前記複数の領域全てにデータが書き込まれた後に、別の管理ブロックを新たに使用するようにしてもよい。   Here, the management block is divided into a plurality of areas equal to or less than the number of pages, which is a unit for writing data in the management block, and data is sequentially written in the plurality of areas for one management block, and data is stored in all the plurality of areas Alternatively, another management block may be newly used after.

ここで前記管理ブロックのデータの書き込み単位であるページの数以下の複数の領域に前記管理ブロックを分割し、1つの管理ブロックについて前記複数の領域に順次データを書き込み、前記複数の領域全てにデータが書き込まれた後に、別の管理ブロックを新たに使用し、前記管理ブロックが分割されてできた前記複数の領域のうち、最初の領域にデータを書き込む際は、前記不良ブロックのアドレスと前記第1の情報とを書き込み、前記第1の情報を更新する際は、前記更新された第1の情報を次の領域に書き込むようにしてもよい。   Here, the management block is divided into a plurality of areas equal to or less than the number of pages, which is a unit for writing data in the management block, and data is sequentially written in the plurality of areas for one management block, and data is stored in all the plurality of areas. When a new management block is newly used and data is written in the first area among the plurality of areas formed by dividing the management block, the address of the defective block and the first block are written. When the first information is written and the first information is updated, the updated first information may be written in the next area.

ここで前記不揮発性メモリは、フラッシュメモリとしてもよい。   Here, the nonvolatile memory may be a flash memory.

以上のような本発明によれば、不良ブロックのアドレスなどのエラー情報を更新する際、更新された不良ブロックのアドレス情報をメモリ上の別の場所に書き込んでエラー情報を蓄積するので、書き込み単位である1つのページへデータを書き足す回数に上限があるフラッシュメモリでもメモリ容量を有効に利用できる。さらに、管理ブロックの情報を更新する際に、エラーや電源遮断が発生しても既に管理ブロックに書き込まれている直前のエラー情報が失われることがないという、優れたメモリコントローラ、不揮発性記憶装置、不揮発性記憶システム及びメモリ制御方法を実現できる。   According to the present invention as described above, when error information such as an address of a defective block is updated, the address information of the updated defective block is written in another location on the memory and the error information is accumulated. Even a flash memory with an upper limit on the number of times data is written to one page can be used effectively. Furthermore, when updating the management block information, even if an error or power interruption occurs, the previous error information already written in the management block is not lost, and an excellent memory controller and non-volatile storage device A nonvolatile storage system and a memory control method can be realized.

次に本発明の実施の形態について説明する。図1は、本実施の形態における不揮発性記憶システムを示した構成図である。不揮発性記憶システム100は、データの書込み及び読出しを指示するアクセス装置101と、不揮発性記憶装置102とを含んでいる。不揮発性記憶装置102は、アクセス装置101から送られたユーザデータやユーザデータの管理に用いるデータを格納するフラッシュメモリで構成された不揮発性メモリ110と、アクセス装置101の指示に従って不揮発性メモリ110に対するデータの書込み及び読出しを制御するメモリコントローラ103とを備えている。メモリコントローラ103は、バッファ105とROM108とRAM107とCPU106とを有する制御部と、ホストI/F104と、不揮発性メモリI/F109とを備えている。   Next, an embodiment of the present invention will be described. FIG. 1 is a configuration diagram showing a nonvolatile memory system in the present embodiment. The nonvolatile storage system 100 includes an access device 101 that instructs writing and reading of data, and a nonvolatile storage device 102. The non-volatile storage device 102 includes a non-volatile memory 110 configured by a flash memory that stores user data sent from the access device 101 and data used for managing the user data, and a non-volatile memory 110 according to an instruction from the access device 101. And a memory controller 103 that controls writing and reading of data. The memory controller 103 includes a control unit including a buffer 105, a ROM 108, a RAM 107, and a CPU 106, a host I / F 104, and a nonvolatile memory I / F 109.

メモリコントローラ103において、ホストI/F104はアクセス装置101との間でユーザデータや各種のコマンドを送受信するものであり、不揮発性メモリI/F109は不揮発性メモリ110との間でユーザデータや管理のためのデータを送受信するものである。ROM108はメモリコントローラの処理を実行するためのプログラムを格納しており、RAM107はROM108に格納されたプログラムを実行する際に用いられる。バッファ105はアクセス装置101及び不揮発性メモリ110からのデータを一時的に蓄積したりRAM107を補ったりするものである。CPU106は、RAM107を用いて、ROM108に格納されたプログラムを実行し、不揮発性メモリI/F109を介して、不揮発性メモリ110にデータの書き込みと読み出し及び消去を実現する。   In the memory controller 103, the host I / F 104 transmits and receives user data and various commands to and from the access device 101, and the nonvolatile memory I / F 109 transmits user data and management to and from the nonvolatile memory 110. For transmitting and receiving data. The ROM 108 stores a program for executing processing of the memory controller, and the RAM 107 is used when executing the program stored in the ROM 108. The buffer 105 temporarily accumulates data from the access device 101 and the nonvolatile memory 110 and supplements the RAM 107. The CPU 106 uses the RAM 107 to execute a program stored in the ROM 108, and realizes writing, reading, and erasing of data in the nonvolatile memory 110 via the nonvolatile memory I / F 109.

図2は、本実施の形態における不揮発性メモリ110の構成図である。不揮発性メモリ110は複数のブロックで構成されたフラッシュメモリである。各ブロックはデータの消去単位である。例えば、メモリ容量が1Gバイトのフラッシュメモリにおいて、データの消去単位が512kバイトであれば、ブロックは2048個存在することになる。本図は、この複数のブロックを管理領域201とデータ領域202に分けて使用することと、両領域はそれぞれ複数のブロックを含むこととを示している。管理領域201のブロックを管理ブロックといい、データ領域202のブロックをデータブロックという。本図では、管理領域201はMB−1からMB−mまでのブロックを含み、データ領域202はDB−1からDB−nまでのブロックを含んでいる。各ブロックは複数のページで構成されており、各ページはデータの書込み単位である。本図に示すように、ブロックMB−2はMP−1からMP−sまでのページを含んでいる。各ブロックは管理領域201、データ領域202を問わず同様の構成である。ページの容量を2kバイトとすれば、1つのブロックにはページが256個存在することになる。   FIG. 2 is a configuration diagram of the nonvolatile memory 110 in the present embodiment. The nonvolatile memory 110 is a flash memory composed of a plurality of blocks. Each block is a data erasing unit. For example, in a flash memory having a memory capacity of 1 Gbyte, if the data erasure unit is 512 kbytes, there are 2048 blocks. This figure shows that the plurality of blocks are divided into a management area 201 and a data area 202, and that both areas each include a plurality of blocks. A block in the management area 201 is called a management block, and a block in the data area 202 is called a data block. In this figure, the management area 201 includes blocks from MB-1 to MB-m, and the data area 202 includes blocks from DB-1 to DB-n. Each block is composed of a plurality of pages, and each page is a data writing unit. As shown in the figure, the block MB-2 includes pages from MP-1 to MP-s. Each block has the same configuration regardless of the management area 201 and the data area 202. If the page capacity is 2 kbytes, there are 256 pages in one block.

各ページには1回もしくは複数回のデータの書き足しが可能であるが、1つのページのデータだけを消去するということはできない。つまり、データの消去では、消去単位であるブロック内のデータを一度に消去しなければならない。従って先の例でいえば256ページ分のデータを一度に消去することになる。しかし、一旦消去した後は再びページ単位で1回もしくは複数回の書き込みが可能となる。   Each page can be written once or multiple times, but it is not possible to erase only one page of data. That is, in erasing data, data in a block that is an erasing unit must be erased at once. Therefore, in the previous example, 256 pages of data are erased at once. However, once erased, writing can be performed once or multiple times in page units.

図3は、データブロックDB−i(i=1〜n)の構成図である。先述の管理ブロックと同様に、データブロックはDP−1からDP−sまでの複数のページで構成されており、各ページはアクセス装置101から送られたユーザデータを格納するデータ部301と、そのユーザデータに対応した論理アドレスを格納する冗長部302とで構成される。つまり、メモリコントローラ103が、1つのページをデータ部301と冗長部302に区別して各ページを使用する。   FIG. 3 is a configuration diagram of the data block DB-i (i = 1 to n). Similar to the management block described above, the data block is composed of a plurality of pages from DP-1 to DP-s, and each page includes a data section 301 for storing user data sent from the access device 101, The redundant unit 302 stores a logical address corresponding to user data. That is, the memory controller 103 distinguishes one page into the data part 301 and the redundant part 302 and uses each page.

図4は、管理ブロックMB−j(j=1〜m)の構成図である。管理ブロックも先述のとおりMP−1からMP−sまでの複数のページで構成されており、その先頭ページであるMP−1には、論理アドレスとデータブロックの物理アドレスとの対応を表す第1の情報であるアドレステーブルと、不揮発性メモリ110の書き込みや消去においてエラーが発生し、以後使用できなくなったブロックのアドレスを示す不良ブロックアドレス情報とが格納されている。尚、不良ブロックアドレス情報は、管理領域201とデータ領域202の両方の不良ブロックのアドレスを含んでいる。さらにMP−1には、不良ブロックアドレス情報に含まれる不良ブロックの数を示す不良ブロック数と、カウンタ及びチェックコードも当該先頭ページに格納されている。尚チェックコードは、ページに書き込まれたデータのエラーを検証するためにあり、MP−1からMP−sまでの各ページにはそのページのデータに対するチェックコードが格納されている。MP−1以外のページにはアドレステーブルとチェックコードが格納されている。尚、カウンタは、アドレステーブルが更新された後、更新されたアドレステーブルを別の管理ブロックの先頭ページへの書き込むときにインクリメントされる。カウンタは、複数の管理ブロックの中で最も新しいデータを保持する管理ブロックであることを示す値を一意に特定できるだけのビット数を有する。また、チェックコードは、ページ内のデータの正当性をチェックするためのもので各ページに格納されている。その例として、CRC(Cyclic Redundancy Check)が挙げられるが、誤り訂正、検出が可能なRS(Reed−Solomon)符号等のECCコードも使用可能である。   FIG. 4 is a configuration diagram of the management block MB-j (j = 1 to m). The management block is also composed of a plurality of pages from MP-1 to MP-s as described above, and the first page, MP-1, is a first indicating the correspondence between the logical address and the physical address of the data block. Are stored, and an address table, which is information on the above, and defective block address information indicating addresses of blocks that have become unusable after an error has occurred in writing or erasing of the nonvolatile memory 110. The defective block address information includes addresses of defective blocks in both the management area 201 and the data area 202. Further, MP-1 also stores the number of defective blocks indicating the number of defective blocks included in the defective block address information, a counter, and a check code on the first page. The check code is for verifying an error in the data written on the page. Each page from MP-1 to MP-s stores a check code for the data on the page. Address tables and check codes are stored in pages other than MP-1. The counter is incremented when the updated address table is written to the first page of another management block after the address table is updated. The counter has a number of bits that can uniquely identify a value indicating that the management block holds the newest data among the plurality of management blocks. The check code is for checking the validity of the data in the page and is stored in each page. An example of this is CRC (Cyclic Redundancy Check), but an ECC code such as an RS (Reed-Solomon) code capable of error correction and detection can also be used.

以下に、別の管理ブロックに使用を変更する場合の手順を説明する。図4において管理ブロックは、まず初めに、初期状態の先述の各情報を先頭ページMP−1に格納している。続いて、データ領域202のデータが書き換えられて論理アドレスと物理アドレスの対応が変化するとアドレステーブルが更新され、更新された最新のアドレステーブルとチェックコードは次ページのMP−2に書き込まれる。以降アドレステーブルの更新が行なわれると、最新のアドレステーブルが順次次ページに書き込まれる。このように、先頭ページ以外のページにはアドレステーブルとチェックコードの情報しか格納しないようにすると、アドレステーブル更新時の処理を高速化することができる。また、先頭ページに不良ブロック数を格納しているが、これにより、不良ブロックアドレス情報を参照して不良ブロックを数える手間を省くことができ、処理を高速化することができる。   The procedure for changing usage to another management block will be described below. In FIG. 4, the management block first stores each piece of information in the initial state in the first page MP-1. Subsequently, when the data in the data area 202 is rewritten and the correspondence between the logical address and the physical address changes, the address table is updated, and the updated updated address table and check code are written in MP-2 on the next page. When the address table is subsequently updated, the latest address table is sequentially written on the next page. As described above, if only the information of the address table and the check code is stored in the pages other than the first page, the processing at the time of updating the address table can be speeded up. Further, although the number of defective blocks is stored in the first page, it is possible to save the trouble of counting the defective blocks by referring to the defective block address information and to speed up the processing.

図5は本実施の形態における管理領域201の管理ブロックの使用方法である。図中先頭の管理ブロックからMB−1、MB−2、MB−3と順に番号が付されており、先頭の管理ブロックであるMB−1から順に1つずつ巡回的に管理ブロックが使用されるので、同時に複数の管理ブロックにデータが書込まれることはない。本図では、不良ブロックであるMB−3の管理ブロックをとばして、MB−2の次にMB−4を使用している様子を表している。このように、管理領域には複数の管理ブロックが存在し、それぞれが先述の図4に示した構成となっている。現在使用している管理ブロックから別の管理ブロックに使用を変更するきっかけは2つあり、1つはアドレステーブルの更新で、もう1つは不良ブロックアドレス情報の更新である。   FIG. 5 shows a method of using the management block of the management area 201 in the present embodiment. In the figure, MB-1, MB-2, and MB-3 are numbered in order from the first management block, and the management blocks are used cyclically one by one from the first management block MB-1. Therefore, data is not written to a plurality of management blocks at the same time. This figure shows a state where MB-4 is used after MB-2 by skipping the management block of MB-3 which is a bad block. As described above, a plurality of management blocks exist in the management area, and each has the configuration shown in FIG. There are two reasons for changing the use from the currently used management block to another management block, one is updating the address table, and the other is updating the bad block address information.

1つ目のきっかけであるアドレステーブルの更新において、更新されたアドレステーブルは、先述のとおり管理ブロック内で順次新しいページに書き込まれるが、全てのページにデータが書き込まれていて次に書き込むページがないときは、別の管理ブロックの先頭ページに先述した他のデータと共に書き込まれる。つまり、別の管理ブロックの先頭ページには、更新されたアドレステーブルが書き込まれ、カウンタの値には直前の管理ブロックの値からインクリメントされた値が書き込まれる。その他の不良ブロックアドレス情報と不良ブロック数は直前の管理ブロックのデータと同じものが書き込まれて、チェックコードには書き込まれたデータに対応したものが書き込まれる。このようにして別の新しい管理ブロックの先頭ページが使用され、次にアドレステーブルが更新されると、先頭ページの次のページに更新されたアドレステーブルが書き込まれる。   In the update of the address table that is the first trigger, the updated address table is sequentially written to a new page in the management block as described above. If not, it is written together with the other data described above on the first page of another management block. That is, the updated address table is written in the first page of another management block, and a value incremented from the value of the immediately preceding management block is written in the counter value. Other defective block address information and the number of defective blocks are the same as the data of the immediately preceding management block, and the check code corresponding to the written data is written. When the first page of another new management block is used in this way and the address table is updated next time, the updated address table is written to the next page of the first page.

2つ目のきっかけである不良ブロックアドレス情報が更新される場合について説明する。不良ブロックが発生し、その不良ブロックのアドレスが不良ブロックアドレス情報に新たに加えられ、不良ブロックアドレス情報が更新されると、管理ブロックの先頭ページの不良ブロックアドレス情報を書換えなければならない。そのとき、当該先頭ページのデータは消去しないで、別の新しい管理ブロックの先頭ページに更新された不良ブロックアドレス情報を書き込む。この先頭ページには不良ブロックアドレス情報に合わせて更新された不良ブロック数が書き込まれる。その他のアドレステーブルとカウンタは直前の管理ブロックの先頭ページのデータと同じものである。また、チェックコードには書き込まれたデータに対応したものが書き込まれる。   The case where the bad block address information which is the second trigger is updated will be described. When a defective block is generated, the address of the defective block is newly added to the defective block address information, and the defective block address information is updated, the defective block address information on the first page of the management block must be rewritten. At that time, the updated defective block address information is written to the first page of another new management block without erasing the data of the first page. In this first page, the number of defective blocks updated in accordance with the defective block address information is written. Other address tables and counters are the same as the data of the first page of the immediately preceding management block. A check code corresponding to the written data is written.

別の管理ブロックに使用を変更する際、アドレステーブルの更新に伴う場合はカウンタの値が更新され、不良ブロックアドレス情報の更新に伴う場合は不良ブロック数が更新される。これによると、カウンタの値が同一で不良ブロック数が異なる管理ブロックや、その反対で不良ブロック数が同一でカウンタの値が異なる管理ブロックが発生する。しかし、カウンタと不良ブロック数の両方を用いれば、現在使われている最新の管理ブロックを特定することができる。   When changing to another management block, the counter value is updated when the address table is updated, and the number of defective blocks is updated when the bad block address information is updated. According to this, a management block having the same counter value and a different number of defective blocks, or a management block having the same number of defective blocks and a different counter value, is generated. However, if both the counter and the number of defective blocks are used, the latest management block currently used can be specified.

続いて、本実施の形態の不揮発性記憶システムにおけるデータ書込み処理について説明する。図6は、不揮発性記憶装置102の管理ブロックの検索処理を表すフロー図である。アクセス装置101から不揮発性記憶装置102に電力が供給されると、不揮発性記憶装置102のメモリコントローラ103はアドレス情報の取得や、メモリの消去などの初期化処理を行なう。この初期化処理に続いて、図6に示すように最新のデータが存在する管理ブロックの検索を開始する。   Next, data write processing in the nonvolatile storage system of the present embodiment will be described. FIG. 6 is a flowchart showing management block search processing of the nonvolatile storage device 102. When power is supplied from the access device 101 to the nonvolatile memory device 102, the memory controller 103 of the nonvolatile memory device 102 performs initialization processing such as acquisition of address information and memory erasure. Following this initialization process, a search for a management block in which the latest data exists is started as shown in FIG.

まず、先頭の管理ブロックを対象ブロックとする(S601)。次に対象ブロックの先頭ページのデータを読み出す(S602)。そして、対象ブロックが消去済みのブロックであるか否かを判断する(S603)。消去済みのブロックでない場合は、読み出したデータが正しいものであるか否かを判断するために、チェックコードが正しいかどうかを調べる(S604)。チェックコードが正しければ、次に、不良ブロック数がそれまでに検索した管理ブロックの中で最大であるか否かを判断する(S605)。次に、不良ブロック数が最大であれば、カウンタがそれまでに検索した管理ブロックの中で最新の値であるか否かを判断する(S606)。最新の値であれば、対象ブロックを最新の管理ブロックであるとする(S607)。そして、対象ブロックが最終の管理ブロックであるか否かを判断する(S608)。最終の管理ブロックでなければ、次の管理ブロックを対象ブロックとし(S609)、S602に戻って検索処理を継続する。最終の管理ブロックであれば検索処理を終了する。このようにすれば、検索処理の終了時に保持している最新の管理ブロックに最新のデータが存在することになり、そのデータをRAMまたはバッファ上に保持して不揮発性記憶装置の管理ブロックの検索処理を終える。尚、S603で消去済みの管理ブロックであった場合、S604でチェックコードが不正であった場合、S605で不良ブロック数が最大でなかった場合、S606でカウンタが最新でなかった場合は、当該管理ブロックは最新のデータを持つ管理ブロックではないので、S608の処理に移る。   First, the first management block is set as a target block (S601). Next, the data of the first page of the target block is read (S602). Then, it is determined whether or not the target block is an erased block (S603). If it is not an erased block, it is checked whether or not the check code is correct in order to determine whether or not the read data is correct (S604). If the check code is correct, it is next determined whether or not the number of defective blocks is the maximum among the management blocks searched so far (S605). Next, if the number of defective blocks is maximum, it is determined whether or not the counter is the latest value among the management blocks searched so far (S606). If it is the latest value, the target block is assumed to be the latest management block (S607). Then, it is determined whether or not the target block is the final management block (S608). If it is not the final management block, the next management block is set as a target block (S609), and the process returns to S602 to continue the search process. If it is the last management block, the search process is terminated. In this way, the latest data exists in the latest management block held at the end of the search process, and the data is held on the RAM or buffer to search the management block of the nonvolatile storage device. Finish the process. If the management block has been erased in S603, the check code is invalid in S604, the number of defective blocks is not the maximum in S605, or the counter is not the latest in S606, the management block Since the block is not a management block having the latest data, the process proceeds to S608.

図7は、不揮発性メモリ110にデータを書き込む際の処理を示すフロー図である。不揮発性メモリにデータが書き込まれると(S701)、書き込まれた当該データにエラーがあるかどうかを判断する(S702)。エラーがあれば当該データブロックのアドレスを不良ブロックアドレス情報に登録する(S703)。正しく書き込まれていて、エラーがなければアドレステーブルを更新して(S704)、当該処理を終了する。   FIG. 7 is a flowchart showing processing when data is written to the nonvolatile memory 110. When data is written in the nonvolatile memory (S701), it is determined whether or not there is an error in the written data (S702). If there is an error, the address of the data block is registered in the defective block address information (S703). If it is written correctly and there is no error, the address table is updated (S704), and the process is terminated.

S703で行なわれる、データブロックのアドレスを不良ブロックアドレス情報に登録する手順を図8のフロー図を用いて説明する。データブロックに書き込んだデータにエラーがあると、メモリコントローラ103は、バッファ上もしくはRAM上に、最新のデータが存在する管理ブロックの最新のアドレステーブルを格納しているページからアドレステーブルを読み出す(S801)。そして、その管理ブロックの先頭ページにある、不良ブロックアドレス情報、不良ブロック数、カウンタの最新の情報を読み出す(S802)。続いて、S802で読み出した不良ブロックアドレス情報に新たな不良ブロックのアドレスを追加し(S803)、S802で読み出した不良ブロック数をインクリメントする(S804)。しかる後に、新たな管理ブロックを取得する(S805)。新たな管理ブロックは管理領域201内で巡回的に取得するが、不良ブロックアドレス情報に登録された不良ブロックを除外して取得する。次に、新たな管理ブロックの先頭ページにS801で読み出したアドレステーブルとS802で読み出したカウンタと、更新された不良ブロックアドレス情報と、不良ブロックアドレスと、これらデータに対応したチェックコードとを書き込む(S806)。そして、エラーがないかどうかを判断する(S807)。エラーがなければ、不良ブロックアドレス情報の登録は成功であり、これに続いて直前の管理ブロックのデータを消去する。エラーがあれば、今回の新たな管理ブロックの取得が、管理ブロック取得に対する最大リトライ回数を超えるか否かを判断する(S808)。最大リトライ回数は予め定められており、S807でエラーが検出され新たな管理ブロックの取得ができなかった場合に、新たな管理ブロックの取得を試みる回数の上限を示している。超えない場合は再びS803に戻って、S807でエラーが確認されたデータブロックのアドレスを不良ブロックアドレスとして不良ブロックアドレス情報に追加して、以下同様の処理を繰り返す。S803に戻る際は、バッファ上もしくはRAM上に保持しているアドレステーブル、不良ブロックアドレス情報、不良ブロック数、カウンタを保持したまま戻る必要がある。最大リトライ回数を超える場合は、不良ブロックアドレス情報の登録は失敗であり、アクセス装置に対してエラーを返して処理を終了する。   The procedure for registering the address of the data block in the bad block address information performed in S703 will be described with reference to the flowchart of FIG. If there is an error in the data written in the data block, the memory controller 103 reads the address table from the page storing the latest address table of the management block in which the latest data exists on the buffer or RAM (S801). ). Then, the latest information of the defective block address information, the number of defective blocks, and the counter in the first page of the management block is read (S802). Subsequently, the address of the new defective block is added to the defective block address information read in S802 (S803), and the number of defective blocks read in S802 is incremented (S804). After that, a new management block is acquired (S805). A new management block is acquired cyclically within the management area 201, but is acquired by excluding the defective block registered in the defective block address information. Next, the address table read in S801, the counter read in S802, the updated bad block address information, the bad block address, and the check code corresponding to these data are written in the first page of the new management block ( S806). Then, it is determined whether or not there is an error (S807). If there is no error, the registration of the bad block address information is successful, and the data of the immediately preceding management block is erased subsequently. If there is an error, it is determined whether or not the current acquisition of a new management block exceeds the maximum number of retries for management block acquisition (S808). The maximum number of retries is predetermined, and indicates the upper limit of the number of attempts to acquire a new management block when an error is detected in S807 and a new management block cannot be acquired. If not, the process returns to S803 again, the address of the data block in which the error is confirmed in S807 is added to the bad block address information as a bad block address, and the same processing is repeated thereafter. When returning to S803, it is necessary to return while holding the address table, bad block address information, number of bad blocks, and counter held in the buffer or RAM. If the maximum number of retries is exceeded, registration of bad block address information has failed, an error is returned to the access device, and the process is terminated.

このように失敗で終了するケースもあるが、リトライを続けるよりもよい場合がある。フラッシュメモリを用いた不揮発性メモリ110でエラーが発生する確率は小さいので、連続して何回もエラーが発生するときは、電源異常等の他の異常が発生している可能性がある。メモリ以外の異常が原因でエラーが発生したにもかかわらず、当該ブロックを不良ブロックアドレスに加えることは、本来エラーにならないはずの正常なブロックを使用不可能にしまうということになる。これは大きな問題となるため、S808のように最大リトライ回数で判断し、それを越える場合に不良ブロックのアドレスの登録を諦めるというのは有効な方法である。   In some cases, the process ends with a failure, but it may be better than continuing the retry. Since the probability of occurrence of an error in the nonvolatile memory 110 using the flash memory is small, there is a possibility that another abnormality such as a power supply abnormality has occurred when the error occurs continuously several times. Even if an error occurs due to an abnormality other than the memory, adding the block to the defective block address makes it impossible to use a normal block that should not be an error. Since this is a big problem, it is an effective method to judge by the maximum number of retries as in S808, and to give up registering the address of the defective block when exceeding it.

S704で行なわれるアドレステーブルの更新手順を、図9A、図9Bを用いて説明する。まず、メモリコントローラ103はバッファまたはRAM上に、最新のデータが存在する管理ブロックの最新のアドレステーブルが格納されているページからアドレステーブルを読み出す(S901)。そして読み出したアドレステーブルの内容をバッファもしくはRAM上で更新する(S902)。次に、最新のデータが存在する管理ブロック内に新たにアドレステーブルを書き込むための空きページが存在するかを判断する(S903)。存在すれば、その空きページに更新されたアドレステーブルを書き込む(S904)。空きページが存在しなければ、新たな管理ブロックに書き込む必要がある。そのために、最新のデータが存在する管理ブロックの先頭ページのデータを読み出し、不良ブロックアドレス情報、不良ブロック数、カウンタの最新の情報を取得する(S905)。次に、カウンタの値をインクリメントし(S906)、新たな管理ブロックを取得する(S907)。この際に、不良ブロックアドレス情報に登録されている不良ブロックを除外して新たな管理ブロックを取得する。こうして、新たな管理ブロックの先頭ページに不良ブロックアドレス情報と、不良ブロック数と、更新されたアドレステーブル、カウンタと、これらデータに対応したチェックコードを書き込む(S908)。   The address table update procedure performed in S704 will be described with reference to FIGS. 9A and 9B. First, the memory controller 103 reads the address table from the page in which the latest address table of the management block in which the latest data exists is stored in the buffer or RAM (S901). Then, the contents of the read address table are updated on the buffer or RAM (S902). Next, it is determined whether there is an empty page for writing a new address table in the management block in which the latest data exists (S903). If it exists, the updated address table is written in the empty page (S904). If there is no free page, it is necessary to write to a new management block. For this purpose, the data of the first page of the management block in which the latest data exists is read, and the latest information on the defective block address information, the number of defective blocks, and the counter is acquired (S905). Next, the counter value is incremented (S906), and a new management block is acquired (S907). At this time, a new management block is obtained by excluding the defective block registered in the defective block address information. Thus, the defective block address information, the number of defective blocks, the updated address table, the counter, and the check code corresponding to these data are written in the first page of the new management block (S908).

次に図9Bに示すように、S904またはS908の書き込みの後に、書き込んだデータにエラーがあるかどうかを判断する(S909)。エラーがなければ、アドレステーブルの更新は成功であり、処理を終了する。エラーがあれば、最新のデータを持つ管理ブロックの先頭ページのデータを読み出す(S910)。しかし、S905で既に当該データを読み出している場合はS910の処理はとばしても良い。次に、管理ブロックの不良ブロックアドレス情報の登録を行ない(S911)、このとき書き込まれたデータにエラーがあるかどうかを判断する(S912)。エラーがあれば、今回の不良ブロックアドレス情報の登録が最大リトライ回数を超えるかどうかを判断し(S913)、超えていなければS911へ戻って再度不良ブロックアドレス情報の登録を行なう。最大リトライ回数を超えていれば、不良ブロックアドレス情報の登録は失敗であり、アクセス装置に対してエラーを返して処理を終了する。S912でエラーがなければアドレステーブルの更新の処理を終える。   Next, as shown in FIG. 9B, after writing in S904 or S908, it is determined whether or not there is an error in the written data (S909). If there is no error, the update of the address table is successful and the process is terminated. If there is an error, the data of the first page of the management block having the latest data is read (S910). However, if the data has already been read in S905, the processing in S910 may be skipped. Next, the bad block address information of the management block is registered (S911), and it is determined whether there is an error in the data written at this time (S912). If there is an error, it is determined whether or not the registration of the current bad block address information exceeds the maximum number of retries (S913). If not, the process returns to S911 to register the bad block address information again. If the maximum number of retries has been exceeded, registration of bad block address information has failed, an error is returned to the access device, and the process is terminated. If there is no error in S912, the address table update processing is terminated.

尚、S911の内容については、図10に示したとおりであり、S1001,1002,1003,1004はそれぞれ、図8のS803,804,805,806と同様の処理を行なうので、ここでは説明を省略する。   The contents of S911 are as shown in FIG. 10, and S1001, 1002, 1003, and 1004 perform the same processing as S803, 804, 805, and 806 of FIG. To do.

以上のように、不良ブロックアドレスの登録またはアドレステーブルの更新を経てデータブロックへのデータの書込みが行なわれる。このような本実施の形態によれば、新たな管理ブロックへの書き込みが成功した直後に古い管理ブロックを消去するので、処理の途中でエラーや電源遮断が発生しても、更新前後の少なくとも一方の管理ブロックのデータは不揮発性メモリ110に記憶され残っている。そのため、更新されたデータをメモリに書き込む際のエラーや電源遮断により、更新直前のデータまでもが一緒に消えてしまうということはない。また、管理ブロックの消去の際にエラーが発生し、当該管理ブロックが不良ブロックとなった場合でも、図9及び図10に示した処理によって、当該管理ブロックは不良ブロックアドレス情報に加えられるので、以後使用されることはない。さらに、不良ブロックアドレス情報は更新によって蓄積され、1つのまとまりとしてページに書き込まれるので、ページの容量を有効に活用することができる。   As described above, data is written to the data block through registration of the defective block address or update of the address table. According to the present embodiment, since the old management block is erased immediately after the writing to the new management block is successful, even if an error or power interruption occurs during the process, at least one before and after the update The management block data is stored in the nonvolatile memory 110 and remains. For this reason, the data immediately before the update is not erased at the same time due to an error when the updated data is written to the memory or the power is cut off. Further, even when an error occurs when erasing the management block and the management block becomes a bad block, the management block is added to the bad block address information by the processing shown in FIGS. 9 and 10. It will not be used later. Furthermore, since the bad block address information is accumulated by updating and written on the page as one unit, the capacity of the page can be used effectively.

なお、本発明の本実施の形態において、アドレステーブル、不良ブロックアドレス情報、不良ブロック数、カウンタは管理ブロックの先頭ページに配置したが、必ずしも先頭ページにある必要はない。また、アドレステーブル、不良ブロックアドレス情報は共に1つのページ内に格納されているが、複数ページを使用して格納するように構成することも可能である。さらに、不良ブロックアドレス情報と不良ブロック数は、1つの管理ブロックに1回のみ登録するものとしたが、データ領域202で新たな不良ブロックが発生した場合や管理領域201の消失で新たな不良ブロックが発生した場合には、最新の管理ブロックに空きページが存在すれば、最新の管理ブロックに複数回登録することも可能である。また、管理ブロックは1つのブロックで構成するものとしたが、複数のブロックをまとめて1つの管理ブロックとして構成することも可能である。   In the present embodiment of the present invention, the address table, the defective block address information, the number of defective blocks, and the counter are arranged on the first page of the management block, but are not necessarily on the first page. Further, both the address table and the bad block address information are stored in one page, but it may be configured to store using a plurality of pages. Further, the bad block address information and the number of bad blocks are registered only once in one management block. However, when a new bad block occurs in the data area 202 or when the management area 201 disappears, a new bad block is created. If an error occurs, if there is an empty page in the latest management block, it can be registered in the latest management block a plurality of times. Further, although the management block is configured by one block, it is also possible to configure a plurality of blocks as one management block.

本発明のメモリコントローラ、不揮発性記憶装置、不揮発性記憶システム及びメモリ制御方法は、不良ブロックのアドレス管理において信頼性が高く、かつメモリ容量を有効に使用できる。本発明は静止画記録再生装置や動画記録再生装置等のポータブルAV機器、あるいは携帯電話等のポータブル通信機器の記録再生用途として有益である。   The memory controller, nonvolatile memory device, nonvolatile memory system, and memory control method of the present invention have high reliability in address management of defective blocks, and can use memory capacity effectively. The present invention is useful as a recording / playback application for portable AV equipment such as a still picture recording / playback apparatus and moving picture recording / playback apparatus, or a portable communication equipment such as a mobile phone.

本発明の実施の形態における不揮発性記憶システムを示した構成図である。1 is a configuration diagram illustrating a nonvolatile memory system in an embodiment of the present invention. FIG. 本発明の実施の形態における不揮発性メモリを示した構成図である。It is the block diagram which showed the non-volatile memory in embodiment of this invention. 本発明の実施の形態におけるデータブロックを示した構成図である。It is the block diagram which showed the data block in embodiment of this invention. 本発明の実施の形態における管理ブロックを示した構成図である。It is the block diagram which showed the management block in embodiment of this invention. 本発明の実施の形態における管理領域の説明図である。It is explanatory drawing of the management area | region in embodiment of this invention. 本発明の実施の形態における最新の管理ブロック検索のフローチャートである。It is a flowchart of the newest management block search in embodiment of this invention. 本発明の実施の形態におけるデータ書込み後の処理を示すフローチャートである。It is a flowchart which shows the process after the data writing in embodiment of this invention. 本発明の実施の形態におけるデータ領域で発生した不良ブロックのアドレスの登録のフローチャートである。It is a flowchart of registration of the address of the bad block which generate | occur | produced in the data area in embodiment of this invention. 本発明の実施の形態におけるアドレステーブルの更新のフローチャートである。It is a flowchart of the update of the address table in embodiment of this invention. 本発明の実施の形態におけるアドレステーブルの更新のフローチャートである。It is a flowchart of the update of the address table in embodiment of this invention. 本発明の実施の形態における管理ブロックの不良ブロックアドレス情報の登録処理を示すフローチャートである。It is a flowchart which shows the registration process of the bad block address information of the management block in embodiment of this invention.

符号の説明Explanation of symbols

100 不揮発性記憶システム
101 アクセス装置
102 不揮発性記憶装置
103 メモリコントローラ
104 ホストI/F
105 バッファ
106 CPU
107 RAM
108 ROM
109 不揮発性メモリI/F
110 不揮発性メモリ
DESCRIPTION OF SYMBOLS 100 Nonvolatile storage system 101 Access apparatus 102 Nonvolatile storage apparatus 103 Memory controller 104 Host I / F
105 buffer 106 CPU
107 RAM
108 ROM
109 Nonvolatile memory I / F
110 Nonvolatile memory

Claims (48)

データの消去単位であるブロックを複数有し、前記ブロックはデータを保持する複数のデータブロックと、前記複数のブロック中の不良ブロックのアドレスを登録する複数の管理ブロックとを含む不揮発性メモリに対してデータの書き込み及び読み出しを制御するメモリコントローラであって、
前記複数の管理ブロック中の不良ブロックとしてアドレスが登録されたブロックを除いて1つずつ巡回的に管理ブロックを取得して、新たに発生した不良ブロックのアドレスを当該取得した管理ブロックに登録する制御部を有することを特徴とするメモリコントローラ。
A non-volatile memory having a plurality of blocks as data erasing units, the block including a plurality of data blocks for holding data and a plurality of management blocks for registering addresses of defective blocks in the plurality of blocks A memory controller for controlling data writing and reading,
Control that acquires management blocks cyclically one by one except for blocks whose addresses are registered as defective blocks in the plurality of management blocks, and registers the addresses of newly generated defective blocks in the acquired management blocks A memory controller.
前記制御部は、
不良ブロックのアドレスを前記複数の管理ブロックのうちの1つの管理ブロックに登録する際に、当該管理ブロックが不良ブロックとなった場合、当該管理ブロックに登録する予定であった前記不良ブロックのアドレスを含む全ての不良ブロックのアドレスを、巡回的に取得した別の管理ブロックに登録することを特徴とする請求項1に記載のメモリコントローラ。
The controller is
When registering a bad block address in one management block of the plurality of management blocks, if the management block becomes a bad block, the address of the bad block that was scheduled to be registered in the management block is The memory controller according to claim 1, wherein addresses of all the defective blocks included are registered in another management block acquired cyclically.
前記制御部は、
不良ブロックのアドレスを前記管理ブロックに登録する際に、当該管理ブロックが不良ブロックとなった場合、当該管理ブロックに登録する予定であった前記不良ブロックのアドレスを含む全ての不良ブロックのアドレスの登録を、巡回的に取得した別の管理ブロックに対して最大リトライ回数まで行なうことを特徴とする請求項2に記載のメモリコントローラ。
The controller is
When registering a bad block address in the management block, if the management block becomes a bad block, registration of all bad block addresses including the bad block address scheduled to be registered in the management block 3. The memory controller according to claim 2, wherein the memory controller is performed up to the maximum number of retries for another management block acquired cyclically.
前記制御部は、
前記複数の管理ブロックから最新のデータが存在する管理ブロックを検索する際、それぞれの管理ブロックにおいて登録されている不良ブロックの数を調べ、その数が最大の管理ブロックを最新のデータが存在する管理ブロックであると判断することを特徴とする請求項1〜3のいずれか1項に記載のメモリコントローラ。
The controller is
When searching for a management block having the latest data from the plurality of management blocks, the number of defective blocks registered in each management block is checked, and the management block having the largest number is managed with the latest data. The memory controller according to claim 1, wherein the memory controller is determined to be a block.
前記制御部は、
前記管理ブロックに不良ブロックのアドレスを登録する際に不良ブロック数も書き込み、前記複数の管理ブロックから最新のデータが存在する管理ブロックを検索する際、前記管理ブロックに書き込まれている前記不良ブロック数から、最新のデータが存在する管理ブロックを判断することを特徴とする請求項4に記載のメモリコントローラ。
The controller is
When registering the address of a bad block in the management block, the number of bad blocks is also written, and when searching for a management block having the latest data from the plurality of management blocks, the number of bad blocks written in the management block The memory controller according to claim 4, wherein a management block in which the latest data exists is determined.
前記制御部は、
前記管理ブロックのデータを更新する際、前記巡回的に取得した別の管理ブロックに書き込みを行い、書き込んだデータにエラーがないことを確認した後、元の管理ブロックのデータを消去することを特徴とする請求項1〜5のいずれか1項に記載のメモリコントローラ。
The controller is
When updating the data of the management block, writing to the other management block acquired cyclically, confirming that the written data has no error, and then erasing the data of the original management block The memory controller according to any one of claims 1 to 5.
前記制御部は、
前記複数の管理ブロックから最新のデータが存在する管理ブロックを検索する際、不良ブロックの発生とは無関係に更新する必要のある第1の情報の更新に伴って、別の管理ブロックに前記更新された第1の情報が書き込まれるときに更新されるカウンタの値が最新で、かつ不良ブロックが登録されている数が最大のものを最新の管理ブロックであると判断することを特徴とする請求項1〜6のいずれか1項に記載のメモリコントローラ。
The controller is
When searching for a management block having the latest data from the plurality of management blocks, the update is performed to another management block in accordance with the update of the first information that needs to be updated regardless of the occurrence of a bad block. The counter value updated when the first information is written is the latest, and the largest number of registered bad blocks is determined as the latest management block. The memory controller according to any one of 1 to 6.
前記第1の情報は、論理アドレスと前記不揮発性メモリの物理アドレスとの対応関係を示す情報である請求項7記載のメモリコントローラ。   The memory controller according to claim 7, wherein the first information is information indicating a correspondence relationship between a logical address and a physical address of the nonvolatile memory. 前記制御部は、
最新のデータが存在する管理ブロックを検索する際、少なくとも前記不良ブロックのアドレス情報、前記第1の情報、及び前記カウンタとから計算されるチェックコードを検査し、前記チェックコードが不正である管理ブロックを除外して最新のデータが存在する管理ブロックを検索することを特徴とする請求項7又は8に記載のメモリコントローラ。
The controller is
When searching for a management block in which the latest data exists, a check block calculated from at least the address information of the bad block, the first information, and the counter is inspected, and the check block is invalid 9. The memory controller according to claim 7 or 8, wherein a management block in which the latest data exists is searched by excluding.
前記制御部は、
前記管理ブロックのデータの書き込み単位であるページの数以下の複数の領域に前記管理ブロックを分割し、1つの管理ブロックについて前記複数の領域に順次データの書き込みを行い、前記複数の領域全てにデータが書き込まれた後に、別の管理ブロックを新たに使用することを特徴とする請求項1〜9のいずれか1項に記載のメモリコントローラ。
The controller is
The management block is divided into a plurality of areas equal to or less than the number of pages, which is a unit for writing data in the management block, data is sequentially written to the plurality of areas for one management block, and data is stored in all the plurality of areas The memory controller according to claim 1, wherein another management block is newly used after the data is written.
前記制御部は、
前記管理ブロックはデータの書き込み単位であるページの数以下の複数の領域に前記管理ブロックを分割し、1つの管理ブロックについて前記複数の領域に順次データの書き込みを行い、前記複数の領域全てにデータが書き込まれた後に、別の管理ブロックを新たに使用し、
前記管理ブロックが分割されてできた前記複数の領域のうち、最初の領域にデータを書き込む際は、前記不良ブロックのアドレスと前記第1の情報とを書き込み、前記第1の情報を更新する際は、前記更新された第1の情報を次の領域に書き込むことを特徴とする請求項7〜9のいずれか1項に記載のメモリコントローラ。
The controller is
The management block divides the management block into a plurality of areas equal to or less than the number of pages as a data writing unit, sequentially writes data to the plurality of areas for one management block, and data is stored in all the plurality of areas. Is written, use another management block,
When writing data to the first area among the plurality of areas formed by dividing the management block, writing the address of the defective block and the first information, and updating the first information The memory controller according to claim 7, wherein the updated first information is written in a next area.
前記不揮発性メモリは、フラッシュメモリであることを特徴とする請求項1〜11のいずれか1項に記載のメモリコントローラ。   The memory controller according to claim 1, wherein the nonvolatile memory is a flash memory. データの消去単位であるブロックを複数有し、前記ブロックはデータを保持する複数のデータブロックと、前記複数のブロック中の不良ブロックのアドレスを登録する複数の管理ブロックとを含む不揮発性メモリと、
前記不揮発性メモリに対してデータの書き込み及び読み出しを制御するメモリコントローラと、を具備する不揮発性記憶装置であって、
前記メモリコントローラは、
前記複数の管理ブロック中の不良ブロックとしてアドレスが登録されたブロックを除いて1つずつ巡回的に管理ブロックを取得して、新たに発生した不良ブロックのアドレスを当該取得した管理ブロックに登録する制御部を有することを特徴とする不揮発性記憶装置。
A non-volatile memory including a plurality of blocks that are data erasure units, the block including a plurality of data blocks that hold data, and a plurality of management blocks that register addresses of defective blocks in the plurality of blocks;
A non-volatile storage device comprising: a memory controller that controls writing and reading of data to and from the non-volatile memory;
The memory controller is
Control that acquires management blocks cyclically one by one except for blocks whose addresses are registered as defective blocks in the plurality of management blocks, and registers the addresses of newly generated defective blocks in the acquired management blocks A non-volatile memory device comprising: a storage unit.
前記メモリコントローラの制御部は、
不良ブロックのアドレスを前記複数の管理ブロックのうちの1つの管理ブロックに登録する際に、当該管理ブロックが不良ブロックとなった場合、当該管理ブロックに登録する予定であった前記不良ブロックのアドレスを含む全ての不良ブロックのアドレスを、巡回的に取得した別の管理ブロックに登録することを特徴とする請求項13に記載の不揮発性記憶装置。
The control unit of the memory controller
When registering a bad block address in one management block of the plurality of management blocks, if the management block becomes a bad block, the address of the bad block that was scheduled to be registered in the management block is The nonvolatile storage device according to claim 13, wherein addresses of all defective blocks included are registered in another management block acquired cyclically.
前記メモリコントローラの制御部は、
不良ブロックのアドレスを前記管理ブロックに登録する際に、当該管理ブロックが不良ブロックとなった場合、当該管理ブロックに登録する予定であった前記不良ブロックのアドレスを含む全ての不良ブロックのアドレスの登録を、巡回的に取得した別の管理ブロックに対して最大リトライ回数まで行なうことを特徴とする請求項14に記載の不揮発性記憶装置。
The control unit of the memory controller
When registering a bad block address in the management block, if the management block becomes a bad block, registration of all bad block addresses including the bad block address scheduled to be registered in the management block 15. The nonvolatile memory device according to claim 14, wherein the non-volatile storage device is performed up to the maximum number of retries for another management block acquired cyclically.
前記メモリコントローラの制御部は、
前記複数の管理ブロックから最新のデータが存在する管理ブロックを検索する際、それぞれの管理ブロックにおいて登録されている不良ブロックの数を調べ、その数が最大の管理ブロックを最新のデータが存在する管理ブロックであると判断することを特徴とする請求項13〜15のいずれか1項に記載の不揮発性記憶装置。
The control unit of the memory controller
When searching for a management block having the latest data from the plurality of management blocks, the number of defective blocks registered in each management block is checked, and the management block having the largest number is managed with the latest data. The nonvolatile memory device according to claim 13, wherein the nonvolatile memory device is determined to be a block.
前記メモリコントローラの制御部は、
前記管理ブロックに不良ブロックのアドレスを登録する際に不良ブロック数も書き込み、前記複数の管理ブロックから最新のデータが存在する管理ブロックを検索する際、前記管理ブロックに書き込まれている前記不良ブロック数から、最新のデータが存在する管理ブロックを判断することを特徴とする請求項16に記載の不揮発性記憶装置。
The control unit of the memory controller
When registering the address of a bad block in the management block, the number of bad blocks is also written, and when searching for a management block having the latest data from the plurality of management blocks, the number of bad blocks written in the management block The non-volatile storage device according to claim 16, wherein a management block in which the latest data exists is determined.
前記メモリコントローラの制御部は、
前記管理ブロックのデータを更新する際、前記巡回的に取得した別の管理ブロックに書き込みを行い、書き込んだデータにエラーがないことを確認した後、元の管理ブロックのデータを消去することを特徴とする請求項13〜17のいずれか1項に記載の不揮発性記憶装置。
The control unit of the memory controller
When updating the data of the management block, writing to the other management block acquired cyclically, confirming that the written data has no error, and then erasing the data of the original management block The non-volatile memory device according to any one of claims 13 to 17.
前記不揮発性メモリの管理ブロックは、不良ブロックの発生とは無関係に更新する必要のある第1の情報と、前記第1の情報の更新に伴って別の管理ブロックに前記更新された第1の情報が書き込まれるときに更新されるカウンタの情報と、を保持し、
前記メモリコントローラの制御部は、
前記複数の管理ブロックから最新のデータが存在する管理ブロックを検索する際、前記カウンタの値が最新で、かつ不良ブロックが登録されている数が最大のものを最新の管理ブロックであると判断することを特徴とする請求項13〜18のいずれか1項に記載の不揮発性記憶装置。
The management block of the non-volatile memory has the first information that needs to be updated regardless of the occurrence of a defective block, and the first information that has been updated to another management block as the first information is updated. Counter information that is updated when the information is written,
The control unit of the memory controller
When searching for a management block in which the latest data is present from the plurality of management blocks, the counter having the latest counter value and the largest number of registered bad blocks is determined to be the latest management block. The non-volatile memory device according to claim 13, wherein the non-volatile memory device is a non-volatile memory device.
前記第1の情報は、論理アドレスと前記不揮発性メモリの物理アドレスとの対応関係を示す情報である請求項19に記載の不揮発性記憶装置。   The nonvolatile memory device according to claim 19, wherein the first information is information indicating a correspondence relationship between a logical address and a physical address of the nonvolatile memory. 前記管理ブロックは、少なくとも前記不良ブロックのアドレス情報、前記第1の情報、及び前記カウンタとから計算されるチェックコードを保持し、
前記メモリコントローラの制御部は、最新のデータが存在する管理ブロックを検索する際、前記チェックコードを検査し、前記チェックコードが不正である管理ブロックを除外して最新のデータが存在する管理ブロックを検索することを特徴とする請求項19又は20に記載の不揮発性記憶装置。
The management block holds a check code calculated from at least the address information of the bad block, the first information, and the counter,
When searching for a management block in which the latest data exists, the control unit of the memory controller inspects the check code, excludes a management block in which the check code is invalid, and determines a management block in which the latest data exists. The non-volatile memory device according to claim 19, wherein the non-volatile memory device is searched.
前記管理ブロックはデータの書き込み単位であるページを複数備え、
前記メモリコントローラの制御部は、前記管理ブロックを前記ページ数以下の複数の領域に分割し、1つの管理ブロックについて前記複数の領域に順次データの書き込みを行い、前記複数の領域全てにデータが書き込まれた後に、別の管理ブロックを新たに使用することを特徴とする請求項13〜21のいずれか1項に記載の不揮発性記憶装置。
The management block includes a plurality of pages that are data write units,
The control unit of the memory controller divides the management block into a plurality of areas equal to or less than the number of pages, sequentially writes data in the plurality of areas for one management block, and writes data in all the plurality of areas. The non-volatile memory device according to claim 13, wherein another management block is newly used after being generated.
前記管理ブロックはデータの書き込み単位であるページを複数備え、
前記メモリコントローラの制御部は、前記管理ブロックを前記ページ数以下の複数の領域に分割し、1つの管理ブロックについて前記複数の領域に順次データの書き込みを行い、前記複数の領域全てにデータが書き込まれた後に、別の管理ブロックを新たに使用し、
前記管理ブロックが分割されてできた前記複数の領域のうち、最初の領域にデータを書き込む際は、前記不良ブロックのアドレスと前記第1の情報とを書き込み、前記第1の情報を更新する際は、前記更新された第1の情報を次の領域に書き込むことを特徴とする請求項19〜21のいずれか1項に記載の不揮発性記憶装置。
The management block includes a plurality of pages that are data write units,
The control unit of the memory controller divides the management block into a plurality of areas equal to or less than the number of pages, sequentially writes data in the plurality of areas for one management block, and writes data in all the plurality of areas. After that, another management block is newly used,
When writing data to the first area among the plurality of areas formed by dividing the management block, writing the address of the defective block and the first information, and updating the first information The non-volatile storage device according to claim 19, wherein the updated first information is written in a next area.
前記不揮発性メモリは、フラッシュメモリであることを特徴とする請求項13〜23のいずれか1項に記載の不揮発性記憶装置。   24. The nonvolatile memory device according to claim 13, wherein the nonvolatile memory is a flash memory. データの消去単位であるブロックを複数有し、前記ブロックはデータを保持する複数のデータブロックと、前記複数のブロック中の不良ブロックのアドレスを登録する複数の管理ブロックとを含む不揮発性メモリと、
前記不揮発性メモリに対してデータの書き込み及び読み出しを制御するメモリコントローラと、
前記メモリコントローラに対して、前記不揮発性メモリへのデータの書き込みと読み出しとを指示するアクセス装置と、を具備する不揮発性記憶システムであって、
前記メモリコントローラは、
前記複数の管理ブロック中の不良ブロックとしてアドレスが登録されたブロックを除いて1つずつ巡回的に管理ブロックを取得して、新たに発生した不良ブロックのアドレスを当該取得した管理ブロックに登録する制御部を有することを特徴とする不揮発性記憶システム。
A non-volatile memory including a plurality of blocks that are data erasure units, the block including a plurality of data blocks that hold data, and a plurality of management blocks that register addresses of defective blocks in the plurality of blocks;
A memory controller that controls writing and reading of data to and from the nonvolatile memory;
An access device that instructs the memory controller to write and read data to and from the nonvolatile memory,
The memory controller is
Control that acquires management blocks cyclically one by one except for blocks whose addresses are registered as defective blocks in the plurality of management blocks, and registers the addresses of newly generated defective blocks in the acquired management blocks A non-volatile storage system, comprising:
前記メモリコントローラの制御部は、
不良ブロックのアドレスを前記複数の管理ブロックのうちの1つの管理ブロックに登録する際に、当該管理ブロックが不良ブロックとなった場合、当該管理ブロックに登録する予定であった前記不良ブロックのアドレスを含む全ての不良ブロックのアドレスを、巡回的に取得した別の管理ブロックに登録することを特徴とする請求項25に記載の不揮発性記憶システム。
The control unit of the memory controller
When registering a bad block address in one management block of the plurality of management blocks, if the management block becomes a bad block, the address of the bad block that was scheduled to be registered in the management block is 26. The nonvolatile storage system according to claim 25, wherein addresses of all bad blocks included are registered in another management block acquired cyclically.
前記メモリコントローラの制御部は、
不良ブロックのアドレスを前記管理ブロックに登録する際に、当該管理ブロックが不良ブロックとなった場合、当該管理ブロックに登録する予定であった前記不良ブロックのアドレスを含む全ての不良ブロックのアドレスの登録を、巡回的に取得した別の管理ブロックに対して最大リトライ回数まで行なうことを特徴とする請求項26に記載の不揮発性記憶システム。
The control unit of the memory controller
When registering a bad block address in the management block, if the management block becomes a bad block, registration of all bad block addresses including the bad block address scheduled to be registered in the management block 27. The nonvolatile storage system according to claim 26, wherein the non-volatile storage system is performed up to the maximum number of retries for another management block acquired cyclically.
前記メモリコントローラの制御部は、
前記複数の管理ブロックから最新のデータが存在する管理ブロックを検索する際、それぞれの管理ブロックにおいて登録されている不良ブロックの数を調べ、その数が最大の管理ブロックを最新のデータが存在する管理ブロックであると判断することを特徴とする請求項25〜27のいずれか1項に記載の不揮発性記憶システム。
The control unit of the memory controller
When searching for a management block having the latest data from the plurality of management blocks, the number of defective blocks registered in each management block is checked, and the management block having the largest number is managed with the latest data. The nonvolatile storage system according to any one of claims 25 to 27, wherein the nonvolatile storage system is determined to be a block.
前記メモリコントローラの制御部は、
前記管理ブロックに不良ブロックのアドレスを登録する際に不良ブロック数も書き込み、前記複数の管理ブロックから最新のデータが存在する管理ブロックを検索する際、前記管理ブロックに書き込まれている前記不良ブロック数から、最新のデータが存在する管理ブロックを判断することを特徴とする請求項28に記載の不揮発性記憶システム。
The control unit of the memory controller
When registering the address of a bad block in the management block, the number of bad blocks is also written, and when searching for a management block having the latest data from the plurality of management blocks, the number of bad blocks written in the management block 29. The non-volatile storage system according to claim 28, wherein a management block in which the latest data exists is determined.
前記メモリコントローラの制御部は、
前記管理ブロックのデータを更新する際、前記巡回的に取得した別の管理ブロックに書き込みを行い、書き込んだデータにエラーがないことを確認した後、元の管理ブロックのデータを消去することを特徴とする請求項25〜29のいずれか1項に記載の不揮発性記憶システム。
The control unit of the memory controller
When updating the data of the management block, writing to the other management block acquired cyclically, confirming that the written data has no error, and then erasing the data of the original management block The nonvolatile memory system according to any one of claims 25 to 29.
前記不揮発性メモリの管理ブロックは、不良ブロックの発生とは無関係に更新する必要のある第1の情報と、前記第1の情報の更新に伴って別の管理ブロックに前記更新された第1の情報が書き込まれるときに更新されるカウンタの情報と、を保持し、
前記メモリコントローラの制御部は、
前記複数の管理ブロックから最新のデータが存在する管理ブロックを検索する際、前記カウンタの値が最新で、かつ不良ブロックが登録されている数が最大のものを最新の管理ブロックであると判断することを特徴とする請求項25〜30のいずれか1項に記載の不揮発性記憶システム。
The management block of the non-volatile memory has the first information that needs to be updated regardless of the occurrence of a defective block, and the first information that has been updated to another management block as the first information is updated. Counter information that is updated when the information is written,
The control unit of the memory controller
When searching for a management block in which the latest data is present from the plurality of management blocks, the counter having the latest counter value and the largest number of registered bad blocks is determined to be the latest management block. The non-volatile storage system according to any one of claims 25 to 30, wherein
前記第1の情報は、論理アドレスと前記不揮発性メモリの物理アドレスとの対応関係を示す情報である請求項31に記載の不揮発性記憶システム。   32. The nonvolatile storage system according to claim 31, wherein the first information is information indicating a correspondence relationship between a logical address and a physical address of the nonvolatile memory. 前記管理ブロックは、少なくとも前記不良ブロックのアドレス情報、前記第1の情報、及び前記カウンタとから計算されるチェックコードを保持し、
前記メモリコントローラの制御部は、最新のデータが存在する管理ブロックを検索する際、前記チェックコードを検査し、前記チェックコードが不正である管理ブロックを除外して最新のデータが存在する管理ブロックを検索することを特徴とする請求項31又は32に記載の不揮発性記憶システム。
The management block holds a check code calculated from at least the address information of the bad block, the first information, and the counter,
When searching for a management block in which the latest data exists, the control unit of the memory controller inspects the check code, excludes a management block in which the check code is invalid, and determines a management block in which the latest data exists. The non-volatile storage system according to claim 31 or 32, wherein search is performed.
前記管理ブロックはデータの書き込み単位であるページを複数備え、
前記メモリコントローラの制御部は、前記管理ブロックを前記ページ数以下の複数の領域に分割し、1つの管理ブロックについて前記複数の領域に順次データの書き込みを行い、前記複数の領域全てにデータが書き込まれた後に、別の管理ブロックを新たに使用することを特徴とする請求項25〜33のいずれか1項に記載の不揮発性記憶システム。
The management block includes a plurality of pages that are data write units,
The control unit of the memory controller divides the management block into a plurality of areas equal to or less than the number of pages, sequentially writes data in the plurality of areas for one management block, and writes data in all the plurality of areas. 34. The non-volatile storage system according to claim 25, wherein another management block is newly used after being registered.
前記管理ブロックはデータの書き込み単位であるページを複数備え、
前記メモリコントローラの制御部は、前記管理ブロックを前記ページ数以下の複数の領域に分割し、1つの管理ブロックについて前記複数の領域に順次データの書き込みを行い、前記複数の領域全てにデータが書き込まれた後に、別の管理ブロックを新たに使用し、
前記管理ブロックが分割されてできた前記複数の領域のうち、最初の領域にデータを書き込む際は、前記不良ブロックのアドレスと前記第1の情報とを書き込み、前記第1の情報を更新する際は、前記更新された第1の情報を次の領域に書き込むことを特徴とする請求項31〜33のいずれか1項に記載の不揮発性記憶システム。
The management block includes a plurality of pages that are data write units,
The control unit of the memory controller divides the management block into a plurality of areas equal to or less than the number of pages, sequentially writes data in the plurality of areas for one management block, and writes data in all the plurality of areas. After that, another management block is newly used,
When writing data to the first area among the plurality of areas formed by dividing the management block, writing the address of the defective block and the first information, and updating the first information The non-volatile storage system according to claim 31, wherein the updated first information is written in a next area.
前記不揮発性メモリは、フラッシュメモリであることを特徴とする請求項25〜35のいずれか1項に記載の不揮発性記憶システム。   36. The nonvolatile storage system according to any one of claims 25 to 35, wherein the nonvolatile memory is a flash memory. データの消去単位であるブロックを複数有し、前記ブロックはデータを保持する複数のデータブロックと、前記複数のブロック中の不良ブロックのアドレスを登録する複数の管理ブロックとを含む不揮発性メモリに対してデータの書き込み及び読み出しを制御するメモリ制御方法であって、
前記複数の管理ブロック中の不良ブロックとしてアドレスが登録されたブロックを除いて1つずつ巡回的に管理ブロックを取得し、
新たに発生した不良ブロックのアドレスを当該取得した管理ブロックに登録することを特徴とするメモリ制御方法。
A non-volatile memory having a plurality of blocks as data erasing units, the block including a plurality of data blocks for holding data and a plurality of management blocks for registering addresses of defective blocks in the plurality of blocks A memory control method for controlling data writing and reading,
A management block is obtained cyclically one by one except for a block whose address is registered as a bad block in the plurality of management blocks,
A memory control method comprising registering an address of a newly generated defective block in the acquired management block.
不良ブロックのアドレスを前記複数の管理ブロックのうちの1つの管理ブロックに登録する際に、当該管理ブロックが不良ブロックとなった場合、当該管理ブロックに登録する予定であった前記不良ブロックのアドレスを含む全ての不良ブロックのアドレスを、巡回的に取得した別の管理ブロックに登録することを特徴とする請求項37に記載のメモリ制御方法。   When registering a bad block address in one management block of the plurality of management blocks, if the management block becomes a bad block, the address of the bad block that was scheduled to be registered in the management block is 38. The memory control method according to claim 37, wherein addresses of all bad blocks included are registered in another management block acquired cyclically. 不良ブロックのアドレスを前記管理ブロックに登録する際に、当該管理ブロックが不良ブロックとなった場合、当該管理ブロックに登録する予定であった前記不良ブロックのアドレスを含む全ての不良ブロックのアドレスの登録を、巡回的に取得した別の管理ブロックに対して最大リトライ回数まで行なうことを特徴とする請求項38に記載のメモリ制御方法。   When registering a bad block address in the management block, if the management block becomes a bad block, registration of all bad block addresses including the bad block address scheduled to be registered in the management block 39. The memory control method according to claim 38, wherein the step is performed up to the maximum number of retries for another management block acquired cyclically. 前記複数の管理ブロックから最新のデータが存在する管理ブロックを検索する際、それぞれの管理ブロックにおいて登録されている不良ブロックの数を調べ、
その数が最大の管理ブロックを最新のデータが存在する管理ブロックであると判断することを特徴とする請求項37〜39のいずれか1項に記載のメモリ制御方法。
When searching for a management block in which the latest data exists from the plurality of management blocks, examine the number of defective blocks registered in each management block,
40. The memory control method according to claim 37, wherein the management block having the largest number is determined to be a management block in which the latest data exists.
前記管理ブロックに不良ブロックのアドレスを登録する際に不良ブロック数も書き込み、
前記複数の管理ブロックから最新のデータが存在する管理ブロックを検索する際、前記管理ブロックに書き込まれている前記不良ブロック数から、最新のデータが存在する管理ブロックを判断することを特徴とする請求項40に記載のメモリ制御方法。
Write the number of bad blocks when registering the address of the bad block in the management block,
The management block in which the latest data exists is determined from the number of defective blocks written in the management block when searching for a management block in which the latest data exists from the plurality of management blocks. Item 41. The memory control method according to Item 40.
前記管理ブロックのデータを更新する際、前記巡回的に取得した別の管理ブロックに書き込みをし、
書き込んだデータにエラーがないことを確認した後、元の管理ブロックのデータを消去することを特徴とする請求項37〜41のいずれか1項に記載のメモリ制御方法。
When updating the data of the management block, write to another management block acquired cyclically,
42. The memory control method according to claim 37, wherein after confirming that there is no error in the written data, the data in the original management block is erased.
前記複数の管理ブロックから最新のデータが存在する管理ブロックを検索する際、不良ブロックの発生とは無関係に更新する必要のある第1の情報の更新に伴って別の管理ブロックに前記更新された第1の情報が書き込まれるときに更新されるカウンタの値が最新で、かつ不良ブロックが登録されている数が最大のものを最新の管理ブロックであると判断することを特徴とする請求項37〜42のいずれか1項に記載のメモリ制御方法。   When searching for a management block having the latest data from the plurality of management blocks, the management block is updated to another management block in accordance with the update of the first information that needs to be updated regardless of the occurrence of a bad block. The counter value updated when the first information is written is the latest, and the largest number of registered bad blocks is determined to be the latest management block. 43. The memory control method according to any one of -42. 前記第1の情報は、論理アドレスと前記不揮発性メモリの物理アドレスとの対応関係を示す情報である請求項43に記載のメモリ制御方法。   44. The memory control method according to claim 43, wherein the first information is information indicating a correspondence relationship between a logical address and a physical address of the nonvolatile memory. 最新のデータが存在する管理ブロックを検索する際、少なくとも前記不良ブロックのアドレス情報、前記第1の情報、及び前記カウンタとから計算されるチェックコードを検査し、
前記チェックコードが不正である管理ブロックを除外して最新のデータが存在する管理ブロックを検索することを特徴とする請求項43又は44に記載のメモリ制御方法。
When searching for a management block in which the latest data exists, at least a check code calculated from the address information of the bad block, the first information, and the counter is checked,
45. The memory control method according to claim 43 or 44, wherein a management block in which the latest data exists is searched by excluding a management block having an invalid check code.
前記管理ブロックのデータの書き込み単位であるページの数以下の複数の領域に前記管理ブロックを分割し、
1つの管理ブロックについて前記複数の領域に順次データを書き込み、
前記複数の領域全てにデータが書き込まれた後に、別の管理ブロックを新たに使用することを特徴とする請求項37〜45のいずれか1項に記載のメモリ制御方法。
The management block is divided into a plurality of areas equal to or less than the number of pages that are data write units of the management block;
Write data sequentially to the plurality of areas for one management block,
46. The memory control method according to claim 37, wherein another management block is newly used after data is written to all of the plurality of areas.
前記管理ブロックのデータの書き込み単位であるページの数以下の複数の領域に前記管理ブロックを分割し、
1つの管理ブロックについて前記複数の領域に順次データを書き込み、
前記複数の領域全てにデータが書き込まれた後に、別の管理ブロックを新たに使用し、
前記管理ブロックが分割されてできた前記複数の領域のうち、最初の領域にデータを書き込む際は、前記不良ブロックのアドレスと前記第1の情報とを書き込み、
前記第1の情報を更新する際は、前記更新された第1の情報を次の領域に書き込むことを特徴とする請求項43〜45のいずれか1項に記載のメモリ制御方法。
The management block is divided into a plurality of areas equal to or less than the number of pages that are data write units of the management block;
Write data sequentially to the plurality of areas for one management block,
After data is written to all of the plurality of areas, another management block is newly used,
Of the plurality of areas formed by dividing the management block, when writing data to the first area, write the address of the defective block and the first information,
46. The memory control method according to claim 43, wherein, when the first information is updated, the updated first information is written in a next area.
前記不揮発性メモリは、フラッシュメモリであることを特徴とする請求項37〜47のいずれか1項に記載のメモリ制御方法。   48. The memory control method according to claim 37, wherein the nonvolatile memory is a flash memory.
JP2006071019A 2006-03-15 2006-03-15 MEMORY CONTROLLER, NONVOLATILE MEMORY DEVICE, NONVOLATILE MEMORY SYSTEM, AND MEMORY CONTROL METHOD Expired - Fee Related JP4866114B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006071019A JP4866114B2 (en) 2006-03-15 2006-03-15 MEMORY CONTROLLER, NONVOLATILE MEMORY DEVICE, NONVOLATILE MEMORY SYSTEM, AND MEMORY CONTROL METHOD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006071019A JP4866114B2 (en) 2006-03-15 2006-03-15 MEMORY CONTROLLER, NONVOLATILE MEMORY DEVICE, NONVOLATILE MEMORY SYSTEM, AND MEMORY CONTROL METHOD

Publications (2)

Publication Number Publication Date
JP2007249508A JP2007249508A (en) 2007-09-27
JP4866114B2 true JP4866114B2 (en) 2012-02-01

Family

ID=38593743

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006071019A Expired - Fee Related JP4866114B2 (en) 2006-03-15 2006-03-15 MEMORY CONTROLLER, NONVOLATILE MEMORY DEVICE, NONVOLATILE MEMORY SYSTEM, AND MEMORY CONTROL METHOD

Country Status (1)

Country Link
JP (1) JP4866114B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015033404A1 (en) * 2013-09-04 2015-03-12 株式会社 東芝 Semiconductor storage device
JP2017049902A (en) * 2015-09-04 2017-03-09 日立オートモティブシステムズ株式会社 Electronic control device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2870493B2 (en) * 1996-06-21 1999-03-17 日本電気株式会社 Memory address management device
JPH11144478A (en) * 1997-11-10 1999-05-28 Hitachi Device Eng Co Ltd Information storage method of nonvolatile semiconductor memory and electronic apparatus
JP2003044231A (en) * 2001-07-31 2003-02-14 Hitachi Communication Technologies Ltd Storage medium exchange sector management system and storage device
JP4058322B2 (en) * 2002-10-07 2008-03-05 株式会社ルネサステクノロジ Memory card

Also Published As

Publication number Publication date
JP2007249508A (en) 2007-09-27

Similar Documents

Publication Publication Date Title
US8713381B2 (en) Systems and methods of using dynamic data for wear leveling in solid-state devices
CN109343790B (en) Data storage method based on NAND FLASH, terminal equipment and storage medium
US7512864B2 (en) System and method of accessing non-volatile computer memory
JP4950886B2 (en) Nonvolatile storage device, memory controller, and defective area detection method
KR101730510B1 (en) Non-regular parity distribution detection via metadata tag
KR20070076849A (en) Apparatus and method for accomplishing copy-back operation in memory card
US9465538B2 (en) Flash memory control chip and data storage device and flash memory control method
CN103425589A (en) Control apparatus, storage device, and storage control method
CN104731674B (en) Method and apparatus for storing electronic system firmware using MLC NVM
JP5950286B2 (en) Apparatus and method for writing address conversion table
TWI394170B (en) Link table recovery method
US11029867B2 (en) Apparatus and method for transmitting map information and read count in memory system
JP2008077783A (en) Memory data processor, memory, and memory data processing program
US20160253112A1 (en) Memory system and data control method
KR20200123684A (en) Apparatus for transmitting map information in memory system
JP2010079856A (en) Storage device and memory control method
JP2009064238A (en) Memory system
US10942811B2 (en) Data processing method for solid state drive
JP4956230B2 (en) Memory controller
US8533560B2 (en) Controller, data storage device and program product
JP4866114B2 (en) MEMORY CONTROLLER, NONVOLATILE MEMORY DEVICE, NONVOLATILE MEMORY SYSTEM, AND MEMORY CONTROL METHOD
KR101676175B1 (en) Apparatus and method for memory storage to protect data-loss after power loss
JP2012068765A (en) Memory controller, flash memory system with memory controller, and control method of flash memory
JP4655034B2 (en) Memory controller, flash memory system, and flash memory control method
JP2004326523A (en) Storage device with rewritable nonvolatile memory, and control method of nonvolatile memory for storage device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090312

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111028

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

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

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

Free format text: PAYMENT UNTIL: 20141118

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees