JP2001350673A - Flash memory access control method - Google Patents

Flash memory access control method

Info

Publication number
JP2001350673A
JP2001350673A JP2000172004A JP2000172004A JP2001350673A JP 2001350673 A JP2001350673 A JP 2001350673A JP 2000172004 A JP2000172004 A JP 2000172004A JP 2000172004 A JP2000172004 A JP 2000172004A JP 2001350673 A JP2001350673 A JP 2001350673A
Authority
JP
Japan
Prior art keywords
block
flash memory
write
read
access
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2000172004A
Other languages
Japanese (ja)
Inventor
Kenichiro Hatae
健一郎 波多江
Koji Ikeda
幸二 池田
Yuichi Higuchi
勇一 樋口
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2000172004A priority Critical patent/JP2001350673A/en
Publication of JP2001350673A publication Critical patent/JP2001350673A/en
Pending legal-status Critical Current

Links

Landscapes

  • For Increasing The Reliability Of Semiconductor Memories (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Read Only Memory (AREA)

Abstract

PROBLEM TO BE SOLVED: To read/write-access an optional block on a flash memory in a state where the number of writing times and an alternate block address are managed. SOLUTION: Whether an access object block address is registered on a management data region 403 or not, is confirmed prior to read/write access. If it is not registered, access is gained to an access object block on a data region 401. If it is registered, a block address registered as the counterpart of the access object block address is used as the alternate block address, and the alternate block on the preliminary region 403 is made to be accessed.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、書き込み回数に制
限が設けられているメモリ、即ち、フラッシュメモリや
EEPROMのようなメモリ(以下、単にフラッシュメ
モリと称す)を読み出し/書き込みアクセスする際での
フラッシュメモリアクセス制御方法に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory in which the number of times of writing is limited, that is, a memory such as a flash memory or an EEPROM (hereinafter simply referred to as a flash memory) when reading / writing. The present invention relates to a flash memory access control method.

【0002】[0002]

【従来の技術】フラッシュメモリ自体には、たとえ、そ
の動作電源が断状態に陥った場合でも、それまでの記憶
内容がそのまま保持されるという利点があり、したがっ
て、フラッシュメモリは不揮発性メモリとして、これま
でにも広く利用されているのが実情である。しかしなが
ら、フラッシュメモリが読み出しアクセスされる場合に
は、特に不具合は生じないとしても、フラッシュメモリ
上の物理的アクセス単位としてのメモリエリア(以下、
このメモリエリアを単にブロックと称す)各々には書き
込み回数上での制限が設けられていることから、原則と
して、書き込み回数上の制限値が事前設定された上、同
一ブロックへの書き込み回数がその制限値を越えない範
囲内で、フラッシュメモリが書き込みアクセスされると
いった方法が採られるものとなっている。もしも、ある
ブロックへの書き込み回数が制限値を越えるような場合
には、特開平6−36579号公報に示されているよう
に、それまで使用されていたブロックに代わって、例え
ば同一フラッシュメモリ上に別途予め用意されている空
きブロックが代替ブロックとして、以降、使用されてい
るものである。
2. Description of the Related Art The flash memory itself has an advantage that even if its operating power supply is cut off, the stored contents up to that point are maintained as it is. Therefore, the flash memory is a nonvolatile memory, The fact is that it has been widely used so far. However, when a read access is made to the flash memory, a memory area (hereinafter, referred to as a physical access unit) on the flash memory is used even if no problem occurs.
Each of these memory areas is simply referred to as a block.) Each of them has a limit on the number of times of writing. Therefore, in principle, a limit value on the number of times of writing is preset, and the number of times of writing to the same block is set in advance. A method in which the flash memory is accessed for writing within a range not exceeding the limit value is adopted. If the number of times of writing to a certain block exceeds the limit value, as shown in JP-A-6-36579, instead of the block used so far, for example, the same flash memory is used. An empty block separately prepared in advance is used as a substitute block thereafter.

【0003】ここで、従来技術に係るメモリアクセスシ
ステムの1具体例を図12により説明すれば、CPU1
201には共通バスを介し複数のフラッシュメモリFM
1〜FMnが収容接続された状態で、CPU1201か
らは任意フラッシュメモリ上の任意ブロックが読み出し
/書き込みアクセス可とされたものとなっている。フラ
ッシュメモリFM1〜FMn各々では、所定アドレス範
囲毎にメモリエリアが区分された上、区分されたメモリ
エリア個々は任意に、かつ同時に読み出し/書き込みア
クセス可とされているが、このようにして区分されたメ
モリエリア個々が既述のブロックとして定義されている
ものである。
Here, a specific example of a conventional memory access system will be described with reference to FIG.
201 includes a plurality of flash memories FM via a common bus.
In a state where 1 to FMn are accommodated and connected, an arbitrary block on an arbitrary flash memory can be read / written by the CPU 1201. In each of the flash memories FM1 to FMn, the memory area is divided for each predetermined address range, and the divided memory areas are arbitrarily and simultaneously read / write accessible. Each memory area is defined as the above-described block.

【0004】ところで、バッテリ1203により常時バ
ックアップされているRAM1202上にはまた、フラ
ッシュメモリFM1〜FMn上でのブロック各々がファ
イル管理されるべく、ブロック対応管理データが更新可
として格納されるものとなっている。これにより、例え
ばシステム全体の電源が意図的に切断される場合には、
その切断に先立って、RAM1202上の記憶内容は任
意フラッシュメモリ上の所定エリアに最新状態のものと
して退避記憶され、また、その後の電源投入によるシス
テム再立上げの際には、それまでに退避記憶されている
記憶内容がRAM1202上に転送記憶可とされている
ものである。尤も、停電等により非意図的にシステム全
体の電源が切断される場合であっても、RAM1202
自体はバッテリ1203により常時バックアップされ、
記憶内容としての管理データは消滅されないことから、
特に不具合は生じないものとなっている。
On the RAM 1202, which is always backed up by the battery 1203, the block correspondence management data is stored as updatable so that each block in the flash memories FM1 to FMn is file-managed. ing. Thus, for example, if the power of the entire system is intentionally turned off,
Prior to the disconnection, the contents stored in the RAM 1202 are saved and saved in a predetermined area on an arbitrary flash memory as the latest state. When the system is restarted by turning on the power thereafter, the saved contents are saved up to that time. The contents stored in the RAM 1202 can be transferred and stored. Even if the power of the entire system is unintentionally turned off due to a power failure or the like, the RAM 1202
It is always backed up by the battery 1203,
Since the management data as stored contents will not be lost,
In particular, no problem occurs.

【0005】一般にCPU1201からはフラッシュメ
モリFM1〜FMn上の任意ブロックが読み出し/書き
込みアクセス可とされているわけであるが、ここで、例
えばフラッシュメモリFM1上のブロック(斜線表示)
1204をアクセス対象として、そのブロック1204
に対する書き込み回数の累積値が制限値に達しているこ
とが、そのブロック1204対応の管理データから判定
された場合には、そのブロック1204に代わって、同
一フラッシュメモリFM1上に別途確保されている空き
ブロック1205が、以降、代替ブロックとして設定さ
れているものである。RAM1202上のブロック対応
管理データによっては、そのブロックに対する書き込み
回数や、そのブロックに対する代替ブロックの有無と代
替ブロック有の場合でのその代替ブロックアドレスが管
理されているものである。
Generally, an arbitrary block on the flash memories FM1 to FMn can be read / written by the CPU 1201. Here, for example, a block on the flash memory FM1 (shown by oblique lines)
A block 1204 is set as an access target of the block 1204.
When it is determined from the management data corresponding to the block 1204 that the accumulated value of the number of times of writing has reached the limit value, the free space separately secured on the same flash memory FM1 is substituted for the block 1204. Block 1205 is set as a substitute block thereafter. Depending on the block correspondence management data in the RAM 1202, the number of times of writing to the block, the presence / absence of a replacement block for the block, and the replacement block address when there is a replacement block are managed.

【0006】因みに、ここで、フラッシュメモリに対す
る読み出し/書き込みアクセスの際での一般的動作につ
いて詳細に説明すれば、一般にフラッシュメモリ上で
は、連続する複数のメモリアドレスは1ブロックとして
一括アクセスされることから、フラッシュメモリ上から
特定のメモリアドレスについてのデータのみを読み出す
必要がある場合は、その特定のメモリアドレスは一旦ブ
ロックアドレスに変換された上、フラッシュメモリが読
み出しアクセスされるものとなっている。このアクセス
によりフラッシュメモリ上からはそのブロックアドレス
上のデータ、即ち、複数のメモリアドレスに対応するデ
ータが一括して読み出されるが、これら複数のメモリア
ドレスに対応するデータのうちから、特定のメモリアド
レスに対応するデータのみが選択されるようにすればよ
いものである。また、フラッシュメモリ上の特定のメモ
リアドレスのみにデータを書き込みしたり、その特定の
メモリアドレス上のデータのみを更新する必要がある場
合には、その特定のメモリアドレスは一旦ブロックアド
レスに変換された上、先ずフラッシュメモリが読み出し
アクセスされるものとなっている。このアクセスにより
フラッシュメモリ上からはそのブロックアドレス上のデ
ータ、即ち、複数のメモリアドレスに対応するデータが
一括して読み出された上、一時的に退避記憶されている
ものである。その後、そのブロックアドレス上のデータ
は一括消去された状態で、退避記憶されているデータは
特定のメモリアドレスに対応するもののみが書き込みデ
ータにより更新された状態として、そのブロックアドレ
ス上に一括書き込みされているものである。
Here, a general operation at the time of read / write access to the flash memory will be described in detail. Generally, in a flash memory, a plurality of continuous memory addresses are collectively accessed as one block. Therefore, when it is necessary to read only data for a specific memory address from the flash memory, the specific memory address is temporarily converted into a block address, and then the flash memory is read and accessed. By this access, data on the block address, that is, data corresponding to a plurality of memory addresses is read out from the flash memory at a time. From among the data corresponding to the plurality of memory addresses, a specific memory address is read out. It is sufficient that only data corresponding to is selected. In addition, when it is necessary to write data only to a specific memory address on the flash memory or to update only data on the specific memory address, the specific memory address is once converted to a block address. Above, first, the flash memory is accessed for reading. With this access, data on the block address, that is, data corresponding to a plurality of memory addresses, is read out from the flash memory at a time and temporarily saved. Thereafter, the data on the block address is collectively erased, and the saved data is collectively written on the block address in a state where only the data corresponding to the specific memory address is updated with the write data. Is what it is.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、特開平
6−36579号公報による場合、システム全体への電
源が非意図的に切断され、管理データが消滅される虞が
あることを想定の上、ブロック管理用RAMはバッテリ
により常時給電状態におかれる必要があるものとなって
いる。即ち、ブロック管理用RAMのためにのみバッテ
リが特別に要され、これがためにシステム全体として
は、その構成上の経済化や小型化が図れないというもの
である。
However, in the case of Japanese Patent Laid-Open No. 6-36579, the power supply to the entire system is unintentionally cut off, and it is assumed that the management data may be lost. The management RAM needs to be always supplied with power by a battery. In other words, a battery is specially required only for the block management RAM, which makes it difficult to reduce the size and cost of the entire system.

【0008】本発明の第1の目的は、ブロック管理用R
AMを不要として、ブロック各々に対する書き込み回数
が管理された状態として、1以上のフラッシュメモリ各
々における任意ブロックが書き込みアクセスされ得るフ
ラッシュメモリアクセス制御方法を供するにある。
A first object of the present invention is to provide a block management R
An object of the present invention is to provide a flash memory access control method in which an arbitrary block in each of one or more flash memories can be write-accessed in a state where AM is not required and the number of times of writing to each block is managed.

【0009】本発明の第2の目的は、上記第1の目的に
加え、あるブロックに対する書き込み回数の累積値が制
限値に達した場合であっても、そのブロックについては
代替ブロックが確保された上、以降、その代替ブロック
に対し引き続き書き込みアクセスが行われ得るフラッシ
ュメモリアクセス制御方法を供するにある。
A second object of the present invention is that, in addition to the first object, even when the cumulative value of the number of times of writing to a certain block reaches the limit value, an alternative block is secured for that block. In addition, the purpose of the present invention is to provide a flash memory access control method in which write access can be continuously performed to the substitute block.

【0010】本発明の第3の目的は、フラッシュメモリ
上で代替ブロックが確保され、また、書き込み回数や代
替ブロックアドレスが管理された状態で、任意ブロック
が読み出し/書き込みアクセスされ得るフラッシュメモ
リアクセス制御方法を供するにある。
A third object of the present invention is to provide a flash memory access control in which an arbitrary block can be read / written while a replacement block is secured in a flash memory and the number of writes and a replacement block address are managed. There is a way to provide.

【0011】本発明の第4の目的は、代替ブロックに対
し読み出し/書き込みアクセスが行われるに際し、何等
かの要因により何れかの管理データ領域に異常が生じた
場合であっても、残りの正常な管理データ領域により引
き続き代替ブロック各々に対しては読み出し/書き込み
アクセスが行われ得るフラッシュメモリアクセス制御方
法を供するにある。
[0011] A fourth object of the present invention is to provide a read / write access to a substitute block even if an abnormality occurs in any of the management data areas due to some factor. The purpose of the present invention is to provide a flash memory access control method in which read / write access can be continuously performed to each of the alternative blocks by using a simple management data area.

【0012】[0012]

【課題を解決するための手段】上記第1の目的は、ブロ
ック各々が書き込みアクセスされる度に、該アクセスに
先立って該ブロック上から読み出される、データと対と
して記憶されている書き込み回数が事前設定制限値を超
えていない限りにおいては、上記書き込み回数が更新さ
れた状態として書き込みデータとともに該ブロック上に
書き込みされることで達成される。
The first object of the present invention is that, each time a block is accessed for writing, the number of times of writing, which is read from the block prior to the access and stored as a pair with data, is determined in advance. As long as the number does not exceed the set limit value, the number of times of writing is achieved by being written on the block together with the write data as an updated state.

【0013】上記第2の目的はまた、ブロック各々が書
き込みアクセスされる度に、該アクセスに先立って該ブ
ロック上から読み出される、データと対として記憶され
ている書き込み回数が事前設定制限値を超えていない限
りにおいては、上記書き込み回数が更新された状態とし
て書き込みデータとともに該ブロック上に書き込みされ
る一方、上記事前設定制限値を超えている場合には、以
降、同一フラッシュメモリ上の予備領域から選択された
空きブロックを代替ブロックとして、該代替ブロック上
に書き込みデータが書き込みされることで達成される。
[0013] The second object is that each time each block is accessed for writing, the number of writes stored as a pair with data, which is read from the block prior to the access, exceeds a preset limit value. Unless the number of times of writing is updated on the block together with the write data as the updated number of times, if the number exceeds the preset limit value, thereafter, from the spare area on the same flash memory, This is achieved by using the selected free block as a substitute block and writing the write data on the substitute block.

【0014】更に、上記第3の目的は、ブロック各々が
書き込み/読み出しアクセスされる度に、該アクセスに
先立って同一フラッシュメモリ上の管理データ領域に該
ブロックについての代替ブロックアドレスが登録されて
いるか否かが判定された上、該代替ブロックアドレスが
登録されていない場合は、該ブロックがそのまま読み出
し/書き込みアクセスされる一方、該代替ブロックアド
レスが登録されている場合には、該代替ブロックアドレ
スで指定される、予備領域上の代替ブロックに対し読み
出し/書き込みアクセスが行われることで達成される。
A third object of the present invention is that each time a block is accessed for writing / reading, an alternative block address for the block is registered in a management data area on the same flash memory prior to the access. If it is determined that the replacement block address is not registered, the block is read / write-accessed as it is, while if the replacement block address is registered, the block is replaced with the replacement block address. This is achieved by performing read / write access to a designated alternative block on the spare area.

【0015】更にまた、上記第4の目的は、ブロック各
々が書き込み/読み出しアクセスされる度に、該アクセ
スに先立って同一フラッシュメモリ上の、少なくとも登
録内容が正常な何れか1つの管理データ領域に該ブロッ
クについての代替ブロックアドレスが登録されているか
否かが判定された上、該代替ブロックアドレスが登録さ
れていない場合は、該ブロックがそのまま読み出し/書
き込みアクセスされる一方、該代替ブロックアドレスが
登録されている場合には、該代替ブロックアドレスで指
定される、予備領域上の代替ブロックに対し読み出し/
書き込みアクセスが行われることで達成される。
Still further, the fourth object is that each time each block is accessed for writing / reading, at least any one of the management data areas whose registration contents are normal on the same flash memory prior to the access. It is determined whether or not an alternative block address is registered for the block. If the alternative block address is not registered, the block is read / write accessed as it is while the alternative block address is registered. If it has been read / read from / to the replacement block on the spare area specified by the replacement block address,
This is achieved by performing a write access.

【0016】[0016]

【発明の実施の形態】以下、本発明の一実施形態を図1
から図11により説明する。先ず本発明に係るプロセッ
サシステムについて説明すれば、図1はその一例でのシ
ステム構成を示したものである。図示のように、マイク
ロプロセッサ(MPU)101に対しては、プロセッサ
バス107を介し各種入出力機能が収容接続されたもの
となっている。即ち、メモリコントローラ102、メモ
リバス108を介してはメモリ105が、また、フラッ
シュメモリコントローラ103、フラッシュメモリバス
109を介してはフラッシュメモリ部106が、更に、
I/Oインタフェース部104を介しては入出力装置群
110が収容接続せしめられたものとなっている。一般
に、フラッシュメモリ部106は複数のフラッシュメモ
リFM1〜FMnから構成された上、各種プログラム等
が格納される外部記憶装置として機能したものとなって
いる。また、プロセッサバス107を介し各種入出力機
能間で通信が行われた場合には、その通信終了を待っ
て、通信先から通信元に対しては、その通信結果のステ
ータスが表示されているものである。
DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below with reference to FIG.
11 will be described with reference to FIG. First, a processor system according to the present invention will be described. FIG. 1 shows a system configuration in one example. As shown, various input / output functions are accommodated and connected to a microprocessor (MPU) 101 via a processor bus 107. That is, the memory 105 via the memory controller 102 and the memory bus 108, the flash memory unit 106 via the flash memory controller 103 and the flash memory bus 109, and the like.
The input / output device group 110 is accommodated and connected via the I / O interface unit 104. In general, the flash memory unit 106 includes a plurality of flash memories FM1 to FMn, and functions as an external storage device that stores various programs and the like. When communication is performed between various input / output functions via the processor bus 107, the status of the communication result is displayed from the communication destination to the communication source after completion of the communication. It is.

【0017】さて、MPU101では、各種入出力機能
各々からプロセッサバス使用要求があった場合には、事
前設定優先順位制御下にそれらバス使用要求元には選択
的にプロセッサバス使用許可が発行されるものとなって
いる。また、メモリ105はMPU101から以外に
も、フラッシュメモリコントローラ103や入出力装置
群110からも随時メモリアクセス可とされているが、
MPU101では、メモリ105へのメモリアクセス要
求があった場合には、事前設定優先順位制御下に最優先
アクセス要求元が決定された上、その最優先アクセス要
求元を示すメモリアクセス許可信号が信号線111を介
しメモリコントローラ102に転送されており、そのメ
モリコントローラ102からはまた、メモリ使用許可信
号がその最優先アクセス要求元のみに転送されること
で、メモリコントローラ102を介し最優先アクセス要
求元からはメモリ105が読み出し/書き込みアクセス
可とされたものとなっている。それらアクセスに際して
は、プロセッサバス107からの読み出し/書き込みモ
ード信号、アクセスアドレス、書き込みデータ(書き込
みアクセスの場合のみ)にもとづくメモリコントローラ
102による制御下に、メモリ105上のアクセスアド
レスからはデータが読み出しされたり、そのアクセスア
ドレスへの書き込みデータの書き込みが行われているも
のである。更に、フラッシュメモリ部106はMPU1
01から読み出し/書き込みアクセス可とされている
が、後述のように、それらアクセスが行われる際には、
読み出し/書き込みデータはメモリ105上に一旦書き
込みされており、メモリ105が介在される形で読み出
し/書き込みアクセスが行われるものとなっている。
In the MPU 101, when there is a processor bus use request from each of the various input / output functions, the processor bus use permission is selectively issued to those bus use request sources under the preset priority control. It has become something. In addition to the MPU 101, the memory 105 can be accessed from the flash memory controller 103 and the input / output device group 110 at any time.
In the MPU 101, when there is a memory access request to the memory 105, the highest priority access request source is determined under the prioritized priority control, and a memory access permission signal indicating the highest priority access request source is sent to the signal line. The memory use permission signal is transferred to only the highest priority access request source from the memory controller 102 via the memory controller 102. Indicates that the memory 105 has read / write access enabled. At the time of these accesses, data is read from the access address on the memory 105 under the control of the memory controller 102 based on the read / write mode signal from the processor bus 107, the access address, and the write data (only in the case of write access). Or write data is being written to the access address. Further, the flash memory unit 106 has the MPU1
01, read / write access is permitted. However, as described below, when those accesses are performed,
The read / write data is once written on the memory 105, and the read / write access is performed with the memory 105 interposed.

【0018】さて、以上のプロセッサシステムのうち、
フラッシュメモリコントローラ103は本発明に直接係
るものとされているが、図2にその一例での内部構成を
示す。図示のように、プロセッサバス107からのフラ
ッシュメモリコントローラ制御情報はコントローラ制御
部201に保持されているが、先ずこのコントローラ制
御部201について説明すれば、コントローラ制御部2
01内部には5種類のコントロールレジスタ0〜4が用
意されたものとなっている。
Now, among the above processor systems,
The flash memory controller 103 is directly related to the present invention, and FIG. 2 shows an internal configuration of one example. As shown in the figure, the flash memory controller control information from the processor bus 107 is held in the controller control unit 201. First, the controller control unit 201 will be described.
01, five types of control registers 0 to 4 are prepared.

【0019】即ち、図3(A)にコントロールレジスタ
0のフォーマットが示されているが、コントロールレジ
スタ0は、STフィールド301、CMDフィールド3
02およびEXEビット303から構成されたものとな
っている。このうち、STフィールド301はフラッシ
ュメモリコントローラ103でのコマンド実行結果を表
示するためのものとされ、コマンド実行後にこのフィー
ルドが参照されることで、コマンド実行結果が得られる
ものとなっている。また、CMDフィールド302はフ
ラッシュメモリコントローラ103に動作指示を行うコ
マンドが書き込みされるフィールドとされ、EXEビッ
ト303から実行が指示されれば、本フィールド内に書
き込まれたコマンド内容でフラッシュメモリコントロー
ラ103は動作するものとなっている。
That is, FIG. 3A shows the format of the control register 0. The control register 0 includes an ST field 301 and a CMD field 3
02 and EXE bit 303. Of these, the ST field 301 is for displaying the command execution result in the flash memory controller 103, and the command execution result is obtained by referring to this field after the command execution. The CMD field 302 is a field in which a command for giving an operation instruction to the flash memory controller 103 is written. If execution is instructed from the EXE bit 303, the flash memory controller 103 uses the command content written in this field to write the command. It works.

【0020】また、図3(B)にはコントロールレジス
タ1のフォーマットが示されているが、コントロールレ
ジスタ1はフラッシュメモリ部106内のフラッシュメ
モリFM1〜FMnのうち、何れのフラッシュメモリ上
の何れのブロックアドレスにアクセスをするのかを指示
するためのものとされ、TNOフィールド304にはア
クセス先フラッシュメモリ番号が、BADフィールド3
05にはアクセス先ブロックアドレスがそれぞれ書き込
まれるものとなっている。
FIG. 3B shows the format of the control register 1, and the control register 1 is provided on any one of the flash memories FM 1 to FMn in the flash memory unit 106. The TNO field 304 indicates the access destination flash memory number, and the BAD field 3
In 05, an access destination block address is written.

【0021】更に、図3(C)にはコントロールレジス
タ2のフォーマットが示されており、図示のように、M
ADRフィールドのみから構成されたものとなってい
る。コントロールレジスタ2はフラッシュメモリ部10
6に読み出しアクセスが行われる場合に、読み出された
データをメモリ105上の何れのメモリアドレスに書き
込むのか、また、書き込みアクセスが行われる場合に
は、書き込みデータがメモリ105上の何れのメモリア
ドレスに書き込まれているのかを指示すべく、MADR
フィールド上にはそれらメモリアドレスが書き込まれる
ものとなっている。
FIG. 3C shows the format of the control register 2. As shown in FIG.
It consists only of the ADR field. The control register 2 is a flash memory unit 10
6, when read access is performed, to which memory address on the memory 105 the read data is to be written, and when write access is performed, the write data is stored in any memory address on the memory 105. MADR to indicate if it has been written to
These memory addresses are written on the field.

【0022】更にまた、図3(D)にはコントロールレ
ジスタ3のフォーマットが示されており、図示のよう
に、LIMITフィールドのみから構成されたものとな
っている。このLIMITフィールドには、ブロック
(代替ブロックを含む)各々に対しての書き込み回数上
での制限値が事前設定されるものとなっており、ブロッ
ク各々が書き込みアクセスされるに際しては、そのブロ
ックに対するそれまでの書き込み回数の累積値がその制
限値を超えることのないよう、書き込みアクセス制御さ
れているものである。
FIG. 3D shows a format of the control register 3, which is composed of only the LIMIT field as shown. In the LIMIT field, a limit value on the number of times of writing for each block (including the substitute block) is preset, and when each block is accessed for writing, the limit value for that block is set. The write access is controlled so that the accumulated value of the number of writings up to the above does not exceed the limit value.

【0023】図3(E)に示すコントロールレジスタ4
ではまた、フラッシュメモリFM1〜FMnの中で何等
かの故障(予備領域上から代替ブロックが確保され得な
い場合を含む)が発生したことに起因して、チップ交換
が必要なフラッシュメモリが表示されるものとなってい
る。何れのフラッシュメモリが交換される必要があるか
は、本レジスタが参照されることで容易に把握され得る
ものである。
The control register 4 shown in FIG.
In addition, a flash memory that requires a chip replacement is displayed due to occurrence of some failure (including a case where a substitute block cannot be secured from the spare area) in the flash memories FM1 to FMn. It has become something. Which flash memory needs to be replaced can be easily grasped by referring to this register.

【0024】ここで、再び図2に戻りフラッシュメモリ
コントローラ103内の他の構成要素についての説明を
続行すれば、既述のコントロールレジスタ0(図3
(A)を参照のこと)におけるCMDフィールド内容
(コマンド内容)はコマンド判定部202でその種別等
がデコードされた上、そのデコード内容に従って、フラ
ッシュメモリ制御部203からはフラッシュメモリ制御
信号がフラッシュメモリバス109を介しフラッシュメ
モリ部106に出力される一方、フラッシュメモリ部1
06からのステータスはまた、フラッシュメモリバス1
09を介しフラッシュメモリ制御部203で取り込まれ
た上、コントローラ制御部201に転送されているもの
である。プロセッサバス/フラッシュメモリバス入出力
データ制御部204ではまた、プロセッサバス107へ
の読み出しデータの一時保存やフラッシュメモリ部10
6への書き込みデータの一時保存、及び出力先の制御、
フラッシュメモリ制御データの出力、内部コントロール
レジスタ内容のプロセッサバス107への出力制御が行
われているものである。
Returning to FIG. 2 again and continuing the description of the other components in the flash memory controller 103, if the control register 0 (FIG.
(See (A)), the type and the like of the CMD field content (command content) are decoded by the command determination unit 202, and the flash memory control signal is sent from the flash memory control unit 203 according to the decoded content. While being output to the flash memory unit 106 via the bus 109, the flash memory unit 1
Status from the flash memory bus 1
The data is transferred to the controller control unit 201 after being captured by the flash memory control unit 203 via the controller 09. The processor bus / flash memory bus input / output data control unit 204 also temporarily stores read data on the processor bus 107 and stores the read data in the flash memory unit 10.
6, temporary storage of write data and control of output destination,
The output of the flash memory control data and the output of the contents of the internal control register to the processor bus 107 are controlled.

【0025】さて、図4によりフラッシュメモリFM1
〜FMn各々におけるメモリマップについて説明すれ
ば、図示のように、実際に頻度大にして読み出し/書き
込みアクセスされるデータ領域401と、データ領域4
01上に書き込み回数上での不良ブロックが発生した場
合に、代替ブロックとして使用されるための予備領域4
02と、不良ブロック発生に伴い実際に代替ブロックが
使用されている場合に、その不良ブロック、代替ブロッ
クのそれぞれのブロックアドレスを対応関係を以て管理
するための管理データ領域403とから構成されたもの
となっている。但し、管理データ領域403としては、
2以上の領域として構成されるのが望ましいものとなっ
ている。これは、2以上の管理データ領域各々での管理
データ内容が常時同一となるべくされている場合には、
仮に何れかの管理データ領域が何等かの要因により異常
となった場合でも、残りの正常な管理データ領域上での
管理データを以て、不良ブロック、代替ブロックそれぞ
れについてのブロックアドレス管理を行い得るからであ
る。
Now, referring to FIG.
To explain the memory map in each of the data area 401 to FMn, as shown in FIG.
Spare area 4 to be used as a substitute block when a defective block occurs in the number of write operations on 01
02 and a management data area 403 for managing the block addresses of the defective block and the substitute block in a corresponding relationship when the substitute block is actually used in accordance with the occurrence of the defective block. Has become. However, as the management data area 403,
It is desirable to be configured as two or more regions. This is because when the management data contents in each of the two or more management data areas are to be always the same,
Even if one of the management data areas becomes abnormal for some reason, the block address management for each of the defective block and the replacement block can be performed using the management data on the remaining normal management data area. is there.

【0026】既述のように、フラッシュメモリFM1〜
FMn各々では、所定アドレス範囲毎にメモリエリアが
区分された上、区分されたメモリエリア個々は任意に、
かつ同時に読み出し/書き込みアクセス可とされている
が、このようにして区分されたメモリエリア個々はブロ
ックとして定義された上、ブロックアドレスで管理され
たものとなっている。図5に示すメモリマップの例で
は、全体としてのブロックアドレス空間501が1〜2
144とされている場合に、フラッシュメモリFM1〜
FMn各々における具体的なメモリマップ例を示したも
のである。これによる場合、データ領域401には20
48ブロック(ブロックアドレス1〜2048)が、ま
た、予備領域402には48ブロック(ブロックアドレ
ス2049〜2096)が、更に、2つの管理データ領
域403それぞれには48ブロック(ブロックアドレス
2097〜2120,2121〜2144)が、それぞ
れ割当てられたものとなっている。予備領域402のブ
ロック容量が48ブロックとされていることから、した
がって、データ領域401上に合計48ブロック分まで
の不良ブロックの発生が許容されているものであり、合
計49ブロック分の不良ブロックが発生した場合には、
もはや、そのフラッシュメモリは不良であると判断の
上、既述のコントロールレジスタ4(図3(E)を参照
のこと)上の該当ビットが、例えば“0”に設定される
ことで、交換が必要であることが表示されているもので
ある。
As described above, the flash memories FM1 to FM1
In each FMn, a memory area is divided for each predetermined address range, and each of the divided memory areas is arbitrarily set.
At the same time, read / write access is permitted. Each memory area thus partitioned is defined as a block and managed by a block address. In the example of the memory map shown in FIG. 5, the block address space 501 as a whole is 1 to 2
144, the flash memories FM1 to FM1
It shows a specific example of a memory map for each FMn. In this case, 20 is stored in the data area 401.
48 blocks (block addresses 1 to 2048), 48 blocks (block addresses 2049 to 2096) in the spare area 402, and 48 blocks (block addresses 2097 to 2120, 2121) in each of the two management data areas 403. To 2144) are assigned. Since the block capacity of the spare area 402 is set to 48 blocks, the occurrence of defective blocks up to a total of 48 blocks in the data area 401 is allowed, and the defective blocks of a total of 49 blocks are allowed. If this occurs,
When it is determined that the flash memory is defective, the corresponding bit in the above-described control register 4 (see FIG. 3E) is set to, for example, “0”. It is indicated that it is necessary.

【0027】ここで、データ領域401上でのフォーマ
ットについて説明すれば、図6に示すように、データ領
域401はデータフィールド601と書き込み回数フィ
ールド602から構成されており、データフィールド6
01上には本来のデータそのものが、また、書き込み回
数フィールド602上にはそれまでの書き込み回数が対
としてそれぞれ記憶されるものとなっている。例えばブ
ロックアドレス44上のデータフィールドにはデータと
して(3518)H(Hはその数字が16進表示である
ことを示す)が、また、書き込み回数フィールドには書
き込み回数として(455)Hが記憶されているが、そ
の書き込み回数(455)Hから、ブロックアドレス4
4上には、それまでに、1109(=162 ×4+16
1 ×5+160 ×5)回、データ書き込みが行われてい
ることが知れるものである。予備領域402上でのフォ
ーマットもデータ領域401上でのそれに同様とされて
いるものである。
Here, the format on the data area 401 will be described. As shown in FIG. 6, the data area 401 is composed of a data field 601 and a write count field 602.
01, the original data itself is stored, and in the write count field 602, the write count so far is stored as a pair. For example, (3518) H (H indicates that the number is in hexadecimal) is stored as data in the data field on the block address 44, and (455) H is stored as the number of writes in the number-of-writes field. However, from the write count (455) H, the block address 4
4 on that, 1109 (= 16 2 × 4 + 16
It is known that data writing is performed 1 × 5 + 16 0 × 5) times. The format on the spare area 402 is the same as that on the data area 401.

【0028】図7はまた、ブロックアドレス727,8
13各々でのブロックが不良ブロックとなったことに伴
い、ブロックアドレス2049,2050各々でのブロ
ックが代替ブロックに設定された後、これら代替ブロッ
クにそれぞれ(881)H、(865)H回に亘ってデ
ータか着込みが行われた場合での状態を示したものであ
る。したがって、2つの管理データ領域403上では、
ブロックアドレス727でのブロックがブロックアドレ
ス2049でのそれにより代替され、また、ブロックア
ドレス813でのブロックがブロックアドレス2050
でのそれにより代替されていることが管理されたものと
なっている。したがって、読み出し/書き込みアクセス
に先立って、管理データ領域403上でアクセス対象ブ
ロックアドレスの登録の有無を確認の上、登録されてい
なければ、そのままアクセス対象ブロックがアクセスさ
れるも、それが登録されていれば、そのアクセス対象ブ
ロックアドレスと対として登録されているブロックアド
レスでのブロックが代替ブロックであるとして、その代
替ブロックがアクセスされるようにすればよいものであ
る。
FIG. 7 also shows block addresses 727 and 8
13, the blocks at the block addresses 2049 and 2050 are set as the replacement blocks, and the replacement blocks are set to (881) H and (865) H times, respectively. This shows the state in which data or landing has been performed. Therefore, on the two management data areas 403,
The block at block address 727 is replaced by that at block address 2049, and the block at block address 813 is replaced by block address 2050.
It is managed to be replaced by it. Therefore, prior to the read / write access, it is checked whether or not the access target block address is registered in the management data area 403. If the address is not registered, the access target block is accessed as it is, but it is registered. Then, the block at the block address registered as a pair with the access target block address is regarded as a substitute block, and the substitute block may be accessed.

【0029】最後に読み出し/書き込みアクセス動作に
ついて説明する。先ず読み出しアクセスについてである
が、読み出しアクセスは、図8に示すような手順で行わ
れる。即ち、先ずMPU101からコントロールレジス
タ1には、読み出し(リード)対象としてのフラッシュ
メモリ(チップ)番号と(物理)ブロックアドレスが書
き込み(ライト)される(ST1)。その後、コントロ
ールレジスタ2には、リード結果である読み出しデータ
の転送記憶先となるメモリ105上のメモリアドレスが
書き込まれる(ST2)。更に、コントロールレジスタ
0には、リードコマンドおよびEXEビット(開始指示
ビット)“1”が書き込まれる(ST3)。その後、コ
ントロールレジスタ0をリードの上、EXEビットの状
態が判断されるものとなっている(ST4)。もしも、
EXEビットが“1”である場合はST4に戻るが、E
XEビットが“0”であったならば、コントロールレジ
スタ0上のSTフィールドが参照されるものとなってい
る(ST5)。
Finally, the read / write access operation will be described. First, regarding read access, read access is performed according to the procedure shown in FIG. That is, first, a flash memory (chip) number and a (physical) block address to be read (read) are written (written) from the MPU 101 to the control register 1 (ST1). Thereafter, a memory address on the memory 105 as a transfer destination of the read data as a read result is written in the control register 2 (ST2). Further, a read command and an EXE bit (start instruction bit) "1" are written in the control register 0 (ST3). Then, after reading the control register 0, the state of the EXE bit is determined (ST4). If,
If the EXE bit is "1", the process returns to ST4.
If the XE bit is "0", the ST field on the control register 0 is to be referred to (ST5).

【0030】図9にはまた、同じく上記ST3からST
5までの間のフラッシュメモリコントローラ103での
動作フローが示されたものとなっている。これによる場
合、先ず読み出し対象としてのフラッシュメモリ(チッ
プ)番号にもとづき、そのフラッシュメモリにおける管
理データ領域が参照された上(ST6)、読み出し対象
ブロックアドレスの登録の有無が判断されるものとなっ
ている(ST7)。登録されている場合は、管理データ
領域上から代替ブロックアドレスが取得された上(ST
8)、その代替ブロックアドレスにより、また、登録さ
れていない場合には、そのまま読み出し対象ブロックア
ドレスによりデータ読み出しが行われているものである
(ST9)。その後、メモリコントローラ102にアク
セスの上、プロセッサバス107のバス権が取得された
状態で(ST10)、ST2にて指定されたメモリ10
5上の転送記憶先メモリアドレスに読み出しデータの書
き込み要求が行われるものとなっている(ST11)。
その後は、メモリコントローラ102からのステータス
の返送を待って(ST12)、そのステータスがコント
ロールレジスタ0上のSTフィールド301にセットさ
れた上、EXEビットが初めて“0”にクリアされてい
るものである(ST13)。
FIG. 9 also shows ST3 to ST
The operation flow in the flash memory controller 103 up to 5 is shown. In this case, first, based on the number of the flash memory (chip) to be read, a management data area in the flash memory is referred to (ST6), and it is determined whether or not a block address to be read is registered. (ST7). If registered, the substitute block address is obtained from the management data area (ST
8) If the data is not registered, the data is read by the read block address as it is (ST9). Thereafter, after accessing the memory controller 102 and acquiring the bus right of the processor bus 107 (ST10), the memory 10 designated in ST2 is accessed.
5, a write request for read data is made to the transfer destination memory address on ST5 (ST11).
Thereafter, the process waits for a status return from the memory controller 102 (ST12), the status is set in the ST field 301 of the control register 0, and the EXE bit is first cleared to "0". (ST13).

【0031】一方、書き込みアクセスは、図10に示す
手順で行われるものとなっている。即ち、先ずMPU1
01からメモリコントローラ102を介し、メモリ10
5上にはフラッシュメモリへの書き込みデータが書き込
まれた後(ST14)、コントロールレジスタ1上には
書き込み対象フラッシュメモリ(チップ)番号と(物
理)ブロックアドレスが書き込み(ライト)される(S
T15)。その後、コントロールレジスタ2上には、S
T14で書き込みが行われたメモリ105上のメモリア
ドレスが設定されているものである(ST16)。更
に、コントロールレジスタ0上には、ライトコマンドお
よびEXEビット(開始指示ビット)“1”が書き込ま
れるものとなっている(ST17)。その後は、コント
ロールレジスタ0をリードの上、EXEビットの状態が
判断されるものとなっている(ST18)。もしも、E
XEビットが“1”である場合はST18に戻るが、E
XEビットが“0”であったならば、コントロールレジ
スタ0上のSTフィールドが参照されているものである
(ST19)。
On the other hand, write access is performed according to the procedure shown in FIG. That is, first, MPU1
01 through the memory controller 102 to the memory 10
5, the write data to the flash memory is written (ST14), and then the flash memory (chip) number and the (physical) block address to be written are written (written) to the control register 1 (S).
T15). After that, S is stored in the control register 2.
The memory address on the memory 105 to which writing has been performed at T14 is set (ST16). Further, a write command and an EXE bit (start instruction bit) "1" are written on the control register 0 (ST17). After that, after reading the control register 0, the state of the EXE bit is determined (ST18). If E
If the XE bit is "1", the process returns to ST18.
If the XE bit is "0", the ST field on the control register 0 is referred to (ST19).

【0032】図11にはまた、同じく上記ST17から
ST19までの間のフラッシュメモリコントローラ10
3での動作フローが示されたものとなっている。これに
よる場合、先ずメモリ105にアクセスの上、ST14
で書き込まれた書き込みデータが取得される(ST2
0)。その後、ST15にて指定されたブロックアドレ
ス上からは書き込み回数が読み取られるが、この書き込
み回数は+1更新された上、同一ブロックアドレス上に
書き戻されているものである(ST21)。更に、その
+1更新された書き込み回数aとコントロールレジスタ
3上の、書き込み回数上での制限値bとが比較されるが
(ST22)、もしも、a=bならば、予備領域上に空
きブロックがあるか否かが判定された上(ST23)、
空きブロックがある場合には、アクセス対象ブロックア
ドレスは不良ブロックであるとして、その空きブロック
を代替ブロックとする交替処理(書き込みデータの代替
ブロックへの書き込み処理や、管理データ領域上へのブ
ロックアドレスの書き込み処理)が行われているもので
ある(ST26)。もしも、予備領域上に空きブロック
がない場合には、アクセス対象フラッシュメモリは交換
が必要であることから、コントロールレジスタ4上にそ
の旨の表示が行われた上(ST24)、書き込みアクセ
ス処理は終了されているものである。一方、ST22で
の判断で、a≠bであって、書き込み回数について未だ
余裕がある場合には、書き込み対象ブロックアドレスに
そのまま書き込みデータが書き込みされているものであ
る(ST25)。書き込み対象ブロック、または代替ブ
ロックへの書き込みデータの書き込みが完了すれば、コ
ントロールレジスタ0上のSTフィールドはセットされ
た上、EXEビットが初めて“0”にクリアされている
ものである(ST27)。
FIG. 11 also shows the flash memory controller 10 between ST17 and ST19.
3 shows the operation flow. In this case, first, after accessing the memory 105, ST14
Is obtained (ST2).
0). Thereafter, the number of times of writing is read from the block address specified in ST15, but the number of times of writing is updated by +1 and written back to the same block address (ST21). Further, the +1 updated write count a is compared with the limit value b on the write count in the control register 3 (ST22). If a = b, an empty block is found in the spare area. It is determined whether or not there is (ST23),
If there is a vacant block, the access target block address is determined to be a bad block, and replacement processing (writing of write data to a substitute block or writing of a block address to the management data area) is performed using the vacant block as a substitute block. (Writing process) (ST26). If there is no free block in the spare area, the flash memory to be accessed needs to be replaced, so that an indication is given on the control register 4 (ST24), and the write access processing ends. Is what is being done. On the other hand, if it is determined in step ST22 that a ≠ b and there is still room for the number of times of writing, the write data is written as it is to the write target block address (ST25). When the writing of the write data to the write target block or the substitute block is completed, the ST field on the control register 0 is set and the EXE bit is first cleared to "0" (ST27).

【0033】なお、以上の説明では、アクセス対象ブロ
ックアドレスに対しては、未だ代替ブロックが設定され
ていない場合が想定されていないが、一般的には、代替
ブロックが設定されているか否かを初期に確認の上、ア
クセス対象ブロック、または代替ブロックに対しデータ
か書き込み処理が行われればよいものであり、また、希
有ではあると思われるが、代替ブロック上への書き込み
回数が制限値bに達した場合には、その代替ブロックに
ついて新たに代替ブロックを設定することも考えられる
ものとなっている。何れにしても、本発明によるフラッ
シュメモリアクセス制御方法が採用される場合には、最
小限の構成にてシステムが構築され得ることから、コン
ピュータシステムの他、デジタルカメラ等のフラッシュ
メモリが使用されるシステムに適用可とされたものとな
っている。
In the above description, it is not assumed that a substitute block has not yet been set for the access target block address. However, in general, it is determined whether or not a substitute block has been set. It is sufficient that data or write processing is performed on the access target block or the replacement block after confirmation at the initial stage.Although it seems that it is rare, the number of times of writing on the replacement block is less than the limit value b. If it has reached, it is conceivable to set a new alternative block for the alternative block. In any case, when the flash memory access control method according to the present invention is adopted, a flash memory such as a digital camera is used in addition to a computer system because a system can be constructed with a minimum configuration. It is applicable to the system.

【0034】[0034]

【発明の効果】以上、説明したように、請求項1による
場合は、ブロック管理用RAMを不要として、ブロック
各々に対する書き込み回数が管理された状態として、1
以上のフラッシュメモリ各々における任意ブロックが書
き込みアクセスされ得、また、請求項2による場合に
は、そのような効果に加え、あるブロックに対する書き
込み回数の累積値が制限値に達した場合であっても、そ
のブロックについては代替ブロックが確保された上、以
降、その代替ブロックに対し引き続き書き込みアクセス
が行われ得、更に、請求項3によれば、フラッシュメモ
リ上で代替ブロックが確保され、また、書き込み回数や
代替ブロックアドレスが管理された状態で、任意ブロッ
クが読み出し/書き込みアクセスされ得、更にまた、請
求項4による場合は、代替ブロックに対し読み出し/書
き込みアクセスが行われるに際し、何等かの要因により
何れかの管理データ領域に異常が生じた場合であって
も、残りの正常な管理データ領域により引き続き代替ブ
ロック各々に対しては読み出し/書き込みアクセスが行
われ得るものとなっている。
As described above, according to the first embodiment, the block management RAM is not required, and the number of times of writing to each block is controlled, and the number of blocks is reduced to one.
Any block in each of the above-mentioned flash memories can be accessed for writing. In addition, in the case of claim 2, in addition to such an effect, even when the cumulative value of the number of times of writing to a certain block reaches the limit value, After the replacement block is secured for the block, the write access can be subsequently performed to the replacement block. Further, according to the third aspect, the replacement block is secured on the flash memory and the write access is performed. In a state where the number of times and the substitute block address are managed, an arbitrary block can be read / write-accessed. Further, in the case of the fourth aspect, when the read / write access is performed to the substitute block, the read / write access may be performed for some reason. Even if an error occurs in any management data area, the remaining normal management It has become one read / write access can be made for continued replacement block each by chromatography data area.

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

【図1】図1は、本発明に係るプロセッサシステムの一
例でのシステム構成を示す図
FIG. 1 is a diagram showing a system configuration of an example of a processor system according to the present invention;

【図2】図2は、本発明に係るフラッシュメモリコント
ローラの一例での構成を示す図
FIG. 2 is a diagram showing a configuration of an example of a flash memory controller according to the present invention;

【図3】図3(A)〜(E)は、フラッシュメモリコン
トローラ内部に用意されている各種コントロールレジス
タそれぞれのフォーマットとその機能を説明するための
FIGS. 3A to 3E are diagrams for explaining formats and functions of various control registers prepared in a flash memory controller; FIGS.

【図4】図4は、フラッシュメモリ各々におけるメモリ
マップを示す図
FIG. 4 is a diagram showing a memory map in each flash memory;

【図5】図5は、その具体的なメモリマップ例を示す図FIG. 5 is a diagram showing a specific example of a memory map;

【図6】図6は、データ領域上でのフォーマットを示す
FIG. 6 is a diagram showing a format on a data area;

【図7】図7は、データ領域上で不良ブロックが発生し
たことに伴い予備領域上に代替ブロックが設定される場
合に、管理データ領域上に如何なる管理データが設定さ
れるかを説明するための図
FIG. 7 is a diagram for explaining what management data is set in a management data area when a replacement block is set in a spare area due to occurrence of a bad block in a data area; Illustration

【図8】図8は、読み出しアクセス時でのフローを示す
図(その1)
FIG. 8 is a diagram showing a flow at the time of read access (part 1);

【図9】図9は、同じくフラッシュメモリコントローラ
での動作フローを示す図(その2)
FIG. 9 is a diagram showing an operation flow in the flash memory controller (part 2);

【図10】図10は、書き込みアクセス時でのフローを
示す図(その1)
FIG. 10 is a diagram showing a flow at the time of write access (part 1);

【図11】図11は、同じくフラッシュメモリコントロ
ーラでの動作フローを示す図(その2)
FIG. 11 is a diagram showing an operation flow in the flash memory controller (part 2);

【図12】図12は、従来技術に係るメモリアクセスシ
ステムの1具体例を示す図
FIG. 12 is a diagram showing a specific example of a memory access system according to the related art;

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

101…マイクロプロセッサ、102…メモリコントロ
ーラ、103…フラッシュメモリコントローラ、105
…メモリ、106…フラッシュメモリ部、107…プロ
セッサバス、401…データ領域、402…予備領域、
403…管理データ領域、FM1〜FMn…フラッシュ
メモリ
101: microprocessor, 102: memory controller, 103: flash memory controller, 105
.., Memory, 106, flash memory unit, 107, processor bus, 401, data area, 402, spare area,
403: management data area, FM1 to FMn: flash memory

───────────────────────────────────────────────────── フロントページの続き (72)発明者 樋口 勇一 神奈川県横浜市戸塚区戸塚町216番地 株 式会社日立製作所通信事業部内 Fターム(参考) 5B018 GA04 KA18 MA23 NA06 5B025 AD01 AD04 AD05 AE01 AE08 5B082 DE00 JA06  ────────────────────────────────────────────────── ─── Continuing on the front page (72) Inventor Yuichi Higuchi 216 Totsukacho, Totsuka-ku, Yokohama-shi, Kanagawa Prefecture F-term in Hitachi, Ltd. Communications Division 5B018 GA04 KA18 MA23 NA06 5B025 AD01 AD04 AD05 AE01 AE08 5B082 DE00 JA06

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 1以上のフラッシュメモリ各々における
任意ブロックが書き込みアクセスされる際でのフラッシ
ュメモリアクセス制御方法であって、ブロック各々が書
き込みアクセスされる度に、該アクセスに先立って該ブ
ロック上から読み出される、データと対として記憶され
ている書き込み回数が事前設定制限値を超えていない限
りにおいては、上記書き込み回数が更新された状態とし
て書き込みデータとともに該ブロック上に書き込みされ
るようにしたフラッシュメモリアクセス制御方法。
1. A flash memory access control method when an arbitrary block in each of one or more flash memories is write-accessed, wherein each time a block is write-accessed, the block is read from the block prior to the access. As long as the number of write operations to be read and stored as a pair with data does not exceed the preset limit value, the flash memory is configured to be written on the block together with the write data in an updated state of the number of write operations. Access control method.
【請求項2】 フラッシュメモリ上にデータ領域および
予備領域が確保されている状態で、1以上のフラッシュ
メモリ各々におけるデータ領域上の任意ブロックが書き
込みアクセスされる際でのフラッシュメモリアクセス制
御方法であって、ブロック各々が書き込みアクセスされ
る度に、該アクセスに先立って該ブロック上から読み出
される、データと対として記憶されている書き込み回数
が事前設定制限値を超えていない限りにおいては、上記
書き込み回数が更新された状態として書き込みデータと
ともに該ブロック上に書き込みされる一方、上記事前設
定制限値を超えている場合には、以降、同一フラッシュ
メモリ上の予備領域から選択された空きブロックを代替
ブロックとして、該代替ブロック上に書き込みデータが
書き込みされるようにしたフラッシュメモリアクセス制
御方法。
2. A flash memory access control method when an arbitrary block in a data area in each of one or more flash memories is write-accessed in a state where a data area and a spare area are secured on the flash memory. Each time a block is written and accessed, as long as the number of writes stored as a pair with data that is read from the block prior to the access does not exceed a preset limit value, Is written on the block together with the write data as an updated state, while if the preset limit value is exceeded, a vacant block selected from the spare area on the same flash memory is used as a substitute block thereafter. So that write data is written on the replacement block. Flash memory access control method.
【請求項3】 各フラッシュメモリ上にデータ領域、予
備領域および管理データ領域が確保されている状態で、
データ領域上の同一ブロックへの書き込み回数が事前設
定制限値を超えた場合には、以降、同一フラッシュメモ
リ上の予備領域から選択された空きブロックを代替ブロ
ックとして、以降、該代替ブロックに対し読み出し/書
き込みアクセスが行われるものとして、1以上のフラッ
シュメモリ各々におけるデータ領域上の任意ブロックが
読み出し/書き込みアクセスされる際でのフラッシュメ
モリアクセス制御方法であって、ブロック各々が書き込
み/読み出しアクセスされる度に、該アクセスに先立っ
て同一フラッシュメモリ上の管理データ領域に該ブロッ
クについての代替ブロックアドレスが登録されているか
否かが判定された上、該代替ブロックアドレスが登録さ
れていない場合は、該ブロックがそのまま読み出し/書
き込みアクセスされる一方、該代替ブロックアドレスが
登録されている場合には、該代替ブロックアドレスで指
定される、予備領域上の代替ブロックに対し読み出し/
書き込みアクセスが行われるようにしたフラッシュメモ
リアクセス制御方法。
3. In a state where a data area, a spare area, and a management data area are secured on each flash memory,
If the number of times of writing to the same block in the data area exceeds the preset limit value, a vacant block selected from the spare area on the same flash memory is set as a substitute block, and thereafter, the read to the substitute block is performed. This is a flash memory access control method in which an arbitrary block on a data area in each of one or more flash memories is read / written assuming that the write / write access is performed. Before each access, it is determined whether or not an alternative block address for the block is registered in the management data area on the same flash memory, and if the alternative block address is not registered, Block is read / write accessed as is That one, if the surrogate replacement block address is registered is specified in the surrogate replacement block address, reading to alternate blocks on the spare area /
A flash memory access control method in which write access is performed.
【請求項4】 各フラッシュメモリ上にデータ領域、予
備領域、および登録内容が同一とされた2以上の管理デ
ータ領域が確保されている状態で、データ領域上の同一
ブロックへの書き込み回数が事前設定制限値を超えた場
合には、以降、同一フラッシュメモリ上の予備領域から
選択された空きブロックを代替ブロックとして、以降、
該代替ブロックに対し読み出し/書き込みアクセスが行
われるものとして、1以上のフラッシュメモリ各々にお
けるデータ領域上の任意ブロックが読み出し/書き込み
アクセスされる際でのフラッシュメモリアクセス制御方
法であって、ブロック各々が書き込み/読み出しアクセ
スされる度に、該アクセスに先立って同一フラッシュメ
モリ上の、少なくとも登録内容が正常な何れか1つの管
理データ領域に該ブロックについての代替ブロックアド
レスが登録されているか否かが判定された上、該代替ブ
ロックアドレスが登録されていない場合は、該ブロック
がそのまま読み出し/書き込みアクセスされる一方、該
代替ブロックアドレスが登録されている場合には、該代
替ブロックアドレスで指定される、予備領域上の代替ブ
ロックに対し読み出し/書き込みアクセスが行われるよ
うにしたフラッシュメモリアクセス制御方法。
4. In a state where a data area, a spare area, and two or more management data areas having the same registered contents are secured on each flash memory, the number of times of writing to the same block in the data area is determined in advance. If the set limit value is exceeded, a free block selected from the spare area on the same flash memory
A flash memory access control method when an arbitrary block in a data area in each of one or more flash memories is read / written assuming that read / write access is performed to the substitute block, wherein each block is Each time a write / read access is made, it is determined whether or not an alternative block address for the block is registered in at least one of the management data areas on the same flash memory where the registered contents are normal prior to the access. In addition, if the replacement block address is not registered, the block is read / write accessed as it is, while if the replacement block address is registered, the block is designated by the replacement block address. Read the replacement block on the spare area Flash memory access control method so that the teeth / write access is performed.
JP2000172004A 2000-06-05 2000-06-05 Flash memory access control method Pending JP2001350673A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000172004A JP2001350673A (en) 2000-06-05 2000-06-05 Flash memory access control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000172004A JP2001350673A (en) 2000-06-05 2000-06-05 Flash memory access control method

Publications (1)

Publication Number Publication Date
JP2001350673A true JP2001350673A (en) 2001-12-21

Family

ID=18674472

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000172004A Pending JP2001350673A (en) 2000-06-05 2000-06-05 Flash memory access control method

Country Status (1)

Country Link
JP (1) JP2001350673A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007519996A (en) * 2003-12-30 2007-07-19 サンディスク コーポレイション Nonvolatile memory and method with phased program fault handling
US7295479B2 (en) 2003-04-04 2007-11-13 Samsung Electronics Co., Ltd. Apparatus and method for managing bad blocks in a flash memory
JP2008040701A (en) * 2006-08-04 2008-02-21 Sony Ericsson Mobilecommunications Japan Inc Memory management method and portable terminal equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7295479B2 (en) 2003-04-04 2007-11-13 Samsung Electronics Co., Ltd. Apparatus and method for managing bad blocks in a flash memory
JP2007519996A (en) * 2003-12-30 2007-07-19 サンディスク コーポレイション Nonvolatile memory and method with phased program fault handling
JP2008040701A (en) * 2006-08-04 2008-02-21 Sony Ericsson Mobilecommunications Japan Inc Memory management method and portable terminal equipment

Similar Documents

Publication Publication Date Title
US8751765B2 (en) Computer system, storage system and method for saving storage area by integrating same data
JP2003257132A (en) File management of one-time-programmable nonvolatile memory devices
EP0969378A2 (en) Data storage, data processing system and method
US7487298B2 (en) Disk array device, method for controlling the disk array device and storage system
JPH0991099A (en) Disk update log recording system
KR960015368A (en) Data processing systems
JP2001350673A (en) Flash memory access control method
CN111124294A (en) Sector mapping information management method and device, storage medium and equipment
US20070271311A1 (en) Disk array device and data management method for managing master data and replication data replicated from master data
US20030200401A1 (en) Microcomputer system automatically backing-up data written in storage medium in transceiver, and transceiver connected thereto
JPS58103052A (en) Automatic data gathering system
CN113760195B (en) FATFS file system based on embedded type
JP2002082833A (en) High speed data writing system using nonvolatile cache memory
EP1804166A2 (en) Memory device and information processing apparatus
JP3166659B2 (en) Storage device
US7996598B2 (en) Memory management module
JPH07325674A (en) Method for exchanging semiconductor memory and method for controlling semiconductor disk sub-system
JPH053611B2 (en)
US6317857B1 (en) System and method for utilizing checksums to recover data
EP1344224A2 (en) Method for the secure updating of data areas in a non volatile memory and device to perform such a method
JPH04273516A (en) Magnetic disk device
JPH0552538B2 (en)
JP2527964B2 (en) Backup system initial startup control method
JPH06139122A (en) File storage device
JPH08185354A (en) Memory managing device

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20040225

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20060510

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20060510