JP2008146255A - Storage device, computer system, and data processing method for storage device - Google Patents
Storage device, computer system, and data processing method for storage device Download PDFInfo
- Publication number
- JP2008146255A JP2008146255A JP2006331099A JP2006331099A JP2008146255A JP 2008146255 A JP2008146255 A JP 2008146255A JP 2006331099 A JP2006331099 A JP 2006331099A JP 2006331099 A JP2006331099 A JP 2006331099A JP 2008146255 A JP2008146255 A JP 2008146255A
- Authority
- JP
- Japan
- Prior art keywords
- data
- flash memory
- memory device
- page
- write pointer
- 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
Links
Images
Abstract
Description
本発明は、不揮発性メモリを含む記憶装置およびコンピュータシステム、並びに記憶装置のデータ処理方法に関するものである。 The present invention relates to a storage device including a non-volatile memory, a computer system, and a data processing method for the storage device.
近年、デジタルスチルカメラやモバイルコンピュータ機器の記憶媒体として、フラッシュメモリが注目されている。 In recent years, flash memory has attracted attention as a storage medium for digital still cameras and mobile computer devices.
フラッシュメモリは、トンネリングやホットエレクトロン加速を用いて、電子にゲート絶縁膜を通過させ、それらを浮遊ゲートやトラップ層に注入し、セルトランジスタの閾値を変化させることでデータを記憶させる半導体メモリである。積層ゲート構造やMNOS構造等を用いたトランジスタ1つのみでメモリセルを構成できるため、安価かつ大容量のメモリを実現できる。
その代表例として、NAND型フラッシュメモリが挙げられる。
Flash memory is a semiconductor memory that uses tunneling or hot electron acceleration to pass electrons through a gate insulating film, inject them into a floating gate or trap layer, and store data by changing the threshold value of a cell transistor. . Since a memory cell can be configured with only one transistor using a stacked gate structure, an MNOS structure, or the like, an inexpensive and large-capacity memory can be realized.
A typical example is a NAND flash memory.
図1は、NAND型フラッシュメモリの内部構成例を示す図である。
図1のNAND型フラッシュメモリは、ビット線BL1〜BLnに接続された複数のメモリユニット1−1〜1−nがアレイ状に(縦横)に配列されている。
たとえば、選択用トランジスタ2のゲートが選択ゲート線SL1に接続され、選択用トランジスタ3のゲートが選択ゲート線SL2に接続されている。また、各メモリセルN0〜N15のゲートがワード線WL0〜WL15に接続されている。
FIG. 1 is a diagram illustrating an internal configuration example of a NAND flash memory.
In the NAND flash memory of FIG. 1, a plurality of memory units 1-1 to 1-n connected to bit lines BL1 to BLn are arranged in an array (vertically and horizontally).
For example, the gate of the selection transistor 2 is connected to the selection gate line SL1, and the gate of the
各メモリセルN0〜N15は積層ゲート構造を持ち、浮遊ゲートへの電荷蓄積量に従ってデータを記憶する。すなわち、浮遊ゲートに多くの電子が蓄積されていると、トランジスタの閾値が上昇するので、チャージされたビット線BL1〜BLnからのメモリユニット1(−1〜−n)への電流貫通の有無を、センスアンプ等を含むアクセス回路4で検出してデータ判定を行う。
Each of the memory cells N0 to N15 has a stacked gate structure, and stores data according to the charge accumulation amount in the floating gate. That is, if many electrons are accumulated in the floating gate, the threshold value of the transistor rises. Therefore, whether or not current is passed from the charged bit lines BL1 to BLn to the memory units 1 (-1 to -n) is checked. The data is determined by detection by the
このようなNAND型フラッシュメモリは、メモリセル毎にビット線へのコンタクト領域を設ける必要もないので、特に大容量で安価な記憶装置の媒体に適している。 Such a NAND flash memory is not particularly required to provide a contact area to the bit line for each memory cell, and is particularly suitable for a medium of a large capacity and inexpensive storage device.
ところで、一般にフラッシュメモリのプログラム速度は非常に遅く、セルあたり数百マイクロ(μ)秒を必要とする。またデータの上書きはできないので、プログラムに先立って消去を行う必要があり、これには数m秒もの時間がかかる。このような問題に対しては、多くのメモリセルを並列処理することで対処している。 By the way, generally, the programming speed of the flash memory is very slow and requires several hundred micro (μ) seconds per cell. Further, since data cannot be overwritten, it is necessary to erase data prior to programming, which takes several milliseconds. Such a problem is dealt with by processing many memory cells in parallel.
すなわち、たとえば同一ワード線WL0に接続され、ページ単位を成すメモリセル群5を、同時一括に書き込み、さらに互いにメモリユニットを共有するページ群で構成されるセルブロック6を全て一括で消去することにより、プログラムの転送速度を向上させている。
That is, for example, by simultaneously writing the
具体的には、たとえば非特許文献1には1GbのNAND型フラッシュメモリが掲載されており、ページサイズを2kバイト、消去ブロックサイズを128kBとしている。すなわち、一つのメモリアレイ内で128kバイトのメモリセル群を並列消去し、そこにメモリセルを2kバイト毎に並列でプログラムしていくことによって、10MB/sのプログラム転送速度を実現している。
Specifically, for example, Non-Patent
なお、通常NAND型フラッシュの各ページは、たとえば2kバイトのユーザーデータ格納領域に対して64バイトの予備領域を有している。
この予備領域には、NAND型フラッシュを使用するシステム側で、パリティビット等の各種管理データを格納することが可能である。この予備領域への書き込みは、通常ユーザーデータ領域への書き込みと一括で行なう必要があり、両者は常にセットとして扱われる。
Each page of the normal NAND flash has a 64-byte spare area for a user data storage area of 2 kbytes, for example.
In the spare area, various management data such as parity bits can be stored on the system side using the NAND flash. This writing to the spare area usually needs to be performed at the same time as writing to the user data area, and both are always handled as a set.
ところで、フラッシュメモリの使用において注意すべき制約事項として、消去回数の上限が規定されていることが挙げられる。
同一ブロックの書き換えが繰り返されて、その消去回数が上限値を越えると、該ブロックにおけるデータ保持は保証されなくなる。たとえば上記NAND型フラッシュの消去回数の上限は10万回またはそれ以下である。
今後メモリセルの微細化に伴ってセルトランジスタの閾値ばらつきが増大し、動作マージンが劣化するため、さらに消去回数の上限は低下していく傾向にある。
By the way, a restriction to be noted in using the flash memory is that an upper limit of the number of erasures is defined.
If rewriting of the same block is repeated and the number of erasures exceeds the upper limit value, data retention in the block cannot be guaranteed. For example, the upper limit of the number of erases of the NAND flash is 100,000 times or less.
In the future, the threshold variation of the cell transistor will increase with the miniaturization of the memory cell, and the operation margin will deteriorate, so that the upper limit of the number of times of erasing tends to decrease further.
また、近年微細化に伴う内部構造と書き込みメカニズムの変化から、特にNAND型フラッシュには以下のような制約が新たに課される傾向にある。 Further, due to changes in internal structure and writing mechanism accompanying miniaturization in recent years, the following restrictions tend to be imposed on NAND flash in particular.
まず、ブロック内の各ページの書き込み順序に制約がつくようになった。
すなわち、各ページの書き込みは下位アドレスから上位アドレスへの順方向に制限されており、逆方向の書き込みは禁止されている。たとえば、一旦どこかのページに書き込みを実施したら、同一ブロック内のそれより下位のアドレスが未書き込みの状態でも、そこにデータを書き込むことはできない。
First, the writing order of each page in the block is restricted.
That is, writing of each page is restricted in the forward direction from the lower address to the upper address, and writing in the reverse direction is prohibited. For example, once writing is performed on some page, data cannot be written there even if the lower address in the same block is not yet written.
さらに、各ページの多重書き込みが困難になった。すなわち同一ページ内のデータは2回に分けて書き込むことが出来ない。従って各ページにデータを書き込む前に予備領域の一部のビットを予めマークしたり、データ書き込み後に予備領域にフラグを立てる等、これまでフラッシュメモリの管理に使用されていた各種テクニックが使えない状況になりつつある。
近年、ハードディスクの消費電力の大きさや、シーク時間の長さ、耐衝撃性や携帯性等の問題を解消すべく、フラッシュメモリにその代替が期待されている。
しかし上述の如く、フラッシュメモリにはアクセス単位を大きくしないと高速化できないという欠点がある。また、データの上書きができないので、書き換えには必ず消去が必要であり、その際の消去ブロックはさらに大きい。このようにアクセス単位に対して消去単位が数十倍大きいのは、消去時間が長く、かつ書き込み時に非選択セルにディスターブが生じるフラッシュメモリには一般的な仕様である。
In recent years, an alternative to flash memory is expected to solve problems such as the power consumption of a hard disk, the length of seek time, impact resistance, and portability.
However, as described above, the flash memory has a drawback that the speed cannot be increased unless the access unit is increased. Also, since data cannot be overwritten, erasure is always required for rewriting, and the erase block at that time is even larger. The reason why the erase unit is several tens of times larger than the access unit in this way is a general specification for a flash memory in which the erase time is long and disturbance occurs in unselected cells during writing.
このようなフラッシュメモリの仕様に対応し、小型のデータに関しても高速に書き換えを実施すべく、追記型の記憶システムが提案されている。
このようなシステムにおいては、書き換えは、更新データを空き領域に追記し、元のデータを無効化することで実施される。
より具体的には、ページ単位で論理アドレスを物理アドレスに対応させるアドレス変換テーブルを用い、書き換えは対照データの物理アドレスを変更し、記憶メディアの空き領域に追記することで実施する。
A write-once type storage system has been proposed to cope with such flash memory specifications and to rewrite small data at high speed.
In such a system, rewriting is performed by adding update data to an empty area and invalidating the original data.
More specifically, an address conversion table for associating a logical address with a physical address for each page is used, and rewriting is performed by changing the physical address of the reference data and adding it to an empty area of the storage medium.
たとえば、特許文献1には、アドレス変換テーブルを用いた追記型記憶システムにおける管理方法の詳細が記載されている。図2に一例を示す。
For example,
図2において、21はブロック、22はページ領域、23はページバッファ、24は消去済み空きブロック、25はアドレス変換テーブル、26はページ領域をそれぞれ示している。 In FIG. 2, 21 indicates a block, 22 indicates a page area, 23 indicates a page buffer, 24 indicates an erased empty block, 25 indicates an address conversion table, and 26 indicates a page area.
アドレス変換テーブル25からは、論理ページアドレス(Logical Page Address =LPA)をインデックスとして、対応するページのフラッシュメモリ上のアドレスである物理ページアドレス(Phisical Page Address =PPA)を取得することができる。
たとえば、ホストから指定された論理ページアドレス“0x5502”への書き込みに対して、アドレス変換テーブルを用いてページ単位でアドレス変換を実施し、フラッシュメモリ上の物理ページアドレス“0x6B05”を取得する。これによりブロック21内の対応するページ領域22へアクセスが実施される。
From the address conversion table 25, a physical page address (Physical Page Address = PPA), which is an address on the flash memory of the corresponding page, can be obtained using the logical page address (Logical Page Address = LPA) as an index.
For example, for the write to the logical page address “0x5502” designated by the host, the address conversion is performed in page units using the address conversion table, and the physical page address “0x6B05” on the flash memory is acquired. As a result, the
一方、同ページに更新を行う際には、フラッシュメモリ内で直接かきこめる適当な空きページ領域が検索される。たとえば物理ブロックアドレス“0xAA”に相当する消去済み空きブロック24の先頭ページ領域26が適切な書き込み先として選択された場合、ページ領域22のデータのみがページバッファ23を介して更新され、ページ領域26に書き込まれる。この際論理ページアドレス“0x5502”はページ領域26の物理アドレス“0xAA00”にリマッピングされる。ページ領域22上の旧データは、当面そのまま残して無効扱いとしておく。
On the other hand, when updating the same page, an appropriate empty page area to be directly written in the flash memory is searched. For example, when the
なお、このように無効化されたページが蓄積してくると、ストレージの記憶領域を圧迫する。したがって、適時無効化されたページを多く含むブロックを選択し、そこに回復処理を実施する。
具体的には消去前に有効ページのみを他のブロックに全てコピーし、これに応じて変換テーブルに記載された物理アドレスを書き換え、最後に元ブロックを消去する。これらの作業は、記憶装置の待機時や、システムのアイドル時に実施することで、そのオーバーヘッドをユーザーから隠蔽することができる。
When the invalidated pages are accumulated, the storage area of the storage is compressed. Therefore, a block including many pages invalidated in a timely manner is selected, and the recovery process is performed there.
Specifically, only the valid page is copied to another block before erasure, the physical address written in the conversion table is rewritten accordingly, and finally the original block is erased. These operations are performed when the storage device is waiting or when the system is idle, so that the overhead can be hidden from the user.
このような管理を実施すれば、フラッシュメモリ内に空き領域が存在する限りは、各ページデータの更新に対して1ページ分のデータ書き込みで良い。したがって、高速に書き換えを実施することができる。その間消去の必要も無いので、フラッシュメモリの書き換え回数も大幅に低減でき、その寿命も向上させることができる。 If such management is performed, as long as an empty area exists in the flash memory, data for one page may be written for each page data update. Therefore, rewriting can be performed at high speed. Since there is no need for erasure during that time, the number of times the flash memory is rewritten can be greatly reduced, and its life can be improved.
ところで、このような記憶装置においては、その内部管理において各データの新旧を判定する必要がしばしば発生する。
たとえば、更新された後の旧データが無効であることを判定する手段としては、かつては無効化されたページ領域の冗長部分に追記の形でフラグを立てていた。
By the way, in such a storage device, it is often necessary to determine whether each data is new or old in its internal management.
For example, as means for determining that old data after being updated is invalid, a flag is set in the form of additional writing in the redundant portion of the invalidated page area.
しかし、近年のNAND型等のフラッシュメモリでは、一度書き込んだページ領域に後で重ねてデータを記載することはできない。したがって、データ書き込みと同時に、同じページ領域の冗長部分に、何らかの履歴を記載して、更新後のデータと区別できるようにしておく必要がある。 However, in recent flash memories such as NAND type, it is not possible to write data in a page area that has been written once. Therefore, at the same time as the data writing, it is necessary to describe some history in the redundant portion of the same page area so that it can be distinguished from the updated data.
また、格納データの新旧判定は、ウエアレベリングという作業にも活用することができる。これはメモリ内の各ブロックの消去回数が均一になるように調整する手段である。
フラッシュメモリ内に格納されるデータにはアプリケーションプログラムやオペレーティングシステム(OS)のように書き換え頻度が極めて小さな静的データと、ユーザーデータのように書き換え頻度の大きな動的データとが混在している。
前者が格納されたブロックは殆ど無効化ページが発生しないが、後者のブロックは高頻度で書き換えられて、無効化ページが発生しやすい。
ここで後者のブロックに回復処理が施されると、それらは再び格納領域として開放され、動的なデータが再度格納される可能性が高まる。一方前者のブロックは全く書き換えがなされないまま、放置される。こうして後者のみに書き換えと消去が集中し、消去回数の上限値を越えて不良を発生させてしまう懸念がある。
The new / old determination of stored data can also be used for work called wear leveling. This is means for adjusting the number of erasures of each block in the memory to be uniform.
The data stored in the flash memory is a mixture of static data with a very low rewrite frequency such as an application program or operating system (OS) and dynamic data with a high rewrite frequency such as user data.
The block in which the former is stored hardly generates invalid pages, but the latter block is rewritten frequently, and invalid pages are likely to occur.
Here, when the latter block is subjected to a recovery process, they are released again as storage areas, and the possibility that dynamic data is stored again increases. On the other hand, the former block is left without being rewritten at all. In this way, rewriting and erasing are concentrated only on the latter, and there is a concern that the upper limit of the number of erasures may be exceeded and a defect may occur.
ここで長く書き換えが実施されていないブロックが判別できれば、そのブロックを開放して新たなデータの書き込み領域として提供することで、上記均一化に寄与することが可能である。
しかし、このような格納データの新旧判定に関して、これまで適切な指標は提案されていない。
If a block that has not been rewritten for a long time can be discriminated, it is possible to contribute to the uniformization by releasing the block and providing it as a new data writing area.
However, no appropriate index has been proposed so far for determining whether the stored data is new or old.
本発明は、フラッシュメモリデバイスに格納されたデータの新旧判定が容易に実行でき、簡易なシステムでテーブルの再構築やウエアレベリングが実行でき、保存されたデータの信頼性を向上させることが可能な記憶装置およびコンピュータシステム、並びに記憶装置のデータ処理方法を提供することにある。 The present invention can easily determine whether data stored in a flash memory device is new or old, can perform table reconstruction and wear leveling with a simple system, and can improve the reliability of stored data. To provide a storage device, a computer system, and a data processing method for the storage device.
本発明の第1の観点の記憶装置は、主記憶媒体としてフラッシュメモリデバイスと、第2メモリと、上記フラッシュメモリデバイスと上記第2メモリの制御を行う制御部と、を有し、上記フラッシュメモリデバイスは各々独立した消去領域であるブロックを複数有し、上記第2メモリ内に、消去された未使用ブロックを検出しつつ、上記フラッシュメモリデバイスのアドレス上を規定の順序で循環するライトポインタが設置されており、上記制御部は、上記フラッシュメモリデバイスへのデータ書き込みは上記ライトポインタに沿って実施し、当該書き込みに伴って各データの論理アドレスと上記ライトポインタとの対応を上記第2メモリ上のテーブルに記録し、上記フラッシュメモリデバイスには、上記ライトポインタの循環回数に一意的に対応するカウンタ値を、データと共に記載する。 A storage device according to a first aspect of the present invention includes a flash memory device as a main storage medium, a second memory, and a control unit that controls the flash memory device and the second memory. Each device has a plurality of blocks that are independent erase areas, and a write pointer that circulates in a prescribed order over the address of the flash memory device while detecting an erased unused block in the second memory. The control unit performs data writing to the flash memory device along the write pointer, and associates the logical address of each data with the write pointer with the second memory along with the writing. Record in the table above, the flash memory device is unique to the number of circulation of the write pointer The corresponding counter value, described with the data.
好適には、上記カウンタ値は、装置またはシステムの内部管理において、各データの新旧判定に使用される。 Preferably, the counter value is used for new / old determination of each data in the internal management of the apparatus or system.
好適には、少なくとも上記回数値にも基づいて未消去ブロックを自律的に選択し、上記ブロックのデータを任意の消去済み領域に移動させ、さらに上記ブロックを消去する機能を有する。 Preferably, it has a function of autonomously selecting an unerased block based on at least the number of times, moving the data of the block to an arbitrary erased area, and further erasing the block.
好適には、上記制御部は、一定の書き込みデータ量に応じて上記作業を実行する。 Preferably, the control unit performs the operation according to a certain amount of write data.
好適には、上記制御部は、上記フラッシュメモリデバイスに、論理アドレスを、データと共に記載し、各データに対応する論理アドレスとカウンタ値から、上記テーブルを再構築する機能を有する。 Preferably, the control unit has a function of describing a logical address together with data in the flash memory device and reconstructing the table from the logical address and counter value corresponding to each data.
本発明の第2の観点は、主記憶媒体としてフラッシュメモリデバイスと、第2メモリと、上記フラッシュメモリデバイスと上記第2メモリの制御を行う制御部と、上記フラッシュメモリデバイスのデータにアクセス可能な処理装置と、を有し、上記フラッシュメモリデバイスは各々独立した消去領域であるブロックを複数有し、上記第2メモリ内に、消去された未使用ブロックを検出しつつ、上記フラッシュメモリデバイスのアドレス上を規定の順序で循環するライトポインタが設置されており、上記制御部は、上記フラッシュメモリデバイスへのデータ書き込みは上記ライトポインタに沿って実施し、当該書き込みに伴って各データの論理アドレスと上記ライトポインタとの対応を上記第2メモリ上のテーブルに記録し、上記フラッシュメモリデバイスには、上記ライトポインタの循環回数に一意的に対応するカウンタ値を、データと共に記載する。 According to a second aspect of the present invention, a flash memory device as a main storage medium, a second memory, a control unit for controlling the flash memory device and the second memory, and data in the flash memory device can be accessed. And the flash memory device has a plurality of blocks, each of which is an independent erase area, and detects an unused block erased in the second memory, and detects the address of the flash memory device. A write pointer that circulates in a prescribed order is installed, and the control unit performs data writing to the flash memory device along the write pointer, and the logical address of each data and The correspondence with the write pointer is recorded in the table on the second memory, and the flash memory is recorded. The DEVICES, the counter value uniquely corresponds to the circulation frequency of the write pointer, described along with the data.
本発明の第3の観点は、主記憶媒体としてフラッシュメモリデバイスと、第2メモリと、を有する記憶装置のデータ処理方法であって、上記フラッシュメモリデバイスは各々独立した消去領域であるブロックを複数有し、上記第2メモリ内に、消去された未使用ブロックを検出しつつ、上記フラッシュメモリデバイスのアドレス上を規定の順序で循環するライトポインタが設置されており、上記フラッシュメモリデバイスへのデータ書き込みは上記ライトポインタに沿って実施し、上記書き込みに伴って各データの論理アドレスと上記ライトポインタとの対応を上記第2メモリ上のテーブルに記録し、上記フラッシュメモリデバイスには、上記ライトポインタの循環回数に一意的に対応するカウンタ値を、データと共に記載する。 According to a third aspect of the present invention, there is provided a data processing method for a storage device having a flash memory device and a second memory as main storage media, wherein the flash memory device includes a plurality of blocks each being an independent erase area. A write pointer that circulates in a prescribed order on the address of the flash memory device while detecting an unused block that has been erased in the second memory. Writing is performed along the write pointer, and the correspondence between the logical address of each data and the write pointer is recorded in the table on the second memory along with the writing, and the write pointer is stored in the flash memory device. The counter value uniquely corresponding to the number of circulations is described together with the data.
本発明によれば、フラッシュメモリ内を一定の順序で循環するライトポインタに従ってデータ書き込みを実行し、さらにその累計周回数に対応するカウンタ値を、各データとともにフラッシュメモリの冗長領域に記載する。
同じ循環中の書き込み順序は既定なので、その間の新旧はそれをもとに判定でき、さらに各周回の間の新旧は上記カウンタ値の比較により判定できる。これによりあらゆるデータの新旧をページ単位で判定することが可能である。
さらにこの指標を活用することで、長期間書き換えの無いブロックを開放してウエアレベリングを実行する。あるいは電源瞬断等でアドレス変換テーブルが消失した際、その再構築時の有効データ判定に使用する。
According to the present invention, data writing is executed according to a write pointer that circulates in the flash memory in a fixed order, and a counter value corresponding to the cumulative number of laps is written in the redundant area of the flash memory together with each data.
Since the same writing order in the circulation is predetermined, the old and new during that time can be determined based on that, and the new and old during each lap can be determined by comparing the counter values. As a result, it is possible to determine whether data is new or old on a page basis.
Furthermore, by utilizing this index, wear leveling is executed by releasing blocks that have not been rewritten for a long time. Alternatively, when the address conversion table disappears due to an instantaneous power interruption or the like, it is used for valid data determination at the time of reconstruction.
本発明によれば、フラッシュメモリ内に格納された各ページの新旧判定が容易に実行でき、それを利用して簡易なシステムでテーブルの再構築やウエアレベリングが実行できる。これによって、記憶装置やシステムに保存されたデータの信頼性を大幅に向上させることが可能である。 According to the present invention, it is possible to easily determine whether a page stored in a flash memory is new or old, and use this to perform table reconstruction and wear leveling with a simple system. As a result, the reliability of data stored in the storage device or system can be greatly improved.
以下、本発明の実施形態を図面に関連付けて説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
図3は、本発明の実施形態に係る記憶装置を採用したコンピュータシステムの構成例を示す図である。 FIG. 3 is a diagram illustrating a configuration example of a computer system that employs the storage device according to the embodiment of the present invention.
本コンピュータシステムCOMSYSは、記憶装置30、およびホストシステム(処理装置)50を主構成要素として有している。
記憶装置30は、インターフェース回路(I/F)31、制御回路32、内部バス33、ページバッファ34、NAND型フラッシュメモリ35,36、制御回路37、およびメモリバス38を有する。
制御回路32は、第2メモリとしてのRAM40を含み、RAM40にはワーキングエリア41が設けられ、アドレス変換テーブル42、検索テーブル43、無効カウンタテーブル44、ライトポインタ45、およびライトポインタの周回カウンタ46が構築されている。
ホストシステム50は、CPU、RAM、ROM、システムバス等を含んで構成されている。
This computer system COMSYS has a
The
The
The
記憶装置30の内部においては、32ビットのメモリバス38に、16ビットの入出力を持つ2チップの8GbNAND型フラッシュメモリ(フラッシュメモリチップという場合もある)35,36が並列接続されている。2つのチップは読み出しや書き込みにおいて、同時並列にアクセスされる。すなわち、メモリバス38は16ビットバスを2チャンネル備えた構成となっている。各々のフラッシュメモリは書き込みや読み出しのアクセスをたとえば4kBのページ単位で行う。したがって、実ページサイズとしては8kBが一括アクセスされることになる。
ページバッファ34はアクセスされたページ領域のデータを一時記憶する。フラッシュメモリ35,36とページバッファ34との間のデータの送受は、制御回路37で制御されている。
さらに、制御回路37は、必要に応じて転送データにECC符号化によるエラー補正を施したり、フラッシュメモリ内の欠陥ブロックの管理を実施する。両フラッシュメモリ35,36は,ページバッファ34を介して記憶装置の内部バス33との間でデータを入出力する。
すなわち、ページバッファ34、NAND型フラッシュメモリ35,36、制御回路37、およびメモリバス38の回路群は実質的に一つのフラッシュメモリデバイス(フラッシュメモリモジュールという場合もある)39を構成し、記憶装置30の内部バス33に接続されているとみなすことができる。その総容量は16Gb(2GB)であり、実ページサイズは8kBである。すなわち装置内には256k個のページデータが格納される。
Inside the
The
Furthermore, the
That is, the circuit group of the
さらに、内部バス33にはインターフェース回路31、および制御回路32が接続されている。
インターフェース回路31は、ATAやPCIエクスプレス等の規格に従ってホストシステム50との間で、データやコマンドの送受を行う。
制御回路32は、記憶装置の内部においてページバッファ34とインターフェース回路31の間のデータの送受を管理する。
制御回路32に内蔵されたRAM40には、プログラムを実行するためのコードエリアやワーキングエリア41が設けられており、さらにページ単位の仮想アドレスを管理するアドレス変換テーブル42、正常な空きブロックを検索する検索テーブル43、各ブロックの無効ページ数を管理する無効カウンタテーブル44、ライトポインタ45、およびライトポイントの周回カウンタ46等が構築されている。
Further, an
The
The
The
本コンピュータシステムCOMSYSにおいては、ホストシステム50は内蔵するCPUによって制御され、アプリケーションやオペレーティングシステム(OS)の要求に応じて、記憶装置30を介して、フラッシュメモリデバイス39にユーザーデータを保存する。
制御回路32はその間のデータ授受に介在し、アドレス変換テーブル42等を用いてアドレス変換を伴うアクセス管理を実施する。
In the computer system COMSYS, the
The
記憶装置30は、ハードディスクと同様に512バイト(Byte)のセクタをアクセス単位とする。
記憶装置内部では簡単のため、16進数のアドレスが次のように割り振られるとする。
たとえば、外部入力アドレスが“0x05502C”であった場合、上位24ビットの“0x05502”はページアドレスであり、最大1Mページを管理できる。一方、下位4ビットの“0xC”はページ領域内のセクタドレスであり、1ページ中には16のセクタが含まれる。
本記憶装置はページバッファ34内のデータを選択することで、1セクタ単位のランダムアクセスが可能である。
The
For simplicity in the storage device, it is assumed that hexadecimal addresses are allocated as follows.
For example, when the external input address is “0x05502C”, the upper 24 bits “0x05502” are page addresses, and a maximum of 1M pages can be managed. On the other hand, “0xC” of the lower 4 bits is a sector address in the page area, and 16 sectors are included in one page.
This storage device allows random access in units of one sector by selecting data in the
以下、このような記憶装置30の内部動作を説明する。
本実施形態ではページ単位の仮想アドレス管理が採用されている。
Hereinafter, the internal operation of the
In this embodiment, page-by-page virtual address management is employed.
図4は、アドレス変換テーブル42、検索テーブル43、および無効カウンタテーブル44の構成例を示す図である。また、図5は、そのようなテーブルを使用したデータアクセスのフローを示す図である。記憶装置30の内部におけるフラッシュメモリデバイス39への具体的アクセスは、図5のフロー図に従って、以下のような手順で実行される。
FIG. 4 is a diagram illustrating a configuration example of the address conversion table 42, the search table 43, and the invalid counter table 44. FIG. 5 is a diagram showing a flow of data access using such a table. The specific access to the
<データの読み出し動作>
ステップST1:
ホストシステム50からユーザーデータのアクセスコマンドとともに“0x005502C”のセクタドレスが入力されると、制御回路32は論理ページアドレス部LPA“0x005502”をインデックスにアドレス変換テーブル42を参照し、アクセス対象たるユーザーデータの物理ページアドレス(PPA)“0x0060B0”を取得する。
<Data read operation>
Step ST1 :
When the sector address “0x005502C” is input from the
ステップST2:
上記物理ページアドレスをもって、フラッシュメモリデバイス39がアクセスされ、ページバッファ34内にユーザーデータが格納されたページグループが読み出される。その後セクタドレス“0xC”に相当する部分がページバッファ34から選択的にホストに出力され、読み出し動作が完了する。
さらにデータの更新は以下のように実施する。同じ“0x005502C”のセクタを更新するとする。
Step ST2 :
The
Furthermore, the data is updated as follows. Assume that the same sector “0x005502C” is updated.
<データの更新(書き込み)動作>
ステップST1,ST2:
読み出し時と同様に、フラッシュメモリデバイス39より読み出した所望のデータをページバッファ34に格納する。
<Data update (write) operation>
Steps ST1 and ST2 :
As in reading, the desired data read from the
ステップST3:
ページバッファ上で所望のセクタ箇所を更新する。
Step ST3 :
Update the desired sector location on the page buffer.
ステップST4:
更新したユーザーデータのフラッシュメモリデバイス39への書き込み先として、RAM40内に常駐した検索テーブル43およびライトポインタ45から、適当なページ領域の物理ページアドレスPPAが選択される。
Step ST4 :
A physical page address PPA of an appropriate page area is selected from the search table 43 and the
以下のその手順の詳細を説明する。ここでは簡単のため、物理ページアドレスは、上位16ビットの物理ブロックアドレス部(Phisical Block Address :PBA)と下位8ビットのページオフセット部よりなるとする。この時各消去ブロックは256ページ(28)より構成される。検索テーブル43には、各ブロックごとにそれらが現在使用されているか、もしくは消去済みの空き状態であるかが、“Used Flag”でマークされている。さらに欠陥ブロックの場合、“Defect Flag”が“1”となっている。 Details of the procedure will be described below. Here, for simplicity, it is assumed that the physical page address is composed of an upper 16-bit physical block address part (Physical Block Address: PBA) and a lower 8-bit page offset part. At this time, each erase block is composed of 256 pages (2 8 ). The search table 43 is marked with “Used Flag” as to whether each block is currently being used or has been erased. Further, in the case of a defective block, “Defect Flag” is “1”.
ライトポインタ45は、まずその物理ブロックアドレス部のインクリメントに従って、検索テーブル43のアドレス上を下位から上位に向けて良品の消去済みブロックを検索しつつ巡回する。一旦対象ブロックが検出されれば、検索テーブル43の所定の“Used Flag”に“1”が立ち、まずその先頭ページが書き込み先として選択される。
First, the
さらに、ここからはページオフセット部のインクリメントに従って、書き込み先のページが下位アドレスから順次選択されていく。選択がブロックの末尾に達したら、それ以降再び物理ブロックアドレス部のインクリメントに従って、次の未使用かつ良品のブロックの検索を進める。 Further, from this point, the write destination pages are sequentially selected from the lower address according to the increment of the page offset portion. When the selection reaches the end of the block, the search for the next unused and non-defective block is advanced in accordance with the increment of the physical block address portion.
このようにしてライトポインタ45はフラッシュメモリデバイス39のアドレス上を循環する。そして検索テーブル43の末尾アドレスのブロックに達し、さらに、あるいはその末尾ページに達したら、周回カウンタ46を一つインクリメントして再びその先頭アドレスに戻る。
In this way, the
ライトポインタ45の値は現在“0x00AA01”であり、制御回路32はまずユーザーデータの書き込み先として、それをインクリメントした物理ページアドレス“0x00AA02”を選択する。
The value of the
ステップST5:
上記物理ページアドレスをもって、フラッシュメモリデバイス39がアクセスされ、ページバッファ34内のユーザーデータがフラッシュメモリデバイス39に一括書き込みされる。この時同時にページ領域内の冗長部に、周回カウンタ46のカウンタ値“0x000352”と、データの論理ページアドレス“0x005502”が記載される。
書き込みが完了すると、アドレス変換テーブル42が更新され、論理ページアドレスLPA“0x005502”に対応する物理ページアドレスPPAは“0x00AA02”に更新される。
Step ST5 :
The
When the writing is completed, the address conversion table 42 is updated, and the physical page address PPA corresponding to the logical page address LPA “0x005502” is updated to “0x00AA02”.
ステップST6:
また、これに伴って旧物理ページアドレス“0x0060B0”に相当するページ領域は無効となる。そこで上記無効ページ発生に対応して、無効カウンタテーブル44の、物理ブロックアドレス“0x0060”に対応するカウンタ値を“0x10”から“0x11”にインクリメントする。
Step ST6 :
As a result, the page area corresponding to the old physical page address “0x0060B0” becomes invalid. Therefore, in response to the generation of the invalid page, the counter value corresponding to the physical block address “0x0060” in the invalid counter table 44 is incremented from “0x10” to “0x11”.
ところで、上述の如き追記型書き込みを実施した場合、更新前のデータが格納されていた物理ページアドレス“0x0060B0”に相当するページ領域はアドレス変換テーブル42の物理アドレスフィールドから削除され、外からアクセスできなくなる。すなわち無効化される。
しかし、それらにはデータが書き込まれており、そのままでは空き領域として使用することもできない。上述のような書き換えを何度も繰り返すと、多くの無効ページ領域が発生する。それらは再度空き領域として使用できるよう、消去して回復させる必要がある。またその場合、消去ブロック“0x0060”に残された他の有効データは退避させる必要がある。
By the way, when write-once writing as described above is performed, the page area corresponding to the physical page address “0x0060B0” in which the data before update is stored is deleted from the physical address field of the address conversion table 42 and can be accessed from the outside. Disappear. That is, it is invalidated.
However, data is written in them and cannot be used as a free area as it is. If the rewriting as described above is repeated many times, many invalid page areas are generated. They must be erased and recovered so that they can be used again as free space. In this case, other valid data remaining in the erase block “0x0060” needs to be saved.
このような回復処理は、たとえばまず対象ブロック内の有効データを、更新の際と同様に一旦ページバッファに読み出してから、他のブロックの空き領域に追記で書き込んでいき、それによって実質的な退避を行なえば良い。すなわち有効ページを仮更新することで、その元領域を全て無効化する。その後対象ブロックを消去することによって、回復処理が実施される。 In such a recovery process, for example, valid data in the target block is first read into the page buffer in the same manner as in the update, and then written in the empty area of another block, thereby substantially saving. Should be done. That is, by temporarily updating the valid page, all the original areas are invalidated. Thereafter, the recovery process is performed by erasing the target block.
図6(A)〜(C)には消去ブロック51,52内部の有効データを退避し、無効ページ領域を実質的に回復させる手順を、概念的に図解している。
6A to 6C conceptually illustrate a procedure for saving valid data in the erase
ステップST11:
上述の如く追記による書き換えが進行し、消去ブロック51、52には、一度データが書き込まれた後、更新によって無効化されたページ領域群56、58が、有効なページ領域群55、57、59と共存しているとする。
ここで有効ページ領域のデータを残しつつ、無効化領域を空き領域に回復させる必要がある。
一方、53、54は現在ライトポインタ45によって選択されて、追記用の空き領域として使用している消去ブロックを示し、ページ領域60まで書き込みがなされている。
Step ST11 :
As described above, rewriting by additional writing proceeds, and after the data is once written in the erasure blocks 51 and 52, the
Here, it is necessary to restore the invalidation area to a free area while leaving the data of the valid page area.
On the other hand, 53 and 54 are currently selected by the
ステップST12:
有効なページ領域群55、57、59のデータを消去ブロック53、54内の空きページ領域群61、62、63に下詰めにして順番にコピーしていく。
一方、無効なページ領域群56、58はコピーしない。各ページの有効/無効の判定は、たとえばデータ書き込み時に冗長部に論理ページアドレスを記載しておき、それと物理ページアドレスとの対応が、アドレス変換テーブル42と一致するか否かをチェックすることで実施する。
有効ページの場合、対象ページ内のデータ全体をページバッファ34に読み込み、消去ブロック53、54に、ライトポインタのインクリメントに従って書き込みを実施する。この際各ページの冗長領域には、通常のデータ書き込み時と同様に、論理アドレスと周回カウンタ46のカウンタ値が記載される。
さらにアドレス変換テーブル42を更新する。すなわち各々のページ領域の論理アドレスに対応する物理アドレスフィールドに、コピー先の物理ページアドレスを登録していく。またこの作業に伴って、元のページ領域55、57、59は無効化される。したがって、各ページの処理ごとに、無効カウンタテーブル44の該当ブロックのカウンタ値がインクリメントされる。
この操作は、すなわち有効ページ領域群55、57、59を追記方式で書き換える作業に等しい。
実際には書き換えずコピーするのみであるが、この作業によって消去ブロック51、52内の全てのページは無効化され、有効ページ領域のデータは消去ブロック53、54に実質的に退避させられる。
Step ST12 :
Data in valid
On the other hand, invalid
In the case of a valid page, the entire data in the target page is read into the
Further, the address conversion table 42 is updated. That is, the physical page address of the copy destination is registered in the physical address field corresponding to the logical address of each page area. As a result of this work, the
This operation is equivalent to the operation of rewriting the effective
Actually, only copying is performed without rewriting, but all pages in the erase
ステップST13:
消去ブロック51、52を消去する。これに伴って検索テーブル43における該当ブロックの“Used Flag”はゼロにリセットされる。また、無効カウンタテーブル44の該当ブロックのカウンタ値もゼロにリセットされる。これによってその内部は全て空き領域となり、後の追記に使用することが可能になる。
これをもって無効領域56、58は実効的に回復される。
Step ST13 :
Erase
With this, the
このように無効ページ領域の回復処理は、各有効ページ領域のコピーによる退避処理と、元消去ブロックの消去よりなる。また、回復対象となる消去ブロック内の有効ページに通常の更新処理と同様の手順でダミーの更新を施し、それをもってページの退避を実行すれば、回復処理時の有効ページ退避を通常の書き込みアルゴリズムに統合させることが可能である。この場合、制御が容易になるばかりではなく、フラッシュメモリへの書き込みの均一化等、書き込み時の信頼性向上のための各種工夫を回復処理にも適用することができ、記憶装置の総合的な信頼性を向上させることができる。 As described above, the invalid page area recovery process includes a saving process by copying each valid page area and erasing the original erase block. In addition, if a dummy update is performed on the valid page in the erase block to be recovered in the same procedure as the normal update process, and then the page is saved, the effective page save during the recovery process is restored to the normal write algorithm. Can be integrated. In this case, not only the control is facilitated, but also various measures for improving the reliability of writing such as uniform writing to the flash memory can be applied to the recovery processing, and the overall storage device Reliability can be improved.
上記回復処理は、記憶装置の待機時やシステムのアイドル時に実施することで、ユーザーからその存在を隠蔽できる。この場合たとえば、待機状態に入ると自動的に回復処理を実施する機能を記憶装置30に設けたり、またはシステムがアイドル状態になるとホストシステム50が回復処理用のコマンドを送信し、それに応じて記憶装置30が回復処理を実行する。この際、回復処理の対象ブロックを選定する機能が必要となるが、これはたとえば無効カウンタテーブル44の一部または全部をスキャンし、無効ページの多いブロックを検索してそれを回復対象とすることで、効率の良い回復処理が実行できる。
The above recovery processing can be concealed from the user by executing it during standby of the storage device or when the system is idle. In this case, for example, the
ところで、アドレス変換テーブル42はRAM40内に保存されているので、電源瞬断等によって消失してしまう可能性がある。これが存在しないとユーザーデータへのアクセス自体ができなくなり、致命的である。したがってそれらを再構築できるような仕組みと手順が必要になる。
By the way, since the address conversion table 42 is stored in the
図7は、アドレス変換テーブルの再構築処理を説明するための図である。 FIG. 7 is a diagram for explaining the address conversion table reconstruction process.
図7において、65bはフラッシュメモリデバイス39の各ページにおける冗長部を示している。各ページの冗長部には、対応する論理アドレス66b、周回カウンタ46のカウンタ値(67b)、および8ビットの状態フラグ68bが格納されている。これらはユーザーデータが書き込まれた際、同じページの冗長部に同時に書き込まれる。
なお、状態フラグは各ページの状態を示しており、消去済みの未使用ページは全ビットが1となるので“0xFF”である。ページにデータが書き込まれると、このフラグには“0x00”が同時に書き込まれる。またこのフラグに左記いずれでもない中間値が記載されている場合、そのページが属するブロックは欠陥である。これは装置の出荷時に予めマークされているか、或いは書き込みや消去に失敗した場合にマークされる。
In FIG. 7,
Note that the status flag indicates the status of each page, and all the bits of the erased unused page are “1”, so “0xFF”. When data is written to the page, “0x00” is simultaneously written to this flag. If an intermediate value that is neither one of the left is described in this flag, the block to which the page belongs is defective. This is marked in advance at the time of shipment of the apparatus, or marked when writing or erasing fails.
ここでフラッシュメモリデバイス39の全ページを下位の物理アドレスから順にスキャンしていき、その冗長部を読み取っていく。各ページの状態フラグ68bからは検索テーブル43bを再構築できる。さらに論理アドレス66bを取得することで論理アドレスと物理アドレスとの対応が解り、アドレス変換テーブル42bを再構築できる。
Here, all pages of the
ただし更新され、無効化されたページがある場合、そのページに記載された論理アドレスは、更新後新規に書き込まれたページの論理アドレスと重複する。この場合、周回カウンタ値(67b)が比較され、この値が大きい方が新しいと判定される。またこれが同じ値の場合は、ライトポインタの進行順から上位の物理アドレスのページが新しいと判定される。 However, when there is a page that has been updated and invalidated, the logical address written on the page overlaps with the logical address of the newly written page after the update. In this case, the circulation counter value (67b) is compared, and the larger one is determined to be newer. If this is the same value, it is determined that the page of the higher physical address is new from the order of progress of the write pointer.
論理アドレスと物理アドレスの対応は最も新しいページのものが正しく、論理アドレスが重複したそれ以外のページは全て無効ページである。この判定を全ページで行なっていくことで、無効カウンタテーブル44bも再構築できる。 The correspondence between the logical address and the physical address is correct for the newest page, and all other pages with overlapping logical addresses are invalid pages. By making this determination for all pages, the invalid counter table 44b can also be reconstructed.
たとえば図4を用いて前述したデータ更新の結果、図7の冗長部65bでは物理ページアドレスPPA“0x0060B0”と“0x00AA02”のページの冗長部に記載された論理ページアドレスLPAが共に“0x005502”で重複している。この場合、周回カウンタ値を比較すると後者の方が新しいデータであり、アドレス変換テーブル42bには後者の対応が反映される。一方、前者は無効ページと判定されて、無効カウンタテーブル44bの対応するブロック“0x0060”の無効カウンタ値が一つカウントアップされる。
For example, as a result of the data update described above with reference to FIG. 4, in the
次に、ウエアレベリングの作業について、図8に関連付けて説明する。 Next, the wear leveling operation will be described with reference to FIG.
図8において、65cはフラッシュメモリデバイス39の各ページにおける冗長部65bに記載された周回カウンタ値を示している。冗長部65bにはその他論理アドレスや状態フラグ等も記載されているが、この図では省略した。データの書き込みは検索テーブル43cとライトポインタ45cによって対象とする空きページが選択される。現在物理ブロックアドレス“0x0140”の末尾ページまで書き込みが実施されており、次の消去済みブロックは“0x0141”である。
In FIG. 8,
一方、70cは書き込みブロック数のカウンタを示し、カウンタ70cは新しいブロックに書き込みが実施されるごとにインクリメントされる。書き込みコマンドや前述の回復処理の実行によってデータが書き込まれ、このカウンタが“0x40”以上になると、コマンド実行の完了時或いは次の装置の待機時やシステムのアイドル時に、ウエアレベリングが実行される。すなわちここでは64ブロック分のデータ書き込みに応じてウエアレベリングが実施される。
On the other hand, 70c represents a counter for the number of blocks to be written, and the
現在のカウンタ値は“0x3F”であり、ライトポインタ45cがブロック末尾にあることから、次のデータ書き込みでカウンタはインクリメントされ、“0x40”に達し、ウエアレベリングが実施されることになる。
Since the current counter value is “0x3F” and the
ウエアレベリングは複数のブロックにおける周回カウンタ値を参照し、その中から値の小さなものを選んで回復作業の対象とする。周回カウンタ値は各ページの冗長領域に記載されており、同一ブロック内のページでは同一値となっているので、たとえば各ブロックの先頭ページの冗長領域を読み出すことで、参照が可能である。この値が小さいほど古いデータであり、すなわちそのブロックは長期間消去されていないことがわかる。 Wear leveling refers to the lap counter values in a plurality of blocks, and selects a smaller value from the lap counter values as a target of recovery work. The circulation counter value is described in the redundant area of each page, and is the same value in the pages in the same block. For example, it can be referred to by reading the redundant area of the first page of each block. It can be seen that the smaller this value is, the older data is, that is, the block has not been erased for a long time.
ここではフラッシュメモリデバイス39の全域を16ブロックずつ検索していくウエアレベリング用のポインタ69が設けられている。64ブロックの書き込みが実施され、ウエアレベリングが起動するごとに、このポインタのインクリメントに沿って16ブロックの先頭ページの冗長領域が検査され、その中で最も周回カウンタ値が小さい使用済みブロックが回復作業の対象として選択される。
図8の例では次にウエアレベリングが実施される際にはPPA“0x006000”、“0x006100”、“0x006200”、・・・・“0x006F00”と各ブロックの先頭ページが読み出され、その冗長領域に記載された周回カウンタ値が検査される。
Here, a wear leveling pointer 69 for searching the entire area of the
In the example of FIG. 8, when wear leveling is performed next, the first page of each block is read as PPA “0x006000”, “0x006100”, “0x006200”,. Is checked.
このようにして周回カウンタ値の小さなブロックが回復対象として選択されると、図6で説明したものと同様の回復作業が実行される。すなわち対象ブロックの有効データは仮更新されて、他のブロックに移動せしめられ、しかる後に対象ブロックの消去行なわれる。これによって、これまで静的であったブロックが、新たなデータの格納先として開放される。 When a block having a small circulation counter value is selected as a recovery target in this way, a recovery operation similar to that described with reference to FIG. 6 is executed. That is, the effective data of the target block is temporarily updated and moved to another block, and then the target block is erased. As a result, a block that has been static up to now is released as a new data storage destination.
なお、ウエアレベリングの実行は、これに伴う回復処理の余分な実行が、装置やシステムの使用感を阻害しない程度の頻度で行うことが望ましい。実行のタイミングについては、たとえばライトポインタが特定アドレスを通過するごとに行ったり、待機やアイドリングに入る際に乱数を発生させて、それが一定範囲の時に行ったりする等、各種バリエーションが存在する。 It should be noted that the wear leveling is desirably performed at such a frequency that the extra recovery processing associated therewith does not impair the usability of the apparatus or system. There are various variations on the execution timing, for example, every time the write pointer passes a specific address, or when a random number is generated when entering a standby or idling state, and when it is within a certain range.
また、その際の回復対象の選択においては、フラッシュメモリデバイスの全域が偏り無く検査されるのが望ましく、上記ポインタのインクリメント等でアドレス上を巡回検査したり、乱数で検査対象を決めたりする等各種方法が考えられる。このように検査された複数ブロックの中から、周回カウンタ値の小さなブロックを優先的に選択する。 Further, in selecting the recovery target at that time, it is desirable that the entire flash memory device is inspected without any deviation, such as a cyclic inspection on the address by incrementing the pointer or the like, or determining the inspection target by a random number, etc. Various methods are conceivable. A block having a small circulation counter value is preferentially selected from the plurality of blocks inspected in this way.
ところでここまでは、独立した記憶装置の内部に、アドレス変換等各種制御を実装する場合について説明してきた。しかしアドレス変換テーブルの管理と関連処理を、ホスト側の制御で実施することも可能である。このような形態は、特にフラッシュメモリが内部に組み込まれた、安価なコンピュータシステムに適している。そのようなコンピュータシステムの例を図9に示す。 Up to this point, the case where various controls such as address conversion are implemented in an independent storage device has been described. However, the management of the address conversion table and related processing can also be performed under the control of the host side. Such a configuration is particularly suitable for an inexpensive computer system in which a flash memory is incorporated. An example of such a computer system is shown in FIG.
図9は、アドレス変換テーブルの管理と関連処理を、ホスト側の制御で実施するコンピュータシステムの構成例を示す図である。 FIG. 9 is a diagram illustrating a configuration example of a computer system that performs management of the address conversion table and related processing under the control of the host side.
この場合、ホストシステム80dは、CPU81dとシステムメモリ82dを含む。
CPU81dは32ビットのシステムバス83dを介してシステムメモリであるRAM82dと接続されている。さらに、システムバス83dにはブリッジ回路84dが接続されており、ブリッジ回路84dに繋がる32ビットのデータバス38dには、16ビットの入出力を持つ2チップのNAND型フラッシュメモリ35d,36dが並列接続されている。2つのチップは読み出しや書き込みにおいて、同時並列にアクセスされる。アクセスされたページ領域を一時記憶するページバッファ34dは、ブリッジ回路84dに内蔵されている。
In this case, the
The
ブリッジ回路84dは、CPU81dから各種コマンドを受け取り、フラッシュメモリ35d、36dとCPU81dまたはシステムメモリ82dとの間のデータのやり取りを、ページバッファ34dを用いて媒介する。また必要に応じて転送データにECC符号化によるエラー補正を施す。
ブリッジ回路84dが受け取るコマンドは、たとえばフラッシュメモリ35d、36dの所定のページへのアクセスの他、同フラッシュメモリの所定ブロックの消去、および所定ページの指定アドレスへのコピー、フラッシュメモリのリセット等である。
The
The command received by the
一方、システムメモリ82d内には上記フラッシュ記憶システムを制御するためのドライバ86dが常駐している。このドライバ86dは、OSやアプリケーションからの記憶装置へのアクセスを受け、同じメモリ中に構成されたアドレス変換テーブル42dを参照してアクセス時のページアドレスを変換する。
また、データ更新時には検索テーブル43dとライトポインタ45dを参照して書き込み先ページアドレスを決定し、更新用データとともにフラッシュメモリへの書き込み命令をブリッジ回路84bに送信する。あるいは更新され無効化されたページが発生すると、それを無効カウンタテーブル44dに反映させる。
On the other hand, a
When updating data, the write destination page address is determined with reference to the search table 43d and the write pointer 45d, and a write command to the flash memory is transmitted to the bridge circuit 84b together with the update data. Alternatively, when an updated and invalidated page is generated, it is reflected in the invalid counter table 44d.
すなわちこのようなケースでは、CPU81dとシステムメモリ82dよりなるホストシステム85d自体が図3における制御回路32の役割を代替し、アドレス変換テーブルの管理と各種関連処理を実施する。すなわちドライバ86dは各種テーブルやポインタを使用し、OSやアプリケーションから論理アドレスを受け、物理アドレスPPAを生成してブリッジ回路84dにコマンドを送信することで、フラッシュメモリ35d、36dの各種アクセスを実施する。
That is, in such a case, the host system 85d itself comprising the
なお、これらアドレス変換テーブル42d、検索テーブル43d、無効カウンタテーブル44d、ライトポインタ45dには、たとえば図5に示したテーブル42、43、44、およびポインタ45と同様のものが使用される。
For the address conversion table 42d, search table 43d, invalid counter table 44d, and write pointer 45d, for example, the same tables 42, 43, 44, and
このようなシステムにおいても本発明の概念は同様に適用することが可能である。すなわちホストシステム80dには、さらにRAM82d内に、周回カウンタ46dが設置されている。ライトポインタ45dはフラッシュメモリ35d、36dのアドレス上を既定の順序で循環し、その周回回数がカウンタ46dに記録される。そしてその値が、データの書き込みと同時に各ページの冗長領域に記載される。さらに各冗長領域には論理ページアドレスや状態フラグが記載される。
The concept of the present invention can be similarly applied to such a system. That is, the
システムの電源瞬断でRAM内の各種テーブルが消失した際には、ドライバ86dはフラッシュメモリの冗長領域に書かれた上記データを用いて、RAM上に各種テーブルを再構築する。特に論理アドレスと周回カウンタ値を参照して、アドレス変換テーブル44dを正しく再構築する。その手順は図7で説明したものと同様である。
When various tables in the RAM are lost due to an instantaneous power interruption of the system, the
また、一定量のデータ書き込みに応じて、ドライバ86dはウエアレベリングを実行する。その際、複数のブロックについてその先頭ページの冗長部に記載された周回カウンタ値を参照し、その値の小さいブロックを優先して回復対象とする。そして該当ブロック内の有効ページを他ブロックの未使用ページにコピーし、しかる後に対象ブロックを消去して未使用状態にする。
Further, the
30・・・記憶装置、31・・・インターフェース回路、32・・・制御回路、33・・・内部バス、34・・・ページバッファ、35,36・・・NAND型フラッシュメモリ、37・・・制御回路、38・・・メモリバス、39・・・フラッシュメモリデバイス(フラッシュメモリモジュール)、40・・・RAM、41・・・ワーキングエリア、42,42b,42d・・・アドレス変換テーブル、43,43b,43d・・・、検索テーブル、44,44b,44d・・・無効カウンタテーブル、45,45c,45d・・・ライトポインタ、46,46d・・・周回カウンタ、50,80d・・・ホストシステム
DESCRIPTION OF
Claims (11)
第2メモリと、
上記フラッシュメモリデバイスと上記第2メモリの制御を行う制御部と、を有し、
上記フラッシュメモリデバイスは各々独立した消去領域であるブロックを複数有し、
上記第2メモリ内に、消去された未使用ブロックを検出しつつ、上記フラッシュメモリデバイスのアドレス上を規定の順序で循環するライトポインタが設置されており、
上記制御部は、
上記フラッシュメモリデバイスへのデータ書き込みは上記ライトポインタに沿って実施し、当該書き込みに伴って各データの論理アドレスと上記ライトポインタとの対応を上記第2メモリ上のテーブルに記録し、上記フラッシュメモリデバイスには、上記ライトポインタの循環回数に一意的に対応するカウンタ値を、データと共に記載する
記憶装置。 A flash memory device as a main storage medium;
A second memory;
A control unit for controlling the flash memory device and the second memory;
The flash memory device has a plurality of blocks each being an independent erase area,
In the second memory, a write pointer that circulates in a prescribed order on the address of the flash memory device while detecting an erased unused block is installed,
The control unit
Data writing to the flash memory device is performed along the write pointer, and the correspondence between the logical address of each data and the write pointer is recorded in the table on the second memory along with the writing, and the flash memory In the device, a counter value uniquely corresponding to the number of circulations of the write pointer is described together with data.
請求項1記載の記憶装置。 The storage device according to claim 1, wherein the counter value is used for new / old determination of each data in internal management of the apparatus or system.
請求項1記載の記憶装置。 The storage device according to claim 1, further comprising a function of autonomously selecting an unerased block based on at least the number of times, moving data of the block to an arbitrary erased area, and further erasing the block.
請求項3記載の記憶装置。 The storage device according to claim 3, wherein the control unit executes the work according to a certain amount of write data.
請求項1記載の記憶装置。 The storage device according to claim 1, wherein the control unit has a function of describing a logical address together with data in the flash memory device, and reconstructing the table from a logical address and a counter value corresponding to each data.
第2メモリと、
上記フラッシュメモリデバイスと上記第2メモリの制御を行う制御部と、
上記フラッシュメモリデバイスのデータにアクセス可能な処理装置と、を有し、
上記フラッシュメモリデバイスは各々独立した消去領域であるブロックを複数有し、
上記第2メモリ内に、消去された未使用ブロックを検出しつつ、上記フラッシュメモリデバイスのアドレス上を規定の順序で循環するライトポインタが設置されており、
上記制御部は、
上記フラッシュメモリデバイスへのデータ書き込みは上記ライトポインタに沿って実施し、当該書き込みに伴って各データの論理アドレスと上記ライトポインタとの対応を上記第2メモリ上のテーブルに記録し、上記フラッシュメモリデバイスには、上記ライトポインタの循環回数に一意的に対応するカウンタ値を、データと共に記載する
コンピュータシステム。 A flash memory device as a main storage medium;
A second memory;
A control unit for controlling the flash memory device and the second memory;
A processing device capable of accessing the data of the flash memory device,
The flash memory device has a plurality of blocks each being an independent erase area,
In the second memory, a write pointer that circulates in a prescribed order on the address of the flash memory device while detecting unused erased blocks is installed,
The control unit
Data writing to the flash memory device is performed along the write pointer, and the correspondence between the logical address of each data and the write pointer is recorded in the table on the second memory along with the writing, and the flash memory A computer system in which a counter value uniquely corresponding to the number of circulations of the write pointer is described in the device together with data.
請求項6記載のコンピュータシステム。 The computer system according to claim 6, wherein the counter value is used for new / old determination of each data in internal management of the apparatus or system.
請求項6記載のコンピュータシステム。 The computer system according to claim 6, further comprising a function of autonomously selecting an unerased block based on at least the number of times, moving data of the block to an arbitrary erased area, and further erasing the block.
請求項8記載のコンピュータシステム。 The computer system according to claim 8, wherein the control unit executes the work according to a certain amount of write data.
請求項6記載のコンピュータシステム。 The computer system according to claim 6, wherein the control unit has a function of describing a logical address together with data in the flash memory device and reconstructing the table from a logical address and a counter value corresponding to each data.
上記フラッシュメモリデバイスは各々独立した消去領域であるブロックを複数有し、
上記第2メモリ内に、消去された未使用ブロックを検出しつつ、上記フラッシュメモリデバイスのアドレス上を規定の順序で循環するライトポインタが設置されており、
上記フラッシュメモリデバイスへのデータ書き込みは上記ライトポインタに沿って実施し、
上記書き込みに伴って各データの論理アドレスと上記ライトポインタとの対応を上記第2メモリ上のテーブルに記録し、
上記フラッシュメモリデバイスには、上記ライトポインタの循環回数に一意的に対応するカウンタ値を、データと共に記載する
記憶装置のデータ処理方法。 A data processing method for a storage device having a flash memory device as a main storage medium and a second memory,
The flash memory device has a plurality of blocks each being an independent erase area,
In the second memory, a write pointer that circulates in a prescribed order on the address of the flash memory device while detecting an erased unused block is installed,
Write data to the flash memory device along the write pointer,
Along with the writing, the correspondence between the logical address of each data and the write pointer is recorded in the table on the second memory,
A data processing method for a storage device, wherein a counter value uniquely corresponding to the number of circulations of the write pointer is described together with data in the flash memory device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006331099A JP2008146255A (en) | 2006-12-07 | 2006-12-07 | Storage device, computer system, and data processing method for storage device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006331099A JP2008146255A (en) | 2006-12-07 | 2006-12-07 | Storage device, computer system, and data processing method for storage device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008146255A true JP2008146255A (en) | 2008-06-26 |
Family
ID=39606383
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006331099A Pending JP2008146255A (en) | 2006-12-07 | 2006-12-07 | Storage device, computer system, and data processing method for storage device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008146255A (en) |
Cited By (24)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008181204A (en) * | 2007-01-23 | 2008-08-07 | Sony Corp | Storage device, computer system, and method for managing storage device |
JP2010026933A (en) * | 2008-07-23 | 2010-02-04 | Toshiba Corp | Memory system and host device |
JP2010067263A (en) * | 2008-07-18 | 2010-03-25 | Marvell World Trade Ltd | Selectively accessing memory |
JP2010140580A (en) * | 2008-12-15 | 2010-06-24 | Kyocera Mita Corp | Nonvolatile memory driver, electronic device provided with the same, and nonvolatile memory driving method |
JP2010165251A (en) * | 2009-01-16 | 2010-07-29 | Toshiba Corp | Information processing device, processor, and information processing method |
JP2010250534A (en) * | 2009-04-15 | 2010-11-04 | Tdk Corp | Memory controller and flash memory system with memory controller and control method for flash memory |
JP2010250413A (en) * | 2009-04-13 | 2010-11-04 | Tdk Corp | Memory controller, flash memory system with memory controller, and method for controlling flash memory |
JP2012507763A (en) * | 2008-11-04 | 2012-03-29 | モサイド・テクノロジーズ・インコーポレーテッド | Bridge device with configurable virtual page size |
JP2012174106A (en) * | 2011-02-23 | 2012-09-10 | Denso Corp | Control device for reading and writing data from and to flash memory |
JP2012221338A (en) * | 2011-04-12 | 2012-11-12 | Hitachi Ltd | Semiconductor device and method of controlling nonvolatile memory device |
US8327065B2 (en) | 2008-12-27 | 2012-12-04 | Kabushiki Kaisha Toshiba | Memory system, controller, and method of controlling memory system |
CN103377139A (en) * | 2012-04-16 | 2013-10-30 | 索尼公司 | Storage controlling apparatus, memory system, information processing system and storage controlling method |
US8737105B2 (en) | 2008-10-14 | 2014-05-27 | Conversant Intellectual Property Management Inc. | Bridge device architecture for connecting discrete memory devices to a system |
US8949516B2 (en) | 2011-10-03 | 2015-02-03 | Hitachi, Ltd. | Semiconductor device |
US9195591B2 (en) | 2013-06-10 | 2015-11-24 | Kabushiki Kaisha Toshiba | Memory system |
US9292210B1 (en) | 2014-08-29 | 2016-03-22 | International Business Machines Corporation | Thermally sensitive wear leveling for a flash memory device that includes a plurality of flash memory modules |
US9355719B2 (en) | 2012-07-19 | 2016-05-31 | Hitachi, Ltd. | Semiconductor device |
CN108365283A (en) * | 2018-05-04 | 2018-08-03 | 深圳市道通智能航空技术有限公司 | Device battery and unmanned plane |
US10235049B2 (en) | 2017-03-09 | 2019-03-19 | Kabushiki Kaisha Toshiba | Device and method to manage access method for memory pages |
US10606517B2 (en) | 2018-03-19 | 2020-03-31 | Kabushiki Kaisha Toshiba | Management device and information processing device |
US10649694B2 (en) | 2018-03-16 | 2020-05-12 | Kabushiki Kaisha Toshiba | Management device and information processing device |
US10657040B2 (en) | 2017-06-07 | 2020-05-19 | Buffalo Inc. | Storage device and data management method of storage device |
US10719436B2 (en) | 2017-03-03 | 2020-07-21 | Kabushiki Kaisha Toshiba | Management device, information processing device, and management method |
CN114138177A (en) * | 2021-09-29 | 2022-03-04 | 成都嘉程智宇信息技术有限公司 | Data storage method for improving utilization rate of flash memory resources of Internet of things equipment |
-
2006
- 2006-12-07 JP JP2006331099A patent/JP2008146255A/en active Pending
Cited By (33)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008181204A (en) * | 2007-01-23 | 2008-08-07 | Sony Corp | Storage device, computer system, and method for managing storage device |
JP2010067263A (en) * | 2008-07-18 | 2010-03-25 | Marvell World Trade Ltd | Selectively accessing memory |
JP2010026933A (en) * | 2008-07-23 | 2010-02-04 | Toshiba Corp | Memory system and host device |
US8484430B2 (en) | 2008-07-23 | 2013-07-09 | Kabushiki Kaisha Toshiba | Memory system and host device |
US8737105B2 (en) | 2008-10-14 | 2014-05-27 | Conversant Intellectual Property Management Inc. | Bridge device architecture for connecting discrete memory devices to a system |
JP2012507763A (en) * | 2008-11-04 | 2012-03-29 | モサイド・テクノロジーズ・インコーポレーテッド | Bridge device with configurable virtual page size |
US9977731B2 (en) | 2008-11-04 | 2018-05-22 | Conversant Intellectual Property Management Inc. | Bridging device having a configurable virtual page size |
JP2010140580A (en) * | 2008-12-15 | 2010-06-24 | Kyocera Mita Corp | Nonvolatile memory driver, electronic device provided with the same, and nonvolatile memory driving method |
US8327065B2 (en) | 2008-12-27 | 2012-12-04 | Kabushiki Kaisha Toshiba | Memory system, controller, and method of controlling memory system |
JP2010165251A (en) * | 2009-01-16 | 2010-07-29 | Toshiba Corp | Information processing device, processor, and information processing method |
JP2010250413A (en) * | 2009-04-13 | 2010-11-04 | Tdk Corp | Memory controller, flash memory system with memory controller, and method for controlling flash memory |
JP2010250534A (en) * | 2009-04-15 | 2010-11-04 | Tdk Corp | Memory controller and flash memory system with memory controller and control method for flash memory |
JP2012174106A (en) * | 2011-02-23 | 2012-09-10 | Denso Corp | Control device for reading and writing data from and to flash memory |
US9058883B2 (en) | 2011-02-23 | 2015-06-16 | Denso Corporation | Control apparatus for controlling data reading and writing to flash memory |
US9069662B2 (en) | 2011-04-12 | 2015-06-30 | Hitachi, Ltd. | Semiconductor device and method of controlling non-volatile memory device |
JP2012221338A (en) * | 2011-04-12 | 2012-11-12 | Hitachi Ltd | Semiconductor device and method of controlling nonvolatile memory device |
US9286212B2 (en) | 2011-04-12 | 2016-03-15 | Hitachi, Ltd. | Semiconductor device and method of controlling non-volatile memory device |
US8984209B2 (en) | 2011-04-12 | 2015-03-17 | Hitachi, Ltd. | Semiconductor device and method of controlling non-volatile memory device |
US9728257B2 (en) | 2011-10-03 | 2017-08-08 | Hitachi, Ltd. | Semiconductor device having a write prohibited region |
US8949516B2 (en) | 2011-10-03 | 2015-02-03 | Hitachi, Ltd. | Semiconductor device |
JP2013239142A (en) * | 2012-04-16 | 2013-11-28 | Sony Corp | Storage controlling apparatus, memory system, information processing system and storage controlling method |
CN103377139A (en) * | 2012-04-16 | 2013-10-30 | 索尼公司 | Storage controlling apparatus, memory system, information processing system and storage controlling method |
US9355719B2 (en) | 2012-07-19 | 2016-05-31 | Hitachi, Ltd. | Semiconductor device |
US9195591B2 (en) | 2013-06-10 | 2015-11-24 | Kabushiki Kaisha Toshiba | Memory system |
US9292210B1 (en) | 2014-08-29 | 2016-03-22 | International Business Machines Corporation | Thermally sensitive wear leveling for a flash memory device that includes a plurality of flash memory modules |
US10719436B2 (en) | 2017-03-03 | 2020-07-21 | Kabushiki Kaisha Toshiba | Management device, information processing device, and management method |
US10235049B2 (en) | 2017-03-09 | 2019-03-19 | Kabushiki Kaisha Toshiba | Device and method to manage access method for memory pages |
US10657040B2 (en) | 2017-06-07 | 2020-05-19 | Buffalo Inc. | Storage device and data management method of storage device |
US10649694B2 (en) | 2018-03-16 | 2020-05-12 | Kabushiki Kaisha Toshiba | Management device and information processing device |
US10606517B2 (en) | 2018-03-19 | 2020-03-31 | Kabushiki Kaisha Toshiba | Management device and information processing device |
CN108365283A (en) * | 2018-05-04 | 2018-08-03 | 深圳市道通智能航空技术有限公司 | Device battery and unmanned plane |
US11942608B2 (en) | 2018-05-04 | 2024-03-26 | Autel Robotics Co., Ltd. | Device battery and unmanned aerial vehicle |
CN114138177A (en) * | 2021-09-29 | 2022-03-04 | 成都嘉程智宇信息技术有限公司 | Data storage method for improving utilization rate of flash memory resources of Internet of things equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2008146255A (en) | Storage device, computer system, and data processing method for storage device | |
JP5130646B2 (en) | Storage device | |
CN109783009B (en) | Memory system and operating method thereof | |
JP4967680B2 (en) | Storage device, computer system, and storage device management method | |
JP4524309B2 (en) | Memory controller for flash memory | |
JP5585919B2 (en) | Power shutdown management | |
US9448919B1 (en) | Data storage device accessing garbage collected memory segments | |
US9183132B2 (en) | Storage device, computer system, and storage system | |
US8910002B2 (en) | NAND flash-based storage device with built-in test-ahead for failure anticipation | |
JP4910360B2 (en) | Storage device, computer system, and data writing method | |
JP2008146253A (en) | Storage device, computer system, and data processing method for storage device | |
US8285954B2 (en) | Memory system managing a plurality of logs | |
JP2008146254A (en) | Storage device, computer system and data processing method for storage device | |
US11386005B2 (en) | Memory system, memory controller, and method of operating memory system for caching journal information for zone in the journal cache | |
US20110047322A1 (en) | Methods, systems and devices for increasing data retention on solid-state mass storage devices | |
US10089170B1 (en) | Open block management | |
KR20200038723A (en) | Storage device and method for operating storage device | |
JP2007334413A (en) | Storage device | |
JP2008181203A (en) | Storage device, computer system, and method for managing storage device | |
US11126552B2 (en) | Memory system, memory controller and method for operating memory controller | |
JP5617873B2 (en) | Storage device | |
JP4794530B2 (en) | Semiconductor device and mobile phone | |
JP2004326523A (en) | Storage device with rewritable nonvolatile memory, and control method of nonvolatile memory for storage device | |
JP4558052B2 (en) | Memory system | |
US11704050B2 (en) | Memory system for determining a memory area in which a journal is stored according to a number of free memory blocks |