JP2004206615A - Storage device - Google Patents

Storage device Download PDF

Info

Publication number
JP2004206615A
JP2004206615A JP2002377804A JP2002377804A JP2004206615A JP 2004206615 A JP2004206615 A JP 2004206615A JP 2002377804 A JP2002377804 A JP 2002377804A JP 2002377804 A JP2002377804 A JP 2002377804A JP 2004206615 A JP2004206615 A JP 2004206615A
Authority
JP
Japan
Prior art keywords
address
physical
physical address
logical address
logical
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
JP2002377804A
Other languages
Japanese (ja)
Inventor
Tomoaki Izumi
智紹 泉
Masahiro Nakanishi
雅浩 中西
Keisuke Sakai
敬介 坂井
Toshiyuki Honda
利行 本多
Juichi Shiyouraiden
重一 小来田
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 JP2002377804A priority Critical patent/JP2004206615A/en
Publication of JP2004206615A publication Critical patent/JP2004206615A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a storage device having a logical address/physical address conversion table of a small unit even when a storage part has a large capacity, rewriting frequencies of the respective physical addresses do not exceed a guaranteed rewriting frequency for a short period of time in a table area allocated to the logical address/physical address conversion table. <P>SOLUTION: The storage device has a storage part having the table area and a data area and for distributing and storing a plurality of logical address/physical address conversion tables in the table area and a table control part for rewriting only the logical address/physical address conversion table including a rewritten part when the logical address/physical address conversion table is rewritten. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、記憶装置に関する。
【0002】
【従来の技術】
近年、フラッシュメモリ等の不揮発性メモリ(記憶部)を備えた記憶装置(例えば、メモリカード)が、音声データ又は映像データ等を取り扱う携帯機器の記憶装置として使われるようになってきた。フラッシュメモリ等の不揮発性メモリは、データの書き換えが可能で、小型で大容量のデータを記憶可能であり、電源が無くてもデータを保持できるのが特徴である。
【0003】
不揮発性メモリを用いた記憶装置において、ホスト装置から指定されるアドレス(「論理アドレス」と呼ぶ。)と、不揮発性メモリ内に配置されるアドレス(「物理アドレス」と呼ぶ。)は一般的に一致しない。不揮発性メモリにおいては、データを書き換える毎にデータを記録する物理アドレスを変える必要があるからである。ホスト装置がデータを記録した不揮発性メモリの物理アドレスを直接管理することは極めてわずらわしく困難である。不良が発生した物理アドレスを避けて使用する必要がある。特定の物理アドレスへの書き込みが頻発するシステムでは、その物理アドレスが短期間で書き換え保証回数(一般に不揮発性メモリの書き換え保証回数は制限される。)を上回り、記憶装置が短寿命になってしまう、という不都合が生じる。
【0004】
そこで、記憶装置はホスト装置から指定される論理アドレスがどの物理アドレスに割り当てられているかを示す論理アドレス/物理アドレス変換テーブルを生成する。記憶装置は、論理アドレス/物理アドレス変換テーブルを使用することにより、上記の問題を解決している。
特開2001−142774号公報に、従来例1の記憶装置が記載されている。従来例1の記憶装置の不揮発性メモリは、管理領域とデータ領域とに区分けされている。不揮発性メモリは、管理領域に1個の論理アドレス/物理アドレス変換テーブルを格納する。
【0005】
図13を用いて、不揮発性メモリを有する従来例2の記憶装置を説明する。図13は、従来例2の記憶装置の不揮発性メモリの構成を示す。図13において、不揮発性メモリ1301は、管理領域1302とデータ領域1303とを有する。管理領域1302の所定の領域に、不揮発性メモリ1301の論理アドレス/物理アドレス変換テーブル(1311〜1315)が格納されている。データ領域1303は、任意のデータ(例えばユーザデータ)が格納されている。従来例2の記憶装置と接続されたホスト機器は、論理アドレスと、その論理アドレスに書き込むデータとを記憶装置に伝送する。記憶装置は、論理アドレス/物理アドレス変換テーブルのその論理アドレスの欄に、未記録の物理アドレスを書き込む。記憶装置は、論理アドレスに対応付けられた物理アドレスにデータを書き込む。
【0006】
記憶装置がデータを書き換える場合は(既にその論理アドレスに物理アドレスが対応付けられており、その物理アドレスにデータが書き込まれている場合は)、現在の論理アドレス/物理アドレス変換テーブルを無効とし、新たに論理アドレス/物理アドレス変換テーブルを生成する。記憶装置は、新たな論理アドレス/物理アドレス変換テーブルのその論理アドレスの欄に、未記録の物理アドレスを書き込む。記憶装置は、論理アドレスに対応付けられた物理アドレスにデータを書き込む。
【0007】
図13において、1321〜1325は、論理アドレス/物理アドレス変換テーブルが未記録か記録済みかを表すフラグ(1は未記録、0は記録済み)である。1331〜1335は、論理アドレス/物理アドレス変換テーブルが有効か無効かを表すフラグ(1は有効、0は無効)である。図13において、無効のフラグ1331〜1333を有する論理アドレス/物理アドレス変換テーブルは無効である。記録済みを示すフラグ1324と有効を示すフラグ1334とを有する論理アドレス/物理アドレス変換テーブル1314が現在有効である。電源投入時、記憶装置は、管理領域1302の所定の領域を先頭から検索していき、有効な論理アドレス/物理アドレス変換テーブルを見つける。
【0008】
【特許文献1】
特開2001−142774号公報
【0009】
【発明が解決しようとする課題】
従来の記憶装置においては、論理アドレス/物理アドレス変換テーブルの格納に割り当てられている複数の物理ブロックの内、1物理ブロックが欠陥不良になった場合でも、論理アドレス/物理アドレス変換テーブルの全てを書き換える必要があった。
近年では不揮発性メモリの記憶容量の増大に伴い、論理アドレス/物理アドレス変換テーブルのサイズ(論理アドレス/物理アドレス変換テーブルに割り当てられる物理ブロック数)が増大している。論理アドレス/物理アドレス変換テーブルに割り当てられる物理ブロック数が増大すると、論理アドレス/物理アドレス変換テーブルの書き換えに必要な物理ブロック数も増大する。(論理アドレス/物理アドレス変換テーブルの書き換え回数×論理アドレス/物理アドレス変換テーブルに割り当てられた物理ブロック数)の値が大きくなる。言い換えると、論理アドレス/物理アドレス変換テーブルを一定回数書き換えた場合、1物理ブロック当たりの書き換え回数が多くなる。従って、論理アドレス/物理アドレス変換テーブルに対する書き込みが頻発すると、論理アドレス/物理アドレス変換テーブルに割り当てられた物理ブロックに対しての書き換え回数が短期間で保証回数を上回り、記憶装置の寿命が短くなるという問題があった。
【0010】
論理アドレス/物理アドレス変換テーブルの書き込み先を管理領域内の物理ブロックのみに固定すると、論理アドレス/物理アドレス変換テーブルに対する書き込みが頻発した場合に、データ領域において物理ブロックを実際に書き換えた回数が書き換え保証回数よりも十分少ないにも関わらず、論理アドレス/物理アドレス変換テーブルに割り当てられた管理領域において物理ブロックを実際に書き換えた回数が書き換え保証回数を上回るという問題があった。
【0011】
本発明は、記憶部が大容量であっても小さい単位の論理アドレス/物理アドレス変換テーブルを有し、論理アドレス/物理アドレス変換テーブルに割り当てられたテーブル領域において各物理アドレスの書き換え回数が短期間で書き換え保証回数を上回らない記憶装置を提供することを目的とする。
本発明は、欠陥不良の物理ブロックの影響を最小限に留めて、小さい単位で論理アドレス/物理アドレス変換テーブルを書き換える記憶装置を提供することを目的とする。
本発明は、起動時に立ち上がりの早い記憶装置を提供することを目的とする。
本発明は、小さな管理領域を有し、各物理アドレスの書き換え回数が均一になるように広いデータ領域を使用し、特定の物理アドレスの書き換え回数だけが短期間で書き換え保証回数を上回ることがない記憶装置を提供することを目的とする。
本発明は、高い信頼性を確保し、大容量化にも円滑に対応可能な記憶装置を提供することを目的とする。
【0012】
【課題を解決するための手段】
上記課題を解決するため、本発明は下記の構成を有する。
請求項1に記載の発明は、テーブル領域とデータ領域とを有し、複数の論理アドレス/物理アドレス変換テーブルを前記テーブル領域に分散して格納する記憶部と、前記論理アドレス/物理アドレス変換テーブルを書き換える場合、書き換え部分を含む前記論理アドレス/物理アドレス変換テーブルのみを書き換えるテーブル制御部と、を有することを特徴とする記憶装置である。
【0013】
請求項2に記載の発明は、テーブル領域とデータ領域とを有し、複数の論理アドレス/物理アドレス変換テーブルのアドレス情報をそれぞれ有する複数のインデックステーブルを前記テーブル領域に分散して格納し、前記インデックステーブルで指定される前記論理アドレス/物理アドレス変換テーブルの中の少なくとも1つを前記データ領域に格納する記憶部と、前記論理アドレス/物理アドレス変換テーブルを書き換える場合、書き換え部分を含む前記論理アドレス/物理アドレス変換テーブル及びその論理アドレス/物理アドレス変換テーブルのアドレス情報を有する前記インデックステーブルのみを書き換えるテーブル制御部と、を有することを特徴とする記憶装置である。
【0014】
請求項3に記載の発明は、テーブル領域とデータ領域とを有し、複数の論理アドレス/物理アドレス変換テーブルの少なくとも一部を前記テーブル領域に分散して格納する記憶部と、前記論理アドレス/物理アドレス変換テーブルを更新するテーブル制御部と、を有し、前記論理アドレス/物理アドレス変換テーブルは、そのテーブルが有効か無効かを示す第1のフラグと、複数の論理アドレス及びその論理アドレスに対応する物理アドレスのアドレス情報と、他の論理アドレス/物理アドレス変換テーブルのアドレス情報と、他の論理アドレス/物理アドレス変換テーブルのアドレス情報が有効か無効かを示す第2のフラグとを有し、前記テーブル領域に格納された前記論理アドレス/物理アドレス変換テーブルを先頭として、前記他の論理アドレス/物理アドレス変換テーブルのアドレス情報によって、チェーン状に複数の前記論理アドレス/物理アドレス変換テーブルが連結され、前記論理アドレス/物理アドレス変換テーブルを書き換える場合、前記テーブル制御部は、書き換え部分を含む前記論理アドレス/物理アドレス変換テーブルの前記第1のフラグを無効にして、新たな前記論理アドレス/物理アドレス変換テーブルを生成し、無効にされた前記論理アドレス/物理アドレス変換テーブルのアドレス情報に対応する前記第2のフラグを無効にし、生成した前記論理アドレス/物理アドレス変換テーブルのアドレス情報を新たな前記他の論理アドレス/物理アドレス変換テーブルのアドレス情報として書き込み、それに対応する前記第2のフラグを有効にする、ことを特徴とする記憶装置である。
【0015】
請求項4に記載の発明は、チェーン状に連結された複数の前記論理アドレス/物理アドレス変換テーブルの中で、先頭の前記論理アドレス/物理アドレス変換テーブル以外の論理アドレス/物理アドレス変換テーブルは、全て前記データ領域に格納されていることを特徴とする請求項3に記載の記憶装置である。
【0016】
請求項5に記載の発明は、テーブル領域とデータ領域とを有し、複数のインデックステーブルを前記テーブル領域に分散して格納し、前記インデックステーブルでアドレスを指定される前記論理アドレス/物理アドレス変換テーブルの中の少なくとも1つを前記データ領域に格納する記憶部と、前記インデックステーブル及び前記論理アドレス/物理アドレス変換テーブルを更新するテーブル制御部と、を有し、前記インデックステーブルは、複数の論理アドレス/物理アドレス変換テーブルのアドレス情報を有し、前記論理アドレス/物理アドレス変換テーブルは、そのテーブルが有効か無効かを示す第1のフラグと、複数の論理アドレス及びその論理アドレスに対応する物理アドレスのアドレス情報と、他の論理アドレス/物理アドレス変換テーブルのアドレス情報と、他の論理アドレス/物理アドレス変換テーブルのアドレス情報が有効か無効かを示す第2のフラグとを有し、前記インデックステーブルでアドレスを指定される前記論理アドレス/物理アドレス変換テーブルを先頭として、前記他の論理アドレス/物理アドレス変換テーブルのアドレス情報とによって、チェーン状に複数の前記論理アドレス/物理アドレス変換テーブルが連結され、前記論理アドレス/物理アドレス変換テーブルを書き換える場合、前記テーブル制御部は、書き換え部分を含む前記論理アドレス/物理アドレス変換テーブルの前記第1のフラグを無効にして、新たな前記論理アドレス/物理アドレス変換テーブルを生成し、無効にされた前記論理アドレス/物理アドレス変換テーブルのアドレス情報に対応する前記第2のフラグを無効にし、生成した前記論理アドレス/物理アドレス変換テーブルのアドレス情報を新たな前記他の論理アドレス/物理アドレス変換テーブルのアドレス情報として書き込み、それに対応する前記第2のフラグを有効にする、ことを特徴とする記憶装置である。
【0017】
請求項6に記載の発明は、テーブル領域とデータ領域とを有し、複数のインデックステーブルの少なくとも一部を前記テーブル領域に分散して格納し、前記インデックステーブルでアドレスを指定される前記論理アドレス/物理アドレス変換テーブルの中の少なくとも1つを前記データ領域に格納する記憶部と、前記インデックステーブル及び前記論理アドレス/物理アドレス変換テーブルを更新するテーブル制御部と、を有し、前記インデックステーブルは、そのインデックステーブルが有効か無効かを示す第1のフラグと、複数の論理アドレス/物理アドレス変換テーブルのアドレス情報と、他のインデックステーブルのアドレス情報と、他のインデックステーブルのアドレス情報が有効か無効かを示す第2のフラグと、を有し、前記テーブル領域に格納された前記インデックステーブルを先頭として、前記他のインデックステーブルのアドレス情報によって、チェーン状に複数の前記インデックステーブルが連結され、前記インデックステーブルを書き換える場合、前記テーブル制御部は、書き換え部分を含む前記インデックステーブルの前記第1のフラグを無効にして、新たな前記インデックステーブルを生成し、無効にされた前記インデックステーブルのアドレス情報に対応する前記第2のフラグを無効にして、生成した前記インデックステーブルのアドレス情報を新たな前記他のインデックステーブルのアドレス情報として書き込み、それに対応する前記第2のフラグを有効にする、ことを特徴とする記憶装置である。
【0018】
請求項7に記載の発明は、チェーン状に連結された複数の前記インデックステーブルの中で、先頭の前記インデックステーブル以外の前記インデックステーブルは、前記データ領域に格納されていることを特徴とする請求項6に記載の記憶装置である。
【0019】
請求項8に記載の発明は、前記論理アドレス/物理アドレス変換テーブル及び前記インデックステーブルはデータの最小消去単位である1つの物理ブロックで構成することを特徴とする請求項1から請求項7のいずれかの請求項に記載の記憶装置である。
【0020】
請求項9に記載の発明は、前記記憶部は複数のセグメントを有し、前記セグメント毎に前記論理アドレス/物理アドレス変換テーブル又は前記インデックステーブルを有することを特徴とする請求項1から請求項7のいずれかの請求項に記載の記憶装置である。
【0021】
本発明は、論理アドレス/物理アドレス変換テーブルに割り当てられたテーブル領域において各物理アドレスの書き換え回数が短期間で書き換え保証回数を上回らない記憶装置を実現できるという作用を有する。
本発明は、欠陥不良の物理ブロックの影響を最小限に留めて、小さい単位で論理アドレス/物理アドレス変換テーブルを書き換える記憶装置を実現できるという作用を有する。
本発明は、起動時に立ち上がりの早い記憶装置を実現できるという作用を有する。
本発明は、特定の物理アドレスの書き換え回数だけが短期間で書き換え保証回数を上回ることがない記憶装置を実現できるという作用を有する。
本発明は、高い信頼性を確保し、大容量化にも円滑に対応可能な記憶装置を実現できるという作用を有する。
【0022】
【発明の実施の形態】
以下本発明の実施をするための最良の形態を具体的に示した実施例について、図面とともに記載する。
【0023】
《実施例1》
図1〜6を用いて、実施例1の記憶装置を説明する。図1は、本発明の記憶装置の構成を示すブロック図である。図1において、101は記憶装置、102はホスト装置である。記憶装置101は、記憶部111、ホストインタフェース部112、バッファメモリ113、記憶制御部114、テーブル制御部115を有する。記憶装置101はメモリカードである。記憶部111は、不揮発性メモリ(実施例においてはフラッシュメモリ)を有する。ホスト装置102は、メモリカードの挿入スロットを有する携帯機器(例えばメモリカードを記憶媒体とする音楽レコーダ)である。
【0024】
ホスト装置102は、記憶装置101にデータの書き込み及び読み出し等を指令し、書き込むデータを伝送し、記憶装置101から送られた応答及び読み出しデータを受け取る。
記憶装置101のホストインタフェース部112は、ホスト装置102から送信された指令及び書き込むデータを受信し、応答及び読み出しデータをホスト装置102に送信する。
バッファメモリ113は、書き込むデータ及び読み出しデータを一時的に記憶するRAMである。バッファメモリ113は電源投入後に、論理アドレス/物理アドレス変換テーブル、消去済みテーブル、無効テーブル等の各種テーブルを格納する。
記憶制御部114は、バッファメモリ113に格納された書き込むデータを記憶部111に書き込み、記憶部111に記録されている読み出しデータをバッファメモリ113に格納する。
テーブル制御部115は、データの書き込み及び消去に基づいて、論理アドレス/物理アドレス変換テーブルを書き換える。
記憶部111は、データ及び論理アドレス/物理アドレス変換テーブルを格納する。
【0025】
図2は記憶部111の構成を示す図である。本発明において、記憶部111は、複数のセグメントに区分される。各セグメントは、それぞれ別個の記憶素子で構成されている。セグメントi(1≦i≦n。nは任意の正整数。)201は、複数の物理ブロック202を有する。物理ブロックは、データの消去単位である。
各セグメントには、論理アドレス/物理アドレス変換テーブル311が格納されている。本実施例の各セグメントの論理アドレス/物理アドレス変換テーブル311は、論理アドレス(ホスト装置102から指定されるアドレス)に対応させて、セグメント内の物理アドレス(記憶部111の物理ブロックのアドレス)を割り当てる。
【0026】
図3は実施例1のセグメントの構成を示す図である。実施例1において、セグメント201はテーブル領域301とデータ領域302とに区分される。テーブル領域301は、論理アドレス/物理アドレス変換テーブル311を格納するための専用の領域である。テーブル領域301は、複数の論理アドレス/物理アドレス変換テーブル311を分散して(それぞれ任意のアドレスに)格納する。データ領域302は、ホスト装置102から伝送されたデータを書き込むための領域である。
【0027】
論理アドレス/物理アドレス変換テーブル311は、そのテーブルが有効か無効か又は消去済みかを示す(論理アドレス/物理アドレス変換テーブル311が存在する条件においては、それが有効か無効かを示す)第1のフラグ321(本発明の実施例においては2ビット。)を有する。
第1のフラグ=11の場合、テーブルが消去済み(未書き込み)であることを示す。
第1のフラグ=01の場合、テーブルが有効であることを示す。
第1のフラグ=00の場合、テーブルが無効(有効でない、かつ未消去。)であることを示す。
【0028】
実施例1において、各論理アドレス/物理アドレス変換テーブル311は、それぞれに割り当てられた所定の範囲の論理アドレスについての変換テーブルであって、全ての論理アドレス/物理アドレス変換テーブル311の集合が、全論理アドレスの変換テーブルを構成する。1つの論理アドレス/物理アドレス変換テーブル311は、データの消去単位である1物理ブロックに格納される。テーブル制御部115は、各論理アドレス/物理アドレス変換テーブル311を書き換えるとき、旧論理アドレス/物理アドレス変換テーブル311を無効にして、未記録の任意の物理ブロックに新たな論理アドレス/物理アドレス変換テーブル311を格納する。これにより、論理アドレス/物理アドレス変換テーブル311の書き換えに必要な物理ブロック数を最小限の1物理ブロックにすることができる。論理アドレス/物理アドレス変換テーブル311の(書き換え回数×物理ブロック数)が少なくなる。言い換えると、論理アドレス/物理アドレス変換テーブルを一定回数書き換えた場合、1物理ブロック当たりの書き換え回数が少なくなる。
論理アドレス/物理アドレス変換テーブル311は、1物理ブロックで格納可能な数の論理アドレスとそれに対応する物理アドレスとを有する。
【0029】
記憶装置101の電源投入後、記憶制御部114は記憶部111の各セグメント201のテーブル領域301を検索し、第1のフラグが有効(=01)である複数の論理アドレス/物理アドレス変換テーブル311をバッファメモリ113に読み出す。バッファメモリ113に格納できる容量に応じて、所定数の論理アドレス/物理アドレス変換テーブル311を読み出す。
本発明の記憶部111は論理アドレス/物理アドレス変換テーブル311を読み出すのに、テーブル領域301のみを検索すればよい。テーブル領域301において1物理ブロック当たりの書き換え回数が少ない故に、テーブル領域301の大きさを小さく出来る。起動時に小さなテーブル領域301を検索して論理アドレス/物理アドレス変換テーブル311をバッファメモリ113に読み出せば良いので、記憶装置101の起動時の立ち上がりが早い。
起動時に、検出した論理アドレス/物理アドレス変換テーブル311がそれぞれ格納されている物理アドレスをバッファメモリ113に登録し、以後、その物理アドレスから論理アドレス/物理アドレス変換テーブル311を読み出しても良い。
【0030】
不揮発性メモリ(記憶部111)のデータ領域302の物理ブロック202は、その物理ブロックが有効か無効か又は消去済みかを示すフラグを有する。記憶装置101は電源投入後に、物理ブロック202が有するフラグを読み出して、消去済みテーブル及び無効テーブルをバッファメモリ113に生成する(図示していない)。消去済みテーブルは、物理ブロック202が消去済みか否かを示すテーブルである。無効テーブルは、物理ブロック202が無効か否かを示すテーブルである。
不揮発性メモリ(記憶部111)の物理ブロックを消去する場合、不要になった物理ブロックをその場で消去する場合と、そのデータが無効であるか否かを示すフラグを無効を示す値にセットしておき、別タイミングで消去する場合がある。
本発明において、論理アドレスに対応する物理アドレスは、セグメント内で割り当てるため、消去済みテーブルをセグメント単位で構成する。
【0031】
図4を用いて、データの書き込みが発生した時の論理アドレス/物理アドレス変換テーブル311の書き換え方法を説明する。図4は、実施例1のデータ書き込み発生時の論理アドレス/物理アドレス変換テーブルの書き換え方法のフローチャートである。
ホスト装置102は、記憶装置101のホストインタフェース部112に、データの書き込み指令と書き込むデータと書き込み先の論理アドレスとを伝送する。ホストインタフェース部112は、データの書き込み指令と書き込むデータと論理アドレスとを入力する(ステップ401)。ホストインタフェース部112は、書き込むデータをバッファメモリ113に一時的に格納する。
【0032】
本発明において、論理アドレスはセグメント毎に設定されている。記憶制御部114は、ホスト装置102が指定した論理アドレスに基づいて、記憶部111内のデータを書き込むセグメント201を特定する(ステップ402)。
記憶制御部114は、消去済みテーブル(セグメント単位で構成される。)に基づいて、特定したセグメント201のデータ領域302内の空き物理ブロックを検出する。記憶制御部114は、バッファメモリ113に一時的に格納した書き込むデータを取り出して、検出した空き物理ブロックにそのデータを書き込む(ステップ403)。
【0033】
記憶制御部114は、ホスト装置102が指定した論理アドレスを含む論理アドレス/物理アドレス変換テーブル311がバッファメモリ113に有るか否か判断する。バッファメモリ113に論理アドレス/物理アドレス変換テーブル311が有れば、ステップ405に進む。
バッファメモリ113に論理アドレス/物理アドレス変換テーブル311が無ければ、テーブル制御部115は、ステップ402で特定したセグメント201のテーブル領域301を検索する。第1のフラグが有効(=01)である論理アドレス/物理アドレス変換テーブルを読み出して、指定された論理アドレスを含む論理アドレス/物理アドレス変換テーブルを検出する(ステップ404)。
【0034】
テーブル制御部115は、論理アドレス/物理アドレス変換テーブル311に基づいて、ホスト装置102が指定した論理アドレスに対応する旧物理アドレスが有るか否か判断する(ステップ405)。旧物理アドレスがなければ、論理アドレス/物理アドレス変換テーブル311にデータを書き込んだ物理アドレスを登録し(ステップ406)、処理を終了する。
【0035】
旧物理アドレスが有る場合、旧物理ブロックを消去する(ステップ407)。実際にその物理ブロックを消去して、消去済みテーブルに登録しても良いし、その物理ブロックが無効か否かを示すフラグに無効を示す値を設定し、無効テーブルにその物理ブロックを登録してもよい。
【0036】
テーブル制御部115は、ステップ402で特定したセグメント201のテーブル領域301を検索し、第1のフラグが消去済み(=11)のテーブル(物理ブロック)を検出する。論理アドレス/物理アドレス変換テーブル311を新規に作成し、第1のフラグに有効(=01)を設定する(ステップ408)。
論理アドレス/物理アドレス変換テーブル311を新規に作成する場合、ホスト装置102が指定した論理アドレスに対応する物理アドレスを、ステップ403でデータを書き込んだ物理アドレスに設定する。変更された物理アドレス以外の部分は変更がないため、旧論理アドレス/物理アドレス変換テーブル(ステップ404で検出した論理アドレス/物理アドレス変換テーブル)の内容を保持する必要がある。旧論理アドレス/物理アドレス変換テーブルから論理アドレスと物理アドレスとを読み出して、新論理アドレス/物理アドレス変換テーブルにそのまま書き込む。
旧論理アドレス/物理アドレス変換テーブルの第1のフラグに無効(=00)を設定する(ステップ409)。
【0037】
図5を用いて、データの読み出し方法を説明する。図5は、実施例1のデータの読み出し方法のフローチャートである。
ホスト装置102は、記憶装置101のホストインタフェース部112に、データの読み出し指令と読み出すデータの論理アドレスとを伝送する。ホストインタフェース部112は、データの読み出し指令と読み出すデータの論理アドレスとを入力する(ステップ501)。
本発明において、論理アドレスはセグメント毎に設定されている。記憶制御部114は、ホスト装置102が指定した論理アドレスに基づいて、記憶部111内のセグメントを特定する(ステップ502)。
【0038】
記憶制御部114は、ホスト装置102が指定した論理アドレスを含む論理アドレス/物理アドレス変換テーブル311がバッファメモリ113に有るか否か判断する。バッファメモリ113に論理アドレス/物理アドレス変換テーブル311が有れば、ステップ504に進む。
バッファメモリ113に論理アドレス/物理アドレス変換テーブル311が無ければ、テーブル制御部115は、ステップ502で特定したセグメント201のテーブル領域301を検索する。第1のフラグが有効(=01)である論理アドレス/物理アドレス変換テーブルを読み出して、指定された論理アドレスを含む論理アドレス/物理アドレス変換テーブルを検出する(ステップ503)。
【0039】
論理アドレス/物理アドレス変換テーブル311に基づいて、ホスト装置102が指定した論理アドレスに対応する物理アドレスを特定する(ステップ504)。
記憶制御部114は、その物理アドレスのデータを読み出して(ステップ505)、バッファメモリ113に格納する。ホストインタフェース部112は、バッファメモリ113に格納された読み出しデータをホスト装置102に伝送する。
【0040】
図6を用いて、データの消去が発生した時の論理アドレス/物理アドレス変換テーブル311の書き換え方法を説明する。図6は、実施例1のデータの消去時の論理アドレス/物理アドレス変換テーブルの書き換え方法のフローチャートである。
ホスト装置102は、記憶装置101のホストインタフェース部112に、データの消去指令と消去するデータの論理アドレスとを伝送する。ホストインタフェース部112は、データの消去指令と消去するデータの論理アドレスとを入力する(ステップ601)。
本発明において、論理アドレスはセグメント毎に設定されている。記憶制御部114は、ホスト装置102が指定した論理アドレスに基づいて、記憶部111内のセグメント201を特定する(ステップ602)。
【0041】
記憶制御部114は、ホスト装置102が指定した論理アドレスを含む論理アドレス/物理アドレス変換テーブル311がバッファメモリ113に有るか否か判断する。バッファメモリ113に論理アドレス/物理アドレス変換テーブル311が有れば、ステップ604に進む。
バッファメモリ113に論理アドレス/物理アドレス変換テーブル311が無ければ、テーブル制御部115は、ステップ602で特定したセグメント201のテーブル領域301を検索する。第1のフラグが有効(=01)である論理アドレス/物理アドレス変換テーブルを読み出して、指定された論理アドレスを含む論理アドレス/物理アドレス変換テーブルを検出する(ステップ603)。
【0042】
テーブル制御部115は、論理アドレス/物理アドレス変換テーブル311に基づいて、ホスト装置102が指定した論理アドレスに対応する物理アドレスを特定する(ステップ604)。
記憶制御部114は、その物理アドレスの物理ブロックを消去する(ステップ605)。実際にその物理ブロックを消去して、消去済みテーブルに登録しても良いし、その物理ブロックが無効か否かを示すフラグに無効を示す値を設定し、無効テーブルにその物理ブロックを登録してもよい。
【0043】
テーブル制御部115は、ステップ602で特定したセグメント201のテーブル領域301を検索し、第1のフラグが消去済み(=11)のテーブル(物理ブロック)を検出する。論理アドレス/物理アドレス変換テーブル311を新規に作成し、第1のフラグに有効(=01)を設定する(ステップ606)。
論理アドレス/物理アドレス変換テーブル311を新規に作成する場合、ホスト装置102が消去指令した論理アドレスに対応する物理アドレスは未書き込みとする。変更した物理ブロック以外の部分は変更がないため、旧論理アドレス/物理アドレス変換テーブル(ステップ603で検出した論理アドレス/物理アドレス変換テーブル)の内容を保持する必要がある。旧論理アドレス/物理アドレス変換テーブルから論理アドレスと物理アドレスとを読み出して、新論理アドレス/物理アドレス変換テーブルにそのまま書き込む。
旧論理アドレス/物理アドレス変換テーブルの第1のフラグに無効(=00)を設定する(ステップ607)。
【0044】
《実施例2》
図1、図2及び図7〜10を用いて、実施例2の記憶装置を説明する。図1及び図2は、実施例1と同一である。
図7は実施例2のセグメントの構成を示す図である。実施例2において、セグメント201はテーブル領域301とデータ領域302とに区分される。テーブル領域301は、インデックステーブル711を格納するための専用の領域である。データ領域302は、論理アドレス/物理アドレス変換テーブル311と、ホスト装置102から伝送されたデータとを書き込むための領域である。
実施例2において実施例1と違うところは、テーブル領域301にインデックステーブル711を格納し、データ領域302に論理アドレス/物理アドレス変換テーブル311を格納することである。それ以外の点において、実施例1と同一である。
【0045】
テーブル領域301は、少なくとも1つのインデックステーブル711を格納する。実施例においては、テーブル領域301は、任意に分散して配置された複数のインデックステーブル711を有する。インデックステーブル711は、論理アドレス/物理アドレス変換テーブル311が格納されている物理ブロックのアドレスと、その論理アドレス/物理アドレス変換テーブル311がサポートする論理アドレス(ホスト装置102から指定される。)の範囲を特定する情報(実施例においては、論理アドレス/物理アドレス変換テーブル311がサポートする論理アドレスの範囲の先頭の論理アドレス)と、を有する。
インデックステーブル711が論理アドレス/物理アドレス変換テーブル311の物理アドレスを管理することにより、論理アドレス/物理アドレス変換テーブル311をデータ領域302に格納することができる。
【0046】
インデックステーブル711及び論理アドレス/物理アドレス変換テーブル311は、そのテーブルが有効か無効か又は消去済みかを示す(インデックステーブル711及び論理アドレス/物理アドレス変換テーブル311が存在する条件においては、それが有効か無効かを示す)第1のフラグ321(本発明においては2ビット。)を有する。
第1のフラグ=11の場合、テーブルが消去済み(未書き込み)であることを示す。
第1のフラグ=01の場合、テーブルが有効であることを示す。
第1のフラグ=00の場合、テーブルが無効(有効でない。かつ未消去。)であることを示す。
【0047】
実施例2において、1つの論理アドレス/物理アドレス変換テーブル311及び1つのインデックステーブル711は、それぞれデータの消去単位である1物理ブロックで構成する。これにより、テーブルの書き換えに必要な物理ブロック数を最小限の1物理ブロックにすることができる。
【0048】
1つの論理アドレス/物理アドレス変換テーブル311はp個(pは任意の正整数。1物理ブロックで格納可能な数。)の論理アドレスとそれに対応する物理アドレスとを有する。1つのインデックステーブル711は、q個(qは任意の正整数。1物理ブロックで格納可能な数。q=pであっても良い。)の論理アドレス/物理アドレス変換テーブル311のアドレス情報を有する。本発明において、セグメント201に割り当てられる論理アドレスがr個(rは任意の正整数。)とする。
実施例1の場合、テーブル領域301が格納するテーブル数(第1のフラグが有効を示すテーブル数)は、r/pである。実施例2の場合、テーブル領域301が格納するテーブル数(第1のフラグが有効を示すテーブル数)は、r/(p×q)である。従って、実施例2のテーブル領域301が格納するテーブル数は、実施例1の1/p倍である。
【0049】
記憶装置101の電源投入後、記憶制御部114は記憶部111の各セグメント201のテーブル領域301を検索し、第1のフラグが有効(=01)である複数のインデックステーブル711をバッファメモリ113に読み出す。バッファメモリ113に格納できる容量に応じて、所定数のインデックステーブル711を読み出す。
本発明の記憶部111はインデックステーブル711を読み出すのに、テーブル領域301のみを検索すればよい。更に、実施例1と比較して、テーブル領域301が格納するテーブル数(=物理ブロック数)が少ないので、テーブル領域301の大きさを小さく出来る。記憶部111は小さなテーブル領域301を検索すれば良いので、記憶装置101の起動時の立ち上がりが早い。
起動時に、インデックステーブル711に基づいて、所定数の論理アドレス/物理アドレス変換テーブル311をバッファメモリ113に読み出してもよい。
【0050】
不揮発性メモリ(記憶部111)のデータ領域302の物理ブロック202は、その物理ブロックが有効か無効か又は消去済みかを示すフラグを有する。記憶装置101は電源投入後に、物理ブロック202が有するフラグを読み出して、消去済みテーブル及び無効テーブルをバッファメモリ113に生成する(図示していない)。消去済みテーブルは、物理ブロック202が消去済みか否かを示すテーブルである。無効テーブルは、物理ブロック202が無効か否かを示すテーブルである。
不揮発性メモリ(記憶部111)の物理ブロックを消去する場合、不要になった物理ブロックをその場で消去する場合と、そのデータが無効であるか否かを示すフラグを無効を示す値にセットしておき、別タイミングで消去する場合がある。
本発明において、論理アドレスに対応する物理アドレスは、セグメント内で割り当てるため、消去済みテーブルをセグメント単位で構成する。
【0051】
実施例2において、論理アドレス/物理アドレス変換テーブル311は1物理ブロックで構成され、データ領域302に格納される。論理アドレス/物理アドレス変換テーブル311を書き換える場合、通常のデータを物理ブロックに書き込む時と同様に、消去済みテーブルに基づいてデータ領域内の空き物理ブロックを検出し、その空き物理ブロックに新たな論理アドレス/物理アドレス変換テーブル311を書き込む。
論理アドレス/物理アドレス変換テーブル311の第1のフラグが消去済みであれば消去済みテーブルに登録し、第1のフラグが無効であれば無効テーブルに登録する。
【0052】
図8を用いて、データの書き込みが発生した時のインデックステーブル711及び論理アドレス/物理アドレス変換テーブル311の書き換え方法を説明する。図8は、実施例2のデータ書き込み発生時のインデックステーブル及び論理アドレス/物理アドレス変換テーブルの書き換え方法のフローチャートである。
ホスト装置102は、記憶装置101のホストインタフェース部112に、データの書き込み指令と書き込むデータと書き込み先の論理アドレスとを伝送する。ホストインタフェース部112は、データの書き込み指令と書き込むデータと論理アドレスとを入力する(ステップ401)。ホストインタフェース部112は、書き込むデータをバッファメモリ113に一時的に格納する。
【0053】
本発明において、論理アドレスはセグメント毎に設定されている。記憶制御部114は、ホスト装置102が指定した論理アドレスに基づいて、記憶部111内のデータを書き込むセグメント201を特定する(ステップ402)。
記憶制御部114は、消去済みテーブル(セグメント単位で構成される。)に基づいて、特定したセグメント201のデータ領域302内の空き物理ブロックを検出する。記憶制御部114は、バッファメモリ113に一時的に格納した書き込むデータを取り出して、検出した空き物理ブロックにそのデータを書き込む(ステップ403)。
【0054】
記憶制御部114は、ホスト装置102が指定した論理アドレスを含む論理アドレス/物理アドレス変換テーブル311がバッファメモリ113に有るか否か判断する(ステップ801)。バッファメモリ113に論理アドレス/物理アドレス変換テーブル311が有れば、ステップ405に進む。
バッファメモリ113に論理アドレス/物理アドレス変換テーブル311が無ければ、テーブル制御部115は、ステップ402で特定したセグメント201のテーブル領域301を検索する。第1のフラグが有効(=01)であるインデックステーブル711を読み出して、指定された論理アドレスに該当するインデックステーブル711を検出する(ステップ802)。インデックステーブル711に基づいて、指定された論理アドレスを含む論理アドレス/物理アドレス変換テーブル311を検出する(ステップ803)。
【0055】
ステップ405において、テーブル制御部115は、論理アドレス/物理アドレス変換テーブル311に基づいて、ホスト装置102が指定した論理アドレスに対応する旧物理アドレスが有るか否か判断する。旧物理アドレスがなければ、論理アドレス/物理アドレス変換テーブル311にデータを書き込んだ物理アドレスを登録し(ステップ406)、処理を終了する。
【0056】
旧物理アドレスが有る場合、旧物理ブロックを消去する(ステップ407)。実際にその物理ブロックを消去して、消去済みテーブルに登録しても良いし、その物理ブロックが無効か否かを示すフラグに無効を示す値を設定し、無効テーブルにその物理ブロックを登録してもよい。
【0057】
記憶制御部114は、消去済みテーブル(セグメント単位で構成される。)に基づいて、特定したセグメント201のデータ領域302内の空き物理ブロックを検出する。テーブル制御部115は、論理アドレス/物理アドレス変換テーブル311を新規に作成し、第1のフラグに有効(=01)を設定する(ステップ804)。
論理アドレス/物理アドレス変換テーブル311を新規に作成する場合、ホスト装置102が指定した論理アドレスに対応する物理アドレスを、ステップ403でデータを書き込んだ物理アドレスに設定する。変更した物理アドレス以外の部分は変更がないため、旧論理アドレス/物理アドレス変換テーブル(ステップ803で検出した論理アドレス/物理アドレス変換テーブル)の内容を保持する必要がある。旧論理アドレス/物理アドレス変換テーブルから論理アドレスと物理アドレスとを読み出して、新論理アドレス/物理アドレス変換テーブルにそのまま書き込む。
旧論理アドレス/物理アドレス変換テーブルの第1のフラグに無効(=00)を設定する(ステップ805)。
【0058】
テーブル制御部115は、ステップ402で特定したセグメント201のテーブル領域301を検索し、第1のフラグが消去済み(=11)のテーブル(物理ブロック)を検出する。インデックステーブル711を新規に作成し、第1のフラグに有効(=01)を設定する(ステップ806)。
インデックステーブル711を新規に作成する場合、ステップ804で新規作成した論理アドレス/物理アドレス変換テーブル311の物理アドレスを登録する。それ以外の部分は変更がないため、旧インデックステーブル(ステップ802で検出したインデックステーブル)の内容を保持する必要がある。旧インデックステーブルから論理アドレス/物理アドレス変換テーブル311の物理アドレスを読み出して、新インデックステーブルにそのまま書き込む。
旧インデックステーブルの第1のフラグに無効(=00)を設定する(ステップ807)。
【0059】
図9を用いて、データの読み出し方法を説明する。図9は、実施例2のデータの読み出し方法のフローチャートである。
ホスト装置102は、記憶装置101のホストインタフェース部112に、データの読み出し指令と読み出すデータの論理アドレスとを伝送する。ホストインタフェース部112は、データの読み出し指令と読み出すデータの論理アドレスとを入力する(ステップ501)。
本発明において、論理アドレスはセグメント毎に設定されている。記憶制御部114は、ホスト装置102が指定した論理アドレスに基づいて、記憶部111内のセグメントを特定する(ステップ502)。
【0060】
記憶制御部114は、ホスト装置102が指定した論理アドレスを含む論理アドレス/物理アドレス変換テーブル311がバッファメモリ113に有るか否か判断する(ステップ901)。バッファメモリ113に論理アドレス/物理アドレス変換テーブル311が有れば、ステップ504に進む。
バッファメモリ113に論理アドレス/物理アドレス変換テーブル311が無ければ、テーブル制御部115は、ステップ502で特定したセグメント201のテーブル領域301を検索する。第1のフラグが有効(=01)であるインデックステーブル711を読み出して、指定された論理アドレスに該当するインデックステーブル711を検出する(ステップ902)。インデックステーブル711に基づいて、指定された論理アドレスを含む論理アドレス/物理アドレス変換テーブル311を検出する(ステップ903)。
【0061】
ステップ504において、論理アドレス/物理アドレス変換テーブル311に基づいて、ホスト装置102が指定した論理アドレスに対応する物理アドレスを特定する。
記憶制御部114は、その物理アドレスのデータを読み出して(ステップ505)、バッファメモリ113に格納する。ホストインタフェース部112は、バッファメモリ113に格納された読み出しデータをホスト装置102に伝送する。
【0062】
図10を用いて、データの消去が発生した時のインデックステーブル711及び論理アドレス/物理アドレス変換テーブル311の書き換え方法を説明する。図10は、実施例2のデータの消去時のインデックステーブル及び論理アドレス/物理アドレス変換テーブルの書き換え方法のフローチャートである。
ホスト装置102は、記憶装置101のホストインタフェース部112に、データの消去指令と消去するデータの論理アドレスとを伝送する。ホストインタフェース部112は、データの消去指令と消去するデータの論理アドレスとを入力する(ステップ601)。
本発明において、論理アドレスはセグメント毎に設定されている。記憶制御部114は、ホスト装置102が指定した論理アドレスに基づいて、記憶部111内のセグメント201を特定する(ステップ602)。
【0063】
記憶制御部114は、ホスト装置102が指定した論理アドレスを含む論理アドレス/物理アドレス変換テーブル311がバッファメモリ113に有るか否か判断する(ステップ1001)。バッファメモリ113に論理アドレス/物理アドレス変換テーブル311が有れば、ステップ604に進む。
バッファメモリ113に論理アドレス/物理アドレス変換テーブル311が無ければ、テーブル制御部115は、特定したセグメント201のテーブル領域301を検索する。第1のフラグが有効(=01)であるインデックステーブル711を読み出して、指定された論理アドレスに該当するインデックステーブル711を検出する(ステップ1002)。インデックステーブル711に基づいて、指定された論理アドレスを含む論理アドレス/物理アドレス変換テーブル311を検出する(ステップ1003)。
【0064】
ステップ604において、テーブル制御部115は、論理アドレス/物理アドレス変換テーブル311に基づいて、ホスト装置102が指定した論理アドレスに対応する物理アドレスを特定する。
記憶制御部114は、その物理アドレスの物理ブロックを消去する(ステップ605)。実際にその物理ブロックを消去して、消去済みテーブルに登録しても良いし、その物理ブロックが無効か否かを示すフラグに無効を示す値を設定し、無効テーブルにその物理ブロックを登録してもよい。
【0065】
記憶制御部114は、消去済みテーブル(セグメント単位で構成される。)に基づいて、特定したセグメント201のデータ領域302内の空き物理ブロックを検出する。テーブル制御部115は、論理アドレス/物理アドレス変換テーブル311を新規に作成し、第1のフラグに有効(=01)を設定する(ステップ1004)。
論理アドレス/物理アドレス変換テーブル311を新規に作成する場合、ホスト装置102が消去指令した論理アドレスに対応する物理アドレスは未書き込みとする。それ以外の部分は変更がないため、旧論理アドレス/物理アドレス変換テーブル(ステップ1003で検出した論理アドレス/物理アドレス変換テーブル)の内容を保持する必要がある。旧論理アドレス/物理アドレス変換テーブルから論理アドレスと物理アドレスとを読み出して、新論理アドレス/物理アドレス変換テーブルにそのまま書き込む。
旧論理アドレス/物理アドレス変換テーブルの第1のフラグに無効(=00)を設定する(ステップ1005)。
【0066】
テーブル制御部115は、ステップ602で特定したセグメント201のテーブル領域301を検索し、第1のフラグが消去済み(=11)のテーブル(物理ブロック)を検出する。インデックステーブル711を新規に作成し、第1のフラグに有効(=01)を設定する(ステップ1006)。
インデックステーブル711を新規に作成する場合、ステップ1004で新規作成した論理アドレス/物理アドレス変換テーブル311の物理アドレスを登録する。それ以外の部分は変更がないため、旧インデックステーブル(ステップ1002で検出したインデックステーブル)の内容を保持する必要がある。旧インデックステーブルから論理アドレス/物理アドレス変換テーブル311の物理アドレスを読み出して、新インデックステーブルにそのまま書き込む。
旧インデックステーブルの第1のフラグに無効(=00)を設定する(ステップ1007)。
【0067】
《実施例3》
図1、図2、図11及び図12を用いて、実施例3の記憶装置を説明する。図1及び図2は、実施例1及び実施例2と同一である。
図11は実施例3のセグメントの構成を示す図である。実施例3において、セグメント201はテーブル領域301とデータ領域302とに区分される。テーブル領域301は、インデックステーブル711を格納するための専用の領域である。データ領域302は、論理アドレス/物理アドレス変換テーブル1111と、ホスト装置102から伝送されたデータとを書き込むための領域である。
1つの論理アドレス/物理アドレス変換テーブル及び1つのインデックステーブルは、それぞれデータの消去単位である1物理ブロックで構成する。
【0068】
論理アドレス/物理アドレス変換テーブル1111は、第1のフラグと、複数の論理アドレス及びその論理アドレスに対応する物理アドレスとを有する。実施例3において実施例2と違うところは、実施例3の論理アドレス/物理アドレス変換テーブル1111は他の論理アドレス/物理アドレス変換テーブルのアドレス情報と、そのアドレス情報(リンク情報)に1対1で対応する第2のフラグとを有することである。インデックステーブル711内の1つの論理アドレスに対応付けられた物理アドレスを起点として、チェーン状にリンクされた複数(実施例においては8個)の論理アドレス/物理アドレス変換テーブル1111を芋づる式に特定することができる。インデックステーブル711内の各論理アドレスに対応付けられた物理アドレスは、リンクされた複数の論理アドレス/物理アドレス変換テーブル1111の中の先頭の論理アドレス/物理アドレス変換テーブル1111が格納されている物理アドレスをそれぞれ指定する。それ以外の点において、実施例2と同一である。
【0069】
第2のフラグ1121(本発明においては2ビット。)は、リンク情報(その論理アドレス/物理アドレス変換テーブルにチェーン状にリンクされた他の論理アドレス/物理アドレス変換テーブルの物理アドレスの情報)が有効か無効か又は消去済みか(他の論理アドレス/物理アドレス変換テーブルの物理アドレスの情報が存在する条件においては、それが有効か無効か)を示す。
第2のフラグ=11の場合、リンク情報が消去済み(その論理アドレス/物理アドレス変換テーブルにリンクする他の論理アドレス/物理アドレス変換テーブルは無い)ことを示す。
第2のフラグ=01の場合、リンク情報が有効であることを示す。
第2のフラグ=00の場合、リンク情報が無効であることを示す。
リンクの終端である論理アドレス/物理アドレス変換テーブルは、次のリンク先の論理アドレス/物理アドレス変換テーブルのアドレス情報を有しない。この場合、第2のフラグは消去済み(=11)を示す。
【0070】
実施例3において、論理アドレス/物理アドレス変換テーブル1111はリンク情報とそれに対応する第2のフラグとを書き込む領域を複数(実施例においては8個)有する。リンク情報を書き換える時に、論理アドレス/物理アドレス変換テーブル1111全体を空き物理ブロックに書き換える必要がない。第2のフラグを無効(=00)に設定して、新リンク先を同一物理ブロック内の次の領域に書き込み、それに対応する第2のフラグに有効(=01)を設定するだけで、リンク情報を容易に書き換えることができる。
リンク情報に対応する第2のフラグがすべて無効に設定されて、新たなリンク情報を格納する領域がない場合、及びその論理アドレス/物理アドレス変換テーブル1111の中の物理アドレスを書き換える場合にのみ、空き物理ブロックに論理アドレス/物理アドレス変換テーブル1111を書き換える。
【0071】
実施例2においては、論理アドレス/物理アドレス変換テーブル311を書き換える度に、インデックステーブル711を書き換える必要があった。実施例3においては、論理アドレス/物理アドレス変換テーブル1111がリンク情報と第2のフラグとを有することにより、インデックステーブル711の書き換え回数を減らすことができる。
【0072】
図12を用いて、データの書き込みが発生した時の論理アドレス/物理アドレス変換テーブル1111の書き換え方法を説明する。図12は、実施例3のデータ書き込み発生時の論理アドレス/物理アドレス変換テーブルの書き換え方法のフローチャートである。
ホスト装置102は、記憶装置101のホストインタフェース部112に、データの書き込み指令と書き込むデータと書き込み先の論理アドレスとを伝送する。ホストインタフェース部112は、データの書き込み指令と書き込むデータと論理アドレスとを入力する(ステップ401)。ホストインタフェース部112は、書き込むデータをバッファメモリ113に一時的に格納する。
【0073】
本発明において、論理アドレスはセグメント毎に設定されている。記憶制御部114は、ホスト装置102が指定した論理アドレスに基づいて、記憶部111内のデータを書き込むセグメント201を特定する(ステップ402)。
記憶制御部114は、消去済みテーブル(セグメント単位で構成される。)に基づいて、特定したセグメント201のデータ領域302内の空き物理ブロックを検出する。記憶制御部114は、バッファメモリ113に一時的に格納した書き込むデータを取り出して、検出した空き物理ブロックにそのデータを書き込む(ステップ403)。
【0074】
記憶制御部114は、ホスト装置102が指定した論理アドレスを含む論理アドレス/物理アドレス変換テーブル1111がバッファメモリ113に有るか否か判断する(ステップ1201)。バッファメモリ113に論理アドレス/物理アドレス変換テーブル1111が有れば、ステップ405に進む。
バッファメモリ113に論理アドレス/物理アドレス変換テーブル1111が無ければ、テーブル制御部115は、ステップ402で特定したセグメント201のテーブル領域301を検索する。第1のフラグが有効(=01)であるインデックステーブル711を読み出して、指定された論理アドレスに該当するインデックステーブル711を検出する(ステップ1202)。インデックステーブル711に基づいて、リンクされた複数の論理アドレス/物理アドレス変換テーブル1111の中の先頭の論理アドレス/物理アドレス変換テーブル1111を検出する(ステップ1203)。
【0075】
テーブル制御部115は、検出した論理アドレス/物理アドレス変換テーブル1111がホスト装置102の指定した論理アドレスを含むか否か判断する(ステップ1204)。指定された論理アドレスを含む場合、ステップ405に進む。
指定された論理アドレスを含まない場合、第2のフラグが有効(=01)を示す、他の論理アドレス/物理アドレス変換テーブルを検出して(ステップ1205)、ステップ1204に戻る。指定された論理アドレスを含む論理アドレス/物理アドレス変換テーブルを検出するまで、リンクを順にたどって行く。
【0076】
テーブル制御部115は、論理アドレス/物理アドレス変換テーブル1111に基づいて、ホスト装置102が指定した論理アドレスに対応する旧物理アドレスが有るか否か判断する(ステップ405)。旧物理アドレスがなければ、論理アドレス/物理アドレス変換テーブル1111にデータを書き込んだ物理アドレスを登録し(ステップ406)、処理を終了する。
【0077】
旧物理アドレスが有る場合、旧物理ブロックを消去する(ステップ407)。記憶制御部114は、消去済みテーブル(セグメント単位で構成される。)に基づいて、特定したセグメント201のデータ領域302内の空き物理ブロックを検出する。論理アドレス/物理アドレス変換テーブル1111を新規に作成し、第1のフラグに有効(=01)を設定する(ステップ1206)。
論理アドレス/物理アドレス変換テーブル1111を新規に作成する場合、ホスト装置102が指定した論理アドレスに対応する物理アドレスを、ステップ403でデータを書き込んだ物理アドレスに設定する。それ以外の部分は変更がないため、旧論理アドレス/物理アドレス変換テーブルの内容を保持する必要がある。旧論理アドレス/物理アドレス変換テーブルから論理アドレスと物理アドレスと、第2のフラグが有効を示す他の論理アドレス/物理アドレス変換テーブルのアドレス情報とを読み出して、新論理アドレス/物理アドレス変換テーブルに書き込む。
旧論理アドレス/物理アドレス変換テーブルの第1のフラグに無効(=00)を設定する(ステップ1207)。
【0078】
記憶制御部114は、インデックステーブル711が旧論理アドレス/物理アドレス変換テーブルの物理アドレスを含むか否か判断する(ステップ1208)。
インデックステーブル711が旧論理アドレス/物理アドレス変換テーブルの物理アドレスを含む場合(旧論理アドレス/物理アドレス変換テーブルが、リンクされた複数の論理アドレス/物理アドレス変換テーブル1111の中の先頭の論理アドレス/物理アドレス変換テーブルである場合)、新たにインデックステーブルを生成し、新論理アドレス/物理アドレス変換テーブルの物理アドレスを登録する(ステップ806)。旧インデックステーブルを無効にする(ステップ807)。
【0079】
インデックステーブル711が旧論理アドレス/物理アドレス変換テーブルの物理アドレスを含まない場合、インデックステーブル711を変更する必要はない。その場合、ステップ1203で検出した旧論理アドレス/物理アドレス変換テーブルの物理アドレスを次のリンク先に指定していた論理アドレス/物理アドレス変換テーブルのリンク情報を変更する。リンク先を旧論理アドレス/物理アドレス変換テーブルの物理アドレスから、ステップ1206で作成した新論理アドレス/物理アドレス変換テーブルの物理アドレスに変更する(ステップ1209)。具体的には、旧論理アドレス/物理アドレス変換テーブルの物理アドレスに対応する第2のフラグを無効(=00)に設定する。新論理アドレス/物理アドレス変換テーブルの物理アドレスを登録し、新論理アドレス/物理アドレス変換テーブルの物理アドレスに対応する第2のフラグを有効(=01)に設定する。
新物理アドレスを書き込む領域がない場合(第2のフラグが全て無効に設定されている場合)は、消去済みテーブルに基づいて、空き物理ブロックを検出する。その空き物理ブロックに、論理アドレス/物理アドレス変換テーブルを書き換えて、新論理アドレス/物理アドレス変換テーブルの物理アドレスを登録する。
【0080】
第2のフラグが全て消去済み(=11)の場合、論理アドレス/物理アドレス変換テーブル1111が次のリンク先の論理アドレス/物理アドレス変換テーブルのアドレス情報を有しないと判断した。これに代えて、論理アドレス/物理アドレス変換テーブル1111が次のリンク先の論理アドレス/物理アドレス変換テーブルのアドレス情報を有しない場合、リンクの終端であることを示す特別な値(例えば、FFFFF)を次のアドレス欄に書き込み、且つそれに対応する第2のフラグを有効(=01)に設定してもよい。
【0081】
実施例2及び実施例3において、インデックステーブル711は、1つの論理アドレス/物理アドレス変換テーブルのアドレス情報を複数個格納する領域と、そのアドレス情報に1対1で対応する第2のフラグとを有することとしても良い。
第2のフラグ(例えば2ビット。)は、インデックステーブルが有する複数の論理アドレス/物理アドレス変換テーブルの物理アドレスがそれぞれ有効か無効か又は消去済みかを示す(論理アドレス/物理アドレス変換テーブルの物理アドレスが存在する条件においては、それが有効か無効かを示す)。
アドレス情報を書き換える時に、インデックステーブル711全体を空き物理ブロックに書き換える必要がない。第2のフラグを無効(=00)に設定して、新物理アドレスを書き込み、それに対応する第2のフラグに有効(=01)を設定するだけで、アドレス情報を容易に書き換えることができる。
アドレス情報に対応する第2のフラグがすべて無効に設定された場合のみ、テーブル領域301内の空き物理ブロック(第1のフラグ=消去済み)にインデックステーブル711を書き換える。
【0082】
実施例3において、論理アドレス/物理アドレス変換テーブル1111が有するリンク先のアドレス情報は、次の論理アドレス/物理アドレス変換テーブルのアドレス情報とした。これに代えて、論理アドレス/物理アドレス変換テーブル1111が有するリンク先のアドレス情報を、リンクされた複数個の論理アドレス/物理アドレス変換テーブルのアドレス情報としても良い。また、前にリンクされた論理アドレス/物理アドレス変換テーブルのアドレス情報と、次の論理アドレス/物理アドレス変換テーブルのアドレス情報と両方を保持しても良い。
【0083】
実施例1を変形した実施例として、複数(例えば8個)の論理アドレス/物理アドレス変換テーブル311をリンクしても良い。記憶部は、複数の論理アドレス/物理アドレス変換テーブル311の少なくとも一部をテーブル領域301に分散して格納する。
論理アドレス/物理アドレス変換テーブル311は、その論理アドレス/物理アドレス変換テーブル311が有効か無効かを示す第1のフラグと、複数の論理アドレス及びその論理アドレスに対応する物理アドレスのアドレス情報と、他の論理アドレス/物理アドレス変換テーブル(次の論理アドレス/物理アドレス変換テーブル)のアドレス情報と、そのアドレス情報が有効か無効かを示す第2のフラグとを有する。
テーブル領域に格納された論理アドレス/物理アドレス変換テーブル311を先頭として、他の論理アドレス/物理アドレス変換テーブル311のアドレス情報によって、チェーン状に複数の論理アドレス/物理アドレス変換テーブル311が連結される。
【0084】
論理アドレス/物理アドレス変換テーブル311を書き換える場合、テーブル制御部115は、書き換え部分を含む論理アドレス/物理アドレス変換テーブル311の第1のフラグを無効にして、新たな論理アドレス/物理アドレス変換テーブル311を生成し、無効にされた論理アドレス/物理アドレス変換テーブル311のアドレス情報に対応する第2のフラグを無効にして、生成した論理アドレス/物理アドレス変換テーブル311のアドレス情報を新たな他の論理アドレス/物理アドレス変換テーブル311のアドレス情報として書き込み、それに対応する第2のフラグを有効にする。
好ましくは、チェーン状に連結された複数の論理アドレス/物理アドレス変換テーブル311の中で、先頭の論理アドレス/物理アドレス変換テーブル311はテーブル領域301に格納され、それ以外の論理アドレス/物理アドレス変換テーブル311は、データ領域302に格納される。
【0085】
起動時、記憶制御部114は、テーブル領域のみを検索してリンクされた複数の論理アドレス/物理アドレス変換テーブルの中の先頭の論理アドレス/物理アドレス変換テーブルを検出し、この先頭の論理アドレス/物理アドレス変換テーブルに基づいて芋づる式にデータ領域に格納された論理アドレス/物理アドレス変換テーブルを検出することができる。
【0086】
実施例2及び実施例3を変形した実施例として、複数(例えば8個)のインデックステーブル711を、実施例3と同様の方法でリンクしても良い。記憶部は、複数のインデックステーブルの少なくとも一部をテーブル領域301に分散して格納する。好ましくは、チェーン状に連結された複数のインデックステーブルの中で、先頭のインデックステーブルはテーブル領域301に格納され、それ以外のインデックステーブルは、データ領域302に格納される。
インデックステーブルは、そのインデックステーブルが有効か無効かを示す第1のフラグと、複数の論理アドレス/物理アドレス変換テーブルのアドレス情報と、他のインデックステーブル(次のインデックステーブル)のアドレス情報と、他のインデックステーブルのアドレス情報が有効か無効かを示す第2のフラグと、を有する。
テーブル領域に格納されたインデックステーブルを先頭として、他のインデックステーブルのアドレス情報によって、チェーン状に複数のインデックステーブルが連結される。
【0087】
インデックステーブルを書き換える場合、テーブル制御部115は、書き換え部分を含むインデックステーブルの第1のフラグを無効にして、新たなインデックステーブルを生成し、無効にされたインデックステーブルのアドレス情報に対応する第2のフラグを無効にして、生成したインデックステーブルのアドレス情報を新たな他のインデックステーブルのアドレス情報として書き込み、それに対応する第2のフラグを有効にする。
【0088】
起動時、記憶制御部114は、テーブル領域のみを検索してリンクされた複数のインデックステーブルの中の先頭のインデックステーブルを検出し、この先頭のインデックステーブルに基づいて芋づる式にデータ領域に格納されたインデックステーブル及び論理アドレス/物理アドレス変換テーブルを検出することができる。
【0089】
上記のように、インデックステーブル711が次のインデックステーブルのアドレス情報を保持しても良いし、リンクされた複数個のインデックステーブルのアドレス情報を保持しても良い。また、前にリンクされたインデックステーブルのアドレス情報及び次のインデックステーブルのアドレス情報の両方を保持しても良い。
【0090】
実施例において、記憶部111は複数個のセグメントに分割された。記憶部111を複数個のセグメントに分割しなくても良い。
【0091】
【発明の効果】
本発明によれば、大容量の記憶部でも小さい単位の論理アドレス/物理アドレス変換テーブルを有し、論理アドレス/物理アドレス変換テーブルに割り当てられたテーブル領域において各物理アドレスの書き換え回数が書き換え保証回数を短期間で上回らない記憶装置を実現できるという有利な効果が得られる。
本発明によれば、欠陥不良の物理ブロックの影響を最小限に留めて、小さい単位で論理アドレス/物理アドレス変換テーブルを書き換える記憶装置を実現できるという有利な効果が得られる。
本発明によれば、起動時に立ち上がりの早い記憶装置を実現できるという有利な効果が得られる。
本発明によれば、小さな管理領域を有し、各物理アドレスの書き換え回数が均一になるように広いデータ領域を使用し、特定の物理アドレスの書き換え回数だけが短期間で書き換え保証回数を上回ることがない記憶装置を実現できるという有利な効果が得られる。
本発明によれば、高い信頼性を確保し、大容量化にも円滑に対応可能な記憶装置を実現できるという有利な効果が得られる。
【図面の簡単な説明】
【図1】本発明の記憶装置の構成を示すブロック図
【図2】記憶部111の構成を示す図
【図3】実施例1のセグメントの構成を示す図
【図4】実施例1のデータ書き込み発生時の論理アドレス/物理アドレス変換テーブルの書き換え方法のフローチャート
【図5】実施例1のデータの読み出し方法のフローチャート
【図6】実施例1のデータの消去時の論理アドレス/物理アドレス変換テーブルの書き換え方法のフローチャート
【図7】実施例2のセグメントの構成を示す図
【図8】実施例2のデータ書き込み発生時のインデックステーブル及び論理アドレス/物理アドレス変換テーブルの書き換え方法のフローチャート
【図9】実施例2のデータの読み出し方法のフローチャート
【図10】実施例2のデータの消去時のインデックステーブル及び論理アドレス/物理アドレス変換テーブルの書き換え方法のフローチャート
【図11】実施例3のセグメントの構成を示す図
【図12】実施例3のデータ書き込み発生時の論理アドレス/物理アドレス変換テーブルの書き換え方法のフローチャート
【図13】従来例2の不揮発性メモリの構成を示す図
【符号の説明】
101 記憶装置
102 ホスト装置
111 記憶部
112 ホストインタフェース部
113 バッファメモリ
114 記憶制御部
115 テーブル制御部
201 セグメント
202 物理ブロック
301 テーブル領域
302 データ領域
311、1111 論理アドレス/物理アドレス変換テーブル
321 第1のフラグ
711 インデックステーブル
1121 第2のフラグ
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a storage device.
[0002]
[Prior art]
In recent years, a storage device (for example, a memory card) including a nonvolatile memory (storage unit) such as a flash memory has been used as a storage device of a portable device that handles audio data, video data, and the like. A nonvolatile memory such as a flash memory is characterized in that data can be rewritten, small and large-capacity data can be stored, and data can be retained without a power supply.
[0003]
In a storage device using a nonvolatile memory, an address specified by a host device (called a “logical address”) and an address arranged in the nonvolatile memory (called a “physical address”) are generally used. It does not match. This is because in a non-volatile memory, it is necessary to change a physical address for recording data every time data is rewritten. It is extremely troublesome and difficult for the host device to directly manage the physical address of the nonvolatile memory in which data is recorded. It is necessary to use a physical address where a defect has occurred. In a system in which writing to a specific physical address frequently occurs, the physical address exceeds the guaranteed number of rewrites in a short period of time (generally, the number of guaranteed rewrites of a nonvolatile memory is limited), and the storage device has a short life. , Occurs.
[0004]
Therefore, the storage device generates a logical address / physical address conversion table indicating to which physical address the logical address specified by the host device is allocated. The storage device solves the above problem by using a logical address / physical address conversion table.
Japanese Patent Laying-Open No. 2001-142774 describes a storage device of Conventional Example 1. The nonvolatile memory of the storage device of Conventional Example 1 is divided into a management area and a data area. The non-volatile memory stores one logical address / physical address conversion table in the management area.
[0005]
With reference to FIG. 13, a storage device of Conventional Example 2 having a nonvolatile memory will be described. FIG. 13 shows a configuration of a nonvolatile memory of a storage device of Conventional Example 2. 13, the nonvolatile memory 1301 has a management area 1302 and a data area 1303. A logical address / physical address conversion table (1311-1315) of the nonvolatile memory 1301 is stored in a predetermined area of the management area 1302. The data area 1303 stores arbitrary data (for example, user data). The host device connected to the storage device of Conventional Example 2 transmits a logical address and data to be written to the logical address to the storage device. The storage device writes an unrecorded physical address in the logical address column of the logical address / physical address conversion table. The storage device writes data to a physical address associated with the logical address.
[0006]
When the storage device rewrites data (when a physical address is already associated with the logical address and data is written to the physical address), the current logical address / physical address conversion table is invalidated, A new logical address / physical address conversion table is generated. The storage device writes an unrecorded physical address in the logical address column of the new logical address / physical address conversion table. The storage device writes data to a physical address associated with the logical address.
[0007]
In FIG. 13, 1321 to 1325 are flags (1 is unrecorded, 0 is recorded) indicating whether the logical address / physical address conversion table is unrecorded or recorded. 1331 to 1335 are flags (1 is valid, 0 is invalid) indicating whether the logical address / physical address conversion table is valid or invalid. In FIG. 13, the logical address / physical address conversion table having invalid flags 1331 to 1333 is invalid. The logical address / physical address conversion table 1314 having a flag 1324 indicating that recording has been completed and a flag 1334 indicating validity is currently valid. When the power is turned on, the storage device searches a predetermined area of the management area 1302 from the top to find a valid logical address / physical address conversion table.
[0008]
[Patent Document 1]
JP 2001-142774 A
[0009]
[Problems to be solved by the invention]
In a conventional storage device, even if one physical block becomes defective among a plurality of physical blocks allocated to the storage of the logical address / physical address conversion table, the entire logical address / physical address conversion table is stored. It needed to be rewritten.
In recent years, the size of the logical address / physical address conversion table (the number of physical blocks allocated to the logical address / physical address conversion table) has increased with an increase in the storage capacity of the nonvolatile memory. When the number of physical blocks allocated to the logical address / physical address conversion table increases, the number of physical blocks required for rewriting the logical address / physical address conversion table also increases. The value of (the number of rewrites of the logical address / physical address conversion table × the number of physical blocks allocated to the logical address / physical address conversion table) increases. In other words, when the logical address / physical address conversion table is rewritten a certain number of times, the number of rewrites per physical block increases. Therefore, if writing to the logical address / physical address conversion table frequently occurs, the number of rewrites to the physical block allocated to the logical address / physical address conversion table exceeds the guaranteed number in a short period of time, and the life of the storage device is shortened. There was a problem.
[0010]
When the write destination of the logical address / physical address conversion table is fixed to only the physical block in the management area, the number of times the physical block is actually rewritten in the data area is rewritten when writing to the logical address / physical address conversion table occurs frequently. There is a problem that the number of times physical blocks are actually rewritten in the management area assigned to the logical address / physical address conversion table exceeds the guaranteed number of rewrites, although the number is sufficiently smaller than the guaranteed number of times.
[0011]
The present invention has a logical address / physical address conversion table of a small unit even if the storage unit has a large capacity, and the number of rewrites of each physical address is short in a table area allocated to the logical address / physical address conversion table. It is an object of the present invention to provide a storage device that does not exceed the guaranteed number of rewrites.
An object of the present invention is to provide a storage device that rewrites a logical address / physical address conversion table in small units while minimizing the influence of a physical block having a defective defect.
SUMMARY OF THE INVENTION An object of the present invention is to provide a storage device that starts up quickly at startup.
The present invention has a small management area, uses a wide data area so that the number of rewrites of each physical address is uniform, and only the number of rewrites of a specific physical address does not exceed the guaranteed number of rewrites in a short period of time. It is an object to provide a storage device.
An object of the present invention is to provide a storage device which ensures high reliability and can smoothly cope with an increase in capacity.
[0012]
[Means for Solving the Problems]
In order to solve the above problems, the present invention has the following configurations.
The invention according to claim 1, wherein the storage unit has a table area and a data area, and stores a plurality of logical address / physical address conversion tables in the table area in a distributed manner, and the logical address / physical address conversion table And a table control unit that rewrites only the logical address / physical address conversion table including a rewrite portion when rewriting is performed.
[0013]
The invention according to claim 2 has a table area and a data area, and stores a plurality of index tables each having address information of a plurality of logical address / physical address conversion tables in the table area in a distributed manner. A storage unit for storing at least one of the logical address / physical address conversion tables specified by the index table in the data area, and a logical address including a rewrite part when rewriting the logical address / physical address conversion table And a table control unit that rewrites only the index table having the address information of the / physical address conversion table and the logical address / physical address conversion table.
[0014]
A storage unit having a table area and a data area, wherein at least a part of a plurality of logical address / physical address conversion tables is distributed and stored in the table area, A table control unit for updating a physical address conversion table, wherein the logical address / physical address conversion table includes a first flag indicating whether the table is valid or invalid, a plurality of logical addresses and the logical addresses. It has address information of a corresponding physical address, address information of another logical address / physical address conversion table, and a second flag indicating whether address information of another logical address / physical address conversion table is valid or invalid. , The logical address / physical address conversion table stored in the table area as the head, When the plurality of logical address / physical address conversion tables are connected in a chain according to the address information of the address / physical address conversion table, and the logical address / physical address conversion table is rewritten, the table control unit includes a rewriting portion. Invalidating the first flag of the logical address / physical address conversion table, generating a new logical address / physical address conversion table, and corresponding to the address information of the invalidated logical address / physical address conversion table Invalidates the second flag, writes the generated address information of the logical address / physical address conversion table as new address information of the other logical address / physical address conversion table, and writes the corresponding second flag Enable, that A storage apparatus characterized.
[0015]
According to a fourth aspect of the present invention, in the plurality of logical address / physical address conversion tables connected in a chain, the logical address / physical address conversion table other than the leading logical address / physical address conversion table is: 4. The storage device according to claim 3, wherein all the data are stored in the data area.
[0016]
The logical address / physical address conversion that has a table area and a data area, stores a plurality of index tables in the table area in a distributed manner, and specifies an address in the index table. A storage unit configured to store at least one of the tables in the data area; and a table control unit configured to update the index table and the logical address / physical address conversion table. It has address information of an address / physical address conversion table. The logical address / physical address conversion table has a first flag indicating whether the table is valid or invalid, a plurality of logical addresses and physical addresses corresponding to the logical addresses. Address information of address and other logical address / physical address The logical address / physical address, which has address information of a conversion table and a second flag indicating whether address information of another logical address / physical address conversion table is valid or invalid, and whose address is specified in the index table A case in which a plurality of the logical address / physical address conversion tables are linked in a chain by the address information of the other logical address / physical address conversion table starting from the conversion table, and the logical address / physical address conversion table is rewritten. The table control unit invalidates the first flag of the logical address / physical address conversion table including a rewrite portion, generates a new logical address / physical address conversion table, and generates the invalidated logical address / physical address conversion table. Address / physical address conversion table address The second flag corresponding to the logical address / physical address conversion table is invalidated, the generated address information of the logical address / physical address conversion table is written as new address information of the other logical address / physical address conversion table, and the corresponding address is written. A storage device characterized by enabling a second flag.
[0017]
The invention according to claim 6, wherein the logical address has a table area and a data area, stores at least a part of a plurality of index tables in a distributed manner in the table area, and specifies an address in the index table. A storage unit for storing at least one of a physical / physical address conversion table in the data area; and a table control unit for updating the index table and the logical address / physical address conversion table. A first flag indicating whether the index table is valid or invalid, address information of a plurality of logical address / physical address conversion tables, address information of another index table, and whether address information of another index table is valid And a second flag indicating whether the text is invalid. When the index table stored in the index area is headed and the plurality of index tables are linked in a chain by the address information of the other index table and the index table is rewritten, the table control unit includes Invalidates the first flag of the index table, generates a new index table, and invalidates the second flag corresponding to the address information of the invalidated index table. A storage device, wherein address information of the index table is written as new address information of the other index table, and the second flag corresponding thereto is made valid.
[0018]
The invention according to claim 7, wherein, among the plurality of index tables connected in a chain, the index tables other than the leading index table are stored in the data area. Item 7. The storage device according to item 6.
[0019]
The invention according to claim 8, wherein the logical address / physical address conversion table and the index table are configured by one physical block which is a minimum erasing unit of data. A storage device according to any one of the claims.
[0020]
The invention according to claim 9 is characterized in that the storage unit has a plurality of segments, and has the logical address / physical address conversion table or the index table for each segment. A storage device according to claim 1.
[0021]
The present invention has an effect that it is possible to realize a storage device in which the number of times of rewriting of each physical address in the table area allocated to the logical address / physical address conversion table does not exceed the guaranteed number of times of rewriting in a short period of time.
The present invention has an effect that a storage device that rewrites a logical address / physical address conversion table in small units can be realized while minimizing the influence of a defective physical block.
The present invention has an effect that a storage device that starts up quickly at startup can be realized.
The present invention has an effect that a storage device in which only the number of times of rewriting a specific physical address does not exceed the guaranteed number of times of rewriting in a short period of time can be realized.
The present invention has the effect of realizing a storage device that ensures high reliability and can smoothly cope with an increase in capacity.
[0022]
BEST MODE FOR CARRYING OUT THE INVENTION
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment specifically showing the best mode for carrying out the present invention will be described below with reference to the drawings.
[0023]
<< Example 1 >>
The storage device according to the first embodiment will be described with reference to FIGS. FIG. 1 is a block diagram showing the configuration of the storage device of the present invention. In FIG. 1, 101 is a storage device, and 102 is a host device. The storage device 101 includes a storage unit 111, a host interface unit 112, a buffer memory 113, a storage control unit 114, and a table control unit 115. The storage device 101 is a memory card. The storage unit 111 has a nonvolatile memory (a flash memory in the embodiment). The host device 102 is a portable device having a memory card insertion slot (for example, a music recorder using a memory card as a storage medium).
[0024]
The host device 102 instructs the storage device 101 to write and read data, transmits the write data, and receives the response and the read data sent from the storage device 101.
The host interface unit 112 of the storage device 101 receives the command and the data to be written transmitted from the host device 102, and transmits the response and the read data to the host device 102.
The buffer memory 113 is a RAM for temporarily storing write data and read data. After the power is turned on, the buffer memory 113 stores various tables such as a logical address / physical address conversion table, an erased table, and an invalid table.
The storage control unit 114 writes the data to be written stored in the buffer memory 113 into the storage unit 111, and stores the read data recorded in the storage unit 111 into the buffer memory 113.
The table control unit 115 rewrites the logical address / physical address conversion table based on data writing and erasing.
The storage unit 111 stores data and a logical address / physical address conversion table.
[0025]
FIG. 2 is a diagram showing a configuration of the storage unit 111. In the present invention, the storage unit 111 is divided into a plurality of segments. Each segment is composed of a separate storage element. A segment i (1 ≦ i ≦ n, where n is any positive integer) 201 has a plurality of physical blocks 202. A physical block is a unit for erasing data.
Each segment stores a logical address / physical address conversion table 311. The logical address / physical address conversion table 311 of each segment in the present embodiment stores the physical address (the address of the physical block of the storage unit 111) in the segment in association with the logical address (the address specified by the host device 102). assign.
[0026]
FIG. 3 is a diagram illustrating a configuration of a segment according to the first embodiment. In the first embodiment, the segment 201 is divided into a table area 301 and a data area 302. The table area 301 is a dedicated area for storing the logical address / physical address conversion table 311. The table area 301 stores a plurality of logical address / physical address conversion tables 311 in a distributed manner (each at an arbitrary address). The data area 302 is an area for writing data transmitted from the host device 102.
[0027]
The logical address / physical address conversion table 311 indicates whether the table is valid, invalid, or has been erased (if the logical address / physical address conversion table 311 exists, it indicates whether it is valid or invalid). (321 bits in the embodiment of the present invention).
If the first flag = 11, it indicates that the table has been erased (unwritten).
When the first flag = 01, it indicates that the table is valid.
When the first flag = 00, it indicates that the table is invalid (not valid and has not been deleted).
[0028]
In the first embodiment, each logical address / physical address conversion table 311 is a conversion table for a logical address in a predetermined range assigned to each logical address / physical address conversion table. Construct a logical address conversion table. One logical address / physical address conversion table 311 is stored in one physical block, which is a unit of data erasure. When rewriting each logical address / physical address conversion table 311, the table control unit 115 invalidates the old logical address / physical address conversion table 311 and adds a new logical address / physical address conversion table to any unrecorded physical block. 311 is stored. Thus, the number of physical blocks required for rewriting the logical address / physical address conversion table 311 can be reduced to one physical block. (Number of rewrites × number of physical blocks) in the logical address / physical address conversion table 311 is reduced. In other words, when the logical address / physical address conversion table is rewritten a certain number of times, the number of rewrites per physical block is reduced.
The logical address / physical address conversion table 311 has a number of logical addresses that can be stored in one physical block and corresponding physical addresses.
[0029]
After the power of the storage device 101 is turned on, the storage control unit 114 searches the table area 301 of each segment 201 of the storage unit 111, and stores a plurality of logical address / physical address conversion tables 311 in which the first flag is valid (= 01). Is read out to the buffer memory 113. A predetermined number of logical address / physical address conversion tables 311 are read according to the capacity that can be stored in the buffer memory 113.
In order to read the logical address / physical address conversion table 311, the storage unit 111 of the present invention needs to search only the table area 301. Since the number of rewrites per physical block in the table area 301 is small, the size of the table area 301 can be reduced. At startup, the small table area 301 is searched and the logical address / physical address conversion table 311 may be read into the buffer memory 113. Therefore, the startup of the storage device 101 at startup is quick.
At the time of startup, the detected physical address stored in the logical address / physical address conversion table 311 may be registered in the buffer memory 113, and thereafter, the logical address / physical address conversion table 311 may be read from the physical address.
[0030]
The physical block 202 in the data area 302 of the nonvolatile memory (storage unit 111) has a flag indicating whether the physical block is valid, invalid, or has been erased. After turning on the power, the storage device 101 reads the flag of the physical block 202 and generates an erased table and an invalid table in the buffer memory 113 (not shown). The erased table is a table indicating whether or not the physical block 202 has been erased. The invalid table is a table indicating whether the physical block 202 is invalid.
When erasing a physical block in the nonvolatile memory (storage unit 111), erasing an unnecessary physical block on the spot, and setting a flag indicating whether or not the data is invalid to a value indicating invalidity In some cases, the data may be erased at another timing.
In the present invention, since a physical address corresponding to a logical address is allocated in a segment, an erased table is configured in segment units.
[0031]
A method of rewriting the logical address / physical address conversion table 311 when data writing occurs will be described with reference to FIG. FIG. 4 is a flowchart of a method of rewriting the logical address / physical address conversion table when data writing occurs according to the first embodiment.
The host device 102 transmits a data write command, data to be written, and a write destination logical address to the host interface unit 112 of the storage device 101. The host interface unit 112 inputs a data write command, data to be written, and a logical address (step 401). The host interface unit 112 temporarily stores data to be written in the buffer memory 113.
[0032]
In the present invention, a logical address is set for each segment. The storage control unit 114 specifies the segment 201 to which data in the storage unit 111 is to be written based on the logical address specified by the host device 102 (Step 402).
The storage control unit 114 detects a free physical block in the data area 302 of the specified segment 201 based on the erased table (configured in segment units). The storage control unit 114 extracts the data to be written temporarily stored in the buffer memory 113 and writes the data to the detected free physical block (step 403).
[0033]
The storage control unit 114 determines whether or not the logical address / physical address conversion table 311 including the logical address specified by the host device 102 exists in the buffer memory 113. If there is a logical address / physical address conversion table 311 in the buffer memory 113, the process proceeds to step 405.
If there is no logical address / physical address conversion table 311 in the buffer memory 113, the table control unit 115 searches the table area 301 of the segment 201 specified in step 402. The logical address / physical address conversion table in which the first flag is valid (= 01) is read, and the logical address / physical address conversion table including the specified logical address is detected (step 404).
[0034]
The table control unit 115 determines whether there is an old physical address corresponding to the logical address specified by the host device 102 based on the logical address / physical address conversion table 311 (step 405). If there is no old physical address, the physical address to which the data is written is registered in the logical address / physical address conversion table 311 (step 406), and the process ends.
[0035]
If there is an old physical address, the old physical block is erased (step 407). The physical block may be actually erased and registered in the erased table, or a flag indicating whether or not the physical block is invalid may be set to a value indicating invalid, and the physical block may be registered in the invalid table. You may.
[0036]
The table control unit 115 searches the table area 301 of the segment 201 specified in step 402, and detects a table (physical block) in which the first flag has been deleted (= 11). A new logical address / physical address conversion table 311 is created, and the first flag is set to valid (= 01) (step 408).
When a new logical address / physical address conversion table 311 is created, the physical address corresponding to the logical address specified by the host device 102 is set to the physical address to which the data was written in step 403. Since there is no change other than the changed physical address, it is necessary to hold the contents of the old logical address / physical address conversion table (the logical address / physical address conversion table detected in step 404). The logical address and the physical address are read from the old logical address / physical address conversion table and are written as they are in the new logical address / physical address conversion table.
Invalid (= 00) is set to the first flag of the old logical address / physical address conversion table (step 409).
[0037]
A data reading method will be described with reference to FIG. FIG. 5 is a flowchart of the data reading method according to the first embodiment.
The host device 102 transmits a data read command and a logical address of the data to be read to the host interface unit 112 of the storage device 101. The host interface unit 112 inputs a data read command and a logical address of the data to be read (step 501).
In the present invention, a logical address is set for each segment. The storage control unit 114 specifies a segment in the storage unit 111 based on the logical address specified by the host device 102 (Step 502).
[0038]
The storage control unit 114 determines whether or not the logical address / physical address conversion table 311 including the logical address specified by the host device 102 exists in the buffer memory 113. If there is a logical address / physical address conversion table 311 in the buffer memory 113, the process proceeds to step 504.
If there is no logical address / physical address conversion table 311 in the buffer memory 113, the table control unit 115 searches the table area 301 of the segment 201 specified in step 502. The logical address / physical address conversion table in which the first flag is valid (= 01) is read, and a logical address / physical address conversion table including the specified logical address is detected (step 503).
[0039]
Based on the logical address / physical address conversion table 311, a physical address corresponding to the logical address specified by the host device 102 is specified (Step 504).
The storage control unit 114 reads the data of the physical address (step 505) and stores the data in the buffer memory 113. The host interface unit 112 transmits the read data stored in the buffer memory 113 to the host device 102.
[0040]
A method of rewriting the logical address / physical address conversion table 311 when data is erased will be described with reference to FIG. FIG. 6 is a flowchart of a method of rewriting the logical address / physical address conversion table when erasing data according to the first embodiment.
The host device 102 transmits a data erasure command and a logical address of the data to be erased to the host interface unit 112 of the storage device 101. The host interface unit 112 inputs a data erase command and a logical address of data to be erased (step 601).
In the present invention, a logical address is set for each segment. The storage control unit 114 specifies the segment 201 in the storage unit 111 based on the logical address specified by the host device 102 (Step 602).
[0041]
The storage control unit 114 determines whether or not the logical address / physical address conversion table 311 including the logical address specified by the host device 102 exists in the buffer memory 113. If there is a logical address / physical address conversion table 311 in the buffer memory 113, the process proceeds to step 604.
If there is no logical address / physical address conversion table 311 in the buffer memory 113, the table control unit 115 searches the table area 301 of the segment 201 specified in step 602. The logical address / physical address conversion table in which the first flag is valid (= 01) is read, and a logical address / physical address conversion table including the specified logical address is detected (step 603).
[0042]
The table control unit 115 specifies a physical address corresponding to the logical address specified by the host device 102 based on the logical address / physical address conversion table 311 (step 604).
The storage control unit 114 erases the physical block of the physical address (Step 605). The physical block may be actually erased and registered in the erased table, or a flag indicating whether or not the physical block is invalid may be set to a value indicating invalid, and the physical block may be registered in the invalid table. You may.
[0043]
The table control unit 115 searches the table area 301 of the segment 201 specified in step 602, and detects a table (physical block) in which the first flag has been deleted (= 11). A new logical address / physical address conversion table 311 is created, and the first flag is set to valid (= 01) (step 606).
When a new logical address / physical address conversion table 311 is created, the physical address corresponding to the logical address for which the host device 102 has issued the erase command is not written. Since there is no change other than the changed physical block, it is necessary to hold the contents of the old logical address / physical address conversion table (the logical address / physical address conversion table detected in step 603). The logical address and the physical address are read from the old logical address / physical address conversion table and are written as they are in the new logical address / physical address conversion table.
Invalid (= 00) is set to the first flag of the old logical address / physical address conversion table (step 607).
[0044]
<< Example 2 >>
The storage device according to the second embodiment will be described with reference to FIGS. 1, 2, and 7 to 10. 1 and 2 are the same as in the first embodiment.
FIG. 7 is a diagram illustrating a configuration of a segment according to the second embodiment. In the second embodiment, the segment 201 is divided into a table area 301 and a data area 302. The table area 301 is a dedicated area for storing the index table 711. The data area 302 is an area for writing the logical address / physical address conversion table 311 and the data transmitted from the host device 102.
The second embodiment is different from the first embodiment in that an index table 711 is stored in a table area 301 and a logical address / physical address conversion table 311 is stored in a data area 302. The other points are the same as the first embodiment.
[0045]
The table area 301 stores at least one index table 711. In the embodiment, the table area 301 has a plurality of index tables 711 arbitrarily distributed. The index table 711 includes an address of a physical block in which the logical address / physical address conversion table 311 is stored and a range of logical addresses (specified by the host device 102) supported by the logical address / physical address conversion table 311. (In the embodiment, the first logical address in the range of the logical address supported by the logical address / physical address conversion table 311).
The index table 711 manages the physical address of the logical address / physical address conversion table 311, so that the logical address / physical address conversion table 311 can be stored in the data area 302.
[0046]
The index table 711 and the logical address / physical address conversion table 311 indicate whether the table is valid, invalid, or deleted (under the condition that the index table 711 and the logical address / physical address conversion table 311 exist, they are valid). Or invalid) 1st flag 321 (2 bits in the present invention).
If the first flag = 11, it indicates that the table has been erased (unwritten).
When the first flag = 01, it indicates that the table is valid.
When the first flag = 00, it indicates that the table is invalid (not valid and has not been erased).
[0047]
In the second embodiment, one logical address / physical address conversion table 311 and one index table 711 are each composed of one physical block, which is a data erase unit. This makes it possible to reduce the number of physical blocks required for rewriting the table to a minimum of one physical block.
[0048]
One logical address / physical address conversion table 311 has p (p is an arbitrary positive integer; a number that can be stored in one physical block) logical addresses and corresponding physical addresses. One index table 711 has q (q is an arbitrary positive integer; a number that can be stored in one physical block; q = p) address information of the logical address / physical address conversion table 311. . In the present invention, the number of logical addresses assigned to the segment 201 is r (r is an arbitrary positive integer).
In the case of the first embodiment, the number of tables stored in the table area 301 (the number of tables for which the first flag indicates validity) is r / p. In the case of the second embodiment, the number of tables stored in the table area 301 (the number of tables for which the first flag indicates validity) is r / (p × q). Therefore, the number of tables stored in the table area 301 of the second embodiment is 1 / p times that of the first embodiment.
[0049]
After the power of the storage device 101 is turned on, the storage control unit 114 searches the table area 301 of each segment 201 of the storage unit 111, and stores a plurality of index tables 711 in which the first flag is valid (= 01) in the buffer memory 113. read out. A predetermined number of index tables 711 are read according to the capacity that can be stored in the buffer memory 113.
The storage unit 111 of the present invention needs to search only the table area 301 to read the index table 711. Furthermore, compared to the first embodiment, the number of tables (= the number of physical blocks) stored in the table area 301 is small, so that the size of the table area 301 can be reduced. Since the storage unit 111 only needs to search the small table area 301, the startup of the storage device 101 at the time of startup is quick.
At startup, a predetermined number of logical address / physical address conversion tables 311 may be read into the buffer memory 113 based on the index table 711.
[0050]
The physical block 202 in the data area 302 of the nonvolatile memory (storage unit 111) has a flag indicating whether the physical block is valid, invalid, or has been erased. After turning on the power, the storage device 101 reads the flag of the physical block 202 and generates an erased table and an invalid table in the buffer memory 113 (not shown). The erased table is a table indicating whether or not the physical block 202 has been erased. The invalid table is a table indicating whether the physical block 202 is invalid.
When erasing a physical block in the nonvolatile memory (storage unit 111), erasing an unnecessary physical block on the spot, and setting a flag indicating whether or not the data is invalid to a value indicating invalidity In some cases, the data may be erased at another timing.
In the present invention, since a physical address corresponding to a logical address is allocated in a segment, an erased table is configured in segment units.
[0051]
In the second embodiment, the logical address / physical address conversion table 311 is composed of one physical block, and is stored in the data area 302. When rewriting the logical address / physical address conversion table 311, a free physical block in the data area is detected based on the erased table and a new logical The address / physical address conversion table 311 is written.
If the first flag of the logical address / physical address conversion table 311 has been erased, it is registered in the erased table, and if the first flag is invalid, it is registered in the invalid table.
[0052]
A method for rewriting the index table 711 and the logical address / physical address conversion table 311 when data writing occurs will be described with reference to FIG. FIG. 8 is a flowchart of a method of rewriting an index table and a logical address / physical address conversion table when data writing occurs according to the second embodiment.
The host device 102 transmits a data write command, data to be written, and a write destination logical address to the host interface unit 112 of the storage device 101. The host interface unit 112 inputs a data write command, data to be written, and a logical address (step 401). The host interface unit 112 temporarily stores data to be written in the buffer memory 113.
[0053]
In the present invention, a logical address is set for each segment. The storage control unit 114 specifies the segment 201 to which data in the storage unit 111 is to be written based on the logical address specified by the host device 102 (Step 402).
The storage control unit 114 detects a free physical block in the data area 302 of the specified segment 201 based on the erased table (configured in segment units). The storage control unit 114 extracts the data to be written temporarily stored in the buffer memory 113 and writes the data to the detected free physical block (step 403).
[0054]
The storage control unit 114 determines whether or not the logical address / physical address conversion table 311 including the logical address specified by the host device 102 exists in the buffer memory 113 (Step 801). If there is a logical address / physical address conversion table 311 in the buffer memory 113, the process proceeds to step 405.
If there is no logical address / physical address conversion table 311 in the buffer memory 113, the table control unit 115 searches the table area 301 of the segment 201 specified in step 402. The index table 711 in which the first flag is valid (= 01) is read, and the index table 711 corresponding to the specified logical address is detected (step 802). The logical address / physical address conversion table 311 including the specified logical address is detected based on the index table 711 (step 803).
[0055]
In step 405, the table control unit 115 determines whether there is an old physical address corresponding to the logical address specified by the host device 102, based on the logical address / physical address conversion table 311. If there is no old physical address, the physical address to which the data is written is registered in the logical address / physical address conversion table 311 (step 406), and the process ends.
[0056]
If there is an old physical address, the old physical block is erased (step 407). The physical block may be actually erased and registered in the erased table, or a flag indicating whether or not the physical block is invalid may be set to a value indicating invalid, and the physical block may be registered in the invalid table. You may.
[0057]
The storage control unit 114 detects a free physical block in the data area 302 of the specified segment 201 based on the erased table (configured in segment units). The table control unit 115 newly creates the logical address / physical address conversion table 311 and sets the first flag to valid (= 01) (step 804).
When a new logical address / physical address conversion table 311 is created, the physical address corresponding to the logical address specified by the host device 102 is set to the physical address to which the data was written in step 403. Since there is no change other than the changed physical address, it is necessary to hold the contents of the old logical address / physical address conversion table (the logical address / physical address conversion table detected in step 803). The logical address and the physical address are read from the old logical address / physical address conversion table and are written as they are in the new logical address / physical address conversion table.
Invalid (= 00) is set in the first flag of the old logical address / physical address conversion table (step 805).
[0058]
The table control unit 115 searches the table area 301 of the segment 201 specified in step 402, and detects a table (physical block) in which the first flag has been deleted (= 11). An index table 711 is newly created, and the first flag is set to valid (= 01) (step 806).
When the index table 711 is newly created, the physical address of the newly created logical address / physical address conversion table 311 is registered in step 804. Since the other parts are not changed, it is necessary to hold the contents of the old index table (the index table detected in step 802). The physical address of the logical address / physical address conversion table 311 is read from the old index table and written as is in the new index table.
Invalid (= 00) is set to the first flag of the old index table (step 807).
[0059]
A data reading method will be described with reference to FIG. FIG. 9 is a flowchart of a data reading method according to the second embodiment.
The host device 102 transmits a data read command and a logical address of the data to be read to the host interface unit 112 of the storage device 101. The host interface unit 112 inputs a data read command and a logical address of the data to be read (step 501).
In the present invention, a logical address is set for each segment. The storage control unit 114 specifies a segment in the storage unit 111 based on the logical address specified by the host device 102 (Step 502).
[0060]
The storage control unit 114 determines whether or not the logical address / physical address conversion table 311 including the logical address specified by the host device 102 exists in the buffer memory 113 (Step 901). If there is a logical address / physical address conversion table 311 in the buffer memory 113, the process proceeds to step 504.
If there is no logical address / physical address conversion table 311 in the buffer memory 113, the table control unit 115 searches the table area 301 of the segment 201 specified in step 502. The index table 711 in which the first flag is valid (= 01) is read, and the index table 711 corresponding to the specified logical address is detected (step 902). The logical address / physical address conversion table 311 including the specified logical address is detected based on the index table 711 (step 903).
[0061]
In step 504, the physical address corresponding to the logical address specified by the host device 102 is specified based on the logical address / physical address conversion table 311.
The storage control unit 114 reads the data of the physical address (step 505) and stores the data in the buffer memory 113. The host interface unit 112 transmits the read data stored in the buffer memory 113 to the host device 102.
[0062]
A method of rewriting the index table 711 and the logical address / physical address conversion table 311 when data is erased will be described with reference to FIG. FIG. 10 is a flowchart of a method of rewriting the index table and the logical address / physical address conversion table at the time of erasing data according to the second embodiment.
The host device 102 transmits a data erasure command and a logical address of the data to be erased to the host interface unit 112 of the storage device 101. The host interface unit 112 inputs a data erase command and a logical address of data to be erased (step 601).
In the present invention, a logical address is set for each segment. The storage control unit 114 specifies the segment 201 in the storage unit 111 based on the logical address specified by the host device 102 (Step 602).
[0063]
The storage control unit 114 determines whether or not the logical address / physical address conversion table 311 including the logical address specified by the host device 102 exists in the buffer memory 113 (step 1001). If there is a logical address / physical address conversion table 311 in the buffer memory 113, the process proceeds to step 604.
If there is no logical address / physical address conversion table 311 in the buffer memory 113, the table control unit 115 searches the table area 301 of the specified segment 201. The index table 711 in which the first flag is valid (= 01) is read, and the index table 711 corresponding to the specified logical address is detected (step 1002). The logical address / physical address conversion table 311 including the designated logical address is detected based on the index table 711 (step 1003).
[0064]
In step 604, the table control unit 115 specifies a physical address corresponding to the logical address specified by the host device 102 based on the logical address / physical address conversion table 311.
The storage control unit 114 erases the physical block of the physical address (Step 605). The physical block may be actually erased and registered in the erased table, or a flag indicating whether or not the physical block is invalid may be set to a value indicating invalid, and the physical block may be registered in the invalid table. You may.
[0065]
The storage control unit 114 detects a free physical block in the data area 302 of the specified segment 201 based on the erased table (configured in segment units). The table control unit 115 newly creates the logical address / physical address conversion table 311 and sets the first flag to valid (= 01) (step 1004).
When a new logical address / physical address conversion table 311 is created, the physical address corresponding to the logical address for which the host device 102 has issued the erase command is not written. Since the other parts are not changed, it is necessary to hold the contents of the old logical address / physical address conversion table (the logical address / physical address conversion table detected in step 1003). The logical address and the physical address are read from the old logical address / physical address conversion table and are written as they are in the new logical address / physical address conversion table.
The first flag of the old logical address / physical address conversion table is set to invalid (= 00) (step 1005).
[0066]
The table control unit 115 searches the table area 301 of the segment 201 specified in step 602, and detects a table (physical block) in which the first flag has been deleted (= 11). An index table 711 is newly created, and the first flag is set to valid (= 1) (step 1006).
When newly creating the index table 711, the physical address of the newly created logical address / physical address conversion table 311 is registered in step 1004. Since the other parts are not changed, it is necessary to hold the contents of the old index table (the index table detected in step 1002). The physical address of the logical address / physical address conversion table 311 is read from the old index table and written as is in the new index table.
The first flag of the old index table is set to invalid (= 00) (step 1007).
[0067]
<< Example 3 >>
A storage device according to the third embodiment will be described with reference to FIGS. 1, 2, 11, and 12. 1 and 2 are the same as the first and second embodiments.
FIG. 11 is a diagram illustrating a configuration of a segment according to the third embodiment. In the third embodiment, the segment 201 is divided into a table area 301 and a data area 302. The table area 301 is a dedicated area for storing the index table 711. The data area 302 is an area for writing the logical address / physical address conversion table 1111 and the data transmitted from the host device 102.
One logical address / physical address conversion table and one index table are each composed of one physical block, which is a unit for erasing data.
[0068]
The logical address / physical address conversion table 1111 has a first flag, a plurality of logical addresses, and physical addresses corresponding to the logical addresses. The difference between the third embodiment and the second embodiment is that the logical address / physical address conversion table 1111 of the third embodiment has a one-to-one correspondence with the address information of another logical address / physical address conversion table and the address information (link information). And a corresponding second flag. Starting from a physical address associated with one logical address in the index table 711, a plurality of (eight in the present embodiment) logical address / physical address conversion tables 1111 linked in a chain are specified in a formula based on a potato. be able to. The physical address associated with each logical address in the index table 711 is the physical address in which the leading logical address / physical address conversion table 1111 in the linked plurality of logical address / physical address conversion tables 1111 is stored. Is specified. The other points are the same as the second embodiment.
[0069]
The second flag 1121 (2 bits in the present invention) contains link information (information of a physical address of another logical address / physical address conversion table linked in a chain to the logical address / physical address conversion table). Indicates whether the information is valid, invalid, or erased (if the physical address information of another logical address / physical address conversion table exists, whether it is valid or invalid).
If the second flag is 11, it indicates that the link information has been erased (there is no other logical address / physical address conversion table linked to the logical address / physical address conversion table).
When the second flag is 01, it indicates that the link information is valid.
When the second flag is 00, it indicates that the link information is invalid.
The logical address / physical address conversion table at the end of the link does not have the address information of the logical address / physical address conversion table of the next link destination. In this case, the second flag indicates that the data has been erased (= 11).
[0070]
In the third embodiment, the logical address / physical address conversion table 1111 has a plurality (eight in the embodiment) of areas in which link information and the corresponding second flag are written. When rewriting the link information, it is not necessary to rewrite the entire logical address / physical address conversion table 1111 to a free physical block. The link is set by setting the second flag to invalid (= 00), writing the new link destination to the next area in the same physical block, and setting the corresponding second flag to valid (= 01). Information can be easily rewritten.
Only when all the second flags corresponding to the link information are set to invalid and there is no area for storing new link information, and only when the physical address in the logical address / physical address conversion table 1111 is rewritten, The logical address / physical address conversion table 1111 is rewritten to a free physical block.
[0071]
In the second embodiment, it is necessary to rewrite the index table 711 every time the logical address / physical address conversion table 311 is rewritten. In the third embodiment, since the logical address / physical address conversion table 1111 has the link information and the second flag, the number of times of rewriting the index table 711 can be reduced.
[0072]
A method for rewriting the logical address / physical address conversion table 1111 when data writing occurs will be described with reference to FIG. FIG. 12 is a flowchart of a method of rewriting the logical address / physical address conversion table when data writing occurs according to the third embodiment.
The host device 102 transmits a data write command, data to be written, and a write destination logical address to the host interface unit 112 of the storage device 101. The host interface unit 112 inputs a data write command, data to be written, and a logical address (step 401). The host interface unit 112 temporarily stores data to be written in the buffer memory 113.
[0073]
In the present invention, a logical address is set for each segment. The storage control unit 114 specifies the segment 201 to which data in the storage unit 111 is to be written based on the logical address specified by the host device 102 (Step 402).
The storage control unit 114 detects a free physical block in the data area 302 of the specified segment 201 based on the erased table (configured in segment units). The storage control unit 114 extracts the data to be written temporarily stored in the buffer memory 113 and writes the data to the detected free physical block (step 403).
[0074]
The storage control unit 114 determines whether or not the logical address / physical address conversion table 1111 including the logical address specified by the host device 102 exists in the buffer memory 113 (Step 1201). If there is a logical address / physical address conversion table 1111 in the buffer memory 113, the process proceeds to step 405.
If there is no logical address / physical address conversion table 1111 in the buffer memory 113, the table control unit 115 searches the table area 301 of the segment 201 specified in step 402. The index table 711 in which the first flag is valid (= 01) is read, and the index table 711 corresponding to the specified logical address is detected (step 1202). Based on the index table 711, the leading logical address / physical address conversion table 1111 is detected from the plurality of linked logical address / physical address conversion tables 1111 (step 1203).
[0075]
The table control unit 115 determines whether the detected logical address / physical address conversion table 1111 includes the logical address specified by the host device 102 (step 1204). If it contains the specified logical address, the process proceeds to step 405.
If the logical address does not include the specified logical address, another logical address / physical address conversion table in which the second flag indicates valid (= 01) is detected (step 1205), and the process returns to step 1204. The link is sequentially followed until a logical address / physical address conversion table including the specified logical address is detected.
[0076]
The table control unit 115 determines whether there is an old physical address corresponding to the logical address specified by the host device 102, based on the logical address / physical address conversion table 1111 (step 405). If there is no old physical address, the physical address to which the data is written is registered in the logical address / physical address conversion table 1111 (step 406), and the process ends.
[0077]
If there is an old physical address, the old physical block is erased (step 407). The storage control unit 114 detects a free physical block in the data area 302 of the specified segment 201 based on the erased table (configured in segment units). A new logical address / physical address conversion table 1111 is created, and the first flag is set to valid (= 1) (step 1206).
When a new logical address / physical address conversion table 1111 is created, the physical address corresponding to the logical address specified by the host device 102 is set to the physical address to which the data was written in step 403. Since the other parts are not changed, it is necessary to hold the contents of the old logical address / physical address conversion table. A logical address and a physical address are read from the old logical address / physical address conversion table, and the address information of another logical address / physical address conversion table indicating that the second flag is valid is read, and is read into the new logical address / physical address conversion table Write.
Invalid (= 00) is set in the first flag of the old logical address / physical address conversion table (step 1207).
[0078]
The storage control unit 114 determines whether or not the index table 711 includes the physical address of the old logical address / physical address conversion table (Step 1208).
When the index table 711 includes the physical address of the old logical address / physical address conversion table (the old logical address / physical address conversion table is the first logical address / If it is a physical address conversion table), a new index table is generated and the physical address of the new logical address / physical address conversion table is registered (step 806). The old index table is invalidated (step 807).
[0079]
When the index table 711 does not include the physical address of the old logical address / physical address conversion table, there is no need to change the index table 711. In this case, the link information of the logical address / physical address conversion table that specifies the physical address of the old logical address / physical address conversion table detected in step 1203 as the next link destination is changed. The link destination is changed from the physical address in the old logical address / physical address conversion table to the physical address in the new logical address / physical address conversion table created in step 1206 (step 1209). Specifically, the second flag corresponding to the physical address in the old logical address / physical address conversion table is set to invalid (= 00). The physical address of the new logical address / physical address conversion table is registered, and the second flag corresponding to the physical address of the new logical address / physical address conversion table is set to valid (= 01).
If there is no area to write the new physical address (if all the second flags are set to invalid), a free physical block is detected based on the erased table. The physical address of the new logical address / physical address conversion table is registered in the empty physical block by rewriting the logical address / physical address conversion table.
[0080]
If all the second flags have been erased (= 11), it is determined that the logical address / physical address conversion table 1111 does not have the address information of the logical address / physical address conversion table of the next link destination. Alternatively, if the logical address / physical address conversion table 1111 does not have the address information of the logical address / physical address conversion table of the next link destination, a special value indicating the end of the link (for example, FFFFF) May be written in the next address column, and the corresponding second flag may be set to valid (= 01).
[0081]
In the second and third embodiments, the index table 711 stores an area for storing a plurality of pieces of address information of one logical address / physical address conversion table and a second flag corresponding to the address information on a one-to-one basis. It is good to have.
The second flag (for example, 2 bits) indicates whether the physical address of the plurality of logical address / physical address conversion tables included in the index table is valid, invalid, or has been erased (physical address of the logical address / physical address conversion table). If the address exists, it indicates whether it is valid or invalid.)
When rewriting the address information, it is not necessary to rewrite the entire index table 711 to a free physical block. Address information can be easily rewritten only by setting the second flag to invalid (= 00), writing a new physical address, and setting the corresponding second flag to valid (= 01).
Only when all of the second flags corresponding to the address information are set to be invalid, the index table 711 is rewritten to a free physical block (first flag = erased) in the table area 301.
[0082]
In the third embodiment, the link destination address information included in the logical address / physical address conversion table 1111 is the address information of the next logical address / physical address conversion table. Instead, the link destination address information included in the logical address / physical address conversion table 1111 may be used as the address information of a plurality of linked logical address / physical address conversion tables. Further, both the address information of the previously linked logical address / physical address conversion table and the address information of the next logical address / physical address conversion table may be held.
[0083]
As a modified example of the first embodiment, a plurality of (for example, eight) logical address / physical address conversion tables 311 may be linked. The storage unit stores at least part of the plurality of logical address / physical address conversion tables 311 in a distributed manner in the table area 301.
The logical address / physical address conversion table 311 includes a first flag indicating whether the logical address / physical address conversion table 311 is valid or invalid, address information of a plurality of logical addresses and physical addresses corresponding to the logical addresses, It has address information of another logical address / physical address conversion table (next logical address / physical address conversion table) and a second flag indicating whether the address information is valid or invalid.
Starting from the logical address / physical address conversion table 311 stored in the table area, a plurality of logical address / physical address conversion tables 311 are linked in a chain according to the address information of the other logical address / physical address conversion tables 311. .
[0084]
When rewriting the logical address / physical address conversion table 311, the table control unit 115 invalidates the first flag of the logical address / physical address conversion table 311 including the rewritten portion and sets the new logical address / physical address conversion table 311. Is generated, the second flag corresponding to the address information of the invalidated logical address / physical address conversion table 311 is invalidated, and the generated address information of the logical address / physical address conversion table 311 is replaced with another new logical address. It is written as address information of the address / physical address conversion table 311 and the corresponding second flag is made valid.
Preferably, among the plurality of logical address / physical address conversion tables 311 linked in a chain, the leading logical address / physical address conversion table 311 is stored in the table area 301, and the other logical address / physical address conversion tables are stored. The table 311 is stored in the data area 302.
[0085]
At the time of startup, the storage control unit 114 searches only the table area to detect a leading logical address / physical address conversion table among a plurality of linked logical address / physical address conversion tables, and detects the leading logical address / physical address conversion table. The logical address / physical address conversion table stored in the data area can be detected based on the physical address conversion table.
[0086]
As a modified example of the second and third embodiments, a plurality (for example, eight) of index tables 711 may be linked in the same manner as in the third embodiment. The storage unit stores at least a part of the plurality of index tables in a distributed manner in the table area 301. Preferably, among the plurality of index tables connected in a chain, the first index table is stored in the table area 301, and the other index tables are stored in the data area 302.
The index table includes a first flag indicating whether the index table is valid or invalid, address information of a plurality of logical address / physical address conversion tables, address information of another index table (next index table), And a second flag indicating whether the address information of the index table is valid or invalid.
Starting from the index table stored in the table area, a plurality of index tables are linked in a chain by the address information of another index table.
[0087]
When rewriting the index table, the table control unit 115 invalidates the first flag of the index table including the rewritten portion, generates a new index table, and generates a second index table corresponding to the address information of the invalidated index table. Is invalidated, the generated address information of the index table is written as new address information of another index table, and the corresponding second flag is made valid.
[0088]
At the time of startup, the storage control unit 114 searches only the table area to detect the first index table among the plurality of linked index tables, and stores the first index table in the data area based on the first index table. The index table and the logical address / physical address conversion table can be detected.
[0089]
As described above, the index table 711 may hold the address information of the next index table, or may hold the address information of a plurality of linked index tables. Further, both the address information of the previously linked index table and the address information of the next index table may be held.
[0090]
In the embodiment, the storage unit 111 is divided into a plurality of segments. The storage unit 111 need not be divided into a plurality of segments.
[0091]
【The invention's effect】
According to the present invention, even a large-capacity storage unit has a small logical address / physical address conversion table, and the number of rewrites of each physical address in the table area allocated to the logical address / physical address conversion table is the guaranteed number of rewrites Is obtained in a short time.
According to the present invention, there is obtained an advantageous effect that a storage device that rewrites a logical address / physical address conversion table in small units can be realized while minimizing the influence of a defective physical block.
According to the present invention, an advantageous effect that a storage device that starts up quickly at startup can be realized is obtained.
According to the present invention, having a small management area, using a wide data area so that the number of rewrites of each physical address is uniform, only the number of rewrites of a specific physical address exceeds the guaranteed number of rewrites in a short period of time An advantageous effect of being able to realize a storage device having no memory is obtained.
According to the present invention, there is obtained an advantageous effect that a storage device which can ensure high reliability and can smoothly cope with an increase in capacity can be realized.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of a storage device of the present invention.
FIG. 2 is a diagram showing a configuration of a storage unit 111.
FIG. 3 is a diagram showing a configuration of a segment according to the first embodiment;
FIG. 4 is a flowchart of a method of rewriting a logical address / physical address conversion table when data writing occurs according to the first embodiment;
FIG. 5 is a flowchart of a data reading method according to the first embodiment.
FIG. 6 is a flowchart of a method of rewriting a logical address / physical address conversion table when erasing data according to the first embodiment;
FIG. 7 is a diagram illustrating a configuration of a segment according to a second embodiment.
FIG. 8 is a flowchart of a method of rewriting an index table and a logical address / physical address conversion table when data writing occurs according to the second embodiment.
FIG. 9 is a flowchart of a data reading method according to the second embodiment.
FIG. 10 is a flowchart of a method of rewriting an index table and a logical address / physical address conversion table when data is erased according to the second embodiment.
FIG. 11 is a diagram illustrating a configuration of a segment according to the third embodiment.
FIG. 12 is a flowchart of a method of rewriting a logical address / physical address conversion table when data writing occurs according to a third embodiment;
FIG. 13 is a diagram showing a configuration of a nonvolatile memory of Conventional Example 2
[Explanation of symbols]
101 storage device
102 Host device
111 storage unit
112 Host interface section
113 buffer memory
114 Memory control unit
115 Table control unit
201 segment
202 Physical Block
301 table area
302 Data area
311, 1111 logical address / physical address conversion table
321 First flag
711 Index table
1121 Second flag

Claims (9)

テーブル領域とデータ領域とを有し、複数の論理アドレス/物理アドレス変換テーブルを前記テーブル領域に分散して格納する記憶部と、
前記論理アドレス/物理アドレス変換テーブルを書き換える場合、書き換え部分を含む前記論理アドレス/物理アドレス変換テーブルのみを書き換えるテーブル制御部と、
を有することを特徴とする記憶装置。
A storage unit having a table area and a data area, and storing a plurality of logical address / physical address conversion tables in a distributed manner in the table area;
When rewriting the logical address / physical address conversion table, a table control unit that rewrites only the logical address / physical address conversion table including a rewrite portion;
A storage device comprising:
テーブル領域とデータ領域とを有し、複数の論理アドレス/物理アドレス変換テーブルのアドレス情報をそれぞれ有する複数のインデックステーブルを前記テーブル領域に分散して格納し、前記インデックステーブルで指定される前記論理アドレス/物理アドレス変換テーブルの中の少なくとも1つを前記データ領域に格納する記憶部と、
前記論理アドレス/物理アドレス変換テーブルを書き換える場合、書き換え部分を含む前記論理アドレス/物理アドレス変換テーブル及びその論理アドレス/物理アドレス変換テーブルのアドレス情報を有する前記インデックステーブルのみを書き換えるテーブル制御部と、
を有することを特徴とする記憶装置。
A plurality of index tables each having a table area and a data area, and having a plurality of index tables each having address information of a plurality of logical address / physical address conversion tables, distributed and stored in the table area; A storage unit for storing at least one of a / physical address conversion table in the data area;
When rewriting the logical address / physical address conversion table, a table control unit that rewrites only the logical address / physical address conversion table including a rewrite portion and the index table having address information of the logical address / physical address conversion table,
A storage device comprising:
テーブル領域とデータ領域とを有し、複数の論理アドレス/物理アドレス変換テーブルの少なくとも一部を前記テーブル領域に分散して格納する記憶部と、
前記論理アドレス/物理アドレス変換テーブルを更新するテーブル制御部と、
を有し、
前記論理アドレス/物理アドレス変換テーブルは、そのテーブルが有効か無効かを示す第1のフラグと、複数の論理アドレス及びその論理アドレスに対応する物理アドレスのアドレス情報と、他の論理アドレス/物理アドレス変換テーブルのアドレス情報と、他の論理アドレス/物理アドレス変換テーブルのアドレス情報が有効か無効かを示す第2のフラグとを有し、
前記テーブル領域に格納された前記論理アドレス/物理アドレス変換テーブルを先頭として、前記他の論理アドレス/物理アドレス変換テーブルのアドレス情報によって、チェーン状に複数の前記論理アドレス/物理アドレス変換テーブルが連結され、
前記論理アドレス/物理アドレス変換テーブルを書き換える場合、前記テーブル制御部は、書き換え部分を含む前記論理アドレス/物理アドレス変換テーブルの前記第1のフラグを無効にして、新たな前記論理アドレス/物理アドレス変換テーブルを生成し、無効にされた前記論理アドレス/物理アドレス変換テーブルのアドレス情報に対応する前記第2のフラグを無効にし、生成した前記論理アドレス/物理アドレス変換テーブルのアドレス情報を新たな前記他の論理アドレス/物理アドレス変換テーブルのアドレス情報として書き込み、それに対応する前記第2のフラグを有効にする、
ことを特徴とする記憶装置。
A storage unit having a table area and a data area, and distributing and storing at least a part of a plurality of logical address / physical address conversion tables in the table area;
A table control unit that updates the logical address / physical address conversion table;
Has,
The logical address / physical address conversion table includes a first flag indicating whether the table is valid or invalid, a plurality of logical addresses, address information of physical addresses corresponding to the logical addresses, and other logical addresses / physical addresses. The address information of the translation table, and a second flag indicating whether the address information of the other logical address / physical address translation table is valid or invalid,
Starting from the logical address / physical address conversion table stored in the table area, a plurality of the logical address / physical address conversion tables are connected in a chain according to the address information of the other logical address / physical address conversion table. ,
When rewriting the logical address / physical address conversion table, the table control unit invalidates the first flag of the logical address / physical address conversion table including a rewrite portion, and renews the logical address / physical address conversion. A table is generated, the second flag corresponding to the invalidated address information of the logical address / physical address conversion table is invalidated, and the generated address information of the logical address / physical address conversion table is replaced with the new address information. Writing as address information of the logical address / physical address conversion table, and enabling the second flag corresponding thereto.
A storage device characterized by the above-mentioned.
チェーン状に連結された複数の前記論理アドレス/物理アドレス変換テーブルの中で、先頭の前記論理アドレス/物理アドレス変換テーブル以外の論理アドレス/物理アドレス変換テーブルは、全て前記データ領域に格納されていることを特徴とする請求項3に記載の記憶装置。Of the plurality of logical address / physical address conversion tables connected in a chain, all the logical address / physical address conversion tables other than the leading logical address / physical address conversion table are stored in the data area. 4. The storage device according to claim 3, wherein: テーブル領域とデータ領域とを有し、複数のインデックステーブルを前記テーブル領域に分散して格納し、前記インデックステーブルでアドレスを指定される前記論理アドレス/物理アドレス変換テーブルの中の少なくとも1つを前記データ領域に格納する記憶部と、
前記インデックステーブル及び前記論理アドレス/物理アドレス変換テーブルを更新するテーブル制御部と、
を有し、
前記インデックステーブルは、複数の論理アドレス/物理アドレス変換テーブルのアドレス情報を有し、
前記論理アドレス/物理アドレス変換テーブルは、そのテーブルが有効か無効かを示す第1のフラグと、複数の論理アドレス及びその論理アドレスに対応する物理アドレスのアドレス情報と、他の論理アドレス/物理アドレス変換テーブルのアドレス情報と、他の論理アドレス/物理アドレス変換テーブルのアドレス情報が有効か無効かを示す第2のフラグとを有し、
前記インデックステーブルでアドレスを指定される前記論理アドレス/物理アドレス変換テーブルを先頭として、前記他の論理アドレス/物理アドレス変換テーブルのアドレス情報とによって、チェーン状に複数の前記論理アドレス/物理アドレス変換テーブルが連結され、
前記論理アドレス/物理アドレス変換テーブルを書き換える場合、前記テーブル制御部は、書き換え部分を含む前記論理アドレス/物理アドレス変換テーブルの前記第1のフラグを無効にして、新たな前記論理アドレス/物理アドレス変換テーブルを生成し、無効にされた前記論理アドレス/物理アドレス変換テーブルのアドレス情報に対応する前記第2のフラグを無効にし、生成した前記論理アドレス/物理アドレス変換テーブルのアドレス情報を新たな前記他の論理アドレス/物理アドレス変換テーブルのアドレス情報として書き込み、それに対応する前記第2のフラグを有効にする、
ことを特徴とする記憶装置。
A table area and a data area, wherein a plurality of index tables are distributed and stored in the table area, and at least one of the logical address / physical address conversion tables designated by the index table is stored in the table; A storage unit for storing in the data area;
A table control unit that updates the index table and the logical address / physical address conversion table;
Has,
The index table has address information of a plurality of logical address / physical address conversion tables,
The logical address / physical address conversion table includes a first flag indicating whether the table is valid or invalid, a plurality of logical addresses, address information of physical addresses corresponding to the logical addresses, and other logical addresses / physical addresses. The address information of the translation table, and a second flag indicating whether the address information of the other logical address / physical address translation table is valid or invalid,
Starting from the logical address / physical address conversion table whose address is specified in the index table, a plurality of the logical address / physical address conversion tables are chained in accordance with the address information of the other logical address / physical address conversion table. Are concatenated,
When rewriting the logical address / physical address conversion table, the table control unit invalidates the first flag of the logical address / physical address conversion table including a rewrite portion, and renews the logical address / physical address conversion. A table is generated, the second flag corresponding to the invalidated address information of the logical address / physical address conversion table is invalidated, and the generated address information of the logical address / physical address conversion table is replaced with the new address information. Writing as address information of the logical address / physical address conversion table, and enabling the second flag corresponding thereto.
A storage device characterized by the above-mentioned.
テーブル領域とデータ領域とを有し、複数のインデックステーブルの少なくとも一部を前記テーブル領域に分散して格納し、前記インデックステーブルでアドレスを指定される前記論理アドレス/物理アドレス変換テーブルの中の少なくとも1つを前記データ領域に格納する記憶部と、
前記インデックステーブル及び前記論理アドレス/物理アドレス変換テーブルを更新するテーブル制御部と、
を有し、
前記インデックステーブルは、そのインデックステーブルが有効か無効かを示す第1のフラグと、複数の論理アドレス/物理アドレス変換テーブルのアドレス情報と、他のインデックステーブルのアドレス情報と、他のインデックステーブルのアドレス情報が有効か無効かを示す第2のフラグと、を有し、
前記テーブル領域に格納された前記インデックステーブルを先頭として、前記他のインデックステーブルのアドレス情報によって、チェーン状に複数の前記インデックステーブルが連結され、
前記インデックステーブルを書き換える場合、前記テーブル制御部は、書き換え部分を含む前記インデックステーブルの前記第1のフラグを無効にして、新たな前記インデックステーブルを生成し、無効にされた前記インデックステーブルのアドレス情報に対応する前記第2のフラグを無効にして、生成した前記インデックステーブルのアドレス情報を新たな前記他のインデックステーブルのアドレス情報として書き込み、それに対応する前記第2のフラグを有効にする、
ことを特徴とする記憶装置。
A table area and a data area, at least a part of the plurality of index tables are distributed and stored in the table area, and at least one of the logical address / physical address conversion tables designated by the index table in the address table; A storage unit for storing one in the data area;
A table control unit that updates the index table and the logical address / physical address conversion table;
Has,
The index table includes a first flag indicating whether the index table is valid or invalid, address information of a plurality of logical address / physical address conversion tables, address information of another index table, and addresses of other index tables. A second flag indicating whether the information is valid or invalid, and
With the index table stored in the table area as the head, the plurality of index tables are connected in a chain by the address information of the other index table,
When rewriting the index table, the table control unit invalidates the first flag of the index table including a rewritten portion, generates a new index table, and generates address information of the invalidated index table. Invalidating the second flag corresponding to, writing the generated address information of the index table as new address information of the other index table, and validating the second flag corresponding thereto.
A storage device characterized by the above-mentioned.
チェーン状に連結された複数の前記インデックステーブルの中で、先頭の前記インデックステーブル以外の前記インデックステーブルは、前記データ領域に格納されていることを特徴とする請求項6に記載の記憶装置。7. The storage device according to claim 6, wherein, out of the plurality of index tables connected in a chain, the index tables other than the leading index table are stored in the data area. 前記論理アドレス/物理アドレス変換テーブル及び前記インデックステーブルはデータの最小消去単位である1つの物理ブロックで構成することを特徴とする請求項1から請求項7のいずれかの請求項に記載の記憶装置。The storage device according to any one of claims 1 to 7, wherein the logical address / physical address conversion table and the index table are configured by one physical block which is a minimum erasing unit of data. . 前記記憶部は複数のセグメントを有し、前記セグメント毎に前記論理アドレス/物理アドレス変換テーブル又は前記インデックステーブルを有することを特徴とする請求項1から請求項7のいずれかの請求項に記載の記憶装置。8. The storage device according to claim 1, wherein the storage unit includes a plurality of segments, and the storage unit includes the logical address / physical address conversion table or the index table for each segment. 9. Storage device.
JP2002377804A 2002-12-26 2002-12-26 Storage device Pending JP2004206615A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002377804A JP2004206615A (en) 2002-12-26 2002-12-26 Storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002377804A JP2004206615A (en) 2002-12-26 2002-12-26 Storage device

Publications (1)

Publication Number Publication Date
JP2004206615A true JP2004206615A (en) 2004-07-22

Family

ID=32814866

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002377804A Pending JP2004206615A (en) 2002-12-26 2002-12-26 Storage device

Country Status (1)

Country Link
JP (1) JP2004206615A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006039983A (en) * 2004-07-28 2006-02-09 Renesas Technology Corp Memory card
JP2006072441A (en) * 2004-08-31 2006-03-16 Sony Corp Memory device and control method of nonvolatile memory
US8972822B2 (en) 2011-12-01 2015-03-03 Fujitsu Limited Memory module and semiconductor storage device
JP2015521310A (en) * 2012-04-27 2015-07-27 ネットアップ,インコーポレイテッド Efficient data object storage and retrieval
JP2016540288A (en) * 2013-11-01 2016-12-22 クアルコム,インコーポレイテッド Method and apparatus for non-volatile RAM error remapping

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006039983A (en) * 2004-07-28 2006-02-09 Renesas Technology Corp Memory card
JP4684587B2 (en) * 2004-07-28 2011-05-18 ルネサスエレクトロニクス株式会社 Memory card
JP2006072441A (en) * 2004-08-31 2006-03-16 Sony Corp Memory device and control method of nonvolatile memory
JP4561246B2 (en) * 2004-08-31 2010-10-13 ソニー株式会社 Memory device
US8972822B2 (en) 2011-12-01 2015-03-03 Fujitsu Limited Memory module and semiconductor storage device
JP2015521310A (en) * 2012-04-27 2015-07-27 ネットアップ,インコーポレイテッド Efficient data object storage and retrieval
JP2016540288A (en) * 2013-11-01 2016-12-22 クアルコム,インコーポレイテッド Method and apparatus for non-volatile RAM error remapping

Similar Documents

Publication Publication Date Title
KR100871027B1 (en) Data recorder and method for recording data in flash memory
JP4832521B2 (en) Data management method in flash memory media
JP4356686B2 (en) Memory device and memory control method
RU2242805C2 (en) Recording method, control device and recording device
US6278678B1 (en) Editing apparatus, editing method, and recording medium
JP2009199625A (en) Memory card, and method for controlling memory card and method for controlling nonvolatile semiconductor memory
JP2006040264A (en) Control method of memory card, and control method of nonvolatile semiconductor memory
JP2007241576A (en) Nonvolatile storage device and data writing method
JP2004280752A (en) Date storage device, management information updating method for data storage device, and computer program
TW201102814A (en) Memory device and memory access method
KR20070104874A (en) Storage device
JP2007280428A (en) Memory management
KR100703680B1 (en) Flash file system
US20070005929A1 (en) Method, system, and article of manufacture for sector mapping in a flash device
JP2003058417A (en) Storage device
JP3694501B2 (en) Storage device
JP2004206615A (en) Storage device
JP2005216119A (en) Recording medium
JPH113287A (en) Storage device and storage area management method used for the device
JP2005243000A (en) Semiconductor memory device, memory controller and data recording method
JP2007199828A (en) Nonvolatile storage device and address management method
KR101102754B1 (en) Nand flash memory file system and method for accessing file thereof
JP2004062554A (en) Managing method of flash memory
JP2008299455A (en) Data storage device and data management method
JP4710274B2 (en) MEMORY DEVICE, MEMORY DEVICE CONTROL METHOD, AND DATA PROCESSING SYSTEM

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20050524