JP3976764B2 - Semiconductor disk device - Google Patents
Semiconductor disk device Download PDFInfo
- Publication number
- JP3976764B2 JP3976764B2 JP2005176388A JP2005176388A JP3976764B2 JP 3976764 B2 JP3976764 B2 JP 3976764B2 JP 2005176388 A JP2005176388 A JP 2005176388A JP 2005176388 A JP2005176388 A JP 2005176388A JP 3976764 B2 JP3976764 B2 JP 3976764B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- address
- disk device
- lsa
- conversion table
- 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 - Lifetime
Links
- 239000004065 semiconductor Substances 0.000 title claims description 58
- 238000006243 chemical reaction Methods 0.000 claims description 54
- 238000013500 data storage Methods 0.000 claims description 15
- 238000010586 diagram Methods 0.000 description 14
- 238000012790 confirmation Methods 0.000 description 6
- 238000000034 method Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 5
- 238000007726 management method Methods 0.000 description 4
- 238000013523 data management Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Images
Description
この発明は、フラッシュメモリを記憶媒体として用いた半導体ディスクカード等の半導体ディスク装置に関するものである。 The present invention relates to a semiconductor disk device such as a semiconductor disk card using a flash memory as a storage medium.
今日、パーソナルコンピュータの分野において比較的大容量のデータを記憶させておく際には、ハードディスク装置などの磁気記憶媒体が用いられることが多い。これは、消費電力こそ大きいがコストパフォーマンスが非常によいためである。 Today, when storing a relatively large amount of data in the field of personal computers, magnetic storage media such as hard disk drives are often used. This is because the power consumption is large but the cost performance is very good.
一方、フラッシュメモリ等の半導体メモリを上記ハードディスク装置のように動作させる半導体ディスク装置が出現した。この半導体ディスク装置は上記ハードディスク装置と違いモーターなどのメカニカルな部分が存在しないため、コストパフォーマンスは磁気記憶媒体に遅れをとるものの低消費電力、高信頼性という面を生かし携帯情報端末などに普及しつつある。 On the other hand, a semiconductor disk device that operates a semiconductor memory such as a flash memory like the hard disk device has appeared. Unlike the above hard disk device, this semiconductor disk device does not have a mechanical part such as a motor. Therefore, the cost performance lags behind the magnetic storage medium, but it is widely used in portable information terminals by taking advantage of low power consumption and high reliability. It's getting on.
なお、フラッシュメモリの特徴は以下のとおりである。第1に、電気的にデータの書き込み、消去が可能な不揮発性メモリである。第2に、データが既に書き込まれているメモリセルにデータを上書きすることはできない(このため、常に消去動作がつきまとう)。第3に、データの消去単位は、数K〜数十KByte単位である。第4に、書き込み、消去回数に制限がある。 The features of the flash memory are as follows. The first is a nonvolatile memory capable of electrically writing and erasing data. Second, data cannot be overwritten on a memory cell in which data has already been written (thus, an erasing operation is always performed). Third, the data erasure unit is several K to several tens of KBytes. Fourth, there is a limit on the number of writing and erasing.
従来の半導体ディスク装置の構成について図14、図15、図16及び図17を参照しながら説明する。図14は、従来の半導体ディスク装置の全体構成を示すブロック図である。図15は、図14のアドレス変換テーブルの内部構成を示す図である。図16は、図14のフラッシュメモリの内部構成を示す図である。また、図17は、図16の消去ブロックの内部構成を示す図である。 The configuration of a conventional semiconductor disk device will be described with reference to FIGS. 14, 15, 16 and 17. FIG. FIG. 14 is a block diagram showing the overall configuration of a conventional semiconductor disk device. FIG. 15 is a diagram showing an internal configuration of the address conversion table of FIG. FIG. 16 is a diagram showing an internal configuration of the flash memory of FIG. FIG. 17 is a diagram showing an internal configuration of the erase block of FIG.
図14において、従来の半導体ディスク装置2は、インターフェース回路3と、CPU4と、アドレス変換テーブル5と、フラッシュ制御回路6と、データ入出力用セクタバッファ7と、フラッシュメモリ8とを備える。
As shown in FIG. 14, the conventional
半導体ディスク装置2と接続するホスト1の代表的な例は、ノートパソコンや携帯情報端末である。リムーバブルタイプの半導体ディスク装置2は、現在の所、カード型が主流である。インターフェース回路3は、ホスト1との情報をやりとりする。CPU4は、データの入出力及びフラッシュメモリ8への命令を出力する。
Typical examples of the
論理セクタ/物理セクタアドレス変換テーブル5は、論理セクタアドレスを物理セクタアドレスに変換するためのテーブルである。論理セクタアドレス(LSA:Logical Sector Address)とはホスト1が半導体ディスク装置2に指定するセクタアドレスのことである。また、物理セクタアドレス(PSA:Physical Sector Address)とは、半導体ディスク装置2内で使用されるフラッシュメモリ8のアドレスのことである。
The logical sector / physical sector address conversion table 5 is a table for converting a logical sector address into a physical sector address. A logical sector address (LSA) is a sector address designated by the
フラッシュ制御回路6は、複雑でないフラッシュメモリ8のデータ処理を行う。単純なデータの受け渡し等はフラッシュ制御回路6で行い、他の処理はCPU4で行う。データ入出力用セクタバッファ7は、データをフラッシュメモリ8からインターフェース回路3を通して出力、あるいはインターフェース回路3を通してフラッシュメモリ8にデータを入力する際に用いられる。
The
図15において、アドレス変換テーブル5は、論理セクタアドレス(LSA)格納部と物理セクタアドレス(PSA)格納部とから構成される。 In FIG. 15, the address conversion table 5 includes a logical sector address (LSA) storage unit and a physical sector address (PSA) storage unit.
LSA格納部には論理セクタアドレスが保存されている。内容は固定されている。なお、実際は、論理セクタアドレスがホスト1から送られてくると、論理セクタアドレスデータに基づき変換テーブル用の揮発性RAMのアドレスピンに電圧がかかりPSAデータがでてくる構造になっている。説明しやすくするために、PSA格納部との対応でLSA格納部があるとしている。PSA格納部には任意の(図では1〜n)フラッシュメモリ8のセクタ番号が保存される。このアドレス変換テーブル5を用いることで、ホスト1が指定する論理セクタアドレスに左右されることなく内部管理に都合のよい物理セクタアドレスにデータを保存することができる。このアドレス変換テーブル5は、頻繁に書き込み・消去されるのでSRAMやDRAMなどの揮発性のRAMで構成するのが一般的である。
A logical sector address is stored in the LSA storage unit. The content is fixed. Actually, when a logical sector address is sent from the
このアドレス変換テーブル5の容量は、次のような条件のとき以下のようになる。20メガバイト(MByte)のフラッシュメモリ8を使用し、データの入出力単位(セクタ)を512バイト(Byte)とすると、半導体ディスク装置2内のセクタ数は次のようになる。
半導体ディスク装置2内のセクタ数=20メガバイト÷512バイト
=40960セクタ
The capacity of the address conversion table 5 is as follows under the following conditions. When the 20 megabyte (MByte)
Number of sectors in the
次に、「40960」を2進数表現する際に必要なビット数は、
ln40960÷ln2=15.3となり、
16桁必要となる。
Next, the number of bits required to represent “40960” in binary is:
ln40960 ÷ ln2 = 15.3
16 digits are required.
これにより必要なアドレス変換テーブル5の容量は、
40960×16=655360ビットとなり、
最終的に、80キロバイト(KByte)必要となる。
As a result, the required capacity of the address translation table 5 is
40960 × 16 = 655360 bits,
Finally, 80 kilobytes (KByte) are required.
図16において、フラッシュメモリ8は、複数の消去ブロック9と、予備の複数の消去ブロック9とから構成される。
In FIG. 16, the
フラッシュメモリ8は電気的に書き込み消去可能な不揮発メモリである。不揮発であるためDRAM・SRAMのように電池によるバックアップの必要もなく、また電気的にデータの消去が可能なのでEPROMと違いボードから外すことなくデータを変更することができる。1セルで1ビットのデータを記憶することができるため、EERROMより安価にメモリを作製することができる。以上の点がフラッシュメモリ8の長所にあたる。短所としては、消去回数に1万回〜10万回程度の上限があること、書き込みの際には必ず消去動作が必要なこと(このためデータがすでに書き込まれているセルに上書きすることは不可能)、消去単位は数K〜数十KByteのブロック単位であること、等が上げられる。
The
図17において、1つの消去ブロック9は、先頭に消去ブロック情報格納領域10と、複数のデータ格納領域11と、データ格納領域11毎のLSA格納領域12とを有する。
In FIG. 17, one
消去ブロック情報格納領域10に現在のブロック消去回数を格納しておく。データ格納領域11は、通常512バイト(=1セクタ)の大きさである。LSA格納領域12はセクタごとに存在し、データを書き込む際にホスト1が指定したLSAを格納しておく。これは、論理セクタ/物理セクタアドレス変換テーブル5を揮発性RAMで構成した際、電源オフと同時にデータが消えてしまうためである。電源をオンにしたときに全てのセクタのLSA格納領域12を検索し揮発性RAMテーブル5を再構築する際に用いられる。
The current block erase count is stored in the erase block
つぎに、従来の半導体ディスク装置の動作について図18、図19及び図20を参照しながら説明する。図18は、従来の半導体ディスク装置の読み出し動作を説明するための図である。また、図19及び図20は、従来の半導体ディスク装置の書き込み動作を説明するための図である。 Next, the operation of the conventional semiconductor disk device will be described with reference to FIGS. FIG. 18 is a diagram for explaining a read operation of a conventional semiconductor disk device. 19 and 20 are diagrams for explaining a write operation of a conventional semiconductor disk device.
フラッシュメモリ8を用いた半導体ディスク装置2はハードディスク装置とは異なり、データを上書きすることができない。従って、ホスト1から送られてくるデータの論理セクタアドレスとそのデータをフラッシュメモリ8のどの物理セクタアドレスに書き込むかを示すアドレス変換テーブル5を揮発性RAM内に記憶させておくことが行われる。このアドレス変換テーブル5を用いることでLSAに左右されることなくフラッシュメモリ8の記憶領域を有効に使用することが可能となる。
Unlike the hard disk device, the
まず、半導体ディスク装置2からのデータの読み出し動作を図18で説明する。ホスト1は読み出したいデータのセクタアドレスを半導体ディスク装置2に送る。ホスト1から送られてくるアドレスデータには2種類ある。LSA形式とCHS形式である。LSA形式が1〜nまでの通し番号でセクタを指定するのに対し、CHS形式はハードディスク装置で使用されるシリンダ・ヘッド・セクタという3つのデータの組み合わせでデータ領域を指定する。半導体ディスク装置2内ではLSA/PSAアドレス変換テーブル5を用いるため、ホスト1からCHS形式のデータが入力された場合は、例えばインターフェース回路内でLSAに変換し次の作業に移る。
First, a data read operation from the
CPU4は、アドレス変換テーブル5を用いてホスト1が指定したLSAをPSAにアドレス変換する。最後にPSAに対応したフラッシュメモリ8内からデータが読み出される。
The
例えば、ホスト1が指定したLSAが「2」であった場合、アドレス変換テーブル5により「6」というPSAに変換される。これにより、図18に示すように、「A」というデータが読み出されることになる。LSA格納領域12にはLSAである「2」が格納されている。
For example, when the LSA designated by the
次に、半導体ディスク装置2へのデータの書き込み動作を図19及び図20で説明する。「A」、「B」、「C」というデータがPSAの「1」、「3」、「7」に格納されている状態を初期状態とする。データを書き込む際に注意しなければならないのはフラッシュメモリ8はデータの再書き込みができないという点である。上記初期状態の場合、PSA「1」、「3」、「7」の領域が該当する。
Next, the data writing operation to the
データが書き込まれていないLSAをホスト1が指定してきた場合は、CPU4は、フラッシュメモリ8内の適当な空き領域(PSA「2」、「4」〜「6」、「8」〜「12」)にデータを書き込み、アドレス変換テーブル5内のデータを更新する。図19は、LSA「4」へ「D」というデータの書き込みをホストが指定した場合の例である。データ「D」とホスト1が指定したLSAを空き領域PSA「4」に書き込み、アドレス変換テーブル5のLSA「4」に対応したPSAの部分にPSAの値「4」を書き込む。
When the
ホスト1から、既にデータが書き込まれている領域への再書き込みが要求された場合(例えば、同名ファイルの上書き保存)であっても、再書き込みデータをフラッシュメモリ8の空き領域に書き込み、アドレス変換テーブル5を更新する。図20は、LSA「2」のデータを再書き込みした際の結果である。更新データ「B’」を空き領域PSA「5」に書き込み、アドレス変換テーブル5のLSA「2」に対応するPSAを「5」と更新する。なお、PSA「3」が使用済みデータであることは、カード内のCPU4は認識しておかなければならない。
Even when the
上述したような従来の半導体ディスク装置では、アドレス変換テーブル5がセクタ(データ管理の最小単位)ごとに1つのPSAを格納するメモリ領域が必要となるため、フラッシュメモリ8が大容量になるにつれアドレス変換テーブル5も大容量となるという問題点があった。
In the conventional semiconductor disk device as described above, since the address conversion table 5 requires a memory area for storing one PSA for each sector (minimum unit of data management), the address becomes larger as the
この発明は、前述した問題点を解決するためになされたもので、従来装置のパフォーマンス、つまり読み出し速度と略同程度の読み出し速度を維持し、かつメモリ管理用のアドレス変換テーブルの容量を小さくできる半導体ディスク装置を得ることを目的とする。 The present invention has been made to solve the above-described problems, and can maintain the performance of the conventional apparatus, that is, the reading speed substantially equal to the reading speed, and can reduce the capacity of the address conversion table for memory management. An object is to obtain a semiconductor disk device.
この発明に係る半導体ディスク装置は、論理セクタアドレスに対応する複数のセクタを含むブロックを複数有するフラッシュメモリと、外部から入力される論理セクタアドレスをブロック番号へ変換するためのアドレス変換テーブルと、前記外部から入力される論理セクタアドレスを前記アドレス変換テーブルに基づきブロック番号に変換し、変換したブロック番号に対応するブロックの論理セクタアドレスと、前記外部から入力される論理セクタアドレスとを比較することにより、前記外部から入力される論理セクタアドレスに対応するデータの格納領域を選択し、前記外部から入力される論理セクタアドレスに対応するデータにアクセスする制御手段とを設けたものである。
Semiconductor disk device according to the present invention includes a flash memory having a plurality of blocks includes multiple sectors corresponding to logical sector address, and the address conversion table for converting the logical sector address inputted from the outside to the block number, the By converting the logical sector address input from the outside into a block number based on the address conversion table, and comparing the logical sector address of the block corresponding to the converted block number with the logical sector address input from the outside And a control means for selecting a data storage area corresponding to the logical sector address inputted from the outside and accessing the data corresponding to the logical sector address inputted from the outside .
この発明に係る半導体ディスク装置は、データ管理用のアドレス変換テーブルを小さくできるという効果を奏する。 The semiconductor disk device according to the present invention has an effect that the address conversion table for data management can be reduced.
実施の形態1.
以下、この発明の実施の形態1の構成について図1、図2、図3及び図4を参照しながら説明する。図1は、この発明の実施の形態1の全体構成を示すブロック図である。図2は、図1のアドレス変換テーブルの内部構成を示す図である。図3は、図1のフラッシュメモリの内部構成を示す図である。図4は、図3の消去ブロックの内部構成を示す図である。なお、各図中、同一符号は同一又は相当部分を示す。
Hereinafter, the configuration of the first embodiment of the present invention will be described with reference to FIG. 1, FIG. 2, FIG. 3, and FIG. FIG. 1 is a block diagram showing the overall configuration of
図1において、この実施の形態1に係る半導体ディスク装置2Aは、インターフェース回路3と、CPU4と、アドレス変換テーブル5Aと、フラッシュ制御回路6Aと、データ入出力用セクタバッファ7と、フラッシュメモリ8Aとを備える。
1, the
従来の半導体ディスク装置2との違いは、アドレス変換テーブル5Aの容量が小さい点であり、その分、フラッシュメモリ8Aを大きくできる。また、フラッシュ制御回路6Aは、従来のフラッシュ制御回路6の機能に加えて、ハード的な論理セクタアドレス比較回路61を含む。さらに、CPU4は、読み出し用と書き込み用のアドレスポインタを用いてフラッシュメモリ8A上のデータ管理を行う。すなわち、半導体ディスク装置2Aは、上記論理セクタアドレス比較回路61と、アドレスポインタとを使用することで、従来と略同程度のパフォーマンスを維持しながら、アドレス変換テーブル5Aの容量を小さくできる。なお、この発明に係る制御手段は、この実施の形態1では読み出し用と書き込み用のアドレスポインタを用いるCPU4と、論理セクタアドレス比較回路61を含むフラッシュ制御回路6Aと、データ入出力用セクタバッファ7とから構成される。
The difference from the conventional
アドレス変換テーブル5Aは、論理セクタアドレスを物理消去ブロック番号に変換するためのテーブルである。物理消去ブロック番号(PBN:Physical Block Number)とは、半導体ディスク装置2A内で使用されるフラッシュメモリ8Aのブロックアドレスのことである。
The address conversion table 5A is a table for converting a logical sector address into a physical erase block number. The physical erase block number (PBN: Physical Block Number) is a block address of the
図2において、アドレス変換テーブル5Aは、論理セクタアドレス(LSA)格納部と物理消去ブロック番号(PBN)格納部とから構成される。 In FIG. 2, the address conversion table 5A includes a logical sector address (LSA) storage unit and a physical erase block number (PBN) storage unit.
LSA格納部には論理セクタアドレスが保存されている。内容は固定されている。なお、実際は、論理セクタアドレスがホスト1から送られてくると、論理セクタアドレスデータに基づき変換テーブル用の揮発性RAMのアドレスピンに電圧がかかりPBNデータがでてくる構造になっている。説明をしやすくするために、PBN格納部との対応でLSA格納部があるとしている。PBN格納部には任意のフラッシュメモリ8Aの物理消去ブロック番号が保存される。このアドレス変換テーブル5Aを用いることで、ホスト1が指定する論理セクタアドレスに左右されることなく内部管理に都合のよい物理消去ブロックにデータを保存することができる。このアドレス変換テーブル5Aは、頻繁に書き込み・消去されるのでSRAMやDRAMなどの揮発性のRAMで構成するのが一般的である。
A logical sector address is stored in the LSA storage unit. The content is fixed. Actually, when a logical sector address is sent from the
ただ、このアドレス変換テーブル5Aでは、従来と違いLSAのデータからPBNしか解らない。例えば、消去ブロックのサイズが64キロバイトのフラッシュメモリを用いた場合、内部にはおよそ100前後のセクタ(=512バイト)が存在する(消去ブロック情報格納領域10、LSA格納領域12等がなければ最大128セクタが存在する)。このため目的のデータを検索するための工夫が必要となる。これについては後述する。
However, in this address conversion table 5A, unlike the prior art, only PBN can be obtained from LSA data. For example, when a flash memory having an erase block size of 64 kilobytes is used, there are about 100 sectors (= 512 bytes) inside (maximum if there is no erase block
このアドレス変換テーブル5Aの容量は、以下のようになる。20メガバイトのフラッシュメモリ8Aを使用し、1セクタを512バイトとすると、半導体ディスク装置2A内のセクタ数は従来と同様に40960となる。しかしながら、アドレス変換テーブル5AのPBN格納部にはブロック番号を記憶させるので、半導体ディスク装置2A内のブロック数は、1ブロック(消去ブロック)を64キロバイトとすると以下のようになる。
半導体ディスク装置2A内のブロック数=20メガバイト÷64キロバイト=320ブロック
The capacity of this address conversion table 5A is as follows. If a 20-
Number of blocks in the
次に、「320」を2進数表現する際に必要なビット数は、ln320÷ln2=8.3となり、9桁必要となる。これにより必要なアドレス変換テーブル5Aの容量は、40960×9=368640ビットとなり、最終的に、45キロバイト必要となる。これは、従来の約1/2である。 Next, the number of bits required to represent “320” in binary is ln320 ÷ ln2 = 8.3, which requires nine digits. As a result, the required capacity of the address conversion table 5A is 40960 × 9 = 368640 bits, and finally 45 kilobytes are required. This is about 1/2 of the conventional one.
図3において、フラッシュメモリ8Aは、複数の消去ブロック9Aと、予備の複数の消去ブロック9Aとから構成される。なお、データ(メモリ)管理の対象ブロックのサイズが消去単位と同じであるので、消去ブロックと称する。メインメモリに使用するフラッシュメモリ8Aは、従来と同様ブロック消去型(消去ブロック単位は数K〜数十Kバイト)のフラッシュメモリを用いる。
In FIG. 3, the
図4において、1つの消去ブロック9Aは、先頭に消去ブロック情報格納領域10と、複数のデータ格納領域11と、データ格納領域11毎のLSA(論理セクタアドレス)格納領域12と、データ格納領域11毎の有効データ確認フラグ13とを有する。有効データ確認フラグ13以外は、従来と同様である。この有効データ確認フラグ13は、CPU4が有効データか、いつでも消去可能な無効データかを区別するためのものである。有効データは「FF」(11111111)、無効データは「00」(00000000)で表す。なお、逆の表現でもよい。CPU4は、データの上書きや消去を行った場合、必要なくなったデータ格納領域11に対応する有効データ確認フラグ13を「FF」から「00」へ書き換える。
In FIG. 4, one erase
つぎに、この実施の形態1の動作について図5から図13までを参照しながら説明する。図5〜図8は、この実施の形態1の書き込み動作を説明するための図である。図9及び図10は、この実施の形態1の読み出し動作を説明するための図である。図11及び図12は、この実施の形態1の読み出し動作を示すフローチャートである。図13は、この実施の形態1の書き込み動作を示すフローチャートである。 Next, the operation of the first embodiment will be described with reference to FIGS. 5 to 8 are diagrams for explaining the write operation according to the first embodiment. 9 and 10 are diagrams for explaining the read operation of the first embodiment. 11 and 12 are flowcharts showing the read operation of the first embodiment. FIG. 13 is a flowchart showing the write operation of the first embodiment.
まず、半導体ディスク装置2Aへのデータ書き込み動作を図5〜図8で説明する。従来との違いは、1つの消去ブロック内のセクタ(データ格納領域11)が全て書き込み済みになるまで他の消去ブロックにはデータを書き込まないことである。また、データは、消去ブロックの上から下に連続して書き込む(ランダムに書き込まない)。これは、「書き込み用アドレスポインタ」を用い、書き込みの度に1つづつ更新(インクリメント)していく。ここで、「アドレスポインタ」とは、任意の物理セクタアドレス(PSA)を記憶しておくためのものである。この実施の形態1では、データの読み出し時と、書き込み時にそれぞれ1つの「読み出し用アドレスポインタ」、「書き込み用アドレスポインタ」を使用する。
First, a data write operation to the
半導体ディスク装置2A内のフラッシュメモリ8A内にデータが全く無い状態から動作の説明を進める。このとき、書き込み用アドレスポインタは「1」を指し示している。データ書き込みの際には、まずホスト1から書き込むべきデータと書き込みアドレスが送られてくる。アドレスは、CHS形式の場合が考えられるので従来と同様に全てLSA形式に変換する。アドレス形式情報もホスト1から送られてくるため半導体ディスク装置2A側で容易にCHS形式かLSA形式かを区別することができる。
The description of the operation proceeds from a state in which there is no data in the
LSAがランダムに送られてきても、図5に示すように、書き込みはPBN「1」から行う。例えば、ホスト1からLSA「3」にデータ「A」の書き込み要求があった場合、CPU4は書き込み用アドレスポインタに従い、PBN「1」の先頭のデータ格納領域11にデータ「A」を書き込み、対応する論理セクタアドレス格納領域12にLSA「3」を書き込む。そして、書き込みアドレスポインタを更新する。つまり、書き込みアドレスポインタを「2」とする。さらに、アドレス変換テーブル5AのLSA「3」に対応するPBN格納部に「1」を書き込む。なお、図5〜図9において、フラッシュメモリ8Aの消去ブロック9Aは、説明しやすいようにデータ格納領域11を3つとしている。
Even if the LSA is sent at random, as shown in FIG. 5, the writing is performed from PBN “1”. For example, when there is a write request for the data “A” from the
図6は、クリーンな消去ブロックがあと1ブロックになった状態である。このとき、書き込み用アドレスポインタは、「1」→「2」→「3」→「…」→「8」→「9」と更新されて、PBN「4」の先頭のデータ格納領域11である「10」を指し示している。ここで、これ以上書き込むと、クリーンな消去ブロックを確保することができないためフラッシュメモリ8Aの消去ブロックのクリーニングを行う。
FIG. 6 shows a state in which a clean erase block has become one block. At this time, the write address pointer is updated as “1” → “2” → “3” → “...” → “8” → “9”, and is the top
CPU4は、全ての消去ブロック内の状態を確認し消去に最適なブロックを決定する。最適なブロックとは、有効データ確認フラグ13に基づく、有効なデータがあまり存在しない消去ブロックや、消去ブロック情報格納領域10の内容に基づく、消去回数が少ない消去ブロックなどである。図6では、各消去ブロックの消去回数は「0」で同じであり、PBN「1」が有効なデータが少ないため、つまりPBN「1」のデータ「A’」はデータ「A」の上書きを意味しているため、このブロックを消去し、クリーンなセクタを確保することにする。
The
まず、図7に示すように、有効なデータをクリーンなPBN「4」に退避し、次にアドレス変換テーブル5Aを更新する。その後、図8に示すように、PBN「1」をブロック消去し、ブロック消去回数を「1」だけ増やす。この作業により、クリーンなブロック1つと、クリーンなセクタ1つが確保されたことになる。このとき、書き込み用アドレスポインタは「12」を指し示している。 First, as shown in FIG. 7, valid data is saved in clean PBN “4”, and then the address conversion table 5A is updated. After that, as shown in FIG. 8, PBN “1” is erased as a block, and the number of block erases is increased by “1”. By this work, one clean block and one clean sector are secured. At this time, the write address pointer points to “12”.
次に、半導体ディスク装置2Aからのデータ読み出し動作を図9及び図10で説明する。まず、ホスト1から送られてきたアドレスをLSA形式に統一する。次に、アドレス変換テーブル5Aを用いてLSAからPBNを割り出す。
Next, a data read operation from the
次に、得られたPBN内の論理セクタアドレス格納領域12に格納されたLSAを下から順に確認していく。この際、図10に示すように、フラッシュ制御回路6A内の論理セクタアドレス比較回路61で、ホスト1から送られてきたLSAと、該当PBN内の論理セクタアドレス格納領域12に格納されたLSAとを比較する。一致したときのデータ格納領域11(セクタ)の内容が読み出すべきデータである。このとき、読み出し用アドレスポインタに一致したときのPSAにプラス1した値をセットする。読み出しデータが複数のセクタの場合、次の読み出し時は読み出し用アドレスポインタが指し示すセクタアドレスからデータを読み出す。
Next, the LSAs stored in the logical sector
例えば、ホスト1からLSAが「2」というデータが送られてきた場合、図9に示すように、アドレス変換テーブル5Aにより、PBN「3」を得る。次に、PBN「3」の消去ブロック内の論理セクタアドレスを下から順に確認する。一番下のLSAは「6」であるから該当せず。次に、次のLSAが「2」であるから一致する。従って、読み出すべきデータは「H」ということになる。このとき、読み出し用アドレスポインタは「9」である。
For example, when data with LSA “2” is sent from the
従来と違い、消去ブロックが大きくなると検索に要する時間がかかることになる。しかし、一般にデータは512バイト(1セクタ)以上のサイズのものが多いため、初めてのデータ検索には、1つの消去ブロック内に約100セクタのデータエリアがあるため、最高100ステップ程度の検索を必要とするが、2回目以降は前回読み出したセクタの次のセクタにデータがある可能性が極めて高いため、前回読み出したセクタの次のセクタのアドレスを読み出し用アドレスポインタに記憶しておくことで検索回数を大幅に減少させることができる。 Unlike the prior art, if the erase block becomes large, it takes time to search. However, in general, since the data has a size of 512 bytes (1 sector) or more, the first data search has a data area of about 100 sectors in one erase block. Although it is necessary, it is very likely that there is data in the sector next to the sector read last time after the second time, so by storing the address of the sector next to the sector read last time in the read address pointer The number of searches can be greatly reduced.
つづいて、半導体ディスク装置2Aからのデータ読み出し動作を図11及び図12のフローチャートで説明する。1〜数十のセクタからなるファイル(データ)を扱う場合、ファイルの先頭のセクタを読み出す際は読み出し用アドレスポインタが決定していないので、図11の検索処理を行う。また、上記ファイルの次のセクタのデータを読み出すときには読み出し用アドレスポインタが設定されているので、図12の処理を行う。図11の検索処理との違いは、図12の処理はホスト1から読み出すべきデータのアドレス(LSA)を受け取るが、ホスト1からのLSAを使用することなくデータを読み出すことである。図11の検索処理は、ファイルの先頭セクタのデータを読み出す場合の他に、読み出し用アドレスポインタが消去ブロック内の最終セクタアドレスまできた場合にも行う。これは、次に読み出すセクタが存在する消去ブロックが解らなくなるためである。CPU4は、ファイル名等に基づきファイルの先頭とそれ以外を認識し、また、ブロックサイズ等に基づき最終セクタアドレスを認識する。
Next, the data read operation from the
初めに、ホスト1から読み出すべきデータのセクタ情報を受け取る(ステップ20)。これはLSAの形式かもしくはCHS形式で送られてくる。LSA形式に統一するためにCHSデータ形式で送られてきた場合はLSA形式に変換する(ステップ21〜22)。この変換は、半導体ディスク装置2A内のCPU4を用いてもかまわないし、専用の回路を半導体ディスク装置内部に持たせてもかまわない。
First, sector information of data to be read is received from the host 1 (step 20). This is sent in LSA format or CHS format. If it is sent in the CHS data format to unify it into the LSA format, it is converted to the LSA format (
次に、LSAをPBNに変換する(ステップ23)。これは、アドレス変換テーブル5Aを用いる。次に、決定したPBN内の論理セクタアドレス格納領域12内に格納されたLSAを読み出す。この読み出したLSAと、ホスト1からのLSAとを論理セクタアドレス比較回路61で比較し、不一致ならば次の論理セクタアドレス格納領域12内に格納されたLSAを読み出し、上記PBN内を下から検索し、同様の比較を一致するまで行う。なお、検索の方向は、場合によっては上から行ってもよい(ステップ24〜26)。
Next, LSA is converted into PBN (step 23). This uses the address conversion table 5A. Next, the LSA stored in the logical sector
LSA同士が一致したら、対応するデータ格納領域11からデータを読み出す(ステップ27)。そして、読み出し用アドレスポインタに、上記のデータを読み出した次のセクタアドレスをセットする(ステップ28)。 If the LSAs match, the data is read from the corresponding data storage area 11 (step 27). Then, the next sector address from which the above data has been read is set in the read address pointer (step 28).
つづいて、次のセクタアドレスのデータを読み出す場合は以下のとおりである。ステップ40〜42は、上記ステップ20〜22と同様である。これは、インターフェースの互換性を保つために、ホスト1からのLSAを受け取り、処理した形にしなければならないからである。
Next, when reading the data of the next sector address, it is as follows.
次に、読み出し用アドレスポインタが指し示すセクタアドレスからデータを読み出す(ステップ43)。そして、読み出し用アドレスポインタに「1」を加算して更新する。ある1つのファイルを読み出す場合、従来の半導体ディスク装置ではファイルを構成しているセクタ数だけアドレス変換テーブル5を参照する。しかし、この実施の形態1では、初回の消去ブロック内のデータ検索に時間をとるものの、それ以降のセクタに関しては読み出し用アドレスポインタに従ってデータを読み出すため、2つ目以降のセクタに関しては上記従来装置よりも高速に処理できる。 Next, data is read from the sector address indicated by the read address pointer (step 43). Then, "1" is added to the read address pointer and updated. When reading a single file, the conventional semiconductor disk device refers to the address conversion table 5 by the number of sectors constituting the file. However, in the first embodiment, although it takes time to search for data in the first erase block, since the data is read according to the read address pointer for the subsequent sectors, the conventional apparatus is used for the second and subsequent sectors. It can process faster than.
また、読み出し速度を犠牲にし、データ読み出しの信頼度を上げる場合には、ステップ43の次で、ホスト1から受け取ったLSAと、読み出し用アドレスポインタが指し示すセクタのLSA格納領域12内のLSAとを比較して確認する。なお、ここで不一致のときはステップ23以降の検索処理を行う。
Further, when the read speed is sacrificed and the reliability of data read is increased, the LSA received from the
つづいて、半導体ディスク装置2Aへのデータ書き込み動作を図13のフローチャートで説明する。図13のステップ30〜32は、図11のステップ20〜22と同様であるので説明を省略する。まず、書き込み用アドレスポインタの指示に基づき空きセクタを確認する(ステップ33)。
Subsequently, a data write operation to the
空きセクタがある場合は、そこにデータを書き込むとともに、アドレス変換テーブル5Aを更新する(ステップ34〜35)。つまり、データを書き込んだPBNを該当するLSAのPBN格納部に保存する。
If there is an empty sector, data is written there and the address conversion table 5A is updated (
ステップ34において、書き込み用アドレスポインタに基づき空きセクタがない場合には以下のように処理する(ステップ36〜38)。まず、消去回数や無効データ数等に基づき消去するブロックを決定する。次に、有効データを空きブロックにコピーする。その後、決定したブロックを消去し、消去したブロックの消去回数を更新する。そして、ステップ35に進む。
In
データ更新の場合は、旧データの有効データ確認フラグ13を「FF」から「00」へ更新する。また、書き込み用アドレスポインタを更新する(ステップ39)。この実施の形態1では連続してデータを書き込むため、書き込み用アドレスポインタはデータ書き込み終了後、次のセクタアドレスを指し示すことになる。なお、1つの消去ブロック内のセクタ全てがデータで埋まったときは、次に書き込むべき消去ブロックをCPU4が決定し指し示すセクタアドレスを決める。例えば、複数の空きの(クリーンな)消去ブロックが存在する場合、CPU4は、消去回数等に基づき次に書き込むべき空きの消去ブロックを決定する。
In the case of data update, the valid
この実施の形態1は、従来の半導体ディスクカード(装置)の読み出し速度等のパフオーマンスを落とすことなく、読み出し用及び書き込み用アドレスポインタと論理セクタアドレス比較回路61を使用することにより、アドレス変換テーブル5Aの容量を小さくすることができる。アドレス変換テーブル5Aの容量を小さくすることで、無理なく半導体ディスクカードの大容量化を進めることができる。従来のアドレス変換テーブル5を用いると20MBの半導体ディスクで80KBのサイズが、40MBの半導体ディスクで160KB(1.25Mbit)のサイズが必要となる。これがおよそ1/2のサイズに小さくなれば揮発性RAMにかかっていたコストを削減することができ、またアドレス変換テーブル用揮発性RAMメモリが搭載されていたスペースにフラッシュメモリを増設して搭載できるため半導体ディスク装置の容量を増大させることができる。
In the first embodiment, the address conversion table 5A is obtained by using the read and write address pointers and the logical sector
1 ホスト、2A 半導体ディスク装置、3 インターフェース回路、4 CPU、5A アドレス変換テーブル、6A フラッシュ制御回路、61 論理セクタアドレス比較回路、7 データ入出力用セクタバッファ、8A フラッシュメモリ。 1 host, 2A semiconductor disk device, 3 interface circuit, 4 CPU, 5A address conversion table, 6A flash control circuit, 61 logical sector address comparison circuit, 7 data input / output sector buffer, 8A flash memory.
Claims (3)
外部から入力される論理セクタアドレスをブロック番号へ変換するためのアドレス変換テーブルと、
前記外部から入力される論理セクタアドレスを前記アドレス変換テーブルに基づきブロック番号に変換し、変換したブロック番号に対応するブロックの論理セクタアドレスと、前記外部から入力される論理セクタアドレスとを比較することにより、前記外部から入力される論理セクタアドレスに対応するデータの格納領域を選択し、前記外部から入力される論理セクタアドレスに対応するデータにアクセスする制御手段と
を備えことを特徴とする半導体ディスク装置。 A flash memory having a plurality of blocks including a plurality of sectors corresponding to logical sector addresses;
An address conversion table for converting an externally input logical sector address into a block number;
The logical sector address input from the outside is converted into a block number based on the address conversion table, and the logical sector address of the block corresponding to the converted block number is compared with the logical sector address input from the outside. And a control means for selecting a data storage area corresponding to the logical sector address inputted from the outside and accessing the data corresponding to the logical sector address inputted from the outside. apparatus.
ことを特徴とする請求項1記載の半導体ディスク装置。 The semiconductor disk device according to claim 1, wherein the address conversion table is stored in a volatile memory.
ことを特徴とする請求項1又は2記載の半導体ディスク装置。 3. The semiconductor disk device according to claim 1 , wherein the block is a data erasing unit .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005176388A JP3976764B2 (en) | 2005-06-16 | 2005-06-16 | Semiconductor disk device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005176388A JP3976764B2 (en) | 2005-06-16 | 2005-06-16 | Semiconductor disk device |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2828795A Division JP3706167B2 (en) | 1995-02-16 | 1995-02-16 | Semiconductor disk device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2005332415A JP2005332415A (en) | 2005-12-02 |
JP3976764B2 true JP3976764B2 (en) | 2007-09-19 |
Family
ID=35486981
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005176388A Expired - Lifetime JP3976764B2 (en) | 2005-06-16 | 2005-06-16 | Semiconductor disk device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3976764B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8151082B2 (en) * | 2007-12-06 | 2012-04-03 | Fusion-Io, Inc. | Apparatus, system, and method for converting a storage request into an append data storage command |
JP5026213B2 (en) * | 2007-09-28 | 2012-09-12 | 株式会社日立製作所 | Storage apparatus and data deduplication method |
JP4691123B2 (en) | 2008-03-01 | 2011-06-01 | 株式会社東芝 | Memory system |
-
2005
- 2005-06-16 JP JP2005176388A patent/JP3976764B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JP2005332415A (en) | 2005-12-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3706167B2 (en) | Semiconductor disk device | |
JP4418439B2 (en) | Nonvolatile storage device and data writing method thereof | |
KR100595909B1 (en) | How to access information and how to manage information storage in storage and flash memory devices | |
KR100193779B1 (en) | Semiconductor disk device | |
JP4832521B2 (en) | Data management method in flash memory media | |
US6978342B1 (en) | Moving sectors within a block of information in a flash memory mass storage architecture | |
US6145051A (en) | Moving sectors within a block of information in a flash memory mass storage architecture | |
CN100424655C (en) | Method for managing flash memory | |
US7840617B2 (en) | Host device and memory system | |
US7552311B2 (en) | Memory device with preread data management | |
US5924113A (en) | Direct logical block addressing flash memory mass storage architecture | |
JPH08137634A (en) | Flash disk card | |
US20060149902A1 (en) | Apparatus and method for storing data in nonvolatile cache memory considering update ratio | |
JP2011107851A (en) | Memory system | |
JPH08328762A (en) | Semiconductor disk device and memory management method thereof | |
JP3421581B2 (en) | Storage device using nonvolatile semiconductor memory | |
US7051251B2 (en) | Method for storing data in a write-once memory array using a write-many file system | |
JPWO2006067923A1 (en) | MEMORY CONTROLLER, NONVOLATILE MEMORY DEVICE, NONVOLATILE MEMORY SYSTEM, AND MEMORY CONTROL METHOD | |
JP2012113343A (en) | Storage device | |
JP2009037317A (en) | MEMORY CONTROLLER, NONVOLATILE MEMORY DEVICE USING THE SAME, AND NONVOLATILE MEMORY SYSTEM | |
JP3976764B2 (en) | Semiconductor disk device | |
TWI813362B (en) | Partial erasing management method, memory storage device and memory control circuit unit | |
CN103365790A (en) | Memory controller, storage device and data writing method | |
CN102467459B (en) | Data writing method, memory controller and memory storage device | |
JP3769395B2 (en) | External storage device using non-volatile memory |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20061108 |
|
A975 | Report on accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A971005 Effective date: 20070307 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070320 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070515 |
|
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: 20070612 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070619 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100629 Year of fee payment: 3 |
|
R150 | Certificate of patent (=grant) or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110629 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110629 Year of fee payment: 4 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110629 Year of fee payment: 4 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120629 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120629 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130629 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130629 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140629 Year of fee payment: 7 |
|
EXPY | Cancellation because of completion of term |