[go: up one dir, main page]

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

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

Info

Publication number
JP2006185290A
JP2006185290A JP2004379711A JP2004379711A JP2006185290A JP 2006185290 A JP2006185290 A JP 2006185290A JP 2004379711 A JP2004379711 A JP 2004379711A JP 2004379711 A JP2004379711 A JP 2004379711A JP 2006185290 A JP2006185290 A JP 2006185290A
Authority
JP
Japan
Prior art keywords
block
information
written
flash memory
physical block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2004379711A
Other languages
Japanese (ja)
Other versions
JP4332108B2 (en
Inventor
Takeo Kikuchi
健雄 菊池
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 JP2004379711A priority Critical patent/JP4332108B2/en
Publication of JP2006185290A publication Critical patent/JP2006185290A/en
Application granted granted Critical
Publication of JP4332108B2 publication Critical patent/JP4332108B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To easily prevent a flash memory from being erroneously corrected and erased. <P>SOLUTION: Management information, such as user data YD or card information CIS, and mode information MD is written in a user area of each physical block of the flash memory. Meanwhile, a block status, logical block information and data type information are written in a redundant area of each physical block. As the block status, there are information indicating a non-defective block and information indicating a defective block, and in the physical block with the management information written therein, information indicating an FOh or OFh defective block is written as a block status. In addition, the type (3h or Ch) of the management information is shown in the data type information. Consequently, access to the physical block with the management information written therein from a host system is limited, and for example, the management information is prevented from being erroneously erased. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

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

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

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

これとは対照的に、書込状態から消去状態へと変化するときには、各メモリセルは他のメモリセルと独立して変化することができない。このときには、ブロックと称される予め定められた数のメモリセルが、全て同時に消去状態になる。この一括消去動作は、一般的に、“ブロック消去”と称されている。NAND型フラッシュメモリに対する書込処理若しくは読出処理は、ページと称される予め定められた数のメモリセル単位で処理が行なわれる。消去処理の単位であるブロックは複数のページで構成されている。   In contrast, when changing from the written state to the erased state, each memory cell cannot change independently of the other memory cells. At this time, all of a predetermined number of memory cells called blocks are simultaneously erased. This batch erase operation is generally called “block erase”. The writing process or the reading process for the NAND flash memory is performed in units of a predetermined number of memory cells called pages. A block which is a unit of erasure processing is composed of a plurality of pages.

上述のような構成を有するNAND型フラッシュメモリでは、データの重ね書きを行うことができないため、データの書替を行う場合には、ブロック消去されている消去済ブロックに新たなデータ(書替後のデータ)を書込み、古いデータ(書替前のデータ)が書込まれていたブロックを消去するという処理を行わなければならない。このようなデータの書替を行った場合、書替後のデータは、書替前のデータと異なるブロックに書き込まれる。従って、ホストシステム側で管理されている論理アドレスと実際にデータが書き込まれたフラッシュメモリ内の物理アドレスの対応関係が、データを書替える毎に動的に変化する。   In the NAND flash memory having the above-described configuration, data cannot be overwritten. Therefore, when data is rewritten, new data (after rewriting) is erased in a block erased block. Data) and the block in which old data (data before rewriting) has been written must be erased. When such data is rewritten, the data after rewriting is written in a different block from the data before rewriting. Accordingly, the correspondence between the logical address managed on the host system side and the physical address in the flash memory where the data is actually written changes dynamically every time data is rewritten.

この論理アドレスと物理アドレスの対応関係を管理するため、ホストシステム側から与えられたユーザデータが書き込まれたブロックの冗長領域には、書き込んだデータに対応する論理アドレス情報が書き込まれる。この論理アドレス情報は、論理アドレスと物理アドレスの対応関係を示す変換テーブルを作成するときに読み出され、読み出した論理アドレス情報に基づいて変換テーブルが作成される。   In order to manage the correspondence between the logical address and the physical address, the logical address information corresponding to the written data is written in the redundant area of the block in which the user data given from the host system side is written. This logical address information is read when creating a conversion table indicating the correspondence between logical addresses and physical addresses, and a conversion table is created based on the read logical address information.

ホストシステム側から与えられたユーザデータが書き込まれたブロックの冗長領域には、上記のように論理アドレス情報が書き込まれるが、カード情報(CIS:Card Information Structure)等の管理情報が書き込まれたブロックの冗長領域には、論理アドレス情報が書き込まれない。つまり、カード情報等の管理情報が書き込まれたブロックには、通常、論理アドレスが割当てられない。   In the redundant area of the block in which user data given from the host system side is written, the logical address information is written as described above, but the management information such as card information (CIS: Card Information Structure) is written. No logical address information is written in the redundant area. That is, a logical address is not normally assigned to a block in which management information such as card information is written.

管理情報が書き込まれるブロックは、通常、予め設定されたフラッシュメモリ内の位置(ブロック)に割当てられるため、論理アドレスが割当てられていなくても、そのブロックにアクセスすることができる。例えば、特許文献1では、カード情報をフラッシュメモリ内の先頭又は最後の物理ブロックに書き込んでいる。従って。フラッシュメモリ内の先頭又は最後の物理ブロックを見つけ出すことにより、カード情報を読み出すことができる。
特表2001−503166号公報
Since the block in which the management information is written is normally assigned to a preset location (block) in the flash memory, the block can be accessed even if no logical address is assigned. For example, in Patent Document 1, card information is written in the first or last physical block in the flash memory. Therefore. The card information can be read out by finding the first or last physical block in the flash memory.
JP-T-2001-503166

上述の技術によれば、管理情報が書き込まれたブロックとユーザデータが書き込まれたブロックは、冗長領域に書き込まれている論理アドレス情報に基づいて判別するこができる。しかしながら、フラッシュメモリでは、ディスターブ現象等でデータが変化することがあるため、論理アドレス情報に基づいて、管理情報が書き込まれたブロックとユーザデータが書き込まれたブロックを判別した場合、誤った判別がなされてしまう場合がある。誤った判別がなされた場合、ユーザデータの書替処理や、書き込まれているユーザデータのエラー訂正処理等で、誤って管理情報が訂正又は消去されることがある。又、管理情報が書き込まれたブロックの位置情報を常時管理して、管理情報が書き込まれたブロックを、ユーザデータの書替処理やエラー訂正処理等の処理対象から除外することもできるが、除外するか否かの判断をその都度行った場合、処理効率の低下が生じる。   According to the above-described technique, a block in which management information is written and a block in which user data is written can be determined based on logical address information written in the redundant area. However, in the flash memory, data may change due to a disturb phenomenon or the like. Therefore, when a block in which management information is written and a block in which user data is written are determined based on logical address information, an erroneous determination is made. It may be done. If an erroneous determination is made, management information may be erroneously corrected or erased by rewriting processing of user data, error correction processing of written user data, or the like. It is also possible to always manage the position information of the block in which the management information is written, and to exclude the block in which the management information is written from the processing target such as user data rewrite processing and error correction processing. If the determination of whether or not to perform is performed each time, the processing efficiency decreases.

そこで、本発明は、誤訂正や誤消去を簡単かつ確実に防止することができるメモリコントローラ及びメモリコントローラを備えるフラッシュメモリシステム、並びに、フラッシュメモリの制御方法を提供することを目的とする。   Accordingly, an object of the present invention is to provide a memory controller, a flash memory system including the memory controller, and a flash memory control method that can easily and reliably prevent erroneous correction and erroneous erasure.

上記目的を達成するために、本発明の第1の観点に係るメモリコントローラは、
フラッシュメモリに対するアクセスを制御するメモリコントローラであって、
前記フラッシュメモリにアクセスする際に参照される管理情報を、前記フラッシュメモリ内の物理ブロックに書き込む第1の書込み手段と、
ホストシステムから供給されるユーザデータを該ホストシステムから与えられる論理アドレスに対応する前記フラッシュメモリ内の物理ブロックに書き込む第2の書込み手段と、
前記フラッシュメモリ内の物理ブロックが不良ブロックであるか否かを診断する診断手段と、
前記フラッシュメモリ内の各物理ブロックの冗長領域に、当該物理ブロックの良否を示す第1の情報、前記論理アドレスに関する情報を示す第2の情報及びデータの種別を示す第3の情報を書き込む第3の書込み手段とを備え、
前記第1の書込み手段により前記管理情報が書き込まれた物理ブロックの冗長領域と前記診断手段により不良ブロックであると診断された物理ブロックの冗長領域とに、不良ブロックであることを示す前記第1の情報が書き込まれ、
前記第2の書込み手段によりユーザデータが書き込まれた物理ブロックの冗長領域に、書き込まれたユーザデータに対応する前記第2の情報が書き込まれ、
前記第1の書込み手段により管理情報が書き込まれた物理ブロックの冗長領域に、前記管理情報の種別を示す前記第3の情報が書き込まれるように構成されていることを特徴とする。
In order to achieve the above object, a memory controller according to the first aspect of the present invention provides:
A memory controller that controls access to flash memory,
First writing means for writing management information referred to when accessing the flash memory to a physical block in the flash memory;
Second writing means for writing user data supplied from the host system to a physical block in the flash memory corresponding to a logical address given from the host system;
Diagnosing means for diagnosing whether a physical block in the flash memory is a bad block;
A first information indicating the quality of the physical block, a second information indicating the information on the logical address, and a third information indicating the type of data are written in the redundant area of each physical block in the flash memory. And writing means,
The first indicating that the redundant block of the physical block in which the management information is written by the first writing unit and the redundant region of the physical block diagnosed as a defective block by the diagnostic unit are defective blocks. Information is written,
The second information corresponding to the written user data is written in the redundant area of the physical block in which the user data is written by the second writing means,
The third information indicating the type of the management information is written in the redundant area of the physical block in which the management information is written by the first writing means.

このような構成を採用したことにより、管理情報が書き込まれた物理ブロックの冗長領域には、不良ブロックであることを示す第1の情報が書き込まれる。また、管理情報が書き込まれた物理ブロックの冗長領域に、管理情報の種別を示す第3の情報が書き込まれるので、誤訂正や誤消去を簡単かつ確実に防止することができる。   By adopting such a configuration, first information indicating a defective block is written in the redundant area of the physical block in which the management information is written. Further, since the third information indicating the type of management information is written in the redundant area of the physical block in which the management information is written, it is possible to easily and reliably prevent erroneous correction and erroneous erasure.

尚、前記論理アドレスと前記フラッシュメモリのアドレス空間上の物理アドレスとの対応関係を示す変換テーブルを作成するテーブル作成手段を備え、
前記テーブル作成手段が、前記第1の情報に基づいて良品ブロックであると判断された物理ブロックの前記第2の情報を読み出し、該第2の情報に基づいて前記変換テーブルを作成してもよい。
In addition, a table creating means for creating a conversion table showing a correspondence relationship between the logical address and a physical address on the address space of the flash memory,
The table creation means may read the second information of the physical block determined to be a non-defective block based on the first information, and create the conversion table based on the second information. .

また、前記第3の情報に基づいて、前記管理情報が書き込まれている物理ブロックを特定し、該物理ブロックからその管理情報を読み出す管理情報読出し手段を備えてもよい。
また、前記第1の情報が、前記冗長領域の複数のビットに割当てられ、該複数のビットに含まれる書込み状態のビットの数により不良ブロックであるか否かが示されてもよい。
Further, management information reading means may be provided that identifies a physical block in which the management information is written based on the third information and reads the management information from the physical block.
In addition, the first information may be assigned to a plurality of bits in the redundant area, and the number of bits in a write state included in the plurality of bits may indicate whether the block is a defective block.

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

上記目的を達成するために、本発明の第3の観点に係るフラッシュメモリの制御方法は、
フラッシュメモリにアクセスする際に参照される管理情報を、前記フラッシュメモリ内の物理ブロックに書き込む第1の書込み処理と、
ホストシステムから供給されるユーザデータを、該ホストシステムから与えられる論理アドレスに対応する前記フラッシュメモリ内の物理ブロックに書き込む第2の書込み処理と、
前記フラッシュメモリ内の物理ブロックが不良ブロックであるか否かを診断する診断処理と、
前記フラッシュメモリ内の冗長領域に、物理ブロックの良否を示す第1の情報、前記論理アドレスに関する情報を示す第2の情報及びデータの種別を示す第3の情報を書き込む第3の書込み処理とを含み、
前記第1の書込み処理により前記管理情報が書き込まれた物理ブロックの冗長領域と前記診断処理により不良ブロックであると診断された物理ブロックの冗長領域に、不良ブロックであることを示す前記第1の情報が書き込まれ、
前記第2の書込み処理によりユーザデータが書き込まれた物理ブロックの冗長領域に、書き込まれたデータに対応する前記第2の情報が書き込まれ、
前記第1の書込み処理により前記管理情報が書き込まれた物理ブロックの冗長領域に、該管理情報の種別を示す前記第3の情報が書き込まれることを特徴とする。
In order to achieve the above object, a flash memory control method according to a third aspect of the present invention includes:
A first writing process for writing management information referred to when accessing the flash memory to a physical block in the flash memory;
A second write process for writing user data supplied from a host system to a physical block in the flash memory corresponding to a logical address given from the host system;
A diagnostic process for diagnosing whether the physical block in the flash memory is a bad block;
A third writing process for writing first information indicating the quality of a physical block, second information indicating information on the logical address, and third information indicating a type of data in a redundant area in the flash memory; Including
The first block indicating a defective block in the redundant area of the physical block in which the management information is written by the first writing process and the redundant area of the physical block diagnosed as a defective block by the diagnostic process Information is written,
The second information corresponding to the written data is written in the redundant area of the physical block in which the user data is written by the second writing process,
The third information indicating the type of the management information is written in the redundant area of the physical block in which the management information is written by the first write process.

尚、前記論理アドレスと前記フラッシュメモリのアドレス空間上の物理アドレスとの対応関係を示す変換テーブルを作成するテーブル作成処理を含み、
前記テーブル作成処理が、前記第1の情報に基づいて良品ブロックであると判断された物理ブロックの前記第2の情報を読み出し、該第2の情報に基づいて前記変換テーブルを作成する処理であってもよい。
A table creation process for creating a conversion table indicating a correspondence relationship between the logical address and a physical address in the address space of the flash memory;
The table creation process is a process of reading the second information of the physical block determined to be a non-defective block based on the first information and creating the conversion table based on the second information. May be.

また、前記第3の情報に基づいて、前記管理情報が書き込まれている物理ブロックを特定し、該物理ブロックからその管理情報を読み出す管理情報読出し処理を含んでもよい。   Further, it may include a management information reading process for identifying a physical block in which the management information is written based on the third information and reading the management information from the physical block.

また、前記第1の情報が、前記冗長領域の複数のビットに割当てられ、該複数のビットに含まれる書込み状態のビットの数により不良ブロックであるか否かを示してもよい。   In addition, the first information may be assigned to a plurality of bits in the redundant area, and may indicate whether or not the block is a bad block by the number of bits in a write state included in the plurality of bits.

本発明によれば、論理アドレスが割当てられないブロックに書き込まれているカード情報等の管理情報が、誤って訂正又は消去されたりすることを簡単かつ確実に防止することができる。又、論理アドレスと物理アドレスの対応関係を示す変換テーブルを作成するときに、管理情報が書き込まれている物理ブロックが、不良ブロックと同等に取り扱われるため、管理情報が書き込まれている物理ブロックを除外する処理を別途行う必要がなくなり、変換テーブルの作成処理の効率が向上する。   According to the present invention, it is possible to easily and reliably prevent management information such as card information written in a block to which no logical address is assigned from being erroneously corrected or erased. Also, when creating a conversion table showing the correspondence between logical addresses and physical addresses, the physical block in which the management information is written is handled in the same way as the bad block. There is no need to perform a process of exclusion separately, and the efficiency of the conversion table creation process is improved.

以下、図面に基づき、本発明の実施の形態について詳細に説明する。
図1は、本発明の実施形態に係るフラッシュメモリシステムの概要を示す構成図である。
図1に示したように、フラッシュメモリシステム1は、フラッシュメモリ2と、それを制御するメモリコントローラ3で構成されている。又、フラッシュメモリシステム1は、通常、ホストシステム4に着脱可能に装着され、ホストシステム4に対して、一種の外部記憶装置として用いられる。
尚、ホストシステム4としては、文字、音声、あるいは画像情報等の種々の情報を処理するパーソナルコンピュータやデジタルスチルカメラをはじめとする各種情報処理装置が挙げられる。
以下に、フラッシュメモリ2及びメモリコントローラ3の詳細を説明する。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a configuration diagram showing an outline of a flash memory system according to an embodiment of the present invention.
As shown in FIG. 1, the flash memory system 1 includes a flash memory 2 and a memory controller 3 that controls the flash memory 2. The flash memory system 1 is usually detachably attached to the host system 4 and used as a kind of external storage device for the host system 4.
Examples of the host system 4 include various information processing apparatuses such as a personal computer and a digital still camera that process various information such as characters, sounds, and image information.
Details of the flash memory 2 and the memory controller 3 will be described below.

[フラッシュメモリ2の説明]
このフラッシュメモリシステム1において、データが記憶されるフラッシュメモリ2は、NAND型フラッシュメモリで構成されている。NAND型フラッシュメモリは、ストレージデバイスへの用途として(ハードディスクの代わりになるものとして)開発された不揮発性メモリである。このNAND型フラッシュメモリは、ランダムアクセスを行なうことができず、書込みと読出しはページ単位で、消去はブロック単位で行なわれる。又、データの上書きができないので、データを書込むときは、消去されている領域にデータの書込みが行なわれる。
[Description of flash memory 2]
In this flash memory system 1, a flash memory 2 in which data is stored is composed of a NAND flash memory. The NAND flash memory is a non-volatile memory developed for use as a storage device (as an alternative to a hard disk). This NAND flash memory cannot perform random access, and writing and reading are performed in units of pages and erasing is performed in units of blocks. Since data cannot be overwritten, when data is written, data is written into the erased area.

NAND型フラッシュメモリは、このような特徴を有するため、通常、データの書替を行なう場合には、ブロック消去されている消去済ブロックに新たなデータ(書替後のデータ)を書込み、古いデータ(書替前のデータ)が書込まれていたブロックを消去するという処理を行なっている。   Since the NAND flash memory has such characteristics, normally, when data is rewritten, new data (data after rewriting) is written to the erased block that has been erased, and old data is written. A process of erasing a block in which (data before rewriting) has been written is performed.

このようなデータの書替を行なった場合、書替後のデータは、書替前と異なるブロックに書込まれるため、ホストシステム4側から与えられる論理アドレスと、フラッシュメモリ2内での物理アドレスとの対応関係は、データを書替える毎に動的に変化する。従って、フラッシュメモリ2にアクセスするときには、通常、論理アドレスと物理アドレスとの対応関係を示したアドレス変換テーブルが作成され、このアドレス変換テーブルを用いて、フラッシュメモリ2に対するアクセスが行なわれる。   When rewriting such data, since the data after rewriting is written in a different block from before rewriting, the logical address given from the host system 4 side and the physical address in the flash memory 2 The correspondence between and changes dynamically every time data is rewritten. Therefore, when accessing the flash memory 2, an address conversion table showing the correspondence between logical addresses and physical addresses is usually created, and the flash memory 2 is accessed using this address conversion table.

図2は、ブロックとページの関係を示す説明図である。
上記ブロックとページの構成は、フラッシュメモリの仕様によって異なるが、一般的なフラッシュメモリでは、図2(a)に示したように、1ブロックが32ページ(P0〜P31)で構成され、各ページが512バイトのユーザー領域と16バイトの冗長領域で構成されている。又、記憶容量の増加に伴い、図2(b)に示したように、1ブロックが64ページ(P0〜P63)で構成され、各ページが2048バイトのユーザー領域と64バイトの冗長領域で構成されているものも提供されている。本実施形態では、1ブロックが32ページで構成され、各ページが512バイトのユーザー領域と16バイトの冗長領域で構成されているものして説明する。
FIG. 2 is an explanatory diagram showing the relationship between blocks and pages.
The configuration of the block and page differs depending on the specification of the flash memory. However, in a general flash memory, as shown in FIG. 2A, one block is composed of 32 pages (P0 to P31). Consists of a 512-byte user area and a 16-byte redundant area. As the storage capacity increases, as shown in FIG. 2B, one block is composed of 64 pages (P0 to P63), and each page is composed of a 2048-byte user area and a 64-byte redundant area. What is being provided is also provided. In the present embodiment, one block is composed of 32 pages, and each page is composed of a 512-byte user area and a 16-byte redundant area.

ここで、ユーザー領域は、主に、ホストシステム4から供給されるデ―タが記憶される領域であり、冗長領域は、誤り訂正符号、対応論理アドレス情報及びブロックステータス等の付加データが記憶される領域である。誤り訂正符号は、ユーザー領域に記憶されているデータに含まれる誤りを検出、訂正するための付加データであり、後述するECCブロックによって生成される。   Here, the user area is mainly an area where data supplied from the host system 4 is stored, and the redundant area is stored with additional data such as an error correction code, corresponding logical address information and block status. Area. The error correction code is additional data for detecting and correcting an error included in the data stored in the user area, and is generated by an ECC block described later.

対応論理アドレス情報は、物理ブロックにデータが記憶されている場合に書込まれ、その物理ブロックに記憶されているデータの論理アドレスに関する情報を示している。尚、物理ブロックにデータが記憶されていない場合は、対応論理アドレス情報が書込まれないので、対応論理アドレス情報が書込まれているか否かで、そのブロックが消去済ブロックであるか否かを判断することができる。つまり、対応論理ブロックアドレスが書込まれていない場合は、消去済ブロックであると判断される。   The corresponding logical address information is written when data is stored in a physical block, and indicates information related to the logical address of the data stored in the physical block. If no data is stored in the physical block, the corresponding logical address information is not written, so whether the corresponding logical address information is written or not is the erased block. Can be judged. That is, if the corresponding logical block address is not written, it is determined that the block is an erased block.

ブロックステータスは、その物理ブロックが不良ブロック(正常にデータの書込み等を行なうことができない物理ブロック)であるか否かを示すフラグであり、その物理ブロックが不良ブロックであると判断された場合には、不良ブロックであることを示すフラグが設定される。   The block status is a flag indicating whether or not the physical block is a bad block (a physical block in which data cannot be normally written). When the physical block is determined to be a bad block, Is set with a flag indicating that it is a bad block.

次に、フラッシュメモリ2の回路構成について説明する。
一般的なNAND型フラッシュメモリは、書込みデータ若しくは読出しデータを保持するためのレジスタと、データを記憶するメモリセルアレイによって構成されている。メモリセルアレイは、複数のメモリセルが直列に接続されたメモリセル群を複数備えており、ワード線によって、メモリセル群の特定のメモリセルが選択される。このワード線によって選択されたメモリセルとレジスタの間で、データの複写(レジスタからメモリセルへの複写、若しくはメモリセルからレジスタへの複写)が行なわれる。
Next, the circuit configuration of the flash memory 2 will be described.
A general NAND flash memory includes a register for holding write data or read data and a memory cell array for storing data. The memory cell array includes a plurality of memory cell groups in which a plurality of memory cells are connected in series, and a specific memory cell in the memory cell group is selected by a word line. Data copying (copying from register to memory cell or copying from memory cell to register) is performed between the memory cell selected by the word line and the register.

メモリセルアレイを構成するメモリセルは、2つのゲートを備えたMOSトランジスタで構成されている。ここで、上側のゲートはコントロールゲートと、下側のゲートはフローティングゲートと呼ばれており、フローティングゲートに電荷(電子)を注入したり、フローティングゲートから電荷(電子)を排出したりすることによって、データの書込みや消去を行っている。   A memory cell constituting the memory cell array is composed of a MOS transistor having two gates. Here, the upper gate is called a control gate, and the lower gate is called a floating gate. By injecting charges (electrons) into the floating gate and discharging charges (electrons) from the floating gate, Data is written or erased.

フローティングゲートは、周囲を絶縁体で囲まれているので、注入された電子は長期間にわたって保持される。フローティングゲートに電子を注入するときは、コントロールゲートが高電位側となる高電圧を印加して電子を注入し、フローティングゲートから電子を排出するときは、コントロールゲートが低電位側となる高電圧を印加して電子を排出する。フローティングゲートに電子が注入されている状態(書込状態)が、論理値"0"のデータに対応し、フローティングゲートから電子が排出されている状態(消去状態)が、論理値"1"のデータに対応する。   Since the floating gate is surrounded by an insulator, the injected electrons are held for a long period of time. When injecting electrons into the floating gate, a high voltage is applied so that the control gate is at the high potential side. When electrons are injected from the floating gate, a high voltage at which the control gate is at the low potential side is applied. Applied to discharge electrons. The state in which electrons are injected into the floating gate (write state) corresponds to data having a logical value “0”, and the state in which electrons are discharged from the floating gate (erased state) has a logical value “1”. Corresponds to data.

[メモリコントローラ3の説明]
メモリコントローラ3は、ホストインターフェース制御ブロック5と、マイクロプロセッサ6と、ホストインターフェースブロック7と、ワークエリア8と、バッファ9と、フラッシュメモリインターフェースブロック10と、ECC(エラー・コレクション・コード)ブロック11と、フラッシュメモリシーケンサブロック12とから構成される。これら機能ブロックによって構成されるメモリコントローラ3は、一つの半導体チップ上に集積されている。以下に、各機能ブロックの機能を説明する。
[Description of Memory Controller 3]
The memory controller 3 includes a host interface control block 5, a microprocessor 6, a host interface block 7, a work area 8, a buffer 9, a flash memory interface block 10, and an ECC (error collection code) block 11. And a flash memory sequencer block 12. The memory controller 3 constituted by these functional blocks is integrated on one semiconductor chip. Hereinafter, the function of each functional block will be described.

マイクロプロセッサ6は、メモリコントローラ3を構成する各機能ブロック全体の、動作を制御する機能ブロックである。
ホストインターフェース制御ブロック5は、ホストインターフェースブロック7の動作を制御する機能ブロックである。ここで、ホストインターフェース制御ブロック5は、ホストインターフェースブロック7の動作を設定する動作設定レジスタ(図示せず)を備えており、この動作設定レジスタに基づいて、ホストインターフェースブロック7は動作する。
The microprocessor 6 is a functional block that controls the operation of all the functional blocks constituting the memory controller 3.
The host interface control block 5 is a functional block that controls the operation of the host interface block 7. Here, the host interface control block 5 includes an operation setting register (not shown) for setting the operation of the host interface block 7, and the host interface block 7 operates based on the operation setting register.

ホストインターフェースブロック7は、ホストシステム4とデータ、アドレス情報、ステータス情報及び外部コマンド情報の授受を行なう機能ブロックである。すなわち、フラッシュメモリシステム1がホストシステム4に装着されると、フラッシュメモリシステム1とホストシステム4は、外部バス13を介して相互に接続される。かかる状態において、ホストシステム4よりフラッシュメモリシステム1に供給されるデータ等は、ホストインターフェースブロック7を入口として、メモリコントローラ3の内部に取り込まれ、フラッシュメモリシステム1からホストシステム4に供給されるデータ等は、ホストインターフェースブロック7を出口として、ホストシステム4に供給される。   The host interface block 7 is a functional block that exchanges data, address information, status information, and external command information with the host system 4. That is, when the flash memory system 1 is attached to the host system 4, the flash memory system 1 and the host system 4 are connected to each other via the external bus 13. In such a state, data or the like supplied from the host system 4 to the flash memory system 1 is taken into the memory controller 3 with the host interface block 7 as an entrance, and is supplied from the flash memory system 1 to the host system 4. Are supplied to the host system 4 using the host interface block 7 as an exit.

さらに、ホストインターフェースブロック7は、ホストシステム4より供給される論理アドレス、セクタ数及び外部コマンドを保持するレジスタや、エラーが発生した場合にセットされるエラーレジスタ(図示せず)等を有している。   Further, the host interface block 7 has a register for holding a logical address, a sector number and an external command supplied from the host system 4, an error register (not shown) set when an error occurs, and the like. Yes.

ワークエリア8は、フラッシュメモリ2の制御に必要なデータが一時的に格納される作業領域であり、複数のSRAM(Static Random Access Memory)セルによって構成されている。   The work area 8 is a work area in which data necessary for controlling the flash memory 2 is temporarily stored, and is composed of a plurality of SRAM (Static Random Access Memory) cells.

バッファ9は、フラッシュメモリ2から読出したデータ及びフラッシュメモリ2に書込むデータを、一時的に保持する機能ブロックである。すなわち、フラッシュメモリ2から読出したデータは、ホストシステム4の受取準備ができるまで、バッファ9に保持され、フラッシュメモリ2に書込むデータは、フラッシュメモリ2の書込準備ができるまで、バッファ9に保持される。   The buffer 9 is a functional block that temporarily holds data read from the flash memory 2 and data to be written to the flash memory 2. That is, data read from the flash memory 2 is held in the buffer 9 until the host system 4 is ready to receive data, and data to be written to the flash memory 2 is stored in the buffer 9 until the flash memory 2 is ready to write. Retained.

フラッシュメモリシーケンサブロック12は、内部コマンドに基づいて、フラッシュメモリ2の動作を制御する機能ブロックである。フラッシュメモリシーケンサブロック12は、複数のレジスタ(図示せず)を備え、この複数のレジスタに内部コマンドを実行する際に必要な情報が設定される。この複数のレジスタに、内部コマンドを実行する際に必要な情報が設定されると、フラッシュメモリシーケンサブロック12は、その情報に基づいて処理を実行する。   The flash memory sequencer block 12 is a functional block that controls the operation of the flash memory 2 based on an internal command. The flash memory sequencer block 12 includes a plurality of registers (not shown), and information necessary for executing an internal command is set in the plurality of registers. When information necessary for executing an internal command is set in the plurality of registers, the flash memory sequencer block 12 executes processing based on the information.

ここで、「内部コマンド」とは、メモリコントローラ3からフラッシュメモリ2に与えられるコマンドであり、ホストシステム4からフラッシュメモリシステム1に与えられるコマンドである「外部コマンド」と区別される。
フラッシュメモリインターフェースブロック10は、内部バス14を介して、フラッシュメモリ2とデータ、アドレス情報、ステータス情報、内部コマンド情報及びデバイスID情報等の授受を行なう機能ブロックである。
Here, the “internal command” is a command given from the memory controller 3 to the flash memory 2 and is distinguished from an “external command” which is a command given from the host system 4 to the flash memory system 1.
The flash memory interface block 10 is a functional block that exchanges data, address information, status information, internal command information, device ID information, and the like with the flash memory 2 via the internal bus 14.

ECCブロック11は、フラッシュメモリ2に書込むデ―タに付加されるエラーコレクションコードを生成するとともに、読出しデータに付加されているエラーコレクションコードに基づいて、読出したデータに含まれる誤りを検出・訂正する機能ブロックである。   The ECC block 11 generates an error correction code added to data to be written in the flash memory 2 and detects an error included in the read data based on the error correction code added to the read data. This is a functional block to be corrected.

[フラッシュメモリ2に対するアクセスの説明]
図3は、論理ブロックと物理ブロックの対応関係を示す説明図であり、論理アドレス空間を、セクタ単位で付けた連番であるLBA(Logical Block Address)で示している。
[Description of Access to Flash Memory 2]
FIG. 3 is an explanatory diagram showing the correspondence between logical blocks and physical blocks. The logical address space is indicated by LBA (Logical Block Address), which is a serial number assigned in units of sectors.

本実施例に係るフラッシュメモリシステム1では、複数の物理ブロックでゾーンを形成し、各ゾーンに対して、予め設定された論理アドレスの領域を割当てている。図3に示した例では、1024個の物理ブロックでゾーンが形成されている。又、このゾーンに対して、1000ブロック分(物理ブロック1000個分)の論理ブロック空間が割当てられている。   In the flash memory system 1 according to the present embodiment, a zone is formed by a plurality of physical blocks, and a predetermined logical address area is assigned to each zone. In the example shown in FIG. 3, a zone is formed by 1024 physical blocks. Further, a logical block space of 1000 blocks (1000 physical blocks) is allocated to this zone.

ここで、1セクタの容量がフラッシュメモリ2の1ページの容量と等しく、各物理ブロックが32個のページで構成されている場合、ゾーン内の各物理ブロックは、論理アドレス空間の32セクタ分の領域に割当てられる。従って、論理アドレス空間の32セクタ分の領域を1個の論理ブロックとすれば、1個の物理ブロックに対して1個の論理ブロックが割当てられる。又、1つのゾーンに割当てられる32000セクタ分の領域(LBA0〜LBA31999)を、32セクタ毎に区切った論理ブロックには、連番(LBN0〜LBN999)が付けられている(以下、論理ブロックに付けた連番を論理ブロック連番という)。一方、ゾーンを構成する1024個の物理ブロックにも連番(#0〜#1023)が付けられている(以下、物理ブロックに付けた連番を物理ブロック連番という)。   Here, when the capacity of one sector is equal to the capacity of one page of the flash memory 2 and each physical block is composed of 32 pages, each physical block in the zone corresponds to 32 sectors in the logical address space. Assigned to a region. Therefore, if an area for 32 sectors in the logical address space is defined as one logical block, one logical block is assigned to one physical block. In addition, sequential numbers (LBN0 to LBN999) are assigned to logical blocks in which an area of 32000 sectors (LBA0 to LBA31999) allocated to one zone is divided every 32 sectors (hereinafter referred to as logical blocks). Are called logical block serial numbers). On the other hand, serial numbers (# 0 to # 1023) are also assigned to the 1024 physical blocks constituting the zone (hereinafter, the serial numbers assigned to the physical blocks are referred to as physical block serial numbers).

図3に示した例では、LBA0〜LBA31に対応する論理ブロック連番LBN0の論理ブロックが、物理ブロック連番#3の物理ブロックに割当てられ、LBA32〜LBA63に対応する論理ブロック連番LBN1の論理ブロックが、物理ブロック連番#1の物理ブロックに割当てられ、LBA64〜LBA95に対応する論理ブロック連番LBN2の論理ブロックが、物理ブロック連番#5の物理ブロックに割当てられ、LBA96〜LBA127に対応する論理ブロック連番LBN3の論理ブロックが、物理ブロック連番#7の物理ブロックに割当てられている。   In the example shown in FIG. 3, the logical block with the logical block sequence number LBN0 corresponding to LBA0 to LBA31 is assigned to the physical block with the physical block sequence number # 3, and the logical block with the logical block sequence number LBN1 corresponding to LBA32 to LBA63 is assigned. The block is assigned to the physical block of physical block serial number # 1, the logical block of logical block serial number LBN2 corresponding to LBA64 to LBA95 is assigned to the physical block of physical block serial number # 5, and corresponds to LBA96 to LBA127. The logical block having the logical block serial number LBN3 is assigned to the physical block having the physical block serial number # 7.

フラッシュメモリ2にアクセスするときは、論理ブロックと物理ブロックの対応関係を示した変換テーブルを作成し、この変換テーブルを用いて、アクセスするページのアドレスを求めている。変換テーブルは、各物理ブロックの冗長領域に書き込まれている論理ブロック情報(その物理ブロックに書込まれているユーザーデータに対応する論理ブロックを示す情報)に基づいて作成される。   When accessing the flash memory 2, a conversion table showing the correspondence between logical blocks and physical blocks is created, and the address of the page to be accessed is obtained using this conversion table. The conversion table is created based on logical block information (information indicating a logical block corresponding to user data written in the physical block) written in the redundant area of each physical block.

例えば、物理ブロックにユーザーデータを書込んだときに、そのユーザーデータに対応する論理ブロックの論理ブロック連番を、その物理ブロックの冗長領域に書込めば、この論理ブロック連番を順次読み出すことにより、変換テーブルを作成することができる。   For example, when user data is written to a physical block, if the logical block serial number of the logical block corresponding to the user data is written to the redundant area of the physical block, the logical block serial number is read sequentially. A conversion table can be created.

図4は、変換テーブルの説明図である。
この変換テーブルは、1つのゾーンに対して作成されたものであり、ゾーンに割当てられている論理アドレス空間の論理ブロック連番LBN0〜LBN999と、これ対応する物理ブロックの物理ブロック連番#0〜#1023の対応関係を示している。図4に示した例では、論理ブロック連番LBN0は、物理ブロック連番#3に対応し、論理ブロック連番LBN1は、物理ブロック連番#1に対応し、論理ブロック連番LBN2は、物理ブロック連番#5に対応する。
FIG. 4 is an explanatory diagram of the conversion table.
This conversion table is created for one zone, and logical block serial numbers LBN0 to LBN999 of the logical address space assigned to the zone and physical block serial numbers # 0 to # 0 of the corresponding physical blocks. The correspondence relationship of # 1023 is shown. In the example shown in FIG. 4, the logical block serial number LBN0 corresponds to the physical block serial number # 3, the logical block serial number LBN1 corresponds to the physical block serial number # 1, and the logical block serial number LBN2 Corresponds to block sequence number # 5.

このように、各論理ブロック連番に対応する物理ブロック連番が示されているので、ホストシステム4からコマンドと共にアドレス情報としてLBAが供給された場合は、そのLBAが属する論理ブロックの論理ブロック連番を変換テーブル上で検索することにより、それに対応する物理ブロックの物理ブロック連番を求めることができる。   Thus, since the physical block serial number corresponding to each logical block serial number is shown, when the LBA is supplied as address information together with the command from the host system 4, the logical block serial number of the logical block to which the LBA belongs is displayed. By searching the number on the conversion table, the physical block serial number of the corresponding physical block can be obtained.

物理ブロックの冗長領域には、論理ブロック情報と共にブロックステータスやデータ種別等の情報が書き込まれている。これらの情報について図5を参照して説明する。   In the redundant area of the physical block, information such as block status and data type is written together with the logical block information. Such information will be described with reference to FIG.

図5は、冗長領域に書き込まれる情報を示す図である。
ブロックステータスは、その物理ブロックが良品ブロックであるか、又は不良ブロックであるかを示す情報である。図5に示した例では、ブロックステータスに対して8ビットのデータが割当てられている。
FIG. 5 is a diagram showing information written in the redundant area.
The block status is information indicating whether the physical block is a non-defective block or a defective block. In the example shown in FIG. 5, 8-bit data is assigned to the block status.

ブロックステータスの初期状態は、全てビットが消去状態(論理値の“1”)になっている(FFh(16進数))。そして、不良ブロックであると診断された場合には、8ビットのうちの3ビットを書込み状態(論理値の“0”)にする。又、このブロックステータスに基づいて良否を判断する場合、消去状態(論理値の“1”)のビットが1ビット以下であれば、良品ブロックと判断し、消去状態(論理値の“1”)のビットが2ビット以上であれば、不良ブロックと判断する。   In the initial state of the block status, all bits are in the erased state (logical value “1”) (FFh (hexadecimal number)). When it is diagnosed that the block is a defective block, 3 bits out of 8 bits are set in a write state (logical value “0”). Also, when determining pass / fail based on this block status, if the bit in the erased state (logical value “1”) is 1 bit or less, it is determined as a good block and the erased state (logical value “1”). If this bit is 2 bits or more, it is determined as a bad block.

なお、不良ブロックであると判断した場合に、書込み状態(論理値の“0”)にするビットの数は、フラッシュメモリ2の信頼性等を考慮して適宜設定すればよい。又、ブロックステータスに基づいて良否を判断する場合の基準、つまり、良品ブロックと判断する書込み状態(論理値の“0”)のビットの数の許容数についても、フラッシュメモリ2の信頼性等を考慮して適宜設定すればよい。   If it is determined that the block is a defective block, the number of bits to be written (logical value “0”) may be appropriately set in consideration of the reliability of the flash memory 2. In addition, the reliability of the flash memory 2 is also determined with respect to the criteria for determining pass / fail based on the block status, that is, the allowable number of bits in the write state (logical value “0”) that is determined to be a good block It may be set as appropriate in consideration.

また、カード情報(CIS)が書き込まれている物理ブロックのブロックステータスは、F0h(16進数)が設定され、モード情報(MD)が書き込まれている物理ブロックのブロックステータスには、0Fh(16進数)が設定される。これらは、実質的に不良ブロックを示すブロックステータスとなる。   Further, F0h (hexadecimal number) is set as the block status of the physical block in which the card information (CIS) is written, and 0Fh (hexadecimal number) is set in the block status of the physical block in which the mode information (MD) is written. ) Is set. These are substantially block statuses indicating bad blocks.

データ種別情報は、ユーザ領域に書き込まれているデータの種別を示す情報であり、4ビットのデータが割当てられている。例えば、ユーザ領域に、属性等のカード情報(CIS)、ホストシステム4から与えられるユーザデータ(YD)又は書込みモード等を示すモード情報(MD)が書き込まれている場合に、データ種別情報を検出することにより、各ブロックに書き込まれているデータがどれに該当するかを判断することができる。   The data type information is information indicating the type of data written in the user area, and 4-bit data is allocated. For example, data type information is detected when card information (CIS) such as attributes, user data (YD) given from the host system 4 or mode information (MD) indicating a write mode is written in the user area. By doing so, it can be determined which data is written in each block.

図5では、ユーザデータ(YD)が書き込まれている物理ブロックのデータ種別情報は、全てのビットが消去状態(論理値の“1”)のFh(16進数)になっている。これに対し、カード情報(CIS)が書き込まれている物理ブロックのデータ種別情報は、3h(16進数)に設定され、モード情報(MD)が書き込まれている物理ブロックのデータ種別はCh(16進数)に設定されている。
この場合、不良ブロックのデータ種別情報も、ユーザデータ(YD)が書き込まれている物理ブロックのデータ種別情報と同じである。尚、ユーザデータ(YD)が書き込まれている物理ブロックのデータ種別情報は、不良ブロックのデータ種別情報と同一になっているが、Fh(16進数)と異なるデータ種別を設定にしても良い。
In FIG. 5, the data type information of the physical block in which the user data (YD) is written has Fh (hexadecimal number) in which all bits are in the erased state (logical value “1”). On the other hand, the data type information of the physical block in which the card information (CIS) is written is set to 3h (hexadecimal number), and the data type of the physical block in which the mode information (MD) is written is Ch (16 Hex).
In this case, the data type information of the defective block is also the same as the data type information of the physical block in which the user data (YD) is written. The data type information of the physical block in which the user data (YD) is written is the same as the data type information of the defective block, but a data type different from Fh (hexadecimal number) may be set.

論理ブロック情報には、ユーザ領域に書き込まれているユーザデータ(YD)に対応する論理ブロックの論理ブロック連番が、10ビットデータで書き込まれている。対応する論理ブロックのないカード情報(CIS)やモード情報(MD)が書き込まれている物理ブロックには、論理ブロック情報が書き込まれず、全てのビットが消去状態(論理値の“1”)になっている。つまり、カード情報(CIS)やモード情報(MD)が書き込まれている物理ブロックの論理ブロック情報は、3FFhになっている。   In the logical block information, the logical block serial number of the logical block corresponding to the user data (YD) written in the user area is written as 10-bit data. In a physical block in which card information (CIS) or mode information (MD) without a corresponding logical block is written, logical block information is not written, and all bits are in an erased state (logical value “1”). ing. That is, the logical block information of the physical block in which card information (CIS) and mode information (MD) are written is 3FFh.

冗長領域に書き込まれている論理ブロック情報、ブロックステータス、及びデータ種別等の情報は、図4に示した変換テーブルを作成する場合や、カード情報(CIS)やモード情報(MD)等の管理情報が書き込まれる物理ブロックにアクセスする場合に、参照される。   Information such as logical block information, block status, and data type written in the redundant area is management information such as card information (CIS) and mode information (MD) when creating the conversion table shown in FIG. Referenced when accessing the physical block to which is written.

図4に示した変換テーブルを作成する場合には、ワークエリア8上に変換テーブルを作成する領域を確保し、この領域に論理ブロック連番と物理ブロック連番の対応関係を記述する。論理ブロック連番と物理ブロック連番の対応関係は、冗長領域から読み出した論理ブロック情報に基づいて記述される。論理ブロック情報を読み出すときには、良品ブロックの論理ブロック情報が順次読み出される。   When the conversion table shown in FIG. 4 is created, an area for creating the conversion table is secured on the work area 8, and the correspondence between the logical block serial number and the physical block serial number is described in this area. The correspondence between the logical block serial number and the physical block serial number is described based on the logical block information read from the redundant area. When reading out the logical block information, the logical block information of the non-defective block is sequentially read out.

良品ブロックの判断は、ブロックステータスに基づいて行われるため、ブロックステータスが不良ブロックを示す情報に設定されているカード情報(CIS)やモード情報(MD)等の管理情報が書き込まれている物理ブロックに対しては、論理ブロック情報の読み出しが行われない。   Since the non-defective block is determined based on the block status, the physical block in which management information such as card information (CIS) and mode information (MD) in which the block status is set to information indicating a defective block is written. In contrast, the logical block information is not read.

つまり、ブロックステータスに不良ブロックを示す情報が設定されている物理ブロックを、論理ブロック情報の読み出し対象から除外することにより、カード情報(CIS)やモード情報(MD)等の管理情報が書き込まれている物理ブロックも、論理ブロック情報の読み出し対象から除外することができる。   In other words, management information such as card information (CIS) and mode information (MD) is written by excluding a physical block in which information indicating a bad block is set in the block status from a reading target of logical block information. The physical block that is present can also be excluded from the read target of the logical block information.

更に、カード情報(CIS)やモード情報(MD)等の管理情報が書き込まれている物理ブロックのブロックステータスを、不良ブロックを示す情報と同じにしたことにより、ユーザデータ(YD)が書き込まれている物理ブロックと間違えて、管理情報が書き替えられたり、又は消去されたりすることを少なくすることができる。つまり、フラッシュメモリは、ディスターブ現象等でデータが変化してしまうことがあるが、ブロックステータスが不良ブロックを示す情報に設定されていれば、良品ブロックと間違われることは殆どないため、誤った処理の対象となることが非常に少なくなる。   Further, the user data (YD) is written by making the block status of the physical block in which management information such as card information (CIS) and mode information (MD) is written the same as the information indicating the defective block. It can be reduced that management information is rewritten or erased by mistake with a physical block. In other words, the data in the flash memory may change due to a disturb phenomenon, etc., but if the block status is set to information indicating a bad block, it is almost never mistaken for a good block, so the wrong processing It becomes very rare to be targeted.

カード情報(CIS)やモード情報(MD)等の管理情報が書き込まれている物理ブロックのブロックステータスは、不良ブロックと同様の情報が設定されているが、データ種別の情報に基づいて、管理情報が書き込まれている物理ブロックを判別することができる。
つまり、不良ブロックのデータ種別は、全てのビットが消去状態(論理値の“1”)のFh(16進数)になっているが、カード情報(CIS)が書き込まれている物理ブロックのデータ種別は3h(16進数)に設定され、モード情報(MD)が書き込まれている物理ブロックのデータ種別はCh(16進数)に設定されている。
As the block status of the physical block in which management information such as card information (CIS) and mode information (MD) is written, the same information as that of the defective block is set, but the management information is based on the data type information. Can be determined.
In other words, the data type of the defective block is Fh (hexadecimal) in which all bits are in the erased state (logical value “1”), but the data type of the physical block in which the card information (CIS) is written. Is set to 3h (hexadecimal number), and the data type of the physical block in which the mode information (MD) is written is set to Ch (hexadecimal number).

従って、データ種別が3h(16進数)の物理ブロックを検索することにより、カード情報(CIS)が書き込まれている物理ブロックを知得することができ、データ種別がCh(16進数)の物理ブロックを検索することにより、モード情報(MD)が書き込まれている物理ブロックを知得することができる。   Therefore, by searching for a physical block with a data type of 3h (hexadecimal number), a physical block in which card information (CIS) is written can be obtained, and a physical block with a data type of Ch (hexadecimal number) can be obtained. By searching, a physical block in which mode information (MD) is written can be obtained.

次に、論理ブロック情報、ブロックステータス、及びデータ種別の設定処理について説明する。
診断処理で不良ブロックであると診断された場合、その物理ブロックの冗長領域に不良ブロックを示すブロックステータスを書き込む。尚、不良ブロックの診断処理では、例えば、消去を行ったときに全てのビットが消去状態になるかと、予め設定されたデータを書き込んだときに正常に書き込めたか等の診断が行われる。
Next, logical block information, block status, and data type setting processing will be described.
When it is diagnosed as a defective block by the diagnostic processing, a block status indicating the defective block is written in the redundant area of the physical block. In the defective block diagnosis process, for example, a diagnosis is made as to whether all bits are in an erased state when erasing is performed, and whether data is normally written when preset data is written.

カード情報(CIS)やモード情報(MD)等の管理情報を書き込んだ場合は、管理情報を書き込んだ物理ブロックの冗長領域に不良ブロックを示すブロックステータスを書き込むと共に、データ種別を示す情報を書き込む。ユーザデータ(YD)を書き込んだ場合は、ユーザデータ(YD)を書き込んだ物理ブロックの冗長領域に、論理ブロック情報を示す情報を書き込む。   When management information such as card information (CIS) or mode information (MD) is written, a block status indicating a defective block is written in a redundant area of the physical block in which the management information is written, and information indicating a data type is written. When user data (YD) is written, information indicating logical block information is written in the redundant area of the physical block in which user data (YD) is written.

尚、論理ブロック情報、ブロックステータス及びデータ種別の各情報が書き込まれなかった場合には、消去状態のままになる。つまり、論理ブロック情報を書き込まなかった場合、論理ブロック情報は3FFh(16進数)となり、ブロックステータスを書き込まなかった場合、ブロックステータスはFFh(16進数)となり、データ種別を書き込まなかった場合、データ種別はFh(16進数)となる。   Note that if the logical block information, the block status, and the data type information are not written, they remain in the erased state. That is, when the logical block information is not written, the logical block information is 3FFh (hexadecimal number), when the block status is not written, the block status is FFh (hexadecimal number), and when the data type is not written, the data type Is Fh (hexadecimal).

本発明の実施形態に係るフラッシュメモリシステムのブロック図である。1 is a block diagram of a flash memory system according to an embodiment of the present invention. フラッシュメモリのブロックとページの構成を示す図である。It is a figure which shows the structure of the block and page of flash memory. 論理ブロックと物理ブロックの対応関係を示す図である。It is a figure which shows the correspondence of a logical block and a physical block. 変換テーブルを示す図である。It is a figure which shows a conversion table. 冗長領域に書き込まれる情報を示す図である。It is a figure which shows the information written in a redundant area.

符号の説明Explanation of symbols

1 フラッシュメモリシステム
2 フラッシュメモリ
3 メモリコントローラ
4 ホストシステム
5 ホストインターフェース制御ブロック
6 マイクロプロセッサ
7 ホストインターフェースブロック
8 ワークエリア
9 バッファ
10 フラッシュメモリインターフェースブロック
11 ECCブロック
12 フラッシュメモリシーケンサブロック
13 外部バス
14 内部バス
DESCRIPTION OF SYMBOLS 1 Flash memory system 2 Flash memory 3 Memory controller 4 Host system 5 Host interface control block 6 Microprocessor 7 Host interface block 8 Work area 9 Buffer 10 Flash memory interface block 11 ECC block 12 Flash memory sequencer block 13 External bus 14 Internal bus

Claims (9)

フラッシュメモリに対するアクセスを制御するメモリコントローラであって、
前記フラッシュメモリにアクセスする際に参照される管理情報を、前記フラッシュメモリ内の物理ブロックに書き込む第1の書込み手段と、
ホストシステムから供給されるユーザデータを該ホストシステムから与えられる論理アドレスに対応する前記フラッシュメモリ内の物理ブロックに書き込む第2の書込み手段と、
前記フラッシュメモリ内の物理ブロックが不良ブロックであるか否かを診断する診断手段と、
前記フラッシュメモリ内の各物理ブロックの冗長領域に、当該物理ブロックの良否を示す第1の情報、前記論理アドレスに関する情報を示す第2の情報及びデータの種別を示す第3の情報を書き込む第3の書込み手段とを備え、
前記第1の書込み手段により前記管理情報が書き込まれた物理ブロックの冗長領域と前記診断手段により不良ブロックであると診断された物理ブロックの冗長領域とに、不良ブロックであることを示す前記第1の情報が書き込まれ、
前記第2の書込み手段によりユーザデータが書き込まれた物理ブロックの冗長領域に、書き込まれたユーザデータに対応する前記第2の情報が書き込まれ、
前記第1の書込み手段により管理情報が書き込まれた物理ブロックの冗長領域に、前記管理情報の種別を示す前記第3の情報が書き込まれるように構成されていることを特徴とするメモリコントローラ。
A memory controller that controls access to flash memory,
First writing means for writing management information referred to when accessing the flash memory to a physical block in the flash memory;
Second writing means for writing user data supplied from the host system to a physical block in the flash memory corresponding to a logical address given from the host system;
Diagnosing means for diagnosing whether a physical block in the flash memory is a bad block;
A first information indicating the quality of the physical block, a second information indicating the information on the logical address, and a third information indicating the type of data are written in the redundant area of each physical block in the flash memory. And writing means,
The first indicating that the redundant block of the physical block in which the management information is written by the first writing unit and the redundant region of the physical block diagnosed as a defective block by the diagnostic unit are defective blocks. Information is written,
The second information corresponding to the written user data is written in the redundant area of the physical block in which the user data is written by the second writing means,
The memory controller, wherein the third information indicating the type of the management information is written in a redundant area of the physical block in which the management information is written by the first writing means.
前記論理アドレスと前記フラッシュメモリのアドレス空間上の物理アドレスとの対応関係を示す変換テーブルを作成するテーブル作成手段を備え、
前記テーブル作成手段が、前記第1の情報に基づいて良品ブロックであると判断された物理ブロックの前記第2の情報を読み出し、該第2の情報に基づいて前記変換テーブルを作成することを特徴とする請求項1に記載のメモリコントローラ。
Comprising a table creating means for creating a conversion table showing a correspondence relationship between the logical address and a physical address on the address space of the flash memory;
The table creation means reads the second information of the physical block determined to be a non-defective block based on the first information, and creates the conversion table based on the second information. The memory controller according to claim 1.
前記第3の情報に基づいて、前記管理情報が書き込まれている物理ブロックを特定し、該物理ブロックからその管理情報を読み出す管理情報読出し手段を備えたことを特徴とする請求項1又は2に記載のメモリコントローラ。   The management information reading means for specifying a physical block in which the management information is written based on the third information and reading the management information from the physical block is provided. The memory controller described. 前記第1の情報が、前記冗長領域の複数のビットに割当てられ、該複数のビットに含まれる書込み状態のビットの数により不良ブロックであるか否かが示されることを特徴とする請求項1乃至3のいずれか1項に記載のメモリコントローラ。   2. The first information is assigned to a plurality of bits in the redundant area, and the number of bits in a write state included in the plurality of bits indicates whether the block is a bad block or not. 4. The memory controller according to any one of items 1 to 3. 請求項1乃至4のいずれか1項に記載のメモリコントローラとフラッシュメモリとを備えることを特徴とするフラッシュメモリシステム。   A flash memory system comprising the memory controller according to claim 1 and a flash memory. フラッシュメモリにアクセスする際に参照される管理情報を、前記フラッシュメモリ内の物理ブロックに書き込む第1の書込み処理と、
ホストシステムから供給されるユーザデータを、該ホストシステムから与えられる論理アドレスに対応する前記フラッシュメモリ内の物理ブロックに書き込む第2の書込み処理と、
前記フラッシュメモリ内の物理ブロックが不良ブロックであるか否かを診断する診断処理と、
前記フラッシュメモリ内の冗長領域に、物理ブロックの良否を示す第1の情報、前記論理アドレスに関する情報を示す第2の情報及びデータの種別を示す第3の情報を書き込む第3の書込み処理とを含み、
前記第1の書込み処理により前記管理情報が書き込まれた物理ブロックの冗長領域と前記診断処理により不良ブロックであると診断された物理ブロックの冗長領域に、不良ブロックであることを示す前記第1の情報が書き込まれ、
前記第2の書込み処理によりユーザデータが書き込まれた物理ブロックの冗長領域に、書き込まれたデータに対応する前記第2の情報が書き込まれ、
前記第1の書込み処理により前記管理情報が書き込まれた物理ブロックの冗長領域に、該管理情報の種別を示す前記第3の情報が書き込まれることを特徴とするフラッシュメモリの制御方法。
A first writing process for writing management information referred to when accessing the flash memory to a physical block in the flash memory;
A second write process for writing user data supplied from a host system to a physical block in the flash memory corresponding to a logical address given from the host system;
A diagnostic process for diagnosing whether the physical block in the flash memory is a bad block;
A third writing process for writing first information indicating the quality of a physical block, second information indicating information on the logical address, and third information indicating a type of data in a redundant area in the flash memory; Including
The first block indicating a defective block in the redundant area of the physical block in which the management information is written by the first writing process and the redundant area of the physical block diagnosed as a defective block by the diagnostic process Information is written,
The second information corresponding to the written data is written in the redundant area of the physical block in which the user data is written by the second writing process,
The flash memory control method, wherein the third information indicating the type of the management information is written in a redundant area of the physical block in which the management information is written by the first write processing.
前記論理アドレスと前記フラッシュメモリのアドレス空間上の物理アドレスとの対応関係を示す変換テーブルを作成するテーブル作成処理を含み、
前記テーブル作成処理が、前記第1の情報に基づいて良品ブロックであると判断された物理ブロックの前記第2の情報を読み出し、該第2の情報に基づいて前記変換テーブルを作成する処理であることを特徴とする請求項6に記載のフラッシュメモリの制御方法。
Including a table creation process for creating a conversion table indicating a correspondence relationship between the logical address and a physical address on the address space of the flash memory,
The table creation process is a process of reading the second information of the physical block determined to be a non-defective block based on the first information and creating the conversion table based on the second information. The method of controlling a flash memory according to claim 6.
前記第3の情報に基づいて、前記管理情報が書き込まれている物理ブロックを特定し、該物理ブロックからその管理情報を読み出す管理情報読出し処理を含むことを特徴とする請求項6又は7に記載のフラッシュメモリの制御方法。   8. The management information reading process of identifying a physical block in which the management information is written based on the third information and reading out the management information from the physical block. Flash memory control method. 前記第1の情報が、前記冗長領域の複数のビットに割当てられ、該複数のビットに含まれる書込み状態のビットの数により不良ブロックであるか否かを示すことを特徴とする請求項6乃至8のいずれか1項に記載のフラッシュメモリの制御方法。   7. The first information is assigned to a plurality of bits in the redundant area, and indicates whether or not the block is a bad block according to the number of bits in a write state included in the plurality of bits. 9. The flash memory control method according to any one of items 8 to 9.
JP2004379711A 2004-12-28 2004-12-28 Memory controller, flash memory system, and flash memory control method Expired - Fee Related JP4332108B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004379711A JP4332108B2 (en) 2004-12-28 2004-12-28 Memory controller, flash memory system, and flash memory control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004379711A JP4332108B2 (en) 2004-12-28 2004-12-28 Memory controller, flash memory system, and flash memory control method

Publications (2)

Publication Number Publication Date
JP2006185290A true JP2006185290A (en) 2006-07-13
JP4332108B2 JP4332108B2 (en) 2009-09-16

Family

ID=36738349

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004379711A Expired - Fee Related JP4332108B2 (en) 2004-12-28 2004-12-28 Memory controller, flash memory system, and flash memory control method

Country Status (1)

Country Link
JP (1) JP4332108B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100845137B1 (en) 2006-10-02 2008-07-09 삼성전자주식회사 A method of translating a bad block address of a memory device, a device for translating a bad block address of a memory device, and a memory device controller including the same
JP2008262614A (en) * 2007-04-10 2008-10-30 Mega Chips Corp Nonvolatile semiconductor memory device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06274409A (en) * 1993-03-11 1994-09-30 Internatl Business Mach Corp <Ibm> Batch erasure-type nonvolatile memory
JPH1173379A (en) * 1997-06-20 1999-03-16 Sony Corp Data management device, data management method, and storage medium
JPH11345174A (en) * 1998-03-09 1999-12-14 Mitsubishi Electric Corp Semiconductor disk device and logical / physical address translation table creation method
JP2002133892A (en) * 2000-10-25 2002-05-10 Fujitsu Ltd Flash memory defect management method
JP2003216507A (en) * 2002-01-22 2003-07-31 Sharp Corp Storage capacity processing system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06274409A (en) * 1993-03-11 1994-09-30 Internatl Business Mach Corp <Ibm> Batch erasure-type nonvolatile memory
JPH1173379A (en) * 1997-06-20 1999-03-16 Sony Corp Data management device, data management method, and storage medium
JPH11345174A (en) * 1998-03-09 1999-12-14 Mitsubishi Electric Corp Semiconductor disk device and logical / physical address translation table creation method
JP2002133892A (en) * 2000-10-25 2002-05-10 Fujitsu Ltd Flash memory defect management method
JP2003216507A (en) * 2002-01-22 2003-07-31 Sharp Corp Storage capacity processing system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100845137B1 (en) 2006-10-02 2008-07-09 삼성전자주식회사 A method of translating a bad block address of a memory device, a device for translating a bad block address of a memory device, and a memory device controller including the same
JP2008262614A (en) * 2007-04-10 2008-10-30 Mega Chips Corp Nonvolatile semiconductor memory device

Also Published As

Publication number Publication date
JP4332108B2 (en) 2009-09-16

Similar Documents

Publication Publication Date Title
KR101122485B1 (en) Memory system
US7818492B2 (en) Source and shadow wear-leveling method and apparatus
US7315870B2 (en) Memory controller, flash memory system, and method for recording data on flash memory
JP2006018373A (en) Memory controller, flash memory system and control method for flash memory
JP4034947B2 (en) Nonvolatile storage system
US20040255076A1 (en) Flash memory controller, memory control circuit, flash memory system, and method for controlling data exchange between host computer and flash memory
JP4661191B2 (en) Memory controller, flash memory system, and flash memory control method
JP4433792B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4332108B2 (en) Memory controller, flash memory system, and flash memory control method
JP4177292B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM, AND FLASH MEMORY CONTROL METHOD
JP2005292925A (en) Memory controller, flash memory system, and control method for flash memory
JP2005316793A (en) Flash memory system and flash memory control method
JP4641034B2 (en) Nonvolatile storage system
JP4177301B2 (en) Memory controller, flash memory system, and flash memory control method
JP4000124B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4235595B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4194518B2 (en) Memory controller, flash memory system, and flash memory control method
US20120311243A1 (en) Method for increasing reliability of data accessing for a multi-level cell type non-volatile memory
JP4419525B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4241741B2 (en) Memory controller and flash memory system
JP4213053B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4254930B2 (en) Memory controller, flash memory system, and flash memory control method
JP3934659B1 (en) Memory controller and flash memory system
JP4366283B2 (en) Memory controller and flash memory system including the memory controller
JP2005293177A (en) Memory controller and flash memory system

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081001

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081007

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081127

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

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

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120626

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120626

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130626

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees