JPH11272569A - Data restoration system for outer storage device using flash memory - Google Patents

Data restoration system for outer storage device using flash memory

Info

Publication number
JPH11272569A
JPH11272569A JP6977598A JP6977598A JPH11272569A JP H11272569 A JPH11272569 A JP H11272569A JP 6977598 A JP6977598 A JP 6977598A JP 6977598 A JP6977598 A JP 6977598A JP H11272569 A JPH11272569 A JP H11272569A
Authority
JP
Japan
Prior art keywords
flash memory
data
area
physical sector
management
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP6977598A
Other languages
Japanese (ja)
Inventor
Noriko Kubushiro
紀子 久布白
Yuji Sugaya
祐二 菅谷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP6977598A priority Critical patent/JPH11272569A/en
Publication of JPH11272569A publication Critical patent/JPH11272569A/en
Pending legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Read Only Memory (AREA)

Abstract

PROBLEM TO BE SOLVED: To automatically execute a data restoration operation when power supply is restored and to shorten data restoration time by providing flash management areas in a plurality of flash memories and physical sector management areas in physical sectors storing data and storing necessary data when power supply is restored. SOLUTION: Status tables showing the state of a flash memory 1 are installed in respective flash memory management areas 4. In such a case, a state where data is not stored in a rewrite flash memory, a state where data is written to a middle part, a state where an idle area does not exist, a state where flash memory data of the flash memory 1 storing moving data when only valid data is moved from the flash memory 1 which requires deletion is not stored and a part of the flash memory 1 during deletion, etc., are all displayed in the status table. When power supply is applied to or the power supply of the flash memory 1 is restored, the management area 4 is accessed so that a state before the power supply cut is automatically judged.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はフラッシュメモリ等
のような、不揮発性メモリではあるが、消去回数に制限
があり、データを一括消去することが必要な外部記憶装
置のデータの管理方式に係り、外部記憶装置停復電動作
技術分野に属する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data management method for an external storage device which is a non-volatile memory such as a flash memory, but has a limitation on the number of times of erasure, and needs to erase data all at once. Belongs to the external storage device power recovery operation technical field.

【0002】[0002]

【従来の技術】最近、電気的に書換可能で不揮発性メモ
リとして、フラッシュメモリが注目されており、携帯用
機器や、メモリカード等に使用されてきている。しか
し、データの消去は512byteから64kbyte の大きさ
の消去ブロックの一括消去しか行えず、消去回数は10
4 から105 回程度に制限されている。
2. Description of the Related Art In recent years, flash memories have attracted attention as electrically rewritable and nonvolatile memories, and have been used for portable devices, memory cards, and the like. However, data can only be erased in a batch from 512 bytes to 64 kbytes, and the number of erases is 10
It is limited to 4 to 10 5 times.

【0003】即ち、ホストがアクセスするデータがフラ
ッシュメモリの消去ブロックよりも小さい場合にはフラ
ッシュメモリの消去ブロックを消去する時、消去ブロッ
ク内の有効なデータまで消去してしまうため、有効デー
タを消去しないように別の領域に書き換えるガベージコ
レクションが必要である。
That is, when the data accessed by the host is smaller than the erase block of the flash memory, when the erase block of the flash memory is erased, even the effective data in the erase block is erased. Garbage collection that rewrites to another area so that it does not occur is necessary.

【0004】フラッシュメモリに書換回数の制限がある
ためフラッシュメモリ内のデータの消去回数の平均化を
し、データ書換回数の平均化をデータの格納位置を換え
ることによって、ホストのアクセスするアドレスをフラ
ッシュメモリの実際に格納されているアドスに変換しな
ければならず、又、停電回復時にはフラッシュメモリに
データがどこまで書込まれたかの判定をするのが難し
い。
Since the flash memory has a limit on the number of times of rewriting, the number of times of erasing data in the flash memory is averaged, and the number of times of data rewriting is averaged to change the data storage position, thereby flashing the address accessed by the host. It must be converted to the address actually stored in the memory, and it is difficult to determine how much data has been written to the flash memory at the time of power recovery.

【0005】[0005]

【発明が解決しようとする課題】従来案ではフラッシュ
メモリを使用した外部記憶装置の長寿命化を実現するた
め、複数使用しているフラッシュメモリ間でデータを入
れ替え、消去回数の平均化を行っていた。しかし、フラ
ッシュメモリ間でデータの入れ替えを実行する場合や、
データ書換途中に停電が発生した場合は、電源を再度立
ちあげる時に、外部記憶装置の停電回復動作を行うため
にフラッシュメモリ内に格納された全てのデータを調
べ、書換データ格納可能なフラッシュメモリか、データ
を移動している最中のフラッシュメモリかの判断を行う
必要があり、停復電時データ回復動作に時間がかかる。
In the prior art, in order to extend the life of an external storage device using a flash memory, data is exchanged between a plurality of flash memories used and the number of erasures is averaged. Was. However, when exchanging data between flash memories,
If a power failure occurs during data rewriting, when the power is turned on again, all data stored in the flash memory are checked to perform a power failure recovery operation of the external storage device. It is necessary to determine whether the flash memory is in the process of moving data, and it takes a long time for the data recovery operation at the time of power recovery.

【0006】[0006]

【課題を解決するための手段】本発明の目的は、上記の
問題点を解消して、停電時データ回復動作を自動的に行
い、データ回復時間を短縮する方法である。
SUMMARY OF THE INVENTION An object of the present invention is to solve the above-mentioned problems and to provide a method for automatically performing a data recovery operation at the time of a power failure to shorten the data recovery time.

【0007】そのため、本発明のフラッシュメモリ停電
時データ回復方式は、外部記憶装置内の複数のフラッシ
ュメモリにホストからのデータと、ホストからのアクセ
スするアドレスとデータが書込まれているか、エラーの
発生した物理セクタでないか、また無効なデータを格納
していないかを判定するデータ無効フラグをもつ物理セ
クタ管理領域の2つの構成からなる物理セクタと、エラ
ーの発生したアドレスを格納するエラー発生物理セクタ
アドレス管理領域と、フラッシュメモリ番号,ステータ
ステーブル,フラッシュメモリ消去回数,ステータス無
効フラグからなるフラッシュメモリ管理領域を、フラッ
シュメモリ内に持つことを特徴とする。
Therefore, the data recovery method at the time of a power failure of a flash memory according to the present invention uses the data from the host and the address and data to be accessed by the host in a plurality of flash memories in the external storage device, or determines whether an error has occurred. A physical sector having two configurations of a physical sector management area having a data invalid flag for judging whether the generated physical sector is not a physical sector or not storing invalid data, and an error generating physical for storing an address where an error has occurred. The flash memory has a sector address management area and a flash memory management area including a flash memory number, a status table, a flash memory erase count, and a status invalid flag.

【0008】[0008]

【発明の実施の形態】本発明の実施例を図面を参照して
説明する。図7に本発明によるフラッシュメモリの停電
復電時データ回復方式をとる外部記憶装置構成図を示
す。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments of the present invention will be described with reference to the drawings. FIG. 7 is a configuration diagram of an external storage device that employs a data recovery method at the time of power failure and recovery of a flash memory according to the present invention.

【0009】ホスト1と、CPU2と、ホストのアクセ
スする論理セクタアドレスとフラッシュメモリのデータ
格納領域を表す物理セクタアドレスを対応付けるマッピ
ングテーブル3と、電源立ち上げ時のプログラムを格納
するROM4と、ホストと外部記憶装置とのインタフェ
ース5と、CPU12,マッピングテーブル30を格納
したRAM13,ROM14,インタフェース(I/
F)15に制御信号を出す制御回路16と、記憶媒体で
あるフラッシュメモリ17と、ホストとインタフェース
を結ぶインタフェース用データバス18と、インタフェ
ースと制御回路を結ぶ制御用データバス19と、CPU
12,マッピングテーブル30,ROM14 でデータを送受
信するCPUバス20と、フラッシュメモリ17と制御
回路16の間でデータの送受信を行うメモリデータバス
21と、制御回路16からフラッシュメモリ17へ信号
を送るメモリ制御線22と、CPU12,制御回路1
6,マッピングテーブル30,ROM14間で信号を送
受信する制御信号23からなる。
A host 1, a CPU 2, a mapping table 3 for associating a logical sector address accessed by the host with a physical sector address representing a data storage area of the flash memory, a ROM 4 for storing a program at power-on, and a host An interface 5 with an external storage device, a CPU 12, a RAM 13 storing a mapping table 30, a ROM 14, and an interface (I /
F) a control circuit 16 for issuing a control signal to 15; a flash memory 17 as a storage medium; an interface data bus 18 for connecting an interface with the host; a control data bus 19 for connecting the interface to the control circuit;
12, a mapping table 30, a CPU bus 20 for transmitting and receiving data with the ROM 14, a memory data bus 21 for transmitting and receiving data between the flash memory 17 and the control circuit 16, and a memory for transmitting signals from the control circuit 16 to the flash memory 17. Control line 22, CPU 12, control circuit 1
6, a control signal 23 for transmitting and receiving signals between the mapping table 30 and the ROM 14.

【0010】マッピングテーブル30はホストのアクセ
スするアドレスと実際にデータが格納されているフラッ
シュメモリの物理セクタに変換することを簡単にするた
めに必要である。
The mapping table 30 is necessary for simplifying the conversion to the address accessed by the host and the physical sector of the flash memory where the data is actually stored.

【0011】ROM14はフラッシュメモリを使用した
外部記憶装置が電源立ち上げ時に動作を回復するための
動作プログラムを格納する。
The ROM 14 stores an operation program for recovering the operation of the external storage device using the flash memory when the power is turned on.

【0012】外部記憶装置内のフラッシュメモリ17
は、書換データを格納する書換データ用フラッシュメモ
リ24Mbyte 、書換データ用のフラッシュメモリに新た
にデータの格納位置がなくなった場合に、有効なデータ
を移動するガベージコレクション用フラッシュメモリ1
6Mbyte で分けられている。
The flash memory 17 in the external storage device
Is a rewrite data flash memory 24 Mbytes for storing rewrite data, and a garbage collection flash memory 1 for transferring valid data when a new data storage position is no longer stored in the rewrite data flash memory.
It is divided by 6Mbyte.

【0013】書換データ用フラッシュメモリ、及びガベ
ージコレクション用フラッシュメモリはそれぞれ8Mbyt
e 単位で分かれており、図7のフラッシュメモリ17a
〜17cは8Mbyte の書換データ用フラッシュメモリ、
17d〜17eは8Mbyteのガベージコレクション用フ
ラッシュメモリであるとする。また、各フラッシュメモ
リ17a〜17eのそれぞれは、更に4つの単体のフラ
ッシュメモリから構成されている。単体のフラッシュメ
モリは2Mbyte 、フラッシュメモリの消去ブロックは6
4kbyte で、1個のフラッシュメモリ内に32個の消去
ブロックをもつ。
Each of the flash memory for rewriting data and the flash memory for garbage collection is 8 Mbits.
e, and the flash memory 17a of FIG.
To 17c are 8Mbyte rewrite data flash memory,
17d to 17e are 8 Mbyte garbage collection flash memories. Each of the flash memories 17a to 17e is further composed of four single flash memories. Single flash memory is 2 Mbytes, flash memory erase block is 6
It is 4 kbytes and has 32 erase blocks in one flash memory.

【0014】図3に物理セクタの構成図を示す。物理セ
クタはデータ格納領域とは別に、物理セクタ管理領域が
付加され、データの管理を行う情報を記憶している。物
理セクタはデータ格納領域の512byte、管理領域の3
2Byteの544byteとする。ここで物理セクタ、及び論
理セクタはそれぞれデータを格納する単位、及びホスト
がフラッシュメモリにアクセスする最小のファイル単位
である。
FIG. 3 shows a configuration diagram of a physical sector. The physical sector has a physical sector management area added separately from the data storage area, and stores information for managing data. The physical sector is 512 bytes of the data storage area and 3 bytes of the management area.
It is 544 bytes of 2 bytes. Here, the physical sector and the logical sector are a unit for storing data and a minimum file unit for the host to access the flash memory.

【0015】図1は本発明による外部記憶装置内のフラ
ッシュメモリ構成図である。
FIG. 1 is a configuration diagram of a flash memory in an external storage device according to the present invention.

【0016】フラッシュメモリ1と、フラッシュメモリ
1内の消去ブロック2と、ホストからのデータ書込む物
理セクタ3と、フラッシュメモリ管理領域4からなる。
A flash memory 1, an erase block 2 in the flash memory 1, a physical sector 3 for writing data from the host, and a flash memory management area 4.

【0017】図2はフラッシュメモリ管理領域4の構成
図である。フラッシュメモリ管理領域はエラー発生物理
セクタアドレス管理領域5を各4byteとフラッシュメモ
リステータス管理領域6を各16byte持つ。エラー発生
物理セクタアドレス5とフラッシュメモリステータス管
理領域6を記憶する領域が増加しても記憶領域の確保が
可能なように消去ブロック1個あたり、60byteを確保
する。
FIG. 2 is a configuration diagram of the flash memory management area 4. The flash memory management area has an error-occurring physical sector address management area 5 of 4 bytes each and a flash memory status management area 6 of 16 bytes each. Even if the area for storing the error occurrence physical sector address 5 and the flash memory status management area 6 increases, 60 bytes per erase block is secured so that the storage area can be secured.

【0018】フラッシュメモリ4個に並列アクセスを実
行して大きなフラッシュメモリ1個とみなした場合、ホ
ストフラッシュメモリの消去ブロックにアクセスした場
合に、1度に4個の消去ブロックをアクセスするため、
アクセスする消去ブロックのサイズは256kbyte とみ
なされ、また、フラッシュメモリ管理領域にアクセスす
る場合、アクセスするフラッシュメモリ管理領域の大き
さは240byteとみなされる。
When four flash memories are accessed in parallel and regarded as one large flash memory, and when an erase block of the host flash memory is accessed, four erase blocks are accessed at one time.
The size of the erase block to be accessed is assumed to be 256 kbytes, and when accessing the flash memory management area, the size of the flash memory management area to be accessed is assumed to be 240 bytes.

【0019】消去ブロック数はフラッシュメモリあたり
32個のため、フラッシュメモリ管理領域に240byte
×32個の7680byteを確保でき、フラッシュメモリ
ステータス管理領域6を10個格納する領域をとった場
合、フラッシュメモリステータス管理領域6の領域は1
60byteとなり、それ以外をエラー発生物理セクタアド
レス管理領域5を割り当てた場合では、1860個の物
理セクタアドレスを割り当てることが可能である。
Since the number of erase blocks is 32 per flash memory, 240 bytes are stored in the flash memory management area.
If 32 × 7680 bytes can be secured and an area for storing 10 flash memory status management areas 6 is taken, the area of the flash memory status management area 6 becomes 1
If the error occurrence physical sector address management area 5 is allocated to the other 60 bytes, 1860 physical sector addresses can be allocated.

【0020】エラー発生物理セクタアドレス管理領域5
は物理セクタに格納されたデータにエラーが発生した場
合に、エラーの発生したセクタの先頭物理アドレスを格
納し、またフラッシュメモリ管理領域内のエラー発生物
理セクタアドレス管理領域5や、フラッシュメモリステ
ータス管理領域6にエラーが生じた場合でも、エラー発
生箇所の先頭アドレスを登録することによって、エラー
箇所の特定が可能である。
Error occurrence physical sector address management area 5
When an error occurs in the data stored in the physical sector, stores the start physical address of the sector in which the error has occurred, and stores the error-occurring physical sector address management area 5 in the flash memory management area and the flash memory status management. Even when an error occurs in the area 6, the error location can be specified by registering the start address of the error occurrence location.

【0021】図3は物理セクタ3の構成図である。物理
セクタ3は、ホストがフラッシュメモリにアクセスする
最小のファイル単位であるデータ格納領域512byte
と、物理セクタ管理領域32byteの544byteからな
る。
FIG. 3 is a configuration diagram of the physical sector 3. The physical sector 3 has a data storage area of 512 bytes, which is the minimum file unit for the host to access the flash memory.
And 544 bytes of 32 bytes of the physical sector management area.

【0022】図4に物理セクタ管理領域構成図を示す。
物理セクタ管理領域構成図は、論理アドレスと物理アド
レスが違うため、論理アドレスをデータ管理領域に記憶
させることにより、ホストがデータアクセスした場合
に、どの物理セクタに格納されているか見つけるのに役
立てる論理セクタアドレス格納領域と、0から1への書
換が不可能なフラッシュメモリに物理セクタデータ書換
が生じた場合に、新しいデータを書き直して、旧データ
を無効にする必要があるため、データ無効フラグを立て
ることによって旧データを無効にして、新データか、旧
データかの判定基準をしたり、又、データの書込みが行
えないなどエラーの発生する物理セクタであることを示
すためのデータ無効フラグをもつ。
FIG. 4 shows a configuration diagram of the physical sector management area.
In the physical sector management area configuration diagram, since the logical address and the physical address are different, by storing the logical address in the data management area, when the host accesses the data, it is useful to find out in which physical sector the data is stored. When physical sector data rewriting occurs in the sector address storage area and the flash memory that cannot be rewritten from 0 to 1, new data must be rewritten and the old data must be invalidated. By setting up the old data, the old data is invalidated, the new data or the old data is determined, and a data invalid flag for indicating a physical sector in which an error occurs, such as an inability to write data, is set. Have.

【0023】図5はステータステーブル表記方法であ
る。フラッシュメモリはデータを1から0には書込みの
み可能なため、フラッシュメモリのステータスを1から
0に書き換える方法をとるフラッシュメモリステータス
表記方法とする。ステータステーブルは、ガベージコレ
クション用フラッシュメモリのデータが書込まれていな
い状態,途中までデータが書込まれた状態,空領域がな
くデータが書込みのできない状態,データ書換用フラッ
シュメモリのデータが書込まれていない状態,途中まで
データが書込まれた状態,空領域がなくデータが書込み
のできない状態,消去中の状態の7通りの状態を示す。
FIG. 5 shows a status table notation method. Since the flash memory can only write data from 1 to 0, the flash memory status notation is a method of rewriting the status of the flash memory from 1 to 0. The status table indicates that the data in the garbage collection flash memory has not been written, the data has been written halfway, the data cannot be written because there is no empty area, and the data in the data rewriting flash memory has been written. There are seven states: an unoccupied state, a state where data has been written halfway, a state where there is no empty area where data cannot be written, and a state where data is being erased.

【0024】また、図6は物理セクタ管理領域のデータ
無効フラグ表記方法、又はフラッシュメモリ管理領域4
内のフラッシュメモリステータス管理領域6のステータ
ス無効フラグ表記方法であり、フラッシュメモリは1か
ら0への書換のみ可能であるため、1から0へ書き換え
る表記方法をとる。
FIG. 6 shows a data invalid flag notation method in the physical sector management area or the flash memory management area 4.
Is a status invalid flag notation method in the flash memory status management area 6 within the flash memory. Since the flash memory can only be rewritten from 1 to 0, the notation method of rewriting from 1 to 0 is adopted.

【0025】データ無効フラグ、またはステータス無効
フラグは、データが書込まれていない状態,データが書
込まれていない状態,エラーが発生した領域,データが
書き換えられ、無効データを格納している状態の4種類
の状態を示す。
The data invalid flag or status invalid flag indicates a state where no data has been written, a state where no data has been written, an area where an error has occurred, and a state where data has been rewritten and invalid data has been stored. 4 states are shown.

【0026】エラーが発生してもデータ無効フラグがエ
ラーが発生した領域でないことを示していない場合は、
フラッシュメモリ管理領域内エラー発生物理セクタアド
レス管理領域にアクセスした時にアラー発生領域である
事を示す無効フラグをたてる。
If an error occurs but the data invalid flag does not indicate that it is not the area where the error occurred,
When an error occurrence physical sector address management area in the flash memory management area is accessed, an invalid flag indicating that the area is an error occurrence area is set.

【0027】図8はマッピングテーブル30の構成図を
示す。マッピングテーブル30はホスト1がデータにア
クセスする論理セクタアドレスと、実際にデータが格納
されている物理セクタアドレスが違うため、その対応関
係を示すものであり、ホストがデータアクセスする時に
使用される。マッピングテーブル30は電源立ち上げの
度に作成され、マッピングテーブル30内の物理アドレ
ス格納領域は、データの格納位置が変わった時にそれま
でのデータ格納位置の物理アドレスから現在格納されて
いる物理アドレスに書換が行われる。
FIG. 8 shows the configuration of the mapping table 30. The mapping table 30 shows the correspondence between the logical sector address for accessing data by the host 1 and the physical sector address where data is actually stored, and is used when the host accesses data. The mapping table 30 is created each time the power is turned on, and the physical address storage area in the mapping table 30 is changed from the physical address of the data storage position to the physical address currently stored when the data storage position is changed. Rewriting is performed.

【0028】図9は発明による停復電時データ回復方法
のフローチャート図を示す。図9を用い、停電復電時デ
ータ回復方法を説明する。
FIG. 9 is a flowchart of a data recovery method at the time of power failure recovery according to the present invention. With reference to FIG. 9, a data recovery method at the time of power failure and power recovery will be described.

【0029】データ回復動作を開始すると、まずカウン
ターによりカウントを始める。これは5個のフラッシュ
メモリを使用するため、フラッシュメモリのNo.が1
〜5の値をとるため、カウンタをセットして、フラッシ
ュメモリの回復動作を1個ずつ繰り返し行うために必要
である。
When the data recovery operation is started, first, the counter starts counting. Since this uses five flash memories, the flash memory No. Is 1
It is necessary to set a counter to take a value of 〜5 and repeat the recovery operation of the flash memory one by one.

【0030】先ず、フラッシュメモリNo.が1である
フラッシュメモリのフラッシュメモリ管理領域のフラッ
シュメモリステータステーブル管理領域にアクセスを行
う。フラッシュメモリステータステーブル管理領域は、
ガベージコレクション用データ書込みなしつまり待機中
(状態a),ガベージコレクション用データ書込み中
(状態b),ガベージコレクション用空領域なし(状態
c),書換データ用データ書込みなしつまり待機中(状
態d),書換データ用データ書込み中(状態e),書換
データ用空領域なし(状態f),データ消去中(状態
g)の7種類の状態にわかれる。
First, the flash memory No. Access to the flash memory status table management area of the flash memory management area of the flash memory in which is 1. The flash memory status table management area is
No writing of data for garbage collection, ie, waiting (state a), writing of data for garbage collection (state b), no empty area for garbage collection (state c), no writing of data for rewriting data, ie, waiting (state d), There are seven types of states: writing data for rewriting data (state e), no empty area for rewriting data (state f), and data erasing (state g).

【0031】カウンタ値が1〜4の間は、状態a,c,
d,fの場合、停電復電時データ回復動作終了直後から
データ書込みが行われないため状態判定後、次のフラッ
シュメモリのステータスの回復動作に入る。
While the counter value is between 1 and 4, states a, c,
In the case of d and f, since data writing is not performed immediately after the end of the data recovery operation at the time of power failure recovery, after the state determination, the operation for recovering the status of the next flash memory is started.

【0032】状態b,hの場合、停電復電時データ回復
動作終了直後からデータ書込みが行われるため、フラッ
シュメモリ内の物理セクタ管理領域内のデータ無効フラ
グにアクセスし、書込み可能な物理セクタを特定する。
状態cの場合データ消去動作を再開する。
In states b and h, since data writing is performed immediately after the end of the data recovery operation at the time of power failure recovery, the data invalid flag in the physical sector management area in the flash memory is accessed, and the writable physical sector is accessed. Identify.
In the case of the state c, the data erasing operation is restarted.

【0033】書込み可能な物理セクタの特定、またはデ
ータ消去終了後、状態a,c,d,fと同様、次のフラ
ッシュメモリのステータスの回復動作に入る。カウント
値が5となり、フラッシュメモリNo.5までのフラッ
シュメモリ状態回復が終了したら、データを格納するフ
ラッシュメモリ物理セクタ管理領域内論理セクタアドレ
スにアクセスを行い、マッピングテーブルが形成する。
After the identification of the writable physical sector or the end of the data erasure, the operation for restoring the status of the next flash memory is started as in the states a, c, d and f. The count value becomes 5, and the flash memory No. When the flash memory state recovery up to 5 is completed, the logical sector address in the flash memory physical sector management area for storing data is accessed to form a mapping table.

【0034】次に、状態aや、gにあったフラッシュメ
モリの場合、エラー発生物理アドレスのデータ無効フラ
グが無効になっていないため、エラー発生物理セクタア
ドレス管理領域にアクセスし、データ無効フラグをたて
る。1連の動作によってフラッシュメモリを使用した外
部記憶装置の停電復電時の状態回復が可能となる。
Next, in the case of the flash memory in the state a or g, since the data invalid flag of the error physical address is not invalid, the error memory physical sector address management area is accessed and the data invalid flag is set. Build A series of operations makes it possible to recover the state of the external storage device using the flash memory when the power is restored.

【0035】[0035]

【発明の効果】外部記憶装置内の複数のフラッシュメモ
リ内にフラッシュメモリ管理領域をもち、また、データ
を格納する物理セクタ内にも物理セクタ管理領域をも
ち、停電復電時に必要なデータを格納し、電源立ち上げ
時に管理領域にアクセスすることで、停電復電時のフラ
ッシュメモリのデータ回復を自動的に行い、また外部記
憶装置自体の立上げ時の短縮を図る。
According to the present invention, a plurality of flash memories in an external storage device have a flash memory management area, and a physical sector for storing data also has a physical sector management area, and stores data required when a power failure is restored. Then, by accessing the management area when the power is turned on, the data in the flash memory is automatically recovered when the power is restored, and the startup time of the external storage device itself is reduced.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明におけるフラッシュメモリの構成図。FIG. 1 is a configuration diagram of a flash memory according to the present invention.

【図2】本発明におけるフラッシュメモリの管理領域を
示す構成図。
FIG. 2 is a configuration diagram showing a management area of a flash memory according to the present invention.

【図3】本発明における物理セクタの構成図。FIG. 3 is a configuration diagram of a physical sector according to the present invention.

【図4】本発明における物理セクタの管理領域を示す構
成図。
FIG. 4 is a configuration diagram showing a management area of a physical sector according to the present invention.

【図5】本発明におけるステータステーブル表記方法を
示す図。
FIG. 5 is a diagram showing a status table notation method according to the present invention.

【図6】本発明におけるデータ無効フラグ、及びステー
タス無効フラグ表記方法。
FIG. 6 is a data invalid flag and status invalid flag notation method according to the present invention.

【図7】本発明におけるデータ停電復電時データ回復方
法を用いる場合の外部記憶装置を示す構成図。
FIG. 7 is a configuration diagram showing an external storage device in the case of using the data recovery method at the time of a data power failure recovery according to the present invention.

【図8】本発明におけるマッピングテーブル作成を方法
を示す図。
FIG. 8 is a diagram showing a method of creating a mapping table in the present invention.

【図9】本発明における停電復電時データ回復方法のフ
ローチャート図。
FIG. 9 is a flowchart of a data recovery method at the time of power failure recovery according to the present invention.

【符号の説明】[Explanation of symbols]

1…フラッシュメモリ、2…消去ブロック、3…物理セ
クタ、4…フラッシュメモリ管理領域、5…エラー発生
物理セクタアドレス管理領域、6…フラッシュメモリス
テータステーブル、7…データ格納領域、8…物理セク
タ格納領域、9…論理セクタアドレス、10…データ無
効フラグ、11…ホスト、12…CPU、13…RA
M、14…ROM、15…インタフェース、16…制御
回路、17…フラッシュメモリ、18…インタフェース
用データバス、19…制御用データバス、20…CPU
バス、21…メモリデータバス、22…メモリ制御線、
23…制御信号、30…マッピングテーブル。
1 flash memory, 2 erase block, 3 physical sector, 4 flash memory management area, 5 error physical area address management area, 6 flash memory status table, 7 data storage area, 8 physical sector storage Area, 9: Logical sector address, 10: Data invalid flag, 11: Host, 12: CPU, 13: RA
M, 14 ROM, 15 interface, 16 control circuit, 17 flash memory, 18 data bus for interface, 19 data bus for control, 20 CPU
Bus, 21: memory data bus, 22: memory control line,
23: control signal, 30: mapping table.

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】消去回数に制限があり、消去ブロック内の
データを一括消去するフラッシュメモリを複数記憶媒体
として用い、ホストが実際にアクセスするアドレスがフ
ラッシュメモリに格納されているアドレスに変換される
外部記憶装置で、書換データを格納するフラッシュメモ
リに空領域がなくなったら、書込み空き領域のないフラ
ッシュメモリ内のデータを消去する前に、有効データを
空領域のあるフラッシュメモリに移動し、その以降の外
部からの書換データはデータ移動がされているフラッシ
ュメモリに格納し、有効データの移動終了後は、書込み
空き領域のないフラッシュメモリを一括消去し、有効デ
ータの移動をフラッシュメモリ間で実行する外部記憶装
置において、フラッシュメモリの状態を示すステータス
テーブルを各フラッシュメモリ管理領域内に設け、書換
用フラッシュメモリでデータを格納しない状態,途中ま
でデータが書込まれている状態,空領域がない状態,消
去が必要となったフラッシュメモリから有効データのみ
を移動する時に移動データを格納するフラッシュメモリ
のフラッシュメモリデータを格納しない状態,途中まで
データが書込まれている状態,空領域がない状態、及び
消去中のフラッシュメモリの一部、もしくは全ての状態
のフラッシュメモリの状態をステータステーブルに表す
ことで、電源立ち上げ時やフラッシュメモリの停電復電
の場合に、管理領域にアクセスし、外部記憶装置の電源
が切れる前のフラッシュメモリの状態を自動的に判断
し、外部記憶装置のデータの回復を早めることのできる
停復電データの管理方式。
A flash memory for erasing data in an erase block at a time is used as a plurality of storage media, and an address actually accessed by a host is converted to an address stored in the flash memory. If there is no free space in the flash memory for storing the rewrite data in the external storage device, move the valid data to the flash memory with the free space before erasing the data in the flash memory with no free space. Rewrite data from outside of the flash memory is stored in the flash memory to which the data has been moved, and after the movement of the valid data is completed, the flash memory having no write free area is erased collectively, and the movement of the valid data is executed between the flash memories. In the external storage device, a status table indicating the state of the flash memory is stored in each flash. The flash memory for rewriting is provided in the flash memory management area, the data is not stored in the rewriting flash memory, the data is partially written, there is no empty area, and only valid data is moved from the flash memory that needs to be erased. Sometimes flash data in a flash memory that stores moving data does not store data, data is written halfway, there is no empty area, and part or all of the flash memory is being erased. By displaying the status of the memory in the status table, when the power is turned on or in the event of a power outage of the flash memory, the management area is accessed and the status of the flash memory before the power of the external storage device is turned off is automatically determined. Power recovery data management system that can hasten recovery of data in external storage devices.
【請求項2】請求項1記載の外部記憶装置において、フ
ラッシュメモリ管理領域には、更に、フラッシュメモリ
管理番号格納領域を格納して、それぞれ外部記憶装置の
記憶媒体として使用しているフラッシュメモリのステー
タステーブルを区別して全てのフラッシュメモリにもた
せ、データ書換中に停電が発生した場合には、フラッシ
ュメモリ管理領域のステータステーブルがデータ書換中
のステータスを表していることでデータ書換中のフラッ
シュメモリかを判定し、また、消去が必要となったフラ
ッシュメモリから移動データ中を格納中に停電が発生し
た場合には、ステータステーブルが消去が必要となった
フラッシュメモリから移動データ中を格納中であるか
で、移動データを格納中のフラッシュメモリであるかを
判定し、また、消去中の場合のフラッシュメモリの場合
では、消去中のフラッシュメモリにはステータステーブ
ルは残らないが、消去中以外のフラッシュメモリの管理
領域にアクセスすることで、フラッシュメモリが消去中
であるかを自動的に判定でき、あるフラッシュメモリの
ステータステーブルにエラーが発生している場合におい
ても、エラーの発生していないフラッシュメモリのステ
ータステーブルにアクセスが可能にすることで外部記憶
装置の状態回復に信頼性を高める停復電データ管理方
式。
2. A flash memory management area according to claim 1, further comprising a flash memory management number storage area in said flash memory management area, wherein each of said flash memory management areas has a flash memory management number storage area. If a power failure occurs during data rewriting, the status table in the flash memory management area indicates the status of data rewriting, and the status table can be assigned to all flash memories. If a power failure occurs while the moving data is being stored from the flash memory that needs to be erased, the status table is storing the moving data in the flash memory that needs to be erased. To determine if the flash memory is storing moving data, and erase In the case of flash memory, the status table does not remain in the flash memory being erased, but by accessing the management area of the flash memory other than the one being erased, it is automatically determined whether the flash memory is being erased. Even if an error has occurred in the status table of a certain flash memory, it is possible to access the status table of the flash memory where no error has occurred, thereby improving the reliability of the state recovery of the external storage device. Power recovery data management method.
【請求項3】請求項1又は2記載の外部記憶装置におい
て、フラッシュメモリ内の物理セクタにはホストからの
データを格納するデータ格納領域以外に、さらに物理セ
クタ管理領域をもち、物理セクタ管理領域にはホストが
実際にアクセスするアドレスを実際にフラッシュメモリ
に書込まれているアドレスに変換するために、ホストが
アクセスするアドレスを格納する論理セクタ格納領域
と、物理セクタにデータが書込まれていない状態と、新
しく書換データが書込まれている状態と、データが書き
換えられ、旧データとなったデータとを判断するデータ
無効フラグとを持ち、停電復電の際にデータが物理セク
タにデータが書込まれていない状態と、新しく書換デー
タが書込まれている状態と、データが書き換えられ、旧
データとなっている状態と、エラーが発生した物理セク
タであるかどうかを自動的に判定し、全てのフラッシュ
メモリのデータにアクセスをしなくても、フラッシュメ
モリが書換中のフラッシュメモリかどうかを判定し、書
換中のフラッシュメモリであれが、更にデータ無効フラ
グのみにアクセスすることで新しい書換データを書込む
位置を判定できることで、外部記憶装置の状態回復を早
めることのできる停復電データ管理方式。
3. The external storage device according to claim 1, wherein the physical sector in the flash memory has a physical sector management area in addition to a data storage area for storing data from the host. In order to convert an address actually accessed by the host into an address actually written in the flash memory, data is written in a logical sector storage area for storing an address accessed by the host and a physical sector. It has a data invalid flag that determines whether there is no data, new data has been written, and data that has been rewritten and has become old data. Has not been written, the state in which new rewrite data has been written, and the data has been rewritten and becomes old data. Automatically determines whether the current sector is the physical sector in which the error occurred, and determines whether the flash memory is being rewritten without accessing all the flash memory data. Power recovery data management method that can speed up the recovery of the state of the external storage device by determining the position where new rewrite data is to be written by accessing only the data invalid flag, regardless of the flash memory.
【請求項4】請求項1ないし3のいずれか1項記載のデ
ータ管理方式において、さらに管理領域内には各々のエ
ラー発生物理セクタのアドレスを記憶する、エラー発生
物理セクタアドレス管理領域を全てのフラッシュメモリ
にもたせ、エラーが発生した場合には、エラー発生領域
物理セクタアドレス管理領域に登録し、電源立ち上げ時
やフラッシュメモリの停復電後にエラー発生領域物理セ
クタアドレス管理領域にアクセスすることで、ホストが
フラッシュメモリ全領域にアクセスしてエラー発生箇所
を探す必要がなく、フラッシュメモリのエラー発生箇所
を判定し、データ消去中に停電が発生した場合には、別
のフラッシュメモリにアクセスすることで、エラー発生
箇所を判定し、データ無効フラグを無効にすることでホ
ストのアクセスを行わせないようにしてデータの信頼性
を高める停復電データ管理方式。
4. The data management method according to claim 1, further comprising: storing, in the management area, an address of each error-occurring physical sector address area; If an error occurs in the flash memory, register it in the error occurrence area physical sector address management area and access the error occurrence area physical sector address management area when the power is turned on or after the power is restored from the flash memory. There is no need for the host to access the entire area of the flash memory to search for an error location, determine the error location in the flash memory, and access another flash memory if a power failure occurs during data erasure. To determine the location where the error occurred and disable the data invalid flag to prevent host access. Power recovery data management method as not Align stop data reliability.
JP6977598A 1998-03-19 1998-03-19 Data restoration system for outer storage device using flash memory Pending JPH11272569A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6977598A JPH11272569A (en) 1998-03-19 1998-03-19 Data restoration system for outer storage device using flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6977598A JPH11272569A (en) 1998-03-19 1998-03-19 Data restoration system for outer storage device using flash memory

Publications (1)

Publication Number Publication Date
JPH11272569A true JPH11272569A (en) 1999-10-08

Family

ID=13412505

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6977598A Pending JPH11272569A (en) 1998-03-19 1998-03-19 Data restoration system for outer storage device using flash memory

Country Status (1)

Country Link
JP (1) JPH11272569A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001051883A (en) * 1999-08-12 2001-02-23 Nec Corp Method for self-restoration by nonvolatile memory and novolatile memory device
JP2002318733A (en) * 2001-04-20 2002-10-31 Matsushita Electric Works Ltd Managing device for block erasure type storage medium
WO2003010671A1 (en) * 2001-07-25 2003-02-06 Sony Corporation Non-volatile memory and non-volatile memory data rewriting method
WO2004031966A1 (en) * 2002-10-02 2004-04-15 Matsushita Electric Industrial Co., Ltd. Non-volatile storage device control method
JP2006126919A (en) * 2004-10-26 2006-05-18 Kyocera Corp Data management device for flash memory and control method of flash memory
JP2006268817A (en) * 2005-02-28 2006-10-05 Sony Corp Storage method, its device, and program
JP2008181661A (en) * 2008-04-17 2008-08-07 Renesas Technology Corp Nonvolatile semiconductor memory device
JP2008192061A (en) * 2007-02-07 2008-08-21 Hitachi Ltd Storage system and storage management method
JP2011129192A (en) * 2009-12-16 2011-06-30 Samsung Electronics Co Ltd Semiconductor memory device
WO2013015561A1 (en) * 2011-07-22 2013-01-31 Taejin Info Tech Co., Ltd. Semiconductor storage device-based data restoration

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001051883A (en) * 1999-08-12 2001-02-23 Nec Corp Method for self-restoration by nonvolatile memory and novolatile memory device
JP2002318733A (en) * 2001-04-20 2002-10-31 Matsushita Electric Works Ltd Managing device for block erasure type storage medium
WO2003010671A1 (en) * 2001-07-25 2003-02-06 Sony Corporation Non-volatile memory and non-volatile memory data rewriting method
KR100877030B1 (en) * 2001-07-25 2009-01-07 소니 가부시끼 가이샤 Non-volatile memory and non-volatile memory data rewriting method
US7240178B2 (en) 2001-07-25 2007-07-03 Sony Corporation Non-volatile memory and non-volatile memory data rewriting method
CN100377120C (en) * 2002-10-02 2008-03-26 松下电器产业株式会社 Non-volatile storage device control method
WO2004031966A1 (en) * 2002-10-02 2004-04-15 Matsushita Electric Industrial Co., Ltd. Non-volatile storage device control method
US7321959B2 (en) 2002-10-02 2008-01-22 Matsushita Electric Industrial Co., Ltd. Control method of a non-volatile memory apparatus
JP2006126919A (en) * 2004-10-26 2006-05-18 Kyocera Corp Data management device for flash memory and control method of flash memory
JP2006268817A (en) * 2005-02-28 2006-10-05 Sony Corp Storage method, its device, and program
JP2008192061A (en) * 2007-02-07 2008-08-21 Hitachi Ltd Storage system and storage management method
US8200893B2 (en) 2007-02-07 2012-06-12 Hitachi, Ltd. Storage system and storage management method for controlling off-line mode and on-line of flash memory
US8862839B2 (en) 2007-02-07 2014-10-14 Hitachi, Ltd. Storage system and storage management method for controlling off-line mode and on-line mode of flash memory
JP2008181661A (en) * 2008-04-17 2008-08-07 Renesas Technology Corp Nonvolatile semiconductor memory device
JP2011129192A (en) * 2009-12-16 2011-06-30 Samsung Electronics Co Ltd Semiconductor memory device
WO2013015561A1 (en) * 2011-07-22 2013-01-31 Taejin Info Tech Co., Ltd. Semiconductor storage device-based data restoration
KR101317763B1 (en) * 2011-07-22 2013-10-11 주식회사 태진인포텍 Semiconductor storage device-based data restoration

Similar Documents

Publication Publication Date Title
JP3534585B2 (en) Data storage control method and apparatus for external storage device using a plurality of flash memories
US8041884B2 (en) Controller for non-volatile memories and methods of operating the memory controller
KR100843543B1 (en) System comprising flash memory device and data recovery method thereof
US5682497A (en) Managing file structures for a flash memory file system in a computer
JP5336060B2 (en) Nonvolatile memory device and method of operating the same
JP3485938B2 (en) Nonvolatile semiconductor memory device
KR100572328B1 (en) Flash memory system including bad block management unit
JP3692313B2 (en) Nonvolatile memory control method
US20060288153A1 (en) Storage system using flash memory
JP2007280428A (en) Memory management
JP4046877B2 (en) Batch erase nonvolatile memory and mobile phone
JPH117505A (en) Card type storage medium
WO2023116346A1 (en) Method and system for recovering trim data under abnormal power failure, and solid-state drive
JPH11272569A (en) Data restoration system for outer storage device using flash memory
JP4242245B2 (en) Flash ROM control device
EP2264602A1 (en) Memory device for managing the recovery of a non volatile memory
JP4661369B2 (en) Memory controller
JPH113287A (en) Storage device and storage area management method used for the device
CN115878033B (en) Solid state disk and mapping table management method thereof
JPH11282765A (en) External storage device using flash memory
JP4794530B2 (en) Semiconductor device and mobile phone
JP3808842B2 (en) Storage device having rewritable nonvolatile memory and control method of nonvolatile memory for storage device
JPH05150913A (en) Silicon disk with flash memory as storage medium
JPH06309527A (en) Ic card
KR20050009045A (en) Memory device and error correction method using flash memory