JP4684587B2 - Memory card - Google Patents

Memory card Download PDF

Info

Publication number
JP4684587B2
JP4684587B2 JP2004219561A JP2004219561A JP4684587B2 JP 4684587 B2 JP4684587 B2 JP 4684587B2 JP 2004219561 A JP2004219561 A JP 2004219561A JP 2004219561 A JP2004219561 A JP 2004219561A JP 4684587 B2 JP4684587 B2 JP 4684587B2
Authority
JP
Japan
Prior art keywords
data
block
history information
sector
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2004219561A
Other languages
Japanese (ja)
Other versions
JP2006039983A (en
Inventor
洋文 澁谷
郁夫 原
茂雅 塩田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics 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 Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2004219561A priority Critical patent/JP4684587B2/en
Publication of JP2006039983A publication Critical patent/JP2006039983A/en
Application granted granted Critical
Publication of JP4684587B2 publication Critical patent/JP4684587B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、メモリカードのセクタデータの更新技術に関し、特に、不揮発性半導体メモリを用いたメモリカードにおける信頼性の向上に適用して有効な技術に関するものである。   The present invention relates to a technology for updating sector data of a memory card, and more particularly to a technology effective when applied to improvement of reliability in a memory card using a nonvolatile semiconductor memory.

パーソナルコンピュータや多機能端末機などの記憶装置として、たとえば、マルチメディアカードやCF(Compact Flash(R))カードなどのメモリカードが急速に普及している。   As storage devices such as personal computers and multi-function terminals, memory cards such as multimedia cards and CF (Compact Flash (R)) cards are rapidly spreading.

近年の高性能化の要求に伴って、メモリカードに搭載される半導体メモリとして、たとえば、電気的に一括消去、書き換えが可能であり、大容量のデータを保持できるフラッシュメモリなどの不揮発性メモリが用いられている。   With the recent demand for higher performance, as a semiconductor memory mounted on a memory card, for example, a non-volatile memory such as a flash memory that can be electrically erased and rewritten electrically and can hold a large amount of data. It is used.

フラッシュメモリは、データの消去動作を、消去単位(たとえば、ワード線単位、ブロック単位)毎に行っており、データの書き込み/読み出し動作を、読み出し/書き込み単位(たとえば、セクタ単位)毎に行っている。   The flash memory performs a data erasing operation for each erasing unit (for example, word line unit, block unit), and performs a data writing / reading operation for each read / write unit (for example, sector unit). Yes.

また、メモリカードにおいては、システムデータなどの重要なデータの化けや消失などのエラーを防止するために、フラッシュメモリにおける複数のメモリ領域にデータを重複格納して管理する技術がある。この場合、データの更新時には、すべての重複データが更新される。   In addition, in the memory card, there is a technique for managing data by overlappingly storing data in a plurality of memory areas in a flash memory in order to prevent errors such as corruption or loss of important data such as system data. In this case, all the duplicate data is updated when the data is updated.

この種のフラッシュメモリにおけるデータ管理技術として、たとえば、不良メモリセルを含まないメモリセル群と置き換える代替処理機能による第1のアドレス変換情報、および不良メモリセルを含まないメモリセル群と置き換える書換え回数平均化処理機能による第2のアドレス変換情報をそれぞれメモリアレイの所定の領域に記憶させ、同一のメモリセル群に関する第1のアドレス変換情報、ならびに第2のアドレス変換情報を時系列的に複数個記憶するものがある(特許文献1参照)。
特開2004−118407号公報
As a data management technique in this type of flash memory, for example, first address conversion information by an alternative processing function that replaces a memory cell group that does not include a defective memory cell, and an average number of rewrites that replaces a memory cell group that does not include a defective memory cell Second address conversion information obtained by the conversion processing function is stored in a predetermined area of the memory array, and a plurality of first address conversion information and second address conversion information relating to the same memory cell group are stored in time series. (See Patent Document 1).
JP 2004-118407 A

ところが、上記のようなメモリカードにおけるデータの管理技術では、次のような問題点があることが本発明者により見い出された。   However, the present inventors have found that the data management technology in the memory card as described above has the following problems.

フラッシュメモリは、デバイスの特性から、データ書き込み/消去を繰り返すと、ある一定の割合で書き込み/消去ができなくなるブロックなどが発生することになる。特に、消去単位が、書き込み/読み出し単位よりも大きいサイズで、かつ特定箇所のデータを頻繁に更新する場合には、データの書き込み回数分だけ消去回数も増加し、フラッシュメモリの性能が早期に低下してしまう恐れがある。   In the flash memory, due to the characteristics of the device, when data writing / erasing is repeated, blocks that cannot be written / erased at a certain rate are generated. In particular, when the erase unit is larger than the write / read unit and the data at a specific location is updated frequently, the erase count increases by the number of data writes, and the performance of the flash memory deteriorates early. There is a risk of doing.

また、メモリカードでは、たとえば、アドレス管理などを行う重要なシステムデータを重複して格納しても、更新時にはすべての重複データを更新するので、該システムデータの書き換え中に電源遮断などのトラブルが発生した場合、該システムデータの化けや消失などが発生し、メモリカードを用いて構成したメモリシステムが動作しなくなるという問題がある。   In addition, even if important system data for address management etc. is duplicated and stored in the memory card, all duplicate data is updated at the time of update, so there is a trouble such as power interruption during rewriting of the system data. When this occurs, there is a problem that the system data is garbled or lost, and the memory system configured using the memory card does not operate.

本発明の目的は、データの消去回数を大幅に低減するとともに、データエラーなどによるメモリカードの認識不良など低減することのできる技術を提供することにある。   An object of the present invention is to provide a technique capable of significantly reducing the number of times data is erased and reducing a recognition failure of a memory card due to a data error or the like.

本発明の前記ならびにその他の目的と新規な特徴は、本明細書の記述および添付図面から明らかになるであろう。   The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.

本願において開示される発明のうち、代表的なものの概要を簡単に説明すれば、次のとおりである。   Of the inventions disclosed in the present application, the outline of typical ones will be briefly described as follows.

本発明は 複数の不揮発性メモリセルを有し、所定の情報を格納可能な不揮発性半導体メモリと、外部から発行されたコマンドに基づいて不揮発性半導体メモリの動作指示を行うコントローラとを備えたメモリカードであって、該コントローラは、不揮発性メモリセルの消去単位となるブロックにセクタデータを更新する際に、ブロックの空きセクタに順次セクタデータの書き込みを行い、ブロックに空きセクタがなくなると該ブロックのセクタデータを消去した後、任意の空きセクタから順次セクタデータを書き込むものである。   The present invention includes a non-volatile semiconductor memory having a plurality of non-volatile memory cells and capable of storing predetermined information, and a controller for instructing operation of the non-volatile semiconductor memory based on a command issued from the outside. When updating sector data to a block that is an erasing unit of a nonvolatile memory cell, the controller sequentially writes sector data to an empty sector of the block, and when there is no empty sector in the block, the controller After the sector data is erased, the sector data is sequentially written from an arbitrary empty sector.

また、本発明のメモリカードは、前記ブロックに格納されている最新のセクタデータの位置を管理する履歴情報テーブルを格納する履歴情報テーブル格納部を備え、コントローラは、履歴情報テーブル格納部に格納された履歴情報テーブルに基づいて最新のセクタデータの位置を管理するものである。   The memory card of the present invention further includes a history information table storage unit that stores a history information table that manages the position of the latest sector data stored in the block, and the controller is stored in the history information table storage unit. The position of the latest sector data is managed based on the history information table.

さらに、本発明のメモリカードは、前記履歴情報テーブル格納部は、揮発性半導体メモリよりなるものである。   Further, in the memory card of the present invention, the history information table storage unit is composed of a volatile semiconductor memory.

また、本発明のメモリカードは、前記コントローラは、メモリカードのリセット処理時に、セクタデータに格納された管理情報に基づいて最新のセクタデータの位置を獲得し、履歴情報テーブル格納部に履歴情報テーブルとして格納するものである。   In the memory card of the present invention, the controller acquires the position of the latest sector data based on the management information stored in the sector data during the reset process of the memory card, and stores the history information table in the history information table storage unit. Is stored as

また、本願のその他の発明の概要を簡単に示す。   Moreover, the outline | summary of the other invention of this application is shown briefly.

本発明は、複数の不揮発性メモリセルを有し、所定の情報を格納可能な不揮発性半導体メモリと、外部から発行されたコマンドに基づいて不揮発性半導体メモリの動作指示を行うコントローラとを備えたメモリカードであって、該コントローラは、不揮発性メモリセルの消去単位となるブロックにセクタデータを更新する際に、2つのブロックを用い、第1の書き込みは、一方のブロックの空きセクタにセクタデータを書き込み、第2の書き込みは、他方のブロックの空きセクタにセクタデータを書き込み、第3の書き込みは、一方のブロックの空きセクタにセクタデータを書き込むように、それら2つのブロックの空きセクタに交互に追記して順次セクタデータの更新を行うものである。   The present invention includes a nonvolatile semiconductor memory having a plurality of nonvolatile memory cells and capable of storing predetermined information, and a controller for instructing operation of the nonvolatile semiconductor memory based on an externally issued command. In the memory card, the controller uses two blocks when updating sector data to a block which is an erasure unit of a nonvolatile memory cell, and the first write uses sector data in an empty sector of one block. , The second write writes sector data to the empty sector of the other block, and the third write alternately writes to the empty sector of the two blocks so that the sector data is written to the empty sector of one block. The sector data is updated sequentially.

また、本発明のメモリカードは、セクタデータが更新される2つのブロックは、書き込みや消去、読み出しの際にそれらの対象となるメモリセルとワード線やビット線、ソース線のいずれとも分離されることが可能な別ストリングにそれぞれ設けられているブロックよりなるものである。   In the memory card of the present invention, the two blocks whose sector data are updated are separated from the target memory cell, word line, bit line, and source line at the time of writing, erasing, and reading. It is made up of blocks each provided in a separate string.

さらに、本発明のメモリカードは、前記ブロックに空きセクタがなくなるとブロックのセクタデータを消去した後、セクタデータを書き込むものである。   Furthermore, the memory card of the present invention writes sector data after erasing the sector data of the block when there is no empty sector in the block.

また、本発明のメモリカードは、前記2つのブロックのいずれかに格納されている最新のセクタデータの位置を管理する履歴情報テーブルを格納する履歴情報テーブル格納部を備え、コントローラは、履歴情報テーブル格納部に格納された履歴情報テーブルに基づいて最新のセクタデータの位置を管理するものである。   The memory card of the present invention further includes a history information table storage unit for storing a history information table for managing the position of the latest sector data stored in one of the two blocks. The position of the latest sector data is managed based on the history information table stored in the storage unit.

さらに、本発明のメモリカードは、前記履歴情報テーブル格納部は、揮発性半導体メモリよりなるものである。   Further, in the memory card of the present invention, the history information table storage unit is composed of a volatile semiconductor memory.

また、本発明のメモリカードは、前記コントローラは、メモリカードのリセット処理時に、セクタデータに格納された管理情報に基づいて最新のセクタデータの位置を獲得し、履歴情報テーブル格納部に履歴情報テーブルとして格納するものである。   In the memory card of the present invention, the controller acquires the position of the latest sector data based on the management information stored in the sector data during the reset process of the memory card, and stores the history information table in the history information table storage unit. Is stored as

本願において開示される発明のうち、代表的なものによって得られる効果を簡単に説明すれば以下のとおりである。   Among the inventions disclosed in the present application, effects obtained by typical ones will be briefly described as follows.

(1)消去回数を大幅に低減することができるので、不揮発性半導体メモリの性能低下を抑えることができる。   (1) Since the number of times of erasing can be greatly reduced, it is possible to suppress the performance degradation of the nonvolatile semiconductor memory.

(2)また、データにエラーが発生しても更新前のデータをバックアップデータとして用いることができるの、メモリカードの信頼性を向上させることができる。   (2) Further, even if an error occurs in data, the data before update can be used as backup data, so that the reliability of the memory card can be improved.

以下、本発明の実施の形態を図面に基づいて詳細に説明する。なお、実施の形態を説明するための全図において、同一の部材には原則として同一の符号を付し、その繰り返しの説明は省略する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. Note that components having the same function are denoted by the same reference symbols throughout the drawings for describing the embodiment, and the repetitive description thereof will be omitted.

図1は、本発明の一実施の形態による記憶システムのブロック図、図2は、図1の記憶システムを構成するメモリカードに設けられたコントローラのブロック図、図3は、図1の記憶システムを構成するメモリカードに設けられたフラッシュメモリにおけるメモリアレイの構成例を示す説明図、図4は、図3のメモリセルアレイにおけるメモリマップの構成例を示す説明図、図5は、図4のメモリアレイに格納されるテーブルデータの更新手順を示す説明図、図6は、図3のメモリアレイにおけるブロックの構成例を示す説明図、図7は、図6のブロックに設けられたデータ部の構成例を示す説明図、図8は、図6のブロックに設けられた管理部の構成例を示す説明図、図9は、図6のブロックにおける無効/有効セクタと履歴情報との関係を示す説明図、図10は、図2のコントローラに設けられた履歴格納部に格納される履歴情報テーブルの構成例を示す説明図、図11は、図1のメモリカードにおけるリセット処理を示すフローチャート、図12は、図1のメモリカードにおける書き込み処理を示すフローチャート、図13は、図1のメモリカードにおける書き込みエラー処理を示すフローチャートである。   1 is a block diagram of a storage system according to an embodiment of the present invention, FIG. 2 is a block diagram of a controller provided in a memory card constituting the storage system of FIG. 1, and FIG. 3 is a storage system of FIG. FIG. 4 is an explanatory diagram showing a configuration example of a memory array in the memory cell array of FIG. 3, and FIG. 5 is a memory diagram of FIG. FIG. 6 is an explanatory diagram showing an example of a block configuration in the memory array of FIG. 3, and FIG. 7 is a configuration of a data section provided in the block of FIG. 8 is an explanatory diagram showing an example, FIG. 8 is an explanatory diagram showing a configuration example of the management unit provided in the block of FIG. 6, and FIG. 9 is a relationship between invalid / valid sectors and history information in the block of FIG. FIG. 10 is an explanatory diagram illustrating a configuration example of a history information table stored in a history storage unit provided in the controller of FIG. 2, and FIG. 11 is a flowchart illustrating reset processing in the memory card of FIG. 12 is a flowchart showing a writing process in the memory card of FIG. 1, and FIG. 13 is a flowchart showing a writing error process in the memory card of FIG.

本実施の形態において、記憶システムは、図1に示すように、コントローラ4とフラッシュメモリ3に例示される不揮発性半導体メモリとからメモリカード1が構成され、メモリカード1の外部にホスト機器2が接続可能なように構成されている。メモリカード1は、デジタルビデオカメラ、携帯電話、携帯音楽プレーヤやパーソナルコンピュータなどのホスト機器2の外部記憶メディアとして用いられる。   In this embodiment, as shown in FIG. 1, the storage system includes a memory card 1 including a controller 4 and a nonvolatile semiconductor memory exemplified by a flash memory 3, and a host device 2 is connected to the outside of the memory card 1. It is configured to be connectable. The memory card 1 is used as an external storage medium for a host device 2 such as a digital video camera, a cellular phone, a portable music player, or a personal computer.

フラッシュメモリ3は、電気的にデータの書き換え、消去が可能な不揮発性半導体メモリからなる。ここでは、フラッシュメモリ3が1個の半導体メモリよりなる構成としたが、該半導体メモリは1つ以上であればよい。   The flash memory 3 is composed of a nonvolatile semiconductor memory capable of electrically rewriting and erasing data. Here, the flash memory 3 is composed of one semiconductor memory, but it is sufficient if the number of the semiconductor memories is one or more.

コントローラ4は、図2に示すように、ホスト側インタフェース5、MPU(MicroProcessing Unit)6、バッファインタフェース7、データバッファ8、記憶部側インタフェース9、履歴検出部10、履歴生成部11、および履歴格納部12などから構成されている。   As shown in FIG. 2, the controller 4 includes a host-side interface 5, an MPU (MicroProcessing Unit) 6, a buffer interface 7, a data buffer 8, a storage unit-side interface 9, a history detection unit 10, a history generation unit 11, and a history storage. It consists of a part 12 and the like.

コントローラ4は、ホスト機器2と接続されており、フラッシュメモリ3の制御を司り、該フラッシュメモリ3に格納されたプログラムやデータなどを読み出してホスト機器2へ出力し、またはホスト機器2から入力されたプログラムやデータの書き込み動作指示を行う。   The controller 4 is connected to the host device 2 and controls the flash memory 3. The controller 4 reads out the program or data stored in the flash memory 3 and outputs it to the host device 2 or input from the host device 2. Instructions for program and data write operations.

ホスト側インタフェース5は、ホスト機器2とMPU6とのインタフェースである。MPU6は、コントローラ4におけるすべての制御を司る。バッファインタフェース7は、MPU6とデータバッファ8とのインタフェースである。   The host side interface 5 is an interface between the host device 2 and the MPU 6. The MPU 6 manages all the controls in the controller 4. The buffer interface 7 is an interface between the MPU 6 and the data buffer 8.

また、データバッファ8は、たとえば、SRAM(Static Random Access Memory)などの揮発性メモリからなり、MPU6に設けられたCPUのワークエリアとしても用いられる。記憶部側インタフェース9は、MPU6とフラッシュメモリ3とのインタフェースであり、エラー検出/訂正回路を備える。   The data buffer 8 is composed of a volatile memory such as SRAM (Static Random Access Memory), and is also used as a work area of the CPU provided in the MPU 6. The storage unit side interface 9 is an interface between the MPU 6 and the flash memory 3 and includes an error detection / correction circuit.

履歴検出部10は、履歴情報RJ(図8)に基づいて、多重化されたデータから、最新のデータが格納されている場所を検出する。履歴生成部11は、最新のデータの格納場所を示す履歴情報RJを生成し、該履歴情報RJをフラッシュメモリ3に格納する。履歴格納部12は、たとえば、RAM(Random Access Memory)などの揮発性メモリからなり、フラッシュメモリ3に格納された履歴情報RJを読み出し、履歴情報テーブルRT(図10)を作成して管理する。   The history detection unit 10 detects a place where the latest data is stored from the multiplexed data based on the history information RJ (FIG. 8). The history generation unit 11 generates history information RJ indicating the storage location of the latest data, and stores the history information RJ in the flash memory 3. The history storage unit 12 includes a volatile memory such as a RAM (Random Access Memory), for example, reads the history information RJ stored in the flash memory 3, and creates and manages a history information table RT (FIG. 10).

なお、これら履歴検出部10、履歴生成部11、ならびに履歴格納部12は、回路として持たず、たとえば、MPU6によるファームウェア処理によって代用する構成としてもよい。   Note that the history detection unit 10, the history generation unit 11, and the history storage unit 12 are not provided as circuits, and may be replaced by firmware processing by the MPU 6, for example.

図3は、フラッシュメモリ3におけるメモリアレイMAの構成例を示す説明図である。   FIG. 3 is an explanatory diagram showing a configuration example of the memory array MA in the flash memory 3.

この場合、メモリアレイMAは、グローバルビット線GBLに複数のサブビット線SBLが接続され、それらサブビット線SBLに不揮発性メモリセルSがそれぞれ接続された構成からなる。   In this case, the memory array MA has a configuration in which a plurality of sub bit lines SBL are connected to the global bit line GBL, and a nonvolatile memory cell S is connected to each of the sub bit lines SBL.

また、ワード線WLに接続された複数の不揮発性メモリセルSを一括消去することができ、これをブロック(消去単位)といい、サブビット線SBLに連なる複数のブロックをストリングという。さらに、以下、データの書き込み単位をページ、データ格納単位をセクタといい、1つのブロックに対して、1つ、もしくは複数のセクタデータ(テーブルデータ)を格納する。   In addition, a plurality of nonvolatile memory cells S connected to the word line WL can be erased at once. This is called a block (erase unit), and a plurality of blocks connected to the sub bit line SBL are called strings. Further, hereinafter, a data writing unit is called a page, and a data storage unit is called a sector, and one or a plurality of sector data (table data) is stored in one block.

データを読み出す場合、選択したワード線WLに電圧を加え、該ワード線WLに接続された不揮発性メモリセルSからサブビット線SBLを介し、データを読み出す。データを書き込む場合、ワード線WLとサブビット線SBLとを選択して電圧を加え、不揮発性メモリセルSへデータを書き込む。   When reading data, a voltage is applied to the selected word line WL, and the data is read from the nonvolatile memory cell S connected to the word line WL via the sub bit line SBL. When data is written, the word line WL and the sub bit line SBL are selected and a voltage is applied, and the data is written to the nonvolatile memory cell S.

図4は、フラッシュメモリ3におけるメモリアレイMAのマップ構成を示す説明図である。   FIG. 4 is an explanatory diagram showing a map configuration of the memory array MA in the flash memory 3.

前述したように、ストリングは複数のブロックからなり、ここではテーブルデータ(セクタデータ)のブロック書き換えは2つのストリングST1,ST2にあるブロックを使用するものとする。   As described above, a string is composed of a plurality of blocks. Here, block rewriting of table data (sector data) uses blocks in two strings ST1 and ST2.

この図4では、テーブル番号TBLNo.0〜No.199を格納する場合を示している。1つのテーブルデータに対し2つのブロックを割当て、一方をプライマリブロックPB、他方をセカンダリブロックSBとする。   In FIG. 4, the table number TBLNo. 0-No. The case where 199 is stored is shown. Two blocks are allocated to one table data, and one is a primary block PB and the other is a secondary block SB.

データの書き換えにおいて、ブロックの消去を伴う場合、別の空きブロックに対して消去/書き込みを行う。また、メモリアレイMAの不良登録ブロックFTは、テーブルデータの更新で使用されるストリング内の不良ブロックアドレスが登録されたブロック領域である。   When data rewriting involves erasing a block, erasing / writing is performed on another empty block. The defective registration block FT of the memory array MA is a block area in which a defective block address in a string used for updating table data is registered.

図5は、メモリアレイMAにおけるブロック内のデータ更新手順を示す説明図である。   FIG. 5 is an explanatory diagram showing a data update procedure in a block in the memory array MA.

プライマリブロックPB、およびセカンダリブロックSBは、テーブルデータを格納するデータ部Dと、そのブロックの管理情報を格納する管理部Kとによりそれぞれ構成されている。   The primary block PB and the secondary block SB are respectively configured by a data part D that stores table data and a management part K that stores management information of the block.

ここでは、プライマリブロックPB、ならびにセカンダリブロックSBにおけるページ数がそれぞれ2の場合の例を示している。プライマリブロックPB、およびセカンダリブロックSBにおいて、各ブロックのデータ部Dをそれぞれ8分割(セクタCA00〜CA07)し、その1つにテーブルデータを格納する。また、管理部Kは、各ページに1つ設けられるが、この管理部Kは、ブロック当たりに1つ設けるようにしてもよい。   Here, an example in which the number of pages in the primary block PB and the secondary block SB is two is shown. In the primary block PB and the secondary block SB, the data portion D of each block is divided into 8 (sectors CA00 to CA07), and table data is stored in one of them. One management unit K is provided for each page, but one management unit K may be provided for each block.

テーブルデータの更新は、セカンダリブロックSB、およびプライマリブロックPBの8つに分割されたデータ部Dを順次、交互に追記し、プライマリブロックPBとセカンダリブロックSBとを合わせて、全部で16回の追記が可能となる。   The table data is updated by adding the secondary block SB and the data block D divided into eight primary blocks PB sequentially and alternately, and adding the primary block PB and the secondary block SB 16 times in total. Is possible.

たとえば、図中、プライマリブロックPBにおけるデータ部D0(1)が更新される場合には、セカンダリブロックSBにおけるデータ部D0(2)に追加される。その後、データ部D0(2)が更新される場合には、プライマリブロックPBにおけるデータ部D0(3)に追加されることになる。   For example, in the figure, when the data part D0 (1) in the primary block PB is updated, it is added to the data part D0 (2) in the secondary block SB. Thereafter, when the data part D0 (2) is updated, it is added to the data part D0 (3) in the primary block PB.

そして、セカンダリブロックSBにおけるデータ部D0(8)を更新する際には、プライマリブロックPBにおけるデータ部D0(9)に追加されることになる。   When the data part D0 (8) in the secondary block SB is updated, the data part D0 (9) in the primary block PB is added.

図6は、プライマリブロックPB、およびセカンダリブロックSBの構成例を示す説明図である。   FIG. 6 is an explanatory diagram illustrating a configuration example of the primary block PB and the secondary block SB.

プライマリブロックPB、およびセカンダリブロックSBは、データ部D、および管理部Kからそれぞれ構成されている。データ部Dは、セクタCA00〜CA07からなり、管理部Kは、管理部K1,K2から構成されている。   The primary block PB and the secondary block SB are each composed of a data part D and a management part K. The data part D is composed of sectors CA00 to CA07, and the management part K is composed of management parts K1 and K2.

各セクタCA00(〜CA07)は、図7に示すように、テーブルデータと該テーブルデータを保護するECC(Error Correcting Code)などの冗長データからなる。   As shown in FIG. 7, each sector CA00 (to CA07) includes table data and redundant data such as ECC (Error Collecting Code) that protects the table data.

また、管理部K1は、図8に示すように、良ブロックコードBC、管理情報KJ、テーブル番号TBLNo.、エラー検出/訂正用冗長コードCD、および履歴情報RJから構成されており、管理部K2は、良ブロックコードBC、管理情報KJ、エラー検出/訂正用冗長コードCD、および履歴情報RJから構成されている。   Further, as shown in FIG. 8, the management unit K1 has a good block code BC, management information KJ, table number TBLNo. The error detection / correction redundancy code CD and the history information RJ are included. The management unit K2 includes the good block code BC, the management information KJ, the error detection / correction redundancy code CD, and the history information RJ. ing.

良ブロックコードBCは、そのページ、もしくはブロックが使用可能であるかを識別するコードである。管理情報KJは、そのページ、あるいはブロックの属性や情報を示すコードである。   The good block code BC is a code for identifying whether the page or the block can be used. The management information KJ is a code indicating the attribute or information of the page or block.

テーブル番号TBLNo.は、テーブル番号の情報を示すコードである。エラー検出/訂正用冗長コードCDは、たとえば、ECCなどであり、良ブロックコードBC、管理情報KJ、およびテーブル番号TBLNo.のデータを保護する。   Table number TBLNo. Is a code indicating table number information. The error detection / correction redundancy code CD is, for example, ECC, and the good block code BC, management information KJ, and table number TBLNo. Protect your data.

管理部Kの履歴情報RJは、無効フラグMF、ならびに有効セクタ(CA)フラグYFからなり、管理部K2の履歴情報RJは、有効セクタフラグYFからなる。無効フラグMFは、ブロックのデータが無効であることを示すコードであり、プライマリブロックPB、およびセカンダリブロックSBにそれぞれ設けられた8つのデータ部Dがすべて追記された際にたてられるフラグである。有効セクタフラグYFは、ブロック内で最新データが格納されている場所を示すコードである。   The history information RJ of the management unit K includes an invalid flag MF and a valid sector (CA) flag YF, and the history information RJ of the management unit K2 includes a valid sector flag YF. The invalid flag MF is a code indicating that the data of the block is invalid, and is a flag that is set when all of the eight data portions D respectively provided in the primary block PB and the secondary block SB are additionally written. . The valid sector flag YF is a code indicating a location where the latest data is stored in the block.

ここで、図8において、無効フラグMFと有効セクタフラグYFとは、ECCなどのエラー検出/訂正用冗長コードCDによるデータ保護がされていないが、これら無効フラグMF、および有効セクタフラグYFにデータ保護を付加するようにしてもよい。   In FIG. 8, the invalid flag MF and the valid sector flag YF are not protected by an error detection / correction redundant code CD such as ECC. However, the invalid flag MF and the valid sector flag YF are protected from data. You may make it add.

図9は、ブロックにおける無効/有効セクタと履歴情報RJとの関係を示している。   FIG. 9 shows the relationship between invalid / valid sectors and history information RJ in a block.

管理部K1の履歴情報RJは、たとえば、3バイトで構成されており、管理部K2の履歴情報RJは、たとえば、2バイトで構成されている。無効フラグMFが’x0’となる場合には、該当するセクタが有効であることを示し、無効フラグMFが’xF’となる場合には、そのブロックが無効であることを示す。   The history information RJ of the management unit K1 is composed of 3 bytes, for example, and the history information RJ of the management unit K2 is composed of 2 bytes, for example. When the invalid flag MF is “x0”, it indicates that the corresponding sector is valid, and when the invalid flag MF is “xF”, it indicates that the block is invalid.

また、有効セクタフラグYFによって該当するセクタに最新データが入っているか否かをそれぞれ示す。   Each valid sector flag YF indicates whether or not the latest data is contained in the corresponding sector.

たとえば、セクタCA00が有効の場合、無効フラグMFが’x0’となる。そのブロックが無効の場合には、無効フラグMFが’xF’となる。また、セクタCA00に最新のデータが格納されている場合には、管理部K1の有効セクタフラグYFは、’F000’となり、管理部K2の有効セクタフラグYFは、’0000’となる。   For example, when the sector CA00 is valid, the invalid flag MF is 'x0'. If the block is invalid, the invalid flag MF becomes 'xF'. When the latest data is stored in the sector CA00, the valid sector flag YF of the management unit K1 is 'F000', and the valid sector flag YF of the management unit K2 is '0000'.

ここで、’x’は、’Don’t Care’である。さらに、履歴情報RJは、1ビット化けを考慮し、’E’,’D’,’B’,’7’は、’F’、そして’F’,’1’,’2’,’4’,’8’は、’0’と見なすものとする。   Here, 'x' is 'Don't Care'. Further, the history information RJ takes into account 1-bit corruption, and “E”, “D”, “B”, “7” are “F”, and “F”, “1”, “2”, “4”. ',' 8 'shall be regarded as' 0'.

図10は、フラッシュメモリ3に格納された履歴情報RJから作成され、履歴格納部12によって管理される履歴情報テーブルRTの構成例を示す説明図である。   FIG. 10 is an explanatory diagram showing a configuration example of the history information table RT created from the history information RJ stored in the flash memory 3 and managed by the history storage unit 12.

履歴情報テーブルRTは、オフセットブロックアドレスBA、プライマリ/セカンダリ選択部PSS、エラーフラグEF、初期化フラグRF、およびブロック内有効セクタ位置YCPより構成されている。   The history information table RT includes an offset block address BA, a primary / secondary selection unit PSS, an error flag EF, an initialization flag RF, and an intra-block valid sector position YCP.

オフセットブロックアドレスBAは、テーブルデータを格納しているフラッシュメモリ3上のオフセットアドレスである。このオフセットブロックアドレスBAは、プライマリアドレスとセカンダリアドレスとの2つを格納する。   The offset block address BA is an offset address on the flash memory 3 storing the table data. The offset block address BA stores two, a primary address and a secondary address.

プライマリ/セカンダリ選択部PSSは、プライマリブロックPBとセカンダリブロックSBとのいずれに最新データが格納されているかを示す。エラーフラグEFは、通常は’0’であり、メモリカード1のリセット処理時に同一のテーブル番号TBLNo.の有効なブロック(無効フラグMFが’0’)を検出した際に、’1’にする。   The primary / secondary selection unit PSS indicates in which of the primary block PB and the secondary block SB the latest data is stored. The error flag EF is normally “0”, and the same table number TBLNo. When the valid block (invalid flag MF is “0”) is detected, it is set to “1”.

初期化フラグRFは、履歴情報テーブルRTの初期化を検出した際に’1’にする。ブロック内有効セクタ位置YCPは、そのブロック内における最新データの位置を示す。   The initialization flag RF is set to “1” when the initialization of the history information table RT is detected. The intra-block valid sector position YCP indicates the position of the latest data in the block.

次に、本実施の形態によるメモリカード1のリセット処理について、図11のフローチャートを用いて説明する。   Next, reset processing of the memory card 1 according to the present embodiment will be described with reference to the flowchart of FIG.

まず、メモリカード1がパワーオンされると、リセット処理が行われる(ステップS101)。このリセット処理は、発振子の安定時間やリセットICのネゲート待ち、テーブルデータ以外のシステムデータのリードなどである。また、このリセット処理の一部を分割し、リセット処理シーケンスの最後に行うようにしてもよい。   First, when the memory card 1 is powered on, a reset process is performed (step S101). This reset process includes the stabilization time of the oscillator, the negation of the reset IC, and reading of system data other than table data. Further, a part of the reset process may be divided and performed at the end of the reset process sequence.

続いて、不良登録ブロックFTに格納されている不良登録テーブルをリードし、ストリング内の不良ブロックアドレスを獲得する(ステップS102)。   Subsequently, the defect registration table stored in the defect registration block FT is read, and the defect block address in the string is acquired (step S102).

その後、ステップS102の処理おいて獲得した不良ブロックアドレスを除くプライマリブロックPB、およびセカンダリブロックSBにおける管理部Kをリードし、良ブロックであることをチェックする(ステップS103)。   Thereafter, the management unit K in the primary block PB and the secondary block SB excluding the defective block address acquired in the process of step S102 is read to check that it is a good block (step S103).

無効フラグMFをチェックし(ステップS104)、有効なブロックに関して履歴情報RJを作成する処理を行う。また、無効なブロックはスキップする。   The invalid flag MF is checked (step S104), and the history information RJ is created for the valid block. Also, invalid blocks are skipped.

続いて、テーブル番号TBLNo.を確認し(ステップS105)、有効セクタフラグYF、およびフラッシュメモリ3のオフセットブロックアドレスBAより、履歴格納部12に履歴情報テーブルRTを作成する(ステップS106)。   Subsequently, table number TBLNo. (Step S105), a history information table RT is created in the history storage unit 12 from the valid sector flag YF and the offset block address BA of the flash memory 3 (step S106).

また、ステップS105の処理において、同一のテーブル番号TBLNo.の有効ブロックを検出した場合には、エラーフラグEFを’1’にする(ステップS107)。   In the process of step S105, the same table number TBLNo. Is detected, the error flag EF is set to "1" (step S107).

ステップS107の処理後、またはステップS104の処理で無効フラグMFが無効のとなっている場合、すべての管理部Kのリードが終了したかを確認し(ステップS108)、すべての管理部Kのリードが終了すると、エラーフラグEFが’1’のブロックにおける管理部Kを再リードし(ステップS109,S110)、最新のテーブルデータの履歴情報を履歴情報テーブルRTに残す(ステップS111)。   After the process of step S107 or when the invalid flag MF is invalid in the process of step S104, it is confirmed whether reading of all the management units K is completed (step S108), and reading of all the management units K is performed. Is completed, the management unit K in the block whose error flag EF is “1” is re-read (steps S109 and S110), and the history information of the latest table data is left in the history information table RT (step S111).

たとえば、2つの有効なテーブル番号TBLNo.0のプライマリブロックPBが存在し、有効セクタフラグYFがセクタCA00のブロックとセクタCA07のブロックであり、ペアのブロックであるテーブル番号TBLNo.100のセカンダリブロックSBでセクタCA07が有効の場合、セクタCA07のプライマリブロックPBを有効なデータとして選択する。   For example, two valid table numbers TBLNo. 0, a valid sector flag YF is a block of sector CA00 and a block of sector CA07, and table number TBLNo. When the sector CA07 is valid in 100 secondary blocks SB, the primary block PB of the sector CA07 is selected as valid data.

つまり、更新順序の整合性の取れる有効セクタフラグYFを持つブロックを最新のブロックとして選択する。   That is, the block having the valid sector flag YF that can be consistent in the update order is selected as the latest block.

ステップS111の処理の終了後、またはステップS109の処理においてエラーフラグEF(’1’)がない場合、テーブルデータ(セクタデータ)をリードし(ステップS112)、ECCなどのエラー検出/訂正用冗長コードCDによりデータのチェックを行う(ステップS113)。   Table data (sector data) is read after completion of the processing in step S111 or when there is no error flag EF ('1') in the processing in step S109 (step S112), and error detection / correction redundancy code such as ECC Data is checked using the CD (step S113).

そして、すべてのテーブルデータをリードすると(ステップS114)、リセット処理が終了となる。また、ステップS113の処理において、NGの場合には、テーブルデータのリード回数が1回以下か否かを確認する(ステップS115)。   When all the table data are read (step S114), the reset process is completed. In the process of step S113, in the case of NG, it is confirmed whether or not the read count of the table data is 1 or less (step S115).

このステップS115の処理において、テーブルデータのリード回数が1回以下の場合には、1つ前に更新したテーブルデータがあるか否かを検索する(ステップS116)。ステップS116の処理において、1つ前に更新したテーブルデータがある場合には、そのテーブルデータをリードし、同様にECCなどのエラー検出/訂正用冗長コードCDによりデータのチェックを行い、履歴格納部12の履歴情報テーブルRTを更新する(ステップS117)。   In the process of step S115, if the number of times the table data is read is one or less, it is searched whether there is table data updated one time before (step S116). If there is table data updated immediately before in the processing of step S116, the table data is read, and the data is similarly checked with an error detection / correction redundant code CD such as ECC, and the history storage unit 12 history information tables RT are updated (step S117).

また、ステップS115の処理において、テーブルデータのリード回数が2回以上の場合には(たとえば、プライマリブロックPBがNGの場合には、セカンダリブロックSBを参照し、それ以上は遡らない)、エラー終了する(ステップS118)。このように、2つ前以前に更新されたテーブルデータを使用しないことにより、データの信頼性を高めることができる。   In the process of step S115, if the number of times of reading the table data is 2 times or more (for example, if the primary block PB is NG, the secondary block SB is referred to and the process does not go back further). (Step S118). Thus, the reliability of data can be improved by not using the table data updated two times before.

さらに、ステップS116の処理において、1つ前に更新したテーブルデータがない場合には、エラー終了する(ステップS118)。   Furthermore, in the process of step S116, if there is no previous table data updated, the process ends with an error (step S118).

次に、メモリカード1における書き込み処理について、図12のフローチャートを用いて説明する。   Next, the writing process in the memory card 1 will be described using the flowchart of FIG.

まず、メモリカード1が、ホスト機器2からのライトコマンドを受け付けると、履歴格納部12における履歴情報テーブルRTのフラグ情報を確認する(ステップS201)。すべてのテーブルブロックにおいてエラーフラグEFが’1’であるかチェックをする(ステップS202)。   First, when the memory card 1 receives a write command from the host device 2, the flag information of the history information table RT in the history storage unit 12 is confirmed (step S201). It is checked whether the error flag EF is “1” in all table blocks (step S202).

エラーフラグEFが’1’のブロックがある場合、古いブロックを無効にするため、古いブロックに対して無効化フラグ’FF’を書き込むと同時にエラーフラグEF=0をクリアする(ステップS203)。   If there is a block with the error flag EF of “1”, the invalidation flag “FF” is written to the old block in order to invalidate the old block, and at the same time, the error flag EF = 0 is cleared (step S203).

続いて、ステップS202、またはステップS203の処理後、セクタCA07をチェックし(ステップS204)、セクタCA07が有効の場合には、新しいブロック(旧データとは異なる別の空きブロック)に対して履歴情報RJを生成し(ステップS205)、新しいテーブルデータと管理情報K(履歴情報RJ含)とを新たなブロックに書き込む(ステップS206)。その後、古いブロックの無効フラグMFに書き込みを行い無効化する(ステップS207)。   Subsequently, after the processing in step S202 or step S203, the sector CA07 is checked (step S204). If the sector CA07 is valid, history information for a new block (another free block different from the old data) is stored. RJ is generated (step S205), and new table data and management information K (including history information RJ) are written into a new block (step S206). Thereafter, the invalidation flag MF of the old block is written and invalidated (step S207).

ステップS204の処理において、セクタCA07が有効でない場合、履歴情報RJを生成し(ステップS208)、新しいテーブルデータと有効セクタフラグYFを同一ブロックに追記書き込みする(ステップS209)。   If the sector CA07 is not valid in the process of step S204, history information RJ is generated (step S208), and new table data and a valid sector flag YF are additionally written in the same block (step S209).

そして、ステップ207、またはステップS209の処理が終了すると、履歴格納部12の履歴情報テーブルRTを更新し(ステップS210)、書き込み処理が終了となる。   When the processing in step 207 or step S209 ends, the history information table RT in the history storage unit 12 is updated (step S210), and the writing process ends.

次に、メモリカード1における書き込みエラー処理におけるフローチャートを図13を用いて説明する。   Next, a flowchart of the write error process in the memory card 1 will be described with reference to FIG.

まず、書き込み処理中にエラーが発生すると、別の新しいブロックに再書き込みを行う(ステップS301)。その後、エラーが発生したブロックを不良化するために、ブロックの管理部Kにおける良ブロックコードBCに不良コード(たとえば、’FF’)を書き込み(ステップS302)不良登録ブロックFTに不良化したブロックのアドレスを登録する(ステップS303)。   First, when an error occurs during the writing process, rewriting is performed on another new block (step S301). Thereafter, in order to make the block in which the error has occurred defective, the defect code (eg, 'FF') is written in the good block code BC in the block management unit K (step S302). An address is registered (step S303).

それにより、本実施の形態によれば、フラッシュメモリ3の消去回数を大幅に低減することができるので、該フラッシュメモリ3の性能低下を抑制することができる。   As a result, according to the present embodiment, the number of erases of the flash memory 3 can be significantly reduced, so that a decrease in performance of the flash memory 3 can be suppressed.

また、データにエラーが発生した際に、1つ前に更新したテーブルデータをバックアップデータとして用いることにより、メモリカード1の信頼性を向上させることができる。   Further, when an error occurs in the data, the reliability of the memory card 1 can be improved by using the previously updated table data as the backup data.

さらに、本実施の形態では、リセット処理において、2つ前以前に更新されたテーブルデータは使用せずにデータの信頼性を高めていたが(図11、ステップS116)、2つ前以前に更新されたテーブルデータを使用する処理を行うようにしてもよい。   Further, in the present embodiment, in the reset process, the table data updated two times before is not used and the reliability of the data is improved (FIG. 11, step S116). You may make it perform the process which uses the set table data.

図14は、2つ前以前に更新されたテーブルデータを使用する際の履歴格納部12に格納される履歴情報テーブルRTの一例を示す説明図である。   FIG. 14 is an explanatory diagram showing an example of a history information table RT stored in the history storage unit 12 when using table data updated two times before.

履歴情報テーブルRTは、図示するように、オフセットブロックアドレスBA、プライマリ/セカンダリ選択部PSS、エラーフラグEF、初期化フラグRF、およびブロック内有効セクタ位置YCPからなる図10に示す構成に、リードエラー(R_ERR)フラグREFが新たに追加された構成となっている。   As shown in the figure, the history information table RT has a configuration shown in FIG. 10 consisting of an offset block address BA, a primary / secondary selector PSS, an error flag EF, an initialization flag RF, and a valid sector position YCP in a block. The (R_ERR) flag REF is newly added.

このリードエラーフラグREFは、テーブルデータにECCなどの冗長データによる訂正不可のエラーが発生し、1つ以上前に更新されたテーブルデータを参照していることを示すフラグである。   The read error flag REF is a flag indicating that an uncorrectable error due to redundant data such as ECC has occurred in the table data, and that one or more previous updated table data is being referenced.

この場合のメモリカード1におけるリセット処理について、図15のフローチャートを用いて説明する。   The reset process in the memory card 1 in this case will be described using the flowchart of FIG.

まず、図11に示すステップS101〜S111の処理が行われる。その後、図15に示すように、テーブルデータ(セクタデータ)をリードし(ステップS401)、ECCなどのエラー検出/訂正用冗長コードCDによりデータのチェックを行う(ステップS402)。そして、すべてのテーブルデータをリードすると(ステップS403)、リセット処理が終了となる。   First, the processes of steps S101 to S111 shown in FIG. 11 are performed. After that, as shown in FIG. 15, the table data (sector data) is read (step S401), and the data is checked with the error detection / correction redundant code CD such as ECC (step S402). When all the table data are read (step S403), the reset process ends.

また、ステップS402の処理において、NGの場合には、テーブルデータのリード回数が1回以下か否かを確認する(ステップS404)。このステップS404の処理において、テーブルデータのリード回数が1回以下の場合には、1つ前に更新したテーブルデータがあるか否かを検索する(ステップS405)。   In the process of step S402, in the case of NG, it is confirmed whether or not the read count of the table data is 1 or less (step S404). In the process of step S404, if the number of times table data is read is one or less, a search is made as to whether there is table data updated immediately before (step S405).

ステップS405の処理において、1つ前に更新したテーブルデータがある場合には、そのテーブルデータをリードし、同様にECCなどのエラー検出/訂正用冗長コードCDによりデータのチェックを行い、履歴格納部12の履歴情報テーブルRTを更新した後(ステップS406)、ステップ403の処理を行う。   In the process of step S405, if there is table data updated immediately before, the table data is read, and similarly, the data is checked by the error detection / correction redundant code CD such as ECC, and the history storage unit After the 12 history information tables RT are updated (step S406), the process of step 403 is performed.

また、ステップS404の処理において、テーブルデータのリード回数が2回以上の場合には、MPU6にリード回数が2回以上のテーブルデータであることを通知するようにリードエラーフラグREFを’1’にし(ステップS407)、ステップS405の処理を行う。   In the process of step S404, if the number of times of reading the table data is two or more, the read error flag REF is set to “1” so as to notify the MPU 6 that the table data is read twice or more. (Step S407) and Step S405 are performed.

さらに、ステップS405の処理において、1つ前に更新したテーブルデータがない場合には、エラー終了する(ステップS408)。   Furthermore, in the process of step S405, if there is no table data updated immediately before, the process ends with an error (step S408).

また、図15のリセット処理後の書き込み処理について、図16を用いて説明する。   Further, the writing process after the reset process of FIG. 15 will be described with reference to FIG.

この図16では、図12に示すステップS201,S202,S204〜S210の処理は同じであり、異なる処理(ステップS203の処理)の部分のみを示している。   In FIG. 16, the processes of steps S201, S202, and S204 to S210 shown in FIG. 12 are the same, and only the part of the different process (the process of step S203) is shown.

まず、メモリカード1が、ホスト機器2からのライトコマンドを受け付け、履歴格納部12における履歴情報テーブルRTのフラグ情報を確認し(ステップS201)、すべてのテーブルブロックにおいてエラーフラグEFが’1’であるかチェックをする(ステップS202)。   First, the memory card 1 receives a write command from the host device 2 and checks the flag information of the history information table RT in the history storage unit 12 (step S201), and the error flag EF is '1' in all the table blocks. A check is made (step S202).

エラーフラグEFが’1’のブロックがある場合、図16に示すように、リードエラーフラグEFRが’1’となっているか否かを確認する(ステップS501)。リードエラーフラグEFRが’1’の場合には、履歴情報RJを生成し(ステップS502)、新しいテーブルデータと管理情報K(履歴情報RJ含)を新たなブロックに書き込む(ステップS503)。   If there is a block with an error flag EF of “1”, as shown in FIG. 16, it is confirmed whether or not the read error flag EFR is “1” (step S501). When the read error flag EFR is “1”, history information RJ is generated (step S502), and new table data and management information K (including history information RJ) are written into a new block (step S503).

また、ステップS501の処理でエラーフラグEFが’1’のブロックがない場合、またはステップS503の処理後、古いブロックの無効フラグMFに書き込みを行い、古いテーブルデータの無効化を行う(ステップS504)。その後は、図12に示すステップS204〜S210の処理を行う。   If there is no block having the error flag EF of “1” in the process of step S501, or after the process of step S503, the old table data is invalidated by writing to the invalid flag MF of the old block (step S504). . Thereafter, steps S204 to S210 shown in FIG. 12 are performed.

図14、および図15に示す処理をユーザデータに適用した場合、該ユーザデータの書き換え回数の多い領域に使用することによって消去回数が低減でき、メモリカード1の信頼性を向上させることができる。   When the processes shown in FIGS. 14 and 15 are applied to user data, the number of erasures can be reduced by using the user data in an area where the number of rewrites of the user data is large, and the reliability of the memory card 1 can be improved.

以上、本発明者によってなされた発明を実施の形態に基づき具体的に説明したが、本発明は前記実施の形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。   As mentioned above, the invention made by the present inventor has been specifically described based on the embodiment. However, the present invention is not limited to the embodiment, and various modifications can be made without departing from the scope of the invention. Needless to say.

たとえば、前記実施の形態においては、1つのフラッシュメモリの各ブロックに履歴情報を含む管理部とデータ部とを格納した構成としたが、図17に示すように、複数のフラッシュメモリ31 〜3n を設け、(任意の)フラッシュメモリ31 に履歴情報を格納し、その他のフラッシュメモリ32 〜3n には、該履歴情報と関連付けされたデータ部と管理部とを格納する構成とし、フラッシュメモリ32 〜3n における各ブロックを管理するようにしてもよい。 For example, in the above-described embodiment, a configuration in which a management unit including history information and a data unit are stored in each block of one flash memory is used. However, as shown in FIG. 17, a plurality of flash memories 3 1 to 3 are used. the n provided to store the history information (optional) flash memory 3 1, other flash memory 3 2 to 3 n, a configuration for storing and a management unit data unit which is associated with the subsequent history information, Each block in the flash memories 3 2 to 3 n may be managed.

それにより、複数のフラッシュメモリ31 〜3n のデータ管理を容易にすることができる。 Thereby, data management of the plurality of flash memories 3 1 to 3 n can be facilitated.

また、図17に示したデータ管理技術は、複数のメモリシステムにおけるデータを管理する場合にも有効である。   The data management technique shown in FIG. 17 is also effective when managing data in a plurality of memory systems.

この場合、メモリカードなどを備えたメモリシステムMS1〜MS3は、図18に示すように、有線ネットワーク、あるいは無線ネットワークなどの回線Lにそれぞれ接続される構成からなる。   In this case, the memory systems MS1 to MS3 each including a memory card are configured to be connected to a line L such as a wired network or a wireless network, as shown in FIG.

そして、(任意の)メモリシステムMS1には履歴情報のみを格納し、その他のメモリシステムMS2,MS3には、該履歴情報と関連付けされたデータ部と管理部とを格納する。   Then, only the history information is stored in the (arbitrary) memory system MS1, and the data section and the management section associated with the history information are stored in the other memory systems MS2 and MS3.

これらメモリシステムMS1〜MS3は、同様に回線Lに接続されたホスト機器2から制御を行う。これにより、複数のメモリシステムMS1〜MS3を一括で管理することができる。   These memory systems MS1 to MS3 are similarly controlled from the host device 2 connected to the line L. Thereby, the plurality of memory systems MS1 to MS3 can be managed collectively.

本発明のメモリカードは、不揮発性半導体メモリにおける性能低下の抑制、および該メモリカードの信頼性の向上技術に適している。   The memory card of the present invention is suitable for suppressing performance deterioration in a nonvolatile semiconductor memory and improving the reliability of the memory card.

本発明の一実施の形態による記憶システムのブロック図である。1 is a block diagram of a storage system according to an embodiment of the present invention. 図1の記憶システムを構成するメモリカードに設けられたコントローラのブロック図である。FIG. 2 is a block diagram of a controller provided in a memory card configuring the storage system of FIG. 1. 図1の記憶システムを構成するメモリカードに設けられたフラッシュメモリにおけるメモリアレイの構成例を示す説明図である。FIG. 2 is an explanatory diagram showing a configuration example of a memory array in a flash memory provided in a memory card configuring the storage system of FIG. 1. 図3のメモリセルアレイにおけるメモリマップの構成例を示す説明図である。FIG. 4 is an explanatory diagram showing a configuration example of a memory map in the memory cell array of FIG. 3. 図4のメモリアレイに格納されるテーブルデータの更新手順を示す説明図である。FIG. 5 is an explanatory diagram showing a procedure for updating table data stored in the memory array of FIG. 4. 図3のメモリアレイにおけるブロックの構成例を示す説明図である。FIG. 4 is an explanatory diagram showing a configuration example of a block in the memory array of FIG. 3. 図6のブロックに設けられたデータ部の構成例を示す説明図である。It is explanatory drawing which shows the structural example of the data part provided in the block of FIG. 図6のブロックに設けられた管理部の構成例を示す説明図である。It is explanatory drawing which shows the structural example of the management part provided in the block of FIG. 図6のブロックにおける無効/有効セクタと履歴情報との関係を示す説明図である。FIG. 7 is an explanatory diagram showing a relationship between invalid / valid sectors and history information in the block of FIG. 6. 図2のコントローラに設けられた履歴格納部に格納される履歴情報テーブルの構成例を示す説明図である。It is explanatory drawing which shows the structural example of the log | history information table stored in the log | history storage part provided in the controller of FIG. 図1のメモリカードにおけるリセット処理を示すフローチャートである。3 is a flowchart showing reset processing in the memory card of FIG. 1. 図1のメモリカードにおける書き込み処理を示すフローチャートである。3 is a flowchart showing a writing process in the memory card of FIG. 1. 図1のメモリカードにおける書き込みエラー処理を示すフローチャートである。3 is a flowchart showing a write error process in the memory card of FIG. 1. 本発明の他の実施の形態によるコントローラに設けられた履歴格納部に格納される履歴情報テーブルの構成例を示す説明図である。It is explanatory drawing which shows the structural example of the log | history information table stored in the log | history storage part provided in the controller by other embodiment of this invention. 本発明の他の実施の形態によるメモリカードのリセット処理を示すフローチャートである。It is a flowchart which shows the reset process of the memory card by other embodiment of this invention. 本発明の他の実施の形態によるメモリカードの書き込み処理を示すフローチャートである。It is a flowchart which shows the write-in process of the memory card by other embodiment of this invention. 本発明の他の実施の形態によるメモリカードに設けられたフラッシュメモリの構成例を示す説明図である。It is explanatory drawing which shows the structural example of the flash memory provided in the memory card by other embodiment of this invention. 本発明の他の実施の形態によるメモリシステムの構成例を示す説明図である。It is explanatory drawing which shows the structural example of the memory system by other embodiment of this invention.

符号の説明Explanation of symbols

1 メモリカード
2 ホスト機器
3 フラッシュメモリ(不揮発性半導体メモリ)
1 〜3n フラッシュメモリ(不揮発性半導体メモリ)
4 コントローラ
5 ホスト側インタフェース
6 MPU
7 バッファインタフェース
8 データバッファ
9 外部記憶インタフェース
10 履歴検出部
11 履歴生成部
12 履歴格納部
MA メモリアレイ
GBL グローバルビット線
SBL サブビット線
S 不揮発性メモリセル
WL ワード線
ST1,ST2 ストリング
PB プライマリブロック
SB セカンダリブロック
FT 不良登録ブロック
D データ部
K,K1,K2 管理部
CA00〜CA07 セクタ
BC 良ブロックコード
KJ 管理情報
TBLNo. テーブル番号
CD エラー検出/訂正用冗長コード
RJ 履歴情報
RT 履歴情報テーブル
MF 無効フラグ
YF 有効セクタフラグ
BA オフセットブロックアドレス
PSS プライマリ/セカンダリ選択部
EF エラーフラグ
RF 初期化フラグ
YCP ブロック内有効セクタ位置
REF リードエラーフラグ
MS1〜MS3 メモリシステム
L 回線
HC ホストコンピュータ
1 Memory card 2 Host device 3 Flash memory (nonvolatile semiconductor memory)
3 1 to 3 n flash memory (nonvolatile semiconductor memory)
4 Controller 5 Host side interface 6 MPU
7 Buffer interface 8 Data buffer 9 External storage interface 10 History detection unit 11 History generation unit 12 History storage unit MA Memory array GBL Global bit line SBL Sub bit line S Non-volatile memory cell WL Word line ST1, ST2 String PB Primary block SB Secondary block FT failure registration block D data part K, K1, K2 management part CA00 to CA07 sector BC good block code KJ management information TBLNo. Table number CD Redundancy code for error detection / correction RJ History information RT History information table MF Invalid flag YF Valid sector flag BA Offset block address PSS Primary / secondary selector EF Error flag RF Initialization flag YCP Valid sector position in block REF Read error flag MS1-MS3 Memory system L Line HC Host computer

Claims (2)

複数の不揮発性メモリセルを有し、所定の情報を格納可能な不揮発性半導体メモリと、
外部から発行されたコマンドに基づいて前記不揮発性半導体メモリの動作指示を行うコントローラとを備えたメモリカードであって、
前記不揮発性メモリセルの消去単位となるブロックに格納されている最新のセクタデータの位置を管理する履歴情報テーブルを格納する履歴情報テーブル格納部を備え、
前記コントローラは、
前記不揮発性メモリセルの消去単位となるブロックにセクタデータを更新する際に、前記ブロックの空きセクタに順次セクタデータの書き込みを行い、前記ブロックに空きセクタがなくなると前記ブロックのセクタデータを消去した後、任意の前記空きセクタから順次セクタデータを書き込み、
前記履歴情報テーブル格納部に格納された履歴情報テーブルに基づいて最新のセクタデータの位置を管理し、
前記メモリカードのリセット処理時に、セクタデータに格納された管理情報に基づいて最新のセクタデータの位置を獲得し、前記履歴情報テーブル格納部に履歴情報テーブルとして格納することを特徴とするメモリカード。
A nonvolatile semiconductor memory having a plurality of nonvolatile memory cells and capable of storing predetermined information;
A memory card comprising a controller for instructing operation of the nonvolatile semiconductor memory based on a command issued from the outside,
A history information table storage unit that stores a history information table that manages the position of the latest sector data stored in a block that is an erase unit of the nonvolatile memory cell;
The controller is
When updating sector data to a block that is an erase unit of the nonvolatile memory cell, sector data is sequentially written to an empty sector of the block, and the sector data of the block is erased when there is no empty sector in the block. after, it writes sequentially sector data from any of the free sectors,
Manage the position of the latest sector data based on the history information table stored in the history information table storage unit,
A memory card characterized in that, at the time of reset processing of the memory card, a position of the latest sector data is obtained based on management information stored in sector data and stored as a history information table in the history information table storage unit .
請求項記載のメモリカードにおいて、
前記履歴情報テーブル格納部は、揮発性半導体メモリであることを特徴とするメモリカード。
The memory card according to claim 1 ,
The history information table storage unit is a volatile semiconductor memory.
JP2004219561A 2004-07-28 2004-07-28 Memory card Expired - Fee Related JP4684587B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004219561A JP4684587B2 (en) 2004-07-28 2004-07-28 Memory card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004219561A JP4684587B2 (en) 2004-07-28 2004-07-28 Memory card

Publications (2)

Publication Number Publication Date
JP2006039983A JP2006039983A (en) 2006-02-09
JP4684587B2 true JP4684587B2 (en) 2011-05-18

Family

ID=35904910

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004219561A Expired - Fee Related JP4684587B2 (en) 2004-07-28 2004-07-28 Memory card

Country Status (1)

Country Link
JP (1) JP4684587B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012212487A (en) * 2011-03-30 2012-11-01 Toshiba Corp Memory system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0527924A (en) * 1991-07-12 1993-02-05 Internatl Business Mach Corp <Ibm> External storage system using semiconductor memory and control method thereof
JP2004127185A (en) * 2002-10-07 2004-04-22 Renesas Technology Corp Memory card
JP2004206615A (en) * 2002-12-26 2004-07-22 Matsushita Electric Ind Co Ltd Storage device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0527924A (en) * 1991-07-12 1993-02-05 Internatl Business Mach Corp <Ibm> External storage system using semiconductor memory and control method thereof
JP2004127185A (en) * 2002-10-07 2004-04-22 Renesas Technology Corp Memory card
JP2004206615A (en) * 2002-12-26 2004-07-22 Matsushita Electric Ind Co Ltd Storage device

Also Published As

Publication number Publication date
JP2006039983A (en) 2006-02-09

Similar Documents

Publication Publication Date Title
US8713381B2 (en) Systems and methods of using dynamic data for wear leveling in solid-state devices
JP4675984B2 (en) Memory system
US9996462B1 (en) Data storage device and data maintenance method thereof
TWI400610B (en) Memory system
US9442841B2 (en) Semiconductor memory device and method for logging monitored events into a buffer
WO2007023674A1 (en) Memory controller, nonvolatile storage, nonvolatile memory system, and method for writing data
JP2009205555A (en) Memory system
JP2010152514A (en) Memory system
JPWO2007000862A1 (en) MEMORY CONTROLLER, NONVOLATILE MEMORY DEVICE, NONVOLATILE MEMORY SYSTEM, AND DATA WRITE METHOD
JPWO2005083573A1 (en) Semiconductor memory device
US10884652B2 (en) Trim command recording method, memory control circuit unit and memory storage device
US11467758B2 (en) Data writing method using different programming modes based on the number of available physical erasing units, memory control circuit unit and memory storage device
TWI769571B (en) Storage devices and storage systems
JP2010079856A (en) Storage device and memory control method
US8527733B2 (en) Memory system
JP4956230B2 (en) Memory controller
JP2007179479A (en) Memory controller and flash memory system
JP2012068765A (en) Memory controller, flash memory system with memory controller, and control method of flash memory
JP4684587B2 (en) Memory card
JP2010128697A (en) Memory system
JP4866114B2 (en) MEMORY CONTROLLER, NONVOLATILE MEMORY DEVICE, NONVOLATILE MEMORY SYSTEM, AND MEMORY CONTROL METHOD
JP4558052B2 (en) Memory system
JP2009217754A (en) Memory system
JP2006048746A (en) Memory card
JP2012037971A (en) Memory controller, nonvolatile memory system provided with memory controller, and method for controlling nonvolatile memory

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070718

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20100528

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101026

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101102

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101228

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110209

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

Free format text: PAYMENT UNTIL: 20140218

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees