JP2004234473A - Nonvolatile storage device - Google Patents

Nonvolatile storage device Download PDF

Info

Publication number
JP2004234473A
JP2004234473A JP2003024121A JP2003024121A JP2004234473A JP 2004234473 A JP2004234473 A JP 2004234473A JP 2003024121 A JP2003024121 A JP 2003024121A JP 2003024121 A JP2003024121 A JP 2003024121A JP 2004234473 A JP2004234473 A JP 2004234473A
Authority
JP
Japan
Prior art keywords
physical
block
reserved
blocks
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003024121A
Other languages
Japanese (ja)
Inventor
Keisuke Sakai
敬介 坂井
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 JP2003024121A priority Critical patent/JP2004234473A/en
Publication of JP2004234473A publication Critical patent/JP2004234473A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To extend the life of a nonvolatile storage device using a nonvolatile memory by preventing a failure of the nonvolatile memory. <P>SOLUTION: The nonvolatile storage device comprises the nonvolatile memory having a plurality of physical blocks and a controller. The controller selects a plurality of physical blocks from the nonvolatile memory as first reservation blocks, makes any one of the first reservation blocks store a first table showing the correlation between a logic address inputted and the physical address of the nonvolatile memory, and makes the nonvolatile memory store a second table showing the physical addresses of the first reservation blocks. When writing is performed to the nonvolatile memory, the controller rewrites the first table, and makes a block different from the one which stored the first table before rewriting of the first reservation blocks store the rewritten first table. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、書換え可能な不揮発性メモリを有する記憶装置に関し、特に不揮発性メモリへの書き込みを管理する技術に関する。
【0002】
【従来の技術】
近年、コンピュータ等の電子機器で用いられるデータを記憶させておく外部記憶装置として、主としてカード状の記憶装置の使用が広がっている。このような記憶装置には、書換え可能な不揮発性半導体メモリが用いられている。
【0003】
代表的な書き換え可能な不揮発性半導体メモリとして、フラッシュメモリがある。フラッシュメモリでは、格納されるデータはブロック(物理ブロック)単位で管理されており、データの消去はブロック単位で行われる。また各ブロックは複数のページを有している。ページは、フラッシュメモリにおけるデータの読み出し・書き込みの最小単位である。一般にフラッシュメモリにおいては、消去とは、全ビットを“1”とする処理を示し、書き込みとは、指定されたビットを“0”とする処理を示す。
【0004】
各ページは、データを格納する領域とは別に冗長部を有しており、当該ページに割り当てられている論理アドレスに関した情報や、データの訂正符号がこの冗長部に格納される。各ページにはフラッシュメモリ内で一意な物理アドレスが割り当てられており、フラッシュメモリの制御装置は、フラッシュメモリにコマンドを送る際に、物理アドレスを指定することによって処理を制御する。
【0005】
一方、コンピュータ等のホストから記憶装置に対しデータアクセスを行う際、ホストはセクタと呼ばれるデータサイズを単位としてデータを取り扱う。また、ホストは、フラッシュメモリ上で格納されるデータを、物理ブロックと同じサイズを有する論理ブロックを単位として管理する。論理ブロックは、一般に複数のセクタから構成されている。各セクタには論理的な順番である論理アドレスが付加されており、ホストは、記憶装置に論理アドレスを指定することによって処理を制御する。
【0006】
図14は、一般的な不揮発性記憶装置におけるデータ管理についての説明図である。図14は、論理データ構成と物理データ構成との間の対応関係を示している。論理データ構成は、ホストから指定されるデータの構成であり、物理データ構成は、不揮発性メモリに格納されているデータの構成である。
【0007】
書き込み済みの論理ブロックは、フラッシュメモリ内の物理ブロックと1対1に対応付けられ、管理されている(未書き込みの論理ブロックには、対応する物理ブロックは存在しない)。Q+1個(Qは0以上の整数)の論理ブロックが1つの論理セグメントを構成する。また、P+1個(Pは0以上の整数)の物理ブロックが1つの物理セグメントを構成する。
【0008】
ここで、各論理セグメントはそれぞれ、対応する1つの物理セグメントに割り当てられている。ある論理セグメントを構成する論理データは、特定の物理セグメントとして管理される領域に格納される(物理ブロックには不良ブロックも存在するため、一般にQ<Pである)。したがって、フラッシュメモリが格納する、論理ブロックと物理ブロックとの間の対応情報であるアドレス変換情報(以下では、ATと称する。論物変換情報とも呼ばれる。)は、物理セグメント単位で管理されることになる。
【0009】
図15は、従来の不揮発性記憶装置の構成の例を示すブロック図である。図15の不揮発性記憶装置900は、ホストインタフェース910と、コントローラ920と、揮発性メモリであるRAM(random access memory)930と、不揮発性メモリ940とを備えている。ホストインタフェース910は、ホスト902からコマンド等を受け、コントローラ920に伝える。コントローラ920は、ホストインタフェース910、RAM930及び不揮発性メモリ940の間の調停、並びにこれらに対する制御を行う。
【0010】
不揮発性メモリ940は、書き換え可能な不揮発性メモリであって、管理領域942とデータ領域944とを有している。管理領域942にはアドレス変換情報が格納され、データ領域944にはホスト902が読み書きを行うデータが格納される。
【0011】
管理領域942は、ATIP952と、ATI954と、AT956とを有している。データ領域944は、4個の物理セグメントを有している。AT956には、各物理セグメントに対応するテーブルである。ATI954は、各テーブルの物理アドレスを格納する。
【0012】
RAM930は、ATI954を読み出した後にこれを格納するためのATIRAM932と、AT956のテーブルのいずれか1つを読み出した後にこれを格納するためのATRAM934とを有している。
【0013】
図16は、図15の不揮発性メモリ940の管理領域942におけるデータ構造を示す説明図である。ATIP952は、特定ブロック(例えば先頭ブロック)に割り当てられており、ATI954の物理アドレスを格納する。ATI954は、AT956の各テーブル(AT0,AT1,AT2,AT3)の物理アドレスを格納する。テーブルAT0からAT3は、4個の物理セグメントのそれぞれのアドレス変換情報を示している。
【0014】
図17は、図15の不揮発性記憶装置の書き込み時における処理の例を示すフローチャートである。
【0015】
不揮発性記憶装置900にホスト902からデータの書き込み命令が送られると、ステップS902において、不揮発性記憶装置900は、ホスト902から指定された書き込み対象の論理アドレスから、書き込み対象の物理ブロックが割り当てられている物理セグメントを求める。
【0016】
ステップS904では、ステップS902で求められた物理セグメントのATデータが既にATRAM934に読み出されているか否かを判断する。ATデータが読み出されていない場合には、ステップS906に進む。既にATデータが読み込まれている場合には、ステップS908に進む。
【0017】
ステップS906では、ATIRAM932を参照して、求められた物理セグメントに対応するATデータをATRAM934に読み出す。ステップS908では、ATRAM934を参照して、ホスト902から指定された論理アドレスに対応する物理ブロックを求める。
【0018】
ステップS910では、対応する物理ブロックが存在するか否かを判断する。対応物理ブロックが存在する場合には、ステップS916に進む。対応物理ブロックが存在しない場合には、対応物理ブロックを指定しなければならないので、ステップS912に進む。
【0019】
ステップS912では、ATRAM934を参照して、当該物理セグメント内を探索して、まだ論理ブロックに割り当てられていない物理ブロックを選択する。ステップS914では、ATRAM934と、ATデータを書き換えることによって、選択された物理ブロックを指定された論理ブロックに対応付ける。以上の処理により、ホスト902から指定された論理アドレスに対応する物理ブロックが割り当てられる。
【0020】
続いて、割り当てられた物理ブロックへデータを書き込む。不揮発性メモリは、物理ブロック単位でデータの消去を行うので、既にデータが書き込まれたページにデータを上書きする際には、まずブロック全体のデータを消去する必要がある。このため、ステップS916では、上書き対象の物理ブロック内のデータであって更新されない領域のデータを読み出して、一時的にRAM930内に待避させる。このようなデータを、再度書き込む必要があるからである。
【0021】
ステップS918では、上書き対象の物理ブロックのデータを消去後、ステップS916において待避させたデータと、ホスト902から送られたデータとを併せて書き込む。ステップS920では、ステップS918における消去及び書き込みが正常に終了したか否かを判断する。正常に終了した場合には書き込み処理を終了する。正常に終了しなかった場合には、ステップS922に進む。
【0022】
ステップS920で正常に終了しなかったと判断された場合には、その物理ブロックは不良ブロックになったということであるので、指定された論理アドレスに対応する物理ブロックを変更する必要がある。そこで、ステップS922では、ステップS912と同様に、当該物理セグメント内を探索して、まだ論理ブロックに割り当てられていない物理ブロックを選択し、ステップS924では、ステップS914と同様に、選択された物理ブロックを論理ブロックと対応付けてATRAM934とATデータとを更新する。更に、ステップS926では、ステップS916及びS918と同様に、データの待避、消去、及び書き込みを行う。その後、再びステップS920の処理を行う。
【0023】
これに関連する技術が、例えば特許文献1に開示されている。
【0024】
【特許文献1】
特開2001−142774号公報
【0025】
【発明が解決しようとする課題】
フラッシュメモリの特徴として、各ブロックの書き込み頻度にバラつきがあると、書き込み頻度の高いブロックから破壊されていく可能性が高まるということがある。このため、フラッシュメモリを使用する際には、各ブロックの書き込み/消去頻度ができるだけ均等となるようにデータの書き込みを行うとともに、破壊されたブロックに対して書き込み・消去等のアクセスを行わないように管理する必要がある。
【0026】
また、書き込み・消去に要する処理時間が長いので、特に電源が不安定な携帯機器で使用される可能性の高いメモリカードのような不揮発性記憶装置では、書き込みや消去の処理中に電源遮断が生じた場合であってもフラッシュメモリ内のデータの整合性を確保するための対策が必要である。
【0027】
しかし、従来の技術においては、例えばFAT(file allocation table)情報が書き込まれる論理ブロックのように、特定の論理ブロックが常に同一の物理ブロックにのみ書き込まれることがあった。このため、例えばFAT情報の更新等のように、同一論理ブロックを何度も書き換えるような処理をホストが行った場合には、同一物理セグメント内に未使用の物理ブロックがあるにも関わらず、特定の物理ブロックの書き込み回数のみが増加し、フラッシュメモリの寿命を縮めるという問題があった。
【0028】
また、従来は、データの書き換え(特にATデータ)の際にホストからの電源電圧の供給が遮断された場合には、不揮発性メモリ内部で格納されているデータの論理的な不整合が生じることになり、ホストにデータが正しく読み出せなかったり、その後のアクセスによりデータの破壊が生じたりする可能性が高いという問題があった。
【0029】
本発明は、不揮発性メモリの故障を防ぎ、これを用いる不揮発性記憶装置の寿命を伸ばすことを目的とする。また、不揮発性記憶装置において、供給電圧が低下しても、格納されている論理データの破壊が生じないようにすることを目的とする。
【0030】
【課題を解決するための手段】
前記課題を解決するため、請求項1の発明が講じた手段は、不揮発性記憶装置として、複数の物理ブロックを有する不揮発性メモリと、コントローラとを備え、前記コントローラは、前記不揮発性メモリから前記物理ブロックを第1の予約ブロックとして複数選択し、入力された論理アドレスと前記不揮発性メモリの物理アドレスとの対応関係を示す第1のテーブルを前記第1の予約ブロックのうちのいずれか1つに格納させ、前記複数の第1の予約ブロックの物理アドレスを示す第2のテーブルを前記不揮発性メモリに格納させ、かつ、前記不揮発性メモリに書き込みを行う場合には、前記第1のテーブルを書き換え、前記第1の予約ブロックのうち、書き換え前の前記第1のテーブルが格納されていたものとは異なるものに、書き換え後の前記第1のテーブルを格納させるものである。
【0031】
請求項1の発明によると、書き換えの頻度が高い第1のテーブルを、更新する毎に同一の物理ブロックに書き込み続けることがないので、不揮発性メモリの各物理ブロックの書き込み頻度を均等に近づけることができる。このため、不揮発性記憶装置の故障確率を小さくすることができる。
【0032】
また、請求項2の発明では、請求項1に記載の不揮発性記憶装置において、前記コントローラは、前記第1の予約ブロックのいずれにも書き込みが所定の回数以上行われると、前記不揮発性メモリから前記物理ブロックを複数選択して、新たな前記第1の予約ブロックとして用いるものである。
【0033】
請求項2の発明によると、第1の予約ブロックを所定の回数ずつ使った後に、新たな第1の予約ブロックを用いるので、第1の予約ブロックの書き込み頻度をほぼ等しくし、第2のテーブルの書き込み頻度を低くすることができる。
【0034】
また、請求項3の発明では、請求項2に記載の不揮発性記憶装置において、前記コントローラは、前記不揮発性メモリから前記物理ブロックを第2の予約ブロックとして複数選択し、前記第2のテーブルを前記第2の予約ブロックのうちのいずれか1つに格納させ、前記複数の第2の予約ブロックの物理アドレスを示す第3のテーブルを前記不揮発性メモリの所定のアドレスに格納させ、かつ、新たな前記第1の予約ブロックを用いる場合には、前記第2のテーブルを書き換え、前記第2の予約ブロックのうち、書き換え前の前記第2のテーブルが格納されていたものとは異なるものに、書き換え後の前記第2のテーブルを格納させるものである。
【0035】
請求項3の発明によると、第2のテーブルを、更新する毎に同一の物理ブロックに書き込み続けることがないので、不揮発性メモリの各物理ブロックの書き込み頻度をより均等に近づけることができる。
【0036】
また、請求項4の発明では、請求項3に記載の不揮発性記憶装置において、前記コントローラは、前記第2の予約ブロックのいずれにも書き込みが所定の回数以上行われると、前記不揮発性メモリから前記物理ブロックを複数選択して、新たな前記第2の予約ブロックとして用いるものである。
【0037】
請求項4の発明によると、第2の予約ブロックを所定の回数ずつ使った後に、新たな第2の予約ブロックを用いるので、第2の予約ブロックの書き込み頻度をほぼ等しくし、所定のアドレスに格納される第3のテーブルの書き込み頻度を低くすることができる。
【0038】
また、請求項5の発明では、請求項3に記載の不揮発性記憶装置において、前記コントローラは、前記第3のテーブルに、前記第1及び第2のテーブルを加えて、前記不揮発性メモリの前記所定のアドレスに格納させるものである。
【0039】
請求項5の発明によると、更新頻度は少ないが重要なデータを格納した物理ブロックに、第1のテーブルの記述に基づいて直接アクセスすることができるので、初期化時等に簡便な処理でデータを取得することが可能となり、初期化時間の短縮等を行うことができる。
【0040】
【発明の実施の形態】
以下、本発明の実施の形態について、図面を参照しながら説明する。
【0041】
(第1の実施形態)
図1は、本発明の第1の実施形態に係る不揮発性記憶装置のブロック図である。図1の不揮発性記憶装置100は、ホストインタフェース10と、コントローラ20と、RAM30と、不揮発性半導体メモリ40とを備えている。ホスト2は、例えばコンピュータやオーディオプレーヤである。不揮発性記憶装置100は、例えばメモリカードである。
【0042】
ホストインタフェース10は、ホスト2からコマンドを受け取り、これをレジスタ情報に変換する等の必要な処理を行い、コントローラ20に出力する。また、ホストインタフェース10は、ホスト2が出力した不揮発性メモリ40への書き込みデータをコントローラ20に出力し、不揮発性メモリ40からの読み出しデータをホスト2に出力する。コントローラ20は、ホストインタフェース10、RAM30、及び不揮発性メモリ40の動作を制御する。
【0043】
不揮発性メモリ40は、書き換え可能なものであって、例えばフラッシュメモリである。不揮発性メモリ40は、ホスト2から送られたデータを格納するデータ領域44と、データ領域44に格納されたデータの論理的なつながりを管理するためのデータを格納する管理領域42とを有している。
【0044】
データ領域44は、N+1個(Nは0以上の整数)の物理セグメントを有している。各物理セグメントは、ホストから送られたデータを格納する物理ブロックと、複数のAT予約ブロック(第1の予約ブロック)とを有する。AT予約ブロックは、その物理セグメント内の物理ブロックと論理ブロックとの対応関係を示す、第1のテーブルとしてのアドレス変換テーブル(アロケーションテーブルともいう。以下では、ATと称する。)を格納するために予約された物理ブロックである。AT予約ブロックのうちの1つが、現在有効なATを保持するために用いられる。
【0045】
また、管理領域42は、各物理セグメントのAT予約ブロックのアドレスを示す第2のテーブルとしてのATI54を格納する物理ブロックと、この物理ブロックの物理アドレスを示すポインタをATIP52として格納する物理ブロックとを有する。特に、ATIP52を格納する物理ブロックは、特定の物理アドレスを有しており、例えば先頭物理ブロックである。ATI54は、一定のアドレスに格納されていてもよいし、格納されるアドレスを管理領域42内において必要に応じて変えるようにしてもよい。
【0046】
RAM30は、ATI54のデータを格納するATIRAM32と、現在有効なATを格納するATRAM34と、現在有効なATを持つ物理ブロックを示すポインタを示すデータを格納するATI_Point36とを有する。
【0047】
コントローラ20は、不揮発性記憶装置100の初期化時において、ATI54のATIRAM32への読み出し、AT予約ブロックのうち有効なATを持つ物理ブロックの判断、及び、有効と判断された物理ブロックを示すポインタを示すデータのATI_Point36への読み出しを行う。
【0048】
図2は、図1の不揮発性メモリ40が格納するデータの構成についての説明図である。ATIP52は、ATI54の物理アドレスを有している。各物理セグメントでは、その物理セグメントのATを格納するためのブロックとして、M+1個(Mは自然数)の物理ブロックがAT予約ブロックとして予約されている。図2の場合には、AT70に示されているように、物理セグメント0においては物理ブロック1,物理ブロック3等が、それぞれAT予約ブロック82a,82b等として予約されている。予約は、例えば出荷時に行われる。予約されたブロックに対しては、論理ブロックとの対応付けは行われない。AT予約ブロックのうちのいずれかに、現在有効なAT70が格納される。
【0049】
ATI54は、各物理セグメントに対してM+1個のAT予約ブロックの物理アドレスを格納している。図2では、AT予約ブロック82aを示すためのポインタと、このポインタが示す物理アドレスとの関係等が、ATI54に示されている。
【0050】
図3は、図1の不揮発性記憶装置の書き込み時における処理の例を示すフローチャートである。図3の各ステップについて説明する。
【0051】
ステップS2において、コントローラ20は、ホスト2からデータの書き込み命令を受けると、ホスト2によって指定された論理アドレスから、データを書き込む物理セグメントを求める。
【0052】
ステップS4では、コントローラ20は、ステップS2で求めた物理セグメントのATがATRAM34に読み出し済みであるか否かを判断する。読み出し済みである場合には、ステップS8に進み、その他の場合には、ステップS6に進む。
【0053】
ステップS6では、コントローラ20は、ATI_Point36が格納する、現在有効なATを示すポインタについてのデータを用いて、ATIRAM32が格納するATI54のデータから当該物理セグメントのATが格納された物理ブロックの物理アドレスを求め、現在有効なATをATRAM34に読み出す。
【0054】
その後、ステップS8では、コントローラ20は、ATRAM34を参照して、当該物理セグメント内を探索し、AT予約ブロック以外であってまだ論理ブロックとは対応付けられていない未割り当て物理ブロックを選択する。ここで、コントローラ20は、未割り当て物理ブロックの中から、例えば乱数を用いてランダムに物理ブロックを選択する。また、各物理ブロックに、それまでにその物理ブロックに対して行われた書き込みの回数が記録されるようにしておき、コントローラ20は、未割り当て物理ブロックの中で、特に書き込みが行われた回数が少ない物理ブロックを求めるようにしてもよい。
【0055】
ステップS10では、コントローラ20は、ホスト2から送られたデータを選択された物理ブロックに書き込む。
【0056】
ステップS12では、コントローラ20は、書き込みが正常に終了したか否かを判断する。書き込みが正常に終了した場合には、ステップS14に進み、正常に終了しなかった場合には、ステップS8に戻り、再び未割り当て物理ブロックを探す。
【0057】
ステップS14では、コントローラ20は、ATRAM34を参照して、ホスト2から指定された論理アドレスに対応する物理ブロックを求める。
【0058】
ステップS16では、コントローラ20は、対応する物理ブロックが存在するか否かを判断する。対応する物理ブロックが存在する場合には、ステップS18に進み、存在しない場合には、ステップS22に進む。
【0059】
ステップS18では、コントローラ20は、ホスト2からデータが送られておらず、書き込みを行っていない領域に対応するデータを、ステップS14で求められた対応する物理ブロックから読み出して、ステップS8で選択された物理ブロックに書き込む。
【0060】
ステップS20では、コントローラ20は、ステップS18での書き込みが正常に終了したか否かを判断する。正常に終了した場合には、ステップS22に進み、正常に終了しなかった場合には、ステップS8に戻る。以上で、ホスト2から送られたデータを不揮発性メモリ40に格納する処理が終了する。続いて当該物理セグメントのAT情報の更新を行う。
【0061】
ステップS22では、コントローラ20は、選択された物理ブロックをホスト2から指定された論理アドレス示された論理ブロックに対応するように、ATRAM34のデータを更新する。
【0062】
ステップS30では、コントローラ20は、ATの更新を行い、書き込み処理を終了する。
【0063】
図4は、図3のATを更新するステップS30における処理の例を示すフローチャートである。
【0064】
まず、ステップS32では、コントローラ20は、更新可能なAT予約ブロックが存在するか否かを判断する。すなわち、コントローラ20は、ATI_Point36のデータに基づき、全てのAT予約ブロックに所定の回数(例えば1回)以上の書き込みが行われていることがわかった場合には、更新可能なブロックは存在しないと判断し、ステップS34に進む。その他の場合には、更新可能なブロックは存在すると判断し、ステップS40に進む。
【0065】
所定回数以上の書き込みが行われていた場合、この物理セグメントの全体の書き込み頻度を均等に近づけるために、新たにATを格納するためのAT予約ブロックを設定する。そこで、ステップS34では、コントローラ20は、この物理セグメント内を探索して、AT予約ブロック以外であり、かつ、まだ論理ブロックと対応付けられていない未割り当て物理ブロックを選択する。ステップS34における処理は、物理ブロックをM+1個選択する点の他は、ステップS8における処理と同様である。選択された未割り当て物理ブロックは、新たなAT予約ブロックとして扱われる。
【0066】
ステップS36では、コントローラ20は、選択されたAT予約ブロックの物理アドレスでATIRAM32とATRAM34とを更新する。
【0067】
ステップS38では、コントローラ20は、ATIRAM32のデータを管理領域42内にATI54のデータとして書き込む。
【0068】
その後、ステップS40では、コントローラ20は、この物理ブロックについてのATI54のテーブルにおいて、ATI_Point36が、現在示すポインタの次のポインタを示すように、そのデータを更新する。その後、ATIRAM32及びATI_Point36のデータに基づいて、更新可能なAT予約ブロックに、ATRAM34のデータを書き込む。
【0069】
ステップS42では、コントローラ20は、ステップS40の処理が正常終了したか否かを判断する。正常終了した場合は、AT更新処理を終了する。正常終了しなかった場合は、ステップS32に戻る。
【0070】
このように、第1の実施形態の不揮発性記憶装置によると、不揮発性メモリにおいて、ATのデータを書き込むための予約ブロックを複数用いる。また、予約ブロックとして、書き込み頻度の少ない物理ブロックを選択する。書き換え頻度が大きいATのデータを、特定の物理ブロックにのみ書き込み続けることがないので、不揮発性メモリの各物理ブロックの書き込み頻度を均等に近づけることが可能となる。そして、不揮発性記憶装置の故障確率を小さくし、寿命を延ばすことができる。
【0071】
また、第1の実施形態の不揮発性記憶装置は、ホストから物理ブロックへのデータの書き込み時には、書き込みが正常に終了した後に物理ブロックと論理ブロックとの間のアドレス変換テーブルを更新する。このため、書き込み処理中に供給電圧が低下したり、電源が遮断されても書き込み前のデータは有効であり、データの喪失を防ぐことができる。したがって、この不揮発性記憶装置を用いて安定したシステムを構築することができる。
【0072】
(第2の実施形態)
第2の実施形態では、ATのみではなく、ATIをも複数の予約ブロックのうちのいずれかに格納させるようにした場合について説明する。
【0073】
図5は、本発明の第2の実施形態に係る不揮発性記憶装置のブロック図である。図5の不揮発性記憶装置200は、ホストインタフェース210と、コントローラ220と、RAM230と、不揮発性半導体メモリ240とを備えている。図5において、ホストインタフェース210は、図1のホストインタフェース10と同様のものである。
【0074】
不揮発性メモリ240は、図1の不揮発性メモリ40とほぼ同様のものであって、管理領域242と、データ領域244とを有している。
【0075】
データ領域244は、N+1個の物理セグメントを有している。各物理セグメントは、ホストから送られたデータを格納する物理ブロックと、その物理セグメント内の物理ブロックと論理ブロックとの対応関係を示すATを格納するために予約された複数のAT予約ブロックと、その物理セグメントについてのAT予約ブロックのアドレスを示すテーブルであるATIを格納するために予約された複数のATI予約ブロック(第2の予約ブロック)とを有する。第1の実施形態の場合と同様に、AT予約ブロックのうちの1つが、現在有効なATを保持するために用いられる。更に、ATI予約ブロックのうちの1つが、現在有効なATIを保持するために用いられる。
【0076】
また、管理領域242は、各物理セグメントのATI予約ブロックのアドレスを示す第3のテーブルとしてのATIP252を格納する物理ブロックを有する。ATIP252を格納する物理ブロックは、特定の物理アドレスを有しており、例えば先頭物理ブロックである。すなわち、ATIP252は、一定のアドレスに格納されている。
【0077】
RAM230は、現在有効なATIを格納するATIRAM232と、現在有効なATを格納するATRAM234と、現在有効なATを持つ物理ブロックを示すポインタを示すデータを格納するATI_Point236と、現在有効なATIを持つ物理ブロックを示すポインタを示すデータを格納するATIP_Point238とを有する。
【0078】
コントローラ220は、不揮発性記憶装置200の初期化時において、ATIのATIRAM232への読み出し、AT予約ブロックのうち有効なATを持つ物理ブロックの判断、有効と判断された物理ブロックを示すポインタを示すデータのATI_Point236への読み出し、ATI予約ブロックのうち有効なATIを持つ物理ブロックの判断、及びこの際に有効と判断された物理ブロックを示すポインタを示すデータのATIP_Point238への読み出しを行う。
【0079】
図6は、図5の不揮発性メモリ240が格納するデータの構成についての説明図である。ATIP252は、各物理セグメントのATI予約ブロックのアドレスを示すテーブルを有している。
【0080】
各物理セグメントでは、その物理セグメントのATを格納するためのブロックとして、M+1個の物理ブロックがAT予約ブロックとして予約され、その物理セグメントのATIを格納するためのブロックとして、L+1個(Lは自然数)の物理ブロックがATI予約ブロックとして予約されている。
【0081】
図6の場合には、テーブル270に示されているように、物理セグメント0においては物理ブロック1,物理ブロック3等が、それぞれAT予約ブロック282a,282b等として予約されている。更に、この物理セグメントにおいては物理ブロック2等が、ATI予約ブロック284a等として予約されている。予約は、例えば出荷時に行われる。予約されたブロックに対しては、論理ブロックとの対応付けは行われない。
【0082】
各ATIは、各物理セグメントについて、M+1個のAT予約ブロックの物理アドレスを格納している。ATIP252は、N+1個の物理セグメントのそれぞれについてL+1個のATI予約ブロックの物理アドレスを格納している。図6では、ATI予約ブロック284aを示すためのポインタと、このポインタが示す物理アドレスとの関係等が、ATIP252に示されている。また、AT予約ブロック282a,282bを示すためのポインタと、これらのポインタがそれぞれ示す物理アドレスとの関係等が、ATI予約ブロック284aに格納されたATI254に示されている。
【0083】
図5の不揮発性記憶装置の書き込み時における処理について説明する。主な処理の流れは、図3を参照して説明したものと同様であるが、AT更新を行うステップにおける処理が異なる。
【0084】
図7は、図5の不揮発性記憶装置の書き込み時におけるATを更新するステップの処理の例を示すフローチャートである。図7において、ステップS32,S34,S36,S40,S42の処理は、図4を参照して説明したものと同じであるので、その説明を省略する。ステップS150では、コントローラ220は、データ領域244に格納されたATIの更新を行う。
【0085】
図8は、図7のATIの更新を行うステップS150における処理の例を示すフローチャートである。
【0086】
ステップS152では、ステップS32と同様に、コントローラ220は、更新可能なATI予約ブロックが存在するか否かを判断する。すなわち、コントローラ220は、ATIP_Point238のデータに基づき、全てのATI予約ブロックに所定の回数(例えば1回)以上の書き込みが行われていれば、更新可能なブロックは存在しないと判断し、ステップS154に進む。そうでなければ、更新可能なブロックは存在すると判断し、ステップS160に進む。
【0087】
所定回数以上の書き込みが行われていた場合、この物理セグメントの全体の書き込み頻度を均等に近づけるために、新たにATを格納するためのAT予約ブロックを設定する。そこで、ステップS154では、コントローラ220は、この物理セグメント内において、AT予約ブロック及びATI予約ブロック以外であり、かつ、まだ論理ブロックと対応付けられていない未割り当て物理ブロックを選択する。ステップS154における処理は、物理ブロックをL+1個選択する点の他は、ステップS34における処理と同様である。選択した未割り当て物理ブロックは、新たなATI予約ブロックとして扱われる。
【0088】
ステップS156では、コントローラ220は、選択されたATI予約ブロックの物理アドレスでATRAM234を更新する。
【0089】
ステップS158では、コントローラ220は、管理領域242内のATIP252を更新する。
【0090】
その後、ステップS160では、コントローラ220は、ATIP_Point238のデータに基づいて、更新すべきATI予約ブロックに、ATIRAM232のデータを書き込む。
【0091】
ステップS162では、コントローラ220は、ステップS160の処理が正常終了したか否かを判断する。正常終了した場合は、ATI更新処理を終了する。正常終了しなかった場合は、ステップS152に戻る。
【0092】
このように、書き込まれる物理ブロックが固定されたATIP252が書き換えられるのは、全てのATI予約ブロックを少なくとも1回ずつ使い終える毎であり、ATIP252の書き換え頻度を大幅に低減させることができる。
【0093】
第2の実施形態の不揮発性記憶装置では、不揮発性メモリにおいて、AT予約ブロックだけではなく、ATIのデータを書き込むためのATI予約ブロックを複数用いる。また、予約ブロックとして、書き込み頻度の少ない物理ブロックを選択する。書き換え頻度が大きいAT及びATIのデータを、それぞれ特定の物理ブロックにのみ書き込み続けることがないので、不揮発性メモリの各物理ブロックの書き込み頻度をより均等に近づけることが可能となる。そして、不揮発性記憶装置の故障確率を小さくし、寿命を延ばすことができる。
【0094】
(第3の実施形態)
第3の実施形態では、複数の種類のポインタを用いる場合について説明する。
【0095】
図9は、本発明の第3の実施形態に係る不揮発性記憶装置のブロック図である。図9の不揮発性記憶装置300は、ホストインタフェース310と、コントローラ320と、RAM330と、不揮発性半導体メモリ340とを備えている。図9において、ホストインタフェース310は、図1のホストインタフェース10と同様のものである。RAM330は、図5のRAM230と同様のものである。
【0096】
不揮発性メモリ340は、図1の不揮発性メモリ40とほぼ同様のものであって、管理領域342と、データ領域344とを有している。データ領域344は、図5のデータ領域244と同様に、複数のAT予約ブロックと、複数のATI予約ブロックとを有している。
【0097】
管理領域342は、ATIP352を格納する物理ブロックを有している。この物理ブロックは、特定の物理アドレスを有しており、例えば先頭物理ブロックである。
【0098】
コントローラ320は、不揮発性記憶装置300の初期化時において、図5のコントローラ220と同様に、ATIのATIRAM332への読み出し、AT予約ブロックのうち有効なATを持つ物理ブロックの判断、有効と判断された物理ブロックを示すポインタを示すデータのATI_Point336への読み出し、ATI予約ブロックのうち有効なATIを持つ物理ブロックの判断、及びこの際に有効と判断された物理ブロックを示すポインタを示すデータのATIP_Point338への読み出しを行う。
【0099】
図10は、図9の不揮発性メモリ340が格納するデータの構成についての説明図である。ATIP352は、各物理セグメントのATI予約ブロックのアドレスを示すテーブルと、物理セグメントについてのAT予約ブロックのアドレスを示すテーブルであるATIと、物理セグメント内の物理ブロックと論理ブロックとの対応関係を示すテーブルであるATとを有している。
【0100】
各物理セグメントでは、その物理セグメントのATを格納するためのブロックとして、M+1個の物理ブロックがAT予約ブロックとして予約され、その物理セグメントのATIを格納するためのブロックとして、L+1個の物理ブロックがATI予約ブロックとして予約されている。
【0101】
図10の場合には、テーブル371に示されているように、物理セグメント1においては物理ブロック1,物理ブロック3等が、それぞれAT予約ブロック382a,382b等として予約されている。更に、この物理セグメントにおいては物理ブロック2等が、ATI予約ブロック384a等として予約されている。予約は、例えば出荷時に行われる。予約されたブロックに対しては、論理ブロックとの対応付けは行われない。
【0102】
各物理セグメントのATIは、M+1個のAT予約ブロックの物理アドレスを格納している。図10の場合、ATIP352は、N+1個の物理セグメントのそれぞれについてL+1個、すなわち、(N+1)(L+1)個のATI予約ブロックの物理アドレスと、1個の物理セグメントについてのM+1個のAT予約ブロックの物理アドレスと、1個の論理ブロックに対応した物理アドレスとを格納している。図10では、ATI予約ブロック384aにはATI354が格納されている。
【0103】
ATIP352は3種類のテーブルを有している。すなわち、物理ブロックと論理ブロックとの対応関係を示す第1のテーブルにおいては、論理ブロックと物理ブロックとが直接対応付けられており、論理ブロックそのものを0段ポインタと称することとする。AT予約ブロックのアドレスを示す第2のテーブルにおいては、ポインタとAT予約ブロックのアドレスとが対応付けられており、このポインタを1段ポインタと称することとする。ATI予約ブロックのアドレスを示す第3のテーブルにおいては、ポインタとATI予約ブロックのアドレスとが対応付けられており、このポインタを2段ポインタと称することとする。
【0104】
通常のデータを格納する論理ブロックに対応した物理ブロックにアクセスするためには、2段ポインタが用いられる。例えば、図10の場合に、物理セグメント1の物理ブロックにアクセスする際には、ATIP352において、例えばATI1_0と表記された2段ポインタに対応した物理ブロック2を参照してATIを読み出す。このATIにおいて、例えばAT1_0と表記されたポインタに対応した物理ブロック1を参照して、これに格納されたAT371を読み出す。このAT371は、物理セグメント1の現在有効なATであるので、これを参照すると、論理ブロックに対応した物理ブロックにアクセスすることができる。
【0105】
図11は、図10のデータを用いた1段ポインタによるアクセスについての説明図である。デバイス情報のように、比較的データの更新回数が少ない論理ブロックにアクセスするために、1段ポインタが用いられる。
【0106】
例えば、図11の場合に、物理セグメント0の物理ブロックにアクセスする際には、ATIP352において、例えばAT0_0と表記された1段ポインタに対応した物理ブロック1を参照して、これに格納されたAT370を読み出す。このAT370は、物理セグメント0の現在有効なATであるので、これを参照すると、論理ブロックに対応した物理ブロックにアクセスすることができる。
【0107】
図12は、図10のデータを用いた0段ポインタによるアクセスについての説明図である。ファームウェアデータのように、更新されることは少ないが、重要なデータを格納する論理ブロックにアクセスするために、0段ポインタが用いられる。
【0108】
例えば、図11の場合に、論理ブロック0にアクセスする際には、ATIP352において、例えば0段ポインタとして示された論理ブロック0に対応したセグメント1の物理ブロック4に直接アクセスすることができる。
【0109】
なお、0段ポインタで管理されている論理ブロックは、2段ポインタ又は1段ポインタを用いて参照されるATによっても管理される。これは、論理ブロックと対応していない物理ブロックの管理を物理セグメント単位で管理しているからである。
【0110】
図9の不揮発性記憶装置の書き込み時における処理について説明する。主な処理の流れは、図3を参照して説明したものと同様であるが、AT更新を行うステップにおける処理が異なる。
【0111】
図13は、図9の不揮発性記憶装置の書き込み時におけるATを更新するステップの処理の例を示すフローチャートである。図13において、ステップS32,S34,S40の処理は、図4を参照して説明したものと同じであり、ステップS150の処理は、図8を参照して説明したものと同じであるので、その説明を省略する。
【0112】
ステップS272では、コントローラ320は、書き込みを行う論理ブロックが1段ポインタで管理されている論理ブロック(1段ポインタブロック)であるか否かを判断する。1段ポインタで管理されている場合には、ステップS276に進み、その他の場合には、ステップS274に進む。
【0113】
ステップS274では、コントローラ320は、選択されたAT予約ブロックの物理アドレスでATIRAM332を更新する。
【0114】
ステップS276では、コントローラ320は、ステップS34で選択したAT予約ブロックの物理アドレスに応じてATIP352を更新する。
【0115】
ステップS278では、コントローラ320は、ステップS40の処理が正常終了したか否かを判断する。正常終了した場合は、ステップS280に進み、正常終了しなかった場合は、ステップS32に戻る。
【0116】
ステップS280では、コントローラ320は、書き込みを行う論理ブロックが0段ポインタで管理されている論理ブロック(0段ポインタブロック)であるか否かを判断する。0段ポインタで管理されている場合には、ステップS282に進み、その他の場合には、処理を終了する。
【0117】
ステップS282では、コントローラ320は、ATIP352の更新を行い、処理を終了する。
【0118】
このように、第3の実施形態の不揮発性記憶装置では、保持するデータの重要性や書き込み頻度に応じて、管理領域から物理ブロックへのリンク構成を変更することができる。すなわち、書き込み頻度の少ない論理セグメントを1段ポインタを用いて管理するので、第2の実施形態の場合に比べて、ATI予約ブロック数を減らすことが可能となる。また、更新頻度が少ないが重要なデータを0段ポインタを用いて管理するので、初期化時等に簡便な処理でデータを取得することが可能となり、開発工数の削減、初期化に要する時間の短縮を図ることができる。
【0119】
【発明の効果】
以上のように、本発明によると、不揮発性メモリの各物理ブロックに対する書き込み頻度を均等なものに近づけることができるので、不揮発性メモリの故障を防ぎ、これを用いる不揮発性記憶装置の寿命を伸ばすことができる。
【0120】
また、不揮発性メモリ内に論理データを管理するブロックが常に存在するので、供給される電源の電圧が低下しても論理データは破壊されないようにすることができる。
【図面の簡単な説明】
【図1】本発明の第1の実施形態に係る不揮発性記憶装置のブロック図である。
【図2】図1の不揮発性メモリが格納するデータの構成についての説明図である。
【図3】図1の不揮発性記憶装置の書き込み時における処理の例を示すフローチャートである。
【図4】図3のATを更新するステップにおける処理の例を示すフローチャートである。
【図5】本発明の第2の実施形態に係る不揮発性記憶装置のブロック図である。
【図6】図5の不揮発性メモリが格納するデータの構成についての説明図である。
【図7】図5の不揮発性記憶装置の書き込み時におけるATを更新するステップの処理の例を示すフローチャートである。
【図8】図7のATIの更新を行うステップにおける処理の例を示すフローチャートである。
【図9】本発明の第3の実施形態に係る不揮発性記憶装置のブロック図である。
【図10】図9の不揮発性メモリが格納するデータの構成についての説明図である。
【図11】図10のデータを用いた1段ポインタによるアクセスについての説明図である。
【図12】図10のデータを用いた0段ポインタによるアクセスについての説明図である。
【図13】図9の不揮発性記憶装置の書き込み時におけるATを更新するステップの処理の例を示すフローチャートである。
【図14】一般的な不揮発性記憶装置におけるデータ管理についての説明図である。
【図15】従来の不揮発性記憶装置の構成の例を示すブロック図である。
【図16】図15の不揮発性メモリの管理領域におけるデータ構造を示す説明図である。
【図17】図15の不揮発性記憶装置の書き込み時における処理の例を示すフローチャートである。
【符号の説明】
20,220,320 コントローラ
40,240,340 不揮発性メモリ
52,252,352 ATIP(第3のテーブル)
54,254,354 ATI(第2のテーブル)
70,270,370,371 AT(第1のテーブル)
82a,82b,282a,282b,382a,382b AT予約ブロック(第1の予約ブロック)
284a,384a ATI予約ブロック(第2の予約ブロック)
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a storage device having a rewritable nonvolatile memory, and more particularly to a technique for managing writing to the nonvolatile memory.
[0002]
[Prior art]
2. Description of the Related Art In recent years, as an external storage device for storing data used in an electronic device such as a computer, mainly a card-shaped storage device has been widely used. In such a storage device, a rewritable nonvolatile semiconductor memory is used.
[0003]
A flash memory is a typical rewritable nonvolatile semiconductor memory. In a flash memory, stored data is managed in units of blocks (physical blocks), and data is erased in units of blocks. Each block has a plurality of pages. A page is the minimum unit for reading and writing data in the flash memory. Generally, in a flash memory, erasing refers to a process of setting all bits to “1”, and writing refers to a process of setting a designated bit to “0”.
[0004]
Each page has a redundant portion separately from an area for storing data, and information relating to a logical address assigned to the page and a data correction code are stored in the redundant portion. Each page is assigned a unique physical address in the flash memory, and the control device of the flash memory controls processing by sending a command to the flash memory by designating the physical address.
[0005]
On the other hand, when a host such as a computer accesses data in a storage device, the host handles data in units of a data size called a sector. The host manages data stored in the flash memory in units of logical blocks having the same size as physical blocks. A logical block is generally composed of a plurality of sectors. A logical address, which is a logical order, is added to each sector, and the host controls processing by designating the logical address in the storage device.
[0006]
FIG. 14 is an explanatory diagram of data management in a general nonvolatile storage device. FIG. 14 shows the correspondence between the logical data configuration and the physical data configuration. The logical data configuration is a configuration of data specified by the host, and the physical data configuration is a configuration of data stored in the nonvolatile memory.
[0007]
The written logical block is managed in a one-to-one correspondence with the physical block in the flash memory (the unwritten logical block has no corresponding physical block). Q + 1 (Q is an integer of 0 or more) logical blocks constitute one logical segment. In addition, P + 1 physical blocks (P is an integer of 0 or more) constitute one physical segment.
[0008]
Here, each logical segment is assigned to one corresponding physical segment. Logical data constituting a certain logical segment is stored in an area managed as a specific physical segment (in general, Q <P because a physical block also has a bad block). Therefore, address translation information (hereinafter, referred to as AT; also referred to as logical-physical translation information) stored in the flash memory, which is correspondence information between logical blocks and physical blocks, is managed in physical segment units. become.
[0009]
FIG. 15 is a block diagram illustrating an example of a configuration of a conventional nonvolatile storage device. 15 includes a host interface 910, a controller 920, a random access memory (RAM) 930, which is a volatile memory, and a nonvolatile memory 940. The host interface 910 receives a command or the like from the host 902 and transmits it to the controller 920. The controller 920 performs arbitration between the host interface 910, the RAM 930, and the nonvolatile memory 940, and controls these.
[0010]
The non-volatile memory 940 is a rewritable non-volatile memory, and has a management area 942 and a data area 944. The management area 942 stores address conversion information, and the data area 944 stores data that the host 902 reads and writes.
[0011]
The management area 942 has an ATIP 952, an ATI 954, and an AT 956. The data area 944 has four physical segments. AT956 is a table corresponding to each physical segment. The ATI 954 stores a physical address of each table.
[0012]
The RAM 930 has an ATIRAM 932 for storing the ATI 954 after reading it, and an ATRAM 934 for reading one of the tables of the AT 956 and storing it.
[0013]
FIG. 16 is an explanatory diagram showing a data structure in the management area 942 of the nonvolatile memory 940 in FIG. The ATIP 952 is allocated to a specific block (for example, the first block) and stores the physical address of the ATI 954. The ATI 954 stores the physical address of each table (AT0, AT1, AT2, AT3) of the AT956. Tables AT0 to AT3 indicate address conversion information of each of the four physical segments.
[0014]
FIG. 17 is a flowchart illustrating an example of processing at the time of writing in the nonvolatile storage device of FIG.
[0015]
When a data write command is sent from the host 902 to the non-volatile storage device 900, in step S902, the non-volatile storage device 900 allocates a physical block to be written from the logical address of the write target specified by the host 902. The physical segment that is located.
[0016]
In step S904, it is determined whether or not the AT data of the physical segment obtained in step S902 has already been read into the ATRAM 934. If the AT data has not been read, the process proceeds to step S906. If the AT data has already been read, the process proceeds to step S908.
[0017]
In step S906, the AT data corresponding to the obtained physical segment is read out to the ATRAM 934 with reference to the ATIRAM 932. In step S908, a physical block corresponding to the logical address specified by the host 902 is obtained with reference to the ATRAM 934.
[0018]
In step S910, it is determined whether a corresponding physical block exists. If a corresponding physical block exists, the process proceeds to step S916. If there is no corresponding physical block, the process proceeds to step S912 because the corresponding physical block must be specified.
[0019]
In step S912, referring to the ATRAM 934, the physical segment is searched to select a physical block that has not been allocated to a logical block. In step S914, the selected physical block is associated with the specified logical block by rewriting the ATRAM 934 and the AT data. Through the above processing, a physical block corresponding to the logical address specified by the host 902 is allocated.
[0020]
Subsequently, data is written to the allocated physical block. Since the non-volatile memory erases data in units of physical blocks, when overwriting data on a page to which data has already been written, it is necessary to first erase the data of the entire block. For this reason, in step S916, the data in the non-updated area in the physical block to be overwritten is read and temporarily saved in the RAM 930. This is because such data needs to be written again.
[0021]
In step S918, after erasing the data of the physical block to be overwritten, the data saved in step S916 and the data sent from the host 902 are written together. In step S920, it is determined whether the erasing and writing in step S918 have been completed normally. If the writing has been completed normally, the writing process ends. If the processing has not been completed normally, the process proceeds to step S922.
[0022]
If it is determined in step S920 that the physical block has not been completed normally, it means that the physical block has become a bad block, and it is necessary to change the physical block corresponding to the specified logical address. Therefore, in step S922, similarly to step S912, the physical segment is searched to select a physical block that has not yet been assigned to a logical block. In step S924, the selected physical block is selected, as in step S914. Is associated with the logical block, and the ATRAM 934 and the AT data are updated. Further, in step S926, data saving, erasing, and writing are performed as in steps S916 and S918. After that, the process of step S920 is performed again.
[0023]
A related technique is disclosed in, for example, Patent Document 1.
[0024]
[Patent Document 1]
JP 2001-142774 A
[0025]
[Problems to be solved by the invention]
As a feature of the flash memory, if the writing frequency of each block varies, the possibility that the block with the highest writing frequency will be destroyed increases. For this reason, when using the flash memory, data is written so that the writing / erasing frequency of each block is as even as possible, and access such as writing / erasing is not performed on the destroyed block. Need to be managed.
[0026]
In addition, since the processing time required for writing and erasing is long, the power supply is cut off during the writing or erasing processing, especially in a non-volatile storage device such as a memory card which is likely to be used in a portable device having an unstable power supply. Even if it occurs, measures must be taken to ensure data consistency in the flash memory.
[0027]
However, in the related art, a specific logical block may always be written only to the same physical block, such as a logical block to which FAT (file allocation table) information is written. Therefore, when the host performs a process of rewriting the same logical block many times, for example, updating the FAT information, etc., even though there is an unused physical block in the same physical segment, There has been a problem that only the number of times of writing of a specific physical block increases and the life of the flash memory is shortened.
[0028]
Conventionally, when the supply of the power supply voltage from the host is interrupted at the time of rewriting data (particularly, AT data), logical inconsistency of data stored in the nonvolatile memory occurs. Therefore, there is a high possibility that data cannot be correctly read out by the host, or data is destroyed by subsequent access.
[0029]
An object of the present invention is to prevent a failure of a nonvolatile memory and extend the life of a nonvolatile memory device using the same. It is another object of the present invention to prevent stored logic data from being destroyed even when a supply voltage is reduced in a nonvolatile memory device.
[0030]
[Means for Solving the Problems]
In order to solve the above-described problem, a unit implemented by the invention of claim 1 includes, as a nonvolatile storage device, a nonvolatile memory having a plurality of physical blocks, and a controller. A plurality of physical blocks are selected as first reserved blocks, and a first table showing a correspondence relationship between an input logical address and a physical address of the non-volatile memory is selected from one of the first reserved blocks. In the case where the second table indicating the physical addresses of the plurality of first reserved blocks is stored in the non-volatile memory and writing is performed in the non-volatile memory, the first table is stored in the non-volatile memory. After the rewriting, the first reserved block is replaced with a block different from the one storing the first table before the rewriting. It is intended to store the first table.
[0031]
According to the first aspect of the present invention, the first table that is frequently rewritten is not continuously written in the same physical block every time it is updated. Can be. Therefore, the failure probability of the nonvolatile memory device can be reduced.
[0032]
Further, in the invention according to claim 2, in the nonvolatile storage device according to claim 1, the controller reads from the nonvolatile memory when writing to any of the first reserved blocks is performed a predetermined number of times or more. A plurality of the physical blocks are selected and used as a new first reserved block.
[0033]
According to the invention of claim 2, after the first reserved block is used a predetermined number of times, a new first reserved block is used. Therefore, the write frequency of the first reserved block is made substantially equal, and the second table is written. Can be written less frequently.
[0034]
According to a third aspect of the present invention, in the nonvolatile storage device according to the second aspect, the controller selects a plurality of the physical blocks as the second reserved blocks from the nonvolatile memory and stores the second table in the second table. Storing a third table indicating physical addresses of the plurality of second reserved blocks at a predetermined address in the nonvolatile memory; When the first reserved block is used, the second table is rewritten, and the second reserved block is different from the one in which the second table before rewriting is stored. The second table after rewriting is stored.
[0035]
According to the third aspect of the present invention, since the second table is not continuously written in the same physical block every time it is updated, the writing frequency of each physical block in the non-volatile memory can be made more uniform.
[0036]
According to a fourth aspect of the present invention, in the nonvolatile storage device according to the third aspect, the controller reads from the nonvolatile memory when writing to any of the second reserved blocks is performed a predetermined number of times or more. A plurality of the physical blocks are selected and used as a new second reserved block.
[0037]
According to the invention of claim 4, after the second reserved block is used a predetermined number of times, a new second reserved block is used. Therefore, the write frequency of the second reserved block is made substantially equal, and the second reserved block is written at a predetermined address. The writing frequency of the stored third table can be reduced.
[0038]
According to a fifth aspect of the present invention, in the nonvolatile storage device according to the third aspect, the controller adds the first and second tables to the third table, and It is stored at a predetermined address.
[0039]
According to the fifth aspect of the present invention, since the physical block storing the important data with a low update frequency can be directly accessed based on the description in the first table, the data can be easily processed at the time of initialization or the like. Thus, it is possible to shorten the initialization time.
[0040]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0041]
(1st Embodiment)
FIG. 1 is a block diagram of the nonvolatile memory device according to the first embodiment of the present invention. The non-volatile storage device 100 of FIG. 1 includes a host interface 10, a controller 20, a RAM 30, and a non-volatile semiconductor memory 40. The host 2 is, for example, a computer or an audio player. The nonvolatile storage device 100 is, for example, a memory card.
[0042]
The host interface 10 receives a command from the host 2, performs necessary processing such as converting the command into register information, and outputs the command to the controller 20. The host interface 10 outputs the write data to the nonvolatile memory 40 output from the host 2 to the controller 20, and outputs the read data from the nonvolatile memory 40 to the host 2. The controller 20 controls operations of the host interface 10, the RAM 30, and the nonvolatile memory 40.
[0043]
The nonvolatile memory 40 is rewritable, and is, for example, a flash memory. The non-volatile memory 40 has a data area 44 for storing data sent from the host 2 and a management area 42 for storing data for managing a logical connection between the data stored in the data area 44. ing.
[0044]
The data area 44 has N + 1 physical segments (N is an integer of 0 or more). Each physical segment has a physical block for storing data sent from the host, and a plurality of AT reserved blocks (first reserved blocks). The AT reserved block stores an address translation table (also referred to as an allocation table; hereinafter, referred to as an AT) as a first table that indicates a correspondence between a physical block and a logical block in the physical segment. This is a reserved physical block. One of the AT reserved blocks is used to hold the currently valid AT.
[0045]
The management area 42 includes a physical block storing an ATI 54 as a second table indicating the address of an AT reserved block of each physical segment, and a physical block storing a pointer indicating the physical address of this physical block as an ATIP 52. Have. In particular, the physical block storing the ATIP 52 has a specific physical address, and is, for example, the leading physical block. The ATI 54 may be stored at a fixed address, or the stored address may be changed as needed in the management area 42.
[0046]
The RAM 30 includes an ATIRAM 32 that stores data of the ATI 54, an ATRAM 34 that stores a currently valid AT, and an ATI_Point 36 that stores data indicating a pointer indicating a physical block having a currently valid AT.
[0047]
When initializing the nonvolatile memory device 100, the controller 20 reads the ATI 54 into the ATIRAM 32, determines a physical block having a valid AT among the AT reserved blocks, and sends a pointer indicating the physical block determined to be valid. The indicated data is read out to the ATI_Point 36.
[0048]
FIG. 2 is an explanatory diagram of the configuration of data stored in the nonvolatile memory 40 of FIG. ATIP 52 has the physical address of ATI 54. In each physical segment, M + 1 (M is a natural number) physical blocks are reserved as AT reserved blocks as blocks for storing the AT of the physical segment. In the case of FIG. 2, as shown in the AT 70, in the physical segment 0, the physical block 1, the physical block 3, and the like are reserved as AT reserved blocks 82a and 82b, respectively. The reservation is made at the time of shipment, for example. The reserved block is not associated with the logical block. The currently valid AT 70 is stored in one of the AT reserved blocks.
[0049]
The ATI 54 stores the physical addresses of M + 1 AT reserved blocks for each physical segment. In FIG. 2, the ATI 54 indicates the relationship between a pointer for indicating the AT reservation block 82a and the physical address indicated by the pointer, and the like.
[0050]
FIG. 3 is a flowchart illustrating an example of processing at the time of writing in the nonvolatile storage device of FIG. 1. Each step in FIG. 3 will be described.
[0051]
In step S2, upon receiving a data write command from the host 2, the controller 20 obtains a physical segment to which data is to be written from the logical address specified by the host 2.
[0052]
In step S4, the controller 20 determines whether the AT of the physical segment obtained in step S2 has been read out to the ATRAM 34 or not. If it has been read, the process proceeds to step S8; otherwise, the process proceeds to step S6.
[0053]
In step S6, the controller 20 determines the physical address of the physical block in which the AT of the physical segment is stored from the data of the ATI 54 stored in the ATIRAM 32 using the data of the pointer indicating the currently valid AT stored in the ATI_Point 36. Then, the currently valid AT is read out to the ATRAM 34.
[0054]
Thereafter, in step S8, the controller 20 searches the physical segment with reference to the ATRAM 34, and selects an unallocated physical block other than the AT reserved block and not yet associated with the logical block. Here, the controller 20 randomly selects a physical block from unallocated physical blocks using, for example, a random number. In addition, the number of times of writing performed on the physical block is recorded in each physical block. May be obtained for a physical block having a small number of physical blocks.
[0055]
In step S10, the controller 20 writes the data sent from the host 2 to the selected physical block.
[0056]
In step S12, the controller 20 determines whether the writing has been completed normally. If the writing is completed normally, the process proceeds to step S14. If the writing is not completed normally, the process returns to step S8 to search for an unallocated physical block again.
[0057]
In step S14, the controller 20 refers to the ATRAM 34 to obtain a physical block corresponding to the logical address specified by the host 2.
[0058]
In step S16, the controller 20 determines whether a corresponding physical block exists. If a corresponding physical block exists, the process proceeds to step S18; otherwise, the process proceeds to step S22.
[0059]
In step S18, the controller 20 reads data corresponding to an area where data has not been sent from the host 2 and in which data has not been written from the corresponding physical block obtained in step S14, and is selected in step S8. Write to the physical block.
[0060]
In step S20, the controller 20 determines whether the writing in step S18 has been completed normally. If the process has been completed normally, the process proceeds to step S22. If the process has not been completed normally, the process returns to step S8. Thus, the process of storing the data sent from the host 2 in the nonvolatile memory 40 ends. Subsequently, the AT information of the physical segment is updated.
[0061]
In step S22, the controller 20 updates the data in the ATRAM 34 so that the selected physical block corresponds to the logical block indicated by the logical address specified by the host 2.
[0062]
In step S30, the controller 20 updates the AT and ends the writing process.
[0063]
FIG. 4 is a flowchart illustrating an example of the process in step S30 of updating the AT in FIG.
[0064]
First, in step S32, the controller 20 determines whether there is an updatable AT reservation block. That is, the controller 20 determines that there is no updatable block when all AT reserved blocks have been written a predetermined number of times (for example, once) based on the data of the ATI_Point 36. Judge and proceed to step S34. In other cases, it is determined that there is an updatable block, and the process proceeds to step S40.
[0065]
If writing has been performed a predetermined number of times or more, an AT reserved block for storing an AT is newly set in order to make the writing frequency of the entire physical segment evenly close. Therefore, in step S34, the controller 20 searches this physical segment and selects an unallocated physical block other than the AT reserved block and not yet associated with the logical block. The process in step S34 is the same as the process in step S8 except that M + 1 physical blocks are selected. The selected unallocated physical block is treated as a new AT reserved block.
[0066]
In step S36, the controller 20 updates the ATIRAM 32 and the ATRAM 34 with the physical address of the selected AT reserved block.
[0067]
In step S38, the controller 20 writes the data of the ATIRAM 32 in the management area 42 as the data of the ATI54.
[0068]
After that, in step S40, the controller 20 updates the data in the table of the ATI 54 for this physical block so that the ATI_Point 36 indicates the pointer next to the current pointer. After that, based on the data in the ATIRAM 32 and the ATI_Point 36, the data in the ATRAM 34 is written to an updatable AT reserved block.
[0069]
In step S42, the controller 20 determines whether or not the processing in step S40 has been completed normally. If the processing ends normally, the AT update processing ends. If the operation has not been completed normally, the process returns to step S32.
[0070]
As described above, according to the nonvolatile storage device of the first embodiment, a plurality of reserved blocks for writing AT data are used in the nonvolatile memory. Also, a physical block with a low writing frequency is selected as a reserved block. Since the data of the AT having a high rewriting frequency is not continuously written only in a specific physical block, the writing frequency of each physical block in the nonvolatile memory can be made closer to even. Further, the failure probability of the nonvolatile memory device can be reduced, and the life can be extended.
[0071]
In addition, when writing data from a host to a physical block, the nonvolatile storage device of the first embodiment updates the address translation table between the physical block and the logical block after the writing ends normally. For this reason, even if the supply voltage is reduced during the writing process or the power is cut off, the data before writing is valid, and data loss can be prevented. Therefore, a stable system can be constructed using this nonvolatile storage device.
[0072]
(Second embodiment)
In the second embodiment, a case will be described in which not only the AT but also the ATI is stored in any of a plurality of reserved blocks.
[0073]
FIG. 5 is a block diagram of the nonvolatile memory device according to the second embodiment of the present invention. The nonvolatile storage device 200 of FIG. 5 includes a host interface 210, a controller 220, a RAM 230, and a nonvolatile semiconductor memory 240. 5, a host interface 210 is similar to the host interface 10 of FIG.
[0074]
The non-volatile memory 240 is substantially the same as the non-volatile memory 40 of FIG. 1, and has a management area 242 and a data area 244.
[0075]
The data area 244 has N + 1 physical segments. Each physical segment includes a physical block that stores data sent from the host, a plurality of AT reserved blocks that are reserved to store ATs indicating the correspondence between physical blocks and logical blocks in the physical segment, It has a plurality of ATI reserved blocks (second reserved blocks) reserved for storing ATI, which is a table indicating addresses of AT reserved blocks for the physical segment. As in the first embodiment, one of the AT reserved blocks is used to hold the currently valid AT. In addition, one of the ATI reserved blocks is used to hold the currently valid ATI.
[0076]
The management area 242 has a physical block for storing an ATIP 252 as a third table indicating the address of an ATI reserved block of each physical segment. The physical block storing the ATIP 252 has a specific physical address, and is, for example, the first physical block. That is, the ATIP 252 is stored at a fixed address.
[0077]
The RAM 230 includes an ATI RAM 232 that stores a currently valid ATI, an ATRAM 234 that stores a currently valid AT, an ATI_Point 236 that stores data indicating a pointer indicating a physical block having a currently valid AT, and a physical having a currently valid ATI. ATIP_Point 238 for storing data indicating a pointer indicating a block.
[0078]
The controller 220 reads the ATI into the ATIRAM 232 at the time of initialization of the nonvolatile memory device 200, determines the physical block having the valid AT among the AT reserved blocks, and indicates the pointer indicating the physical block determined to be valid. To the ATI_Point 236, determination of a physical block having a valid ATI among ATI reserved blocks, and reading of data indicating a pointer indicating a physical block determined to be valid at this time to the ATIP_Point 238.
[0079]
FIG. 6 is an explanatory diagram of the configuration of data stored in the nonvolatile memory 240 in FIG. The ATIP 252 has a table indicating the address of the ATI reserved block of each physical segment.
[0080]
In each physical segment, M + 1 physical blocks are reserved as AT reserved blocks as blocks for storing the AT of the physical segment, and L + 1 (L is a natural number) a block for storing the ATI of the physical segment. ) Are reserved as ATI reserved blocks.
[0081]
In the case of FIG. 6, as shown in the table 270, in the physical segment 0, the physical block 1, the physical block 3, and the like are reserved as AT reserved blocks 282a and 282b, respectively. Further, in this physical segment, the physical block 2 and the like are reserved as the ATI reservation block 284a and the like. The reservation is made at the time of shipment, for example. The reserved block is not associated with the logical block.
[0082]
Each ATI stores the physical addresses of M + 1 AT reserved blocks for each physical segment. The ATIP 252 stores the physical addresses of L + 1 ATI reserved blocks for each of the N + 1 physical segments. In FIG. 6, the relationship between a pointer for indicating the ATI reservation block 284a and the physical address indicated by the pointer is shown in the ATIP 252. The ATI 254 stored in the ATI reservation block 284a indicates, for example, the relationship between pointers for indicating the AT reservation blocks 282a and 282b and the physical addresses indicated by these pointers.
[0083]
The processing at the time of writing in the nonvolatile memory device of FIG. 5 will be described. The main processing flow is the same as that described with reference to FIG. 3, but the processing in the step of performing the AT update is different.
[0084]
FIG. 7 is a flowchart illustrating an example of processing of a step of updating the AT at the time of writing in the nonvolatile storage device of FIG. In FIG. 7, the processing of steps S32, S34, S36, S40, and S42 is the same as that described with reference to FIG. In step S150, the controller 220 updates the ATI stored in the data area 244.
[0085]
FIG. 8 is a flowchart illustrating an example of the process in step S150 of updating the ATI in FIG.
[0086]
In step S152, as in step S32, the controller 220 determines whether there is an updatable ATI reserved block. That is, based on the data of the ATIP_Point 238, the controller 220 determines that there is no renewable block if all ATI reserved blocks have been written a predetermined number of times (for example, once) or more, and proceeds to step S154. move on. Otherwise, it is determined that there is an updatable block, and the process proceeds to step S160.
[0087]
If writing has been performed a predetermined number of times or more, an AT reserved block for storing an AT is newly set in order to make the writing frequency of the entire physical segment evenly close. Therefore, in step S154, the controller 220 selects an unallocated physical block other than the AT reserved block and the ATI reserved block and not yet associated with the logical block in this physical segment. The process in step S154 is the same as the process in step S34 except that L + 1 physical blocks are selected. The selected unallocated physical block is treated as a new ATI reserved block.
[0088]
In step S156, the controller 220 updates the ATRAM 234 with the physical address of the selected ATI reserved block.
[0089]
In step S158, the controller 220 updates the ATIP 252 in the management area 242.
[0090]
Then, in step S160, the controller 220 writes the data in the ATIRAM 232 to the ATI reserved block to be updated based on the data in the ATIP_Point 238.
[0091]
In step S162, the controller 220 determines whether the processing in step S160 has been completed normally. If the processing ends normally, the ATI update processing ends. If the operation has not been completed normally, the process returns to step S152.
[0092]
The ATIP 252 in which the physical block to be written is fixed is rewritten in this way each time all the ATI reserved blocks are used at least once, and the rewriting frequency of the ATIP 252 can be greatly reduced.
[0093]
In the nonvolatile memory device according to the second embodiment, not only the AT reserved block but also a plurality of ATI reserved blocks for writing ATI data are used in the nonvolatile memory. Also, a physical block with a low writing frequency is selected as a reserved block. Since the AT and ATI data with a high rewrite frequency are not continuously written only to specific physical blocks, the write frequency of each physical block of the non-volatile memory can be made closer to even. Further, the failure probability of the nonvolatile memory device can be reduced, and the life can be extended.
[0094]
(Third embodiment)
In the third embodiment, a case where a plurality of types of pointers are used will be described.
[0095]
FIG. 9 is a block diagram of a nonvolatile memory device according to the third embodiment of the present invention. 9 includes a host interface 310, a controller 320, a RAM 330, and a nonvolatile semiconductor memory 340. 9, a host interface 310 is similar to the host interface 10 of FIG. RAM 330 is similar to RAM 230 in FIG.
[0096]
The non-volatile memory 340 is substantially the same as the non-volatile memory 40 of FIG. 1, and has a management area 342 and a data area 344. The data area 344 has a plurality of AT reserved blocks and a plurality of ATI reserved blocks, like the data area 244 of FIG.
[0097]
The management area 342 has a physical block for storing the ATIP 352. This physical block has a specific physical address, and is, for example, a leading physical block.
[0098]
When the nonvolatile memory device 300 is initialized, the controller 320 reads the ATI into the ATIRAM 332 and determines the physical block having a valid AT among the AT reserved blocks, and determines that it is valid, as in the case of the controller 220 in FIG. To the ATI_Point 336, reading the data indicating the pointer indicating the physical block to the ATI_Point 336, determining the physical block having a valid ATI among the ATI reserved blocks, and reading the data indicating the pointer indicating the physical block determined to be valid to the ATIP_Point 338. Is read.
[0099]
FIG. 10 is an explanatory diagram of the configuration of data stored in the nonvolatile memory 340 in FIG. ATIP 352 includes a table indicating an address of an ATI reserved block of each physical segment, an ATI which is a table indicating an address of an AT reserved block for the physical segment, and a table indicating a correspondence between a physical block and a logical block in the physical segment. AT.
[0100]
In each physical segment, M + 1 physical blocks are reserved as AT reserved blocks as blocks for storing the AT of the physical segment, and L + 1 physical blocks are stored as blocks for storing the ATI of the physical segment. It is reserved as an ATI reserved block.
[0101]
In the case of FIG. 10, as shown in the table 371, in the physical segment 1, the physical block 1, the physical block 3, and the like are reserved as AT reserved blocks 382a and 382b, respectively. Further, in this physical segment, the physical block 2 and the like are reserved as the ATI reservation block 384a and the like. The reservation is made at the time of shipment, for example. The reserved block is not associated with the logical block.
[0102]
The ATI of each physical segment stores the physical addresses of M + 1 AT reserved blocks. In the case of FIG. 10, the ATIP 352 includes L + 1 physical addresses of N + 1 physical segments, that is, (N + 1) (L + 1) physical addresses of ATI reserved blocks and M + 1 AT reserved blocks of one physical segment. And a physical address corresponding to one logical block. In FIG. 10, ATI 354 is stored in ATI reservation block 384a.
[0103]
ATIP 352 has three types of tables. That is, in the first table indicating the correspondence between the physical blocks and the logical blocks, the logical blocks and the physical blocks are directly associated with each other, and the logical block itself is referred to as a zero-stage pointer. In the second table indicating the addresses of the AT reserved blocks, the pointers are associated with the addresses of the AT reserved blocks, and this pointer is referred to as a one-stage pointer. In the third table indicating the address of the ATI reserved block, the pointer is associated with the address of the ATI reserved block, and this pointer is referred to as a two-stage pointer.
[0104]
In order to access a physical block corresponding to a logical block that stores ordinary data, a two-stage pointer is used. For example, in the case of FIG. 10, when accessing the physical block of the physical segment 1, the ATIP 352 reads out the ATI with reference to the physical block 2 corresponding to, for example, a two-stage pointer described as ATI1_0. In this ATI, for example, the AT 371 stored therein is read by referring to the physical block 1 corresponding to the pointer described as AT1_0. Since the AT 371 is a currently valid AT of the physical segment 1, by referring to this, the physical block corresponding to the logical block can be accessed.
[0105]
FIG. 11 is an explanatory diagram of an access by a one-stage pointer using the data of FIG. A one-stage pointer is used to access a logical block in which the number of data updates is relatively small, such as device information.
[0106]
For example, in the case of FIG. 11, when accessing the physical block of the physical segment 0, the ATIP 352 refers to the physical block 1 corresponding to the one-stage pointer described as, for example, AT0_0, and stores the AT370 stored therein. Read out. Since the AT 370 is a currently valid AT of the physical segment 0, by referring to this, it is possible to access a physical block corresponding to a logical block.
[0107]
FIG. 12 is an explanatory diagram of an access by the 0-stage pointer using the data of FIG. A zero-stage pointer is used to access a logical block storing important data, which is rarely updated like firmware data.
[0108]
For example, in the case of FIG. 11, when accessing the logical block 0, the ATIP 352 can directly access the physical block 4 of the segment 1 corresponding to the logical block 0 indicated as, for example, a 0-stage pointer.
[0109]
Note that the logical block managed by the 0-stage pointer is also managed by the AT referenced using the 2-stage pointer or the 1-stage pointer. This is because the management of physical blocks that do not correspond to logical blocks is managed on a physical segment basis.
[0110]
The processing at the time of writing in the nonvolatile memory device of FIG. 9 will be described. The main processing flow is the same as that described with reference to FIG. 3, but the processing in the step of performing the AT update is different.
[0111]
FIG. 13 is a flowchart illustrating an example of processing of a step of updating the AT at the time of writing in the nonvolatile storage device of FIG. 9. In FIG. 13, the processing of steps S32, S34, and S40 is the same as that described with reference to FIG. 4, and the processing of step S150 is the same as that described with reference to FIG. Description is omitted.
[0112]
In step S272, the controller 320 determines whether the logical block to be written is a logical block managed by a one-stage pointer (one-stage pointer block). If it is managed by the one-stage pointer, the process proceeds to step S276; otherwise, the process proceeds to step S274.
[0113]
In step S274, the controller 320 updates the ATIRAM 332 with the physical address of the selected AT reserved block.
[0114]
In step S276, the controller 320 updates the ATIP 352 according to the physical address of the AT reserved block selected in step S34.
[0115]
In step S278, the controller 320 determines whether the processing in step S40 has been completed normally. If the operation has been completed normally, the process proceeds to step S280; otherwise, the process returns to step S32.
[0116]
In step S280, the controller 320 determines whether or not the logical block to be written is a logical block managed by the 0-stage pointer (0-stage pointer block). If it is managed by the 0-stage pointer, the process proceeds to step S282; otherwise, the process ends.
[0117]
In step S282, controller 320 updates ATIP 352 and ends the process.
[0118]
As described above, in the nonvolatile storage device according to the third embodiment, the link configuration from the management area to the physical blocks can be changed in accordance with the importance of the retained data and the writing frequency. That is, since the logical segment with a low writing frequency is managed by using the one-stage pointer, the number of ATI reserved blocks can be reduced as compared with the second embodiment. In addition, important data that is updated infrequently but is managed using the 0-stage pointer can be obtained by simple processing at the time of initialization, etc., reducing development man-hours and reducing the time required for initialization. Shortening can be achieved.
[0119]
【The invention's effect】
As described above, according to the present invention, the frequency of writing to each physical block in the nonvolatile memory can be made closer to an equal value, so that the failure of the nonvolatile memory is prevented and the life of the nonvolatile memory device using the same is extended. be able to.
[0120]
Further, since there is always a block for managing logical data in the nonvolatile memory, it is possible to prevent the logical data from being destroyed even if the voltage of the supplied power decreases.
[Brief description of the drawings]
FIG. 1 is a block diagram of a nonvolatile memory device according to a first embodiment of the present invention.
FIG. 2 is an explanatory diagram illustrating a configuration of data stored in a nonvolatile memory of FIG. 1;
FIG. 3 is a flowchart illustrating an example of a process at the time of writing in the nonvolatile storage device of FIG.
FIG. 4 is a flowchart illustrating an example of a process in a step of updating an AT in FIG. 3;
FIG. 5 is a block diagram of a nonvolatile memory device according to a second embodiment of the present invention.
FIG. 6 is an explanatory diagram illustrating a configuration of data stored in a nonvolatile memory in FIG. 5;
FIG. 7 is a flowchart illustrating an example of processing of a step of updating an AT at the time of writing in the nonvolatile storage device of FIG. 5;
FIG. 8 is a flowchart illustrating an example of a process in a step of updating an ATI in FIG. 7;
FIG. 9 is a block diagram of a nonvolatile memory device according to a third embodiment of the present invention.
FIG. 10 is an explanatory diagram illustrating a configuration of data stored in a nonvolatile memory in FIG. 9;
FIG. 11 is an explanatory diagram of access by a one-stage pointer using the data of FIG. 10;
FIG. 12 is an explanatory diagram of an access by a 0-stage pointer using the data of FIG. 10;
13 is a flowchart illustrating an example of processing of a step of updating an AT at the time of writing in the nonvolatile storage device of FIG. 9;
FIG. 14 is an explanatory diagram of data management in a general nonvolatile storage device.
FIG. 15 is a block diagram illustrating an example of a configuration of a conventional nonvolatile storage device.
16 is an explanatory diagram showing a data structure in a management area of the nonvolatile memory in FIG.
FIG. 17 is a flowchart illustrating an example of a process at the time of writing in the nonvolatile storage device of FIG. 15;
[Explanation of symbols]
20, 220, 320 controller
40,240,340 Non-volatile memory
52,252,352 ATIP (third table)
54,254,354 ATI (second table)
70, 270, 370, 371 AT (first table)
82a, 82b, 282a, 282b, 382a, 382b AT reserved block (first reserved block)
284a, 384a ATI reserved block (second reserved block)

Claims (5)

複数の物理ブロックを有する不揮発性メモリと、
コントローラとを備え、
前記コントローラは、
前記不揮発性メモリから前記物理ブロックを第1の予約ブロックとして複数選択し、入力された論理アドレスと前記不揮発性メモリの物理アドレスとの対応関係を示す第1のテーブルを前記第1の予約ブロックのうちのいずれか1つに格納させ、前記複数の第1の予約ブロックの物理アドレスを示す第2のテーブルを前記不揮発性メモリに格納させ、かつ、前記不揮発性メモリに書き込みを行う場合には、前記第1のテーブルを書き換え、前記第1の予約ブロックのうち、書き換え前の前記第1のテーブルが格納されていたものとは異なるものに、書き換え後の前記第1のテーブルを格納させるものである
不揮発性記憶装置。
A non-volatile memory having a plurality of physical blocks,
With a controller,
The controller is
A plurality of physical blocks are selected from the nonvolatile memory as first reserved blocks, and a first table showing a correspondence between an input logical address and a physical address of the nonvolatile memory is stored in the first reserved block. When storing in any one of them, the second table indicating the physical addresses of the plurality of first reserved blocks is stored in the non-volatile memory, and writing to the non-volatile memory is performed, Rewriting the first table, and storing the rewritten first table in a different one of the first reserved blocks from the one storing the first table before rewriting. A non-volatile storage device.
請求項1に記載の不揮発性記憶装置において、
前記コントローラは、
前記第1の予約ブロックのいずれにも書き込みが所定の回数以上行われると、前記不揮発性メモリから前記物理ブロックを複数選択して、新たな前記第1の予約ブロックとして用いるものである
ことを特徴とする不揮発性記憶装置。
The nonvolatile storage device according to claim 1,
The controller is
When writing to any of the first reserved blocks is performed a predetermined number of times or more, a plurality of the physical blocks are selected from the nonvolatile memory and used as the new first reserved blocks. Nonvolatile storage device.
請求項2に記載の不揮発性記憶装置において、
前記コントローラは、
前記不揮発性メモリから前記物理ブロックを第2の予約ブロックとして複数選択し、前記第2のテーブルを前記第2の予約ブロックのうちのいずれか1つに格納させ、前記複数の第2の予約ブロックの物理アドレスを示す第3のテーブルを前記不揮発性メモリの所定のアドレスに格納させ、かつ、新たな前記第1の予約ブロックを用いる場合には、前記第2のテーブルを書き換え、前記第2の予約ブロックのうち、書き換え前の前記第2のテーブルが格納されていたものとは異なるものに、書き換え後の前記第2のテーブルを格納させるものである
ことを特徴とする不揮発性記憶装置。
The nonvolatile storage device according to claim 2,
The controller is
Selecting a plurality of the physical blocks from the nonvolatile memory as second reserved blocks, storing the second table in any one of the second reserved blocks, and selecting the plurality of second reserved blocks; In the case where a third table indicating the physical address of the non-volatile memory is stored at a predetermined address in the nonvolatile memory, and the new first reserved block is used, the second table is rewritten and the second table is rewritten. A non-volatile memory device, wherein a reserved block stores the second table after rewriting in a block different from the one in which the second table before rewriting is stored.
請求項3に記載の不揮発性記憶装置において、
前記コントローラは、
前記第2の予約ブロックのいずれにも書き込みが所定の回数以上行われると、前記不揮発性メモリから前記物理ブロックを複数選択して、新たな前記第2の予約ブロックとして用いるものである
ことを特徴とする不揮発性記憶装置。
The nonvolatile storage device according to claim 3,
The controller is
When writing to any of the second reserved blocks is performed a predetermined number of times or more, a plurality of the physical blocks are selected from the nonvolatile memory and used as a new second reserved block. Nonvolatile storage device.
請求項3に記載の不揮発性記憶装置において、
前記コントローラは、
前記第3のテーブルに、前記第1及び第2のテーブルを加えて、前記不揮発性メモリの前記所定のアドレスに格納させるものである
ことを特徴とする不揮発性記憶装置。
The nonvolatile storage device according to claim 3,
The controller is
The nonvolatile storage device according to claim 1, wherein the first table and the second table are added to the third table and stored at the predetermined address of the nonvolatile memory.
JP2003024121A 2003-01-31 2003-01-31 Nonvolatile storage device Pending JP2004234473A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003024121A JP2004234473A (en) 2003-01-31 2003-01-31 Nonvolatile storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003024121A JP2004234473A (en) 2003-01-31 2003-01-31 Nonvolatile storage device

Publications (1)

Publication Number Publication Date
JP2004234473A true JP2004234473A (en) 2004-08-19

Family

ID=32952745

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003024121A Pending JP2004234473A (en) 2003-01-31 2003-01-31 Nonvolatile storage device

Country Status (1)

Country Link
JP (1) JP2004234473A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006072441A (en) * 2004-08-31 2006-03-16 Sony Corp Memory device and control method of nonvolatile memory
JP2006209608A (en) * 2005-01-31 2006-08-10 Sony Corp Memory control device, memory control method, and program
JP2008009636A (en) * 2006-06-28 2008-01-17 Toshiba Microelectronics Corp Storage device
CN100425817C (en) * 2004-08-31 2008-10-15 三菱电机株式会社 On-vehicle electronic control unit
JP2016071447A (en) * 2014-09-26 2016-05-09 ラピスセミコンダクタ株式会社 Nonvolatile storage and control method thereof
US9442843B2 (en) 2012-11-29 2016-09-13 Canon Kabushiki Kaisha Information processing apparatus, method of controlling the same, and storage medium
US9852746B2 (en) 2014-02-17 2017-12-26 Canon Kabushiki Kaisha Information processing apparatus, method of controlling the same, program and storage medium

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006072441A (en) * 2004-08-31 2006-03-16 Sony Corp Memory device and control method of nonvolatile memory
CN100425817C (en) * 2004-08-31 2008-10-15 三菱电机株式会社 On-vehicle electronic control unit
JP4561246B2 (en) * 2004-08-31 2010-10-13 ソニー株式会社 Memory device
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
JP2008009636A (en) * 2006-06-28 2008-01-17 Toshiba Microelectronics Corp Storage device
US9442843B2 (en) 2012-11-29 2016-09-13 Canon Kabushiki Kaisha Information processing apparatus, method of controlling the same, and storage medium
US9852746B2 (en) 2014-02-17 2017-12-26 Canon Kabushiki Kaisha Information processing apparatus, method of controlling the same, program and storage medium
JP2016071447A (en) * 2014-09-26 2016-05-09 ラピスセミコンダクタ株式会社 Nonvolatile storage and control method thereof

Similar Documents

Publication Publication Date Title
US6477616B1 (en) Storage device, storage system, memory management method, recording medium, and computer data signal
US5717886A (en) Semiconductor disk device and memory management method
JP5440883B2 (en) Moving sectors in blocks in flash memory
CN111414315B (en) Method for managing a memory device and related memory device
US8478796B2 (en) Uncorrectable error handling schemes for non-volatile memories
KR100843135B1 (en) Apparatus and method for managing nonvolatile memory
US8312554B2 (en) Method of hiding file at data protecting mode for non-volatile memory module, memory controller and portable memory storage apparatus
US9058296B2 (en) Data processing method, memory storage device and memory control circuit unit
US20110231597A1 (en) Data access method, memory controller and memory storage system
KR100608602B1 (en) Flash memory, Mapping controlling apparatus and method for the same
JP2006048893A (en) Flash memory device with defective block managing function and defective block managing method of the same
JP2005196736A (en) Address mapping method of flash memory, mapping information management method, and flash memory using same methods
WO1999044113A9 (en) Increasing the memory performance of flash memory devices by writing sectors simultaneously to multiple flash memory devices
JP3421581B2 (en) Storage device using nonvolatile semiconductor memory
JP2004234473A (en) Nonvolatile storage device
JPH07153284A (en) Non-volatile semiconductor memory and its control method
US7899974B2 (en) Nonvolatile memory, mapping control apparatus and method of the same
JP3976764B2 (en) Semiconductor disk device
US10559359B2 (en) Method for rewriting data in nonvolatile memory and semiconductor device
JP5491201B2 (en) Semiconductor recording apparatus and semiconductor recording system
JP2008299455A (en) Data storage device and data management method
KR20050009045A (en) Memory device and error correction method using flash memory
CN111596859B (en) Data storage device and data processing method
US7996598B2 (en) Memory management module
JP2005339450A (en) Data management method for flash memory