JP2001147864A - Data management device for flash memory - Google Patents

Data management device for flash memory

Info

Publication number
JP2001147864A
JP2001147864A JP32998699A JP32998699A JP2001147864A JP 2001147864 A JP2001147864 A JP 2001147864A JP 32998699 A JP32998699 A JP 32998699A JP 32998699 A JP32998699 A JP 32998699A JP 2001147864 A JP2001147864 A JP 2001147864A
Authority
JP
Japan
Prior art keywords
data
packet
state
area
storage area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP32998699A
Other languages
Japanese (ja)
Other versions
JP3858538B2 (en
JP2001147864A5 (en
Inventor
Tsunemori Asahi
常盛 旭
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP32998699A priority Critical patent/JP3858538B2/en
Publication of JP2001147864A publication Critical patent/JP2001147864A/en
Publication of JP2001147864A5 publication Critical patent/JP2001147864A5/ja
Application granted granted Critical
Publication of JP3858538B2 publication Critical patent/JP3858538B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide the data managing device of a flash memory suitable for preventing the deterioration of the life of a flash memory, and for quickly realizing the rewriting of data, and for realizing the update of the data with high reliability. SOLUTION: At the time of updating packet data, a new packet for storing data to be updated is generated in a packet part 72, and at the time of starting data writing, the state information of the packet is set in a third state, and the state information of a new packet is set in a first state, and the data to be updated are written in a new packet data part 82, and at the time of completing the data writing, the state information of the new packet is set in a second state, and the state information of the packet is set in a fourth state. Then, the packet whose state information is the second state or the third state is decided as a valid packet, and the packet whose state information is the first state or the fourth state is decided as an invalid packet.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、フラッシュメモリ
の記憶領域にパケット単位でデータを記憶する装置に係
り、特に、フラッシュメモリのデータ初期化単位からな
る記憶領域に可変長のパケット単位でデータを記憶する
装置に関する。さらに詳しくは、フラッシュメモリの初
期化回数を少なくして、フラッシュメモリの寿命の低下
を防止するとともにデータの書換を高速に行い、しかも
データの更新を高い信頼性をもって行うのに好適なフラ
ッシュメモリのデータ管理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an apparatus for storing data in a storage area of a flash memory in units of packets, and more particularly to an apparatus for storing data in a storage area of a flash memory in units of data initialization in units of variable length packets. Related to a storage device. More specifically, a flash memory that is suitable for reducing the number of times of initialization of the flash memory, preventing a reduction in the life of the flash memory, performing high-speed data rewriting, and performing data updating with high reliability is provided. It relates to a data management device.

【0002】[0002]

【従来の技術】従来、フラッシュメモリの記憶領域にパ
ケット単位でデータを記憶する装置としては、例えば、
特開平5-233426号公報に開示されたフラッシュメモリの
使用方法がある。これは、フラッシュメモリを複数のセ
クタで区切り、各セクタに論理アドレス部分と、消去管
理表示部分と、データ部分とを設け、論理アドレスによ
りセクタを検索する。そして更新するとき、セクタの消
去管理表示部分の消去可能フラグをオンにし、空きセク
タにその論理アドレスを付加し、更新データを書き込
む。
2. Description of the Related Art Conventionally, as an apparatus for storing data in a storage area of a flash memory in packet units, for example,
There is a method of using a flash memory disclosed in Japanese Patent Application Laid-Open No. Hei 5-233426. In this method, a flash memory is divided into a plurality of sectors, a logical address portion, an erase management display portion, and a data portion are provided in each sector, and a sector is searched by a logical address. Then, when updating, the erasure enable flag in the erasure management display portion of the sector is turned on, the logical address is added to the empty sector, and the update data is written.

【0003】これにより、フラッシュメモリ上でのデー
タの消去は、消去対象となるデータが格納されているセ
クタの消去管理部にデータが無効であることを示す無効
フラグを設定することにより行われるので、フラッシュ
メモリの初期化回数が少なくなり、フラッシュメモリの
寿命の低下を防止するとともにデータの書換が高速に行
える。
[0003] As a result, data is erased from the flash memory by setting an invalid flag indicating that the data is invalid in the erase manager of the sector storing the data to be erased. In addition, the number of times of initialization of the flash memory is reduced, and the life of the flash memory is prevented from being shortened, and data can be rewritten at high speed.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、上記従
来のフラッシュメモリの使用方法にあっては、セクタの
データを更新する場合は、更新すべきデータを新たなセ
クタに書き込み、更新前のセクタの消去管理部に無効フ
ラグを設定するため、例えば、停電やシステムのハング
アップまたはリセットスイッチの誤投入といった事態が
データの更新中に生じた場合は、更新前のセクタと新た
なセクタの消去管理部にデータが有効であることを示す
有効フラグがともに設定されたまま、データの更新が中
断されてしまい、どちらが正しいデータであるかを識別
することが困難であるという問題があった。
However, in the conventional method of using a flash memory, when updating data in a sector, the data to be updated is written into a new sector, and the sector before updating is erased. In order to set an invalid flag in the management unit, for example, if a power failure, a system hang or a reset switch is accidentally turned on during data update, the erase management unit of the sector before update and the new sector Updating of the data is interrupted with the valid flag indicating that the data is valid, and there is a problem that it is difficult to identify which is the correct data.

【0005】こうした問題に対処するためには、更新前
のセクタが属するブロックを一旦初期化し、その上で、
更新すべきデータを新たなセクタに書き込むということ
をしなければならず、結局、フラッシュメモリの初期化
回数を少なくすることができない。なお、この場合は、
初期化したブロックのうち更新前のセクタ以外のもの
を、元の状態に書き換え直す必要がある。
[0005] In order to cope with such a problem, a block to which a sector before update belongs is once initialized, and then,
The data to be updated must be written to a new sector, and as a result, the number of times of initialization of the flash memory cannot be reduced. In this case,
It is necessary to rewrite the initialized block other than the sector before the update to the original state.

【0006】そこで、本発明は、このような従来の技術
の有する未解決の課題に着目してなされたものであっ
て、フラッシュメモリの初期化回数を少なくして、フラ
ッシュメモリの寿命の低下を防止するとともにデータの
書換を高速に行い、しかもデータの更新を高い信頼性を
もって行うのに好適なフラッシュメモリのデータ管理装
置を提供することを目的としている。
Accordingly, the present invention has been made in view of such an unsolved problem of the conventional technology, and has been made to reduce the number of times of initialization of the flash memory to reduce the life of the flash memory. It is an object of the present invention to provide a flash memory data management device suitable for preventing and rewriting data at a high speed and updating data with high reliability.

【0007】[0007]

【課題を解決するための手段】上記目的を達成するため
に、本発明に係る請求項1記載のフラッシュメモリのデ
ータ管理装置は、フラッシュメモリの記憶領域にパケッ
ト単位でデータを記憶する装置であって、前記パケット
は、当該パケットの管理に関する管理データを格納する
ための管理部と、記憶すべきデータを格納するためのデ
ータ部とからなり、前記管理部には、前記管理データと
して、前記パケットの異なる2つの状態を示す状態情報
が格納可能となっており、データを記憶するときは、記
憶すべきデータを格納するためのパケットを前記記憶領
域に生成し、データ書込開始時に前記パケットの状態情
報をデータの新規書込中であることを示す第1の状態に
設定し、前記パケットのデータ部に前記記憶すべきデー
タを書き込み、データ書込完了時に前記パケットの状態
情報をデータの新規書込が完了したことを示す第2の状
態に設定し、前記状態情報が前記第2の状態であるパケ
ットを有効なパケットであると判定し、前記状態情報が
前記第1の状態であるパケットを無効なパケットである
と判定するようになっている。
According to a first aspect of the present invention, there is provided a flash memory data management device for storing data in a storage area of a flash memory in packet units. The packet includes a management unit for storing management data relating to management of the packet, and a data unit for storing data to be stored. The management unit includes the packet as the management data. State information indicating two different states can be stored. When storing data, a packet for storing data to be stored is generated in the storage area, and when the data writing is started, the packet is stored in the storage area. The state information is set to a first state indicating that new data is being written, the data to be stored is written in the data portion of the packet, and the data is written. When the data writing is completed, the status information of the packet is set to a second status indicating that the new writing of data is completed, and the packet whose status information is the second status is determined to be a valid packet. Then, the packet whose status information is in the first status is determined to be an invalid packet.

【0008】このような構成であれば、データを記憶す
るときは、まず、記憶すべきデータを格納するためのパ
ケットが記憶領域に生成され、データ書込開始時には、
パケットの状態情報が第1の状態に設定される。そし
て、パケットのデータ部に記憶すべきデータが書き込ま
れ、データ書込完了時には、パケットの状態情報が第2
の状態に設定される。
With such a configuration, when storing data, first, a packet for storing the data to be stored is generated in the storage area.
The state information of the packet is set to the first state. Then, data to be stored is written in the data portion of the packet, and when the data writing is completed, the status information of the packet is stored in the second portion.
Is set to the state.

【0009】例えば、何らかの原因によりデータの書込
が中断された場合は、状態情報が第2の状態であるパケ
ットが有効なパケットであると判定され、状態情報が第
1の状態であるパケットが無効なパケットであると判定
される。
For example, when data writing is interrupted for some reason, a packet whose status information is in the second state is determined to be a valid packet, and a packet whose status information is in the first state is determined. It is determined that the packet is invalid.

【0010】したがって、データの書込が完了するまで
は、有効なパケットとして識別されない。例えば、デー
タを更新する場合は、更新すべきデータが新たなパケッ
トに書き込まれるが、新たなパケットはデータの書込が
完了するまでは、有効なパケットして識別されないの
で、データの書込が完了するまでの間に何らかの原因に
よりデータの書込が中断されても、更新前のパケットの
方が正しいデータであると識別される。
Therefore, the data is not identified as a valid packet until data writing is completed. For example, when updating data, the data to be updated is written in a new packet, but the new packet is not identified as a valid packet until the data writing is completed. Even if the data writing is interrupted for some reason until the completion, the packet before the update is identified as the correct data.

【0011】ここで、パケットは、どのようなデータ長
であってもよく、固定長であってもよいし、可変長であ
ってもよい。
Here, the packet may have any data length, may have a fixed length, or may have a variable length.

【0012】さらに、本発明に係る請求項2記載のフラ
ッシュメモリのデータ管理装置は、請求項1記載のフラ
ッシュメモリのデータ管理装置において、前記状態情報
は、前記パケットのさらに異なる2つの状態を示すよう
になっており、前記パケットのデータを更新するとき
は、更新すべきデータを格納するための新たなパケット
を前記記憶領域に生成し、データ書込開始時に前記パケ
ットの状態情報をデータの更新中であることを示す第3
の状態にかつ前記新たなパケットの状態情報を前記第1
の状態に設定し、前記新たなパケットのデータ部に前記
更新すべきデータを書き込み、データ書込完了時に前記
新たなパケットの状態情報を前記第2の状態にかつ前記
パケットの状態情報をデータの更新が完了したことを示
す第4の状態に設定し、前記状態情報が前記第2の状態
または前記第3の状態であるパケットを有効なパケット
であると判定し、前記状態情報が前記第1の状態または
前記第4の状態であるパケットを無効なパケットである
と判定するようになっている。
Further, according to a second aspect of the present invention, in the data management apparatus for a flash memory according to the first aspect, the status information indicates two further different states of the packet. When updating the data of the packet, a new packet for storing the data to be updated is generated in the storage area, and the state information of the packet is updated at the start of data writing. The third to indicate that
And the state information of the new packet is stored in the first
And writing the data to be updated in the data portion of the new packet. When the data writing is completed, the state information of the new packet is set to the second state and the state information of the packet is set to the data state. A fourth state indicating that the update has been completed is set, the state information determines that the packet in the second state or the third state is a valid packet, and the state information indicates the first state. Or the packet in the fourth state is determined to be an invalid packet.

【0013】このような構成であれば、パケットのデー
タを更新するときは、まず、更新すべきデータを格納す
るための新たなパケットが記憶領域に生成され、データ
書込開始時には、更新前のパケットの状態情報が第3の
状態にかつ新たなパケットの状態情報が第1の状態に設
定される。そして、新たなパケットのデータ部に更新す
べきデータが書き込まれ、データ書込完了時には、新た
なパケットの状態情報が第2の状態にかつ更新前のパケ
ットの状態情報が第4の状態に設定される。
With this configuration, when updating the data of a packet, a new packet for storing the data to be updated is first generated in the storage area. The state information of the packet is set to the third state, and the state information of the new packet is set to the first state. Then, the data to be updated is written to the data portion of the new packet, and when the data writing is completed, the status information of the new packet is set to the second status and the status information of the packet before the update is set to the fourth status. Is done.

【0014】例えば、何らかの原因によりデータの更新
が中断された場合は、状態情報が第2の状態または第3
の状態であるパケットが有効なパケットであると判定さ
れ、状態情報が第1の状態または第4の状態であるパケ
ットが無効なパケットであると判定される。
For example, if the update of data is interrupted for some reason, the status information is changed to the second status or the third status.
Is determined to be a valid packet, and a packet whose status information is the first state or the fourth state is determined to be an invalid packet.

【0015】したがって、データの更新が完了するまで
は、新たなパケットは、有効なパケットとして識別され
ない。
Therefore, a new packet is not identified as a valid packet until the data update is completed.

【0016】ここで、新たなパケットの状態情報を第2
の状態にかつ更新前のパケットの状態情報を第4の状態
に設定する順番は、どちらが先であってもよいが、新た
なパケットの状態情報を第2の状態に設定してから、更
新前のパケットの状態情報を第4の状態に設定する順番
の方が好ましい。これは、新たなパケットの状態情報を
変更した後、更新前のパケットの状態情報を変更する前
に、何らかの原因によりデータの更新が中断された場合
でも、更新前のパケットが有効なパケットであると判定
されるからである。
Here, the state information of the new packet is
The order in which the state information of the packet before the update and the state information of the packet before the update are set to the fourth state may be any order, but the state information of the new packet is set to the second state before the state before the update. It is more preferable to set the state information of the packet in the fourth state. This is a case where the packet before the update is a valid packet even if the data update is interrupted for some reason after the state information of the new packet is changed and before the state information of the packet before the update is changed. Is determined.

【0017】また、パケットの状態情報をデータの更新
中であることを示す第3の状態にかつ新たなパケットの
状態情報を第1の状態に設定する順番は、どちらが先で
あってもよい。
The order in which the state information of the packet is set to the third state indicating that the data is being updated and the state information of the new packet is set to the first state may be any order.

【0018】さらに、本発明に係る請求項3記載のフラ
ッシュメモリのデータ管理装置は、請求項1および2の
いずれかに記載のフラッシュメモリのデータ管理装置に
おいて、前記パケットは、可変長であり、前記管理部に
は、前記管理データとして、当該パケットのデータ長を
示すデータ長情報が格納可能となっており、前記データ
長情報に基づいて、前記パケットの格納位置を特定する
ようになっている。
Furthermore, a flash memory data management device according to a third aspect of the present invention is the flash memory data management device according to any one of the first and second aspects, wherein the packet has a variable length; The management unit can store, as the management data, data length information indicating a data length of the packet, and specify a storage position of the packet based on the data length information. .

【0019】このような構成であれば、記憶領域には、
可変長のパケットが記憶され、パケットの格納位置は、
データ長情報に基づいて特定される。
With such a configuration, the storage area includes:
A variable length packet is stored, and the storage position of the packet is
It is specified based on the data length information.

【0020】さらに、本発明に係る請求項4記載のフラ
ッシュメモリのデータ管理装置は、請求項1ないし3の
いずれかに記載のフラッシュメモリのデータ管理装置に
より前記記憶領域にパケット単位でデータを記憶し、前
記記憶領域とは異なる別の記憶領域を用いて当該記憶領
域を更新する装置であって、前記記憶領域は、当該記憶
領域の管理に関する領域管理データを格納するための領
域管理部と、パケットを格納するためのパケット部とか
らなり、前記領域管理部には、前記領域管理データとし
て、前記記憶領域の異なる4つの状態を示す領域状態情
報が格納可能となっており、前記記憶領域を更新すると
きは、データ書込開始時に前記記憶領域の領域状態情報
をデータの更新中であることを示す第3の状態にかつ前
記別の記憶領域の領域状態情報をデータの新規書込中で
あることを示す第1の状態に設定し、前記記憶領域の有
効なパケットのデータを前記別の記憶領域のパケット部
に書き込み、データ書込完了時に前記別の記憶領域の領
域状態情報をデータの新規書込が完了したことを示す第
2の状態にかつ前記記憶領域の領域状態情報をデータの
更新が完了したことを示す第4の状態に設定し、前記領
域状態情報が前記第2の状態または前記第3の状態であ
る記憶領域を有効な記憶領域であると判定し、前記領域
状態情報が前記第1の状態または前記第4の状態である
記憶領域を無効な記憶領域であると判定するようになっ
ている。
According to a fourth aspect of the present invention, there is provided a data management apparatus for a flash memory, wherein the data management apparatus for a flash memory according to any one of the first to third aspects stores data in the storage area in packet units. An apparatus for updating the storage area using another storage area different from the storage area, wherein the storage area includes an area management unit for storing area management data related to management of the storage area, A packet section for storing a packet, wherein the area management section can store, as the area management data, area state information indicating four different states of the storage area; When updating, the area status information of the storage area at the start of data writing is set to a third state indicating that data is being updated, and the other storage area is not updated. The area status information is set to a first state indicating that new data is being written, and data of a valid packet in the storage area is written to a packet portion of the another storage area. The area state information of another storage area is set to a second state indicating that new writing of data is completed, and the area state information of the storage area is set to a fourth state indicating that updating of data is completed. Determining that the storage area in which the area state information is the second state or the third state is a valid storage area, and the area state information is the first state or the fourth state. The storage area is determined to be an invalid storage area.

【0021】このような構成であれば、記憶領域にデー
タを書き込む領域がなくなった等の理由により、記憶領
域を更新するときは、データ書込開始時には、更新前の
記憶領域の領域状態情報が第3の状態にかつ更新先とな
る別の記憶領域の領域状態情報が第1の状態に設定され
る。そして、更新前の記憶領域の有効なパケットのデー
タが別の記憶領域のパケット部に書き込まれ、データ書
込完了時には、別の記憶領域の領域状態情報が第2の状
態にかつ更新前の記憶領域の領域状態情報が第4の状態
に設定される。
With this configuration, when updating the storage area due to the lack of an area for writing data in the storage area, the area state information of the storage area before the update is set at the start of data writing. The area state information of another storage area to be updated in the third state is set to the first state. Then, the data of the valid packet in the storage area before the update is written into the packet portion of the other storage area, and when the data writing is completed, the area state information of the other storage area is changed to the second state and the storage state before the update is stored. The area state information of the area is set to the fourth state.

【0022】例えば、何らかの原因により記憶領域の更
新が中断された場合は、状態情報が第2の状態または第
3の状態である記憶領域が有効な記憶領域であると判定
され、状態情報が第1の状態または第4の状態である記
憶領域が無効なパケットであると判定される。
For example, if the update of the storage area is interrupted for some reason, the storage area whose status information is in the second state or the third state is determined to be a valid storage area, and the status information is stored in the second state. It is determined that the storage area in the first state or the fourth state is an invalid packet.

【0023】したがって、記憶領域の更新が完了するま
では、更新先となる別の記憶領域は、有効な記憶領域と
して識別されない。
Therefore, until the storage area is completely updated, another storage area to be updated is not identified as a valid storage area.

【0024】ここで、フラッシュメモリが複数の記憶領
域からなる場合は、更新先となる別の記憶領域は、それ
ら記憶領域のうち記憶領域の更新を同時に行う数だけあ
ればよい。記憶領域の更新を同時に行う数は、システム
の設計内容によるが、一般的には、記憶領域の更新を同
時に複数行わないので、更新先となる別の記憶領域は、
フラッシュメモリの記憶領域のうち一つあれば足りる。
Here, when the flash memory is composed of a plurality of storage areas, another storage area to be updated only needs to be the number of the storage areas at which the storage areas are updated simultaneously. The number of simultaneous updates of the storage area depends on the design of the system, but in general, a plurality of storage areas are not updated at the same time.
One of the storage areas of the flash memory is sufficient.

【0025】また、記憶領域を更新するときは、記憶領
域の有効なパケットのデータを別の記憶領域のパケット
部に書き込むようになっているが、別の記憶領域を有効
に利用する観点からは、記憶領域の有効なパケットのデ
ータを、その配置位置が整順されるように、別の記憶領
域のパケット部に書き込むようになっているのが好まし
い。
When updating a storage area, data of a valid packet in the storage area is written into a packet portion of another storage area. However, from the viewpoint of effectively using another storage area. It is preferable that the data of the effective packet in the storage area is written in the packet portion of another storage area so that the arrangement position is ordered.

【0026】ここで、別の記憶領域の領域状態情報を第
2の状態にかつ記憶領域の領域状態情報を第4の状態に
設定する順番は、どちらが先であってもよい。また、記
憶領域の領域状態情報を第3の状態にかつ別の記憶領域
の領域状態情報を第1の状態に設定する順番は、どちら
が先であってもよい。
Here, the order in which the area state information of another storage area is set to the second state and the area state information of the storage area is set to the fourth state may be any order. In addition, the order in which the area state information of the storage area is set to the third state and the area state information of another storage area is set to the first state may be any order.

【0027】さらに、本発明に係る請求項5記載のフラ
ッシュメモリのデータ管理装置は、請求項4記載のフラ
ッシュメモリのデータ管理装置において、前記領域状態
情報が前記第1の状態または前記第4の状態である記憶
領域を前記別の記憶領域として用いるようになってい
る。
According to a fifth aspect of the present invention, in the data management apparatus for a flash memory according to the fourth aspect of the present invention, the area status information is the first status or the fourth status. The storage area in the state is used as the another storage area.

【0028】このような構成であれば、記憶領域の更新
が少なくとも1回行われた後は、領域状態情報が第1の
状態または第4の状態である記憶領域が別の記憶領域と
して用いられる。
With this configuration, after the storage area is updated at least once, the storage area whose area state information is in the first state or the fourth state is used as another storage area. .

【0029】さらに、本発明に係る請求項6記載のフラ
ッシュメモリのデータ管理装置は、請求項4および5の
いずれかに記載のフラッシュメモリのデータ管理装置に
おいて、前記記憶領域の領域状態情報および前記別の記
憶領域の領域状態情報の状態に応じて前記記憶領域また
は前記別の記憶領域に対する処理を割り当てた処理定義
テーブルを参照して、前記記憶領域または前記別の記憶
領域に対する処理を実行するようになっている。
According to a sixth aspect of the present invention, there is provided a data management apparatus for a flash memory according to any one of the fourth and fifth aspects, wherein the area status information of the storage area and A process for the storage area or the another storage area is executed by referring to a processing definition table to which a processing for the storage area or the another storage area is assigned according to a state of the area state information of another storage area. It has become.

【0030】このような構成であれば、処理定義テーブ
ルを参照して、更新前の記憶領域または更新先となる別
の記憶領域に対する処理が実行される。
With such a configuration, the processing for the storage area before the update or another storage area to be the update destination is executed with reference to the processing definition table.

【0031】ここで、処理定義テーブルの内容は、具体
的に次のようになる。更新前の記憶領域の領域状態情報
が第4の状態でありかつ更新先となる別の記憶領域の領
域状態情報が第1の状態であるときは、更新前の記憶領
域の有効なパケットのデータを別の記憶領域のパケット
部に書き込む。更新前の記憶領域の領域状態情報が第4
の状態でありかつ別の記憶領域の領域状態情報が第2の
状態であるときは、更新前の記憶領域を初期化する。な
お、更新前の記憶領域の領域状態情報と別の記憶領域の
領域状態情報とが逆の場合は、記憶領域または別の記憶
領域に対する処理も逆になる。
Here, the contents of the process definition table are specifically as follows. When the area state information of the storage area before the update is in the fourth state and the area state information of another storage area to be updated is in the first state, the data of the valid packet in the storage area before the update Is written to the packet portion of another storage area. The area status information of the storage area before the update is the fourth
In this state, and the area state information of another storage area is the second state, the storage area before updating is initialized. When the area state information of the storage area before the update is opposite to the area state information of another storage area, the processing for the storage area or another storage area is also reversed.

【0032】また、領域状態情報は、記憶領域の異なる
4つの状態を示すようになっているが、記憶領域のさら
に異なる2つの状態、すなわち、記憶領域が初期化され
ていないことを示す第5の状態、および記憶領域が初期
化されていることを示す第6の状態を示すようにしてお
けば、処理定義テーブルの内容は、具体的に次のように
なる。
Although the area state information indicates four different states of the storage area, the fifth state indicates that the storage area is not initialized, that is, the fifth state indicates that the storage area is not initialized. And the sixth state indicating that the storage area has been initialized, the contents of the process definition table are specifically as follows.

【0033】更新前の記憶領域の領域状態情報が第3の
状態でありかつ更新先となる別の記憶領域の領域状態情
報が第1の状態であるときは、別の記憶領域を初期化す
る。更新前の記憶領域の領域状態情報が第4の状態であ
りかつ別の記憶領域の領域状態情報が第2の状態である
ときは、更新前の記憶領域を初期化する。更新前の記憶
領域の領域状態情報が第3の状態でありかつ別の記憶領
域の領域状態情報が第5の状態であるときは、別の記憶
領域を初期化する。更新前の記憶領域の領域状態情報が
第3の状態でありかつ別の記憶領域の領域状態情報が第
6の状態であるときは、更新前の記憶領域の有効なパケ
ットのデータを別の記憶領域のパケット部に書き込む。
なお、更新前の記憶領域の領域状態情報と別の記憶領域
の領域状態情報とが逆の場合は、記憶領域または別の記
憶領域に対する処理も逆になる。
If the area state information of the storage area before the update is in the third state and the area state information of another storage area to be updated is in the first state, another storage area is initialized. . When the area state information of the storage area before the update is in the fourth state and the area state information of another storage area is in the second state, the storage area before the update is initialized. When the area state information of the storage area before the update is in the third state and the area state information of another storage area is in the fifth state, another storage area is initialized. When the area state information of the storage area before the update is in the third state and the area state information of another storage area is in the sixth state, the valid packet data of the storage area before the update is stored in another storage area. Write to the packet part of the area.
When the area state information of the storage area before the update is opposite to the area state information of another storage area, the processing for the storage area or another storage area is also reversed.

【0034】このような構成であれば、更新前の記憶領
域の初期化中、別の記憶領域の更新中、および別の記憶
領域へのデータ書込中のいずれかに処理が中断されて
も、システムを再起動すると、中断時から行われるべき
処理が実行されるので、記憶領域の更新が適切に行われ
る。したがって、データの更新をさらに高い信頼性をも
って行うことができる。
With such a configuration, even if the processing is interrupted during initialization of the storage area before update, update of another storage area, or writing data to another storage area. When the system is restarted, processing to be performed from the time of interruption is executed, so that the storage area is appropriately updated. Therefore, data can be updated with higher reliability.

【0035】さらに、本発明に係る請求項7記載のフラ
ッシュメモリのデータ管理装置は、請求項1ないし6の
いずれかに記載のフラッシュメモリのデータ管理装置に
おいて、前記記憶領域は、フラッシュメモリのデータ初
期化単位からなる。
According to a seventh aspect of the present invention, there is provided the data management apparatus for a flash memory according to any one of the first to sixth aspects, wherein the storage area is a data storage device for the flash memory. It consists of an initialization unit.

【0036】このような構成であれば、フラッシュメモ
リの記憶領域にパケット単位でデータを記憶・更新する
ときは、データ初期化単位からなる記憶領域内でそれら
が行われる。また、記憶領域を更新するときは、データ
初期化単位からなる記憶領域ごとにそれが行われる。
With this configuration, when data is stored and updated in the storage area of the flash memory in packet units, the data is stored in the storage area composed of data initialization units. When the storage area is updated, the update is performed for each storage area composed of data initialization units.

【0037】[0037]

【発明の実施の形態】以下、本発明の実施の形態を図面
を参照しながら説明する。図1ないし図13は、本発明
に係るフラッシュメモリのデータ管理装置の実施の形態
を示す図である。
Embodiments of the present invention will be described below with reference to the drawings. FIGS. 1 to 13 are diagrams showing an embodiment of a data management device for a flash memory according to the present invention.

【0038】この実施の形態は、本発明に係るフラッシ
ュメモリのデータ管理装置を、図1に示すように、フラ
ッシュメモリであるフラッシュROM52のデータ初期
化単位からなるブロックに、コンピュータ100の設定
に必要なデータ(例えば、IPアドレス、アクセスすべ
きWWW(World Wide Web)サーバのURL(Universa
l Resource Locater))を、可変長のパケット単位で記
憶する場合について適用したものである。
In this embodiment, as shown in FIG. 1, the flash memory data management device according to the present invention is required for setting the computer 100 in a block consisting of a data initialization unit of a flash ROM 52 as a flash memory. Data (for example, IP address, URL of the WWW (World Wide Web) server to be accessed (Universa
l Resource Locater)) is applied to the case where data is stored in units of variable-length packets.

【0039】まず、本発明に係るフラッシュメモリのデ
ータ管理装置を適用するコンピュータの構成を図1を参
照しながら説明する。図1は、コンピュータ100の構
成を示すブロック図である。
First, the configuration of a computer to which the data management device for flash memory according to the present invention is applied will be described with reference to FIG. FIG. 1 is a block diagram showing a configuration of the computer 100.

【0040】コンピュータ100は、図2に示すよう
に、制御プログラムに基づいて演算およびシステム全体
を制御するCPU50と、所定領域にあらかじめCPU
50の制御プログラム等を格納しているフラッシュRO
M52と、フラッシュROM52等から読み出したデー
タやCPU50の演算過程で必要な演算結果を格納する
ためのRAM54と、VRAM55に格納されているデ
ータを画像信号に変換して出力するグラフィックチップ
56と、外部装置に対してデータの入出力を媒介するI
/F58とで構成されており、これらは、データを転送
するための信号線であるバス59で相互にかつデータ授
受可能に接続されている。
As shown in FIG. 2, the computer 100 has a CPU 50 for controlling the operation and the entire system based on the control program, and a CPU in a predetermined area in advance.
Flash RO storing 50 control programs, etc.
An M52, a RAM 54 for storing data read from the flash ROM 52 and the like, and a calculation result required in a calculation process of the CPU 50, a graphic chip 56 for converting data stored in the VRAM 55 into an image signal and outputting the image signal, I that mediates data input / output to / from the device
/ F 58, which are connected to each other and capable of exchanging data via a bus 59 which is a signal line for transferring data.

【0041】I/F58には、外部装置として、ヒュー
マンインターフェースとしてデータの入力が可能でかつ
画像信号に基づいて画面を表示するLCD(Liquid Cry
stalDisplay)からなるタッチパネル60が接続されて
おり、その他、図示しないが、音を出力するスピーカ
と、インターネットに接続するための信号線等が接続さ
れている。
The I / F 58 has, as an external device, an LCD (Liquid Cry) capable of inputting data as a human interface and displaying a screen based on image signals.
A touch panel 60 made of stalDisplay) is connected. In addition, although not shown, a speaker for outputting sound, a signal line for connecting to the Internet, and the like are connected.

【0042】グラフィックチップ56は、VRAM55
に格納されている表示用データを先頭アドレスから所定
周期で順次読み出し、読み出した表示用データを画像信
号に変換してタッチパネル64に出力するようになって
いる。
The graphic chip 56 includes a VRAM 55
Are sequentially read at a predetermined cycle from the head address, and the read display data is converted into an image signal and output to the touch panel 64.

【0043】次に、フラッシュROM52の構成を図2
ないし図8を参照しながら説明する。図2は、ブロック
A,Bのデータ構造を示す図である。
Next, the configuration of the flash ROM 52 is shown in FIG.
This will be described with reference to FIG. FIG. 2 is a diagram showing the data structure of blocks A and B.

【0044】フラッシュROM52は、データ書換可能
な不揮発性の記憶素子からなり、図2に示すように、そ
の記憶領域をデータ初期化単位からなる複数のブロック
に論理的に区分し、それらブロックのうち2つのブロッ
クA,Bが、データの書込を行うためのデータ書込用領
域、およびブロックの更新時に用いるデータ更新用領域
として利用される。なお、フラッシュROM52は、例
えば、初期化状態(初期化されてデータが書き込まれて
いない状態)では記憶領域のデータビットが「1」とな
るものである。
The flash ROM 52 is composed of a data rewritable nonvolatile storage element. As shown in FIG. 2, the storage area is logically divided into a plurality of blocks each composed of a data initialization unit. The two blocks A and B are used as a data write area for writing data and a data update area used when updating a block. In the flash ROM 52, for example, in an initialized state (a state in which data is written after being initialized), the data bit of the storage area is “1”.

【0045】ブロックA,Bは、いずれも、ブロックの
管理に関する領域管理データを格納するための領域管理
部70と、パケットを格納するためのパケット部72と
からなっており、一方がデータ書込用領域となっている
ときは、他方がデータ更新用領域となり、逆に、他方が
データ書込用領域となっているときは、一方がデータ更
新用領域となる。データの書込は、データ書込用領域と
なるブロックに対して行う。これに対し、ブロックの更
新は、データ書込用領域となるブロックのパケット部7
2にデータを書き込むための領域が不足したときに行う
ものであって、データ書込用領域となるブロックのパケ
ット部72の有効なパケットのデータを、その配置位置
が整順されるように、データ更新用領域となるブロック
のパケット部72に書き込むことにより行う。そして、
パケット部72へのデータの書込が完了した時点で、デ
ータ更新用領域となっているブロックをデータ書込用領
域とし、データ書込用領域となっているブロックをデー
タ更新用領域とする。
Each of the blocks A and B comprises an area management section 70 for storing area management data relating to block management, and a packet section 72 for storing packets. When the area is a data update area, the other area is a data update area, and when the other area is a data write area, one area is a data update area. Data writing is performed on a block that is to be a data writing area. On the other hand, the update of the block is performed by the packet unit 7 of the block serving as the data write area.
2 is performed when the area for writing data is insufficient, and the valid packet data of the packet section 72 of the block serving as the data write area is arranged in order such that its arrangement position is ordered. This is performed by writing to the packet section 72 of the block that is to be the data update area. And
When the data writing to the packet section 72 is completed, the block serving as the data update area is set as the data write area, and the block serving as the data write area is set as the data update area.

【0046】領域管理部70は、図3に示すように、ブ
ロックの初期化回数を示す初期化回数情報を格納する領
域70aと、ブロックの異なる5つの状態を示す領域状
態情報1〜5を格納する領域70b〜70fとからなっ
ており、各領域70a〜70fは、フラッシュROM5
2のデータ読出単位(例えば、4バイト(32ビッ
ト))の記憶容量を有している。図3は、領域管理部7
0のデータ構造を示す図である。
As shown in FIG. 3, the area management section 70 stores an area 70a for storing initialization number information indicating the number of block initializations and area state information 1 to 5 indicating five different states of the block. Areas 70b to 70f, and the areas 70a to 70f
It has a storage capacity of two data read units (for example, 4 bytes (32 bits)). FIG. 3 shows the area management unit 7.
It is a figure showing the data structure of 0.

【0047】各領域状態情報1〜5は、図4に示すよう
に構成されている。図4は、領域状態情報の内容を示す
図である。
Each of the area status information 1 to 5 is configured as shown in FIG. FIG. 4 is a diagram showing the contents of the area state information.

【0048】領域状態情報1は、図4の上1段目の項目
に示すように、ブロックが初期化されていること(初期
化完了状態)を示す情報であって、「INIT」という
4バイトの書込情報として領域70bに書き込まれる。
また、領域状態情報2は、図4の上2段目の項目に示す
ように、ブロックへのデータ書込中であること(データ
書込中状態)を示す情報であって、「STUP」という
4バイトの書込情報として領域70cに書き込まれる。
また、領域状態情報3は、図4の上3段目の項目に示す
ように、ブロックへのデータ書込が完了し、さらにブロ
ックのパケット部72にデータの追記が可能であること
(データ書込完了状態)を示す情報であって、「NOR
M」という4バイトの書込情報として領域70dに書き
込まれる。
The area state information 1 is information indicating that the block has been initialized (initialization completed state), as shown in the first column of FIG. Is written in the area 70b.
The area state information 2 is information indicating that data is being written to the block (data writing state), as shown in the second item in the upper part of FIG. 4, and is referred to as “STUP”. The data is written to the area 70c as 4-byte write information.
As shown in the third item in the upper part of FIG. 4, the area state information 3 indicates that data writing to the block has been completed, and that data can be additionally written to the packet portion 72 of the block (data writing). Information indicating the status of “NOR”
M "is written to the area 70d as 4-byte write information.

【0049】領域状態情報4は、図4の上4段目の項目
に示すように、ブロックのデータを更新するため、ブロ
ックからのデータ移動中であること(データ移動中)を
示す情報であって、「MOVE」という4バイトの書込
情報として領域70eに書き込まれる。また、領域状態
情報5は、図4の上5段目の項目に示すように、ブロッ
クからのデータ移動が完了したこと(データ移動完了状
態)を示す情報であって、「MFIN」という4バイト
の書込情報として領域70fに書き込まれる。
The area state information 4 is information indicating that data is being moved from the block (data is being moved) in order to update the data of the block, as shown in the fourth item in the upper part of FIG. Then, it is written into the area 70e as 4-byte write information "MOVE". The area state information 5 is information indicating that data movement from the block has been completed (data movement completed state), as shown in the fifth item in the upper part of FIG. Is written in the area 70f.

【0050】領域状態情報1〜5は、その順序で各領域
70b〜70fに書き込まれるものである。したがっ
て、例えば、領域状態情報3は、領域状態情報1,2が
書き込まれていない状態では、書き込まれないし、領域
状態情報4,5が書き込まれている状態でも、書き込ま
れない。なお、領域状態情報1〜5がいずれも書き込ま
れていない状態、または領域状態情報1〜5がその順序
で書き込まれていない状態は、ブロックが一度も初期化
されたことがないもの(未初期化状態)として定義し、
取り扱う。
The area status information 1 to 5 are written in the respective areas 70b to 70f in that order. Therefore, for example, the area state information 3 is not written when the area state information 1 and 2 are not written, and is not written even when the area state information 4 and 5 are written. A state in which none of the area state information 1 to 5 has been written or a state in which the area state information 1 to 5 has not been written in that order means that the block has never been initialized (uninitialized). State)
handle.

【0051】パケット部72は、フラッシュROM52
のデータ読出単位(例えば、4バイト)の倍数からなる
所定容量の記憶領域を有し、図5に示すように、可変長
の複数のパケットP1〜Pnを格納可能となっており、各
パケットP1〜Pnは、パケットの管理に関する管理デー
タを格納するための管理部80と、記憶すべきデータを
格納するためのデータ部82とからなり、パケット部7
2の先頭アドレスから末尾アドレスに向けて順次生成さ
れていく。図5は、パケット部72のデータ構造を示す
図である。
The packet section 72 includes a flash ROM 52
Has a storage area of a predetermined capacity which is a multiple of a data read unit (for example, 4 bytes), and as shown in FIG. 5, can store a plurality of packets P 1 to P n of variable length. Each of the packets P 1 to P n includes a management unit 80 for storing management data relating to packet management, and a data unit 82 for storing data to be stored.
2 are sequentially generated from the start address to the end address. FIG. 5 is a diagram illustrating a data structure of the packet unit 72.

【0052】管理部80は、図6に示すように、パケッ
トの異なる5つの状態を示す状態情報を格納する領域8
0aと、パケットを識別するためのIDを示すID情報
を格納する領域80bと、パケットが生成された順に付
す連続番号を示す連続番号情報を格納する領域80c
と、データ部82のデータ長を示すデータ長情報を格納
する領域80dとからなり、各領域80a〜80dは、
1バイト(8ビット)の記憶容量を有し、管理部80全
体として、フラッシュROM52のデータ読出単位(例
えば、4バイト(32ビット))の記憶容量を有してい
る。図6は、管理部80のデータ構造を示す図である。
As shown in FIG. 6, the management unit 80 stores an area 8 for storing state information indicating five different states of the packet.
0a, an area 80b for storing ID information indicating an ID for identifying a packet, and an area 80c for storing serial number information indicating a serial number assigned in the order in which the packets were generated.
And an area 80d for storing data length information indicating the data length of the data section 82. Each of the areas 80a to 80d includes
The management section 80 as a whole has a storage capacity of a data read unit (for example, 4 bytes (32 bits)) of the flash ROM 52. FIG. 6 is a diagram illustrating a data structure of the management unit 80.

【0053】状態情報は、上記領域状態情報と異なり、
領域80aに格納される1つのデータによりパケットの
異なる5つの状態を示すものであって、図7に示すよう
に構成されている。図7は、状態情報の内容を示す図で
ある。
The state information is different from the area state information.
It shows five different states of the packet by one data stored in the area 80a, and is configured as shown in FIG. FIG. 7 is a diagram showing the contents of the state information.

【0054】状態情報は、第1の状態として、パケット
へのデータ書込中であること(データ書込中状態)を示
し、この場合、「7FH」という1バイトの書込情報と
して領域80aに書き込まれる。また、第2の状態とし
て、パケットへのデータ書込が完了したこと(データ書
込完了状態)を示し、この場合、第1の状態を示す書込
情報の「1」の最上位ビットを「0」に設定した「3F
H」という1バイトの書込情報として領域80aに書き
込まれる。また、第3の状態として、パケットのデータ
更新中であること(データ更新中状態)を示し、この場
合、第2の状態を示す書込情報の「1」の最上位ビット
を「0」に設定した「1FH」という1バイトの書込情
報として領域80aに書き込まれる。
The state information indicates, as the first state, that data is being written to the packet (data writing state). In this case, the 1-byte write information “7FH” is stored in the area 80a. Written. The second state indicates that data writing to the packet has been completed (data write completed state). In this case, the most significant bit of “1” in the write information indicating the first state is “2”. "3F" set to "0"
"H" is written in the area 80a as 1-byte write information. The third state indicates that the data of the packet is being updated (data updating state). In this case, the most significant bit of “1” of the write information indicating the second state is set to “0”. The data is written to the area 80a as the set 1-byte write information “1FH”.

【0055】状態情報は、第4の状態として、パケット
のデータ更新が完了したこと(データ更新完了状態)を
示し、この場合、第3の状態を示す書込情報の「1」の
最上位ビットを「0」に設定した「0FH」という1バ
イトの書込情報として領域80aに書き込まれる。ま
た、第5の状態として、パケットが未使用であること
(未使用状態)を示し、この場合、「FFH」という1
バイトの書込情報(すなわち、初期化状態のまま)とし
て領域80aに書き込まれる。
The state information indicates, as the fourth state, that the data update of the packet has been completed (data update completed state). In this case, the most significant bit of “1” of the write information indicating the third state Is set to “0” and is written to the area 80a as 1-byte write information of “0FH”. In addition, the fifth state indicates that the packet is unused (unused state). In this case, 1 is referred to as “FFH”.
The data is written to the area 80a as byte write information (that is, in the initialized state).

【0056】状態情報は、第5の状態、第1の状態、第
2の状態、第3の状態および第4の状態の順序で領域8
0aに書き込まれるものである。したがって、例えば、
状態情報が第3の状態であるときは、そのパケットが属
するブロックが初期化されない限り、第1の状態または
第2の状態になることはない。
The state information is stored in the area 8 in the order of the fifth state, the first state, the second state, the third state, and the fourth state.
0a. So, for example,
When the state information is the third state, the state does not change to the first state or the second state unless the block to which the packet belongs is initialized.

【0057】また、フラッシュROM52には、図8に
示すように、ブロックA,Bの領域状態情報の状態に応
じてブロックA,Bに対する処理を割り当てた処理定義
テーブルが格納されている。図8は、処理定義テーブル
のデータ構造を示す図である。
As shown in FIG. 8, the flash ROM 52 stores a process definition table in which processes for the blocks A and B are assigned according to the state of the area state information of the blocks A and B. FIG. 8 is a diagram illustrating a data structure of the process definition table.

【0058】処理定義テーブルは、図8に示すように構
成されている。
The process definition table is configured as shown in FIG.

【0059】ブロックAの状態がデータ移動中でありか
つブロックBの状態が未初期化またはデータ書込中であ
るときは、ブロックBを初期化する。ブロックAの状態
がデータ移動中でありかつブロックBの状態が初期化完
了であるときは、ブロックAの有効なパケットのデータ
をブロックBのパケット部72に書き込むことにより、
ブロックAをブロックBに更新する。ブロックAの状態
がデータ書込中でありかつブロックBの状態が未初期化
若しくは初期化完了であるとき、ブロックAの状態がデ
ータ移動中でありかつブロックBの状態がデータ書込完
了であるとき、またはブロックAの状態がデータ移動完
了でありかつブロックBの状態が未初期化、初期化完
了、データ書込中若しくはデータ書込完了であるとき
は、ブロックAを初期化する。ブロックAの状態がデー
タ書込完了でありかつブロックBの状態が未初期化、初
期化完了若しくはデータ書込中であるときは、ブロック
Aをデータ書込用領域とする。
If the state of the block A is in data movement and the state of the block B is not initialized or data is being written, the block B is initialized. When the state of the block A is moving data and the state of the block B is initialization completed, the data of the valid packet of the block A is written into the packet section 72 of the block B,
Update block A to block B. When the state of the block A is writing data and the state of the block B is uninitialized or the initialization is completed, the state of the block A is data moving and the state of the block B is data writing completed. At this time, or when the state of the block A is data movement completed and the state of the block B is uninitialized, initialization completed, data writing or data writing completed, the block A is initialized. When the state of the block A is data writing completed and the state of the block B is uninitialized, initialization completed, or data writing is being performed, the block A is used as a data writing area.

【0060】また、ブロックBの状態がデータ移動中で
ありかつブロックAの状態が未初期化またはデータ書込
中であるときは、ブロックAを初期化する。ブロックB
の状態がデータ移動中でありかつブロックAの状態が初
期化完了であるときは、ブロックBの有効なパケットの
データをブロックAのパケット部72に書き込むことに
より、ブロックBをブロックAに更新する。ブロックB
の状態がデータ書込中でありかつブロックAの状態が未
初期化若しくは初期化完了であるとき、ブロックBの状
態がデータ移動中でありかつブロックAの状態がデータ
書込完了であるとき、またはブロックBの状態がデータ
移動完了でありかつブロックAの状態が未初期化、初期
化完了、データ書込中若しくはデータ書込完了であると
きは、ブロックBを初期化する。ブロックBの状態がデ
ータ書込完了でありかつブロックAの状態が未初期化、
初期化完了若しくはデータ書込中であるときは、ブロッ
クBをデータ書込用領域とする。
If the state of the block B is data movement and the state of the block A is not initialized or data is being written, the block A is initialized. Block B
Is in a data transfer state and the state of block A is initialization completed, the block B is updated to block A by writing valid packet data of block B into the packet section 72 of block A. . Block B
Is in data writing and the state of block A is uninitialized or initialization completed, when the state of block B is data movement and the state of block A is data writing completed, Alternatively, when the state of the block B is the data movement completion and the state of the block A is uninitialized, initialization completed, data writing or data writing completed, the block B is initialized. The state of block B is data write completed and the state of block A is uninitialized,
When the initialization is completed or data is being written, block B is used as a data writing area.

【0061】また、ブロックAの状態が未初期化若しく
は初期化完了でありかつブロックBの状態が未初期化ま
たは初期化完了であるときは、ブロックA,Bに対する
初期化処理を行う。
When the state of the block A is uninitialized or the initialization is completed and the state of the block B is uninitialized or the initialization is completed, the initialization processing for the blocks A and B is performed.

【0062】一方、図1に戻り、CPU50は、マイク
ロプロセッシングユニットMPU等からなり、フラッシ
ュROM52の所定領域に格納されている所定のプログ
ラムを起動させ、そのプログラムに従って、図9ないし
図13のデータ書込処理、データ読込処理およびブロッ
ク更新処理を並列に実行するようになっている。
Returning to FIG. 1, the CPU 50 comprises a microprocessing unit MPU or the like, activates a predetermined program stored in a predetermined area of the flash ROM 52, and executes the data writing of FIGS. Read processing, data read processing, and block update processing are performed in parallel.

【0063】まず、データ書込処理を図9を参照しなが
ら説明する。図9は、データ書込処理を示すフローチャ
ートである。
First, the data writing process will be described with reference to FIG. FIG. 9 is a flowchart showing the data writing process.

【0064】データ書込処理は、ブロックA,Bに対し
てデータの新規書込または更新をパケット単位で行うと
きに実行され、初期状態ではブロックAをデータ書込用
領域とし、ブロックAに対してデータの書込を行い、そ
れ以降は処理に応じてデータ書込用領域となるブロック
に対してデータの書込を行う処理であって、CPU50
において実行されると、図9に示すように、まず、ステ
ップS100に移行する。
The data write process is executed when new data is written or updated in blocks A and B in units of packets. In the initial state, block A is used as a data write area. After that, the data is written into a block that becomes a data writing area according to the processing.
When executed in, as shown in FIG. 9, the process first proceeds to step S100.

【0065】ステップS100では、フラッシュROM
52に対してデータの書込を行おうとする他の処理(図
9ないし図13のフローチャートに示す処理以外のも
の)からのデータ書込要求が、データの新規書込要求で
あるかパケットのデータの更新要求であるかを判定し、
データの新規書込要求であると判定したとき(Yes)は、
ステップS101に移行して、ブロックの更新が完了し
たか否かを判定し、ブロックの更新が完了したと判定さ
れたとき(Yes)は、ステップS102に移行するが、そ
うでないと判定されたとき(No)は、ブロックの更新が完
了するまでステップS101で待機する。
In step S100, the flash ROM
The data write request from another process (other than the processes shown in the flowcharts of FIGS. 9 to 13) for writing data to the data 52 is a new data write request or the data of the packet. Judge whether it is an update request of
When it is determined that the request is a new data write request (Yes),
The process proceeds to step S101 to determine whether or not the block update has been completed. When it is determined that the block update has been completed (Yes), the process proceeds to step S102, but when it is determined that the block update has not been completed. (No), the process stands by in step S101 until the block update is completed.

【0066】ステップS102では、記憶すべきデータ
を格納するためのパケットを生成するための領域がパケ
ット部72に不足しているか否かを判定し、パケットを
生成するための十分な領域がパケット部72にあると判
定されたとき(No)は、ステップS104に移行する。
In step S102, it is determined whether or not an area for generating a packet for storing data to be stored is insufficient in the packet section 72. If it is determined that it is at 72 (No), the process moves to step S104.

【0067】ステップS104では、記憶すべきデータ
を格納するためのパケットをパケット部72に生成し、
ステップS108に移行する。このステップS104で
は、具体的に、パケット部72にパケットが1つも生成
されていないときは、パケット部72の先頭アドレスか
らパケットを生成し、パケット部72に既にパケットが
生成されているときは、パケット部72の先頭アドレス
から数えて末尾にあるパケットの末尾アドレスの次のア
ドレスからパケットを生成する。また、パケットを生成
するときは、他のパケットに与えられたIDとは異なる
IDを示すID情報、このパケットが生成される順番を
示す連続番号、記憶すべきデータのデータ長を示すデー
タ長情報をそれぞれ管理部80に書き込み、状態情報を
第1の状態に設定する。
In step S104, a packet for storing data to be stored is generated in the packet unit 72,
Move to step S108. In step S104, specifically, when no packet is generated in the packet section 72, a packet is generated from the head address of the packet section 72, and when a packet is already generated in the packet section 72, The packet is generated from the address next to the end address of the packet at the end counted from the start address of the packet section 72. When a packet is generated, ID information indicating an ID different from the ID given to another packet, a serial number indicating the order in which the packet is generated, and data length information indicating the data length of data to be stored Are written into the management unit 80, and the state information is set to the first state.

【0068】ステップS108では、記憶すべきデータ
を、生成したパケットのデータ部82に書き込み、ステ
ップS110に移行して、生成したパケットの状態情報
を第2の状態に設定し、一連の処理を終了する。
In step S108, the data to be stored is written in the data section 82 of the generated packet, and the flow shifts to step S110 to set the state information of the generated packet to the second state, and ends a series of processing. I do.

【0069】一方、ステップS100で、上記他の処理
からのデータ書込要求が、パケットのデータの更新要求
であると判定したとき(No)は、ステップS113に移行
して、ブロックの更新が完了したか否かを判定し、ブロ
ックの更新が完了したと判定されたとき(Yes)は、ステ
ップS114に移行するが、そうでないと判定されたと
き(No)は、ブロックの更新が完了するまでステップS1
13で待機する。
On the other hand, if it is determined in step S100 that the data write request from the above other processing is a request to update the data of the packet (No), the flow shifts to step S113 to complete the update of the block. When it is determined that the update of the block has been completed (Yes), the process proceeds to step S114, but when it is determined that the update has not been completed (No), the process is performed until the update of the block is completed. Step S1
Wait at 13.

【0070】ステップS114では、更新すべきデータ
を格納するためのパケットを生成するための領域がパケ
ット部72に不足しているか否かを判定し、パケットを
生成するための十分な領域がパケット部72にあると判
定されたとき(No)は、ステップS116に移行する。
In step S114, it is determined whether or not an area for generating a packet for storing data to be updated is insufficient in packet section 72, and a sufficient area for generating the packet is determined in the packet section. If it is determined that it is at 72 (No), the process moves to step S116.

【0071】ステップS116では、更新すべきデータ
を格納するための新たなパケットをパケット部72に生
成し、ステップS118に移行する。このステップS1
16では、具体的に、パケットを生成するときは、更新
前のパケットに与えられたIDと同一のIDを示すID
情報、このパケットが生成される順番を示す連続番号、
および更新すべきデータのデータ長を示すデータ長情報
をそれぞれ管理部80に書き込み、状態情報を第1の状
態に設定する。なお、パケットの生成場所については、
上記ステップS104と同様である。
In step S116, a new packet for storing data to be updated is generated in the packet section 72, and the flow advances to step S118. This step S1
16, when the packet is generated, an ID indicating the same ID as the ID given to the packet before the update is used.
Information, a sequential number indicating the order in which this packet is generated,
Then, data length information indicating the data length of the data to be updated is written in the management unit 80, and the state information is set to the first state. Note that the location where the packet is generated
This is the same as step S104 described above.

【0072】ステップS118では、更新前のパケット
の状態情報を第3の状態に設定し、ステップS122に
移行して、更新すべきデータを新たなパケットのデータ
部82に書き込み、ステップS124に移行して、新た
なパケットの状態情報を第2の状態に設定し、ステップ
S126に移行して、更新前のパケットの状態情報を第
4の状態に設定し、一連の処理を終了する。
In step S118, the state information of the packet before update is set to the third state, and the flow shifts to step S122 to write the data to be updated in the data portion 82 of the new packet, and shifts to step S124. Then, the state information of the new packet is set to the second state, and the process proceeds to step S126, where the state information of the packet before update is set to the fourth state, and a series of processing ends.

【0073】一方、ステップS114で、更新すべきデ
ータを格納するためのパケットを生成するための領域が
パケット部72に不足していると判定されたとき(Yes)
は、ステップS132に移行して、ブロックの更新をす
べきブロック更新要求を出力し、ステップS134に移
行して、ブロックの更新が完了したか否かを判定し、ブ
ロックの更新が完了したと判定されたとき(Yes)は、ス
テップS116に移行するが、そうでないと判定された
とき(No)は、ブロックの更新が完了するまでステップS
134で待機する。
On the other hand, when it is determined in step S114 that an area for generating a packet for storing data to be updated is insufficient in packet section 72 (Yes).
Shifts to step S132, outputs a block update request for updating the block, shifts to step S134, determines whether the block update is completed, and determines that the block update is completed. If (Yes), the process proceeds to step S116. If not (No), the process proceeds to step S116 until the block update is completed.
Wait at 134.

【0074】一方、ステップS102で、記憶すべきデ
ータを格納するためのパケットを生成するための領域が
パケット部72に不足していると判定されたとき(Yes)
は、ステップS128に移行して、ブロックの更新をす
べきブロック更新要求を出力し、ステップS130に移
行して、ブロックの更新が完了したか否かを判定し、ブ
ロックの更新が完了したと判定されたとき(Yes)は、ス
テップS104に移行するが、そうでないと判定された
とき(No)は、ブロックの更新が完了するまでステップS
130で待機する。
On the other hand, when it is determined in step S102 that the area for generating the packet for storing the data to be stored is insufficient in the packet section 72 (Yes).
Shifts to step S128, outputs a block update request to update the block, shifts to step S130, determines whether the block update is completed, and determines that the block update is completed. If the update is performed (Yes), the process proceeds to step S104. If not (No), the process proceeds to step S104 until the block update is completed.
Wait at 130.

【0075】次に、データ読込処理を図10を参照しな
がら説明する。図10は、データ読込処理を示すフロー
チャートである。
Next, the data reading process will be described with reference to FIG. FIG. 10 is a flowchart showing the data reading process.

【0076】データ読込処理は、ブロックA,Bに対し
てデータの読込をパケット単位で行うときに実行される
処理であって、CPU50において実行されると、図1
0に示すように、まず、ステップS200に移行する。
The data reading process is a process executed when data is read from the blocks A and B in packet units.
As shown by 0, the process first proceeds to step S200.

【0077】ステップS200では、パケットの管理部
80からデータ長情報を取得し、ステップS202に移
行して、取得したデータ長情報に基づいて、フラッシュ
ROM52に対してデータの読込を行おうとする他の処
理(図9ないし図13のフローチャートに示す処理以外
のもの)から与えられたID情報と一致するID情報を
有するパケットの格納位置を特定し、ステップS204
に移行する。
In step S200, data length information is obtained from the packet management unit 80, and the flow advances to step S202 to execute another data read operation to the flash ROM 52 based on the obtained data length information. The storage position of the packet having the ID information matching the ID information given from the processing (other than the processing shown in the flowcharts of FIGS. 9 to 13) is specified, and step S204 is performed.
Move to

【0078】ステップS204では、格納位置を特定し
たパケットが有効であるか否かを判定し、パケットが有
効であると判定されたとき(Yes)は、ステップS206
に移行する。このステップS204では、パケットの有
効・無効を次のように判定する。パケットの状態情報が
第2の状態または第3の状態であるときは、そのパケッ
トが有効であると判定し、パケットの状態情報が第1の
状態または第4の状態であるときは、そのパケットが無
効であると判定する。
In step S204, it is determined whether or not the packet whose storage position is specified is valid. If it is determined that the packet is valid (Yes), step S206 is performed.
Move to In this step S204, the validity / invalidity of the packet is determined as follows. When the state information of the packet is the second state or the third state, it is determined that the packet is valid. When the state information of the packet is the first state or the fourth state, the packet is determined to be valid. Is determined to be invalid.

【0079】ステップS206では、格納位置を特定し
たパケットのデータ部82からデータを読み出し、ステ
ップS208に移行して、格納位置を特定したパケット
がパケット部72の先頭アドレスから数えて末尾のもの
であるか否かを判定し、パケットが末尾のものではない
と判定されたとき(No)は、ステップS200に移行する
が、そうでないと判定されたとき(Yes)は、一連の処理
を終了する。
In step S206, data is read from the data portion 82 of the packet whose storage position has been specified, and the process proceeds to step S208, where the packet whose storage position has been specified is the last packet counted from the start address of the packet portion 72. If it is determined that the packet is not the last one (No), the process proceeds to step S200, but if not (Yes), a series of processes is terminated.

【0080】一方、ステップS204で、格納位置を特
定したパケットが無効であると判定されたとき(No)は、
ステップS208に移行する。
On the other hand, if it is determined in step S204 that the packet whose storage position is specified is invalid (No),
Move to step S208.

【0081】次に、ブロック更新処理を図11を参照し
ながら説明する。図11は、ブロック更新処理を示すフ
ローチャートである。
Next, the block update processing will be described with reference to FIG. FIG. 11 is a flowchart showing the block update processing.

【0082】ブロック更新処理は、上記ステップS12
8で出力されるブロック更新要求を受けてブロックA,
Bを更新する処理であって、CPU50において実行さ
れると、図11に示すように、まず、ステップS300
に移行する。
The block update processing is performed in step S12
In response to the block update request output in step 8, block A,
B is a process for updating B, and when executed by the CPU 50, first, as shown in FIG.
Move to

【0083】ステップS300では、図8に示す処理定
義テーブルを参照して、ブロックA,Bに対する処理を
実行し、ステップS302に移行して、上記ステップS
128によりブロック更新要求があるか否かを判定し、
ブロック更新要求があると判定されたとき(Yes)は、ス
テップS304に移行する。
In step S300, the processing for blocks A and B is executed with reference to the processing definition table shown in FIG.
128 to determine whether there is a block update request,
When it is determined that there is a block update request (Yes), the process proceeds to step S304.

【0084】ステップS304では、ブロックAが有効
であるか否かを判定し、ブロックAが有効であると判定
されたとき(Yes)は、ステップS306に移行する。こ
のステップS304では、ブロックの有効・無効を次の
ように判定する。ブロックの領域管理部70に領域状態
情報3,4が格納されているときは、そのブロックが有
効であると判定し、ブロックの領域管理部70に領域状
態情報1,2,5が格納されているとき、またはブロッ
クの状態が未初期化であるときは、そのブロックが無効
であると判定する。
In step S304, it is determined whether or not block A is valid. If it is determined that block A is valid (Yes), the process proceeds to step S306. In this step S304, the validity / invalidity of the block is determined as follows. When the area status information 3 and 4 are stored in the area management unit 70 of the block, it is determined that the block is valid, and the area status information 1, 2, and 5 is stored in the area management unit 70 of the block. When the block is present or when the state of the block is not initialized, it is determined that the block is invalid.

【0085】ステップS306では、ブロックAの領域
管理部70に領域状態情報4を書き込み、ステップS3
00に移行する。
In the step S306, the area status information 4 is written in the area management section 70 of the block A, and in the step S3
Move to 00.

【0086】一方、ステップS304で、ブロックAが
無効であると判定されたとき(No)(この場合、ブロック
Bが有効であるはずなので、すなわちブロックBが有効
であると判定されたとき)は、ステップS308に移行
して、ブロックBの領域管理部70に領域状態情報4を
書き込み、ステップS300に移行する。
On the other hand, when it is determined in step S304 that block A is invalid (No) (in this case, since block B should be valid, that is, when block B is determined to be valid), Then, the process shifts to step S308 to write the area state information 4 to the area management unit 70 of the block B, and shifts to step S300.

【0087】一方、ステップS302で、上記ステップ
S128によりブロック更新要求がないと判定されたと
き(No)は、ステップS300に移行する。
On the other hand, when it is determined in step S302 that there is no block update request in step S128 (No), the process proceeds to step S300.

【0088】次に、上記ステップS300の処理定義テ
ーブルに基づく処理を図12および図13を参照しなが
ら説明する。図12および図13は、ステップS300
の処理定義テーブルに基づく処理を示すフローチャート
である。
Next, the processing based on the processing definition table in step S300 will be described with reference to FIGS. FIG. 12 and FIG.
9 is a flowchart showing processing based on the processing definition table.

【0089】ステップS300の処理定義テーブルに基
づく処理は、上記ステップS300において実行される
と、図12に示すように、まず、ステップS400に移
行する。
When the process based on the process definition table in step S300 is executed in step S300, the process first proceeds to step S400 as shown in FIG.

【0090】ステップS400では、ブロックA,Bの
領域状態情報を取得し、ステップS402に移行して、
図8に示す処理定義テーブルを参照して、取得した領域
状態情報からブロックA,Bに対する処理を選択する。
In step S400, the area state information of blocks A and B is obtained, and the flow proceeds to step S402.
Referring to the processing definition table shown in FIG. 8, the processing for blocks A and B is selected from the acquired area state information.

【0091】ステップS402の選択の結果、ブロック
Aを初期化する処理が選択されたとき()は、ステップ
S404に移行して、ブロックAを初期化し、ステップ
S406に移行して、ブロックAの初期化回数を「1」
加算してブロックAの領域管理部70にその初期化回数
情報を書き込み、ステップS408に移行して、ブロッ
クAの領域管理部70に領域状態情報1を書き込み、一
連の処理を終了する。
As a result of the selection in step S402, when the processing for initializing the block A is selected (), the process proceeds to step S404 to initialize the block A, and then proceeds to step S406 to initialize the block A. "1"
The addition is performed and the initialization number information is written to the area management unit 70 of the block A, and the process proceeds to step S408, where the area state information 1 is written to the area management unit 70 of the block A, and a series of processing is ended.

【0092】一方、ステップS402の選択の結果、ブ
ロックBを初期化する処理が選択されたとき()は、ス
テップS410に移行して、ブロックBを初期化し、ス
テップS412に移行して、ブロックBの初期化回数を
「1」加算してブロックBの領域管理部70にその初期
化回数情報を書き込み、ステップS414に移行して、
ブロックBの領域管理部70に領域状態情報1を書き込
み、一連の処理を終了する。
On the other hand, when the process of initializing the block B is selected as a result of the selection in the step S402 (), the process shifts to the step S410 to initialize the block B, shifts to the step S412, and shifts to the step S412. Is added to the initialization number of the block B, and the initialization number information is written to the area management unit 70 of the block B, and the process proceeds to step S414.
The area state information 1 is written in the area management unit 70 of the block B, and a series of processing ends.

【0093】一方、ステップS402の選択の結果、ブ
ロックBをブロックAに更新する処理が選択されたとき
()は、ステップS416に移行して、ブロックAの領
域管理部70に領域状態情報2を書き込み、ステップS
418に移行して、ブロックBの有効なパケットのデー
タを、その格納位置が整順されるように、ブロックAの
パケット部72に書き込み、ステップS420に移行し
て、ブロックAの領域管理部70に領域状態情報3を書
き込み、ステップS422に移行して、ブロックBの領
域管理部70に領域状態情報5を書き込み、一連の処理
を終了する。
On the other hand, when the process of updating block B to block A is selected as a result of the selection in step S402
() Moves to step S416, writes the area state information 2 to the area management unit 70 of block A, and executes step S416.
The process proceeds to 418, where the data of the valid packet of block B is written to the packet section 72 of block A so that its storage position is ordered, and the procedure proceeds to step S420, where the area management section 70 of block A is written. Is written in the area management unit 70 of the block B, and the series of processes is completed.

【0094】一方、ステップS402の選択の結果、ブ
ロックAをブロックBに更新する処理が選択されたとき
()は、ステップS424に移行して、ブロックBの領
域管理部70に領域状態情報2を書き込み、ステップS
426に移行して、ブロックAの有効なパケットのデー
タを、その格納位置が整順されるように、ブロックBの
パケット部72に書き込み、ステップS428に移行し
て、ブロックBの領域管理部70に領域状態情報3を書
き込み、ステップS430に移行して、ブロックAの領
域管理部70に領域状態情報5を書き込み、一連の処理
を終了する。
On the other hand, when the process of updating block A to block B is selected as a result of the selection in step S402
() Moves to step S424, writes the area state information 2 to the area management unit 70 of block B, and proceeds to step S424.
The flow shifts to 426, where the valid packet data of block A is written to the packet section 72 of block B such that the storage positions are ordered, and the flow shifts to step S428, where the area management section 70 of block B is written. Is written to the area management unit 70 of the block A, and the series of processes is completed.

【0095】一方、ステップS402の選択の結果、ブ
ロックAをデータ書込用領域とする処理が選択されたと
き()は、ステップS432に移行して、ブロックAを
データ書込領域とし、ステップS433に移行して、ブ
ロック更新要求を解除し、一連の処理を終了する。
On the other hand, as a result of the selection in step S402, if the process of using block A as the data write area is selected (), the flow shifts to step S432 to set block A as the data write area, and proceeds to step S433. Then, the block update request is released, and a series of processing ends.

【0096】一方、ステップS402の選択の結果、ブ
ロックBをデータ書込用領域とする処理が選択されたと
き()は、ステップS434に移行して、ブロックBを
データ書込領域とし、ステップS435に移行して、ブ
ロック更新要求を解除し、一連の処理を終了する。
On the other hand, as a result of the selection in step S402, when the process of using the block B as the data write area is selected (), the flow shifts to step S434, where the block B is set as the data write area, and in step S435. Then, the block update request is released, and a series of processing ends.

【0097】一方、ステップS402の選択の結果、ブ
ロックA,Bに対する初期化処理を行う処理が選択され
たとき()は、ステップS436に移行して、ブロック
A,Bを初期化し、ステップS438に移行して、ブロ
ックAの領域管理部70に領域状態情報1を書き込み、
一連の処理を終了する。
On the other hand, as a result of the selection in step S402, when the processing for performing the initialization processing on the blocks A and B is selected (), the flow shifts to step S436 to initialize the blocks A and B, and then proceeds to step S438. Then, the area state information 1 is written to the area management unit 70 of the block A,
A series of processing ends.

【0098】一方、ステップS402の選択の結果、上
記いずれの処理も選択されないとき(×)は、一連の処理
を終了する。
On the other hand, if none of the above processes is selected (×) as a result of the selection in step S402, a series of processes is terminated.

【0099】次に、上記実施の形態の動作を図面を参照
しながら説明する。
Next, the operation of the above embodiment will be described with reference to the drawings.

【0100】まず、ブロックA,Bに対してデータの新
規書込をパケット単位で行う場合を説明する。
First, a case where new writing of data to blocks A and B is performed in packet units will be described.

【0101】初期状態では、ブロックAをデータ書込用
領域とし、ブロックAに対してデータの書込が行われ
る。フラッシュROM52に対してデータの書込を行お
うとする他の処理からデータ新規書込要求を受けると、
データ書込用領域となるブロックAに対してデータの新
規書込が開始される。このとき、データ新規書込要求と
併せて、記憶すべきデータおよびID情報が与えられ
る。
In the initial state, block A is used as a data write area, and data is written to block A. When a new data write request is received from another process that attempts to write data to the flash ROM 52,
New writing of data to block A, which is a data writing area, is started. At this time, data to be stored and ID information are given together with the new data write request.

【0102】データの新規書込は、次のように行われ
る。CPU50により、ステップS100〜ステップS
110を経て、記憶すべきデータを格納するためのパケ
ットがブロックAのパケット部72に生成される。この
とき、取得されたID情報、このパケットが生成される
順番を示す連続番号、および記憶すべきデータのデータ
長を示すデータ長情報がそれぞれ管理部80に書き込ま
れ、状態情報が第1の状態(データ書込中)に設定され
る。そして、記憶すべきデータが、生成されたパケット
のデータ部82に書き込まれ、生成されたパケットの状
態情報が第2の状態(データ書込完了)に設定される。
The new writing of data is performed as follows. Steps S100 to S by the CPU 50
Through 110, a packet for storing data to be stored is generated in the packet section 72 of the block A. At this time, the acquired ID information, a serial number indicating the order in which the packets are generated, and data length information indicating the data length of the data to be stored are written in the management unit 80, and the state information is stored in the first state. (During data writing). Then, the data to be stored is written in the data portion 82 of the generated packet, and the state information of the generated packet is set to the second state (data writing completed).

【0103】データの書込が中断されない通常の状態で
は、このようにブロックAのパケット部72にデータが
パケットとして書き込まれるのであるが、例えば、何ら
かの原因によりデータの書込が中断された場合は、次の
ように動作する。
In a normal state in which data writing is not interrupted, data is written as a packet in the packet section 72 of the block A as described above. For example, when data writing is interrupted for some reason, It operates as follows.

【0104】データの書込が中断された場合は、システ
ムを再起動した後、フラッシュROM52に対してデー
タの読込を行おうとする他の処理からデータ読込要求を
受けると、ここではまだブロックAがデータ書込用領域
となっているので、ブロックAに対してデータの読込が
開始される。このとき、データ読込要求と併せて、上記
他の処理からは上記同一のID情報が与えられたとす
る。
When the data writing is interrupted, after the system is restarted, if a data read request is received from another process for reading data from the flash ROM 52, the block A is still in the state. Since the area is a data write area, data reading for block A is started. At this time, it is assumed that the same ID information has been given from the other processing together with the data reading request.

【0105】データの読込は、次のように行われる。C
PU50により、ステップS200,S202を経て、
パケットの管理部80からデータ長情報が取得され、取
得されたデータ長情報に基づいて、上記他の処理から与
えられたID情報と一致するID情報を有するパケット
の格納位置が特定される。このとき、格納位置が特定さ
れたパケットは、先程データの書込が中断され、その状
態情報が第1の状態となっているので、ステップS20
4,S208を経て、無効なパケットであると判定さ
れ、データの読込が行われない。
Reading of data is performed as follows. C
Through steps S200 and S202 by the PU 50,
Data length information is acquired from the packet management unit 80, and a storage position of a packet having ID information that matches the ID information given from the other processing is specified based on the acquired data length information. At this time, the writing of the data of the packet whose storage position is specified has been interrupted, and the state information thereof is in the first state.
After S4, S208, it is determined that the packet is invalid, and the data is not read.

【0106】なお、データの書込が中断されず、正常に
データの書込が完了した場合は、データ読込要求を受け
ると、ステップS200,S202を経て、パケットの
管理部80からデータ長情報が取得され、取得されたデ
ータ長情報に基づいて、上記他の処理から与えられたI
D情報と一致するID情報を有するパケットの格納位置
が特定される。このとき、格納位置が特定されたパケッ
トは、その状態情報が第2の状態となっているので、ス
テップS204,S206を経て、有効なパケットであ
ると判定され、格納位置が特定されたパケットのデータ
部82からデータが読み出される。
If the data writing is not interrupted and the data writing is completed normally and a data read request is received, the data length information is sent from the packet management unit 80 via steps S200 and S202. Based on the acquired and acquired data length information, I
The storage position of the packet having the ID information matching the D information is specified. At this time, since the state information of the packet whose storage position is specified is in the second state, it is determined as a valid packet through steps S204 and S206, and the packet whose storage position is specified is Data is read from the data section 82.

【0107】また、以上では、ブロックAに対してデー
タの新規書込を行う場合を説明したが、ブロックBに対
してデータの新規書込を行う場合も、上記同様の要領で
動作する。
In the above description, the case where data is newly written to the block A has been described. However, the case where data is newly written to the block B operates in the same manner as described above.

【0108】次に、ブロックA,Bに対してデータの更
新をパケット単位で行う場合を説明する。なお、ブロッ
クAには、すでにいくつかのパケットが生成されてお
り、ここでは、それらのパケットのうちいずれかのデー
タを更新する。
Next, a case will be described in which data is updated for blocks A and B in packet units. It should be noted that some packets have already been generated in the block A, and here, any data of those packets is updated.

【0109】初期状態では、ブロックAをデータ書込用
領域とし、ブロックAに対してデータの書込が行われ
る。フラッシュROM52に対してデータの更新を行お
うとする他の処理からデータ更新要求を受けると、デー
タ書込用領域となるブロックAに対してデータの更新が
開始される。このとき、データ更新要求と併せて、更新
すべきデータおよび更新対象となるパケットのID情報
が与えられる。
In the initial state, block A is used as a data write area, and data is written to block A. When a data update request is received from another process that attempts to update data in the flash ROM 52, data update is started for the block A that is a data write area. At this time, along with the data update request, data to be updated and ID information of a packet to be updated are provided.

【0110】データの更新は、次のように行われる。C
PU50により、ステップS112〜ステップS126
を経て、更新すべきデータを格納するための新たなパケ
ットがブロックAのパケット部72に生成される。この
とき、取得されたID情報、このパケットが生成される
順番を示す連続番号、および更新すべきデータのデータ
長を示すデータ長情報がそれぞれ管理部80に書き込ま
れ、状態情報が第1の状態(データ書込中)に設定され
る。そして、更新前のパケットの状態情報が第3の状態
(データ更新中)に設定され、更新すべきデータが新た
なパケットのデータ部82に書き込まれ、新たなパケッ
トの状態情報が第2の状態(データ書込完了)に設定さ
れるとともに更新前のパケットの状態情報が第4の状態
(データ更新完了)に設定される。
The data is updated as follows. C
Steps S112 to S126 by the PU 50
, A new packet for storing the data to be updated is generated in the packet unit 72 of the block A. At this time, the acquired ID information, a serial number indicating the order in which the packets are generated, and data length information indicating the data length of the data to be updated are written in the management unit 80, and the state information is stored in the first state. (During data writing). Then, the state information of the packet before update is set to the third state (data is being updated), the data to be updated is written to the data part 82 of the new packet, and the state information of the new packet is set to the second state. (Data writing completed) and the state information of the packet before updating is set to the fourth state (data updating completed).

【0111】データの更新が中断されない通常の状態で
は、このようにブロックAのパケット部72にデータが
パケットとして書き込み更新されるのであるが、例え
ば、何らかの原因によりデータの更新が中断された場合
は、次のように動作する。
In the normal state where the data update is not interrupted, the data is written and updated in the packet section 72 of the block A as described above. For example, if the data update is interrupted for some reason, It operates as follows.

【0112】データの更新が中断された場合は、システ
ムを再起動した後、フラッシュROM52に対してデー
タの読込を行おうとする他の処理からデータ読込要求を
受けると、ここではまだブロックAがデータ書込用領域
となっているので、ブロックAに対してデータの読込が
開始される。このとき、データ読込要求と併せて、上記
他の処理からは上記同一のID情報が与えられたとす
る。
When the data update is interrupted, after the system is restarted and a data read request is received from another process for reading data from the flash ROM 52, the block A is still in the data state. Since the area is a write area, data reading from the block A is started. At this time, it is assumed that the same ID information has been given from the other processing together with the data reading request.

【0113】データの読込は、次のように行われる。C
PU50により、ステップS200,S202を経て、
パケットの管理部80からデータ長情報が取得され、取
得されたデータ長情報に基づいて、上記他の処理から与
えられたID情報と一致するID情報を有するパケット
の格納位置が特定される。このとき、新たなパケットよ
りも更新前のパケットの方がパケット部72の先頭アド
レス側に格納されているので、更新前のパケットの格納
位置が先に特定されるが、この更新前のパケットは、先
程データの更新が中断され、その状態情報が第3の状態
となっているので、ステップS204,S206を経
て、有効なパケットであると判定され、そのパケットの
データ部82からデータが読み出される。一方、新たな
パケットには、更新すべきデータが途中までしか書き込
まれていないので、新たなパケットのデータ部82から
は、データの読込が行われない。
Reading of data is performed as follows. C
Through steps S200 and S202 by the PU 50,
Data length information is acquired from the packet management unit 80, and a storage position of a packet having ID information that matches the ID information given from the other processing is specified based on the acquired data length information. At this time, since the packet before update is stored at the start address side of the packet unit 72 than the new packet, the storage position of the packet before update is specified first. Since the update of the data has been interrupted and the state information is in the third state, it is determined that the packet is a valid packet through steps S204 and S206, and the data is read from the data section 82 of the packet. . On the other hand, since data to be updated is written only halfway in the new packet, no data is read from the data portion 82 of the new packet.

【0114】なお、データの更新が中断されず、正常に
データの更新が完了した場合は、データ読込要求を受け
ると、ステップS200,S202を経て、パケットの
管理部80からデータ長情報が取得され、取得されたデ
ータ長情報に基づいて、上記他の処理から与えられたI
D情報と一致するID情報を有するパケットの格納位置
が特定される。このとき、新たなパケットよりも更新前
のパケットの方がパケット部72の先頭アドレス側に格
納されているので、更新前のパケットの格納位置が先に
特定されるが、この更新前のパケットは、その状態情報
が第4の状態となっているので、ステップS204,S
208を経て、無効なパケットであると判定され、デー
タの読込が行われない。
When the data update is not interrupted and the data update is completed normally, upon receiving a data read request, data length information is obtained from the packet management unit 80 via steps S200 and S202. , Based on the acquired data length information,
The storage position of the packet having the ID information matching the D information is specified. At this time, since the packet before update is stored at the start address side of the packet unit 72 than the new packet, the storage position of the packet before update is specified first. Since the state information is in the fourth state, steps S204 and S204
After 208, it is determined that the packet is invalid, and the data is not read.

【0115】次いで、他の処理から与えられたID情報
と一致するID情報を有する次のパケットの格納位置が
特定される。このとき、新たなパケットの格納位置が特
定されるが、この新たなパケットは、その状態情報が第
2の状態となっているので、ステップS204,S20
6を経て、有効なパケットであると判定され、そのパケ
ットのデータ部82からデータが読み出される。
Next, the storage location of the next packet having ID information that matches the ID information given from another process is specified. At this time, the storage position of the new packet is specified. Since the state information of the new packet is in the second state, steps S204 and S20 are performed.
After 6, the packet is determined to be a valid packet, and data is read from the data section 82 of the packet.

【0116】また、以上では、ブロックAに対してデー
タの更新を行う場合を説明したが、ブロックBに対して
データの更新を行う場合も、上記同様の要領で動作す
る。
In the above description, the case where data is updated for the block A has been described. However, the case where data is updated for the block B operates in the same manner as described above.

【0117】次に、ブロックA,Bを更新する場合を図
14を参照しながら説明する。図14は、ブロックAを
ブロックBに更新する場合を説明するための図である。
Next, a case where the blocks A and B are updated will be described with reference to FIG. FIG. 14 is a diagram for explaining a case where block A is updated to block B.

【0118】ブロックAをデータ書込用領域として、ブ
ロックAに対してデータの書込・更新を続けていくと、
ブロックAのパケット部72は、図14に示すように、
有効なパケットと無効なパケットが混在する状態とな
る。図14の例では、IDが「01」である有効なパケ
ットとIDが「03」である有効なパケットとの間に
は、データの更新により無効となった2つのパケットが
存在する。このようにブロックAのパケット部72に無
効なパケットが多数存在すると、データの新規書込・更
新を行うことができなくなる。
When data writing / updating to block A is continued with block A as a data writing area,
As shown in FIG. 14, the packet unit 72 of the block A
Valid packets and invalid packets are mixed. In the example of FIG. 14, between a valid packet having an ID of “01” and a valid packet having an ID of “03”, there are two packets that have become invalid due to data update. If a large number of invalid packets exist in the packet section 72 of the block A, new writing / updating of data cannot be performed.

【0119】そこで、フラッシュROM52に対してデ
ータの更新を行おうとする他の処理からデータ新規書込
要求またはデータ更新要求を受けたときに、記憶・更新
すべきデータを格納するためのパケットを生成するため
の領域がブロックAのパケット部72に不足している
と、ステップS128において、ブロック更新要求が出
力される。ブロック更新要求を受けると、ブロックAか
らブロックBへの更新が開始される。なお、ブロックB
は、すでに初期化されているものとし、すなわち、ブロ
ックBの領域管理部70には、領域状態情報1(初期化
完了)が書き込まれている。
Therefore, when a new data write request or a data update request is received from another process for updating data in the flash ROM 52, a packet for storing data to be stored / updated is generated. If there is not enough space in the packet section 72 of the block A, a block update request is output in step S128. Upon receiving the block update request, the update from block A to block B is started. Block B
Has already been initialized, that is, the area state information 1 (initialization completed) has been written in the area management unit 70 of the block B.

【0120】ブロックAからブロックBへのブロックの
更新は、次のように行われる。CPU50により、ステ
ップS300〜S304を経て、処理定義テーブルが参
照されてブロックA,Bに対する処理が実行され、ブロ
ックAが有効であるか否かが判定される。このとき、ブ
ロックAが有効であるので、ステップS306におい
て、ブロックAの領域管理部70に領域状態情報4(デ
ータ移動中)が書き込まれる。
Updating of a block from block A to block B is performed as follows. Through steps S300 to S304, the CPU 50 refers to the processing definition table to execute processing for blocks A and B, and determines whether block A is valid. At this time, since the block A is valid, the area state information 4 (data is being moved) is written to the area management unit 70 of the block A in step S306.

【0121】次いで、ブロックAの領域管理部70に領
域状態情報4が、ブロックBの領域管理部70に領域状
態情報1が書き込まれると、ステップS300,S40
0,S402,S424〜S430を経て、処理定義テ
ーブルが参照されて、ブロックBの領域管理部70に領
域状態情報2(データ書込中)が書き込まれ、図14に
示すように、ブロックAの有効なパケットのデータが、
その格納位置が整順されるように、ブロックBのパケッ
ト部72に書き込まれ、ブロックBの領域管理部70に
領域状態情報3(データ書込完了)が書き込まれるとと
もにブロックAの領域管理部70に領域状態情報5(デ
ータ移動完了)が書き込まれる。このようにブロックの
更新が完了すると、ブロックAは、データ更新用領域と
なり、ブロックAに代わって今度はブロックBがデータ
書込用領域となる。
Next, when the area state information 4 is written in the area management section 70 of the block A and the area state information 1 is written in the area management section 70 of the block B, steps S300 and S40 are performed.
0, S402, and S424 to S430, the process definition table is referred to, the area status information 2 (data is being written) is written in the area management unit 70 of the block B, and as shown in FIG. Valid packet data is
The data is written in the packet section 72 of the block B so that the storage positions are arranged in order, the area state information 3 (data writing completed) is written in the area management section 70 of the block B, and the area management section 70 of the block A is written. Is written in the area status information 5 (data transfer completed). When the update of the block is completed in this way, the block A becomes a data update area, and instead of the block A, the block B becomes a data write area.

【0122】そして、ブロックAの領域管理部70に領
域状態情報5が、ブロックBの領域管理部70に領域状
態情報3が書き込まれると、ステップS300,S40
0,S402〜S408を経て、処理定義テーブルが参
照されて、ブロックAが初期化され、ブロックAの初期
化回数が「1」加算されてブロックAの領域管理部70
にその初期化回数情報が書き込まれ、ブロックAの領域
管理部70に領域状態情報1が書き込まれる。
When the area state information 5 is written in the area management section 70 of the block A and the area state information 3 is written in the area management section 70 of the block B, steps S300 and S40 are performed.
0, through steps S402 to S408, the processing definition table is referred to, the block A is initialized, the number of initializations of the block A is incremented by "1", and the area management unit 70 of the block A is added.
The initialization count information is written in the area management unit 70, and the area state information 1 is written in the area management unit 70 of the block A.

【0123】ブロックの更新が中断されない通常の状態
では、このようにブロックAの有効なパケットのデータ
がブロックBのパケット部72に書き込まれるのである
が、例えば、何らかの原因によりブロックの更新が中断
された場合は、次のように動作する。
In a normal state where the updating of the block is not interrupted, the data of the valid packet of the block A is written in the packet section 72 of the block B in this way. For example, the updating of the block is interrupted for some reason. In this case, the following operation is performed.

【0124】まず、データの更新のうちブロックBにデ
ータを書き込んでいる最中に中断された場合は、システ
ムを再起動すると、ブロックAの領域管理部70に領域
状態情報4が、ブロックBの領域管理部70に領域状態
情報2が書き込まれているので、ステップS300,S
400,S402,S410〜S414を経て、処理定
義テーブルが参照されて、ブロックBが初期化され、ブ
ロックBの初期化回数が「1」加算されてブロックBの
領域管理部70にその初期化回数情報が書き込まれ、ブ
ロックBの領域管理部70に領域状態情報1が書き込ま
れる。
First, if the update of data is interrupted while data is being written to block B, when the system is restarted, the area status information 4 of the area management unit 70 of block A is updated to the Since the area state information 2 has been written in the area management unit 70, steps S300 and S300
400, S402, S410 to S414, the processing definition table is referred to, the block B is initialized, the number of initializations of the block B is added by “1”, and the number of initializations is added to the area management unit 70 of the block B. The information is written, and the area state information 1 is written to the area management unit 70 of the block B.

【0125】そして、ブロックAの領域管理部70に領
域状態情報4が、ブロックBの領域管理部70に領域状
態情報1が書き込まれると、ステップS300,S40
0,S402,S424〜S430を経て、処理定義テ
ーブルが参照されて、ブロックBの領域管理部70に領
域状態情報2が書き込まれ、図14に示すように、ブロ
ックAの有効なパケットのデータが、その格納位置が整
順されるように、ブロックBのパケット部72に書き込
み直され、ブロックBの領域管理部70に領域状態情報
3が書き込まれるとともにブロックAの領域管理部70
に領域状態情報5が書き込まれる。その後は、ブロック
Aが初期化され、ブロックAの領域管理部70に領域状
態情報1が書き込まれる。
When the area state information 4 is written in the area management section 70 of the block A and the area state information 1 is written in the area management section 70 of the block B, steps S300 and S40 are performed.
0, S402, and S424 to S430, the process definition table is referred to, the area status information 2 is written in the area management unit 70 of the block B, and as shown in FIG. Is rewritten into the packet section 72 of the block B so that the storage positions are rearranged, the area state information 3 is written in the area management section 70 of the block B, and the area management section 70 of the block A is written.
Area state information 5 is written to Thereafter, the block A is initialized, and the area state information 1 is written to the area management unit 70 of the block A.

【0126】次に、データの更新のうちブロックAを初
期化している最中に中断された場合は、システムを再起
動すると、ブロックAの領域管理部70に領域状態情報
5が、ブロックBの領域管理部70に領域状態情報3が
書き込まれているので、ステップS300,S400,
S402〜S408を経て、処理定義テーブルが参照さ
れて、ブロックAが初期化し直され、ブロックAの初期
化回数が「1」加算されてブロックAの領域管理部70
にその初期化回数情報が書き込まれ、ブロックAの領域
管理部70に領域状態情報1が書き込まれる。
Next, if the update of the data is interrupted while the block A is being initialized, the system is restarted and the area status information 5 of the block A is stored in the area management unit 70 of the block A. Since the area state information 3 has been written in the area management unit 70, steps S300, S400,
After S402 to S408, the processing definition table is referred to, the block A is re-initialized, the number of initializations of the block A is incremented by “1”, and the area management unit 70 of the block A is added.
The initialization count information is written in the area management unit 70, and the area state information 1 is written in the area management unit 70 of the block A.

【0127】なお、以上では、ブロックAからブロック
Bへの更新を行う場合を説明したが、ブロックBからブ
ロックAへの更新を行う場合も、上記同様の要領で動作
する。
In the above description, the case where the update from the block A to the block B is performed has been described. However, the operation when the update from the block B to the block A is performed in the same manner as described above.

【0128】このようにして、本実施の形態では、デー
タを記憶するときは、記憶すべきデータを格納するため
のパケットをブロックのパケット部72に生成し、デー
タ書込開始時にパケットの状態情報を第1の状態に設定
し、パケットのデータ部82に記憶すべきデータを書き
込み、データ書込完了時にパケットの状態情報を第2の
状態に設定し、状態情報が第2の状態であるパケットを
有効なパケットであると判定し、状態情報が第1の状態
であるパケットを無効なパケットであると判定するよう
にした。
As described above, in the present embodiment, when storing data, a packet for storing the data to be stored is generated in the packet section 72 of the block, and the state information of the packet is written at the start of data writing. Is set to the first state, data to be stored is written in the data portion 82 of the packet, and when the data writing is completed, the state information of the packet is set to the second state. Is determined to be a valid packet, and a packet whose status information is in the first state is determined to be an invalid packet.

【0129】これにより、データの書込が完了するまで
は、有効なパケットとして識別されないので、データの
書込が完了するまでの間に何らかの原因によりデータの
書込が中断されても、データ書込途中のパケットのデー
タが正しいデータとして取り扱われることはない。ま
た、フラッシュROM52上でのデータの消去は、消去
対象となるデータが格納されているパケットの状態情報
を第1の状態に設定することにより行えばよいので、フ
ラッシュROM52の初期化回数が少なくなる。したが
って、従来に比して、フラッシュROM52の寿命の低
下を防止するとともにデータの書換を高速に行うことが
でき、しかもデータの書込を高い信頼性をもって行うこ
とができる。
As a result, the packet is not identified as a valid packet until the data writing is completed. Therefore, even if the data writing is interrupted for some reason until the data writing is completed, the data writing is not performed. The data of the packet being loaded is not treated as correct data. In addition, since the erasure of data on the flash ROM 52 may be performed by setting the state information of the packet storing the data to be erased to the first state, the number of times of initialization of the flash ROM 52 is reduced. . Therefore, as compared with the related art, the life of the flash ROM 52 can be prevented from being shortened, data can be rewritten at high speed, and data can be written with high reliability.

【0130】さらに、本実施の形態では、パケットのデ
ータを更新するときは、更新すべきデータを格納するた
めの新たなパケットをブロックのパケット部72に生成
し、データ書込開始時にパケットの状態情報を第3の状
態に設定するとともに新たなパケットの状態情報を第1
の状態に設定し、新たなパケットのデータ部82に更新
すべきデータを書き込み、データ書込完了時に新たなパ
ケットの状態情報を第2の状態に設定するとともにパケ
ットの状態情報を第4の状態に設定し、状態情報が第2
の状態または第3の状態であるパケットを有効なパケッ
トであると判定し、状態情報が第1の状態または第4の
状態であるパケットを無効なパケットであると判定する
ようにした。
Further, in the present embodiment, when updating the data of a packet, a new packet for storing the data to be updated is generated in the packet section 72 of the block, and the state of the packet at the start of data writing is changed. The information is set to the third state and the state information of the new packet is set to the first state.
, The data to be updated is written to the data portion 82 of the new packet, and when the data writing is completed, the status information of the new packet is set to the second status and the status information of the packet is set to the fourth status. And the status information is
Or the third state packet is determined to be a valid packet, and the packet whose state information is the first state or the fourth state is determined to be an invalid packet.

【0131】これにより、データの更新が完了するまで
は、新たなパケットは、有効なパケットとして識別され
ないので、データの更新が完了するまでの間に何らかの
原因によりデータの更新が中断されても、データ書込途
中の新たなパケットのデータが正しいデータとして取り
扱われることはない。この場合は、更新前のパケットの
データが正しいデータとして取り扱われる。したがっ
て、従来に比して、データの更新を高い信頼性をもって
行うことができる。
As a result, a new packet is not identified as a valid packet until the data update is completed. Therefore, even if the data update is interrupted for some reason until the data update is completed, Data of a new packet during data writing is not handled as correct data. In this case, the data of the packet before the update is handled as correct data. Therefore, data can be updated with higher reliability than before.

【0132】さらに、本実施の形態では、データ長情報
に基づいて、パケットの格納位置を特定するようにし
た。
Further, in the present embodiment, the storage position of the packet is specified based on the data length information.

【0133】これにより、パケット部72の記憶容量を
超えない任意のデータ長のデータを区分することなく一
つのパケットとしてブロックのパケット部72に記憶す
ることができるので、可変長のデータの管理が容易にな
る。
As a result, data of an arbitrary data length not exceeding the storage capacity of the packet section 72 can be stored as one packet in the packet section 72 of the block without division, so that variable-length data can be managed. It will be easier.

【0134】さらに、本実施の形態では、ブロックを更
新するときは、データ書込開始時にブロックA,Bのう
ち一方のブロックの領域管理部70に領域状態情報4を
書き込むとともに他方のブロックの領域管理部70に領
域状態情報2を書き込み、一方のブロックのパケット部
72の有効なパケットのデータを他方のブロックのパケ
ット部72に書き込み、データ書込完了時に一方のブロ
ックの領域管理部70に領域状態情報5を書き込むとと
もに他方のブロックの領域管理部70に領域状態情報3
を書き込み、領域管理部70に領域状態情報3,4が書
き込まれているブロックを有効なブロックであると判定
し、領域管理部70に領域状態情報1,2,5が書き込
まれているブロックを無効なブロックであると判定する
ようにした。
Furthermore, in this embodiment, when updating a block, the area status information 4 is written into the area management unit 70 of one of the blocks A and B at the start of data writing, and the area of the other block is written. The area status information 2 is written to the management unit 70, the valid packet data of the packet unit 72 of one block is written to the packet unit 72 of the other block, and the data is written to the area management unit 70 of one block when the data writing is completed. The state information 5 is written and the area state information 3 is stored in the area management unit 70 of the other block.
Is written, and the block in which the area status information 3, 4 is written in the area management unit 70 is determined to be a valid block. It is now determined that the block is invalid.

【0135】これにより、ブロックの更新が完了するま
では、更新先となる他方のブロックは、有効なブロック
として識別されないので、ブロックの更新が完了するま
での間に何らかの原因によりブロックの更新が中断され
ても、データ書込途中の他方のブロックのデータが正し
いデータとして取り扱われることはない。この場合は、
更新前の一方のブロックのデータが正しいデータとして
取り扱われる。したがって、データの更新をさらに高い
信頼性をもって行うことができる。
As a result, the block to be updated is not identified as a valid block until the update of the block is completed. Therefore, the update of the block is interrupted for some reason until the update of the block is completed. Even if the data is written, the data of the other block in the middle of data writing is not treated as correct data. in this case,
The data of one block before the update is handled as correct data. Therefore, data can be updated with higher reliability.

【0136】さらに、本実施の形態では、領域管理部7
0に領域状態情報1,2,5が書き込まれているブロッ
クをデータ更新用領域として用いるようにした。
Further, in the present embodiment, the area management unit 7
The block in which the area status information 1, 2, 5 is written to 0 is used as a data update area.

【0137】これにより、ブロックを更新するたびに新
たなブロックがデータ更新用領域となることがないの
で、フラッシュROM52の記憶領域を有効に利用する
ことができる。
Thus, a new block does not become a data update area each time a block is updated, so that the storage area of the flash ROM 52 can be effectively used.

【0138】さらに、本実施の形態では、ブロックA,
Bの領域状態情報の状態に応じてブロックA,Bに対す
る処理を割り当てた処理定義テーブルを参照して、ブロ
ックA,Bに対する処理を実行するようにした。
Further, in the present embodiment, blocks A,
The processing for the blocks A and B is executed by referring to the processing definition table to which the processing for the blocks A and B is assigned according to the state of the area state information of B.

【0139】これにより、ブロックA,Bの領域状態情
報の状態に応じて、ブロックA,Bに対する処理を逐次
判定する必要がなくなるので、データの書換に関する処
理を簡素化することができる。
As a result, it is not necessary to determine the processing for the blocks A and B sequentially according to the state of the area state information of the blocks A and B, so that the processing relating to data rewriting can be simplified.

【0140】さらに、本実施の形態では、ブロックは、
フラッシュROM52のデータ初期化単位からなる。
Further, in the present embodiment, the blocks are:
It consists of a data initialization unit of the flash ROM 52.

【0141】これにより、フラッシュROM52の初期
化回数を最小限に抑えることができる。
Thus, the number of times of initialization of the flash ROM 52 can be minimized.

【0142】さらに、本実施の形態では、一方のブロッ
クの領域管理部70に領域管理情報4が書き込まれ、か
つ、他方のブロックの領域管理部70に領域管理情報2
が書き込まれているときは、他方のブロックを初期化す
るようにした。
Further, in this embodiment, the area management information 4 is written in the area management section 70 of one block, and the area management information 2 is written in the area management section 70 of the other block.
When is written, the other block is initialized.

【0143】これにより、何らかの原因により他方のブ
ロックのパケット部72にデータを書き込んでいる最中
に中断された場合は、システムを再起動すると、他方の
ブロックが初期化され、他方のブロックのパケット部7
2にデータが書き込み直されるので、データの更新をさ
らに高い信頼性をもって行うことができる。
Thus, if data is interrupted while data is being written to the packet section 72 of the other block for some reason, when the system is restarted, the other block is initialized and the packet of the other block is initialized. Part 7
2, the data is rewritten, so that the data can be updated with higher reliability.

【0144】さらに、本実施の形態では、一方のブロッ
クの領域管理部70に領域管理情報5が書き込まれ、か
つ、他方のブロックの領域管理部70に領域管理情報
1,2,3が書き込まれているときは、一方のブロック
を初期化するようにした。
Further, in this embodiment, the area management information 5 is written in the area management unit 70 of one block, and the area management information 1, 2, 3 is written in the area management unit 70 of the other block. , One of the blocks is initialized.

【0145】これにより、何らかの原因によりデータの
更新のうち一方のブロックを初期化している最中に中断
された場合は、システムを再起動すると、一方のブロッ
クが初期化し直されるので、データの更新をさらに高い
信頼性をもって行うことができる。
Thus, if the update of data is interrupted during the initialization of one block for some reason, when the system is restarted, one block is re-initialized. Can be performed with higher reliability.

【0146】上記実施の形態において、ブロックA,B
は、請求項1、2、4ないし7記載の記憶領域に対応
し、領域状態情報2は、請求項4または5記載の第1の
状態に対応し、領域状態情報3は、請求項4記載の第2
の状態に対応し、領域状態情報4は、請求項4記載の第
3の状態に対応し、領域状態情報5は、請求項4または
5記載の第4の状態に対応している。
In the above embodiment, blocks A and B
Corresponds to the storage area according to claims 1, 2, 4 to 7, the area state information 2 corresponds to the first state according to claim 4 or 5, and the area state information 3 corresponds to claim 4. Second
The area state information 4 corresponds to the third state described in claim 4, and the area state information 5 corresponds to the fourth state described in claim 4 or 5.

【0147】なお、上記実施の形態においては、ブロッ
クを、フラッシュROM52のデータ初期化単位から構
成したが、これに限らず、データ初期化単位を2以上組
み合わせて構成してもよい。このような構成であって
も、フラッシュROM52の初期化回数を最小限に抑え
ることができる。
In the above embodiment, the block is constituted by the data initialization unit of the flash ROM 52. However, the present invention is not limited to this, and the block may be constituted by combining two or more data initialization units. Even with such a configuration, the number of times of initialization of the flash ROM 52 can be minimized.

【0148】また、上記実施の形態においては、ステッ
プS116からステップS118に移行する間にデータ
の更新が中断された場合について特に説明しなかった
が、こうした場合に対応するため、状態情報が第2,3
の状態であるパケットおよび状態情報が第1の状態であ
るパケットが併存するときは、状態情報が第2,3の状
態であるパケットを有効なパケットであると判定するよ
うに構成してもよい。
Further, in the above embodiment, the case where the data update is interrupted during the transition from step S116 to step S118 has not been particularly described. , 3
When a packet having the status information of the second state and a packet having the status information of the first state coexist, the packet having the status information of the second or third state may be determined to be a valid packet. .

【0149】また、上記実施の形態においては、ステッ
プS124からステップS126に移行する間にデータ
の更新が中断された場合について特に説明しなかった
が、こうした場合に対応するため、状態情報が第3の状
態であるパケットおよび状態情報が第2の状態であるパ
ケットが併存するときは、状態情報が第2の状態である
パケットを有効なパケットであると判定するように構成
してもよい。
Further, in the above embodiment, the case where the data update is interrupted during the transition from step S124 to step S126 has not been particularly described. When a packet having the status information of the second state and a packet having the status information of the second state coexist, the packet having the status information of the second state may be determined to be a valid packet.

【0150】また、上記実施の形態においては、ステッ
プS306からステップS424に移行する間、または
ステップS308からステップS416に移行する間に
ブロックの更新が中断された場合について特に説明しな
かったが、こうした場合に対応するため、領域管理部7
0に領域状態情報4が書き込まれているブロックおよび
領域管理部70に領域状態情報1が書き込まれているブ
ロックが併存するときは、領域管理部70に領域状態情
報4が書き込まれているブロックを有効なブロックであ
ると判定するように構成してもよい。
Further, in the above embodiment, the case where the update of the block is interrupted during the transition from step S306 to step S424 or the transition from step S308 to step S416 is not particularly described. To cope with the case, the area management unit 7
When a block in which the area state information 4 is written in the area management unit 0 and a block in which the area state information 1 is written in the area management unit 70 coexist, the block in which the area state information 4 is written in the area management unit 70 is determined. You may comprise so that it may be determined that it is a valid block.

【0151】また、上記実施の形態においては、ステッ
プS428からステップS430に移行する間、または
ステップS420からステップS422に移行する間に
ブロックの更新が中断された場合について特に説明しな
かったが、こうした場合に対応するため、領域管理部7
0に領域状態情報3が書き込まれているブロックおよび
領域管理部70に領域状態情報4が書き込まれているブ
ロックが併存するときは、領域管理部70に領域状態情
報3が書き込まれているブロックを有効なブロックであ
ると判定するように構成してもよい。
Further, in the above embodiment, the case where the update of the block is interrupted during the transition from step S428 to step S430 or the transition from step S420 to step S422 is not particularly described. To cope with the case, the area management unit 7
When the block in which the area state information 3 is written in the area 0 and the block in which the area state information 4 is written in the area management unit 70 coexist, the block in which the area state information 3 is written in the area management unit 70 is set. You may comprise so that it may be determined that it is a valid block.

【0152】また、上記実施の形態においては、データ
書込用領域としてのブロックおよびデータ更新用領域と
してのブロックをそれぞれ1つずつ用いて構成したが、
これに限らず、データ更新用領域としてのブロックを1
つ、データ書込用領域としてのブロックを複数用いて構
成してもよい。この場合は、ブロックの更新を同時に複
数行わないことが条件となる。ブロックの更新を同時に
複数行う場合は、データ更新用領域としてのブロック
を、記憶領域の更新を同時に行う数だけ用意すればよ
い。
In the above-described embodiment, the block is used by using one block as the data writing area and one block as the data updating area.
However, the present invention is not limited to this.
Alternatively, a plurality of blocks as a data write area may be used. In this case, the condition is that a plurality of blocks are not updated at the same time. When a plurality of blocks are updated at the same time, blocks as data update areas may be prepared in a number equal to the number at which the storage area is updated at the same time.

【0153】また、上記実施の形態において、図9ない
し図13のフローチャートに示す動作処理を実行するに
あたっては、フラッシュROM52にあらかじめ格納さ
れているプログラムを実行する場合について説明した
が、これに限らず、これらの手順を示したプログラムが
記録された記録媒体から、そのプログラムをRAM54
に読み込んで実行するようにしてもよい。
Further, in the above-described embodiment, when executing the operation processing shown in the flow charts of FIGS. 9 to 13, the case where a program stored in advance in the flash ROM 52 is executed has been described, but the present invention is not limited to this. The program is stored in a RAM 54 from a recording medium on which the program showing these procedures is recorded.
May be read and executed.

【0154】ここで、記憶媒体とは、RAM、ROM等
の半導体記憶媒体、FD、HD等の磁気記憶型記憶媒
体、CD、CDV、LD、DVD等の光学的読取方式記
憶媒体、MO等の磁気記憶型/光学的読取方式記憶媒体
であって、電子的、磁気的、光学的等の読み取り方法の
いかんにかかわらず、コンピュータで読み取り可能な記
憶媒体であれば、あらゆる記憶媒体を含むものである。
Here, the storage medium includes semiconductor storage media such as RAM and ROM, magnetic storage media such as FD and HD, optical reading storage media such as CD, CDV, LD, DVD, and MO. It is a magnetic storage type / optical read type storage medium, and includes any storage medium that can be read by a computer regardless of an electronic, magnetic, optical or other read method.

【0155】また、上記実施の形態においては、本発明
に係るフラッシュメモリのデータ管理装置を、フラッシ
ュROM52のデータ初期化単位からなるブロックに、
コンピュータ100の設定に必要なデータを可変長のパ
ケット単位で記憶する場合について適用したが、これに
限らず、本発明の主旨を逸脱しない範囲で他の場合につ
いても適用可能である。
Further, in the above embodiment, the data management device for a flash memory according to the present invention is divided into a block of the flash ROM 52 which is composed of data initialization units.
Although the present invention has been applied to the case where data necessary for setting the computer 100 is stored in units of variable-length packets, the present invention is not limited to this, and can be applied to other cases without departing from the gist of the present invention.

【0156】[0156]

【発明の効果】以上説明したように、本発明に係る請求
項1ないし7記載のフラッシュメモリのデータ管理装置
によれば、データの書込が完了するまでは、有効なパケ
ットとして識別されないので、データの書込が完了する
までの間に何らかの原因によりデータの書込が中断され
ても、データ書込途中のパケットのデータが正しいデー
タとして取り扱われることはない。また、フラッシュメ
モリ上でのデータの消去は、消去対象となるデータが格
納されているパケットの状態情報を第1の状態に設定す
ることにより行えばよいので、フラッシュメモリの初期
化回数が少なくなる。したがって、従来に比して、フラ
ッシュメモリの寿命の低下を防止するとともにデータの
書換を高速に行うことができ、しかもデータの書込を高
い信頼性をもって行うことができるという効果が得られ
る。
As described above, according to the flash memory data management device according to the first to seventh aspects of the present invention, a data is not identified as a valid packet until data writing is completed. Even if the data writing is interrupted for some reason until the data writing is completed, the data of the packet being written is not handled as correct data. In addition, since the erasing of data in the flash memory may be performed by setting the state information of the packet storing the data to be erased to the first state, the number of times of initialization of the flash memory is reduced. . Therefore, as compared with the related art, it is possible to prevent the life of the flash memory from being shortened, to perform data rewriting at a high speed, and to perform data writing with high reliability.

【0157】さらに、本発明に係る請求項2記載のフラ
ッシュメモリのデータ管理装置によれば、データの更新
が完了するまでは、新たなパケットは、有効なパケット
として識別されないので、データの更新が完了するまで
の間に何らかの原因によりデータの更新が中断されて
も、データ書込途中の新たなパケットのデータが正しい
データとして取り扱われることはない。したがって、従
来に比して、データの更新を高い信頼性をもって行うこ
とができるという効果も得られる。
Further, according to the flash memory data management device of the second aspect of the present invention, a new packet is not identified as a valid packet until the data update is completed. Even if the data update is interrupted for some reason until the completion, the data of the new packet being written is not treated as correct data. Therefore, an effect that data can be updated with higher reliability than before can be obtained.

【0158】さらに、本発明に係る請求項3記載のフラ
ッシュメモリのデータ管理装置によれば、記憶領域の記
憶容量を超えない任意のデータ長のデータを区分するこ
となく一つのパケットとして記憶領域に記憶することが
できるので、可変長のデータの管理が容易になるという
効果も得られる。
Further, according to the flash memory data management device of the third aspect of the present invention, data of an arbitrary data length not exceeding the storage capacity of the storage area is divided into one packet in the storage area without being divided. Since the data can be stored, an effect that management of variable-length data is facilitated is also obtained.

【0159】さらに、本発明に係る請求項4記載のフラ
ッシュメモリのデータ管理装置によれば、記憶領域の更
新が完了するまでは、更新先となる別の記憶領域は、有
効な記憶領域として識別されないので、記憶領域の更新
が完了するまでの間に何らかの原因により記憶領域の更
新が中断されても、データ書込途中の更新先となる別の
記憶領域のデータが正しいデータとして取り扱われるこ
とはない。したがって、データの更新をさらに高い信頼
性をもって行うことができるという効果も得られる。
Further, according to the flash memory data management device of the present invention, another storage area to be updated is identified as a valid storage area until the update of the storage area is completed. Therefore, even if the update of the storage area is interrupted for some reason until the update of the storage area is completed, the data of another storage area which is the update destination in the middle of data writing may not be treated as correct data. Absent. Therefore, an effect is obtained that data can be updated with higher reliability.

【0160】さらに、本発明に係る請求項5記載のフラ
ッシュメモリのデータ管理装置によれば、記憶領域を更
新するたびに新たな記憶領域が別の記憶領域となること
がないので、フラッシュメモリの記憶領域を有効に利用
することができるという効果も得られる。
Further, according to the flash memory data management device of the present invention, a new storage area does not become another storage area every time a storage area is updated. The effect that the storage area can be used effectively can also be obtained.

【0161】さらに、本発明に係る請求項6記載のフラ
ッシュメモリのデータ管理装置によれば、更新前の記憶
領域および更新先となる別の記憶領域の領域状態情報の
状態に応じて、更新前の記憶領域および更新先となる別
の記憶領域に対する処理を逐次判定する必要がなくなる
ので、データの書換に関する処理を簡素化することがで
きるという効果も得られる。
Further, according to the data management device for a flash memory according to the sixth aspect of the present invention, the flash memory data is updated before the update in accordance with the state of the area status information of the storage area before the update and another storage area to be updated. This eliminates the need to sequentially determine the processing for the storage area and another storage area to be updated, so that the effect of simplifying the processing related to data rewriting can also be obtained.

【0162】さらに、本発明に係る請求項7記載のフラ
ッシュメモリのデータ管理装置によれば、フラッシュメ
モリの初期化回数を最小限に抑えることができるという
効果も得られる。
Further, according to the flash memory data management device of the present invention, an effect is obtained that the number of times of initialization of the flash memory can be minimized.

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

【図1】コンピュータ100の構成を示すブロック図で
ある。
FIG. 1 is a block diagram showing a configuration of a computer 100.

【図2】ブロックA,Bのデータ構造を示す図である。FIG. 2 is a diagram showing a data structure of blocks A and B.

【図3】領域管理部70のデータ構造を示す図である。FIG. 3 is a diagram showing a data structure of an area management unit 70.

【図4】領域状態情報の内容を示す図である。FIG. 4 is a diagram showing contents of area state information.

【図5】パケット部72のデータ構造を示す図である。FIG. 5 is a diagram showing a data structure of a packet unit 72.

【図6】管理部80のデータ構造を示す図である。FIG. 6 is a diagram showing a data structure of a management unit 80.

【図7】状態情報の内容を示す図である。FIG. 7 is a diagram showing the contents of state information.

【図8】処理定義テーブルのデータ構造を示す図であ
る。
FIG. 8 is a diagram showing a data structure of a process definition table.

【図9】データ書込処理を示すフローチャートである。FIG. 9 is a flowchart showing a data writing process.

【図10】データ読込処理を示すフローチャートであ
る。
FIG. 10 is a flowchart showing a data reading process.

【図11】ブロック更新処理を示すフローチャートであ
る。
FIG. 11 is a flowchart illustrating a block update process.

【図12】ステップS300の処理定義テーブルに基づ
く処理を示すフローチャートである。
FIG. 12 is a flowchart illustrating a process based on a process definition table in step S300.

【図13】ステップS300の処理定義テーブルに基づ
く処理を示すフローチャートである。
FIG. 13 is a flowchart showing processing based on the processing definition table in step S300.

【図14】ブロックBに対してデータを更新する場合を
説明するための図である。
FIG. 14 is a diagram for describing a case where data is updated for a block B.

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

100 コンピュータ 50 CPU 52 ROM 54 RAM 55 VRAM 56 グラフィックチップ 57 RTC 58 I/F 59 バス 60 タッチパネル 70 領域管理部 72 パケット部 80 管理部 82 データ部 P1〜Pn パケット100 Computer 50 CPU 52 ROM 54 RAM 55 VRAM 56 graphic chip 57 RTC 58 I / F 59 bus 60 touch panel 70 area management unit 72 the packet 80 management unit 82 data portion P 1 to P n packets

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 フラッシュメモリの記憶領域にパケット
単位でデータを記憶する装置であって、 前記パケットは、当該パケットの管理に関する管理デー
タを格納するための管理部と、記憶すべきデータを格納
するためのデータ部とからなり、 前記管理部には、前記管理データとして、前記パケット
の異なる2つの状態を示す状態情報が格納可能となって
おり、 データを記憶するときは、記憶すべきデータを格納する
ためのパケットを前記記憶領域に生成し、データ書込開
始時に前記パケットの状態情報をデータの新規書込中で
あることを示す第1の状態に設定し、前記パケットのデ
ータ部に前記記憶すべきデータを書き込み、データ書込
完了時に前記パケットの状態情報をデータの新規書込が
完了したことを示す第2の状態に設定し、 前記状態情報が前記第2の状態であるパケットを有効な
パケットであると判定し、前記状態情報が前記第1の状
態であるパケットを無効なパケットであると判定するよ
うになっていることを特徴とするフラッシュメモリのデ
ータ管理装置。
1. An apparatus for storing data in a storage area of a flash memory in packet units, wherein the packet stores a management unit for storing management data relating to management of the packet, and data to be stored. In the management unit, status information indicating two different statuses of the packet can be stored as the management data. When data is stored, data to be stored is stored in the management unit. A packet to be stored is generated in the storage area, and at the start of data writing, the state information of the packet is set to a first state indicating that new writing of data is being performed. Writing the data to be stored, and setting the status information of the packet to a second status indicating that the new writing of the data is completed when the data writing is completed; The state information determines that the packet in the second state is a valid packet, and the state information determines that the packet in the first state is an invalid packet. Flash memory data management device.
【請求項2】 請求項1において、 前記状態情報は、前記パケットのさらに異なる2つの状
態を示すようになっており、 前記パケットのデータを更新するときは、更新すべきデ
ータを格納するための新たなパケットを前記記憶領域に
生成し、データ書込開始時に前記パケットの状態情報を
データの更新中であることを示す第3の状態に且つ前記
新たなパケットの状態情報を前記第1の状態に設定し、
前記新たなパケットのデータ部に前記更新すべきデータ
を書き込み、データ書込完了時に前記新たなパケットの
状態情報を前記第2の状態に且つ前記パケットの状態情
報をデータの更新が完了したことを示す第4の状態に設
定し、 前記状態情報が前記第2の状態又は前記第3の状態であ
るパケットを有効なパケットであると判定し、前記状態
情報が前記第1の状態又は前記第4の状態であるパケッ
トを無効なパケットであると判定するようになっている
ことを特徴とするフラッシュメモリのデータ管理装置。
2. The packet according to claim 1, wherein the status information indicates two further different statuses of the packet. When updating the data of the packet, the status information stores the data to be updated. A new packet is generated in the storage area, and at the start of data writing, the state information of the packet is set to a third state indicating that data is being updated and the state information of the new packet is set to the first state. Set to
The data to be updated is written in the data portion of the new packet, and when the data writing is completed, the state information of the new packet is set to the second state and the update of the state information of the packet is completed. The state information is determined to be a valid packet if the state information is the second state or the third state, and the state information is determined to be the first state or the fourth state. A data management device for a flash memory, wherein a packet in the state of (1) is determined to be an invalid packet.
【請求項3】 請求項1及び2のいずれかにおいて、 前記パケットは、可変長であり、 前記管理部には、前記管理データとして、当該パケット
のデータ長を示すデータ長情報が格納可能となってお
り、 前記データ長情報に基づいて、前記パケットの格納位置
を特定するようになっていることを特徴とするフラッシ
ュメモリのデータ管理装置。
3. The packet according to claim 1, wherein the packet has a variable length, and the management unit can store data length information indicating a data length of the packet as the management data. A data management device for a flash memory, wherein a storage location of the packet is specified based on the data length information.
【請求項4】 請求項1乃至3のいずれかに記載のフラ
ッシュメモリのデータ管理装置により前記記憶領域にパ
ケット単位でデータを記憶し、前記記憶領域とは異なる
別の記憶領域を用いて当該記憶領域を更新する装置であ
って、 前記記憶領域は、当該記憶領域の管理に関する領域管理
データを格納するための領域管理部と、パケットを格納
するためのパケット部とからなり、 前記領域管理部には、前記領域管理データとして、前記
記憶領域の異なる4つの状態を示す領域状態情報が格納
可能となっており、 前記記憶領域を更新するときは、データ書込開始時に前
記記憶領域の領域状態情報をデータの更新中であること
を示す第3の状態に且つ前記別の記憶領域の領域状態情
報をデータの新規書込中であることを示す第1の状態に
設定し、前記記憶領域の有効なパケットのデータを前記
別の記憶領域のパケット部に書き込み、データ書込完了
時に前記別の記憶領域の領域状態情報をデータの新規書
込が完了したことを示す第2の状態に且つ前記記憶領域
の領域状態情報をデータの更新が完了したことを示す第
4の状態に設定し、 前記領域状態情報が前記第2の状態又は前記第3の状態
である記憶領域を有効な記憶領域であると判定し、前記
領域状態情報が前記第1の状態又は前記第4の状態であ
る記憶領域を無効な記憶領域であると判定するようにな
っていることを特徴とするフラッシュメモリのデータ管
理装置。
4. The flash memory data management device according to claim 1, wherein data is stored in the storage area in packet units, and the storage is performed using another storage area different from the storage area. An apparatus for updating an area, wherein the storage area includes an area management unit for storing area management data related to management of the storage area, and a packet unit for storing a packet. Can store, as the area management data, area state information indicating four different states of the storage area. When updating the storage area, the area state information of the storage area at the start of data writing Is set to a third state indicating that data is being updated, and the area state information of the another storage area is set to a first state indicating that new data is being written. A valid packet data of the storage area is written into the packet portion of the another storage area, and when the data writing is completed, the area state information of the another storage area is a second data indicating that the new writing of the data is completed. In the state, the area state information of the storage area is set to a fourth state indicating that the data update is completed, and the storage area whose area state information is the second state or the third state is valid. A flash memory, wherein the storage area is determined to be an invalid storage area, and the storage area in which the area state information is in the first state or the fourth state is determined to be an invalid storage area. Memory data management device.
【請求項5】 請求項4において、 前記領域状態情報が前記第1の状態又は前記第4の状態
である記憶領域を前記別の記憶領域として用いるように
なっていることを特徴とするフラッシュメモリのデータ
管理装置。
5. The flash memory according to claim 4, wherein a storage area whose area state information is in the first state or the fourth state is used as the another storage area. Data management device.
【請求項6】 請求項4及び5のいずれかにおいて、 前記記憶領域の領域状態情報及び前記別の記憶領域の領
域状態情報の状態に応じて前記記憶領域又は前記別の記
憶領域に対する処理を割り当てた処理定義テーブルを参
照して、前記記憶領域又は前記別の記憶領域に対する処
理を実行するようになっていることを特徴とするフラッ
シュメモリのデータ管理装置。
6. The storage area according to claim 4, wherein processing for the storage area or another storage area is assigned according to the state of the area state information of the storage area and the state of the area state information of the another storage area. A flash memory data management device configured to execute processing on the storage area or the another storage area with reference to the processing definition table.
【請求項7】 請求項1乃至6のいずれかにおいて、 前記記憶領域は、フラッシュメモリのデータ初期化単位
からなることを特徴とするフラッシュメモリのデータ管
理装置。
7. The flash memory data management device according to claim 1, wherein the storage area includes a flash memory data initialization unit.
JP32998699A 1999-11-19 1999-11-19 Flash memory data management device Expired - Fee Related JP3858538B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP32998699A JP3858538B2 (en) 1999-11-19 1999-11-19 Flash memory data management device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP32998699A JP3858538B2 (en) 1999-11-19 1999-11-19 Flash memory data management device

Publications (3)

Publication Number Publication Date
JP2001147864A true JP2001147864A (en) 2001-05-29
JP2001147864A5 JP2001147864A5 (en) 2004-12-16
JP3858538B2 JP3858538B2 (en) 2006-12-13

Family

ID=18227502

Family Applications (1)

Application Number Title Priority Date Filing Date
JP32998699A Expired - Fee Related JP3858538B2 (en) 1999-11-19 1999-11-19 Flash memory data management device

Country Status (1)

Country Link
JP (1) JP3858538B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003010671A1 (en) * 2001-07-25 2003-02-06 Sony Corporation Non-volatile memory and non-volatile memory data rewriting method
WO2003075163A1 (en) * 2002-03-05 2003-09-12 Sanyo Electric Co., Ltd. Data storing device
JP2006268817A (en) * 2005-02-28 2006-10-05 Sony Corp Storage method, its device, and program
JP2008077669A (en) * 2007-10-09 2008-04-03 Mitsubishi Electric Corp Recording method
US7650328B2 (en) 2002-07-25 2010-01-19 Sanyo Electric Co., Ltd. Data storage device capable of storing multiple sets of history information on input/output processing of security data without duplication
US7752461B2 (en) 2002-01-15 2010-07-06 Sanyo Electric Co., Ltd. Storage apparatus that can properly recommence input and output of classified data
US7907441B2 (en) 2007-10-31 2011-03-15 Samsung Electronics Co., Ltd. Data management method and mapping table update method in non-volatile memory device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003010671A1 (en) * 2001-07-25 2003-02-06 Sony Corporation Non-volatile memory and non-volatile memory data rewriting method
US7240178B2 (en) 2001-07-25 2007-07-03 Sony Corporation Non-volatile memory and non-volatile memory data rewriting method
US7752461B2 (en) 2002-01-15 2010-07-06 Sanyo Electric Co., Ltd. Storage apparatus that can properly recommence input and output of classified data
WO2003075163A1 (en) * 2002-03-05 2003-09-12 Sanyo Electric Co., Ltd. Data storing device
US7716746B2 (en) 2002-03-05 2010-05-11 Sanyo Electric Co., Ltd. Data storing device for classified data
US7650328B2 (en) 2002-07-25 2010-01-19 Sanyo Electric Co., Ltd. Data storage device capable of storing multiple sets of history information on input/output processing of security data without duplication
JP2006268817A (en) * 2005-02-28 2006-10-05 Sony Corp Storage method, its device, and program
JP2008077669A (en) * 2007-10-09 2008-04-03 Mitsubishi Electric Corp Recording method
US7907441B2 (en) 2007-10-31 2011-03-15 Samsung Electronics Co., Ltd. Data management method and mapping table update method in non-volatile memory device

Also Published As

Publication number Publication date
JP3858538B2 (en) 2006-12-13

Similar Documents

Publication Publication Date Title
JP3792259B2 (en) Increased memory performance in flash memory devices by simultaneous write operations to multiple devices
TWI590049B (en) Memory device and operating method of same
JP3534585B2 (en) Data storage control method and apparatus for external storage device using a plurality of flash memories
JP3892851B2 (en) Memory card and semiconductor device
US20080189477A1 (en) Storage system and storage management method
JP6013626B2 (en) Non-volatile memory writing mechanism
US20010008011A1 (en) Computer
JP2010020586A (en) Data processing device
JP2012022490A (en) Data processor, data processing method, data processing program and storage device
JP2004303238A (en) Flash memory access device and method
JP2005174279A (en) Flash memory, mapping control apparatus and method for flash memory
WO2002035548A2 (en) Storing device, storing control method and program
JP2001154909A (en) Flash memory management device and recording medium
JP2001147864A (en) Data management device for flash memory
US6233664B1 (en) Apparatus and method for swapping contents between main memory and auxiliary memory and web video phone adopting the apparatus
JPH113287A (en) Storage device and storage area management method used for the device
JP2002229847A (en) Data management device of flash memory
JP2000137604A (en) System for succeeding data
JP4127307B2 (en) Data storage device, data processing system, data processing method, and data processing device
JP2009053993A (en) File system management apparatus
JP2011081561A (en) Information processing apparatus
JP2003030046A (en) Cache controller having pre-fetch mechanism of instruction cache
JPH08328845A (en) Control program rewriting method for rom
JP2003150441A (en) Data management method, device thereof, data management program, and storage medium storing data management program
JP3594265B2 (en) Disk cache device

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040115

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040115

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060613

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060620

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060801

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060829

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060911

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20090929

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100929

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100929

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110929

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120929

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130929

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees