JP2000112836A - Information processor, information storing method, and storage medium - Google Patents

Information processor, information storing method, and storage medium

Info

Publication number
JP2000112836A
JP2000112836A JP10292796A JP29279698A JP2000112836A JP 2000112836 A JP2000112836 A JP 2000112836A JP 10292796 A JP10292796 A JP 10292796A JP 29279698 A JP29279698 A JP 29279698A JP 2000112836 A JP2000112836 A JP 2000112836A
Authority
JP
Japan
Prior art keywords
information
power supply
volatile memory
capacity
management information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP10292796A
Other languages
Japanese (ja)
Inventor
Shigeo Suzuki
茂夫 鈴木
Akitomo Sasaki
章友 佐々木
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP10292796A priority Critical patent/JP2000112836A/en
Publication of JP2000112836A publication Critical patent/JP2000112836A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Power Sources (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Calculators And Similar Devices (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an information processor capable of preventing flash disk management information from being lost at the time of reducing the capacity of power supply. SOLUTION: When the capacity of a battery or a dry cell is reduced and a possibility of destructing the contents of flash disk management information 8 is generated even when the information 8 is stored in a RAM 4, the contents are automatically written in a prescribed saving area of a flash ROM and saved. When power is restored again by charging or battery substitution and reset processing is started, the saved information 8 is read out and restored to a prescribed area of the RAM 4. Thereby, even when the information 8 is stored in the high speed readable/writable RAM 4, its contents are not destructed due to the reduction of power.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、携帯情報端末のよ
うに、バッテリや乾電池で駆動され、例えばデータ格納
用にフラッシュROMをディスク装置のように扱う情報
処理装置、情報格納方法および記憶媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing apparatus, such as a portable information terminal, which is driven by a battery or a dry battery and uses a flash ROM for storing data, for example, as a disk device, an information storage method, and a storage medium. .

【0002】[0002]

【従来の技術】近年、フラッシュ(Flash)ROM
の低価格化、大容量化に伴い、フラッシュROMをRO
Mとしてではなく、ディスク装置のように扱い、その上
にファイルシステムを構築するシステムが実現されてい
る。フラッシュROMは一般的に次のような特徴を有す
る。 (1)リード(読出し)はメモリのように扱えるが、ラ
イト(書込み)は特殊コマンドの発行が必要である。 (2)一旦、イレース(消去)してからでないとライト
できない。 (3)イレースはイレースブロック単位(一般に64K
byteなど)またはチップ単位でしか行えない。 (4)イレースに時間がかかる(一般に1秒以上)。 (5)書き換え回数に限りがある(一般に10万回な
ど)。
2. Description of the Related Art In recent years, flash ROMs have been developed.
RO with flash ROM as price and capacity increase
Instead of M, a system that treats it as a disk device and builds a file system on it is realized. Flash ROMs generally have the following features. (1) Read (read) can be handled like a memory, but write (write) requires issuing a special command. (2) Writing cannot be performed until erasing (erasing) is performed once. (3) Erase is performed in erase block units (generally 64K
byte) or chip unit. (4) Erasure takes time (typically 1 second or longer). (5) The number of rewriting is limited (generally 100,000 times).

【0003】このような特徴があるので、ディスク装置
として扱う場合、以下のような処理が行われる。 (A)フラッシュROMの各イレースブロックを、ディ
スク装置としてのブロック単位(512byte、10
24byteなど)に分割して管理する。このブロック
を実ブロックと呼ぶ。 (B)上位のソフトウェア(OSなど)から見える、デ
ィスク装置としての仮想的なブロック(仮想ブロックと
呼ぶ)と、実ブロックをマッピングするブロック変換テ
ーブルを用意する。 (C)各イレースブロックのイレース回数、各イレース
ブロックに含まれる実ブロック番号、そして各実ブロッ
クの状態を管理するイレースブロック管理テーブルを用
意する。実ブロックの状態とは、フリー(書込み可能状
態)/ビジー(書込まれて仮想ブロックにマップされて
いる状態)/ガベージ(イレースしないと書込み不可状
態)のいずれかの状態である。 (D)ブロックリード処理は、ブロック変換テーブルに
より仮想ブロック番号から実ブロック番号を得て実ブロ
ックの内容を読み出す。 (E)ブロックライト処理は、まず、ブロック変換テー
ブルにより仮想ブロック番号から実ブロック番号を得
る。このとき、まだその仮想ブロックに書込みが行われ
ていないと、実ブロック番号が得られない。その場合、
イレースブロック管理テーブルからフリー状態の実ブロ
ックを得て内容を書込み、ビジー状態とする。そして、
ブロック変換テーブルにその実ブロック番号を書き込
む。ブロック変換テーブルにより仮想ブロック番号から
実ブロック番号が得られた場合、イレースブロック管理
テーブル内のその実ブロックの状態をビジーからガベー
ジに変える。イレースブロック管理テーブルから、フリ
ー状態の実ブロックを得て内容を書込み、ビジー状態と
する。そして、ブロック変換テーブルを新しい実ブロッ
ク番号に更新する。 (F)ガベージ状態の実ブロックが増えてきたら、同期
的または非同期的にガベージコレクション処理を行う。
まず、イレースブロック管理テーブルを調べ、ガベージ
状態の実ブロックの多い、そしてイレース回数の少ない
イレースブロックを選択する。もし、そのイレースブロ
ックにビジー状態の実ブロックが含まれていた場合、そ
れをガベージ状態にするため、その内容を他のイレース
ブロックのフリー状態の実ブロックにコピーし、その実
ブロックをビジー状態とし、またブロック変換テーブル
もそれに合わせて更新する。ビジー状態の実ブロックが
なくなると、そのイレースブロックをイレースし、その
イレース回数を更新し、またそのイレースブロックに含
まれる全ての実ブロックをフリー状態とする。
[0003] Because of these features, the following processing is performed when handled as a disk device. (A) Each erase block of the flash ROM is divided into block units (512 bytes, 10 bytes,
24 bytes). This block is called a real block. (B) Prepare a block conversion table that maps a virtual block (called a virtual block) as a disk device and a real block that can be viewed from higher-level software (such as an OS). (C) Prepare an erase block management table for managing the number of erases of each erase block, the actual block number included in each erase block, and the state of each actual block. The state of the real block is any of a free (writable state) / busy (a state where data is written and mapped to a virtual block) / garbage (a write disabled state without erasing). (D) In the block read process, the real block number is obtained from the virtual block number using the block conversion table, and the contents of the real block are read. (E) In the block write process, first, the real block number is obtained from the virtual block number using the block conversion table. At this time, the real block number cannot be obtained unless writing has been performed on the virtual block. In that case,
A real block in a free state is obtained from the erase block management table, and its contents are written to make the block busy. And
Write the actual block number to the block conversion table. When the real block number is obtained from the virtual block number by the block conversion table, the state of the real block in the erase block management table is changed from busy to garbage. A free block is obtained from the erase block management table, the contents are written, and the busy block is set. Then, the block conversion table is updated to a new real block number. (F) When the number of real blocks in the garbage state increases, garbage collection processing is performed synchronously or asynchronously.
First, the erase block management table is examined, and an erase block having many actual blocks in a garbage state and having a small erase count is selected. If the erase block contains a busy real block, copy its contents to a free real block of another erase block to make it garbage, make the real block busy, The block conversion table is updated accordingly. When there are no more real blocks in the busy state, the erase block is erased, the erase count is updated, and all the real blocks included in the erase block are set to the free state.

【0004】このような処理で必要となるブロック変換
テーブルおよびイレースブロック管理テーブルからなる
フラッシュディスク管理情報は、フラッシュROM内に
置かれている方式が一般的である。
The flash disk management information including the block conversion table and the erase block management table required for such processing is generally stored in a flash ROM.

【0005】また、従来、携帯型情報機器では、その計
算機の現在の状態、住所録や文書などの情報を格納する
場合、電源が切れても記憶されているような不揮発性の
メモリ、例えはフラッシュメモリなどに格納する。電源
が切れても内容が消去されないようなメモリは、読込み
や書込みのアクセススピードがとても遅いものであるこ
とが多い。
Conventionally, in a portable information device, when storing information such as the current state of the computer, an address book and documents, a nonvolatile memory, such as a memory, which is stored even when the power is turned off, for example, Store it in flash memory. A memory whose contents are not erased even when the power is turned off often has a very low access speed for reading and writing.

【0006】これを回避するために、通常、次のような
操作を行う。すなわち、不揮発性のメモリからの読み込
み要求があった場合、不揮発性のメモリから読み込んだ
データを揮発性のメモリであるが、アクセススピードの
速いRAMに格納しておく。次に同じデータを読み込む
場合、そのRAMから読み込む。同じデータ部分の書き
換え要求があった場合、RAMに読み込んであるデータ
を書き換える。
In order to avoid this, the following operation is usually performed. That is, when there is a read request from the non-volatile memory, the data read from the non-volatile memory is stored in a volatile memory, but a RAM with a high access speed. Next, when the same data is read, the data is read from the RAM. When there is a rewrite request for the same data portion, the data read into the RAM is rewritten.

【0007】CPUが他に処理する仕事がない時や一時
的に格納しておくRAMの空き領域が無いときなどに、
書き込み要求によって書き換えられたRAMのデータを
アクセススピードの遅い不揮発性のメモリなどに格納す
る。このように、RAMは不揮発性メモリのキャッシュ
として使用するように構成されている。
When there is no other work to be processed by the CPU or when there is no free space in the RAM to temporarily store,
The data in the RAM rewritten by the write request is stored in a non-volatile memory having a low access speed. Thus, the RAM is configured to be used as a cache of the nonvolatile memory.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、上記情
報処理装置では、以下に掲げる問題があり、その改善が
要望されていた。すなわち、携帯情報端末のように、バ
ッテリや乾電池で駆動される情報処理装置の中には、バ
ッテリや乾電池の電源容量がある場合、常にDRAMや
SRAMに電力を供給し、その内容を保証し続けるシス
テムが存在する。このようなシステムの場合、フラッシ
ュディスク管理情報をDRAMやSRAMに配置するこ
とが可能となる。この方式の場合、フラッシュROM内
に配置するよりも書き換えが高速であるという利点があ
る。
However, the above-mentioned information processing apparatus has the following problems, and improvement thereof has been demanded. That is, in a data processing device driven by a battery or a dry battery, such as a portable information terminal, when there is a power supply capacity of the battery or the dry battery, the power is always supplied to the DRAM or the SRAM, and the contents are continuously guaranteed. The system exists. In such a system, the flash disk management information can be arranged in a DRAM or an SRAM. In the case of this method, there is an advantage that rewriting is performed at a higher speed than in the case where the flash ROM is provided.

【0009】しかし、フラッシュディスク管理情報をD
RAMやSRAMに配置する方式の場合、バッテリや乾
電池などの電源容量が減ってきてDRAMやSRAMに
十分な電力が供給されなくなると、重要なフラッシュデ
ィスク管理情報が失われてしまうという問題があった。
However, the flash disk management information is
In the case of the method of arranging in a RAM or an SRAM, there is a problem in that if sufficient power is not supplied to the DRAM or the SRAM due to a decrease in power supply capacity such as a battery or a dry cell, important flash disk management information is lost. .

【0010】また、バッテリ駆動で動作する情報処理装
置では、バッテリの残量が少なくバッテリが切れた時、
揮発性のRAMに蓄えられ変更されたデータが無くなっ
てしまうという問題があった。
Also, in an information processing apparatus that operates on battery power, when the remaining battery power is low and the battery runs out,
There is a problem that the changed data stored in the volatile RAM is lost.

【0011】そこで、本発明は、かかる問題に鑑みなさ
れたものであり、電源容量が減ってきことを検知し、所
定しきい値より少なくなると、RAM上に配置されたフ
ラッシュディスク管理情報をフラッシュROM内の所定
の退避領域に自動的に退避し(書込み)、バッテリ充電
や電池交換によって電源容量が再び十分になり、システ
ムが再び立ち上げられた場合、退避してあったフラッシ
ュディスク管理情報をRAM上に復帰(コピー)させる
ことで、電源容量が減った際にフラッシュディスク管理
情報が失われることを防ぐことができる情報処理装置、
情報格納方法および記憶媒体を提供することを目的とす
る。
Therefore, the present invention has been made in view of such a problem, and detects that the power supply capacity has decreased, and when the power supply capacity falls below a predetermined threshold, the flash disk management information arranged on the RAM is stored in the flash ROM. When the system is automatically backed up (written) to a predetermined evacuation area, the power capacity becomes sufficient again by battery charging or battery replacement, and the system is started again, the flash disk management information that has been backed up is stored in RAM. An information processing device that can prevent the flash disk management information from being lost when the power supply capacity is reduced by restoring (copying) the information;
It is an object to provide an information storage method and a storage medium.

【0012】また、本発明は、書き込んでいる最中にバ
ッテリがなくなったとしても、データの消失量を少なく
することができる情報処理装置、情報格納方法および記
憶媒体を提供することを他の目的とする。
Another object of the present invention is to provide an information processing apparatus, an information storage method, and a storage medium that can reduce the amount of data loss even if the battery runs out during writing. And

【0013】[0013]

【課題を解決するための手段】上記目的を達成するため
に、本発明の請求項1に記載の情報処理装置は、不揮発
性メモリにデータを格納する際に必要となる管理情報
を、電源から供給される電力により内容を保持する揮発
性メモリに記憶する情報処理装置において、前記電源の
容量を検知し、該検知された電源の容量が所定のしきい
値より少なくなったか否かを判別する電源容量検知手段
と、前記電源の容量が前記所定のしきい値より少なくな
ったと判別された場合、前記不揮発性メモリに設けられ
た退避領域に退避されている情報が有効であるか無効で
あるかを調べ、無効である場合、退避処理を行うと決定
し、有効である場合、退避処理を行わないと決定する退
避処理決定手段と、前記退避処理を行うと決定された場
合、前記退避領域を書き込み可能な状態にしてから前記
揮発性メモリに記憶された管理情報を書き込むことで退
避処理を行うと共に、該退避処理が行われた管理情報が
有効であることを書き込む管理情報退避手段とを備えた
ことを特徴とする。
In order to achieve the above object, an information processing apparatus according to claim 1 of the present invention transmits management information necessary for storing data in a nonvolatile memory from a power supply. In an information processing apparatus for storing contents in a volatile memory that retains contents by supplied power, a capacity of the power supply is detected, and it is determined whether or not the detected capacity of the power supply is smaller than a predetermined threshold value. When the power supply capacity detection means determines that the power supply capacity has become smaller than the predetermined threshold value, the information saved in the save area provided in the nonvolatile memory is valid or invalid. The evacuation process determining means for determining that the evacuation process is to be performed if invalid, and the evacuation area when the evacuation process is determined to be performed. To A management information saving unit that writes the management information stored in the volatile memory to perform the saving process and writes that the management information on which the saving process has been performed is valid. It is characterized by having.

【0014】請求項2に記載の情報処理装置は、請求項
1に係る情報処理装置において、リセット時、前記退避
領域に退避されている情報が有効であるか無効であるか
を調べ、無効である場合、初期化処理を行うと決定し、
有効である場合、前記管理情報の復帰処理を行うと決定
する復帰処理決定手段と、前記初期化処理を行うと決定
された場合、前記不揮発性メモリの内容を消去して前記
管理情報を初期化する初期化処理手段と、前記復帰処理
を行うと決定された場合、前記退避領域から前記管理情
報を読み出し、前記不揮発性メモリにデータを格納する
処理を復帰させる復帰処理手段とを備えたことを特徴と
する。
According to a second aspect of the present invention, in the information processing apparatus according to the first aspect, upon resetting, it is determined whether the information saved in the save area is valid or invalid. In some cases, it is decided to perform initialization processing,
If it is valid, the return processing determining means for determining that the return processing of the management information is to be performed, and if it is determined that the initialization processing is to be performed, the contents of the nonvolatile memory are erased to initialize the management information. Initialization processing means for performing the return processing, and the return processing means for reading out the management information from the save area and restoring the processing of storing data in the nonvolatile memory when it is determined to perform the return processing. Features.

【0015】請求項3に記載の情報処理装置は、請求項
1または請求項2に係る情報処理装置において、前記管
理情報が更新された場合、前記退避領域に退避されてい
る管理情報が無効になったことを書き込む退避情報無効
化手段を備えたことを特徴とする。
According to a third aspect of the present invention, in the information processing apparatus according to the first or second aspect, when the management information is updated, the management information saved in the save area becomes invalid. It is characterized by comprising a save information invalidating means for writing that the information has become invalid.

【0016】請求項4に記載の情報処理装置では、請求
項1に係る情報処理装置において、前記電源容量検知手
段によって判別に使用されるしきい値は、前記揮発性メ
モリの内容を保持できなくなる、あるいは前記退避処理
決定手段および前記管理情報退避手段を実行できなくな
る際の前記電源の容量に応じて設定されていることを特
徴とする。
According to a fourth aspect of the present invention, in the information processing apparatus according to the first aspect, the threshold value used for determination by the power supply capacity detecting means cannot retain the contents of the volatile memory. Alternatively, the setting is made according to the capacity of the power supply when the evacuation processing determining means and the management information evacuation means cannot be executed.

【0017】請求項5に記載の情報処理装置では、請求
項1に係る情報処理装置において、前記電源容量検知手
段によって判別に使用されるしきい値は、前記揮発性メ
モリの内容を保持できなくなる、あるいは前記退避処理
決定手段および前記管理情報退避手段を実行できなくな
る際の前記電源の電圧値に応じて設定されていることを
特徴とする。
According to a fifth aspect of the present invention, in the information processing apparatus according to the first aspect, the threshold value used for determination by the power supply capacity detecting means cannot retain the contents of the volatile memory. Alternatively, the setting is made in accordance with the voltage value of the power supply when the evacuation processing determining means and the management information evacuation means cannot be executed.

【0018】請求項6に記載の情報処理装置では、請求
項1に係る情報処理装置において、前記管理情報は、前
記不揮発性メモリをディスク装置として扱う際の仮想ブ
ロックと、該仮想ブロックと同一サイズで前記不揮発性
メモリを分割かつ管理される実ブロックとをマッピング
するブロック変換テーブル、および前記不揮発性メモリ
の消去回数、前記実ブロックの番号、各実ブロックの状
態などの情報を管理するブロック管理テーブルからなる
ことを特徴とする。
According to a sixth aspect of the present invention, in the information processing apparatus according to the first aspect, the management information includes a virtual block when the non-volatile memory is treated as a disk device, and a virtual block having the same size as the virtual block. A block conversion table that maps the non-volatile memory to real blocks that are divided and managed, and a block management table that manages information such as the number of times of erasing of the non-volatile memory, the number of the real blocks, and the state of each real block It is characterized by consisting of.

【0019】請求項7に記載の情報処理装置では、請求
項1に係る情報処理装置において、前記有効および前記
無効が書き込まれるフラグ領域は、少なくとも2ビット
で構成され、前記有効を示す値は、全てのビットが値0
でなく、かつ全てのビットが値1でないマジックナンバ
であり、前記有効から前記無効に切り替える際、全ての
ビットを値0に上書きすることを特徴とする。
According to a seventh aspect of the present invention, in the information processing apparatus according to the first aspect, the flag area in which the validity and the invalidity are written includes at least two bits, and the value indicating the validity is: All bits have value 0
, And not all bits are magic numbers having a value of 1, and when switching from the valid to the invalid, all bits are overwritten with a value of 0.

【0020】請求項8に記載の情報格納方法は、不揮発
性メモリにデータを格納する際に必要となる管理情報
を、電源から供給される電力により内容を保持する揮発
性メモリに記憶する情報格納方法において、前記電源の
容量を検知し、該検知された電源の容量が所定のしきい
値より少なくなったか否かを判別する工程と、前記電源
の容量が前記所定のしきい値より少なくなったと判別さ
れた場合、前記不揮発性メモリに設けられた退避領域に
退避されている情報が有効であるか無効であるかを調
べ、無効である場合、退避処理を行うと決定し、有効で
ある場合、退避処理を行わないと決定する工程と、前記
退避処理を行うと決定された場合、前記退避領域を書き
込み可能な状態にしてから前記揮発性メモリに記憶され
た管理情報を書き込むことで退避処理を行うと共に、該
退避処理が行われた管理情報が有効であることを書き込
む工程とを有することを特徴とする。
An information storage method according to an eighth aspect of the present invention is an information storage method for storing management information required for storing data in a non-volatile memory in a volatile memory that retains contents by using power supplied from a power supply. Detecting a capacity of the power supply and determining whether the detected capacity of the power supply is less than a predetermined threshold; and determining that the capacity of the power supply is less than the predetermined threshold. When it is determined that the information saved in the save area provided in the nonvolatile memory is valid or invalid, if it is determined that the information is invalid, it is determined that a save process is to be performed and the information is valid. In the case, a step of deciding not to perform the save processing, and, if it is decided to perform the save processing, writing the management information stored in the volatile memory after setting the save area in a writable state Performs saving processing in the management information to which the save process has been performed and having a step of writing to be valid.

【0021】請求項9に記載の情報格納方法は、請求項
8に係る情報格納方法において、リセット時、前記退避
領域に退避されている情報が有効であるか無効であるか
を調べ、無効である場合、初期化処理を行うと決定し、
有効である場合、前記管理情報の復帰処理を行うと決定
する工程と、前記初期化処理を行うと決定された場合、
前記不揮発性メモリの内容を消去して前記管理情報を初
期化する工程と、前記復帰処理を行うと決定された場
合、前記退避領域から前記管理情報を読み出し、前記不
揮発性メモリにデータを格納する処理を復帰させる工程
とを有することを特徴とする。
According to a ninth aspect of the present invention, in the information storage method according to the eighth aspect, at the time of reset, it is determined whether the information saved in the save area is valid or invalid. In some cases, it is decided to perform initialization processing,
If valid, a step of determining to perform the management information return process, and if it is determined to perform the initialization process,
Erasing the contents of the non-volatile memory to initialize the management information, and, if it is determined to perform the return processing, reading the management information from the save area and storing data in the non-volatile memory And a step of returning the processing.

【0022】請求項10に記載の情報格納方法は、請求
項8または請求項9に係る情報格納方法において、前記
管理情報が更新された場合、前記退避領域に退避されて
いる管理情報が無効になったことを書き込む工程を有す
ることを特徴とする。
According to a tenth aspect of the present invention, in the information storage method according to the eighth or ninth aspect, when the management information is updated, the management information saved in the save area becomes invalid. It is characterized by having a step of writing that it has become.

【0023】請求項11に記載の情報格納方法は、請求
項8に係る情報格納方法において、前記電源の容量を検
知する工程で使用されるしきい値は、前記揮発性メモリ
の内容を保持できなくなる、あるいは前記退避処理を行
うか否かを決定する工程および前記管理情報を退避させ
る工程を実行できなくなる際の前記電源の容量に応じて
設定されていることを特徴とする。
In the information storage method according to an eleventh aspect, in the information storage method according to the eighth aspect, the threshold value used in the step of detecting the capacity of the power supply can hold the content of the volatile memory. It is set in accordance with the capacity of the power supply at the time when it is no longer possible to execute the step of deciding whether or not to perform the save processing and the step of saving the management information.

【0024】請求項12に記載の情報格納方法は、請求
項8に係る情報格納方法において、前記電源容量を検知
する工程で使用されるしきい値は、前記揮発性メモリの
内容を保持できなくなる、あるいは前記退避処理を行う
か否かを決定する工程および前記管理情報を退避させる
工程を実行できなくなる際の前記電源の電圧値に応じて
設定されていることを特徴とする。
According to a twelfth aspect of the present invention, in the information storage method according to the eighth aspect, the threshold used in the step of detecting the power supply capacity cannot retain the contents of the volatile memory. Alternatively, the setting is made according to the voltage value of the power supply at the time when the step of determining whether to perform the saving process and the step of saving the management information cannot be performed.

【0025】請求項13に記載の情報格納方法では、請
求項8に係る情報格納方法において、前記管理情報は、
前記不揮発性メモリをディスク装置として扱う際の仮想
ブロックと、該仮想ブロックと同一サイズで前記不揮発
性メモリを分割かつ管理される実ブロックとをマッピン
グするブロック変換テーブル、および前記不揮発性メモ
リの消去回数、前記実ブロックの番号、各実ブロックの
状態などの情報を管理するブロック管理テーブルからな
ることを特徴とする。
In the information storage method according to the thirteenth aspect, in the information storage method according to the eighth aspect, the management information includes:
A block conversion table that maps a virtual block when the non-volatile memory is treated as a disk device and a real block that is the same size as the virtual block and that divides and manages the non-volatile memory; , A block management table for managing information such as the number of the real block and the state of each real block.

【0026】請求項14に記載の情報格納方法では、請
求項8に係る情報格納方法において、前記有効および前
記無効が書き込まれるフラグ領域は、少なくとも2ビッ
トで構成され、前記有効を示す値は、全てのビットが値
0でなく、かつ全てのビットが値1でないマジックナン
バであり、前記有効から前記無効に切り替える際、全て
のビットを値0に上書きすることを特徴とする。
According to a fourteenth aspect of the present invention, in the information storage method according to the eighth aspect, the flag area in which the validity and the invalidity are written includes at least two bits, and the value indicating the validity is: A magic number in which not all bits are 0 and all bits are not 1, and when switching from the valid to the invalid, all bits are overwritten with a value of 0.

【0027】請求項15に記載の記憶媒体は、情報処理
装置内のCPUによって実行され、不揮発性メモリにデ
ータを格納する際に必要となる管理情報を、電源から供
給される電力により内容を保持する揮発性メモリに記憶
するプログラムが格納された記憶媒体において、前記プ
ログラムは、前記電源の容量を検知し、該検知された電
源の容量が所定のしきい値より少なくなったか否かを判
別する手順と、前記電源の容量が前記所定のしきい値よ
り少なくなったと判別された場合、前記不揮発性メモリ
に設けられた退避領域に退避されている情報が有効であ
るか無効であるかを調べ、無効である場合、退避処理を
行うと決定し、有効である場合、退避処理を行わないと
決定する手順と、前記退避処理を行うと決定された場
合、前記退避領域を書き込み可能な状態にしてから前記
揮発性メモリに記憶された管理情報を書き込むことで退
避処理を行うと共に、該退避処理が行われた管理情報が
有効であることを書き込む手順とを含むことを特徴とす
る。
A storage medium according to a fifteenth aspect is executed by a CPU in an information processing apparatus, and retains management information required for storing data in a nonvolatile memory by power supplied from a power supply. In a storage medium storing a program to be stored in a volatile memory, the program detects the capacity of the power supply, and determines whether the detected capacity of the power supply is smaller than a predetermined threshold value. And determining whether the information saved in the save area provided in the nonvolatile memory is valid or invalid when it is determined that the capacity of the power supply is smaller than the predetermined threshold. If it is invalid, it is determined that the evacuation process is to be performed. If it is valid, it is determined that the evacuation process is not to be performed. Writing the management information stored in the volatile memory after writing to the volatile memory, and performing a save process, and writing that the management information on which the save process has been performed is valid. Features.

【0028】請求項16に記載の情報処理装置は、デー
タを格納する際に使用される不揮発性メモリおよび揮発
性メモリを有し、前記不揮発性メモリにデータを格納す
る場合、一旦、前記揮発性メモリにデータを書き込んだ
後、該データを前記不揮発性メモリに書き込む情報処理
装置において、前記揮発性メモリに電力を供給する電源
の容量を検出する電源容量検出手段と、前記不揮発性メ
モリにデータを格納する場合、前記検出された電源の容
量に基づき、前記データの格納手順を変更するデータ格
納手順変更手段とを備えたことを特徴とする。
An information processing apparatus according to a sixteenth aspect has a nonvolatile memory and a volatile memory used for storing data, and when storing data in the nonvolatile memory, the volatile memory is temporarily stored in the nonvolatile memory. An information processing device that writes data to the memory and then writes the data to the nonvolatile memory; a power supply capacity detecting unit that detects a capacity of a power supply that supplies power to the volatile memory; In the case of storing, a data storage procedure changing means for changing the data storage procedure based on the detected power supply capacity is provided.

【0029】請求項17に記載の情報処理装置では、請
求項16に係る情報処理装置において、前記データ格納
手順変更手段は、一旦、前記揮発性メモリに書き込んだ
後に前記不揮発性メモリに書き込むか、あるいは直接、
前記不揮発性メモリに書き込むかを切り替えることを特
徴とする。
[0029] In the information processing apparatus according to claim 17, in the information processing apparatus according to claim 16, the data storage procedure changing means writes the data into the volatile memory and then writes the data into the nonvolatile memory. Or directly,
It is characterized in that whether to write to the nonvolatile memory is switched.

【0030】請求項18に記載の情報処理装置は、請求
項17に係る情報処理装置において、前記電源容量検出
手段により前記電源の容量が所定のしきい値より少ない
と検出された場合、直接、前記不揮発性メモリに書き込
むことを特徴とする。
An information processing apparatus according to claim 18 is the information processing apparatus according to claim 17, wherein when the power supply capacity detecting means detects that the power supply capacity is smaller than a predetermined threshold value, The data is written in the nonvolatile memory.

【0031】請求項19に記載の情報格納方法は、デー
タを格納する際に使用される不揮発性メモリおよび揮発
性メモリを有し、前記不揮発性メモリにデータを格納す
る場合、一旦、前記揮発性メモリにデータを書き込んだ
後、該データを前記不揮発性メモリに書き込む情報格納
方法において、前記揮発性メモリに電力を供給する電源
の容量を検出する工程と、前記不揮発性メモリにデータ
を格納する場合、前記検出された電源の容量に基づき、
前記データの格納手順を変更する工程とを有することを
特徴とする。
An information storage method according to a nineteenth aspect has a nonvolatile memory and a volatile memory used for storing data, and when storing data in the nonvolatile memory, the volatile memory is temporarily stored in the nonvolatile memory. In the information storage method for writing data to a memory and then writing the data to the nonvolatile memory, a step of detecting a capacity of a power supply for supplying power to the volatile memory, and a step of storing data in the nonvolatile memory , Based on the detected power supply capacity,
Changing the data storage procedure.

【0032】請求項20に記載の情報格納方法は、請求
項19に係る情報格納方法において、前記データの格納
手順を変更する工程では、一旦、前記揮発性メモリに書
き込んだ後に前記不揮発性メモリに書き込むか、あるい
は直接、前記不揮発性メモリに書き込むかを切り替える
ことを特徴とする。
According to a twentieth aspect of the present invention, in the information storage method according to the nineteenth aspect, in the step of changing the data storage procedure, the data is temporarily written into the volatile memory and then stored in the nonvolatile memory. Switching between writing and directly writing to the non-volatile memory is characterized.

【0033】請求項21に記載の情報格納方法は、請求
項19に係る情報格納方法において、前記電源の容量を
検出する工程で前記電源の容量が所定のしきい値より少
ないと検出された場合、直接、前記不揮発性メモリに書
き込むことを特徴とする。
According to a twenty-first aspect of the present invention, in the information storage method according to the nineteenth aspect, when the capacity of the power supply is detected to be smaller than a predetermined threshold value in the step of detecting the capacity of the power supply. , Directly in the nonvolatile memory.

【0034】請求項22に記載の記憶媒体は、情報処理
装置内のCPUによって実行され、不揮発性メモリにデ
ータを格納する場合、一旦、前記揮発性メモリにデータ
を書き込んだ後、該データを前記不揮発性メモリに書き
込むプログラムが格納された記憶媒体において、前記プ
ログラムは、前記揮発性メモリに電力を供給する電源の
容量を検出する手順と、前記不揮発性メモリにデータを
格納する場合、前記検出された電源の容量に基づき、前
記データの格納手順を変更する手順とを含むことを特徴
とする。
The storage medium according to claim 22 is executed by a CPU in an information processing apparatus, and when storing data in a nonvolatile memory, once writes the data to the volatile memory and then stores the data in the nonvolatile memory. In a storage medium storing a program to be written in a nonvolatile memory, the program is configured to detect a capacity of a power supply for supplying power to the volatile memory, and to store data in the nonvolatile memory. And changing the data storage procedure based on the capacity of the power supply.

【0035】[0035]

【発明の実施の形態】本発明の情報処理装置、情報格納
方法および記憶媒体の実施の形態について説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments of an information processing apparatus, an information storage method, and a storage medium according to the present invention will be described.

【0036】[第1の実施形態]図1は第1の実施形態
における情報処理装置のハードウェア構成を示すブロッ
ク図である。図において、1は本装置に電力を供給する
バッテリである。2はバッテリ1の電源容量を検知し、
設定されたしきい値より少なくなった場合、CPU3に
割り込みをかけたり、レジスタ値を変化させる電源容量
検知装置である。
[First Embodiment] FIG. 1 is a block diagram showing a hardware configuration of an information processing apparatus according to a first embodiment. In the figure, reference numeral 1 denotes a battery for supplying power to the apparatus. 2 detects the power supply capacity of the battery 1,
This is a power supply capacity detecting device that interrupts the CPU 3 or changes the register value when the threshold value becomes smaller than the set threshold value.

【0037】3は後述するプログラム、ドライバプログ
ラム、アプリケーションプログラムなどを実行するCP
Uである。4はSRAMやDRAMなどのRAMであ
り、5はフラッシュ(FLASH)ROMである。6は
それらを接続するシステムバスである。7は後述するプ
ログラム、ドライバプログラム、アプリケーションプロ
グラムなどのプログラムコードおよびデータ(プログラ
ムコード/データ)である。8はブロック変換テーブ
ル、イレースブロック管理テーブルなどのフラッシュデ
ィスク管理情報である。プログラムコード/データ7お
よびフラッシュディスク管理情報8はRAM4に配置さ
れる。
Reference numeral 3 denotes a CP for executing a program, a driver program, an application program, and the like to be described later.
U. Reference numeral 4 denotes a RAM such as an SRAM or DRAM, and reference numeral 5 denotes a flash (FLASH) ROM. Reference numeral 6 denotes a system bus connecting them. Reference numeral 7 denotes a program code and data (program code / data) such as a program, a driver program, and an application program described later. Reference numeral 8 denotes flash disk management information such as a block conversion table and an erase block management table. The program code / data 7 and the flash disk management information 8 are arranged in the RAM 4.

【0038】9はフラッシュディスク管理情報8を退避
するためのフラッシュディスク管理情報退避領域であ
り、10はフラッシュROM5をディスク装置として扱
う際の実ブロック領域である。フラッシュディスク管理
情報退避領域9および実ブロック領域10はフラッシュ
(Flash)ROM5に配置される。
Reference numeral 9 denotes a flash disk management information save area for saving the flash disk management information 8, and reference numeral 10 denotes a real block area when the flash ROM 5 is used as a disk device. The flash disk management information save area 9 and the real block area 10 are arranged in a flash ROM 5.

【0039】11は充電時に外部電源を接続するための
充電用コネクタであり、12は充電用コネクタ11を介
して接続された外部電源からの電力を基にバッテリ1を
充電するバッテリ充電装置である。尚、バッテリ1は乾
電池であってもよい。その場合、充電が不可能であるの
で、充電用コネクタ11、バッテリ充電装置12は不要
となり、充電の代わりに電池交換作業が必要となる。
Reference numeral 11 denotes a charging connector for connecting an external power supply during charging, and reference numeral 12 denotes a battery charging device that charges the battery 1 based on power from the external power supply connected via the charging connector 11. . Note that the battery 1 may be a dry battery. In this case, since charging is not possible, the charging connector 11 and the battery charger 12 are not required, and a battery replacement operation is required instead of charging.

【0040】13は本装置のユーザインターフェースの
出力手段としての液晶ディスプレイであり、14は入力
手段としてのデジタイザである。尚、液晶ディスプレイ
13およびデジタイザ14は無くてもよく、特に制限さ
れるものではない。
Reference numeral 13 denotes a liquid crystal display as output means of a user interface of the apparatus, and reference numeral 14 denotes a digitizer as input means. Note that the liquid crystal display 13 and the digitizer 14 may not be provided, and are not particularly limited.

【0041】図2はフラッシュディスク管理情報8を構
成する2つのテーブルを示す図である。201はブロッ
ク変換テーブルであり、202はイレースブロック管理
テーブルである。
FIG. 2 is a diagram showing two tables constituting the flash disk management information 8. 201 is a block conversion table, and 202 is an erase block management table.

【0042】図3はブロック変換テーブル201とイレ
ースブロック管理テーブル202を退避させる領域であ
るフラッシュディスク管理情報退避領域9の構成を示す
図である。301は退避されたテーブルの内容が有効な
ものか無効なものかを示す退避情報有効フラグである。
302はブロック変換テーブル退避領域、303はイレ
ースブロック管理テーブル退避領域である。これら3つ
の領域が格納できるだけのイレースブロックがフラッシ
ュディスク管理情報退避領域9として割り当てられるこ
とになる。
FIG. 3 is a diagram showing the structure of the flash disk management information save area 9 which is an area for saving the block conversion table 201 and the erase block management table 202. Reference numeral 301 denotes a save information valid flag indicating whether the contents of the saved table are valid or invalid.
302 is a block conversion table save area, and 303 is an erase block management table save area. Erase blocks that can store these three areas are allocated as the flash disk management information save area 9.

【0043】退避情報有効フラグ301は最低2ビット
必要であり、1バイトでも4バイトでも構わない。そし
て、「有効」であることを意味する値を、全てのビット
が値0でなく、かつ全てのビットが値1でないあるマジ
ックナンバに決めておく。例えば、退避情報有効フラグ
301を1バイトとすると、0(HEX)でもff(H
EX)でもない、例えば12(HEX)などの数をマジ
ックナンバに決めておく。退避情報有効フラグ301が
マジックナンバであった場合、退避された情報が「有
効」であることを意味し、それ以外であった場合、「無
効」であることを意味する。
The save information valid flag 301 requires at least 2 bits, and may be 1 byte or 4 bytes. Then, a value meaning "valid" is determined to a certain magic number in which all bits are not 0 and all bits are not 1. For example, assuming that the save information valid flag 301 is 1 byte, even if 0 (HEX), ff (H
A number other than EX), for example, 12 (HEX) is determined as a magic number. If the save information valid flag 301 is a magic number, it means that the saved information is “valid”, otherwise, it is “invalid”.

【0044】つまり、フラッシュディスク管理情報退避
領域9を全てイレースしたとすると、退避情報有効フラ
グ301がff(HEX)となるので、「無効」である
ことを意味する。また、「有効」から「無効」にフラグ
を切り替える際、0(HEX)を書き込むようにする。
このようにすれば、フラッシュ(Flash)ROMは
一般にイレースしなければ値0から値1に書き換えでき
ないが、値1から値0への書き換えはイレースしなくて
も可能なので、「有効」から「無効」へのフラグの切り
替えはイレース処理なしで実行可能となる。
That is, assuming that the entire flash disk management information save area 9 has been erased, the save information valid flag 301 becomes ff (HEX), which means that it is "invalid". When switching the flag from “valid” to “invalid”, 0 (HEX) is written.
In this manner, a flash ROM cannot be generally rewritten from a value 0 to a value 1 without erasing it, but can be rewritten from a value 1 to a value 0 without erasing. Can be executed without the erasing process.

【0045】ここで、フラッシュ(Flash)ROM
5は一般的に次のような特徴を持つ。リードは通常のR
AMと同様、直接アクセスすることが可能である。ライ
トは一度イレースしてからでないと行えない。また、R
AMのようにCPUが直接ライトできるわけではなく、
特殊なコマンド列をフラッシュ(Flash)ROM5
に発行する形で行う。また一度書き込んだ場所に上書き
する場合、一度、イレースしなければならない。また、
イレースは64kバイトといった単位(この単位をイレ
ースブロックと呼ぶことにする)でしか行うことができ
ない。そしてイレース回数が10万回程度までしか保証
されていない。
Here, a flash ROM
5 generally has the following characteristics. Lead is normal R
Like AM, direct access is possible. Lights can only be erased once. Also, R
The CPU can not write directly like AM,
Flash ROM5 special command string
To be issued to In addition, when overwriting a previously written location, it must be erased once. Also,
Erase can be performed only in units of 64 kbytes (this unit will be referred to as an erase block). And the number of erasures is guaranteed only up to about 100,000.

【0046】このような特徴を持つフラッシュ(Fla
sh)ROM5をディスク装置のように扱えるようにす
るために、ドライバプログラムは、一般に以下のような
処理を行う。
A flash having such characteristics (Fla)
sh) The driver program generally performs the following processing so that the ROM 5 can be handled like a disk device.

【0047】ディスク装置は512バイト、1024バ
イトといったブロック単位で扱われる。したがって、図
4に示すように、フラッシュROM5の実ブロック領域
10をブロック単位で分割し、それぞれに実ブロック番
号を割り当てて管理する。図4はフラッシュROM5の
実ブロック領域10を示す図である。
The disk device is handled in block units such as 512 bytes and 1024 bytes. Therefore, as shown in FIG. 4, the real block area 10 of the flash ROM 5 is divided into blocks, and each block is assigned a real block number and managed. FIG. 4 is a diagram showing the real block area 10 of the flash ROM 5.

【0048】仮想ブロック番号と実ブロック番号の変換
を行うためのブロック変換テーブル201(図2(A)
参照)を用意する。ドライバプログラムを利用するファ
イルシステムプログラムやアプリケーションプログラム
は、仮想ブロック番号を指定することで仮想的なディス
ク装置を扱うことになる。
A block conversion table 201 for converting between a virtual block number and a real block number (FIG. 2A)
Prepare). A file system program or an application program that uses a driver program handles a virtual disk device by specifying a virtual block number.

【0049】また、イレースブロック管理テーブル20
2(図2(B)参照)を用意する。イレースブロック管
理テーブル202は、実ブロック領域10の各イレース
ブロック毎にイレースブロックの状態(イレース回
数)、イレースブロックに含まれる各実ブロックの書込
状態、つまりフリー(書込可能状態)/ビジー(書き込
まれて仮想ブロックにマップされている状態)/ガベー
ジ(イレースしないと書込不可状態)のいずれの状態か
という情報を管理する。
The erase block management table 20
2 (see FIG. 2B). The erase block management table 202 indicates the erase block state (the number of erases) for each erase block in the real block area 10 and the write state of each real block included in the erase block, that is, free (writable state) / busy ( It manages information indicating whether the state is a state of being written and mapped to a virtual block) or a garbage state (a write-disabled state if not erased).

【0050】イレースブロックのサイズが64kバイ
ト、ブロックのサイズが512バイトの場合、1イレー
スブロックには、128の実ブロックが入ることにな
る。そして、イレースブロック、ブロック共に値0から
番号付けされる。
If the size of the erase block is 64 kbytes and the size of the block is 512 bytes, one erase block contains 128 real blocks. Then, both the erase block and the block are numbered from the value 0.

【0051】ドライバプログラムの初期状態では、全イ
レースブロックがイレースされ、全ての実ブロックがフ
リー状態となり、ブロック変換テーブル201も全て空
の状態となる。初期状態のとき、例えば、利用者から仮
想ブロック番号3(仮想ブロック[3]と表記する)へ
のライト要求が発行されると、まず対象となるイレース
ブロックを選ぶ。この場合、最もイレース回数の少ない
イレースブロックを選択する。イレースブロック番号2
(イレースブロック[2]と表記する)が選ばれたとす
る。
In the initial state of the driver program, all erase blocks are erased, all real blocks are in a free state, and all the block conversion tables 201 are empty. In the initial state, for example, when a user issues a write request to virtual block number 3 (denoted as virtual block [3]), a target erase block is first selected. In this case, the erase block having the least number of erases is selected. Erase block number 2
(Denoted as erase block [2]) is selected.

【0052】そして、全てフリー状態になっている実ブ
ロックの先頭から使用していく。この例では、実ブロッ
ク番号256(実ブロック[256]と表記する)とな
る。この実ブロック[256]にデータの書込処理を行
い、この実ブロックをビジー状態とする。最後にブロッ
ク変換テーブル201の仮想ブロック[3]のエントリ
に実ブロック番号256を書き込む。
Then, the real blocks which are all in the free state are used from the beginning. In this example, the actual block number is 256 (denoted as an actual block [256]). Data is written to the real block [256], and the real block is set to a busy state. Finally, the real block number 256 is written to the entry of the virtual block [3] in the block conversion table 201.

【0053】これ以降の上書きでないライト処理は、実
ブロック[257]、実ブロック[258]、...と
順に使用して上記と同様の処理が行われる。イレースブ
ロック[2]を使いきると、また新しいイレースブロッ
クを上記と同様の方法で選択し、同様の処理を繰り返し
ていく。
The subsequent write processing that is not overwriting includes the real block [257], the real block [258],. . . And the same processing as above is performed. When the erase block [2] is used up, a new erase block is selected in the same manner as described above, and the same processing is repeated.

【0054】上書きのライト要求が発行された場合、例
えば再び仮想ブロック[3]へのライト要求が発行され
た場合、まず、ブロック変換テーブル201によりマッ
ピングされている実ブロック[256]をガベージ状態
として無効化する(イレースブロック管理テーブル20
2の対応するエントリを更新する)。そして、再び新し
い実ブロックを得て、データの書込処理を行ってビジー
状態とし、ブロック変換テーブル201の仮想ブロック
[3]のエントリを更新する。
When an overwrite write request is issued, for example, when a write request to the virtual block [3] is issued again, first, the real block [256] mapped by the block conversion table 201 is set to a garbage state. Invalidate (erase block management table 20
2 corresponding entries are updated). Then, a new real block is obtained again, data writing processing is performed, the state is changed to a busy state, and the entry of the virtual block [3] in the block conversion table 201 is updated.

【0055】このように、上書きライト処理を繰り返す
と、ガベージ状態の実ブロックが増えていき、また、フ
リー状態の実ブロックが減っていく。したがって、ある
タイミングでガベージコレクションを行う必要がある。
ガベージコレクションを行う場合、イレースブロック管
理テーブル202を参照し、フリー状態の実ブロックが
無く、ガベージ状態の実ブロックが多く、イレース回数
の少ないイレースブロックが対象となる。このイレース
ブロック中のビジー状態の実ブロックの内容を全て他の
イレースブロック内のフリー状態の実ブロックにコピー
し、コピー先の実ブロックをビジー状態とし、また、ブ
ロック変換テーブル201の対応するエントリの更新も
行う。
As described above, when the overwrite write process is repeated, the number of real blocks in the garbage state increases, and the number of real blocks in the free state decreases. Therefore, it is necessary to perform garbage collection at a certain timing.
When garbage collection is performed, the erase block management table 202 is referred to, and there are no free real blocks, many garbage real blocks, and a small number of erase blocks. All the contents of the busy real block in the erase block are copied to the free real block in another erase block, the copy destination real block is made busy, and the corresponding entry of the corresponding entry in the block conversion table 201 is copied. Updates are also performed.

【0056】これらの処理がすべて終了すると、そのイ
レースブロックをイレースし(イレースブロック管理テ
ーブル202内のイレース回数を更新)、そのイレース
ブロックに属する全ての実ブロックをフリー状態とする
(イレースブロック管理テーブル202の対応するエン
トリを更新する)。このガベージコレクション処理は、
周期的に行うようにしてもよく、また、フリー状態の実
ブロック数があるしきい値以下になった場合に行うよう
にしてもよい。
When all these processes are completed, the erase block is erased (the number of erases in the erase block management table 202 is updated), and all the real blocks belonging to the erase block are set to the free state (the erase block management table 202). 202 is updated). This garbage collection process
It may be performed periodically, or may be performed when the number of actual blocks in the free state falls below a certain threshold.

【0057】リード要求が発行された場合、ブロック変
換テーブル201を参照することにより、指定された仮
想ブロックにマップされている実ブロックを得て、その
データ内容を利用者のメモリ領域にコピーする。
When a read request is issued, a real block mapped to a designated virtual block is obtained by referring to the block conversion table 201, and its data content is copied to the user's memory area.

【0058】このようなドライバプログラムの処理によ
り、フラッシュROM5に対し、ディスク装置のよう
に、ブロック単位でのリード/ライトを行うことが可能
となる。
By the processing of such a driver program, it is possible to read / write the flash ROM 5 in units of blocks as in a disk device.

【0059】フラッシュデスク管理情報の退避、復帰等
の動作について、添付のフローチャートを参照しながら
詳細に説明する。電源容量検知装置2には、予め適切な
しきい値が設定されている。電源容量検知装置2は、電
源容量として、例えば電圧値の変化を検知するものでも
よい。この場合、これより電圧値が下がると、RAM4
の内容を維持できなくなり、また、退避などの本処理の
実行が難しくなるという電圧値をしきい値として用い、
その値を電源容量検知装置2に設定しておく。電源容量
検知装置2は、周期的に電源電圧をチェックし、しきい
値より低くなった場合、CPU3に割り込みをかけた
り、レジスタ値(CPU3から読み出し可能)を変化さ
せる。
The operation of saving and restoring the flash desk management information will be described in detail with reference to the attached flowchart. An appropriate threshold value is set in the power supply capacity detection device 2 in advance. The power supply capacity detection device 2 may detect, for example, a change in voltage value as the power supply capacity. In this case, if the voltage value falls below this, the RAM 4
Is used as a threshold value, which makes it difficult to carry out this processing such as evacuation.
The value is set in the power supply capacity detecting device 2 in advance. The power supply capacity detecting device 2 periodically checks the power supply voltage, and when the power supply voltage becomes lower than the threshold value, interrupts the CPU 3 or changes the register value (readable from the CPU 3).

【0060】また、バッテリ1がRAM4を駆動するの
に十分な電力を持っている間、アプリケーションプログ
ラムは一旦停止し、CPU3がスリープモードなど低電
力モードに移行したとしても、バッテリ1はRAM4に
電力を供給し続け、その内容が維持されるようにしてお
く。RAM4はDRAMであり、セルフリフレッシュモ
ードなどに切り替える必要のある場合、切り替え処理を
行っておくようにする。これにより、CPU3が通常モ
ードに戻ったとき、アプリケーションプログラムは一旦
停止したところからそのまま実行を再開することができ
る。フラッシュディスク管理情報8も継続してそのまま
利用可能である。
Also, while the battery 1 has sufficient power to drive the RAM 4, the application program stops temporarily, and even if the CPU 3 shifts to a low power mode such as a sleep mode, the battery 1 keeps the RAM 4 in power. To ensure that its contents are maintained. The RAM 4 is a DRAM, and when it is necessary to switch to a self-refresh mode or the like, a switching process is performed. Thus, when the CPU 3 returns to the normal mode, the execution of the application program can be resumed from where it was once stopped. The flash disk management information 8 can be continuously used as it is.

【0061】バッテリ1にCPU3やRAM4を駆動す
るのに十分な電力がなくなると、RAM4の内容は壊
れ、バッテリ充電装置12を介して充電を行わないと、
CPU3やRAM4に電力が供給されず、プログラムが
実行されなくなる。バッテリか1が乾電池である場合、
充電の代わりに電池交換を行う。そして、電力が回復す
ると、CPU3はリセット状態となり、プログラムはリ
セット処理から実行を開始することになる。
When the battery 1 runs out of power sufficient to drive the CPU 3 and the RAM 4, the contents of the RAM 4 are destroyed and the battery 1 is not charged via the battery charger 12.
No power is supplied to the CPU 3 and the RAM 4, and the program is not executed. If the battery or one is a dry cell,
Replace the battery instead of charging. When the power is restored, the CPU 3 enters a reset state, and the program starts executing from the reset process.

【0062】図5はリセット時の処理手順を示すフロー
チャートである。この処理プログラムは図示しない記憶
媒体からRAM4にロードされてCPU3により実行可
能である。まず、退避情報有効フラグ301がマジック
ナンバであるか否かを調べ(ステップS501)、退避
された情報が「有効」か「無効」かを判別する(ステッ
プS502)。「無効」であると判別された場合、ステ
ップS503以降の初期化処理を行う。
FIG. 5 is a flowchart showing a processing procedure at the time of reset. This processing program is loaded into the RAM 4 from a storage medium (not shown) and can be executed by the CPU 3. First, it is checked whether the save information valid flag 301 is a magic number (step S501), and it is determined whether the saved information is "valid" or "invalid" (step S502). If it is determined to be "invalid", an initialization process after step S503 is performed.

【0063】リセット時の処理で「無効」であると判断
されるのは、本装置が完全な初期状態にあり、フラッシ
ュROM5が全てイレースされていたり、不定値の状態
になっているときで、退避情報有効フラグ301がマジ
ックナンバと異なる値になっている状態を意味する。
In the processing at the time of resetting, it is determined that the apparatus is "invalid" when the apparatus is in a complete initial state and the flash ROM 5 is completely erased or in an indefinite state. This means that the save information valid flag 301 has a value different from the magic number.

【0064】この場合、初期化処理を行う。フラッシュ
ROM5の全てのイレースブロックをイレースする(ス
テップS503)。ブロック変換テーブル201の全て
の実ブロック番号を空にする(ステップS504)。イ
レースブロック管理テーブル202の全てのイレース回
数を値1に初期化する(ステップS505)。イレース
ブロック管理テーブル202の全ての実ブロック状態を
フリー状態とし(ステップS506)、処理を終了す
る。
In this case, an initialization process is performed. All the erase blocks in the flash ROM 5 are erased (step S503). All the real block numbers in the block conversion table 201 are emptied (step S504). The number of all erases in the erase block management table 202 is initialized to 1 (step S505). All the real block states in the erase block management table 202 are set to the free state (step S506), and the process ends.

【0065】一方、ステップS502で「有効」である
と判別された場合、退避されていたフラッシュディスク
管理情報を復帰する処理を行う。ブロック変換テーブル
退避領域302の内容をブロック変換テーブル201に
コピーして復帰する(ステップS510)。イレースブ
ロック管理テーブル退避領域303の内容をイレースブ
ロック管理テーブル202にコピーして復帰し(ステッ
プS511)、処理を終了する。
On the other hand, if it is determined in step S502 that the flash disk management information is "valid", processing for restoring the saved flash disk management information is performed. The contents of the block conversion table save area 302 are copied to the block conversion table 201 and the process returns (step S510). The contents of the erase block management table save area 303 are copied to the erase block management table 202 and the process is restored (step S511), and the process is terminated.

【0066】図6は電源容量検知装置2によりバッテリ
1の電圧値が予め設定されたしきい値より下がったこと
が検知された場合の退避処理手順を示すフローチャート
である。この処理プログラムは、図5と同様、図示しな
い記憶媒体からRAM4にロードされてCPU3により
実行可能である。本実施形態では、電源容量検知装置2
により電圧値がしきい値より下がったことを検知したと
き、CPU3に割り込みがあがる方式について示す。
尚、レジスタ値を変える方式の場合、CPU3で動作す
るプログラムが定期的にレジスタを読み出し、その値が
変化している場合、図6のステップS602から処理を
開始するようにしてもよい。
FIG. 6 is a flowchart showing an evacuation procedure when the power supply capacity detecting device 2 detects that the voltage value of the battery 1 has fallen below a preset threshold value. This processing program can be loaded into the RAM 4 from a storage medium (not shown) and executed by the CPU 3 as in FIG. In the present embodiment, the power supply capacity detecting device 2
The method of interrupting the CPU 3 when detecting that the voltage value has dropped below the threshold value will be described.
In the case of changing the register value, a program operating on the CPU 3 may periodically read the register and, if the value has changed, start the process from step S602 in FIG.

【0067】まず、電源容量検知装置2からCPU3に
割り込みがあがると(ステップS601)、この割込み
に対応する割込み処理プログラム、または割込み処理プ
ログラムによって起動された別の処理プログラム(タス
クなど)によって以下の処理を実行する。
First, when an interrupt is raised from the power supply capacity detecting device 2 to the CPU 3 (step S601), the following interrupt processing program (task or the like) corresponding to this interrupt or another processing program started by the interrupt processing program causes the following. Execute the process.

【0068】退避情報有効フラグ301がマジックナン
バであるか否かを調べ(ステップS602)、退避され
た情報が「有効」か「無効」かを判別する(ステップS
603)。「有効」の場合、退避処理を行う必要がない
ので、それ以降の処理を終了する。一方、「無効」の場
合、退避処理を行うので、ステップS604の以降の処
理に進む。
It is checked whether the save information valid flag 301 is a magic number (step S602), and it is determined whether the saved information is "valid" or "invalid" (step S602).
603). In the case of “valid”, there is no need to perform the save processing, and the subsequent processing ends. On the other hand, in the case of “invalid”, the evacuation processing is performed, and the process proceeds to the processing after step S604.

【0069】フラッシュディスク管理情報退避領域9の
イレースブロックを全てイレースして情報を書込可能に
する(ステップS604)。ブロック変換テーブル20
1の内容をブロック変換テーブル退避領域302に書き
込んで退避する(ステップS605)。イレースブロッ
ク管理テーブル202の内容をイレースブロック管理テ
ーブル退避領域303に書き込んで退避する(ステップ
S606)。退避情報有効フラグ301にマジックナン
バを書込み、退避した情報が「有効」であることを示す
(ステップS607)。そして、処理を終了する。
All the erase blocks in the flash disk management information save area 9 are erased to enable writing of information (step S604). Block conversion table 20
1 is written to the block conversion table save area 302 and saved (step S605). The contents of the erase block management table 202 are written and saved in the erase block management table save area 303 (step S606). The magic number is written in the save information valid flag 301, indicating that the saved information is "valid" (step S607). Then, the process ends.

【0070】つぎに、リード、ライト、ガベージコレク
ション処理について示す。これらの処理は、基本的に前
述した一般的なリード、ライト、ガベージコレクション
処理と同様である。しかし、ブロック変換テーブル20
1、イレースブロック管理テーブル202の更新を伴う
ライト処理、ガベージコレクション処理の際、フラッシ
ュディスク管理情報退避領域9の情報が「無効」になっ
たことを示すため、退避情報有効フラグ301に値0
(全てのビットが値0)の値を書き込む。フラッシュR
OMでは、一般に値0の書込みはイレース処理を行わな
くても可能である。つまり、マジックナンバから値0へ
の変化はイレース処理を必要としないで、値0を書き込
むだけで十分である。
Next, the read, write, and garbage collection processes will be described. These processes are basically the same as the above-described general read, write, and garbage collection processes. However, the block conversion table 20
1. During write processing and garbage collection processing involving updating of the erase block management table 202, the value 0 is set in the save information valid flag 301 to indicate that the information in the flash disk management information save area 9 has become “invalid”.
Write the value (all bits are value 0). Flash R
In the OM, writing of the value 0 is generally possible without performing the erase process. In other words, the change from the magic number to the value 0 does not require the erasing process, and writing the value 0 is sufficient.

【0071】このように、本実施形態では、フラッシュ
ディスク管理情報8をRAM4に配置しておいても、バ
ッテリや乾電池の容量が少なくなり、フラッシュディス
ク管理情報の内容が壊れる可能性が出てくると、必要で
あれば自動的にその内容がフラッシュROMの所定の退
避領域中に書き込まれて退避が行われる。
As described above, in the present embodiment, even if the flash disk management information 8 is arranged in the RAM 4, the capacity of the battery or the dry battery is reduced, and the contents of the flash disk management information may be destroyed. Then, if necessary, the contents are automatically written into a predetermined save area of the flash ROM and saved.

【0072】そして、充電や電池交換により再び電力が
回復し、リセット処理が開始されると、退避してあった
フラッシュディスク管理情報がRAM4の所定の領域に
読み出されて復帰する。このため、フラッシュディスク
管理情報を、高速にリード/ライト可能なRAMに配置
しても、電力低下によりその内容が壊れることのないフ
ラッシュROMを利用した疑似的ディスク装置を有する
情報処理装置を提供することができる。
When the power is restored again by charging or battery replacement and the reset process is started, the saved flash disk management information is read out to a predetermined area of the RAM 4 and returned. For this reason, even if the flash disk management information is arranged in a high-speed readable / writable RAM, an information processing apparatus having a pseudo disk device using a flash ROM that does not lose its contents due to power reduction is provided. be able to.

【0073】[第2の実施形態]第2の実施形態におけ
る情報処理装置は携帯型情報機器に適用される。図7お
よび図8は第2の実施形態における携帯型情報機器の構
成および動作を示すブロック図である。図において、1
01はバッテリ102の電圧が下がってきたことを検知
するバッテリ残量検知装置である。
[Second Embodiment] The information processing apparatus according to the second embodiment is applied to a portable information device. 7 and 8 are block diagrams showing the configuration and operation of the portable information device according to the second embodiment. In the figure, 1
Reference numeral 01 denotes a battery remaining amount detection device that detects that the voltage of the battery 102 has dropped.

【0074】102は携帯型情報機器に電源電圧を供給
するバッテリである。103は電源電圧が供給されなく
てもデータを記憶しているが、揮発性メモリに比べてア
クセススピードの遅いフラッシュROMなどの不揮発性
RAMである。104はCPUである。106はCPU
104が動作するためのプログラムやデータを格納して
いるROMである。107はCPU104が一時的なデ
ータを格納しておくためのRAMである。
Reference numeral 102 denotes a battery for supplying a power supply voltage to the portable information device. Reference numeral 103 denotes a non-volatile RAM such as a flash ROM which stores data even when no power supply voltage is supplied but has a lower access speed than a volatile memory. 104 is a CPU. 106 is a CPU
A ROM that stores programs and data for operating the RAM 104. Reference numeral 107 denotes a RAM in which the CPU 104 stores temporary data.

【0075】109はディスプレイ(表示装置)であ
る。108は表示装置108を駆動するためのディスプ
レイ駆動装置である。105は外部の機器と通信を行う
ための通信装置である。110は計算機にデータを入力
するための入力装置(座標入力装置)である。
Reference numeral 109 denotes a display (display device). Reference numeral 108 denotes a display driving device for driving the display device 108. A communication device 105 communicates with an external device. Reference numeral 110 denotes an input device (coordinate input device) for inputting data to the computer.

【0076】111はROM106、RAM107、デ
ィスプレイ駆動装置108とデータのやり取りを行うた
めのバスである。112は通信装置105とデータのや
り取りを行うためのI/Oバスである。RAM107の
一部は不揮発性RAM103の一時的な記憶領域に割り
当てられている。
Reference numeral 111 denotes a bus for exchanging data with the ROM 106, the RAM 107, and the display driving device 108. Reference numeral 112 denotes an I / O bus for exchanging data with the communication device 105. Part of the RAM 107 is allocated to a temporary storage area of the nonvolatile RAM 103.

【0077】図9はRAM107に割り当てられた不揮
発性RAM103の一時的な記憶領域を管理するための
管理構造を示す図である。図において、401は書き込
むべきデータを管理するためのテーブル、402は不揮
発性RAM103に書かれるべきデータである。
FIG. 9 is a diagram showing a management structure for managing a temporary storage area of the nonvolatile RAM 103 allocated to the RAM 107. In the figure, 401 is a table for managing data to be written, and 402 is data to be written in the nonvolatile RAM 103.

【0078】図10はバッテリ駆動で動作する計算機と
しての携帯型情報機器の外観を示す図である。図におい
て、701は、CPU104、ROM106、RAM1
07、不揮発性RAM103、ディスプレイ駆動装置1
08、入力装置110などを収納する本体である。
FIG. 10 is a diagram showing the appearance of a portable information device as a computer which operates on battery power. In the figure, reference numeral 701 denotes a CPU 104, a ROM 106, a RAM 1
07, the nonvolatile RAM 103, the display driving device 1
08, a main body for housing the input device 110 and the like.

【0079】図7の例では、入力装置110がペンで入
力できるデジタイザで構成されており、デジタイザはデ
ィスプレイ109と重ね合わされている。702は計算
機にデータを入力するためのペン、703はデータ通信
を行うための無線型電話端末である。
In the example shown in FIG. 7, the input device 110 is constituted by a digitizer that can be input with a pen, and the digitizer is superimposed on the display 109. Reference numeral 702 denotes a pen for inputting data to a computer, and reference numeral 703 denotes a wireless telephone terminal for performing data communication.

【0080】このような構成を有する携帯型情報機器に
おいて、ユーザが入力した住所録の住所などを登録する
際、データを不揮発性RAM103に書き込む場合につ
いて示す。図11はデータを不揮発性RAM103に書
き込む際のデータ書き込み処理手順を示すフローチャー
トである。この処理プログラムは、前述したようにRO
M106に格納されており、CPU104によって実行
される。
In the portable information device having such a configuration, a case where data is written to the nonvolatile RAM 103 when registering an address of an address book input by a user will be described. FIG. 11 is a flowchart showing a data write processing procedure when writing data to the nonvolatile RAM 103. This processing program, as described above,
It is stored in M106 and executed by the CPU 104.

【0081】まず、不揮発性RAM103の一時的な記
憶領域として、RAM107に割り当てられた領域が一
杯であるか否かを調べる(ステップS701)。RAM
107に割り当てられた領域が一杯である場合、不揮発
性RAM103に書き込む動作(フラッシュ動作)を行
う(ステップS702)。そして、処理を終了する。
First, it is checked whether the area allocated to the RAM 107 as a temporary storage area of the nonvolatile RAM 103 is full (step S701). RAM
If the area allocated to 107 is full, an operation (flash operation) of writing to the nonvolatile RAM 103 is performed (step S702). Then, the process ends.

【0082】一方、RAM107に割り当てられた領域
が一杯でない場合、バッテリ電圧検知装置101を利用
してバッテリ残量を調べ(ステップS703)、バッテ
リ残量が少ない場合、RAM107に割り当てられた不
揮発性RAM103の一時的な記憶領域を用いず、直
接、不揮発性RAM103に書き込む(図8の矢印c参
照、ステップS704)。そして、処理を終了する。
On the other hand, if the area allocated to the RAM 107 is not full, the remaining battery level is checked using the battery voltage detecting device 101 (step S703). If the remaining battery level is low, the non-volatile RAM 103 allocated to the RAM 107 is used. Is written directly to the nonvolatile RAM 103 without using the temporary storage area (see arrow c in FIG. 8, step S704). Then, the process ends.

【0083】一方、バッテリ容量が十分に残っている場
合、ステップS705に移行して通常の書き込み処理を
行う(ステップS705〜S707)。通常の書き込み
処理では、書き込むべきデータを管理するためのテーブ
ル401を割り当てる(ステップS705)。このテー
ブルに、不揮発性RAM103への書込みが未だである
ことを示す“未書き込み”のフラグを立てる(ステップ
S706)。このテーブルを、RAM107に割り当て
られた不揮発性RAM103の一時的な記憶領域内の空
き領域に書き込み、このテーブルにより書き込んだデー
タに対してリンクを張る(ステップS707)。そし
て、処理を終了する。
On the other hand, if the battery capacity is sufficient, the flow shifts to step S705 to perform normal write processing (steps S705 to S707). In normal write processing, a table 401 for managing data to be written is allocated (step S705). In this table, an “unwritten” flag indicating that writing to the non-volatile RAM 103 has not yet been set is set (step S706). This table is written in a free area in the temporary storage area of the nonvolatile RAM 103 allocated to the RAM 107, and a link is made to the data written by this table (step S707). Then, the process ends.

【0084】このような携帯型情報機器において、ユー
ザが住所録の住所などのデータを読み出す場合について
示す。図12はデータ読み込み処理手順を示すフローチ
ャートである。この処理プログラムは、データ書き込み
処理プログラムと同様、ROM106に格納されてお
り、CPU104によって実行される。まず、ユーザか
ら要求されたデータがRAM107に割り当てられた不
揮発性RAM103の一時的な記憶領域にあるか否かを
判別する(ステップS801)。これは、図9のテーブ
ル401のリンクを辿りながら調べることにより判別で
きる。
In such a portable information device, a case where a user reads data such as an address in an address book will be described. FIG. 12 is a flowchart showing the data read processing procedure. This processing program is stored in the ROM 106 like the data writing processing program, and is executed by the CPU 104. First, it is determined whether or not the data requested by the user is in a temporary storage area of the nonvolatile RAM 103 allocated to the RAM 107 (step S801). This can be determined by checking while following the link of the table 401 in FIG.

【0085】読み出すべきデータがRAM107にある
場合、RAM107から読み込む(図7の矢印a参照、
ステップS802)。一方、読み出すべきデータがRA
M107にない場合、不揮発性RAM103から読み出
す(図8の矢印c参照、ステップS803)。そして、
処理を終了する。
When data to be read is in the RAM 107, the data is read from the RAM 107 (see arrow a in FIG. 7).
Step S802). On the other hand, if the data to be read is RA
If it is not in M107, it is read from the nonvolatile RAM 103 (see arrow c in FIG. 8, step S803). And
The process ends.

【0086】図13は図11のステップS702におけ
る不揮発性RAM103への書き込み(フラッシュ)動
作の処理手順を示すフローチャートである。まず、先頭
のテーブル401を取り出す(ステップS901)。テ
ーブルに“未書き込み”のフラグが立っているか否かを
調べる(ステップS902)。未書き込みのフラグが立
っている場合、テーブル401にリンクされているデー
タ402を不揮発性RAM103に書き込み(ステップ
S903)、テーブル401に付けられている未書き込
みのフラグを降ろす(図7の矢印b参照、ステップS9
04)。
FIG. 13 is a flowchart showing a processing procedure of a write (flash) operation to the nonvolatile RAM 103 in step S702 of FIG. First, the first table 401 is extracted (step S901). It is checked whether or not an “unwritten” flag is set in the table (step S902). If the unwritten flag is set, the data 402 linked to the table 401 is written in the nonvolatile RAM 103 (step S903), and the unwritten flag attached to the table 401 is lowered (see arrow b in FIG. 7). , Step S9
04).

【0087】ステップS902でテーブルに“未書き込
み”のフラグが立っていない場合、あるいはステップS
904でテーブル401に付けられている未書き込みの
フラグを降ろした場合、次にリンクされているテーブル
を調べる(ステップS905)。次にリンクされている
テーブルがある場合、ステップS902の処理に戻り、
次にリンクされているテーブルがない場合、処理を終了
する。
If the "unwritten" flag is not set in the table in step S902, or
When the unwritten flag attached to the table 401 is cleared in 904, the next linked table is checked (step S905). If there is a next linked table, the process returns to step S902,
If there is no next linked table, the process ends.

【0088】この作業を続けることで、不揮発性RAM
103に書き込まれていないデータを書き込むことがで
きる。つまり、CPU104は不揮発性メモリ103に
格納すべきデータを書き込む場合、通常、図7の矢印
a、bの順番に行うが、バッテリ容量が少なくなった場
合、図8の矢印cのように、直接、書き込みを行うので
ある。
By continuing this work, the nonvolatile RAM
Data that has not been written to 103 can be written. That is, the CPU 104 normally writes data to be stored in the nonvolatile memory 103 in the order of arrows a and b in FIG. 7. However, when the battery capacity is low, the CPU 104 directly writes data as shown by an arrow c in FIG. Write.

【0089】このように、本実施形態では、ユーザによ
り携帯型情報機器へのデータの書き込みが見掛け上速く
なり、携帯型情報機器のバッテリ容量が少ないとき、書
き込んでいる最中にバッテリが切れた場合でも、バッテ
リが少ない場合、直接、不揮発性RAM103に書き込
むので、データの消失を最小限に抑えることができる。
As described above, in the present embodiment, writing of data to the portable information device by the user is apparently faster, and when the battery capacity of the portable information device is small, the battery runs out during writing. Even in this case, when the battery is low, the data is written directly to the nonvolatile RAM 103, so that the data loss can be minimized.

【0090】尚、本発明は複数の機器から構成されるシ
ステムに適用してもよいし、1つの機器からなる装置に
適用してもよい。また、本発明はシステムあるいは装置
にプログラムを供給することによって達成される場合に
も適用できることはいうまでもない。この場合、本発明
を達成するためのソフトウェアによって表されるプログ
ラムを格納した記憶媒体をシステムあるいは装置に読み
出すことによってそのシステムあるいは装置が本発明の
効果を享受することが可能となる。
The present invention may be applied to a system composed of a plurality of devices, or may be applied to an apparatus composed of one device. Needless to say, the present invention can be applied to a case where the present invention is achieved by supplying a program to a system or an apparatus. In this case, by reading out a storage medium storing a program represented by software for achieving the present invention into a system or an apparatus, the system or the apparatus can enjoy the effects of the present invention.

【0091】図14はROMなどの記憶媒体のメモリマ
ップを示す図である。同図(A)に示す記憶媒体には、
図5のリセット時処理モジュール、図6のバッテリ電圧
低下時の退避処理モジュールなどが格納されている。図
14(B)に示すROM106には、図11のデータ書
き込み処理モジュール、図12のデータ読み込み処理モ
ジュール、図13のフラッシュ動作処理モジュールなど
が格納されている。
FIG. 14 is a diagram showing a memory map of a storage medium such as a ROM. The storage medium shown in FIG.
The reset processing module of FIG. 5 and the evacuation processing module at the time of battery voltage drop of FIG. 6 are stored. The ROM 106 shown in FIG. 14B stores the data write processing module of FIG. 11, the data read processing module of FIG. 12, the flash operation processing module of FIG. 13, and the like.

【0092】記憶媒体としては、ROMに限らず、例え
ばフロッピーディスク、ハードディスク、光ディスク、
光磁気ディスク、CD−ROM、CD−R、DVD、磁
気テープ、不揮発性のメモリカードなどを用いることが
できる。
The storage medium is not limited to ROM, but may be a floppy disk, hard disk, optical disk,
A magneto-optical disk, a CD-ROM, a CD-R, a DVD, a magnetic tape, a nonvolatile memory card, or the like can be used.

【0093】また、記憶媒体から読み出されたプログラ
ムコードが、コンピュータに挿入された機能拡張ボード
やコンピュータに接続された機能拡張ユニットに備わる
メモリに書き込まれた後、そのプログラムコードの指示
に基づき、その機能拡張ボードや機能拡張ユニットに備
わるCPUなどが実際の処理の一部または全部を行い、
その処理によって前述した各実施形態の機能が実現され
る場合も含まれることはいうまでもない。
After the program code read from the storage medium is written in the memory provided in the function expansion board inserted into the computer or the function expansion unit connected to the computer, the program code is read based on the instruction of the program code. The CPU provided in the function expansion board or function expansion unit performs part or all of the actual processing,
It goes without saying that the processing may realize the functions of the above-described embodiments.

【0094】[0094]

【発明の効果】本発明の請求項1に記載の情報処理装置
によれば、不揮発性メモリにデータを格納する際に必要
となる管理情報を、電源から供給される電力により内容
を保持する揮発性メモリに記憶する際、電源容量検知手
段により前記電源の容量を検知し、該検知された電源の
容量が所定のしきい値より少なくなったか否かを判別
し、前記電源の容量が前記所定のしきい値より少なくな
ったと判別された場合、退避処理決定手段により前記不
揮発性メモリに設けられた退避領域に退避されている情
報が有効であるか無効であるかを調べ、無効である場
合、退避処理を行うと決定し、有効である場合、退避処
理を行わないと決定し、前記退避処理を行うと決定され
た場合、管理情報退避手段により前記退避領域を書き込
み可能な状態にしてから前記揮発性メモリに記憶された
管理情報を書き込むことで退避処理を行うと共に、該退
避処理が行われた管理情報が有効であることを書き込む
ので、電源容量が減ってきことを検知し、所定しきい値
より少なくなると、RAM上に配置されたフラッシュデ
ィスク管理情報をフラッシュROM内の所定の退避領域
に自動的に退避し(書込み)、バッテリ充電や電池交換
によって電源容量が再び十分になり、システムが再立ち
上げられた際、退避してあったフラッシュディスク管理
情報をRAM上に復帰(コピー)させることで、電源容
量が減った際にフラッシュディスク管理情報が失われる
ことを防ぐことができる。
According to the information processing apparatus according to the first aspect of the present invention, the management information necessary for storing data in the nonvolatile memory is stored in the volatile memory which retains the contents by the power supplied from the power supply. When storing in the volatile memory, the power supply capacity detecting means detects the capacity of the power supply, and determines whether or not the detected power supply capacity is smaller than a predetermined threshold value. Is determined to be less than the threshold value, the save processing determining means checks whether the information saved in the save area provided in the nonvolatile memory is valid or invalid. If it is determined that the save process is to be performed, if it is valid, it is determined that the save process is not to be performed, and if it is determined that the save process is to be performed, the management information saving unit may set the save area to a writable state. The evacuation process is performed by writing the management information stored in the volatile memory, and the fact that the management information subjected to the evacuation process is valid is written. If the threshold value is less than the threshold value, the flash disk management information arranged in the RAM is automatically saved (written) to a predetermined save area in the flash ROM, and the power supply capacity becomes sufficient again by charging the battery or replacing the battery. By restoring (copying) the saved flash disk management information to the RAM when is restarted, it is possible to prevent the flash disk management information from being lost when the power supply capacity is reduced.

【0095】このように、バッテリまたは乾電池などの
電源容量が少なくなり、RAMの内容が維持できなくな
りそうだと電源容量検知手段により検知され、フラッシ
ュROM中の所定の退避領域に退避されている情報が
「無効」であった場合、管理情報退避手段により、ブロ
ック変換テーブル、イレースブロック管理テーブルとい
ったフラッシュディスク管理情報がフラッシュROM中
の所定領域に退避され、また、退避した情報が「有効」
と記される。
As described above, when the power capacity of the battery or the dry battery is reduced and the contents of the RAM cannot be maintained, the power capacity detection means detects the power capacity and the information saved in the predetermined save area in the flash ROM. If it is "invalid", the management information saving means saves the flash disk management information such as the block conversion table and the erase block management table to a predetermined area in the flash ROM, and the saved information becomes "valid".
Is written.

【0096】したがって、フラッシュディスク管理情報
をRAM上に配置しておいても、バッテリや乾電池の容
量が少なくなり、フラッシュディスク管理情報の内容が
壊れる可能性が出てくると、必要であれば、自動的にそ
の内容がフラッシュROM上の所定の退避領域中に書き
込まれ退避される。そして、充電や電池交換により再び
電力が回復しリセット処理が開始されると、退避してあ
ったフラッシュディスク管理情報がRAM上の所定の領
域に読み出されて復帰する。このため、フラッシュディ
スク管理情報を、高速にリード/ライト可能なRAM上
に配置しても、電力低下によりその内容が壊れることが
なくなるという効果を得ることができる。尚、請求項8
に記載の情報格納方法および請求項15に記載の記憶媒
体においても、同様の効果を得ることができる。
Therefore, even if the flash disk management information is stored in the RAM, if the capacity of the battery or the dry battery becomes small and the contents of the flash disk management information may be destroyed, if necessary, The contents are automatically written and saved in a predetermined save area on the flash ROM. Then, when the power is restored again by the charging or the battery replacement and the reset process is started, the saved flash disk management information is read out to a predetermined area on the RAM and returned. For this reason, even if the flash disk management information is arranged on a RAM that can be read / written at high speed, the effect of preventing the contents from being destroyed due to power reduction can be obtained. Claim 8
The same effect can be obtained also in the information storage method described in (1) and the storage medium described in (15).

【0097】請求項2に記載の情報処理装置によれば、
復帰処理決定手段によりリセット時、前記退避領域に退
避されている情報が有効であるか無効であるかを調べ、
無効である場合、初期化処理を行うと決定し、有効であ
る場合、前記管理情報の復帰処理を行うと決定し、前記
初期化処理を行うと決定された場合、初期化処理手段に
より前記不揮発性メモリの内容を消去して前記管理情報
を初期化し、前記復帰処理を行うと決定された場合、復
帰処理手段により前記退避領域から前記管理情報を読み
出し、前記不揮発性メモリにデータを格納する処理を復
帰させるので、リセット時にフラッシュディスク情報を
確実に管理することができる。
According to the information processing apparatus of the second aspect,
At the time of reset by the return processing determining means, it is checked whether the information saved in the save area is valid or invalid,
If invalid, it is determined that initialization processing is to be performed.If valid, it is determined that recovery processing of the management information is to be performed. If it is determined that the initialization processing is to be performed, the non-volatile A process of erasing the management information by erasing the contents of the non-volatile memory and reading the management information from the save area by a restoration processing unit when it is determined that the restoration process is to be performed, and storing the data in the nonvolatile memory , The flash disk information can be reliably managed at the time of reset.

【0098】このように、システムのリセット時には、
復帰処理決定手段により、フラッシュROM中の所定の
退避領域に退避されている情報が「無効」か「有効」か
が判別され、「無効」である場合、初期化処理手段によ
りディスク装置としての初期化処理が実行され、「有
効」である場合、管理情報復帰手段により所定の退避領
域からブロック変換テーブル、イレースブロック管理テ
ーブルといったフラッシュディスク管理情報が復帰す
る。尚、請求項9に記載の情報格納方法においても、同
様の効果を得ることができる。
Thus, when the system is reset,
The return processing determining means determines whether the information saved in a predetermined save area in the flash ROM is “invalid” or “valid”. If the information is “invalid”, the initialization processing means initializes the disk device. When the “valid” status is obtained, the flash disk management information such as the block conversion table and the erase block management table is restored from the predetermined save area by the management information restoration unit. The same effect can be obtained in the information storage method according to the ninth aspect.

【0099】請求項3に記載の情報処理装置によれば、
前記管理情報が更新された場合、退避情報無効化手段に
より前記退避領域に退避されている管理情報が無効にな
ったことを書き込むので、退避領域に退避されている管
理情報を適切に管理することができる。
According to the information processing apparatus of the third aspect,
When the management information is updated, the fact that the management information saved in the save area is invalidated by the save information invalidating means is written, so that the management information saved in the save area is appropriately managed. Can be.

【0100】このように、ディスク装置としてのライト
処理やガベージコレクション処理などによりブロック変
換テーブル、イレースブロック管理テーブルといったフ
ラッシュディスク管理情報が更新された場合、退避情報
無効化手段により、フラッシュROM中の所定の退避領
域に退避された情報が「無効」と記される。尚、請求項
10に記載の情報格納方法においても、同様の効果を得
ることができる。
As described above, when the flash disk management information such as the block conversion table and the erase block management table is updated by the write processing or the garbage collection processing as the disk device, the evacuation information invalidating means causes the predetermined information in the flash ROM to be updated. The information saved in the save area is marked as “invalid”. The same effect can be obtained in the information storage method according to the tenth aspect.

【0101】請求項4に記載の情報処理装置によれば、
前記電源容量検知手段によって判別に使用されるしきい
値は、前記揮発性メモリの内容を保持できなくなる、あ
るいは前記退避処理決定手段および前記管理情報退避手
段を実行できなくなる際の前記電源の容量に応じて設定
されているので、揮発性メモリに記憶されている管理情
報が消失しないうちに、確実に管理情報を退避させるこ
とができる。尚、請求項5に記載の情報処理装置、請求
項11および請求項12に記載の情報格納方法において
も、同様の効果を得ることができる。
According to the information processing apparatus of the fourth aspect,
The threshold value used for the determination by the power supply capacity detection means is determined by the capacity of the power supply when the contents of the volatile memory cannot be held or the save processing determination means and the management information save means cannot be executed. Since the management information is set accordingly, the management information can be reliably saved before the management information stored in the volatile memory is lost. Note that the same effect can be obtained in the information processing apparatus according to the fifth aspect and the information storage method according to the eleventh and twelfth aspects.

【0102】請求項6に記載の情報処理装置によれば、
前記管理情報は、前記不揮発性メモリをディスク装置と
して扱う際の仮想ブロックと、該仮想ブロックと同一サ
イズで前記不揮発性メモリを分割かつ管理される実ブロ
ックとをマッピングするブロック変換テーブル、および
前記不揮発性メモリの消去回数、前記実ブロックの番
号、各実ブロックの状態などの情報を管理するブロック
管理テーブルからなるので、ブロック変換テーブルおよ
びブロック管理テーブルを確実に管理することができ
る。尚、請求項13に記載の情報格納方法においても、
同様の効果を得ることができる。
According to the information processing apparatus of claim 6,
The management information includes a block conversion table that maps a virtual block when the non-volatile memory is treated as a disk device, and a real block that is the same size as the virtual block and that divides and manages the non-volatile memory. Since the block management table manages information such as the number of times of erasure of the memory, the number of the real block, and the state of each real block, the block conversion table and the block management table can be reliably managed. In the information storage method according to the thirteenth aspect,
Similar effects can be obtained.

【0103】請求項7に記載の情報処理装置によれば、
前記有効および前記無効が書き込まれるフラグ領域は、
少なくとも2ビットで構成され、前記有効を示す値は、
全てのビットが値0でなく、かつ全てのビットが値1で
ないマジックナンバであり、前記有効から前記無効に切
り替える際、全てのビットを値0に上書きするので、少
ないビット数で有効、無効の区別を確実にでき、しかも
フラッシュROMを用いた場合、有効から無効への切替
をイレースによって行うことなく、上書きで行うことが
できる。尚、請求項14に記載の情報格納方法において
も、同様の効果を得ることができる。
According to the information processing apparatus of claim 7,
The flag area in which the validity and the invalidity are written,
It is composed of at least 2 bits, and the value indicating the validity is:
A magic number in which all bits are not 0 and all bits are not 1 and when switching from the valid to the invalid, all bits are overwritten with the value 0. The distinction can be made surely, and when a flash ROM is used, the switching from valid to invalid can be performed by overwriting without performing erasing. The same effect can be obtained in the information storage method according to the fourteenth aspect.

【0104】請求項15に記載の記憶媒体によれば、情
報処理装置内のCPUによって実行され、不揮発性メモ
リにデータを格納する際に必要となる管理情報を、電源
から供給される電力により内容を保持する揮発性メモリ
に記憶するプログラムが格納された記憶媒体において、
前記プログラムは、前記電源の容量を検知し、該検知さ
れた電源の容量が所定のしきい値より少なくなったか否
かを判別する手順と、前記電源の容量が前記所定のしき
い値より少なくなったと判別された場合、前記不揮発性
メモリに設けられた退避領域に退避されている情報が有
効であるか無効であるかを調べ、無効である場合、退避
処理を行うと決定し、有効である場合、退避処理を行わ
ないと決定する手順と、前記退避処理を行うと決定され
た場合、前記退避領域を書き込み可能な状態にしてから
前記揮発性メモリに記憶された管理情報を書き込むこと
で退避処理を行うと共に、該退避処理が行われた管理情
報が有効であることを書き込む手順とを含むので、情報
処理装置の拡張性、汎用性を高めることができる。尚、
請求項22に記載の記憶媒体においても、同様の効果を
得ることができる。
According to the storage medium of the fifteenth aspect, the management information executed by the CPU in the information processing apparatus and required for storing data in the non-volatile memory is stored by the power supplied from the power supply. In a storage medium storing a program for storing in a volatile memory holding
A step of detecting the capacity of the power supply and determining whether the detected capacity of the power supply is smaller than a predetermined threshold; and a step of determining whether the capacity of the power supply is smaller than the predetermined threshold. If it is determined that the information has become invalid, it is determined whether the information saved in the save area provided in the nonvolatile memory is valid or invalid. In some cases, a procedure for deciding not to perform the save processing, and a procedure for deciding to perform the save processing, by writing the management information stored in the volatile memory after setting the save area in a writable state. A procedure for performing the saving process and writing that the management information for which the saving process has been performed is valid is included, so that the expandability and versatility of the information processing apparatus can be improved. still,
The same effect can be obtained also in the storage medium according to the present invention.

【0105】本発明の請求項16に記載の情報処理装置
によれば、データを格納する際に使用される不揮発性メ
モリおよび揮発性メモリを有し、前記不揮発性メモリに
データを格納する場合、一旦、前記揮発性メモリにデー
タを書き込んだ後、該データを前記不揮発性メモリに書
き込む際、電源容量検出手段により前記揮発性メモリに
電力を供給する電源の容量を検出し、前記不揮発性メモ
リにデータを格納する場合、データ格納手順変更手段に
より前記検出された電源の容量に基づき、前記データの
格納手順を変更するので、書き込んでいる最中にバッテ
リがなくなったとしても、データの消失量を少なくする
ことができる。尚、請求項19に記載の情報格納方法お
よび請求項22に記載の記憶媒体においても、同様の効
果を得ることができる。
According to the information processing apparatus of the present invention, there is provided a nonvolatile memory and a volatile memory used for storing data, and when storing data in the nonvolatile memory, Once the data is written to the volatile memory, when the data is written to the non-volatile memory, the power supply capacity detecting means detects the capacity of a power supply for supplying power to the volatile memory, and stores the data in the non-volatile memory. When storing data, the data storage procedure is changed based on the detected power supply capacity by the data storage procedure changing means. Therefore, even if the battery runs out during writing, the amount of data loss can be reduced. Can be reduced. The same effect can be obtained with the information storage method according to the nineteenth aspect and the storage medium according to the twenty-second aspect.

【0106】請求項17に記載の情報処理装置によれ
ば、前記データ格納手順変更手段は、一旦、前記揮発性
メモリに書き込んだ後に前記不揮発性メモリに書き込む
か、あるいは直接、前記不揮発性メモリに書き込むかを
切り替えるので、フラッシュROMなどの不揮発性メモ
リへの書込み手順を変更できる。尚、請求項20に記載
の情報格納方法においても、同様の効果を得ることがで
きる。
According to the information processing apparatus of the present invention, the data storage procedure changing means writes the data to the volatile memory and then writes it to the nonvolatile memory, or directly writes the data to the nonvolatile memory. Since writing or writing is switched, a writing procedure to a nonvolatile memory such as a flash ROM can be changed. It should be noted that the same effect can be obtained in the information storage method according to the twentieth aspect.

【0107】請求項18に記載の情報処理装置によれ
ば、前記電源容量検出手段により前記電源の容量が所定
のしきい値より少ないと検出された場合、直接、前記不
揮発性メモリに書き込むので、揮発性メモリに記憶され
ているデータが消失する前に不揮発性メモリに書き込む
ことができる。尚、請求項21に記載の情報格納方法に
おいても、同様の効果を得ることができる。
According to the information processing apparatus of the present invention, when the power supply capacity detection means detects that the capacity of the power supply is smaller than a predetermined threshold value, the power is directly written to the nonvolatile memory. Before the data stored in the volatile memory is lost, the data can be written to the nonvolatile memory. It should be noted that a similar effect can be obtained in the information storage method according to the twenty-first aspect.

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

【図1】第1の実施形態における情報処理装置のハード
ウェア構成を示すブロック図である。
FIG. 1 is a block diagram illustrating a hardware configuration of an information processing apparatus according to a first embodiment.

【図2】フラッシュディスク管理情報8を構成する2つ
のテーブルを示す図である。
FIG. 2 is a diagram showing two tables constituting flash disk management information 8;

【図3】ブロック変換テーブル201とイレースブロッ
ク管理テーブル202を退避させる領域であるフラッシ
ュディスク管理情報退避領域9の構成を示す図である。
FIG. 3 is a diagram showing a configuration of a flash disk management information save area 9 which is an area for saving a block conversion table 201 and an erase block management table 202.

【図4】フラッシュROM5の実ブロック領域10を示
す図である。
FIG. 4 is a diagram showing a real block area 10 of the flash ROM 5;

【図5】リセット時の処理手順を示すフローチャートで
ある。
FIG. 5 is a flowchart showing a processing procedure at the time of reset.

【図6】電源容量検知装置2によりバッテリ1の電圧値
が予め設定されたしきい値より下がったことが検知され
た場合の退避処理手順を示すフローチャートである。
FIG. 6 is a flowchart illustrating an evacuation processing procedure when the power supply capacity detecting device 2 detects that the voltage value of the battery 1 has dropped below a preset threshold value.

【図7】第2の実施形態における携帯型情報機器の構成
および動作を示すブロック図である。
FIG. 7 is a block diagram illustrating the configuration and operation of a portable information device according to a second embodiment.

【図8】携帯型情報機器の構成および動作を示すブロッ
ク図である。
FIG. 8 is a block diagram illustrating a configuration and an operation of the portable information device.

【図9】RAM107に割り当てられた不揮発性RAM
103の一時的な記憶領域を管理するための管理構造を
示す図である。
FIG. 9 is a non-volatile RAM assigned to a RAM 107;
FIG. 3 is a diagram showing a management structure for managing a temporary storage area of a storage area 103;

【図10】バッテリ駆動で動作する計算機としての携帯
型情報機器の外観を示す図である。
FIG. 10 is a diagram illustrating an appearance of a portable information device as a computer that operates on battery power.

【図11】データを不揮発性RAM103に書き込む際
のデータ書き込み処理手順を示すフローチャートであ
る。
FIG. 11 is a flowchart illustrating a data write processing procedure when data is written to the nonvolatile RAM 103;

【図12】データ読み込み処理手順を示すフローチャー
トである。
FIG. 12 is a flowchart illustrating a data read processing procedure;

【図13】図11のステップS702における不揮発性
RAM103への書き込み(フラッシュ)動作の処理手
順を示すフローチャートである。
FIG. 13 is a flowchart showing a processing procedure of a write (flash) operation to the nonvolatile RAM 103 in step S702 of FIG. 11;

【図14】ROMなどの記憶媒体のメモリマップを示す
図である。
FIG. 14 is a diagram showing a memory map of a storage medium such as a ROM.

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

1、102 バッテリ 2 電源容量検知装置 3、104 CPU 4 RAM 5 フラッシュ(Flash)ROM 8 フラッシュディスク管理情報 9 フラッシュディスク管理情報退避領域 10 実ブロック領域 101 バッテリ電圧検知装置 103 不揮発性RAM 106 ROM 107 RAM 201 ブロック変換テーブル 202 イレースブロック管理テーブル 301 退避情報有効フラグ DESCRIPTION OF SYMBOLS 1, 102 Battery 2 Power supply capacity detection apparatus 3, 104 CPU 4 RAM 5 Flash (Flash) ROM 8 Flash disk management information 9 Flash disk management information save area 10 Real block area 101 Battery voltage detection apparatus 103 Non-volatile RAM 106 ROM 107 RAM 201 Block conversion table 202 Erase block management table 301 Save information valid flag

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5B011 DA06 DA13 EA04 EB01 GG03 JA04 5B018 GA04 HA23 KA03 LA03 MA23 NA06 QA05 QA11 5B019 CA05 HF03 5B098 DD02 DD08  ──────────────────────────────────────────────────続 き Continued on the front page F term (reference) 5B011 DA06 DA13 EA04 EB01 GG03 JA04 5B018 GA04 HA23 KA03 LA03 MA23 NA06 QA05 QA11 5B019 CA05 HF03 5B098 DD02 DD08

Claims (22)

【特許請求の範囲】[Claims] 【請求項1】 不揮発性メモリにデータを格納する際に
必要となる管理情報を、電源から供給される電力により
内容を保持する揮発性メモリに記憶する情報処理装置に
おいて、 前記電源の容量を検知し、該検知された電源の容量が所
定のしきい値より少なくなったか否かを判別する電源容
量検知手段と、 前記電源の容量が前記所定のしきい値より少なくなった
と判別された場合、前記不揮発性メモリに設けられた退
避領域に退避されている情報が有効であるか無効である
かを調べ、無効である場合、退避処理を行うと決定し、
有効である場合、退避処理を行わないと決定する退避処
理決定手段と、 前記退避処理を行うと決定された場合、前記退避領域を
書き込み可能な状態にしてから前記揮発性メモリに記憶
された管理情報を書き込むことで退避処理を行うと共
に、該退避処理が行われた管理情報が有効であることを
書き込む管理情報退避手段とを備えたことを特徴とする
情報処理装置。
1. An information processing apparatus for storing management information necessary for storing data in a nonvolatile memory in a volatile memory that retains contents by power supplied from a power supply, wherein the capacity of the power supply is detected. And a power supply capacity detecting means for determining whether or not the detected capacity of the power supply has become smaller than a predetermined threshold value, and when it is determined that the capacity of the power supply has become smaller than the predetermined threshold value, Check whether the information saved in the save area provided in the non-volatile memory is valid or invalid, and if invalid, decide to perform the save process,
A save processing determining means for determining not to perform the save processing when the save processing is valid; and a management stored in the volatile memory after setting the save area to a writable state when the save processing is determined to be performed. An information processing apparatus comprising: a management information saving unit that performs saving processing by writing information and that writes that the management information on which the saving processing has been performed is valid.
【請求項2】 リセット時、前記退避領域に退避されて
いる情報が有効であるか無効であるかを調べ、無効であ
る場合、初期化処理を行うと決定し、有効である場合、
前記管理情報の復帰処理を行うと決定する復帰処理決定
手段と、 前記初期化処理を行うと決定された場合、前記不揮発性
メモリの内容を消去して前記管理情報を初期化する初期
化処理手段と、 前記復帰処理を行うと決定された場合、前記退避領域か
ら前記管理情報を読み出し、前記不揮発性メモリにデー
タを格納する処理を復帰させる復帰処理手段とを備えた
ことを特徴とする請求項1記載の情報処理装置。
2. When resetting, it is determined whether the information saved in the save area is valid or invalid. If the information is invalid, it is determined that an initialization process is to be performed.
Return processing determining means for determining to perform the management information return processing; and initialization processing means for initializing the management information by erasing the contents of the non-volatile memory when the initialization processing is determined to be performed. And return processing means for reading out the management information from the save area when it is determined to perform the return processing and returning the processing of storing data in the nonvolatile memory. The information processing apparatus according to claim 1.
【請求項3】 前記管理情報が更新された場合、前記退
避領域に退避されている管理情報が無効になったことを
書き込む退避情報無効化手段を備えたことを特徴とする
請求項1または請求項2記載の情報処理装置。
3. The information processing apparatus according to claim 1, further comprising: a save information invalidating unit that writes that the management information saved in the save area is invalid when the management information is updated. Item 3. The information processing device according to Item 2.
【請求項4】 前記電源容量検知手段によって判別に使
用されるしきい値は、前記揮発性メモリの内容を保持で
きなくなる、あるいは前記退避処理決定手段および前記
管理情報退避手段を実行できなくなる際の前記電源の容
量に応じて設定されていることを特徴とする請求項1記
載の情報処理装置。
4. A threshold value used for determination by the power supply capacity detecting means when the contents of the volatile memory cannot be held or when the saving processing determining means and the management information saving means cannot be executed. 2. The information processing apparatus according to claim 1, wherein the information processing apparatus is set according to a capacity of the power supply.
【請求項5】 前記電源容量検知手段によって判別に使
用されるしきい値は、前記揮発性メモリの内容を保持で
きなくなる、あるいは前記退避処理決定手段および前記
管理情報退避手段を実行できなくなる際の前記電源の電
圧値に応じて設定されていることを特徴とする請求項1
記載の情報処理装置。
5. A threshold value used for determination by said power supply capacity detecting means when the contents of said volatile memory cannot be held or when said saving processing determining means and said management information saving means cannot be executed. 2. The power supply according to claim 1, wherein the power supply is set according to a voltage value of the power supply.
An information processing apparatus according to claim 1.
【請求項6】 前記管理情報は、前記不揮発性メモリを
ディスク装置として扱う際の仮想ブロックと、該仮想ブ
ロックと同一サイズで前記不揮発性メモリを分割かつ管
理される実ブロックとをマッピングするブロック変換テ
ーブル、および前記不揮発性メモリの消去回数、前記実
ブロックの番号、各実ブロックの状態などの情報を管理
するブロック管理テーブルからなることを特徴とする請
求項1記載の情報処理装置。
6. The management information is a block conversion that maps a virtual block when the non-volatile memory is treated as a disk device and a real block that is the same size as the virtual block and that divides and manages the non-volatile memory. 2. The information processing apparatus according to claim 1, comprising a table and a block management table for managing information such as the number of times of erasing of the nonvolatile memory, the number of the real block, and the state of each real block.
【請求項7】 前記有効および前記無効が書き込まれる
フラグ領域は、少なくとも2ビットで構成され、 前記有効を示す値は、全てのビットが値0でなく、かつ
全てのビットが値1でないマジックナンバであり、 前記有効から前記無効に切り替える際、全てのビットを
値0に上書きすることを特徴とする請求項1記載の情報
処理装置。
7. The flag area in which the validity and the invalidity are written is composed of at least two bits, and the value indicating the validity is a magic number in which all bits are not 0 and not all bits are 1. The information processing apparatus according to claim 1, wherein when switching from the valid state to the invalid state, all bits are overwritten with a value of 0.
【請求項8】 不揮発性メモリにデータを格納する際に
必要となる管理情報を、電源から供給される電力により
内容を保持する揮発性メモリに記憶する情報格納方法に
おいて、 前記電源の容量を検知し、該検知された電源の容量が所
定のしきい値より少なくなったか否かを判別する工程
と、 前記電源の容量が前記所定のしきい値より少なくなった
と判別された場合、前記不揮発性メモリに設けられた退
避領域に退避されている情報が有効であるか無効である
かを調べ、無効である場合、退避処理を行うと決定し、
有効である場合、退避処理を行わないと決定する工程
と、 前記退避処理を行うと決定された場合、前記退避領域を
書き込み可能な状態にしてから前記揮発性メモリに記憶
された管理情報を書き込むことで退避処理を行うと共
に、該退避処理が行われた管理情報が有効であることを
書き込む工程とを有することを特徴とする情報格納方
法。
8. An information storage method for storing management information required for storing data in a non-volatile memory in a volatile memory which retains contents by power supplied from a power supply, wherein the capacity of the power supply is detected. Determining whether the detected power supply capacity is less than a predetermined threshold value; and determining that the power supply capacity is less than the predetermined threshold value. Check whether the information saved in the save area provided in the memory is valid or invalid, and if invalid, decide to perform the save process,
If valid, a step of deciding not to perform the save processing; and, if it is decided to perform the save processing, write the management information stored in the volatile memory after setting the save area in a writable state. Performing an evacuation process and writing that the management information subjected to the evacuation process is valid.
【請求項9】 リセット時、前記退避領域に退避されて
いる情報が有効であるか無効であるかを調べ、無効であ
る場合、初期化処理を行うと決定し、有効である場合、
前記管理情報の復帰処理を行うと決定する工程と、 前記初期化処理を行うと決定された場合、前記不揮発性
メモリの内容を消去して前記管理情報を初期化する工程
と、 前記復帰処理を行うと決定された場合、前記退避領域か
ら前記管理情報を読み出し、前記不揮発性メモリにデー
タを格納する処理を復帰させる工程とを有することを特
徴とする請求項8記載の情報格納方法。
9. When resetting, it is determined whether the information saved in the save area is valid or invalid. If the information is invalid, it is determined that an initialization process is to be performed.
A step of deciding to perform a return process of the management information; and a step of erasing the contents of the non-volatile memory to initialize the management information when it is decided to perform the initialization process. 9. The information storage method according to claim 8, further comprising a step of reading the management information from the evacuation area and restoring a process of storing data in the non-volatile memory when it is determined to be performed.
【請求項10】 前記管理情報が更新された場合、前記
退避領域に退避されている管理情報が無効になったこと
を書き込む工程を有することを特徴とする請求項8また
は請求項9記載の情報格納方法。
10. The information according to claim 8, further comprising a step of writing that the management information saved in the save area becomes invalid when the management information is updated. Storage method.
【請求項11】 前記電源の容量を検知する工程で使用
されるしきい値は、前記揮発性メモリの内容を保持でき
なくなる、あるいは前記退避処理を行うか否かを決定す
る工程および前記管理情報を退避させる工程を実行でき
なくなる際の前記電源の容量に応じて設定されているこ
とを特徴とする請求項8記載の情報格納方法。
11. The threshold value used in the step of detecting the capacity of the power supply, the step of determining whether or not the content of the volatile memory cannot be held, or the step of determining whether to perform the save processing, and the management information 9. The information storage method according to claim 8, wherein the information is set according to the capacity of the power supply when the step of saving the data cannot be executed.
【請求項12】 前記電源容量を検知する工程で使用さ
れるしきい値は、前記揮発性メモリの内容を保持できな
くなる、あるいは前記退避処理を行うか否かを決定する
工程および前記管理情報を退避させる工程を実行できな
くなる際の前記電源の電圧値に応じて設定されているこ
とを特徴とする請求項8記載の情報格納方法。
12. The threshold value used in the step of detecting the power supply capacity includes a step of determining whether or not the content of the volatile memory cannot be held or a step of determining whether or not to perform the save processing, and 9. The information storage method according to claim 8, wherein the information is set in accordance with a voltage value of the power supply when the step of saving cannot be performed.
【請求項13】 前記管理情報は、前記不揮発性メモリ
をディスク装置として扱う際の仮想ブロックと、該仮想
ブロックと同一サイズで前記不揮発性メモリを分割かつ
管理される実ブロックとをマッピングするブロック変換
テーブル、および前記不揮発性メモリの消去回数、前記
実ブロックの番号、各実ブロックの状態などの情報を管
理するブロック管理テーブルからなることを特徴とする
請求項8記載の情報格納方法。
13. The management information is a block conversion that maps a virtual block when the non-volatile memory is treated as a disk device and a real block that is the same size as the virtual block and is divided and managed in the non-volatile memory. 9. The information storage method according to claim 8, comprising a table and a block management table for managing information such as the number of times of erasing of the nonvolatile memory, the number of the real block, and the state of each real block.
【請求項14】 前記有効および前記無効が書き込まれ
るフラグ領域は、少なくとも2ビットで構成され、 前記有効を示す値は、全てのビットが値0でなく、かつ
全てのビットが値1でないマジックナンバであり、 前記有効から前記無効に切り替える際、全てのビットを
値0に上書きすることを特徴とする請求項8記載の情報
格納方法。
14. The flag area in which the validity and the invalidity are written is composed of at least two bits, and the value indicating the validity is a magic number in which all bits are not 0 and not all bits are 1. The information storage method according to claim 8, wherein when switching from the valid to the invalid, all bits are overwritten with a value of 0.
【請求項15】 情報処理装置内のCPUによって実行
され、不揮発性メモリにデータを格納する際に必要とな
る管理情報を、電源から供給される電力により内容を保
持する揮発性メモリに記憶するプログラムが格納された
記憶媒体において、 前記プログラムは、 前記電源の容量を検知し、該検知された電源の容量が所
定のしきい値より少なくなったか否かを判別する手順
と、 前記電源の容量が前記所定のしきい値より少なくなった
と判別された場合、前記不揮発性メモリに設けられた退
避領域に退避されている情報が有効であるか無効である
かを調べ、無効である場合、退避処理を行うと決定し、
有効である場合、退避処理を行わないと決定する手順
と、 前記退避処理を行うと決定された場合、前記退避領域を
書き込み可能な状態にしてから前記揮発性メモリに記憶
された管理情報を書き込むことで退避処理を行うと共
に、該退避処理が行われた管理情報が有効であることを
書き込む手順とを含むことを特徴とする記憶媒体。
15. A program that is executed by a CPU in an information processing apparatus and stores management information necessary for storing data in a nonvolatile memory in a volatile memory that retains contents by power supplied from a power supply. In the storage medium, the program detects a capacity of the power supply, and determines whether or not the detected capacity of the power supply is smaller than a predetermined threshold value. When it is determined that the information has become smaller than the predetermined threshold value, it is checked whether the information saved in the save area provided in the nonvolatile memory is valid or invalid. Decided to do
If the evacuation process is determined to be not performed, and if the evacuation process is determined to be performed, the management area stored in the volatile memory is written after the evacuation area is in a writable state. And a procedure for performing a save process and writing that the management information on which the save process has been performed is valid.
【請求項16】 データを格納する際に使用される不揮
発性メモリおよび揮発性メモリを有し、前記不揮発性メ
モリにデータを格納する場合、一旦、前記揮発性メモリ
にデータを書き込んだ後、該データを前記不揮発性メモ
リに書き込む情報処理装置において、 前記揮発性メモリに電力を供給する電源の容量を検出す
る電源容量検出手段と、 前記不揮発性メモリにデータを格納する場合、前記検出
された電源の容量に基づき、前記データの格納手順を変
更するデータ格納手順変更手段とを備えたことを特徴と
する情報処理装置。
16. A nonvolatile memory having a nonvolatile memory and a volatile memory used for storing data. When storing data in the nonvolatile memory, the data is temporarily written to the volatile memory, An information processing device that writes data to the nonvolatile memory; a power supply capacity detecting unit that detects a capacity of a power supply that supplies power to the volatile memory; and a power supply that stores the data in the nonvolatile memory. And a data storage procedure changing means for changing the data storage procedure based on the capacity of the information processing apparatus.
【請求項17】 前記データ格納手順変更手段は、一
旦、前記揮発性メモリに書き込んだ後に前記不揮発性メ
モリに書き込むか、あるいは直接、前記不揮発性メモリ
に書き込むかを切り替えることを特徴とする請求項16
記載の情報処理装置。
17. The data storage procedure changing unit switches between writing once in the volatile memory and then writing in the nonvolatile memory or directly writing in the nonvolatile memory. 16
An information processing apparatus according to claim 1.
【請求項18】 前記電源容量検出手段により前記電源
の容量が所定のしきい値より少ないと検出された場合、
直接、前記不揮発性メモリに書き込むことを特徴とする
請求項17記載の情報処理装置。
18. When the power supply capacity detection means detects that the capacity of the power supply is smaller than a predetermined threshold value,
18. The information processing apparatus according to claim 17, wherein the information is directly written to the nonvolatile memory.
【請求項19】 データを格納する際に使用される不揮
発性メモリおよび揮発性メモリを有し、前記不揮発性メ
モリにデータを格納する場合、一旦、前記揮発性メモリ
にデータを書き込んだ後、該データを前記不揮発性メモ
リに書き込む情報格納方法において、 前記揮発性メモリに電力を供給する電源の容量を検出す
る工程と、 前記不揮発性メモリにデータを格納する場合、前記検出
された電源の容量に基づき、前記データの格納手順を変
更する工程とを有することを特徴とする情報格納方法。
19. A nonvolatile memory and a volatile memory which are used when storing data. When storing data in the nonvolatile memory, the data is written to the volatile memory once, In an information storage method for writing data to the nonvolatile memory, a step of detecting a capacity of a power supply for supplying power to the volatile memory; and when storing data in the nonvolatile memory, the detected capacity of the power supply is Changing the data storage procedure based on the information storage method.
【請求項20】 前記データの格納手順を変更する工程
では、一旦、前記揮発性メモリに書き込んだ後に前記不
揮発性メモリに書き込むか、あるいは直接、前記不揮発
性メモリに書き込むかを切り替えることを特徴とする請
求項19記載の情報格納方法。
20. In the step of changing the data storage procedure, switching is performed between writing to the volatile memory and then writing to the nonvolatile memory or directly writing to the nonvolatile memory. 20. The information storage method according to claim 19, wherein:
【請求項21】 前記電源の容量を検出する工程で前記
電源の容量が所定のしきい値より少ないと検出された場
合、直接、前記不揮発性メモリに書き込むことを特徴と
する請求項19記載の情報格納方法。
21. The non-volatile memory according to claim 19, wherein in the step of detecting the capacity of the power supply, when it is detected that the capacity of the power supply is smaller than a predetermined threshold value, the data is directly written to the nonvolatile memory. Information storage method.
【請求項22】 情報処理装置内のCPUによって実行
され、不揮発性メモリにデータを格納する場合、一旦、
前記揮発性メモリにデータを書き込んだ後、該データを
前記不揮発性メモリに書き込むプログラムが格納された
記憶媒体において、 前記プログラムは、 前記揮発性メモリに電力を供給する電源の容量を検出す
る手順と、 前記不揮発性メモリにデータを格納する場合、前記検出
された電源の容量に基づき、前記データの格納手順を変
更する手順とを含むことを特徴とする記憶媒体。
22. Executed by the CPU in the information processing apparatus, and when storing data in the nonvolatile memory,
After writing data to the volatile memory, in a storage medium storing a program for writing the data to the non-volatile memory, the program comprises: a step of detecting a capacity of a power supply for supplying power to the volatile memory; Storing data in the non-volatile memory, the method including changing a data storage procedure based on the detected power supply capacity.
JP10292796A 1998-10-01 1998-10-01 Information processor, information storing method, and storage medium Pending JP2000112836A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10292796A JP2000112836A (en) 1998-10-01 1998-10-01 Information processor, information storing method, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10292796A JP2000112836A (en) 1998-10-01 1998-10-01 Information processor, information storing method, and storage medium

Publications (1)

Publication Number Publication Date
JP2000112836A true JP2000112836A (en) 2000-04-21

Family

ID=17786463

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10292796A Pending JP2000112836A (en) 1998-10-01 1998-10-01 Information processor, information storing method, and storage medium

Country Status (1)

Country Link
JP (1) JP2000112836A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006277558A (en) * 2005-03-30 2006-10-12 Fujitsu Ten Ltd Apparatus and method for detecting signal change
JP2011053875A (en) * 2009-09-01 2011-03-17 Nec Corp Disk array apparatus
US9063901B2 (en) 2012-08-16 2015-06-23 Hyundai Motor Company Method and system for preventing loss of trip data in vehicle
JP2016143367A (en) * 2015-02-05 2016-08-08 株式会社日立産機システム Programmable controller

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006277558A (en) * 2005-03-30 2006-10-12 Fujitsu Ten Ltd Apparatus and method for detecting signal change
JP2011053875A (en) * 2009-09-01 2011-03-17 Nec Corp Disk array apparatus
US8572422B2 (en) 2009-09-01 2013-10-29 Nec Corporation Disk array apparatus including insertion/extraction detection function of the connector
US9063901B2 (en) 2012-08-16 2015-06-23 Hyundai Motor Company Method and system for preventing loss of trip data in vehicle
JP2016143367A (en) * 2015-02-05 2016-08-08 株式会社日立産機システム Programmable controller

Similar Documents

Publication Publication Date Title
JP3534585B2 (en) Data storage control method and apparatus for external storage device using a plurality of flash memories
EP2605142B1 (en) Lba bitmap usage
US9063728B2 (en) Systems and methods for handling hibernation data
US7802054B2 (en) Apparatus and methods using invalidity indicators for buffered memory
KR100771519B1 (en) Memory system including flash memory and merge method of thereof
US7424587B2 (en) Methods for managing data writes and reads to a hybrid solid-state disk drive
US8244959B2 (en) Software adapted wear leveling
US5933846A (en) Rewritable ROM file device having read/write buffer access control via copy of rewritable area
US7739443B2 (en) Memory controller, memory device and control method for the memory controller
KR101930092B1 (en) Mount-time reconciliation of data availability
US6779045B2 (en) System and apparatus for increasing the number of operations per transmission for a media management system
EP2088510A2 (en) Method and apparatus for using a one-time or few-time programmable memory with a host device designed for erasable/rewriteable memory
US20190369892A1 (en) Method and Apparatus for Facilitating a Trim Process Using Auxiliary Tables
US20060179263A1 (en) Flash memory device and associated data merge method
US20080028132A1 (en) Non-volatile storage device, data storage system, and data storage method
US20050021904A1 (en) Mass memory device based on a flash memory with multiple buffers
JP2008508596A (en) System, method, computer readable medium, and apparatus for memory management using NVRAM
JPH1040170A (en) Disk cache system
US8156278B2 (en) Non-volatile data storage system and method thereof
JP6975202B2 (en) Recovery process and equipment from momentary interruptions, and computer-readable storage media
JP2000112836A (en) Information processor, information storing method, and storage medium
KR20070061543A (en) Emulating small block size of flash memory
JPH11272569A (en) Data restoration system for outer storage device using flash memory
JPH0695955A (en) Flash file system
JP3818130B2 (en) Data management method and apparatus, data management program, and storage medium storing data management program