JP2008276371A - Memory controller, flash memory system with memory controller and control method for flash memory - Google Patents

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

Info

Publication number
JP2008276371A
JP2008276371A JP2007116884A JP2007116884A JP2008276371A JP 2008276371 A JP2008276371 A JP 2008276371A JP 2007116884 A JP2007116884 A JP 2007116884A JP 2007116884 A JP2007116884 A JP 2007116884A JP 2008276371 A JP2008276371 A JP 2008276371A
Authority
JP
Japan
Prior art keywords
logical
data
area
physical
written
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
JP2007116884A
Other languages
Japanese (ja)
Other versions
JP4702703B2 (en
Inventor
Naoki Mukoda
直樹 向田
Akio Azuma
明生 東
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 JP2007116884A priority Critical patent/JP4702703B2/en
Publication of JP2008276371A publication Critical patent/JP2008276371A/en
Application granted granted Critical
Publication of JP4702703B2 publication Critical patent/JP4702703B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a flash memory controller, a flash memory system with the memory controller and a control method for a flash memory, allowing efficient discrimination of corresponding relationship between a logical page and a physical page, or corresponding relationship between a logical sector area and a physical sector area. <P>SOLUTION: Information for distinguishing the logical sector area corresponding to head data of a series of data and information for distinguishing the number of sectors of the data included in the series of the data are written in a redundant area corresponding to the physical sector area written with the series of the data, and the corresponding relationship between the logical sector area and the physical sector area is distinguished based on the information. Information for distinguishing the logical page corresponding to the head data of the series of the data and information for distinguishing the number of the pages from the logical page corresponding to the head data included in the series of the data to the logical page corresponding to the final data are written in the redundant area of the physical page written with the series of the data, and the corresponding relationship between the logical page and the physical page is distinguished based on the information. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

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

従来、対応関係にある論理ブロックと物理ブロックとの間で、論理ブロックに含まれる論理ページと物理ブロックに含まれる物理ページとの対応関係を固定せずにホストシステムから与えられたデータを、フラッシュメモリに保存する方法が知られている(例えば、特許文献1参照)。かかる保存方法では、アクセス対象の物理ブロック内にデータが書き込まれていない物理ページ(空きページ)があれば、その物理ブロック内の空きページにホストシステムから与えられたデータを保存することができる。従って、同じ物理ブロック内に、同一の論理ページに対応するデータを複数回書き込むことも可能になるため、データの書き換えを容易に行うことができる。   Conventionally, the data given from the host system is flushed without fixing the correspondence between the logical page contained in the logical block and the physical page contained in the physical block between the logical block and the physical block in the correspondence relationship. A method of storing in a memory is known (for example, see Patent Document 1). In this storage method, if there is a physical page (empty page) in which data is not written in the physical block to be accessed, data given from the host system can be stored in the empty page in the physical block. Therefore, data corresponding to the same logical page can be written a plurality of times in the same physical block, so that data can be easily rewritten.

上述のデータの保存方法では、データの書き込み及び読み込み単位である物理ページ(又は、物理セクタ領域)と、その物理ページ(又は、物理セクタ領域)に保存されているデータに対応する論理ページ(又は、論理セクタ領域)との対応関係を管理しなければならない。この物理ページ(又は、物理セクタ領域)と論理ページ(又は、論理セクタ領域)の対応関係を管理するため、特許文献1では、物理ページ(又は、物理セクタ領域)の冗長領域に対応関係にある論理ページ(又は、論理セクタ領域)に付けられた論理ページ番号(又は、論理セクタ番号)を書き込んでいる。
そして、論理ページと物理ページとの対応関係(又は、論理セクタ領域と物理セクタ領域との対応関係)を判別するときには、冗長領域に書き込まれている論理ページ番号(又は、論理セクタ番号)に基づいて論理ページと物理ページとの対応関係(論理セクタ領域と物理セクタ領域との関係)を記述したアドレス変換テーブルを作成する。このアドレス変換テーブルは、例えば、アクセス対象となった論理ブロックについて、その都度作成する。又、起動時に全ての論理ブロックに対するアドレス変換テーブルを作成することもできる。
このアドレス変換テーブルを都度作成する場合は、その作成時間によりアクセス速度が低下する。又、起動時に全ての論理ブロックに対するアドレス変換テーブルを作成する場合は、起動時間が長くなるだけでなく、作成したアドレス変換テーブルを保持しておくためのRAM(Random Access Memory)が必要になり、コストが増大する。
In the data storage method described above, a physical page (or physical sector area) that is a unit for writing and reading data, and a logical page (or a data corresponding to data stored in the physical page (or physical sector area)) The logical sector area) must be managed. In order to manage the correspondence between the physical page (or physical sector area) and the logical page (or logical sector area), in Patent Document 1, there is a correspondence relation to the redundant area of the physical page (or physical sector area). The logical page number (or logical sector number) assigned to the logical page (or logical sector area) is written.
When determining the correspondence between the logical page and the physical page (or the correspondence between the logical sector area and the physical sector area), it is based on the logical page number (or logical sector number) written in the redundant area. Thus, an address conversion table describing the correspondence between logical pages and physical pages (relation between logical sector areas and physical sector areas) is created. This address conversion table is created each time, for example, for a logical block to be accessed. It is also possible to create an address conversion table for all logical blocks at startup.
When this address conversion table is created each time, the access speed decreases depending on the creation time. Also, when creating an address translation table for all logical blocks at startup, not only the startup time is lengthened, but also a RAM (Random Access Memory) for holding the created address translation table is required. Cost increases.

また、上記アドレス変換テーブルをアクセス時又は起動時に作成するのではなく強誘電体メモリ等の重ね書き可能な不揮発性メモリに記憶するようにしてもよいが、このような不揮発性メモリは高価なので、コストが非常に増大する。   Further, the address conversion table may be stored in a rewritable non-volatile memory such as a ferroelectric memory instead of being created at the time of access or activation, but such a non-volatile memory is expensive. The cost is greatly increased.

かかる実情に鑑み、本発明は、論理ページと物理ページとの対応関係又は論理セクタ領域と物理セクタ領域との対応関係を効率的に判別することができるフラッシュメモリコントローラ及びメモリコントローラを備えるフラッシュメモリシステム、並びにフラッシュメモリの制御方法を提供するものである。
特開2005−19736
In view of such circumstances, the present invention provides a flash memory controller and a flash memory system including the memory controller that can efficiently determine the correspondence between a logical page and a physical page or the correspondence between a logical sector area and a physical sector area. And a method for controlling a flash memory.
JP-A-2005-19736

上記目的を達成するために、本発明による第1のメモリコントローラは、ホストシステムから与えられるアクセス指示に基づいて、複数個の物理セクタ領域を含む物理ブロック単位で消去が行われるフラッシュメモリに対するアクセスを制御するメモリコントローラであって、複数個の論理セクタ領域で構成された論理ブロックと前記物理ブロックとの対応関係を管理するブロック管理手段と、前記アクセス指示によりアクセス対象の領域として指定された論理アクセス領域が属する前記論理ブロックと、該論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理セクタ領域と、該論理ブロックに属する前記論理アクセス領域のセクタ数とを判別する論理アクセス領域判別手段と、前記論理アクセス領域が属する前記論理ブロックと対応する前記物理ブロック内のデータが書き込まれていない物理セクタ領域の先頭を検索する空きセクタ領域検索手段と、前記アクセス指示により前記論理アクセス領域に対して書き込むことが指示された一連のデータを、前記空きセクタ領域検索手段によって検出されたデータが書き込まれていない先頭の物理セクタ領域から、末尾の物理セクタ領域に向かって順次書き込んでいくデータ書き込み手段と、前記データ書き込み手段により前記一連のデータが書き込まれた物理セクタ領域に対応する冗長領域に、前記論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理セクタ領域と、前記論理ブロックに属する前記論理アクセス領域のセクタ数を判別するための情報を書き込む論理セクタ情報書き込み手段とを備えたことを特徴とする。   In order to achieve the above object, a first memory controller according to the present invention performs access to a flash memory that is erased in units of physical blocks including a plurality of physical sector areas based on an access instruction given from a host system. A memory controller for controlling, a block management means for managing a correspondence relationship between a logical block composed of a plurality of logical sector areas and the physical block; and a logical access designated as an access target area by the access instruction Logical access area determination means for determining the logical block to which the area belongs, the logical sector area corresponding to the head area of the logical access area belonging to the logical block, and the number of sectors of the logical access area belonging to the logical block; , The logical block to which the logical access area belongs Empty sector area search means for searching for the beginning of a physical sector area in which data in the physical block corresponding to the disk is not written, and a series of data instructed to be written to the logical access area by the access instruction Are sequentially written from the first physical sector area where the data detected by the empty sector area searching means is not written to the last physical sector area, and the series of data is written by the data writing means. In the redundant area corresponding to the physical sector area in which data is written, the logical sector area corresponding to the head area of the logical access area belonging to the logical block and the number of sectors in the logical access area belonging to the logical block are determined. Logical sector information writing means for writing information for It is characterized in.

この第1のメモリコントローラでは、一連のデータが書き込まれた物理セクタ領域に対応する冗長領域に、この一連のデータと対応関係にある論理アクセス領域の先頭領域に対応する論理セクタ領域を判別するための情報と、この一連のデータと対応関係にある論理アクセス領域のセクタ数を判別するための情報を書き込むようにしたので、これらの情報に基づいて論理ブロックに含まれる論理セクタ領域と物理ブロックに含まれる物理セクタ領域との対応関係を容易に把握することができる。
また、この第1のメモリコントローラは、1又は複数個の前記一連のデータが書き込まれている前記物理ブロック内の物理セクタ領域と、該物理ブロックに対応する前記論理ブロック内の論理セクタ領域との対応関係を判別するセクタ領域管理手段を備え、該セクタ領域管理手段は、前記一連のデータの先頭データが書き込まれている各物理セクタ領域に対応する冗長領域から、前記論理セクタ情報書き込み手段によって書き込まれた前記情報を読み出し、読み出した該情報に基づいて前記物理ブロック内の物理セクタ領域と、該物理ブロックに対応する前記論理ブロック内の論理セクタ領域との対応関係を判別するように構成されていることが好ましい。
In the first memory controller, in order to determine the logical sector area corresponding to the head area of the logical access area corresponding to the series of data in the redundant area corresponding to the physical sector area in which the series of data is written. Information and information for determining the number of sectors in the logical access area corresponding to this series of data are written. Therefore, based on this information, the logical sector area and the physical block included in the logical block are written. The correspondence with the included physical sector area can be easily grasped.
The first memory controller includes a physical sector area in the physical block in which one or a plurality of the series of data is written, and a logical sector area in the logical block corresponding to the physical block. Sector area management means for determining the correspondence relationship, the sector area management means is written by the logical sector information writing means from the redundant area corresponding to each physical sector area in which the head data of the series of data is written The information is read, and based on the read information, the correspondence between the physical sector area in the physical block and the logical sector area in the logical block corresponding to the physical block is determined. Preferably it is.

このようなセクタ領域管理手段を備えることにより、各一連のデータに対して設定された情報に基づいて一連のデータ単位で論理ブロックに含まれる論理セクタ領域と物理ブロックに含まれる物理セクタ領域との対応関係を把握することができる。   By providing such a sector area management means, a logical sector area included in a logical block and a physical sector area included in a physical block in a series of data units based on information set for each series of data. The correspondence can be grasped.

また、前記セクタ領域管理手段は、前記一連のデータの先頭データが書き込まれている物理セクタ領域に対応する冗長領域と該一連のデータの末尾データが書き込まれている物理セクタ領域に対応する冗長領域から、前記論理セクタ情報書き込み手段によって書き込まれた前記情報を読み出し、双方の冗長領域から読み出された該情報が一致するときに、該一連のデータが正常に書き込まれていると判断するように構成されていることが好ましい。   Further, the sector area management means includes a redundant area corresponding to a physical sector area in which head data of the series of data is written and a redundant area corresponding to a physical sector area in which tail data of the series of data is written. From the above, the information written by the logical sector information writing means is read, and when the information read from both redundant areas matches, it is determined that the series of data has been written normally. It is preferable to be configured.

このようにセクタ領域管理手段が、一連のデータの先頭データが書き込まれている物理セクタ領域に対応する冗長領域と、この一連のデータの末尾データが書き込まれている物理セクタ領域に対応する冗長領域に書き込まれている情報を比較し、その比較結果に基づいて一連のデータが正常に書き込まれていると判断するようにすれば、正常に書き込まれていない一連のデータを容易に検出することができる。   In this way, the sector area management means has a redundant area corresponding to the physical sector area where the head data of the series of data is written, and a redundant area corresponding to the physical sector area where the end data of the series of data is written. By comparing the information written in and determining that a series of data is written normally based on the comparison result, it is possible to easily detect a series of data not written normally. it can.

また、本発明による第2のメモリコントローラは、ホストシステムから与えられるアクセス指示に基づいて、複数個の物理ページを含む物理ブロック単位で消去が行われるフラッシュメモリに対するアクセスを制御するメモリコントローラであって、複数個の論理ページで構成された論理ブロックと前記物理ブロックとの対応関係を管理するブロック管理手段と、前記アクセス指示によりアクセス対象の領域として指定された論理アクセス領域が属する前記論理ブロックと、該論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理ページと、該論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理ページから末尾領域に対応する論理ページまでのページ数とを判別する論理アクセス領域判別手段と、前記論理アクセス領域が属する前記物理ブロック内のデータが書き込まれていない物理ページの先頭を検索する空きページ検索手段と、前記アクセス指示により前記論理アクセス領域に対して書き込むことが指示された一連のデータを、前記空きページ検索手段によって検出されたデータが書き込まれていない先頭の物理ページから、末尾の物理ページに向かって順次書き込んでいくデータ書き込み手段と、前記データ書き込み手段により前記一連のデータが書き込まれた物理ページに対応する冗長領域に、前記論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理ページと、前記論理ブロックに含まれる前記論理アクセス領域の先頭領域に対応する論理ページから末尾領域に対応する論理ページまでのページ数を判別するための情報を書き込む論理ページ情報書き込み手段とを備えたことを特徴とする。   A second memory controller according to the present invention is a memory controller that controls access to a flash memory that is erased in units of physical blocks including a plurality of physical pages, based on an access instruction given from a host system. A block management means for managing a correspondence relationship between a logical block composed of a plurality of logical pages and the physical block, and the logical block to which a logical access area designated as an access target area by the access instruction belongs, A logical page corresponding to the top area of the logical access area belonging to the logical block, and a number of pages from the logical page corresponding to the top area of the logical access area belonging to the logical block to the logical page corresponding to the end area. A logical access area discriminating means for discriminating; Free page search means for searching for the beginning of a physical page in which data in the physical block to which the access area belongs is not written, and a series of data instructed to be written to the logical access area by the access instruction, The data detected by the empty page search means is written sequentially from the first physical page to which the data is not written to the last physical page, and the series of data is written by the data writing means. In the redundant area corresponding to the physical page, the logical page corresponding to the top area of the logical access area belonging to the logical block, and the logical page corresponding to the top area of the logical access area included in the logical block from the logical area to the end area. To determine the number of pages to the corresponding logical page Characterized in that a logical page information writing means for writing the multi-address.

この第2のメモリコントローラでは、一連のデータが書き込まれた物理ページに対応する冗長領域に、この一連のデータと対応関係にある論理アクセス領域の先頭領域に対応する論理ページを判別するための情報と、この一連のデータと対応関係にある論理アクセス領域の先頭領域に対応する論理ページから末尾領域に対応する論理ページまでのページ数を判別するための情報を書き込むようにしたので、これらの情報に基づいて論理ブロックに含まれる論理ページと物理ブロックに含まれる物理ページとの対応関係を容易に把握することができる。
また、この第2のメモリコントローラは、1又は複数個の前記一連のデータが書き込まれている前記物理ブロック内の物理ページと、該物理ブロックに対応する前記論理ブロック内の論理ページとの対応関係を判別するページ管理手段を備え、該ページ管理手段は、前記一連のデータの先頭データが書き込まれている各物理ページに対応する冗長領域から、前記論理ページ情報書き込み手段によって書き込まれた前記情報を読み出し、読み出した該情報に基づいて前記物理ブロック内の物理ページと、該物理ブロックに対応する前記論理ブロック内の論理ページとの対応関係を判別するように構成されていることが好ましい。
In the second memory controller, information for discriminating a logical page corresponding to the first area of the logical access area corresponding to the series of data in the redundant area corresponding to the physical page in which the series of data is written. And the information for determining the number of pages from the logical page corresponding to the top area of the logical access area corresponding to this series of data to the logical page corresponding to the end area. Based on the above, it is possible to easily grasp the correspondence between the logical page included in the logical block and the physical page included in the physical block.
The second memory controller also has a correspondence relationship between a physical page in the physical block in which one or a plurality of the series of data is written and a logical page in the logical block corresponding to the physical block. Page management means for determining the information written by the logical page information writing means from a redundant area corresponding to each physical page in which the first data of the series of data is written. It is preferable that the correspondence between the physical page in the physical block and the logical page in the logical block corresponding to the physical block is determined based on the read and read information.

このようなページ領域管理手段を備えることにより、各一連のデータに対して設定された情報に基づいて一連のデータ単位で論理ブロックに含まれる論理ページと物理ブロックに含まれる物理ページとの対応関係を把握することができる。   By providing such a page area management means, the correspondence between the logical page included in the logical block and the physical page included in the physical block in a series of data units based on information set for each series of data Can be grasped.

また、前記ページ管理手段は、前記一連のデータの先頭データが書き込まれている物理ページに対応する冗長領域と該一連のデータの末尾データが書き込まれている物理ページに対応する冗長領域から、前記論理ページ情報書き込み手段によって書き込まれた前記情報を読み出し、双方の冗長領域から読み出された該情報が一致するときに、該一連のデータが正常に書き込まれていると判断するように構成されていることが好ましい。   Further, the page management means includes the redundant area corresponding to the physical page in which the first data of the series of data is written and the redundant area corresponding to the physical page in which the end data of the series of data is written. It is configured to read the information written by the logical page information writing means, and to determine that the series of data is normally written when the information read from both redundant areas match. Preferably it is.

このようにページ管理手段が、一連のデータの先頭データが書き込まれている物理ページに対応する冗長領域と、この一連のデータの末尾データが書き込まれている物理ページに対応する冗長領域に書き込まれている情報を比較し、その比較結果に基づいて一連のデータが正常に書き込まれていると判断するようにすれば、正常に書き込まれていない一連のデータを容易に検出することができる。   As described above, the page management unit writes data in the redundant area corresponding to the physical page in which the first data of the series of data is written and the redundant area corresponding to the physical page in which the last data of the series of data is written. If it is determined that a series of data is normally written based on the comparison result, a series of data that is not normally written can be easily detected.

また、本発明によるフラッシュメモリシステムは、前記何れかのメモリコントローラと、前記メモリコントローラによってアクセスされるフラッシュメモリとを備える。   A flash memory system according to the present invention includes any one of the memory controllers and a flash memory accessed by the memory controller.

また、本発明による第1のフラッシュメモリの制御方法は、ホストシステムから与えられるアクセス指示に基づいて、複数個の物理セクタ領域を含む物理ブロック単位で消去が行われるフラッシュメモリに対するアクセスを制御するフラッシュメモリの制御方法であって、複数個の論理セクタ領域で構成された論理ブロックを形成し、前記アクセス指示によりアクセス対象の領域として指定された論理アクセス領域が属する前記論理ブロックと、該論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理セクタ領域と、該論理ブロックに属する前記論理アクセス領域のセクタ数とを判別する論理アクセス領域判別ステップと、前記論理アクセス領域が属する前記論理ブロックと対応する前記物理ブロックを判別する物理ブロック判別ステップと、前記物理ブロック判別ステップで判別された前記物理ブロック内のデータが書き込まれていない物理セクタ領域の先頭を検索する空きセクタ領域検索ステップと、前記アクセス指示により前記論理アクセス領域に対して書き込むことが指示された一連のデータを、前記空きセクタ領域検索ステップで検出されたデータが書き込まれていない先頭の物理セクタ領域から、末尾の物理セクタ領域に向かって順次書き込んでいくデータ書き込みステップと、前記データ書き込みステップで前記一連のデータが書き込まれた物理セクタ領域に対応する冗長領域に、前記論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理セクタ領域と、前記論理ブロックに属する前記論理アクセス領域のセクタ数を判別するための情報を書き込む論理セクタ情報書き込みステップとを有することを特徴とする。   The first flash memory control method according to the present invention is a flash that controls access to a flash memory that is erased in units of physical blocks including a plurality of physical sector areas based on an access instruction given from a host system. A method of controlling a memory, wherein a logical block composed of a plurality of logical sector areas is formed, the logical block to which a logical access area designated as an access target area by the access instruction belongs, and the logical block A logical access area determining step for determining a logical sector area corresponding to a head area of the logical access area to which the logical access area belongs, and a number of sectors of the logical access area belonging to the logical block; and corresponding to the logical block to which the logical access area belongs Physical block to determine the physical block to be A determination step, a free sector area search step for searching for the beginning of a physical sector area in which data in the physical block determined in the physical block determination step is not written, and the logical access area by the access instruction A data writing step of sequentially writing a series of data instructed to be written from the first physical sector area where the data detected in the empty sector area searching step is not written toward the last physical sector area; A redundant area corresponding to the physical sector area in which the series of data is written in the data writing step, a logical sector area corresponding to a head area of the logical access area belonging to the logical block, and the logical block belonging to the logical block. To determine the number of sectors in the logical access area And having a logical sector information writing step of writing information.

この第1のフラッシュメモリの制御方法では、一連のデータが書き込まれた物理セクタ領域に対応する冗長領域に、この一連のデータと対応関係にある論理アクセス領域の先頭領域に対応する論理セクタ領域を判別するための情報と、この一連のデータと対応関係にある論理アクセス領域のセクタ数を判別するための情報を書き込むようにしたので、これらの情報に基づいて論理ブロックに含まれる論理セクタ領域と物理ブロックに含まれる物理セクタ領域との対応関係を容易に把握することができる。   In this first flash memory control method, a logical sector area corresponding to the head area of the logical access area corresponding to the series of data is provided in the redundant area corresponding to the physical sector area in which the series of data is written. Since the information for determining and the information for determining the number of sectors in the logical access area corresponding to this series of data are written, the logical sector area included in the logical block based on these information and The correspondence relationship with the physical sector area included in the physical block can be easily grasped.

また、この第1のフラッシュメモリの制御方法は、前記一連のデータの先頭データが書き込まれている物理セクタ領域に対応する冗長領域から、前記論理セクタ情報書き込みステップで書き込まれた前記情報を読み出す第1の論理セクタ情報読み出しステップ、前記第1の論理セクタ情報読み出しステップで読み出された情報に基づいて前記物理ブロック内の物理セクタ領域と、該物理ブロックに対応する前記論理ブロック内の論理セクタ領域との対応関係を判別する論理セクタ領域判別ステップとを有することが好ましい。   Further, the first flash memory control method reads the information written in the logical sector information writing step from a redundant area corresponding to a physical sector area in which head data of the series of data is written. 1 logical sector information reading step, a physical sector area in the physical block based on the information read in the first logical sector information reading step, and a logical sector area in the logical block corresponding to the physical block It is preferable to include a logical sector region determination step for determining the correspondence relationship between

このような第1の論理セクタ情報読み出しステップと論理セクタ領域判別ステップとを有することにより、一連のデータ単位で各一連のデータに対して設定された情報を読み出し、読み出した情報に基づいて一連のデータ単位で論理ブロックに含まれる論理セクタ領域と物理ブロックに含まれる物理セクタ領域との対応関係を把握することができる。   By having such a first logical sector information reading step and a logical sector region determination step, information set for each series of data in a series of data units is read out, and a series of series based on the read information It is possible to grasp the correspondence between the logical sector area included in the logical block and the physical sector area included in the physical block in data units.

また、この第1のフラッシュメモリの制御方法は、前記一連のデータの末尾データが書き込まれている物理セクタ領域に対応する冗長領域から、前記論理セクタ情報書き込みステップで書き込まれた前記情報を読み出す第2の論理セクタ情報読み出しステップ、前記一連のデータの先頭データが書き込まれている物理セクタ領域に対応する冗長領域と該一連のデータの末尾データが書き込まれている物理セクタ領域に対応する冗長領域から読み出した前記論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理セクタ領域と前記論理ブロックに属する前記論理アクセス領域のセクタ数を判別するための情報が一致するときに該一連のデータが正常に書き込まれていると判断する判断ステップとを有することが好ましい。   Further, the first flash memory control method reads the information written in the logical sector information writing step from a redundant area corresponding to a physical sector area in which end data of the series of data is written. 2 logical sector information reading step, a redundant area corresponding to the physical sector area where the head data of the series of data is written, and a redundant area corresponding to the physical sector area where the end data of the series of data is written When the information for determining the number of sectors in the logical access area belonging to the logical block matches the logical sector area corresponding to the head area of the logical access area belonging to the read logical block, the series of data is normal It is preferable to have a determination step for determining that the data has been written to.

このような第2の論理セクタ情報読み出しステップと判断ステップとを有することにより、一連のデータの先頭データが書き込まれている物理セクタ領域に対応する冗長領域と、この一連のデータの末尾データが書き込まれている物理セクタ領域に対応する冗長領域に書き込まれている情報との比較結果に基づいて、正常に書き込まれていない一連のデータを容易に検出することができる。   By having such a second logical sector information reading step and a determining step, the redundant area corresponding to the physical sector area where the head data of the series of data is written, and the end data of this series of data are written. A series of data that is not normally written can be easily detected based on the comparison result with the information written in the redundant area corresponding to the physical sector area.

また、本発明による第2のフラッシュメモリの制御方法は、ホストシステムから与えられるアクセス指示に基づいて、複数個の物理ページを含む物理ブロック単位で消去が行われるフラッシュメモリに対するアクセスを制御するフラッシュメモリの制御方法であって、複数個の論理ページで構成された論理ブロックを形成し、前記アクセス指示によりアクセス対象の領域として指定された論理アクセス領域が属する前記論理ブロックと、該論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理ページと、該論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理ページから末尾領域に対応する論理ページまでのページ数とを判別する論理アクセス領域判別ステップと、前記論理アクセス領域が属する前記論理ブロックと対応する前記物理ブロックを判別する物理ブロック判別ステップと、前記物理ブロック判別ステップで判別された前記物理ブロック内のデータが書き込まれていない物理ページの先頭を検索する空きページ検索ステップと、前記アクセス指示により前記論理アクセス領域に対して書き込むことが指示された一連のデータを、前記空きページ検索ステップで検出されたデータが書き込まれていない先頭の物理ページから、末尾の物理ページに向かって順次書き込んでいくデータ書き込みステップと、 前記データ書き込みステップで前記一連のデータが書き込まれた物理ページに対応する冗長領域に、前記論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理ページと、前記論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理ページから末尾領域に対応する論理ページまでのページ数を判別するための情報を書き込む論理ページ情報書き込みステップとを有することを特徴とする。   The second flash memory control method according to the present invention controls the access to a flash memory that is erased in units of physical blocks including a plurality of physical pages, based on an access instruction given from a host system. A logical block composed of a plurality of logical pages, the logical block to which a logical access area designated as an access target area by the access instruction belongs, and the logical block belonging to the logical block Logical access area determination that determines the logical page corresponding to the top area of the logical access area and the number of pages from the logical page corresponding to the top area of the logical access area belonging to the logical block to the logical page corresponding to the end area Step and the logical to which the logical access area belongs A physical block determination step for determining the physical block corresponding to the lock; a free page search step for searching for the beginning of a physical page in which data in the physical block determined in the physical block determination step is not written; A series of data instructed to be written to the logical access area by the access instruction is sequentially performed from the first physical page in which the data detected in the empty page search step is not written toward the last physical page. A data writing step for writing, a redundant area corresponding to a physical page in which the series of data is written in the data writing step, a logical page corresponding to a head area of the logical access area belonging to the logical block, and The logical access area belonging to the logical block A logical page information writing step for writing information for determining the number of pages from the logical page corresponding to the head area of the area to the logical page corresponding to the end area.

この第2のフラッシュメモリの制御方法では、一連のデータが書き込まれた物理ページに対応する冗長領域に、この一連のデータと対応関係にある論理アクセス領域の先頭領域に対応する論理ページを判別するための情報と、この一連のデータと対応関係にある論理アクセス領域のセクタ数を判別するための情報を書き込むようにしたので、これらの情報に基づいて論理ブロックに含まれる論理ページと物理ブロックに含まれる物理ページとの対応関係を容易に把握することができる。   In the second flash memory control method, a logical page corresponding to the first area of the logical access area having a correspondence relationship with the series of data is determined in the redundant area corresponding to the physical page in which the series of data is written. Information and information for determining the number of sectors in the logical access area corresponding to the series of data are written to the logical page and physical block included in the logical block based on the information. The correspondence relationship with the included physical page can be easily grasped.

また、この第2のフラッシュメモリの制御方法は、前記一連のデータの先頭データが書き込まれている物理ページに対応する冗長領域から、前記論理ページ情報書き込みステップで書き込まれた前記情報を読み出す第1の論理ページ情報読み出しステップ、前記第1の論理ページ情報読み出しステップで読み出された情報に基づいて前記物理ブロック内の物理ページと、該物理ブロックに対応する前記論理ブロック内の論理ページとの対応関係を判別する論理ページ判別ステップとを有することが好ましい。   In the second flash memory control method, the information written in the logical page information writing step is read from the redundant area corresponding to the physical page in which the first data of the series of data is written. Correspondence between a physical page in the physical block and a logical page in the logical block corresponding to the physical block based on the information read in the logical page information read step and the first logical page information read step It is preferable to have a logical page determination step for determining the relationship.

このような第1の論理ページ情報読み出しステップと論理ページ判別ステップとを有することにより、一連のデータ単位で各一連のデータに対して設定された情報を読み出し、読み出した情報に基づいて一連のデータ単位で論理ブロックに含まれる論理ページと物理ブロックに含まれる物理ページとの対応関係を把握することができる。   By having such a first logical page information reading step and a logical page determining step, information set for each series of data is read in a series of data units, and a series of data is based on the read information. The correspondence between the logical page included in the logical block and the physical page included in the physical block can be grasped in units.

また、この第2のフラッシュメモリの制御方法は、前記一連のデータの末尾データが書き込まれている物理ページに対応する冗長領域から、前記論理ページ情報書き込みステップで書き込まれた前記情報を読み出す第2の論理ページ情報読み出しステップ、前記一連のデータの先頭データが書き込まれている物理ページに対応する冗長領域と該一連のデータの末尾データが書き込まれている物理ページに対応する冗長領域から読み出した前記論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理ページと前記論理ブロックに属する前記論理アクセス領域のセクタ数を判別するための情報が一致するときに該一連のデータが正常に書き込まれていると判断する判断ステップとを有することが好ましい。   In the second flash memory control method, the information written in the logical page information writing step is read from a redundant area corresponding to a physical page in which tail data of the series of data is written. The logical page information reading step, the redundant area corresponding to the physical page where the first data of the series of data is written and the redundant area corresponding to the physical page where the end data of the series of data is written When the logical page corresponding to the head area of the logical access area belonging to the logical block matches the information for determining the number of sectors in the logical access area belonging to the logical block, the series of data is normally written. It is preferable to have a determination step of determining that

このような第2の論理ページ情報読み出しステップと判断ステップとを有することにより、一連のデータの先頭データが書き込まれている物理ページに対応する冗長領域と、この一連のデータの末尾データが書き込まれている物理ページに対応する冗長領域に書き込まれている情報との比較結果に基づいて、正常に書き込まれていない一連のデータを容易に検出することができる。   By including the second logical page information reading step and the determination step, the redundant area corresponding to the physical page in which the first data of the series of data is written and the end data of the series of data are written. A series of data that is not normally written can be easily detected based on the comparison result with the information written in the redundant area corresponding to the physical page.

本発明のフラッシュメモリ、フラッシュメモリシステム、並びにフラッシュメモリの制御方法によれば、一連のデータが書き込まれた物理セクタ領域に対応する冗長領域に、この一連のデータの先頭データに対応する論理セクタ領域を判別するための情報と、この一連のデータに含まれるデータのセクタ数を判別するための情報を書き込むようにしたので、これらの情報に基づいて論理セクタ領域と物理セクタ領域との対応関係を効率的に判別することができる。又、一連のデータが書き込まれた物理ページの冗長領域に、この一連のデータの先頭データに対応する論理ページを判別するための情報と、この一連のデータに含まれる先頭データに対応する論理ページから末尾データに対応する論理ページまでのページ数を判別するための情報を書き込むようにした場合には、これらの情報に基づいて論理ページと物理ページとの対応関係を効率的に判別することができる。   According to the flash memory, the flash memory system, and the flash memory control method of the present invention, the logical sector area corresponding to the head data of the series of data is added to the redundant area corresponding to the physical sector area where the series of data is written. Information and the information for determining the number of sectors of data included in this series of data are written, so the correspondence between the logical sector area and the physical sector area is determined based on these information. It can be determined efficiently. In addition, information for determining the logical page corresponding to the first data of the series of data and the logical page corresponding to the first data included in the series of data in the redundant area of the physical page in which the series of data is written When the information for determining the number of pages from the first to the logical page corresponding to the end data is written, it is possible to efficiently determine the correspondence between the logical page and the physical page based on the information. it can.

以下、本発明の実施の形態を、図面を参照しながら説明する。図1は、本発明に係るフラッシュメモリシステム1を概略的に示すブロック図である。図1に示すように、フラッシュメモリシステム1は、フラッシュメモリ2と、それを制御するメモリコントローラ3とで構成されている。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram schematically showing a flash memory system 1 according to 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.

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

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

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

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

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

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

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

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

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

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

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

NAND型フラッシュメモリでは、データ読み出し動作及びデータ書き込み動作はページ単位で行われ、データ消去動作はブロック(物理ブロック)単位でおこなわれる。物理ブロックは、複数のページ(物理ページ)で構成される。本実施の形態では、1個の物理ページが4セクタ(2048バイト)のユーザ領域と64バイトの冗長領域で構成され、1個の物理ブロックが64個の物理ページで構成されているNAND型フラッシュメモリを用いる。   In the NAND flash memory, a data read operation and a data write operation are performed in units of pages, and a data erase operation is performed in units of blocks (physical blocks). A physical block is composed of a plurality of pages (physical pages). In this embodiment, one physical page is composed of a 4-sector (2048-byte) user area and a 64-byte redundant area, and one physical block is composed of 64 physical pages. Use memory.

図2は、本実施の形態で用いるNAND型フラッシュメモリの1個の物理ページに含まれる記憶領域を示している。ユーザ領域25はホストシステム4から与えられるデータを記憶するための領域である。冗長領域26は、誤り訂正符号(ECC:Error Correcting Code)、論理アドレス情報、ブロックステータス(フラグ)等の付加データを記憶するための領域である。   FIG. 2 shows a storage area included in one physical page of the NAND flash memory used in the present embodiment. The user area 25 is an area for storing data given from the host system 4. The redundant area 26 is an area for storing additional data such as an error correcting code (ECC), logical address information, and a block status (flag).

図2に示すようにユーザ領域25は、1セクタ(512バイト)の物理セクタ領域60(60a−60d)に分割して使用される。冗長領域26は、8バイトの共通冗長領域50と、14バイトの分割冗長領域70(70a−70d)に分割して使用される。各物理ブロックの先頭物理ページの共通冗長領域50には、論理アドレス情報、ブロックステータス(フラグ)等の物理ブロック毎で管理される情報が書き込まれる。更に、後述する第2の実施の形態では、各物理ページの共通冗長領域50に、論理ページと物理ページとの対応関係を管理するための情報が書き込まれる。   As shown in FIG. 2, the user area 25 is divided into physical sector areas 60 (60a-60d) of one sector (512 bytes). The redundant area 26 is divided into an 8-byte common redundant area 50 and a 14-byte divided redundant area 70 (70a-70d). Information managed for each physical block such as logical address information and block status (flag) is written in the common redundant area 50 of the first physical page of each physical block. Furthermore, in a second embodiment to be described later, information for managing the correspondence between logical pages and physical pages is written in the common redundant area 50 of each physical page.

4個の物理セクタ領域60a−60dと4個の分割冗長領域70a−70dは、1対1の対応関係が予め設定されている。本実施の形態では、物理セクタ領域60aが分割冗長領域70aに、物理セクタ領域60bが分割冗長領域70bに、物理セクタ領域60cが分割冗長領域70cに、物理セクタ領域60dが分割冗長領域70dに、それぞれ対応している。分割冗長領域70a−70dには、対応関係にある物理セクタ領域60a−60dに記憶されるデータに付加される誤り訂正符号等の物理セクタ領域60(60a−60d)毎で管理される情報が書き込まれる。後述する第1の実施の形態では、分割冗長領域70に、論理セクタ領域と物理セクタ領域との対応関係を管理するための情報が書き込まれる。   The four physical sector areas 60a-60d and the four divided redundant areas 70a-70d have a one-to-one correspondence set in advance. In the present embodiment, the physical sector area 60a is the divided redundant area 70a, the physical sector area 60b is the divided redundant area 70b, the physical sector area 60c is the divided redundant area 70c, and the physical sector area 60d is the divided redundant area 70d. Each corresponds. In the divided redundant areas 70a to 70d, information managed for each physical sector area 60 (60a to 60d) such as an error correction code added to data stored in the corresponding physical sector areas 60a to 60d is written. It is. In the first embodiment to be described later, information for managing the correspondence between the logical sector area and the physical sector area is written in the divided redundant area 70.

このように、1個の物理ページがmセクタのユーザ領域で構成され、1個の物理ブロックがn個の物理ページで構成されているNAND型フラッシュメモリでは、1個の物理ブロックは、m×n個の物理セクタ領域(1セクタ単位の領域)で構成されているNAND型フラッシュメモリとして取り扱うこともできる。つまり、本実施の形態で用いたNAND型フラッシュメモリの場合には、256個の物理セクタ領域(1セクタ単位の領域)で構成されているNAND型フラッシュメモリとして取り扱うことができる。以下の説明で、物理ブロック内の物理セクタ領域に付けた通し番号を物理セクタ番号(PSN)と言う。例えば、1個の物理ブロックが256個の物理セクタ領域で構成されている場合、各物理ブロック内の256個の物理セクタ領域には、PSNとして#0−#255が付与される。   As described above, in a NAND flash memory in which one physical page is configured by a user area of m sectors and one physical block is configured by n physical pages, one physical block is m × It can also be handled as a NAND flash memory composed of n physical sector areas (areas per sector). In other words, the NAND flash memory used in the present embodiment can be handled as a NAND flash memory composed of 256 physical sector areas (areas of one sector unit). In the following description, a serial number assigned to a physical sector area in a physical block is referred to as a physical sector number (PSN). For example, when one physical block is composed of 256 physical sector areas, # 0 to # 255 are assigned as PSNs to 256 physical sector areas in each physical block.

論理アドレス情報は、物理ブロックと論理ブロックの対応関係を判別するための情報である。従って、記憶データが消去された物理ブロックのような対応する論理ブロックの無い物理ブロックについては、その冗長領域25に(先頭物理ページの共通冗長領域50に)、論理アドレス情報は格納されていない。   The logical address information is information for determining the correspondence between physical blocks and logical blocks. Therefore, for a physical block having no corresponding logical block, such as a physical block from which stored data has been erased, logical address information is not stored in the redundant area 25 (in the common redundant area 50 of the first physical page).

ブロックステータス(フラグ)は、物理ブロックの良否を示すフラグである。尚、初期不良の物理ブロックについては、不良ブロック(正常にデータの書き込み等を行うことができない物理ブロック)であることを示すブロックステータス(フラグ)が製造メーカによって書き込まれている。   The block status (flag) is a flag indicating pass / fail of the physical block. For the initial defective physical block, a block status (flag) indicating a defective block (physical block in which data cannot be normally written) is written by the manufacturer.

ホストシステム4側のアドレス空間は、セクタ(512バイト)単位で分割した領域(以下、論理セクタ領域と言う)に付けた通番であるLBA(Logical Block Address)で管理されている。又、複数個の論理セクタ領域で構成された論理ブロックを形成し、この論理ブロックに対して、1個又は複数個の物理ブロックが割り当てられる。この論理ブロックと物理ブロックの対応関係は、ゾーン単位で管理されることが多い。図3は、8個の論理ゾーンと8個の物理ゾーンを形成し、対応関係にある論理ゾーンと物理ゾーンの組毎に、論理ブロックと物理ブロックの対応関係を管理する場合の例を示している。この例では、LBA#0−#2047999からなる2048000個の論理セクタ領域を、8192個の物理ブロックからなるフラッシュメモリ2側の記憶領域に割り当てている。
アドレスが連続する256個の論理セクタ領域をまとめたものを論理ブロックとし、この論理ブロックに通し番号を付している。以下、論理ブロックに付した通し番号を論理ブロック番号(LBN)と言う。例えば、LBA#0−#255の256個の論理セクタ領域は、LBN#0の論理ブロックに属し、LBA#256−#511の256個の論理セクタ領域はLBN#1の論理ブロックに属している。このように、LBA#0−#2047999の2048000個の論理セクタ領域は、LBN#0−#7999の8000個の論理ブロックのいずれかに属している。
The address space on the host system 4 side is managed by an LBA (Logical Block Address) which is a serial number assigned to an area (hereinafter referred to as a logical sector area) divided in units of sectors (512 bytes). Further, a logical block composed of a plurality of logical sector areas is formed, and one or a plurality of physical blocks are allocated to the logical block. The correspondence between logical blocks and physical blocks is often managed on a zone basis. FIG. 3 shows an example in which eight logical zones and eight physical zones are formed, and the correspondence relationship between logical blocks and physical blocks is managed for each pair of logical zones and physical zones in correspondence relationship. Yes. In this example, 2048000 logical sector areas composed of LBA # 0 to # 20479999 are allocated to a storage area on the flash memory 2 side composed of 8192 physical blocks.
A group of 256 logical sector areas with consecutive addresses is defined as a logical block, and a serial number is assigned to this logical block. Hereinafter, a serial number assigned to a logical block is referred to as a logical block number (LBN). For example, the 256 logical sector areas of LBA # 0- # 255 belong to the logical block of LBN # 0, and the 256 logical sector areas of LBA # 256- # 511 belong to the logical block of LBN # 1. . As described above, the 2048,000 logical sector areas of LBA # 0 to # 20479999 belong to one of 8000 logical blocks of LBN # 0 to # 7999.

更に、この論理ブロックを複数個まとめたものを論理ゾーンとし、この論理ゾーンに通し番号を付している。以下、論理ゾーンに付した通し番号を論理ゾーン番号(LZN)と言う。この例では、8個の論理ゾーン(LZN#0−#7)が形成され、それぞれの論理ゾーンは、LBNが連続する1000個の論理ブロックから構成されている。尚、LBNが連続する論理ブロックを、異なる論理ゾーンに順次振り分けるようにして論理ゾーンを形成してもよい。例えば、LBN#0の論理ブロックはLZN#0の論理ゾーンに、LBN#1の論理ブロックはLZN#1の論理ゾーンに、LBN#2の論理ブロックはLZN#2の論理ゾーンにという順番でLZN#7の論理ゾーンまで振り分けていく。以下同様に、LBN#8の論理ブロックをLZN#0の論理ゾーンに、LBN#9の論理ブロックをLZN#1の論理ゾーンに、LBN#10の論理ブロックをLZN#2の論理ゾーンに振り分けていく。   Further, a logical zone is formed by collecting a plurality of logical blocks, and serial numbers are assigned to the logical zones. Hereinafter, the serial number assigned to the logical zone is referred to as a logical zone number (LZN). In this example, eight logical zones (LZN # 0- # 7) are formed, and each logical zone is composed of 1000 logical blocks with continuous LBN. Note that logical zones may be formed by sequentially assigning logical blocks having consecutive LBNs to different logical zones. For example, the logical block of LBN # 0 is in the logical zone of LZN # 0, the logical block of LBN # 1 is in the logical zone of LZN # 1, and the logical block of LBN # 2 is in the logical zone of LZN # 2. Sort to logical zone # 7. Similarly, the logical block of LBN # 8 is assigned to the logical zone of LZN # 0, the logical block of LBN # 9 is assigned to the logical zone of LZN # 1, and the logical block of LBN # 10 is assigned to the logical zone of LZN # 2. Go.

一方、フラッシュメモリ2側は、8192個の物理ブロックにより、8個の物理ゾーンが形成されている。8192個の物理ブロックには、固有の物理ブロックアドレス(PBA)が付されている。又、8個の物理ゾーンには、通し番号を付されている。以下、物理ゾーンに付された通し番号を、物理ゾーン番号(PZN)と言う。各物理ゾーンは、PBAが連続する物理ブロックが1024個で構成されている。尚、PBAが連続しない物理ブロックで物理ゾーンを形成するようにしてもよい。   On the other hand, on the flash memory 2 side, 8 physical zones are formed by 8192 physical blocks. A unique physical block address (PBA) is assigned to 8192 physical blocks. Also, serial numbers are assigned to the eight physical zones. Hereinafter, the serial number assigned to the physical zone is referred to as a physical zone number (PZN). Each physical zone is composed of 1024 physical blocks with continuous PBA. Note that the physical zone may be formed by physical blocks in which PBAs are not continuous.

論理ゾーンと物理ゾーンの対応関係については、物理ゾーンのPZNと、当該PZNと同じ値のLZNを有する論理ゾーンとを対応させている。つまり、PZN#0の物理ゾーンに対してLZN#0の論理ゾーンが対応し、PZN#1の物理ゾーンに対してLZN#1の論理ゾーンが対応する。   Regarding the correspondence relationship between the logical zone and the physical zone, the PZN of the physical zone is associated with the logical zone having the same LZN value as the PZN. That is, the logical zone of LZN # 0 corresponds to the physical zone of PZN # 0, and the logical zone of LZN # 1 corresponds to the physical zone of PZN # 1.

尚、論理ブロックと物理ブロックとの対応関係は通常、アドレス変換テーブルによって管理される。このアドレス変換テーブルは、論理ブロックと物理ブロックとの対応関係を記述したテーブルであり、各物理ブロックの冗長領域25に記憶されている論理アドレス情報に基づいて作成される。このアドレス変換テーブルを作成するときは、作成対象の物理ゾーンに含まれる物理ブロックの冗長領域25から論理アドレス情報が順次読み出され、読み出された論理アドレス情報に基づいて論理ブロックと物理ブロックとの対応関係が順次記述される。また、対応関係にある論理ブロック内の領域と物理ブロック内の領域を管理するために、論理セクタ領域と物理セクタ領域60の対応関係を示したセクタ情報テーブル(第1の実施の形態)又は論理ページ(後述)と物理ページの対応関係を示したページ情報テーブル(第2の実施の形態)も作成される。   The correspondence relationship between the logical block and the physical block is usually managed by an address conversion table. This address conversion table is a table describing the correspondence between logical blocks and physical blocks, and is created based on logical address information stored in the redundant area 25 of each physical block. When creating this address conversion table, the logical address information is sequentially read from the redundant area 25 of the physical block included in the physical zone to be created, and the logical block and the physical block are read based on the read logical address information. Are sequentially described. Further, in order to manage the areas in the logical block and the physical block in the correspondence relationship, the sector information table (first embodiment) or the logical information indicating the correspondence relation between the logical sector area and the physical sector area 60 is used. A page information table (second embodiment) indicating the correspondence between pages (described later) and physical pages is also created.

尚、フラッシュメモリ内の物理ブロックには、出荷時から不良である先天性の不良ブロックが含まれている。更に、出荷時に良品の物理ブロックであっても、使用開始後に劣化して不良ブロックになる物理ブロック(後天性の不良ブロック)もある。従って、本実施の形態では、論理ゾーンに含まれる論理ブロックの数は1000個であるのに対し、物理ゾーンに含まれる物理ブロックの数は1024個としている。
<第1の実施の形態>
Note that the physical blocks in the flash memory include innate defective blocks that are defective from the time of shipment. Furthermore, even if a physical block is a non-defective product at the time of shipment, there is a physical block (acquired defective block) that deteriorates after use and becomes a defective block. Therefore, in this embodiment, the number of logical blocks included in the logical zone is 1000, whereas the number of physical blocks included in the physical zone is 1024.
<First Embodiment>

第1の実施の形態では、論理ブロックに含まれる256個の論理セクタ領域と物理ブロックに含まれる256個の物理セクタ領域60との対応関係をセクタ単位で管理している。尚、1個の物理ページに複数個の物理セクタ領域60が含まれている場合に、この複数個の物理セクタ領域60に対するデータの書き込みを複数回に分けて実行することができないNAND型フラッシュメモリの場合には、後述するページ単位(1個の物理ページに含まれるユーザ領域25のセクタ数単位)で論理ブロックに含まれる256個の論理セクタ領域と物理ブロックに含まれる256個の物理セクタ領域60との対応関係を管理する。つまり、第1の実施の形態は、各物理ページに対するデータの書き込みを物理セクタ領域60毎に分けて実行することのできるNAND型フラッシュメモリの場合に適用することができる。例えば、図2に示したように1個の物理ページに4個の物理セクタ領域60が含まれている場合には、この物理ページに対するデータの書き込みを4回に分けて実行することができるNAND型フラッシュメモリであれば、第1の実施の形態を適用することができる。   In the first embodiment, the correspondence between 256 logical sector areas included in a logical block and 256 physical sector areas 60 included in a physical block is managed in units of sectors. It should be noted that when a plurality of physical sector areas 60 are included in one physical page, a NAND flash memory in which data writing to the plurality of physical sector areas 60 cannot be performed in a plurality of times. In this case, 256 logical sector areas included in the logical block and 256 physical sector areas included in the physical block in page units (units of the number of sectors of the user area 25 included in one physical page) described later. The correspondence relationship with 60 is managed. That is, the first embodiment can be applied to a NAND flash memory that can execute data writing to each physical page separately for each physical sector area 60. For example, as shown in FIG. 2, when four physical sector areas 60 are included in one physical page, NAND that can execute data writing to the physical page in four steps The first embodiment can be applied to a type flash memory.

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

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

以下の説明で、ホストシステム4から与えられる情報、つまり、コマンドレジスタR1、セクタ数レジスタR2及びLBAレジスタR3に書き込まれる情報に基づいて実行される1セクタ又は複数セクタのデータの書き込み処理において、書き込まれるデータを一連のデータと言う。例えば、セクタ数レジスタR2に書き込まれた値がnの場合、nセクタ分の論理アドレスが連続するデータが一連のデータに対応する。尚、論理アクセス領域が複数個の論理ブロックに跨っている場合は、論理ブロック毎に一連のデータは分割される。例えば、論理アクセス領域が2個の論理ブロック(第1の論理ブロックと第2の論理ブロック)に跨っている場合に、第1の論理ブロックに属する論理アクセス領域のセクタ数がpセクタで、第2の論理ブロックに属する論理アクセス領域のセクタ数がqセクタであれば、セクタ数レジスタR2に書き込まれた値がn(n=p+q)であっても、一連のデータはpセクタの一連のデータとqセクタの一連のデータとに分割される。   In the following description, in the write process of data of one sector or a plurality of sectors executed based on information given from the host system 4, that is, information written in the command register R1, the sector number register R2, and the LBA register R3. This data is called a series of data. For example, when the value written in the sector number register R2 is n, data in which logical addresses for n sectors are continuous corresponds to a series of data. When the logical access area extends over a plurality of logical blocks, a series of data is divided for each logical block. For example, when the logical access area extends over two logical blocks (the first logical block and the second logical block), the number of sectors in the logical access area belonging to the first logical block is p sectors, If the number of sectors in the logical access area belonging to the logical block 2 is q sectors, even if the value written in the sector number register R2 is n (n = p + q), the series of data is a series of data in the p sector. And q series of data.

ホストシステム4は、書き込むデータのアドレス又は読み出すデータのアドレスをLBAで指示する。つまり、セクタ数レジスタR2及びLBAレジスタR3に書き込まれた情報に基づいて判別されるLBA(セクタ数レジスタR2に書き込まれた値が1の場合)又はLBAが連続する範囲(セクタ数レジスタR2に書き込まれた値が2以上の場合)が書き込むデータの書き込み先を指示するアドレス又は読み出すデータの読み出し元を指示するアドレスになる。   The host system 4 indicates the address of the data to be written or the address of the data to be read by LBA. That is, the LBA discriminated based on the information written in the sector number register R2 and the LBA register R3 (when the value written in the sector number register R2 is 1) or the range in which the LBA is continuous (written in the sector number register R2) (When the value is 2 or more) becomes an address indicating a writing destination of data to be written or an address indicating a reading source of data to be read.

ここで、1個の論理ブロックに含まれる論理セクタ領域の個数が2個(例えば、i=8のときは256個)の場合、LBAの下位iビット(例えば、i=8のときは下位8ビット)が論理ブロック内の論理セクタ領域に付けた通し番号に対応する。以下、論理ブロック内の論理セクタ領域に付けた通し番号を論理セクタ番号(LSN)と言う。又、LBAの下位iビット(例えば、i=8のときは下位8ビット)を除いた、LBAの上位側のビットがLBNに対応する。従って、セクタ数レジスタR2及びLBAレジスタR3に書き込まれた情報に基づいて判別されるLBAが連続する範囲において、LBAのLBNに対応する部分のビットが示す値が同一であれば、論理アクセス領域は複数個の論理ブロックに跨っていない。 Here, when the number of logical sector areas included in one logical block is 2 i (for example, 256 when i = 8), the lower i bits of the LBA (for example, lower when i = 8) 8 bits) corresponds to the serial number assigned to the logical sector area in the logical block. Hereinafter, the serial number assigned to the logical sector area in the logical block is referred to as a logical sector number (LSN). Further, the upper bits of the LBA, excluding the lower i bits of the LBA (for example, the lower 8 bits when i = 8) correspond to the LBN. Therefore, if the value indicated by the bit of the portion corresponding to the LBN of the LBA is the same in the range where the LBA determined based on the information written in the sector number register R2 and the LBA register R3 is continuous, the logical access area is It does not straddle multiple logical blocks.

次に、論理ブロックに含まれる256個の論理セクタ領域と物理ブロックに含まれる256個の物理セクタ領域60との対応関係をセクタ単位で管理するために、各物理セクタ領域60に対応する分割冗長領域70に書き込まれる情報について、図4を参照して説明する。図4は、PSN#0−#255の物理セクタ領域60に書き込まれているデータのLSNと、分割冗長領域70に書き込まれているスタートポインタ(SP)、スタート論理セクタ番号(SLSN)及びセクタカウント(SCNT)との対応関係を示している。スタートポインタ(SP)、スタート論理セクタ番号(SLSN)及びセクタカウント(SCNT)は、一連のデータ毎に設定され、その一連のデータが書き込まれた物理セクタ領域60に対応する分割冗長領域70に書き込まれる。   Next, in order to manage the correspondence between the 256 logical sector areas included in the logical block and the 256 physical sector areas 60 included in the physical block in units of sectors, the division redundancy corresponding to each physical sector area 60 is performed. Information written in the area 70 will be described with reference to FIG. FIG. 4 shows the LSN of data written in the physical sector area 60 of PSN # 0- # 255, the start pointer (SP), the start logical sector number (SLSN) and the sector count written in the divided redundant area 70. The correspondence relationship with (SCNT) is shown. A start pointer (SP), a start logical sector number (SLSN), and a sector count (SCNT) are set for each series of data, and are written in the divided redundant area 70 corresponding to the physical sector area 60 in which the series of data is written. It is.

SPは、次の一連のデータの書き込みが開始される物理セクタ領域60の物理セクタ番号(PSN)を表す情報である。つまり、SPは、一連のデータの末尾データが書き込まれる物理セクタ領域60の物理セクタ番号(PSN)の次の番号に対応する。尚、物理ブロック内の末尾の物理セクタ領域60まで一連のデータが書き込まれる場合は、#0がSPとして書き込まれる。SLSNは、一連のデータの先頭データに対応する論理セクタ番号(LSN)を表す情報である。SCNTは、一連のデータのセクタ数を表す情報である。スタートポインタ(SP)、スタート論理セクタ番号(SLSN)及びセクタカウント(SCNT)は、論理セクタ領域と物理セクタ領域60の対応関係を示したセクタ情報テーブルを作成するときに利用される。   The SP is information indicating the physical sector number (PSN) of the physical sector area 60 where writing of the next series of data is started. That is, SP corresponds to the number next to the physical sector number (PSN) of the physical sector area 60 in which the end data of a series of data is written. When a series of data is written up to the last physical sector area 60 in the physical block, # 0 is written as SP. SLSN is information representing a logical sector number (LSN) corresponding to the top data of a series of data. SCNT is information representing the number of sectors in a series of data. The start pointer (SP), the start logical sector number (SLSN), and the sector count (SCNT) are used when creating a sector information table showing the correspondence between the logical sector area and the physical sector area 60.

尚、一連のデータは、物理ブロック内のPSNが小さい方の物理セクタ領域60から順番に書き込まれる。例えば、図4に示したように、最初の一連のデータのセクタ数が10セクタで、2番目の一連のデータのセクタ数が3セクタで、3番目の一連のデータのセクタ数が5セクタで、4番目の一連のデータのセクタ数が8セクタの場合、最初の一連のデータはPSN#0−#9の物理セクタ領域60に書き込まれ、2番目の一連のデータはPSN#10−#12の物理セクタ領域60に書き込まれ、3番目の一連のデータはPSN#13−#17の物理セクタ領域60に書き込まれ、4番目の一連のデータはPSN#18−#25の物理セクタ領域60に書き込まれる。   A series of data is written in order from the physical sector area 60 having the smaller PSN in the physical block. For example, as shown in FIG. 4, the first series of data has 10 sectors, the second series of data has 3 sectors, and the third series of data has 5 sectors. When the number of sectors of the fourth series of data is 8, the first series of data is written in the physical sector area 60 of PSN # 0- # 9, and the second series of data is PSN # 10- # 12. The third series of data is written to the physical sector area 60 of PSN # 13- # 17, and the fourth series of data is written to the physical sector area 60 of PSN # 18- # 25. Written.

尚、各物理ブロックの先頭の物理セクタ領域60から書き込みが開始される最初の一連のデータに付与されるSPとSCNTは同じ値になる。又、2番目以降の一連のデータに付与されるSPは、その一連のデータまでの各一連のデータに付与されるSCNTの総和に対応する。例えば、3番目の一連のデータに付与されるSPは、最初の一連のデータに付与されるSCNT、2番目の一連のデータに付与されるSCNT及び3番目の一連のデータに付与されるSCNTの総和に対応する。   It should be noted that SP and SCNT given to the first series of data starting to be written from the top physical sector area 60 of each physical block have the same value. The SP given to the second and subsequent series of data corresponds to the sum of SCNT given to each series of data up to the series of data. For example, the SP given to the third series of data is the SCNT given to the first series of data, the SCNT given to the second series of data, and the SCNT given to the third series of data. Corresponds to the sum.

又、2番目以降の一連のデータに付与されるSCNTは、その一連のデータに付与されるSPと、その一連のデータの1つ前の一連のデータに付与されるSPとの差に対応する。例えば、3番目の一連のデータに付与されるSCNTは、3番目の一連のデータに付与されるSPと、2番目の一連のデータに付与されるSPとの差に対応する。   The SCNT given to the second and subsequent series of data corresponds to the difference between the SP given to the series of data and the SP given to the series of data immediately before the series of data. . For example, the SCNT assigned to the third series of data corresponds to the difference between the SP assigned to the third series of data and the SP assigned to the second series of data.

このように、SPとSCNTに関しては、いずれか一方の情報に基づいて他方の情報を求めることができる。従って、分割冗長領域70には、SPとSLSNの組合せ又はSCNTとSLSNの組合せを書き込むようにしてもよい。   Thus, regarding SP and SCNT, the other information can be obtained based on either one of the information. Therefore, a combination of SP and SLSN or a combination of SCNT and SLSN may be written in the divided redundant area 70.

尚、一連のデータの書き込み処理で、論理アクセス領域が属する論理ブロックに対応する物理ブロックが無い場合、又は論理アクセス領域が属する論理ブロックに対応する物理ブロックに一連のデータを書き込むことができない場合は、空きブロック(データが書き込まれていない物理ブロック)の検索が行われ、検出された空きブロックに一連のデータが書き込まれる。論理アクセス領域が属する論理ブロックに対応する物理ブロックに一連のデータを書き込むことができない場合としては、空き領域(データが書き込まれていない物理セクタ領域60)が無い場合や、空き領域のセクタ数が一連のデータのセクタ数より少ない場合などが挙げられる。   When there is no physical block corresponding to the logical block to which the logical access area belongs in the series of data write processing, or when a series of data cannot be written to the physical block corresponding to the logical block to which the logical access area belongs. A search for empty blocks (physical blocks in which no data is written) is performed, and a series of data is written in the detected empty blocks. As a case where a series of data cannot be written to the physical block corresponding to the logical block to which the logical access area belongs, there is no empty area (physical sector area 60 to which no data is written) or the number of sectors in the empty area is For example, the number of sectors is less than the number of sectors in a series of data.

図4に示した例では、PBA#7の物理ブロックに4つの一連のデータが保存されている。この4つの一連のデータの書き込み処理について具体的に説明をする。尚、図4に示した例で、D#nは、LSN#nの論理セクタ領域と対応するデータを示している。例えば、D#3は、LSN#3の論理セクタ領域と対応するデータを示している。
(最初の一連のデータの書き込み処理)
In the example shown in FIG. 4, four series of data are stored in the physical block of PBA # 7. The four series of data write processing will be specifically described. In the example shown in FIG. 4, D # n indicates data corresponding to the logical sector area of LSN # n. For example, D # 3 indicates data corresponding to the logical sector area of LSN # 3.
(First data write process)

まず、ホストシステム4により、コマンドレジスタR1に書き込みコマンドのコマンドコードが、LBAレジスタR3に3が、セクタ数レジスタR2に10が書き込まれる。メモリコントローラ3は、LBAレジスタR3に書き込まれたLBA#3とセクタ数レジスタR2に書き込まれた値10とから、この一連のデータの書き込み先として指示された論理アクセス領域のLBAが#3−#12であり、この論理アクセス領域がLBN#0の論理ブロックに含まれ、複数の論理ブロックに跨っていないと判断する。即ち、この一連のデータは単一の物理ブロックに書き込まれると判断する。   First, the host system 4 writes the command code of the write command in the command register R1, 3 in the LBA register R3, and 10 in the sector number register R2. From the LBA # 3 written in the LBA register R3 and the value 10 written in the sector number register R2, the memory controller 3 determines that the LBA of the logical access area designated as the write destination of this series of data is # 3- #. 12, it is determined that this logical access area is included in the logical block of LBN # 0 and does not straddle a plurality of logical blocks. That is, it is determined that this series of data is written in a single physical block.

LBN#0の論理ブロックは、LZN#0の論理ゾーンに属し、LZN#0の論理ゾーンはPZN#0の物理ゾーンに割り当てられている。メモリコントローラ3は、LBN#0の論理ブロックに対応する物理ブロックが無いため、PZN#0の物理ゾーンから空ブロックを検索し、例えば、空きブロックとしてPBA#7の物理ブロックを検出する。尚、LBN#0の論理ブロックのデータが物理ブロックに既に保存されており、当該物理ブロックに10セクタ分のデータを書き込む領域が存在する場合には、空きブロック検索は行なわず、当該物理ブロックのデータが書き込まれていない物理セクタ領域60に、この一連のデータが書き込まれる。   The logical block of LBN # 0 belongs to the logical zone of LZN # 0, and the logical zone of LZN # 0 is assigned to the physical zone of PZN # 0. Since there is no physical block corresponding to the logical block of LBN # 0, the memory controller 3 searches for an empty block from the physical zone of PZN # 0 and, for example, detects a physical block of PBA # 7 as an empty block. If the data of the logical block of LBN # 0 is already stored in the physical block and there is an area in which data for 10 sectors is written in the physical block, the empty block search is not performed and the physical block This series of data is written in the physical sector area 60 where no data is written.

次に、この一連のデータを物理セクタ領域60に書き込む際に、分割冗長領域70に書き込むスタートポインタ(SP)、スタート論理セクタ番号(SLSN)及びセクタカウント(SCNT)について説明する。まず、LBAレジスタR3に書き込まれたLBAの下位8ビットから、SLSNに対応する値#3が求められ、セクタ数レジスタR2に書き込まれた値から、SCNTに対応する値10が求められる。更に、この一連のデータの書き込みを開始する物理セクタ領域60(つまり、この一連のデータの先頭データが書き込まれる物理セクタ領域60)のPSNである#0とSCNTの値10からSPに対応する#10が求められる。
メモリコントローラ3は、PBA#7の物理ブロック内のPSN#0の物理セクタ領域60から一連のデータの書き込みを開始する。LBA#3−#12の論理アクセス領域に書き込むことが指示された一連のデータは、PSN#0−#9の物理セクタ領域60に書き込まれる。この際、PSN#0−#9の物理セクタ領域60に対応する全ての分割冗長領域70には、SP#10、SLSN#3、SCNT10が書き込まれる。
(2番目の一連のデータの書き込み処理)
Next, a start pointer (SP), a start logical sector number (SLSN), and a sector count (SCNT) that are written in the divided redundant area 70 when writing this series of data in the physical sector area 60 will be described. First, the value # 3 corresponding to SLSN is obtained from the lower 8 bits of the LBA written to the LBA register R3, and the value 10 corresponding to SCNT is obtained from the value written to the sector number register R2. Furthermore, the PSN # 0 corresponding to the SPN of the physical sector area 60 where the series of data starts to be written (that is, the physical sector area 60 to which the first data of the series of data is written) corresponds to the SP #. 10 is required.
The memory controller 3 starts writing a series of data from the physical sector area 60 of PSN # 0 in the physical block of PBA # 7. A series of data instructed to be written in the logical access areas of LBA # 3- # 12 is written in the physical sector area 60 of PSN # 0- # 9. At this time, SP # 10, SLSN # 3, and SCNT10 are written in all the divided redundant areas 70 corresponding to the physical sector areas 60 of PSN # 0 to # 9.
(Second series of data write processing)

ホストシステム4により、コマンドレジスタR1に書き込みコマンドのコマンドコードが、LBAレジスタR3に0が、セクタ数レジスタR2に3が書き込まれる。メモリコントローラ3は、LBAレジスタR3に書き込まれたLBA#0とセクタ数レジスタR2に書き込まれた値3とから、この一連のデータの書き込み先として指示された論理アクセス領域のLBAが#0−#2であり、この論理アクセス領域がLBN#0の論理ブロックに含まれ、複数の論理ブロックに跨っていないと判断する。また、論理ブロックと物理ブロックの対応関係を記述したアドレス変換テーブルに基づいて、LBN#0の論理ブロックがPBA#7の物理ブロックに対応していることを判別する。   The host system 4 writes the command code of the write command in the command register R1, 0 in the LBA register R3, and 3 in the sector number register R2. From the LBA # 0 written to the LBA register R3 and the value 3 written to the sector number register R2, the memory controller 3 determines that the LBA of the logical access area designated as the write destination of this series of data is # 0- #. 2. It is determined that this logical access area is included in the logical block of LBN # 0 and does not straddle a plurality of logical blocks. Further, based on the address conversion table describing the correspondence between the logical block and the physical block, it is determined that the logical block of LBN # 0 corresponds to the physical block of PBA # 7.

続いて、PBA#7の物理ブロック内のデータが書き込まれていない物理セクタ領域60の先頭を検索する空きセクタ領域検索が行われる。この空きセクタ領域検索の終了後、メモリコントローラ3は、物理ブロック内のデータが書き込まれていない物理セクタ領域60の先頭であるPSN#10の物理セクタ領域60から一連のデータの書き込みを開始する。従って、LBA#0−#2の論理アクセス領域に書き込むことが指示された一連のデータは、PBA#7の物理ブロックのPSN#10−#12の物理セクタ領域60に書き込まれる。   Subsequently, a free sector area search is performed to search the top of the physical sector area 60 in which data in the physical block of PBA # 7 is not written. After this free sector area search is completed, the memory controller 3 starts writing a series of data from the physical sector area 60 of PSN # 10 that is the head of the physical sector area 60 in which data in the physical block is not written. Therefore, a series of data instructed to be written to the logical access areas of LBA # 0 to # 2 is written to the physical sector area 60 of PSN # 10 to # 12 of the physical block of PBA # 7.

この一連のデータを物理セクタ領域60に書き込む際に、分割冗長領域70に書き込む情報については、LBAレジスタR3に書き込まれたLBAの下位8ビットから、SLSNに対応する値#0が求められ、セクタ数レジスタR2に書き込まれた値から、SCNTに対応する値3が求められる。更に、この一連のデータの書き込みを開始する物理セクタ領域60(つまり、この一連のデータの先頭データが書き込まれる物理セクタ領域60)のPSNである#10とSCNTの値3からSPに対応する#13が求められる。これらの情報は、PBA#7の物理ブロック内のPSN#10−#12の物理セクタ領域60に一連のデータを書き込む際に、PSN#10−#12の物理セクタ領域60に対応する全ての分割冗長領域70に書き込まれる。つまり、PSN#10−#12の物理セクタ領域60に対応する全ての分割冗長領域70に、SP#13、SLSN#0、SCNT3が書き込まれる。
(3番目の一連のデータの書き込み処理)
When writing this series of data to the physical sector area 60, the value # 0 corresponding to SLSN is obtained from the lower 8 bits of the LBA written to the LBA register R3 for the information to be written to the divided redundant area 70, A value 3 corresponding to SCNT is obtained from the value written in the number register R2. Further, # 10 corresponding to the SP from the PSN # 10 and the SCNT value 3 of the physical sector area 60 where the series of data starts to be written (that is, the physical sector area 60 to which the first data of the series of data is written) is # 13 is required. These pieces of information are all divided corresponding to the physical sector area 60 of PSN # 10- # 12 when a series of data is written to the physical sector area 60 of PSN # 10- # 12 in the physical block of PBA # 7. It is written in the redundant area 70. That is, SP # 13, SLSN # 0, and SCNT3 are written in all the divided redundant areas 70 corresponding to the physical sector areas 60 of PSN # 10- # 12.
(3rd data write process)

ホストシステム4により、コマンドレジスタR1に書き込みコマンドのコマンドコードが、LBAレジスタR3に5が、セクタ数レジスタR2に5が書き込まれる。メモリコントローラ3は、この一連のデータの書き込み先として指示された論理アクセス領域のLBAが#5−#9であり、この論理アクセス領域がLBN#0の論理ブロックに含まれ、LBN#0の論理ブロックがPBA#7の物理ブロックに対応していることを判別する。   The host system 4 writes the command code of the write command in the command register R1, 5 in the LBA register R3, and 5 in the sector number register R2. In the memory controller 3, the LBA of the logical access area designated as the write destination of this series of data is # 5- # 9, and this logical access area is included in the logical block of LBN # 0, and the logical access area of LBN # 0 It is determined that the block corresponds to the physical block of PBA # 7.

続いて、PBA#7の物理ブロック内のデータが書き込まれていない物理セクタ領域60の先頭を検索する空きセクタ領域検索が行われる。この空きセクタ領域検索の終了後、メモリコントローラ3は、LBA#5−#9の論理アクセス領域に書き込むことが指示された一連のデータを、PBA#7の物理ブロックのPSN#13−#17の物理セクタ領域60に書き込む。   Subsequently, a free sector area search is performed to search the top of the physical sector area 60 in which data in the physical block of PBA # 7 is not written. After this free sector area search is completed, the memory controller 3 stores a series of data instructed to be written in the logical access area of the LBA # 5- # 9 in the PSN # 13- # 17 of the physical block of the PBA # 7. Write to the physical sector area 60.

この一連のデータをPBA#7の物理ブロック内のPSN#13−#17の物理セクタ領域60に書き込む際に、PSN#13−#17の物理セクタ領域60に対応する全ての分割冗長領域70には、SP#18、SLSN#5、SCNT5が書き込まれる。尚、SP、SLSN及びSCNTについては、LBAレジスタR3とセクタ数レジスタR2に書き込まれた情報及び一連のデータの先頭データが書き込まれる物理セクタ領域60のPSNに基づいて求められる。
(4番目の一連のデータの書き込み処理)
When this series of data is written to the physical sector area 60 of PSN # 13- # 17 in the physical block of PBA # 7, all the redundant redundancy areas 70 corresponding to the physical sector area 60 of PSN # 13- # 17 are written. SP # 18, SLSN # 5, and SCNT5 are written. Note that SP, SLSN, and SCNT are obtained based on the information written in the LBA register R3 and the sector number register R2 and the PSN of the physical sector area 60 where the leading data of a series of data is written.
(4th data write process)

ホストシステム4により、コマンドレジスタR1に書き込みコマンドのコマンドコードが、LBAレジスタR3に10が、セクタ数レジスタR2に8が書き込まれる。メモリコントローラ3は、この一連のデータの書き込み先として指示された論理アクセス領域のLBAが#10−#17であり、この論理アクセス領域がLBN#0の論理ブロックに含まれ、LBN#0の論理ブロックがPBA#7の物理ブロックに対応していることを判別する。   The host system 4 writes the command code of the write command in the command register R1, 10 in the LBA register R3, and 8 in the sector number register R2. In the memory controller 3, the LBA of the logical access area designated as the write destination of the series of data is # 10- # 17, and this logical access area is included in the logical block of LBN # 0, and the logical access area of LBN # 0 It is determined that the block corresponds to the physical block of PBA # 7.

続いて、PBA#7の物理ブロック内のデータが書き込まれていない物理セクタ領域60の先頭を検索する空きセクタ領域検索が行われる。この空きセクタ領域検索の終了後、メモリコントローラ3は、LBA#10−#17の論理アクセス領域に書き込むことが指示された一連のデータを、PBA#7の物理ブロックのPSN#18−#25の物理セクタ領域60に書き込む。   Subsequently, a free sector area search is performed to search the top of the physical sector area 60 in which data in the physical block of PBA # 7 is not written. After this free sector area search is completed, the memory controller 3 stores a series of data instructed to be written in the logical access area of the LBA # 10- # 17 in the PSN # 18- # 25 of the physical block of the PBA # 7. Write to the physical sector area 60.

この一連のデータをPBA#7の物理ブロック内のPSN#18−#25の物理セクタ領域60に書き込む際に、PSN#18−#25の物理セクタ領域60に対応する全ての分割冗長領域70には、SP#26、SLSN#10、SCNT8が書き込まれる。尚、SP、SLSN及びSCNTについては、LBAレジスタR3とセクタ数レジスタR2に書き込まれた情報及び一連のデータの先頭データが書き込まれる物理セクタ領域60のPSNに基づいて求められる。   When this series of data is written to the physical sector area 60 of PSN # 18- # 25 in the physical block of PBA # 7, all the redundant redundancy areas 70 corresponding to the physical sector area 60 of PSN # 18- # 25 are written. SP # 26, SLSN # 10, and SCNT8 are written. Note that SP, SLSN, and SCNT are obtained based on the information written in the LBA register R3 and the sector number register R2 and the PSN of the physical sector area 60 where the leading data of a series of data is written.

次に、物理ブロック内のデータが書き込まれていない物理セクタ領域60の先頭を検索する空きセクタ領域検索について説明する。この空きセクタ領域検索は、分割冗長領域70に書き込まれているSP又はSCNTに基づいて行うことができる。例えば、物理ブロック内の先頭の物理セクタ領域60(PSN#0の物理セクタ領域60)に対応する分割冗長領域70に書き込まれているSPに基づいて、2番目の一連のデータの書き込みが開始される物理セクタ領域60(最初の一連のデータの末尾データが書き込まれている物理セクタ領域60の次の物理セクタ領域60)が分かる。2番目の一連のデータが書き込まれていない場合は、この2番目の一連のデータの書き込みが開始される物理セクタ領域60に対応する分割冗長領域70にSPが書き込まれていないが、2番目の一連のデータが書き込まれている場合は、この2番目の一連のデータの書き込みが開始される物理セクタ領域60に対応する分割冗長領域70にSPが書き込まれている。   Next, a free sector area search for searching for the head of the physical sector area 60 in which data in the physical block is not written will be described. This empty sector area search can be performed based on the SP or SCNT written in the divided redundant area 70. For example, the writing of the second series of data is started based on the SP written in the divided redundant area 70 corresponding to the first physical sector area 60 (PSN # 0 physical sector area 60) in the physical block. The physical sector area 60 (the physical sector area 60 next to the physical sector area 60 in which the tail data of the first series of data is written) is known. When the second series of data is not written, SP is not written in the divided redundant area 70 corresponding to the physical sector area 60 where the writing of the second series of data is started. When a series of data is written, SP is written in the divided redundant area 70 corresponding to the physical sector area 60 where the writing of the second series of data is started.

更に、この2番目の一連のデータの書き込みが開始される物理セクタ領域60に対応する分割冗長領域70に書き込まれているSPに基づいて、3番目の一連のデータの書き込みが開始される物理セクタ領域60が分かる。このようにして、次の一連のデータの書き込み開始される物理セクタ領域60に対応する分割冗長領域70に書き込まれているSPを順次読み出していき、SPが書き込まれていないときは、その物理セクタ領域60がデータが書き込まれていない物理セクタ領域60の先頭であると判断する。
<セクタ情報テーブルの作成処理>
Further, based on the SP written in the divided redundant area 70 corresponding to the physical sector area 60 where the writing of the second series of data is started, the physical sector where the writing of the third series of data is started. Region 60 can be seen. In this way, the SP written in the redundant redundant area 70 corresponding to the physical sector area 60 where the next series of data starts to be written is sequentially read, and when the SP is not written, the physical sector is read. It is determined that the area 60 is the head of the physical sector area 60 in which no data is written.
<Sector information table creation processing>

各物理ブロックに記憶されているデータを読み出す場合、ホストシステム4により、コマンドレジスタR1に読み出しコマンドのコマンドコードが書き込まれ、LBAレジスタR3及びセクタ数レジスタR2に、読み出すデータに対応する論理アクセス領域を指示する情報が書き込まれる。つまり、読み出し処理の場合も、ホストシステム4により、アクセス対象の論理アクセス領域が指示される。   When reading the data stored in each physical block, the host system 4 writes the command code of the read command in the command register R1, and sets the logical access area corresponding to the read data in the LBA register R3 and the sector number register R2. Instruction information is written. That is, also in the case of read processing, the host system 4 instructs the logical access area to be accessed.

コマンドレジスタR1に読み出しコマンドのコマンドコードが書き込まれたとき、メモリコントローラ3は、LBAレジスタR3及びセクタ数レジスタR2に書き込まれた情報に基づいて論理アクセス領域を判別する。つまり、アクセス対象の論理ブロック及び論理セクタ領域を判別する。更に、メモリコントローラ3は、アクセス対象の論理ブロックに対応する物理ブロックと、アクセス対象の論理セクタ領域に対応する物理セクタ領域60を判別しなければならない。
論理ブロックと物理ブロックの対応関係については、上述のアドレス変換テーブルに基づいて判別することができる。論理セクタ領域と物理セクタ領域60の対応関係については、分割冗長領域70に書き込まれているSLSN及びSCNTに基づいて、論理セクタ領域と物理セクタ領域60の対応関係を記述したセクタ情報テーブルを作成し、このセクタ情報テーブルに基づいて論理セクタ領域と物理セクタ領域60の対応関係を判別する。
When the command code of the read command is written in the command register R1, the memory controller 3 determines the logical access area based on the information written in the LBA register R3 and the sector number register R2. That is, the logical block and logical sector area to be accessed are determined. Furthermore, the memory controller 3 must discriminate a physical block corresponding to the logical block to be accessed and a physical sector area 60 corresponding to the logical sector area to be accessed.
The correspondence between the logical block and the physical block can be determined based on the above-described address conversion table. Regarding the correspondence relationship between the logical sector region and the physical sector region 60, a sector information table describing the correspondence relationship between the logical sector region and the physical sector region 60 is created based on the SLSN and SCNT written in the divided redundant region 70. The correspondence relationship between the logical sector area and the physical sector area 60 is determined based on the sector information table.

次に、このセクタ情報テーブルの作成処理について説明する。セクタ情報テーブルの作成処理では、メモリコントローラ3は、一連のデータの先頭データが記憶されている物理セクタ領域60に対応する分割冗長領域70からSLSN及びSCNTを読み出し、一連のデータ単位で論理セクタ領域と物理セクタ領域60との対応関係を判別し、判別された論理セクタ領域と物理セクタ領域60との対応関係をセクタ情報テーブル上に書き込んでいく。   Next, the sector information table creation process will be described. In the creation process of the sector information table, the memory controller 3 reads SLSN and SCNT from the divided redundant area 70 corresponding to the physical sector area 60 in which the first data of a series of data is stored, and logical sector areas in a series of data units. And the physical sector area 60 are determined, and the determined correspondence relation between the logical sector area and the physical sector area 60 is written on the sector information table.

尚、このセクタ情報テーブルの作成処理では、SLSN及びSCNTと共にSPも読み出され、読み出されたSPに基づいて、次の一連のデータの先頭データが記憶されている物理セクタ領域60が判別される。尚、SPを用いずにSCNTの値に基づいて、次の一連のデータの先頭データが記憶されている物理セクタ領域60を判別するようにしてもよい。   In this sector information table creation process, the SP is read together with the SLSN and SCNT, and the physical sector area 60 in which the first data of the next series of data is stored is determined based on the read SP. The Note that the physical sector area 60 in which the head data of the next series of data is stored may be determined based on the value of SCNT without using SP.

また、一連のデータが末尾データまで正常に書き込まれているかどうかを確認するため、一連のデータの先頭データが記憶されている物理セクタ領域60に対応する分割冗長領域70に記憶されているSP、SLSN及びSCNTと、末尾データが記憶されている物理セクタ領域60に対応する分割冗長領域70に記憶されているSP、SLSN及びSCNTとが一致するかどうかを確認する。一連のデータが末尾データまで正常に書き込まれていない場合、例えば、末尾データを書き込む前に電源遮断が起こった場合、末尾データが書き込まれているべき物理セクタ領域60に対応する分割冗長領域70には、SP、SLSN及びSCNTが書き込まれていないので、双方の分割冗長領域70から読み出されたSP、SLSN及びSCNTは一致しない。このような場合、その一連のデータは正常に書き込まれていないと判断される。従って、一連のデータの先頭データが記憶されている物理セクタ領域60に対応する分割冗長領域70に記憶されているSP、SLSN及びSCNTと、末尾データが記憶されている物理セクタ領域60に対応する分割冗長領域70に記憶されているSP、SLSN及びSCNTとが一致しなかった場合、その一連のデータに対応する論理セクタ領域と物理セクタ領域との対応関係をセクタ情報テーブルに反映させずに、セクタ情報テーブルの作成処理を終了する。   Further, in order to check whether a series of data is normally written up to the end data, the SP stored in the divided redundant area 70 corresponding to the physical sector area 60 in which the top data of the series of data is stored, It is confirmed whether the SLSN and SCNT match the SP, SLSN, and SCNT stored in the divided redundant area 70 corresponding to the physical sector area 60 in which the tail data is stored. When a series of data is not normally written up to the end data, for example, when the power is cut off before the end data is written, in the divided redundant area 70 corresponding to the physical sector area 60 where the end data is to be written. Since SP, SLSN, and SCNT are not written, SP, SLSN, and SCNT read from both divided redundant areas 70 do not match. In such a case, it is determined that the series of data is not normally written. Accordingly, the SP, SLSN, and SCNT stored in the divided redundant area 70 corresponding to the physical sector area 60 in which the first data of a series of data is stored, and the physical sector area 60 in which the end data is stored are stored. If the SP, SLSN, and SCNT stored in the divided redundant area 70 do not match, the correspondence relationship between the logical sector area and the physical sector area corresponding to the series of data is not reflected in the sector information table. The sector information table creation process ends.

次に、図4のように、PBA#7の物理ブロックに4つの一連のデータが保存されている場合のセクタ情報テーブルの作成処理を図5を参照して説明する。尚、このセクタ情報テーブルを作成するときは、ワークエリア8にLSN#0−#255に対応するPSNを書き込む領域(以下、セクタ情報テーブル作成領域と言う。)が確保される。   Next, as shown in FIG. 4, a process of creating a sector information table when four series of data are stored in the physical block of PBA # 7 will be described with reference to FIG. When this sector information table is created, an area for writing PSNs corresponding to LSN # 0 to # 255 (hereinafter referred to as sector information table creation area) is secured in the work area 8.

セクタ情報テーブルの作成処理では、初めに、PBA#7の物理ブロックのPSN#0の物理セクタ領域60に対応する分割冗長領域70からSP、SLSN及びSCNTが読み出される。PSN#0の物理セクタ領域60に対応する分割冗長領域70から読み出されたSPから、最初の一連のデータの末尾データの保存先が判断される。続いて、最初の一連のデータが末尾データまで正常に保存されているかどうかを確認するため、末尾データの保存先であるPSN#9の物理セクタ領域60に対応する分割冗長領域70からSP、SLSN及びSCNTが読み出される。PSN#0の物理セクタ領域60に対応する分割冗長領域70から読み出されたSP、SLSN及びSCNTの値と、PSN#9の物理セクタ領域60に対応する分割冗長領域70から読み出されたSP、SLSN及びSCNTの値が等しいかどうかが判断される。両者の値が等しいとき、最初の一連のデータの書き込みが正常に終了していると判断され、最初の一連のデータに関する情報がセクタ情報テーブルに反映される。
この反映処理では、SLSN及びSCNTの値(SLSN#3、SCNT10)からLSN#3−#12の論理セクタ領域が、PSN#0−#9の物理セクタ領域60に対応していると判断され、図5の(A)に示すように、セクタ情報テーブル作成領域のLSN#3−#12に対応する領域にPSNの値である#0−#9が書き込まれる。つまり、LSN#3に対応する領域にPSNの値として#0が書き込まれ、LSN#4に対応する領域にPSNの値として#1が書き込まれ、LSN#5に対応する領域にPSNの値として#2が書き込まれ、以下同様にPSNが書き込まれていき、LSN#12に対応する領域にPSNの値として#9が書き込まれる。尚、2番目の一連のデータの先頭データの保存先については、SPの値からPSN#10の物理セクタ領域60であると判断される。
In the creation process of the sector information table, first, SP, SLSN, and SCNT are read from the divided redundant area 70 corresponding to the physical sector area 60 of PSN # 0 of the physical block of PBA # 7. From the SP read from the divided redundant area 70 corresponding to the physical sector area 60 of PSN # 0, the storage destination of the tail data of the first series of data is determined. Subsequently, in order to confirm whether or not the first series of data has been normally stored up to the end data, the SP and SLSN are changed from the divided redundant area 70 corresponding to the physical sector area 60 of PSN # 9 which is the storage destination of the end data. And SCNT are read. The SP, SLSN and SCNT values read from the divided redundant area 70 corresponding to the physical sector area 60 of PSN # 0, and the SP read from the divided redundant area 70 corresponding to the physical sector area 60 of PSN # 9. , SLSN and SCNT are equal. When both values are equal, it is determined that the writing of the first series of data has been normally completed, and information regarding the first series of data is reflected in the sector information table.
In this reflection process, it is determined from the values of SLSN and SCNT (SLSN # 3, SCNT10) that the logical sector area of LSN # 3- # 12 corresponds to the physical sector area 60 of PSN # 0- # 9, As shown in FIG. 5A, PSN values # 0- # 9 are written in the area corresponding to LSN # 3- # 12 in the sector information table creation area. That is, # 0 is written as the PSN value in the area corresponding to LSN # 3, # 1 is written as the PSN value in the area corresponding to LSN # 4, and the PSN value is written in the area corresponding to LSN # 5. # 2 is written, PSN is written in the same manner, and # 9 is written as the PSN value in the area corresponding to LSN # 12. Note that the storage destination of the top data of the second series of data is determined to be the physical sector area 60 of PSN # 10 from the SP value.

次に、2番目の一連のデータの先頭データの保存先であるPSN#10の物理セクタ領域60に対応する分割冗長領域70から、SP、SLSN及びSCNTが読み出される。また、読み出されたSPの値が#13であるため、2番目の一連のデータの末尾データの保存先は、PSN#12の物理セクタ領域60であると判断され、PSN#12の物理セクタ領域60に対応する分割冗長領域70に書き込まれているSP、SLSN及びSCNTの値が読み出される。PSN#10の物理セクタ領域60に対応する分割冗長領域70から読み出されたSP、SLSN及びSCNTと、PSN#12の物理セクタ領域60に対応する分割冗長領域70から読み出されたSP、SLSN及びSCNTの値が等しいとき、2番目の一連のデータの書き込みが正常に終了していると判断され、2番目の一連のデータに関する情報がセクタ情報テーブルに反映される。   Next, SP, SLSN, and SCNT are read from the divided redundant area 70 corresponding to the physical sector area 60 of PSN # 10 that is the storage destination of the first data of the second series of data. Since the read SP value is # 13, the storage destination of the last data of the second series of data is determined to be the physical sector area 60 of PSN # 12, and the physical sector of PSN # 12 is determined. The values of SP, SLSN and SCNT written in the divided redundant area 70 corresponding to the area 60 are read out. SP, SLSN and SCNT read from the divided redundant area 70 corresponding to the physical sector area 60 of PSN # 10, and SP, SLSN read from the divided redundant area 70 corresponding to the physical sector area 60 of PSN # 12 When the values of SCNT and SCNT are equal, it is determined that the writing of the second series of data has been completed normally, and information relating to the second series of data is reflected in the sector information table.

この反映処理では、SLSN及びSCNTの値(SLSN#0、SCNT3)からLSN#0−#2の論理セクタ領域が、PSN#10−#12の物理セクタ領域60に対応していると判断され、図5の(B)に示すように、セクタ情報テーブル作成領域のLSN#0−#2に対応する領域にPSNの値である#10−#12が書き込まれる。つまり、LSN#0に対応する領域にPSNの値として#10が書き込まれ、LSN#1に対応する領域にPSNの値として#11が書き込まれ、LSN#2に対応する領域にPSNの値として#12が書き込まれる。尚、3番目の一連のデータの先頭データの保存先については、SPの値からPSN#13の物理セクタ領域60であると判断される。   In this reflection process, it is determined from the values of SLSN and SCNT (SLSN # 0, SCNT3) that the logical sector area of LSN # 0- # 2 corresponds to the physical sector area 60 of PSN # 10- # 12, As shown in FIG. 5B, PSN values # 10 to # 12 are written in an area corresponding to LSN # 0 to # 2 in the sector information table creation area. That is, # 10 is written as the PSN value in the area corresponding to LSN # 0, # 11 is written as the PSN value in the area corresponding to LSN # 1, and the PSN value is written in the area corresponding to LSN # 2. # 12 is written. Note that the storage destination of the top data of the third series of data is determined to be the physical sector area 60 of PSN # 13 from the SP value.

次に、3番目の一連のデータの先頭データの保存先であるPSN#13の物理セクタ領域60に対応する分割冗長領域70から、SP、SLSN及びSCNTが読み出される。また、読み出されたSPの値が#18であるため、3番目の一連のデータの末尾データの保存先は、PSN#17の物理セクタ領域60であると判断され、PSN#17の物理セクタ領域60に対応する分割冗長領域70に書き込まれているSP、SLSN及びSCNTの値が読み出される。PSN#13の物理セクタ領域60に対応する分割冗長領域70から読み出されたSP、SLSN及びSCNTと、PSN#17の物理セクタ領域60に対応する分割冗長領域70から読み出されたSP、SLSN及びSCNTの値が等しいとき、3番目の一連のデータの書き込みが正常に終了していると判断され、3番目の一連のデータに関する情報がセクタ情報テーブルに反映される。   Next, SP, SLSN, and SCNT are read from the divided redundant area 70 corresponding to the physical sector area 60 of PSN # 13 that is the storage destination of the top data of the third series of data. Since the read SP value is # 18, it is determined that the storage destination of the last data of the third series of data is the physical sector area 60 of PSN # 17, and the physical sector of PSN # 17 The values of SP, SLSN and SCNT written in the divided redundant area 70 corresponding to the area 60 are read out. SP, SLSN and SCNT read from the divided redundant area 70 corresponding to the physical sector area 60 of PSN # 13, and SP, SLSN read from the divided redundant area 70 corresponding to the physical sector area 60 of PSN # 17 When the values of SCNT and SCNT are equal, it is determined that the writing of the third series of data has been completed normally, and information regarding the third series of data is reflected in the sector information table.

この反映処理では、SLSN及びSCNTの値(SLSN#5、SCNT5)からLSN#5−#9の論理セクタ領域が、PSN#13−#17の物理セクタ領域60に対応していると判断され、図5の(C)に示すように、セクタ情報テーブル作成領域のLSN#5−#9に対応する領域にPSNの値である#13−#17が書き込まれる。この際、セクタ情報テーブル作成領域のLSN#5−#9に対応する領域に書き込まれていた#2−#6が、#13−#17に書き替えられる。このように、セクタ情報テーブルの作成処理では、後から書き込まれた一連のデータに関する情報が優先される。尚、4番目の一連のデータの先頭データの保存先については、SPの値からPSN#18の物理セクタ領域60であると判断される。   In this reflection process, it is determined from the values of SLSN and SCNT (SLSN # 5, SCNT5) that the logical sector area of LSN # 5- # 9 corresponds to the physical sector area 60 of PSN # 13- # 17, As shown in FIG. 5C, the PSN value # 13- # 17 is written in the area corresponding to LSN # 5- # 9 in the sector information table creation area. At this time, # 2- # 6 written in the area corresponding to LSN # 5- # 9 in the sector information table creation area is rewritten to # 13- # 17. Thus, in the sector information table creation process, information regarding a series of data written later is prioritized. Note that the storage destination of the head data of the fourth series of data is determined to be the physical sector area 60 of PSN # 18 from the SP value.

次に、4番目の一連のデータの先頭データの保存先であるPSN#18の物理セクタ領域60に対応する分割冗長領域70から、SP、SLSN及びSCNTが読み出される。また、読み出されたSPの値が#26であるため、4番目の一連のデータの末尾データの保存先は、PSN#25の物理セクタ領域60であると判断され、PSN#25の物理セクタ領域60に対応する分割冗長領域70に書き込まれているSP、SLSN及びSCNTの値が読み出される。PSN#18の物理セクタ領域60に対応する分割冗長領域70から読み出されたSP、SLSN及びSCNTと、PSN#25の物理セクタ領域60に対応する分割冗長領域70から読み出されたSP、SLSN及びSCNTの値が等しいとき、4番目の一連のデータの書き込みが正常に終了していると判断され、4番目の一連のデータに関する情報がセクタ情報テーブルに反映される。   Next, SP, SLSN, and SCNT are read from the divided redundant area 70 corresponding to the physical sector area 60 of PSN # 18 that is the storage destination of the top data of the fourth series of data. Since the read SP value is # 26, the storage destination of the last data of the fourth series of data is determined to be the physical sector area 60 of PSN # 25, and the physical sector of PSN # 25 is determined. The values of SP, SLSN and SCNT written in the divided redundant area 70 corresponding to the area 60 are read out. SP, SLSN and SCNT read from the divided redundant area 70 corresponding to the physical sector area 60 of PSN # 18, and SP, SLSN read from the divided redundant area 70 corresponding to the physical sector area 60 of PSN # 25 When the values of SCNT and SCNT are the same, it is determined that the writing of the fourth series of data has been normally completed, and information regarding the fourth series of data is reflected in the sector information table.

この反映処理では、SLSN及びSCNTの値(SLSN#10、SCNT8)からLSN#10−#17の論理セクタ領域が、PSN#18−#25の物理セクタ領域60に対応していると判断され、図5の(D)に示すように、セクタ情報テーブル作成領域のLSN#10−#17に対応する領域にPSNの値である#18−#25が書き込まれる。この際、セクタ情報テーブル作成領域のLSN#10−#12に対応する領域に書き込まれていた#7−#9が、#18−#20に書き替えられる。尚、5番目の一連のデータの先頭データの保存先については、SPの値からPSN#26の物理セクタ領域60であると判断される。   In this reflection process, it is determined from the SLSN and SCNT values (SLSN # 10, SCNT8) that the logical sector area of LSN # 10- # 17 corresponds to the physical sector area 60 of PSN # 18- # 25, As shown in FIG. 5D, PS18 values # 18- # 25 are written in an area corresponding to LSN # 10- # 17 in the sector information table creation area. At this time, # 7- # 9 written in the area corresponding to LSN # 10- # 12 in the sector information table creation area is rewritten to # 18- # 20. Note that the storage destination of the top data of the fifth series of data is determined to be the physical sector area 60 of PSN # 26 from the SP value.

次に、5番目の一連のデータの先頭データの保存先であるPSN#26の物理セクタ領域60に対応する分割冗長領域70からのSP、SLSN及びSCNTの読み出しが行われるが、SP、SLSN及びSCNTが書き込まれていないためセクタ情報テーブルの作成処理を終了する。
<異常終了に関する処理>
Next, SP, SLSN, and SCNT are read from the divided redundant area 70 corresponding to the physical sector area 60 of PSN # 26 that is the storage destination of the first data of the fifth series of data. Since the SCNT is not written, the sector information table creation process is terminated.
<Processing related to abnormal termination>

図6は、図4に示した4つの一連のデータの書き込みにおいて、4番目の一連のデータの書き込みが正常に終了しなかった場合を示している。このような異常終了の原因としては、例えば、フラッシュメモリシステム1への電力供給が遮断されることが挙げられる。4番目の一連のデータの書き込みは、PSN#18−#22の物理セクタ領域60にデータが書き込まれた状態で終了し、PSN#23−#25の物理セクタ領域60には、データが保存されていない。以下では、このような異常終了が発生した物理ブロックにおけるセクタ情報テーブルの作成処理を説明する。   FIG. 6 shows a case where the writing of the fourth series of data does not end normally in the writing of the four series of data shown in FIG. As a cause of such abnormal termination, for example, power supply to the flash memory system 1 is interrupted. The writing of the fourth series of data ends when the data is written in the physical sector area 60 of PSN # 18- # 22, and the data is stored in the physical sector area 60 of PSN # 23- # 25. Not. Hereinafter, a process for creating a sector information table in a physical block in which such abnormal termination has occurred will be described.

最初の一連のデータ、2番目の一連のデータ及び3番目の一連のデータの書き込みは正常に終了しているので、これらの一連のデータに関する情報はセクタ情報テーブルに反映される。しかし、4番目の一連のデータに関する反映処理では、PSN#18の物理セクタ領域60に対応する分割冗長領域70から読み出されたSP、SLSN及びSCNTと、PSN#25の物理セクタ領域60に対応する分割冗長領域70から読み出されたSP、SLSN及びSCNTの値が等しくないため、4番目の一連のデータの書き込みが正常に終了していないと判断され、4番目の一連のデータに関する情報はセクタ情報テーブルに反映ない。従って、最初の一連のデータ、2番目の一連のデータ及び3番目の一連のデータに関する情報が反映されたセクタ情報テーブル(図5の(C)に示したセクタ情報テーブル)が、この物理ブロックにおけるセクタ情報テーブルとして使用される。   Since the writing of the first series of data, the second series of data, and the third series of data has been normally completed, information regarding these series of data is reflected in the sector information table. However, in the reflection process regarding the fourth series of data, it corresponds to the SP, SLSN and SCNT read from the divided redundant area 70 corresponding to the physical sector area 60 of PSN # 18 and the physical sector area 60 of PSN # 25. Since the values of SP, SLSN, and SCNT read from the divided redundant area 70 are not equal, it is determined that the writing of the fourth series of data has not ended normally, and information on the fourth series of data is Not reflected in the sector information table. Therefore, a sector information table (sector information table shown in FIG. 5C) reflecting information on the first series of data, the second series of data, and the third series of data is stored in this physical block. Used as a sector information table.

このような一部の一連のデータが正常に書き込まれていない物理ブロックが見つかったときには、その物理ブロックに保存されている有効なデータが、別の物理ブロックに転送される。つまり、正常に書き込まれている一連のデータのうち、後の一連のデータで書き替えられていないデータが、別の物理ブロックに転送される。   When a physical block in which such a partial series of data is not normally written is found, valid data stored in the physical block is transferred to another physical block. In other words, data that has not been rewritten by a subsequent series of data among a series of data that has been normally written is transferred to another physical block.

次に、この転送処理について説明する。この転送処理は、正常に書き込まれている一連のデータ情報が反映されたセクタ情報テーブルに基づいて行われる。つまり、セクタ情報テーブル作成領域に書き込まれているPSNに対応する物理セクタ領域60に保存されているデータが、別の物理ブロックに転送される。図6に示したように、4番目の一連のデータの書き込みが正常に終了しなかった場合、図5の(C)に示した最初の一連のデータ、2番目の一連のデータ及び3番目の一連のデータに関する情報が反映されたセクタ情報テーブルに基づいて転送処理が行われる。   Next, this transfer process will be described. This transfer process is performed based on a sector information table in which a series of data information written normally is reflected. That is, data stored in the physical sector area 60 corresponding to the PSN written in the sector information table creation area is transferred to another physical block. As shown in FIG. 6, when the writing of the fourth series of data is not normally completed, the first series of data, the second series of data, and the third series shown in FIG. Transfer processing is performed based on a sector information table in which information relating to a series of data is reflected.

図5の(C)に示したセクタ情報テーブルに基づいた転送処理を、図7を参照して説明する。図7に示した例で、D#nは、LSN#nの論理セクタと対応するデータを示している。尚、この転送処理では、転送先の物理ブロック(空きブロック)の検索がされる。ここでは、PZN#1の物理ゾーン内の空きブロックが検索され、空ブロックとしてPBA#15の物理ブロックが検出されたとする。このPBA#15の物理ブロックに、PBA#7の物理ブロックに保存されているデータを転送するときには、図5の(C)のセクタ情報テーブルに基づいて、LSNの値の小さい方から順番に転送される。つまり、セクタ情報テーブル作成領域に書き込まれているPSNに対応する物理セクタ領域60に保存されているデータは、そのPSNに対応するLSNの値が小さい方から順番に転送される。   A transfer process based on the sector information table shown in FIG. 5C will be described with reference to FIG. In the example shown in FIG. 7, D # n indicates data corresponding to the logical sector of LSN # n. In this transfer process, a search is made for a transfer destination physical block (empty block). Here, it is assumed that an empty block in the physical zone of PZN # 1 is searched and a physical block of PBA # 15 is detected as an empty block. When data stored in the physical block of PBA # 7 is transferred to the physical block of PBA # 15, the data is transferred in order from the smallest LSN based on the sector information table in FIG. Is done. That is, the data stored in the physical sector area 60 corresponding to the PSN written in the sector information table creation area is transferred in order from the one having the smallest LSN value corresponding to the PSN.

図5の(C)のセクタ情報テーブルの場合、LSN#0−#12に対応するPSNだけがセクタ情報テーブル作成領域に書き込まれている。従って、PBA#7の物理ブロックに保存されているデータのうち、セクタ情報テーブル作成領域のLSN#0−#12に対応する領域に書き込まれているPSNに対応する物理セクタ領域60に記憶されているデータだけが、PBA#15の物理ブロックに転送される。   In the case of the sector information table in FIG. 5C, only PSNs corresponding to LSN # 0 to # 12 are written in the sector information table creation area. Therefore, among the data stored in the physical block of PBA # 7, the data is stored in the physical sector area 60 corresponding to the PSN written in the area corresponding to LSN # 0- # 12 of the sector information table creation area. Only the existing data is transferred to the physical block of PBA # 15.

まず、図5の(C)に示すセクタ情報テーブルでは、LSN#0にPSN#10が対応しているので、PBA#7の物理ブロックのPSN#10の物理セクタ領域60に保存されているデータが、PBA#15の物理ブロックのPSN#0の物理セクタ領域60に転送される。次に、LSN#1にPSN#11が対応しているので、PBA#7の物理ブロックのPSN#11の物理セクタ領域60に保存されているデータが、PBA#15のPSN#1の物理セクタ領域60に転送される。同様の処理がLSNの順番で行われていき、PBA#7の物理ブロックのPSN#9の物理セクタ領域60に保存されているデータが、PBA#15の物理ブロックのPSN#12の物理セクタ領域60に転送されて、この転送処理が終了する。   First, in the sector information table shown in FIG. 5C, since PSN # 10 corresponds to LSN # 0, data stored in the physical sector area 60 of PSN # 10 of the physical block of PBA # 7. Are transferred to the physical sector area 60 of PSN # 0 of the physical block of PBA # 15. Next, since PSN # 11 corresponds to LSN # 1, the data stored in the physical sector area 60 of PSN # 11 of the physical block of PBA # 7 is the physical sector of PSN # 1 of PBA # 15. Transferred to area 60. The same processing is performed in the order of LSN, and the data stored in the physical sector area 60 of PSN # 9 of the physical block of PBA # 7 is the physical sector area of PSN # 12 of the physical block of PBA # 15. 60, and this transfer process ends.

次に、この転送処理の際に、分割冗長領域70に書き込まれるSP、SLSN及びSCNTについて説明する。この転送処理では、PBA#7の物理ブロックからPBA#15の物理ブロックに転送される全てのデータのLSNが連続しているため、全てのデータが「一連のデータ」としてPBA#15の物理ブロックに書き込まれたと見なしたSP、SLSN及びSCNTが設定される。つまり、この転送処理が終了したときに、PBA#15の物理ブロックブロック内のデータが書き込まれていない物理セクタ領域60の先頭に対応するPSNである#13が、SPの値になる。この一連のデータの先頭データに対応するLSNである#0が、SLSNの値になる。この一連のデータに含まれるデータのセクタ数である13が、SCNTの値になる。   Next, SP, SLSN, and SCNT that are written in the divided redundant area 70 during this transfer process will be described. In this transfer process, since the LSNs of all data transferred from the physical block of PBA # 7 to the physical block of PBA # 15 are continuous, all the data is regarded as “a series of data” and the physical block of PBA # 15. SP, SLSN, and SCNT that are considered to have been written to are set. In other words, when this transfer process is completed, the PS value # 13 corresponding to the head of the physical sector area 60 in which data in the physical block block of PBA # 15 is not written becomes the SP value. # 0, which is the LSN corresponding to the head data of this series of data, becomes the SLSN value. The SCNT value is 13 which is the number of sectors of data included in this series of data.

このように、異常終了した物理ブロックのデータを転送する際には、LSNが連続する論理セクタ領域に対応するデータを一連のデータと見なして、転送処理が行われる。従って、SP、SLSN及びSCNTは、LSNが連続する論理セクタ領域に対応するデータを一連のデータと見なして設定される。つまり、LSNが連続する論理セクタ領域の先頭の論理セクタ領域のLSNがSLSNになり、LSNが連続する論理セクタ領域の数がSCNTになる。SPの値は、LSNが連続する論理セクタ領域の先頭の論理セクタ領域に対応するデータを書き込む物理セクタ領域60のPSNの値にSCNTの値を足した値になる。   As described above, when data of a physical block that has ended abnormally is transferred, data corresponding to logical sector areas in which LSNs are continuous is regarded as a series of data, and transfer processing is performed. Therefore, SP, SLSN, and SCNT are set by regarding data corresponding to logical sector areas in which LSNs are continuous as a series of data. That is, the LSN of the first logical sector area of the logical sector area where the LSN is continuous becomes SLSN, and the number of logical sector areas where the LSN is continuous becomes SCNT. The SP value is a value obtained by adding the SCNT value to the PSN value of the physical sector area 60 to which data corresponding to the first logical sector area of the logical sector area where the LSN continues is written.

上記第1の実施の形態のフラッシュメモリシステム1によれば、一連のデータの保存先の物理セクタ領域60に対応する分割冗長領域70に、この一連のデータに関するSP、SLSN及びSCNTを書き込んでいる。また、この一連のデータに関する論理セクタ領域と物理セクタ領域60との対応関係は、この一連のデータに関するSLSN及びSCNTに基づいて把握することができる。従って、一連のデータの先頭データが保存されている物理セクタ領域60に対応する分割冗長領域70に書き込まれているSLSN及びSCNTを読み出し、読み出したSLSN及びSCNTに基づいて把握された論理セクタ領域と物理セクタ領域60との対応関係をセクタ情報テーブルに反映させていくことにより、セクタ情報テーブルを完成させることができる。   According to the flash memory system 1 of the first embodiment, the SP, SLSN, and SCNT related to this series of data are written in the divided redundant area 70 corresponding to the physical sector area 60 where the series of data is stored. . Further, the correspondence between the logical sector area and the physical sector area 60 relating to this series of data can be grasped based on the SLSN and SCNT concerning this series of data. Therefore, the SLSN and SCNT written in the divided redundant area 70 corresponding to the physical sector area 60 in which the first data of a series of data is stored are read, and the logical sector area grasped based on the read SLSN and SCNT By reflecting the correspondence relationship with the physical sector area 60 in the sector information table, the sector information table can be completed.

尚、各一連のデータに関する論理セクタ領域と物理セクタ領域60との対応関係は、後から書き込まれた一連のデータに関する方が優先されるため、各一連のデータに関する論理セクタ領域と物理セクタ領域60との対応関係は、一連のデータが書き込まれた順番でセクタ情報テーブルに反映される。   The correspondence between the logical sector area and the physical sector area 60 related to each series of data is given priority over the series of data written later, so the logical sector area and the physical sector area 60 related to each series of data. Is reflected in the sector information table in the order in which a series of data is written.

又、各一連のデータの先頭データが保存されている物理セクタ領域60のPSNは、1つ前の一連のデータに関するSPに基づいて把握することができる。SPを分割冗長領域70に書き込まない場合には、SCNTに基づいて各一連のデータの先頭データが保存されている物理セクタ領域60のPSNを把握することもできる。   Further, the PSN of the physical sector area 60 in which the head data of each series of data is stored can be grasped based on the SP related to the previous series of data. When the SP is not written in the divided redundant area 70, the PSN of the physical sector area 60 in which the head data of each series of data is stored can be grasped based on the SCNT.

又、一連のデータの先頭データが保存されている物理セクタ領域60に対応する分割冗長領域70に書き込まれているSP、SLSN及びSCNTと、その一連のデータの末尾データが保存されている物理セクタ領域60に対応する分割冗長領域70に書き込まれているSP、SLSN及びSCNTが一致しているか否かにより、その一連のデータが正常に書き込まれているか否かを判別することができる。従って、正常に書き込まれた一連のデータに関する論理セクタ領域と物理セクタ領域60との対応関係だけが、セクタ情報テーブルに反映される。
<第2の実施の形態>
Also, the SP, SLSN and SCNT written in the divided redundant area 70 corresponding to the physical sector area 60 in which the head data of the series of data is stored, and the physical sector in which the end data of the series of data is stored. Whether SP, SLSN, and SCNT written in the divided redundant area 70 corresponding to the area 60 coincide with each other can determine whether the series of data is normally written. Accordingly, only the correspondence between the logical sector area and the physical sector area 60 relating to a series of data written normally is reflected in the sector information table.
<Second Embodiment>

第2の実施の形態では、ページ単位(1個の物理ページに含まれるユーザ領域25のセクタ数単位)で論理ブロックに含まれる論理セクタ領域と物理ブロックに含まれる物理セクタ領域との対応関係を管理する。従って、各物理ページに対してデータの書き込みを行うことのできる回数が1回だけのNAND型フラッシュメモリを用いる場合にも実施することができる。尚、フラッシュメモリシステム1の構成は第1の実施の形態と同じであるため、説明を省略する。   In the second embodiment, the correspondence between the logical sector area included in the logical block and the physical sector area included in the physical block in page units (in units of the number of sectors of the user area 25 included in one physical page) is represented. to manage. Therefore, the present invention can also be implemented when using a NAND flash memory in which data can be written to each physical page only once. Since the configuration of the flash memory system 1 is the same as that of the first embodiment, description thereof is omitted.

図8は、LBN#0の論理ブロックと対応関係にあるPBA#24の物理ブロックに保存されている一連のデータ並びにこの一連のデータに関するスタートポインタ(SP)、スタート論理ページ番号(SLPN)及びページカウンタ(PCNT)を示している。以下の説明で、各物理ブロック内の物理ページに付けた通し番号を物理ページ番号(PPN)と言う。又、各論理ブロック内の論理セクタ領域を1個の物理ページに含まれるユーザ領域25のセクタ数単位でまとめたものを論理ページとし、この論理ページに付けた通し番号を論理ページ番号(LPN)と言う。   FIG. 8 shows a series of data stored in the physical block of PBA # 24 corresponding to the logical block of LBN # 0, and a start pointer (SP), a start logical page number (SLPN) and a page related to this series of data. A counter (PCNT) is shown. In the following description, a serial number assigned to a physical page in each physical block is referred to as a physical page number (PPN). In addition, a logical page is obtained by combining logical sector areas in each logical block in units of the number of sectors of the user area 25 included in one physical page, and a serial number assigned to the logical page is a logical page number (LPN). To tell.

本実施の形態では、1個の物理ページが4セクタ(2048バイト)のユーザ領域25で構成され(1個の物理ページに4個の物理セクタ領域60含まれ)、1個の物理ブロックが64個の物理ページで構成されているNAND型フラッシュメモリを用いる。尚、図2に示したように、各物理ページに含まれる4個の物理セクタ領域60については、先頭から順番に(カラムアドレスが小さい方から順番に)、第1物理セクタ領域60a、第2物理セクタ領域60b、第3物理セクタ領域60c、第4物理セクタ領域60dと言う。尚、本実施の形態では、スタートポインタ(SP)、スタート論理ページ番号(SLPN)及びページカウンタ(PCNT)が共通冗長領域50に書き込まれるため、共通冗長領域50を8バイトから16バイトに変更し、分割冗長領域70を14バイトから12バイトに変更する。   In the present embodiment, one physical page is configured by the user area 25 of 4 sectors (2048 bytes) (4 physical sector areas 60 are included in one physical page), and one physical block is 64 A NAND flash memory composed of a single physical page is used. As shown in FIG. 2, with respect to the four physical sector areas 60 included in each physical page, the first physical sector area 60a, the second physical sector area 60a, and the second physical sector area 60a are arranged in order from the top (in order from the smallest column address). They are referred to as a physical sector area 60b, a third physical sector area 60c, and a fourth physical sector area 60d. In this embodiment, the start pointer (SP), the start logical page number (SLPN), and the page counter (PCNT) are written in the common redundant area 50. Therefore, the common redundant area 50 is changed from 8 bytes to 16 bytes. The divided redundant area 70 is changed from 14 bytes to 12 bytes.

第2の実施の形態で共通冗長領域50に書き込まれるスタートポインタ(SP)は、次の一連のデータの書き込みが開始される物理ページの物理ページ番号(PPN)を表す情報である。つまり、スタートポインタ(SP)は、一連のデータの末尾データが書き込まれる物理ページの物理ページ番号(PPN)の次の番号に対応する。尚、物理ブロック内の末尾の物理ページまで一連のデータが書き込まれる場合は、#0がSPとして書き込まれる。スタート論理ページ番号(SLPN)は、一連のデータの先頭データに対応する論理セクタ領域が属する論理ページの論理ページ番号(LPN)を表す情報である。ページカウンタ(PCNT)は、一連のデータの先頭データに対応する論理セクタ領域が属する論理ページから、その一連のデータの末尾データに対応する論理セクタ領域が属する論理ページまでのページ数を表す情報である。スタートポインタ(SP)、スタート論理セクタ番号(SLSN)及びページカウント(PCNT)は、論理ページと物理ページの対応関係を示したページ情報テーブルを作成するときに利用される。
第2の実施の形態では、論理ページと物理ページとの対応関係は変化するが、物理ページ内の4個の物理セクタ領域60と論理ページ内の4個の論理セクタ領域の相対的な関係は変化しない。従って、第2の実施の形態では、ページ単位で論理ブロックに含まれる256個の論理セクタ領域と物理ブロックに含まれる256個の物理セクタ領域60との対応関係を管理する。つまり、本実施の形態のように、1個の物理ページに4個の物理セクタ領域60が含まれる場合であれば、PSNの下位2ビットとLSNの下位2ビットは常に一致するように物理セクタ領域60と論理セクタ領域との対応関係が決められる。即ち、下位2ビットが00のLSNに対応したデータは、第1物理セクタ60aに保存され、下位2ビットが01のLSNに対応したデータは第2物理セクタ60bに保存され、下位2ビットが10のLSNに対応したデータは第3物理セクタに保存され、下位2ビットが11のLSNに対応したデータは第4物理セクタに保存される。尚、論理ページ番号(LPN)は、8ビットのLSNの上位6ビットに対応し、物理ページ番号は8ビットのPSNの上位6ビットに対応する。
The start pointer (SP) written in the common redundant area 50 in the second embodiment is information indicating the physical page number (PPN) of the physical page where writing of the next series of data is started. That is, the start pointer (SP) corresponds to the number next to the physical page number (PPN) of the physical page to which the end data of the series of data is written. If a series of data is written up to the last physical page in the physical block, # 0 is written as SP. The start logical page number (SLPN) is information representing the logical page number (LPN) of the logical page to which the logical sector area corresponding to the head data of a series of data belongs. The page counter (PCNT) is information indicating the number of pages from the logical page to which the logical sector area corresponding to the head data of a series of data belongs to the logical page to which the logical sector area corresponding to the end data of the series of data belongs. is there. The start pointer (SP), the start logical sector number (SLSN), and the page count (PCNT) are used when creating a page information table indicating the correspondence between logical pages and physical pages.
In the second embodiment, the correspondence between the logical page and the physical page changes, but the relative relationship between the four physical sector areas 60 in the physical page and the four logical sector areas in the logical page is It does not change. Therefore, in the second embodiment, the correspondence between 256 logical sector areas included in the logical block and 256 physical sector areas 60 included in the physical block is managed in page units. That is, as in the present embodiment, when four physical sector areas 60 are included in one physical page, the physical sector is set so that the lower 2 bits of the PSN and the lower 2 bits of the LSN always match. Correspondence between the area 60 and the logical sector area is determined. That is, the data corresponding to the LSN whose lower 2 bits are 00 is stored in the first physical sector 60a, the data corresponding to the LSN whose lower 2 bits are 01 is stored in the second physical sector 60b, and the lower 2 bits are 10 The data corresponding to the LSN is stored in the third physical sector, and the data corresponding to the LSN having the lower 2 bits of 11 is stored in the fourth physical sector. The logical page number (LPN) corresponds to the upper 6 bits of the 8-bit LSN, and the physical page number corresponds to the upper 6 bits of the 8-bit PSN.

次に、スタートポインタ(SP)、スタート論理セクタ番号(SLSN)及びページカウント(PCNT)の求め方を説明する。本実施の形態で用いたNAND型フラッシュメモリでは、LBAレジスタR3に書き込まれたLBAの下位8ビットが、一連のデータの先頭データに対応する論理セクタ領域のLSNに対応する。更に、このLSNの上位6ビットの値が、一連のデータの先頭データに対応する論理セクタ領域が属する論理ページのLPNであるSLPNの値に対応する。つまり、一連のデータの先頭データに対応する論理セクタ領域が属する論理ページのLPNがSLPNに対応する。   Next, how to obtain the start pointer (SP), the start logical sector number (SLSN), and the page count (PCNT) will be described. In the NAND flash memory used in the present embodiment, the lower 8 bits of the LBA written in the LBA register R3 correspond to the LSN of the logical sector area corresponding to the head data of a series of data. Further, the value of the upper 6 bits of this LSN corresponds to the value of SLPN which is the LPN of the logical page to which the logical sector area corresponding to the head data of the series of data belongs. That is, the LPN of the logical page to which the logical sector area corresponding to the head data of a series of data corresponds to SLPN.

また、一連のデータの末尾データに対応する論理セクタ領域のLSNは、LBAの下位8ビットに対応するLSNにセクタ数レジスタR2に書き込まれたセクタ数の値を足し、1を引いた値に対応する。この値が255以下であれば、一連のデータは1個の物理ブロックに属している。更に、この8ビットの値の上位6ビットの値が一連のデータの末尾データに対応する論理セクタ領域が属する論理ページのLPNであるエンド論理ページ番号(ELPN)に対応する。つまり、一連のデータの末尾データに対応する論理セクタ領域が属する論理ページのLPNがELPNに対応する。このELPNからSLPNを引き、1を足すことによってPCNTが求められる。   The LSN of the logical sector area corresponding to the end data of a series of data corresponds to a value obtained by adding the value of the number of sectors written in the sector number register R2 to the LSN corresponding to the lower 8 bits of the LBA and subtracting one. To do. If this value is 255 or less, a series of data belongs to one physical block. Further, the upper 6 bits of the 8-bit value correspond to the end logical page number (ELPN) which is the LPN of the logical page to which the logical sector area corresponding to the end data of the series of data belongs. That is, the LPN of the logical page to which the logical sector area corresponding to the end data of a series of data corresponds to ELPN. By subtracting SLPN from this ELPN and adding one, PCNT is obtained.

尚、LSNにセクタ数レジスタR2に書き込まれたセクタ数の値を足し、1を引いた値が256以上の場合、論理アクセス領域が複数個の論理ブロックに跨っているため、この論理アクセス領域は複数の一連のデータに対応し、最初の一連のデータのエンド論理ページ番号(ELPN)は、論理ブロック内の末尾の論理ページのLPNである#63に対応する。   If the value of the number of sectors written in the sector number register R2 is added to the LSN and the value obtained by subtracting 1 is 256 or more, the logical access area spans a plurality of logical blocks. The end logical page number (ELPN) of the first series of data corresponds to # 63 which is the LPN of the last logical page in the logical block.

SPは、一連のデータの先頭データに対応する論理セクタ領域が属する論理ページに対応するデータが保存される物理ページのPPNの値に、この一連のデータに関するPCNTの値を足した値に対応する。あるいは、既に保存されている一連のデータに関するPCNTの値の総和をSPとしてもよい。   The SP corresponds to a value obtained by adding the PPN value of the physical page in which the data corresponding to the logical page to which the logical sector area corresponding to the first data of the series of data belongs is added to the PCNT value related to the series of data. . Or it is good also considering SP as the sum total of the value of PCNT regarding a series of data already preserve | saved.

第2の実施の形態においても、共通冗長領域50には、SP、SLPN及びPCNTが保存されているが、SP及びSLPNのみを書き込むようにしてもよい。この場合には、連続する2つの一連のデータに関するSPの差からPCNTを適宜求めればよい。あるいは、SLPN及びPCNTだけを共通冗長領域50に書き込み、既に保存されている一連のデータに関するPCNTを累積的に加算していくことによりSPを適宜求めるようにしてもよい。   Also in the second embodiment, SP, SLPN, and PCNT are stored in the common redundant area 50, but only SP and SLPN may be written. In this case, PCNT may be determined as appropriate from the difference in SP regarding two consecutive series of data. Alternatively, only the SLPN and PCNT may be written in the common redundant area 50, and the SP may be obtained as appropriate by cumulatively adding PCNT relating to a series of data that has already been stored.

論理アクセス領域が属する論理ブロックのLBNは、LBAレジスタR3に書き込まれたLBAからLSNを示すビット(本実施の形態では下位8ビット)を除いた上位側のビットの値に対応する。尚、論理アクセス領域が2個の論理ブロックに跨っている場合は、LBAからLSNを示すビットを除いた上位側のビットによって与えられる値に、1を足して得られた値が、2個目の論理ブロックのLBNに対応する。   The LBN of the logical block to which the logical access area belongs corresponds to the value of the upper bit excluding the bit indicating the LSN (the lower 8 bits in this embodiment) from the LBA written in the LBA register R3. When the logical access area extends over two logical blocks, the value obtained by adding 1 to the value given by the higher-order bits excluding the bit indicating LSN from LBA is the second value. Corresponds to the LBN of the logical block.

LBAレジスタR3に書き込まれたLBAに基づいて求められたLBNに対応するPBAは、アドレス変換テーブルを用いて求められる。一連のデータの書き込みは、求めたPBAに対応する物理ブロック内のデータが書き込まれていない先頭の物理ページから開始される。   The PBA corresponding to the LBN obtained based on the LBA written in the LBA register R3 is obtained using the address conversion table. A series of data writing is started from the first physical page in which data in the physical block corresponding to the obtained PBA is not written.

尚、以下の2つのいずれかに該当する場合には、空きブロック検索が行われ、空きブロック検索で求められた物理ブロックに一連のデータが書き込まれる。
(1)求めたLBNの論理ブロックに対応する物理ブロックがない場合。
(2)求めたLBNの論理ブロックに対応する物理ブロックは存在するが、当該論理ブロック内にデータを書き込むために十分な空き領域(データが書き込まれていない物理ページ)が無い場合。
If either of the following two cases is satisfied, a free block search is performed, and a series of data is written in the physical block obtained by the free block search.
(1) When there is no physical block corresponding to the obtained logical block of LBN.
(2) A physical block corresponding to the obtained logical block of LBN exists, but there is not enough free space (physical page in which no data is written) to write data in the logical block.

一連のデータは、物理ブロック内の先頭側の物理ページから末尾側の物理ページに向かって順次書き込まれていく。即ち、メモリコントローラ3は、PPNの値の小さい物理ページから順に一連のデータを書き込んでいく。   A series of data is sequentially written from the first physical page to the last physical page in the physical block. That is, the memory controller 3 writes a series of data in order from the physical page having the smallest PPN value.

また、一連のデータが書き込まれた物理ページの共通冗長領域50には、その一連のデータに関するSP、SLPN及びPCNTの値が書き込まれる。   In addition, SP, SLPN, and PCNT values relating to the series of data are written in the common redundant area 50 of the physical page in which the series of data is written.

図8に示した例では、PBA#24の物理ブロックに4つの一連のデータが保存されている。この4つの一連のデータの書き込み処理について具体的に説明をする。尚、図8に示した例で、D#nは、LSN#nの論理セクタ領域と対応するデータを示している。例えば、D#4は、LSN#4の論理セクタ領域と対応するデータを示している。
(最初の一連のデータの書き込み処理)
In the example shown in FIG. 8, four series of data are stored in the physical block of PBA # 24. The four series of data write processing will be specifically described. In the example shown in FIG. 8, D # n indicates data corresponding to the logical sector area of LSN # n. For example, D # 4 indicates data corresponding to the logical sector area of LSN # 4.
(First data write process)

まず、ホストシステム4により、コマンドレジスタR1に書き込みコマンドのコマンドコードが、LBAレジスタR3に4が、セクタ数レジスタR2に24が書き込まれる。メモリコントローラ3は、LBAレジスタR3に書き込まれたLBA#4とセクタ数レジスタR2に書き込まれた値24とから、この一連のデータの書き込み先として指示された論理アクセス領域のLBAが#4−#27であり、この論理アクセス領域がLBN#0の論理ブロックに含まれ、複数の論理ブロックに跨っていないと判断する。即ち、一連のデータは単一の物理ブロックに保存されると判断する。   First, the host system 4 writes the command code of the write command in the command register R1, 4 in the LBA register R3, and 24 in the sector number register R2. From the LBA # 4 written in the LBA register R3 and the value 24 written in the sector number register R2, the memory controller 3 determines that the LBA of the logical access area designated as the write destination of this series of data is # 4- #. 27, it is determined that this logical access area is included in the logical block of LBN # 0 and does not straddle a plurality of logical blocks. That is, it is determined that a series of data is stored in a single physical block.

LBN#0の論理ブロックは、LZN#0の論理ゾーンに属し、LZN#0の論理ゾーンはPZN#0の物理ゾーンに割り当てられている。メモリコントローラ3は、LBN#0の論理ブロックに対応する物理ブロックが無いため、PZN#0の物理ゾーンから空ブロックを検索し、例えば、空きブロックとしてPBA#24の物理ブロックを検出する。尚、LBN#0の論理ブロックに対応するデータが保存されている物理ブロックが既にあり、この物理ブロックに、この一連のデータを書き込むことができる場合には、空きブロック検索は行なわず、この物理ブロックのデータが書き込まれていない物理ページに、この一連のデータが書き込まれる。   The logical block of LBN # 0 belongs to the logical zone of LZN # 0, and the logical zone of LZN # 0 is assigned to the physical zone of PZN # 0. Since there is no physical block corresponding to the logical block of LBN # 0, the memory controller 3 searches for an empty block from the physical zone of PZN # 0 and detects, for example, a physical block of PBA # 24 as an empty block. If there is already a physical block in which data corresponding to the logical block of LBN # 0 is stored, and this series of data can be written to this physical block, the free block search is not performed and this physical block is not searched. This series of data is written to a physical page to which no block data is written.

次に、この一連のデータが書き込まれる物理ページの共通冗長領域50に書き込まれるSP、SLPN及びPCNTについて説明する。LBAレジスタR3に書き込まれたLBAの下位8ビットの値と、このLBAの下位8ビットにセクタ数レジスタR2に書き込まれた値を足し、1を引いた値とから、この一連のデータがLSN#4−#27の論理セクタ領域に対応することが分かる。ここで、この8ビットのLSNの上位6ビットがLPNに対応するので、LSN#4の論理セクタ領域が属する論理ページのLPNが#1であり、LSN#27の論理セクタ領域が属する論理ページのLPNが#6であることが分かる。従って、この一連のデータに関するSLPNに対応する値として#1が求められ、PCNTに対応する値として6が求められる。この一連のデータの書き込みを開始する物理ページのPPNである#0とPCNTの値6からSPに対応する値として#6が求められる。
メモリコントローラ3は、PBA#24の物理ブロックのPPN#0の物理ページから一連のデータの書き込みを開始し、LBA#4−#27の論理アクセス領域に書き込むことが指示された一連のデータは、PPN#0−#5の物理ページに書き込まれる。この際、PPN#0−#5の物理ページに対応する全ての共通冗長領域50には、SP#6、SLSN#1、SCNT6が書き込まれる。
(2番目の一連のデータの書き込み処理)
Next, SP, SLPN, and PCNT written to the common redundant area 50 of the physical page to which this series of data is written will be described. From the value of the lower 8 bits of the LBA written to the LBA register R3 and the value written to the sector number register R2 added to the lower 8 bits of this LBA and subtracting 1, this series of data is converted to LSN # It can be seen that this corresponds to the 4- # 27 logical sector area. Here, since the upper 6 bits of this 8-bit LSN correspond to LPN, the LPN of the logical page to which the logical sector area of LSN # 4 belongs is # 1, and the logical page of the logical page to which the logical sector area of LSN # 27 belongs. It can be seen that the LPN is # 6. Accordingly, # 1 is obtained as a value corresponding to SLPN regarding this series of data, and 6 is obtained as a value corresponding to PCNT. # 6 is obtained as a value corresponding to SP from # 0 and PCNT value 6 which are PPN of the physical page where writing of a series of data starts.
The memory controller 3 starts writing a series of data from the physical page of PPN # 0 of the physical block of PBA # 24, and the series of data instructed to write to the logical access area of LBA # 4- # 27 is: It is written in the physical pages of PPN # 0- # 5. At this time, SP # 6, SLSN # 1, and SCNT6 are written in all the common redundant areas 50 corresponding to the physical pages of PPN # 0- # 5.
(Second series of data write processing)

まず、ホストシステム4により、コマンドレジスタR1に書き込みコマンドのコマンドコードが、LBAレジスタR3に0が、セクタ数レジスタR2に12が書き込まれる。メモリコントローラ3は、LBAレジスタR3に書き込まれたLBA#0とセクタ数レジスタR2に書き込まれた値12とから、この一連のデータの書き込み先として指示された論理アクセス領域のLBAが#0−#11であり、この論理アクセス領域がLBN#0の論理ブロックに含まれ、複数の論理ブロックに跨っていないと判断する。即ち、一連のデータは単一の物理ブロックに保存されると判断する。   First, the host system 4 writes the command code of the write command in the command register R1, 0 in the LBA register R3, and 12 in the sector number register R2. From the LBA # 0 written to the LBA register R3 and the value 12 written to the sector number register R2, the memory controller 3 determines that the LBA of the logical access area designated as the write destination of this series of data is # 0- #. 11. It is determined that this logical access area is included in the logical block of LBN # 0 and does not straddle a plurality of logical blocks. That is, it is determined that a series of data is stored in a single physical block.

また、メモリコントローラ3は、論理ブロックと物理ブロックの対応関係を記述したアドレス変換テーブルに基づいて、LBN#0の論理ブロックがPBA#24の物理ブロックに対応していることを判別する。続いて、PBA#24の物理ブロック内のデータが書き込まれていない物理ページの先頭を検索する空きページ検索が行われる。空きページ検索の終了後、物理ブロック内のデータが書き込まれていない物理ページの先頭であるPPN#6の物理ページから、この一連のデータの書き込みが開始される。   Further, the memory controller 3 determines that the logical block of LBN # 0 corresponds to the physical block of PBA # 24 based on the address conversion table describing the correspondence between the logical block and the physical block. Subsequently, a free page search is performed to search the top of a physical page in which data in the physical block of PBA # 24 is not written. After completion of the empty page search, writing of this series of data is started from the physical page of PPN # 6 that is the head of the physical page in which data in the physical block is not written.

次に、この一連のデータが書き込まれる物理ページに対応する共通冗長領域50に書き込まれるSP、SLPN及びPCNTについて説明する。LBAレジスタR3に書き込まれたLBAの下位8ビットの値と、このLBAの下位8ビットにセクタ数レジスタR2に書き込まれた値を足し、1を引いた値とから、この一連のデータがLSN#0−#11の論理セクタ領域に対応することが分かる。ここで、この8ビットのLSNの上位6ビットがLPNに対応するので、LSN#0の論理セクタ領域が属する論理ページのLPNが#0であり、LSN#11の論理セクタ領域が属する論理ページのLPNが#2であることが分かる。従って、この一連のデータに関するSLPNに対応する値として#0が求められ、PCNTに対応する値として3が求められる。この一連のデータの書き込みを開始する物理ページのPPNである#6とPCNTの値3からSPに対応する値として#9が求められる。   Next, SP, SLPN, and PCNT written in the common redundant area 50 corresponding to the physical page in which this series of data is written will be described. From the value of the lower 8 bits of the LBA written to the LBA register R3 and the value written to the sector number register R2 added to the lower 8 bits of this LBA and subtracting 1, this series of data is converted to LSN # It can be seen that this corresponds to the logical sector area 0- # 11. Here, since the upper 6 bits of the 8-bit LSN correspond to LPN, the LPN of the logical page to which the logical sector area of LSN # 0 belongs is # 0, and the logical page of the logical page to which the logical sector area of LSN # 11 belongs. It can be seen that LPN is # 2. Accordingly, # 0 is obtained as a value corresponding to SLPN relating to this series of data, and 3 is obtained as a value corresponding to PCNT. # 9 is obtained as a value corresponding to SP from # 6, which is the PPN of the physical page where writing of a series of data starts, and the value 3 of PCNT.

従って、LBA#0−#11の論理アクセス領域に書き込むことが指示された一連のデータは、PPN#6−#8の物理ページに書き込まれる。この際、PPN#6−#8の物理ページに対応する全ての共通冗長領域50には、SP#9、SLSN#0、SCNT3が書き込まれる。
(3番目の一連のデータの書き込み処理)
Therefore, a series of data instructed to be written to the logical access areas of LBA # 0 to # 11 is written to the physical page of PPN # 6- # 8. At this time, SP # 9, SLSN # 0, and SCNT3 are written in all the common redundant areas 50 corresponding to the physical pages of PPN # 6- # 8.
(3rd data write process)

まず、ホストシステム4により、コマンドレジスタR1に書き込みコマンドのコマンドコードが、LBAレジスタR3に14が、セクタ数レジスタR2に14が書き込まれる。メモリコントローラ3は、LBAレジスタR3に書き込まれたLBA#14とセクタ数レジスタR2に書き込まれた値14とから、この一連のデータの書き込み先として指示された論理アクセス領域のLBAが#14−#27であり、この論理アクセス領域がLBN#0の論理ブロックに含まれ、複数の論理ブロックに跨っていないと判断する。即ち、一連のデータは単一の物理ブロックに保存されると判断する。   First, the host system 4 writes the command code of the write command in the command register R1, 14 in the LBA register R3, and 14 in the sector number register R2. From the LBA # 14 written in the LBA register R3 and the value 14 written in the sector number register R2, the memory controller 3 determines that the LBA of the logical access area designated as the write destination of this series of data is # 14- #. 27, it is determined that this logical access area is included in the logical block of LBN # 0 and does not straddle a plurality of logical blocks. That is, it is determined that a series of data is stored in a single physical block.

また、メモリコントローラ3は、論理ブロックと物理ブロックの対応関係を記述したアドレス変換テーブルに基づいて、LBN#0の論理ブロックがPBA#24の物理ブロックに対応していることを判別する。続いて、PBA#24の物理ブロック内のデータが書き込まれていない物理ページの先頭を検索する空きページ検索が行われる。空きページ検索の終了後、物理ブロック内のデータが書き込まれていない物理ページの先頭であるPPN#9の物理ページから、この一連のデータの書き込みが開始される。   Further, the memory controller 3 determines that the logical block of LBN # 0 corresponds to the physical block of PBA # 24 based on the address conversion table describing the correspondence between the logical block and the physical block. Subsequently, a free page search is performed to search the top of a physical page in which data in the physical block of PBA # 24 is not written. After completion of the empty page search, writing of a series of data is started from the physical page of PPN # 9 that is the head of the physical page in which data in the physical block is not written.

次に、この一連のデータが書き込まれる物理ページに対応する共通冗長領域50に書き込まれるSP、SLPN及びPCNTについて説明する。LBAレジスタR3に書き込まれたLBAの下位8ビットの値と、このLBAの下位8ビットにセクタ数レジスタR2に書き込まれた値を足し、1を引いた値とから、この一連のデータがLSN#14−#27の論理セクタ領域に対応することが分かる。ここで、この8ビットのLSNの上位6ビットがLPNに対応するので、LSN#14の論理セクタ領域が属する論理ページのLPNが#3であり、LSN#27の論理セクタ領域が属する論理ページのLPNが#6であることが分かる。従って、この一連のデータに関するSLPNに対応する値として#3が求められ、PCNTに対応する値として4が求められる。この一連のデータの書き込みを開始する物理ページのPPNである#9とPCNTの値4からSPに対応する値として#13が求められる。   Next, SP, SLPN, and PCNT written in the common redundant area 50 corresponding to the physical page in which this series of data is written will be described. From the value of the lower 8 bits of the LBA written to the LBA register R3 and the value written to the sector number register R2 added to the lower 8 bits of this LBA and subtracting 1, this series of data is converted to LSN # It can be seen that this corresponds to the logical sector area 14- # 27. Here, since the upper 6 bits of the 8-bit LSN correspond to the LPN, the LPN of the logical page to which the logical sector area of LSN # 14 belongs is # 3, and the logical page of the logical page to which the logical sector area of LSN # 27 belongs. It can be seen that the LPN is # 6. Accordingly, # 3 is obtained as a value corresponding to SLPN relating to this series of data, and 4 is obtained as a value corresponding to PCNT. # 13 is obtained as a value corresponding to SP from # 9, which is the PPN of the physical page where writing of this series of data starts, and the value 4 of PCNT.

従って、LBA#14−#27の論理アクセス領域に書き込むことが指示された一連のデータは、PPN#9−#12の物理ページに書き込まれる。この際、PPN#9−#12の物理ページに対応する全ての共通冗長領域50には、SP#13、SLSN#3、SCNT4が書き込まれる。   Therefore, a series of data instructed to be written to the logical access areas of LBA # 14 to # 27 is written to the physical pages of PPN # 9 to # 12. At this time, SP # 13, SLSN # 3, and SCNT4 are written in all the common redundant areas 50 corresponding to the physical pages of PPN # 9- # 12.

尚、この一連のデータの先頭データに対応する論理セクタ領域のLSNは#14なので、LSN#14の論理セクタ領域が属するLPN#3の論理ページのLSN#12−#13の論理セクタ領域と対応するデータは、この一連のデータに含まれていない。このような場合は、この一連のデータより前に書き込まれた一連のデータに含まれているLSN#12−#13の論理セクタ領域と対応するデータが、PPN#9の物理ページの第1の物理セクタ領域60aと第2の物理セクタ領域60bに複写される。図8に示した例では、LPN#3の論理ページ対応するデータがPPN#2の物理ページに書き込まれているので、PPN#2の物理ページの第1の物理セクタ領域60aと第2の物理セクタ領域60bに書き込まれているデータが、PPN#9の物理ページの第1の物理セクタ領域60aと第2の物理セクタ領域60bにそれぞれ複写される。
また、このように一連のデータの先頭データ又は末尾データが書き込まれる物理ページに、この一連のデータより前に書き込まれた一連のデータに含まれているデータを複写する場合、複写するデータが書き込まれている物理ページのPPNは、後述するページ情報テーブルを参照することにより求められる。
(4番目の一連のデータの書き込み処理)
Since the LSN of the logical sector area corresponding to the head data of this series of data is # 14, it corresponds to the logical sector area of LSN # 12- # 13 of the logical page of LPN # 3 to which the logical sector area of LSN # 14 belongs. The data to be included is not included in this series of data. In such a case, the data corresponding to the logical sector area of LSN # 12- # 13 included in the series of data written before this series of data is the first of the physical page of PPN # 9. The data is copied to the physical sector area 60a and the second physical sector area 60b. In the example shown in FIG. 8, since the data corresponding to the logical page of LPN # 3 is written in the physical page of PPN # 2, the first physical sector area 60a and the second physical sector of the physical page of PPN # 2 are written. The data written in the sector area 60b is respectively copied to the first physical sector area 60a and the second physical sector area 60b of the physical page of PPN # 9.
In addition, when data included in a series of data written before this series of data is copied to a physical page in which the beginning data or end data of the series of data is written, the data to be copied is written. The PPN of the physical page being obtained is obtained by referring to a page information table described later.
(4th data write process)

まず、ホストシステム4により、コマンドレジスタR1に書き込みコマンドのコマンドコードが、LBAレジスタR3に0が、セクタ数レジスタR2に14が書き込まれる。メモリコントローラ3は、LBAレジスタR3に書き込まれたLBA#0とセクタ数レジスタR2に書き込まれた値14とから、この一連のデータの書き込み先として指示された論理アクセス領域のLBAが#0−#13であり、この論理アクセス領域がLBN#0の論理ブロックに含まれ、複数の論理ブロックに跨っていないと判断する。即ち、一連のデータは単一の物理ブロックに保存されると判断する。   First, the host system 4 writes the command code of the write command in the command register R1, 0 in the LBA register R3, and 14 in the sector number register R2. From the LBA # 0 written to the LBA register R3 and the value 14 written to the sector number register R2, the memory controller 3 determines that the LBA of the logical access area designated as the write destination of this series of data is # 0- #. 13. It is determined that this logical access area is included in the logical block of LBN # 0 and does not straddle a plurality of logical blocks. That is, it is determined that a series of data is stored in a single physical block.

また、メモリコントローラ3は、論理ブロックと物理ブロックの対応関係を記述したアドレス変換テーブルに基づいて、LBN#0の論理ブロックがPBA#24の物理ブロックに対応していることを判別する。続いて、PBA#24の物理ブロック内のデータが書き込まれていない物理ページの先頭を検索する空きページ検索が行われる。空きページ検索の終了後、物理ブロック内のデータが書き込まれていない物理ページの先頭であるPPN#13の物理ページから、この一連のデータの書き込みが開始される。   Further, the memory controller 3 determines that the logical block of LBN # 0 corresponds to the physical block of PBA # 24 based on the address conversion table describing the correspondence between the logical block and the physical block. Subsequently, a free page search is performed to search the top of a physical page in which data in the physical block of PBA # 24 is not written. After the empty page search is finished, the writing of this series of data is started from the physical page of PPN # 13 which is the head of the physical page in which data in the physical block is not written.

次に、この一連のデータが書き込まれる物理ページに対応する共通冗長領域50に書き込まれるSP、SLPN及びSCNTについて説明する。LBAレジスタR3に書き込まれたLBAの下位8ビットの値と、このLBAの下位8ビットにセクタ数レジスタR2に書き込まれた値を足し、1を引いた値とから、この一連のデータがLSN#0−#13の論理セクタ領域に対応することが分かる。ここで、この8ビットのLSNの上位6ビットがLPNに対応するので、LSN#0の論理セクタ領域が属する論理ページのLPNが#0であり、LSN#13の論理セクタ領域が属する論理ページのLPNが#3であることが分かる。従って、この一連のデータに関するSLPNに対応する値として#0が求められ、PCNTに対応する値として4が求められる。この一連のデータの書き込みを開始する物理ページのPPNである#13とPCNTの値4からSPに対応する値として#17が求められる。   Next, SP, SLPN, and SCNT written in the common redundant area 50 corresponding to the physical page in which this series of data is written will be described. From the value of the lower 8 bits of the LBA written to the LBA register R3 and the value written to the sector number register R2 added to the lower 8 bits of this LBA and subtracting 1, this series of data is converted to LSN # It can be seen that this corresponds to the logical sector area 0- # 13. Here, since the upper 6 bits of the 8-bit LSN correspond to LPN, the LPN of the logical page to which the logical sector area of LSN # 0 belongs is # 0, and the logical page of the logical page to which the logical sector area of LSN # 13 belongs. It can be seen that LPN is # 3. Accordingly, # 0 is obtained as a value corresponding to SLPN regarding this series of data, and 4 is obtained as a value corresponding to PCNT. # 17 is obtained as a value corresponding to SP from # 13 which is the PPN of the physical page where writing of a series of data starts and the value 4 of PCNT.

従って、LBA#0−#13の論理アクセス領域に書き込むことが指示された一連のデータは、PPN#13−#16の物理ページに書き込まれる。この際、PPN#13−#16の物理ページに対応する全ての共通冗長領域50には、SP#17、SLSN#0、SCNT4が書き込まれる。   Therefore, a series of data instructed to be written to the logical access areas of LBA # 0 to # 13 is written to the physical pages of PPN # 13 to # 16. At this time, SP # 17, SLSN # 0, and SCNT4 are written in all the common redundant areas 50 corresponding to the physical pages of PPN # 13- # 16.

尚、この一連のデータの末尾データに対応する論理セクタ領域のLSNは#13なので、LSN#13の論理セクタ領域が属するLPN#3の論理ページのLSN#14−#15の論理セクタ領域と対応するデータは、この一連のデータに含まれていない。このような場合は、この一連のデータより前に書き込まれた一連のデータに含まれているLSN#14−#15の論理セクタ領域と対応するデータが、PPN#16の物理ページの第3の物理セクタ領域60cと第4の物理セクタ領域60dに複写される。図8に示した例では、LPN#3の論理ページに対応する新しい方のデータがPPN#9の物理ページに書き込まれているので、PPN#9の物理ページの第3の物理セクタ領域60cと第4の物理セクタ領域60dに書き込まれているデータが、PPN#16の物理ページの第3の物理セクタ領域60cと第4の物理セクタ領域60dにそれぞれ複写される。   Since the LSN of the logical sector area corresponding to the end data of this series of data is # 13, it corresponds to the logical sector area of LSN # 14- # 15 of the logical page of LPN # 3 to which the logical sector area of LSN # 13 belongs. The data to be included is not included in this series of data. In such a case, the data corresponding to the logical sector area of LSN # 14- # 15 included in the series of data written before this series of data is the third page of the physical page of PPN # 16. The data is copied to the physical sector area 60c and the fourth physical sector area 60d. In the example shown in FIG. 8, since the newer data corresponding to the logical page of LPN # 3 is written in the physical page of PPN # 9, the third physical sector area 60c of the physical page of PPN # 9 and The data written in the fourth physical sector area 60d is copied to the third physical sector area 60c and the fourth physical sector area 60d of the physical page of PPN # 16, respectively.

また、LPN#3の論理ページ対応するデータは、PPN#2の物理ページとPPN#9の物理ページに書き込まれているが、後述するページ情報テーブルを参照して、LPN#3の論理ページに対応するデータが書き込まれる物理ページのPPNを求めれば、LPN#3の論理ページに対応する新しい方のデータが書き込まれている物理ページのPPNが求められる。   The data corresponding to the logical page of LPN # 3 is written in the physical page of PPN # 2 and the physical page of PPN # 9. If the PPN of the physical page in which the corresponding data is written is obtained, the PPN of the physical page in which the newer data corresponding to the logical page of LPN # 3 is written is obtained.

次に、物理ブロック内のデータが書き込まれていない物理ページの先頭を検索する空きページ検索について説明する。この空きページ検索は、共通冗長領域50に書き込まれているSP又はPCNTに基づいて行うことができる。また、第2の実施の形態では、書き込みの際にも後述するページ情報テーブルを作成しなければならない場合(例えば、既に書き込まれているデータを複写する場合)があるため、この空きページ検索と後述するページ情報テーブルの作成処理を並行して行うことが好ましい。   Next, a free page search for searching for the top of a physical page in which data in a physical block is not written will be described. This empty page search can be performed based on SP or PCNT written in the common redundant area 50. In the second embodiment, a page information table (to be described later) must be created even when writing (for example, when already written data is copied). It is preferable to perform page information table creation processing described later in parallel.

例えば、物理ブロック内の先頭の物理ページ(PPN#0の物理ページ)の共通冗長領域50に書き込まれているSPに基づいて、2番目の一連のデータの書き込みが開始される物理ページ(最初の一連のデータの末尾データが書き込まれているページの次の物理ページ)が分かる。2番目の一連のデータが書き込まれていない場合は、この2番目の一連のデータの書き込みが開始される物理ページの共通冗長領域50にSPが書き込まれていないが、2番目の一連のデータが書き込まれている場合は、この2番目の一連のデータの書き込みが開始される物理ページの共通冗長領域50にSPが書き込まれている。   For example, based on the SP written in the common redundant area 50 of the first physical page (physical page of PPN # 0) in the physical block, the physical page (first The physical page next to the page in which the end data of the series of data is written can be found. When the second series of data is not written, SP is not written in the common redundant area 50 of the physical page where writing of the second series of data is started, but the second series of data is If written, SP is written in the common redundant area 50 of the physical page where writing of the second series of data is started.

更に、この2番目の一連のデータの書き込みが開始される物理ページの共通冗長領域50に書き込まれているSPに基づいて、3番目の一連のデータの書き込みが開始される物理ページが分かる。このようにして、次の一連のデータの書き込み開始される物理ページの共通冗長領域50に書き込まれているSPを順次読み出していき、SPが書き込まれていないときは、その物理ページがデータが書き込まれていない物理ページの先頭であると判断する。
<ページ情報テーブルの作成処理>
Further, based on the SP written in the common redundant area 50 of the physical page where writing of the second series of data is started, the physical page where writing of the third series of data is started is known. In this way, the SPs written in the common redundant area 50 of the physical page where the next series of data starts to be written are sequentially read. When the SP is not written, the physical page is written with data. It is determined that it is the top of a physical page that has not been printed.
<Page information table creation process>

各物理ブロックにアクセスするときには、物理ブロックに含まれる物理ページとこの物理ブロックと対応する論理ブロックに含まれる論理ページとの対応関係を示すページ情報テーブルが作成される。例えば、コマンドレジスタR1に読み出しコマンドのコマンドコードが書き込まれたとき、メモリコントローラ3は、LBAレジスタR3及びセクタ数レジスタR2に書き込まれた情報に基づいて論理アクセス領域を判別する。つまり、アクセス対象の論理ブロック及び論理ページを判別する。更に、メモリコントローラ3は、アクセス対象の論理ブロックに対応する物理ブロックをアドレス変換テーブルに基づいて判別し、更に、アクセス対象の論理ページに対応する物理ページをページ情報テーブルに基づいて判別する。   When accessing each physical block, a page information table indicating the correspondence between the physical page included in the physical block and the logical page included in the logical block corresponding to the physical block is created. For example, when the command code of the read command is written in the command register R1, the memory controller 3 determines the logical access area based on the information written in the LBA register R3 and the sector number register R2. That is, the logical block and logical page to be accessed are determined. Further, the memory controller 3 determines a physical block corresponding to the logical block to be accessed based on the address conversion table, and further determines a physical page corresponding to the logical page to be accessed based on the page information table.

次に、このページ情報テーブルの作成処理について説明する。ページ情報テーブルの作成処理では、メモリコントローラ3は、一連のデータの先頭データが記憶されている物理ページの共通冗長領域50からSLPN及びPCNTを読み出し、一連のデータ単位で論理ページと物理ページとの対応関係を判別し、判別された論理ページと物理ページとの対応関係をページ情報テーブル上に書き込んでいく。   Next, the page information table creation process will be described. In the process of creating the page information table, the memory controller 3 reads SLPN and PCNT from the common redundant area 50 of the physical page in which the first data of a series of data is stored, and sets the logical page and physical page in a series of data units. The correspondence relationship is determined, and the correspondence relationship between the determined logical page and physical page is written on the page information table.

このページ情報テーブルの作成処理では、SLPN及びPCNTと共にSPも読み出され、読み出されたSPに基づいて、次の一連のデータの先頭データが保存されている物理ページが判別される。尚、SPを用いずにPCNTの値に基づいて、次の一連のデータの先頭データが記憶されている物理ページを判別するようにしてもよい。   In this page information table creation process, the SP is read together with SLPN and PCNT, and the physical page in which the first data of the next series of data is stored is determined based on the read SP. Note that the physical page in which the first data of the next series of data is stored may be determined based on the value of PCNT without using SP.

また、一連のデータが末尾データまで正常に書き込まれているかどうかを確認するため、一連のデータの先頭データが記憶されている物理ページの共通冗長領域50に記憶されているSP、SLPN及びPCNTと、末尾データが記憶されている物理ページの共通冗長領域50に記憶されているSP、SLPN及びPCNTとが一致するかどうかが確認される。一連のデータが末尾データまで正常に書き込まれていない場合、例えば、末尾データを書き込む前に電源遮断が起こった場合、末尾データが書き込まれているべき物理ページの共通冗長領域50には、SP、SLPN及びPCNTが書き込まれていないので、双方の共通冗長領域50から読み出されたSP、SLPN及びPCNTは一致しない。このような場合、その一連のデータは正常に書き込まれていないと判断される。従って、一連のデータの先頭データが記憶されている物理ページの共通冗長領域50に記憶されているSP、SLPN及びPCNTと、末尾データが記憶されている物理ページの共通冗長領域50に記憶されているSP、SLPN及びPCNTとが一致しなかった場合、その一連のデータに対応する論理ページと物理ページとの対応関係をページ情報テーブルに反映させずに、ページ情報テーブルの作成処理を終了する。   Further, in order to confirm whether a series of data is normally written up to the end data, SP, SLPN, and PCNT stored in the common redundant area 50 of the physical page in which the top data of the series is stored Whether the SP, SLPN, and PCNT stored in the common redundant area 50 of the physical page in which the end data is stored matches is confirmed. When a series of data has not been normally written up to the end data, for example, when the power is cut off before the end data is written, the common redundant area 50 of the physical page in which the end data is to be written has SP, Since SLPN and PCNT are not written, SP, SLPN and PCNT read from both common redundant areas 50 do not match. In such a case, it is determined that the series of data is not normally written. Therefore, SP, SLPN, and PCNT stored in the common redundant area 50 of the physical page in which the first data of a series of data is stored, and the common redundant area 50 of the physical page in which the end data is stored are stored. If the SP, SLPN, and PCNT that are present do not match, the page information table creation process ends without reflecting the correspondence between the logical page and the physical page corresponding to the series of data in the page information table.

次に、図8のように、PBA#24の物理ブロックに4つの一連のデータが保存されている場合に関して、ページ情報テーブルを作成する例を図9を参照して説明する。尚、このページ情報テーブルを作成するときは、ワークエリア8にLPN#0−#63に対応するPPNを書き込む領域(以下、ページ情報テーブル作成領域と言う。)が確保される。   Next, with reference to FIG. 9, an example of creating a page information table will be described with respect to the case where four series of data is stored in the physical block of PBA # 24 as shown in FIG. When this page information table is created, an area for writing PPN corresponding to LPN # 0 to # 63 (hereinafter referred to as a page information table creation area) is secured in the work area 8.

まず、PBA#24の物理ブロックのPPN#0の物理ページの共通冗長領域50からSP、SLPN及びPCNTが読み出される。PPN#0の物理ページの共通冗長領域50から読み出されたSPから、最初の一連のデータの末尾データの保存先が判断される。続いて、最初の一連のデータが末尾データまで正常に保存されているかどうかを確認するため、末尾データの保存先であるPPN#5の物理ページの共通冗長領域50からSP、SLPN及びPCNTが読み出される。   First, SP, SLPN, and PCNT are read from the common redundant area 50 of the physical page of PPN # 0 of the physical block of PBA # 24. From the SP read from the common redundant area 50 of the physical page of PPN # 0, the storage destination of the tail data of the first series of data is determined. Subsequently, SP, SLPN, and PCNT are read from the common redundant area 50 of the physical page of PPN # 5, which is the storage destination of the tail data, in order to check whether the first series of data is normally stored up to the tail data. It is.

PPN#0の物理ページの共通冗長領域50から読み出されたSP、SLPN及びPCNTの値と、PPN#5の物理ページの共通冗長領域50から読み出されたSP、SLPN及びPCNTの値が等しいかどうかが判断される。両者の値が等しいとき、最初の一連のデータの書き込みが正常に終了していると判断され、最初の一連のデータに関する情報がページ情報テーブルに反映される。
この反映処理では、SLPN及びPCNTの値(SLPN#1、PCNT6)からLPN#1−#6の論理ページが、PPN#0−#5の物理ページに対応していると判断され、図9の(A)に示すように、ページ情報テーブル作成領域のLPN#1−#6に対応する領域にPPNの値である#0−#5が書き込まれる。つまり、LPN#1に対応する領域にPPNの値として#0が書き込まれ、LPN#2に対応する領域にPPNの値として#1が書き込まれ、LPN#3に対応する領域にPPNの値として#2が書き込まれ、以下同様にPPNが書き込まれていき、LPN#6に対応する領域にPPNの値として#5が書き込まれる。尚、2番目の一連のデータの先頭データの保存先については、SPの値からPPN#6の物理ページであると判断される。
The values of SP, SLPN, and PCNT read from the common redundant area 50 of the physical page of PPN # 0 are equal to the values of SP, SLPN, and PCNT read from the common redundant area 50 of the physical page of PPN # 5. It is judged whether or not. When the two values are equal, it is determined that the writing of the first series of data has been completed normally, and information relating to the first series of data is reflected in the page information table.
In this reflection process, it is determined from the SLPN and PCNT values (SLPN # 1, PCNT6) that the logical pages of LPN # 1- # 6 correspond to the physical pages of PPN # 0- # 5. As shown in (A), PPN values # 0- # 5 are written in the area corresponding to LPN # 1- # 6 in the page information table creation area. That is, # 0 is written as the PPN value in the area corresponding to LPN # 1, # 1 is written as the PPN value in the area corresponding to LPN # 2, and the PPN value is written in the area corresponding to LPN # 3. # 2 is written, PPN is written in the same manner, and # 5 is written as the value of PPN in the area corresponding to LPN # 6. Note that the storage destination of the top data of the second series of data is determined to be a physical page of PPN # 6 from the SP value.

次に、2番目の一連のデータの先頭データの保存先であるPPN#6の物理ページの共通冗長領域50から、SP、SLPN及びPCNTが読み出される。また、読み出されたSPの値が#9であるため、2番目の一連のデータの末尾データの保存先は、PPN#8の物理ページであると判断され、PPN#8の物理ページの共通冗長領域50に書き込まれているSP、SLPN及びPCNTの値が読み出される。PPN#6の物理ページの共通冗長領域50から読み出されたSP、SLPN及びPCNTと、PPN#8の物理ページの共通冗長領域50から読み出されたSP、SLPN及びPCNTの値が等しいとき、2番目の一連のデータの書き込みが正常に終了していると判断され、2番目の一連のデータに関する情報がページ情報テーブルに反映される。   Next, SP, SLPN, and PCNT are read from the common redundant area 50 of the physical page of PPN # 6, which is the storage destination of the top data of the second series of data. Since the read SP value is # 9, the storage destination of the tail data of the second series of data is determined to be the physical page of PPN # 8, and is common to the physical pages of PPN # 8. The values of SP, SLPN, and PCNT written in the redundant area 50 are read out. When SP, SLPN, and PCNT read from the common redundant area 50 of the physical page of PPN # 6 are equal to the values of SP, SLPN, and PCNT read from the common redundant area 50 of the physical page of PPN # 8, It is determined that the writing of the second series of data has been normally completed, and information regarding the second series of data is reflected in the page information table.

この反映処理では、SLPN及びPCNTの値(SLPN#0、SCNT3)からLPN#0−#2の論理ページが、PPN#6−#8の物理ページに対応していると判断され、図9の(B)に示すように、セクタ情報テーブル作成領域のLPN#0−#2に対応する領域にPPNの値である#6−#8が書き込まれる。つまり、LPN#0に対応する領域にPPNの値として#6が書き込まれ、LPN#1に対応する領域にPPNの値として#7が書き込まれ、LPN#2に対応する領域にPPNの値として#8が書き込まれる。尚、3番目の一連のデータの先頭データの保存先については、SPの値からPPN#9の物理ページであると判断される。   In this reflection process, it is determined from the SLPN and PCNT values (SLPN # 0, SCNT3) that the logical pages of LPN # 0- # 2 correspond to the physical pages of PPN # 6- # 8. As shown in (B), # 6- # 8, which is the value of PPN, is written in the area corresponding to LPN # 0- # 2 in the sector information table creation area. That is, # 6 is written as the PPN value in the area corresponding to LPN # 0, # 7 is written as the PPN value in the area corresponding to LPN # 1, and the PPN value is written in the area corresponding to LPN # 2. # 8 is written. Note that the storage destination of the top data of the third series of data is determined to be a physical page of PPN # 9 from the SP value.

次に、3番目の一連のデータの先頭データの保存先であるPPN#9の物理ページの共通冗長領域50から、SP、SLPN及びPCNTが読み出される。また、読み出されたSPの値が#13であるため、3番目の一連のデータの末尾データの保存先は、PPN#12の物理ページであると判断され、PPN#12の物理ページの共通冗長領域50に書き込まれているSP、SLPN及びPCNTの値が読み出される。PPN#9の物理ページの共通冗長領域50から読み出されたSP、SLSN及びSCNTと、PPN#12の物理ページの共通冗長領域50から読み出されたSP、SLPN及びPCNTの値が等しいとき、3番目の一連のデータの書き込みが正常に終了していると判断され、3番目の一連のデータに関する情報がページ情報テーブルに反映される。   Next, SP, SLPN, and PCNT are read from the common redundant area 50 of the physical page of PPN # 9 that is the storage destination of the top data of the third series of data. Since the read SP value is # 13, the storage destination of the tail data of the third series of data is determined to be the physical page of PPN # 12, and is common to the physical pages of PPN # 12. The values of SP, SLPN, and PCNT written in the redundant area 50 are read out. When SP, SLSN, and SCNT read from the common redundant area 50 of the physical page of PPN # 9 are equal to the values of SP, SLPN, and PCNT read from the common redundant area 50 of the physical page of PPN # 12, It is determined that the writing of the third series of data has been normally completed, and information regarding the third series of data is reflected in the page information table.

この反映処理では、SLPN及びPCNTの値(SLPN#3、PCNT4)からLPN#3−#6の論理ページが、PPN#9−#12の物理ページに対応していると判断され、図9の(C)に示すように、ページ情報テーブル作成領域のLPN#3−#6に対応する領域にPPNの値である#9−#12が書き込まれる。この際、ページ情報テーブル作成領域のLPN#3−#6に対応する領域に書き込まれていた#2−#5が、#9−#12に書き替えられる。このように、ページ情報テーブルの作成処理では、後から書き込まれた一連のデータに関する情報が優先される。尚、4番目の一連のデータの先頭データの保存先については、SPの値からPSN#13の物理ページであると判断される。   In this reflection processing, it is determined from the values of SLPN and PCNT (SLPN # 3, PCNT4) that the logical pages of LPN # 3- # 6 correspond to the physical pages of PPN # 9- # 12, and FIG. As shown in (C), # 9- # 12 which is the value of PPN is written in the area corresponding to LPN # 3- # 6 in the page information table creation area. At this time, # 2- # 5 written in the area corresponding to LPN # 3- # 6 in the page information table creation area is rewritten to # 9- # 12. In this way, in the page information table creation process, information regarding a series of data written later is prioritized. Note that the storage destination of the head data of the fourth series of data is determined to be a physical page of PSN # 13 from the SP value.

次に、4番目の一連のデータの先頭データの保存先であるPPN#13の物理ページの共通冗長領域50から、SP、SLPN及びPCNTが読み出される。また、読み出されたSPの値が#17であるため、4番目の一連のデータの末尾データの保存先は、PPN#16の物理ページであると判断され、PSN#16の物理ページの共通冗長領域50に書き込まれているSP、SLPN及びPCNTの値が読み出される。PPN#13の物理ページの共通冗長領域50から読み出されたSP、SLPN及びPCNTと、PSN#16の物理ページの共通冗長領域50から読み出されたSP、SLPN及びPCNTの値が等しいとき、4番目の一連のデータの書き込みが正常に終了していると判断され、4番目の一連のデータに関する情報がページ情報テーブルに反映される。   Next, SP, SLPN, and PCNT are read from the common redundant area 50 of the physical page of PPN # 13 that is the storage destination of the top data of the fourth series of data. Since the read SP value is # 17, the storage destination of the tail data of the fourth series of data is determined to be the physical page of PPN # 16, and is common to the physical pages of PSN # 16. The values of SP, SLPN, and PCNT written in the redundant area 50 are read out. When SP, SLPN, and PCNT read from the common redundant area 50 of the physical page of PPN # 13 are equal to the values of SP, SLPN, and PCNT read from the common redundant area 50 of the physical page of PSN # 16, It is determined that the writing of the fourth series of data has been normally completed, and information regarding the fourth series of data is reflected in the page information table.

この反映処理では、SLPN及びPCNTの値(SLSN#0、SCNT4)からLPN#0−#3の論理ページが、PSN#13−#16の物理ページに対応していると判断され、図9の(D)に示すように、ページ情報テーブル作成領域のLPN#0−#3に対応する領域にPPNの値である#13−#16が書き込まれる。この際、セクタ情報テーブル作成領域のLSN#0−#3に対応する領域に書き込まれていた#6−#9が、#13−#16に書き替えられる。尚、5番目の一連のデータの先頭データの保存先については、SPの値からPPN#17の物理ページであると判断される。   In this reflection process, it is determined from the SLPN and PCNT values (SLSN # 0, SCNT4) that the logical pages of LPN # 0- # 3 correspond to the physical pages of PSN # 13- # 16. As shown in (D), # 13- # 16, which is the value of PPN, is written in the area corresponding to LPN # 0- # 3 in the page information table creation area. At this time, # 6- # 9 written in the area corresponding to LSN # 0- # 3 in the sector information table creation area is rewritten to # 13- # 16. Note that the storage destination of the top data of the fifth series of data is determined to be the physical page of PPN # 17 from the SP value.

次に、5番目の一連のデータの先頭データの保存先であるPSN#17の物理ページの共通冗長領域50からのSP、SLPN及びPCNTの読み出しが行われるが、SP、SLPN及びPCNTが書き込まれていないためページ情報テーブルの作成処理を終了する。
<異常終了に関する処理>
Next, the SP, SLPN, and PCNT are read from the common redundant area 50 of the physical page of PSN # 17 that is the storage destination of the first data of the fifth series of data, but the SP, SLPN, and PCNT are written. The page information table creation process is terminated because there is not.
<Processing related to abnormal termination>

図10は、図8に示した4つの一連のデータの書き込みにおいて、4番目の一連のデータの書き込みが正常に終了しなかった場合を示している。4番目の一連のデータの書き込みは、PPN#13−#14の物理ページにデータが書き込まれた状態で終了し、PPN#15−#16の物理ページには、データが保存されていない。以下では、このような異常終了が発生した物理ブロックにおけるページ情報テーブルの作成処理を説明する。   FIG. 10 shows a case where the writing of the fourth series of data does not end normally in the writing of the four series of data shown in FIG. The writing of the fourth series of data ends in a state where the data is written in the physical pages of PPN # 13- # 14, and no data is stored in the physical pages of PPN # 15- # 16. In the following, a process for creating a page information table in a physical block in which such abnormal termination has occurred will be described.

最初の一連のデータ、2番目の一連のデータ及び3番目の一連のデータの書き込みは正常に終了しているので、これらの一連のデータに関する情報はセクタ情報テーブルに反映される。しかし、4番目の一連のデータに関する反映処理では、PPN#13の物理ページの共通冗長領域50から読み出されたSP、SLPN及びPCNTと、PSN#16の物理ページの共通冗長領域50から読み出されたSP、SLPN及びPCNTの値が等しくないため、4番目の一連のデータの書き込みが正常に終了していないと判断され、4番目の一連のデータに関する情報はセクタ情報テーブルに反映されない。従って、最初の一連のデータ、2番目の一連のデータ及び3番目の一連のデータに関する情報が反映されたページ情報テーブル(図9の(C)に示したページ情報テーブル)が、この物理ブロックにおけるページ情報テーブルとして使用される。   Since the writing of the first series of data, the second series of data, and the third series of data has been normally completed, information regarding these series of data is reflected in the sector information table. However, in the reflection process for the fourth series of data, the SP, SLPN, and PCNT read from the common redundant area 50 of the physical page of PPN # 13, and the common redundant area 50 of the physical page of PSN # 16 are read. Since the values of SP, SLPN, and PCNT are not equal, it is determined that the writing of the fourth series of data has not been completed normally, and information regarding the fourth series of data is not reflected in the sector information table. Therefore, a page information table (page information table shown in FIG. 9C) reflecting information on the first series of data, the second series of data, and the third series of data is stored in this physical block. Used as a page information table.

このような一部の一連のデータが正常に書き込まれていない物理ブロックが見つかったときには、その物理ブロックに保存されている有効なデータが、別の物理ブロックに転送される。つまり、正常に書き込まれている一連のデータのうち、後の一連のデータで書き替えられていないデータが、別の物理ブロックに転送される。   When a physical block in which such a partial series of data is not normally written is found, valid data stored in the physical block is transferred to another physical block. In other words, data that has not been rewritten by a subsequent series of data among a series of data that has been normally written is transferred to another physical block.

次に、この転送処理について説明する。この転送処理は、正常に書き込まれている一連のデータに関する情報が反映されたページ情報テーブルに基づいて行われる。つまり、ページ情報テーブル作成領域に書き込まれているPPNに対応する物理ページに保存されているデータが、別の物理ブロックに転送される。図10に示したように、4番目の一連のデータの書き込みが正常に終了しなかった場合、図9の(C)に示した最初の一連のデータ、2番目の一連のデータ及び3番目の一連のデータに関する情報が反映されたページ情報テーブルに基づいて転送処理が行われる。   Next, this transfer process will be described. This transfer process is performed based on a page information table in which information about a series of data written normally is reflected. That is, data stored in the physical page corresponding to the PPN written in the page information table creation area is transferred to another physical block. As shown in FIG. 10, when the writing of the fourth series of data is not normally completed, the first series of data, the second series of data, and the third series shown in FIG. Transfer processing is performed based on a page information table reflecting information related to a series of data.

図9の(C)に示したページ情報テーブルに基づいた転送処理について説明する。尚、この転送処理では、転送先の物理ブロック(空きブロック)の検索がされる。ここでは、PZN#1の物理ゾーン内の空きブロックが検索され、空ブロックとしてPBA#10の物理ブロックが検出されたとする。このPBA#10の物理ブロックに、PBA#24の物理ブロックに保存されているデータを転送するときには、図9の(C)のページ情報テーブルに基づいて、LPNの値の小さい方から順番にデータの転送が行われる。つまり、ページ情報テーブル作成領域に書き込まれているPPNに対応する物理ページに保存されているデータは、そのPPNに対応するLPNの値が小さい方から順番に転送される。   A transfer process based on the page information table shown in FIG. 9C will be described. In this transfer process, a search is made for a transfer destination physical block (empty block). Here, it is assumed that an empty block in the physical zone of PZN # 1 is searched and a physical block of PBA # 10 is detected as an empty block. When data stored in the physical block of PBA # 24 is transferred to the physical block of PBA # 10, the data is ordered in ascending order of the LPN value based on the page information table in (C) of FIG. Is transferred. That is, data stored in the physical page corresponding to the PPN written in the page information table creation area is transferred in order from the one having the smallest LPN value corresponding to the PPN.

図9の(C)のページ情報テーブルの場合、LPN#0−#6に対応するPPNだけがページ情報テーブル作成領域に書き込まれている。従って、PBA#24の物理ブロックに保存されているデータのうち、ページ情報テーブル作成領域のLSN#0−#6に対応する領域に書き込まれているPPNに対応する物理ページに記憶されているデータだけが、PBA#10の物理ブロックに転送される。   In the case of the page information table of FIG. 9C, only the PPN corresponding to LPN # 0- # 6 is written in the page information table creation area. Therefore, among the data stored in the physical block of PBA # 24, the data stored in the physical page corresponding to the PPN written in the area corresponding to LSN # 0 to # 6 in the page information table creation area Only the physical block of PBA # 10 is transferred.

次に、図9の(C)に示すページ情報テーブルを参照した転送処理を、図11を参照して説明する。図11に示した例で、D#nは、LPN#nと対応するデータを示している。まず、図9の(C)のページ情報テーブルでは、LPN#0にPPN#6が対応しているので、PBA#24の物理ブロックのPPN#6の物理ページに記憶されているデータが、PBA#10の物理ブロックのPPN#0の物理ページに転送される。次に、LPN#1にPPN#7が対応しているので、PBA#24の物理ブロックのPPN#7の物理ページに記憶されているデータが、PBA#10のPPN#1の物理ページに転送される。同様の処理がLPNの順番で行われていき、PBA#24の物理ブロックのPPN#12の物理ページに記憶されているデータが、PBA#10の物理ブロックのPPN#6の物理ページに転送されて、この転送処理が終了する。   Next, transfer processing with reference to the page information table shown in FIG. 9C will be described with reference to FIG. In the example illustrated in FIG. 11, D # n indicates data corresponding to LPN # n. First, in the page information table of FIG. 9C, since PPN # 6 corresponds to LPN # 0, the data stored in the physical page of PPN # 6 in the physical block of PBA # 24 is PBA # 24. It is transferred to the physical page of PPN # 0 of the physical block of # 10. Next, since PPN # 7 corresponds to LPN # 1, the data stored in the physical page of PPN # 7 of the physical block of PBA # 24 is transferred to the physical page of PPN # 1 of PBA # 10 Is done. The same processing is performed in the order of LPN, and the data stored in the physical page of PPN # 12 of the physical block of PBA # 24 is transferred to the physical page of PPN # 6 of the physical block of PBA # 10. Thus, this transfer process ends.

次に、この転送処理の際に、共通冗長領域50に書き込まれるSP、SLPN及びPCNTについて説明する。この転送処理では、PBA#24の物理ブロックからPBA#10の物理ブロックに転送される全てのデータのLPNが連続しているため、全てのデータが「一連のデータ」としてPBA#10の物理ブロックに書き込まれたと見なしたSP、SLPN及びPCNTが設定される。つまり、この転送処理が終了したときに、PBA#10の物理ブロックブロック内のデータが書き込まれていない物理ページの先頭に対応するPPNである#7が、SPの値になる。この一連のデータの先頭データに対応するLPNである#0が、SLPNの値になる。この一連のデータに含まれるデータのページ数である7が、PCNTの値になる。   Next, SP, SLPN, and PCNT written in the common redundant area 50 during this transfer process will be described. In this transfer processing, since the LPNs of all data transferred from the physical block of PBA # 24 to the physical block of PBA # 10 are continuous, all the data is regarded as “a series of data” and the physical block of PBA # 10. SP, SLPN, and PCNT that are considered to have been written to are set. That is, when this transfer process is completed, # 7, which is the PPN corresponding to the top of the physical page in which data in the physical block block of PBA # 10 is not written, becomes the SP value. # 0, which is the LPN corresponding to the head data of this series of data, becomes the SLPN value. The value of PCNT is 7 which is the number of pages of data included in this series of data.

このように、異常終了した物理ブロックのデータを転送する際には、LPNが連続する論理ページに対応するデータを一連のデータと見なして、転送処理が行われる。従って、SP、SLPN及びPCNTは、LPNが連続する論理セクタ領域に対応するデータを一連のデータと見なして設定される。つまり、LPNが連続する論理ページの先頭の論理ページのLPNがSLPNになり、LPNが連続する論理ページの数がPCNTになる。SPの値は、LPNが連続する論理ページの先頭の論理ページに対応するデータを書き込む物理ページのPPNの値にPCNTの値を足した値になる。   In this way, when transferring data of a physical block that has ended abnormally, transfer processing is performed by regarding data corresponding to logical pages with continuous LPNs as a series of data. Therefore, SP, SLPN, and PCNT are set by regarding data corresponding to logical sector areas in which LPNs are continuous as a series of data. That is, the LPN of the first logical page of the logical pages with continuous LPN becomes SLPN, and the number of logical pages with continuous LPN becomes PCNT. The value of SP is a value obtained by adding the value of PCNT to the value of PPN of the physical page to which data corresponding to the first logical page of the logical pages with continuous LPNs is written.

上記第2の実施の形態のフラッシュメモリシステム1によれば、一連のデータの保存先の物理ページに対応する共通冗長領域50に、この一連のデータに関するSP、SLPN及びPCNTを書き込んでいる。また、この一連のデータに関する論理ページと物理ページとの対応関係は、この一連のデータに関するSLPN及びPCNTに基づいて把握することができる。従って、一連のデータの先頭データが保存されている物理ページの共通冗長領域50に書き込まれているSLPN及びPCNTを読み出し、読み出したSLPN及びPCNTに基づいて把握された論理ページと物理ページとの対応関係をページ情報テーブルに反映させていくことにより、ページ情報テーブルを完成させることができる。   According to the flash memory system 1 of the second embodiment, the SP, SLPN, and PCNT related to this series of data are written in the common redundant area 50 corresponding to the physical page where the series of data is stored. Further, the correspondence between the logical page and the physical page related to this series of data can be grasped based on the SLPN and PCNT related to this series of data. Therefore, the SLPN and PCNT written in the common redundant area 50 of the physical page in which the first data of a series of data is stored is read, and the correspondence between the logical page and the physical page grasped based on the read SLPN and PCNT By reflecting the relationship in the page information table, the page information table can be completed.

尚、各一連のデータに関する論理ページと物理ページとの対応関係は、後から書き込まれた一連のデータに関する方が優先されるため、各一連のデータに関する論理ページと物理ページとの対応関係は、一連のデータが書き込まれた順番でページ情報テーブルに反映される。   The correspondence between the logical page and the physical page related to each series of data is given priority over the series of data written later, so the correspondence between the logical page and the physical page related to each series of data is It is reflected in the page information table in the order in which a series of data is written.

又、各一連のデータの先頭データが保存されている物理ページのPPNは、1つ前の一連のデータに関するSPに基づいて把握することができる。SPを共通冗長領域50に書き込まない場合には、PCNTに基づいて各一連のデータの先頭データが保存されている物理ページのPPNを把握することもできる。   Further, the PPN of the physical page in which the head data of each series of data is stored can be grasped based on the SP related to the previous series of data. When the SP is not written in the common redundant area 50, the PPN of the physical page in which the head data of each series of data is stored can be grasped based on the PCNT.

又、一連のデータの先頭データが保存されている物理ページの共通冗長領域50に書き込まれているSP、SLPN及びPCNTと、その一連のデータの末尾データが保存されている物理ページに対応する共通冗長領域50に書き込まれているSP、SLPN及びPCNTが一致しているか否かにより、その一連のデータが正常に書き込まれているか否かを判別することができる。従って、正常に書き込まれた一連のデータに関する論理ページと物理ページとの対応関係だけが、ページ情報テーブルに反映される。   Further, the SP, SLPN, and PCNT written in the common redundant area 50 of the physical page in which the first data of the series of data is stored, and the common corresponding to the physical page in which the end data of the series of data is stored. Whether SP, SLPN, and PCNT written in the redundant area 50 match can determine whether the series of data is normally written. Accordingly, only the correspondence between the logical page and the physical page regarding a series of data written normally is reflected in the page information table.

尚、本発明のフラッシュメモリシステムは、上記した実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々変更を加え得ることは勿論である。   It should be noted that the flash memory system of the present invention is not limited to the above-described embodiment, and it is needless to say that various modifications can be made without departing from the gist of the present invention.

例えば、上記の実施の形態では、論理ブロックに含まれる論理セクタ領域と物理ブロックとに含まれる物理セクタ領域の数は一致していた。しかしながら、論理ブロックに含まれる論理セクタ領域の数を物理ブロックに含まれる物理セクタ領域の数より少なくしてもよい。こうすることで、論理ブロックに含まれる全ての論理セクタ領域に対応するデータを物理ブロックに保存した後であっても、そのデータの書き替えデータを、当該物理ブロックの空き領域(データが書き込まれていない物理セクタ領域又は物理ページ)にデータを保存することができる。これにより効率的なデータの書き換えが可能となる。例えば、論理ブロックに含まれる論理セクタ領域の数と、物理ブロックに含まれる物理セクタ領域の数を、共に2のべき乗で与えられる数にする場合には、論理ブロックに含まれる論理セクタ領域の数を128とし、物理ブロックに含まれる物理セクタ領域の数を256とする。   For example, in the above embodiment, the number of physical sector areas included in the logical block area and the physical block included in the logical block are the same. However, the number of logical sector areas included in the logical block may be smaller than the number of physical sector areas included in the physical block. In this way, even after data corresponding to all logical sector areas included in the logical block is stored in the physical block, the rewrite data of the data is changed to the empty area (data is written in the physical block). The data can be stored in a physical sector area or physical page that is not present. This makes it possible to efficiently rewrite data. For example, when the number of logical sector areas included in the logical block and the number of physical sector areas included in the physical block are both given by powers of 2, the number of logical sector areas included in the logical block Is 128, and the number of physical sector areas included in the physical block is 256.

本発明の実施の形態によるフラッシュメモリシステムの概略構成を示すブロック図である。1 is a block diagram showing a schematic configuration of a flash memory system according to an embodiment of the present invention. フラッシュメモリの物理ページの構成を示す図である。It is a figure which shows the structure of the physical page of flash memory. 論理ブロックと物理ブロックの対応関係を示す図である。It is a figure which shows the correspondence of a logical block and a physical block. 物理ブロックに保存される一連のデータの構成を示した図である。It is the figure which showed the structure of a series of data preserve | saved at a physical block. セクタ情報テーブルの構成を示した図である。It is the figure which showed the structure of the sector information table. 異常終了した物理ブロックを示した図である。It is the figure which showed the physical block which ended abnormally. 物理ブロック間のデータの転送を説明する図である。It is a figure explaining the transfer of the data between physical blocks. 第2の実施の形態のデータの書き込み方法における、物理ブロックに保存される一連のデータの構成を示した図である。It is the figure which showed the structure of a series of data preserve | saved at the physical block in the data writing method of 2nd Embodiment. ページ情報テーブルの構成を示した図である。It is the figure which showed the structure of the page information table. 異常終了した物理ブロックを示した図である。It is the figure which showed the physical block which ended abnormally. 物理ブロック間のデータの転送を説明する図である。It is a figure explaining the transfer of the data between physical blocks.

符号の説明Explanation of symbols

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

Claims (13)

ホストシステムから与えられるアクセス指示に基づいて、複数個の物理セクタ領域を含む物理ブロック単位で消去が行われるフラッシュメモリに対するアクセスを制御するメモリコントローラであって、
複数個の論理セクタ領域で構成された論理ブロックと前記物理ブロックとの対応関係を管理するブロック管理手段と、
前記アクセス指示によりアクセス対象の領域として指定された論理アクセス領域が属する前記論理ブロックと、該論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理セクタ領域と、該論理ブロックに属する前記論理アクセス領域のセクタ数とを判別する論理アクセス領域判別手段と、
前記論理アクセス領域が属する前記論理ブロックと対応する前記物理ブロック内のデータが書き込まれていない物理セクタ領域の先頭を検索する空きセクタ領域検索手段と、
前記アクセス指示により前記論理アクセス領域に対して書き込むことが指示された一連のデータを、前記空きセクタ領域検索手段によって検出されたデータが書き込まれていない先頭の物理セクタ領域から、末尾の物理セクタ領域に向かって順次書き込んでいくデータ書き込み手段と、
前記データ書き込み手段により前記一連のデータが書き込まれた物理セクタ領域に対応する冗長領域に、前記論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理セクタ領域と、前記論理ブロックに属する前記論理アクセス領域のセクタ数を判別するための情報を書き込む論理セクタ情報書き込み手段とを備えたことを特徴とするメモリコントローラ。
A memory controller that controls access to a flash memory that is erased in units of physical blocks including a plurality of physical sector areas, based on an access instruction given from a host system,
A block management means for managing a correspondence relationship between a logical block composed of a plurality of logical sector areas and the physical block;
The logical block to which the logical access area designated as the access target area by the access instruction belongs, the logical sector area corresponding to the head area of the logical access area belonging to the logical block, and the logical access belonging to the logical block Logical access area determining means for determining the number of sectors in the area;
Empty sector area search means for searching for the beginning of a physical sector area in which data in the physical block corresponding to the logical block to which the logical access area belongs is not written;
A series of data instructed to be written to the logical access area by the access instruction is changed from the first physical sector area to which the data detected by the free sector area search means is not written to the last physical sector area. Data writing means for sequentially writing toward the
The redundant area corresponding to the physical sector area in which the series of data is written by the data writing means, the logical sector area corresponding to the head area of the logical access area belonging to the logical block, and the logical area belonging to the logical block A memory controller comprising logical sector information writing means for writing information for determining the number of sectors in an access area.
1又は複数個の前記一連のデータが書き込まれている前記物理ブロック内の物理セクタ領域と、該物理ブロックに対応する前記論理ブロック内の論理セクタ領域との対応関係を判別するセクタ領域管理手段を備え、
該セクタ領域管理手段は、前記一連のデータの先頭データが書き込まれている各物理セクタ領域に対応する冗長領域から、前記論理セクタ情報書き込み手段によって書き込まれた前記情報を読み出し、読み出した該情報に基づいて前記物理ブロック内の物理セクタ領域と、該物理ブロックに対応する前記論理ブロック内の論理セクタ領域との対応関係を判別する請求項1に記載のメモリコントローラ。
Sector area management means for determining a correspondence relationship between a physical sector area in the physical block in which one or a plurality of the series of data is written and a logical sector area in the logical block corresponding to the physical block; Prepared,
The sector area management means reads the information written by the logical sector information writing means from the redundant area corresponding to each physical sector area in which the first data of the series of data is written, and reads the information into the read information. 2. The memory controller according to claim 1, wherein a correspondence relationship between a physical sector area in the physical block and a logical sector area in the logical block corresponding to the physical block is determined based on the basis.
前記セクタ領域管理手段は、前記一連のデータの先頭データが書き込まれている物理セクタ領域に対応する冗長領域と該一連のデータの末尾データが書き込まれている物理セクタ領域に対応する冗長領域から、前記論理セクタ情報書き込み手段によって書き込まれた前記情報を読み出し、双方の冗長領域から読み出された該情報が一致するときに、該一連のデータが正常に書き込まれていると判断することを特徴とする請求項2に記載のメモリコントローラ。   The sector area management means includes a redundant area corresponding to a physical sector area where head data of the series of data is written and a redundant area corresponding to a physical sector area where tail data of the series of data is written, The information written by the logical sector information writing means is read, and when the information read from both redundant areas coincides, it is determined that the series of data is normally written. The memory controller according to claim 2. ホストシステムから与えられるアクセス指示に基づいて、複数個の物理ページを含む物理ブロック単位で消去が行われるフラッシュメモリに対するアクセスを制御するメモリコントローラであって、
複数個の論理ページで構成された論理ブロックと前記物理ブロックとの対応関係を管理するブロック管理手段と、
前記アクセス指示によりアクセス対象の領域として指定された論理アクセス領域が属する前記論理ブロックと、該論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理ページと、該論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理ページから末尾領域に対応する論理ページまでのページ数とを判別する論理アクセス領域判別手段と、
前記論理アクセス領域が属する前記物理ブロック内のデータが書き込まれていない物理ページの先頭を検索する空きページ検索手段と、
前記アクセス指示により前記論理アクセス領域に対して書き込むことが指示された一連のデータを、前記空きページ検索手段によって検出されたデータが書き込まれていない先頭の物理ページから、末尾の物理ページに向かって順次書き込んでいくデータ書き込み手段と、
前記データ書き込み手段により前記一連のデータが書き込まれた物理ページに対応する冗長領域に、前記論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理ページと、前記論理ブロックに含まれる前記論理アクセス領域の先頭領域に対応する論理ページから末尾領域に対応する論理ページまでのページ数を判別するための情報を書き込む論理ページ情報書き込み手段とを備えたことを特徴とするメモリコントローラ。
A memory controller that controls access to a flash memory that is erased in units of physical blocks including a plurality of physical pages, based on an access instruction given from a host system,
Block management means for managing a correspondence relationship between a logical block composed of a plurality of logical pages and the physical block;
The logical block to which the logical access area specified as the access target area by the access instruction belongs, the logical page corresponding to the head area of the logical access area belonging to the logical block, and the logical access area belonging to the logical block Logical access area determination means for determining the number of pages from the logical page corresponding to the head area to the logical page corresponding to the end area;
Empty page search means for searching for the beginning of a physical page in which data in the physical block to which the logical access area belongs is not written;
A series of data instructed to be written to the logical access area by the access instruction is directed from the first physical page to which the data detected by the empty page search means is not written to the last physical page. Data writing means for sequentially writing;
A logical area corresponding to a head area of the logical access area belonging to the logical block, a logical page included in the logical block A memory controller, comprising: logical page information writing means for writing information for determining the number of pages from a logical page corresponding to the top area to a logical page corresponding to the end area.
1又は複数個の前記一連のデータが書き込まれている前記物理ブロック内の物理ページと、該物理ブロックに対応する前記論理ブロック内の論理ページとの対応関係を判別するページ管理手段を備え、
該ページ管理手段は、前記一連のデータの先頭データが書き込まれている各物理ページに対応する冗長領域から、前記論理ページ情報書き込み手段によって書き込まれた前記情報を読み出し、読み出した該情報に基づいて前記物理ブロック内の物理ページと、該物理ブロックに対応する前記論理ブロック内の論理ページとの対応関係を判別する請求項4に記載のメモリコントローラ。
Page management means for determining a correspondence relationship between a physical page in the physical block in which one or a plurality of the series of data is written and a logical page in the logical block corresponding to the physical block;
The page management means reads the information written by the logical page information writing means from the redundant area corresponding to each physical page in which the first data of the series of data is written, and based on the read information The memory controller according to claim 4, wherein a correspondence relationship between a physical page in the physical block and a logical page in the logical block corresponding to the physical block is determined.
前記ページ管理手段は、前記一連のデータの先頭データが書き込まれている物理ページに対応する冗長領域と該一連のデータの末尾データが書き込まれている物理ページに対応する冗長領域から、前記論理ページ情報書き込み手段によって書き込まれた前記情報を読み出し、双方の冗長領域から読み出された該情報が一致するときに、該一連のデータが正常に書き込まれていると判断することを特徴とする請求項5に記載のメモリコントローラ。   The page management means includes the logical page from a redundant area corresponding to a physical page in which head data of the series of data is written and a redundant area corresponding to a physical page in which tail data of the series of data is written. The information written by the information writing means is read, and when the information read from both redundant areas matches, it is determined that the series of data has been written normally. 5. The memory controller according to 5. 請求項1乃至6に記載のメモリコントローラと、
前記メモリコントローラによってアクセスされるフラッシュメモリとを備えるフラッシュメモリシステム。
A memory controller according to claim 1;
And a flash memory system accessed by the memory controller.
ホストシステムから与えられるアクセス指示に基づいて、複数個の物理セクタ領域を含む物理ブロック単位で消去が行われるフラッシュメモリに対するアクセスを制御するフラッシュメモリの制御方法であって、
複数個の論理セクタ領域で構成された論理ブロックを形成し、前記アクセス指示によりアクセス対象の領域として指定された論理アクセス領域が属する前記論理ブロックと、該論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理セクタ領域と、該論理ブロックに属する前記論理アクセス領域のセクタ数とを判別する論理アクセス領域判別ステップと、
前記論理アクセス領域が属する前記論理ブロックと対応する前記物理ブロックを判別する物理ブロック判別ステップと、
前記物理ブロック判別ステップで判別された前記物理ブロック内のデータが書き込まれていない物理セクタ領域の先頭を検索する空きセクタ領域検索ステップと、
前記アクセス指示により前記論理アクセス領域に対して書き込むことが指示された一連のデータを、前記空きセクタ領域検索ステップで検出されたデータが書き込まれていない先頭の物理セクタ領域から、末尾の物理セクタ領域に向かって順次書き込んでいくデータ書き込みステップと、
前記データ書き込みステップで前記一連のデータが書き込まれた物理セクタ領域に対応する冗長領域に、前記論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理セクタ領域と、前記論理ブロックに属する前記論理アクセス領域のセクタ数を判別するための情報を書き込む論理セクタ情報書き込みステップとを有することを特徴とするフラッシュメモリの制御方法。
A flash memory control method for controlling access to a flash memory to be erased in units of physical blocks including a plurality of physical sector areas based on an access instruction given from a host system,
Forming a logical block composed of a plurality of logical sector areas, the logical block to which the logical access area designated as the access target area by the access instruction belongs, and the leading area of the logical access area belonging to the logical block A logical access area determination step for determining a logical sector area corresponding to the number of sectors of the logical access area belonging to the logical block;
A physical block determining step for determining the physical block corresponding to the logical block to which the logical access area belongs;
A free sector area search step for searching for the beginning of a physical sector area in which data in the physical block determined in the physical block determination step is not written;
A series of data instructed to be written to the logical access area by the access instruction is changed from the first physical sector area to which the data detected in the empty sector area search step is not written to the last physical sector area. A data writing step of sequentially writing toward the
In a redundant area corresponding to the physical sector area in which the series of data is written in the data writing step, a logical sector area corresponding to a head area of the logical access area belonging to the logical block, and the logical area belonging to the logical block And a logical sector information writing step for writing information for determining the number of sectors in the access area.
前記一連のデータの先頭データが書き込まれている物理セクタ領域に対応する冗長領域から、前記論理セクタ情報書き込みステップで書き込まれた前記情報を読み出す第1の論理セクタ情報読み出しステップ、
前記第1の論理セクタ情報読み出しステップで読み出された情報に基づいて前記物理ブロック内の物理セクタ領域と、該物理ブロックに対応する前記論理ブロック内の論理セクタ領域との対応関係を判別する論理セクタ領域判別ステップとを有することを特徴とする請求項8に記載のフラッシュメモリの制御方法。
A first logical sector information reading step for reading out the information written in the logical sector information writing step from a redundant area corresponding to a physical sector area in which head data of the series of data is written;
Logic that determines the correspondence between the physical sector area in the physical block and the logical sector area in the logical block corresponding to the physical block based on the information read in the first logical sector information reading step The flash memory control method according to claim 8, further comprising a sector area determination step.
前記一連のデータの末尾データが書き込まれている物理セクタ領域に対応する冗長領域から、前記論理セクタ情報書き込みステップで書き込まれた前記情報を読み出す第2の論理セクタ情報読み出しステップ、
前記一連のデータの先頭データが書き込まれている物理セクタ領域に対応する冗長領域と該一連のデータの末尾データが書き込まれている物理セクタ領域に対応する冗長領域から読み出した前記論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理セクタ領域と前記論理ブロックに属する前記論理アクセス領域のセクタ数を判別するための情報が一致するときに該一連のデータが正常に書き込まれていると判断する判断ステップとを有することを特徴とする請求項9に記載のフラッシュメモリの制御方法。
A second logical sector information reading step for reading the information written in the logical sector information writing step from a redundant area corresponding to a physical sector area in which tail data of the series of data is written;
The redundant area corresponding to the physical sector area where the first data of the series of data is written and the logical block read from the redundant area corresponding to the physical sector area where the end data of the series of data is written When the information for determining the number of sectors in the logical access area belonging to the logical block coincides with the logical sector area corresponding to the head area of the logical access area, it is determined that the series of data is normally written. 10. The flash memory control method according to claim 9, further comprising a determination step.
ホストシステムから与えられるアクセス指示に基づいて、複数個の物理ページを含む物理ブロック単位で消去が行われるフラッシュメモリに対するアクセスを制御するフラッシュメモリの制御方法であって、
複数個の論理ページで構成された論理ブロックを形成し、前記アクセス指示によりアクセス対象の領域として指定された論理アクセス領域が属する前記論理ブロックと、該論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理ページと、該論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理ページから末尾領域に対応する論理ページまでのページ数とを判別する論理アクセス領域判別ステップと、
前記論理アクセス領域が属する前記論理ブロックと対応する前記物理ブロックを判別する物理ブロック判別ステップと、
前記物理ブロック判別ステップで判別された前記物理ブロック内のデータが書き込まれていない物理ページの先頭を検索する空きページ検索ステップと、
前記アクセス指示により前記論理アクセス領域に対して書き込むことが指示された一連のデータを、前記空きページ検索ステップで検出されたデータが書き込まれていない先頭の物理ページから、末尾の物理ページに向かって順次書き込んでいくデータ書き込みステップと、
前記データ書き込みステップで前記一連のデータが書き込まれた物理ページに対応する冗長領域に、前記論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理ページと、前記論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理ページから末尾領域に対応する論理ページまでのページ数を判別するための情報を書き込む論理ページ情報書き込みステップとを有することを特徴とするフラッシュメモリの制御方法。
A flash memory control method for controlling access to a flash memory to be erased in units of physical blocks including a plurality of physical pages, based on an access instruction given from a host system,
A logical block composed of a plurality of logical pages is formed, and the logical block to which the logical access area designated as the access target area by the access instruction belongs, and the top area of the logical access area belonging to the logical block A logical access area determination step for determining a corresponding logical page and the number of pages from the logical page corresponding to the top area of the logical access area belonging to the logical block to the logical page corresponding to the end area;
A physical block determining step for determining the physical block corresponding to the logical block to which the logical access area belongs;
A free page search step for searching for the beginning of a physical page in which data in the physical block determined in the physical block determination step is not written;
A series of data instructed to be written to the logical access area by the access instruction is directed from the first physical page to which the data detected in the empty page search step is not written to the last physical page. A data writing step of sequentially writing;
In the redundant area corresponding to the physical page in which the series of data is written in the data writing step, the logical page corresponding to the head area of the logical access area belonging to the logical block, and the logical access area belonging to the logical block And a logical page information writing step for writing information for determining the number of pages from the logical page corresponding to the first area to the logical page corresponding to the end area.
前記一連のデータの先頭データが書き込まれている物理ページに対応する冗長領域から、前記論理ページ情報書き込みステップで書き込まれた前記情報を読み出す第1の論理ページ情報読み出しステップ、
前記第1の論理ページ情報読み出しステップで読み出された情報に基づいて前記物理ブロック内の物理ページと、該物理ブロックに対応する前記論理ブロック内の論理ページとの対応関係を判別する論理ページ判別ステップとを有することを特徴とする請求項11に記載のフラッシュメモリの制御方法。
A first logical page information reading step for reading the information written in the logical page information writing step from a redundant area corresponding to a physical page in which the first data of the series of data is written;
Logical page determination for determining the correspondence between the physical page in the physical block and the logical page in the logical block corresponding to the physical block based on the information read in the first logical page information reading step 12. The flash memory control method according to claim 11, further comprising: a step.
前記一連のデータの末尾データが書き込まれている物理ページに対応する冗長領域から、前記論理ページ情報書き込みステップで書き込まれた前記情報を読み出す第2の論理ページ情報読み出しステップ、
前記一連のデータの先頭データが書き込まれている物理ページに対応する冗長領域と該一連のデータの末尾データが書き込まれている物理ページに対応する冗長領域から読み出した前記論理ブロックに属する前記論理アクセス領域の先頭領域に対応する論理ページと前記論理ブロックに属する前記論理アクセス領域のセクタ数を判別するための情報が一致するときに該一連のデータが正常に書き込まれていると判断する判断ステップとを有することを特徴とする請求項12に記載のフラッシュメモリの制御方法。
A second logical page information reading step for reading the information written in the logical page information writing step from a redundant area corresponding to a physical page in which tail data of the series of data is written;
The logical access belonging to the logical block read from the redundant area corresponding to the physical page to which the first data of the series of data is written and the redundant area corresponding to the physical page to which the end data of the series of data is written A determination step of determining that the series of data is normally written when the information for determining the number of sectors in the logical access area belonging to the logical block matches the logical page corresponding to the first area of the area; The flash memory control method according to claim 12, comprising:
JP2007116884A 2007-04-26 2007-04-26 MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD Active JP4702703B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007116884A JP4702703B2 (en) 2007-04-26 2007-04-26 MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007116884A JP4702703B2 (en) 2007-04-26 2007-04-26 MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD

Publications (2)

Publication Number Publication Date
JP2008276371A true JP2008276371A (en) 2008-11-13
JP4702703B2 JP4702703B2 (en) 2011-06-15

Family

ID=40054272

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007116884A Active JP4702703B2 (en) 2007-04-26 2007-04-26 MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD

Country Status (1)

Country Link
JP (1) JP4702703B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010015007A (en) * 2008-07-04 2010-01-21 Fujinon Corp Imaging lens and imaging apparatus using the same
JP2013174970A (en) * 2012-02-23 2013-09-05 Toshiba Corp Management information generation method and memory system
US8924636B2 (en) 2012-02-23 2014-12-30 Kabushiki Kaisha Toshiba Management information generating method, logical block constructing method, and semiconductor memory device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002196977A (en) * 2000-12-27 2002-07-12 Tdk Corp Memory controller, flash memory system with memory controller, and control method for flash memory
JP2004533029A (en) * 2001-01-19 2004-10-28 サンディスク コーポレイション Programming operation and reading operation of partial block data in nonvolatile memory
JP2005292926A (en) * 2004-03-31 2005-10-20 Tdk Corp Memory controller, flash memory system, and control method for flash memory

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002196977A (en) * 2000-12-27 2002-07-12 Tdk Corp Memory controller, flash memory system with memory controller, and control method for flash memory
JP2004533029A (en) * 2001-01-19 2004-10-28 サンディスク コーポレイション Programming operation and reading operation of partial block data in nonvolatile memory
JP2005292926A (en) * 2004-03-31 2005-10-20 Tdk Corp Memory controller, flash memory system, and control method for flash memory

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010015007A (en) * 2008-07-04 2010-01-21 Fujinon Corp Imaging lens and imaging apparatus using the same
JP2013174970A (en) * 2012-02-23 2013-09-05 Toshiba Corp Management information generation method and memory system
US8924636B2 (en) 2012-02-23 2014-12-30 Kabushiki Kaisha Toshiba Management information generating method, logical block constructing method, and semiconductor memory device

Also Published As

Publication number Publication date
JP4702703B2 (en) 2011-06-15

Similar Documents

Publication Publication Date Title
JP4844639B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
US20060013048A1 (en) Memory systems including defective block management and related methods
US8214579B2 (en) Memory controller, flash memory system with memory controller, and method of controlling flash memory
JP2005196634A (en) External memory unit
JP5093294B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4702387B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4034947B2 (en) Nonvolatile storage system
JP2010182268A (en) Memory controller, flash memory system equipped with the same, and control method of flash memory
JP4702703B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4743185B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4488048B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4501881B2 (en) Memory controller and flash memory system
JP4687720B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4710918B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4153535B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4655034B2 (en) Memory controller, flash memory system, and flash memory control method
US8200890B2 (en) Memory controller, flash memory system with memory controller, and method of controlling flash memory
JP4641034B2 (en) Nonvolatile storage system
JP4241741B2 (en) Memory controller and flash memory system
JP4760826B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4636046B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP2005242903A (en) Memory device, and memory control method and device
JP2012068764A (en) Memory controller, nonvolatile memory system with memory controller, and control method of nonvolatile memory
JP4569554B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP2004145964A (en) Semiconductor memory, semiconductor memory manufacturing method, memory card, and method of controlling semiconductor memory

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101221

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110113

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110125

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110227

R150 Certificate of patent or registration of utility model

Ref document number: 4702703

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150