JP2001154909A - Flash memory management device and recording medium - Google Patents

Flash memory management device and recording medium

Info

Publication number
JP2001154909A
JP2001154909A JP33487599A JP33487599A JP2001154909A JP 2001154909 A JP2001154909 A JP 2001154909A JP 33487599 A JP33487599 A JP 33487599A JP 33487599 A JP33487599 A JP 33487599A JP 2001154909 A JP2001154909 A JP 2001154909A
Authority
JP
Japan
Prior art keywords
block
data
sector
primary
flash memory
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.)
Granted
Application number
JP33487599A
Other languages
Japanese (ja)
Other versions
JP3793868B2 (en
Inventor
Yasuyuki Kimura
康之 木村
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP33487599A priority Critical patent/JP3793868B2/en
Publication of JP2001154909A publication Critical patent/JP2001154909A/en
Application granted granted Critical
Publication of JP3793868B2 publication Critical patent/JP3793868B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Memory System (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Read Only Memory (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

PROBLEM TO BE SOLVED: To prevent the rewrite of the entire block from being frequently generated and to prevent the decline of a data write speed. SOLUTION: Plural blocks which are data erasure units are divided into a primary block group, a secondary block group and a spare block n. At the time of a data write request to a primary block a1, in the case that all sectors s1∼sj are dirty (already written), a free secondary block in the secondary block group is used as an extension block a2. In the case that even all the sectors s1∼sj of the secondary block a2 become dirty, only the valid sector data of the primary and secondary clocks rearranged and rewritten to a new primary block n (a3) using the spare block n and an unused sector area is secured. Then, the already rearranged primary block a1 is turned to the spare block n by erasing contents, the already rearranged secondary block a2 is also returned to the secondary block group by erasing the contents and a block rewrite generation frequency is lowered.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、フラッシュメモリ
に対するデータの書き込みを制御するためのフラッシュ
メモリ管理装置及び記録媒体に関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a flash memory management device and a recording medium for controlling data writing to a flash memory.

【0002】[0002]

【従来の技術】一般に、パーソナルコンピュータなどの
情報処理装置では、半導体メモリからなるROM,RA
Mの他に、ハードディスクが内蔵の記憶装置として使用
され、さらに、フロッピディスク、CDROM、ROM
カード、RAMカードなどが外部記憶装置として使用さ
れる。
2. Description of the Related Art Generally, in information processing apparatuses such as personal computers, ROMs and RAs composed of semiconductor memories are used.
M, a hard disk is used as a built-in storage device, and a floppy disk, CDROM, ROM
Cards, RAM cards, and the like are used as external storage devices.

【0003】さらに最近では、書き替え可能な読み出し
専用メモリであるフラッシュメモリも内蔵あるいは外部
記憶装置として使用されるようになっている。
[0003] More recently, a flash memory, which is a rewritable read-only memory, has been used as a built-in or external storage device.

【0004】このフラッシュメモリは、セクタ単位で読
み込みや書き込みが行えるメモリであり、ハード的にコ
ントローラがない場合は、ソフトウエアにより読み書き
の制御を行う。
[0004] The flash memory is a memory that can read and write data in sector units. If there is no hardware controller, the flash memory is controlled by software.

【0005】通常、このフラッシュメモリを組み込んだ
情報処理装置におけるOS(オペレーションシステム)
のファイルシステムが、該メモリの読み書きを行う単位
(セクタ)は、フラッシュメモリの消去単位であるブロ
ックのサイズより小さく、1セクタあたりの書き込み速
度をあげるために、1セクタだけの書き換えの場合、ブ
ロック全体の書き換えはなるべく起こらないような仕組
としている。
Usually, an OS (operation system) in an information processing apparatus incorporating the flash memory.
The unit (sector) in which the file system reads / writes the memory is smaller than the size of the block, which is the erasing unit of the flash memory, and in order to increase the writing speed per sector, in the case of rewriting only one sector, The system is designed to minimize rewriting as much as possible.

【0006】図11はフラッシュメモリにおける従来の
メモリ管理構造を示す図である。
FIG. 11 shows a conventional memory management structure in a flash memory.

【0007】フラッシュメモリは、消去単位である複数
のブロックBlock.0〜Block.nのそれぞれ
において読み書き単位となるセクタエリアs1,s2,
〜,sjを有すると共に、各ブロック毎にそのセクタエ
リアs1,s2,〜,sjの物理アドレスを管理し、ま
た、各セクタエリアs1,s2,〜,sjのデータが有
効であるか無効であるかを管理するためのセクタ情報エ
リアsiを有している。
[0007] A flash memory has a plurality of blocks Block. 0 to Block. n, sector areas s1, s2, which are read / write units
, Sj, and manages the physical addresses of the sector areas s1, s2,..., Sj for each block, and the data in each of the sector areas s1, s2,. It has a sector information area si for managing the information.

【0008】そして、フラッシュメモリの最終ブロック
Block.nは、新たなデータの書き込み対象となる
ブロックの各セクタエリアが全て書き込み済み(ダーテ
ィ)である場合に、その中で有効なセクタエリアのデー
タだけを残して新たなブロックを生成し新たなデータの
書き込みを行うための書き込み操作用予備ブロックとし
て設定される。
Then, the last block Block. n indicates that when all the sector areas of a block to which new data is to be written are already written (dirty), a new block is generated by leaving only valid sector area data therein, Is set as a spare block for a write operation for writing data.

【0009】図12はフラッシュメモリの読み書きをコ
ントロールするソフトウエアドライバの構成を示す図で
ある。
FIG. 12 is a diagram showing a configuration of a software driver for controlling reading and writing of the flash memory.

【0010】すなわち、アプリケーション(a)がフラ
ッシュメモリ(f)上のデータをアクセスする際には、
API(b)を介して行われる。このAPI(b)を介
してデータアクセスの情報を受け取ったOS(c)で
は、前記API(b)の情報からファイルの読み書きの
要求であることを認知すると、これをファイルシステム
(d)へ伝える。ファイルシステム(d)では、ファイ
ルの置かれている論理アドレスを管理しており、アプリ
ケーション(a)から要求を受けたファイルの論理アド
レスに対して読み書きを行う。よって、ファイルシステ
ム(d)では、ファイルの読み書きを、論理アドレスの
セクタ単位でのデータのリードライトに変換して、フラ
ッシュメモリドライバ(e)に対して物理的な読み書き
の要求を出す。
That is, when the application (a) accesses data on the flash memory (f),
This is performed via the API (b). When the OS (c) receives the data access information via the API (b) and recognizes that it is a file read / write request from the API (b) information, it notifies the file system (d) of the request. . The file system (d) manages the logical address where the file is located, and reads and writes the logical address of the file requested by the application (a). Therefore, in the file system (d), the read / write of the file is converted into the read / write of data in units of logical address sectors, and a physical read / write request is issued to the flash memory driver (e).

【0011】この場合、例えばファイルシステム(d)
の管理している論理アドレスと、フラッシュメモリドラ
イバ(e)の物理アドレスが固定で決まっているとする
と、フラッシュメモリ(f)では、個々のセクタエリア
を対象としたデータの書き換えを行うことができないの
で、1セクタの書き換え毎にブロックを消去しての書き
換え作業が必要となってまう。
In this case, for example, the file system (d)
If the logical address managed by the flash memory driver (e) and the physical address of the flash memory driver (e) are fixed, the flash memory (f) cannot rewrite data for individual sector areas. Therefore, every time one sector is rewritten, a rewriting operation of erasing a block is required.

【0012】これを回避するために、ファイルシステム
(d)の論理アドレスに対応したフラッシュメモリドラ
イバ(e)の物理アドレスは、データ書き込みのたびに
変更できるようになっている。
To avoid this, the physical address of the flash memory driver (e) corresponding to the logical address of the file system (d) can be changed every time data is written.

【0013】図13はフラッシュメモリのデータ既存セ
クタに対するデータ書き替え要求に際し同ブロック内に
未使用セクタがある場合の新データの書き込み状態を示
す図である。
FIG. 13 is a diagram showing a write state of new data when there is an unused sector in the same block when a data rewrite request is made to an existing sector of data in the flash memory.

【0014】例えば図13(A)に示すように、ブロッ
クmの既にデータの書き込まれている各セクタエリアs
1〜s5のうちの2番目のセクタエリアs2にデータ書
き換えの要求ができた場合は、図13(B)及び図13
(C)に示すように、該当するブロックmのセクタ情報
エリアsiにおいて、当該書き換え対象の古いセクタエ
リアs2を無効状態に設定すると共に、新たな物理アド
レスの未使用のセクタエリアs6にデータを書き込み、
このセクタエリアs6を有効状態に設定する。
For example, as shown in FIG. 13A, each sector area s of a block m in which data has already been written.
When a data rewrite request can be made to the second sector area s2 of 1 to s5, FIG.
As shown in (C), in the sector information area si of the corresponding block m, the old sector area s2 to be rewritten is set to an invalid state, and data is written to an unused sector area s6 of a new physical address. ,
This sector area s6 is set to a valid state.

【0015】フラッシュメモリドライバ(e)では、随
時このセクタ情報エリアsiの管理情報を書き換えなが
ら、ブロック内の新たなセクタエリアへデータを書き足
す形で、書き込みを行う。こうすることで、ブロック内
の全てのセクタエリアs1〜sjが書き込み済みになる
まで、該ブロック全体の消去は行われず、書き込み速度
を上げることができている。
The flash memory driver (e) performs writing by adding data to a new sector area in a block while rewriting the management information of the sector information area si as needed. By doing so, the entire block is not erased until all the sector areas s1 to sj in the block have been written, and the writing speed can be increased.

【0016】図14はフラッシュメモリに対する従来の
データ書き込み制御方式において未使用セクタがないブ
ロックに対するデータ追記要求に伴う新データの書き込
み状態を示す図である。
FIG. 14 is a diagram showing a state of writing new data in response to a data write request for a block having no unused sector in a conventional data write control method for a flash memory.

【0017】例えば図14(A)に示すように、未使用
のセクタエリアがなくなったブロックmへのセクタデー
タの追記要求が起きた場合は、まず、ブロック全体を整
理して別のブロックへ書き写す。すなわち、当該ブロッ
クmのセクタ情報エリアSiにて管理される各セクタエ
リアs1〜sjそれぞれの有効/無効の情報に基づき、
無効になっているセクタデータはすべて捨てて、有効な
セクタデータだけを残し、図14(B)に示すように、
予備ブロックnから確保した新たなブロック1に対して
その有効なセクタデータだけを転送して記憶させる。こ
うすることにより、新しいブロック1には未使用のセク
タエリアができ、この未使用のセクタエリアへ、追記要
求されたデータの書き込みを行う。
For example, as shown in FIG. 14A, when a request for appending sector data to a block m having no unused sector area is issued, first, the entire block is organized and copied to another block. . That is, based on the valid / invalid information of each of the sector areas s1 to sj managed in the sector information area Si of the block m,
All invalid sector data is discarded, and only valid sector data is left. As shown in FIG.
Only the valid sector data is transferred to the new block 1 secured from the spare block n and stored. By doing so, an unused sector area is created in the new block 1, and the data requested to be additionally written is written to this unused sector area.

【0018】この際にも、図14(C)に示すように、
通常のセクタデータの書き込みと同様に、セクタ情報エ
リアsiにおける各セクタ情報の書き換えを行い、各セ
クタエリアの物理アドレスとその有効/無効の状態を更
新して管理する。
At this time, as shown in FIG.
As in the case of normal sector data writing, each sector information in the sector information area si is rewritten, and the physical address of each sector area and its valid / invalid state are updated and managed.

【0019】そして、前記データ整理の対象となったブ
ロックm内の全セクタデータを消去し、図14(D)に
示すように、新たなブロック書き換えのための予備ブロ
ックnに設定する。
Then, all the sector data in the block m which has been subjected to the data reduction are erased and set as a spare block n for rewriting a new block as shown in FIG.

【0020】[0020]

【発明が解決しようとする課題】このように、フラッシ
ュメモリにおける従来のデータ書き込み制御方式では、
ブロック内の各セクタエリアが全て書き込み済み、つま
りダーティになった状態でのセクタデータの書き換え要
求、あるいはセクタデータの追記要求に伴い、そのブロ
ック全体の書き換えが発生するため、メモリ内の各ブロ
ックにおいて、一度その殆どのセクタがダーティ状態と
なると、それ以降、新たなデータ書き換え要求やデータ
追記要求が来た場合に、かなりの割合で前記ブロック全
体の書き換え処理が頻発する状況となってしまう。
As described above, in the conventional data write control method in the flash memory,
Since all the sector areas in the block have been written, that is, a sector data rewrite request in a state of being dirty or a sector data additional write request occurs, the entire block is rewritten. Once most of the sectors are in the dirty state once, when a new data rewrite request or a data additional write request is received, rewrite processing of the entire block frequently occurs at a considerable rate.

【0021】したがって、フラッシュメモリおいて、一
度使用可能領域の全てがダーティ状態となると、それ以
降はブロック全体の書き換えが頻発し、データ書き込み
速度が遅くなるという問題がある。
Therefore, once all of the usable area in the flash memory is in a dirty state, the entire block is frequently rewritten after that, and the data writing speed is reduced.

【0022】また、フラッシュメモリにおける従来のデ
ータ書き込み制御方式では、前記ブロック全体の書き換
え処理の発生に伴い、全てのセクタがダーティとなった
ブロックから新たなブロックへのデータの書き換えが行
われている最中に、ハード的なリセットが掛かって新た
なブロックへの書き込みが中断されると、書き込み途中
にあるセクタのデータが、リセットが掛かる前までのデ
ータしか有効になってなく、残りのセクタエリアに書き
換えるべきデータを全く失ってしまう問題がある。
In a conventional data write control method for a flash memory, data rewriting is performed from a block in which all sectors are dirty to a new block in accordance with occurrence of a rewriting process for the entire block. If a new reset is interrupted due to a hardware reset during the process, the data in the sector being written becomes valid only before the reset, and the remaining sector area There is a problem that data to be rewritten is completely lost.

【0023】本発明は、前記のような問題に鑑みなされ
たもので、その第1の目的は、ブロック全体の書き換え
が頻繁に発生するのを防ぎ、データ書き込み速度の低下
を防止することが可能になるフラッシュメモリ管理装置
及び記録媒体を提供することにある。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-described problems, and a first object of the present invention is to prevent frequent rewriting of an entire block and prevent a reduction in data writing speed. A flash memory management device and a recording medium.

【0024】また、本発明の第2の目的は、データ書き
込みの過程においてハードウエアリセットが掛かった場
合でも、データの修復を容易に行うことが可能になるフ
ラッシュメモリ管理装置を提供することにある。
It is a second object of the present invention to provide a flash memory management device which can easily recover data even if a hardware reset is applied in the process of writing data. .

【0025】[0025]

【課題を解決するための手段】すなわち、本発明の請求
項1に係るフラッシュメモリ管理装置は、フラッシュメ
モリが有する複数のブロックを一次ブロック群と二次ブ
ロック群とに分けて設定するブロック設定手段と、前記
各ブロックが有する複数のセクタエリアの個々のセクタ
エリアにデータを書き込むセクタデータ書き込み手段
と、前記一次ブロック群から確保された一次ブロック内
の全セクタエリアがデータ書き込み済みである場合に
は、当該一次ブロックの拡張ブロックとして前記二次ブ
ロック群から確保した二次ブロックを用いるブロック拡
張手段と、このブロック拡張手段により拡張された二次
ブロック内の全セクタエリアがデータ書き込み済みであ
る場合には、前記データ書き込み済みである一次ブロッ
クと二次ブロック内の有効なセクタデータを整理して新
たな一次ブロックを生成するブロック整理手段と、この
ブロック整理手段によるデータ整理後の元の一次ブロッ
クと二次ブロックそれぞれの全セクタエリアのデータを
消去するブロック解放手段とを備えたことを特徴とす
る。
That is, a flash memory management apparatus according to a first aspect of the present invention is a block setting means for setting a plurality of blocks of a flash memory separately into a primary block group and a secondary block group. And a sector data writing means for writing data into individual sector areas of the plurality of sector areas of each block, and in a case where data has been written in all sector areas in the primary block secured from the primary block group. A block extension unit using a secondary block secured from the secondary block group as an extension block of the primary block; and a case where data has been written in all sector areas in the secondary block extended by the block extension unit. Are the primary and secondary blocks in which the data has been written. Block arranging means for organizing effective sector data to generate a new primary block, and block releasing means for erasing data in all sector areas of the original primary block and secondary block after data arranging by the block arranging means And characterized in that:

【0026】このようなフラッシュメモリ管理装置で
は、一次ブロック内の全セクタエリアがデータ書き込み
済みとなった時点ではブロックの整理は行われず、拡張
メモリとしての二次ブロック内の全セクタエリアがデー
タ書き込み済みとなってはじめて一次,二次ブロック内
の有効なセクタデータが整理されて新たな一次ブロック
が生成され、これと共に、データ整理後の元の一次ブロ
ックと二次ブロックは、それぞれの全セクタエリアのデ
ータが消去されて解放されるので、ブロック全体の書き
換えが頻繁に起こらない構成となる。
In such a flash memory management device, when all the sector areas in the primary block have been written with data, the blocks are not rearranged, and all the sector areas in the secondary block as the extended memory are written with data. Only after that, the valid sector data in the primary and secondary blocks are rearranged to generate a new primary block. At the same time, the original primary and secondary blocks after data rearrangement are all in the respective sector areas. Is erased and released, so that the entire block is not frequently rewritten.

【0027】また、本発明の請求項2に係るフラッシュ
メモリ管理装置は、前記請求項1に係るフラッシュメモ
リ管理装置にあって、前記フラッシュメモリが有する各
ブロックに対し、空き、データ書き込み中、データ書き
込み終了、処理完了の各状態を示すブロック状態情報を
記憶させ、このブロック状態情報に基づきブロック単位
の制御を行うことを特徴とする。
According to a second aspect of the present invention, there is provided a flash memory management device according to the first aspect, wherein each of the blocks of the flash memory has a free space, a data being written, It is characterized in that block state information indicating each state of writing completion and processing completion is stored, and control is performed on a block basis based on the block state information.

【0028】このようなフラッシュメモリ管理装置で
は、フラッシュメモリが有する各ブロックにおいて、空
き、データ書き込み中、データ書き込み終了、処理完了
の各状態を示すブロック状態情報が記憶されて管理され
ることで、例えばハードウエアリセットが発生した場合
に、最もデータ消失の少ないブロック状態に制御できる
ことになる。
In such a flash memory management device, in each block of the flash memory, block state information indicating each state of empty, data writing, data writing end, and processing completion is stored and managed. For example, when a hardware reset occurs, it is possible to control to a block state with the least data loss.

【0029】また、本発明の請求項3に係るフラッシュ
メモリ管理装置は、前記請求項1に係るフラッシュメモ
リ管理装置にあって、前記各ブロックが有する複数のセ
クタエリアに対し、空き、データ書き込み中、書き込み
完了の各状態を示すセクタ状態情報を記憶させ、このセ
クタ状態情報に基づきセクタ単位の制御を行うことを特
徴とする。
According to a third aspect of the present invention, there is provided the flash memory management device according to the first aspect of the present invention, wherein the plurality of sector areas included in each of the blocks are empty and data writing is being performed. And storing sector state information indicating each state of write completion, and performing control in units of sectors based on the sector state information.

【0030】このようなフラッシュメモリ管理装置で
は、フラッシュメモリの各ブロックが有する複数のセク
タエリアにおいて、空き、データ書き込み中、書き込み
完了の各状態を示すセクタ状態情報が記憶されて管理さ
れることで、例えばハードウエアリセットが発生した場
合に、最もデータ消失の少ないセクタ状態に制御できる
ことになる。
In such a flash memory management device, in a plurality of sector areas included in each block of the flash memory, sector status information indicating each status of empty, data writing, and writing completed is stored and managed. For example, when a hardware reset occurs, it is possible to control to a sector state in which data is least lost.

【0031】[0031]

【発明の実施の形態】以下、図面を参照して本発明の実
施の形態について説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0032】(第1実施形態)図1は本発明の実施形態
に係るフラッシュメモリ管理装置を搭載したパーソナル
コンピュータの電子回路の構成を示すブロック図であ
る。
(First Embodiment) FIG. 1 is a block diagram showing a configuration of an electronic circuit of a personal computer equipped with a flash memory management device according to an embodiment of the present invention.

【0033】このパーソナルコンピュータは、制御部
(CPU)11、記憶装置12、RAM13、キーボー
ド14、マウス15、表示部16、記憶媒体読み取り部
18、伝送制御部19より構成され、バス17を介して
相互に接続されている。
This personal computer comprises a control unit (CPU) 11, a storage device 12, a RAM 13, a keyboard 14, a mouse 15, a display unit 16, a storage medium reading unit 18, and a transmission control unit 19, and via a bus 17. Interconnected.

【0034】制御部(CPU)11は、キーボード14
やマウス15からの入力信号に応じて、記憶装置12に
予め記憶されている制御プログラム、あるいはフロッピ
ディスクFDなどの外部記憶媒体18aからフロッピデ
ィスクドライブFDDなどの記憶媒体読み取り部18を
介して記憶装置12に読み込まれた制御プログラム、あ
るいは外部のコンピュータ端末(プログラムサーバ2
1)の記憶装置22から通信ネットワーク20を経由し
伝送制御部19を介して記憶装置12に読み込まれた制
御プログラムを起動させ、RAM13をワークメモリと
して回路各部の動作を制御する。
The control unit (CPU) 11 includes a keyboard 14
And a control program stored in advance in the storage device 12 in response to an input signal from the mouse 15 or a storage device via an external storage medium 18a such as a floppy disk FD via a storage medium reading unit 18 such as a floppy disk drive FDD. 12 or an external computer terminal (program server 2).
The control program read into the storage device 12 from the storage device 22 of 1) via the transmission control unit 19 via the communication network 20 is started, and the operation of each circuit unit is controlled using the RAM 13 as a work memory.

【0035】記憶装置12は、半導体メモリのROMや
フラッシュメモリ(Flash),ハードディスク装置
(HD)等で構成し、本パーソナルコンピュータの電源
投入直後に制御部(CPU)11により読み出される前
述の制御プログラムを予め格納している他に、各種制御
処理の実行に伴い設定されるフォーマットデータや保存
の必要な処理データなどを格納している。
The storage device 12 is constituted by a ROM of a semiconductor memory, a flash memory (Flash), a hard disk device (HD), or the like, and the control program read out by the control unit (CPU) 11 immediately after the personal computer is turned on. Are stored in advance, as well as format data that is set when various control processes are executed, process data that needs to be stored, and the like.

【0036】RAM13は、前述の制御プログラムを実
行する際に制御部(CPU)11が使用するワークメモ
リである。
The RAM 13 is a work memory used by the control unit (CPU) 11 when executing the above-described control program.

【0037】図2は前記パーソナルコンピュータの記憶
装置12に内蔵されるフラッシュメモリ(Flash)
のメモリ管理構造を示す図である。
FIG. 2 shows a flash memory (Flash) built in the storage device 12 of the personal computer.
3 is a diagram showing a memory management structure of FIG.

【0038】このフラッシュメモリ(Flash)は、
複数のブロックBlock.0〜Block.nに区切
られて該ブロック単位でデータの消去が管理され、ま
た、各ブロックBlock.0〜Block.nはその
それぞれに複数のセクタエリアs1〜sjと当該セクタ
エリアs1〜sjのアドレス管理情報及び有効/無効情
報を格納するセクタ情報エリアsiを有し、該セクタ単
位でデータの読み書きが管理される。
This flash memory (Flash)
A plurality of blocks Block. 0 to Block. n, data erasure is managed in block units, and each block Block. 0 to Block. n has a plurality of sector areas s1 to sj and a sector information area si for storing address management information and valid / invalid information of the sector areas s1 to sj. Data read / write is managed in units of the sector. .

【0039】なお、各セクタエリアs1〜sjにおいて
データの書き換えは行えないため、あるセクタエリアに
対するデータの書き換え要求が来た場合には、未使用の
セクタエリアに新たなデータを書き込み、セクタ情報エ
リアsiにおけるアドレス管理情報と有効/無効情報を
変更することにより行う。
Since data cannot be rewritten in each of the sector areas s1 to sj, when a data rewrite request is issued for a certain sector area, new data is written in an unused sector area and the sector information area is written. This is performed by changing address management information and valid / invalid information in si.

【0040】また、このフラッシュメモリで用意されて
いる複数のブロックBlock.0〜Block.n
は、全ブロックの中でm個のブロックBlock.n−
m〜Block.n−1が書き込み用二次ブロックxと
して設定されると共に、最終ブロックnが書き込み操作
用予備ブロックとして設定され、Block.0〜Bl
ock.n−m−1が一次ブロックとして設定される。
Further, a plurality of blocks Block. 0 to Block. n
Is m blocks Block. n-
m-Block. n-1 is set as a write secondary block x, the last block n is set as a write operation spare block, and Block. 0 to Bl
ock. nm-1 is set as the primary block.

【0041】前記二次ブロックxは、各一次ブロックB
lock.0〜Block.n−m−1においてその全
セクタエリアs1〜sjがダーティ(書き込み済み)と
なった状態で、データ書き換え要求あるいはデータ書き
込み要求があった際に、当該全ダーティとなった一次ブ
ロックの書き換えはせずに、この一次ブロックに組み合
わせて続けて新たなデータを書き込んでいくためのブロ
ックとして使用される。
The secondary block x is composed of each primary block B
lock. 0 to Block. When a data rewrite request or a data write request is made in a state in which all the sector areas s1 to sj are dirty (written) in nm-1, rewriting of the primary blocks that are all dirty is performed. Instead, it is used as a block for continuously writing new data in combination with the primary block.

【0042】そして、ブロックの書き換えは、一次ブロ
ック及びこの一次ブロックに続けて割り当てられた二次
ブロックの全セクタエリアがダーティとなった状態で、
データの書き換えあるいは書き込み要求があった際に、
その一次,二次ブロックにおける有効なセクタエリアの
データが予備ブロックnから確保した新たな一次ブロッ
クに書き換えられて整理され、その未使用のセクタエリ
アに新たなデータが書き込まれる。そして、データ整理
された旧一次ブロックはその全内容が消去されて予備ブ
ロックnとして戻され、二次ブロックもその全内容が消
去されて空き二次ブロックBlock.n−m〜Blo
ck.n−1のプールに戻される。
The rewriting of the block is performed in a state where all the sector areas of the primary block and the secondary block allocated subsequently to the primary block are dirty.
When there is a data rewrite or write request,
The data in the effective sector area in the primary and secondary blocks is rewritten into a new primary block secured from the spare block n, organized, and new data is written in the unused sector area. The old primary block in which the data has been rearranged has its entire contents erased and returned as a spare block n. The secondary block also has its entire contents erased and the empty secondary block Block. nm-Blo
ck. Return to pool n-1.

【0043】次に、前記構成によるパーソナルコンピュ
ータのフラッシュメモリに対するデータ書き込み制御機
能について説明する。
Next, the function of controlling data writing to the flash memory of the personal computer having the above configuration will be described.

【0044】図3は前記パーソナルコンピュータのフラ
ッシュメモリに対するデータ書き込み制御処理を示すフ
ローチャートである。
FIG. 3 is a flowchart showing a data write control process for the flash memory of the personal computer.

【0045】例えば図2に示すように、未使用のセクタ
エリアs6〜sjがある一次ブロックBlock.0に
対して、セクタデータの書き換え要求あるいは新たなデ
ータの追記要求があった場合には、当該一次ブロック
“0”の未使用のセクタエリアが先頭セクタから順次検
索され、ダーティ状態(書き込み済み)ではないセクタ
エリアs6が検索されるので、当該検索された未使用の
セクタエリアs6に対して書き換えあるいは追記となる
新たなデータが書き込まれる(S1→S2→S3)。
For example, as shown in FIG. 2, a primary block Block. When a request for rewriting sector data or a request for appending new data to 0 is made, unused sector areas of the primary block “0” are sequentially searched from the first sector, and are in a dirty state (written). Since the sector area s6 is not searched, new data to be rewritten or additionally written is written in the searched unused sector area s6 (S1 → S2 → S3).

【0046】ここで、前記セクタエリアs6に書き込ま
れた新たなデータが書き換えのデータであった場合に
は、該当ブロック“0”のセクタ情報エリアsiで管理
されるアドレス情報が古いセクタエリアのアドレスから
新たなセクタエリアs6のアドレスへ変更されると共
に、古いセクタエリアが有効に、新たなセクタエリアs
6が有効に設定される。
If the new data written in the sector area s6 is rewritten data, the address information managed in the sector information area si of the corresponding block "0" is the address of the old sector area. Is changed to the address of the new sector area s6, the old sector area is effectively enabled, and the new sector area s6 is changed.
6 is set to be valid.

【0047】図4は前記フラッシュメモリに対するデー
タ書き込み制御処理において一次ブロックに未使用セク
タがない場合のデータ書き換え要求に伴う新データの書
き込み状態を示す図である。
FIG. 4 is a diagram showing a write state of new data in response to a data rewrite request when there is no unused sector in the primary block in the data write control process for the flash memory.

【0048】例えば図4(A)に示すように、フラッシ
ュメモリの未使用のセクタエリアがなくなった一次ブロ
ックa1のセクタエリアs5に対してデータ書き換え要
求が来た場合には、まず、当該一次ブロックa1の未使
用のセクタエリアが検索されて全てダーティ(書き込み
済み)であると判断され、この一次ブロックa1に対し
ID(識別情報)が一致する二次ブロックが割り当てら
れているか否か判断される(ステップS1,S2→S
4)。
For example, as shown in FIG. 4A, when a data rewrite request is sent to the sector area s5 of the primary block a1 in which the unused sector area of the flash memory is gone, first, the primary block The unused sector area of a1 is searched and determined to be all dirty (written), and it is determined whether a secondary block having the same ID (identification information) is assigned to the primary block a1. (Steps S1, S2 → S
4).

【0049】ここで、前記データ書き換え要求のあった
一次ブロックa1に対しIDの一致する二次ブロックが
存在しないと判断されると、図4(B)(C)に示すよ
うに、二次ブロックxのプール(Block.n−m〜
Block.n−1)の中から空きブロックが検索され
(ステップS4→S5)、前記一次ブロックa1に対す
る二次ブロックa2としてIDが付されて割り当てられ
(ステップS6→S7)、当該割り当てられた二次ブロ
ックa2のセクタエリアs1に対して新たなデータが書
き込まれる(ステップS8)。
Here, when it is determined that there is no secondary block having the same ID as the primary block a1 for which the data rewrite request has been made, as shown in FIGS. 4B and 4C, x pool (Block. nm-
Block. n-1) is searched for an empty block (step S4 → S5), an ID is assigned as a secondary block a2 to the primary block a1 (step S6 → S7), and the allocated secondary block is assigned. New data is written to the sector area s1 of a2 (step S8).

【0050】この場合、前記データ書き換えの対象とな
った一次ブロックa1のセクタ情報エリアsiにおい
て、セクタエリアs5が無効に変更され、また、二次ブ
ロックa2のセクタ情報エリアsiにおいて、セクタエ
リアs1の物理アドレスが管理され有効セクタに設定さ
れる。
In this case, in the sector information area si of the primary block a1 to be rewritten, the sector area s5 is changed to invalid, and in the sector information area si of the secondary block a2, the sector area s1 is changed. The physical address is managed and set as a valid sector.

【0051】この後、前記一次ブロックa1及び二次ブ
ロックa2に対するデータ書き換え要求あるいはデータ
追記要求があった場合には、当該二次ブロックa2内に
未使用のセクタエリアが存在している限り、その未使用
のセクタエリアに対し新たなデータが書き込まれるよう
になる(ステップS1,S2→S4→S9,S10→S
8)。
Thereafter, when there is a data rewrite request or a data additional write request for the primary block a1 and the secondary block a2, as long as there is an unused sector area in the secondary block a2, the request is made. New data is written into an unused sector area (steps S1, S2 → S4 → S9, S10 → S
8).

【0052】よって、この場合には、二次ブロックa2
に未使用のセクタエリアがなくなるまで、一次及び二次
ブロック全体a1,a2を対象とするブロックの書き換
えは起こらないようになる。
Therefore, in this case, the secondary block a2
Until there is no unused sector area, block rewriting of the entire primary and secondary blocks a1 and a2 does not occur.

【0053】図5は前記フラッシュメモリに対するデー
タ書き込み制御処理において一次,二次ブロックに未使
用セクタがない場合のデータ書き換え要求に伴う新デー
タの書き込み状態を示す図である。
FIG. 5 is a diagram showing a write state of new data in response to a data rewrite request when there is no unused sector in the primary and secondary blocks in the data write control processing for the flash memory.

【0054】例えば図5(A)(B)に示すように、フ
ラッシュメモリの未使用のセクタエリアがなくなった一
次,二次ブロックa1,a2における該一次ブロックa
1のセクタエリアs2に対してデータ書き換え要求が来
た場合には、一次ブロックa1はその全セクタエリアs
1〜sjがダーティ状態と判断され(ステップS1,S
2)、これに割り当てられた二次ブロックa2も全セク
タエリアs1〜sjがダーティ状態と判断されるので
(ステップS4→S9,S10)、当該一次,二次ブロ
ックa1,a2の整理処理(書き換え処理)が行われる
(ステップS11)。
For example, as shown in FIGS. 5A and 5B, the primary block a in the primary and secondary blocks a1 and a2 in which the unused sector area of the flash memory has disappeared.
When a data rewrite request is received for one sector area s2, the primary block a1 is assigned to all the sector areas s2.
1 to sj are determined to be in a dirty state (steps S1 and S1).
2) Since all the sector areas s1 to sj of the secondary block a2 assigned thereto are also determined to be in a dirty state (steps S4 → S9, S10), the primary and secondary blocks a1, a2 are rearranged (rewritten). Process) is performed (step S11).

【0055】この一次,二次ブロックa1,a2の整理
処理では、まず、図5(E)(D)に示すように、デー
タの整理先(書き換え先)となる新たなブロックが予備
ブロックnから確保されて当該一次,二次ブロックa
1,a2と同一グループであることを識別するためのI
D(a3)として割り当てられる。
In the process of organizing the primary and secondary blocks a1 and a2, first, as shown in FIGS. 5E and 5D, a new block as a data organizing destination (rewriting destination) starts from the spare block n. Secured primary and secondary blocks a
I for identifying the same group as
D (a3).

【0056】すると、図5(A)(B)(E)に示すよ
うに、前記一次,二次ブロックa1,a2それぞれのセ
クタ情報エリアsiにて管理される有効/無効のセクタ
情報に基づき、当該各ブロックa1,a2中の有効セク
タのデータのみが読み出され、新ブロックn(a3)に
対して整理されて書き込まれる(ステップS11)。
Then, as shown in FIGS. 5A, 5B and 5E, based on valid / invalid sector information managed in the sector information areas si of the primary and secondary blocks a1 and a2, respectively. Only the data of the effective sector in each of the blocks a1 and a2 is read, and the data is organized and written into the new block n (a3) (step S11).

【0057】そして、この新ブロックn(a3)の未使
用セクタエリアに対して前記書き換え要求に伴う新たな
データが書き込まれ(ステップS12)、当該新ブロッ
クn(a3)のセクタ情報エリアsiにて管理されるア
ドレス情報及び有効/無効情報が各セクタデータの書き
換え及び書き込みアドレスに応じて新たに設定される。
Then, new data associated with the rewrite request is written into the unused sector area of the new block n (a3) (step S12), and the new data is written in the sector information area si of the new block n (a3). The managed address information and the valid / invalid information are newly set according to the rewriting and writing addresses of each sector data.

【0058】このように、前記一次,二次ブロックa
1,a2全体の書き換え整理がなされると、各ブロック
a1,a2の内容はブロック毎に消去され、図5(A)
(D)に示すように、古い一次ブロックa1は予備ブロ
ックnとして戻され、また、図5(B)(C)に示すよ
うに、古い二次ブロックa2は二次ブロックxのプール
に戻される。
Thus, the primary and secondary blocks a
When the entire rewriting of the blocks a1 and a2 is performed, the contents of the blocks a1 and a2 are erased for each block, and FIG.
As shown in FIG. 5D, the old primary block a1 is returned as the spare block n, and as shown in FIGS. 5B and 5C, the old secondary block a2 is returned to the pool of the secondary block x. .

【0059】そして、前記新ブロックn(a3)が新た
な一次ブロックa1として有効になる。
Then, the new block n (a3) becomes effective as a new primary block a1.

【0060】したがって、前記構成のパーソナルコンピ
ュータのフラッシュメモリに対するデータ書き込み制御
機能によれば、フラッシュメモリ内のデータ消去単位で
ある複数のブロックBlock.0〜Block.n
を、一次ブロック群Block.0〜Block.n−
m−1と二次ブロック群n−m〜n−1と予備ブロック
nに分けて設定し、ある一次ブロックに対するデータ書
き込み要求に際しその一次ブロックの全セクタエリアs
1〜sjがダーティ状態(書き込み済み)である場合に
は、前記二次ブロック群n−m〜n−1中の空いている
二次ブロックを前記全ダーティな一次ブロックの拡張ブ
ロックとして使用し、この二次ブロックの全セクタエリ
アs1〜sjまでもがダーティ状態となった場合には、
当該一次ブロックと二次ブロックの有効なセクタデータ
のみを整理して前記予備ブロックnを用いた新たな一次
ブロックへ書き換え、未使用のセクタエリアを確保する
と共に、有効セクタ整理済みの古い一次ブロックはその
内容を消去して予備ブロックnとして設定変更し、同有
効セクタ整理済みの二次ブロックもその内容を消去して
前記二次ブロック群n−m〜n−1中に戻すようにした
ので、ブロック全体の書き換え整理が発生する頻度が大
幅に削減されるようになり、当該ブロック全体の書き換
え整理に起因するデータ書き込み速度の低下を防止でき
るようになる。
Therefore, according to the data write control function for the flash memory of the personal computer having the above configuration, a plurality of blocks Block. 0 to Block. n
To the primary block group Block. 0 to Block. n-
m-1 and the secondary block groups nm-n-1 and the spare block n. When a data write request is made to a certain primary block, all the sector areas s of the primary block are set.
If 1 to sj are in a dirty state (written), use an empty secondary block in the secondary block groups nm to n-1 as an extension block of the all dirty primary blocks, When all the sector areas s1 to sj of this secondary block are in a dirty state,
Only the valid sector data of the primary block and the secondary block are arranged and rewritten to a new primary block using the spare block n, an unused sector area is secured, and the old primary block of which the effective sector is arranged is Since the contents are erased and the setting is changed as the spare block n, the contents of the secondary blocks having the same effective sector arranged are also erased and returned to the secondary block group nm-n-1. The frequency of occurrence of rewriting and reorganization of the entire block is greatly reduced, so that it is possible to prevent a decrease in data writing speed due to rewriting and reorganization of the entire block.

【0061】なお、前記フラッシュメモリに対するデー
タ書き込み制御機能において、各ブロックBlock.
0〜Block.nそれぞれのセクタ情報エリアsiに
は、該当ブロックが次で説明するような4つの状態の何
れかであることを表すブロック状態情報(フラグ)を書
き込み、ブロック整理の途中でのリセット発生などに伴
うブロック移動中のメモリ破壊に対するデータの修復が
容易に行える構成としている。
In the data write control function for the flash memory, each block Block.
0 to Block. In each of the n sector information areas si, block state information (flag) indicating that the corresponding block is in one of the four states described below is written, and this is caused by a reset occurring during block rearrangement. It is configured so that data can be easily repaired against memory destruction during block movement.

【0062】BLOCK FREE:ブロックの空き
状態を表す。二次ブロック群n−m〜n−1のプールに
ある場合や予備ブロックnがこの状態となる。
BLOCK FREE: Indicates an empty state of a block. In this case, the spare block n is in the state of being in the pool of the secondary block groups nm-n-1.

【0063】BLOCK ON WRITE:ブロッ
クのデータ書き込み途中を表す。一次,二次ブロックの
整理に伴いセクタデータが移動途中にある新ブロックが
この状態となる。
BLOCK ON WRITE: Indicates that data is being written to a block. A new block in which sector data is being moved along with the arrangement of the primary and secondary blocks is in this state.

【0064】BLOCK DIRTY:ブロックのデ
ータ書き込みが終了し、且つ同じグループIDを有する
他の有効ブロックが存在する状態を表す。
BLOCK DIRTY: A state in which data writing to a block has been completed and another valid block having the same group ID exists.

【0065】BLOCK COMPLETE:ブロッ
クのデータ書き込みが終了し、且つ古いブロックが削除
された状態を表す。
BLOCK COMPLETE: A state in which data writing to a block has been completed and an old block has been deleted.

【0066】図6は前記フラッシュメモリに対するデー
タ書き込み制御処理において一次,二次ブロックに未使
用セクタがない場合のデータ書き込み要求に伴うデータ
整理の過程とブロック状態情報の遷移(その1)を示す
図である。
FIG. 6 is a diagram showing a data arranging process and a transition of block state information (part 1) following a data write request when there is no unused sector in the primary and secondary blocks in the data write control process for the flash memory. It is.

【0067】図7は前記フラッシュメモリに対するデー
タ書き込み制御処理において一次,二次ブロックに未使
用セクタがない場合のデータ書き込み要求に伴うデータ
整理の過程とブロック状態情報の遷移(その2)を示す
図である。
FIG. 7 is a diagram showing a data arrangement process and a transition of block state information (part 2) in response to a data write request when there is no unused sector in the primary and secondary blocks in the data write control process for the flash memory. It is.

【0068】図6(A)に示すように、通常は、一次ブ
ロックa1,二次ブロックa2共に、そのセクタ情報エ
リアsiにセットされるブロック状態情報(フラグ)
は、“COMPLETE”となる。
As shown in FIG. 6A, normally, both the primary block a1 and the secondary block a2 have the block status information (flag) set in the sector information area si thereof.
Becomes “COMPLETE”.

【0069】ここで、一次ブロックa1,二次ブロック
a2共に未使用のセクタエリアがない状態で、データの
書き込み要求が来ると、前述したように当該一次,二次
ブロックa1,a2の書き換え整理が行われる。
Here, if a data write request comes in a state where there is no unused sector area in both the primary block a1 and the secondary block a2, the rewrite arrangement of the primary and secondary blocks a1 and a2 is performed as described above. Done.

【0070】すなわち、図6(B)に示すように、はじ
めに予備ブロックnが同一グループの新たなブロックn
(a3)として獲得され、そのブロック状態情報は“F
REE”にセットされる。
That is, as shown in FIG. 6B, first, the spare block n is a new block n of the same group.
(A3), and its block status information is "F
REE ”is set.

【0071】すると、図6(C)に示すように、新たな
ブロックn(a3)のブロック状態情報は“ON WR
ITE”に変更セットされ、一次,二次ブロックa1,
a2から有効なセクタデータのみを抽出して書き換える
ブロック全体の整理が開始される。この際、新たなブロ
ックn(a3)へのデータ書き込み途中は、当該ブロッ
ク状態情報は常に“ON WRITE”となっている。
Then, as shown in FIG. 6C, the block state information of the new block n (a3) is “ON WR”.
ITE ", and the primary and secondary blocks a1,
Arrangement of the entire block to be rewritten by extracting only valid sector data from a2 is started. At this time, while data is being written to the new block n (a3), the block status information is always “ON WRITE”.

【0072】そして、図6(D)に示すように、前記一
次,二次ブロックa1,a2から新たなブロックn(a
3)に対する有効データの書き換え整理が終了すると、
新ブロックn(a3)のブロック状態情報は“DIRT
Y”に変更される。なお、この時点では、整理対象ブロ
ックa1,a2は未だ消去されないで残っている。
Then, as shown in FIG. 6D, a new block n (a) is obtained from the primary and secondary blocks a1 and a2.
When the rewriting and rearranging of valid data for 3) is completed,
The block status information of the new block n (a3) is “DIRT
At this point, the rearrangement target blocks a1 and a2 still remain without being erased.

【0073】この後、図7(E)(F)に示すように、
整理対象の一次ブロックa1,二次ブロックa2の内容
は順次消去され、一次ブロックa1は予備ブロックnと
されてそのブロック状態情報は“FREE”に変更セッ
トされ、また、二次ブロックa2は空き二次ブロックx
のプールへ返されてそのブロック状態情報も“FRE
E”に変更セットされる。この間、新ブロックn(a
3)のブロック状態情報は“DIRTY”にセットされ
たままとなる。
Thereafter, as shown in FIGS. 7E and 7F,
The contents of the primary blocks a1 and secondary blocks a2 to be rearranged are sequentially erased, the primary block a1 is set as a spare block n, its block status information is changed and set to "FREE", and the secondary block a2 is set as an empty secondary block. Next block x
And the block status information is also returned to the "FRE
E ". During this time, a new block n (a
The block state information of 3) remains set to "DIRTY".

【0074】そして、図7(G)に示すように、前記一
次ブロックa1,二次ブロックa2の消去が完全に終了
した際に、その新ブロックn(a3)は新たな一次ブロ
ックa1として有効になり、ブロック状態情報は“CO
MPLETE”に変更セットされる。
As shown in FIG. 7 (G), when the erasure of the primary block a1 and the secondary block a2 is completed, the new block n (a3) becomes effective as a new primary block a1. And the block status information is “CO
MPLETE ".

【0075】図8は前記フラッシュメモリのデータ書き
込み制御処理に伴うリセット発生対応処理を示すフロー
チャートである。
FIG. 8 is a flowchart showing a reset occurrence handling process accompanying the data write control process of the flash memory.

【0076】すなわち、フラッシュメモリに対するデー
タ書き込み中にリセットが発生した場合、データ自体が
書き込み途中であるのと同時に、フラッシュメモリドラ
イバ(e)の書き込み手順自体も途中である可能性があ
るため、リセット時には、まずデータ書き込みが完了し
ているかどうかを判断し、完了していない場合には、そ
の後の動作に不具合がないように修正を行う。
That is, if a reset occurs during the writing of data to the flash memory, the writing procedure of the flash memory driver (e) itself may be in the middle of writing the data itself. Sometimes, it is first determined whether or not the data writing has been completed, and if not, a correction is made so that subsequent operations do not have a problem.

【0077】ハードウエアリセットが発生すると、はじ
めに、ブロック状態情報が“ONWRITE”にセット
されているブロックが存在するか否か、つまり、前記図
6(C)で示したように、データ整理途中で有効セクタ
データの書き込み途中にあるブロックが存在するか否か
検索される(ステップA1)。
When a hardware reset occurs, first, it is determined whether or not there is a block whose block status information is set to "ONWRITE". That is, as shown in FIG. It is searched whether there is a block in the middle of writing valid sector data (step A1).

【0078】この場合、新ブロックn(a3)に対し書
き込むべき有効セクタデータは一次,二次ブロックa
1,a2に存在し、“ON WRITE”である新ブロ
ックn(a3)には未だ書き込まれていないデータも存
在するので、旧ブロックである一次,二次ブロックa
1,a2が優先され、“ON WRITE”にセットさ
れている新ブロックn(a3)の内容は削除される(ス
テップA1→A2)。
In this case, the valid sector data to be written to the new block n (a3) is the primary and secondary blocks a
1, a2 and "ON WRITE" in the new block n (a3), which has not yet been written, includes data that has not yet been written.
1 and a2 are prioritized, and the contents of the new block n (a3) set to “ON WRITE” are deleted (step A1 → A2).

【0079】これにより、新ブロックn(a3)は、前
記図6(B)で示したように、一次,二次ブロックa
1,a2からの有効セクタデータの書き込みが行われる
前の状態に戻り、そのブロック状態情報は“FREE”
にセットされる。
As a result, the new block n (a3) is divided into the primary and secondary blocks a, as shown in FIG.
1, a2 returns to the state before the writing of the valid sector data, and the block state information is “FREE”.
Is set to

【0080】一方、前記ステップA1において、ブロッ
ク状態情報が“ON WRITE”にセットされている
データ書き込み途中のブロックが存在しないと判断され
た場合には、次に、ブロック状態情報が“DIRTY”
にセットされているブロックが検索される(ステップA
1→A3)。
On the other hand, if it is determined in step A1 that there is no block in the middle of data writing in which the block status information is set to "ON WRITE", then the block status information is changed to "DIRTY".
Is searched for (step A)
1 → A3).

【0081】つまり、このステップA3では、前記図6
(D)で示したように、一次,二次ブロックa1,a2
からの有効セクタデータの書き換え整理が終了したもの
の、該旧ブロックである一次,二次ブロックa1,a2
の削除は未だ行われていない状態での新ブロックn(a
3)が検索されるもので、この場合には、同じグループ
ID(この場合「a」)が割り当てられているブロック
のなかで、そのブロック状態情報が“COMPLET
E”にセットされている一次,二次ブロックa1,a2
が検索され、前記図7(E)(F)で示したように、各
ブロック毎に順次その内容が消去されると共に、内容消
去後の一次ブロックa1は予備ブロックnとされ、同内
容消去後の二次ブロックa2は未使用の二次ブロックx
のプールに戻される(ステップA4〜A6)。
That is, in this step A3, FIG.
As shown in (D), primary and secondary blocks a1, a2
Although the rewriting and reorganization of the valid sector data have been completed, the old and primary blocks a1 and a2
Of the new block n (a
3) is searched. In this case, among the blocks to which the same group ID (in this case, “a”) is assigned, the block status information is “COMPLET”.
Primary and secondary blocks a1, a2 set to E "
Is searched, and as shown in FIGS. 7E and 7F, the contents are sequentially erased for each block, and the primary block a1 after the contents are erased is set as the spare block n, and after the contents are erased. Is an unused secondary block x
(Steps A4 to A6).

【0082】すると、前記“DIRTY”検索された新
ブロックのブロック状態情報が、前記図7(G)で示し
たように、“COMPLETE”に変更される(ステッ
プA7)。
Then, the block status information of the new block searched for “DIRTY” is changed to “COMPLETE” as shown in FIG. 7G (step A7).

【0083】したがって、前記構成のパーソナルコンピ
ュータのフラッシュメモリに対するデータ書き込み制御
機能によれば、各ブロック毎のセクタ情報エリアsiに
おいて、当該ブロックが空きである場合には“FRE
E”、データ書き込み途中である場合には“ON WR
ITE”、データ書き込み終了で旧ブロック未削除であ
る場合には“DIRTY”、データ書き込み完了で旧ブ
ロック削除後の場合には“COMPLETE”とするブ
ロック状態情報(フラグ)をセットし、ハードウエアリ
セットが発生した際に、“ON WRITE”のブロッ
クが検索された場合には、当該“ON WRITE”の
ブロックを削除してデータ書き込み前のブロック状態に
戻し、また、“DIRTY”のブロックが検索された場
合には、同一グループIDを有する“COMPLET
E”のブロックを順次検索して削除し、当該ブロック状
態情報“DIRTY”を“COMPLETE”に変更セ
ットするようにしたので、一次,二次ブロック全体の書
き換え整理途中にリセットが起きた場合でも、必要デー
タを消失させることなく、その後の動作に支障が生じな
いよう容易にブロックデータを修復することができる。
Therefore, according to the data write control function for the flash memory of the personal computer having the above-described configuration, if the block is empty in the sector information area si for each block, "FRE
E ”, if data is being written,“ ON WR ”
ITE "," DIRTY "when data writing is completed and the old block is not deleted," COMPLETE "when data writing is completed and the old block is deleted, and hardware reset. When the "ON WRITE" block is searched when the error occurs, the "ON WRITE" block is deleted to return to the block state before data writing, and the "DIRTY" block is searched. In this case, “COMPLET” having the same group ID
The block "E" is sequentially searched and deleted, and the block status information "DIRTY" is changed and set to "COMPLETE". Therefore, even if a reset occurs during reorganization of the entire primary and secondary blocks, The block data can be easily repaired without losing the necessary data and without hindering the subsequent operation.

【0084】なお、前記第1実施形態のフラッシュメモ
リに対するデータ書き込み制御機能では、各ブロックB
lock.0〜Block.nそれぞれのセクタ情報エ
リアsiに対し、該当ブロックの状態を表すブロック状
態情報(フラグ)をセットすることで、リセット発生な
どに伴う各ブロックの状態を明確にしてデータの修復が
容易に行える構成としたが、次の第2実施形態において
説明するように、ブロック内の各セクタエリアs1〜s
jのヘッダに対し当該各セクタそれぞれの状態を表すセ
クタ状態情報をセットすることで、セクタ単位の書き足
し途中におけるリセット発生などに伴うデータの損失を
防止する構成としてもよい。
In the data write control function for the flash memory according to the first embodiment, each block B
lock. 0 to Block. By setting the block status information (flag) indicating the status of the corresponding block in each of the n sector information areas si, the status of each block can be clarified due to the occurrence of a reset or the like and the data can be easily repaired. However, as described in the following second embodiment, each sector area s1 to s
By setting the sector status information indicating the status of each sector in the header of j, data loss due to the occurrence of a reset or the like in the middle of writing in the sector unit may be configured.

【0085】(第2実施形態)ブロック内の各セクタエ
リアs1〜sjそれぞれのヘッダにセットされ、該当セ
クタの状態を表すセクタ状態情報としては、次の3つの
セクタ状態情報が用意される。
(Second Embodiment) The following three sector status information is prepared as sector status information which is set in the header of each of the sector areas s1 to sj in the block and indicates the status of the corresponding sector.

【0086】SECTOR FREE:未使用のセク
タを表す。
SECTOR FREE: Indicates an unused sector.

【0087】SECTOR ON WRITE:デー
タ書き込み途中のセクタを表す。
SECTOR ON WRITE: Indicates a sector during data writing.

【0088】SECTOR COMPLETE:デー
タが書き込まれているセクタを表す。
SECTOR COMPLETE: Indicates a sector in which data is written.

【0089】図9はフラッシュメモリに対する第2実施
形態のデータ書き込み制御処理に伴うデータ書き込み過
程とセクタ状態情報の遷移を示す図である。
FIG. 9 is a diagram showing a data write process and a transition of sector state information in the flash memory according to the data write control process of the second embodiment.

【0090】例えば図9(A)に示すように、既にデー
タが書き込まれていてセクタ状態情報が“COMPLE
TE”にセットされている2番目のセクタエリアのデー
タSector02に対しデータの書き換え要求がある
と、セクタ状態情報が“FREE”にセットされている
4番目のセクタエリアが新たなデータ書き込みエリアと
して指定され、図9(B)に示すように、そのセクタ状
態情報が“ON WRITE”に変更セットされる。
For example, as shown in FIG. 9A, data has already been written and the sector state information is "COMPLE".
When there is a data rewrite request for the data Sector02 of the second sector area set to "TE", the fourth sector area whose sector status information is set to "FREE" is designated as a new data write area. Then, as shown in FIG. 9B, the sector status information is changed and set to "ON WRITE".

【0091】そして、この4番目のセクタエリアに対し
新たなデータが書き込まれ、そのデータ書き込みが終了
すると、図9(C)に示すように、前記データ書き換え
の対象となった2番目のセクタエリアにおける次セクタ
の指定エリアi2aに対し、4番目のセクタエリアを示
す次セクタ指定情報がセットされ、さらに、そのセクタ
状態情報が“COMPLETE”に変更セットされる。
Then, new data is written to the fourth sector area, and when the data writing is completed, as shown in FIG. 9C, the second sector area to be rewritten is , The next sector designation information indicating the fourth sector area is set in the designated area i2a of the next sector, and the sector status information is changed and set to "COMPLETE".

【0092】この際、2番目のセクタエリアは、正しい
セクタエリアを指すためだけに使用され、データ自体は
無効となる。
At this time, the second sector area is used only for pointing to a correct sector area, and the data itself becomes invalid.

【0093】図10はフラッシュメモリに対する第2実
施形態のデータ書き込み制御処理に伴うリセット発生時
のデータ修復過程を示す図である。
FIG. 10 is a diagram showing a data restoration process when a reset occurs in the flash memory according to the data write control process of the second embodiment.

【0094】例えば図10(A)に示すように、2番目
のセクタエリアのデータSector02に対するデー
タ書き換え要求に応じて、未使用セクタ“FREE”で
あった4番目のセクタエリアのセクタ状態情報が“ON
WRITE”にセットされて新たなデータの書き込み
途中にある状態で、ハードウエアリセットが発生した場
合には、図10(B)に示すように、データ書き込み中
であるの4番目のセクタエリアのセクタ状態情報は“O
N WRITE”のまま保持され、データ読み込みの際
には、そのセクタ状態情報が“ON WRITE”に保
持されている4番目のセクタエリアは無視される。
For example, as shown in FIG. 10A, in response to a data rewrite request for the data Sector02 of the second sector area, the sector status information of the fourth sector area that was an unused sector “FREE” is changed to “ ON
If a hardware reset occurs while new data is being written while being set to "WRITE", as shown in FIG. 10B, the sector of the fourth sector area in which data is being written is The status information is “O
N WRITE ”, and when reading data, the fourth sector area whose sector state information is held“ ON WRITE ”is ignored.

【0095】よって、データSector02を読み出
す場合には、2番目のセクタエリアから読み出されるこ
とになるので、前記4番目のセクタエリアに書き込み途
中の半端なデータが残ることはなく、書き換え前のデー
タが保持されるようになる。そして、次回のデータ書き
込みの際には、セクタ状態情報が“ON WRITE”
にセットされている4番目のセクタエリアは、ダーティ
(書き込み済み)エリアと等価に判断されて無視され、
図10(C)に示すように、新たな書き換えデータSe
ctor02は、“FREE”であった5番目のセクタ
エリアに書き込まれるようになる。
Therefore, when reading the data Sector02, the data is read from the second sector area, so that the odd data in the middle of writing does not remain in the fourth sector area. Will be retained. Then, at the time of the next data write, the sector status information is set to “ON WRITE”.
The 4th sector area set in is determined to be equivalent to the dirty (written) area and ignored.
As shown in FIG. 10C, new rewrite data Se
The ctrl02 is written in the fifth sector area which was "FREE".

【0096】そして、前記データ書き換えの対象となっ
た2番目のセクタエリアにおける次セクタの指定エリア
i2aには、5番目のセクタエリアを示す次セクタ指定
情報がセットされ、5番目のセクタエリアのセクタ状態
情報が“COMPLETE”に変更セットされる。
The next sector designation information indicating the fifth sector area is set in the next sector designation area i2a in the second sector area subjected to the data rewriting, and the sector of the fifth sector area is set. The status information is changed and set to “COMPLETE”.

【0097】したがって、前記構成のパーソナルコンピ
ュータのフラッシュメモリに対する第2実施形態のデー
タ書き込み制御機能によれば、各セクタ毎のヘッダにお
いて、当該ブロックが未使用(空き)である場合には
“FREE”、データ書き込み途中である場合には“O
N WRITE”、データ書き込み完了である場合には
“COMPLETE”とするセクタ状態情報(フラグ)
をセットし、ハードウエアリセットが発生した際には、
“ON WRITE”で保持されているセクタエリアを
無視し、データ書き換え前のセクタエリアを有効にした
ままデータの読み出しを行うようにしたので、意図しな
いハードウエアリセットが発生した場合のデータ欠損を
最小限に抑えることができる。
Therefore, according to the data write control function of the second embodiment for the flash memory of the personal computer having the above configuration, if the block is unused (empty) in the header of each sector, "FREE" When data is being written, “O
N WRITE ", and if the data writing is completed, set it to" COMPLETE ". Sector status information (flag)
When a hardware reset occurs,
Since the sector area held by "ON WRITE" is ignored and data is read while the sector area before data rewriting is valid, data loss in the event of an unintended hardware reset is minimized. Can be minimized.

【0098】なお、前記各実施形態において記載した手
法、すなわち、図3のフローチャートに示すフラッシュ
メモリに対するデータ書き込み制御処理、図6乃至図8
に示すブロック状態情報を設定したブロック管理処理と
リセット対応処理、図9,図10に示すセクタ状態情報
を設定したセクタ管理処理とリセット対応処理等の各手
法は、コンピュータに実行させることができるプログラ
ムとして、メモリカード(ROMカード20、RAMカ
ード等)、磁気ディスク(フロッピディスク、ハードデ
ィスク等)、光ディスク(CD−ROM、DVD等)、
半導体メモリ等の外部記憶媒体18aに格納して配布す
ることができる。そして、コンピュータは、この外部記
憶媒体18aに記憶されたプログラムを記憶媒体読み取
り部18を介して記憶装置12やRAM13に読み込
み、この読み込んだプログラムによって動作が制御され
ることにより、前記各実施形態において説明したフラッ
シュメモリの管理機能を実現し、前述した手法による同
様の処理を実行することができる。
The method described in each of the above embodiments, that is, the data write control process for the flash memory shown in the flowchart of FIG. 3, and FIGS.
Each of the techniques such as the block management processing and the reset correspondence processing in which the block status information is set shown in FIG. 9 and the sector management processing and the reset correspondence processing in which the sector state information is set shown in FIGS. Memory card (ROM card 20, RAM card, etc.), magnetic disk (floppy disk, hard disk, etc.), optical disk (CD-ROM, DVD, etc.),
It can be stored in an external storage medium 18a such as a semiconductor memory and distributed. Then, the computer reads the program stored in the external storage medium 18a into the storage device 12 or the RAM 13 via the storage medium reading unit 18, and the operation is controlled by the read program. The management function of the flash memory described above is realized, and the same processing can be performed by the above-described method.

【0099】また、前記各手法を実現するためのプログ
ラムのデータは、プログラムコードの形態として通信ネ
ットワーク20上を伝送させることができ、このネット
ワーク20に接続された伝送制御部19によって前記の
プログラムデータを外部のプログラムサーバ21の記憶
装置22から取り込み、前述したフラッシュメモリの管
理機能を実現することもできる。
The program data for realizing each of the above methods can be transmitted on a communication network 20 in the form of a program code, and the transmission control unit 19 connected to the network 20 transmits the program data. Can be fetched from the storage device 22 of the external program server 21 to realize the flash memory management function described above.

【0100】[0100]

【発明の効果】以上のように、本発明の請求項1に係る
フラッシュメモリ管理装置によれば、一次ブロック内の
全セクタエリアがデータ書き込み済みとなった時点では
ブロックの整理は行われず、拡張メモリとしての二次ブ
ロック内の全セクタエリアがデータ書き込み済みとなっ
てはじめて一次,二次ブロック内の有効なセクタデータ
が整理されて新たな一次ブロックが生成され、これと共
に、データ整理後の元の一次ブロックと二次ブロック
は、それぞれの全セクタエリアのデータが消去されて解
放されるので、ブロック全体の書き換えが頻繁に起こら
ない構成になる。
As described above, according to the flash memory management apparatus of the first aspect of the present invention, when all the sector areas in the primary block have been written with data, the blocks are not rearranged, and the expansion is not performed. Only after all the sector areas in the secondary block as the memory have been written with data, the valid sector data in the primary and secondary blocks are organized to generate a new primary block, and together with the original data after the data organization. In the primary block and the secondary block, the data in all the sector areas are erased and released, so that the entire block is not frequently rewritten.

【0101】よって、ブロック全体の書き換えが頻繁に
発生するのを防ぎ、データ書き込み速度の低下を防止す
ることが可能になる。
Therefore, it is possible to prevent frequent rewriting of the entire block and to prevent a reduction in data writing speed.

【0102】また、本発明の請求項2に係るフラッシュ
メモリ管理装置によれば、フラッシュメモリが有する各
ブロックにおいて、空き、データ書き込み中、データ書
き込み終了、処理完了の各状態を示すブロック状態情報
が記憶されて管理されることで、例えばハードウエアリ
セットが発生した場合に、最もデータ消失の少ないブロ
ック状態に制御できるようになる。
Further, according to the flash memory management device of the second aspect of the present invention, in each block of the flash memory, the block status information indicating each status of free, data writing, data writing end, and processing completion is provided. By being stored and managed, for example, when a hardware reset occurs, it is possible to control to a block state with the least data loss.

【0103】また、本発明の請求項3に係るフラッシュ
メモリ管理装置によれば、フラッシュメモリの各ブロッ
クが有する複数のセクタエリアにおいて、空き、データ
書き込み中、書き込み完了の各状態を示すセクタ状態情
報が記憶されて管理されることで、例えばハードウエア
リセットが発生した場合に、最もデータ消失の少ないセ
クタ状態に制御できるようになる。
According to the flash memory management device of the third aspect of the present invention, in a plurality of sector areas of each block of the flash memory, sector status information indicating each status of free, data writing, and writing completed. Is stored and managed, for example, when a hardware reset occurs, it is possible to control to a sector state with the least data loss.

【0104】よって、データ書き込みの過程においてハ
ードウエアリセットが掛かった場合でも、データの修復
を容易に行うことが可能になる。
Therefore, even if a hardware reset is applied in the process of writing data, the data can be easily restored.

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

【図1】本発明の実施形態に係るフラッシュメモリ管理
装置を搭載したパーソナルコンピュータの電子回路の構
成を示すブロック図。
FIG. 1 is a block diagram showing a configuration of an electronic circuit of a personal computer equipped with a flash memory management device according to an embodiment of the present invention.

【図2】前記パーソナルコンピュータの記憶装置に内蔵
されるフラッシュメモリ(Flash)のメモリ管理構
造を示す図。
FIG. 2 is a view showing a memory management structure of a flash memory (Flash) incorporated in a storage device of the personal computer.

【図3】前記パーソナルコンピュータのフラッシュメモ
リに対するデータ書き込み制御処理を示すフローチャー
ト。
FIG. 3 is a flowchart showing a data write control process for the flash memory of the personal computer.

【図4】前記フラッシュメモリに対するデータ書き込み
制御処理において一次ブロックに未使用セクタがない場
合のデータ書き換え要求に伴う新データの書き込み状態
を示す図。
FIG. 4 is a diagram showing a write state of new data accompanying a data rewrite request when there is no unused sector in a primary block in the data write control process for the flash memory.

【図5】前記フラッシュメモリに対するデータ書き込み
制御処理において一次,二次ブロックに未使用セクタが
ない場合のデータ書き換え要求に伴う新データの書き込
み状態を示す図。
FIG. 5 is a diagram showing a write state of new data in response to a data rewrite request when there is no unused sector in the primary and secondary blocks in the data write control process for the flash memory.

【図6】前記フラッシュメモリに対するデータ書き込み
制御処理において一次,二次ブロックに未使用セクタが
ない場合のデータ書き込み要求に伴うデータ整理の過程
とブロック状態情報の遷移(その1)を示す図。
FIG. 6 is a diagram showing a data arrangement process and a transition of block state information (part 1) in response to a data write request when there is no unused sector in the primary and secondary blocks in the data write control process for the flash memory.

【図7】前記フラッシュメモリに対するデータ書き込み
制御処理において一次,二次ブロックに未使用セクタが
ない場合のデータ書き込み要求に伴うデータ整理の過程
とブロック状態情報の遷移(その2)を示す図。
FIG. 7 is a diagram showing a data arrangement process and a transition of block state information (part 2) in response to a data write request when there is no unused sector in the primary and secondary blocks in the data write control process for the flash memory.

【図8】前記フラッシュメモリのデータ書き込み制御処
理に伴うリセット発生対応処理を示すフローチャート。
FIG. 8 is a flowchart showing a reset occurrence handling process accompanying the data write control process of the flash memory.

【図9】フラッシュメモリに対する第2実施形態のデー
タ書き込み制御処理に伴うデータ書き込み過程とセクタ
状態情報の遷移を示す図。
FIG. 9 is a view showing a data write process and a transition of sector state information in a flash memory according to a data write control process of a second embodiment.

【図10】フラッシュメモリに対する第2実施形態のデ
ータ書き込み制御処理に伴うリセット発生時のデータ修
復過程を示す図。
FIG. 10 is a view showing a data restoration process when a reset occurs in the flash memory according to the data write control process of the second embodiment.

【図11】フラッシュメモリにおける従来のメモリ管理
構造を示す図。
FIG. 11 is a diagram showing a conventional memory management structure in a flash memory.

【図12】フラッシュメモリの読み書きをコントロール
するソフトウエアドライバの構成を示す図。
FIG. 12 is a diagram showing a configuration of a software driver that controls reading and writing of the flash memory.

【図13】フラッシュメモリのデータ既存セクタに対す
るデータ書き替え要求に際し同ブロック内に未使用セク
タがある場合の新データの書き込み状態を示す図。
FIG. 13 is a diagram showing a write state of new data when there is an unused sector in the same block when a data rewrite request is made to an existing sector of data in the flash memory.

【図14】フラッシュメモリに対する従来のデータ書き
込み制御方式において未使用セクタがないブロックに対
するデータ追記要求に伴う新データの書き込み状態を示
す図。
FIG. 14 is a diagram showing a write state of new data according to a data additional write request for a block having no unused sector in a conventional data write control method for a flash memory.

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

11 …制御部(CPU) 12 …記憶装置 13 …RAM 14 …キーボード 15 …マウス 16 …表示部 17 …バス 18 …記憶媒体読み取り部 18a…外部記憶媒体 19 …伝送制御部 20 …ネットワーク 21 …プログラムサーバ(外部のコンピュータ端末) 22 …外部端末の記憶装置 DESCRIPTION OF SYMBOLS 11 ... Control part (CPU) 12 ... Storage device 13 ... RAM 14 ... Keyboard 15 ... Mouse 16 ... Display part 17 ... Bus 18 ... Storage medium reading part 18a ... External storage medium 19 ... Transmission control part 20 ... Network 21 ... Program server (External computer terminal) 22… Storage device of external terminal

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 フラッシュメモリが有する複数のブロッ
クを一次ブロック群と二次ブロック群とに分けて設定す
るブロック設定手段と、 前記各ブロックが有する複数のセクタエリアの個々のセ
クタエリアにデータを書き込むセクタデータ書き込み手
段と、 前記一次ブロック群から確保された一次ブロック内の全
セクタエリアがデータ書き込み済みである場合には、当
該一次ブロックの拡張ブロックとして前記二次ブロック
群から確保した二次ブロックを用いるブロック拡張手段
と、 このブロック拡張手段により拡張された二次ブロック内
の全セクタエリアがデータ書き込み済みである場合に
は、前記データ書き込み済みである一次ブロックと二次
ブロック内の有効なセクタデータを整理して新たな一次
ブロックを生成するブロック整理手段と、 このブロック整理手段によるデータ整理後の元の一次ブ
ロックと二次ブロックそれぞれの全セクタエリアのデー
タを消去するブロック解放手段と、を備えたことを特徴
とするフラッシュメモリ管理装置。
1. A block setting means for setting a plurality of blocks included in a flash memory separately into a primary block group and a secondary block group, and writing data into individual sector areas of the plurality of sector areas included in each block. Sector data writing means, and if all sector areas in the primary block secured from the primary block group have already been written with data, the secondary block secured from the secondary block group as an extended block of the primary block. Block extending means to be used; and, when data is written in all the sector areas in the secondary block extended by the block extending means, valid sector data in the primary block and the secondary block in which the data has been written. Means for organizing and generating new primary blocks A flash memory management device comprising: a block releasing unit for erasing data in all the sector areas of each of the original primary block and the secondary block after the data has been rearranged by the block rearranging unit.
【請求項2】 前記フラッシュメモリが有する各ブロッ
クには、空き、データ書き込み中、データ書き込み終
了、処理完了の各状態を示すブロック状態情報を記憶さ
せ、このブロック状態情報に基づきブロック単位の制御
を行うことを特徴とする請求項1に記載のフラッシュメ
モリ管理装置。
2. Each block included in the flash memory stores block state information indicating each state of free space, data writing, data writing end, and processing completion. Based on the block state information, control on a block basis is performed. 2. The flash memory management device according to claim 1, wherein the operation is performed.
【請求項3】 前記各ブロックが有する複数のセクタエ
リアには、空き、データ書き込み中、書き込み完了の各
状態を示すセクタ状態情報を記憶させ、このセクタ状態
情報に基づきセクタ単位の制御を行うことを特徴とする
請求項1に記載のフラッシュメモリ管理装置。
3. A plurality of sector areas of each of the blocks store sector status information indicating each of an empty state, a data writing state, and a writing completion state, and perform control in sector units based on the sector state information. The flash memory management device according to claim 1, wherein:
【請求項4】 フラッシュメモリが有する複数のブロッ
クを一次ブロック群と二次ブロック群とに分けて設定管
理するフラッシュメモリ管理装置に、 前記各ブロックが有する複数のセクタエリアの個々のセ
クタエリアにデータを書き込むセクタデータ書き込みス
テップと、 前記一次ブロック群から確保された一次ブロック内の全
セクタエリアがデータ書き込み済みである場合には、当
該一次ブロックの拡張ブロックとして前記二次ブロック
群から確保した二次ブロックを用いるブロック拡張ステ
ップと、 このブロック拡張ステップにて拡張された二次ブロック
内の全セクタエリアがデータ書き込み済みである場合に
は、前記データ書き込み済みである一次ブロックと二次
ブロック内の有効なセクタデータを整理して新たな一次
ブロックを生成するブロック整理ステップと、 このブロック整理ステップによるデータ整理後の元の一
次ブロックと二次ブロックそれぞれの全セクタエリアの
データを消去するブロック解放ステップと、を実行させ
るためのプログラムを記録したことを特徴とするコンピ
ュータ読み取り可能な記録媒体。
4. A flash memory management device for setting and managing a plurality of blocks of a flash memory by dividing the blocks into a primary block group and a secondary block group, wherein data is stored in individual sector areas of the plurality of sector areas of each block. Writing all the sector areas in the primary block secured from the primary block group, and writing the secondary data secured from the secondary block group as an extended block of the primary block. A block extension step using a block; and if all sector areas in the secondary block extended in the block extension step have already been written with data, the validity in the primary block and the secondary block in which the data has been written is A new primary block by organizing complex sector data And a program for executing a block releasing step of erasing data in all the sector areas of each of the original primary block and the secondary block after the data has been rearranged by the block rearranging step. Computer-readable recording medium.
JP33487599A 1999-11-25 1999-11-25 Flash memory management device and recording medium Expired - Fee Related JP3793868B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP33487599A JP3793868B2 (en) 1999-11-25 1999-11-25 Flash memory management device and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP33487599A JP3793868B2 (en) 1999-11-25 1999-11-25 Flash memory management device and recording medium

Publications (2)

Publication Number Publication Date
JP2001154909A true JP2001154909A (en) 2001-06-08
JP3793868B2 JP3793868B2 (en) 2006-07-05

Family

ID=18282208

Family Applications (1)

Application Number Title Priority Date Filing Date
JP33487599A Expired - Fee Related JP3793868B2 (en) 1999-11-25 1999-11-25 Flash memory management device and recording medium

Country Status (1)

Country Link
JP (1) JP3793868B2 (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005022393A1 (en) * 2003-08-29 2005-03-10 Matsushita Electric Industrial Co., Ltd. Non-volatile storage device and write method thereof
JP2005182793A (en) * 2003-12-19 2005-07-07 Lexar Media Inc Faster write operation to nonvolatile memory by manipulation of frequently accessed sector
JP2006092169A (en) * 2004-09-22 2006-04-06 Toshiba Corp Memory controller, memory device and control method for memory controller
JP2007249509A (en) * 2006-03-15 2007-09-27 Matsushita Electric Ind Co Ltd Data management method for nonvolatile storage device
JP2008524705A (en) * 2004-12-16 2008-07-10 サンディスク コーポレイション Scratch pad block
JP2008537192A (en) * 2005-01-31 2008-09-11 サンディスク アイエル リミテッド How to manage copy operations in flash memory
JP2010176200A (en) * 2009-01-27 2010-08-12 Tokai Rika Co Ltd Flash memory operation protective device and flash memory operation protective method
WO2010146767A1 (en) * 2009-06-18 2010-12-23 パナソニック株式会社 Nonvolatile memory device, access device, nonvolatile memory system, and memory controller
US7971022B2 (en) 2007-05-29 2011-06-28 Samsung Electronics Co., Ltd. Apparatus and method of processing data of non-volatile memory using transaction block
JP2011519095A (en) * 2008-04-25 2011-06-30 サンディスク コーポレイション Method and system for storage address remapping for multi-bank storage devices
JP2011197945A (en) * 2010-03-18 2011-10-06 Toshiba Corp Controller, data storage device, and program
US8307149B2 (en) 2005-12-09 2012-11-06 Panasonic Corporation Nonvolatile memory device including a logical-to-physical logig-to-physical address conversion table, a temporary block and a temporary table
EP2977906A1 (en) 2004-04-28 2016-01-27 Panasonic Corporation Nonvolatile storage device and data write method
JP2016091534A (en) * 2014-10-30 2016-05-23 株式会社東芝 Memory system and program

Cited By (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100511181C (en) * 2003-08-29 2009-07-08 松下电器产业株式会社 Non-volatile storage device and write method thereof
JP4667243B2 (en) * 2003-08-29 2011-04-06 パナソニック株式会社 Nonvolatile storage device and writing method thereof
WO2005022393A1 (en) * 2003-08-29 2005-03-10 Matsushita Electric Industrial Co., Ltd. Non-volatile storage device and write method thereof
JPWO2005022393A1 (en) * 2003-08-29 2006-10-26 松下電器産業株式会社 Nonvolatile storage device and writing method thereof
US7987314B2 (en) 2003-08-29 2011-07-26 Panasonic Corporation Non-volatile memory device and write method thereof
JP4588431B2 (en) * 2003-12-19 2010-12-01 レクサー・メディア・インコーポレイテッド Faster write operations to non-volatile memory due to the operation of frequently accessed sectors
JP2005182793A (en) * 2003-12-19 2005-07-07 Lexar Media Inc Faster write operation to nonvolatile memory by manipulation of frequently accessed sector
EP2977906A1 (en) 2004-04-28 2016-01-27 Panasonic Corporation Nonvolatile storage device and data write method
JP2006092169A (en) * 2004-09-22 2006-04-06 Toshiba Corp Memory controller, memory device and control method for memory controller
JP4713867B2 (en) * 2004-09-22 2011-06-29 株式会社東芝 Memory controller, memory device, and memory controller control method
JP2008524705A (en) * 2004-12-16 2008-07-10 サンディスク コーポレイション Scratch pad block
JP4787266B2 (en) * 2004-12-16 2011-10-05 サンディスク コーポレイション Scratch pad block
JP2008537192A (en) * 2005-01-31 2008-09-11 サンディスク アイエル リミテッド How to manage copy operations in flash memory
US8307149B2 (en) 2005-12-09 2012-11-06 Panasonic Corporation Nonvolatile memory device including a logical-to-physical logig-to-physical address conversion table, a temporary block and a temporary table
JP2007249509A (en) * 2006-03-15 2007-09-27 Matsushita Electric Ind Co Ltd Data management method for nonvolatile storage device
KR101336258B1 (en) 2007-05-29 2013-12-03 삼성전자 주식회사 Apparatus and method of processing data of non-volatile memory
US7971022B2 (en) 2007-05-29 2011-06-28 Samsung Electronics Co., Ltd. Apparatus and method of processing data of non-volatile memory using transaction block
JP2011519095A (en) * 2008-04-25 2011-06-30 サンディスク コーポレイション Method and system for storage address remapping for multi-bank storage devices
JP2010176200A (en) * 2009-01-27 2010-08-12 Tokai Rika Co Ltd Flash memory operation protective device and flash memory operation protective method
WO2010146767A1 (en) * 2009-06-18 2010-12-23 パナソニック株式会社 Nonvolatile memory device, access device, nonvolatile memory system, and memory controller
US8554987B2 (en) 2009-06-18 2013-10-08 Panasonic Corporation Nonvolatile memory system for improving stream data writing
US8495336B2 (en) 2010-03-18 2013-07-23 Kabushiki Kaisha Toshiba Controller, data storage device, and program product
JP2011197945A (en) * 2010-03-18 2011-10-06 Toshiba Corp Controller, data storage device, and program
US9690691B2 (en) 2010-03-18 2017-06-27 Kabushiki Kaisha Toshiba Controller, data storage device, and program product
US9940233B2 (en) 2010-03-18 2018-04-10 Toshiba Memory Corporation Controller, data storage device, and program product
US10229053B2 (en) 2010-03-18 2019-03-12 Toshiba Memory Corporation Controller, data storage device, and program product
US10783072B2 (en) 2010-03-18 2020-09-22 Toshiba Memory Corporation Controller, data storage device, and program product
US11269766B2 (en) 2010-03-18 2022-03-08 Kioxia Corporation Controller for controlling non-volatile semiconductor memory and method of controlling non-volatile semiconductor memory
US11675697B2 (en) 2010-03-18 2023-06-13 Kioxia Corporation Controller for controlling non-volatile semiconductor memory and method of controlling non-volatile semiconductor memory
US11977481B2 (en) 2010-03-18 2024-05-07 Kioxia Corporation Controller for controlling non-volatile semiconductor memory and method of controlling non-volatile semiconductor memory
JP2016091534A (en) * 2014-10-30 2016-05-23 株式会社東芝 Memory system and program

Also Published As

Publication number Publication date
JP3793868B2 (en) 2006-07-05

Similar Documents

Publication Publication Date Title
US6625713B2 (en) Memory controller and method for managing a logical/physical address control table
US6925545B2 (en) Configuring file structures and file system structures in a memory device
US5742934A (en) Flash solid state disk card with selective use of an address conversion table depending on logical and physical sector numbers
JP5603997B2 (en) Storage apparatus and data control method
JP3526452B2 (en) Disk array device and data backup method
US6865658B2 (en) Nonvolatile data management system using data segments and link information
US5996047A (en) Method and apparatus for caching file control information corresponding to a second file block in a first file block
JP2001154909A (en) Flash memory management device and recording medium
KR100703680B1 (en) Flash file system
JPH113287A (en) Storage device and storage area management method used for the device
JP2005284816A (en) Disk array system
JPH11282765A (en) External storage device using flash memory
JP3858538B2 (en) Flash memory data management device
JP3112709B2 (en) Access device for write-once storage medium
JP3818130B2 (en) Data management method and apparatus, data management program, and storage medium storing data management program
KR100321987B1 (en) Parity cache of RAID system and a method for operating the parity cache
JP3067558B2 (en) Extended configuration method of disk array device and disk array device
JPH06309527A (en) Ic card
JP2749752B2 (en) Memory write control device
JP3614886B2 (en) File system
JPH0541037A (en) Digital data recording and reproducing device
JP2003296047A (en) Raid file system
JP2000112832A (en) Information recording method, recording medium and information processor
JP3531438B2 (en) Data management device, data management method, data management system, and external storage device
JPH07152624A (en) Duplex file writing method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060223

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: 20060314

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060327

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090421

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100421

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110421

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120421

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120421

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130421

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130421

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140421

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees