JPH0695955A - Flash file system - Google Patents

Flash file system

Info

Publication number
JPH0695955A
JPH0695955A JP4240635A JP24063592A JPH0695955A JP H0695955 A JPH0695955 A JP H0695955A JP 4240635 A JP4240635 A JP 4240635A JP 24063592 A JP24063592 A JP 24063592A JP H0695955 A JPH0695955 A JP H0695955A
Authority
JP
Japan
Prior art keywords
record
flash
file system
position information
data
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
JP4240635A
Other languages
Japanese (ja)
Inventor
Katsumi Hosono
勝巳 細野
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP4240635A priority Critical patent/JPH0695955A/en
Publication of JPH0695955A publication Critical patent/JPH0695955A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To attain high speed processing by collecting discontinuous and unused areas by a random access operation and reconstituting a file system so that the system is not used by other valid data. CONSTITUTION:An area is updated by an instruction outputted from an insertion/extraction mounting part 11 or a reset signal outputted from the system. Updating processing is executed by a positional information managing part 13 based upon the instruction. The managing part 13 reads out the positional information of each record from a flash memory part 4 in a memory card l, changes the constitution of the information and then stores the changed contents in a positional information storing area 14. As a matter of course, the flashing of all erasing blocks should cause the updating of the area 14. Namely an initializing request is inputted to a flash processing part 12, which executes flash processing and the processed contents are inputted to the managing part 13 to update the area 14.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、性能劣化を抑えること
ができ、かつ固定エリアに書き込みを集中させずに、デ
−タを分散させ、しかも従来のFATファイル・システ
ムのインタフェ−スを維持できるフラッシュ・ファイル
・システムに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention can suppress performance deterioration, disperse data without concentrating writing on a fixed area, and maintain the interface of a conventional FAT file system. Flash file system that can be.

【0002】[0002]

【従来の技術】従来より、製造する時に内容を書き込む
マスクROMと、使用者が電気をかけてプログラムを書
き込むPROM(Programmable ROM)とがある。
PROMのうち、発光装置等により消去、書き換え可能
なものをEPROM(Erasable and Programmable
ROM)と呼んでいる。書き換え可能な読み出し専用
メモリであるPROMのうち、電気をかけて一挙に全内
容を消去させるフラッシュ・メモリ(フラッシュPRO
M)は、メモリ構造が簡単で、チップが小さくてすみ、
DRAMより安価であるため、最近、注目されてきた。
ところで、フラッシュ・メモリには2つの特徴があり、
それらがデバイスを制御するファイル・システムに特殊
な要求を課している。その1つは、ビット値1を0にす
るのはいつでも可能であるのに対して、ビット値0を1
にするには(すなわち、ビット値の消去)、ビット境界
の操作ではない複雑な処理が要求される。このように、
フラッシュ・メモリでは、デバイス単位で消去しなけれ
ばならず、最近の技術でも、少なくとも32Kバイトを
消去しなければ、再書き込みは不可能である。他の1つ
は、消去するために一定時間が必要となることである。
2. Description of the Related Art Conventionally, there are a mask ROM in which contents are written at the time of manufacturing and a PROM (Programmable ROM) in which a user applies electricity to write a program.
Erasable and programmable PROMs that can be erased and rewritten by a light emitting device etc.
ROM). Of the rewritable read-only memory PROMs, flash memory that erases all contents at once by applying electricity (flash PRO
M) has a simple memory structure and a small chip,
Since it is cheaper than a DRAM, it has recently attracted attention.
By the way, flash memory has two features,
They impose special requirements on the file system that controls the device. One is that it is always possible to have a bit value of 1 be 0, whereas a bit value of 0 is 1
(That is, erasing bit values) requires complicated processing that is not a bit boundary operation. in this way,
In flash memory, erasing must be done in device units, and even with recent technologies, rewriting is impossible unless at least 32 Kbytes are erased. The other one is that a certain time is required for erasing.

【0003】また、フラッシュ・メモリは、従来のFA
Tファイル・システム(固定長セクタ・アクセス方式)
とは異なり、ファイル入出力操作をトラップ(横取り)
して、ディレクトリとデ−タとを可変長のレコ−ド間に
納め、メモリの下位から上位に向けてポインタをチェイ
ンさせながら保存していく方法を用いている。そのトラ
ップ方式は、ネットワ−ク上の共有ドライブで行われる
方式(リディレクタ方式)と同じであって、セクタ単位
のリ−ド/ライトを行う物理的アクセスは許されていな
い。また、情報の保存方法は、セクタ番号ではなく、物
理的なアドレスを使用したポインタ・チェイン方式によ
り、スタックを利用するようにアドレスの上位に伸びて
いく。前述のように、フラッシュ・ファイル・システム
が最近注目されている理由としては、次の4つの事項で
ある。 (a)従来の磁気メディアによるシステムに比較する
と、小型、軽量にすることができること、 (b)従来の磁気メディアによるシステムに比較する
と、衝撃に強いので、可搬性に優れている。 (c)従来のSRAMによるシステムに比較すると、内
容をバックアップするための電源が不要である。 (d)従来のEEPROMによるシステムに比較する
と、素子を小型化できるので、大容量化に対応すること
ができる。 なお、フラッシュ・ファイル・システムについては、例
えば、インテル社・マイクロソフト社の機能仕様書(リ
ビジョン0.01)(1990-02-05)に記載されている。
The flash memory is a conventional FA.
T file system (fixed length sector access method)
Unlike file, I / O operation is trapped (preemption)
Then, the directory and the data are stored in a variable length record, and the pointers are chained from the lower memory to the upper memory and stored. The trap method is the same as the method (redirector method) performed by a shared drive on the network, and physical access for read / write in sector units is not permitted. In addition, as a method of storing information, a pointer chain method that uses a physical address instead of a sector number is used to extend to a higher address so that a stack is used. As described above, there are the following four reasons why the flash file system has recently received attention. (A) It can be made smaller and lighter than the conventional magnetic media system, and (b) it is more portable than the conventional magnetic media system because it is more shock resistant. (C) A power supply for backing up the contents is unnecessary as compared with the conventional SRAM system. (D) As compared with the conventional EEPROM system, the device can be downsized, so that the capacity can be increased. The flash file system is described in, for example, the functional specification (Revision 0.01) of Intel Corporation / Microsoft Corporation (1990-02-05).

【0004】[0004]

【発明が解決しようとする課題】しかしながら、前述の
ように、フラッシュ・ファイル・システムには次のよう
な問題点がある。 ビット値1を0にすることは簡単であるが、0を1に
する際には、消去ブロック(32Kバイト程度)単位に
フラッシュ(ブロック内の全ビット値を1にする)しな
ければならない。 フラッシュのために、一定時間(1秒程度)を費して
しまう。 磁気メディアのように、無限に近い書き込み/再書き
込みは不可能である(10万回程度)。さらに、別の問
題点として、次の3点がある。 従来のファイル・システムとは異なり、ネットワ−ク
ドライブのようにファイル入出力命令をトラップし、ス
タックを利用するようにデ−タを保存していくため、セ
クタ単位のリ−ド/ライトは不可能であり、一部のアプ
リケ−ション(例えば、CHKDSK,ノ−トンユ−テ
ィリティ等)が使用できない。 デ−タを保存していく際に、スタックのようにポイン
タによるチェインで行うため、不要となったデ−タレコ
−ドを消去するためには、ファイル・システム全体の再
構築を行う必要がある。その結果、前デ−タを保存して
おく外部メモリが必要となる。 ファイル中の1バイトが更新されただけで、その修正
されたバイト以降のファイルデ−タを別のエリアに書き
換えなければならない。 本発明の目的は、これら従来の課題を解決し、(イ)ア
プリケ−ションへの制約事項を排除するため、従来のF
ATファイル・システムのインタフェ−スを維持し、
(ロ)性能劣化を極力抑えるために、無駄な書き換えや
フラッシュ回数を減らし、(ハ)固定エリアに対する書
き込みが集中しないように、デ−タを分散させ、(ニ)
フラッシュ操作のために、外部のメモリを使用しないよ
うなフラッシュ・ファイル・システムを提供することに
ある。
However, as described above, the flash file system has the following problems. Although it is easy to set the bit value 1 to 0, when setting 0 to 1, it is necessary to flush (set all bit values in the block to 1) in units of erase blocks (about 32 Kbytes). The flash consumes a certain time (about 1 second). Like magnetic media, infinite writing / rewriting is impossible (about 100,000 times). Furthermore, as another problem, there are the following three points. Unlike conventional file systems, file input / output instructions are trapped like network drives, and data is saved to use the stack, so read / write in sector units is not possible. Yes, some applications (eg, CHKDSK, not-utility, etc.) cannot be used. When saving data, it is done by chaining with pointers like a stack, so it is necessary to reconstruct the entire file system in order to erase unnecessary data records. . As a result, an external memory is required to store the previous data. If only one byte in the file is updated, the file data after the modified byte must be rewritten to another area. An object of the present invention is to solve these conventional problems and to eliminate the restrictions on (a) applications.
Maintain the AT file system interface,
(B) In order to suppress performance deterioration as much as possible, useless rewriting and the number of flashes are reduced, and (c) data is distributed so that writing to a fixed area is not concentrated, (d)
It is to provide a flash file system that does not use external memory for flash operations.

【0005】[0005]

【課題を解決するための手段】上記目的を達成するた
め、本発明のフラッシュ・ファイル・システムは、
(イ)フラッシュROMで構成され、複数の消去ブロッ
クを具備したフラッシュ・ファイル・システムにおい
て、複数のレコ−ド、および各レコ−ド毎にレコ−ドが
未使用か、無効かを、また使用中のときには、セクタ番
号とレコ−ド番号をそれぞれ示す位置情報から構成さ
れ、各レコ−ドがランダムにしかも他のレコ−ドとは独
立して存在する複数の消去ブロックを有し、該消去ブロ
ックの1個を、ランダムアクセスの作用で不連続な未使
用エリアを集合して、ファイルシステムの再構築を行う
Garbage Collectionのために、他の有効デ−タによ
り使用されないようにすることを特徴としている。ま
た、(ロ)レコ−ドと論理的なファイルシステムの存在
位置を関連付ける位置情報は、フラッシュROMの各レ
コ−ド間に挿入されるとともに、フラッシュROMに接
続されたシステム側のRAM上の位置情報格納エリアに
読み込まれて、システム側からフラッシュROMの指定
されたレコ−ドへのアクセスの際に、RAM上の位置情
報格納エリアを参照することによりアクセスすることも
特徴としている。さらに、(ハ)システム側からフラッ
シュROMのレコ−ドを更新する場合、レコ−ド内の構
成ビットが前デ−タと更新デ−タの間で、0から1への
変化が発生しないときには、同一レコ−ド上で上書きす
ることも特徴としている。
To achieve the above object, the flash file system of the present invention comprises:
(B) In a flash file system composed of a flash ROM and having a plurality of erase blocks, a plurality of records, and whether each record is unused or invalid, and used When it is in the middle, it comprises a plurality of erase blocks each of which is composed of position information indicating a sector number and a record number, and each record exists randomly and independently of other records. One of the blocks is characterized by gathering non-contiguous unused areas by the action of random access so that it will not be used by other valid data for Garbage Collection to rebuild the file system. I am trying. The position information associating the (b) record with the logical file system existence position is inserted between the records of the flash ROM and the position on the RAM of the system side connected to the flash ROM. It is also characterized in that when the system side reads the specified record of the flash ROM by reading the information into the information storage area, the location information storage area on the RAM is referred to. Further, (c) when updating the record of the flash ROM from the system side, when the configuration bit in the record does not change from 0 to 1 between the previous data and the update data. It is also characterized by overwriting on the same record.

【0006】[0006]

【作用】本発明においては、外部にフラッシュROMの
元デ−タを保存するバッファを持たなくてもよいため、
0を1に書き換えるときでも、元デ−タを加工して書き
込んでから、フラッシュ処理を行うのみでよい。従来で
は、元デ−タをバッファに読み込んでから、フラッシュ
処理の後、元デ−タを加工して書き込んでいたので、処
理が遅くなっていたが、本発明では、各レコ−ドが独立
して存在するにもかかわらず、高速処理が可能である。
また、従来のフラッシュROMでは、下位から上位へポ
インタをチェインして保存していたが、本発明では各レ
コ−ドがチェインされておらず、独立して存在し、Gar
bageブロックも浮動的、つまり固定ブロックでなく変動
ブロックであるため、固定エリアへの書き込み集中がな
く、デ−タは分散される。また、バッファが不要である
ため、これを有効に利用することができ、他のアプリケ
−ション等に解放できる。さらに、本発明では、0から
1に変化させる時以外は、デ−タを上書きするだけであ
り、その結果、無駄な書き換えやフラッシュの回数を減
少させるので、性能の劣化が殆んどない。さらに、本発
明では、従来のFATファイル・システムに対応してい
るので、物理的アクセスが可能であり、アプリケ−ショ
ン等の制約がない。また、従来のフラッシュROMと同
じく、バックアップ電源は不要である。
In the present invention, it is not necessary to have an external buffer for storing the original data of the flash ROM.
Even when 0 is rewritten to 1, it is only necessary to process and write the original data and then perform the flash process. Conventionally, since the original data was read into the buffer, and after the flash processing, the original data was processed and written, the processing was slow, but in the present invention, each record is independent. However, high speed processing is possible.
Further, in the conventional flash ROM, the pointers are chained and stored from the lower order to the upper order, but in the present invention, each record is not chained and exists independently.
Since the bage block is also floating, that is, it is not a fixed block but a variable block, the writing is not concentrated in the fixed area and the data is dispersed. Further, since the buffer is unnecessary, it can be effectively used and can be released to other applications. Furthermore, in the present invention, data is only overwritten except when changing from 0 to 1, and as a result, the number of unnecessary rewritings and flashes is reduced, so that there is almost no deterioration in performance. Further, in the present invention, since it corresponds to the conventional FAT file system, physical access is possible, and there is no restriction such as application. Further, as with the conventional flash ROM, a backup power supply is unnecessary.

【0007】[0007]

【実施例】以下、本発明の実施例を、図面により詳細に
説明する。図1は、本発明の一実施例を示すフラッシュ
・ファイル・システムの斜視図である。ここでは、フラ
ッシュ・メモリカ−ドを扱う場合を示しているが、それ
以外のフラッシュ・メモリでも同じである。図1では、
フラッシュROM4により構成されたメモリカ−ド1
を、メモリカ−ドスロット2を介して装着し、ファイル
システムとして使用するシステム装置3を示している。
図2は、図1におけるフラッシュROM内デ−タの構成
図である。1MバイトのフラッシュROMとしては、図
2に示すように、#0〜#31の消去ブロック(各々、
32Kバイト)から構成される。各消去ブロックの内容
は、8バイトの制御情報を先頭に、レコ−ド#0〜#2
51の各デ−タ(各々、2+128バイト)が配列さ
れ、それらのデ−タの間に、レコ−ド#nの位置情報
(各々2バイト)が挿入されている。これらの位置情報
は、1〜16383のセクタ番号(このうち、1638
3は未使用レコ−ド)とセクタ内レコ−ド番号(0〜
3)から構成されている。位置情報の長さ、つまりセク
タ長は、1消去ブロック内では2バイト×256=51
2バイトである。従って、システム側からのセクタ単位
のリ−ド/ライト要求に対して、4レコ−ド/セクタの
アクセスが可能であり、その場合のアクセス対象は、消
去ブロック数=32、1消去ブロック当りのレコ−ド数
=252、全セクタ数=1953となる。なお、これら
の数値は一例であって、Garbageブロック数もここでは
1としている。
Embodiments of the present invention will now be described in detail with reference to the drawings. FIG. 1 is a perspective view of a flash file system showing an embodiment of the present invention. Here, the case of handling a flash memory card is shown, but the same applies to other flash memories. In Figure 1,
Memory card 1 composed of flash ROM 4
Shows a system unit 3 mounted as a file system via the memory card slot 2.
FIG. 2 is a block diagram of the data in the flash ROM in FIG. As shown in FIG. 2, a 1M-byte flash ROM has erase blocks # 0 to # 31 (each of which is an erase block).
32K bytes). The contents of each erase block are the records # 0 to # 2 starting from 8-byte control information.
51 pieces of data (each 2 + 128 bytes) are arranged, and the position information (each 2 bytes) of the record #n is inserted between the pieces of data. These position information are the sector numbers of 1 to 16383 (of which 1638
3 is an unused record) and the sector record number (0 to 0)
3). The length of the position information, that is, the sector length is 2 bytes × 256 = 51 in one erase block.
It is 2 bytes. Therefore, in response to a read / write request in sector units from the system side, 4 records / sectors can be accessed. In this case, the access target is 32 erase blocks, 1 erase block per erase block. The number of records = 252 and the total number of sectors = 1953. Note that these numerical values are examples and the number of Garbage blocks is also set to 1 here.

【0008】次に、用語の定義を記載しておく。Garba
geブロックとは、消去ブロックのうちのいくつかのブロ
ックのことで、図2では1である。すなわち、未使用レ
コ−ドがなくなって、無効レコ−ドが存在する場合に、
無効レコ−ドを未使用レコ−ドにするために使用される
(Garbage Collection)。レコ−ドとは、フラッシュ
ROM内のデ−タ格納単位である。ここでは、セクタサ
イズ(512バイト)の方がレコ−ド内デ−タエリアサ
イズ(2+128バイト)よりも長くなっている。Gar
bage Collectionとは、ランダムアクセスの作用によ
り、不連続にできた未使用エリアを集め、ファイルシス
テムの再構築を行うことである。位置情報とは、各レコ
−ドが未使用であるか、無効であるか、あるいは使用中
であるならば、何番目のセクタの何番目のレコ−ドであ
るかを示す。制御情報とは、消去ブロックにレコ−ドが
またがらないようにするための緩衝エリアである。そし
て、その消去ブロックがGarbageブロックか否かの情報
や、ブロック内に含まれるレコ−ド数やサイズ、そして
制御情報のサイズ等を格納する。ここでは、Garbageブ
ロックの場合、全ビットが1となり、それ以外は何等か
の情報が入っているものとする。位置情報格納エリアと
は、位置情報を格納するためのシステム内のメモリエリ
アのことである。該当エリアを高速にポイントするため
に使用される。本実施例のように、デ−タレコ−ドがラ
ンダムに、しかも他のレコ−ドとは独立して(つまり、
ポインタのチェィン等がない)存在するため、レコ−ド
検索時に不可欠である。レコ−ド内位置情報(レコ−ド
#nの位置情報)を基にして、何番目の消去ブロックの
何番目のレコ−ドであるかの情報を、セクタ番号順に配
列する。
Next, the definitions of terms will be described. Garba
The ge blocks are some of the erase blocks, and are 1 in FIG. That is, when there are no unused records and there are invalid records,
Used to make an invalid record an unused record (Garbage Collection). A record is a data storage unit in the flash ROM. Here, the sector size (512 bytes) is longer than the in-record data area size (2 + 128 bytes). Gar
The bage collection is to collect unused areas that are discontinuous by the action of random access and rebuild the file system. The position information indicates the number of the sector and the number of the record if each record is unused, invalid, or in use. The control information is a buffer area for preventing the record from extending over the erase block. Then, information on whether or not the erased block is a garbage block, the number and size of records contained in the block, and the size of control information are stored. Here, in the case of the Garbage block, all bits are set to 1, and other information is contained. The location information storage area is a memory area in the system for storing location information. It is used to quickly point the area of interest. As in this embodiment, the data record is random and independent of other records (that is,
Since there is no pointer chain, etc.), it is indispensable for record retrieval. Based on the in-record position information (position information of record #n), information on what number record of which erase block is arranged is arranged in the order of sector numbers.

【0009】図3は、図1におけるファイル・システム
の構成図である。図3において、1はメモリカ−ド、4
はメモリカ−ド1の構成要素であるフラッシュメモリ
部、5はシステムとメモリカ−ド1を結合するコネク
タ、11はコネクタ5の挿入または抜出を監視するため
の挿抜監視部、12はフラッシュメモリ部4のフラッシ
ュ処理を行うフラッシュ処理部、13は位置情報を管理
する位置情報管理部、14は位置情報を格納する位置情
報格納エリア、15は書き込み要求に従って書き込みを
行う書き込み処理部、16は読み込み要求に従って読み
込みを行う読み込み処理部、17はシステム内のシステ
ムメモリ部である。図4は、図3における位置情報格納
エリアの構成図である。レコ−ド#n位置情報を基に、
セクタ番号の順序で、かつ同一セクタ番号のセクタ内レ
コ−ド番号の順序に配列することにより、該当レコ−ド
を高速にポイントすることができる。1つの位置情報格
納エリアには、0〜254の消去ブロック番号と、0〜
255(このうち、255は未書き込みレコ−ド)の消
去ブロック内レコ−ド番号とが格納され、全体で2バイ
トから構成される。図5は、位置情報格納エリアの更新
動作のフロ−チャ−トである。ここでは、bを消去ブロ
ック番号、rbを消去ブロック内レコ−ド番号、sをセ
クタ番号、rsをセクタ内レコ−ド番号とする。本実施
例では、リム−バブル(挿抜可能)なファイル・システ
ムを考えているので、このエリアの更新は、挿抜監視部
11からの指示、あるいはシステムのリセット信号(電
源のオン・オフ、リセットスイッチによるもの、あるい
は初期化処理が行われることにより発生)により行われ
る。これらの指示による更新は、交換されたことを状態
フラグに保持しておき、読み込み/書き込み処理の前に
行うことも可能である。更新処理は、上記指示に基づい
て位置情報管理部13が実行する。位置情報管理部13
は、メモリカ−ド1内のフラッシュメモリ部4から、各
レコ−ドの位置情報を読み込み、位置情報格納エリア1
4に構成を変更して保存する。この際に、未だ書き込ま
れていないセクタに対応するエリアは、FFFFh(全
ビットとも1)とする。図5において、先ずリセット信
号により位置情報格納エリアを全てFFFFhとする
(ステップ101)。(b,rb)で示される位置情報
(s,rs)の読み取りを行い(ステップ104)、s
=1〜16382であり、有効レコ−ドであるか否かを
判定し(ステップ105)、(s,rs)で示される位
置情報格納エリアに(b,rb)を保存する(ステップ
106)。保存されたならば、処理を元に戻す。そし
て、消去ブロック番号bが0〜31に変更される毎に、
繰り返し同一動作(104〜106)を実行する(ステ
ップ102)。消去ブロック内レコ−ド番号rbが0〜
251に変更される毎に繰り返し同一動作(104〜1
06)を実行する(ステップ103)。
FIG. 3 is a block diagram of the file system in FIG. In FIG. 3, 1 is a memory card and 4 is
Is a flash memory unit which is a component of the memory card 1, 5 is a connector for connecting the system and the memory card 1, 11 is an insertion / extraction monitoring unit for monitoring the insertion or removal of the connector 5, and 12 is a flash memory unit. 4, a flash processing unit that performs the flash process, 13 a position information management unit that manages the position information, 14 a position information storage area that stores the position information, 15 a write processing unit that writes according to the write request, and 16 a read request Reference numeral 17 denotes a reading processing unit for reading data according to the above, and 17 is a system memory unit in the system. FIG. 4 is a configuration diagram of the position information storage area in FIG. Based on the record #n position information,
By arranging in the order of sector numbers and in the order of intra-sector record numbers of the same sector number, the corresponding record can be pointed at high speed. In one location information storage area, erase block numbers 0-254 and 0-254
A record number in the erase block of 255 (of which 255 is an unwritten record) is stored, and is composed of 2 bytes in total. FIG. 5 is a flowchart of the updating operation of the location information storage area. Here, b is the erase block number, rb is the erase block record number, s is the sector number, and rs is the sector record number. In this embodiment, since a removable (insertable / unpluggable) file system is considered, updating of this area is instructed by the plugging / unplugging monitoring section 11 or a system reset signal (power on / off, reset switch). Or caused by the initialization process). The update by these instructions can be performed before the read / write processing by holding the exchange in the status flag. The update process is executed by the position information management unit 13 based on the above instruction. Location information management unit 13
Reads the position information of each record from the flash memory unit 4 in the memory card 1 and stores the position information in the position information storage area 1
Change the configuration to 4 and save. At this time, the area corresponding to the unwritten sector is FFFFh (all bits are 1). In FIG. 5, first, all the position information storage areas are set to FFFFh by the reset signal (step 101). The position information (s, rs) indicated by (b, rb) is read (step 104), s
= 1 to 16382, it is determined whether or not the record is a valid record (step 105), and (b, rb) is stored in the position information storage area indicated by (s, rs) (step 106). If it is saved, the process is undone. Then, every time the erase block number b is changed to 0 to 31,
The same operation (104 to 106) is repeatedly executed (step 102). Record number rb in erase block is 0
Every time it is changed to 251, the same operation is repeated (104 to 1
06) is executed (step 103).

【0010】次に、フラッシュ・ファイル・システムの
初期化(FORMAT)について述べる。オペレ−ティ
ング・システム(OS)上でファイル・システムを運用
する場合、通常は何等かの初期化処理が必要である。こ
の初期化処理は、物理フォ−マット(メディア内を区画
化する作業)と、論理フォ−マット(OSが必要とする
情報を書き込む作業、例えば、ディレクトリFAT等)
の2種で構成される。本実施例では、物理フォ−マット
が全消去ブロックのフラッシュ、論理フォ−マットは従
来の磁気メディアとの互換性を維持しているため、通常
の作業に相当する。通常の作業とは、OSに依存する
が、ここではMS−DOSのFATファイル・システム
に準じる。本実施例の場合、物理フォ−マット(フラッ
シュ作業)は、特定のID(区画情報や位置情報)を書
き込む必要がないので、全消去ブロックをフラッシュす
るのみでよい。すなわち、位置情報は書き込み処理で更
新され、またフラッシュすることにより、自動的に未使
用レコ−ドの意味になるからである。また、論理フォ−
マットは、書き込み処理と同一の方法で行うことができ
る。全消去ブロックのフラッシュは、当然、位置情報格
納エリアの更新を引き起こす必要がある。すなわち、こ
の場合には、図3において、初期化要求がフラッシュ処
理部12に入力され、フラッシュ処理部12でフラッシ
ュ処理が行われた後、位置情報管理部13に入力されて
位置情報格納エリアの更新が行われる。
Next, the initialization (FORMAT) of the flash file system will be described. When operating a file system on an operating system (OS), some kind of initialization processing is usually required. This initialization process includes a physical format (work for partitioning the inside of the medium) and a logical format (work for writing information required by the OS, for example, directory FAT).
It is composed of two types. In this embodiment, since the physical format maintains the flash of all erase blocks and the logical format maintains the compatibility with the conventional magnetic media, it corresponds to a normal operation. The normal work depends on the OS, but here, it is based on the FAT file system of MS-DOS. In the case of this embodiment, the physical format (flushing work) does not need to write a specific ID (partition information or position information), so all erase blocks need only be flushed. That is, the position information is updated by the writing process, and by flashing, it automatically becomes an unused record. In addition, the logical
The matting can be performed in the same manner as the writing process. The flushing of all erase blocks must, of course, cause an update of the location information storage area. That is, in this case, in FIG. 3, an initialization request is input to the flash processing unit 12, the flash processing is performed in the flash processing unit 12, and then is input to the position information management unit 13 to store the position information storage area. Updates are made.

【0011】図6は、本発明における読み込み処理のフ
ロ−チャ−トである。システム側(通常、OS)からの
読み込み要求は、セクタ単位で行われる。本実施例で
は、セクタをいくつかのレコ−ドに分割し、各レコ−ド
を非連続のエリアに格納する。ここでは、位置情報に占
有されてしまう容量と、書き換え発生頻度のトレ−ドオ
フで定められた数、ここでは説明の都合上、4つに分割
されている。従って、図3において、読み込み要求が発
生すると(セクタ番号(s)とシステムメモリ部17へ
の転送アドレスを入力とする)、読み込み処理部16
は、指定されたセクタのデ−タがフラッシュ・メモリ部
4のどこに格納されているかを判定するために、位置情
報格納エリア14にアクセスする。そして、位置情報格
納エリア14から(s,rs)で表される(b,rb)
を取得する(ステップ112)。この情報がFFFFh
(消去ブロック番号フィ−ルドが255)のときには
(ステップ113)、そのセクタは未だ書き込まれてい
ないと判断し、全て0のダミ−デ−タを指定されたシス
テムメモリ部17のアドレスに転送する(ステップ11
5)。また、この情報があるレコ−ドを指示していたと
きには(ステップ113)、そのレコ−ド内のデ−タを
反転しながら、指定されたシステム・メモリ部17のア
ドレスに転送する(ステップ114)。デ−タを反転す
る場合、ビット0から1への変化をできるだけ避けるた
めに、初期化直後に全てのビットを1にし、それ以降、
有効なデ−タが書き込まれるまで、なるべく1のままの
状態にする。従って、全て1が書き込まれているなら
ば、システム側からは0が書き込まれているように見え
る。すなわち、FATファイルシステムでは、ディレク
トリやFATの未使用エリアを0で表わしているからで
ある。
FIG. 6 is a flowchart of the reading process according to the present invention. A read request from the system side (usually the OS) is made in sector units. In this embodiment, the sector is divided into several records, and each record is stored in a non-contiguous area. Here, for the sake of convenience of explanation, the capacity occupied by the position information and the number determined by the trade-off of rewriting occurrence frequency are divided into four. Therefore, in FIG. 3, when a read request is generated (the sector number (s) and the transfer address to the system memory unit 17 are input), the read processing unit 16
Accesses the position information storage area 14 to determine where in the flash memory section 4 the data of the designated sector is stored. Then, from the location information storage area 14 is represented by (s, rs) (b, rb)
Is acquired (step 112). This information is FFFFh
When the erase block number field is 255 (step 113), it is determined that the sector has not been written, and the dummy data of all 0 is transferred to the designated address of the system memory unit 17. (Step 11
5). Further, when this information is instructing a record having the information (step 113), the data in the record is inverted and transferred to the designated address of the system memory unit 17 (step 114). ). When inverting the data, in order to avoid the change from bit 0 to 1 as much as possible, all bits are set to 1 immediately after initialization, and thereafter,
The state of 1 is preferably kept until the valid data is written. Therefore, if all 1's are written, it appears to the system side that 0 is written. That is, in the FAT file system, unused areas of directories and FATs are represented by 0.

【0012】図7は、本発明における書き込み処理のフ
ロ−チャ−トである。この場合には、読み込み処理と同
じように、システム側からの書き込み要求がセクタ単位
で行われ、本実施例では、レコ−ドに分割されて、非連
続のエリアに格納される。書き込み要求が発生すると、
書き込み処理部15は、位置情報格納エリア14を参照
して、既に書き込まれているセクタか否かを判断する
(ステップ122,123)。もし、書き込まれていた
ならば、更新すべきデ−タ(指定されたデ−タ)と比較
して(ステップ124)、0から1への変化が発生する
か否かを判断し(ステップ125)、発生しない場合に
は、デ−タを上書きする。すなわち、指定された書き込
みデ−タを反転しながら(b,rb)で表わされるレコ
−ドに転送する(ステップ133)。一方、0から1へ
の変化が発生する場合には、前レコ−ドを無効化する
(ステップ126)。すなわち、レコ−ド内位置情報を
0に、位置情報格納エリアの該当位置をFFFFh(未
書き込み)にして、未使用レコ−ドを取得する(ステッ
プ127)。取得できた場合には(ステップ128)、
レコ−ドの有効化を行う(ステップ132)。すなわ
ち、レコ−ド内位置情報を指定セクタ番号・レコ−ド番
号に、そのレコ−ドのブロック番号とレコ−ド番号を位
置情報格納エリアの該当位置に、それぞれ設定する。そ
して、読み込み処理と同じように、指定された書き込み
デ−タを反転しながら、(b,rb)で表わされるレコ
−ドに転送する(ステップ133)。
FIG. 7 is a flowchart of the writing process according to the present invention. In this case, a write request from the system side is made in sector units, as in the read process, and in this embodiment, it is divided into records and stored in non-contiguous areas. When a write request occurs,
The write processing unit 15 refers to the position information storage area 14 and determines whether or not the sector has already been written (steps 122 and 123). If it has been written, it is compared with the data to be updated (specified data) (step 124) and it is judged whether or not the change from 0 to 1 occurs (step 125). ), If it does not occur, the data is overwritten. That is, the designated write data is inverted and transferred to the record represented by (b, rb) (step 133). On the other hand, when the change from 0 to 1 occurs, the previous record is invalidated (step 126). That is, the in-record position information is set to 0, the corresponding position in the position information storage area is set to FFFFh (not written), and an unused record is acquired (step 127). If it can be obtained (step 128),
The record is validated (step 132). That is, the position information in the record is set to the designated sector number / record number, and the block number and the record number of the record are set to the corresponding positions in the position information storage area. Then, like the reading process, the designated write data is inverted and transferred to the record represented by (b, rb) (step 133).

【0013】図7において、既に書き込まれているか否
か、つまりb=0〜254であるか否かを判断して(ス
テップ123)、未だ書き込まれていない場合には、同
じように未使用レコ−ドを取得し(Garbageブロック以
外の未使用レコ−ド)(ステップ127)、レコ−ドの
有効化を行い(ステップ132)、デ−タの転送を行う
(ステップ133)。未使用レコ−ドを取得する場合に
は、Garbageブロックを除いて検索する(ステップ12
7)。すなわち、制御情報が全ビット1になっているブ
ロックを除外する。しかし、未使用レコ−ドがなくなっ
ている時には(ステップ128)、無効レコ−ド(レコ
−ド内位置情報が0000h)を含む消去ブロックの無
効レコ−ド以外の情報(制御情報も含む)をGarbageブ
ロックに転送し(ステップ129)、元のブロックのフ
ラッシュ要求をフラッシュ処理部12に対して要求する
(ステップ131)。その場合、無効レコ−ドは自動的
に未使用レコ−ドとなる。フラッシュが終了すると、自
動的にそのブロックは、Garbageブロックとなる。この
時、位置情報格納エリア14の該当レコ−ドのブロック
番号を、新しい値に更新する(ステップ130)。
In FIG. 7, it is judged whether or not it has already been written, that is, whether b = 0 to 254 (step 123), and if it has not been written, the unused record is similarly used. A record is acquired (unused records other than the Garbage block) (step 127), the record is validated (step 132), and the data is transferred (step 133). When obtaining an unused record, search is performed excluding the Garbage block (step 12).
7). That is, blocks in which the control information is all 1s are excluded. However, when there are no unused records (step 128), information (including control information) other than the invalid record of the erase block including the invalid record (position information in the record is 0000h) is also included. The data is transferred to the Garbage block (step 129) and a flash request for the original block is requested to the flash processing unit 12 (step 131). In that case, the invalid record automatically becomes an unused record. When the flush ends, the block automatically becomes a Garbage block. At this time, the block number of the corresponding record in the position information storage area 14 is updated to a new value (step 130).

【0014】以上説明したように、本実施例において
は、(イ)Garbage Collectionを行う場合の元のデ
−タを保存するためのバッファをシステム側に用意する
必要がなくなるので、システム側のメモリを有効に利用
でき、他のアプリケ−ション等に解放できる。(ロ)G
arbageブロックであった箇所がデ−タブロックになった
り、その逆になったりして、Garbageブロックとデ−タ
ブロックを兼用しているように動作するので、外部に元
のデ−タを保存するバッファを設けた場合に比較して、
デ−タの転送量を少なくすることができる。すなわち、
後者の場合には、元デ−タの読み込み→フラッシュ→元
デ−タを加工して書き込みの順序で処理されるが、本実
施例では、元デ−タを加工して書き込み→フラッシュの
順序で処理できる。(ハ)Garbageブロックが浮動的、
つはり固定ブロックでなく、変動ブロックであるため、
固定エリアへの書き込みの集中がない。(ニ)従来のF
ATファイルシステムに対応しているため、物理的アク
セスが可能であり、アプリケ−ション等の制約事項がな
くなる。(ホ)バックアップ電源不要のファイルシステ
ムが実現できる。(ヘ)チェインしていないブロックの
集合であり、各レコ−ドが独立して存在しているにもか
かわらず、高速に各レコ−ドの存在位置を把握できる。
(ト)セクタとレコ−ドの対応付けが単純であるため、
レコ−ドサイズの変更等に柔軟に対処できる。(チ)0
から1への変化が起る時以外は、デ−タを上書きするの
で、無駄な書き換えや、フラッシュの回数を減少させる
ことができる。
As described above, in the present embodiment, (a) it is not necessary to prepare a buffer for storing the original data in the case of Garbage Collection on the system side. Can be used effectively and can be released to other applications. (B) G
The part that was an arbage block becomes a data block, and vice versa. It operates as if it is used both as a garbage block and a data block, so the original data is saved externally. Compared to the case where a buffer is provided,
The amount of data transferred can be reduced. That is,
In the latter case, the original data is read->flash-> the original data is processed and processed in the order of writing. In the present embodiment, the original data is processed and then written-> flash. Can be processed by. (C) Garbage block is floating,
Since it is not a fixed block but a variable block,
There is no concentration of writing in the fixed area. (D) Conventional F
Since it is compatible with the AT file system, physical access is possible, and restrictions such as applications are eliminated. (E) A file system that does not require a backup power supply can be realized. (F) It is a set of blocks that are not chained, and even though each record exists independently, the position where each record exists can be grasped at high speed.
(G) Since the correspondence between sectors and records is simple,
It is possible to deal flexibly with changes in record size. (H) 0
Since the data is overwritten except when the change from 1 to 1, the number of unnecessary rewritings and the number of flashes can be reduced.

【0015】[0015]

【発明の効果】このように、本発明によれば、従来のF
ATファイルシステムのインタフェ−スを維持すること
ができ、かつフラッシュ回数や無駄な書き換えをなくし
ているので、性能劣化を極力なくすことが可能である。
また、固定エリアに対する書き込み集中がなくなるの
で、デ−タを分散化することができ、しかもフラッシュ
操作のために、外部のメモリを使用しないので、システ
ム側のメモリを有効に利用できる。さらに、デ−タの転
送量が少なてすみ、レコ−ドサイズの変更等に柔軟に対
処でき、しかもバックアップ用電源を不要にできる。
As described above, according to the present invention, the conventional F
Since the interface of the AT file system can be maintained and the number of flashes and unnecessary rewriting are eliminated, it is possible to minimize performance deterioration.
Further, since the writing concentration on the fixed area is eliminated, the data can be dispersed, and since the external memory is not used for the flash operation, the memory on the system side can be effectively used. Further, the transfer amount of data is small, the change of the record size and the like can be dealt with flexibly, and the backup power source can be eliminated.

【0016】[0016]

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

【図1】本発明の一実施例を示すフラッシュ・ファイル・
システムの斜視図である。
FIG. 1 is a flash file showing an embodiment of the present invention.
FIG. 3 is a perspective view of the system.

【図2】図1におけるフラッシュROM内デ−タの構成
図である。
FIG. 2 is a configuration diagram of data in a flash ROM in FIG.

【図3】図1におけるファイルシステムの構成図であ
る。
FIG. 3 is a configuration diagram of a file system in FIG.

【図4】図1における位置情報格納エリアの構成図であ
る。
FIG. 4 is a configuration diagram of a location information storage area in FIG.

【図5】本発明における位置情報格納エリアの更新フロ
−チャ−トである。
FIG. 5 is an update flow chart of the location information storage area in the present invention.

【図6】本発明における読み込み処理のフロ−チャ−ト
である。
FIG. 6 is a flowchart of reading processing according to the present invention.

【図7】本発明における書き込み処理のフロ−チャ−ト
である。
FIG. 7 is a flowchart of a writing process according to the present invention.

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

1 メモリカ−ド 2 メモリカ−ドスロット 3 システム装置 4 フラッシュROM 5 コネクタ 11 挿抜監視部 12 フラッシュ処理部 13 位置情報管理部 14 位置情報格納エリア 15 書き込み処理部 16 読み込み処理部 17 システムメモリ部 1 memory card 2 memory card slot 3 system unit 4 flash ROM 5 connector 11 insertion / extraction monitoring unit 12 flash processing unit 13 position information management unit 14 position information storage area 15 write processing unit 16 read processing unit 17 system memory unit

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 フラッシュROMで構成され、複数の消
去ブロックを具備したフラッシュ・ファイル・システム
において、複数のレコ−ド、および各レコ−ド毎に該レ
コ−ドが未使用か、無効かを、また使用中のときには、
セクタ番号とレコ−ド番号をそれぞれ示す位置情報から
構成され、各レコ−ドがランダムにしかも他のレコ−ド
とは独立して存在する複数の消去ブロックを有し、該消
去ブロックの1個を、ランダムアクセスの作用で不連続
な未使用エリアを集合して、ファイルシステムの再構築
を行うGarbage Collectionのために、他の有効デ−
タにより使用されないようにすることを特徴とするフラ
ッシュ・ファイル・システム。
1. A flash file system comprising a flash ROM and comprising a plurality of erase blocks, wherein a plurality of records and whether each record is unused or invalid is set. , Again when in use,
Each record has a plurality of erase blocks which are composed of position information indicating a sector number and a record number, and each record exists randomly and independently of other records. One of the erase blocks is provided. For the Garbage Collection that rebuilds the file system by collecting discontinuous unused areas by the action of random access, another effective data
A flash file system characterized by being protected from use by a computer.
【請求項2】 請求項1に記載のフラッシュ・ファイル
・システムにおいて、上記レコ−ドと論理的なファイル
システムの存在位置を関連付ける位置情報は、フラッシ
ュROMの各レコ−ド間に挿入されるとともに、該フラ
ッシュROMに接続されたシステム側のRAM上の位置
情報格納エリアに読み込まれて、該システム側から該フ
ラッシュROMの指定されたレコ−ドへのアクセスの際
に、該RAM上の位置情報格納エリアを参照することに
よりアクセスすることを特徴とするフラッシュ・ファイ
ル・システム。
2. The flash file system according to claim 1, wherein position information associating the record with a logical file system existing position is inserted between respective records of the flash ROM. , The position information on the RAM, which is read into the position information storage area on the system side RAM connected to the flash ROM and is accessed from the system side to the designated record of the flash ROM. A flash file system characterized by being accessed by referring to a storage area.
【請求項3】 請求項2に記載のフラッシュ・ファイル
・システムにおいて、上記システム側から該フラッシュ
ROMのレコ−ドを更新する場合、該レコ−ド内の構成
ビットが前デ−タと更新デ−タの間で、0から1への変
化が発生しないときには、同一レコ−ド上で上書きする
ことを特徴とするフラッシュ・ファイル・システム。
3. The flash file system according to claim 2, wherein when a record of the flash ROM is updated from the system side, a configuration bit in the record has a previous data and an update data. -A flash file system characterized by overwriting on the same record when a change from 0 to 1 does not occur between data.
JP4240635A 1992-09-09 1992-09-09 Flash file system Pending JPH0695955A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4240635A JPH0695955A (en) 1992-09-09 1992-09-09 Flash file system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4240635A JPH0695955A (en) 1992-09-09 1992-09-09 Flash file system

Publications (1)

Publication Number Publication Date
JPH0695955A true JPH0695955A (en) 1994-04-08

Family

ID=17062435

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4240635A Pending JPH0695955A (en) 1992-09-09 1992-09-09 Flash file system

Country Status (1)

Country Link
JP (1) JPH0695955A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06202821A (en) * 1992-10-30 1994-07-22 Intel Corp Solid memory disk and method and equipment for controlling it
JPH0772989A (en) * 1992-10-30 1995-03-17 Intel Corp Method for cleaning-up of solid-state memory disk for storing of floating sector data
JPH08510072A (en) * 1993-03-08 1996-10-22 エム−システムズ・リミテッド Flash file system
JPH0997207A (en) * 1995-09-28 1997-04-08 Canon Inc Method, device for managing flash rom and computer control equipment
JPH1153248A (en) * 1997-08-04 1999-02-26 Tokyo Electron Ltd Data processing system, block erasure type storage medium and program recording medium
JP2000067587A (en) * 1998-08-18 2000-03-03 Sharp Corp Information recording and reproducing device using batch erasing type memory
KR100703680B1 (en) * 1999-10-14 2007-04-05 삼성전자주식회사 Flash file system
JP2009536414A (en) * 2006-05-03 2009-10-08 データ ロボティクス, インク. File system recognition block storage system, apparatus, and method
JP2009271848A (en) * 2008-05-09 2009-11-19 Fujitsu Microelectronics Ltd File system and data management method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06202821A (en) * 1992-10-30 1994-07-22 Intel Corp Solid memory disk and method and equipment for controlling it
JPH0772989A (en) * 1992-10-30 1995-03-17 Intel Corp Method for cleaning-up of solid-state memory disk for storing of floating sector data
JPH08510072A (en) * 1993-03-08 1996-10-22 エム−システムズ・リミテッド Flash file system
JP2003085037A (en) * 1993-03-08 2003-03-20 M-Systems Ltd Memory management method
JPH0997207A (en) * 1995-09-28 1997-04-08 Canon Inc Method, device for managing flash rom and computer control equipment
JPH1153248A (en) * 1997-08-04 1999-02-26 Tokyo Electron Ltd Data processing system, block erasure type storage medium and program recording medium
JP2000067587A (en) * 1998-08-18 2000-03-03 Sharp Corp Information recording and reproducing device using batch erasing type memory
KR100703680B1 (en) * 1999-10-14 2007-04-05 삼성전자주식회사 Flash file system
JP2009536414A (en) * 2006-05-03 2009-10-08 データ ロボティクス, インク. File system recognition block storage system, apparatus, and method
JP2009271848A (en) * 2008-05-09 2009-11-19 Fujitsu Microelectronics Ltd File system and data management method

Similar Documents

Publication Publication Date Title
JP2669365B2 (en) Rewritable ROM file device
US5717886A (en) Semiconductor disk device and memory management method
US5592669A (en) File structure for a non-volatile block-erasable semiconductor flash memory
US5627783A (en) Semiconductor disk device
USRE45577E1 (en) Method of writing to a flash memory including data blocks and log blocks
EP0522780B1 (en) Control method for a computer memory device
JP5032172B2 (en) Integrated memory management apparatus and method, and data processing system
JP4268396B2 (en) Non-volatile memory device file management that can be programmed once
US7039786B2 (en) Memory device and recording and/or reproducing apparatus employing this memory device
JP3534585B2 (en) Data storage control method and apparatus for external storage device using a plurality of flash memories
EP1729218A1 (en) Nonvolatile storage system
US20110179219A1 (en) Hybrid storage device
KR19990063714A (en) Memory management
WO1995018407A1 (en) Solid state memory system
US6272611B1 (en) Computer data storage medium having a virtual disk drive and memory management method therefor
WO2006098212A1 (en) Memory controller, nonvolatile storage device, nonvolatile storage system and data write method
JPH08195093A (en) File controller for nonvolatile memory
JP3421581B2 (en) Storage device using nonvolatile semiconductor memory
US6687815B1 (en) Method and apparatus for storing non-volatile configuration information
JPH0695955A (en) Flash file system
JP4130808B2 (en) Formatting method
JPH11272569A (en) Data restoration system for outer storage device using flash memory
JP2000181784A (en) Non-volatile storage device which can be rewritten
JPH05150913A (en) Silicon disk with flash memory as storage medium
CN111949212A (en) File system based on user-defined open channel SSD and file management method