JP3503448B2 - Flash type memory and its management device - Google Patents

Flash type memory and its management device

Info

Publication number
JP3503448B2
JP3503448B2 JP31761297A JP31761297A JP3503448B2 JP 3503448 B2 JP3503448 B2 JP 3503448B2 JP 31761297 A JP31761297 A JP 31761297A JP 31761297 A JP31761297 A JP 31761297A JP 3503448 B2 JP3503448 B2 JP 3503448B2
Authority
JP
Japan
Prior art keywords
block
area
data
execution program
blocks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP31761297A
Other languages
Japanese (ja)
Other versions
JPH11143764A (en
Inventor
和也 田中
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.)
Victor Company of Japan Ltd
Original Assignee
Victor Company of Japan 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 Victor Company of Japan Ltd filed Critical Victor Company of Japan Ltd
Priority to JP31761297A priority Critical patent/JP3503448B2/en
Publication of JPH11143764A publication Critical patent/JPH11143764A/en
Application granted granted Critical
Publication of JP3503448B2 publication Critical patent/JP3503448B2/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)

Description

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

【0001】[0001]

【発明の属する技術分野】この発明は、フラッシュ型メ
モリ及びその管理装置にかかり、更に具体的には、フラ
ッシュ型メモリの効率的な管理手法の改良に関するもの
である。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a flash type memory and a management apparatus therefor, and more particularly to improvement of an efficient management method for a flash type memory.

【0002】[0002]

【背景技術】一般にフラッシュタイプのフロ−ティング
ゲ−トトランジスタを含む電気的に消去可能なプログラ
マブル読出専用メモリ(EEPROM)は、現在市場で
容易に入手できる。これらのいわゆるフラッシュメモリ
は、機能・性能面でEPROMメモリと類似した不揮発
メモリであり、メモリ内に分割されているブロックを消
去する回路内プログラマブル動作を可能にするという機
能を更に有する。フラッシュメモリでは、以前に書き込
まれたメモリの領域を前もって消去することで、その書
き換えが行われる。
BACKGROUND OF THE INVENTION Electrically erasable programmable read only memories (EEPROMs), which generally include flash type floating gate transistors, are now readily available on the market. These so-called flash memories are nonvolatile memories similar in function and performance to EPROM memories, and further have a function of enabling in-circuit programmable operation to erase blocks divided in the memory. In a flash memory, rewriting is performed by previously erasing a previously written area of the memory.

【0003】典型的なコンピュ−タシステムでは、オペ
レ−ティングシステム(以下、単に「OS」という)の
プログラムがそのシステムのデ−タ記憶装置のデ−タ管
理を担う。OSプログラムとの互換性を達成するために
必要かつ十分であるデ−タ記憶装置のアトリビュ−ト
(属性)は、デ−タ記憶装置のいかなる位置からもデ−
タを読み出すことができ、これにデ−タを書き込むこと
ができることである。しかし、フラッシュメモリの場
合、デ−タが既に書き込まれている領域には、その領域
のデ−タを消去しなければデ−タを書き込むことはでき
ない。このため、フラッシュメモリは、典型的な既存の
OSプログラムとは互換性がない。
In a typical computer system, a program of an operating system (hereinafter, simply referred to as "OS") manages data in a data storage device of the system. The attributes (attributes) of the data storage device that are necessary and sufficient to achieve compatibility with the OS program are obtained from any location of the data storage device.
That is, data can be read and data can be written to it. However, in the case of the flash memory, in the area where the data has already been written, the data cannot be written unless the data in the area is erased. Therefore, the flash memory is not compatible with typical existing OS programs.

【0004】このような点に着目し、既存のOSプログ
ラムによってフラッシュメモリを管理することを可能に
するソフトウエアが先行技術において提案されている。
この先行技術のプログラムでは、フラッシュメモリを
「書込み1回読出し複数回」の装置として動作させる
か、「書込み複数回読出し複数回」の装置として動作さ
せている。前者は、以前に書き込まれているメモリ場所
を再利用することはできない装置であり、補助記憶装置
や拡張記憶装置として使用できる。後者は、以前に書き
込まれているメモリ領域を再利用可能とし、その領域中
にはフラッシュメモリの書換回数を少なくするような制
御を持つ補助記憶装置(半導体ファイル記憶装置)があ
る。
Focusing on such a point, software which enables the flash memory to be managed by an existing OS program has been proposed in the prior art.
In this prior art program, the flash memory is operated as a "write once, read multiple times" device or a "write multiple times, read multiple times" device. The former is a device that cannot reuse previously written memory locations and can be used as auxiliary or extended storage. In the latter, there is an auxiliary storage device (semiconductor file storage device) that enables the previously written memory area to be reused and has control to reduce the number of times of rewriting of the flash memory.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、以上の
ような背景技術には、次のような不都合がある。 (1)上述のような先行技術に見られる装置によれば、フ
ラッシュメモリを使用した拡張記憶装置上では書換回数
を少なくなるような制御構造を持たずに実行プログラム
を動作させている。つまり、フラッシュメモリに対して
新たにデ−タの書換えを行うときは、全ブロックを一括
して消去し、その後、デ−タを記憶させる必要がある。
また、マルチタスク,マルチスレッド,マルチプロセス
に代表される並列実行プログラムやデ−タの共有あるい
は占有という管理を行う場合において、一般のMMU
(メモリ管理ユニット)を駆使してフラッシュメモリを
ブロック(ペ−ジ)毎に管理する方式では、書換回数の
管理と書換回数の低減を図ることは困難である。
However, the above background art has the following disadvantages. (1) According to the device seen in the prior art as described above, the execution program is operated on the extended storage device using the flash memory without having a control structure that reduces the number of rewrites. That is, when newly rewriting data in the flash memory, it is necessary to erase all blocks at once and then store the data.
Further, in the case of performing management such as sharing or occupation of a parallel execution program or data represented by multitask, multithread, multiprocess, a general MMU.
It is difficult to manage the number of times of rewriting and reduce the number of times of rewriting with the method of managing the flash memory for each block (page) by making full use of the (memory management unit).

【0006】(2)フラッシュメモリを使用した拡張記憶
装置上でプログラムの実行を可能とする装置にはないも
のの、フラッシュメモリの書換回数を少なくするような
制御構造を持つ装置として補助記憶装置(半導体ファイ
ル記憶装置)がある。補助記憶装置において書換回数を
少なくするためにその情報(書換回数テ−ブル)を異な
るメモリ上に記憶する方式である。しかし、実行プログ
ラムを主記憶装置にロ−ドすることなく、フラッシュメ
モリ上で動作させるプログラムにおいて、単純に同一フ
ラッシュメモリ上に記憶する方式では、ブロック間にま
たがるデ−タを無駄なく完全に連続的な配置を可能にす
ることは困難である。
(2) An auxiliary storage device (semiconductor storage device (semiconductor storage device) There is a file storage device). This is a method of storing the information (rewrite count table) in different memories in order to reduce the number of rewrites in the auxiliary storage device. However, in a program that operates on the flash memory without loading the execution program on the main memory, the method of simply storing the program on the same flash memory allows data that spans between blocks to be completely continuous without waste. It is difficult to enable a specific arrangement.

【0007】この発明は、以上の点に着目したもので、
その目的は、フラッシュメモリを使用した拡張記憶装置
上でフラッシュメモリの書換回数を少なくするような制
御構造を持つ場合に、主記憶装置に実行プログラムをロ
−ドすることなく拡張記憶装置上でプログラムの実行を
可能とすることである。他の目的は、同一のフラッシュ
メモリを使用し、補助記憶装置として書換回数を少なく
する制御構造を持ちながら、マルチプロセッシング,マ
ルチスレッド,マルチタスクといった高度なプログラム
の実行環境においても、メモリ管理装置によって、安全
に実行プログラムのモジュ−ルやデ−タファイルの管理
の実現を可能とすることである。更に他の目的は、同一
フラッシュメモリ上で、拡張記憶装置および補助記憶装
置の混在を可能とするファイル管理技術を提供すること
である。
The present invention focuses on the above points,
The purpose thereof is to provide a program on the extended storage device without loading the execution program to the main storage device when the control structure is such that the number of times of rewriting of the flash memory is reduced on the extended storage device using the flash memory. Is to be able to execute. Another purpose is to use the same flash memory and have a control structure that reduces the number of times of rewriting as an auxiliary storage device, while using a memory management device even in an advanced program execution environment such as multiprocessing, multithreading, and multitasking. That is, it is possible to safely realize the management of the module of the execution program and the data file. Still another object is to provide a file management technique that enables a mixture of an extended storage device and an auxiliary storage device on the same flash memory.

【0008】[0008]

【課題を解決するための手段】本発明のフラッシュ型メ
モリは、ブロック単位で記憶内容を消去できるフラッシ
ュ型メモリ第1,第2,第3のブロックを含んでお
り、第1のブロックは、そのブロックの管理情報を記憶
するヘッダ領域と、ブロック単位に分割されたデータフ
ァイルを格納する記憶領域とを備えており、第3のブロ
ックは、実行プログラムファイルが格納されたブロック
の管理情報を記憶するヘッダ領域と、ブロックごとに分
割された実行プログラムファイルを格納する記憶領域を
備えており、第2のブロックは、第3のブロックに隣接
し、実行プログラムファイルが、第3のブロックの実行
プログラムファイルを格納する記憶領域の容量を越えた
場合、第3のブロックに実行プログラムファイルが分割
され格納された続きのデータを格納する記憶領域を備え
ていることを特徴とする。
Means for Solving the Problems] flash memory of the present invention, the flash memory is first to be erased stored content in blocks, the second includes a third block, the first block, The block includes a header area for storing management information of the block and a storage area for storing a data file divided into blocks. The third block stores management information of the block in which the execution program file is stored. And a storage area for storing an execution program file divided into blocks, and the second block is adjacent to the third block.
Then, the execution program file executes the third block.
Exceeded the capacity of the storage area for storing program files
If the execution program file is divided into the third block
And a storage area for storing the stored subsequent data .

【0009】[0009]

【0010】本発明のフラッシュ型メモリの管理装置
は、隣接する複数の前記第2及び第3のブロックに対し
て実行プログラムファイル割り当てるとともに、それ
ら実行プログラムファイルが割り当てられたブロックの
管理情報を前記第3のブロックに格納する手段を備えた
ことを特徴とする。
Flash memory management apparatus of the present invention
Shall be assigns an execution program file for a plurality of the second and third blocks adjacent, comprising means for storing management information of the block to which they run the program file is assigned to the third block Is characterized by.

【0011】[0011]

【0012】[0012]

【0013】[0013]

【0014】この発明の前記及び他の目的,特徴,利点
は、以下の詳細な説明及び添付図面から明瞭になろう。
The above and other objects, features and advantages of the present invention will be apparent from the following detailed description and the accompanying drawings.

【0015】[0015]

【発明の実施の形態】以下、本発明の実施の形態につい
て詳細に説明する。本形態は、例えば図1に示すよう
に、プロセッサ10,フラッシュメモリ12およびその
制御装置14を含む拡張もしくは補助の記憶装置,RA
M(主記憶装置)16を含むコンピュ−タシステムに適
用される。このようなシステムで、同一フラッシュメモ
リを使用して、実行プログラムモジュ−ルとデ−タファ
イルのデ−タを共存させるとともに、デ−タの書換回数
をできる限り低減するデ−タの格納方法と管理・制御の
ための装置を得ようとするものである。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described in detail below. In this embodiment, as shown in FIG. 1, for example, an expanded or auxiliary storage device including a processor 10, a flash memory 12 and a control device 14 thereof, an RA
It is applied to a computer system including an M (main memory) 16. In such a system, the same flash memory is used to coexist the data of the execution program module and the data file, and a data storage method for reducing the number of data rewrites as much as possible. It is intended to obtain a device for management / control.

【0016】まず、実行プログラム領域とデ−タ領域を
管理するため、フラッシュメモリ12の管理単位をその
最小イレ−ス(消去)単位である1ブロックとする。そ
して、この最小単位であるブロック内に、実行プログラ
ム領域とデ−タ領域の混在を認めないこととする。各ブ
ロックには、実行プログラム領域もしくはデ−タ領域
と、そのブロックを管理する情報を持つヘッダ領域とが
存在する。
First, in order to manage the execution program area and the data area, the management unit of the flash memory 12 is one block which is the minimum erase (erase) unit. Then, the execution program area and the data area cannot be mixed in the block which is the minimum unit. Each block has an execution program area or data area, and a header area having information for managing the block.

【0017】ここで、デ−タ領域に割り当てようとする
ブロックには、そのブロックのヘッダ領域内にデ−タの
属性を持つことを宣言する。同様に、実行プログラム領
域に割り当てようとするブロックには、そのブロックの
ヘッダ領域内に実行プログラムの属性を持つことを宣言
する。ただし、この実行プログラム領域については、1
つのブロックに1つのヘッダ領域が必ずしも必要という
ことではない。すなわち、連鎖する複数ブロックを連続
的に実行プログラム領域として確保したい場合は、確保
ブロック数をヘッダ領域内で宣言する。これによって、
宣言した連鎖する複数ブロックは、ヘッダ情報を持たな
くてもよい。つまり、実行プログラムのメモリ配置とし
て、1つのヘッダ領域により複数の連続するブロックに
実行プログラム領域を確保する。一方、デ−タ領域は1
つのブロック内にヘッダ領域と混在することになる。こ
のデ−タ領域内には、該当するブロックに関する情報を
付加する。
Here, it is declared that the block to be allocated to the data area has a data attribute in the header area of the block. Similarly, a block to be assigned to the execution program area is declared to have the attribute of the execution program in the header area of the block. However, for this execution program area,
One header area is not necessarily required for one block. That is, when it is desired to continuously secure a plurality of chained blocks as an execution program area, the number of reserved blocks is declared in the header area. by this,
The declared chained multiple blocks may not have header information. In other words, as the memory layout of the execution program, one header area secures the execution program area in a plurality of consecutive blocks. On the other hand, the data area is 1
It will be mixed with the header area in one block. Information about the corresponding block is added to this data area.

【0018】図2には、本形態におけるソフトウエアの
基本構造の一例が示されている。同図のように、OS2
0やアプリケ−ションソフト22とのソケットインタ−
フェ−スとして、いわゆるドライバ層24に相当する部
分にフラッシュ管理マネ−ジャ26を設ける。このフラ
ッシュ管理マネ−ジャ26は、本形態のシステム用ドラ
イバと考えることができる。このフラッシュ管理マネ−
ジャ26によって、ブロック情報の管理やデ−タのリ−
ド/ライトの制御が行なわれる。
FIG. 2 shows an example of the basic structure of software in this embodiment. As shown in the figure, OS2
0 and socket interface with application software 22
As a face, a flash management manager 26 is provided in a portion corresponding to the so-called driver layer 24. The flash management manager 26 can be considered as the system driver of this embodiment. This flash management manager
The jar 26 manages block information and rereads data.
Control of read / write.

【0019】例えば、図3[A]に示すように、ブロッ
ク消去がiバイト単位で可能で、かつブロック数がn+
1(16進数)個あるフラッシュメモリが1つあるとす
る。これら各ブロックを、物理ブロックと呼ぶことにす
る。そして、各物理ブロックに、アドレスの低い方から
高い方へ順に物理ブロックナンバを「0」から「n」ま
で割り振る。図示の例では、図の上方がアドレスが低
く、物理ブロック0,物理ブロック1,物理ブロック
2,……,物理ブロックnとなっている。
For example, as shown in FIG. 3A, block erasing can be performed in i-byte units and the number of blocks is n +.
It is assumed that there is one (1 hexadecimal number) flash memory. Each of these blocks will be called a physical block. Then, physical block numbers “0” to “n” are assigned to each physical block in order from the lowest address to the highest address. In the illustrated example, addresses are lower in the upper part of the figure and are physical block 0, physical block 1, physical block 2, ..., Physical block n.

【0020】ここで、それぞれの物理ブロックを管理し
ている情報のヘッダ領域としてjバイト分を確保したと
すると、各物理ブロックに割り当てられる実行プログラ
ム領域あるいはデ−タファイル領域のサイズは、i−j
バイトとなる。そして、同一ブロックの記憶領域には、
実行プログラム領域とデ−タファイル領域の混在は認め
ないことにする。この様子を示すと、図3[B]のよう
になる。例えば、最上位の物理ブロック0には、jバイ
トのヘッダ領域30Aと、i−jバイトの記憶領域30
Bが存在する。次の物理ブロック1には、jバイトのヘ
ッダ領域31Aと、i−jバイトの記憶領域31Bが存
在する。以下の物理ブロックについても同様である。
Assuming that j bytes are reserved as a header area of information for managing each physical block, the size of the execution program area or data file area allocated to each physical block is i-j.
It becomes a byte. Then, in the storage area of the same block,
It is not allowed to mix the execution program area and the data file area. This state is shown in FIG. 3B. For example, in the uppermost physical block 0, a j-byte header area 30A and an i-j-byte storage area 30 are included.
B exists. In the next physical block 1, there is a header area 31A of j bytes and a storage area 31B of ij bytes. The same applies to the following physical blocks.

【0021】次に、実行プログラム領域の確保例につい
て、図4を参照しながら説明する。図4[A]には、連
続する8個の物理ブロック0〜7を実行プログラム領域
として割り当て、それ以外の物理ブロック8〜nをデ−
タファイル領域として割り当てた例である。上述したよ
うに、複数の連続する物理ブロックに確保された実行プ
ログラム領域は、1つのヘッダ領域によって管理され
る。一方、デ−タファイル領域は、例え複数の連続する
物理ブロックに確保されたとしても、各ブロック毎にヘ
ッダ領域によって管理される。従って、図4[A]の例
では、実行プログラム領域32の物理ブロックヘッダ3
2Aは物理ブロック0にのみ存在し、物理ブロック1〜
7には存在しない。そして、後述するように、物理ブロ
ック1〜7の管理情報等は、物理ブロック0のヘッダ領
域32Aにまとめられることになる。一方、物理ブロッ
ク8〜nにはデ−タファイル領域38B〜3nBがそれ
ぞれ確保されるが、各ブロックにそれぞれヘッダ領域3
8A〜3nAが存在し、これらによってブロック毎に管
理される。
Next, an example of securing the execution program area will be described with reference to FIG. In FIG. 4A, eight consecutive physical blocks 0 to 7 are assigned as execution program areas, and the other physical blocks 8 to n are assigned to the data areas.
This is an example of allocation as a data file area. As described above, the execution program area secured in a plurality of continuous physical blocks is managed by one header area. On the other hand, the data file area is managed by the header area for each block even if it is secured in a plurality of continuous physical blocks. Therefore, in the example of FIG. 4A, the physical block header 3 of the execution program area 32 is
2A exists only in physical block 0, and physical blocks 1 to
It does not exist in 7. Then, as will be described later, the management information of the physical blocks 1 to 7 will be collected in the header area 32A of the physical block 0. On the other hand, although data file areas 38B to 3nB are secured in the physical blocks 8 to n, respectively, the header area 3 is provided in each block.
8A to 3nA exist and are managed for each block by these.

【0022】次に、図4[B]の例は、物理ブロック0
をデ−タファイル領域として割り当て、物理ブロック1
〜Aを実行プログラム領域として割り当て、それ以後は
デ−タファイル領域として割り当てた例である。図4
[C]の例は、物理ブロック0〜n−9をデ−タファイ
ル領域に、物理ブロックn−8〜n−3を実行プログラ
ム領域に、それ以後をデ−タファイル領域にそれぞれ割
り当てた例である。このように、連続して確保された実
行プログラム領域は一つのヘッダ領域によって管理され
る。そして、物理ブロック数の制限や固定したアドレス
配置にすることはない。しかし、デ−タファイル領域
は、連続して確保されたとしても、各ブロック毎に管理
される。
Next, in the example of FIG. 4B, the physical block 0
Is allocated as a data file area, and physical block 1
In this example, .about.A is allocated as the execution program area and thereafter is allocated as the data file area. Figure 4
In the example of [C], the physical blocks 0 to n-9 are assigned to the data file area, the physical blocks n-8 to n-3 are assigned to the execution program area, and the subsequent ones are assigned to the data file area. . In this way, the execution program areas that are continuously secured are managed by one header area. Further, there is no limitation on the number of physical blocks or fixed address arrangement. However, the data file area is managed for each block even if it is continuously secured.

【0023】図5に示す例では、実行プログラム領域が
分割して配置されている。まず、図5[A]の例では、
物理ブロック0〜7に実行プログラム領域(1)が割り当
てられており、物理ブロック8にはデ−タファイル領域
が割り当てられている。そして、物理ブロック9〜F−
1に実行プログラム(2)が割り当てられており、物理ブ
ロックF以後はデ−タファイル領域用に確保されてい
る。この例でも、連続する実行プログラム領域は、一つ
のヘッダ領域で管理されている。
In the example shown in FIG. 5, the execution program area is divided and arranged. First, in the example of FIG.
An execution program area (1) is allocated to the physical blocks 0 to 7, and a data file area is allocated to the physical block 8. Then, physical blocks 9 to F-
The execution program (2) is assigned to 1 and is reserved for the data file area after the physical block F. In this example as well, continuous execution program areas are managed by one header area.

【0024】図5[B]では、物理ブロック0がデ−タ
ファイル領域用に割り当てられており、物理ブロック1
〜8が実行プログラム領域(1)に割り当てられている。
そして、物理ブロック9〜n−9までがデ−タファイル
領域用に割り当てられており、それ以後最後までが実行
プログラム領域(2)として割り当てられている。図5
[C]では、物理ブロック0,1がデ−タファイル領域
として割り当てられており、物理ブロック2〜4が実行
プログラム領域(1)に割り当てられている。そして、そ
の後の物理ブロック5〜n−9がデ−タファイル領域と
して割り当てられており、物理ブロックn−8〜n−1
が実行プログラム領域(2)として割り当てられており、
最後の物理ブロックnがデ−タファイル領域に割り当て
られている。これら図5では、実行プログラム領域とし
て2つの領域(1),(2)が指定されている例を示してい
る。しかし、本形態では、実行プログラム領域を更に複
数の領域で配置することが可能である。
In FIG. 5B, the physical block 0 is allocated for the data file area and the physical block 1 is allocated.
.About.8 are assigned to the execution program area (1).
The physical blocks 9 to n-9 are allocated for the data file area, and the subsequent areas are allocated as the execution program area (2). Figure 5
In [C], physical blocks 0 and 1 are allocated as data file areas, and physical blocks 2 to 4 are allocated to the execution program area (1). The subsequent physical blocks 5 to n-9 are allocated as data file areas, and the physical blocks n-8 to n-1.
Is allocated as the execution program area (2),
The last physical block n is assigned to the data file area. In these FIG. 5, two areas (1) and (2) are designated as the execution program areas. However, in this embodiment, it is possible to arrange the execution program area in a plurality of areas.

【0025】次に、物理ブロックのヘッダ領域について
説明する。物理ブロックヘッダには、実行プログラム領
域用とデ−タファイル領域用とがある。この2種類の領
域を判断するために、ヘッダは共通部分の構造を持つこ
とが望ましい。そこで、物理ブロックヘッダの共通する
部分の構造を、例えば次のように割り当てる。
Next, the header area of the physical block will be described. The physical block header has an execution program area and a data file area. In order to determine these two types of areas, it is desirable that the headers have a common structure. Therefore, the structure of the common portion of the physical block header is assigned as follows, for example.

【0026】(1)状態(有効/無効/遷移中/初期化完
了)を示すフラグ (2)実行プログラム領域/デ−タファイル領域を示すマ
−カ−フラグ (3)連続予約ブロックの領域数 (4)ブロックの消去回数 (5)ブロックの消去した順番を示す番号(イレ−スシ−
ケンスナンバ) (6)ブロックを初期化した時刻 (7)ブロック領域名
(1) Flag indicating status (valid / invalid / during transition / initialization completed) (2) Marker flag indicating execution program area / data file area (3) Number of continuous reserved block areas ( 4) Number of block erasures (5) Number indicating the block erasing order (erasure
(6) Block initialization time (7) Block area name

【0027】これらのうち、まず(1)のフラグについて
説明する。フラッシュ管理マネ−ジャ26(図2参照)
は、各物理ブロックヘッダの内容を読み、フラッシュメ
モリがどのように管理されているかを把握する。フラッ
シュメモリのメモリセル内のビットデ−タは、論理値の
「1」→「0」への変化の処理時間は比較的短いが、
「0」→「1」への変化は、一度ブロックイレ−ス又は
イレ−スをしなければならず、長時間を要する。つま
り、1ビットのデ−タの書換えを行なうために、そのブ
ロック内のデ−タを一時待避させるとともに、ブロック
イレ−ス後に書き戻す必要があり、処理時間としては大
きい。
Of these, the flag (1) will be described first. Flash management manager 26 (see FIG. 2)
Reads the contents of each physical block header to understand how the flash memory is managed. Bit data in a memory cell of a flash memory has a relatively short processing time for changing a logical value from "1" to "0",
The change from “0” to “1” requires a block erase or erase once, which requires a long time. In other words, in order to rewrite 1-bit data, it is necessary to temporarily save the data in the block and write it back after the block erase, which is a long processing time.

【0028】そこで、実際には、状態を示すフラグを利
用して物理ブロックの状態を管理することになる。すな
わち、上述した書換えに伴うオ−バ−ヘッドを軽減すた
め、物理ブロックヘッダ内にその物理ブロックが有効な
状態か,それとも無効な状態か,初期化が完了した状態
か,有効な状態から無効な状態への遷移状態か,といっ
た状態をそれぞれの物理ブロック毎に認識し、デ−タの
書込み,デ−タの無効化,物理ブロックのイレ−ス,物
理ブロックの初期化などの操作を行なう。
Therefore, in reality, the state of the physical block is managed by using the flag indicating the state. That is, in order to reduce the overhead caused by the above-mentioned rewriting, the physical block in the physical block header is in a valid state, or is invalid state, initialization is completed state, or invalid state from valid state. A state such as a transition state to a different state is recognized for each physical block, and operations such as writing data, invalidating data, erasing the physical block, and initializing the physical block are performed. .

【0029】次に、(2)のマ−カ−フラグは、該当する
物理ブロックがデ−タファイル領域に割り当てられた
か、それとも、実行プログラム領域に割り当てられたか
を示すフラグである。これによって、実行プログラム領
域に指定されたとき、(3)の連続予約ブロック数に実行
プログラムとして後に続くブロックの数を指定する。し
かし、デ−タファイル領域に指定されているときは、連
続予約ブロック数を0とする。
Next, the marker flag (2) is a flag indicating whether the corresponding physical block is allocated to the data file area or the execution program area. As a result, when specified in the execution program area, the number of blocks following the execution program is specified in the number of consecutive reserved blocks in (3). However, when it is specified in the data file area, the number of consecutive reserved blocks is set to 0.

【0030】次に、(4)のブロックの消去回数には、各
ブロックを消去(ブロックイレ−ス)した回数を記録す
る。ブロックイレ−スするときは、記録されている以前
の消去回数を一時的に保持し、ブロックイレ−ス終了
後、一時的に保持している以前の消去回数に1インクリ
メントしてデ−タを格納する。
Next, the number of times of erasing (block erase) each block is recorded as the number of times of erasing blocks in (4). When performing block erase, the previously recorded erase count is temporarily retained, and after the block erase is completed, the temporarily retained previous erase count is incremented by 1 and data is stored. Store.

【0031】次に、(5)のブロックの消去した順番を示
す番号は、同じときにどの順番に物理ブロックのイレ−
スを行なったかを判別するためのものである。ある物理
ブロックをブロックイレ−スし、その後、他の物理ブロ
ックのブロック消去回数が同じものがあれば、その消去
回数のブロックのイレ−スシ−ケンスナンバ−に1イン
クリメントしたものを該当ブロックヘッダのイレ−スシ
−ケンスナンバ−に格納する。すなわち、消去回数が同
じものが複数ブロック存在するとき、それらの中の最大
のイレ−スシ−ケンスナンバの値に1インクリメントし
て該当ブロックヘッダ内のイレ−スシ−ケンスナンバに
格納する。
Next, the number (5) indicating the erased order of the blocks is the same as the erased order of the physical blocks in the same order.
This is for determining whether or not the scan has been performed. If a physical block is block-erased and then another physical block has the same block erase count, the erase sequence number of the block having the same erase count is incremented by 1 and the block erased. -Store in the sequence number. That is, when a plurality of blocks having the same erase count exist, the maximum erase sequence number among them is incremented by 1 and stored in the erase sequence number in the corresponding block header.

【0032】次に、(6)のブロックを初期化した時刻に
は、該当する物理ブロックをブロックイレ−スしたとき
の時刻を記入する。なお、リアルタイムクロックを持た
ないシステムの場合は不要である。
Next, in (6) the time when the block is initialized, the time when the corresponding physical block is block erased is entered. It is not necessary in the case of a system that does not have a real-time clock.

【0033】次に、(7)のブロック領域名は、実行プロ
グラムやデ−タファイルの中でそのブロックに割り当て
た固有の名称である。
Next, the block area name of (7) is a unique name assigned to the block in the execution program or the data file.

【0034】新たにブロックの割り当てを行なう際、全
体のブロックが効率よく、つまり特定のブロックに偏ら
ず、消去回数がすべてのブロックで均一化されるように
管理するために、上述した管理情報が利用される。ま
ず、フラッシュ管理マネ−ジャ26は、新たに物理ブロ
ックを割り当てるとき、消去回数の少ないものに対して
優先的に割り当てを行なう。もし、消去回数が同じブロ
ックがあるとき、その中でイレ−スシ−ケンスナンバの
もっとも若い番号のものを割り当てる。最も若いイレ−
スシ−ケンスナンバのブロックは、消去した時刻が最も
古いものである。また、リアルタイムクロックを持つシ
ステムでは、イレ−スシ−ケンスナンバの代わりにその
クロックを使用する。すなわち、消去回数が同じブロッ
クがあるとき、その中の物理ブロック内のもっとも古い
時刻を持つブロックを割り当てる。このように、イレ−
スシ−ケンスナンバあるいはリアルタイムクロックのう
ちのいずれか一方をもてば、少しでも効率よくブロック
の割り当てを均一化することができる。
When allocating a new block, the above management information is used in order to manage all the blocks efficiently, that is, so that the number of erases is equalized in all blocks without being biased to a specific block. Used. First, when allocating a new physical block, the flash management manager 26 preferentially allocates a physical block having a small erase count. If there is a block with the same erase count, the one with the smallest erase sequence number is assigned. Youngest
The block of the sequence number has the oldest erased time. Also, in a system having a real-time clock, that clock is used instead of the erase sequence number. That is, when there is a block with the same erase count, the block having the oldest time in the physical blocks among them is assigned. In this way,
By using either the sequence number or the real-time clock, the block allocation can be made uniform even a little.

【0035】実行プログラムの配置は、物理ブロックヘ
ッダの後からその領域内において、実行プログラムデ−
タをROMの場合と同じように配置することによって行
なう。これは、OS20に依存する部分が大きいため、
従来の方法によって対応することになる。
The location of the execution program is determined by executing the execution program data in the area after the physical block header.
This is done by arranging the data in the same way as in the ROM. This is because the part that depends on the OS 20 is large.
It will be dealt with by the conventional method.

【0036】一方、デ−タファイルの配置は、フラッシ
ュ管理マネ−ジャ26によって行われる。図6[A]に
示すように、デ−タファイルは、物理ブロックヘッダ4
0Aの領域を除く記憶領域40Bに格納されることにな
る。デ−タの格納構造として、デ−タファイル内の論理
的なデ−タレコ−ドをブロッキングし、図6[B]に示
すように、デ−タレコ−ドヘッダ42A,デ−タレコ−
ドフッダ42Cを付随させた形でデ−タレコ−ド42B
のパケット42を構成する。ブロッキングの方法として
は、固定長レコ−ド,可変長レコ−ド,スパンドレコ−
ドがあり、本形態ではいずれの手法であってもよい。こ
のブロッキングは、OS20やアプリケ−ションソフト
22に依存することが多いため、システム上、フラッシ
ュ管理マネ−ジャ26がブロッキングの方法を決定して
制御する。
On the other hand, the placement of the data file is performed by the flash management manager 26. As shown in FIG. 6A, the data file has a physical block header 4
The data is stored in the storage area 40B excluding the area of 0A. As a data storage structure, a logical data record in the data file is blocked and, as shown in FIG. 6B, a data record header 42A and a data record.
Data record 42B in the form of an attached D-Fuda 42C
Packet 42 of FIG. Blocking methods include fixed-length records, variable-length records, and spanned records.
In this embodiment, any method may be used. Since this blocking often depends on the OS 20 and application software 22, the flash management manager 26 determines and controls the blocking method on the system.

【0037】また、デ−タレコ−ドヘッダ42A,フッ
ダ42Cには、線形リスト構造を持たせるようにする。
デ−タレコ−ドの方法によっては、ブロック領域名の最
適な利用方法が異なる。システム設計する際、ブロック
領域名として、パ−ティション名,デ−タファイル名,
ディレクトリ名などのように、最適なものを割り当てる
ようにする。最適なブロック領域名は、デ−タレコ−ド
の方法に依存することが多い。
Further, the data record header 42A and the footer 42C are provided with a linear list structure.
The optimum use of the block area name differs depending on the data record method. When designing the system, as the block area name, partition name, data file name,
Try to assign the most suitable one, such as a directory name. The optimum block area name often depends on the method of data recording.

【0038】デ−タファイルの論理的なデ−タレコ−ド
42Bは、上述したようにデ−タレコ−ドパケット42
として、割り当てられた物理ブロックのデ−タファイル
領域40Bに格納される。図6[B]にはその様子が示
されており、デ−タレコ−ドパケット(1)〜(n)が、i−
jバイトのデ−タファイル領域40B中に格納される。
フラッシュ管理マネ−ジャ26は、デ−タレコ−ドパケ
ット42の管理と物理ブロック40Bによる管理という
2重の管理を行なう。
The logical data record 42B of the data file is the data record packet 42 as described above.
Is stored in the data file area 40B of the allocated physical block. This is shown in FIG. 6B, in which the data record packets (1) to (n) are i-
It is stored in the j-byte data file area 40B.
The flash management manager 26 carries out dual management of management of the data record packet 42 and management by the physical block 40B.

【0039】次に、物理ブロックの初期化の手順につい
て説明する。フラッシュ管理マネ−ジャ26は、フラッ
シュメモリが初期化されていなければ、まず最初に各物
理ブロックを初期化する。初期化する場合は、一度すべ
てのブロックをイレ−スし、各物理ブロックのブロック
ヘッダに初期化完了フラグ,消去回数(1回),イレ−
スシ−ケンスナンバあるいは、初期化時刻などの情報を
格納する。次に、通常は、実行プログラムやデ−タファ
イルを格納するため、各物理ブロックの領域を宣言(確
保)する。つまり、実行プログラム領域やデ−タファイ
ル領域を示すマ−カ−フラグ,連続予約ブロックの領域
数の情報を格納する。このときに、ブロックの領域名を
割り当るようにしてもよい。また、後でブロックの領域
名を割り当てるのであれば、フラッシュ管理マネ−ジャ
26がその対応を行なう。
Next, the procedure for initializing the physical block will be described. If the flash memory is not initialized, the flash management manager 26 first initializes each physical block. When initialization is performed, all blocks are erased once, and the initialization completion flag, erase count (1 time), and erase are written in the block header of each physical block.
Stores information such as the sequence number or initialization time. Next, in order to normally store the execution program and the data file, the area of each physical block is declared (reserved). That is, a marker flag indicating an execution program area and a data file area, and information on the number of areas of continuous reserved blocks are stored. At this time, the area name of the block may be assigned. If the area name of the block is to be assigned later, the flash management manager 26 handles it.

【0040】次に、デ−タファイルを格納するときの手
順を説明する。物理ブロックヘッダの有効フラグをON
にし、その後ブロッキングされたデ−タレコ−ドをデ−
タ領域内に順次格納して行く。デ−タレコ−ドはデータ
領域に追記していくことになるが、デ−タレコ−ドを書
き換えたい場合は、フラッシュメモリの特徴からその部
分を書き換えることはオ−バ−ヘッドが大きい。
Next, the procedure for storing the data file will be described. Turns on the physical block header valid flag
And then the blocked data record is
Data is sequentially stored in the data area. The data record is additionally written in the data area. However, if the data record is to be rewritten, it is largely overwritten to rewrite that portion due to the characteristics of the flash memory.

【0041】そこで、旧論理デ−タレコ−ドから新論理
デ−タレコ−ドへのデ−タ格納は、旧デ−タレコ−ドを
無効とし、新たにデ−タレコ−ドを追記していく方法で
行う。無効となったデ−タレコ−ドは、デ−タレコ−ド
ヘッダ内に無効フラグを持たせることによって、フラッ
シュ管理マネ−ジャ26が無効と判断できる。物理ブロ
ックのデ−タ領域内のデ−タレコ−ドパケットのすべて
が無効となった場合は、その物理ブロックヘッダ内の無
効フラグをONすることによって、フラッシュ管理マネ
−ジャ26はこの物理ブロックをブロックイレ−スする
ことができる。ブロックイレ−スが完了すると、前述の
ブロックヘッダの初期化を行なう。
Therefore, in storing data from the old logical data record to the new logical data record, the old data record is invalidated and a new data record is additionally written. Do by the way. The invalid data record can be judged to be invalid by the flash management manager 26 by providing an invalid flag in the data record header. When all the data record packets in the data area of the physical block are invalid, the invalid flag in the physical block header is turned on, and the flash management manager 26 selects this physical block. Block erase can be performed. When the block erase is completed, the above block header is initialized.

【0042】次に、実行プログラムを格納するときの手
順を説明する。最初に実行プログラム領域として複数ブ
ロックを確保するときは、まず、物理ブロックヘッダ内
の有効フラグ,実行プログラム領域を示すマ−カ−フラ
グ,予約領域ブロック数の各情報を格納する。これによ
り、実行プログラム領域内に実行プログラムをROM化
したデ−タを格納する。
Next, the procedure for storing the execution program will be described. When a plurality of blocks are initially secured as the execution program area, information such as a valid flag in the physical block header, a marker flag indicating the execution program area, and the number of reserved area blocks is stored. As a result, the ROMized data of the execution program is stored in the execution program area.

【0043】以上をシステムとして運用し、その途中結
果として、デ−タファイル領域の書換回数と実行プログ
ラム領域の書換回数と比較する。そして、大幅な回数の
開きがあれば、現在配置されている領域を変更し、デフ
ラグメンテ−ションを行なうことが望ましい。フラッシ
ュ管理マネ−ジャ26は、それぞれの領域を管理してい
るためデフラグメンテ−ション操作における動的配置に
対応でき、システムとして矛盾を起こす心配もない。こ
れらを行なうことで効率的な領域配置を実現できる。ま
た、結果として運用時間を延ばし、フラッシュメモリの
書換寿命(回数ではなく時間)を延ばすこともできる。
なお、フラッシュメモリによっては、ライト(書込)操
作中に他のオペレ−ションができないチップが存在す
る。このようなときは、タスク,スレッドのようなプロ
グラミング技法により、排他制御を行なうようにする。
The above is operated as a system, and as the intermediate result, the number of rewriting of the data file area and the number of rewriting of the execution program area are compared. If there is a large number of openings, it is desirable to change the currently arranged area and perform defragmentation. Since the flash management manager 26 manages the respective areas, it can cope with the dynamic arrangement in the defragmentation operation, and there is no fear of causing a contradiction in the system. By performing these, efficient area arrangement can be realized. Further, as a result, it is possible to prolong the operation time and prolong the rewriting life (time, not the number of times) of the flash memory.
Depending on the flash memory, there are some chips that cannot perform other operations during the write (write) operation. In such a case, exclusive control is performed by a programming technique such as task and thread.

【0044】図7には、フラッシュメモリに対する物理
ブロックヘッダの格納例が示されている。図7[A]の
例は、64Kバイトを消去ブロック単位とするフラッシ
ュメモリで、ブロック数がn+1個あるシステムであ
る。各物理ブロックの先頭には、図7[B]に示すよう
に、各物理ブロックの管理情報であるヘッダ領域とし
て、256バイトが割り当てられている。上述したよう
に、デ−タファイルの場合には、該当する物理ブロック
内に必ず物理ブロックヘッダを付随させる。しかし、実
行プログラムファイルの場合はその限りではない。以
下、本形態の実施例について説明する。
FIG. 7 shows a storage example of the physical block header in the flash memory. The example in FIG. 7A is a flash memory in which 64 Kbytes are used as an erase block unit, and the system has n + 1 blocks. As shown in FIG. 7B, 256 bytes are allocated to the head of each physical block as a header area which is management information of each physical block. As described above, in the case of the data file, the physical block header is always attached to the corresponding physical block. However, this does not apply to the case of the execution program file. Hereinafter, examples of this embodiment will be described.

【0045】(1)実施例1 この実施例1は、ブロックシ−ケンスナンバを用いる例
である。本例のファイル管理装置では、図8[A]に示
すように、ブロック消去が64Kバイト単位で可能な2
M×8ビットのフラッシュメモリが使用される。図8
[A]に示すように、各ブロックに「0」から「1F」
と順に番号を付ける。このようなフラッシュメモリに対
して、図5[A]のように実行プログラム領域を連続領
域として確保したとすると、図8に[B]に示すように
なる。当然、実行プログラム領域(1)に領域指定されて
いる物理ブロック1〜7には物理ブロックヘッダはな
い。同様に、実行プログラム(2)に領域指定されている
物理ブロック10〜Eには、物理ブロックヘッダはな
い。
(1) Example 1 Example 1 is an example using a block sequence number. In the file management device of this example, as shown in FIG. 8A, block erasure can be performed in units of 64 Kbytes.
M × 8 bit flash memory is used. Figure 8
As shown in [A], each block has "0" to "1F"
Number in order. Assuming that the execution program area is secured as a continuous area in such a flash memory as shown in FIG. 5A, it becomes as shown in FIG. 8B. Naturally, the physical blocks 1 to 7 designated in the execution program area (1) do not have a physical block header. Similarly, the physical blocks 10 to E designated as areas in the execution program (2) have no physical block header.

【0046】そこで、本実施例では、図9に示すよう
に、1バイト目から18バイト目までを共通のデ−タ構
造をもつことにする。これにより、この共通部分をフラ
ッシュ管理マネ−ジャ26によってスキャンすれば、全
体の構造を把握することができる。そして、次の19バ
イト目から実行プログラム領域あるいはデ−タファイル
領域に割り当てられた内容を追記していけばよい。
Therefore, in this embodiment, as shown in FIG. 9, the first to 18th bytes have a common data structure. As a result, if this common part is scanned by the flash management manager 26, the entire structure can be grasped. Then, the contents allocated to the execution program area or the data file area may be added from the next 19th byte.

【0047】共通部分の内容を順に説明すると、まず1
バイト目には、図10[A]に示すように、有効/遷移
中/無効,初期化完了状態,予約のフラグがある。これ
らのうち、有効/遷移中/無効のフラグは、このブロッ
ク領域が有効状態か,それとも有効から無効になる遷移
中(過渡期)の状態か,完全に無効になった状態かを示
す。初期化完了状態のフラグは、ブロックのイレ−ス後
にブロックヘッダの初期化(フォ−マット)が完了した
ことを指し示す。予約のフラグは、システムを拡張する
ときに使用するための予備フラグである。実際のビット
の割付例を示すと、表1[A]のようになる。
The contents of the common part will be described in order.
At the byte, as shown in FIG. 10A, there are flags of valid / during transition / invalid, initialization completion state, and reservation. Of these, the valid / transitional / invalid flag indicates whether this block area is in a valid state, in a transitional state (transition period) from valid to invalid, or in a completely invalidated state. The initialization completion state flag indicates that the initialization (format) of the block header is completed after the block is erased. The reserved flag is a reserve flag used for expanding the system. An example of actual bit allocation is shown in Table 1 [A].

【0048】[0048]

【表1】 [Table 1]

【0049】次に、図10[B]を参照してブロックイ
レースの手順を説明する。フラッシュ管理マネ−ジャ2
6の判定により、ブロックイレ−ス命令が出されたとき
(図10[B]の50)、次の状態として旧ブロックヘ
ッダの消去回数などを一時保存し(52)、このブロッ
クのブロックイレ−スを行なう(54)。ブロックイレ
−スを行なった直後、イレースされたブロックの記憶エ
リアのデ−タ値は、すべてFFhとなっている(5
6)。この後すぐに、フラッシュ管理マネ−ジャ26が
初期化(フォ−マット)操作(58)によって、ビット
4が0となり、この記憶エリアのデ−タ値はFFhから
EFhに遷移する(60)。
Next, a block erase procedure will be described with reference to FIG. Flash management manager 2
When the block erase command is issued by the judgment of 6 (50 in FIG. 10 [B]), the number of erases of the old block header is temporarily stored as the next state (52), and the block erase of this block is executed. (54). Immediately after performing the block erase, the data values of the storage areas of the erased blocks are all FFh (5
6). Immediately thereafter, the flash management manager 26 performs an initialization (format) operation (58) to set bit 4 to 0, and the data value of this storage area transits from FFh to EFh (60).

【0050】更にその後、このブロックのヘッダに、イ
レ−ス前に一時保存しておいた消去回数に+1した値を
書き込み、物理ブロックの初期化を行なう。そして、新
たにこのブロックへの使用要求によってフラッシュ管理
マネ−ジャ26が割り当てを行ったとすると(62)、
ビット7に0を書き込み、このエリアのデ−タの値はE
Fhから6Fhに遷移する(64)。更に、フラッシュ
管理マネ−ジャ26がこのブロックの無効要求を認めれ
ば(66)、ビット6に0を書き込み、このエリアのデ
−タの値は6Fhから2Fhに遷移する(68)。
After that, a value obtained by adding 1 to the erase count temporarily stored before the erase is written to the header of this block to initialize the physical block. Then, if it is assumed that the flash management manager 26 newly allocates a request to use this block (62),
Write 0 to bit 7 and the value of the data in this area is E
A transition is made from Fh to 6Fh (64). Further, if the flash management manager 26 recognizes the invalid request of this block (66), 0 is written in the bit 6 and the data value of this area transits from 6Fh to 2Fh (68).

【0051】デフラグメンテ−ションを行なう際、フラ
ッシュ管理マネ−ジャ26の機能により、物理ブロック
にはコピ−元,コピ−先,ム−ブなどのような遷移中の
状態が存在する。デ−タファイル領域としての物理ブロ
ック内の有効な状態から遷移中の状態にするには(7
0)、ビット5を0にし、このエリアのデ−タの値は6
Fhから4Fhに遷移させればよい(72)。この遷移
中の状態を存在させることは、遷移に要する時間が少な
くないことの他に、電池の消耗による動作の不安定や、
カ−ド型フラッシュメモリが外されたときなどにおける
安全性を高めるためである。つまり、本発明では、この
遷移段階の状態を管理し、故障・事故などによるデ−タ
の消失を最小限に抑え、復旧させるように構成されてい
る。
When performing defragmentation, due to the function of the flash management manager 26, physical blocks have transitional states such as copy source, copy destination, and move. To change from the valid state in the physical block as the data file area to the transitioning state (7
0), bit 5 is set to 0, and the data value of this area is 6
The transition may be made from Fh to 4Fh (72). The existence of this transitional state means that the time required for the transition is not short, the operation is unstable due to the consumption of the battery,
This is to enhance safety when the card type flash memory is removed. That is, the present invention is configured to manage the state of this transition stage, minimize the loss of data due to a failure or accident, and restore the data.

【0052】次に、図9に示す共通部分の2バイト目に
ついて説明する。この2バイト目には、図9に示すよう
に、プログラム/データ,連続予約ブロック領域数のフ
ラグがあり、図10[C],表1[C]に示すようにな
っている。これらのうち、プログラム/データのマーカ
ーフラグは、実行プログラム,デ−タファイルのいずれ
がそのブロックに割り当てられたかを決定するフラグで
ある。このマ−カ−フラグが0のとき、実行プログラム
領域にこのブロックが指定されたことになる。
Next, the second byte of the common part shown in FIG. 9 will be described. As shown in FIG. 9, there are flags for the program / data and the number of consecutive reserved block areas in the second byte, and they are as shown in FIG. 10 [C] and Table 1 [C]. Of these, the program / data marker flag is a flag that determines which of the execution program and the data file is assigned to the block. When this marker flag is 0, this block is designated in the execution program area.

【0053】連続予約ブロック領域数のフラグは、実行
プログラム領域に指定した残りのブロック数が16進数
で表記されている。しかし、このマ−カ−フラグが1
で、この物理ブロックはデ−タファイル領域として割り
当てているとき、連続予約ブロック数には000000
0bを書く。
In the flag of the number of continuous reserved block areas, the number of remaining blocks designated in the execution program area is expressed in hexadecimal. However, this marker flag is 1
When this physical block is allocated as a data file area, the number of continuous reserved blocks is 000000.
Write 0b.

【0054】次に、図9の3〜5バイト目は、表1
[D]に示すように、そのブロックの消去回数を16進
で表記している。3バイト目がその回数の下位の桁、4
バイト目がその回数の中位の桁、5バイト目にはその回
数の上位の桁として、それぞれデ−タを格納する。従っ
て、FFFFFFh回がブロック連続の最大数値とな
る。なお、この最大値のとき、更なるインクリメントは
行われない。
Next, the 3rd to 5th bytes in FIG.
As shown in [D], the erase count of the block is expressed in hexadecimal. The 3rd byte is the lower digit of the count, 4
Data is stored in the byte as the middle digit of the count and in the fifth byte as the upper digit of the count. Therefore, FFFFFFh times is the maximum numerical value of block continuity. At this maximum value, no further increment is performed.

【0055】次に、図9の6バイト目であるが、これ
は、各物理ブロックの消去回数が同じときに、フラッシ
ュ管理マネ−ジャ26が最適な物理ブロックの割り当て
を行なうために用意されたもので、上述したイレースシ
ーケンスナンバである。このイレ−スシ−ケンスナンバ
は、物理ブロックの消去回数が他の物理ブロックと同じ
ときに、どの順番で物理ブロックの初期化がなされたか
を記録するものである。イレ−スシ−ケンスナンバ−の
割付の流れとして、まず該当する物理ブロックの消去回
数と他のブロックで消去回数で同一のものがなければ、
該当する物理ブロックのイレ−スシ−ケンシナンバは0
x00となる。
Next, regarding the 6th byte in FIG. 9, this is prepared for the flash management manager 26 to optimally allocate a physical block when the number of erases of each physical block is the same. This is the erase sequence number described above. This erase sequence number records the order in which the physical blocks were initialized when the number of times of erasing the physical block was the same as that of other physical blocks. As the flow of erasing sequence number allocation, first, if there is no same erase count in the corresponding physical block and erase count in other blocks,
The erase sequence number of the corresponding physical block is 0.
It becomes x00.

【0056】もし、他のブロックで消去回数が同じもの
があるときは、その中で最も大きいイレ−スシ−ケンス
ナンバを検出し、該当ブロックのイレ−スシ−ケンスナ
ンバには先ほど検出したイレ−スシ−ケンスナンバの値
に1インクリメントした値を記録する。このようなアル
ゴリズムによって、イレースシ−ケンスナンバの割付を
行なう。イレースシーケンスナンバは、フラッシュ管理
マネ−ジャ26が物理ブロックの割り当てを行なうとき
の判断材料となる。
If another block has the same erase count, the largest erase sequence number is detected, and the erase sequence number of the corresponding block is detected. The value obtained by incrementing the value of the Kens number by 1 is recorded. An erase sequence number is assigned by such an algorithm. The erase sequence number is used as a judgment factor when the flash management manager 26 allocates a physical block.

【0057】次に、図9の7バイト目から18バイト目
までは、該当するブロックの領域名を記録する。実行プ
ログラムファイルの場合、パ−ティション名やディレク
トリ名などに利用すると、システム運用が容易になる。
また、デ−タファイルの場合は、デ−タレコード方式に
よって最適となるようなブロック領域名の扱いが考えら
れる。例えば、デ−タレコ−ドの方法が固定長,可変長
レコ−ド,スパンドレコ−ドのようなファイルを二重管
理する場合には、パ−ティション名,ディレクトリ名な
どが適している。しかし、固定長や可変長レコ−ドでフ
ァイルを一元管理する場合には、デ−タファイル名とし
て扱うほうが望ましい。本実施例では、ブロック領域名
は8.3形式で、MS−DOSのような表現方法を利用
する。
Next, in the 7th to 18th bytes of FIG. 9, the area name of the corresponding block is recorded. In the case of an execution program file, if it is used as a partition name or directory name, system operation becomes easy.
Further, in the case of a data file, it is conceivable to handle the block area name optimally by the data record method. For example, in the case where the data recording method double manages files such as fixed length, variable length records and spanned records, the partition name and directory name are suitable. However, in the case of unified management of files with fixed length or variable length records, it is desirable to handle them as data file names. In this embodiment, the block area name is in the 8.3 format and an expression method such as MS-DOS is used.

【0058】以上のような構造の物理ブロックヘッダを
用いてフラッシュファイル管理システムを実現する。フ
ラッシュ管理マネ−ジャ26は、OS20やアプリケ−
ションソフト22などの要求により、実行プログラムや
デ−タファイルなどの読み出し,書き込みを制御する。
まず、書き込みに際しては、フラッシュメモリの特徴と
して書き込み遅延の影響がある。このため、オ−バヘッ
ドを少なくして効率よく書き込みを行なうためには、他
のデ−タファイル領域に新たに追記していく方式をとる
ことになる。この方式を実行するためには、書換前の旧
デ−タと書換後の新デ−タが論理的には変更されている
が、物理的には旧デ−タが無効となり、新デ−タが追記
されることになる。
A flash file management system is realized by using the physical block header having the above structure. The flash management manager 26 uses the OS 20 and application.
The read / write of the execution program and the data file is controlled by the request of the application software 22 and the like.
First, when writing, a characteristic of the flash memory is a write delay. For this reason, in order to reduce the over head and to perform writing efficiently, a method of newly writing to another data file area is adopted. In order to execute this method, the old data before rewriting and the new data after rewriting are logically changed, but the old data is physically invalid and the new data is physically changed. Will be added.

【0059】つまり、物理的には旧デ−タと新デ−タは
共存するものの、旧デ−タに無効フラグを記すことによ
って論理的に削除することになる。このような動作をフ
ラッシュファイルシステムが繰り返すと、論理的な無効
デ−タが数多く存在することになる。場合によっては、
新規のデ−タファイル領域がなくなる危険性すらある。
このことを避けるために、フラッシュ管理マネ−ジャ2
6は、デ−タの無効化を定期的に検知し、デフラグメン
テ−ションの操作を行なって効率よくデ−タファイル領
域を確保する。
That is, although the old data and the new data physically coexist, they are logically deleted by writing an invalid flag in the old data. When the flash file system repeats such an operation, many logical invalid data exist. In some cases,
There is even a risk of running out of new data file areas.
To avoid this, the flash management manager 2
6 periodically detects invalidation of data and performs defragmentation operation to efficiently secure a data file area.

【0060】デ−タファイル領域としての物理ブロック
の割り当ては、フラッシュ管理マネ−ジャ26が行な
う。このとき、OS20やアプリケ−ションンソフト2
2の要求によってデ−タファイル領域を与えることにな
るが、本実施例のアルゴリズムでは、優先的に消去回数
が少ない物理ブロックに割り当てられる。また、デフラ
グメンテ−ション操作を行なうときなどは、消去回数が
少ないブロックについて優先的にデ−タレコ−ドパケッ
トの無効化を行ない、その物理ブロックのデ−タファイ
ル領域内をすべて無効化することによって、ブロックの
使用回数の均一化が図られる。そしてそれらの中で少し
でも物理ブロックの使用回数を効率的に均一化するた
め、イレ−スシ−ケンスナンバの若いものを優先させ
て、割り当てる物理ブロックやブロックイレ−スの管理
が行われる。
The flash management manager 26 assigns a physical block as a data file area. At this time, OS20 and application software 2
Although the data file area is provided by the request of No. 2, the algorithm of the present embodiment preferentially allocates the physical block to the physical block having the smaller erase count. Also, when performing a defragmentation operation, the data record packet is invalidated preferentially for a block with a small number of erases, and the entire data file area of that physical block is invalidated. The number of times the blocks are used can be made uniform. In order to efficiently equalize the number of times physical blocks are used among these, the physical blocks and block erases to be allocated are managed by giving priority to the youngest erase sequence numbers.

【0061】フラッシュファイルシステムを運用してい
くと、結果として実行プログラム領域とデ−タファイル
領域の消去回数が大きく違ってくるようになる。そし
て、ある程度消去回数に開きが生じると、フラッシュ管
理マネ−ジャ26は、実行プログラム領域で使用してい
る物理ブロックとデ−タファイル領域で使用している物
理ブロックとを入れ替え、これによってフラッシュファ
イルシステムの運用寿命の延命化が図られる。
As the flash file system is operated, as a result, the number of erasures in the execution program area and the data file area will be significantly different. Then, when the number of erasures is increased to some extent, the flash management manager 26 replaces the physical block used in the execution program area with the physical block used in the data file area, thereby the flash file system. The operating life of is extended.

【0062】読み出しの場合は、フラッシュ管理マネ−
ジャ26がフラッシュメモリの読み出しを行なうことを
要求し、許可確認後、ブロッキングされたデ−タレコ−
ドパケットを論理的なデ−タレコ−ドとして扱うことに
よって可能となる。また、書き込みの場合、フラッシュ
管理マネ−ジャ26にフラッシュメモリへの書き込みを
行なうことを要求し、許可確認後、論理的なデ−タレコ
−ドをブロッキングし、デ−タレコ−ドパケット化して
指定エリアに格納する。デ−タの書換えは、物理的にデ
−タレコ−ドパケットを無効化し、新たに追記すること
によって実現する。ただし、物理的にメモリエリアは縮
小する。これらのデ−タのブロッキング方法は、上述し
た通りであり、背景技術により実現されている。
In the case of reading, the flash management manager
Jar 26 requests the flash memory to be read, and after confirming the permission, the blocked data record
This is possible by treating the packet as a logical data record. In the case of writing, the flash management manager 26 is requested to write to the flash memory, and after confirming the permission, the logical data record is blocked and the data record packet is designated and designated. Store in area. The rewriting of data is realized by physically invalidating the data record packet and newly writing it. However, the memory area is physically reduced. The method of blocking these data is as described above and is realized by the background art.

【0063】物理ブロックのデ−タファイル領域内です
べてのデータが無効化された場合、その物理ブロックヘ
ッダの無効フラグをONとすることによって、その物理
ブロック全体が無効化されたことになる。そして、フラ
ッシュ管理マネ−ジャ26はこのことを検知し、そのブ
ロックをイレ−スして初期化操作を始める。また、デフ
ラグメンテ−ション操作により、コピ−元のデ−タファ
イルの属する物理ブロックヘッダの遷移中フラグをON
にする。そして、必要なデ−タが全部コピ−されたな
ら、その物理ブロックヘッダの無効フラグをONにし、
前述のブロックイレ−ス・初期化操作を行なう。遷移中
フラグのONから無効フラグのONまでの間に何らかの
原因による異常な状態があり、システムが再起動したと
きなどには、これらの状態フラグを監視し、解析するこ
とによって、どの状態から停止あるいは異常となったか
を検出することができる。そして、システムを修復・復
旧させるための貴重な情報源となる。
When all the data is invalidated in the data file area of the physical block, the invalidation flag of the physical block header is turned on, which means that the entire physical block is invalidated. Then, the flash management manager 26 detects this, erases the block, and starts the initialization operation. Also, by the defragmentation operation, the transition flag of the physical block header to which the copy source data file belongs is turned ON.
To When all the necessary data has been copied, the invalid flag of the physical block header is turned on,
The block erase / initialization operation described above is performed. When there is an abnormal state due to some cause from the ON of the transition flag to the ON of the invalid flag, and when the system is restarted, monitor and analyze these state flags to stop from which state Alternatively, it is possible to detect whether an abnormality has occurred. It will also be a valuable source of information for repairing and restoring the system.

【0064】フラッシュ管理マネ−ジャ26は、それぞ
れの物理ブロックの状態を監視,管理していくことにな
る。OS20やアプリケ−ションソフト22の要求に応
じて該当する物理ブロックを割り当て、有効→(遷移
中)→無効→初期化の状態の監視,管理を実行する。そ
して、フラッシュファイルシステムを運用していくと、
各物理ブロックの状態の変化として、初期化→有効,有
効→無効,有効→遷移中,移中→無効,無効→初期化,
初期化→無効などが挙げられる。
The flash management manager 26 monitors and manages the state of each physical block. In response to a request from the OS 20 or the application software 22, a corresponding physical block is assigned, and monitoring and management of the state of valid → (during transition) → invalid → initialization are executed. And when you operate the flash file system,
Changes in the state of each physical block include initialization → valid, valid → invalid, valid → transitioning, moving → invalid, invalid → initialization,
Initialization → invalidation, etc.

【0065】[初期化→有効]は、物理ブロックが初期
化状態から、その物理ブロックがデ−タファイル領域等
として割り当てられたとき、有効フラグONによって有
効状態となる。
[Initialization → Valid] is set to the valid state by turning on the valid flag when the physical block is allocated from the initialized state as a data file area or the like.

【0066】[有効→無効]は、デ−タファイルとして
その物理ブロックが有効でデ−タファイル領域内に少な
くとも一つは論理的に有効なデ−タがある状態から、デ
−タファイル領域内がすべて論理的に無効なデ−タとな
り、フラッシュ管理マネ−ジャ26が、その後この物理
ブロックの無効フラグをONとし、物理ブロックの無効
化を行なう。
[Valid → Invalid] indicates that the physical block is valid as a data file and at least one logically valid data exists in the data file area, and The data becomes logically invalid data, and the flash management manager 26 subsequently turns on the invalid flag of this physical block to invalidate the physical block.

【0067】[有効→遷移中]は、少なくとも一つは存
在する論理的に有効なデ−タレコ−ドパケットを、異な
る物理ブロックのデ−タファイル領域にコピ−すると
き、コピ−元となる物理ブロックに対して遷移中フラグ
をONにする。この状態のとき、デ−タレコ−ドパケッ
トがコピ−されていることになる。
[Effective → During transition] is a physical copy source when at least one existing logically valid data record packet is copied to a data file area of a different physical block. The transition flag is turned ON for the block. In this state, the data record packet has been copied.

【0068】[遷移中→無効]は、前述の遷移中の状態
が終了し、物理ブロックが無効となったことを示す。つ
まり、デ−タレコ−ドパケットのコピ−が完了し、フラ
ッシュ管理マネ−ジャ26が無効フラグをONにする。
[Transition → Invalid] indicates that the above-mentioned state during transition has ended and the physical block has become invalid. That is, the copying of the data record packet is completed, and the flash management manager 26 turns on the invalid flag.

【0069】[無効→初期化]は、物理ブロックが無効
な状態からその物理ブロックをブロックイレ−スし、物
理ブロックヘッダを初期化が完了したとき、フラッシュ
管理マネ−ジャ26が初期化フラグをONにする。この
とき、物理ブロックヘッダの初期化が完了し、デ−タフ
ァイル領域として使用可能な状態となる。
In [Invalid → Initialize], when the physical block is block-erased from the invalid state and the initialization of the physical block header is completed, the flash management manager 26 sets the initialization flag. Turn it on. At this time, the initialization of the physical block header is completed, and the physical file header becomes usable as a data file area.

【0070】[初期化→無効]は、物理ブロックが初期
化された状態から、その物理ブロックが無効になった状
態を示す。これは、状態として存在する可能性はある
が、システムとしては多用すべきではない。
[Initialization → Invalid] indicates a state in which the physical block is invalidated after the physical block is initialized. This may exist as a state, but should not be overused by the system.

【0071】フラッシュ管理マネ−ジャ26は、各物理
ブロックの状態を管理・監視し、何らかの原因による異
常状態からの脱却後、有効/無効/遷移中/初期化フラ
グを、異常状態以前のデ−タの復元や復旧をするための
情報源とする。つまり、これらの変化状態を考慮するこ
とで、システムの停止や異常が生じたシステムの修復や
デ−タレコ−ドパケットの復元を行なうとき、どの状態
から異常になったかを検出することができる。
The flash management manager 26 manages / monitors the state of each physical block, and after exiting from the abnormal state due to some cause, sets the valid / invalid / during transition / initialization flag to the data before the abnormal state. It will be used as an information source for restoring and restoring data. In other words, by considering these change states, it is possible to detect from which state the abnormality has occurred when the system is stopped or the system in which the abnormality has occurred is repaired or the data record packet is restored.

【0072】(2)実施例2 この実施例2は、実施例1のイレースシ−ケンスナンバ
の代わりに初期化した時刻を記録する方法である。すな
わち、図11にブロックヘッダの構成を示すように、1
9バイト目から21バイト目までに初期化が行われた年
/月/日/時/分/秒を記録する。実施例1のイレ−ス
シ−ケンスナンバは、同一消去回数のときの初期化され
た順番を指していたが、実施例2では、ブロックの使用
回数の均一化を図るアルゴリズムにおいて、すべての物
理ブロックの使用回数を少しでも効率的に向上させるた
めに、消去回数が同じときは最も古い時刻のものを優先
させることによって、割り当てる物理ブロックやブロッ
クイレ−スの管理が行なわれる。
(2) Second Embodiment This second embodiment is a method of recording the initialized time instead of the erase sequence number of the first embodiment. That is, as shown in the structure of the block header in FIG.
Record the year / month / day / hour / minute / second from the 9th byte to the 21st byte. The erase sequence number of the first embodiment refers to the initialized order when the same erase count is used. However, in the second embodiment, in the algorithm for equalizing the use count of blocks, all physical blocks In order to improve the number of times of use as efficiently as possible, the physical blocks and block erases to be allocated are managed by giving priority to the oldest time when the number of times of erasure is the same.

【0073】(3)実施例3 この実施例3は、実施例1と実施例2を組み合わせ、イ
レースシ−ケンスナンバと初期化時刻の双方を記録する
方法である。図12に示すように、6バイト目にイレー
スシーケンスナンバを記録し、19バイト目から21バ
イト目までに初期化の年/月/日/時/分/秒を記録す
る。実施例1,実施例2とほとんど同じであるが、ブロ
ックの使用回数の均一化を図るアルゴリズムにおいて、
すべての物理ブロックの使用回数を少しでも効率的に向
上させるために、消去回数が同じときはイレ−スシ−ケ
ンスナンバの若いものから優先させるようにする。ま
た、最も古い初期化時刻の物理ブロックが存在するとき
は、消去回数を他と見比べて効率がよいと判断できると
き、その物理ブロックを優先的に割り当てるアルゴリズ
ムによって、割り当てる物理ブロックやブロックイレ−
スの管理が行なわれる。
(3) Third Embodiment This third embodiment is a method in which the first and second embodiments are combined to record both the erase sequence number and the initialization time. As shown in FIG. 12, the erase sequence number is recorded in the 6th byte, and the year / month / day / hour / minute / second of initialization is recorded in the 19th to 21st bytes. Almost the same as the first and second embodiments, but in the algorithm for equalizing the number of times the blocks are used,
In order to improve the number of times of use of all physical blocks as efficiently as possible, when the number of times of erasure is the same, priority is given to the youngest erase sequence numbers. Further, when there is a physical block with the oldest initialization time, when it can be judged that the erase count is more efficient than others, the physical block and block erase to be allocated are assigned by an algorithm that preferentially allocates the physical block.
Management is performed.

【0074】この発明には数多くの実施形態があり、以
上の開示に基づいて多様に改変することが可能である。
例えば、次のようなものも含まれる。 (1)前記形態はフラッシュメモリに本発明を適用したも
のであるが、他の類似するメモリがフラッシュメモリと
同じ書込み,読出し機能を備えており、かつ、書込前ブ
ロック消去特性を有するメモリであれば、同様に適用可
能である。 (2)フラッシュメモリのイレース単位である物理ブロッ
クは、バイト単位やワード単位の他、どのようなデータ
単位であっても、同様に適用可能である。
The present invention has many embodiments and can be variously modified based on the above disclosure.
For example, the following is also included. (1) In the above-mentioned embodiment, the present invention is applied to a flash memory, but another similar memory has the same write and read functions as the flash memory and has a pre-write block erase characteristic. If there is, it is similarly applicable. (2) The physical block, which is the erase unit of the flash memory, can be similarly applied to any data unit other than the byte unit or the word unit.

【0075】[0075]

【発明の効果】以上説明したように本発明によれば、次
のような効果がある。 (1)フラッショ型メモリを使用した拡張記憶装置上で、
フラッシュ型メモリの書換回数を少なくするような制御
構造を持ち、かつ、主記憶装置に実行プログラムをロ−
ドすることなく、フラッシュ型メモリ上でプログラムの
実行が可能となる。また、書換回数を少なくする制御構
造をもつ補助記憶装置としても、無駄の少ないデ−タ構
造で記憶を行うことが可能となる。
As described above, the present invention has the following effects. (1) On an extended storage device that uses a flash memory,
It has a control structure that reduces the number of rewrites of the flash memory and also loads the execution program in the main memory.
The program can be executed on the flash type memory without being loaded. Further, even if the auxiliary storage device has a control structure for reducing the number of times of rewriting, the data structure can be stored with less waste.

【0076】(2)各ブロックの書換回数等の情報テ−ブ
ルのためのエリアをブロック内に設けることとしたの
で、別にメモリを設ける必要がなく、コストの削減が可
能となる。特に、拡張記憶装置と補助記憶装置を1つの
フラッシュ型メモリ上で混在させることができ、システ
ムとして省スペ−ス,コスト削減を図ることができる。
(2) Since the area for the information table such as the number of times of rewriting of each block is provided in the block, it is not necessary to provide another memory, and the cost can be reduced. In particular, the expansion storage device and the auxiliary storage device can be mixed on one flash type memory, and the space saving and cost reduction of the system can be achieved.

【0077】(3)物理ブロックの有効/遷移中/無効/
初期化という状態フラグをもつこととしたので、コンピ
ュータシステムの異常による停止からの復旧やデ−タの
復元に有効である。
(3) Physical block valid / transitional / invalid /
Since it has a status flag of initialization, it is effective for recovery from a stop due to an abnormality in the computer system and data restoration.

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

【図1】この発明の一形態を利用したシステムの基本構
成を示す図である。
FIG. 1 is a diagram showing a basic configuration of a system using one embodiment of the present invention.

【図2】一形態におけるソフトウエア構造を示す図であ
る。
FIG. 2 is a diagram showing a software structure in one embodiment.

【図3】一形態におけるフラッシュメモリ内での物理ブ
ロックの割付を行なったメモリマップを示す図である。
FIG. 3 is a diagram showing a memory map in which physical blocks are allocated in a flash memory according to one embodiment.

【図4】1つの実行プログラム領域と複数のデ−タファ
イル領域を物理ブロックに割り当てた例を示す図であ
る。
FIG. 4 is a diagram showing an example in which one execution program area and a plurality of data file areas are assigned to physical blocks.

【図5】複数の実行プログラム領域と複数のデ−タファ
イル領域を物理ブロックに割り当てた例を示す図であ
る。
FIG. 5 is a diagram showing an example in which a plurality of execution program areas and a plurality of data file areas are assigned to physical blocks.

【図6】デ−タファイル領域のデ−タレコ−ドパケット
の例と格納方法の例を示す図である。
FIG. 6 is a diagram showing an example of a data record packet in a data file area and an example of a storage method.

【図7】ブロックイレ−スが64Kバイト単位のフラッ
シュメモリを物理ブロック単位に分割して256バイト
のブロックヘッダを確保した例を示す図である。
FIG. 7 is a diagram showing an example in which a flash memory with a block erase unit of 64 Kbytes is divided into physical block units to secure a block header of 256 bytes.

【図8】実施例1で使用しているフラッシュメモリを実
行プログラム領域とデ−タファイル領域に分割したメモ
リマップの例を示す図である。
FIG. 8 is a diagram showing an example of a memory map in which the flash memory used in the first embodiment is divided into an execution program area and a data file area.

【図9】実施例1で使用している物理ブロックヘッダの
メモリマップの例を示す図である。
FIG. 9 is a diagram showing an example of a memory map of a physical block header used in the first embodiment.

【図10】実施例1における物理ブロックヘッダの一部
とシ−ケンスを表す図である。
FIG. 10 is a diagram showing a part of a physical block header and a sequence according to the first embodiment.

【図11】実施例2で使用している物理ブロックヘッダ
のメモリマップの例を示す図である。
FIG. 11 is a diagram showing an example of a memory map of a physical block header used in the second embodiment.

【図12】実施例2で使用している物理ブロックヘッダ
のメモリマップの例を示す図である。
FIG. 12 is a diagram showing an example of a memory map of a physical block header used in the second embodiment.

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

10…プロセッサ 12…フラッシュメモリ 14…フラッシュメモリ制御装置 16…RAM 20…オペレーティングシステム 22…アプリケーションソフト 24…ドライバ層 26…フラッシュ管理マネージャ 30A,31A,38A,39A,3(n−1)A,3
nA,40A…ヘッダ領域 30B,31B,38B,39B,3(n−1)B,3
nB,40B…記憶領域 32…実行プログラム領域 42…データレコードパケット 42A…データレコードヘッダ 42B…データレコード 42C…データレコードフッダ
10 ... Processor 12 ... Flash memory 14 ... Flash memory control device 16 ... RAM 20 ... Operating system 22 ... Application software 24 ... Driver layer 26 ... Flash management manager 30A, 31A, 38A, 39A, 3 (n-1) A, 3
nA, 40A ... Header areas 30B, 31B, 38B, 39B, 3 (n-1) B, 3
nB, 40B ... Storage area 32 ... Execution program area 42 ... Data record packet 42A ... Data record header 42B ... Data record 42C ... Data record footer

フロントページの続き (56)参考文献 特開 平8−272654(JP,A) 特開 平6−322795(JP,A) 特開 平6−250798(JP,A) 特開 平7−200418(JP,A) 特開 平8−172373(JP,A) 特開 平7−160597(JP,A) 特開 平9−297713(JP,A) 特開 平6−175917(JP,A) 特開 平11−96779(JP,A) 特開 昭59−58699(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 3/06 - 3/08 G06F 12/00 - 12/06 G06F 12/16 G11C 16/02 Continuation of front page (56) Reference JP-A-8-272654 (JP, A) JP-A-6-322795 (JP, A) JP-A-6-250798 (JP, A) JP-A-7-200418 (JP , A) JP 8-172373 (JP, A) JP 7-160597 (JP, A) JP 9-297713 (JP, A) JP 6-175917 (JP, A) JP 11-96779 (JP, A) JP 59-58699 (JP, A) (58) Fields investigated (Int.Cl. 7 , DB name) G06F 3/06-3/08 G06F 12/00-12 / 06 G06F 12/16 G11C 16/02

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 ブロック単位で記憶内容を消去できるフ
ラッシュ型メモリが第1,第2,第3のブロックを含ん
でおり、 第1のブロックは、そのブロックの管理情報を記憶する
ヘッダ領域と、ブロック単位に分割されたデータファイ
ルを格納する記憶領域とを備えており、 第3のブロックは、実行プログラムファイルが格納され
たブロックの管理情報を記憶するヘッダ領域と、ブロッ
クごとに分割された実行プログラムファイルを格納する
記憶領域を備えており、 第2のブロックは、第3のブロックに隣接し、実行プロ
グラムファイルが、第3のブロックの実行プログラムフ
ァイルを格納する記憶領域の容量を越えた場合、第3の
ブロックに実行プログラムファイルが分割され格納され
た続きのデータを格納する記憶領域を備えていることを
特徴とするフラッシュ型メモリ。
1. A flash type memory capable of erasing stored contents in block units includes first, second and third blocks, and the first block includes a header area for storing management information of the block, The third block has a storage area for storing a data file divided into blocks, and the third block has a header area for storing management information of a block in which an execution program file is stored and an execution divided for each block. When the second block is adjacent to the third block and the execution program file exceeds the capacity of the storage area for storing the execution program file of the third block, the second block is adjacent to the third block. , The third block is provided with a storage area for storing subsequent data in which the execution program file is divided and stored. Characteristic flash type memory.
【請求項2】 隣接する複数の前記第2及び第3のブロ
ックに対して実行プログラムファイルを割り当てるとと
もに、それら実行プログラムファイルが割り当てられた
ブロックの管理情報を前記第3のブロックに格納する手
段を備えたことを特徴とする請求項1記載のフラッシュ
型メモリの管理装置。
2. A means for allocating an execution program file to a plurality of adjacent second and third blocks, and storing management information of blocks to which the execution program files are allocated in the third block. The flash memory management apparatus according to claim 1, further comprising:
JP31761297A 1997-11-04 1997-11-04 Flash type memory and its management device Expired - Fee Related JP3503448B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP31761297A JP3503448B2 (en) 1997-11-04 1997-11-04 Flash type memory and its management device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP31761297A JP3503448B2 (en) 1997-11-04 1997-11-04 Flash type memory and its management device

Publications (2)

Publication Number Publication Date
JPH11143764A JPH11143764A (en) 1999-05-28
JP3503448B2 true JP3503448B2 (en) 2004-03-08

Family

ID=18090140

Family Applications (1)

Application Number Title Priority Date Filing Date
JP31761297A Expired - Fee Related JP3503448B2 (en) 1997-11-04 1997-11-04 Flash type memory and its management device

Country Status (1)

Country Link
JP (1) JP3503448B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7533214B2 (en) * 2002-02-27 2009-05-12 Microsoft Corporation Open architecture flash driver
JP4683218B2 (en) * 2004-01-27 2011-05-18 日本電気株式会社 Fast restart method, information processing apparatus, and program
JP2008123473A (en) 2006-10-20 2008-05-29 Toshiba Corp Memory device and its control method
JP5341584B2 (en) 2009-03-17 2013-11-13 株式会社東芝 Controller and memory system
JP5581256B2 (en) 2011-03-28 2014-08-27 株式会社東芝 Memory system, controller, and control method of memory system
JP6219560B2 (en) * 2012-09-21 2017-10-25 株式会社フィックスターズ Information processing apparatus, information processing method, and program
KR102050732B1 (en) 2012-09-28 2019-12-02 삼성전자 주식회사 Computing system and method for managing data in the system
JP6371090B2 (en) * 2014-03-26 2018-08-08 トッパン・フォームズ株式会社 Document file management system and document file management method

Also Published As

Publication number Publication date
JPH11143764A (en) 1999-05-28

Similar Documents

Publication Publication Date Title
JP5336060B2 (en) Nonvolatile memory device and method of operating the same
KR100453053B1 (en) Flash memory file system
US7610434B2 (en) File recording apparatus
USRE46404E1 (en) Flash memory management method
US5682497A (en) Managing file structures for a flash memory file system in a computer
US6571326B2 (en) Space allocation for data in a nonvolatile memory
US5860082A (en) Method and apparatus for allocating storage in a flash memory
US5809558A (en) Method and data storage system for storing data in blocks without file reallocation before erasure
US7340581B2 (en) Method of writing data to non-volatile memory
US5530827A (en) Data management system for programming-limited type semiconductor memory and IC memory card employing data save/erase process with flag assignment
JP3503448B2 (en) Flash type memory and its management device
JP3555456B2 (en) Flash memory management device
JP2614357B2 (en) Bulk erase type E (2) PROM pre-programming method
JP2001101071A (en) Data storage device using flash type memory and data managing method for the same memory
JPH11272537A (en) Flash type memory and management device for the same
JPH1196779A (en) Flash type memory, its controlling method, storage device, and computer system
US8200611B2 (en) File system and data management method
JPH0764831A (en) Data storage device
JPH05258585A (en) Filing device
JP2009211152A (en) Information processing apparatus, memory system, and control method therefor
JP3904182B2 (en) Data management system and data management method using the same
EP3948550A1 (en) An apparatus, method and computer program for managing memory page updates within non-volatile memory
JP2000057049A (en) Flash memory filing system
JP2010026794A (en) Memory control device and method, and computer program
JP2004355559A (en) Data rewrite method for nonvolatile memory

Legal Events

Date Code Title Description
A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20031201

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

Free format text: PAYMENT UNTIL: 20071219

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20081219

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20091219

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20101219

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20111219

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20111219

Year of fee payment: 8

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20111219

Year of fee payment: 8

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20121219

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20121219

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20131219

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees