JP5787095B2 - Method for storing data in non-volatile memory - Google Patents

Method for storing data in non-volatile memory Download PDF

Info

Publication number
JP5787095B2
JP5787095B2 JP2012045283A JP2012045283A JP5787095B2 JP 5787095 B2 JP5787095 B2 JP 5787095B2 JP 2012045283 A JP2012045283 A JP 2012045283A JP 2012045283 A JP2012045283 A JP 2012045283A JP 5787095 B2 JP5787095 B2 JP 5787095B2
Authority
JP
Japan
Prior art keywords
data
memory block
block
memory
storage unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2012045283A
Other languages
Japanese (ja)
Other versions
JP2013182378A (en
Inventor
暢矢 植松
暢矢 植松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP2012045283A priority Critical patent/JP5787095B2/en
Publication of JP2013182378A publication Critical patent/JP2013182378A/en
Application granted granted Critical
Publication of JP5787095B2 publication Critical patent/JP5787095B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Description

本発明は、不揮発性メモリへのデータ記憶方法に関し、特に、データ書き込みの前に消去を必要とし、その消去回数について限度があるような、フラッシュメモリ等のメモリへのデータ記憶方法に関する。   The present invention relates to a method for storing data in a nonvolatile memory, and more particularly, to a method for storing data in a memory such as a flash memory that requires erasing before data writing and has a limit on the number of times of erasing.

コンピュータ等の電子機器あるいは車両用の電子制御装置(ECU:Electronic Control Unitともいう)で用いられるデータを記憶させておく記憶媒体として、フラッシュメモリのような書換え可能な不揮発性メモリの使用が広がっている。   The use of rewritable non-volatile memory such as flash memory has expanded as a storage medium for storing data used in electronic devices such as computers or electronic control units (ECU: Electronic Control Unit) for vehicles. Yes.

不揮発性メモリであるフラッシュメモリでは、動作原理上、消去状態を書き込み状態にする書き込み処理は、アドレス単位あるいはビット単位で実行できるが、書き込み状態を消去状態にする消去処理については、メモリブロック(メモリブロックともいう)単位で一括して行われ、アドレス単位あるいはビット単位で実行することはできない。   In the flash memory which is a nonvolatile memory, the write process for setting the erase state to the write state can be executed in units of addresses or bits on the principle of operation. It is performed in batches (also called blocks) and cannot be executed in address units or bit units.

このため、不揮発性半導体記憶装置では、一般的に、所定のメモリブロックに既に書き込まれているデータの全部または一部を更新する場合、更新後のデータを一括消去処理済みのメモリブロックに書き込む書き込み処理を実行した後、更新前のデータが記憶された更新元メモリブロックを一括消去する一括消去処理を実行するデータ更新処理を実行している。   Therefore, in a nonvolatile semiconductor memory device, generally, when updating all or a part of data already written in a predetermined memory block, writing to write the updated data into a memory block that has been subjected to batch erase processing After the process is executed, a data update process for executing a batch erase process for batch erasing the update source memory block storing the data before update is executed.

このとき、フラッシュメモリとは別にRAM(Random Access Memory:ランダムアクセスメモリ)を備え、データ更新処理の際に、メモリブロック内のデータを、データ退避領域であるRAMに退避させて、該メモリブロックの一括消去を行い。該メモリブロックあるいは別のメモリブロックに、RAMに退避したデータを書き込む技術が開示されている(特許文献1参照)。   At this time, a RAM (Random Access Memory) is provided separately from the flash memory, and during the data update process, the data in the memory block is saved in the RAM, which is a data saving area, and the memory block Perform batch erase. A technique for writing data saved in a RAM to the memory block or another memory block is disclosed (see Patent Document 1).

特開2000−243093号公報JP 2000-243093 A

特許文献1の構成では、メモリブロック内のデータをRAMに退避させたときに、停電等でRAMに電力が供給されない事態が発生すると、退避データは消失するという問題がある。また、フラッシュメモリの他にRAMを必要とするので、回路を小型化できないとともに、製造コストが上昇する問題もある。   The configuration of Patent Document 1 has a problem that when the data in the memory block is saved in the RAM, the saved data is lost if a situation occurs in which power is not supplied to the RAM due to a power failure or the like. Further, since a RAM is required in addition to the flash memory, there is a problem that the circuit cannot be miniaturized and the manufacturing cost increases.

そこで、データ退避領域にも、RAMの代わりにフラッシュメモリを用いる構成も考えられる。図1に、この構成におけるフラッシュメモリへのデータ記憶方法が用いられる不揮発性半導体記憶装置(以下、ECUと称する)の構成例を示す。なお、図1では、フラッシュメモリへのデータ記憶方法の実行に直接関係する主要部分のみが示されている。   Therefore, a configuration using a flash memory instead of the RAM for the data saving area is also conceivable. FIG. 1 shows a configuration example of a nonvolatile semiconductor memory device (hereinafter referred to as ECU) in which the data storage method in the flash memory in this configuration is used. In FIG. 1, only main parts directly related to execution of the data storage method in the flash memory are shown.

ECU1は、CPU2、CPU2が実行するプログラム等が記憶されているROM3、プログラムやデータが一時記憶されるRAM4、ECU1の動作に必要な各種データが記憶されるフラッシュメモリ5、入出力回路(図1では、I/Oと表記)6、を含み、これらは、バス7によりデータ伝送可能に接続されている。   The ECU 1 includes a CPU 2, a ROM 3 that stores programs executed by the CPU 2, a RAM 4 that temporarily stores programs and data, a flash memory 5 that stores various data necessary for the operation of the ECU 1, and an input / output circuit (FIG. 1). In this case, these are connected to each other via a bus 7 so that data transmission is possible.

また、入出力回路6には、センサ群10、アクチュエータ群11が接続されていてもよい。このような構成のときは、ECU1は、センサ群10の状態を取得して、その状態に基づいて、アクチュエータ群11の駆動制御を行う。そして、これらの制御に必要なデータを、フラッシュメモリ5に記憶する。   Further, the sensor group 10 and the actuator group 11 may be connected to the input / output circuit 6. In such a configuration, the ECU 1 acquires the state of the sensor group 10 and performs drive control of the actuator group 11 based on the state. Data necessary for these controls is stored in the flash memory 5.

フラッシュメモリ5は、複数(図1では4個)のメモリブロック(以下、「ブロック」と略称する)A、B、C、Dを含み、ブロックA〜Cをデータ記憶用ブロックとして用い、ブロックDをデータ退避用ブロックとして用いる。また、図2ではブロックAを例示しているが、各ブロックの全領域を、データを記憶するデータ記憶部として用いる。   The flash memory 5 includes a plurality (four in FIG. 1) of memory blocks (hereinafter abbreviated as “blocks”) A, B, C, and D, and blocks A to C are used as data storage blocks. Is used as a data saving block. 2 illustrates the block A, the entire area of each block is used as a data storage unit for storing data.

図10を用いて、図1および図2の構成におけるフラッシュメモリへのデータ記憶方法について説明する。まず、ステップS200では、ブロックAのデータ記憶部100の全てに、データが書き込まれた状態を示している。この状態で、ブロックAの古いデータ(A)を消去する場合、まず、ステップS210のように、ブロックAの最新データ(A)をブロックDのデータ記憶部400に書き込む。   A method of storing data in the flash memory in the configuration of FIGS. 1 and 2 will be described with reference to FIG. First, Step S200 shows a state in which data is written in all of the data storage units 100 of the block A. In this state, when erasing the old data (A) of the block A, first, the latest data (A) of the block A is written into the data storage unit 400 of the block D as in step S210.

一般に、フラッシュメモリのデータは、データIDとデータ値とが関連付けられて記憶されている。ブロックAに既に記憶されているデータが更新され、更新データが追記されたとき、ブロックAには同じデータIDを持つデータが複数記憶される。しかし、データはデータ記憶部100の先頭アドレスから書き込まれるので、同じデータIDで、最も末尾に近いアドレスに書き込まれているものが最新のデータであると判断できる。   In general, data in a flash memory is stored in association with a data ID and a data value. When the data already stored in the block A is updated and the updated data is added, the block A stores a plurality of data having the same data ID. However, since the data is written from the top address of the data storage unit 100, it can be determined that the data written at the address closest to the end with the same data ID is the latest data.

次に、ステップS220のように、ブロックAのデータ記憶部100を一括消去する(すなわち、全領域がデータなしの状態にする)。次に、ステップS230のように、ブロックDに退避しておいたブロックAの最新データ(A)を、ブロックA(すなわちデータ記憶部100)に書き込む。最後に、ステップS240のように、ブロックD(すなわちデータ記憶部400)を一括消去する。   Next, as in step S220, the data storage unit 100 of the block A is erased collectively (that is, all areas are in a state of no data). Next, as in step S230, the latest data (A) of block A saved in block D is written to block A (ie, data storage unit 100). Finally, as in step S240, the block D (that is, the data storage unit 400) is erased collectively.

図11に、図10のデータ更新処理を繰り返し実行したときの、各ブロックの消去回数の推移を示す。1回目の状態(ブロック消去前の状態)では、各ブロックの消去回数は0回であるが、データ記憶量が一杯となったブロックBのデータ更新処理を行い、データ退避用ブロックであるブロックDの消去回数は0回から1増加する。2回目の状態では、再度データ記憶量が一杯となったブロックBのデータ更新処理を行い、データ退避用ブロックであるブロックDの消去回数は1回からさらに1増加する。同様に、3回目の状態では、データ記憶量が一杯となったブロックAのデータ更新処理を行い、ブロックDの消去回数は2回からさらに1増加する。   FIG. 11 shows the transition of the erase count of each block when the data update process of FIG. 10 is repeatedly executed. In the first state (the state before block erasure), the number of times of erasure of each block is 0, but the data update processing of block B whose data storage amount is full is performed, and block D which is a data saving block The number of erasures increases from 0 to 1. In the second state, the data update process of the block B whose data storage amount is full is performed again, and the number of erasures of the block D, which is a data saving block, increases by one from one. Similarly, in the third state, the data update process of the block A in which the data storage amount is full is performed, and the erase count of the block D is further increased by 1 from 2.

このように、データ退避用ブロックであるブロックDは、各データ記憶用ブロック(A〜C)で共用しているため、その消去回数はデータ記憶用ブロックの消去回数の和になる。そのため、データ退避用ブロックの消去回数は、データ記憶用ブロックの消去回数よりも早くフラッシュメモリの仕様上の限界値(例えば、500回)に達する。   As described above, since the block D which is a data saving block is shared by the data storage blocks (A to C), the number of erasures is the sum of the number of erasures of the data storage blocks. Therefore, the number of erases of the data saving block reaches the limit value (for example, 500 times) in the specification of the flash memory earlier than the number of erases of the data storage block.

このため、データ記憶用ブロックの消去回数が限界値に達しなくても、このフラッシュメモリは全体として使用できなくなり、ECU1も正常動作しなくなる可能性が高くなり、ECU1自体を交換する必要が生じ、このECUを使用するユーザがコストを負担しなければならない。   For this reason, even if the number of times of erasing the data storage block does not reach the limit value, the flash memory cannot be used as a whole, and the ECU 1 is likely not to operate normally, and the ECU 1 itself needs to be replaced. The user who uses this ECU must bear the cost.

上記問題点を背景として、本発明の課題は、記憶媒体の使用可能期間を延長することが可能な不揮発性メモリへのデータ記憶方法を提供することにある。   Against the background of the above problems, an object of the present invention is to provide a data storage method in a nonvolatile memory capable of extending the usable period of a storage medium.

課題を解決するための手段および発明の効果Means for Solving the Problems and Effects of the Invention

上記課題を解決するための不揮発性メモリへのデータ記憶方法は、不揮発性メモリを備えた不揮発性半導体記憶装置における不揮発性メモリへのデータ記憶方法であって、不揮発性メモリは、1以上のアドレスを有するメモリブロックを複数含み、不揮発性メモリの個々のメモリブロックに対し、メモリブロック単位での一括消去、予め定められたアドレス数の記憶領域単位またはビット単位での書き込みを行うメモリ制御部を備え、複数のメモリブロックは、それぞれ、データを記憶するデータ記憶部と、自身のメモリブロックの一括消去を実行した消去回数を含むデータ管理情報を記憶するデータ管理情報記憶部と、を含んで構成され、複数のメモリブロックうちの一つが、他のメモリブロックに記憶されているデータを退避するためのデータ退避用メモリブロックに予め決定されており、メモリ制御部は、データ記憶部に記憶されているデータのうち、記憶しておくべき更新用データのみを残し、更新用データ以外のデータを消去するデータ更新処理を実行し、データ更新処理において、データ更新の対象となるメモリブロックであるデータ更新元メモリブロックの更新用データを、データ退避用メモリブロックへ退避した後、データ更新元メモリブロックの消去回数が最小でないとき、かつ、消去回数が最小となるメモリブロックが複数あるときには、データ記憶部の記憶量がより少ないメモリブロックを新データ退避用メモリブロックに決定することを特徴とする。
A method for storing data in a non-volatile memory for solving the above-described problem is a method for storing data in a non-volatile memory in a non-volatile semiconductor storage device including the non-volatile memory, and the non-volatile memory has one or more addresses. And a memory control unit that performs batch erasure in units of memory blocks and writing in units of storage areas or bits of a predetermined number of addresses with respect to individual memory blocks of a non-volatile memory. Each of the plurality of memory blocks includes a data storage unit that stores data, and a data management information storage unit that stores data management information including the number of times of erasure of the memory block that has been collectively erased. One of the memory blocks is used to save data stored in other memory blocks. The memory control block is determined in advance, and the memory control unit leaves only the update data to be stored out of the data stored in the data storage unit and erases data other than the update data. In the data update process, after the update data of the data update source memory block that is the memory block to be updated is saved to the data save memory block , the data update source memory block When the number of erasures is not the minimum and there are a plurality of memory blocks with the minimum number of erasures, a memory block having a smaller storage amount in the data storage unit is determined as a new data saving memory block.

上記構成によって、データ退避用メモリブロックが固定化されないため、各メモリブロックの消去回数を概ね平準化でき、不揮発性メモリの使用可能期間を延長することができるとともに、半導体記憶装置の製品寿命を延長することができ、ユーザのコスト負担も低減できる。   With the above configuration, the data evacuation memory block is not fixed, so the number of erasures of each memory block can be approximately leveled, the usable period of the nonvolatile memory can be extended, and the product life of the semiconductor memory device can be extended. It is possible to reduce the cost burden on the user.

また、本発明の不揮発性メモリへのデータ記憶方法におけるメモリ制御部は、データ更新処理において、データ更新元メモリブロックの更新用データを、データ退避用メモリブロックのデータ記憶部へ退避するとともに、該データ更新元メモリブロックの消去回数を、該データ退避用メモリブロックのデータ管理情報記憶部に退避した後、該データ更新元メモリブロックの一括消去を行うとともに、データ退避用メモリブロックに退避した、データ更新元メモリブロックの消去回数を更新したものを、データ更新元メモリブロックのデータ管理情報記憶部に書き込み、その後、それぞれのメモリブロックの消去回数に基づいて、新データ退避用メモリブロックを決定する。   The memory control unit in the data storage method in the nonvolatile memory according to the present invention saves the update data of the data update source memory block to the data storage unit of the data save memory block in the data update process, and The data update source memory block erase count is saved in the data management information storage section of the data saving memory block, and then the data updating source memory block is batch erased and the data saved in the data saving memory block An update of the erase count of the update source memory block is written in the data management information storage section of the data update source memory block, and then a new data saving memory block is determined based on the erase count of each memory block.

上記構成によって、各メモリブロックの消去回数を正確に把握できる。   With the above configuration, the number of erases of each memory block can be accurately grasped.

また、本発明の不揮発性メモリへのデータ記憶方法におけるメモリ制御部は、データ更新処理において、消去回数の最も少ないメモリブロックを、新データ退避用メモリブロックに決定する。   Further, the memory control unit in the method for storing data in the nonvolatile memory according to the present invention determines a memory block having the smallest number of erases as a new data saving memory block in the data update process.

上記構成によって、各メモリブロックの消去回数を概ね平準化できる。   With the above configuration, the number of erases of each memory block can be approximately leveled.

また、本発明の不揮発性メモリへのデータ記憶方法におけるメモリ制御部は、データ更新処理において、データ更新元メモリブロックを新データ退避用メモリブロックに決定する。   The memory control unit in the method for storing data in the nonvolatile memory according to the present invention determines the data update source memory block as a new data saving memory block in the data update process.

上記構成によって、データ退避用メモリブロックから他のメモリブロックへのデータの移動を行わないため、データ退避用メモリブロックを一括消去する必要がなくなり、データ退避用メモリブロックの消去回数がいたずらに増えることを防止できる。   With the above configuration, data is not moved from the data saving memory block to another memory block, so there is no need to erase the data saving memory block at once, and the number of times the data saving memory block is erased increases unnecessarily. Can be prevented.

また、本発明の不揮発性メモリへのデータ記憶方法におけるメモリ制御部は、データ更新処理において、データ退避用メモリブロックを新データ退避用メモリブロックに決定し、そのときには、該データ退避用メモリブロックのデータ記憶部の記憶内容を、データ更新元メモリブロックのデータ記憶部に書き込むとともに、該データ退避用メモリブロックの消去回数を該データ更新元メモリブロックのデータ管理情報記憶部に書き込んだ後、該データ退避用メモリブロックの一括消去を行い、さらに、データ更新元メモリブロックのデータ管理情報記憶部に記憶されている、該データ退避用メモリブロックの消去回数を更新したものを、該データ退避用メモリブロックのデータ管理情報記憶部に書きこむ。   In addition, the memory control unit in the method for storing data in the nonvolatile memory according to the present invention determines the data saving memory block as the new data saving memory block in the data update process, and at that time, the data saving memory block The storage contents of the data storage unit are written in the data storage unit of the data update source memory block, and the number of times of erasure of the data saving memory block is written in the data management information storage unit of the data update source memory block, and then the data The data evacuation memory block is obtained by performing batch erasure of the evacuation memory block and further updating the number of erasures of the data evacuation memory block stored in the data management information storage unit of the data update source memory block. Write to the data management information storage unit.

上記構成によって、データ更新元メモリブロックでもデータ退避用メモリブロックでもないメモリブロックの消去回数を増やすことなく、データ更新処理を行うことができる。   With the above configuration, the data update process can be performed without increasing the number of times of erasing the memory block that is neither the data update source memory block nor the data saving memory block.

また、本発明の不揮発性メモリへのデータ記憶方法におけるメモリ制御部は、データ更新処理において、データ更新元メモリブロックおよびデータ退避用メモリブロックのいずれでもないメモリブロックを新データ退避用メモリブロックに決定し、そのときには、新データ退避用メモリブロックのデータ記憶部の記憶内容を、データ更新元メモリブロックのデータ記憶部に書きこむとともに、新データ退避用メモリブロックの消去回数を該データ更新元メモリブロックのデータ管理情報記憶部に書き込んだ後、該新データ退避用メモリブロックの一括消去を行い、さらに、データ更新元メモリブロックのデータ管理情報記憶部に記憶されている、新データ退避用メモリブロックの消去回数を更新したものを、該新データ退避用メモリブロックのデータ管理情報記憶部に書きこむ。   The memory control unit in the method for storing data in the nonvolatile memory according to the present invention determines a memory block that is neither the data update source memory block nor the data save memory block as a new data save memory block in the data update process. At that time, the storage contents of the data storage unit of the new data saving memory block are written into the data storage unit of the data updating source memory block, and the number of erasures of the new data saving memory block is set to the data updating source memory block. The new data saving memory block is erased at a time, and the new data saving memory block stored in the data management information storing part of the data update source memory block is further erased. The new data save memory block is updated with the erase count. Write to the data management information storage unit.

上記構成によって、データ更新元メモリブロックでもデータ退避用メモリブロックでもないメモリブロックも、新データ退避用メモリブロックとして用いることができ、各メモリブロックの消去回数の平準化につながる。   With the above configuration, a memory block that is neither a data update source memory block nor a data saving memory block can be used as a new data saving memory block, which leads to equalization of the number of erasures of each memory block.

また、本発明の不揮発性メモリへのデータ記憶方法におけるデータ管理情報記憶部は、メモリブロックのデータ記憶部の記憶内容を識別するためのデータフラグを記憶し、メモリ制御部は、データ更新処理において、更新用データをデータ退避用メモリブロックへ退避するとともに、データ更新元メモリブロックに記憶されているデータフラグもデータ退避用メモリブロックのデータ管理情報記憶部に退避し、データ退避用メモリブロックへ退避した更新用データを他のメモリブロックのデータ記憶部に書き込む際には、該データ退避用メモリブロックへ退避したデータフラグも、該他のメモリブロックのデータ管理情報記憶部に書き込む。   The data management information storage unit in the method for storing data in the nonvolatile memory of the present invention stores a data flag for identifying the storage contents of the data storage unit of the memory block, and the memory control unit performs data update processing. The update data is saved to the data save memory block, and the data flag stored in the data update source memory block is also saved to the data management information storage unit of the data save memory block and saved to the data save memory block. When writing the updated data to the data storage unit of another memory block, the data flag saved to the data saving memory block is also written to the data management information storage unit of the other memory block.

上記構成によって、データ記憶部の記憶内容が別のメモリブロックへ移動しても、外部装置からは、所望のデータを参照することができる。   With the above configuration, even if the storage content of the data storage unit moves to another memory block, it is possible to refer to desired data from the external device.

不揮発性半導体記憶装置のシステム構成例を示す図。1 is a diagram illustrating a system configuration example of a nonvolatile semiconductor memory device. 従来技術によるメモリブロックの構成例を示す図。The figure which shows the structural example of the memory block by a prior art. 本発明のメモリブロックの構成例を示す図。The figure which shows the structural example of the memory block of this invention. データ更新処理を説明するフロー図。The flowchart explaining a data update process. 図4における各ブロックの状態遷移を示す図。The figure which shows the state transition of each block in FIG. 図5に続く各ブロックの状態遷移を説明する図。The figure explaining the state transition of each block following FIG. 図5に続く各ブロックの状態遷移を説明する図。The figure explaining the state transition of each block following FIG. 図4における新データ退避用ブロックの決定方法の別例を説明する図。FIG. 5 is a diagram for explaining another example of a method for determining a new data saving block in FIG. 4. 本発明のデータ更新処理における各ブロックの状態遷移を示す図。The figure which shows the state transition of each block in the data update process of this invention. 従来技術によるデータ記憶方法を説明する図。The figure explaining the data storage method by a prior art. 従来技術のデータ更新処理における各ブロックの状態遷移を示す図。The figure which shows the state transition of each block in the data update process of a prior art.

以下、本発明の不揮発性メモリへのデータ記憶方法について、図面を用いて説明する。不揮発性メモリへのデータ記憶方法が用いられる不揮発性半導体記憶装置は、図1のECU1と同様であるため、ここでは、従来構成との相違点のみを説明するにとどめる。また、CPU2が、本発明のメモリ制御部に相当する。   Hereinafter, a method for storing data in a nonvolatile memory according to the present invention will be described with reference to the drawings. Since the nonvolatile semiconductor memory device using the data storage method in the nonvolatile memory is the same as that of the ECU 1 in FIG. 1, only the differences from the conventional configuration will be described here. The CPU 2 corresponds to the memory control unit of the present invention.

従来構成とは異なり、フラッシュメモリ5のブロックA〜Dは、それぞれがデータ記憶用ブロックおよびデータ退避用ブロックを兼ねている。また、メモリブロックは、1以上のアドレスを有している。また、CPU2は、個々のメモリブロックに対し、メモリブロック単位での一括消去、予め定められたアドレス数の記憶領域単位またはビット単位での書き込みを行う。   Unlike the conventional configuration, each of the blocks A to D of the flash memory 5 also serves as a data storage block and a data saving block. The memory block has one or more addresses. Further, the CPU 2 performs batch erasure in units of memory blocks and writing in units of storage areas or bits in a predetermined number of addresses with respect to individual memory blocks.

図3に、ブロックAを例示して、本発明におけるフラッシュメモリ5のメモリブロック(すなわち、ブロック)の構成について説明する。ブロックAは、記憶領域の全てを上述のデータ記憶部100として使用するのではなく、その一部を、データ管理情報を記憶するデータ管理情報記憶部110として使用する。データ管理情報記憶部110は、データ管理情報として、自ブロックの消去回数(本発明の「消去回数」)111、自ブロックにデータを移行させたブロックである移行元ブロックの消去回数112、およびCPU2等が参照し、メモリブロックのデータ記憶部の記憶内容を識別するためのインデックスともいえるデータフラグ113を記憶している。   FIG. 3 illustrates the configuration of a memory block (that is, a block) of the flash memory 5 according to the present invention by exemplifying the block A. The block A does not use the entire storage area as the data storage unit 100 described above, but uses a part thereof as the data management information storage unit 110 that stores data management information. The data management information storage unit 110 includes, as data management information, the number of times of erasing the own block (“erase number” of the present invention) 111, the number of times of erasure 112 of the migration source block that is the block whose data has been transferred to the own block, and the CPU 2. The data flag 113 which can be referred to as an index for identifying the storage contents of the data storage unit of the memory block is stored.

図4〜図7を用いて、本発明におけるデータ更新処理について説明する。なお、本処理は、ROM3に記憶されたプログラムに含まれ、CPU2が実行する。また、図4では処理の流れを示し、図5〜図7では、図4の各ステップに対応した、各ブロックの状態を示している。   A data update process according to the present invention will be described with reference to FIGS. This process is included in the program stored in the ROM 3 and is executed by the CPU 2. 4 shows the flow of processing, and FIGS. 5 to 7 show the state of each block corresponding to each step of FIG.

また、図4あるいは図5の初期状態(ステップS10)では、ブロックA〜Cが記憶用ブロックとなっており、ブロックDが退避用ブロック(本発明のデータ退避用メモリブロック)となっている。また、各ブロックの自ブロックの消去回数(111、211、311、411)は、それぞれα、β、γ、δとなっている。また、各ブロックの移行元ブロックの消去回数(112、212、312、412)は、全て「データなし(すなわち、データが消去された状態)」となっている。また、各ブロックのデータフラグ(113、213、313、413)は、それぞれA、B、C、Dとなっており、各ブロックの実アドレスとデータ内容とが一致している。   In the initial state of FIG. 4 or FIG. 5 (step S10), the blocks A to C are storage blocks, and the block D is a save block (data save memory block of the present invention). In addition, the number of erasures (111, 211, 311 and 411) of the own block of each block is α, β, γ and δ, respectively. In addition, the number of erasures (112, 212, 312, 412) of the migration source block of each block is all “no data (ie, data is erased)”. The data flags (113, 213, 313, and 413) of each block are A, B, C, and D, respectively, and the actual address and data content of each block match.

まず、例えば、ブロックAのデータ記憶部100のデータ記憶量が一杯になったとき、ブロックAを移行元ブロックとする(S10)。次に、ブロックAのデータ管理情報記憶部110の記憶内容である、最新データ(本発明の更新用データ)(A)と自ブロックの消去回数(α)とデータフラグ(A)を、データ退避用ブロック(図5の例では、ブロックD)の対応する記憶部(400あるいは410)にコピーする(S11)。なお、ブロックAの自ブロックの消去回数(α)は、ブロックDの移行元ブロックの消去回数412に記憶される。次に、ブロックAのデータを一括消去する(S12)。このとき、データ記憶部100およびデータ管理情報記憶部110の記憶内容は全て消去される。   First, for example, when the data storage amount of the data storage unit 100 of the block A becomes full, the block A is set as the migration source block (S10). Next, the latest data (update data of the present invention) (A), the number of times the block has been erased (α), and the data flag (A), which are stored contents of the data management information storage unit 110 of the block A, are saved. The data is copied to the corresponding storage unit (400 or 410) of the block for use (block D in the example of FIG. 5) (S11). The erase count (α) of the block A's own block is stored in the erase count 412 of the transfer source block of the block D. Next, the block A data is erased at once (S12). At this time, all stored contents of the data storage unit 100 and the data management information storage unit 110 are erased.

次に、ブロックDにコピーされた、移行元ブロック(すなわち、ブロックA)の消去回数(412)に1を加えたもの(α+1)を、ブロックAのデータ管理情報記憶部110の自ブロックの消去回数(111)にコピーする(S13)。   Next, erasure of the own block in the data management information storage unit 110 of block A is made by adding 1 to the erase count (412) of the migration source block (that is, block A) copied to block D (α + 1). Copy the number of times (111) (S13).

この時点で、ブロックAの最新データおよびデータ管理部の情報は、ブロックDに移行し、CPU2が最新データ(A)を参照しようとするとき、まず、各ブロックのデータフラグを参照し、データフラグが「A」であるブロックDから最新データ(A)を読み出すことができる。   At this time, the latest data of the block A and the information of the data management unit are transferred to the block D. When the CPU 2 tries to refer to the latest data (A), first, the data flag of each block is referred to. The latest data (A) can be read from the block D in which is “A”.

次に、ブロックA〜Dのうちから、次回の退避用ブロックである新データ退避用ブロック(「新退避用ブロック」と略称することもある)を決定する(S14)。例えば、各ブロックのうち、自ブロックの消去回数(111、211、311、411)が最小のものを新退避用ブロックとする。   Next, a new data saving block (sometimes abbreviated as “new saving block”) which is the next saving block is determined from the blocks A to D (S14). For example, among the blocks, the block with the smallest erase count (111, 211, 311 and 411) is set as a new save block.

ここで、移行元ブロックであるブロックAの消去回数が最も小さいとき、S15:Yes)、ブロックAを新退避用ブロックに決定する(S16)。そして、各ブロックが現在の状態を保ったまま本処理を終了する。このとき、各ブロックの状態は、図5のステップS13のようになっている。   Here, when the number of times of erasure of the block A which is the migration source block is the smallest (S15: Yes), the block A is determined as a new saving block (S16). Then, this process ends with each block maintaining the current state. At this time, the state of each block is as shown in step S13 of FIG.

一方、移行元ブロックであるブロックAの消去回数が最も小さくないとき、つまり、移行元ブロック以外のブロックを新退避用ブロックに決定したとき(S15:No)、そのブロックが、新退避用ブロックに決定する前は記憶用ブロックであるか否かを判定する。以降、各ブロックの状態については、図6を用いて説明する。図6の例では、ブロックBあるいはブロックCを、新退避用ブロックに決定したときに相当するが、ここでは、ブロックBを新退避用ブロックに決定したとする。   On the other hand, when the number of erasures of the block A that is the migration source block is not the smallest, that is, when a block other than the migration source block is determined as a new save block (S15: No), the block becomes a new save block. Before determining, it is determined whether or not it is a storage block. Hereinafter, the state of each block will be described with reference to FIG. In the example of FIG. 6, this corresponds to the case where the block B or the block C is determined as a new saving block, but here it is assumed that the block B is determined as a new saving block.

新退避用ブロックに決定したブロックBは、決定前は記憶用ブロックであるため(S17:Yes)、ブロックBの最新データ(B)と自ブロックの消去回数(β)とデータフラグ(B)を、以前の移行元ブロックであるブロックAにコピーする(S18)。なお、ブロックBの自ブロックの消去回数(β)は、ブロックAの移行元ブロックの消去回数112に記憶される。ここで、CPU2が最新データ(B)を参照しようとするとき、データフラグが「B」であるブロックAから最新データ(B)を読み出す。   Since the block B determined as the new saving block is a storage block before the determination (S17: Yes), the latest data (B) of the block B, the erase count (β) of the own block, and the data flag (B) are stored. The data is copied to block A, which is the previous migration source block (S18). The erase count (β) of the block B's own block is stored in the erase count 112 of the migration source block of the block A. Here, when the CPU 2 tries to refer to the latest data (B), the latest data (B) is read from the block A whose data flag is “B”.

次に、新退避用ブロックであるブロックBのデータを一括消去する(S19)。このとき、データ記憶部200およびデータ管理部210の記憶内容は全て消去される。   Next, the data in block B, which is a new saving block, is erased all at once (S19). At this time, all stored contents of the data storage unit 200 and the data management unit 210 are erased.

次に、ブロックAの移行元ブロック(すなわち、ブロックB)の消去回数112の内容(β)に1を加えたものを、ブロックBの自ブロックの消去回数211にコピーする(S20)。そして、本処理を終了する。   Next, the value obtained by adding 1 to the content (β) of the erase count 112 of the migration source block (ie, block B) of block A is copied to the erase count 211 of the block B's own block (S20). Then, this process ends.

以降、各ブロックの状態については、図7を用いて説明する。新退避用ブロックが、決定前は記憶用ブロックでないとき、つまり、図7のように、新退避用ブロックが旧退避用ブロックであるブロックDに決定したとき(S17:No)、ブロックDに記憶されている最新データ(A)と自ブロックの消去回数(δ)とデータフラグ(A)を、以前の移行元ブロックであるブロックAにコピーする(S21)。なお、ブロックDの自ブロックの消去回数(δ)は、ブロックAの移行元ブロックの消去回数112に記憶される。つまり、ブロックの名称と記憶内容が一致したことになる。   Hereinafter, the state of each block will be described with reference to FIG. When the new save block is not a storage block before the determination, that is, when the new save block is determined to be the old save block D as shown in FIG. 7 (S17: No), the block is stored in the block D. The latest data (A), the number of erasures of the current block (δ), and the data flag (A) are copied to the block A which is the previous transfer source block (S21). The erase count (δ) of the block D's own block is stored in the erase count 112 of the transfer source block of the block A. That is, the name of the block matches the stored content.

次に、ブロックDのデータを一括消去する(S22)。このとき、データ記憶部400およびデータ管理部410の記憶内容は全て消去される。   Next, the data of block D is erased at once (S22). At this time, all stored contents of the data storage unit 400 and the data management unit 410 are erased.

次に、ブロックAの移行元ブロックの消去回数112の内容(δ)に1を加えたものを、ブロックDの自ブロックの消去回数411にコピーする(S23)。そして、本処理を終了する。   Next, the value obtained by adding 1 to the content (δ) of the erase count 112 of the migration source block of block A is copied to the erase count 411 of the own block of block D (S23). Then, this process ends.

図8に、図4のステップS14の別例を示す。各メモリブロックの自ブロックの消去回数(111、211、311、411)を比較した結果、移行元ブロック(すなわち、一括消去を行ったブロック)の自ブロックの消去回数が最小のとき(S141:Yes)、移行元ブロックを新退避用ブロックに決定する(S148)。   FIG. 8 shows another example of step S14 in FIG. When the number of times of erasure of the own block of each memory block (111, 211, 311, 411) is compared, the number of times of erasure of the own block of the migration source block (that is, the block subjected to batch erasure) is minimum (S141: Yes) ), The migration source block is determined as a new saving block (S148).

一方、移行元ブロックの自ブロックの消去回数が最小でないとき(S141:No)、他のブロックのうちで、自ブロックの消去回数が最小となるブロックが複数あるかを調べる。その結果、自ブロックの消去回数が最小となるブロックが複数ないとき(S142:No)、自ブロックの消去回数が最小となるブロックを、新退避用ブロックの候補である候補ブロックに決定する(S147)。   On the other hand, when the erase count of the own block of the migration source block is not the minimum (S141: No), it is checked whether there are a plurality of blocks having the minimum erase count of the own block among other blocks. As a result, when there are not a plurality of blocks with the smallest number of erases of the own block (S142: No), the block with the smallest number of erases of the own block is determined as a candidate block that is a candidate for a new saving block (S147). ).

一方、自ブロックの消去回数が最小となるブロックが複数あるとき(S142:Yes)、例えば以下に例示する、予め定められた優先順位に基づいて、優先順位の高いものを候補ブロックに決定する(S143)。
・最新データ量が少ないブロックほど優先順位を高くする。データ移動量が少ないため、処理時間を短縮できる。本構成は、移行元メモリブロックの消去回数が最小でないとき、かつ、該消去回数が最小となるメモリブロックが複数あるときには、データ記憶部の記憶量がより少ないメモリブロックを新データ退避用メモリブロックに決定するものである。
On the other hand, when there are a plurality of blocks in which the number of times of erasure of the own block is the minimum (S142: Yes), for example, a block having a higher priority is determined as a candidate block based on a predetermined priority as exemplified below ( S143).
-The priority is set higher for blocks with less recent data. Since the amount of data movement is small, the processing time can be shortened. In this configuration, when the number of times of erasure of the migration source memory block is not minimum and there are a plurality of memory blocks with the minimum number of times of erasure, a memory block having a smaller storage amount in the data storage unit is assigned as a new data saving memory block. It will be decided.

・フラッシュメモリ5内で、移行元ブロックにより近く配置されているブロックほど優先順位を高くする。データ移動距離が短いため、処理時間を短縮できる。
・ブロック名とデータフラグ(113、213、313、413)の内容とが一致させることができるブロックほど優先順位を高くする。すなわち、そのブロックに書き込まれるデータフラグがブロック名と同じにすることができる。あるいは、そのブロックからデータを移動するとき、移動先のブロック名と移動するデータのデータフラグを同じにすることができる。
In the flash memory 5, the priority is set higher for blocks located closer to the migration source block. Since the data movement distance is short, the processing time can be shortened.
A higher priority is assigned to a block whose block name and data flag (113, 213, 313, 413) can be matched. That is, the data flag written to the block can be the same as the block name. Alternatively, when data is moved from the block, the name of the block to be moved and the data flag of the data to be moved can be made the same.

次に、決定した候補ブロックの自ブロックの消去回数と、移行元ブロックの自ブロックの消去回数との差を計算し(S144)、その差が規定値(例えば、2のような固定値、または、例えば、1パーセントのような、メモリブロックの書き込み可能回数の所定割合に相当する値)を下回るか否かを調べる。   Next, the difference between the determined number of erasures of the own block of the candidate block and the number of erasures of the own block of the migration source block is calculated (S144), and the difference is a prescribed value (for example, a fixed value such as 2 or For example, it is checked whether or not the value is smaller than a predetermined ratio of the number of writable times of the memory block, such as 1%.

そして、規定値を下回るとき(S145:Yes)、移行元ブロックを新退避用ブロックに決定する(S148)。一方、規定値を上回るとき(S145:No)、候補ブロックを新退避用ブロックに決定する(S146)。   When the value is below the specified value (S145: Yes), the migration source block is determined as a new saving block (S148). On the other hand, when the value exceeds the specified value (S145: No), the candidate block is determined as a new saving block (S146).

上記の構成は、現在の移行元メモリブロックの消去回数が最小でないとき、該消去回数が最小となるメモリブロックとの消去回数との差が、予め定められた値を下回るときには、移行元メモリブロックを新データ退避用メモリブロックに決定し、予め定められた値を上回るときには、該消去回数が最小となるメモリブロックを新データ退避用メモリブロックに決定するものである。例えば、両者の消去回数の差が数回程度であれば、以降のデータ更新処理によって、その差が縮まってくるので、敢えてここで消去回数を増やす必要はなく、データ更新処理の処理時間短縮と、ブロックの消去回数の節約につながる効果が期待できる。   In the above configuration, when the current number of times of erasure of the migration source memory block is not the minimum, when the difference between the number of erasures and the memory block with the smallest number of erasures is less than a predetermined value, the migration source memory block Is determined as a new data saving memory block, and when the value exceeds a predetermined value, the memory block having the smallest erase count is determined as the new data saving memory block. For example, if the difference in the number of times of erasure is about several times, the difference is reduced by the subsequent data update process, so there is no need to increase the number of times of erasure here, and the processing time of the data update process can be shortened. The effect that leads to the saving of the number of block erases can be expected.

図9に、図4の処理を所定回数(例えば500回)実行したときの、各ブロックの状態遷移を示す。1回目の状態では、全てのブロックの消去回数は0回である。この状態で、ブロックBのデータ記憶量が一杯になったとき、このときの退避用ブロックであるブロックDに、ブロックBの最新データ(データフラグを含む)をコピーする。そして、ブロックBのデータを一括消去する。消去回数は、ブロックB以外は0回であるが、ブロックBの消去回数が1であり、ブロックDの消去回数が最小、あるいはブロックBとブロックDとの消去回数の差が規定値を下回るので、ブロックDにブロックBのデータをコピーしたままとし、ブロックBを新退避用ブロックとする(2回目の状態)。   FIG. 9 shows the state transition of each block when the process of FIG. 4 is executed a predetermined number of times (for example, 500 times). In the first state, the erase count of all blocks is zero. In this state, when the data storage amount of the block B becomes full, the latest data (including the data flag) of the block B is copied to the block D that is the saving block at this time. Then, the data in block B is erased at once. The number of erases is 0 except for block B, but the number of erases of block B is 1, and the number of erases of block D is minimum, or the difference in the number of erases between block B and block D is less than the specified value. The data of block B is still copied to block D, and block B is set as a new saving block (second state).

2回目の状態で、ブロックDのデータ記憶量が一杯になったとき、退避用ブロックであるブロックBにブロックDの最新データ(データフラグを含む)を移行する。そして、ブロックDのデータを一括消去する。このとき、消去回数の最も少ないブロックAを新退避用ブロックとする(3回目の状態)。そして、ブロックAの最新データ(データフラグを含む)をブロックDにコピーし、ブロックAのデータを一括消去する。ブロックAが新退避用ブロックとなった後に、ブロックB〜ブロックDのそれぞれに、新たにデータ(最新データ)が書き込まれ、ブロックCのデータ記憶量が一杯になっている。   In the second state, when the data storage amount of the block D becomes full, the latest data (including the data flag) of the block D is transferred to the block B which is a saving block. Then, the data in block D is erased at once. At this time, the block A with the smallest erase count is set as a new save block (third state). Then, the latest data (including the data flag) of the block A is copied to the block D, and the data of the block A is erased collectively. After block A becomes a new saving block, data (latest data) is newly written in each of block B to block D, and the data storage amount of block C is full.

上記処理を繰り返し、501回目の処理を行う(ブロックAのデータをブロックDに退避して、ブロックAを新退避用ブロックとする)状態では、図11とは異なり、特定のブロックの消去回数が突出して大きくなることを回避できる。   In the state where the above process is repeated and the 501st process is performed (block A data is saved in block D and block A is used as a new save block), the number of erases of a specific block is different from FIG. It can avoid protruding and becoming large.

フラッシュメモリ以外にも、1以上のアドレスを有するメモリブロックを複数含み、個々のメモリブロックに対し、メモリブロック単位での一括消去、予め定められたアドレス数の記憶領域単位またはビット単位での書き込みを行う記憶媒体に適用可能である。   In addition to the flash memory, it includes a plurality of memory blocks having one or more addresses. For each memory block, batch erasure in units of memory blocks, writing in units of storage areas or bits in a predetermined number of addresses Applicable to storage media to be performed.

以上、本発明の実施の形態を説明したが、これらはあくまで例示にすぎず、本発明はこれらに限定されるものではなく、特許請求の範囲の趣旨を逸脱しない限りにおいて、当業者の知識に基づく種々の変更が可能である。   Although the embodiments of the present invention have been described above, these are merely examples, and the present invention is not limited to these embodiments, and the knowledge of those skilled in the art can be used without departing from the spirit of the claims. Various modifications based on this are possible.

1 ECU(不揮発性半導体記憶装置)
2 CPU(メモリ制御部)
5 フラッシュメモリ
A〜D メモリブロック(ブロック、データ記憶用ブロック、データ退避用ブロック)
100 データ記憶部
110 データ管理情報記憶部
111 自ブロックの消去回数
112 移行元ブロックの消去回数
113 データフラグ
1 ECU (nonvolatile semiconductor memory device)
2 CPU (memory control unit)
5 Flash memory A to D Memory block (block, data storage block, data saving block)
100 Data storage unit 110 Data management information storage unit 111 Number of erases of own block 112 Number of erases of source block 113 Data flag

Claims (5)

不揮発性メモリを備えた不揮発性半導体記憶装置における不揮発性メモリへのデータ記憶方法であって、
前記不揮発性メモリは、1以上のアドレスを有するメモリブロックを複数含み、
前記不揮発性メモリの個々の前記メモリブロックに対し、メモリブロック単位での一括消去、予め定められたアドレス数の記憶領域単位またはビット単位での書き込みを行うメモリ制御部を備え、
前記複数のメモリブロックは、それぞれ、データを記憶するデータ記憶部と、自身のメモリブロックの一括消去を実行した消去回数を含むデータ管理情報を記憶するデータ管理情報記憶部と、を含んで構成され、
前記複数のメモリブロックうちの一つが、他のメモリブロックに記憶されているデータを退避するためのデータ退避用メモリブロックに予め決定されており、
前記メモリ制御部は、前記データ記憶部に記憶されているデータのうち、記憶しておくべき更新用データのみを残し、前記更新用データ以外のデータを消去するデータ更新処理を実行し、
前記データ更新処理において、データ更新の対象となるメモリブロックであるデータ更新元メモリブロックの前記更新用データを、前記データ退避用メモリブロックへ退避した後
前記データ更新元メモリブロックの消去回数が最小でないとき、かつ、前記消去回数が最小となるメモリブロックが複数あるときには、前記データ記憶部の記憶量がより少ないメモリブロックを新データ退避用メモリブロックに決定することを特徴とする不揮発性メモリへのデータ記憶方法。
A method for storing data in a non-volatile memory in a non-volatile semiconductor memory device comprising a non-volatile memory,
The nonvolatile memory includes a plurality of memory blocks having one or more addresses,
A memory control unit that performs batch erasure in units of memory blocks, writing in units of storage areas of a predetermined number of addresses or bits in units of each of the memory blocks of the nonvolatile memory,
Each of the plurality of memory blocks includes a data storage unit that stores data, and a data management information storage unit that stores data management information including the number of times of erasure of the memory block that has been collectively erased. ,
One of the plurality of memory blocks is predetermined as a data saving memory block for saving data stored in another memory block,
The memory control unit performs only a data update process for erasing data other than the update data, leaving only the update data to be stored among the data stored in the data storage unit,
In the data update process, after the update data of the data update source memory block, which is a memory block that is a target of data update, is saved to the data save memory block ,
When the number of erasures of the data update source memory block is not minimum and there are a plurality of memory blocks with the minimum number of erasures, a memory block having a smaller storage amount in the data storage unit is used as a new data saving memory block. A method of storing data in a non-volatile memory, characterized by determining.
前記メモリ制御部は、前記データ更新処理において、
前記データ更新元メモリブロックの前記更新用データを、前記データ退避用メモリブロックの前記データ記憶部へ退避するとともに、該データ更新元メモリブロックの消去回数を、該データ退避用メモリブロックのデータ管理情報記憶部に退避した後、該データ更新元メモリブロックの一括消去を行うとともに、
前記データ退避用メモリブロックに退避した、前記データ更新元メモリブロックの消去回数を更新したものを、前記データ更新元メモリブロックのデータ管理情報記憶部に書き込み、
その後、前記新データ退避用メモリブロックを決定する請求項1に記載の不揮発性メモリへのデータ記憶方法。
In the data update process, the memory control unit
The update data of the data update source memory block is saved to the data storage unit of the data save memory block, and the number of erasures of the data update source memory block is set to the data management information of the data save memory block. After saving to the storage unit, the data update source memory block is collectively erased,
Writing the updated number of erasures of the data update source memory block saved in the data save memory block into the data management information storage unit of the data update source memory block;
2. The method of storing data in the nonvolatile memory according to claim 1 , wherein the new data saving memory block is determined thereafter .
前記メモリ制御部は、前記データ更新処理において、前記データ退避用メモリブロックを前記新データ退避用メモリブロックに決定したときには、
該データ退避用メモリブロックのデータ記憶部の記憶内容を、前記データ更新元メモリブロックのデータ記憶部に書き込むとともに、該データ退避用メモリブロックの消去回数を該データ更新元メモリブロックのデータ管理情報記憶部に書き込んだ後、該データ退避用メモリブロックの一括消去を行い、
さらに、前記データ更新元メモリブロックのデータ管理情報記憶部に記憶されている、該データ退避用メモリブロックの消去回数を更新したものを、該データ退避用メモリブロックのデータ管理情報記憶部に書きこむ請求項1または請求項2に記載の不揮発性メモリへのデータ記憶方法。
When the memory controller determines the data saving memory block as the new data saving memory block in the data update process,
The storage contents of the data storage unit of the data saving memory block are written to the data storage unit of the data updating source memory block, and the number of erasures of the data saving memory block is stored in the data management information storage of the data updating source memory block After writing to the block, erase the data saving memory block at once,
Furthermore, the updated data erasure count of the data saving memory block stored in the data management information storage unit of the data update source memory block is written to the data management information storage unit of the data saving memory block. A method for storing data in a nonvolatile memory according to claim 1 or 2.
前記メモリ制御部は、前記データ更新処理において、前記データ更新元メモリブロックおよび前記データ退避用メモリブロックのいずれでもないメモリブロックを前記新データ退避用メモリブロックに決定したときには、
前記新データ退避用メモリブロックのデータ記憶部の記憶内容を、前記データ更新元メモリブロックのデータ記憶部に書きこむとともに、前記新データ退避用メモリブロックの消去回数を該データ更新元メモリブロックのデータ管理情報記憶部に書き込んだ後、該新データ退避用メモリブロックの一括消去を行い、
さらに、前記データ更新元メモリブロックのデータ管理情報記憶部に記憶されている、前記新データ退避用メモリブロックの消去回数を更新したものを、該新データ退避用メモリブロックのデータ管理情報記憶部に書きこむ請求項1ないし請求項3のいずれか1項に記載の不揮発性メモリへのデータ記憶方法。
In the data update process, the memory control unit determines a memory block that is neither the data update source memory block nor the data save memory block as the new data save memory block.
The storage contents of the data storage unit of the new data saving memory block are written to the data storage unit of the data updating source memory block, and the number of erasures of the new data saving memory block is set to the data of the data updating source memory block. After writing to the management information storage unit, perform batch erasure of the new data saving memory block,
Further, an updated number of erasures of the new data saving memory block stored in the data management information storage unit of the data update source memory block is updated in the data management information storage unit of the new data saving memory block. The method for storing data in the nonvolatile memory according to any one of claims 1 to 3, wherein writing is performed .
前記データ管理情報記憶部は、前記メモリブロックのデータ記憶部の記憶内容を識別するためのデータフラグを記憶し、
前記メモリ制御部は、前記データ更新処理において、前記更新用データを前記データ退避用メモリブロックへ退避するとともに、前記データ更新元メモリブロックに記憶されているデータフラグも前記データ退避用メモリブロックの前記データ管理情報記憶部に退避し、
前記データ退避用メモリブロックへ退避した更新用データを他のメモリブロックのデータ記憶部に書き込む際には、該データ退避用メモリブロックへ退避したデータフラグも、該他のメモリブロックのデータ管理情報記憶部に書き込む請求項1ないし請求項4のいずれか1項に記載の不揮発性メモリへのデータ記憶方法。
The data management information storage unit stores a data flag for identifying the storage contents of the data storage unit of the memory block,
In the data update process, the memory control unit saves the update data to the data save memory block, and the data flag stored in the data update source memory block also includes the data flag of the data save memory block. Save to the data management information storage unit,
When writing the update data saved in the data saving memory block to the data storage unit of another memory block, the data flag saved in the data saving memory block is also stored in the data management information of the other memory block. The method for storing data in the nonvolatile memory according to claim 1 , wherein the data is written in the unit .
JP2012045283A 2012-03-01 2012-03-01 Method for storing data in non-volatile memory Expired - Fee Related JP5787095B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012045283A JP5787095B2 (en) 2012-03-01 2012-03-01 Method for storing data in non-volatile memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012045283A JP5787095B2 (en) 2012-03-01 2012-03-01 Method for storing data in non-volatile memory

Publications (2)

Publication Number Publication Date
JP2013182378A JP2013182378A (en) 2013-09-12
JP5787095B2 true JP5787095B2 (en) 2015-09-30

Family

ID=49272987

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012045283A Expired - Fee Related JP5787095B2 (en) 2012-03-01 2012-03-01 Method for storing data in non-volatile memory

Country Status (1)

Country Link
JP (1) JP5787095B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116700602B (en) * 2022-12-08 2024-04-12 荣耀终端有限公司 Method and equipment for inquiring and expanding service life of memory

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05151097A (en) * 1991-11-28 1993-06-18 Fujitsu Ltd Data control system for rewriting frequency limited type memory
JPH08273390A (en) * 1995-03-28 1996-10-18 Kokusai Electric Co Ltd Method for managing number of erasing times for flash memory
JP3544859B2 (en) * 1998-05-11 2004-07-21 富士通株式会社 Secondary storage device using nonvolatile semiconductor memory
JP2001312891A (en) * 2000-04-27 2001-11-09 Hitachi Ltd Semiconductor storage device

Also Published As

Publication number Publication date
JP2013182378A (en) 2013-09-12

Similar Documents

Publication Publication Date Title
JP4844639B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
US9996462B1 (en) Data storage device and data maintenance method thereof
US8055859B2 (en) Apparatus and method for providing atomicity with respect to request of write operation for successive sector
JP4925301B2 (en) Semiconductor memory system
JP2011129192A (en) Semiconductor memory device
JP4666081B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP5695112B2 (en) Data storage device, data storage method, and in-vehicle control device
US10248526B2 (en) Data storage device and data maintenance method thereof
US9948809B2 (en) Image forming apparatus, memory management method for image forming apparatus, and program, using discretely arranged blocks in prioritizing information
JP5787095B2 (en) Method for storing data in non-volatile memory
JP4513786B2 (en) Memory controller, memory system, and memory control method
JP4153535B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP2009223435A (en) Data storage method and device, and program
JP4952742B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP2009276883A (en) Semiconductor auxiliary storage device
JP5521437B2 (en) Portable terminal device, software update method and program
JP4818453B1 (en) Electronic device and data reading method
JP4910402B2 (en) Nonvolatile memory rewriting device and rewriting method
JP5520880B2 (en) Flash memory device
JP2013109404A (en) Information processing device
JP2017097404A (en) Microcomputer
JP2009211152A (en) Information processing apparatus, memory system, and control method therefor
WO2015194100A1 (en) Storage device, flash memory control device, and program
JP2018045595A (en) Information management device
JP2018160018A (en) Data processing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20141010

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150415

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150422

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150611

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20150701

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150714

R151 Written notification of patent or utility model registration

Ref document number: 5787095

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees