JP4661086B2 - Nonvolatile memory device and nonvolatile memory erasing and writing method - Google Patents
Nonvolatile memory device and nonvolatile memory erasing and writing method Download PDFInfo
- Publication number
- JP4661086B2 JP4661086B2 JP2004152790A JP2004152790A JP4661086B2 JP 4661086 B2 JP4661086 B2 JP 4661086B2 JP 2004152790 A JP2004152790 A JP 2004152790A JP 2004152790 A JP2004152790 A JP 2004152790A JP 4661086 B2 JP4661086 B2 JP 4661086B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- physical
- erased
- physical block
- 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.)
- Expired - Fee Related
Links
Images
Description
本発明は、フラッシュメモリ等の不揮発性メモリを使用した不揮発性記憶装置と、不揮発性メモリの消去方法と書込み方法に関する。 The present invention relates to a nonvolatile memory device using a nonvolatile memory such as a flash memory, and a method for erasing and writing to the nonvolatile memory.
近年、不揮発性メモリを搭載したメモリーカードは、デジタルカメラや携帯電話の記録媒体として、その市場を拡大している。そしてメモリーカード容量の増加に伴い、データファイルや静止画等の小容量の記録から、より大容量が必要となる動画記録へとその用途は広がっている。 In recent years, a memory card equipped with a non-volatile memory has expanded its market as a recording medium for digital cameras and mobile phones. With the increase in memory card capacity, the use is expanding from recording a small capacity of data files, still images, etc. to moving picture recording that requires a larger capacity.
しかし、メモリーカードの不揮発性メモリとして主に使用されているNANDタイプのフラッシュメモリは、その容量の増加に伴いデータの消去単位となる物理ブロックの容量が、16kBのもの(主に128MB以下のフラッシュメモリ)から128kBのもの(主に128MB以上のフラッシュメモリ)になっている。にもかかわらず、メモリーカードにデータを書込む際のファイルシステムでは、データの書込み単位となるクラスタは16kBのままで変化していない。 However, NAND-type flash memory, which is mainly used as a non-volatile memory for memory cards, has a physical block capacity of 16 kB as a data erasing unit as its capacity increases (mainly flash memory of 128 MB or less). Memory) to 128 kB (mainly flash memory of 128 MB or more). Nevertheless, in the file system for writing data to the memory card, the cluster serving as a data writing unit remains 16 kB and has not changed.
従って、以前の小容量のメモリーカード(主に128MBまでの容量)においては、メモリーカードにデータを書込む際のクラスタの容量と、メモリーカード内部に搭載されているNANDタイプのフラッシュメモリの消去単位となる物理ブロックは等しかった。しかし、大容量化が進むと、具体的には128MBを越える容量値の不揮発性メモリからは、メモリーカードにデータを書込む単位であるクラスタ容量の16kBと、メモリーカード内部に搭載されているNANDタイプのフラッシュメモリの消去単位である物理ブロックの容量の128kBとが異なることになり、そのことがメモリーカードに書込まれたファイルがフラグメンテーション(断片化)を発生していた場合の書込み性能の低下を招いていた。 Therefore, in the former small capacity memory card (mainly capacity up to 128MB), the capacity of the cluster when data is written to the memory card and the erase unit of the NAND type flash memory mounted in the memory card The physical blocks to be equal. However, as the capacity increases, more specifically, from a nonvolatile memory having a capacity value exceeding 128 MB, a cluster capacity of 16 kB, which is a unit for writing data to the memory card, and a NAND mounted in the memory card Degradation of write performance when the size of the physical block, which is the erase unit of the flash memory of the type, is different from 128 kB, and the file written to the memory card has fragmented. Was invited.
従来のメモリーカードにおいて、フラグメンテーションが発生した状態でのデータの書込みがどのようにメモリーカード内部の不揮発性メモリに対して行われていたかを図1〜4、図9〜13、図17〜23を用いて説明する。 FIG. 1 to FIG. 4, FIG. 9 to FIG. 13, and FIG. 17 to FIG. 23 show how data is written to a non-volatile memory inside the memory card in a state where fragmentation occurs in a conventional memory card. It explains using.
図1は、不揮発性記憶装置とそれを制御するホストとを示したブロック図である。図1において、101は不揮発性記憶装置であるメモリーカード、102はメモリーカード101を制御してメモリーカード101に対してデータの書込みと読出しを実行するホスト、103はメモリーカード内部にある不揮発性メモリであるフラッシュメモリである。ここでフラッシュメモリ103は、128MBのフラッシュメモリを用いて説明する。104はメモリーカード101の内部にあり、ホスト102からの書込みと読み出し命令を受けてフラッシュメモリ103にデータを格納する、またはフラッシュメモリ103からデータを読み出すコントローラである。105はフラッシュメモリ103の内部にある物理ブロックがそれぞれ消去済であるか、書込み済みであるかの情報を示す消去済テーブルである。106はホスト102が指定するアドレス(以降論理アドレスと表記)とフラッシュメモリ103のアドレス(以降物理アドレスと表記)の変換を行うための論物変換テーブルである。
FIG. 1 is a block diagram showing a nonvolatile memory device and a host that controls the nonvolatile memory device. In FIG. 1, 101 is a memory card which is a non-volatile storage device, 102 is a host for controlling the
図2は、フラッシュメモリ103の内部のブロック図である。フラッシュメモリ103は複数の物理ブロック201(PB0〜PB1023)から構成される。物理ブロック201はデータを一括に消去できる消去単位であり、各々128kBの容量を持つ。
FIG. 2 is an internal block diagram of the
図3は、物理ブロック201の内部のブロック図である。物理ブロック201は複数の物理ページ301(PP0〜PP63)から構成される。物理ページ301はデータを書込みする書込み単位であり、各々2kBの容量を持つ。ホスト102が論理的にデータの書込みを行う単位であるクラスタは16kBであるが、この値は物理ブロック201の容量128kBとも物理ページ301の容量2kBとも一致しない。そのため連続する物理ページ8ページ単位で容量16kBの部分物理ブロック302を構成する。部分物理ブロック302はホストからのデータの書込みを想定してコントローラ103が論理的に扱うデータの単位であり、物理ブロック201はその内部を論理的に8つの部分物理ブロック302に分割してホスト102からのデータを書込む。
FIG. 3 is a block diagram inside the physical block 201. The physical block 201 is composed of a plurality of physical pages 301 (PP0 to PP63). The physical page 301 is a writing unit for writing data, and each has a capacity of 2 kB. The cluster, which is a unit in which the
図4は、メモリーカード101の内部における論理的なデータの管理を示した図である。メモリーカード101に搭載されているフラッシュメモリ103の記憶容量は128MBであるが一般的にフラッシュメモリ103には初期不良ブロックや、書き換えを繰り返すことにより不良ブロックが発生することがあるため、予めやや少な目の容量をメモリーカード101の容量としている。ここでは125MBというのがホスト102に見える容量である。
FIG. 4 is a diagram showing logical data management inside the
その125MBをホスト102から書込みを行う16kB単位で論理ブロック402を0から順に7999まで割り当てている。この論理ブロックはクラスタフラッシュメモリ103の消去単位である物理ブロックと等しい128kB単位で論理グループを構成する。
The
次に、ホスト102からの論理ブロックのデータの消去について説明する。
Next, erasing of logical block data from the
図17、18は、ホスト102がメモリーカード101のひとつの論理ブロック402のデータを論理的に消去する際における、メモリーカード101内部の動作を表した図とそのフローチャートである。「論理的に消去する」とはメモリーカード101からホスト102がデータを読み出したときに全て0xFFデータが読み出せるようにすることであり、メモリーカード101のフラッシュメモリ103、具体的にはホスト102は論理グループ0の論理ブロック2のデータを消去する場合を表している。
FIGS. 17 and 18 are a diagram and a flowchart showing the internal operation of the
まず、フローチャートの書込み開始時点はメモリーカード101内のフラッシュメモリ103の物理ブロックAに論理グループ0に所属する論理ブロック0〜7のデータが書込み済み、また、書換えのためのブロックとして消去済みの物理ブロックBがあり、図17(a)の状態に相当する。
First, at the writing start time of the flowchart, the data of the logical blocks 0 to 7 belonging to the logical group 0 has been written in the physical block A of the
次にステート1201で読出し元物理ブロックAから論理ブロック0を読み出して書込み先物理ブロックBへ書込む、ステート1202で読出し元物理ブロックAから論理ブロック1を読み出して書込み先物理ブロックBへ書込む。
Next, in
ステート1203ではホスト102が消去しようとしている論理ブロック2を全データ0xFFで書込み先物理ブロックBへ書込む。
In the
以降、ステート1204〜1208まで読出し元物理ブロックAから論理ブロック3〜7を読み出して、書込み先物理ブロックBへと書込む処理を順次行う。ステート1208を終了したときの状態が図17(b)である。
Thereafter, the processes of reading logical blocks 3 to 7 from the read source physical block A to the
最後にステート1209で読出し元物理ブロックAを物理消去して処理を終了する。このときの状態が図17(c)である。
Finally, in the
このように従来のホスト102からの消去処理では、書込み先の物理ブロックの全物理ページに対して書込みを行う必要がある。
As described above, in the conventional erasure processing from the
このデータの消去処理に要する時間は、1ページの読み出しにかかる時間が265μs(読出し可能になるまでのビジー時間25μs+読み出しのためのデータ転送時間240μs)、1ページの書込みにかかる時間が360μs(書込みのためのデータ転送時間160μs+書込みに要する時間200μs)、1ブロックを消去する時間2msとの条件から、265μs×8×7+360μs×8×8+2ms=39880μs、となり、39880μsかかる。 The time required for this data erasing process is that the time required for reading one page is 265 μs (the busy time 25 μs until reading is possible + the data transfer time 240 μs for reading), and the time required for writing one page is 360 μs (writing Data transfer time 160 μs + time required for writing 200 μs) From the condition of 1 ms for erasing one block, it becomes 265 μs × 8 × 7 + 360 μs × 8 × 8 + 2 ms = 39880 μs, and it takes 39880 μs.
次にホスト102から、先ほど消去した論理ブロックに対するデータの書込みについて説明する。
Next, data writing from the
図19、20は、ホスト102がメモリーカード101の先ほど消去した論理ブロック402に対してデータを書込む際における、メモリーカード101内部の動作を表した図とそのフローチャートである。
FIGS. 19 and 20 are a diagram and a flowchart showing the internal operation of the
まずフローチャートの書込み開始時点はメモリーカード101内のフラッシュメモリ103の物理ブロックBに論理グループ0に所属する論理ブロック0〜7のデータが書込み済みであり、そのうち論理ブロック2のデータは論理的消去によって全て0xFFデータで埋められている。書換えのためのブロックとして消去済みの物理ブロックCがあり、図19(a)の状態に相当する。
First, at the writing start time of the flowchart, the data of logical blocks 0 to 7 belonging to the logical group 0 has been written to the physical block B of the
次にステート1401で読出し元物理ブロックBから論理ブロック0を読み出して書込み先物理ブロックCへ書込む。
Next, in
以降、ステート1402〜1408まで読出し元物理ブロックBから論理ブロック1〜7を読み出して、書込み先物理ブロックCへと書込む処理を順次行う。ステート1408を終了したときの状態が図19(b)である。
Thereafter, the processes of reading
最後にステート1309で読出し元物理ブロックBを物理消去して処理を終了する。このときの状態が図19(c)である。 Finally, in the state 1309, the read source physical block B is physically erased, and the process is terminated. The state at this time is shown in FIG.
このように従来のホスト102からの論理消去済みの論理ブロックへの書込み処理では、データが0xFFで既書込みであるために、新たな書込み先の物理ブロック(ここでは物理ブロックC)が必要で、その物理ブロックの全ての物理ページに対して書込みを行う必要がある。
As described above, in the writing process to the logically erased logical block from the
この書込み処理に要する時間も、消去時間と同様で、265μs×8×7+360μs×8×8+2ms=39880μs、となり39880μsかかる。つまり16kB書込むために39880μsかかるので約0.4MB/secの書込み速度となる。 The time required for this writing process is the same as the erasing time, which is 265 μs × 8 × 7 + 360 μs × 8 × 8 + 2 ms = 39880 μs, and it takes 39880 μs. That is, since it takes 39880 μs to write 16 kB, the writing speed is about 0.4 MB / sec.
以上の消去・書込み処理を基に、実際の使用例としてホスト102から複数のファイルの書込みがあり、その後一部のファイルを消去して、さらに新しいファイルの書込みを行う場合の処理について説明する。
Based on the above erasure / write processing, a description will be given of processing in the case where a plurality of files are written from the
図9〜13は、ホスト102からメモリーカード101への書込み、消去処理の過程を示した図である。まず図9では論理グループ9の最後の論理ブロックにはファイル1が書込まれているが、論理グループ10〜12までは消去済みの状態を示している。
9 to 13 are diagrams showing a process of writing and erasing from the
この状態からまず論理グループ10の論理ブロック80〜82に容量48kBのファイル1を書込みした状態が図10である。
FIG. 10 shows a state in which the
以降、論理ブロックの番号順に容量16kBのファイル2、容量64kBのファイル3、容量96kBのファイル4、容量16kBのファイル5、容量64kBのファイル6、容量64kBのファイル7、容量16kBのファイル8と書込んだ後の状態が図11である。 Thereafter, file 2 having a capacity of 16 kB, file 3 having a capacity of 64 kB, file 4 having a capacity of 96 kB, file 5 having a capacity of 16 kB, file 6 having a capacity of 64 kB, file 7 having a capacity of 64 kB, and file 8 having a capacity of 16 kB are written. FIG. 11 shows the state after the insertion.
この状態からファイル2,5,8を消去すると論理ブロック83,94,103が論理消去される。
When the files 2, 5, and 8 are erased from this state, the
次に容量48kBのファイル9を書込むと一般的に空いている論理ブロックを前から埋めていくので論理ブロック83,94,103に対してファイル9のデータを書込む。
Next, when the file 9 having a capacity of 48 kB is written, the vacant logical block is generally filled from the front, so the data of the file 9 is written into the
この図9〜13に示した実際の使用例において、従来の書込み消去処理ではフラッシュメモリ103内部で物理的にどのように処理されているかを、図21〜23を用いて説明する。
In the actual usage example shown in FIGS. 9 to 13, how the
図11の状態に相当するのが図21である。論理グループ10のデータが物理ブロックA1に書込まれ、論理グループ11のデータが物理ブロックA2に書込まれ、論理グループ12のデータが物理ブロックA3に書込まれている。また物理ブロックB1,B2,B3,C1,C2,C3が消去済みブロックとして存在している。 FIG. 21 corresponds to the state of FIG. Data of the logical group 10 is written to the physical block A1, data of the logical group 11 is written to the physical block A2, and data of the logical group 12 is written to the physical block A3. Physical blocks B1, B2, B3, C1, C2, and C3 exist as erased blocks.
この後、ファイル2,5,8を消去して図12の状態になった時のフラッシュメモリ103内部での物理状態を示したのが図22である。図17で説明した処理と同様の処理を行うことにより物理ブロックA1,A2,A3のデータはファイル2,5,8のみ論理消去されたデータ0xFFに置き換えられて物理ブロックB1,B2,B3に移動する。
FIG. 22 shows the physical state in the
さらにファイル9を書込んだ後の図13の状態になった時のフラッシュメモリ103内部の物理状態を示したのが図23である。物理ブロックB1,B2,B3で論理消去されていた位置にファイル9が入り物理ブロックC1,C2,C3に移動している。
Further, FIG. 23 shows a physical state in the
以上のように、図9〜13に示した実際の使用例において、従来の消去書込み方法では6つの物理ブロック(物理ブロックB1,B2,B3,C1,C2,C3)にデータを書込み、6つの物理ブロック(物理ブロックA1,A2,A3,B1,B2,B3)を物理消去する必要がある。 As described above, in the actual use examples shown in FIGS. 9 to 13, the conventional erasing / writing method writes data to six physical blocks (physical blocks B1, B2, B3, C1, C2, C3), It is necessary to physically erase the physical blocks (physical blocks A1, A2, A3, B1, B2, B3).
同様の概念を開示するものとして、特許文献1がある。これには、データ書換えに関するブロック内データの整理方法についての記載がある。
上記の様に従来の不揮発性メモリの消去・書込み方法においては、消去又は書込みを行う論理ブロックの容量以上に消去・書込みが必要であり、処理時間が長く、また必要となる物理ブロックの数も多いという課題が存在していた。 As described above, the conventional nonvolatile memory erasing / writing method requires erasing / writing more than the capacity of the logical block to be erased or written, the processing time is long, and the number of physical blocks required There were many issues.
上記課題を解決するために、本発明の不揮発性記憶装置の消去方法は、不揮発性メモリとコントローラとを備え、不揮発性メモリは独立して消去可能な物理ブロックの複数からなり、外部からの消去に対して消去対象のデータが含まれる物理ブロックのデータのうち消去対象のデータを除く残りのデータを新たな消去済みの物理ブロックに書き移すことを特徴とする。 In order to solve the above-described problems, a nonvolatile memory device erasing method of the present invention includes a nonvolatile memory and a controller, and the nonvolatile memory includes a plurality of independently erasable physical blocks, and is erased from the outside. On the other hand, the remaining data excluding the data to be erased among the data of the physical block including the data to be erased is transferred to a new erased physical block.
また本発明の不揮発性記憶装置の書込み方法は、不揮発性メモリとコントローラとを備え、不揮発性メモリは独立して消去可能な物理ブロックの複数からなり、物理ブロックは独立して書込み可能な複数のページからなり、コントローラは不揮発性メモリのデータを物理ブロックと同容量単位の論理グループと、論理グループに複数が含まれる論理ブロックに分割して管理し、外部からの書込みに対して書込み対象のデータが含まれる論理ブロックのデータが書込まれた物理ブロックの未書込みである物理ページに対して書込みを行うことを特徴とする。 The non-volatile memory device writing method of the present invention includes a non-volatile memory and a controller, and the non-volatile memory includes a plurality of independently erasable physical blocks, and the physical block includes a plurality of independently writable multiple blocks. The controller consists of pages, and the controller manages the data in the nonvolatile memory by dividing it into logical groups with the same capacity unit as the physical block and logical blocks that include multiple logical groups. Is written to a physical page that has not been written to the physical block in which the data of the logical block including the data is written.
ホストからのデータを消去するの処理時間を短くすることができる、またホストからデータを書込む処理時間を短くすることができるとともに書込み処理の際に必要となるフラッシュメモリの物理ブロックの数が少なくてすむので書き回数の向上も見込まれるという効果が得られる。 The processing time for erasing data from the host can be shortened, the processing time for writing data from the host can be shortened, and the number of physical blocks in the flash memory required for writing processing is small As a result, the number of times of writing can be expected to be improved.
本発明は、不揮発性メモリと、コントローラとを有し、外部から与えられる論理アドレスに基づいて前記不揮発性メモリに、データの書込み、消去および読み出しを行う不揮発性記憶装置であって、前記不揮発性メモリは、複数の独立して消去可能な物理ブロックから成り、前記各物理ブロックは独立して書込み可能な複数のページから成り、前記コントローラは、外部から与えられる論理アドレスに対するデータの消去を行う際に、消去を行うデータを消去対象データとし、前記消去対象データが書込まれている前記不揮発性メモリの前記物理ブロックを決定し旧データブロックとし、前記旧データブロックのデータの中から前記消去対象データを除いた残りのデータのみを新たな消去済み物理ブロックに書き写し、前記新たな消去済み物理ブロックに前記消去対象データを同じ容量の未書込み領域に残すことを特徴とした不揮発性記憶装置である。 This onset Ming has a non-volatile memory, and a controller, in the non-volatile memory based on the logical address given from the outside, a non-volatile memory device which performs data writing, erasing and reading, the non The volatile memory is composed of a plurality of independently erasable physical blocks, each physical block is composed of a plurality of independently writable pages, and the controller erases data for a logical address given from the outside. The data to be erased is the data to be erased, the physical block of the non-volatile memory in which the data to be erased is written is determined as an old data block, and the data from the old data block is erased Only the remaining data excluding the target data is copied to a new erased physical block, and the newly erased data The erasing target data block which is a nonvolatile storage device is characterized in that leave the unwritten region of the same capacity.
また、本発明は、不揮発性メモリと、コントローラとを有し、外部から与えられる論理アドレスに基づいて前記不揮発性メモリに、データの書込み、消去および読み出しを行う不揮発性記憶装置であって、前記不揮発性メモリは、複数の独立して消去可能な物理ブロックから成り、前記各物理ブロックは独立して書込み可能な複数のページから成り、前記コントローラは、外部から与えられる論理アドレスを前記物理ブロックと同じ容量である論理グループと、前記論理グループに含まれる複数の論理ブロックに分割して管理し、外部から与えられる論理アドレスに対するデータの書込みを行う際に、書込みを行うデータを書込み対象データとし、前記書込み対象データの論理アドレスから、書込み対象データが含まれる論理グループを書込み対象論理グループとし、前記書込み対象論理グループのデータが書込まれている物理ブロックを書込み対象物理ブロックとし、前記書込み対象物理ブロックのうち未書込みである物理ページに対して、前記書込み対象データを書込むことを特徴とした不揮発性記憶装置である。 In addition, the present invention is a nonvolatile memory device that includes a nonvolatile memory and a controller, and writes, erases, and reads data in and from the nonvolatile memory based on a logical address given from the outside, The non-volatile memory is composed of a plurality of independently erasable physical blocks, each physical block is composed of a plurality of independently writable pages, and the controller uses a logical address given from the outside as the physical block. A logical group having the same capacity and a plurality of logical blocks included in the logical group are managed, and when writing data to a logical address given from the outside, the data to be written is set as data to be written, Write the logical group containing the data to be written from the logical address of the data to be written The write target physical block is the physical block in which the data of the write target logical group is written as the target logical group, and the write target data is written to the unwritten physical page of the write target physical block. A nonvolatile memory device.
また、本発明は、複数の独立して消去可能な物理ブロックから成り、前記各物理ブロックは独立して書込み可能な複数のページから成り、外部から与えられる論理アドレスに基づいて、データの書込み、消去および読み出しが行われる不揮発性メモリの消去方法であって、外部から与えられる論理アドレスに対するデータの消去を行う際に、消去を行うデータを消去対象データとし、前記消去対象データが書込まれている前記不揮発性メモリの前記物理ブロックを決定し旧データブロックとし、前記旧データブロックのデータの中から前記消去対象データを除いた残りのデータのみを新たな消去済み物理ブロックに書き写し、前記新たな消去済み物理ブロックに前記消去対象データを同じ容量の未書込み領域に残すことを特徴とした不揮発性メモリの消去方法である。 Further, the present invention comprises a plurality of independently erasable physical blocks, each physical block comprising a plurality of independently writable pages, and data writing based on a logical address given from the outside, A method for erasing a nonvolatile memory in which erasing and reading are performed. When erasing data for a logical address given from the outside, the erasing data is set as erasing target data, and the erasing target data is written The physical block of the non-volatile memory is determined as an old data block, and only the remaining data excluding the data to be erased from the data of the old data block is copied to a new erased physical block, and the new data block Non-volatile, characterized in that the data to be erased is left in an unwritten area of the same capacity in an erased physical block It is a method of erasing a memory.
また、本発明は、複数の独立して消去可能な物理ブロックから成り、前記各物理ブロックは独立して書込み可能な複数のページから成り、外部から与えられる論理アドレスに基づいて、データの書込み、消去および読み出しが行われる不揮発性メモリの書込み方法であって、外部から与えられる論理アドレスを前記物理ブロックと同じ容量である論理グループと、前記論理グループに含まれる複数の論理ブロックに分割して管理し、外部から与えられる論理アドレスに対するデータの書込みを行う際に、書込みを行うデータを書込み対象データとし、前記書込み対象データの論理アドレスから、書込み対象データが含まれる論理グループを書込み対象論理グループとし、前記書込み対象論理グループのデータが書込まれている物理ブロックを書込み対象物理ブロックとし、前記書込み対象物理ブロックのうち未書込みである物理ページに対して、前記書込み対象データを書込むことを特徴とした不揮発性メモリの書込み方法である。 Further, the present invention comprises a plurality of independently erasable physical blocks, each physical block comprising a plurality of independently writable pages, and data writing based on a logical address given from the outside, A non-volatile memory writing method in which erasure and reading are performed, and a logical address given from outside is divided into a logical group having the same capacity as the physical block and a plurality of logical blocks included in the logical group for management When writing data to a logical address given from the outside, the data to be written is set as the write target data, and the logical group including the write target data from the logical address of the write target data is set as the write target logical group. , The physical block in which the data of the write target logical group is written A write target physical block, the physical page is not written out of the write target physical block, which is the write target data and wherein the writing of the nonvolatile memory writing method.
以下、本発明の実施の形態による不揮発性記憶装置および不揮発性メモリの消去方法、書込み方法について、図面を用いて説明する。 Hereinafter, a nonvolatile memory device and a nonvolatile memory erasing method and writing method according to embodiments of the present invention will be described with reference to the drawings.
(実施の形態1)
図1〜図4は本実施の形態における不揮発性記憶装置、フラッシュメモリの構成を示すブロック図と概念図であるが、従来例で説明したものと同様であるので、その説明を割愛する。
(Embodiment 1)
1 to 4 are a block diagram and a conceptual diagram showing configurations of a nonvolatile memory device and a flash memory according to the present embodiment, which are the same as those described in the conventional example, and a description thereof will be omitted.
まず、ホスト102からの論理ブロックのデータの消去について説明する。
First, erasing of logical block data from the
図5、6は、ホスト102がメモリーカード101のある論理ブロック402のデータを論理的に消去する際における、メモリーカード101内部の動作を表した説明図とそのフローチャートである。「論理的に消去する」とはメモリーカード101からホスト102がデータを読み出したときに全て0xFFデータが読み出せるようにすることであり、メモリーカード101のフラッシュメモリ103具体的にはホスト102は論理グループ0の論理ブロック2のデータを消去する場合を表している。
FIGS. 5 and 6 are explanatory diagrams and flowcharts showing the internal operation of the
まずフローチャートの書込み開始時点はメモリーカード101内のフラッシュメモリ103の物理ブロックAに論理グループ0に所属する論理ブロック0〜7のデータが書込み済み、また、書換えのためのブロックとして消去済みの物理ブロックBがあり、図5(a)の状態に相当する。
First, at the writing start time of the flowchart, the data of the logical blocks 0 to 7 belonging to the logical group 0 has been written in the physical block A of the
次にステート601で読出し元物理ブロックAから論理ブロック0を読み出して書込み先物理ブロックBへ書込む、ステート602で読出し元物理ブロックAから論理ブロック1を読み出して書込み先物理ブロックBへ書込む。
Next, in
ホスト102が消去しようとしている論理ブロック2に関しては書込み先物理ブロックBへは書込まない。
The logical block 2 to be erased by the
以降、ステート603〜607まで読出し元物理ブロックAから論理ブロック3〜7を読み出して、書込み先物理ブロックBへと書込む処理を順次行う。ステート607を終了したときの状態が図5(b)である。
Thereafter, the logical blocks 3 to 7 are read from the read source physical block A to the
最後にステート608で読出し元物理ブロックAを物理消去して処理を終了する。このときの状態が図5(c)である。
Finally, in the
このようにホスト102からの消去処理では書込み先の物理ブロックのうち消去を行うページを除いた全ての物理ページにのみ書込みを行うだけでよい。
In this way, in the erasure process from the
このデータの消去処理に要する時間は、1ページの読み出しにかかる時間が265μs(読出し可能になるまでのビジー時間25μs+読み出しのためのデータ転送時間240μs)、1ページの書込みにかかる時間が360μs(書込みのためのデータ転送時間160μs+書込みに要する時間200μs)、1ブロックを消去する時間2msから、265μs×8×7+360μs×8×7+2ms=37000μs、となり37000μsかかる。 The time required for this data erasing process is that the time required for reading one page is 265 μs (the busy time 25 μs until reading is possible + the data transfer time 240 μs for reading), and the time required for writing one page is 360 μs (writing Data transfer time 160 μs + time required for writing 200 μs). From 2 ms to erase one block, it takes 265 μs × 8 × 7 + 360 μs × 8 × 7 + 2 ms = 37000 μs, and takes 37000 μs.
次にホスト102から、先ほど消去した論理ブロックに対するデータの書込みについて説明する。
Next, data writing from the
図7、8はホスト102がメモリーカード101の先ほど消去した論理ブロック402に対してデータを書込む際における、メモリーカード101内部の動作を表した図とそのフローチャートである。
FIGS. 7 and 8 are a diagram and a flowchart showing the internal operation of the
まずフローチャートの書込み開始時点はメモリーカード101内のフラッシュメモリ103の物理ブロックBに論理グループ0に所属する論理ブロック0〜7のうち論理消去を行った0,1,3〜7データが書込み済みであり、そのうち論理ブロック2と同じ容量の消去済み領域が残されている。図7(a)の状態に相当する。
First, at the writing start time of the flowchart, 0, 1, 3 to 7 data which have been logically erased among the logical blocks 0 to 7 belonging to the logical group 0 are already written in the physical block B of the
最初のステート801でホストから送られてくる論理ブロック2に該当する書込みデータを書込み先論理ブロックBの未書込みである領域に書込み処理を終える。このときの状態が図7(b)である。
Write processing for the write data corresponding to the logical block 2 sent from the host in the
この書込み処理に要する時間も、消去時間と同様で、360μs×8=2880μs、となり360μsですむ。つまり16KB書込むために2880μsかかるので約5.4MB/secの書込み速度となる。 The time required for the writing process is 360 μs × 8 = 2880 μs, which is the same as the erasing time. That is, since it takes 2880 μs to write 16 KB, the writing speed is about 5.4 MB / sec.
以上の消去・書込み処理を基に、図9〜13に示すような実際の使用例としてホスト102から複数のファイルの書込みがあり、その後一部のファイルを消去して、さらに新しいファイルの書込みを行う場合の処理について説明する。
Based on the above erasure / write processing, as an actual use example as shown in FIGS. 9 to 13, there are writing of a plurality of files from the
図9〜13の詳細は従来例で説明したものと同様であるので、説明を割愛する。 The details of FIGS. 9 to 13 are the same as those described in the conventional example, and thus the description thereof is omitted.
この図9に示した実際の使用例において、従来の書込み消去処理ではフラッシュメモリ103内部で物理的にどのように処理されているかを、図14〜16を用いて説明する。
In the actual use example shown in FIG. 9, how the
図11の状態に相当するのが図14である。論理グループ10のデータが物理ブロックA1に書込まれ、論理グループ11のデータが物理ブロックA2に書込まれ、論理グループ12のデータが物理ブロックA3に書込まれている。また物理ブロックB1,B2,B3が消去済みブロックとして存在している。 FIG. 14 corresponds to the state of FIG. Data of the logical group 10 is written to the physical block A1, data of the logical group 11 is written to the physical block A2, and data of the logical group 12 is written to the physical block A3. In addition, physical blocks B1, B2, and B3 exist as erased blocks.
この後、ファイル2,5,8を消去して図12の状態になった時のフラッシュメモリ103内部での物理状態を示したのが図15である。図5で説明した処理と同様の処理を行うことにより物理ブロックA1,A2,A3のデータはファイル2,5,8と同じ容量の領域がそれぞれ物理ブロックB1,B2,B3に残されている。
FIG. 15 shows the physical state in the
さらにファイル9を書込んだ後の図13の状態になった時のフラッシュメモリ103内部の物理状態を示したのが図16である。物理ブロックB1,B2,B3で未書込みであった物理位置にファイル9が書込まれている。
FIG. 16 shows the physical state inside the
以上のように、図9〜13に示した実際の使用例において、従来の消去書込み方法では3つの物理ブロック(物理ブロックB1,B2,B3)にデータを書込み、3つの物理ブロック(物理ブロックA1,A2,A3)を物理消去する必要がある。 As described above, in the actual use examples shown in FIGS. 9 to 13, in the conventional erasing and writing method, data is written in three physical blocks (physical blocks B1, B2, and B3), and three physical blocks (physical block A1). , A2, A3) need to be physically erased.
以上、本発明の不揮発性記憶装置の消去方法によれば、内部に搭載したフラッシュメモリの消去サイズよりも小さなサイズのホストからの論理消去のコマンドに対して、ホストからの論理消去対象のデータが書込まれている物理ブロック内の論理消去対象以外のデータを別の物理ブロックに移して、論理消去対象のデータ部分に関しては未書込みの消去状態のままにして置き、0xFFデータの書込み処理を行わないことにより、論理消去に要する時間を従来に比べて高速に行うことができる。 As described above, according to the erase method of the nonvolatile storage device of the present invention, in response to a logical erase command from the host having a size smaller than the erase size of the flash memory mounted therein, the data to be logically erased from the host Data other than the logical erase target in the written physical block is moved to another physical block, and the data part to be logically erased is left in an unwritten erase state, and 0xFF data is written. Therefore, the time required for logical erasure can be increased at a higher speed than in the prior art.
また本発明の不揮発性記憶装置の書込み方法によれば、ホストからのデータ書込み時に、従来のように新たな消去済みの物理ブロックに対して書込みを行うのではなく、論理消去後の未書込み領域に対して新たな書込みデータを書込むことにより、書込み処理を従来に比べて格段に高速に、またその書込み処理の際に必要となるフラッシュメモリの物理ブロックの数をより少なく処理することができる。 Further, according to the nonvolatile memory device writing method of the present invention, when data is written from the host, a new erased physical block is not written as in the prior art, but an unwritten area after logical erase is performed. By writing new write data, the write process can be performed much faster than before and the number of physical blocks of flash memory required for the write process can be reduced. .
本発明にかかる不揮発性記憶装置および不揮発性メモリの消去方法および書込み方法は、ホストからのデータを消去するの処理時間を短くすることができ、またホストからデータを書込む処理時間を短くすることができるとともに書込み処理の際に必要となるフラッシュメモリの物理ブロックの数が少なくてすむので書換え寿命の向上も見込まれるという効果を有し、フラッシュメモリ等の不揮発性メモリを使用した不揮発性記憶装置と、不揮発性メモリの消去および書込み方法、この方法を用いたメモリーカード、電子機器などとして有用である。 The nonvolatile memory device and nonvolatile memory erasing method and writing method according to the present invention can shorten the processing time for erasing data from the host, and shorten the processing time for writing data from the host. A nonvolatile memory device using a non-volatile memory such as a flash memory, which can reduce the number of physical blocks of the flash memory required for the writing process and can improve the rewrite life. It is useful as a method for erasing and writing a nonvolatile memory, a memory card using this method, an electronic device, and the like.
101 メモリーカード
102 ホスト
103 フラッシュメモリ
104 コントローラ
105 消去済テーブル
106 論物変換テーブル
201 物理ブロック
301 物理ページ
302 部分物理ブロック
401 論理グループ
402 論理ブロック
101
Claims (4)
前記不揮発性メモリは、複数の独立して消去可能な物理ブロックから成り、前記物理ブロックは独立して書込み可能な複数の物理ページから成り、前記物理ページは所定数単位で部分物理ブロックから成り、
前記コントローラは、外部から与えられる論理アドレスに対するデータの消去を行う際に、消去を行うデータを消去対象データとし、前記消去対象データが書込まれている前記不揮発性メモリの前記物理ブロックを決定し旧データブロックとし、前記旧データブロックのデータの中から前記消去対象データを除いた残りのデータのみを新たな消去済み物理ブロックの部分物理ブロックに先頭から順に書き写し、前記新たな消去済み物理ブロックに前記消去対象データと同じ容量の未書込み領域を残すことを特徴とする不揮発性記憶装置。 A non-volatile memory device having a non-volatile memory and a controller, and writing, erasing and reading data to and from the non-volatile memory based on a logical address given from outside,
Wherein the nonvolatile memory comprises a plurality of independently erasable physical block, before Symbol physics blocks Ri consists independently writable plurality of physical pages, the physical page is part physical block at a predetermined number of units Consisting of
When erasing data for a logical address given from the outside, the controller determines data to be erased as data to be erased and determines the physical block of the nonvolatile memory in which the data to be erased is written. As an old data block, only the remaining data excluding the data to be erased from the data of the old data block is copied in order from the top to the partial physical block of the new erased physical block, and the new erased physical block is copied. A non-volatile memory device, wherein an unwritten area having the same capacity as the data to be erased is left.
外部から与えられる論理アドレスに対するデータの消去を行う際に、消去を行うデータを消去対象データとし、前記消去対象データが書込まれている前記不揮発性メモリの前記物理ブロックを決定し旧データブロックとし、前記旧データブロックのデータの中から前記消去対象データを除いた残りのデータのみを新たな消去済み物理ブロックの部分物理ブロックに先頭から順に書き写し、前記新たな消去済み物理ブロックに前記消去対象データと同じ容量の未書込み領域を残すことを特徴とする不揮発性メモリの書込み・消去方法。 It is composed of a plurality of independently erasable physical blocks, each physical block is composed of a plurality of independently writable physical pages, the physical page is composed of partial physical blocks in a predetermined number of units, and is given from outside A nonvolatile memory writing / erasing method in which data is written, erased and read based on an address,
When erasing data for a logical address given from the outside, the data to be erased is the data to be erased, and the physical block of the nonvolatile memory in which the data to be erased is written is determined as the old data block Only the remaining data excluding the data to be erased from the data in the old data block is copied in order from the top to the partial physical block of the new erased physical block, and the data to be erased is written in the new erased physical block. A method for writing / erasing a non-volatile memory, wherein an unwritten area having the same capacity as that is left is left.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004152790A JP4661086B2 (en) | 2004-05-24 | 2004-05-24 | Nonvolatile memory device and nonvolatile memory erasing and writing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004152790A JP4661086B2 (en) | 2004-05-24 | 2004-05-24 | Nonvolatile memory device and nonvolatile memory erasing and writing method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005338897A JP2005338897A (en) | 2005-12-08 |
JP4661086B2 true JP4661086B2 (en) | 2011-03-30 |
Family
ID=35492443
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004152790A Expired - Fee Related JP4661086B2 (en) | 2004-05-24 | 2004-05-24 | Nonvolatile memory device and nonvolatile memory erasing and writing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4661086B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100180072A1 (en) * | 2007-06-22 | 2010-07-15 | Shigekazu Kogita | Memory controller, nonvolatile memory device, file system, nonvolatile memory system, data writing method and data writing program |
US10186599B1 (en) * | 2017-07-20 | 2019-01-22 | International Business Machines Corporation | Forming self-aligned contact with spacer first |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0757481A (en) * | 1993-08-06 | 1995-03-03 | Brother Ind Ltd | Storage device |
JPH0997205A (en) * | 1995-09-28 | 1997-04-08 | Canon Inc | Method, device for managing flash rom and computer control equipment |
JPH10124384A (en) * | 1996-08-28 | 1998-05-15 | Toshiba Corp | Method for controlling non-volatile semiconductor memory |
JPH1139210A (en) * | 1997-07-23 | 1999-02-12 | Casio Comput Co Ltd | Memory controller for flash memory |
JP2000076116A (en) * | 1998-08-31 | 2000-03-14 | Kano Densan Hongkong Yugenkoshi | Electronic device, control method therefor and storage medium |
JP2001188701A (en) * | 1999-10-21 | 2001-07-10 | Matsushita Electric Ind Co Ltd | Accessing device for semiconductor memory card and computer readable recording medium and initializing method and semiconductor memory card |
US6587915B1 (en) * | 1999-09-29 | 2003-07-01 | Samsung Electronics Co., Ltd. | Flash memory having data blocks, spare blocks, a map block and a header block and a method for controlling the same |
JP2004038236A (en) * | 2002-06-28 | 2004-02-05 | Seiko Epson Corp | Information processor and program therefor |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7254668B1 (en) * | 2002-10-28 | 2007-08-07 | Sandisk Corporation | Method and apparatus for grouping pages within a block |
-
2004
- 2004-05-24 JP JP2004152790A patent/JP4661086B2/en not_active Expired - Fee Related
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0757481A (en) * | 1993-08-06 | 1995-03-03 | Brother Ind Ltd | Storage device |
JPH0997205A (en) * | 1995-09-28 | 1997-04-08 | Canon Inc | Method, device for managing flash rom and computer control equipment |
JPH10124384A (en) * | 1996-08-28 | 1998-05-15 | Toshiba Corp | Method for controlling non-volatile semiconductor memory |
JPH1139210A (en) * | 1997-07-23 | 1999-02-12 | Casio Comput Co Ltd | Memory controller for flash memory |
JP2000076116A (en) * | 1998-08-31 | 2000-03-14 | Kano Densan Hongkong Yugenkoshi | Electronic device, control method therefor and storage medium |
US6587915B1 (en) * | 1999-09-29 | 2003-07-01 | Samsung Electronics Co., Ltd. | Flash memory having data blocks, spare blocks, a map block and a header block and a method for controlling the same |
JP2001188701A (en) * | 1999-10-21 | 2001-07-10 | Matsushita Electric Ind Co Ltd | Accessing device for semiconductor memory card and computer readable recording medium and initializing method and semiconductor memory card |
JP2004038236A (en) * | 2002-06-28 | 2004-02-05 | Seiko Epson Corp | Information processor and program therefor |
Also Published As
Publication number | Publication date |
---|---|
JP2005338897A (en) | 2005-12-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5002201B2 (en) | Memory system | |
US7702846B2 (en) | Memory controller, nonvolatile storage device, nonvolatile storage system, and data writing method | |
US5953737A (en) | Method and apparatus for performing erase operations transparent to a solid state storage system | |
US8046530B2 (en) | Process and method for erase strategy in solid state disks | |
US20150186224A1 (en) | Data storage device and flash memory control method | |
US20100082878A1 (en) | Memory controller, nonvolatile storage device, nonvolatile storage system, and data writing method | |
JP5166118B2 (en) | Method for controlling semiconductor memory | |
US20090259796A1 (en) | Data writing method for non-volatile memory and storage system and controller using the same | |
US8271721B2 (en) | Data writing method and data storage device | |
JPWO2007116476A1 (en) | Memory card and data writing method | |
US20090210612A1 (en) | Memory controller, nonvolatile memory device, and nonvolatile memory system | |
US20100180072A1 (en) | Memory controller, nonvolatile memory device, file system, nonvolatile memory system, data writing method and data writing program | |
JP4308780B2 (en) | Semiconductor memory device, memory controller, and data recording method | |
US8176231B2 (en) | Methods for handling data updating of flash memory and related memory cards | |
CN110286848B (en) | Data processing method and device | |
JP4661086B2 (en) | Nonvolatile memory device and nonvolatile memory erasing and writing method | |
JP2008084184A (en) | Memory controller | |
JP2006252137A (en) | Optimization method for nonvolatile storage device | |
CA2619190C (en) | Information storage device and stored data processing method | |
US20050204115A1 (en) | Semiconductor memory device, memory controller and data recording method | |
JP2005292925A (en) | Memory controller, flash memory system, and control method for flash memory | |
JP2006277736A (en) | Writing method of nonvolatile storage device | |
JP2006244017A (en) | Data copy method | |
JP2005174468A (en) | Access control method of flash memory | |
JP2007304920A (en) | Flash memory control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070521 |
|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20070613 |
|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20091120 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100722 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100803 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100913 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20101207 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20101220 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140114 Year of fee payment: 3 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313113 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |