[go: up one dir, main page]

JP3769395B2 - External storage device using non-volatile memory - Google Patents

External storage device using non-volatile memory Download PDF

Info

Publication number
JP3769395B2
JP3769395B2 JP29660498A JP29660498A JP3769395B2 JP 3769395 B2 JP3769395 B2 JP 3769395B2 JP 29660498 A JP29660498 A JP 29660498A JP 29660498 A JP29660498 A JP 29660498A JP 3769395 B2 JP3769395 B2 JP 3769395B2
Authority
JP
Japan
Prior art keywords
address
physical sector
host computer
data
physical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP29660498A
Other languages
Japanese (ja)
Other versions
JP2000122909A (en
Inventor
祐二 菅谷
紀子 久布白
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP29660498A priority Critical patent/JP3769395B2/en
Publication of JP2000122909A publication Critical patent/JP2000122909A/en
Application granted granted Critical
Publication of JP3769395B2 publication Critical patent/JP3769395B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、不揮発性メモリとして、例えばフラッシュメモリを用いたコンピュータの外部記憶装置に関する。
【0002】
【従来の技術】
コンピュータの外部記憶装置としては、磁気ディスクドライブ(ハードディスクドライブ、以下H/Dと記す)がある。このH/Dは、大容量であるが機械部品を使用しているため、衝撃や振動に弱い欠点がある。この欠点を解消するためにフラッシュメモリを記憶媒体に使用する外部記憶装置が開発された。
【0003】
外部記憶装置はセクタ単位で読み出しや書込みのアクセスが行われ、セクタのサイズとしては512バイトがよく使用されている。
【0004】
フラッシュメモリは、その素子の構造から、書込みを行う前に消去が行われる必要がある。また、フラッシュメモリは、読み出しアクセス時間は速いが、消去時間と書込み時間とが長い。さらに、フラッシュメモリは、現状では書込み回数に105回という制限がある。このため、フラッシュメモリ内の一定個所が、書込みの集中により、上述した書込み回数の制限に達した場合には、フラッシュメモリのその他の領域が使用可能であっても、外部記憶装置としては、使用不可能となってしまう。
【0005】
したがって、従来においては、フラッシュメモリはセクタサイズのデータを格納する複数の物理セクタに分割され、ホストコンピュータからの書込みデータを書込み回数の少ない物理セクタに書き込むように制御することにより、フラッシュメモリ内の一定個所への書込みの集中が回避され、フラッシュメモリの寿命を延ばし、フラッシュメモリを用いた外部記憶装置の長寿命化を図っていた。
【0006】
【発明が解決しようとする課題】
ところで、従来の技術においては、フラッシュメモリ内の物理セクタは、ホストコンピュータからの書込みデータを保持するデータ領域と管理領域とに分けられ、この管理領域にはホストコンピュータのアクセスアドレスである論理セクタアドレスを格納していた。
【0007】
ホストコンピュータからのデータの書込み時は、ホストコンピュータからの書込みデータをフラッシュメモリの物理セクタのデータ領域に書込んだ後に物理セクタの管理領域にホストコンピュータのアクセスアドレスである論理セクタアドレスを書込む。
【0008】
また、フラッシュメモリを用いた外部記憶装置では、ホストコンピュータからのアクセスアドレスである論理セクタアドレスをフラッシュメモリ内の物理セクタアドレスに変換するマッピングテーブルが備えられている。そして、マッピングテーブルとポインタとは、特定の書き込み領域のみが繰り返し書き込まれるのを避けるため、特定ホストコンピュータからの書込みのたびに更新される。このため、マピングテーブルとポインタとはRAM上に作成される。
【0009】
一方、半導体の分野では、微細化技術が著しく進展している。
各種メモリ素子では、この微細化技術の進展により、メモリ素子1個あたりの記憶容量は増大される反面、記憶セル1個の占める体積の縮小による蓄積電荷量の減少、微小欠陥の発生確率の上昇や、動作の高速化に伴う電気的なノイズの印加等の外部要因により、データ中のエラービットの発生確率が高くなる。
【0010】
そこで、従来の技術においては、データの信頼性確保のために、セクタ毎に、フラッシュメモリに格納されるデータに対し、ECC(Error Checking and Correcting feature)に代表される誤り訂正可能な冗長化機構(以下ECCと記す)のチェックビットを用いていた。
【0011】
しかしながら、マッピングテーブルに対しては、ECCは用いられていなかった。これは、マッピングテーブルにECCを用いるためには、マッピングテーブル用に別個のECC用RAMが余分に必要となり、コストアップ、大型化、電力需要が大となるためである。
【0012】
このため、マッピングテーブルが格納されているRAMにおいてエラービットが発生すると、論理セクタアドレスから物理セクタアドレスへの変換が誤って行われ、ホストコンピュータに対し、要求した論理セクタアドレスのデータとは異なったデータを送ることになる。
【0013】
以上述べたように、従来の技術では、マッピングテーブルを格納するRAM内でエラービットが生じた場合、フラッシュメモリを使用した外部記憶装置内のデータが破壊されるという問題点があった。
【0014】
本発明の目的は、マッピングテーブル用に別個のECC用RAMを必要とすること無く、マッピングテーブルの信頼性を向上させ、マッピングテーブルを格納するRAM内でエラービットが生じた場合でも、データの信頼性を維持することが可能な、不揮発性メモリを使用した外部記憶装置を実現することである。
【0015】
【課題を解決するための手段】
本発明は、上記目的を達成するため、次のように構成される。
(1)不揮発性メモリを使用した外部記憶装置において、不揮発性メモリを記憶媒体とし、この記憶媒体の内部をデータの読み書きの単位である物理セクタに分割し、物理セクタをホストコンピュータからの書込みデータを保持するデータ領域と管理領域とに分割し、管理領域にはホストコンピュータのアクセスアドレスである論理セクタアドレスを格納すると共に、論理セクタアドレスとこの論理セクタアドレスのデータが格納されている上記記憶媒体内の物理セクタアドレスの対応表を少なくとも二重化してマッピングテーブルに格納し、ホストコンピュータからのデータ読み出し時は、ホストコンピュータからの論理セクタアドレスに対応する物理セクタアドレスを上記二重化した各々のマッピングテーブルから読み出し、読み出した値が互いに一致している場合は、上記マッピングテーブルの内容が正しいと判断し、上記マッピングテーブルから得られたフラッシュメモリの物理セクタアドレスのデータをホストコンピュータに送り、上記二重化した各々のマッピングテーブルから読み出した物理セクタアドレスの値が互いに異なる場合は、各々のマッピングテーブルから読み出された物理セクタアドレスの物理セクタの管理領域にアクセスし、ホストコンピュータからのアクセスアドレスと同じ論理セクタアドレスを持つ物理セクタが存在する場合、この物理セクタに格納されたデータを、ホストコンピュータに送ると共にマッピングテーブルの内容を、上記ホストコンピュータからのアクセスアドレスと同じ論理セクタアドレスに修正する。
【0016】
マッピングテーブルは少なくとも二重化されているので、二重化されたマッピングテーブルのそれぞれに記憶された値を互いに比較すれば、マッピングテーブル内でエラービットが生じたことを判断することができる。そして、マッピングテーブル内でエラービットが生じた場合は、各々のマッピングテーブルから読み出された物理セクタアドレスの物理セクタの管理領域にアクセスし、ホストコンピュータからのアクセスアドレスと同じ論理セクタアドレスを持つ物理セクタに格納されたデータを、ホストコンピュータに送ると共にマッピングテーブルの内容を、上記ホストコンピュータからのアクセスアドレスと同じ論理セクタアドレスに修正する。したがって、データの信頼性を維持することが可能な、不揮発性メモリを使用した外部記憶装置を実現することができる。
【0017】
(2)好ましくは、上記(1)において、ホストコンピュータからこの外部記憶装置へのデータ読み出し時に、二重化した各々のマッピングテーブルから読み出した物理セクタアドレスの値が互いに異なり、各々のマッピングテーブルから読み出された物理セクタアドレスの物理セクタで、管理領域にホストコンピュータからのアクセスアドレスと同じ論理セクタアドレスを持つ物理セクタが存在しない場合には、上記二重化した各々のマッピングテーブルから読み出された物理アドレスの互いに値の異なるビットの値を変化させた物理セクタアドレスの物理セクタの管理領域をアクセスしていき、ホストコンピュータからのアクセスアドレスと同じ論理セクタアドレスを持つ物理セクタが存在する場合、この物理セクタに格納されたデータをホストコンピュータに送ると共にマッピングテーブルの内容を修正する。
【0018】
マッピングテーブルに正しい物理セクタアドレスが格納されていない場合でも、各々のマッピングテーブルから読み出された物理アドレスの互いに値の異なるビットの値を変化させた物理セクタアドレスの物理セクタの管理領域をアクセスしていくので、さらに、データの信頼性を維持することが可能な、不揮発性メモリを使用した外部記憶装置を実現することができる。
(3)また、好ましくは、上記(2)において、ホストコンピュータからこの外部記憶装置へのデータ読み出し時に、二重化した各々のマッピングテーブルから読み出した物理セクタアドレスの値が互いに異なり、各々のマッピングテーブルから読み出された物理セクタアドレスの物理セクタで、管理領域にホストコンピュータからのアクセスアドレスと同じ論理セクタアドレスを持つ物理セクタが存在せず、上記二重化した各々のマッピングテーブルから読み出された物理アドレスの値の互いに異なるビットの値を変化させた物理セクタアドレスの物理セクタで、管理領域にホストコンピュータからのアクセスアドレスと同じ論理セクタアドレスを持つ物理セクタが存在しない場合には、上記二重化した各々のマッピングテーブルから読み出された物理アドレスの値が互いに同じビットの値を変化させ、変化させた物理セクタアドレスの物理セクタの管理領域にアクセスしていき、ホストコンピュータからのアクセスアドレスと同じ論理セクタアドレスを持つ物理セクタが存在するときには、この物理セクタに格納されたデータをホストコンピュータに送ると共にマッピングテーブルの内容を修正する。
【0019】
各々のマッピングテーブルから読み出された物理アドレスの値が互いに同じビットの値を変化させ、変化させた物理セクタアドレスの物理セクタの管理領域にアクセスしていくので、さらに、データの信頼性を維持することが可能な、不揮発性メモリを使用した外部記憶装置を実現することができる。
【0020】
(4)また、好ましくは、上記(1)、(2)又は(3)において、上記マッピングテーブルを三重化以上に多重化する。
【0021】
(5)また、好ましくは、上記(4)において、多重化した各々のマッピングテーブルから読み出した物理セクタアドレスの値が互いに異なる場合であって、多重化した各々のマッピングテーブルから読み出した物理セクタアドレスの値の多数決を取れるときには、多数となる物理セクタアドレスの物理セクタのデータをホストコンピュータに送ると共に、マッピングテーブルのホストコンピュータからの論理アドレスに対応する物理セクタアドレスの値を上記多数となる物理セクタアドレスに書き換えて処理を終了させる。
【0022】
各々のマッピングテーブルから読み出した物理セクタアドレスの値の多数決を取れるときには、アドレスの物理セクタの管理領域からの読み出しを省略でき、ホストコンピュータに対する不揮発性メモリを使用した外部記憶装置のアクセス速度を高速化することが可能となる。
【0023】
【発明の実施の形態】
以下、図面を用いて本発明の実施形態を説明する。
図1は、本発明の第1の実施形態である外部記憶装置の概略構成を示す図である。図1において、100はフラッシュメモリを使用した外部記憶装置であり、この外部記憶装置100はホストコンピュータ200と接続される。
【0024】
また、1はホストコンピュータインタフェースであり、2は本発明の記憶媒体として使われるフラッシュメモリ(記憶媒体)である。そして、3はマッピングテーブルを格納するRAMである。
【0025】
また、4は制御回路であり、この制御回路4は、ホストインタフェース1、フラッシュメモリ2、RAM3を制御する。さらに、制御回路4は、ホストインタフェースバス5、ホストインタフェース制御線6を介してホストインタフェース1を制御する。そして、フラッシュメモリ2と、RAM3のメモリアドレスバス7と、メモリデータバス8とは、メモリ制御線9を介して制御回路4により制御される。
【0026】
図2は、図1に示したフラッシュメモリ2の構成図である。
図2において、フラッシュメモリ2の内部は、データの読み書きの単位である物理セクタ20に分けられる。この物理セクタ20のデータのサイズとしては、1物理セクタで、512バイトがよく使用されている。
【0027】
図3は、図2に示した物理セクタ20の構成図である。
図3において、物理セクタ20はホストコンピュータ200からの書込みデータを格納するデータ領域21と、物理セクタ20の管理情報を格納する管理領域22とから構成される。この管理領域22にはデータ領域21に書込まれたデータに対するホストコンピュータ200のアクセスアドレスである論理セクタアドレス23が格納される。
【0028】
図4は、マッピングテーブル(論理セクタアドレスとこの論理セクタアドレスのデータが格納されている記憶媒体内の物理セクタアドレスの対応表)を格納するRAM3の構成図である。本発明では、RAM3内にマッピングテーブルを多重化してもち、この図4の例は、マッピングテーブルを二重化した場合の構成例である{(アドレス0〜n)、(0+x〜n+x)}。
【0029】
図4において、論理セクタアドレス0のデータを格納する物理セクタのアドレスは、RAM3のアドレス0及びアドレス0+xに格納される。同様に、論理セクタアドレス1のデータを格納する物理セクタのアドレスは、RAM3のアドレス1及びアドレス1+xに格納される。
【0030】
つまり、aを任意のアドレス番号とすれば、論理セクタアドレスaのデータを格納する物理セクタのアドレスは、RAM3のアドレスa及びアドレスa+xに格納される。
【0031】
ここで、xはフラッシュメモリを使用した外部記憶装置100の論理セクタ数である。RAM3に必要な容量はマッピングテーブルの多重度をm、物理セクタアドレスを格納するために必要なバイト数をbとすると、m×x×bとなる。
【0032】
次に、図5及び図6を用いて、ホストコンピュータ200からフラッシュメモリ2を使用した外部記憶装置100への書込み動作について説明する。
図5は、ホストコンピュータ200からフラッシュメモリ2を使用した外部記憶装置100にデータの書込みがあった際のフラッシュメモリ2へのデータの書込み動作を示す。
【0033】
まず、ホストコンピュータ200は、書込みを行うセクタのアドレスと書込みデータとをホストインタフェース1に送る。次に、制御回路4は、ホストインタフェースバス5を介して、書込みを行う論理セクタアドレスと書込みデータとホストインターフェース1から受け取る。
【0034】
そして、制御回路4は、メモリアドレスバス7を介して、フラッシュメモリ2の書込みが行われる物理セクタ20のアドレスを指定して、書込みデータ及び論理セクタアドレスをメモリデータバス8に乗せ、フラッシュメモリ2に書込む。この際、制御回路4は、アルゴリズムにより、ホストコンピュータ200からの書込みデータを格納するために、書き換え回数の少ない物理セクタ20を選定する。
【0035】
また、フラッシュメモリ2は、その素子の構造から書込みを行う前に消去を行う必要があるため、フラッシュメモリ2の書込みを行う物理アドレスセクタの消去が行われていない場合は、データの書込み前にその消去を行う。ホストコンピュータ200からの書込みデータは、物理セクタ20のデータ領域21に書き込まれ、ホストコンピュータ200からの論理セクタアドレスは管理領域22に書き込まれる。
【0036】
図6は、フラッシュメモリ2への書込み後のフラッシュメモリ2を使用した外部記憶装置100のマッピングテーブルの更新動作を示す図である。図6において、制御回路4は、メモリアドレスバス7を介してRAM3の書込みが行われるアドレスを指定して、書込みが行われたフラッシュメモリ2の物理セクタアドレスをメモリデータバス8に乗せ、RAM3に書込む。
【0037】
図5に示した動作でホストコンピュータ200からの論理セクタアドレスをR1、制御回路4により選定された物理セクタの物理セクタアドレスをP1とすると、図4に示されるRAM3の構造では、RAM3のアドレスR1とR1+xとに、書込みが行われたフラッシュメモリ2の物理セクタアドレスP1が書き込まれる。
【0038】
図7から図9は、マッピングテーブルを格納するRAM3にエラービットが生じてない場合の、ホストコンピュータ200のフラッシュメモリ2を使用した外部記憶装置100への読み出しアクセス時の動作を示す図である。
【0039】
図7において、ホストコンピュータ200は、読み出しをおこなう論理セクタアドレスをホストインタフェース1に送る。制御回路4はホストインタフェースバス5を介して読み出しを行う論理セクタアドレスを受け取る。
【0040】
図8において、その後、制御回路4は、メモリアドレスバス7を介して、RAM3のホストコンピュータ200からの読み出しを行う論理セクタアドレスに対応するフラッシュメモリ2の物理セクタアドレスを格納するアドレスを指定して、メモリデータバス8を介してRAM3から物理セクタアドレスを読み出す。
【0041】
図7に示した動作において、ホストコンピュータ200からの論理セクタアドレスをR2とし、論理セクタアドレスR2のデータが格納されているフラッシュメモリ2の物理セクタのアドレスP2とすると、制御回路4は、RAM3のアドレスR2に格納されている物理セクタアドレスと、R2+xに格納されている物理セクタアドレスとを比較する。この場合、図4に示されるRAM3の構造では、RAM3のアドレスR2とR2+xとから、物理セクタアドレスP2が読み出され、両者は一致することとなる。
【0042】
図9において、RAM3からホストコンピュータ200からの論理セクタアドレスのデータを格納する物理セクタ20のアドレスが得られたら、制御回路4は、メモリアドレスバス7を介して、RAM3から得られた物理セクタ20のアドレスを指定して、メモリデータバス8を介してフラッシュメモリ2からデータを読み出す。
【0043】
そして、制御回路4は、ホストインタフェースバス5を介して、読み出したデータをホストインタフェース1に送り、更に、ホストインタフェース1からホストコンピュータ200に読み出したデータを送る。
【0044】
二重化した各々のマッピングテーブルから読み出した物理セクタアドレスが一致しないと、制御回路4が判断した場合は、上記図8から図9の動作の間に各々のマッピングテーブルから読み出された物理セクタアドレスの物理セクタ20の管理領域22にアクセスし、ホストコンピュータ200からのアクセスアドレスと同じ論理セクタアドレスを持つ物理セクタ20が存在するかどうか確認する動作とマッピングテーブルの内容の修正動作とが加わる。
【0045】
この様子を図10から図13を用いて説明する。
図10において、制御回路4は、メモリアドレスバス7により、RAM3の各々のマッピングテーブルから得られた物理セクタ20のアドレスを指定して、メモリデータバス8を介して物理セクタ20の管理領域22に格納されている、上記物理セクタ20のデータ格納領域21に格納されたデータの論理アドレスを読み出す。
【0046】
図11に示すように、RAM3のアドレス0と0+xとに格納されている、論理セクタアドレス0のデータを格納する物理セクタアドレスが、それぞれ、100000と100001とであり、互いに異なっている場合は、図10に示した動作のように、アドレスが100000と100001の物理セクタ20の管理領域22のデータを読み出す。
【0047】
そして、制御回路4は、各物理セクタ20の管理領域22から論理セクタアドレスの読み出しを行ったら、それらがホストコンピュータ200からの論理セクタアドレスと一致するかどうかを確認する。
【0048】
図12に示すように、アドレスが100000と100001の物理セクタ20の管理領域22のデータが、それぞれ、5、0となっているとすると、アドレス100001の物理セクタ20が論理セクタアドレス0のデータを格納しており、アドレス100001が正しいアドレスであるということが判断されることとなる。
【0049】
図11、図12に示した例のように、ホストコンピュータ200からのアクセスアドレスと同じ論理セクタアドレスを持つ物理セクタ20が存在す場合は、図6に示した動作により、RAM3のマッピングテーブルを修正する。
【0050】
図11、図12に示した例では、図13に示すように、RAM3のアドレス0に格納されている論理セクタアドレス0に対応する物理セクタアドレスの値が100000から100001に書き換えられる。
【0051】
そして、マッピングテーブルの修正が終わったら、図9に示した動作により、ホストコンピュータ200からの論理セクタアドレスに対応する物理セクタ20のデータをホストコンピュータ200に送る。
【0052】
図11、図12に示した例では、ホストコンピュータ200からの論理セクタアドレス0のデータを格納している物理セクタ20のアドレスは、100001であるため、アドレス100001の物理セクタ20のデータ領域21に格納されているデータをホストコンピュータ200に送る。
【0053】
図11、図12の例のように、RAM3のアドレス0でエラービットが生じた場合、従来の技術においては、マッピングテーブルが一つしかないので、RAM3のアドレス0に格納された100000を論理セクタアドレス0のデータを格納する物理セクタのアドレスとみなす。
【0054】
そのため、アドレス100000の物理セクタは、論理セクタアドレス5のデータを格納しているにも拘わらず、フラッシュメモリ2を使用した外部記憶装置100は、アドレス100000の物理セクタに格納されたデータを論理セクタアドレス0のセクタのデータとして、ホストコンピュータ200に送ってしまう。
この結果、従来の技術においては、RAM3にエラービットが生じた場合は、フラッシュメモリ2を使用した外部記憶装置100のデータの信頼性が損なわれてしまっていた。
【0055】
これに対して、本発明の第1の実施形態によれば、RAM3にエラーが生じても上述した動作により、フラッシュメモリ2を使用した外部記憶装置100のデータの信頼性を確保できる。
【0056】
つまり、本発明の第1の実施形態によれば、マッピングテーブル用に別個のECC用RAMを必要とすること無く、マッピングテーブルの信頼性を向上させ、マッピングテーブルを格納するRAM内でエラービットが生じた場合でも、データの信頼性を維持することが可能な、不揮発性メモリを使用した外部記憶装置を実現することができる。
【0057】
なお、最近は、微細化の進行により、RAMの容量が増大しているため、RAMの素子数を増やさずに、マッピングテーブルを多重化でき、コストアップ無しに、フラッシュメモリを使用した外部記憶装置100のデータの信頼性を向上させることが出来る。
【0058】
上述した本発明の第1の実施形態では、RAM3にエラービットが生じた場合であって、エラービットの数が1ビットのときには、図11、図12に示した例のようにして、フラッシュメモリ2を使用した外部記憶装置100のデータの信頼性を確保することができるが、エラービットの数が複数になると、図11、図12の例に示した方法では、フラッシュメモリを使用した外部記憶装置100のデータの信頼性を確保できない場合がある。
【0059】
その場合のデータの信頼性を確保する場合の例が、本発明の第2の実施形態である。この第2の実施形態を図14及び図15を用いて説明する。
【0060】
図14において、RAM3のアドレス1と1+xに格納されている、論理セクタアドレス1のデータを格納する物理セクタアドレスは、それぞれ100100と100111とである。そこで、制御回路4は、図10に示した動作のように、。アドレスが100100と100111の物理セクタ20の管理領域22のデータを読み出す。
【0061】
しかし、図15に示すように、アドレスが100100と100111の物理セクタ20の管理領域22のデータは、それぞれ、4、6となっているとすると、それらは、ホストコンピュータ200からの論理セクタアドレス1とは一致しない。
【0062】
図14に示した例では、RAM3のアドレス1と1+xに格納されている、物理セクタアドレスは、下位の2ビットが異なっているため、RAM3のアドレス1と1+xに格納されている、物理セクタアドレスの下位2ビットの値を変化させた、100101と100110の物理セクタ20の管理領域22のデータを読み出し、制御回路4にて、ホストコンピュータ200からの論理セクタアドレス1と一致するかどうか確認する。
【0063】
図15に示すように、アドレスが100101と100110の物理セクタ20の管理領域22のデータがそれぞれ、2、1となっているとすると、アドレス100110の物理セクタ20が論理セクタアドレス1のデータを格納していることとなる。
【0064】
そこで、図6に示した動作により、図16に示すように、RAM3のアドレス1、1+xに格納されている論理セクタアドレス1に対応する物理セクタアドレスの値を、それぞれ100100、100111から100110に書き換えて、マッピングテーブルを修正する。
【0065】
そして、マッピングテーブルの修正が終わったら、図9に示したの動作により、ホストコンピュータ200からの論理セクタアドレス1に対応するアドレス100110の物理セクタ20のデータをホストコンピュータ200に送る。
【0066】
このようにして、RAM3に発生するエラービットが複数の場合でもフラッシュメモリ2を使用した外部記憶装置100のデータの信頼性を確保することができる。
【0067】
図15及び図16を用いて説明した動作のように、管理領域22に、ホストコンピュータ200からの論理セクタアドレスと同じ論理セクタアドレスを持つ物理セクタ20が存在しない場合は、各々のマッピングテーブルから読み出された物理アドレスの値が同じビットの値を変化させて、図15及び図16を用いて説明した動作と同様の動作を行うことにより、フラッシュメモリ2を使用した外部記憶装置100のデータの信頼性を確保することができる。
【0068】
つまり、本発明の第2の実施形態によれば、エラービットの数が複数であっても、マッピングテーブル用に別個のECC用RAMを必要とすること無く、マッピングテーブルの信頼性を向上させ、マッピングテーブルを格納するRAM内でエラービットが生じた場合でも、フラッシュメモリを使用した外部記憶装置のデータの信頼性を維持することが可能な、不揮発性メモリを使用した外部記憶装置を実現することができる。
【0069】
以上、本発明において、マッピングテーブルを二重化した場合のフラッシュメモリ2を使用した外部記憶装置100のデータの信頼性の向上について述べたが、マッピングテーブルを三重化以上に多重化した場合には、さらに、フラッシュメモリ2を使用した外部記憶装置100のデータの信頼性の向上を図ることができる。
【0070】
例えば、マッピングテーブルを二重化した場合、論理セクタアドレスaに対応する物理セクタアドレスを格納するRAM3のアドレスはaとa+xとなるが、RAM3のアドレスaとa+xの同じビットにエラービットが生じた場合は、RAM3のエラービットの発生を検出できず、ホストコンピュータ200からの論理セクタアドレスaに対する読み出しアクセス時に、誤ったデータを送ってしまう。
【0071】
しかし、マッピングテーブルを三重化以上に多重化した場合は、エラービットが生じていないマッピングテーブルが、少なくとも一つ以上存在する可能性が非常に高いために、各々のマッピングテーブルから読み出された物理セクタアドレスの比較時に、RAM3のエラービット発生をほぼ確実に検出でき、フラッシュメモリ2を使用した外部記憶装置100のデータの信頼性を確保することができる。
【0072】
また、マッピングテーブルを三重化以上に多重化し、各々のマッピングテーブルから読み出された物理セクタアドレスを比較して一致しない場合、各々のマッピングテーブルから読み出された物理セクタアドレスの多数決によりホストコンピュータ200からの論理セクタアドレスに対応する物理セクタアドレスを決定すれば、各々のマッピングテーブルから読み出されたアドレスの物理セクタ20の管理領域22からの読み出しを省略でき、ホストコンピュータ200に対するフラッシュメモリ2を使用した外部記憶装置100のアクセス速度を高速化することが可能となる。
【0073】
なお、上述した例は、不揮発性メモリとしてフラッシュメモリを使用した場合の例であるが、不揮発性メモリとしては、フラッシュメモリだけでなく、他のメモリ、例えば、EEPROM、強誘電体メモリ等を使用することも可能である。
【0074】
【発明の効果】
以上説明したように、本発明によれば、マッピングテーブル用に別個のECC用RAMを必要とすること無く、マッピングテーブルの信頼性を向上させ、マッピングテーブルを格納するRAM内でエラービットが生じた場合でも、データの信頼性を維持することが可能な、不揮発性メモリを使用した外部記憶装置を実現することができる。
【図面の簡単な説明】
【図1】本発明の第1の実施形態である外部記憶装置の概略構成図である。
【図2】図1に示したフラッシュメモリの構成を示す図である。
【図3】図2に示した物理セクタの構成を示す図である。
【図4】図1に示したRAMの構成を示す図である。
【図5】ホストコンピュータから外部記憶装置にデータの書込みがあった際のフラッシュメモリへのデータの書込み動作を示す図である。
【図6】マッピングテーブル更新のためのRAMへのデータの書込み動作を示す図である。
【図7】ホストコンピュータから外部記憶装置への読み出しを行う論理セクタアドレスの送出動作を示す図である。
【図8】RAMに格納されたマッピングテーブルへの読み出しアクセス動作を示す図である。
【図9】ホストコンピュータのからの外部記憶装置への読み出しアクセス時に、フラッシュメモリからのデータ読み出し動作を示す図である。
【図10】フラッシュメモリの物理セクタの管理領域からの読み出し動作を示す図である。
【図11】マッピングテーブルを格納するRAM内のデータの例を示す図である。
【図12】フラッシュメモリの物理セクタの管理領域のデータの例を示す図である。
【図13】RAM内のマッピングテーブルの更新動作を示す図である。
【図14】本発明の第2の実施形態におけるマッピングテーブルを格納するRAM内のデータの例を示す図である。
【図15】本発明の第2の実施形態におけるフラッシュメモリの物理セクタの管理領域のデータの例を示す図である。
【図16】RAM内のマッピングテーブルの更新動作を示す図である。
【符号の説明】
1 ホストインタフェース
2 フラッシュメモリ
3 RAM
4 制御回路
5 ホストインタフェースバス
6 ホストインタフェース制御線
7 メモリアドレスバス
8 メモリデータバス
9 メモリ制御線
20 物理セクタ
21 データ領域
22 管理領域
100 フラッシュメモリを使用した外部記憶装置
200 ホストコンピュータ
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an external storage device of a computer using, for example, a flash memory as a nonvolatile memory.
[0002]
[Prior art]
As an external storage device of a computer, there is a magnetic disk drive (hard disk drive, hereinafter referred to as H / D). Although this H / D has a large capacity but uses mechanical parts, it has a drawback that it is vulnerable to shock and vibration. In order to solve this drawback, an external storage device using a flash memory as a storage medium has been developed.
[0003]
The external storage device is accessed for reading and writing in units of sectors, and 512 bytes is often used as the sector size.
[0004]
The flash memory needs to be erased before writing because of the structure of the device. In addition, the flash memory has a fast read access time but a long erase time and write time. Furthermore, flash memory currently has 10 write cycles. Five There is a limit of times. For this reason, if a certain location in the flash memory reaches the above-mentioned limit on the number of writes due to the concentration of writing, it can be used as an external storage device even if other areas of the flash memory can be used. It becomes impossible.
[0005]
Therefore, conventionally, the flash memory is divided into a plurality of physical sectors for storing sector-size data, and the write data from the host computer is controlled so as to be written in the physical sectors with a small number of writes. Concentration of writing to a certain location is avoided, the life of the flash memory is extended, and the life of the external storage device using the flash memory is extended.
[0006]
[Problems to be solved by the invention]
By the way, in the conventional technology, the physical sector in the flash memory is divided into a data area for holding write data from the host computer and a management area, and this management area has a logical sector address which is an access address of the host computer. Was stored.
[0007]
When writing data from the host computer, the write data from the host computer is written to the data area of the physical sector of the flash memory, and then the logical sector address, which is the access address of the host computer, is written to the management area of the physical sector.
[0008]
An external storage device using a flash memory is provided with a mapping table for converting a logical sector address, which is an access address from a host computer, into a physical sector address in the flash memory. The mapping table and the pointer are updated each time data is written from a specific host computer in order to avoid repetitive writing of only a specific write area. For this reason, the mapping table and the pointer are created on the RAM.
[0009]
On the other hand, in the field of semiconductors, miniaturization technology is remarkably progressing.
In various memory devices, the progress of this miniaturization technology increases the storage capacity per memory device, but reduces the amount of stored charge due to the reduction in volume occupied by one memory cell and increases the probability of occurrence of micro defects. In addition, the occurrence probability of error bits in data increases due to external factors such as the application of electrical noise accompanying an increase in operation speed.
[0010]
Therefore, in the prior art, a redundancy mechanism capable of error correction represented by ECC (Error Checking and Correcting Feature) for data stored in the flash memory for each sector in order to ensure data reliability. (Hereinafter referred to as ECC) check bits.
[0011]
However, ECC was not used for the mapping table. This is because in order to use ECC for the mapping table, a separate ECC RAM is required for the mapping table, which increases costs, increases size, and increases power demand.
[0012]
For this reason, when an error bit occurs in the RAM storing the mapping table, the conversion from the logical sector address to the physical sector address is erroneously performed, which is different from the data of the logical sector address requested to the host computer. Send data.
[0013]
As described above, the conventional technique has a problem that data in the external storage device using the flash memory is destroyed when an error bit occurs in the RAM storing the mapping table.
[0014]
The object of the present invention is to improve the reliability of the mapping table without requiring a separate ECC RAM for the mapping table, and to ensure data reliability even when an error bit occurs in the RAM storing the mapping table. It is to realize an external storage device using a nonvolatile memory capable of maintaining the performance.
[0015]
[Means for Solving the Problems]
In order to achieve the above object, the present invention is configured as follows.
(1) In an external storage device using a non-volatile memory, the non-volatile memory is used as a storage medium, the inside of the storage medium is divided into physical sectors, which are units for reading and writing data, and the physical sectors are written data from the host computer. The storage medium is divided into a data area and a management area for storing the logical sector address, and a logical sector address which is an access address of the host computer is stored in the management area, and the logical sector address and data of the logical sector address are stored in the management area The physical sector address correspondence table is at least duplicated and stored in the mapping table. When data is read from the host computer, the physical sector address corresponding to the logical sector address from the host computer is obtained from each of the duplicated mapping tables. Read, read If the two match each other, it is determined that the contents of the mapping table are correct, the data of the physical sector address of the flash memory obtained from the mapping table is sent to the host computer, and read from each of the duplicated mapping tables. If the physical sector address values are different from each other, the physical sector management area of the physical sector address read from each mapping table is accessed, and a physical sector having the same logical sector address as the access address from the host computer is accessed. If it exists, the data stored in this physical sector is sent to the host computer, and the contents of the mapping table are corrected to the same logical sector address as the access address from the host computer.
[0016]
Since the mapping table is at least duplicated, it is possible to determine that an error bit has occurred in the mapping table by comparing the values stored in each of the duplicated mapping tables with each other. If an error bit occurs in the mapping table, the physical sector management area of the physical sector address read from each mapping table is accessed, and a physical sector address having the same logical sector address as the access address from the host computer is accessed. The data stored in the sector is sent to the host computer and the contents of the mapping table are corrected to the same logical sector address as the access address from the host computer. Therefore, an external storage device using a nonvolatile memory that can maintain the reliability of data can be realized.
[0017]
(2) Preferably, in the above (1), when reading data from the host computer to the external storage device, the physical sector address values read from each of the duplicated mapping tables are different from each other and read from each mapping table. If there is no physical sector with the same logical sector address as the access address from the host computer in the management area, the physical address read from each of the duplicated mapping tables When the physical sector management area of the physical sector address with different bit values is accessed and there is a physical sector with the same logical sector address as the access address from the host computer, this physical sector Stored data Modifying the contents of the mapping table and sends to the host computer.
[0018]
Even if the correct physical sector address is not stored in the mapping table, the management area of the physical sector at the physical sector address in which the values of the bits having different values of the physical address read from each mapping table are changed is accessed. Therefore, it is possible to realize an external storage device using a non-volatile memory that can maintain the reliability of data.
(3) Preferably, in the above (2), when reading data from the host computer to the external storage device, the values of the physical sector addresses read from each of the duplicated mapping tables are different from each other. The physical sector of the read physical sector address does not have a physical sector with the same logical sector address as the access address from the host computer in the management area, and the physical address read from each of the duplicated mapping tables If the physical sector of the physical sector address has changed the value of the bit different from each other, and there is no physical sector with the same logical sector address as the access address from the host computer in the management area, each of the above duplicated mapping Read from table Changed physical address values, and the physical sector management area of the changed physical sector address is accessed, and the physical sector having the same logical sector address as the access address from the host computer If it exists, the data stored in this physical sector is sent to the host computer and the contents of the mapping table are corrected.
[0019]
Since the physical address value read from each mapping table changes the value of the same bit, the management area of the physical sector at the changed physical sector address is accessed, further maintaining data reliability. It is possible to realize an external storage device using a nonvolatile memory.
[0020]
(4) Preferably, in the above (1), (2) or (3), the mapping table is multiplexed more than triple.
[0021]
(5) Preferably, in the above (4), the physical sector addresses read from the multiplexed mapping tables are different when the values of the physical sector addresses read from the multiplexed mapping tables are different from each other. When the majority of the values of the physical sector address can be taken, the physical sector data of the physical sector address that becomes a large number is sent to the host computer, and the physical sector address value corresponding to the logical address from the host computer of the mapping table is the physical sector that becomes the majority. Rewrite the address and finish the process.
[0022]
When the majority of physical sector address values read from each mapping table can be taken, reading from the physical sector management area of the address can be omitted, and the access speed of the external storage device using the non-volatile memory to the host computer is increased. It becomes possible to do.
[0023]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a diagram showing a schematic configuration of an external storage device according to the first embodiment of the present invention. In FIG. 1, reference numeral 100 denotes an external storage device using a flash memory, and this external storage device 100 is connected to a host computer 200.
[0024]
Reference numeral 1 denotes a host computer interface, and reference numeral 2 denotes a flash memory (storage medium) used as a storage medium of the present invention. A RAM 3 stores a mapping table.
[0025]
Reference numeral 4 denotes a control circuit. The control circuit 4 controls the host interface 1, the flash memory 2, and the RAM 3. Further, the control circuit 4 controls the host interface 1 via the host interface bus 5 and the host interface control line 6. The flash memory 2, the memory address bus 7 of the RAM 3, and the memory data bus 8 are controlled by the control circuit 4 via the memory control line 9.
[0026]
FIG. 2 is a block diagram of the flash memory 2 shown in FIG.
In FIG. 2, the inside of the flash memory 2 is divided into physical sectors 20 which are units of data reading / writing. As the data size of the physical sector 20, 512 bytes are often used in one physical sector.
[0027]
FIG. 3 is a configuration diagram of the physical sector 20 shown in FIG.
In FIG. 3, the physical sector 20 includes a data area 21 that stores write data from the host computer 200 and a management area 22 that stores management information of the physical sector 20. The management area 22 stores a logical sector address 23 which is an access address of the host computer 200 for data written in the data area 21.
[0028]
FIG. 4 is a configuration diagram of the RAM 3 that stores a mapping table (a correspondence table of a logical sector address and a physical sector address in a storage medium in which data of the logical sector address is stored). In the present invention, the mapping table may be multiplexed in the RAM 3, and the example of FIG. 4 is a configuration example when the mapping table is duplicated {(address 0 to n), (0 + x to n + x)}.
[0029]
In FIG. 4, the address of the physical sector that stores the data of logical sector address 0 is stored at address 0 and address 0 + x of RAM 3. Similarly, the address of the physical sector storing the data of logical sector address 1 is stored in address 1 and address 1 + x of RAM 3.
[0030]
That is, if a is an arbitrary address number, the address of the physical sector storing the data of the logical sector address a is stored in the address a and the address a + x of the RAM 3.
[0031]
Here, x is the number of logical sectors of the external storage device 100 using the flash memory. The capacity required for the RAM 3 is m × x × b, where m is the multiplicity of the mapping table and b is the number of bytes required to store the physical sector address.
[0032]
Next, a write operation from the host computer 200 to the external storage device 100 using the flash memory 2 will be described with reference to FIGS.
FIG. 5 shows a data write operation to the flash memory 2 when data is written from the host computer 200 to the external storage device 100 using the flash memory 2.
[0033]
First, the host computer 200 sends the address of the sector to be written and the write data to the host interface 1. Next, the control circuit 4 receives the logical sector address to be written, the write data, and the host interface 1 via the host interface bus 5.
[0034]
Then, the control circuit 4 designates the address of the physical sector 20 to which writing to the flash memory 2 is performed via the memory address bus 7, puts the write data and the logical sector address on the memory data bus 8, and the flash memory 2. Write to. At this time, the control circuit 4 selects a physical sector 20 with a small number of rewrites in order to store write data from the host computer 200 by an algorithm.
[0035]
Further, since the flash memory 2 needs to be erased before writing from the structure of the element, if the physical address sector for writing to the flash memory 2 is not erased, before the data is written The deletion is performed. Write data from the host computer 200 is written in the data area 21 of the physical sector 20, and a logical sector address from the host computer 200 is written in the management area 22.
[0036]
FIG. 6 is a diagram illustrating the mapping table update operation of the external storage device 100 using the flash memory 2 after writing to the flash memory 2. In FIG. 6, the control circuit 4 designates an address at which writing to the RAM 3 is performed via the memory address bus 7, places the physical sector address of the flash memory 2 to which writing has been performed on the memory data bus 8, Write.
[0037]
If the logical sector address from the host computer 200 in the operation shown in FIG. 5 is R1, and the physical sector address of the physical sector selected by the control circuit 4 is P1, the structure of the RAM 3 shown in FIG. And R1 + x are written with the physical sector address P1 of the flash memory 2 that has been written.
[0038]
FIGS. 7 to 9 are diagrams showing operations at the time of read access to the external storage device 100 using the flash memory 2 of the host computer 200 when no error bit occurs in the RAM 3 storing the mapping table.
[0039]
In FIG. 7, the host computer 200 sends a logical sector address to be read to the host interface 1. The control circuit 4 receives a logical sector address to be read through the host interface bus 5.
[0040]
In FIG. 8, after that, the control circuit 4 designates an address for storing the physical sector address of the flash memory 2 corresponding to the logical sector address to be read from the host computer 200 of the RAM 3 via the memory address bus 7. The physical sector address is read from the RAM 3 via the memory data bus 8.
[0041]
In the operation shown in FIG. 7, if the logical sector address from the host computer 200 is R2, and the physical sector address P2 of the flash memory 2 in which the data of the logical sector address R2 is stored, the control circuit 4 The physical sector address stored at address R2 is compared with the physical sector address stored at R2 + x. In this case, in the structure of the RAM 3 shown in FIG. 4, the physical sector address P2 is read from the addresses R2 and R2 + x of the RAM 3, and the two coincide with each other.
[0042]
In FIG. 9, when the address of the physical sector 20 storing the logical sector address data from the host computer 200 is obtained from the RAM 3, the control circuit 4 sends the physical sector 20 obtained from the RAM 3 via the memory address bus 7. Is read from the flash memory 2 via the memory data bus 8.
[0043]
Then, the control circuit 4 sends the read data to the host interface 1 via the host interface bus 5 and further sends the read data from the host interface 1 to the host computer 200.
[0044]
If the control circuit 4 determines that the physical sector addresses read from each of the duplicated mapping tables do not match, the physical sector address read from each mapping table during the operations shown in FIGS. An operation of accessing the management area 22 of the physical sector 20 to confirm whether there is a physical sector 20 having the same logical sector address as the access address from the host computer 200 and an operation of correcting the contents of the mapping table are added.
[0045]
This will be described with reference to FIGS.
In FIG. 10, the control circuit 4 designates the address of the physical sector 20 obtained from each mapping table of the RAM 3 by the memory address bus 7, and enters the management area 22 of the physical sector 20 via the memory data bus 8. The stored logical address of the data stored in the data storage area 21 of the physical sector 20 is read out.
[0046]
As shown in FIG. 11, the physical sector addresses stored in the addresses 0 and 0 + x of the RAM 3 and storing the data of the logical sector address 0 are 100000 and 100001, respectively. As in the operation shown in FIG. 10, data in the management area 22 of the physical sector 20 with addresses 100000 and 100001 is read.
[0047]
Then, after reading the logical sector address from the management area 22 of each physical sector 20, the control circuit 4 confirms whether or not they match the logical sector address from the host computer 200.
[0048]
As shown in FIG. 12, if the data in the management area 22 of the physical sector 20 with addresses 100000 and 100001 are respectively 5 and 0, the physical sector 20 with the address 100001 stores data with the logical sector address 0. Therefore, it is determined that the address 100001 is correct.
[0049]
When the physical sector 20 having the same logical sector address as the access address from the host computer 200 exists as in the example shown in FIGS. 11 and 12, the mapping table of the RAM 3 is corrected by the operation shown in FIG. To do.
[0050]
In the example shown in FIGS. 11 and 12, the value of the physical sector address corresponding to the logical sector address 0 stored in the address 0 of the RAM 3 is rewritten from 100000 to 100001 as shown in FIG.
[0051]
When the mapping table is corrected, the data of the physical sector 20 corresponding to the logical sector address from the host computer 200 is sent to the host computer 200 by the operation shown in FIG.
[0052]
In the example shown in FIGS. 11 and 12, since the address of the physical sector 20 storing the data of the logical sector address 0 from the host computer 200 is 100001, it is stored in the data area 21 of the physical sector 20 of the address 100001. The stored data is sent to the host computer 200.
[0053]
When an error bit occurs at address 0 of RAM 3 as in the examples of FIGS. 11 and 12, since there is only one mapping table in the conventional technique, 100000 stored at address 0 of RAM 3 is logical sector. It is regarded as the address of the physical sector storing the data of address 0.
[0054]
Therefore, although the physical sector at the address 100000 stores the data at the logical sector address 5, the external storage device 100 using the flash memory 2 transfers the data stored in the physical sector at the address 100000 to the logical sector. The data is sent to the host computer 200 as the data of the sector with address 0.
As a result, in the conventional technique, if an error bit occurs in the RAM 3, the reliability of data in the external storage device 100 using the flash memory 2 has been impaired.
[0055]
On the other hand, according to the first embodiment of the present invention, the reliability of data in the external storage device 100 using the flash memory 2 can be ensured by the above-described operation even if an error occurs in the RAM 3.
[0056]
In other words, according to the first embodiment of the present invention, the reliability of the mapping table is improved without requiring a separate ECC RAM for the mapping table, and error bits are generated in the RAM storing the mapping table. Even if it occurs, an external storage device using a nonvolatile memory capable of maintaining the reliability of data can be realized.
[0057]
Recently, the capacity of the RAM has increased due to the progress of miniaturization, so that the mapping table can be multiplexed without increasing the number of elements of the RAM, and the external storage device using the flash memory without increasing the cost. The reliability of 100 data can be improved.
[0058]
In the first embodiment of the present invention described above, when an error bit is generated in the RAM 3 and the number of error bits is 1, the flash memory is used as in the example shown in FIGS. The reliability of data in the external storage device 100 using 2 can be ensured. However, when the number of error bits becomes plural, in the method shown in FIGS. 11 and 12, the external storage using the flash memory is used. In some cases, the reliability of data in the apparatus 100 cannot be ensured.
[0059]
An example of ensuring the reliability of data in that case is the second embodiment of the present invention. The second embodiment will be described with reference to FIGS.
[0060]
In FIG. 14, the physical sector addresses that store the data of logical sector address 1 stored at addresses 1 and 1 + x of RAM 3 are 100100 and 100111, respectively. Therefore, the control circuit 4 operates as shown in FIG. Data in the management area 22 of the physical sector 20 with addresses 100100 and 100111 is read.
[0061]
However, as shown in FIG. 15, if the data in the management area 22 of the physical sector 20 with addresses 100100 and 100111 are 4, 6 respectively, they are logical sector addresses 1 from the host computer 200. Does not match.
[0062]
In the example shown in FIG. 14, the physical sector address stored in the addresses 1 and 1 + x of the RAM 3 is different in the lower 2 bits, so the physical sector address stored in the addresses 1 and 1 + x of the RAM 3 The data of the management area 22 of the physical sector 20 of 100101 and 100110, in which the value of the lower 2 bits is changed, is read, and the control circuit 4 confirms whether or not it matches the logical sector address 1 from the host computer 200.
[0063]
As shown in FIG. 15, if the data in the management area 22 of the physical sector 20 at addresses 100101 and 100110 are 2, 1, respectively, the physical sector 20 at address 100110 stores the data at logical sector address 1. Will be doing.
[0064]
Therefore, by the operation shown in FIG. 6, as shown in FIG. 16, the value of the physical sector address corresponding to the logical sector address 1 stored in the address 1, 1 + x of the RAM 3 is rewritten from 100100, 100111 to 100110, respectively. Correct the mapping table.
[0065]
When the mapping table is corrected, the data in the physical sector 20 at the address 100110 corresponding to the logical sector address 1 from the host computer 200 is sent to the host computer 200 by the operation shown in FIG.
[0066]
In this way, the reliability of data in the external storage device 100 using the flash memory 2 can be ensured even when there are a plurality of error bits generated in the RAM 3.
[0067]
If the physical sector 20 having the same logical sector address as the logical sector address from the host computer 200 does not exist in the management area 22 as in the operation described with reference to FIGS. 15 and 16, it is read from each mapping table. By changing the value of the bit having the same physical address value and performing the same operation as described with reference to FIGS. 15 and 16, the data of the external storage device 100 using the flash memory 2 can be changed. Reliability can be ensured.
[0068]
That is, according to the second embodiment of the present invention, even when the number of error bits is plural, the reliability of the mapping table is improved without requiring a separate ECC RAM for the mapping table, To realize an external storage device using a non-volatile memory capable of maintaining the reliability of data of an external storage device using a flash memory even when an error bit occurs in a RAM storing a mapping table Can do.
[0069]
As described above, in the present invention, the improvement of the data reliability of the external storage device 100 using the flash memory 2 when the mapping table is duplicated has been described. However, when the mapping table is multiplexed more than triple, The reliability of data in the external storage device 100 using the flash memory 2 can be improved.
[0070]
For example, when the mapping table is duplicated, the addresses of the RAM 3 for storing the physical sector address corresponding to the logical sector address a are a and a + x, but an error bit occurs in the same bit of the addresses a and a + x of the RAM 3 The occurrence of an error bit in the RAM 3 cannot be detected, and erroneous data is sent at the time of read access to the logical sector address a from the host computer 200.
[0071]
However, if the mapping table is multiplexed more than triple, it is very likely that there is at least one mapping table in which no error bit has occurred, so the physical table read from each mapping table is very likely to exist. When comparing the sector addresses, it is possible to almost certainly detect the occurrence of an error bit in the RAM 3 and to ensure the reliability of data in the external storage device 100 using the flash memory 2.
[0072]
If the mapping table is multiplexed more than tripled and the physical sector addresses read from the respective mapping tables do not match, the host computer 200 is determined by the majority of the physical sector addresses read from the respective mapping tables. If the physical sector address corresponding to the logical sector address from is determined, reading of the address read from each mapping table from the management area 22 of the physical sector 20 can be omitted, and the flash memory 2 for the host computer 200 is used. Thus, the access speed of the external storage device 100 can be increased.
[0073]
The above-described example is an example in the case where a flash memory is used as the nonvolatile memory. However, as the nonvolatile memory, not only the flash memory but also other memories such as an EEPROM and a ferroelectric memory are used. It is also possible to do.
[0074]
【The invention's effect】
As described above, according to the present invention, without requiring a separate ECC RAM for the mapping table, the reliability of the mapping table is improved, and an error bit is generated in the RAM storing the mapping table. Even in this case, an external storage device using a non-volatile memory that can maintain the reliability of data can be realized.
[Brief description of the drawings]
FIG. 1 is a schematic configuration diagram of an external storage device according to a first embodiment of the present invention.
FIG. 2 is a diagram showing a configuration of the flash memory shown in FIG. 1;
FIG. 3 is a diagram showing a configuration of a physical sector shown in FIG. 2;
4 is a diagram showing a configuration of a RAM shown in FIG. 1. FIG.
FIG. 5 is a diagram showing a data write operation to the flash memory when data is written from the host computer to the external storage device;
FIG. 6 is a diagram illustrating an operation of writing data to a RAM for updating a mapping table.
FIG. 7 is a diagram showing a sending operation of a logical sector address for reading from a host computer to an external storage device.
FIG. 8 is a diagram showing a read access operation to a mapping table stored in a RAM.
FIG. 9 is a diagram showing a data read operation from the flash memory when a read access from the host computer to the external storage device is performed.
FIG. 10 is a diagram showing a read operation from a physical sector management area of a flash memory.
FIG. 11 is a diagram illustrating an example of data in a RAM that stores a mapping table.
FIG. 12 is a diagram illustrating an example of data in a management area of a physical sector of a flash memory.
FIG. 13 is a diagram illustrating an update operation of a mapping table in a RAM.
FIG. 14 is a diagram illustrating an example of data in a RAM storing a mapping table according to the second embodiment of the present invention.
FIG. 15 is a diagram illustrating an example of data in a management area of a physical sector of a flash memory according to the second embodiment of the present invention.
FIG. 16 is a diagram illustrating an update operation of a mapping table in a RAM.
[Explanation of symbols]
1 Host interface
2 Flash memory
3 RAM
4 Control circuit
5 Host interface bus
6 Host interface control line
7 Memory address bus
8 Memory data bus
9 Memory control line
20 physical sectors
21 Data area
22 Management area
100 External storage device using flash memory
200 Host computer

Claims (5)

不揮発性メモリを使用した外部記憶装置において、
不揮発性メモリを記憶媒体とし、この記憶媒体の内部をデータの読み書きの単位である物理セクタに分割し、物理セクタをホストコンピュータからの書込みデータを保持するデータ領域と管理領域とに分割し、管理領域にはホストコンピュータのアクセスアドレスである論理セクタアドレスを格納すると共に、論理セクタアドレスとこの論理セクタアドレスのデータが格納されている上記記憶媒体内の物理セクタアドレスの対応表を少なくとも二重化してマッピングテーブルに格納し、ホストコンピュータからのデータ読み出し時は、ホストコンピュータからの論理セクタアドレスに対応する物理セクタアドレスを上記二重化した各々のマッピングテーブルから読み出し、読み出した値が互いに一致している場合は、上記マッピングテーブルの内容が正しいと判断し、上記マッピングテーブルから得られたフラッシュメモリの物理セクタアドレスのデータをホストコンピュータに送り、上記二重化した各々のマッピングテーブルから読み出した物理セクタアドレスの値が互いに異なる場合は、各々のマッピングテーブルから読み出された物理セクタアドレスの物理セクタの管理領域にアクセスし、ホストコンピュータからのアクセスアドレスと同じ論理セクタアドレスを持つ物理セクタが存在する場合、この物理セクタに格納されたデータを、ホストコンピュータに送ると共にマッピングテーブルの内容を、上記ホストコンピュータからのアクセスアドレスと同じ論理セクタアドレスに修正することを特徴とする不揮発性メモリを使用した外部記憶装置。
In an external storage device using a non-volatile memory,
Using a nonvolatile memory as a storage medium, the inside of this storage medium is divided into physical sectors, which are units for reading and writing data, and the physical sectors are divided into a data area for holding write data from the host computer and a management area for management. In the area, the logical sector address that is the access address of the host computer is stored, and the mapping table of the logical sector address and the physical sector address in the storage medium in which the data of the logical sector address is stored is duplicated and mapped. When data is read from the host computer and stored in the table, the physical sector address corresponding to the logical sector address from the host computer is read from each of the duplicate mapping tables, and the read values match each other. The mapping table above If the contents are determined to be correct, the physical sector address data of the flash memory obtained from the mapping table is sent to the host computer, and the physical sector address values read from the duplicated mapping tables are different from each other, When the physical sector management area of the physical sector address read from the mapping table is accessed and there is a physical sector with the same logical sector address as the access address from the host computer, the data stored in this physical sector is An external storage device using a non-volatile memory, wherein the external storage device sends the data to the host computer and corrects the contents of the mapping table to the same logical sector address as the access address from the host computer
請求項1記載の不揮発性メモリを使用した外部記憶装置において、ホストコンピュータからこの外部記憶装置へのデータ読み出し時に、二重化した各々のマッピングテーブルから読み出した物理セクタアドレスの値が互いに異なり、各々のマッピングテーブルから読み出された物理セクタアドレスの物理セクタで、管理領域にホストコンピュータからのアクセスアドレスと同じ論理セクタアドレスを持つ物理セクタが存在しない場合には、上記二重化した各々のマッピングテーブルから読み出された物理アドレスの互いに値の異なるビットの値を変化させた物理セクタアドレスの物理セクタの管理領域をアクセスしていき、ホストコンピュータからのアクセスアドレスと同じ論理セクタアドレスを持つ物理セクタが存在する場合、この物理セクタに格納されたデータをホストコンピュータに送ると共にマッピングテーブルの内容を修正することを特徴とする不揮発性メモリを使用した外部記憶装置。2. The external storage device using the non-volatile memory according to claim 1, wherein when the data is read from the host computer to the external storage device, the physical sector address values read from each of the duplicated mapping tables are different from each other, and each mapping is performed. If the physical sector of the physical sector address read from the table does not have a physical sector with the same logical sector address as the access address from the host computer in the management area, it is read from each duplicated mapping table. When the physical sector management area of the physical sector address is changed by changing the value of the bit different in the physical address, and there is a physical sector having the same logical sector address as the access address from the host computer, This physical sec External storage device using a nonvolatile memory, characterized by modifying the contents of the mapping table and sends the stored data to the data to the host computer. 請求項2記載の外部記憶装置において、ホストコンピュータからこの外部記憶装置へのデータ読み出し時に、二重化した各々のマッピングテーブルから読み出した物理セクタアドレスの値が互いに異なり、各々のマッピングテーブルから読み出された物理セクタアドレスの物理セクタで、管理領域にホストコンピュータからのアクセスアドレスと同じ論理セクタアドレスを持つ物理セクタが存在せず、上記二重化した各々のマッピングテーブルから読み出された物理アドレスの値の互いに異なるビットの値を変化させた物理セクタアドレスの物理セクタで、管理領域にホストコンピュータからのアクセスアドレスと同じ論理セクタアドレスを持つ物理セクタが存在しない場合には、上記二重化した各々のマッピングテーブルから読み出された物理アドレスの値が互いに同じビットの値を変化させ、変化させた物理セクタアドレスの物理セクタの管理領域にアクセスしていき、ホストコンピュータからのアクセスアドレスと同じ論理セクタアドレスを持つ物理セクタが存在するときには、この物理セクタに格納されたデータをホストコンピュータに送ると共にマッピングテーブルの内容を修正することを特徴とする不揮発性メモリを使用した外部記憶装置。3. The external storage device according to claim 2, wherein when data is read from the host computer to the external storage device, the physical sector address values read from each of the duplicated mapping tables are different from each other and read from each mapping table. There is no physical sector with the same logical sector address as the access address from the host computer in the physical sector of the physical sector address, and the physical address values read from each of the duplicated mapping tables are different from each other. If there is no physical sector with the same logical sector address as the access address from the host computer in the management area in the physical sector of the physical sector address with the bit value changed, read from each of the duplicated mapping tables Was The physical address value changes the value of the same bit, accesses the physical sector management area of the changed physical sector address, and there is a physical sector with the same logical sector address as the access address from the host computer An external storage device using a non-volatile memory characterized in that data stored in the physical sector is sometimes sent to the host computer and the contents of the mapping table are corrected. 請求項1、2又は3記載の不揮発性メモリを使用した外部記憶装置において、上記マッピングテーブルを三重化以上に多重化したことを特徴とする不揮発性メモリを使用した外部記憶装置。4. An external storage device using a nonvolatile memory according to claim 1, wherein the mapping table is multiplexed more than tripled. 請求項4記載の不揮発性メモリを使用した外部記憶装置において、多重化した各々のマッピングテーブルから読み出した物理セクタアドレスの値が互いに異なる場合であって、多重化した各々のマッピングテーブルから読み出した物理セクタアドレスの値の多数決を取れるときには、多数となる物理セクタアドレスの物理セクタのデータをホストコンピュータに送ると共に、マッピングテーブルのホストコンピュータからの論理アドレスに対応する物理セクタアドレスの値を上記多数となる物理セクタアドレスに書き換えて処理を終了させることを特徴とする不揮発性メモリを使用した外部記憶装置。5. The external storage device using the non-volatile memory according to claim 4, wherein physical sector addresses read from each multiplexed mapping table are different from each other, and the physical read from each multiplexed mapping table is used. When the majority of the sector address values can be taken, the physical sector data of a large number of physical sector addresses is sent to the host computer, and the physical sector address value corresponding to the logical address from the host computer in the mapping table becomes the above-mentioned majority. An external storage device using a non-volatile memory, wherein the processing is terminated by rewriting to a physical sector address.
JP29660498A 1998-10-19 1998-10-19 External storage device using non-volatile memory Expired - Fee Related JP3769395B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29660498A JP3769395B2 (en) 1998-10-19 1998-10-19 External storage device using non-volatile memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29660498A JP3769395B2 (en) 1998-10-19 1998-10-19 External storage device using non-volatile memory

Publications (2)

Publication Number Publication Date
JP2000122909A JP2000122909A (en) 2000-04-28
JP3769395B2 true JP3769395B2 (en) 2006-04-26

Family

ID=17835711

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29660498A Expired - Fee Related JP3769395B2 (en) 1998-10-19 1998-10-19 External storage device using non-volatile memory

Country Status (1)

Country Link
JP (1) JP3769395B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1372068A3 (en) 2002-06-11 2006-02-08 Seiko Epson Corporation System, method and program for rewriting a flash memory
KR100640588B1 (en) * 2004-09-24 2006-11-01 삼성전자주식회사 Nonvolatile Memory Storage Device Using Optionally the SATA and AT Interfaces
KR100706242B1 (en) 2005-02-07 2007-04-11 삼성전자주식회사 How to configure the memory system and its run unit address mapping table
JP5398551B2 (en) 2008-02-08 2014-01-29 富士通株式会社 Backup method, controller, and disk array system

Also Published As

Publication number Publication date
JP2000122909A (en) 2000-04-28

Similar Documents

Publication Publication Date Title
EP1829047B1 (en) System and method for use of on-chip non-volatile memory write cache
US9520992B2 (en) Logical-to-physical address translation for a removable data storage device
JP4486938B2 (en) Processing technique for non-volatile memory system with data sectors having a size different from the memory page size and / or block size
US6865658B2 (en) Nonvolatile data management system using data segments and link information
US12135889B2 (en) Control method of flash memory controller and associated flash memory controller and storage device
US8453021B2 (en) Wear leveling in solid-state device
US8037232B2 (en) Data protection method for power failure and controller using the same
US7184306B2 (en) Flash EEPROM system with simultaneous multiple data sector programming and storage of physical block characteristics in other designated blocks
US7315916B2 (en) Scratch pad block
US11809328B2 (en) Control method of flash memory controller and associated flash memory controller and storage device
JPH11110283A (en) Control method for nonvolatile semiconductor memory system
JPH08137634A (en) Flash disk card
US11748011B2 (en) Control method of flash memory controller and associated flash memory controller and storage device
US20100306447A1 (en) Data updating and recovering methods for a non-volatile memory array
US10922025B2 (en) Nonvolatile memory bad row management
JP3769395B2 (en) External storage device using non-volatile memory
JP2012068765A (en) Memory controller, flash memory system with memory controller, and control method of flash memory
JP3808842B2 (en) Storage device having rewritable nonvolatile memory and control method of nonvolatile memory for storage device
JP4433792B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
CN114647595B (en) Solid state drive and data processing method
JP3670151B2 (en) Flash memory access method, system including driver for accessing flash memory, and flash memory
JP2012037971A (en) Memory controller, nonvolatile memory system provided with memory controller, and method for controlling nonvolatile memory
JP3976764B2 (en) Semiconductor disk device
US12536071B2 (en) Memory controllers and storage devices including the same
US20250252016A1 (en) Memory controllers and storage devices including the same

Legal Events

Date Code Title Description
TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060131

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060206

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20090210

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100210

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100210

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110210

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120210

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120210

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130210

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130210

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees