JPH09293025A - Method for controlling memory access and its device - Google Patents

Method for controlling memory access and its device

Info

Publication number
JPH09293025A
JPH09293025A JP13104496A JP13104496A JPH09293025A JP H09293025 A JPH09293025 A JP H09293025A JP 13104496 A JP13104496 A JP 13104496A JP 13104496 A JP13104496 A JP 13104496A JP H09293025 A JPH09293025 A JP H09293025A
Authority
JP
Japan
Prior art keywords
physical block
block
memory
request
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.)
Granted
Application number
JP13104496A
Other languages
Japanese (ja)
Other versions
JP3313576B2 (en
Inventor
Masao Shimada
昌生 嶋田
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.)
NEC Home Electronics Ltd
NEC Corp
Original Assignee
NEC Home Electronics Ltd
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Home Electronics Ltd, Nippon Electric Co Ltd filed Critical NEC Home Electronics Ltd
Priority to JP13104496A priority Critical patent/JP3313576B2/en
Publication of JPH09293025A publication Critical patent/JPH09293025A/en
Application granted granted Critical
Publication of JP3313576B2 publication Critical patent/JP3313576B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Read Only Memory (AREA)

Abstract

PROBLEM TO BE SOLVED: To guarantee the reliability of data which is read from a non-volatile memory after the lowering of a power source voltage and power interruption even when they occur by copying data management information stored in the non-volatile memory in a volatile memory before the usage of the non-volatile memory is started. SOLUTION: When a power source is turned on, the contents of a physical block flag group which constitutes data management information preserved inside a user data memory (flash memory) 200 and the contents of block mapping information are copied in a work memory 400 as a pre-processing for the usage start of the user data memory 200 and they are stored as the initial value of the physical block state flag group for displaying a latest state and as the initial value of block mapping information for display the latest state. At this time, one more group is copied and preserved in the work memory 400 concerning the contents of the physical block state flag group and stored as the physical block state flag group for display an initial state.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、記憶素子の性質か
らアクセス回数に制限のある不揮発性メモリ(例えば、
フラッシュメモリ等)に好適なメモリアクセス制御方法
及び装置に係り、特に、停電発生時のデータ信頼性を維
持しつつそのような不揮発性メモリの寿命増大に寄与す
るメモリアクセス制御方法及び装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a non-volatile memory having a limited access frequency due to the nature of a memory element (for example
The present invention relates to a memory access control method and device suitable for flash memory, etc., and more particularly to a memory access control method and device that contributes to extending the life of such a non-volatile memory while maintaining data reliability when a power failure occurs.

【0002】[0002]

【従来の技術】不揮発性メモリであるフラッシュメモリ
は、その記憶素子の電気的な性質からアクセス回数に制
限があることが知られている。殊に、フラッシュメモリ
の記憶領域を複数の物理ブロックからなるデータ記憶領
域とそのデータ記憶領域の使用状況を管理するデータ管
理情報記憶領域とにフォーマッティングして使用するペ
ージメモリ方式での使用にあっては、データ記憶領域に
比べてデータ管理領域のアクセス頻度が高いことから、
データ管理領域を構成する記憶素子の消耗によりメモリ
寿命が短いという問題がある。
2. Description of the Related Art It is known that a flash memory, which is a non-volatile memory, has a limited number of accesses due to the electrical characteristics of its storage element. In particular, it is used in a page memory method in which the flash memory storage area is formatted into a data storage area consisting of a plurality of physical blocks and a data management information storage area for managing the usage status of the data storage area. Is more frequently accessed in the data management area than in the data storage area,
There is a problem that the memory life is short due to the consumption of the storage elements forming the data management area.

【0003】かかる問題の対策としては、フラッシュメ
モリの使用に先立ち、当該フラッシュメモリのデータ管
理情報記憶領域の内容を、アクセス回数に実用上制限の
ない素子で構成されるワークメモリ(通常構造の半導体
SRAM、DRAM等の揮発性メモリで構成されるのが
普通である)上に複写し、メモリの使用中にあってはこ
のワークメモリ上のデータ管理情報にアクセスしてそれ
を逐次更新し、メモリの使用完了後或いは使用中適当な
時点で間欠的に、ワークメモリ上のデータ管理情報の内
容で前記フラッシュメモリ上のデータ管理情報の内容を
書き替える間欠書替方式が考えられる。
As a measure against such a problem, prior to the use of the flash memory, the contents of the data management information storage area of the flash memory are composed of a work memory (a semiconductor having a normal structure) whose access frequency is practically unlimited. It is usually composed of a volatile memory such as SRAM, DRAM, etc.), and while the memory is in use, the data management information on this work memory is accessed to update it sequentially, An intermittent rewriting method is conceivable in which the contents of the data management information on the flash memory are rewritten with the contents of the data management information on the work memory intermittently after the use is completed or at an appropriate time during the use.

【0004】このようなデータ管理情報の間欠書替方式
によれば、データの書き込み、読み出し、消去等に関し
ては、フラッシュメモリ上のデータ記憶領域に対する直
接アクセスにより行われるものの、それに伴うデータ管
理情報の高頻度な逐次更新については、ワークメモリ上
の管理情報記憶領域に対するアクセスを介しての言わば
間接アクセスにより行われるため、フラッシュメモリ上
のデータ管理情報記憶領域に対するアクセス頻度が低下
してフラッシュメモリの寿命が増大する。
According to the intermittent rewriting method of such data management information, although data writing, reading, erasing, etc. are performed by direct access to the data storage area on the flash memory, the high level of data management information accompanying it. Since the frequent sequential update is performed by an indirect access, that is, via the access to the management information storage area on the work memory, the frequency of access to the data management information storage area on the flash memory is reduced and the life of the flash memory is shortened. Increase.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、上述の
間欠書替方式にあっては、フラッシュメモリ上のデータ
の内容並びにワークメモリ上のデータ管理情報の内容に
ついては逐次に更新されてゆくものの、フラッシュメモ
リ上のデータ管理情報の内容については間欠的にしか更
新されないため、その間にシステム電源電圧の停電や電
圧低下等が起こってワークメモリ上のデータ管理情報の
内容が消失してしまうと、フラッシュメモリ上において
はデータの内容とデータ管理情報の内容とが不整合のま
ま残される事態が発生して、フラッシュメモリが使用不
能に陥るという問題がある。殊に、この問題は、フラッ
シュメモリをPDA等の小型携帯用電子機器のユーザデ
ータ格納用メモリとして使用した場合等に顕著なものと
なる。すなわち、この種の小型携帯用電子機器にあって
は、サイズ並びに重量上の制約により大容量バッテリの
搭載が困難なことから使用中に電池切れを起こす可能性
が高く、また使用中に誤って落下させた場合の衝撃等に
よりバッテリの接触不良による停電を起こす可能性も高
い。このような電池切れや停電のたびに、フラッシュメ
モリ内においてデータとデータ管理情報とに不整合が生
じて、読み出しデータに関する信頼性が失われるとすれ
ば、製品として実用に供し得ない。
However, in the above-mentioned intermittent rewriting method, although the contents of the data in the flash memory and the contents of the data management information in the work memory are sequentially updated, The content of the data management information in the memory is updated only intermittently.Therefore, if the content of the data management information in the work memory is lost due to power failure or voltage drop of the system power supply voltage during that time, the flash memory In the above, there is a problem in that the content of the data and the content of the data management information are left inconsistent and the flash memory becomes unusable. In particular, this problem becomes remarkable when the flash memory is used as a user data storage memory of a small portable electronic device such as a PDA. That is, in this kind of small portable electronic device, it is difficult to mount a large-capacity battery due to size and weight restrictions, so there is a high possibility that the battery will run out during use, and it will be mistakenly used during use. There is a high possibility that a power failure may occur due to poor contact of the battery due to the impact when dropped. If there is a mismatch between the data and the data management information in the flash memory each time the battery runs out or a power failure occurs, and the reliability of the read data is lost, it cannot be put to practical use as a product.

【0006】この発明は、以上の問題点に鑑みてなされ
たものであり、その目的とするところは、記憶素子の性
質からアクセス回数に制限のある不揮発性メモリを、そ
の規定アクセス回数の元で最大限に活用することがで
き、しかも電源電圧の低下や停電が発生しても、その後
に当該不揮発性メモリから読み出されるデータの信頼性
を保証できるようにしたメモリアクセス方法及び装置を
提供することにある。
The present invention has been made in view of the above problems. An object of the present invention is to provide a non-volatile memory having a limited access count due to the nature of a storage element, based on the specified access count. (EN) Provided is a memory access method and device which can be utilized to the maximum extent and can guarantee the reliability of data read from the nonvolatile memory after that even if the power supply voltage drops or a power failure occurs. It is in.

【0007】[0007]

【課題を解決するための手段】この出願の請求項1に記
載の発明は、記憶素子の性質からアクセス回数に制限の
ある不揮発性メモリに対するメモリアクセスを制御する
ための方法であって、前記不揮発性メモリの使用開始に
先立ち、前記不揮発性メモリ内に記憶されたデータ管理
情報を、アクセス回数に実用上制限のない揮発性メモリ
上に複写して最新状態表示用のデータ管理情報とし、さ
らに、前記データ管理情報を構成する物理ブロック状態
フラグ群とブロックマッピング情報とのうちで、物理ブ
ロック状態フラグ群を前記揮発性メモリ上に別に一組複
写保存して初期状態表示用の物理ブロック状態フラグ群
とする前処理ステップと、与えられたメモリアクセス要
求が消去要求若しくは書き込み要求のいずれかであるこ
とを判定するアクセス要求種別判定ステップと、前記記
憶されたブロックマッピング情報に基づいて、前記メモ
リアクセス要求で指定された論理ブロックにマッピング
された物理ブロックを求めるアクセス対象物理ブロック
検索ステップと、前記保存された初期状態表示用の物理
ブロック状態フラグ群を参照して、前記検索されたアク
セス対象物理ブロックが使用中であることを判定するブ
ロック使用状態判定ステップと、前記初期状態表示用の
物理ブロック状態フラグ群と前記最新状態表示用の物理
ブロック状態フラグ群とを参照して、初期状態において
空き状態にありかつ最新状態においても空き状態である
物理ブロックを検索する空き物理ブロック検索ステップ
と、前記要求種別判定ステップによりメモリアクセス要
求が消去要求であると判定されかつ前記アクセス対象物
理ブロック検索ステップにより検索されたアクセス対象
物理ブロックが前記ブロック使用状態判定ステップによ
り使用中と判定されたときには、当該アクセス対象物理
ブロックの最新状態表示用物理ブロック状態フラグを不
使用中に変更し、前記不揮発性メモリの当該アクセス対
象物理ブロックに対する消去処理を回避し、かつ前記ブ
ロックマッピング情報において当該アクセス対象物理ブ
ロックに関するブロックマッピングを切り離す消去要求
実行ステップと、前記要求種別判定ステップによりアク
セス要求が書き込み要求であると判定されかつ前記アク
セス対象物理ブロック検索ステップにより検索されたア
クセス対象物理ブロックが前記ブロック使用状態判定ス
テップにより使用中と判定されたときには、当該アクセ
ス対象物理ブロックの最新状態表示用物理ブロック状態
フラグを不使用中に変更し、前記不揮発性メモリ内の当
該アクセス対象物理ブロックに対する書き込み処理を回
避し、その代わりに、当該書き込み要求にかかるデータ
を前記不揮発性メモリ内の前記空き物理ブロック検索ス
テップにて検索された空き物理ブロックに書き込み、か
つ前記ブロックマッピング情報において当該アクセス対
象物理ブロックに関するブロックマッピングを切り離し
新たにブロックマッピングを張り直す書き込み要求実行
ステップと、所定のデータ管理情報更新要求が到来する
のに応答して、前記揮発性メモリに記憶された最新状態
表示用のデータ管理情報の内容にて前記不揮発性メモリ
内のデータ管理情報の内容を更新するデータ管理情報更
新ステップと、を具備することを特徴とするメモリアク
セス制御方法にある。
The invention according to claim 1 of this application is a method for controlling memory access to a non-volatile memory having a limited number of accesses due to the nature of a storage element, and Prior to the start of use of the non-volatile memory, the data management information stored in the non-volatile memory is copied onto a volatile memory for which the number of accesses is practically unlimited, and used as the data management information for displaying the latest status. Of the physical block status flag group and the block mapping information forming the data management information, a set of physical block status flag groups is separately copied and stored on the volatile memory to display an initial state physical block status flag group. The pre-processing step to determine whether the given memory access request is an erase request or a write request. Request type determining step, an access target physical block searching step for obtaining a physical block mapped to a logical block specified by the memory access request based on the stored block mapping information, and the saved initial state A block use state determination step of determining that the searched access target physical block is in use by referring to a display physical block state flag group, the physical block state flag group for displaying the initial state, and By referring to the physical block state flag group for displaying the latest state, a free physical block search step of searching for a physical block that is in an empty state in the initial state and is also in the latest state, and the request type determination step The memory access request is determined to be an erase request and When the access target physical block searched in the access target physical block search step is determined to be in use in the block usage status determination step, the latest state display physical block status flag of the access target physical block is not used. An erase request execution step of changing, erasing processing for the access target physical block of the non-volatile memory, and separating the block mapping relating to the access target physical block in the block mapping information; and an access request by the request type determination step. Is a write request and the access target physical block searched in the access target physical block searching step is judged to be in use in the block usage status judging step, The physical block status flag for the latest status display of the target physical block is changed to not in use, and the write processing to the relevant physical block in the nonvolatile memory is avoided, and instead, the data related to the write request is changed. A write request execution step of writing to the free physical block searched in the free physical block search step in the nonvolatile memory, and separating the block mapping relating to the physical block to be accessed in the block mapping information and re-establishing the new block mapping In response to the arrival of a predetermined data management information update request, the contents of the data management information in the non-volatile memory are changed to the contents of the data management information for displaying the latest state stored in the volatile memory. Data management information update step to update, In the memory access control method characterized by Bei.

【0008】また、この出願の請求項2に記載の発明
は、記憶素子の性質からアクセス回数に制限のある不揮
発性メモリに対するメモリアクセスを制御するための装
置であって、前記不揮発性メモリの使用開始に先立ち、
前記不揮発性メモリ内に記憶されたデータ管理情報を、
アクセス回数に実用上制限のない揮発性メモリ上に複写
して最新状態表示用のデータ管理情報とし、さらに、前
記データ管理情報を構成する物理ブロック状態フラグ群
とブロックマッピング情報とのうちで、物理ブロック状
態フラグ群を前記揮発性メモリ上に別に一組複写保存し
て初期状態表示用の物理ブロック状態フラグ群とする前
処理手段と、与えられたメモリアクセス要求が消去要求
若しくは書き込み要求のいずれかであることを判定する
アクセス要求種別判定手段と、前記記憶されたブロック
マッピング情報に基づいて、前記メモリアクセス要求で
指定された論理ブロックにマッピングされた物理ブロッ
クを求めるアクセス対象物理ブロック検索手段と、前記
保存された初期状態表示用の物理ブロック状態フラグ群
を参照して、前記検索されたアクセス対象物理ブロック
が使用中であることを判定するブロック使用状態判定手
段と、前記初期状態表示用の物理ブロック状態フラグ群
と前記最新状態表示用の物理ブロック状態フラグ群とを
参照して、初期状態において空き状態にありかつ最新状
態においても空き状態である物理ブロックを検索する空
き物理ブロック検索手段と、前記要求種別判定手段によ
りメモリアクセス要求が消去要求であると判定されかつ
前記アクセス対象物理ブロック検索手段により検索され
たアクセス対象物理ブロックが前記ブロック使用状態判
定手段により使用中と判定されたときには、当該アクセ
ス対象物理ブロックの最新状態表示用物理ブロック状態
フラグを不使用中に変更し、前記不揮発性メモリの当該
アクセス対象物理ブロックに対する消去処理を回避し、
かつ前記ブロックマッピング情報において当該アクセス
対象物理ブロックに関するブロックマッピングを切り離
す消去要求実行手段と、前記要求種別判定手段によりア
クセス要求が書き込み要求であると判定されかつ前記ア
クセス対象物理ブロック検索手段により検索されたアク
セス対象物理ブロックが前記ブロック使用状態判定手段
により使用中と判定されたときには、当該アクセス対象
物理ブロックの最新状態表示用物理ブロック状態フラグ
を不使用中に変更し、前記不揮発性メモリ内の当該アク
セス対象物理ブロックに対する書き込み処理を回避し、
その代わりに、当該書き込み要求にかかるデータを前記
不揮発性メモリ内の前記空き物理ブロック検索手段にて
検索された空き物理ブロックに書き込み、かつ前記ブロ
ックマッピング情報において当該アクセス対象物理ブロ
ックに関するブロックマッピングを切り離し新たにブロ
ックマッピングを張り直す書き込み要求実行手段と、所
定のデータ管理情報更新要求が到来するのに応答して、
前記揮発性メモリに記憶された最新状態表示用のデータ
管理情報の内容にて前記不揮発性メモリ内のデータ管理
情報の内容を更新するデータ管理情報更新手段と、を具
備することを特徴とするメモリアクセス制御装置にあ
る。
The invention according to claim 2 of this application is an apparatus for controlling memory access to a non-volatile memory having a limited number of accesses due to the nature of a memory element, and using the non-volatile memory. Prior to the start
Data management information stored in the non-volatile memory,
Data management information for displaying the latest status is obtained by copying on a volatile memory in which the number of accesses is not practically limited. Further, among the physical block status flag group and the block mapping information that constitute the data management information, physical Preprocessing means for separately storing one set of block state flag groups on the volatile memory to form a physical block state flag group for initial state display, and the given memory access request is either an erase request or a write request. And an access target physical block search unit for determining a physical block mapped to a logical block specified by the memory access request, based on the stored block mapping information, Referring to the stored physical block state flag group for initial state display, Referring to the block use state determination means for determining that the searched access target physical block is in use, the initial state display physical block state flag group and the latest state display physical block state flag group And a free physical block search means for searching a physical block that is empty in the initial state and free even in the latest state, and the memory access request is determined to be an erase request by the request type determination means and the access When the access target physical block searched by the target physical block search means is determined to be in use by the block usage status determination means, the latest state display physical block status flag of the access target physical block is changed to unused. , For the physical block to be accessed in the nonvolatile memory To avoid processed,
In addition, in the block mapping information, the erase request execution unit that separates the block mapping relating to the physical block to be accessed, and the request type determination unit determine that the access request is a write request, and the physical block search unit to be accessed searches the access request. When the access target physical block is determined to be in use by the block use state determination means, the latest state display physical block state flag of the access target physical block is changed to not in use, and the access in the nonvolatile memory is performed. Avoid writing to the target physical block,
Instead, the data related to the write request is written in the free physical block searched by the free physical block search means in the nonvolatile memory, and the block mapping relating to the physical block to be accessed is separated in the block mapping information. In response to the arrival of a predetermined data management information update request, the write request executing means for newly re-establishing the block mapping,
Data management information updating means for updating the content of the data management information in the non-volatile memory with the content of the data management information for displaying the latest status stored in the volatile memory. It is in the access control device.

【0009】ここで、請求項1若しくは請求項2の発明
において、『記憶素子の性質』とは、アクセス回数の増
加に伴って素子寿命の低下を招く原因となる物理的乃至
化学的性質等であり、具体的には半導体構造に基づく電
荷の蓄積形態、配線素材の耐性等の種々の原因に起因す
るものが存在するであろう。
Here, in the invention of claim 1 or claim 2, the "property of the memory element" is a physical or chemical property or the like that causes the life of the element to be shortened as the number of accesses increases. There are, in particular, those caused by various causes such as the charge accumulation form based on the semiconductor structure and the resistance of the wiring material.

【0010】また、『前処理ステップ』の起動条件とし
ては、電源投入、アプリケーションやBIOSからの起
動コマンドの到来等のような種々の形態を採用すること
ができるであろう。なお、この発明の性質上、『データ
管理情報』としては、少なくとも物理ブロック状態フラ
グ群とブロックマッピング情報とが含まれていれば足り
るものであるが、この発明の及ぶ範囲としては、それ以
外の情報が含まれている場合を積極的に排除するもので
はない。また、初期状態表示用の物理ブロック状態フラ
グ群を敢えてアクセス回数に制限のない揮発性メモリ
(いわゆるシステムメモリ)内に記憶保存させるのは、
この記憶保存されたフラグ群の内容を読みとることで、
その都度実際にアクセス回数に制限のある不揮発性メモ
リの内容を読み取らずとも直ちに初期状態の確認ができ
るようにするためである。換言すれば、初期状態確認の
ためにその都度に不揮発性メモリをアクセスすれば、そ
の読み取りのためのアクセスによっても不揮発性メモリ
(例えば、フラッシュメモリの場合に顕著である)の寿
命を低下させることとなるからである。なお、『物理ブ
ロック状態フラグ群』とは、不揮発性メモリのデータ記
憶領域内の各物理ブロックのそれぞれが使用状態若しく
は不使用状態のいずれにあるかを表示する個々の状態フ
ラグの集合のことを意味している。また、『初期状態』
とは、メモリの使用開始時点の状態、或いは使用開始後
における最新のデータ管理情報更新時点の状態を意味し
ている。
As the activation condition of the "pre-processing step", various forms such as power-on, arrival of an activation command from an application or BIOS, etc. may be adopted. From the nature of the present invention, it is sufficient that the “data management information” includes at least a physical block status flag group and block mapping information, but the scope of the present invention is other than that. It does not proactively exclude the inclusion of information. In addition, the physical block status flag group for initial status display is intentionally stored and saved in a volatile memory (so-called system memory) with unlimited access count.
By reading the contents of this stored flag group,
This is so that the initial state can be immediately confirmed without actually reading the contents of the nonvolatile memory whose access frequency is limited each time. In other words, if the non-volatile memory is accessed each time to confirm the initial state, the life of the non-volatile memory (which is remarkable in the case of the flash memory, for example) can be shortened by the access for reading the non-volatile memory. It is because The "physical block status flag group" is a set of individual status flags that indicate whether each physical block in the data storage area of the non-volatile memory is in a used state or an unused state. I mean. Also, "initial state"
Means the state at the start of use of the memory, or the state at the time of updating the latest data management information after the start of use.

【0011】また、『アクセス要求種別判別』の意味
は、これにより不揮発性メモリ(例えば、フラッシュメ
モリ)のデータ記憶領域内のいずれかの物理ブロックに
おいてデータ変更の可能性が生ずることを予期すること
にある。なお、ここで、『いずれかである』には、後述
する消去要求実行や書き込み要求実行との関係から、消
去要求若しくは書き込み要求のいずれであるかを認識す
る作用も含まれることは、当業者であれば容易に理解さ
れるであろう。
Further, the meaning of "discrimination of access request type" is to anticipate that this may cause a possibility of data modification in any physical block in the data storage area of the non-volatile memory (for example, flash memory). It is in. It is to be understood by those skilled in the art that "is either" includes an action of recognizing whether the request is an erase request or a write request from the relationship with execution of an erase request or write request described later. Then it will be easily understood.

【0012】また、『アクセス対象物理ブロック検索』
で使用されるブロックマッピング情報とは、アクセス要
求で指定され論理ブロックと不揮発性メモリ上の物理ブ
ロックとの結合関係を規定する情報であり、例えば両者
の関係を規定するテーブルにより構成することができ
る。この結合関係は、任意にマッピング或いはマッピン
グ解除(切り離し)することができる。
[Search for physical block to be accessed]
The block mapping information used in the above is information that defines the coupling relationship between the logical block specified by the access request and the physical block in the non-volatile memory, and can be configured by, for example, a table that defines the relationship between the two. . This connection relationship can be arbitrarily mapped or unmapped (separated).

【0013】また、前述のように、『ブロック使用状態
の判定』は、揮発性メモリ内に保存された初期状態表示
用の物理ブロック状態フラグ群を参照して行うことによ
り、不揮発性メモリの内容を参照することによるメモリ
消耗の虞がない。
Further, as described above, the "block use state determination" is performed by referring to the physical block state flag group for initial state display stored in the volatile memory, so that the contents of the non-volatile memory can be determined. There is no fear of memory consumption by referring to.

【0014】また、『空き物理ブロック検索』の意味
は、初期状態においてもかつ最新状態においても空き状
態にある物理ブロックを探すことにあり、これらが複数
見つかった場合には、一定の法則によりその中の一つを
自動選択する機能を有するであろうことは、当業者であ
れば容易に理解されるであろう。
Further, the meaning of "search for free physical block" is to search for a physical block that is in an empty state both in the initial state and in the latest state. It will be easily understood by those skilled in the art that it will have a function of automatically selecting one of them.

【0015】また、『消去要求実行』の意味は、消去要
求にかかる論理ブロックにマッピングされた物理ブロッ
クが実際に使用中の場合には、当該物理ブロックのデー
タを実際には消去せずに、揮発性メモリ上の物理ブロッ
ク状態フラグ上でのみ仮想的に消去することである。こ
れにより、消去要求が到来しても、不揮発性メモリ上に
おいてデータとデータ管理情報との間に不整合が生ずる
ことはない。しかも、その際に論理ブロックと物理ブロ
ックとのマッピングは切り離されてしまうから、その
後、当該論理ブロックに対する読み出し要求が到来して
消去されたはずのデータが誤って読み出されることはな
い。
The meaning of "erase request execution" means that when the physical block mapped to the logical block related to the erase request is actually in use, the data of the physical block is not actually erased, Virtually erasing only on the physical block status flag on the volatile memory. As a result, even if an erasing request arrives, inconsistency does not occur between the data and the data management information on the nonvolatile memory. Moreover, at that time, the mapping between the logical block and the physical block is separated, so that the read request for the logical block does not occur and the data that should have been erased is not read by mistake.

【0016】また、『書き込み要求実行』の意味は、書
き込み要求にかかる論理ブロックにマッピングされた物
理ブロックが実際に使用中の場合には、当該物理ブロッ
クのデータを実際には上書き消去せずに、揮発性メモリ
上の物理ブロック状態フラグ上でのみ仮想的に上書き消
去する一方、書き込み要求にかかるデータについては、
初期状態並びに最新状態においても空いていた物理ブロ
ックに書き込むことである。これにより、書き込み要求
が到来しても、不揮発性メモリ上においてデータとデー
タ管理情報との間に不整合が生ずることはない。しか
も、その際にそれまでの論理ブロックと物理ブロックと
のマッピングは切り離されてしまう一方、実際に書き込
まれた物理ブロックと論理ブロックとの間には新たにマ
ッピングが張られるため、その後、当該論理ブロックに
対する読み出し要求が到来してた場合には、上書きされ
たデータが正常に読み出され、上書き消去されたはずの
データが誤って読み出されることはない。
Further, the meaning of "write request execution" means that when the physical block mapped to the logical block related to the write request is actually in use, the data of the physical block is not actually overwritten and erased. , While virtually overwriting and erasing only on the physical block status flag on the volatile memory,
It is to write to a physical block that is vacant in both the initial state and the latest state. As a result, even if a write request arrives, there is no inconsistency between the data and the data management information on the nonvolatile memory. Moreover, at that time, the mapping between the logical block and the physical block up to that point is separated, but a new mapping is set between the actually written physical block and the logical block. When the read request for the block arrives, the overwritten data is normally read, and the data that should have been overwritten and erased is not erroneously read.

【0017】さらに、『データ管理情報更新』の意味
は、不揮発性メモリのデータ管理情報の内容をそのデー
タ記憶領域の最新の状態に整合させることにある。ここ
で、データ管理情報更新要求は、アプリケーションプロ
グラムから与えるようにしてもよいし、アプリケーショ
ンプログラムより階層的に下位の手段(例えば、BIO
S等)からあたえるようにしてもよい。また、データ管
理情報更新要求を与えるタイミングについては、一定周
期でサイクリックに与える場合、アプリケーションプロ
グラムやBIOS等から任意のタイミングで与える場
合、オペレータからの指令により任意のタイミングで与
える場合などのように種々の態様をとることができる。
さらに、データ管理情報更新要求の付与周期はそれが適
用される電子機器の利用態様(例えば、書き込み頻度或
いは消去頻度)や予想される停電頻度等に合わせて適宜
に決定すればよいと考えられる。
Further, the meaning of "data management information update" is to match the contents of the data management information of the non-volatile memory with the latest state of the data storage area. Here, the data management information update request may be given from an application program, or means (eg, BIO) hierarchically lower than the application program.
You may make it give from S etc.). Regarding the timing of giving the data management information update request, it may be given cyclically at a fixed cycle, given at any timing from an application program or BIOS, or given at any timing by a command from an operator. Various aspects can be taken.
Furthermore, it is conceivable that the application cycle of the data management information update request may be appropriately determined according to the usage mode (eg, writing frequency or erasing frequency) of the electronic device to which the request is applied, the expected power failure frequency, and the like.

【0018】なお、以上の請求項の記載では、上記の書
き込み要求実行の結果新たにマッピングされた論理ブロ
ックに関する次回以降の消去要求或いは書き込み要求が
到来した場合については、当業者にとって当然のことと
して規定していない。念のために付言すれば、この場合
には初期状態におけるデータ記憶領域の状態に変更を来
さないことは明らかであるから、通常通りの消去処理或
いは書き込み処理を行えばよいと考えられる。また、そ
れまでマッピングされていない新たな論理ブロックに関
する書き込み要求が到来した場合も同様であって、この
場合にも新たにマッピングされる物理ブロックは初期状
態におけるデータ記憶領域の状態に変更を来さないこと
は明らかであるから、通常通りの書き込み処理を行えば
よいと考えられる。さらに、いずれかの論理ブロックに
関する読み出し要求が到来した場合にも、初期状態にお
けるデータ記憶領域の状態に変更を来さないことは明ら
かであるから、通常通りの書き込み処理を行えばよいと
考えられる。
It should be understood by those skilled in the art that, in the description of the above claims, the case where an erase request or a write request for the newly mapped logical block after the next time arrives as a result of the execution of the write request described above. Not stipulated. In addition, as a reminder, in this case, it is clear that the state of the data storage area in the initial state is not changed, so it is considered that the normal erasing process or writing process may be performed. The same is true when a write request for a new logical block that has not been mapped has arrived, and in this case as well, the newly mapped physical block changes the state of the data storage area in the initial state. Since it is clear that there is no such a case, it is considered that the normal writing process should be performed. Furthermore, even if a read request for any of the logical blocks arrives, it is clear that the state of the data storage area in the initial state does not change, and therefore it is considered that the normal write processing should be performed. .

【0019】そして、請求項1若しくは請求項2に記載
の発明によれば、論理ブロック上においては、書き込み
処理、読み出し処理、消去処理を支障なく行うことがで
きる一方、物理ブロック上においては前回のデータ管理
状況更新時の内容がそのまま次回のデータ管理状況更新
時まで保持されて、データとデータ管理情報との整合性
が保たれるため、その間に停電が発生した場合には、前
回の更新時以降蓄積されたデータについては消失するも
のの、前回の更新時に既に存在したデータについては正
常に読み出すことが可能となり、データの消失を最小限
にとどめつつ不揮発性メモリからの読み出しデータの信
頼性を保証できる。しかも、揮発性メモリ(ワークメモ
リ)上のデータ管理情報については逐次更新させつつ
も、不揮発性メモリ(フラッシュメモリ等)上のデータ
管理情報については間欠的にしか更新されないから、記
憶素子の性質からアクセス回数に制限のある不揮発性メ
モリを、その規定アクセス回数の元で最大限に活用する
ことができる。
According to the first or second aspect of the invention, the write process, the read process, and the erase process can be performed on the logical block without any trouble, while the previous process can be performed on the physical block. The contents at the time of updating the data management status are retained as they are until the next data management status update, and the consistency between the data and the data management information is maintained. Although the stored data will be lost after that, the data already existing at the time of the previous update can be read normally, and the reliability of the read data from the non-volatile memory is guaranteed while minimizing the loss of data. it can. Moreover, while the data management information in the volatile memory (work memory) is updated sequentially, the data management information in the non-volatile memory (flash memory, etc.) is updated only intermittently. It is possible to make maximum use of the non-volatile memory having a limited access count under the specified access count.

【0020】[0020]

【発明の実施の形態】以下、この発明の好ましい実施の
形態につき、添付図面を参照して詳細に説明する。前述
したように、本発明にかかるメモリアクセス制御方法及
び装置の効果は、例えばフラッシュメモリをPDA等の
小型携帯用電子機器のユーザデータ格納用メモリとして
使用した場合等に顕著なものとなると考えられる。すな
わち、この種の小型携帯用電子機器にあっては、サイズ
並びに重量の制約により大容量バッテリの搭載が困難な
ことから使用中に電池切れを起こす可能性が高く、また
使用中に誤って落下させた場合の衝撃等によるバッテリ
の接触不良により停電を起こす可能性も高い。このよう
な電池切れや停電のたびに、フラッシュメモリ内におい
てデータとデータ管理情報とに不整合が生じて、読み出
しデータに関する信頼性が失われるとすれば、製品とし
て実用に供し得ない。かかる問題は本発明の適用によ
り、次のように解決される。
BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. As described above, the effect of the memory access control method and device according to the present invention is considered to be remarkable when a flash memory is used as a user data storage memory of a small portable electronic device such as a PDA. . In other words, in this type of small portable electronic device, it is difficult to mount a large capacity battery due to size and weight restrictions, and there is a high possibility that the battery will run out during use, and it will accidentally fall during use. There is also a high possibility that a power failure will occur due to poor battery contact due to shock or the like. If there is a mismatch between the data and the data management information in the flash memory each time the battery runs out or a power failure occurs, and the reliability of the read data is lost, it cannot be put to practical use as a product. The application of the present invention solves this problem as follows.

【0021】本発明が適用された小型携帯用電子機器の
ハードウェア構成を図1のブロック図により概略的に説
明する。同図に示されるように、この種の小型携帯用電
子機器は、ユーザとの間でデータのやりとりを行うため
のマンマシンインタフェース部(最近の例では、ペンタ
ッチ式の入力パッド等が多く使用されている)100
と、例えば電話帳、スケジュール等と言ったユーザデー
タを格納するためのユーザデータメモリ200と、機器
の各種の動作を実現するためのシステムプログラムを格
納するためのシステムプログラムメモリ300と、シス
テムプログラムの実行に際するワークエリア等として使
用されるワークメモリ400と、機器の動作機能を実現
するためのCPU500とから概略構成されており、こ
れらの機器構成要素は周知のようにアドレスバス、デー
タバス、コントロールバス等からなるシステムバス60
0により相互に結ばれている。尚、この種のストアード
プログラム式制御装置の基本的な構成並びに動作は、当
業者にとっては周知であるから、これ以上の説明は省略
する。
The hardware configuration of a small portable electronic device to which the present invention is applied will be schematically described with reference to the block diagram of FIG. As shown in the figure, this type of small portable electronic device has a man-machine interface section (in recent examples, a pen-touch type input pad is often used for exchanging data with a user. 100)
A user data memory 200 for storing user data such as a telephone directory, a schedule, etc., a system program memory 300 for storing a system program for realizing various operations of the device, and a system program memory A work memory 400 used as a work area at the time of execution, and a CPU 500 for realizing the operation function of the device are roughly configured, and these device components are well-known such as an address bus, a data bus, System bus 60 consisting of control bus, etc.
Connected to each other by 0. Since the basic configuration and operation of this type of stored program control device are well known to those skilled in the art, further description will be omitted.

【0022】ユーザデータメモリ200としては、記憶
素子の性質からアクセス回数に制限のある不揮発性メモ
リである書き替え可能なフラッシュメモリが使用されて
おり、これにより電源スイッチがオフされた後にあって
も、ユーザデータについては保存されるようになされて
いる。これに対して、ワークメモリ400としては、揮
発性素子である書き替え可能な通常半導体構造のDRA
MやSRAM等が使用されている。そのため、電源スイ
ッチがオンとされて何らかの操作が行われている状態に
おいて、バッテリ切れや落下衝撃によるバッテリの接続
不良等を原因とする停電が発生すると、ワークメモリ4
00の記憶内容は消失する虞がある。
As the user data memory 200, a rewritable flash memory, which is a non-volatile memory whose number of accesses is limited due to the nature of the storage element, is used, and even if the power switch is turned off by this. The user data is saved. On the other hand, the work memory 400 is a rewritable normal semiconductor structure DRA that is a volatile element.
M and SRAM are used. Therefore, in the state where the power switch is turned on and some operation is performed, if a power failure occurs due to a battery connection failure or a battery connection failure due to a drop impact, the work memory 4
The stored contents of 00 may be lost.

【0023】図6に示されるように、ユーザデータメモ
リ200の記憶領域には、物理ブロック群B01〜B0
nを構成する記憶領域と、物理ブロック状態フラグ群F
01〜F0nを格納するための記憶領域と、ブロックマ
ッピング情報MAP0を格納するための記憶領域とがあ
らかじめフォーマッティングされている。
As shown in FIG. 6, in the storage area of the user data memory 200, physical block groups B01 to B0 are included.
A storage area forming n and a physical block status flag group F
The storage area for storing 01 to F0n and the storage area for storing the block mapping information MAP0 are formatted in advance.

【0024】物理ブロック群B01〜B0nを構成する
個々の物理ブロックは、ユーザデータを構成する個々の
論理ブロックを格納するためのものであり、そのサイズ
は例えば互いに同一であって、しかも論理ブロックのサ
イズとも同一とされている。そして、アクセス要求と共
に順次に到来するユーザデータの各論理ブロックは、後
に詳細に説明するように、物理ブロック群B01〜B0
nのいずれかに割り当てて格納されることとなる。
The individual physical blocks forming the physical block groups B01 to B0n are for storing the individual logical blocks forming the user data, and their sizes are the same, for example, and the logical blocks of the logical blocks are the same. The size is the same. Then, the respective logical blocks of the user data that sequentially arrive with the access request are physical block groups B01 to B0, as will be described later in detail.
It will be allocated and stored in any of n.

【0025】物理ブロック状態フラグ群F01〜F0n
を構成する個々の物理ブロック状態フラグは、上述の物
理ブロック群B01〜B0nを構成する個々の物理ブロ
ックと一対一に対応しており、各々の物理ブロックが使
用中であるか或いは不使用中であるかを表示している。
この物理ブロック状態フラグ群F01〜F0nは不揮発
性であるから、電源投入直後の物理ブロック群B01〜
B0nの使用状況確認は、上記物理ブロック状態フラグ
群F01〜F0nの内容を参照することにより行われ
る。ブロックマッピング情報MAP0とは、物理ブロッ
クと論理ブロックとの結合関係、すなわち物理ブロック
群B01〜B0nを構成する各物理ブロックにどの論理
ブロックが格納されているかを示す情報である。このブ
ロックマッピング情報MAP0についても不揮発性であ
るから、電源投入直後の物理ブロック群B01〜B0n
の記憶ブロック確認(どの論理ブロックが格納されてい
るか)は、上記ブロックマッピング情報MAP0を参照
することにより行われる。
Physical block status flag group F01 to F0n
The individual physical block status flags that make up each of the physical block groups have a one-to-one correspondence with the individual physical blocks that make up the physical block groups B01 to B0n, and each physical block is in use or not in use. Is displayed.
Since the physical block state flag groups F01 to F0n are non-volatile, the physical block group B01 to F0n immediately after the power is turned on.
The use status of B0n is confirmed by referring to the contents of the physical block status flag groups F01 to F0n. The block mapping information MAP0 is information indicating a connection relationship between physical blocks and logical blocks, that is, which logical block is stored in each physical block forming the physical block groups B01 to B0n. Since this block mapping information MAP0 is also non-volatile, the physical block groups B01 to B0n immediately after the power is turned on.
The storage block confirmation (which logical block is stored) is performed by referring to the block mapping information MAP0.

【0026】なお、以下の説明では、上述の物理ブロッ
ク状態フラグ群F01〜F0nとブロックマッピング情
報MAP0とを合わせて、『データ管理情報』と称する
こととする。
In the following description, the physical block status flag groups F01 to F0n and the block mapping information MAP0 are collectively referred to as "data management information".

【0027】このデータ管理情報の参照(読み取り)並
びに更新(読み取り並びに書き込み)は、ビット処理等
の必要性から、データ管理情報が記憶された一連の記憶
領域に対する一括読み取り乃至書き込み処理により行わ
れる。そのため、物理ブロック状態フラグ群F01〜F
0n並びにブロックマッピング情報MAP0が格納され
たデータ管理情報記憶領域に対するアクセス頻度は、物
理ブロック群B01〜B0nを構成するデータ記憶領域
に対するアクセス頻度に比べて格段に高くなる。そのた
め、データ管理情報の参照並びに更新のために、その都
度、直接にユーザデータメモリ200を構成するフラッ
シュメモリにアクセスするとすれば、データ管理情報記
憶領域の消耗が激しく、データ記憶領域よりも先にデー
タ管理領域だけがその寿命に達してしまい、結果とし
て、フラッシュメモリ全体としての寿命を短くしてしま
う。
The reference (reading) and updating (reading and writing) of the data management information are performed by batch reading or writing processing for a series of storage areas in which the data management information is stored, because of necessity of bit processing and the like. Therefore, the physical block status flag groups F01 to F
0n and the access frequency to the data management information storage area in which the block mapping information MAP0 is stored are significantly higher than the access frequency to the data storage areas configuring the physical block groups B01 to B0n. Therefore, if the flash memory that constitutes the user data memory 200 is directly accessed each time to refer to and update the data management information, the data management information storage area is heavily consumed, and the data management information is stored before the data storage area. Only the data management area reaches its life, and as a result, the life of the entire flash memory is shortened.

【0028】そこで、この発明では、以下に説明するよ
うに、ユーザデータメモリ200内のデータ管理情報を
ワークメモリ400に複写して、データ管理情報の逐次
的な参照並びに更新のためには、その複写されたワーク
メモリ400内のデータ管理情報にアクセスする一方、
適当なタイミングにてワークメモリ400内のデータ管
理情報の内容にてユーザデータメモリ200内のデータ
管理情報を間欠的に更新すると言う手法を採用すること
により、フラッシュメモリの寿命低下の問題を解決して
いる。加えて、ワークメモリ400内のデータ管理情報
にアクセスしつつユーザデータメモリ200のデータ記
憶領域の内容を消去若しくは書き替えている間には、ユ
ーザデータメモリ200内においてデータとデータ管理
情報との間に不整合が生ずることを防止して、不意の停
電が起きても、停電回復時にあっては、前回のデータ管
理情報更新時に遡って、ユーザデータメモリ200の継
続使用が可能となるように配慮している。
Therefore, according to the present invention, as described below, the data management information in the user data memory 200 is copied to the work memory 400, and in order to refer to and update the data management information sequentially, While accessing the data management information in the copied work memory 400,
By adopting the method of intermittently updating the data management information in the user data memory 200 with the content of the data management information in the work memory 400 at an appropriate timing, the problem of the life reduction of the flash memory is solved. ing. In addition, while erasing or rewriting the contents of the data storage area of the user data memory 200 while accessing the data management information in the work memory 400, between the data and the data management information in the user data memory 200. Even if an unexpected power failure occurs, the user data memory 200 can be continuously used even if an unexpected power failure occurs. are doing.

【0029】すなわち、本発明全体のソフトウェア構成
(システムプログラムの構成)を表している図2のゼネ
ラルフローチャートに示されるように、本機器の使用の
ために電源が投入されると、ユーザデータメモリ200
の使用開始に先立つ前処理として、ユーザデータメモリ
(フラッシュメモリ)200内に保存されていたデータ
管理情報を構成する物理ブロック状態フラグ群F01〜
F0n並びにブロックマッピング情報MAP0の内容
は、図6(a)に示されるように、ワークメモリ400
内へと複写され、最新状態表示用の物理ブロック状態フ
ラグ群F11〜F1nの初期値として、並びに、最新状
態表示用のブロックマッピング情報MAP1の初期値と
して記憶される(ステップ201,202)。このと
き、物理ブロック状態フラグ群F01〜F0nの内容に
ついては、さらに、もう一組がワークメモリ400内へ
と複写保存され、初期状態表示用の物理ブロック状態フ
ラグ群F21〜F2nとして記憶される(ステップ20
3)。この初期状態表示用の物理ブロック状態フラグ群
F21〜F2nを設けたのは、初期状態確認のために直
接にユーザデータメモリ(フラッシュメモリ)200を
アクセスすることによるユーザデータメモリ200の消
耗を回避するためである。
That is, as shown in the general flow chart of FIG. 2 showing the software configuration (configuration of the system program) of the whole of the present invention, when the power is turned on for the use of this device, the user data memory 200 is displayed.
As a pre-process prior to the start of use of the physical block status flag group F01 to which the data management information stored in the user data memory (flash memory) 200 is configured.
The contents of F0n and the block mapping information MAP0 are as shown in FIG.
The data is copied in and stored as the initial values of the physical block status flag groups F11 to F1n for displaying the latest status and as the initial values of the block mapping information MAP1 for displaying the latest status (steps 201 and 202). At this time, with respect to the contents of the physical block state flag groups F01 to F0n, another set is further copied and stored in the work memory 400 and stored as the physical block state flag groups F21 to F2n for displaying the initial state ( Step 20
3). The physical block state flag groups F21 to F2n for displaying the initial state are provided to avoid consumption of the user data memory 200 due to direct access to the user data memory (flash memory) 200 for confirmation of the initial state. This is because.

【0030】以後、本装置にあっては、アクセス要求の
到来並びにデータ管理情報更新要求の到来を待機する状
態となる(ステップ204NO,205NO)。この状
態において、何らかのアクセス要求が到来すると(ステ
ップ204YES)、その要求種別が判定され(ステッ
プ206)、その判定結果が消去要求、書き込み要求、
読み出し要求のいずれであるかに応じて、消去要求実行
処理(ステップ207)、書き込み要求実行処理(ステ
ップ208)、読み出し要求実行処理(ステップ20
9)のいずれかが実行される。これにより、ユーザメモ
リ200内におけるデータとデータ管理情報との整合性
を保ちつつ、ワークメモリ400内のデータ管理情報に
逐次アクセスして、消去処理、書き込み処理、並びに、
読み出し処理を行うことになる。この間に、例えばアプ
リケーションプログラムが発行したデータ管理情報更新
要求が到来すると(ステップ205YES)、図6
(b)に示されるように、それまで逐次更新されてきた
ワークメモリ400内のデータ管理情報(物理ブロック
状態フラグ群F11〜F1n、並びに、ブロックマッピ
ング情報MAP1)にて、ユーザデータメモリ200内
のデータ管理情報(物理ブロック状態フラグ群F01〜
F0n、並びに、ブロックマッピング情報MAP0)は
書き替えられ(ステップ210,211)、これにより
ユーザデータメモリ200内におけるデータ管理情報の
実際の更新処理が完了する。以後、更新直後の物理ブロ
ック状態フラグ群F01〜F0nの内容は、再度、ワー
クメモリ400内へと複写され(ステップ203)、新
たな初期状態表示用の物理ブロック状態フラグ群F21
〜F2nとして記憶される。
Thereafter, the present apparatus enters a state of waiting for the arrival of the access request and the arrival of the data management information update request (steps 204NO, 205NO). In this state, if any access request arrives (YES in step 204), the request type is determined (step 206), and the determination result is an erase request, a write request,
Depending on whether it is a read request, an erase request execution process (step 207), a write request execution process (step 208), or a read request execution process (step 20).
Either of 9) is executed. Thereby, while maintaining the consistency between the data in the user memory 200 and the data management information, the data management information in the work memory 400 is sequentially accessed to erase, write, and
The reading process will be performed. During this period, for example, when a data management information update request issued by the application program arrives (YES in step 205), FIG.
As shown in (b), the data management information (physical block status flag groups F11 to F1n and block mapping information MAP1) in the work memory 400, which has been sequentially updated, is stored in the user data memory 200. Data management information (physical block status flag group F01-
F0n and the block mapping information MAP0) are rewritten (steps 210 and 211), thereby completing the actual updating process of the data management information in the user data memory 200. After that, the contents of the physical block status flag groups F01 to F0n immediately after the update are copied again into the work memory 400 (step 203), and a new physical block status flag group F21 for initial state display is displayed.
Stored as F2n.

【0031】以上の図2のゼネラルフローチャートに示
される本発明の構成によれば、ワークメモリ400内の
データ管理情報に関してはデータアクセスの毎に逐次更
新されるのに対して、ユーザデータメモリ(フラッシュ
メモリ)200内のデータ管理情報に関してはデータ管
理情報更新要求に応答して間欠的にしか更新されないた
め、その分だけユーザデータメモリ200を構成するフ
ラッシュメモリに対するアクセス頻度が低下することに
より、消耗程度も軽減されて、フラッシュメモリの寿命
増大に寄与することとなる。
According to the configuration of the present invention shown in the general flow chart of FIG. 2, the data management information in the work memory 400 is sequentially updated each time data is accessed, whereas the user data memory (flash memory) is updated. Since the data management information in the memory 200 is updated only intermittently in response to the data management information update request, the access frequency to the flash memory configuring the user data memory 200 is reduced by that much, and the extent of wear is reduced. Is also reduced, which contributes to an increase in the life of the flash memory.

【0032】次に、消去処理、書き込み処理、並びに、
読み出し処理を正常に行わせつつも、ユーザデータメモ
リ200内においてデータとデータ管理情報との整合性
が保持されることに着目しつつ、それぞれの処理内容を
詳細に説明する。
Next, erase processing, write processing, and
The contents of each process will be described in detail while paying attention to the fact that the consistency between the data and the data management information is maintained in the user data memory 200 while the read process is normally performed.

【0033】消去要求実行処理(ステップ207)の詳
細を図3のフローチャートを参照して説明する。同図に
おいて、処理が開始されると、ワークメモリ400内の
ブロックマッピング情報MAP1に基づいて、消去要求
で指定された論理ブロックにマッピングされた物理ブロ
ックB0kが検索される(ステップ301)。ここで、
消去要求で指定された論理ブロックにマッピングされた
物理ブロックB0kが見つからない場合には(ステップ
302NO)、所定のエラー処理が行われる。これに対
して、そのような物理ブロックB0kが見つかると(ス
テップ302YES)、次いで、ワークメモリ400内
の初期状態表示用の物理ブロック状態フラグ群F21〜
F2nを参照することにより、当該検索された物理ブロ
ックB0kの初期状態(最新のデータ管理情報更新時の
状態)における使用状況がチェックされる(ステップ3
03)。
Details of the erase request execution process (step 207) will be described with reference to the flowchart of FIG. In the figure, when the process is started, the physical block B0k mapped to the logical block designated by the erase request is searched based on the block mapping information MAP1 in the work memory 400 (step 301). here,
When the physical block B0k mapped to the logical block designated by the erase request is not found (NO in step 302), a predetermined error process is performed. On the other hand, when such a physical block B0k is found (YES in step 302), then the physical block state flag group F21 to F21 for displaying the initial state in the work memory 400 is displayed.
By referring to F2n, the usage status of the searched physical block B0k in the initial state (the state when the latest data management information was updated) is checked (step 3).
03).

【0034】ここで、使用中でないとすれば、その物理
ブロックB0kに記憶されているデータは前回のデータ
管理情報更新時以降に蓄積されものであって前回のデー
タ管理情報更新時には存在しなかったことを意味してお
り、これを消去したのちに仮に停電が発生してデータ管
理情報の更新が不可能となったとしても、ユーザデータ
メモリ200上においてデータ(B01〜B0n)とデ
ータ管理情報(F01〜F0n,MAP0)との間に不
整合が生ずる虞はない。そのため、使用中でないと判定
された場合には(ステップ304NO)、当該物理ブロ
ックB0kのデータを消去し(ステップ305)、当該
物理ブロックB0kに対応する最新状態表示用の物理ブ
ロック状態フラグF1kを不使用中に変更し(ステップ
306)、さらに、ブロックマッピング情報MAP1に
おける当該物理ブロックB0kのマッピングを切り離し
て当該物理ブロックへのアクセスを不能にした後(ステ
ップ307)、処理を終了する。このようにすれば、仮
に停電が発生してデータ管理情報の更新が不可能となっ
たとしても、元々前回の更新時には存在しなかったデー
タを消去したのであるから、ユーザデータメモリ200
上においてデータ(B01〜B0n)とデータ管理情報
(F01〜F0n,MAP0)との間に不整合が生ずる
虞はなくなる。尚、その後、データ管理情報更新要求が
到来した場合には、ワークメモリ上のデータ管理情報
(F11〜F1n,MAP1)の内容はデータ記憶領域
上のデータ内容(B01〜B0n)と一致しているので
あるから、それまでのデータ逐次更新結果を生かしつ
つ、ユーザデータメモリ200上おけるデータ管理情報
(F01〜F0n,MAP0)の更新を行うことができ
る。
Here, if it is not in use, the data stored in the physical block B0k has been accumulated since the last update of the data management information and did not exist at the last update of the data management information. Even if the data management information cannot be updated due to a power failure after the data is erased, the data (B01 to B0n) and the data management information (on the user data memory 200) and the data management information ( There is no possibility of inconsistency between F01 to F0n and MAP0). Therefore, when it is determined that the physical block B0k is not being used (step 304), the data of the physical block B0k is erased (step 305), and the physical block state flag F1k for displaying the latest state corresponding to the physical block B0k is not set. It is changed during use (step 306), the mapping of the physical block B0k in the block mapping information MAP1 is separated to make the physical block inaccessible (step 307), and then the process ends. By doing so, even if the data management information cannot be updated due to a power failure, the data that did not originally exist at the time of the previous update is erased. Therefore, the user data memory 200
There is no risk of inconsistency between the data (B01 to B0n) and the data management information (F01 to F0n, MAP0). After that, when a data management information update request arrives, the contents of the data management information (F11 to F1n, MAP1) on the work memory match the data contents (B01 to B0n) on the data storage area. Therefore, it is possible to update the data management information (F01 to F0n, MAP0) in the user data memory 200 while making the most of the data sequential update results up to that point.

【0035】これに対して、使用中であるとすれば、そ
の物理ブロックB0kに記憶されているデータは前回の
データ管理情報更新時には既に存在したことを意味して
おり、これを消去したのちに仮に停電が発生してデータ
管理情報の更新が不可能となったとすれば、ユーザデー
タメモリ200上においてデータ(B01〜B0n)と
データ管理情報(F01〜F0n,MAP0)との間に
不整合が生ずる虞がある。そのため、使用中であると判
定された場合には(ステップ304YES)、当該物理
ブロックB0kのデータを消去することなく、当該物理
ブロックB0kに対応する最新状態表示用の物理ブロッ
ク状態フラグF1kを不使用中に変更し(ステップ30
6)、さらに、ブロックマッピング情報MAP1におけ
る当該物理ブロックB0kのマッピングを切り離したの
ち(ステップ307)、処理を終了する。このようにす
れば、仮に停電が発生してデータ管理情報(F01〜F
0n,MAP0)の更新が不可能となったとしても、前
回の更新時に存在したデータについては消去されていな
いため、ユーザデータメモリ200上においてデータ
(B01〜B0n)とデータ管理情報(F01〜F0
n,MAP0)との間に不整合が生ずる虞はない。他
方、物理ブロックB0kのデータは消去されずに保存さ
れているものの、物理ブロックに対するアクセスはワー
クメモリ400上のブロックマッピング情報MAP1に
基づいて行われるため、消去されているはずのデータが
誤って読み出される虞はない。尚、その後、データ管理
情報更新要求が到来した場合には、ユーザデータメモリ
200上においても物理ブロックB0kに関するマッピ
ング情報MAP0の切り離しが行われ、また物理ブロッ
ク状態フラグF0kについては不使用とされるため、そ
の後に、新規論理ブロックに関する書き込み要求が到来
したような場合には、先のデータが保存されてはいるも
のの、当該物理ブロックB0kを新規ブロック格納用の
空き物理ブロックの候補として供することができる。
On the other hand, if it is in use, it means that the data stored in the physical block B0k already existed at the time of the last update of the data management information, and after this is erased. If it is impossible to update the data management information due to a power failure, there is an inconsistency between the data (B01 to B0n) and the data management information (F01 to F0n, MAP0) on the user data memory 200. May occur. Therefore, when it is determined that the physical block B0k is in use (YES in step 304), the physical block state flag F1k for displaying the latest state corresponding to the physical block B0k is not used without erasing the data. Change to (Step 30
6) Further, after the mapping of the physical block B0k in the block mapping information MAP1 is separated (step 307), the processing is ended. In this way, if a power failure occurs and the data management information (F01-F01)
0n, MAP0) cannot be updated, the data existing at the time of the previous update is not erased, and therefore the data (B01 to B0n) and the data management information (F01 to F0) on the user data memory 200.
There is no possibility of inconsistency with the (n, MAP0). On the other hand, although the data of the physical block B0k is stored without being erased, since the physical block is accessed based on the block mapping information MAP1 in the work memory 400, the data that should have been erased is erroneously read. There is no danger of being lost. Incidentally, when a data management information update request arrives thereafter, the mapping information MAP0 relating to the physical block B0k is also separated on the user data memory 200, and the physical block status flag F0k is not used. After that, when a write request for a new logical block arrives, the physical block B0k can be used as a candidate for a free physical block for storing the new block, although the previous data is stored. .

【0036】次に、書き込み要求実行処理(ステップ2
08)の詳細を図4のフローチャートを参照して説明す
る。同図において、処理が開始されると、ワークメモリ
400内のブロックマッピング情報MAP1に基づい
て、書き込み要求で指定された論理ブロックにマッピン
グされた物理ブロックB0kが検索される(ステップ4
01)。ここで、そのような物理ブロックが見つかると
(ステップ402YES)、次いで、ワークメモリ40
0内の初期状態表示用の物理ブロック状態フラグ群F2
1〜F2nを参照することにより、当該検索された物理
ブロックB0kの初期状態(最新のデータ管理情報更新
時の状態)における使用状況がチェックされる(ステッ
プ403)。
Next, a write request execution process (step 2)
08) will be described in detail with reference to the flowchart of FIG. In the figure, when the process is started, the physical block B0k mapped to the logical block designated by the write request is searched based on the block mapping information MAP1 in the work memory 400 (step 4).
01). If such a physical block is found here (YES in step 402), then the work memory 40
Physical block status flag group F2 for displaying initial status in 0
By referring to 1 to F2n, the usage status of the searched physical block B0k in the initial state (the state when the latest data management information was updated) is checked (step 403).

【0037】ここで、使用中でないとすれば、その物理
ブロックB0kに記憶されているデータは前回のデータ
管理情報更新時には存在しなかったことを意味してお
り、これを上書き消去したのちに仮に停電が発生してデ
ータ管理情報(F01〜F0n,MAP0)の更新が不
可能となったとしても、ユーザデータメモリ200上に
おいてデータ(B01〜B0n)とデータ管理情報(F
01〜F0n,MAP0)との間に不整合が生ずる虞は
ない。そのため、使用中でないと判定された場合には
(ステップ404NO)、当該物理ブロックB0kのデ
ータを新たなデータにより上書きし(ステップ40
5)、当該物理ブロックB0kに対応する最新状態表示
用の物理ブロック状態フラグF1kを使用中に変更して
(ステップ406)、処理を終了する。このようにすれ
ば、仮に停電が発生してデータ管理情報(F01〜F0
n,MAP0)の更新が不可能となったとしても、元々
前回の更新時には存在しなかったデータを上書き消去し
たのであるから、ユーザデータメモリ200上において
データ(B01〜B0n)とデータ管理情報(F01〜
F0n,MAP0)との間に不整合が生ずる虞はない。
他方、その後、データ管理情報更新要求が到来した場合
には、ワークメモリ上のデータ管理情報(F11〜F1
n,MAP1)の内容はデータ記憶領域上のデータ内容
(B01〜B0n)と一致しているのであるから、それ
までのデータ逐次更新結果を生かしつつ、ユーザデータ
メモリ200上おけるデータ管理情報(F01〜F0
n,MAP0)の更新を行うことができる。
Here, if it is not in use, it means that the data stored in the physical block B0k did not exist at the time of the last update of the data management information. Even if the data management information (F01 to F0n, MAP0) cannot be updated due to a power failure, the data (B01 to B0n) and the data management information (F0) are stored in the user data memory 200.
01-F0n, MAP0) does not cause a mismatch. Therefore, if it is determined that the physical block B0k is not being used (NO in step 404), the data of the physical block B0k is overwritten with new data (step 40).
5) Then, the physical block status flag F1k for displaying the latest status corresponding to the physical block B0k is changed to “in use” (step 406), and the process is ended. In this way, if a power failure occurs and the data management information (F01 to F0
(n, MAP0) cannot be updated, the data that originally did not exist at the time of the previous update was overwritten and erased. Therefore, the data (B01 to B0n) and the data management information (on the user data memory 200) are deleted. F01 ~
There is no risk of inconsistency between F0n and MAP0).
On the other hand, when a data management information update request arrives thereafter, the data management information (F11 to F1
Since the contents of (n, MAP1) match the data contents (B01 to B0n) in the data storage area, the data management information (F01 ~ F0
n, MAP0) can be updated.

【0038】これに対して、使用中であるとすれば、そ
の物理ブロックB0kに記憶されているデータは前回の
データ管理情報更新時には既に存在したことを意味して
おり、これを上書き消去したのちに仮に停電が発生して
データ管理情報の更新が不可能となったとすれば、ユー
ザデータメモリ200上においてデータ(B01〜B0
n)とデータ管理情報(F01〜F0n,MAP0)と
の不整合が生ずる虞がある。そのため、使用中であると
判定された場合には(ステップ404YES)、当該物
理ブロックB0kのデータを上書き消去することなく、
先ず、当該物理ブロックB0kに対応する最新状態表示
用の物理ブロック状態フラグF1kを不使用中に変更し
(ステップ407)、さらに、ブロックマッピング情報
MAP1における当該物理ブロックB0kのマッピング
を切り離して当該物理ブロックへのアクセスを不能とす
る(ステップ408)。次いで、最新状態表示用の物理
ブロック状態フラグ群F11〜F1n並びに初期状態表
示用の物理ブロック状態フラグ群F21〜F2nの内容
を参照することにより、現在不使用状態にありかつ初期
状態においても不使用状態であった物理ブロックを空き
物理ブロックB0jとして検索し(ステップ409)、
当該書き込み要求にかかる論理ブロックをこの空き物理
ブロックB0jにマッピングするようにしてブロックマ
ッピング情報MAP1を更新し(ステップ410)、続
いて、この空き物理ブロックB0jに対してデータの書
き込みを行い(ステップ411)、最新状態表示用物理
ブロック状態フラグ群F10〜F1n中の該当物理ブロ
ック状態フラグF1jを使用中に変更して(ステップ4
12)、処理を終了する。このようにすれば、仮に停電
が発生してデータ管理情報の更新が不可能となったとし
ても、前回の更新時に存在したデータについては消去さ
れていないため、ユーザデータメモリ200上において
データ(B01〜B0n)とデータ管理情報(F01〜
F0n,MAP0)との間に不整合が生ずる虞はない。
他方、物理ブロックB0kのデータは消去されずに保存
されてはいるものの、物理ブロックB01〜B0nに対
するアクセスはワークメモリ400上のブロックマッピ
ング情報MAP1に基づいて行われるため、消去されて
いるはずのデータが誤って読み出される虞はないことは
勿論のこと、本来物理ブロックB0kに書き込んだ筈の
論理ブロックのデータを、新たにマッピングされた物理
ブロックB0jから正常に読み出すことができる。尚、
その後、データ管理情報更新要求が到来した場合には、
ユーザデータメモリ200上のブロックマッピング情報
MAP0においても物理ブロックB0kに関するマッピ
ング切り離し並びに物理ブロックB0jに関する新たな
マッピングが行われ、併せて、物理ブロック状態フラグ
F0kについては不使用とされるため、その後に、新規
論理ブロックに関する書き込み要求が到来したような場
合には、先のデータが保存されてはいるものの、当該物
理ブロックB0kを新規ブロック格納用の空き物理ブロ
ックの候補として供することができる。
On the other hand, if it is in use, it means that the data stored in the physical block B0k already existed at the time of the previous update of the data management information, and after overwriting and erasing this data. If it is impossible to update the data management information due to a power failure, the data (B01 to B0) on the user data memory 200 will be stored.
n) and the data management information (F01 to F0n, MAP0) may be inconsistent. Therefore, when it is determined that the physical block B0k is in use (YES in step 404), the data in the physical block B0k is not overwritten and erased.
First, the physical block state flag F1k for displaying the latest state corresponding to the physical block B0k is changed to “not in use” (step 407), and the mapping of the physical block B0k in the block mapping information MAP1 is separated to remove the physical block. Access is disabled (step 408). Next, by referring to the contents of the physical block state flag groups F11 to F1n for displaying the latest state and the physical block state flag groups F21 to F2n for displaying the initial state, the physical block state flag group is currently in the unused state and is not used even in the initial state. The physical block in the state is searched as an empty physical block B0j (step 409),
The block mapping information MAP1 is updated so that the logical block associated with the write request is mapped to this free physical block B0j (step 410), and then data is written to this free physical block B0j (step 411). ), The corresponding physical block state flag F1j in the latest state display physical block state flag groups F10 to F1n is changed to “in use” (step 4).
12), the process ends. By doing so, even if the data management information cannot be updated due to a power failure, the data (B01) stored in the user data memory 200 is not deleted because the data existing at the previous update is not deleted. ~ B0n) and data management information (F01 ~)
There is no risk of inconsistency between F0n and MAP0).
On the other hand, although the data of the physical block B0k is stored without being erased, since the access to the physical blocks B01 to B0n is performed based on the block mapping information MAP1 in the work memory 400, the data that should have been erased. Of course, there is no possibility of being erroneously read, and the data of the logical block which should have been originally written in the physical block B0k can be normally read from the newly mapped physical block B0j. still,
After that, when a data management information update request arrives,
Also in the block mapping information MAP0 on the user data memory 200, mapping separation for the physical block B0k and new mapping for the physical block B0j are performed, and the physical block status flag F0k is not used. When a write request for a new logical block arrives, the physical block B0k can be used as a free physical block candidate for storing a new block although the previous data is stored.

【0039】なお、書き込み要求で指定される論理ブロ
ックに対応する物理ブロックが見つからない場合には
(ステップ402NO)、新規な論理ブロックに関する
書き込み要求であると認識し、この場合には、最新状態
表示用の物理ブロック状態フラグ群F11〜F1n並び
に初期状態表示用の物理ブロック状態フラグ群F21〜
F2nの内容を参照することにより、現在不使用状態に
ありかつ初期状態においても不使用状態であった物理ブ
ロックを空き物理ブロックB0jとして検索し(ステッ
プ413)、当該書き込み要求にかかる論理ブロックを
この空き物理ブロックB0jにマッピングするようにし
てブロックマッピング情報MAP1を更新し(ステップ
414)、続いて、この空き物理ブロックB0jに対し
てデータの書き込みを行い(ステップ405)、最新状
態表示用物理ブロック状態フラグ群F10〜F1n中の
該当物理ブロック状態フラグF1jを使用中に変更して
(ステップ406)、処理を終了する。
If the physical block corresponding to the logical block specified by the write request cannot be found (NO in step 402), it is recognized that the write request is for a new logical block, and in this case, the latest status is displayed. Physical block state flag groups F11 to F1n for display and physical block state flag groups F21 to F21 for initial state display
By referring to the contents of F2n, the physical block that is currently in the unused state and is also in the unused state in the initial state is searched as a free physical block B0j (step 413), and the logical block associated with the write request is searched for. The block mapping information MAP1 is updated so as to map to the empty physical block B0j (step 414), and then data is written to this empty physical block B0j (step 405) to display the latest state physical block state. The corresponding physical block state flag F1j in the flag groups F10 to F1n is changed to “in use” (step 406), and the process is ended.

【0040】次に、読み出し要求実行処理(ステップ2
09)についても図5のフローチャートを参照して簡単
に説明する。同図において、処理が開始されると、ワー
クメモリ400上のブロックマッピング情報MAP1に
基づいて、読み出し要求で指定された論理ブロックにマ
ッピングされた物理ブロックB0kが検索される(ステ
ップ501)。ここで、読み出し要求で指定された論理
ブロックにマッピングされた物理ブロックB0kが見つ
からない場合には(ステップ502NO)、所定のエラ
ー処理が行われる。これに対して、そのような物理ブロ
ックB0kが見つかると(ステップ502YES)、当
該物理ブロックB0kからのデータ読み出しが行われる
(ステップ503)。このように物理ブロック群B01
〜B0nからのデータ読み出しは、全てワークメモリ4
00上のブロックマッピング情報MAP1の内容に基づ
いて行われるため、先に説明した消去要求実行処理(ス
テップ207)や書き込み要求実行処理(ステップ20
8)等で消去若しくは上書き消去されずに残された物理
ブロックB0kであっても、ワークメモリ400上のブ
ロックマッピング情報MAP1においてマッピングを解
除しておく限り、そのような物理ブロックB0kからデ
ータが誤って読み出されることはない。
Next, a read request execution process (step 2)
09) will also be briefly described with reference to the flowchart of FIG. In the figure, when the process is started, the physical block B0k mapped to the logical block designated by the read request is searched based on the block mapping information MAP1 in the work memory 400 (step 501). Here, if the physical block B0k mapped to the logical block designated by the read request is not found (NO in step 502), a predetermined error process is performed. On the other hand, when such a physical block B0k is found (YES in step 502), data reading from the physical block B0k is performed (step 503). In this way, the physical block group B01
Data read from B0n is all in work memory 4
Since it is performed based on the contents of the block mapping information MAP1 on 00, the erase request execution process (step 207) and the write request execution process (step 20) described above.
8) Even if the physical block B0k is left without being erased or overwritten by the above, as long as mapping is canceled in the block mapping information MAP1 on the work memory 400, data from such physical block B0k is incorrect. Will not be read out.

【0041】なお、以上説明した本発明では、先に説明
した消去要求実行処理(ステップ207)や書き込み要
求実行処理(ステップ208)等で消去若しくは上書き
消去されずに残された使用不能の物理ブロックB0kの
存在により、実際に使用可能な物理ブロック数が幾分減
少するが、現行の製品によればこの種のフラッシュメモ
リの容量は1M〜2Mバイトもあるのに対して、この種
の小型携帯用電子機器にて取り扱われるユーザデータ量
は一般にそれに比べて十分に小さいことに加え、それら
使用不能な物理ブロックについてもデータ管理情報の更
新の毎に再び使用可能状態に回復するため、データ管理
情報の更新周期を適切に設計する限り、実用上は問題が
ないと考えられる。
In the present invention described above, unusable physical blocks left without being erased or overwritten by the erase request execution process (step 207) and the write request execution process (step 208) described above. Due to the presence of B0k, the number of physical blocks that can actually be used is somewhat reduced. However, according to the current products, the capacity of this type of flash memory is as large as 1M to 2M bytes. In general, the amount of user data handled by electronic devices for use in electronic equipment is sufficiently smaller than that, and even for unusable physical blocks, they are restored to the usable state each time the data management information is updated. As long as the update period of is properly designed, it is considered that there is no problem in practice.

【0042】[0042]

【実施例】以下に、本発明の好適な実施例を図7〜図9
を参照して説明する。この実施例にあっては、ユーザデ
ータメモリ200内には5個の物理ブロックB01〜B
05が設定されており、これに合わせて同メモリ200
内には、5個の物理ブロック状態フラグF01〜F05
並びに5個の物理ブロックにマッピング可能なブロック
マッピング情報MAP0が設定されている。また、ワー
クメモリ400内には最新状態を表示するための5個の
物理ブロック状態フラグF11〜F15並びに5個の物
理ブロックにマッピング可能なブロックマッピング情報
MAP1が設定されている。さらに、ワークメモリ40
0内には初期状態(電源投入時若しくは前回のデータ管
理情報更新時の状態)を表示するための5個の物理ブロ
ック状態フラグF21〜F25が設定されている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will be described below with reference to FIGS.
This will be described with reference to FIG. In this embodiment, the user data memory 200 has five physical blocks B01 to B01.
05 is set, and the memory 200
There are five physical block status flags F01 to F05
In addition, block mapping information MAP0 that can be mapped to five physical blocks is set. Further, in the work memory 400, five physical block state flags F11 to F15 for displaying the latest state and block mapping information MAP1 which can be mapped to five physical blocks are set. Furthermore, the work memory 40
Five physical block state flags F21 to F25 for displaying the initial state (state at power-on or last data management information update) are set in 0.

【0043】図7〜図9にて共通に示されているよう
に、この実施例の初期状態においては、3個の物理ブロ
ックB01,B02,B04が使用中(図中斜線にて示
す)、2個の物理ブロックB03,B05が不使用中
(図中白抜きにて示す)とされている。また、物理ブロ
ックB01,B02,B04のそれぞれには、論理ブロ
ックB11,B12,B13がマッピングされており、
これに対応してブロックマッピング情報MAP0におい
ては、物理ブロックB01と論理ブロックB11、物理
ブロックB02と論理ブロックB12、物理ブロックB
01と論理ブロックB11とが結合されるようにしてマ
ッピングが張られている。他方、物理ブロックB03,
B05については、いずれの論理ブロックにも結合され
ないようにしてマッピングが解除されている。
As commonly shown in FIGS. 7 to 9, in the initial state of this embodiment, three physical blocks B01, B02, B04 are in use (indicated by hatching in the drawings), The two physical blocks B03 and B05 are not in use (shown in white in the figure). Further, logical blocks B11, B12, B13 are mapped to the physical blocks B01, B02, B04, respectively,
Correspondingly, in the block mapping information MAP0, physical block B01 and logical block B11, physical block B02 and logical block B12, physical block B
The mapping is set so that 01 and the logical block B11 are connected. On the other hand, physical block B03,
The mapping of B05 is canceled so that it is not connected to any logical block.

【0044】前処理(ステップ201,202,20
3)の直後の状態を図7に示す。同図に示されるよう
に、前処理の直後にあっては、ユーザデータメモリ20
0内における物理ブロックB01〜B05の内容とデー
タ管理情報(F01〜F05、MAP0)の内容とは勿
論完全に一致している。また、ユーザデータメモリ20
0内のブロックマッピング情報MAP0の内容とワーク
メモリ400内のブロックマッピング情報MAP1の内
容とについても完全に一致している。さらに、ユーザデ
ータメモリ200内の物理ブロック状態フラグF01〜
F05とワークメモリ400内の最新状態表示用の物理
ブロック状態フラグF11〜F15並びに初期状態表示
用の物理ブロック状態フラグF21〜F25について
も、完全に一致している。
Preprocessing (steps 201, 202, 20)
The state immediately after 3) is shown in FIG. As shown in the figure, immediately after the pre-processing, the user data memory 20
The contents of the physical blocks B01 to B05 in 0 and the contents of the data management information (F01 to F05, MAP0) are of course completely identical. In addition, the user data memory 20
The contents of the block mapping information MAP0 in 0 and the contents of the block mapping information MAP1 in the work memory 400 also completely match. Further, physical block status flags F01 to F01 to
The physical block status flags F11 to F15 for displaying the latest status and the physical block status flags F21 to F25 for displaying the initial status in the work memory 400 also completely match.

【0045】消去要求実行処理(ステップ207)の直
後の状態を図8に示す。今仮に、前処理に続いて、論理
ブロックB12に関する消去要求が到来したものと想定
する。このとき、図7の最新状態表示用のブロックマッ
ピング情報MAP1を参照すると、論理ブロックB12
は物理ブロックB02にマッピングされていることがわ
かる(図7矢印A箇所参照)。また、図7の初期状態表
示用の物理ブロック状態フラグF22を参照すると、物
理ブロックB02は初期状態では使用中であったことが
わかる(図7矢印B箇所参照)。この場合、物理ブロッ
クB02に格納されていた論理ブロックB12は消去さ
れない(図8矢印A箇所参照)。また、最新状態表示用
の物理ブロック状態フラグF12は不使用中に変更され
る(図8矢印B箇所参照)。さらに、最新状態表示用の
ブロックマッピング情報MAP1では、物理ブロックB
02と論理ブロックB12とのマッピングが解除される
(図8矢印C箇所参照)。そのため、消去要求が到来し
たにも拘わらず、ユーザデータメモリ200内における
データ(B01〜B05)とデータ管理情報(F01〜
F05,MAP0)との整合性は維持され、停電が発生
してワークメモリ400の記憶情報(F11〜F15,
F21〜F25,MAP1)が消失しても、ユーザデー
タメモリ200に対するアクセス(消去、書き込み、読
み出し)に支障を来すことはない。他方、消去した筈の
データを誤って読み出そうとして論理ブロックB12に
関する読み出し要求が到来しても、最新状態表示用のブ
ロックマッピング情報MAP1の論理ブロックB12に
関するマッピングは既に解除されてしまっているためエ
ラーと判定され、物理ブロックB02に格納された論理
ブロックB12の内容が誤って読み出されることはな
い。尚、データ管理情報更新要求が到来して、最新状態
表示用の物理ブロック状態フラグ群F11〜F15並び
にブロックマッピング情報MAP1の内容にて、ユーザ
データメモリ200内の物理ブロック状態フラグ群F0
1〜F05並びにブロックマッピング情報MAP0の内
容が書き替えられ、その後、初期状態表示用の物理ブロ
ック状態フラグ群F21〜F25の内容がユーザデータ
メモリ200の物理ブロック状態フラグ群F01〜F0
5の内容にて更新された後にあっては、初期状態表示用
の物理ブロック状態フラグF22の内容が不使用中に変
更されることにより、物理ブロックB02に格納されて
いるデータ(論理ブロックB12)は最早無効と判断さ
れ、物理ブロックB02は空の状態と同等に取り扱わ
れ、任意のデータの上書きが許容される。
The state immediately after the erase request execution process (step 207) is shown in FIG. Now, assume that an erase request for the logical block B12 has arrived following the preprocessing. At this time, referring to the block mapping information MAP1 for displaying the latest state in FIG. 7, the logical block B12
Is mapped to the physical block B02 (see the position indicated by arrow A in FIG. 7). Further, referring to the physical block state flag F22 for displaying the initial state in FIG. 7, it can be seen that the physical block B02 was in use in the initial state (see the arrow B portion in FIG. 7). In this case, the logical block B12 stored in the physical block B02 is not erased (see the location indicated by arrow A in FIG. 8). Further, the physical block state flag F12 for displaying the latest state is changed during non-use (see the position of arrow B in FIG. 8). Further, in the block mapping information MAP1 for displaying the latest state, the physical block B
02 and the logical block B12 are released from the mapping (refer to the arrow C in FIG. 8). Therefore, the data (B01 to B05) in the user data memory 200 and the data management information (F01 to
(F05, MAP0) consistency is maintained, a power failure occurs, and the stored information (F11 to F15,
Even if (F21 to F25, MAP1) disappears, it does not hinder the access (erasing, writing, reading) to the user data memory 200. On the other hand, even if a read request for the logical block B12 arrives in an attempt to erroneously read the data that should have been erased, the mapping for the logical block B12 in the block mapping information MAP1 for displaying the latest state has already been canceled. It is determined that there is an error, and the contents of the logical block B12 stored in the physical block B02 will not be erroneously read. When a data management information update request arrives, the physical block status flag group F0 in the user data memory 200 is set based on the contents of the physical block status flag groups F11 to F15 for displaying the latest status and the block mapping information MAP1.
1 to F05 and the contents of the block mapping information MAP0 are rewritten, and thereafter, the contents of the physical block state flag groups F21 to F25 for displaying the initial state are changed to the physical block state flag groups F01 to F0 of the user data memory 200.
After being updated with the content of 5, the content of the physical block status flag F22 for displaying the initial status is changed to "not in use", so that the data stored in the physical block B02 (logical block B12). Is judged to be invalid anymore, the physical block B02 is treated in the same manner as an empty state, and any data can be overwritten.

【0046】書き込み要求実行処理(ステップ208)
の直後の状態を図9に示す。今仮に、前処理に続いて、
論理ブロックB12に関する書き込み要求が到来したも
のと想定する。このとき、図7の最新状態表示用のブロ
ックマッピング情報MAP1を参照すると、論理ブロッ
クB12は物理ブロックB02にマッピングされている
ことがわかる(図7矢印A箇所参照)。また、図7の初
期状態表示用の物理ブロック状態フラグF22を参照す
ると、物理ブロックB02は初期状態では使用中であっ
たことがわかる(図7矢印B箇所参照)。この場合、物
理ブロックB02に格納されていた論理ブロックB12
に対する上書きは行われない(図9矢印A箇所参照)。
また、最新状態表示用の物理ブロック状態フラグF12
は不使用中に変更される(図9矢印B箇所参照)。さら
に、最新状態表示用のブロックマッピング情報MAP1
では、物理ブロックB02と論理ブロックB12とのマ
ッピングが解除される(図9矢印C箇所参照)。加え
て、最新状態表示用の物理ブロック状態フラグ群F11
〜F15並びに初期状態表示用の物理ブロック状態フラ
グ群F21〜F25を参照することにより、最新状態に
おいて不使用状態にありかつ初期状態においても不使用
状態にあった物理ブロックとして物理ブロックB03が
求められ、その求められた空き物理ブロックB03に対
して論理ブロックB12に相当するデータの書き込みが
行われる(図9矢印D箇所参照)。これに伴い、最新状
態表示用の物理ブロック状態フラグF13の内容は使用
中に変更され、併せて、最新状態表示用のブロックマッ
ピング情報MAP1においては物理ブロックB03と論
理ブロックB12とを結合すべくブロックマッピングが
張られることとなる(図9矢印F箇所参照)。そのた
め、物理ブロックB02に対する上書き要求が到来した
にも拘わらず、ユーザデータメモリ200内におけるデ
ータ(B01〜B05)とデータ管理情報(F01〜F
05,MAP0)との整合性は維持される。そのため、
停電が発生してワークメモリ400の記憶情報(F11
〜F15,F21〜F25,MAP1)が消失しても、
ユーザデータメモリ200に対するアクセス(消去、書
き込み、読み出し)に支障を来すことはない。他方、上
書きされたデータを読み出そうとして論理ブロックB1
2に関する読み出し要求が到来しても、最新状態表示用
のブロックマッピング情報MAP1の論理ブロックB1
2は物理ブロックB03にマッピングされているため、
物理ブロックB03に格納された論理ブロックB12の
最新の内容が正常に読み出され、物理ブロックB02に
格納された論理ブロックB12の上書き消去された筈の
内容が誤って読み出されることはない。尚、データ管理
情報更新要求が到来して、最新状態表示用の物理ブロッ
ク状態フラグ群F11〜F15並びにブロックマッピン
グ情報MAP1の内容にて、ユーザデータメモリ200
内の物理ブロック状態フラグ群F01〜F05並びにブ
ロックマッピング情報MAP0の内容が書き替えられ、
その後、初期状態表示用の物理ブロック状態フラグ群F
21〜F25の内容がユーザデータメモリ200の物理
ブロック状態フラグ群F01〜F05の内容にて更新さ
れた後にあっては、初期状態表示用の物理ブロック状態
フラグF22の内容が不使用中に変更されることによ
り、物理ブロックB02に格納されているデータ(論理
ブロックB12)は最早無効と判断され、物理ブロック
B02は空の状態と同等に取り扱われ、任意のデータの
上書きが許容されることとなる。
Write request execution process (step 208)
The state immediately after is shown in FIG. Now, tentatively, following the pretreatment,
It is assumed that a write request for the logical block B12 has arrived. At this time, referring to the block mapping information MAP1 for displaying the latest state in FIG. 7, it can be seen that the logical block B12 is mapped to the physical block B02 (see the location indicated by arrow A in FIG. 7). Further, referring to the physical block state flag F22 for displaying the initial state in FIG. 7, it can be seen that the physical block B02 was in use in the initial state (see the arrow B portion in FIG. 7). In this case, the logical block B12 stored in the physical block B02
Is not overwritten (see the arrow A in FIG. 9).
Also, the physical block status flag F12 for displaying the latest status
Is changed during non-use (see the position of arrow B in FIG. 9). Furthermore, the latest state display block mapping information MAP1
Then, the mapping between the physical block B02 and the logical block B12 is canceled (see the arrow C in FIG. 9). In addition, the physical block status flag group F11 for displaying the latest status
-F15 and the physical block state flag groups F21 to F25 for displaying the initial state, the physical block B03 is obtained as the physical block that is in the unused state in the latest state and is also in the unused state in the initial state. Then, the data corresponding to the logical block B12 is written to the obtained free physical block B03 (see the position of arrow D in FIG. 9). Along with this, the content of the physical block status flag F13 for displaying the latest status is changed to "in use", and at the same time, in the block mapping information MAP1 for displaying the latest status, the physical block B03 and the logical block B12 are linked to each other. Mapping will be set up (see the arrow F in FIG. 9). Therefore, although the overwrite request for the physical block B02 has arrived, the data (B01 to B05) and the data management information (F01 to F01) in the user data memory 200 are received.
05, MAP 0). for that reason,
Information stored in the work memory 400 (F11
~ F15, F21 to F25, MAP1) disappears,
Access to the user data memory 200 (erasing, writing, reading) is not hindered. On the other hand, in an attempt to read overwritten data, the logical block B1
Even if a read request for 2 arrives, the logical block B1 of the block mapping information MAP1 for displaying the latest status is displayed.
Since 2 is mapped to physical block B03,
The latest contents of the logical block B12 stored in the physical block B03 are normally read, and the contents of the logical block B12 stored in the physical block B02 that should have been overwritten should not be read by mistake. When a data management information update request arrives, the user data memory 200 is updated with the contents of the physical block status flag groups F11 to F15 for displaying the latest status and the block mapping information MAP1.
Contents of the physical block status flag groups F01 to F05 and the block mapping information MAP0 in
After that, the physical block status flag group F for initial status display
After the contents of 21 to F25 are updated with the contents of the physical block status flag groups F01 to F05 of the user data memory 200, the contents of the physical block status flag F22 for displaying the initial status are changed to unused. As a result, the data (logical block B12) stored in the physical block B02 is determined to be invalid anymore, the physical block B02 is treated in the same manner as the empty state, and the overwrite of arbitrary data is allowed. .

【0047】[0047]

【発明の効果】以上の説明から明らかなように、本発明
によれば、記憶素子の性質からアクセス回数に制限のあ
る不揮発性メモリを、その規定アクセス回数の元で最大
限に活用することができ、しかも電源電圧の低下や停電
が発生しても、その後に当該不揮発性メモリから読み出
されるデータの信頼性を損ねることがない。
As is apparent from the above description, according to the present invention, a non-volatile memory having a limited access count due to the nature of a memory element can be utilized to the maximum extent under the specified access count. Even if the power supply voltage drops or a power failure occurs, the reliability of the data read from the nonvolatile memory thereafter is not impaired.

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

【図1】本発明が適用された小型携帯用電子機器のハー
ドウェア構成を概略的に示すブロック図である。
FIG. 1 is a block diagram schematically showing a hardware configuration of a small portable electronic device to which the present invention is applied.

【図2】本発明が適用された小型携帯用電子機器のソフ
トウェア構成を示すゼネラルフローチャートである。
FIG. 2 is a general flowchart showing a software configuration of a small portable electronic device to which the present invention is applied.

【図3】同ゼネラルフローチャートにおける消去要求実
行処理の詳細を示すフローチャートである。
FIG. 3 is a flowchart showing details of an erase request execution process in the general flowchart.

【図4】同ゼネラルフローチャートにおける書き込み要
求実行処理の詳細を示すフローチャートである。
FIG. 4 is a flowchart showing details of a write request execution process in the general flowchart.

【図5】同ゼネラルフローチャートにおける読み出し要
求実行処理の詳細を示すフローチャートである。
FIG. 5 is a flowchart showing details of a read request execution process in the general flowchart.

【図6】前処理並びにデータ管理情報更新処理の実行に
伴うデータの流れを説明するためのメモリマップであ
る。
FIG. 6 is a memory map for explaining a data flow associated with execution of preprocessing and data management information update processing.

【図7】前処理実行直後におけるワークメモリ並びにユ
ーザデータメモリの内容を示すメモリマップである。
FIG. 7 is a memory map showing the contents of a work memory and a user data memory immediately after execution of preprocessing.

【図8】消去要求実行直後におけるワークメモリ並びに
ユーザデータメモリの内容を示すメモリマップである。
FIG. 8 is a memory map showing contents of a work memory and a user data memory immediately after execution of an erase request.

【図9】書き込み要求実行直後におけるワークメモリ並
びにユーザデータメモリの内容を示すメモリマップであ
る。
FIG. 9 is a memory map showing the contents of a work memory and a user data memory immediately after execution of a write request.

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

100 マンマシンインタフェース 200 ユーザデータメモリ 300 システムプログラムメモリ 400 ワークメモリ 500 CPU 600 システムバス 100 Man-Machine Interface 200 User Data Memory 300 System Program Memory 400 Work Memory 500 CPU 600 System Bus

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 記憶素子の性質からアクセス回数に制限
のある不揮発性メモリに対するメモリアクセスを制御す
るための方法であって、 前記不揮発性メモリの使用開始に先立ち、前記不揮発性
メモリ内に記憶されたデータ管理情報を、アクセス回数
に実用上制限のない揮発性メモリ上に複写して最新状態
表示用のデータ管理情報とし、さらに、前記データ管理
情報を構成する物理ブロック状態フラグ群とブロックマ
ッピング情報とのうちで、物理ブロック状態フラグ群を
前記揮発性メモリ上に別に一組複写保存して初期状態表
示用の物理ブロック状態フラグ群とする前処理ステップ
と、 与えられたメモリアクセス要求が消去要求若しくは書き
込み要求のいずれかであることを判定するアクセス要求
種別判定ステップと、 前記記憶されたブロックマッピング情報に基づいて、前
記メモリアクセス要求で指定された論理ブロックにマッ
ピングされた物理ブロックを求めるアクセス対象物理ブ
ロック検索ステップと、 前記保存された初期状態表示用の物理ブロック状態フラ
グ群を参照して、前記検索されたアクセス対象物理ブロ
ックが使用中であることを判定するブロック使用状態判
定ステップと、 前記初期状態保存用の物理ブロック状態フラグ群と前記
最新状態表示用の物理ブロック状態フラグ群とを参照し
て、初期状態において空き状態にありかつ最新状態にお
いても空き状態である物理ブロックを検索する空き物理
ブロック検索ステップと、 前記要求種別判定ステップによりメモリアクセス要求が
消去要求であると判定されかつ前記アクセス対象物理ブ
ロック検索ステップにより検索されたアクセス対象物理
ブロックが前記ブロック使用状態判定ステップにより使
用中と判定されたときには、当該アクセス対象物理ブロ
ックの最新状態表示用物理ブロック状態フラグを不使用
中に変更し、前記不揮発性メモリの当該アクセス対象物
理ブロックに対する消去処理を回避し、かつ前記ブロッ
クマッピング情報において当該アクセス対象物理ブロッ
クに関するブロックマッピングを切り離す消去要求実行
ステップと、 前記要求種別判定ステップによりアクセス要求が書き込
み要求であると判定されかつ前記アクセス対象物理ブロ
ック検索ステップにより検索されたアクセス対象物理ブ
ロックが前記ブロック使用状態判定ステップにより使用
中と判定されたときには、当該アクセス対象物理ブロッ
クの最新状態表示用物理ブロック状態フラグを不使用中
に変更し、前記不揮発性メモリ内の当該アクセス対象物
理ブロックに対する書き込み処理を回避し、その代わり
に、当該書き込み要求にかかるデータを前記不揮発性メ
モリ内の前記空き物理ブロック検索ステップにて検索さ
れた空き物理ブロックに書き込み、かつ前記ブロックマ
ッピング情報において当該アクセス対象物理ブロックに
関するブロックマッピングを切り離し新たにブロックマ
ッピングを張り直す書き込み要求実行ステップと、 所定のデータ管理情報更新要求が到来するのに応答し
て、前記揮発性メモリに記憶された最新状態表示用のデ
ータ管理情報の内容にて前記不揮発性メモリ内のデータ
管理情報の内容を更新するデータ管理情報更新ステップ
と、 を具備することを特徴とするメモリアクセス制御方法。
1. A method for controlling memory access to a non-volatile memory having a limited number of accesses due to the nature of a storage element, the method being stored in the non-volatile memory prior to starting use of the non-volatile memory. The data management information is copied to a volatile memory whose number of accesses is practically unlimited to obtain data management information for displaying the latest status, and a physical block status flag group and block mapping information that make up the data management information. Among them, a pre-processing step of separately storing a set of physical block status flags on the volatile memory to form a physical block status flag group for initial status display, and a given memory access request is an erase request. Or an access request type determination step of determining whether the block is a write request; Referring to an access target physical block search step for obtaining a physical block mapped to a logical block specified by the memory access request based on the mapping information, and the stored physical block state flag group for initial state display. A block use state determination step of determining that the searched access target physical block is in use, a physical block state flag group for storing the initial state, and a physical block state flag group for displaying the latest state Referring to, a free physical block search step of searching for a physical block that is empty in the initial state and free in the latest state, and the request type determination step determines that the memory access request is an erase request. And by the access target physical block search step When the searched access target physical block is determined to be in use by the block use status determination step, the latest status display physical block status flag of the access target physical block is changed to unused, and The access request is determined to be a write request by an erase request execution step that avoids the erase process for the access target physical block and separates the block mapping relating to the access target physical block in the block mapping information, and the request type determination step. When the access target physical block searched in the access target physical block searching step is determined to be in use in the block usage status determining step, the physical block for displaying the latest status of the access target physical block is displayed. The state flag is changed to not in use to avoid the write processing to the physical block to be accessed in the non-volatile memory, and instead, the data related to the write request is searched for the free physical block in the non-volatile memory. A write request execution step of writing to a free physical block searched in step and separating the block mapping relating to the physical block to be accessed in the block mapping information and re-establishing a new block mapping, and a predetermined data management information update request arrives. In response to this, the data management information updating step of updating the content of the data management information in the non-volatile memory with the content of the data management information for displaying the latest status stored in the volatile memory, Memory access control method characterized by Law.
【請求項2】 記憶素子の性質からアクセス回数に制限
のある不揮発性メモリに対するメモリアクセスを制御す
るための装置であって、 前記不揮発性メモリの使用開始に先立ち、前記不揮発性
メモリ内に記憶されたデータ管理情報を、アクセス回数
に実用上制限のない揮発性メモリ上に複写して最新状態
表示用のデータ管理情報とし、さらに、前記データ管理
情報を構成する物理ブロック状態フラグ群とブロックマ
ッピング情報とのうちで、物理ブロック状態フラグ群を
前記揮発性メモリ上に別に一組複写保存して初期状態表
示用の物理ブロック状態フラグ群とする前処理手段と、 与えられたメモリアクセス要求が消去要求若しくは書き
込み要求のいずれかであることを判定するアクセス要求
種別判定手段と、 前記記憶されたブロックマッピング情報に基づいて、前
記メモリアクセス要求で指定された論理ブロックにマッ
ピングされた物理ブロックを求めるアクセス対象物理ブ
ロック検索手段と、 前記保存された初期状態表示用の物理ブロック状態フラ
グ群を参照して、前記検索されたアクセス対象物理ブロ
ックが使用中であることを判定するブロック使用状態判
定手段と、 前記初期状態表示用の物理ブロック状態フラグ群と前記
最新状態表示用の物理ブロック状態フラグ群とを参照し
て、初期状態において空き状態にありかつ最新状態にお
いても空き状態である物理ブロックを検索する空き物理
ブロック検索手段と、 前記要求種別判定手段によりメモリアクセス要求が消去
要求であると判定されかつ前記アクセス対象物理ブロッ
ク検索手段により検索されたアクセス対象物理ブロック
が前記ブロック使用状態判定手段により使用中と判定さ
れたときには、当該アクセス対象物理ブロックの最新状
態表示用物理ブロック状態フラグを不使用中に変更し、
前記不揮発性メモリの当該アクセス対象物理ブロックに
対する消去処理を回避し、かつ前記ブロックマッピング
情報において当該アクセス対象物理ブロックに関するブ
ロックマッピングを切り離す消去要求実行手段と、 前記要求種別判定手段によりアクセス要求が書き込み要
求であると判定されかつ前記アクセス対象物理ブロック
検索手段により検索されたアクセス対象物理ブロックが
前記ブロック使用状態判定手段により使用中と判定され
たときには、当該アクセス対象物理ブロックの最新状態
表示用物理ブロック状態フラグを不使用中に変更し、前
記不揮発性メモリ内の当該アクセス対象物理ブロックに
対する書き込み処理を回避し、その代わりに、当該書き
込み要求にかかるデータを前記不揮発性メモリ内の前記
空き物理ブロック検索手段にて検索された空き物理ブロ
ックに書き込み、かつ前記ブロックマッピング情報にお
いて当該アクセス対象物理ブロックに関するブロックマ
ッピングを切り離し新たにブロックマッピングを張り直
す書き込み要求実行手段と、 所定のデータ管理情報更新要求が到来するのに応答し
て、前記揮発性メモリに記憶された最新状態表示用のデ
ータ管理情報の内容にて前記不揮発性メモリ内のデータ
管理情報の内容を更新するデータ管理情報更新手段と、 を具備することを特徴とするメモリアクセス制御装置。
2. A device for controlling memory access to a non-volatile memory having a limited access count due to the nature of a memory element, the device being stored in the non-volatile memory prior to starting use of the non-volatile memory. The data management information is copied to a volatile memory whose number of accesses is practically unlimited to obtain data management information for displaying the latest status, and a physical block status flag group and block mapping information that make up the data management information. Among them, preprocessing means for copying and storing a set of physical block status flags on the volatile memory as a physical block status flag group for initial status display, and a given memory access request is an erase request. Access request type determining means for determining whether the request is a write request or the stored block map. Referring to the access target physical block search means for obtaining the physical block mapped to the logical block specified by the memory access request, and the stored physical block state flag group for initial state display, A block use state determination means for determining that the searched access target physical block is in use, a physical block state flag group for displaying the initial state and a physical block state flag group for displaying the latest state. Referring to a free physical block search unit that searches for a physical block that is in an empty state in the initial state and is also in the latest state, and the request type determination unit determines that the memory access request is an erase request, and The access target physical block searched by the access target physical block searching means. Tsu when the click is determined to be in use by the block use state determining means changes the physical block status flag for the latest status of the access target physical block in the non-use,
An erase request execution unit that avoids an erasing process for the access target physical block of the non-volatile memory and separates a block mapping relating to the access target physical block in the block mapping information, and an access request is a write request by the request type determination unit. And the access target physical block searched by the access target physical block search means is determined to be in use by the block usage status determination means, the physical block state for displaying the latest status of the access target physical block The flag is changed to not in use to avoid the write processing to the physical block to be accessed in the non-volatile memory, and instead, the data related to the write request is searched for the free physical block in the non-volatile memory. A write request executing means for writing to a free physical block searched by the means and for separating the block mapping related to the physical block to be accessed in the block mapping information and re-establishing a new block mapping, and a predetermined data management information update request have arrived. Data management information updating means for updating the content of the data management information in the non-volatile memory with the content of the data management information for displaying the latest status stored in the volatile memory. A memory access control device comprising:
JP13104496A 1996-04-25 1996-04-25 Memory access control method and device Expired - Fee Related JP3313576B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13104496A JP3313576B2 (en) 1996-04-25 1996-04-25 Memory access control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13104496A JP3313576B2 (en) 1996-04-25 1996-04-25 Memory access control method and device

Publications (2)

Publication Number Publication Date
JPH09293025A true JPH09293025A (en) 1997-11-11
JP3313576B2 JP3313576B2 (en) 2002-08-12

Family

ID=15048709

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13104496A Expired - Fee Related JP3313576B2 (en) 1996-04-25 1996-04-25 Memory access control method and device

Country Status (1)

Country Link
JP (1) JP3313576B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100843543B1 (en) * 2006-10-25 2008-07-04 삼성전자주식회사 System comprising flash memory device and data recovery method thereof
US7761652B2 (en) 2006-09-27 2010-07-20 Samsung Electronics Co., Ltd. Mapping information managing apparatus and method for non-volatile memory supporting different cell types
CN112133360A (en) * 2019-06-25 2020-12-25 意法半导体国际有限公司 Memory management apparatus, system and method
CN114217744A (en) * 2021-12-14 2022-03-22 山东产研鲲云人工智能研究院有限公司 EFUSE storage content distribution method and device using shadow register

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7761652B2 (en) 2006-09-27 2010-07-20 Samsung Electronics Co., Ltd. Mapping information managing apparatus and method for non-volatile memory supporting different cell types
KR100843543B1 (en) * 2006-10-25 2008-07-04 삼성전자주식회사 System comprising flash memory device and data recovery method thereof
CN112133360A (en) * 2019-06-25 2020-12-25 意法半导体国际有限公司 Memory management apparatus, system and method
CN114217744A (en) * 2021-12-14 2022-03-22 山东产研鲲云人工智能研究院有限公司 EFUSE storage content distribution method and device using shadow register

Also Published As

Publication number Publication date
JP3313576B2 (en) 2002-08-12

Similar Documents

Publication Publication Date Title
JP3544610B2 (en) Memory device
KR100843543B1 (en) System comprising flash memory device and data recovery method thereof
US5682497A (en) Managing file structures for a flash memory file system in a computer
US7418436B2 (en) Information processing apparatus, memory management apparatus, memory management method, and information processing method
CN101763309B (en) Nonvolatile storage device, information recording system, and information recording method
EP3306477B1 (en) Storage device and block storage method based on the storage device
US20010023472A1 (en) Data storage control method and apparatus for external storage device using a plurality of flash memories
US20100299494A1 (en) Memory with block-erasable locations and a linked chain of pointers to locate blocks with pointer information
US8117489B2 (en) Disk drive and method for controlling the disk drive
JPH10133940A (en) Memory device
JP2000181805A (en) Storage device
JP2005242897A (en) Flash disk drive
US7925821B2 (en) Nonvolatile semiconductor storage device and method of managing the same
JP2006301960A (en) Automobile control unit
JP2007280428A (en) Memory management
EP1966701A2 (en) Memory with block-erasable locations
KR0185954B1 (en) Memory management method
JP2004303238A (en) Flash memory access device and method
CN115951839A (en) Data writing method and device for partition name space solid state disk and electronic equipment
CN112397128A (en) Control method and device for Flash memory
JPH11328982A (en) Data management system for flash memory
JP3313576B2 (en) Memory access control method and device
JPH113287A (en) Storage device and storage area management method used for the device
CN111324549B (en) Memory and control method and device thereof
JP4826232B2 (en) Information processing apparatus and boot program rewriting method

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20090531

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20100531

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20110531

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20110531

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20120531

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20120531

Year of fee payment: 10

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20120531

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20130531

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20140531

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees