JP2004240660A - Control method for nonvolatile memory device - Google Patents

Control method for nonvolatile memory device Download PDF

Info

Publication number
JP2004240660A
JP2004240660A JP2003028536A JP2003028536A JP2004240660A JP 2004240660 A JP2004240660 A JP 2004240660A JP 2003028536 A JP2003028536 A JP 2003028536A JP 2003028536 A JP2003028536 A JP 2003028536A JP 2004240660 A JP2004240660 A JP 2004240660A
Authority
JP
Japan
Prior art keywords
address
block
physical
nonvolatile memory
physical block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003028536A
Other languages
Japanese (ja)
Other versions
JP2004240660A5 (en
Inventor
Akio Takeuchi
昭夫 竹内
Juichi Shiyouraiden
重一 小来田
Hiroki Kikko
弘樹 橘高
Daisuke Kunimune
大介 国宗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2003028536A priority Critical patent/JP2004240660A/en
Publication of JP2004240660A publication Critical patent/JP2004240660A/en
Publication of JP2004240660A5 publication Critical patent/JP2004240660A5/ja
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a control method for an indirectly addressing type nonvolatile memory device quickly producing an address conversion table and an erasure management table in time of initialization. <P>SOLUTION: This control method for the indirectly addressing type nonvolatile memory device has: a registration step for registering an invalid physical block written with invalid data or written with valid data and related to no logical address, and an erasure-completed block, into the erasure management table as an erasure-completed block, and producing the first address conversion table wherein a plurality of logical addresses are assigned to one physical address at initialization; a decision step for extracting the erasure-completed block from the erasure management table and deciding whether the erasure-completed block is actually erased or not in data writing; an erasure step for erasing the block for non-erasure in the decision step; and a writing step for writing data after the erasure step. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、不揮発性半導体メモリシステムの制御方法に関し、特に不揮発性半導体メモリカードの制御方法に関する。
【0002】
【従来の技術】
近年、音楽や映像データを扱う携帯情報機器(例えば、携帯型パーソナルコンピュータ、デジタルスチールカメラ、PDA)の記憶装置として、フラッシュメモリ等の不揮発性メモリ装置が注目されている。
はじめに、不揮発性メモリ装置の構成について説明する。
図1は、不揮発性メモリ装置の構成を示すブロック図例である。図1において、101はホスト、102は不揮発性メモリ装置である。不揮発性メモリ装置102は、コントローラ111、アドレス変換テーブル112、消去管理テーブル113、ホストI/F部114、データバッファ115、メモリ制御部116、不揮発性メモリ117を有する。
【0003】
不揮発性メモリ117の構成について、512MビットNAND型フラッシュメモリを例にとり説明する。
図2は、不揮発性メモリ装置102の不揮発性メモリ117(512MビットNAND型フラッシュメモリ)の構成図例である。1個のフラッシュメモリは、4096個のブロックにより構成されている。1ブロックは消去の基本単位である。1ブロックはさらに32ページに分割される。1ページは読み出し及び書き込みの基本単位である。1ページの容量は528バイトである。528バイトのうち、512バイトはデータ領域、残り16バイトは冗長領域である。データ領域はユーザが使用する領域であり、冗長領域は不揮発性メモリ装置102のメモリ制御部116が使用する領域である。
【0004】
図18は、不揮発性メモリ装置102の不揮発性メモリ117(直接型のアドレッシングシステム)の1物理ブロックの構成図例である。書き込み開始フラグ301、論理アドレス302及びアドレステーブル無効化フラグ303は最初のページの冗長領域に配置されている。書き込み終了フラグ305は最終ページの冗長領域に配置されている。論理アドレス302及びアドレステーブル無効化フラグ303は、図18に示すページと異なるページに配置しても良い。これらのフラグ及びデータについては以下で説明する。
【0005】
一般的にフラッシュメモリを用いた不揮発性メモリ記憶装置においては、ホスト101などの外部から指定される論理アドレスと、フラッシュメモリ内に配置される物理アドレスとは一致しない。一致させるとフラッシュメモリ内で不良が発生したブロックのアドレスが使用できず、アプリケーションに負担をかけたり、あるいは特定アドレスに書き込みが頻発するシステムでは、そのアドレスに該当するブロックが短期間で書き替え保証回数を上回り、短寿命になってしまうという不都合があるからである。
【0006】
物理ブロックはそれ自身が割り当てられている(関連付けられている)論理アドレスを冗長領域の中(図18の論理アドレス302)に記憶している。メモリ制御部116は、不揮発性メモリ装置102を装着したホスト101の電源が投入された時または不揮発性メモリ装置102がホストに挿入された時に、不揮発性メモリ102の冗長領域に書かれているすべての論理アドレス302を読み出す。なお、これらの初期テーブル作成及びホストからのコマンド解析等は、コントローラ111が行うケースがあるが、以降メモリ制御部116が処理を行うものとして説明する。メモリ制御部116は、論理アドレスと物理アドレスを変換するためのアドレス変換テーブル112を作成する。また同時にメモリ制御部116は、各ブロックが消去されているか否かを調べ、消去管理テーブル113を作成する。アドレス変換テーブル112及び消去管理テーブル113は、RAM上に作成される。
【0007】
メモリ制御部116は、データ読み出しコマンドがホスト101から不揮発性メモリ装置102に入力された時に、ホスト101から指定された論理アドレスに基づきアドレス変換テーブル112で物理アドレスを特定する。メモリ制御部116は、特定した物理ブロックにアクセスし、データを読み出す。
メモリ制御部116は、データ書き込みコマンドがホスト101から不揮発性メモリ装置102に入力された時に、消去管理テーブル113から消去済みブロックを抽出する。メモリ制御部116は、抽出されたブロックにデータを書き込み、データを書き込んだ物理ブロックをアドレス変換テーブル112に登録する。ホスト101から指定された論理アドレスがすでに登録されている場合は、データ書き込み処理は上書きになる。上書きの場合、メモリ制御部116は、アドレス変換テーブル112の旧物理ブロックを消去し、アドレス変換テーブル112にデータを書き込んだ新物理ブロックを登録する。書き込みでは物理ブロックの消去状態が変化するため、メモリ制御部116は、消去管理テーブル113の該当ブロックの情報を更新する。
【0008】
上述のアドレス変換テーブル112においては、1論理ブロック(1論理アドレス)に対し1物理ブロック(1物理アドレス)を直接割り当てていた。この場合、不揮発性メモリ117の容量が大きくなることに比例してアドレス変換テーブル112のRAMサイズも大きくなり、不揮発性メモリ装置102が高価になるという問題があった。
このためアドレス変換テーブルの1物理アドレス(「1次物理アドレス」と呼ぶ。)に複数(k個)の論理ブロック(論理アドレス)を割り当て、その物理アドレスで指定される物理ブロックの冗長領域にそれらの複数の論理アドレスにそれぞれ関連付けられた複数の物理アドレス(「2次物理アドレス」と呼ぶ。)を格納したアドレステーブルを持たせる間接型のアドレッシングシステムが考えられている。
【0009】
図3は、不揮発性メモリ装置102の不揮発性メモリ(間接型のアドレッシングシステム)の1物理ブロックの構成図例である。図3において、図18と同一のブロックには同一の符号を付している。図3が図18と異なる点は、2ページ目の冗長領域にアドレステーブル304を追加したことである。アドレステーブル304には、k個(kは2以上の正整数)の論理ブロックにそれぞれ関連付けられたk個の物理ブロックのアドレス(2次物理アドレス)が書き込まれている。図3においては、1次物理アドレス(アドレステーブル304が書き込まれた物理ブロックのアドレス)は、アドレステーブル304にも、2次物理アドレスの1アドレスとして記載されている。アドレステーブル304に記載されたk個の物理アドレスは、k個の連続する論理アドレスに、先頭から順番にそれぞれ関連付けられている。アドレステーブル304は、図3に示すページと異なるページに配置しても良い。それ以外の点で、図3は図18と同様であるため説明を省略する。
図4は、不揮発性メモリ装置102におけるアドレス変換テーブル112、消去管理テーブル113及び不揮発性メモリ117の関係を示す図である。この例では、k=2、つまりアドレス変換テーブル112の1物理アドレスに2つの論理アドレスが割り当てられている。
【0010】
メモリ制御部116は、データ読み出しコマンドがホスト101から不揮発性メモリ装置102に入力された時に、ホスト101から指定された論理アドレスに基づきアドレス変換テーブル112で1次物理アドレスを特定する。さらに、メモリ制御部116は、特定した1次物理ブロックの冗長領域のアドレステーブル304から本来の物理アドレス(ホスト101から指定された論理アドレスに関連付けられた物理アドレス)を特定する。メモリ制御部116は、特定した本来の物理ブロックにアクセスし、データを読み出す。またこの例では、目的のデータを得るために2回テーブルを参照しているが、2回以上テーブルを参照するシステムも可能である。段数が増えれば、アドレス変換テーブルのサイズを小さくすることができるが、テーブル異常で失うブロック数が多くなる欠点がある。
【0011】
メモリ制御部116は、データ書き込みコマンドがホスト101から不揮発性メモリ装置102に入力された時に、始めに消去管理テーブル113から未記録の物理ブロックを検索する。メモリ制御部116は、アドレス変換テーブル112に登録されている物理ブロックのアドレステーブル304を読み出す。メモリ制御部116は、アドレステーブル304の2次物理アドレスの1アドレスをこれから書き込みを行う物理ブロックのアドレス(検索した未記録の物理ブロック)に置き換えて、更新されたアドレステーブル情報とし、データと合せて未記録の物理ブロックに書き込む。書き込みが終了したら、メモリ制御部116は新物理ブロックアドレスをアドレス変換テーブル112に登録する。メモリ制御部116は、旧テーブルを持つブロックのアドレステーブル無効化フラグを上書きにより無効マークする。なお無効化するのは冗長領域にあるアドレステーブルのみで、データが無効になるとは限らない。例えば旧アドレステーブル304を格納していた物理ブロックが関連付けられた論理アドレス以外の論理アドレス(アドレステーブル304に含まれる。)のデータが書き換えられる場合である。この場合、旧アドレステーブル304を格納していた物理ブロックは、新アドレステーブルからリンクされる。なおこの間接アドレッシングシステムにおいても書き込みあるいは消去が行われた場合、消去管理テーブル113の情報を更新するのは同様である。
【0012】
また書き込みは常に正常に行われるとは限らない。書き込み、消去途中で電源オフ(カード抜き取り)等による中断が発生することについても考慮する必要がある。書き込み開始フラグ301は、書き込みを行う場合に先立ちマークされるものである。このため、書き込み開始フラグ301を検査することにより、そのブロックが消去済みか否かを判断できる。書き込み終了フラグ305は、そのブロックへの書き込みが完了した時に上書きによりマークされるものである。このため、書き込み終了フラグ305を検査することにより、そのブロックへの書き込みが中断したか否かを判断できる。
つまり消去済みブロックは、書き込み開始フラグ301及び書き込み終了フラグ305が共にマーク無である。書き込み完了したブロックは、書き込み開始フラグ301及び書き込み終了フラグ305が共にマーク有である。書き込みが中断した未完成のブロックは、書き込み開始フラグ301がマーク有、書き込み終了フラグ305がマーク無である。書き込みが中断した未完成のブロックのデータは使用しない。再利用するため消去を行い消去管理テーブルへ消去済みとして登録する。
【0013】
次に、間接型のアドレッシングを有する不揮発性メモリを有する不揮発性メモリ装置において、従来の初期化時のアドレス変換テーブル及び消去管理テーブルの作成方法の概要について説明する。
なお以下は、不揮発性メモリ消去時のレベルを1、マーク有の各フラグのレベルを0、また消去管理テーブル113のフラグは、消去済みを1、使用中を0として説明する。
最初にアドレス変換テーブル112及び消去管理テーブル113を初期化(詳細は後述)する。次に物理ブロックを順に全て検査を行い、テーブルを作成していく。アドレス変換テーブル112へは、書き込み終了フラグ305がマーク有で、アドレステーブル無効化フラグ303にマーク無のブロックを発見した場合、その冗長領域に書かれているアドレステーブル304の論理アドレスと同一の論理アドレス(アドレス変換テーブル112)の位置にその物理ブロックアドレスを登録する。消去管理テーブル113へは、書き込み開始フラグ301にマーク無のブロックを登録する(フラグを0とする。)。
【0014】
なお不良ブロックは、アドレス変換テーブル112へ登録せず、消去管理テーブル113へは書き込み対象にならないよう未消去として登録する。書き込みが中断された未完成のブロックは、消去を行い消去済みブロックとして消去管理ブロックへ登録する。さらに書き込み中断のタイミングによっては、アドレス変換テーブル112の同一の論理アドレスに2つの物理ブロックが重複して関連付けられる(それぞれの冗長領域に格納されたアドレステーブル304が同一の論理アドレスに関連付けられる)可能性がある。この場合、どちらのアドレステーブルが正しいか判断を行い、選択した物理ブロックのアドレスをアドレス変換テーブルへ登録し、非選択のブロックはアドレステーブル無効化フラグにマークを行い(アドレステーブル304を無効化し)、有効データならそのままにし、無効データなら消去を行う。
【0015】
この間接型アドレッシングのアドレス変換テーブル112を持つシステムでは、書き込みが完了しているが無効なブロックというものが存在する可能性がある。例えばアドレステーブルを持つブロックのアドレステーブルデータが異常になりリンクが失われた場合である。これは異常時の現象で、本来保持すべきデータが失われた不具合である。リンクが切れたブロックを放置しておくと、本来メモリ装置が持っている書き込み可能メモリ容量が永久に減少する不具合が発生する。しかし書き込み済みのブロックが有効か否かを判断するのは容易ではない。どのブロックのアドレステーブルからリンクされているかは全ブロックのアドレステーブルからリンクを検査しないと判明しないからである。
従って全物理ブロックを検査後、アドレス変換テーブルを使いリンク検査を行う。ここでリンクされていないブロックを抽出し、そのブロックの消去を行い、再利用可能にする必要がある。
【0016】
次に、間接型アドレッシングの不揮発性メモリを有する不揮発性メモリ装置において、従来の初期化時のアドレス変換テーブル及び消去管理テーブルの作成方法について2つの例を挙げて説明する。
図19、図20を用いて、従来例1の初期化時のテーブル作成方法について説明する。図19は、従来例1の不揮発性メモリ装置における初期化時のテーブル作成方法の概要フローチャートである。図20は、従来例1の不揮発性メモリ装置における初期化時のテーブル作成方法の過程を示す図である。図20の下線のある部分が、各工程における操作を表している。
【0017】
物理ブロックの状態を、消去済み、有効データ、無効データ、不良ブロックの4つに分類して説明する。
有効データには2種類ある。1つは、アドレステーブル無効化フラグ303が有効でアドレステーブル304を持つブロックである。もう1つは、アドレステーブル無効化フラグ303は無効であるが別ブロックのアドレステーブル無効化フラグ303が有効でその別ブロックのアドレステーブルからリンクされているブロック(データは有効)である。
無効データにも2種類ある。1つは、書き込み開始フラグはマーク有であるが書き込み終了フラグはマーク無のブロック(データ書き込み未完成のブロック)である。もう1つは、書き込み開始フラグ、書き込み終了フラグがともにマーク有のブロック(データ書き込み完成のブロック)だがリンクされず結果として使用されないブロックである。
【0018】
図19及び図20において、不揮発性メモリ装置102を装着したホスト101の電源が投入された時または不揮発性メモリ装置102がホストに挿入された時に、ステップ1901でアドレス変換テーブル及び消去管理テーブルは初期化される。全メモリを大きくブロック分けし、その切り替え時にテーブル初期化を行うシステムもあるが、電源投入時の初期化と同じである。具体的には、不揮発性メモリ装置102はアドレス変換テーブル112の全てを未割り付けにし、消去管理テーブル113の全てに1(消去済)を設定する。
ステップ1902及び1903の工程では、リンクが切れた無効データブロックを抽出することが目的となる。
ステップ1902で不揮発性メモリ装置102は全物理ブロックサーチする。
具体的には、不揮発性メモリ装置102は、全物理ブロックの冗長領域にある論理アドレス302を読み出すことにより、アドレス変換テーブル112を作成し、消去管理テーブル113の消去済みでない全てのブロックに0(使用中)を設定する。アドレス変換テーブル112作成において、未完成ブロックやアドレス重複時には、選択判定及び無効化処理を行う。
ステップ1903で不揮発性メモリ装置102は全論理リンクサーチする。具体的には、不揮発性メモリ装置102は、全論理アドレスのリンクをたどり、有効データに対応する消去管理テーブル113のブロックに1(消去済)を設定する。これにより、消去管理テーブルで0(使用中)になっているブロックは、不良ブロック及び無効データブロックである。
【0019】
ステップ1904で不揮発性メモリ装置102は消去管理テーブルを順にサーチし、消去管理テーブルが0(使用中)でかつ不良でないブロック(無効データブロック)を消去し、消去管理テーブル113のそのブロックに1(消去済)を設定する。
ステップ1905で不揮発性メモリ装置102は再度全論理リンクサーチする。具体的には、不揮発性メモリ装置102は、全論理アドレスのリンクをたどり、消去管理テーブル113の有効データに0(使用中)を設定する。これにより、アドレス変換テーブル112及び消去管理テーブル113は完成する。
【0020】
図21、図22を用いて、従来例2の初期化時のテーブル作成方法について説明する。従来例2の作成方法は、全論理リンクサーチは1度ですむが、消去管理テーブルと同サイズのバッファテーブルをRAM上に必要とする。図21は、従来例2の不揮発性メモリ装置における初期化時のテーブル作成方法の概要フローチャートである。図22は、従来例2の不揮発性メモリ装置における初期化時のテーブル作成方法の過程を示す図である。図22の下線のある部分が、各工程における操作を表している。
【0021】
図21及び図22において、不揮発性メモリ装置102を装着したホスト101の電源が投入された時または不揮発性メモリ装置102がホストに挿入された時に、ステップ2101でアドレス変換テーブル及び消去管理テーブルは初期化される。具体的には、不揮発性メモリ装置102はアドレス変換テーブル112の全てを未割り付けにし、消去管理テーブル113及びバッファテーブルの全てのブロックに1(消去済)を設定する。
ステップ2102及び2103の工程では、消去管理テーブル113を作成することと、リンクが切れた無効データブロックを抽出するために消去済みブロックのテーブルをバッファテーブルに作成することとを同時に行う。
ステップ2102で不揮発性メモリ装置102は全物理ブロックサーチする。
具体的には、不揮発性メモリ装置102は、全物理ブロックの冗長領域にある論理アドレス302を読み出すことにより、アドレス変換テーブル112を作成し、消去管理テーブル113の不良のブロックに0(使用中)を設定し、バッファテーブルの消去済みでない全てのブロックに0(使用中)を設定する。アドレス変換テーブル112作成において、未完成ブロックやアドレス重複ブロックを発見した時には、選択判定及び無効化処理を行う。
【0022】
ステップ2103で不揮発性メモリ装置102は全論理リンクサーチする。具体的には、不揮発性メモリ装置102は、全論理アドレスのリンクをたどり、有効データに対応する消去管理テーブル113のブロックに0(使用中)を設定する。これにより、消去管理テーブルで1(消去済)であり、バッファテーブルで0(使用中)になっているブロックは、無効データブロックであると判別できる。
ステップ2104で不揮発性メモリ装置102は消去管理テーブル、バッファテーブルを比較し、消去管理テーブルが1(消去済)でかつバッファテーブルが0(使用中)のブロック(無効データブロック)を消去し、消去管理テーブル113のそのブロックに1(消去済)を設定する。これにより、アドレス変換テーブル112及び消去管理テーブル113は完成する。
【0023】
【特許文献1】
特開平11−110283号公報
【0024】
【発明が解決しようとする課題】
しかしながら、近年のフラッシュメモリ及び不揮発性メモリ記憶装置の大容量化に伴い、初期化時のアドレス変換テーブル、消去管理テーブル作成処理時間が増大している。テーブル作成処理の高速化を行うためには、不要ブロックの検索、消去処理が大きな障害となっている。
全物理ブロック検査を行い、その後全論理ブロックのリンクを検査するのは必要だが、不要ブロックを抽出するために2度の論理ブロック検査が必要となり初期化時間が増大する。もしくは消去管理テーブルと同サイズのバッファテーブルを使用できれば1度の検査で可能だが、そのRAM容量分の増加がコストアップの要因となる。
また不要ブロックの消去についても、消去時間は読出しやフラグのマーク(上書き)に比べて多くの時間が必要であり、初期化時間短縮の障害となっている。
本発明は、このような問題点に鑑みてなされたものであり、初期化時にアドレス変換テーブル、消去管理テーブルを高速に作成可能な間接アドレッシング型の不揮発性メモリ装置の制御方法を提供することを目的とする。
本発明は、小さなRAM容量で論理アドレス/物理アドレス変換を行う間接アドレッシング型の不揮発性メモリ装置の制御方法を提供することを目的とする。
【0025】
【課題を解決するための手段】
上記課題を解決するため、本発明は下記の構成を有する。
請求項1に記載の発明は、複数の物理ブロックから成る不揮発性メモリと、1物理アドレスに複数の論理アドレスを割り当てた第1のアドレス変換テーブルと、消去済みのブロックを登録した消去管理テーブルと、を有し、前記物理ブロックはデータを格納するデータ領域と、前記物理ブロックに書き込まれたデータが有効か否かを判別する情報を格納した冗長領域と、を有し、前記第1のアドレス変換テーブルで指定された物理ブロックは、複数の論理アドレスに複数の物理アドレスを関連付けた第2のアドレス変換テーブルを有する、物理アドレスと論理アドレスとが間接的に関連付けられた不揮発性メモリ装置の制御方法であって、初期化時に、無効なデータが書き込まれており又は有効なデータが書き込まれているがどの論理アドレスにも関連付けられていない無効な物理ブロックと、消去済みのブロックと、を前記消去管理テーブルに消去済みブロックとして登録し、且つ前記第1のアドレス変換テーブルを生成する登録ステップと、データ書き込み時に、前記消去管理テーブルから消去済みブロックを抽出し、前記消去済みブロックが本当に消去されているかを判定する判定ステップと、前記判定ステップで未消去であれば前記ブロックを消去する消去ステップと、前記消去ステップ後に、データを書き込む書き込みステップと、を有することを特徴とする不揮発性メモリ装置の制御方法である。
【0026】
請求項2に記載の発明は、前記登録ステップは、全物理ブロックの前記第2のアドレス変換テーブルが有効に存在することを判別可能な1つの固定ページを連続して読み出し、次の物理ブロックの固定ページを読み出している間に前回固定ページを読み出した前の物理ブロックの仮判別を行い、前の物理ブロックが前記第2のアドレス変換テーブルを有する有効な物理ブロックであると仮判別したならば、前記第1のアドレス変換テーブルに前の物理ブロックを仮登録する仮登録ステップと、全物理ブロック検査後に、仮登録した物理ブロックについてのみ他の固定ページを読み出し、その物理ブロックを前記第1のアドレス変換テーブルに登録することが適切か否かを再判別し、その物理ブロックを登録することが適切でなければ仮登録を削除する仮登録削除ステップと、を更に有することを特徴とする請求項1に記載の不揮発性メモリ装置の制御方法である。
【0027】
請求項3に記載の発明は、前記登録ステップは、1つの論理アドレスに複数の物理ブロックが重複して関連付けられていた場合、重複した物理ブロックを予備テーブルに登録する予備テーブル登録ステップと、前記仮登録ステップ後又は前記仮登録削除ステップ後に、前記予備テーブルに登録した物理ブロックを読み出し、重複した物理ブロックの中から適切な物理ブロックを選択し、前記第1のアドレス変換テーブルに登録する第2の登録ステップと、を更に有することを特徴とする請求項2に記載の不揮発性メモリ装置の制御方法である。
【0028】
請求項4に記載の発明は、前記第2の登録ステップにおいて、重複した物理ブロックの中で、適切な物理ブロックとして選択されなかった物理ブロックの前記第2のアドレス変換テーブルに関連付けられたアドレステーブル無効化フラグを無効にし、初期化時にその物理ブロックを消去しないことを特徴とする請求項3に記載の不揮発性メモリ装置の制御方法である。
【0029】
本発明は、初期化時にアドレス変換テーブル、消去管理テーブルを高速に作成する間接アドレッシング型の不揮発性メモリ装置の制御方法を実現できるという作用を有する。
本発明は、小さなRAM容量で論理アドレス/物理アドレス変換を行う間接アドレッシング型の不揮発性メモリ装置の制御方法を実現できるという作用を有する。
【0030】
【発明の実施の形態】
以下、本発明の実施をするための最良の形態を具体的に示した実施例について、図面とともに記載する。
【0031】
《実施例1》
図1〜図11を用いて、本発明の実施例1の不揮発性メモリ装置における初期化方法について説明する。
はじめに、実施例1の不揮発性メモリ装置の構成について説明する。
図1は、不揮発性メモリ装置の構成を示すブロック図である。図2は、不揮発性メモリ装置102の不揮発性メモリ117(512MビットNAND型フラッシュメモリ)の構成図である。図3は、不揮発性メモリ装置102の不揮発性メモリ(間接型アドレッシングシステム)の1物理ブロックの構成図である。図4は、不揮発性メモリ装置102におけるアドレス変換テーブル112、消去管理テーブル113及び不揮発性メモリ117の関係を示す図である。本発明の実施例1の不揮発性メモリ装置の構成(図1〜図4)については、従来例と同様であるため説明を省略する。
【0032】
次に、実施例1の不揮発性メモリ装置における初期化時のアドレス変換テーブル及び消去管理テーブルの作成方法の概要について説明する。
図5は、本発明の実施例1の不揮発性メモリ装置における初期化時のテーブル作成方法の概要フローチャートである。図6は、本発明の実施例1の不揮発性メモリ装置における初期化時のテーブル作成方法の過程を示す図である。
【0033】
図5及び図6において、不揮発性メモリ装置102を装着したホスト101の電源が投入された時または不揮発性メモリ装置102がホストに挿入された時に、ステップ501でアドレス変換テーブル及び消去管理テーブルは初期化される(詳細は図7)。具体的には、不揮発性メモリ装置102はアドレス変換テーブル112の全てを未割り付けにし、消去管理テーブル113の全てに1(消去済)を設定する。
ステップ502で不揮発性メモリ装置102は全物理ブロックサーチする(詳細は図8、図9)。具体的には、不揮発性メモリ装置102は、全物理ブロックの冗長領域にある論理アドレス302を読み出すことにより、アドレス変換テーブル112を作成し、消去管理テーブル113の不良ブロックに0(使用中)を設定する。
ステップ503で不揮発性メモリ装置102は全論理リンクサーチする(詳細は図10)。具体的には、不揮発性メモリ装置102は消去管理テーブル113の有効データに0(使用中)を設定する。消去済み、有効データ、無効データ、不良ブロックの定義は、従来例で説明した。
無効データは、消去管理テーブル113で1(消去済)として登録されている。無効データは、データ書き込み時には消去済みブロックとして扱われ、書き込みに使用される。
【0034】
次に、実施例1の不揮発性メモリ装置における初期化時のアドレス変換テーブル及び消去管理テーブルの作成方法の詳細について説明する。
図7〜図10は、図5の詳細フローチャートである。
図7は、本発明の実施例1の不揮発性メモリ装置における初期化時のテーブル作成方法のテーブル初期化処理(ステップ501)の詳細フローチャートである。図7において、ステップ701でメモリ制御部116はアドレス変換テーブル112を全て未割り付けにする。例えば、図11のa1〜a7・・・に1(未登録)を設定する。ステップ702でメモリ制御部116は消去管理テーブル113のフラグを全て消去済みにする。例えば、図11のb1〜b7・・・に未割り付けを表す数値(例えば全ビット”1”)を設定する。
【0035】
図8は、本発明の実施例1の不揮発性メモリ装置における初期化時のテーブル作成方法の全物理ブロックサーチ処理(ステップ502)の詳細フローチャートである。全物理ブロックサーチ処理(ステップ502)では、物理ブロックを順に全て検査することにより、アドレス変換テーブルを作成し、不良ブロックの消去管理テーブルに0(使用中)を設定する。
【0036】
図8において、ステップ801で、メモリ制御部116は検査アドレスに先頭の物理アドレスを設定する。ステップ802で、メモリ制御部116は検査アドレスの物理ブロックの情報を読み出し、検査アドレスの物理ブロックが不良ブロックか否かを判断する。不良ブロックでない場合は、ステップ803に進み、メモリ制御部116は検査アドレスの物理ブロックの書き込み開始フラグ301がマーク有か否かを判断する。ステップ803で書き込み開始フラグ301がマーク有の場合は、ステップ804に進み、メモリ制御部116は検査アドレスの物理ブロックの書き込み終了フラグ305がマーク有か否かを判断する。ステップ804で書き込み終了フラグ305がマーク有の場合は、ステップ805に進み、メモリ制御部116は検査アドレスの物理ブロックのアドレステーブル無効化フラグ303が有効か否かを判断する。
【0037】
ステップ805でアドレステーブル無効化フラグ303が有効の場合(書き込み開始フラグがマーク有かつ書き込み終了フラグがマーク有かつアドレステーブル無効化フラグが有効の場合)は、ステップ806に進み、メモリ制御部116は検査アドレスをアドレス変換テーブルに登録する(詳細は図9)。
ステップ802で不良ブロックの場合は、ステップ807に進み、メモリ制御部116は消去管理テーブルに0(使用中)を設定する。例えば、図11の不揮発性メモリ117の不良ブロック(物理アドレス0004)に対応する消去管理テーブルb5に0(使用中)を設定する。
なお、不良ブロックの具体的な判別方法は、本説明では特に行っていないが、不良ブロックアドレスを記録する方法や、不良ブロックの冗長領域に不良ブロックを意味するフラグを設けマークする方法がある。本フローチャートでは、各冗長領域の不良ブロックマークを調査するイメージで説明を行っている。
【0038】
ステップ803で書き込み開始フラグがマーク無の場合、ステップ804で書き込み終了フラグがマーク無の場合、ステップ805でアドレステーブル無効化フラグが無効の場合、及びステップ806で検査アドレスを登録後及びステップ807で消去管理テーブルに設定後、それぞれステップ808に進み、メモリ制御部116は検査アドレスを更新する(検査アドレスに次の物理アドレスを設定する。)。ステップ809で、メモリ制御部116は全ての物理ブロックの検査が終了したか否かを判断する。全ての物理ブロックの検査が終了していない場合は、ステップ802に戻り、次の物理ブロックの処理へ進む。全ての物理ブロックの検査が終了した場合は、このフローチャートを終了する。
【0039】
なお、本実施例の全物理ブロックサーチ処理(ステップ502)においては、アドレス変換テーブルに登録したブロック(有効データ)に対する消去管理テーブルの該当フラグは1(消去済)のままで、次の工程(全論理リンクサーチ処理(ステップ503))においてまとめて消去管理テーブルの該当フラグに0(使用中)を設定している。しかし、全物理ブロックサーチ処理(ステップ502)において消去管理テーブル113の該当フラグに0(使用中)を設定してもよい。
なお、不良ブロックを一括してアドレス管理しているシステムの場合においては、あらかじめ管理されている不良ブロックのアドレスの消去管理テーブルのフラグを0(使用中)にしておき、全物理ブロックサーチ処理(ステップ502)では消去管理テーブル113のフラグが0(使用中)であれば不良ブロックとしてその物理ブロックの検査をパスさせてもよい。
【0040】
データの上書き中に電源が切れた等の理由により、1つの論理アドレスに関連付けられた2つ以上の物理アドレスが重複して存在している場合がある。重複している物理アドレスをアドレス変換テーブルに登録する際、両方の物理ブロックを比較する必要がある。また、重複状態を放置しておくと、データを消去してももう一方のデータが存在するため、ホストからみれば消去したはずの論理アドレスにデータが入っているという不具合が発生する。本実施例の検査アドレス登録処理(ステップ806)は上記の不具合を解決するものである。
【0041】
図9は、本発明の実施例1の不揮発性メモリ装置における初期化時のテーブル作成方法の検査アドレス登録処理(ステップ806)の詳細フローチャートである。ステップ901で、メモリ制御部116は検査アドレスがアドレス変換テーブル112にすでに登録済みの論理アドレスか否かを判断する。登録済みの論理アドレスの場合は、ステップ902に進み、メモリ制御部116は重複している両方の物理ブロックを比較し、いずれか1個の物理ブロックを選択する。選択手順や判断基準は本発明と関係ないため省略する。ステップ903で、メモリ制御部116は選択した物理ブロックアドレスをアドレス変換テーブルへ登録する。
ステップ904で、メモリ制御部116は非選択の物理ブロックのアドレステーブル無効化フラグ303を無効に設定し、このフローチャートを終了する。
【0042】
例えば、図11の不揮発性メモリ117の物理アドレス0003、0005のブロックの論理アドレスが重複しているとする。物理アドレス0005のブロックが正しいデータであると判断した場合、アドレス変換テーブル112のデータa2に0005(選択ブロックの物理アドレス)を設定する。さらに、物理アドレス0003(非選択ブロックの物理アドレス)のブロックのアドレステーブル無効化フラグ303を無効に設定する。
ステップ901で検査アドレスが未登録の論理アドレスの場合は、ステップ905に進み、メモリ制御部116は物理ブロックアドレスをアドレス変換テーブルへ登録し、このフローチャートを終了する。例えば、図11のアドレス変換テーブル112のデータa1に0001を設定する。
【0043】
図10は、本発明の実施例1の不揮発性メモリ装置における初期化時のテーブル作成方法の全論理リンクサーチ処理(ステップ503)の詳細フローチャートである。全論理リンクサーチ処理(ステップ503)では、論理リンクをすべて検査することにより、有効データの消去管理テーブルに0(使用中)を設定し、消去管理テーブルを完成する。
図10において、ステップ1001で、メモリ制御部116は検査アドレスにアドレス変換テーブル112の先頭の論理アドレスのデータを設定する。ステップ1002で、メモリ制御部116はリンクアドレスに検査アドレスを設定する。ステップ1003で、メモリ制御部116はリンクアドレスの消去管理テーブル113に0(使用中)を設定する。ステップ1004で、メモリ制御部116は検査アドレスの物理ブロックの冗長領域のアドレステーブル304に他のリンクアドレスが登録されているか否かを判断する。
【0044】
ステップ1004で他のリンクアドレスが登録されている場合は、ステップ1005に進む。ステップ1005で、メモリ制御部116はリンクアドレスにアドレステーブル304に登録されている他のリンクアドレスを設定し、ステップ1003に戻る。間接型アドレッシングテーブルは、1段だけでなく複数段にすることも考えられるが、いずれにせよ読出し可能な、リンクされているブロックは使用中として消去管理テーブルに0(使用中)を設定する。
例えば、図11に示すように物理アドレス0002のブロックは物理アドレス0001のブロックにリンクしているとする。この場合、物理アドレス0001のブロックに対応する消去管理テーブルb2だけでなく、物理アドレス0002のブロックに対応する消去管理テーブルb3にも0(使用中)を設定する。
【0045】
ステップ1004で他のリンクアドレスが登録されていない場合(検査アドレスに対するリンクが全て検査終了した場合)は、ステップ1006に進み、メモリ制御部116は検査アドレスを更新する(検査アドレスにアドレス変換テーブルの次の論理アドレスのデータを設定する。)。ステップ1007で、メモリ制御部116は全ての論理ブロックの検査が終了したか否かを判断する。全ての論理ブロックの検査が終了していない場合は、ステップ1002に戻り、次の論理ブロックの処理へ進む。全ての論理ブロックの検査が終了した場合は、このフローチャートを終了する。
【0046】
図6に示すように、無効データブロックに対応する消去管理テーブルは1(消去済み)であり、無効データブロックは消去済みブロックと同じ扱いである。つまり書き込みがなされているにもかかわらず、書き込み可能として登録している。このまま書き込みを行えば上書きとなり、書き込みデータの不一致が発生、不良ブロックとして使用不可能領域となる。従って書き込み前にはそのブロックの書き込み開始フラグを一度読み出し、書き込みがされていない場合はそのまま書き込みを行い、書き込み済みであればそのブロックを消去してから書き込みを行う。
このように、書き込み前に必ず読み出し、場合によって消去処理が入ることになり書き込み速度の低下が懸念される。しかし、消去は電源瞬断や保持アドレスデータの異常といった異常状態時しか発生せず、定常的にはフラグ読み出し時間のみ増加する。読み出し時間は消去や書き込み時間に比較し格段に短いため、書き込み速度の低下は、初期化時の時間増大に比較し、システムとして小さな影響しかない。
【0047】
実施例1によれば、初期化時に無効データブロックを消去せず消去済み扱いにし、書き込み前に判別して消去することにより、RAM容量を増加することもなく初期化時間を短縮することが可能となる。
【0048】
《実施例2》
実施例1の全物理ブロックサーチ処理(ステップ502)において、不揮発性メモリ装置はアドレス変換テーブル112に登録するブロックか否かを検査する。登録するための有効条件は、最初のページにある書き込み開始フラグ301がマーク有であること、同じくアドレステーブル無効化フラグ303が有効であること、更に最終ページにある書き込み終了フラグ305がマーク有であることである。厳密に言えば他にも、論理アドレス302が取り得るアドレス範囲に入っていること、アドレスのエラー訂正コードに対しエラーが出ていないこと等の条件が挙げられる。いずれにせよ、最初のページのフラグ301、303でアドレス変換テーブル112に登録しないことは判別できるケースがあるが、一般的には登録するためには最終ページの書き込み終了フラグ305のように複数ページを検査する必要がある。
【0049】
冗長領域のデータを読み出す間に、並行して読み出したデータを判別し、処理を行うことは可能である。例えば、メモリ制御部116が冗長領域のデータを読み出した後、次のデータ読み出しをすぐに起動しておく。その間にコントローラ111が前回読み出したデータを判別し、アドレス変換テーブル112及び消去管理テーブル113への登録を行う。コントローラ111のソフトウェア処理が、冗長領域の読み出し時間内に終了することができれば、メモリ制御部116のメモリデータ読出し時間が全体の処理時間を決定することになる。
【0050】
この方法での問題は、次に読み出すべきブロック、ページが、最初のページの内容を判別しないとわからないことである。つまり最初のページを読出した時、書き込み開始フラグ301がマークされていない時、あるいはアドレステーブル無効化フラグ303にマークされている時、アドレス変換テーブルに登録される可能性は無いので、次は次ブロックの最初のページを読み出すことになる。上記条件以外の時は検査アドレスはアドレス変換テーブル112に登録される可能性があるため、最終ページの書き込み終了フラグ305を検査する必要がある。
必ず最初のページと最終ページを交互に読むことにすれば、読み出し起動ページは決まる。しかし、間接型アドレッシングでアドレス変換テーブル112に登録されるブロックが全体の数分の1にしかならないシステムにおいては、このような方法によれば1ブロックに対し必ず2ページを読み出さなければならず、不要なページの読み出しが初期化時間を増大させる。本実施例の全物理ブロックサーチ処理は上記の不具合を解決するものである。
【0051】
図1〜図7、図10〜図17を用いて、本発明の実施例2の不揮発性メモリ装置における初期化方法について説明する。
はじめに、実施例2の不揮発性メモリ装置の構成について説明する。
図1は、不揮発性メモリ装置の構成を示すブロック図である。図2は、不揮発性メモリ装置102の不揮発性メモリ117(512MビットNAND型フラッシュメモリ)の構成図である。図3は、不揮発性メモリ装置102の不揮発性メモリ(間接型アドレッシング)の1物理ブロックの構成図である。図4は、不揮発性メモリ装置102におけるアドレス変換テーブル112、消去管理テーブル113及び不揮発性メモリ117の関係を示す図である。本発明の実施例2の不揮発性メモリ装置の構成(図1〜図4)については、従来例と同様であるため説明を省略する。
【0052】
次に、実施例2の不揮発性メモリ装置における初期化時のアドレス変換テーブル112及び消去管理テーブル113の作成方法の概要について説明する。
図5は、本発明の実施例2の不揮発性メモリ装置における初期化時のテーブル作成方法の概要フローチャートである。図6は、本発明の実施例2の不揮発性メモリ装置における初期化時のテーブル作成方法の過程を示す図である。本発明の実施例2の不揮発性メモリ装置の初期化方法の概要(図5、図6)については、実施例1と同様であるため説明を省略する。
【0053】
次に、実施例2の不揮発性メモリ装置における初期化時のアドレス変換テーブル及び消去管理テーブルの作成方法の詳細について説明する。
図7、図10、図12〜図14、図16、図17は、図5の詳細フローチャートである。本発明の実施例2の不揮発性メモリ装置における初期化時のテーブル作成処理のテーブル初期化処理(図7)については、実施例1と同様であるため説明を省略する。
図12は、本発明の実施例2の不揮発性メモリ装置における初期化時のテーブル作成方法の全物理ブロックサーチ処理(ステップ502)の詳細フローチャート1である。図13は、本発明の実施例2の不揮発性メモリ装置における初期化時のテーブル作成方法の全物理ブロックサーチ処理(ステップ502)の詳細フローチャート2である。全物理ブロックサーチ処理(ステップ502)では、物理ブロックを順に全て検査することにより、アドレス変換テーブル112を作成し、不良ブロックの消去管理テーブル113に0(使用中)を設定する。
【0054】
図12において、ステップ1201で、メモリ制御部116は検査アドレスに先頭の物理アドレスを設定する(初期値i=0)。ステップ1202で、メモリ制御部116は検査アドレス(i=0)の物理ブロックの最初のページを読み出す。ステップ1203で、メモリ制御部116は検査アドレスを更新する(検査アドレスに次の物理アドレスを設定する。)(i=i+1)。ステップ1204で、メモリ制御部116は検査アドレス(i)の物理ブロックの最初のページを読み出す。ステップ1205でメモリ制御部116は最初のページの情報のみで判断し、書き込み開始フラグ301がマーク有であり且つアドレステーブル無効化フラグ303が有効であれば、前回の検査アドレス(i−1)をアドレス変換テーブルに仮登録する(詳細は図14)。ステップ1204とステップ1205の処理を並行して行う。ステップ1206で、メモリ制御部116は全ての物理ブロックの検査が終了したか否かを判断する。全ての物理ブロックの検査が終了していない場合は、ステップ1203に戻り、次の物理ブロックの処理へ進む(メモリ制御部116は連続して最初のページを読み出す。)。全ての物理ブロックの検査が終了した場合は、このフローチャートを終了する。
【0055】
図13において、ステップ1301で、メモリ制御部116は検査アドレスにアドレス変換テーブルの仮登録された先頭(j=0)のデータを設定する。ステップ1302で、メモリ制御部116は検査アドレス(アドレス変換テーブルの仮登録された先頭(j=0)のデータ)の物理ブロックの最終ページを読み出す。ステップ1303で、メモリ制御部116は検査アドレスを更新する(検査アドレスにアドレス変換テーブルの仮登録された次(j(=j+1)番目)のデータを設定する。)。
【0056】
ステップ1304で、メモリ制御部116は検査アドレス(アドレス変換テーブルのj番目のデータ)の物理ブロックの最終ページを読み出す。ステップ1305でメモリ制御部116は最終ページの情報(書き込み終了フラグ305)で判断し、もし書き込み終了フラグ305がマークされていなければ、前回の検査アドレス(アドレス変換テーブルの仮登録された(j−1)番目のデータ)のアドレス変換テーブルへの仮登録を取り消し、未登録に戻す(詳細は図16)。ステップ1304とステップ1305の処理を並行して行う。
ステップ1306で、メモリ制御部116は全ての仮登録ブロックの検査が終了したか否かを判断する。全ての仮登録ブロックの検査が終了していない場合は、ステップ1303に戻り、次の仮登録ブロックの処理へ進む。全ての仮登録ブロックの検査が終了した場合は、ステップ1307に進み、予備テーブルの判定を行い(詳細は図17)、このフローチャートを終了する。
【0057】
データの上書き中に電源が切れた等の理由により、1つの論理アドレスに関連付けられた2つ以上の物理アドレスが重複して存在している場合がある。最初のページの情報のみで判断しアドレス変換テーブルに仮登録しているが、重複している物理アドレスをアドレス変換テーブルに登録する際、いずれの物理ブロックを選択するかについて、両方の物理ブロックを比較する必要がある。まず最終ページを読み出し、書き込み完了したブロックか否か判定が必要である。両ブロックとも完成されていれば(書き込み終了フラグ305がマークされていれば)、さらに別ページ、別データ等を判別に用い、最終的にどちらかを選択する。この選択方法については本説明では省略する。
しかし、重複に気がついた時には、ハードウェアは次ブロックの最初のページの読出しを行っており、これを中断し、最終ページ他を読出しすれば、その時間だけロスが発生する。本実施例の仮登録処理及び予備テーブル判定処理は上記の不具合を解決するものである。
【0058】
図14は、本発明の実施例2の不揮発性メモリ装置における初期化時のテーブル作成方法の検査アドレス仮登録処理(ステップ1205)の詳細フローチャートである。ステップ1401で、メモリ制御部116は前回の検査アドレス(i−1)の物理ブロックの書き込み開始フラグ301がマーク有か否かを判断する。ステップ1401で書き込み開始フラグ301がマーク有の場合は、ステップ1402に進み、メモリ制御部116は前回の検査アドレス(i−1)の物理ブロックのアドレステーブル無効化フラグ303が有効か否かを判断する。ステップ1402でアドレステーブル無効化フラグ303が有効の場合(書き込み開始フラグ301がマーク有かつアドレステーブル無効化フラグ303が有効の場合)は、ステップ1403に進み、メモリ制御部116はアドレス変換テーブル112にすでに登録済みの論理アドレスか否かを判断する。未登録の論理アドレスの場合は、ステップ1404に進み、メモリ制御部116は物理ブロックアドレスをアドレス変換テーブル112に登録し、このフローチャートを終了する。
【0059】
ステップ1403で登録済みの論理アドレスの場合は、ステップ1405に進み、メモリ制御部116は重複したアドレス変換テーブルのアドレス及び登録する物理ブロックアドレスをRAM上の予備テーブル(図15)へ登録し、このフローチャートを終了する。例えば、図11の不揮発性メモリ117の物理アドレス0003、0005のブロックの論理アドレスが重複しているとする。図15に示すように先に処理された物理アドレス0003がアドレス変換テーブルに設定され、後に処理された物理アドレス0005が予備テーブルに設定される。
【0060】
図16は、本発明の実施例2の不揮発性メモリ装置における初期化時のテーブル作成方法の仮登録削除処理(ステップ1305)の詳細フローチャートである。ステップ1601で、メモリ制御部116は前回の検査アドレス(i−1)の物理ブロックの書き込み終了フラグ305がマーク有か否かを判断する。ステップ1601で書き込み終了フラグ305がマーク無の場合は、ステップ1602に進み、メモリ制御部116は物理ブロックアドレスのアドレス変換テーブル112への仮登録を取り消し、未登録に戻す。ステップ1603で、メモリ制御部116は前回の検査アドレス(i−1)の物理ブロックのアドレステーブル無効化フラグ303を無効に設定し、このフローチャートを終了する。このブロックは書き込み終了フラグ305がマーク無のため、有効になることはありえない。
しかし、初期化の度に仮登録と仮登録削除を行ってしまうため、アドレステーブル無効化フラグ303を無効にする。ステップ1601で書き込み終了フラグ305がマーク有の場合は、このフローチャートを終了する。
【0061】
図17は、本発明の実施例2の不揮発性メモリ装置における初期化時のテーブル作成方法の予備テーブル判定処理(ステップ1307)の詳細フローチャートである。ステップ1701で、メモリ制御部116は予備テーブルを読み出す。
ステップ1702で、重複している両方の物理ブロックを比較し、いずれか1個の物理ブロックを選択する。選択手順や判断基準は本発明と関係ないため省略する。ステップ1703で、メモリ制御部116は選択した物理ブロックアドレスをアドレス変換テーブル112へ登録する。ステップ1704で、メモリ制御部116は非選択の物理ブロックのアドレステーブル無効化フラグ303を無効に設定し、このフローチャートを終了する。
【0062】
例えば、図15に示すように予備テーブルに論理アドレス2、データ0005が登録されているとする。この場合、アドレス変換テーブルから同一の論理アドレス(2)に関連付けられているデータ(0003)を抽出する。物理アドレス0003、0005のブロックを比較し、物理アドレス0005のブロックが正しいデータであると判断した場合、アドレス変換テーブル112のデータa2に0005(選択ブロックの物理アドレス)を設定する。さらに、物理アドレス0003(非選択ブロックの物理アドレス)のブロックのアドレステーブル無効化フラグ303を無効に設定する。
【0063】
本発明の実施例2の不揮発性メモリ装置における初期化時のテーブル作成処理の全論理リンクサーチ処理(ステップ503。図10)については、実施例1と同様であるため説明を省略する。
本発明の実施例2の不揮発性メモリ装置における書き込み前の処理についても、実施例1と同様であるため説明を省略する。
【0064】
予備テーブル作成のために必要なRAM容量が増加する。しかし、通常状態では書き込みが中断した場合、1組のテーブルしか重複しない。さらに、1度初期化するとアドレステーブル無効化フラグ303がマークされ次回からは解消されるため、重複アドレスは蓄積しない。よって、必要なRAM容量の増加は問題になる範囲ではない。
上記実施例では、フラグを1ビットで1もしくは0で表わしたが、極性はフラッシュの消去レベル(実施例では1)や割付け方法により変更可能である。複数ビットを使用し、多数決処理を行って判定するといった手段も可能である。また冗長領域におけるフラグやアドレスの配置を最初のページと最終ページとしたが、他のページに置換えても同様の効果を上げることができる。また2ページだけでなく3ページ以上の場合も応用可能である。
【0065】
実施例2によれば、必要最小限のページのみ読み出し、さらに読み出しの間に判定処理を並行して行うことにより、初期化における全物理ブロックサーチ時間を短縮することが可能となる。
実施例2によれば、予備テーブルを設けることにより、初期化における全物理ブロックサーチ中に処理を中断することがなくなり、全物理ブロックサーチ時間を短縮することが可能となる。
実施例2によれば、未完成ブロックのアドレステーブル無効化フラグにマークを行うことにより、次回から最初のページの検査時に仮登録されなくなり、全物理ブロックサーチ後の判定も不要となり、予備テーブルのRAM容量増加、及び初期化時間の増加を防ぐことができる。
実施例2によれば、実施例1と同様に初期化時に無効データブロックを消去せず、書き込み前に判別して消去することにより、初期化時間を短縮することが可能となる。
【0066】
【発明の効果】
本発明によれば、初期化時にアドレス変換テーブル、消去管理テーブルを高速に作成する間接アドレッシング型の不揮発性メモリ装置の制御方法を実現できるという有利な効果が得られる。
本発明によれば、小さなRAM容量で論理アドレス/物理アドレス変換を行う間接アドレッシング型の不揮発性メモリ装置の制御方法を実現できるという有利な効果が得られる。
【図面の簡単な説明】
【図1】従来例及び本発明の実施例の不揮発性メモリ装置の構成を示すブロック図
【図2】従来例及び本発明の実施例の不揮発性メモリ装置の不揮発性メモリ(512MビットNAND型フラッシュメモリ)の構成図
【図3】従来例及び本発明の実施例の不揮発性メモリ装置の不揮発性メモリ(間接型アドレッシング)の1物理ブロックの構成図
【図4】従来例及び本発明の実施例の不揮発性メモリ装置におけるアドレス変換テーブル、消去管理テーブル及び不揮発性メモリの関係を示す図(初期化後)
【図5】本発明の実施例1の不揮発性メモリ装置における初期化時のテーブル作成方法の概要フローチャート
【図6】本発明の実施例1の不揮発性メモリ装置における初期化時のテーブル作成方法の過程を示す図
【図7】本発明の実施例1、2の不揮発性メモリ装置における初期化時のテーブル作成方法のテーブル初期化処理(ステップ501)の詳細フローチャート
【図8】本発明の実施例1の不揮発性メモリ装置における初期化時のテーブル作成方法の全物理ブロックサーチ処理(ステップ502)の詳細フローチャート
【図9】本発明の実施例1の不揮発性メモリ装置における初期化時のテーブル作成方法の検査アドレス登録処理(ステップ806)の詳細フローチャート
【図10】本発明の実施例1、2の不揮発性メモリ装置における初期化時のテーブル作成方法の全論理リンクサーチ処理(ステップ503)の詳細フローチャート
【図11】不揮発性メモリ装置におけるアドレス変換テーブル、消去管理テーブル及び不揮発性メモリの関係を示す図(初期化中)
【図12】本発明の実施例2の不揮発性メモリ装置における初期化時のテーブル作成方法の全物理ブロックサーチ処理(ステップ502)の詳細フローチャート1
【図13】本発明の実施例2の不揮発性メモリ装置における初期化時のテーブル作成方法の全物理ブロックサーチ処理(ステップ502)の詳細フローチャート2
【図14】本発明の実施例2の不揮発性メモリ装置における初期化時のテーブル作成方法の検査アドレス仮登録処理(ステップ1205)の詳細フローチャート
【図15】本発明の実施例2の不揮発性メモリ装置における初期化時のテーブル作成方法のアドレス変換テーブル、予備テーブルを示す図
【図16】本発明の実施例2の不揮発性メモリ装置における初期化時のテーブル作成方法の仮登録削除処理(ステップ1305)の詳細フローチャート
【図17】本発明の実施例2の不揮発性メモリ装置における初期化時のテーブル作成方法の予備テーブル判定処理(ステップ1307)の詳細フローチャート
【図18】従来例の不揮発性メモリ装置の不揮発性メモリ(直接型アドレッシング)の1物理ブロックの構成図
【図19】従来例1の不揮発性メモリ装置における初期化時のテーブル作成方法の概要フローチャート
【図20】従来例1の不揮発性メモリ装置における初期化時のテーブル作成方法の過程を示す図
【図21】従来例2の不揮発性メモリ装置における初期化時のテーブル作成方法の概要フローチャート
【図22】従来例2の不揮発性メモリ装置における初期化時のテーブル作成方法の過程を示す図
【符号の説明】
101 ホスト
102 不揮発性メモリ装置
111 コントローラ
112 アドレス変換テーブル
113 消去管理テーブル
114 ホストI/F部
115 データバッファ
116 メモリ制御部
117 不揮発性メモリ
301 書き込み開始フラグ
302 論理アドレス
303 アドレステーブル無効化フラグ
304 アドレステーブル
305 書き込み終了フラグ
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a method for controlling a nonvolatile semiconductor memory system, and more particularly to a method for controlling a nonvolatile semiconductor memory card.
[0002]
[Prior art]
2. Description of the Related Art In recent years, non-volatile memory devices such as flash memories have attracted attention as storage devices for portable information devices (for example, portable personal computers, digital still cameras, and PDAs) that handle music and video data.
First, the configuration of the nonvolatile memory device will be described.
FIG. 1 is a block diagram illustrating an example of a configuration of a nonvolatile memory device. In FIG. 1, 101 is a host, and 102 is a nonvolatile memory device. The nonvolatile memory device 102 includes a controller 111, an address conversion table 112, an erase management table 113, a host I / F unit 114, a data buffer 115, a memory control unit 116, and a nonvolatile memory 117.
[0003]
The configuration of the nonvolatile memory 117 will be described using a 512-Mbit NAND flash memory as an example.
FIG. 2 is a configuration diagram example of the nonvolatile memory 117 (512 Mbit NAND flash memory) of the nonvolatile memory device 102. One flash memory is composed of 4096 blocks. One block is a basic unit of erasing. One block is further divided into 32 pages. One page is a basic unit for reading and writing. The capacity of one page is 528 bytes. Of the 528 bytes, 512 bytes are a data area and the remaining 16 bytes are a redundant area. The data area is an area used by the user, and the redundant area is an area used by the memory control unit 116 of the nonvolatile memory device 102.
[0004]
FIG. 18 is an example of a configuration diagram of one physical block of the nonvolatile memory 117 (direct addressing system) of the nonvolatile memory device 102. The write start flag 301, the logical address 302, and the address table invalidation flag 303 are arranged in the redundant area of the first page. The write end flag 305 is located in the redundant area of the last page. The logical address 302 and the address table invalidation flag 303 may be arranged on a page different from the page shown in FIG. These flags and data will be described below.
[0005]
Generally, in a nonvolatile memory storage device using a flash memory, a logical address specified externally such as the host 101 does not match a physical address arranged in the flash memory. If they match, the address of the defective block in the flash memory cannot be used, which places a burden on the application or frequently writes to a specific address, so that the block corresponding to that address is guaranteed to be rewritten in a short period of time This is because there is an inconvenience of exceeding the number of times and shortening the service life.
[0006]
The physical block stores the logical address to which it is assigned (associated) in the redundant area (the logical address 302 in FIG. 18). When the power of the host 101 on which the nonvolatile memory device 102 is mounted is turned on or when the nonvolatile memory device 102 is inserted into the host, all of the data written in the redundant area of the nonvolatile memory 102 Of the logical address 302 is read. Note that the initial table creation and command analysis from the host may be performed by the controller 111, but the following description is based on the assumption that the memory control unit 116 performs processing. The memory control unit 116 creates an address conversion table 112 for converting a logical address and a physical address. At the same time, the memory control unit 116 checks whether or not each block has been erased, and creates an erasure management table 113. The address conversion table 112 and the erasure management table 113 are created on the RAM.
[0007]
When a data read command is input from the host 101 to the nonvolatile memory device 102, the memory control unit 116 specifies a physical address in the address conversion table 112 based on the logical address specified by the host 101. The memory control unit 116 accesses the specified physical block and reads data.
When a data write command is input from the host 101 to the nonvolatile memory device 102, the memory control unit 116 extracts an erased block from the erase management table 113. The memory control unit 116 writes data in the extracted block, and registers the physical block in which the data is written in the address conversion table 112. If the logical address specified by the host 101 has already been registered, the data write processing is overwritten. In the case of overwriting, the memory control unit 116 deletes the old physical block in the address conversion table 112 and registers the new physical block in which the data is written in the address conversion table 112. Since the erase state of the physical block changes in writing, the memory control unit 116 updates the information of the block in the erase management table 113.
[0008]
In the address conversion table 112 described above, one physical block (one physical address) is directly assigned to one logical block (one logical address). In this case, there is a problem that the RAM size of the address conversion table 112 increases in proportion to the increase in the capacity of the nonvolatile memory 117, and the nonvolatile memory device 102 becomes expensive.
Therefore, a plurality of (k) logical blocks (logical addresses) are assigned to one physical address (referred to as a “primary physical address”) in the address conversion table, and the logical blocks are assigned to the redundant area of the physical block specified by the physical address. Indirect addressing systems have been considered that have an address table storing a plurality of physical addresses (referred to as “secondary physical addresses”) respectively associated with a plurality of logical addresses.
[0009]
FIG. 3 is an example of a configuration diagram of one physical block of the nonvolatile memory (indirect addressing system) of the nonvolatile memory device 102. 3, the same blocks as those in FIG. 18 are denoted by the same reference numerals. FIG. 3 differs from FIG. 18 in that an address table 304 is added to the redundant area on the second page. In the address table 304, addresses (secondary physical addresses) of k physical blocks respectively associated with k (k is a positive integer of 2 or more) logical blocks are written. In FIG. 3, the primary physical address (the address of the physical block in which the address table 304 is written) is also described in the address table 304 as one of the secondary physical addresses. The k physical addresses described in the address table 304 are respectively associated with k consecutive logical addresses in order from the beginning. The address table 304 may be arranged on a page different from the page shown in FIG. In other respects, FIG. 3 is the same as FIG.
FIG. 4 is a diagram showing the relationship between the address conversion table 112, the erasure management table 113, and the nonvolatile memory 117 in the nonvolatile memory device 102. In this example, k = 2, that is, two logical addresses are assigned to one physical address in the address conversion table 112.
[0010]
When a data read command is input from the host 101 to the nonvolatile memory device 102, the memory control unit 116 specifies a primary physical address in the address conversion table 112 based on the logical address specified by the host 101. Further, the memory control unit 116 specifies the original physical address (the physical address associated with the logical address specified by the host 101) from the address table 304 of the specified redundant area of the primary physical block. The memory control unit 116 accesses the specified original physical block and reads data. In this example, the table is referred to twice in order to obtain the target data. However, a system in which the table is referred to twice or more is also possible. If the number of stages increases, the size of the address conversion table can be reduced, but there is a disadvantage that the number of blocks lost due to table abnormality increases.
[0011]
When a data write command is input from the host 101 to the nonvolatile memory device 102, the memory control unit 116 first searches the erase management table 113 for an unrecorded physical block. The memory control unit 116 reads the address table 304 of the physical block registered in the address conversion table 112. The memory control unit 116 replaces one address of the secondary physical address in the address table 304 with the address of a physical block to be written from now on (searched unrecorded physical block) to obtain updated address table information. To the unrecorded physical block. When the writing is completed, the memory control unit 116 registers the new physical block address in the address conversion table 112. The memory control unit 116 marks the address table invalidation flag of the block having the old table as invalid by overwriting. Note that only the address table in the redundant area is invalidated, and data is not necessarily invalidated. For example, there is a case where data of a logical address (included in the address table 304) other than the logical address associated with the physical block storing the old address table 304 is rewritten. In this case, the physical block storing the old address table 304 is linked from the new address table. In the indirect addressing system, when writing or erasing is performed, the information in the erasure management table 113 is updated similarly.
[0012]
Also, writing is not always performed normally. It is also necessary to consider that interruption due to power-off (card removal) during writing or erasing occurs. The write start flag 301 is to be marked prior to writing. Therefore, by inspecting the write start flag 301, it can be determined whether or not the block has been erased. The write end flag 305 is marked by overwriting when writing to the block is completed. Therefore, by examining the write end flag 305, it can be determined whether or not writing to the block has been interrupted.
That is, in the erased block, both the write start flag 301 and the write end flag 305 have no mark. The block for which writing has been completed has both the write start flag 301 and the write end flag 305 marked. For an unfinished block in which writing has been interrupted, the writing start flag 301 has a mark and the writing end flag 305 has no mark. The data of the unfinished block where the writing was interrupted is not used. It is erased for reuse and registered as erased in the erase management table.
[0013]
Next, an outline of a conventional method for creating an address conversion table and an erase management table at the time of initialization in a nonvolatile memory device having a nonvolatile memory having indirect addressing will be described.
In the following description, the level at the time of erasing the non-volatile memory is 1, the level of each flag with a mark is 0, and the flag of the erasure management table 113 is 1 when erased and 0 when in use.
First, the address conversion table 112 and the erasure management table 113 are initialized (details will be described later). Next, all physical blocks are inspected in order, and a table is created. In the address conversion table 112, if a block having the mark in the write end flag 305 and no mark in the address table invalidation flag 303 is found, the same logical address as the logical address of the address table 304 written in the redundant area is used. The physical block address is registered at the address (address conversion table 112). In the erase management table 113, a block without a mark is registered in the write start flag 301 (the flag is set to 0).
[0014]
Note that the bad block is not registered in the address conversion table 112 but is registered in the erasure management table 113 as unerased so as not to be written. An incomplete block in which writing has been interrupted is erased and registered in the erase management block as an erased block. Further, depending on the write interruption timing, two physical blocks can be redundantly associated with the same logical address in the address conversion table 112 (the address table 304 stored in each redundant area can be associated with the same logical address). There is. In this case, it is determined which address table is correct, the address of the selected physical block is registered in the address conversion table, and the non-selected block marks the address table invalidation flag (invalidates the address table 304). If it is valid data, it is left as it is, and if it is invalid data, it is deleted.
[0015]
In a system having the address conversion table 112 of the indirect addressing, there is a possibility that there is an invalid block in which writing has been completed. For example, a case where the address table data of the block having the address table becomes abnormal and the link is lost. This is a phenomenon at the time of an abnormality, in which data to be held is lost. If a block with a broken link is left as it is, a problem occurs that the writable memory capacity of the memory device is permanently reduced. However, it is not easy to determine whether a written block is valid. This is because which block address table is linked cannot be determined unless the link is checked from the address tables of all blocks.
Therefore, after checking all the physical blocks, a link check is performed using the address conversion table. Here, it is necessary to extract a block that is not linked, delete the block, and make it reusable.
[0016]
Next, in a nonvolatile memory device having a nonvolatile memory of indirect addressing, a conventional method of creating an address conversion table and an erase management table at initialization will be described with two examples.
A method of creating a table at the time of initialization of the first conventional example will be described with reference to FIGS. FIG. 19 is a schematic flowchart of a table creation method at the time of initialization in the nonvolatile memory device of Conventional Example 1. FIG. 20 is a diagram showing a process of a table creation method at the time of initialization in the nonvolatile memory device of Conventional Example 1. The underlined portions in FIG. 20 indicate operations in each step.
[0017]
The states of the physical blocks will be described by classifying them into four types: erased, valid data, invalid data, and bad blocks.
There are two types of valid data. One is a block in which the address table invalidation flag 303 is valid and has the address table 304. The other is a block (data is valid) in which the address table invalidation flag 303 is invalid but the address table invalidation flag 303 of another block is valid and linked from the address table of the other block.
There are two types of invalid data. One is a block in which the write start flag has a mark but a write end flag has no mark (a block in which data writing has not been completed). The other is a block in which both the write start flag and the write end flag have a mark (a block in which data writing has been completed) but are not linked and are not used as a result.
[0018]
19 and 20, when the power of the host 101 to which the nonvolatile memory device 102 is mounted is turned on or when the nonvolatile memory device 102 is inserted into the host, the address conversion table and the erase management table are initialized in step 1901. Be converted to In some systems, the entire memory is divided into large blocks and the table is initialized at the time of switching, but this is the same as the initialization at power-on. Specifically, the non-volatile memory device 102 sets all of the address conversion table 112 to unallocated, and sets 1 (erased) to all of the erasure management table 113.
In the steps 1902 and 1903, the purpose is to extract invalid data blocks with broken links.
In step 1902, the nonvolatile memory device 102 searches all physical blocks.
Specifically, the non-volatile memory device 102 creates the address conversion table 112 by reading the logical address 302 in the redundant area of all physical blocks, and assigns 0 ( In use). In the creation of the address conversion table 112, when an incomplete block or an address is duplicated, selection determination and invalidation processing are performed.
In step 1903, the nonvolatile memory device 102 performs an all logical link search. Specifically, the non-volatile memory device 102 follows links of all logical addresses, and sets 1 (erased) to a block of the erasure management table 113 corresponding to valid data. As a result, the blocks that are 0 (in use) in the erasure management table are bad blocks and invalid data blocks.
[0019]
In step 1904, the non-volatile memory device 102 sequentially searches the erasure management table, erases a block (invalid data block) in which the erasure management table is 0 (in use) and is not defective, and assigns 1 ( (Deleted) is set.
In step 1905, the non-volatile memory device 102 searches again for all logical links. Specifically, the nonvolatile memory device 102 follows the links of all logical addresses and sets 0 (in use) to the valid data of the erasure management table 113. Thus, the address conversion table 112 and the erasure management table 113 are completed.
[0020]
A method of creating a table at the time of initialization in Conventional Example 2 will be described with reference to FIGS. The creation method of the conventional example 2 requires only one search for all logical links, but requires a buffer table on the RAM having the same size as the erase management table. FIG. 21 is a schematic flowchart of a table creation method at the time of initialization in the nonvolatile memory device of Conventional Example 2. FIG. 22 is a diagram illustrating a process of a table creation method at the time of initialization in the nonvolatile memory device of Conventional Example 2. The underlined portions in FIG. 22 indicate operations in each step.
[0021]
21 and 22, when the power of the host 101 to which the nonvolatile memory device 102 is mounted is turned on or when the nonvolatile memory device 102 is inserted into the host, the address conversion table and the erase management table are initialized in step 2101. Be converted to Specifically, the non-volatile memory device 102 makes all of the address conversion table 112 unallocated, and sets 1 (erased) to all blocks of the erasure management table 113 and the buffer table.
In the processes of steps 2102 and 2103, the creation of the erasure management table 113 and the creation of a table of erased blocks in the buffer table for extracting invalid data blocks with broken links are simultaneously performed.
In step 2102, the nonvolatile memory device 102 searches all physical blocks.
Specifically, the non-volatile memory device 102 creates the address conversion table 112 by reading the logical address 302 in the redundant area of all physical blocks, and assigns 0 (in use) to the defective block in the erase management table 113. Is set, and 0 (in use) is set to all the blocks that have not been erased in the buffer table. In the creation of the address conversion table 112, when an incomplete block or an address duplication block is found, selection determination and invalidation processing are performed.
[0022]
In step 2103, the nonvolatile memory device 102 performs an all logical link search. Specifically, the non-volatile memory device 102 follows links of all logical addresses and sets 0 (in use) to a block of the erasure management table 113 corresponding to valid data. Thus, a block that is 1 (erased) in the erase management table and is 0 (in use) in the buffer table can be determined to be an invalid data block.
In step 2104, the nonvolatile memory device 102 compares the erase management table and the buffer table, and erases and erases a block (invalid data block) whose erase management table is 1 (erased) and whose buffer table is 0 (used). 1 (erased) is set for the block in the management table 113. Thus, the address conversion table 112 and the erasure management table 113 are completed.
[0023]
[Patent Document 1]
JP-A-11-110283
[0024]
[Problems to be solved by the invention]
However, with the recent increase in the capacity of the flash memory and the nonvolatile memory storage device, the processing time for creating the address conversion table and the erase management table at the time of initialization has increased. In order to speed up the table creation processing, search and deletion processing of unnecessary blocks is a major obstacle.
Although it is necessary to perform all physical block inspections and then inspect the links of all logical blocks, two logical block inspections are required to extract unnecessary blocks, which increases the initialization time. Alternatively, if a buffer table of the same size as the erasure management table can be used, it is possible to perform one test, but an increase in the RAM capacity causes a cost increase.
Also, when erasing unnecessary blocks, the erasing time requires a longer time than reading or flag marking (overwriting), which is an obstacle to shortening the initialization time.
The present invention has been made in view of such a problem, and an object of the present invention is to provide a control method of an indirect addressing type nonvolatile memory device that can quickly create an address conversion table and an erase management table at initialization. Aim.
An object of the present invention is to provide a control method for an indirect addressing type nonvolatile memory device that performs logical address / physical address conversion with a small RAM capacity.
[0025]
[Means for Solving the Problems]
In order to solve the above problems, the present invention has the following configurations.
According to the first aspect of the present invention, there is provided a nonvolatile memory including a plurality of physical blocks, a first address translation table in which a plurality of logical addresses are assigned to one physical address, and an erasure management table in which erased blocks are registered. The physical block has a data area for storing data, and a redundant area for storing information for determining whether data written in the physical block is valid or not, and the first address The physical block specified by the translation table has a second address translation table in which a plurality of physical addresses are associated with a plurality of logical addresses. Control of a nonvolatile memory device in which a physical address and a logical address are indirectly associated with each other Invalid data is written at initialization or valid data is written at initialization, Registering an invalid physical block and an erased block that are not also associated with the erase management table as the erased block, and generating the first address conversion table; and A step of extracting an erased block from the erase management table to determine whether the erased block is really erased; an erasing step of erasing the block if the erased block has not been erased; and an erasing step. And a writing step of writing data later.
[0026]
According to a second aspect of the present invention, in the registration step, one fixed page capable of determining that the second address translation table of all physical blocks exists effectively is continuously read, and the next physical block is read. If the physical block before reading the previous fixed page is temporarily determined while reading the fixed page, and the previous physical block is temporarily determined to be a valid physical block having the second address conversion table, A temporary registration step of temporarily registering a previous physical block in the first address translation table, and after checking all physical blocks, reading out another fixed page only for the temporarily registered physical block, and reading the physical block in the first address translation table. Re-determine whether it is appropriate to register in the address translation table, and if it is not appropriate to register the physical block, And a temporary registration deletion step of dividing a control method of a nonvolatile memory device according to claim 1, further comprising a.
[0027]
According to a third aspect of the present invention, in the registering step, when a plurality of physical blocks are redundantly associated with one logical address, the redundant table registering step registers the duplicated physical blocks in a redundant table; After the temporary registration step or the temporary registration deletion step, the physical block registered in the spare table is read, an appropriate physical block is selected from the duplicated physical blocks, and the second physical block is registered in the first address translation table. 3. The method for controlling a nonvolatile memory device according to claim 2, further comprising a registering step.
[0028]
The invention according to claim 4, wherein in the second registration step, an address table associated with the second address translation table of a physical block that is not selected as an appropriate physical block among duplicate physical blocks. 4. The method according to claim 3, wherein the invalidation flag is invalidated and the physical block is not erased at the time of initialization.
[0029]
The present invention has an effect that a control method of an indirect addressing type non-volatile memory device that creates an address conversion table and an erase management table at high speed at initialization can be realized.
The present invention has an effect that a control method of an indirect addressing type nonvolatile memory device that performs logical address / physical address conversion with a small RAM capacity can be realized.
[0030]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, an embodiment that specifically shows the best mode for carrying out the present invention will be described with reference to the drawings.
[0031]
<< Example 1 >>
The initialization method in the nonvolatile memory device according to the first embodiment of the present invention will be described with reference to FIGS.
First, a configuration of the nonvolatile memory device according to the first embodiment will be described.
FIG. 1 is a block diagram illustrating a configuration of a nonvolatile memory device. FIG. 2 is a configuration diagram of the nonvolatile memory 117 (512 Mbit NAND flash memory) of the nonvolatile memory device 102. FIG. 3 is a configuration diagram of one physical block of the nonvolatile memory (indirect addressing system) of the nonvolatile memory device 102. FIG. 4 is a diagram showing the relationship between the address conversion table 112, the erasure management table 113, and the nonvolatile memory 117 in the nonvolatile memory device 102. The configuration (FIGS. 1 to 4) of the non-volatile memory device according to the first embodiment of the present invention is the same as that of the conventional example, and the description is omitted.
[0032]
Next, an outline of a method of creating the address conversion table and the erase management table at the time of initialization in the nonvolatile memory device of the first embodiment will be described.
FIG. 5 is a schematic flowchart of a table creation method at the time of initialization in the nonvolatile memory device according to the first embodiment of the present invention. FIG. 6 is a diagram illustrating a process of a table creation method at the time of initialization in the nonvolatile memory device according to the first embodiment of the present invention.
[0033]
5 and 6, when the power of the host 101 to which the nonvolatile memory device 102 is mounted is turned on or when the nonvolatile memory device 102 is inserted into the host, the address conversion table and the erase management table are initialized in step 501. (See FIG. 7 for details). Specifically, the non-volatile memory device 102 sets all of the address conversion table 112 to unallocated, and sets 1 (erased) to all of the erasure management table 113.
In step 502, the non-volatile memory device 102 searches all physical blocks (for details, see FIGS. 8 and 9). Specifically, the non-volatile memory device 102 creates the address conversion table 112 by reading the logical address 302 in the redundant area of all the physical blocks, and assigns 0 (in use) to the bad block of the erase management table 113. Set.
In step 503, the non-volatile memory device 102 performs a full logical link search (see FIG. 10 for details). Specifically, the nonvolatile memory device 102 sets 0 (in use) to the valid data of the erasure management table 113. The definitions of erased, valid data, invalid data, and bad blocks have been described in the conventional example.
Invalid data is registered as 1 (erased) in the erasure management table 113. Invalid data is treated as an erased block when writing data, and is used for writing.
[0034]
Next, details of a method of creating the address conversion table and the erase management table at the time of initialization in the nonvolatile memory device of the first embodiment will be described.
7 to 10 are detailed flowcharts of FIG.
FIG. 7 is a detailed flowchart of the table initialization process (step 501) of the table creation method at the time of initialization in the nonvolatile memory device according to the first embodiment of the present invention. In FIG. 7, in step 701, the memory control unit 116 makes all the address conversion tables 112 unallocated. For example, 1 (unregistered) is set to a1 to a7. In step 702, the memory control unit 116 sets all the flags of the erasure management table 113 to the erased state. For example, a numerical value (for example, all bits “1”) indicating unassigned is set to b1 to b7.
[0035]
FIG. 8 is a detailed flowchart of the entire physical block search process (step 502) of the table creation method at the time of initialization in the nonvolatile memory device according to the first embodiment of the present invention. In the all physical block search process (step 502), an address translation table is created by sequentially examining all physical blocks, and 0 (in use) is set in the bad block erase management table.
[0036]
In FIG. 8, in step 801, the memory control unit 116 sets the head physical address as the inspection address. In step 802, the memory control unit 116 reads the information of the physical block of the test address and determines whether the physical block of the test address is a bad block. If the block is not a bad block, the process proceeds to step 803, and the memory control unit 116 determines whether or not the write start flag 301 of the physical block of the inspection address has a mark. If it is determined in step 803 that the write start flag 301 has a mark, the process proceeds to step 804, and the memory control unit 116 determines whether the write end flag 305 of the physical block at the check address has a mark. If it is determined in step 804 that the write end flag 305 has a mark, the process proceeds to step 805, and the memory control unit 116 determines whether the address table invalidation flag 303 of the physical block of the check address is valid.
[0037]
If the address table invalidation flag 303 is valid in step 805 (the write start flag is marked, the write end flag is marked, and the address table invalidation flag is valid), the process proceeds to step 806, and the memory control unit 116 The inspection address is registered in the address conversion table (for details, see FIG. 9).
If the block is a bad block in step 802, the process proceeds to step 807, and the memory control unit 116 sets 0 (in use) in the erasure management table. For example, 0 (in use) is set in the erase management table b5 corresponding to the defective block (physical address 0004) of the nonvolatile memory 117 in FIG.
Although a specific method of determining a defective block is not particularly performed in this description, there are a method of recording a defective block address and a method of marking a redundant area of the defective block by providing a flag indicating the defective block. In the present flowchart, the description is made with an image of investigating a bad block mark in each redundant area.
[0038]
If the write start flag is no mark in step 803, if the write end flag is no mark in step 804, if the address table invalidation flag is invalid in step 805, and if the test address is registered in step 806 and after step 807, After setting in the erasure management table, the process proceeds to step 808, and the memory control unit 116 updates the test address (sets the next physical address as the test address). In step 809, the memory control unit 116 determines whether all physical blocks have been checked. If all physical blocks have not been inspected, the process returns to step 802 and proceeds to the processing of the next physical block. When the inspection of all the physical blocks is completed, this flowchart ends.
[0039]
In the all physical block search process (step 502) of the present embodiment, the corresponding flag in the erase management table for the block (valid data) registered in the address conversion table remains 1 (erased) while the next step ( In the all logical link search process (step 503), 0 (in use) is set to the corresponding flag of the erasure management table. However, the corresponding flag of the erasure management table 113 may be set to 0 (in use) in the all physical block search process (step 502).
In the case of a system in which bad blocks are collectively subjected to address management, the flag of the erase management table of the addresses of the bad blocks managed in advance is set to 0 (in use), and all physical block search processing ( In step 502), if the flag of the erasure management table 113 is 0 (in use), the physical block may be passed the inspection as a defective block.
[0040]
There may be a case where two or more physical addresses associated with one logical address are duplicated due to a reason such as power-off during data overwriting. When registering overlapping physical addresses in the address translation table, it is necessary to compare both physical blocks. Also, if the duplicated state is left as it is, the other data exists even if the data is erased, so that there is a problem that the data is contained in the logical address that should have been erased from the viewpoint of the host. The inspection address registration processing (step 806) of the present embodiment solves the above-mentioned problem.
[0041]
FIG. 9 is a detailed flowchart of the test address registration process (step 806) of the table creation method at the time of initialization in the nonvolatile memory device according to the first embodiment of the present invention. In step 901, the memory control unit 116 determines whether the check address is a logical address already registered in the address conversion table 112. If it is a registered logical address, the process proceeds to step 902, where the memory control unit 116 compares both overlapping physical blocks and selects any one physical block. Selection procedures and criteria are not relevant to the present invention, and will not be described. In step 903, the memory control unit 116 registers the selected physical block address in the address conversion table.
In step 904, the memory control unit 116 sets the address table invalidation flag 303 of the non-selected physical block to invalid, and ends this flowchart.
[0042]
For example, assume that the logical addresses of the physical addresses 0003 and 0005 of the nonvolatile memory 117 in FIG. 11 are duplicated. If it is determined that the block at the physical address 0005 is correct data, 0005 (the physical address of the selected block) is set in the data a2 of the address conversion table 112. Further, the address table invalidation flag 303 of the block having the physical address 0003 (the physical address of the unselected block) is set to be invalid.
If the test address is an unregistered logical address in step 901, the process proceeds to step 905, where the memory control unit 116 registers the physical block address in the address conversion table, and ends this flowchart. For example, 0001 is set in the data a1 of the address conversion table 112 in FIG.
[0043]
FIG. 10 is a detailed flowchart of the all logical link search process (step 503) of the table creation method at the time of initialization in the nonvolatile memory device according to the first embodiment of the present invention. In the all logical link search process (step 503), 0 (in use) is set in the effective data erasure management table by checking all the logical links, and the erasure management table is completed.
In FIG. 10, in step 1001, the memory control unit 116 sets the data of the first logical address of the address conversion table 112 as the test address. In step 1002, the memory control unit 116 sets a check address as a link address. In step 1003, the memory control unit 116 sets 0 (in use) in the erasure management table 113 of the link address. In step 1004, the memory control unit 116 determines whether another link address is registered in the address table 304 of the redundant area of the physical block of the check address.
[0044]
If another link address is registered in step 1004, the process proceeds to step 1005. In step 1005, the memory control unit 116 sets another link address registered in the address table 304 as the link address, and returns to step 1003. The indirect addressing table may be formed not only in one stage but also in a plurality of stages. In any case, the linked block that can be read is set as being used and 0 (in use) is set in the erasure management table.
For example, it is assumed that the block of the physical address 0002 is linked to the block of the physical address 0001 as shown in FIG. In this case, 0 (in use) is set not only in the erase management table b2 corresponding to the block of the physical address 0001 but also in the erase management table b3 corresponding to the block of the physical address 0002.
[0045]
If another link address is not registered in step 1004 (if all the links for the inspection address have been inspected), the process proceeds to step 1006, where the memory control unit 116 updates the inspection address (the address conversion table of the address conversion table is added to the inspection address). Set the data of the next logical address.) In step 1007, the memory control unit 116 determines whether all the logical blocks have been checked. If all logical blocks have not been checked, the process returns to step 1002 and proceeds to the next logical block. When the inspection of all the logical blocks is completed, this flowchart ends.
[0046]
As shown in FIG. 6, the erase management table corresponding to the invalid data block is 1 (erased), and the invalid data block is treated the same as the erased block. In other words, it is registered as writable even though writing has been performed. If writing is performed as it is, overwriting will occur, mismatch of the write data will occur, and the area will be unusable as a defective block. Therefore, before writing, the writing start flag of the block is read once, and if writing has not been performed, writing is performed as it is, and if writing has been completed, the block is erased and then writing is performed.
As described above, reading is always performed before writing, and an erasing process is performed in some cases. However, erasing occurs only in an abnormal state such as an instantaneous power interruption or an abnormality in held address data, and steadily increases only the flag reading time. Since the read time is much shorter than the erase or write time, a decrease in the write speed has only a small effect on the system as compared with an increase in the time during initialization.
[0047]
According to the first embodiment, it is possible to shorten the initialization time without increasing the RAM capacity by setting the invalid data block to be erased instead of erasing it at the time of initialization, and determining and erasing it before writing. It becomes.
[0048]
<< Example 2 >>
In the all physical block search process (step 502) of the first embodiment, the non-volatile memory device checks whether or not the block is to be registered in the address conversion table 112. The valid conditions for registration are that the write start flag 301 on the first page has a mark, the address table invalidation flag 303 is also valid, and the write end flag 305 on the last page has a mark. There is something. Strictly speaking, there are other conditions such as that the logical address 302 is within an address range that can be taken, and that no error has occurred in the error correction code of the address. In any case, it may be possible to determine that the address is not registered in the address conversion table 112 based on the flags 301 and 303 of the first page. Need to be inspected.
[0049]
While the data in the redundant area is being read, it is possible to determine the data read in parallel and perform the processing. For example, after the memory control unit 116 reads data in the redundant area, the next data reading is started immediately. In the meantime, the controller 111 determines the data read last time and registers it in the address conversion table 112 and the erasure management table 113. If the software processing of the controller 111 can be completed within the read time of the redundant area, the memory data read time of the memory control unit 116 will determine the entire processing time.
[0050]
The problem with this method is that the next block or page to be read cannot be known without first determining the contents of the first page. That is, when the first page is read, when the write start flag 301 is not marked, or when the address table invalidation flag 303 is marked, there is no possibility of registration in the address conversion table. The first page of the block will be read. When the conditions other than the above conditions are satisfied, the check address may be registered in the address conversion table 112, so that the write end flag 305 of the last page needs to be checked.
If the first page and the last page are always read alternately, the read start page is determined. However, in a system in which the number of blocks registered in the address translation table 112 by indirect addressing is only a fraction of the whole, according to such a method, two pages must be read for one block without fail. Unnecessary page reading increases the initialization time. The all-physical-block search processing according to the present embodiment solves the above-described problem.
[0051]
The initialization method in the nonvolatile memory device according to the second embodiment of the present invention will be described with reference to FIGS. 1 to 7 and FIGS.
First, the configuration of the nonvolatile memory device according to the second embodiment will be described.
FIG. 1 is a block diagram illustrating a configuration of a nonvolatile memory device. FIG. 2 is a configuration diagram of the nonvolatile memory 117 (512 Mbit NAND flash memory) of the nonvolatile memory device 102. FIG. 3 is a configuration diagram of one physical block of the nonvolatile memory (indirect addressing) of the nonvolatile memory device 102. FIG. 4 is a diagram showing the relationship between the address conversion table 112, the erasure management table 113, and the nonvolatile memory 117 in the nonvolatile memory device 102. The configuration (FIGS. 1 to 4) of the non-volatile memory device according to the second embodiment of the present invention is the same as that of the conventional example, and a description thereof will be omitted.
[0052]
Next, an outline of a method of creating the address conversion table 112 and the erase management table 113 at the time of initialization in the nonvolatile memory device of the second embodiment will be described.
FIG. 5 is a schematic flowchart of a table creation method at the time of initialization in the nonvolatile memory device according to the second embodiment of the present invention. FIG. 6 is a diagram illustrating a process of a table creation method at the time of initialization in the nonvolatile memory device according to the second embodiment of the present invention. The outline (FIGS. 5 and 6) of the method of initializing the nonvolatile memory device according to the second embodiment of the present invention is the same as that of the first embodiment, and thus the description is omitted.
[0053]
Next, details of a method of creating the address conversion table and the erase management table at the time of initialization in the nonvolatile memory device of the second embodiment will be described.
FIGS. 7, 10, 12 to 14, 16, and 17 are detailed flowcharts of FIG. The table initialization process (FIG. 7) of the table creation process at the time of initialization in the nonvolatile memory device according to the second embodiment of the present invention is the same as that of the first embodiment, and therefore the description is omitted.
FIG. 12 is a detailed flowchart 1 of the entire physical block search process (step 502) of the table creation method at the time of initialization in the nonvolatile memory device according to the second embodiment of the present invention. FIG. 13 is a detailed flowchart 2 of the entire physical block search process (step 502) of the table creation method at the time of initialization in the nonvolatile memory device according to the second embodiment of the present invention. In the all physical block search process (step 502), an address translation table 112 is created by sequentially examining all physical blocks, and 0 (in use) is set in the bad block erasure management table 113.
[0054]
In FIG. 12, in step 1201, the memory control unit 116 sets the first physical address as the test address (initial value i = 0). In step 1202, the memory control unit 116 reads the first page of the physical block at the check address (i = 0). In step 1203, the memory control unit 116 updates the test address (sets the next physical address as the test address) (i = i + 1). In step 1204, the memory control unit 116 reads the first page of the physical block at the check address (i). In step 1205, the memory control unit 116 determines only the information of the first page. If the write start flag 301 is marked and the address table invalidation flag 303 is valid, the previous check address (i-1) is used. It is temporarily registered in the address conversion table (for details, see FIG. 14). Steps 1204 and 1205 are performed in parallel. In step 1206, the memory control unit 116 determines whether all physical blocks have been checked. If all the physical blocks have not been checked, the process returns to step 1203 and proceeds to the processing of the next physical block (the memory control unit 116 continuously reads the first page). When the inspection of all the physical blocks is completed, this flowchart ends.
[0055]
In FIG. 13, in step 1301, the memory control unit 116 sets the head (j = 0) data temporarily registered in the address conversion table as the inspection address. In step 1302, the memory control unit 116 reads the last page of the physical block at the check address (the first (j = 0) data temporarily registered in the address conversion table). In step 1303, the memory control unit 116 updates the test address (sets the next (j (= j + 1)) data temporarily registered in the address conversion table as the test address).
[0056]
In step 1304, the memory control unit 116 reads the last page of the physical block at the test address (the j-th data in the address conversion table). In step 1305, the memory control unit 116 determines based on the information of the last page (write end flag 305). If the write end flag 305 is not marked, the previous check address (temporarily registered (j- The temporary registration of the (1) -th data) in the address conversion table is canceled and returned to the non-registered one (for details, see FIG. 16). Steps 1304 and 1305 are performed in parallel.
In step 1306, the memory control unit 116 determines whether the inspection of all the temporarily registered blocks has been completed. If the inspection of all the temporarily registered blocks has not been completed, the process returns to step 1303 and proceeds to the processing of the next temporarily registered block. When the inspection of all the temporarily registered blocks is completed, the process proceeds to step 1307, where the preliminary table is determined (for details, see FIG. 17), and this flowchart ends.
[0057]
There may be a case where two or more physical addresses associated with one logical address are duplicated due to a reason such as power-off during data overwriting. Judging only from the information of the first page and temporarily registering it in the address translation table, when registering duplicate physical addresses in the address translation table, both physical blocks are selected as to which physical block to select. Need to compare. First, it is necessary to read the last page and determine whether or not the block has been written. If both blocks are completed (if the write end flag 305 is marked), another page, different data, etc. are used for determination, and one of them is finally selected. This selection method is omitted in this description.
However, when the overlap is noticed, the hardware is reading the first page of the next block. If the first page of the next block is interrupted and the last page or the like is read, a loss occurs for the time. The temporary registration process and the preliminary table determination process of the present embodiment solve the above-mentioned problems.
[0058]
FIG. 14 is a detailed flowchart of the test address temporary registration process (step 1205) of the table creation method at the time of initialization in the nonvolatile memory device according to the second embodiment of the present invention. In step 1401, the memory control unit 116 determines whether or not the write start flag 301 of the physical block at the previous check address (i-1) has a mark. If it is determined in step 1401 that the write start flag 301 has a mark, the process proceeds to step 1402, and the memory control unit 116 determines whether the address table invalidation flag 303 of the physical block of the previous check address (i-1) is valid. I do. If the address table invalidation flag 303 is valid in step 1402 (if the write start flag 301 has a mark and the address table invalidation flag 303 is valid), the process proceeds to step 1403, and the memory control unit 116 It is determined whether the logical address is already registered. If it is an unregistered logical address, the process proceeds to step 1404, where the memory control unit 116 registers the physical block address in the address conversion table 112, and ends this flowchart.
[0059]
If the logical address is already registered in step 1403, the process proceeds to step 1405, where the memory control unit 116 registers the address of the duplicated address translation table and the physical block address to be registered in the spare table (FIG. 15) on the RAM. The flowchart ends. For example, assume that the logical addresses of the physical addresses 0003 and 0005 of the nonvolatile memory 117 in FIG. 11 are duplicated. As shown in FIG. 15, the physical address 0003 processed first is set in the address conversion table, and the physical address 0005 processed later is set in the spare table.
[0060]
FIG. 16 is a detailed flowchart of the temporary registration deletion processing (step 1305) of the table creation method at the time of initialization in the nonvolatile memory device according to the second embodiment of the present invention. In step 1601, the memory control unit 116 determines whether or not the write end flag 305 of the physical block at the previous check address (i-1) has a mark. If the write end flag 305 has no mark in step 1601, the process proceeds to step 1602, and the memory control unit 116 cancels the temporary registration of the physical block address in the address conversion table 112 and returns to the unregistered state. In step 1603, the memory control unit 116 sets the address table invalidation flag 303 of the physical block of the previous check address (i-1) to invalid, and ends this flowchart. This block cannot be made valid since the write end flag 305 has no mark.
However, since temporary registration and temporary registration deletion are performed each time initialization is performed, the address table invalidation flag 303 is invalidated. If it is determined in step 1601 that the write end flag 305 has a mark, the flowchart ends.
[0061]
FIG. 17 is a detailed flowchart of the preliminary table determination process (step 1307) of the table creation method at the time of initialization in the nonvolatile memory device according to the second embodiment of the present invention. In step 1701, the memory control unit 116 reads a spare table.
In step 1702, both overlapping physical blocks are compared, and one of the physical blocks is selected. Selection procedures and criteria are not relevant to the present invention, and will not be described. In step 1703, the memory control unit 116 registers the selected physical block address in the address conversion table 112. In step 1704, the memory control unit 116 sets the address table invalidation flag 303 of the non-selected physical block to invalid, and ends this flowchart.
[0062]
For example, assume that a logical address 2 and data 0005 are registered in the spare table as shown in FIG. In this case, data (0003) associated with the same logical address (2) is extracted from the address conversion table. The blocks of the physical addresses 0003 and 0005 are compared, and if it is determined that the block of the physical address 0005 is correct data, 0005 (the physical address of the selected block) is set in the data a2 of the address conversion table 112. Further, the address table invalidation flag 303 of the block having the physical address 0003 (the physical address of the unselected block) is set to be invalid.
[0063]
The all logical link search process (step 503; FIG. 10) of the table creation process at the time of initialization in the nonvolatile memory device according to the second embodiment of the present invention is the same as that of the first embodiment, and therefore the description is omitted.
The processing before writing in the nonvolatile memory device according to the second embodiment of the present invention is also the same as that of the first embodiment, and thus the description is omitted.
[0064]
The amount of RAM required to create a spare table increases. However, in the normal state, when writing is interrupted, only one set of tables overlaps. Further, once initialized, the address table invalidation flag 303 is marked and is cleared from the next time, so that duplicate addresses are not accumulated. Therefore, an increase in the required RAM capacity is not a problematic range.
In the above embodiment, the flag is represented by 1 or 0 with one bit, but the polarity can be changed by the flash erasing level (1 in the embodiment) or the allocation method. It is also possible to use a plurality of bits and perform a majority process to make a determination. Although the arrangement of flags and addresses in the redundant area is the first page and the last page, the same effect can be obtained by replacing the page with another page. Further, not only two pages but also three or more pages can be applied.
[0065]
According to the second embodiment, it is possible to shorten the entire physical block search time in the initialization by reading only the minimum necessary pages and performing the determination process in parallel during the reading.
According to the second embodiment, by providing the spare table, the processing is not interrupted during the search for all the physical blocks in the initialization, and the search time for the entire physical block can be reduced.
According to the second embodiment, by marking the address table invalidation flag of the unfinished block, the temporary registration is not performed at the time of the first page inspection from the next time, and the determination after searching all physical blocks becomes unnecessary. An increase in RAM capacity and an increase in initialization time can be prevented.
According to the second embodiment, the invalid data block is not erased at the time of initialization as in the first embodiment, but is determined and erased before writing, thereby making it possible to shorten the initialization time.
[0066]
【The invention's effect】
According to the present invention, there is obtained an advantageous effect that a control method of an indirect addressing type nonvolatile memory device that creates an address conversion table and an erase management table at high speed at initialization can be realized.
According to the present invention, there is obtained an advantageous effect that a control method of an indirect addressing type nonvolatile memory device that performs logical address / physical address conversion with a small RAM capacity can be realized.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a nonvolatile memory device according to a conventional example and an embodiment of the present invention.
FIG. 2 is a configuration diagram of a nonvolatile memory (512 Mbit NAND flash memory) of a nonvolatile memory device according to a conventional example and an embodiment of the present invention;
FIG. 3 is a configuration diagram of one physical block of a nonvolatile memory (indirect addressing) of a nonvolatile memory device according to a conventional example and an embodiment of the present invention;
FIG. 4 is a diagram showing a relationship between an address conversion table, an erase management table, and a nonvolatile memory in a nonvolatile memory device according to a conventional example and an embodiment of the present invention (after initialization).
FIG. 5 is a schematic flowchart of a table creation method at the time of initialization in the nonvolatile memory device according to the first embodiment of the present invention;
FIG. 6 is a diagram showing a process of a table creation method at the time of initialization in the nonvolatile memory device according to the first embodiment of the present invention;
FIG. 7 is a detailed flowchart of a table initialization process (step 501) of a table creation method at the time of initialization in the nonvolatile memory devices according to the first and second embodiments of the present invention.
FIG. 8 is a detailed flowchart of an all-physical block search process (step 502) of the table creation method at the time of initialization in the nonvolatile memory device according to the first embodiment of the present invention;
FIG. 9 is a detailed flowchart of a test address registration process (step 806) of the table creation method at the time of initialization in the nonvolatile memory device according to the first embodiment of the present invention.
FIG. 10 is a detailed flowchart of an all logical link search process (step 503) of the table creation method at the time of initialization in the nonvolatile memory devices according to the first and second embodiments of the present invention;
FIG. 11 is a diagram showing a relationship between an address conversion table, an erasure management table, and a nonvolatile memory in the nonvolatile memory device (during initialization).
FIG. 12 is a detailed flowchart 1 of the entire physical block search process (step 502) of the table creation method at the time of initialization in the nonvolatile memory device according to the second embodiment of the present invention.
FIG. 13 is a detailed flowchart 2 of the entire physical block search process (step 502) of the table creation method at the time of initialization in the nonvolatile memory device according to the second embodiment of the present invention.
FIG. 14 is a detailed flowchart of a test address temporary registration process (step 1205) of the table creation method at the time of initialization in the nonvolatile memory device according to the second embodiment of the present invention;
FIG. 15 is a diagram showing an address translation table and a spare table in a table creation method at the time of initialization in the nonvolatile memory device according to the second embodiment of the present invention;
FIG. 16 is a detailed flowchart of a temporary registration deletion process (step 1305) of the table creation method at the time of initialization in the nonvolatile memory device according to the second embodiment of the present invention.
FIG. 17 is a detailed flowchart of a preliminary table determination process (step 1307) of the table creation method at the time of initialization in the nonvolatile memory device according to the second embodiment of the present invention.
FIG. 18 is a configuration diagram of one physical block of a nonvolatile memory (direct addressing) of a conventional nonvolatile memory device;
FIG. 19 is a schematic flowchart of a table creation method at the time of initialization in the nonvolatile memory device of Conventional Example 1;
FIG. 20 is a diagram showing a process of a table creation method at the time of initialization in the nonvolatile memory device of Conventional Example 1;
FIG. 21 is a schematic flowchart of a table creation method at the time of initialization in the nonvolatile memory device of Conventional Example 2;
FIG. 22 is a diagram showing a process of a table creation method at the time of initialization in the nonvolatile memory device of Conventional Example 2;
[Explanation of symbols]
101 Host
102 Non-volatile memory device
111 controller
112 address conversion table
113 Erasure management table
114 Host I / F section
115 Data buffer
116 Memory control unit
117 Non-volatile memory
301 Write start flag
302 logical address
303 Address table invalidation flag
304 address table
305 Write end flag

Claims (4)

複数の物理ブロックから成る不揮発性メモリと、1物理アドレスに複数の論理アドレスを割り当てた第1のアドレス変換テーブルと、消去済みのブロックを登録した消去管理テーブルと、を有し、
前記物理ブロックはデータを格納するデータ領域と、前記物理ブロックに書き込まれたデータが有効か否かを判別する情報を格納した冗長領域と、を有し、
前記第1のアドレス変換テーブルで指定された物理ブロックは、複数の論理アドレスに複数の物理アドレスを関連付けた第2のアドレス変換テーブルを有する、
物理アドレスと論理アドレスとが間接的に関連付けられた不揮発性メモリ装置の制御方法であって、
初期化時に、無効なデータが書き込まれており又は有効なデータが書き込まれているがどの論理アドレスにも関連付けられていない無効な物理ブロックと、消去済みのブロックと、を前記消去管理テーブルに消去済みブロックとして登録し、且つ前記第1のアドレス変換テーブルを生成する登録ステップと、
データ書き込み時に、前記消去管理テーブルから消去済みブロックを抽出し、前記消去済みブロックが本当に消去されているかを判定する判定ステップと、
前記判定ステップで未消去であれば前記ブロックを消去する消去ステップと、
前記消去ステップ後に、データを書き込む書き込みステップと、を有することを特徴とする不揮発性メモリ装置の制御方法。
A nonvolatile memory including a plurality of physical blocks, a first address conversion table in which a plurality of logical addresses are assigned to one physical address, and an erasure management table in which erased blocks are registered;
The physical block has a data area for storing data, and a redundant area for storing information for determining whether data written in the physical block is valid,
The physical block specified in the first address translation table has a second address translation table in which a plurality of physical addresses are associated with a plurality of logical addresses.
A method of controlling a nonvolatile memory device in which a physical address and a logical address are indirectly associated with each other,
At the time of initialization, an invalid physical block to which invalid data has been written or valid data has been written but not associated with any logical address, and an erased block are erased in the erase management table. Registering as a completed block and generating the first address conversion table;
At the time of data writing, an erased block is extracted from the erase management table, and a determination step of determining whether the erased block is really erased,
An erasing step of erasing the block if it has not been erased in the determining step;
And a writing step of writing data after the erasing step.
前記登録ステップは、
全物理ブロックの前記第2のアドレス変換テーブルが有効に存在することを判別可能な1つの固定ページを連続して読み出し、次の物理ブロックの固定ページを読み出している間に前回固定ページを読み出した前の物理ブロックの仮判別を行い、前の物理ブロックが前記第2のアドレス変換テーブルを有する有効な物理ブロックであると仮判別したならば、前記第1のアドレス変換テーブルに前の物理ブロックを仮登録する仮登録ステップと、
全物理ブロック検査後に、仮登録した物理ブロックについてのみ他の固定ページを読み出し、その物理ブロックを前記第1のアドレス変換テーブルに登録することが適切か否かを再判別し、その物理ブロックを登録することが適切でなければ仮登録を削除する仮登録削除ステップと、を更に有することを特徴とする請求項1に記載の不揮発性メモリ装置の制御方法。
The registration step includes:
One fixed page capable of determining that the second address translation table of all physical blocks exists effectively is continuously read, and the previous fixed page was read while the fixed page of the next physical block was being read. If the previous physical block is provisionally determined and the previous physical block is provisionally determined to be a valid physical block having the second address translation table, the previous physical block is added to the first address translation table. A temporary registration step for temporary registration,
After all physical block inspections, another fixed page is read only for the temporarily registered physical block, and it is determined again whether or not it is appropriate to register the physical block in the first address translation table, and the physical block is registered. 2. The method according to claim 1, further comprising: a temporary registration deletion step of deleting the temporary registration if the registration is not appropriate.
前記登録ステップは、
1つの論理アドレスに複数の物理ブロックが重複して関連付けられていた場合、重複した物理ブロックを予備テーブルに登録する予備テーブル登録ステップと、
前記仮登録ステップ後又は前記仮登録削除ステップ後に、前記予備テーブルに登録した物理ブロックを読み出し、重複した物理ブロックの中から適切な物理ブロックを選択し、前記第1のアドレス変換テーブルに登録する第2の登録ステップと、を更に有することを特徴とする請求項2に記載の不揮発性メモリ装置の制御方法。
The registration step includes:
When a plurality of physical blocks are redundantly associated with one logical address, a spare table registration step of registering the duplicated physical blocks in a spare table;
After the temporary registration step or the temporary registration deletion step, a physical block registered in the spare table is read out, an appropriate physical block is selected from the duplicated physical blocks, and the physical block is registered in the first address conversion table. 3. The method according to claim 2, further comprising the step of: registering the nonvolatile memory device.
前記第2の登録ステップにおいて、重複した物理ブロックの中で、適切な物理ブロックとして選択されなかった物理ブロックの前記第2のアドレス変換テーブルに関連付けられたアドレステーブル無効化フラグを無効にし、初期化時にその物理ブロックを消去しないことを特徴とする請求項3に記載の不揮発性メモリ装置の制御方法。In the second registration step, an address table invalidation flag associated with the second address translation table of a physical block that is not selected as an appropriate physical block among duplicate physical blocks is invalidated and initialized. 4. The method according to claim 3, wherein the physical block is not erased sometimes.
JP2003028536A 2003-02-05 2003-02-05 Control method for nonvolatile memory device Pending JP2004240660A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003028536A JP2004240660A (en) 2003-02-05 2003-02-05 Control method for nonvolatile memory device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003028536A JP2004240660A (en) 2003-02-05 2003-02-05 Control method for nonvolatile memory device

Publications (2)

Publication Number Publication Date
JP2004240660A true JP2004240660A (en) 2004-08-26
JP2004240660A5 JP2004240660A5 (en) 2006-03-23

Family

ID=32955984

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003028536A Pending JP2004240660A (en) 2003-02-05 2003-02-05 Control method for nonvolatile memory device

Country Status (1)

Country Link
JP (1) JP2004240660A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006209608A (en) * 2005-01-31 2006-08-10 Sony Corp Memory control device, memory control method, and program
JP2007334935A (en) * 2006-06-12 2007-12-27 Sony Corp Nonvolatile memory
WO2009107283A1 (en) * 2008-02-29 2009-09-03 Kabushiki Kaisha Toshiba Information processing apparatus and nonvolatile semiconductor memory drive
JP2010091458A (en) * 2008-10-09 2010-04-22 Yokogawa Electric Corp Measurement device
JP4832521B2 (en) * 2005-09-25 2011-12-07 深▲ちぇん▼市朗科科技股▲ふん▼有限公司 Data management method in flash memory media
US8099544B2 (en) 2008-02-29 2012-01-17 Kabushiki Kaisha Toshiba Information processing apparatus and nonvolatile semiconductor memory drive
US9367444B2 (en) 2012-03-16 2016-06-14 Kabushiki Kaisha Toshiba Non-volatile memory device, control method for information processing device, and information processing device
JP2016525240A (en) * 2013-07-16 2016-08-22 インテル・コーポレーション Erase management in memory systems
CN111208950A (en) * 2020-01-15 2020-05-29 山西银河电子设备厂 Method for improving NORFLASH service cycle based on single chip microcomputer

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006209608A (en) * 2005-01-31 2006-08-10 Sony Corp Memory control device, memory control method, and program
JP4665539B2 (en) * 2005-01-31 2011-04-06 ソニー株式会社 MEMORY CONTROL DEVICE, MEMORY CONTROL METHOD, PROGRAM
JP4832521B2 (en) * 2005-09-25 2011-12-07 深▲ちぇん▼市朗科科技股▲ふん▼有限公司 Data management method in flash memory media
JP2007334935A (en) * 2006-06-12 2007-12-27 Sony Corp Nonvolatile memory
US8732385B2 (en) 2006-06-12 2014-05-20 Sony Corporation Non-volatile memory, controller controlling next access
JP2012053879A (en) * 2008-02-29 2012-03-15 Toshiba Corp Information processor
JP4829342B2 (en) * 2008-02-29 2011-12-07 株式会社東芝 Information processing apparatus and nonvolatile semiconductor memory drive
US8099544B2 (en) 2008-02-29 2012-01-17 Kabushiki Kaisha Toshiba Information processing apparatus and nonvolatile semiconductor memory drive
JP2012038327A (en) * 2008-02-29 2012-02-23 Toshiba Corp Nonvolatile semiconductor memory drive
WO2009107283A1 (en) * 2008-02-29 2009-09-03 Kabushiki Kaisha Toshiba Information processing apparatus and nonvolatile semiconductor memory drive
JP2010091458A (en) * 2008-10-09 2010-04-22 Yokogawa Electric Corp Measurement device
US9367444B2 (en) 2012-03-16 2016-06-14 Kabushiki Kaisha Toshiba Non-volatile memory device, control method for information processing device, and information processing device
JP2016525240A (en) * 2013-07-16 2016-08-22 インテル・コーポレーション Erase management in memory systems
CN111208950A (en) * 2020-01-15 2020-05-29 山西银河电子设备厂 Method for improving NORFLASH service cycle based on single chip microcomputer

Similar Documents

Publication Publication Date Title
JP4967680B2 (en) Storage device, computer system, and storage device management method
JP3692313B2 (en) Nonvolatile memory control method
US10255192B2 (en) Data storage device and data maintenance method thereof
KR100843543B1 (en) System comprising flash memory device and data recovery method thereof
US8312203B2 (en) Semiconductor storage device and method of controlling a semiconductor storage device by allocating a physical block composed of plural pages to a group of logical addresses
JP5035636B2 (en) Moving sectors in blocks in flash memory
JP5336060B2 (en) Nonvolatile memory device and method of operating the same
JP5130646B2 (en) Storage device
JP4058322B2 (en) Memory card
US7870328B2 (en) Memory controller and flash memory system
US7558904B2 (en) Controller, data memory system, data rewriting method, and computer program product
JP2004303238A (en) Flash memory access device and method
JP2004240660A (en) Control method for nonvolatile memory device
US20070005929A1 (en) Method, system, and article of manufacture for sector mapping in a flash device
JP2003058417A (en) Storage device
JP3808842B2 (en) Storage device having rewritable nonvolatile memory and control method of nonvolatile memory for storage device
JP2014194817A (en) Storage device
JP4513786B2 (en) Memory controller, memory system, and memory control method
JP2007323159A (en) Memory controller, flash memory system therewith, and method for controlling flash memory
JP2008112455A (en) Memory card
JP3934659B1 (en) Memory controller and flash memory system
US7996598B2 (en) Memory management module
US20210117315A1 (en) Memory controller and flash memory system
JP2009211152A (en) Information processing apparatus, memory system, and control method therefor
JP5264459B2 (en) Semiconductor memory device

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20050524

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060206

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060206

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20061129

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081212

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090106

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090428