JP6329185B2 - Memory control circuit, memory control system, memory control method, and memory control program - Google Patents

Memory control circuit, memory control system, memory control method, and memory control program Download PDF

Info

Publication number
JP6329185B2
JP6329185B2 JP2016011203A JP2016011203A JP6329185B2 JP 6329185 B2 JP6329185 B2 JP 6329185B2 JP 2016011203 A JP2016011203 A JP 2016011203A JP 2016011203 A JP2016011203 A JP 2016011203A JP 6329185 B2 JP6329185 B2 JP 6329185B2
Authority
JP
Japan
Prior art keywords
writing
data
memory control
storage block
time
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.)
Active
Application number
JP2016011203A
Other languages
Japanese (ja)
Other versions
JP2017134440A (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.)
NEC Platforms Ltd
Original Assignee
NEC Platforms Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Platforms Ltd filed Critical NEC Platforms Ltd
Priority to JP2016011203A priority Critical patent/JP6329185B2/en
Publication of JP2017134440A publication Critical patent/JP2017134440A/en
Application granted granted Critical
Publication of JP6329185B2 publication Critical patent/JP6329185B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本願発明は、書き換え可能な不揮発性メモリに対するデータの書き込みを制御する技術に関する。   The present invention relates to a technique for controlling data writing to a rewritable nonvolatile memory.

組み込みシステムなどでは、NOR(否定論理和)型フラッシュメモリ、あるいは、NAND(否定論理積)型フラッシュメモリのような、書き換え可能な不揮発性メモリが広く使用されている。組み込みシステムは、このようなフラッシュメモリ(書き換え可能な不揮発性メモリ)に格納された制御用プログラム及び設定情報等に基づいて動作する。以降、本願では、このようなフラッシュメモリを、FROM(Flash Read Only Memory)と称する。   In embedded systems and the like, a rewritable nonvolatile memory such as a NOR (Negative OR) type flash memory or a NAND (Negative AND) type flash memory is widely used. The embedded system operates based on a control program, setting information, and the like stored in such a flash memory (rewritable nonvolatile memory). Hereinafter, in the present application, such a flash memory is referred to as FROM (Flash Read Only Memory).

FROMが備える不揮発性能は、データの書き込みや消去を何度も行うことによって次第に劣化することが知られている。図6は、FROMに対する書き換え回数と、FROMによるデータ保持の保障時間と、FROMの温度との関係を概念的に説明する図である。データ保持の保障時間(以降、保障時間と称する)は、データがFROMに格納されたのち、当該データが揮発により失われないことを保障可能な経過時間である。   It is known that the nonvolatile performance of the FROM gradually deteriorates as data is written and erased many times. FIG. 6 is a diagram conceptually illustrating the relationship between the number of rewrites to the FROM, the guaranteed data retention time by the FROM, and the FROM temperature. The data retention guarantee time (hereinafter referred to as guarantee time) is an elapsed time that can guarantee that the data is not lost due to volatilization after the data is stored in the FROM.

図6に示す通り、FROMの温度が例えば55℃(℃は摂氏温度を表す記号)の場合において、保障時間は、FROMに対する書き換え回数によって異なる。すなわち、データの書き換えがN回(NはFROMの特性により定まるいずれかの自然数)行われたFROMの保障時間が10T時間(TはFROMの特性により定まるいずれかの数)であるのに対し、データの書き換えが10N回行われたFROMの保障時間は、1T時間に低下する。また、図6に示す通り、保障時間は、FROMの温度が高いほど低下する。したがって、FROMを使用するシステムでは、重要なデータが失われることが無いように、FROMが備える不揮発性能が次第に劣化することを考慮したデータの書き込み制御を行う技術が必要となる。   As shown in FIG. 6, when the FROM temperature is, for example, 55 ° C. (° C. represents a Celsius temperature), the guaranteed time varies depending on the number of rewrites to the FROM. That is, while the rewriting of data is performed N times (N is any natural number determined by the characteristics of FROM), the guaranteed time of FROM is 10T hours (T is any number determined by the characteristics of FROM), The guaranteed time of FROM in which data is rewritten 10N times decreases to 1T time. Further, as shown in FIG. 6, the guaranteed time decreases as the temperature of the FROM increases. Therefore, in a system using FROM, a technique for performing data writing control considering that the non-volatile performance of the FROM gradually deteriorates is necessary so that important data is not lost.

このような技術の一例として、特許文献1には、バックアップ対象とされる第1の論理記憶領域に対して更新データの書き込み要求を受信した場合、更新前のデータを維持した状態で、第1の物理記憶領域をバックアップ用記憶領域として管理するストレージシステムが開示されている。このストレージシステムは、その際、第1の論理記憶領域に新たに第2の物理記憶領域を割り当てて更新データを書き込む。このストレージシステムは、バックアップ非対象とされる第2の論理記憶領域に対して更新データの書き込み要求を受信した場合、第2の論理記憶領域に割り当てられていた第3の物理記憶領域を無効記憶領域として管理する。このストレージシステムは、その際、第2の論理記憶領域に新たに割り当てられた第4の物理記憶領域に更新データを書き込む。   As an example of such a technique, in Patent Document 1, when an update data write request is received for the first logical storage area to be backed up, the first data is maintained in a state where the data before update is maintained. A storage system for managing the physical storage area as a backup storage area is disclosed. At this time, the storage system newly allocates a second physical storage area to the first logical storage area and writes update data. When this storage system receives an update data write request for the second logical storage area that is not targeted for backup, the storage system stores the third physical storage area allocated to the second logical storage area as invalid. Manage as an area. At this time, the storage system writes update data to the fourth physical storage area newly allocated to the second logical storage area.

また、特許文献2には、データ記録領域を、独立に書き換え可能な複数の記憶ブロックに分け、通常運用時にデータ記録に使用するアクティブブロックと、通常運用時には使用しない予備ブロックとに割り当てた半導体記憶装置が開示されている。この半導体記憶装置は、ブロック毎の、または全ブロックでの書き換え回数を計数し、予め設定された回数毎にアクティブブロックの1つを予備ブロックと交替することで書き換え頻度を平均化する。交替する予備ブロックは、最も過去に予備となった、または、最も書き換え回数の少ないブロックを選定する。   Japanese Patent Laid-Open No. 2004-228561 divides a data recording area into a plurality of independently rewritable storage blocks, and assigns a semiconductor storage allocated to an active block used for data recording during normal operation and a spare block not used during normal operation. An apparatus is disclosed. This semiconductor memory device counts the number of rewrites for each block or for all blocks, and averages the rewrite frequency by replacing one of the active blocks with a spare block for each preset number of times. As a spare block to be replaced, a block that has become the spare in the past or has the smallest number of rewrites is selected.

特表2013-541743号公報Special Table 2013-541743 特開平08-096589号公報Japanese Unexamined Patent Publication No. 08-096589

例えば、FROMに制御用プログラムを格納した組み込みシステムなどでは、FROMが備える不揮発性が劣化することによって、当該制御用プログラムが消失した場合、システムを動作させることができなくなる。したがってこのような問題を回避できるように、FROMにデータを格納することが必要となる。   For example, in an embedded system in which a control program is stored in the FROM, the nonvolatile memory included in the FROM deteriorates, and the system cannot be operated when the control program is lost. Therefore, it is necessary to store data in the FROM so as to avoid such a problem.

図7は、FROMに格納されたデータが消失する場合を考慮して、格納されたデータを更新する一般的な第1の方法例を示す図である。図7に例示するFROM50は、512個の記憶部ブロック50−1乃至50−512を含んでいる。記憶部ブロック50−1乃至50−512は、個々に独立して書き換え可能である。   FIG. 7 is a diagram illustrating a first example of a general method for updating stored data in consideration of a case where data stored in the FROM is lost. The FROM 50 illustrated in FIG. 7 includes 512 storage unit blocks 50-1 to 50-512. The storage unit blocks 50-1 to 50-512 can be independently rewritten.

図7(a)に示すとおり、当初、記憶ブロック50−1及び50−512は出荷時プログラムを格納し、記憶ブロック50−2は当該出荷時プログラムに関する設定データを格納している。記憶ブロック50−3乃至50−511は、空の状態にあることとする。この状態において当該出荷時プログラムが更新された場合、図7(b)に示す通り、更新後プログラムは、空の状態にある記憶ブロック50−3に格納され、記憶ブロック50−1に格納されている出荷時プログラムは削除される。記憶ブロック50−512は、プログラムの更新にかかわらず、出荷時プログラムを継続して格納する。図7(b)に示す状態において、プログラムがさらに更新された場合、その更新後プログラムは、空の状態にある記憶ブロック50−4(不図示)に格納され、記憶ブロック50−3に格納されているプログラムは削除される。   As shown in FIG. 7A, initially, the storage blocks 50-1 and 50-512 store a shipping program, and the storage block 50-2 stores setting data related to the shipping program. The storage blocks 50-3 to 50-511 are assumed to be empty. When the shipping program is updated in this state, as shown in FIG. 7B, the updated program is stored in the storage block 50-3 in an empty state and stored in the storage block 50-1. The existing factory program is deleted. The storage block 50-512 continuously stores the shipping program regardless of the update of the program. In the state shown in FIG. 7B, when the program is further updated, the updated program is stored in an empty storage block 50-4 (not shown) and stored in the storage block 50-3. The program that is being deleted is deleted.

図7に例示する方法では、プログラムが更新されるごとに、その格納先が、ラウンドロビン方式によって、空の状態にある記憶ブロック50−1乃至50−511のいずれかに移動する。記憶ブロック50−512は、プログラムの更新にかかわらず、出荷時プログラムを継続して格納するので、記憶ブロック50−512に対するデータの書き換えは発生しない。この場合、記憶ブロック50−512の不揮発性能はほとんど劣化しないので、記憶ブロック50−512に格納されている出荷時プログラムが消失する可能性は極めて小さい。したがって、プログラムが更新されるたびに不揮発性能が次第に劣化する記憶ブロック50−1乃至50−511のいずれかに格納されている最新のプログラムが消失した場合であっても、記憶ブロック50−512に格納されている出荷時プログラムを使用して、システムを動作させることができる。しかしながら、出荷時プログラムからの更新量が多い場合は、出荷時プログラムではシステムが正常に機能しない可能性があるという問題がある。   In the method illustrated in FIG. 7, each time the program is updated, the storage destination is moved to one of the empty storage blocks 50-1 to 50-511 by the round robin method. Since the storage block 50-512 continuously stores the program at the time of shipment regardless of the update of the program, data rewriting to the storage block 50-512 does not occur. In this case, since the non-volatile performance of the storage block 50-512 is hardly deteriorated, the possibility that the shipping program stored in the storage block 50-512 is lost is very small. Therefore, even if the latest program stored in any of the storage blocks 50-1 to 50-511 whose nonvolatile performance gradually deteriorates every time the program is updated is lost in the storage block 50-512. The stored shipping program can be used to operate the system. However, when there is a large amount of update from the shipping program, there is a problem that the system may not function normally with the shipping program.

図8は、FROMに格納されたデータが消失する場合を考慮して、格納されたデータを更新する一般的な第2の方法例を示す図である。図8に示す第2の方法例も、図7に示すFROM50を使用することとする。   FIG. 8 is a diagram illustrating a second example of a general method for updating stored data in consideration of a case where data stored in the FROM is lost. The second method example shown in FIG. 8 also uses the FROM 50 shown in FIG.

図8(a)に示すとおり、当初、記憶ブロック50−1及び50−2は出荷時プログラムを格納し、記憶ブロック50−3は当該出荷時プログラムに関する設定データを格納している。記憶ブロック50−4乃至50−512は、空の状態にあることとする。この状態において当該出荷時プログラムが更新された場合、図8(b)に示す通り、更新後プログラムは、空の状態にある記憶ブロック50−4に格納され、記憶ブロック50−1に格納されている出荷時プログラムは削除される。この際、記憶ブロック50−2は、出荷時プログラムを継続して格納する。図8(b)に示す状態において、プログラムがさらに更新された場合、その更新後プログラムは、空の状態にある記憶ブロック50−5(不図示)に格納され、記憶ブロック50−2に格納されている出荷時プログラムは削除される。   As shown in FIG. 8A, initially, the storage blocks 50-1 and 50-2 store a shipping program, and the storage block 50-3 stores setting data related to the shipping program. The storage blocks 50-4 to 50-512 are assumed to be empty. When the shipping program is updated in this state, the updated program is stored in the empty storage block 50-4 and stored in the storage block 50-1, as shown in FIG. 8B. The existing factory program is deleted. At this time, the storage block 50-2 continuously stores the shipping program. In the state shown in FIG. 8B, when the program is further updated, the updated program is stored in an empty storage block 50-5 (not shown) and stored in the storage block 50-2. The shipped program is deleted.

図8に示す第2の方法例でも、プログラムが更新されるごとに、その格納先が、ラウンドロビン方式によって、空の状態にある記憶ブロック50−1乃至50−512のいずれかに移動する。この際、FROM50は、記憶ブロック50−1乃至50−512のいずれかに2つに、最新のプログラムと、その1つ前の版のプログラムとを格納している。図8に示す第2の方法例では、図7に示す第1の方法例が有する、出荷時プログラムではシステムが正常に機能しない可能性があるという問題を回避できる。しかしながら、この第2の方法例では、プログラムが更新されるたびに、記憶ブロック50−1乃至50−512の不揮発性能が次第に劣化するので、格納されている最新のプログラムと、その1つ前の版のプログラムとが、両方とも消失する可能性があるという問題がある。   Also in the second method example shown in FIG. 8, each time the program is updated, the storage destination is moved to one of the empty storage blocks 50-1 to 50-512 by the round robin method. At this time, the FROM 50 stores the latest program and the previous version of the program in any of the storage blocks 50-1 to 50-512. In the second method example shown in FIG. 8, it is possible to avoid the problem that the system may not function normally in the shipping program, which the first method example shown in FIG. 7 has. However, in this second method example, each time the program is updated, the non-volatile performance of the storage blocks 50-1 to 50-512 gradually deteriorates. There is a problem that both versions of the program may be lost.

このように、不揮発性能が劣化しないように、出荷後に更新を行わない記憶ブロックを設けた場合は、当該記憶ブロックに格納されたデータの最新性が低下する。本願において、最新性とは、データについて、最新の状態を基準とする新しさの度合いを表す。そして、データの最新性が低下しないようにデータを更新する場合は、記憶ブロックの不揮発性能が低下するという問題がある。実際のシステムでは、データが消失することと、データの最新性が低下することと、を両方とも回避することが求められるので、これを実現することが課題である。特許文献1及び2は、この課題について言及していない。本願発明の主たる目的は、この課題を解決したメモリ制御回路等を提供することである。   As described above, when a storage block that is not updated after shipment is provided so that the nonvolatile performance does not deteriorate, the latestness of the data stored in the storage block is lowered. In the present application, the term “newness” represents the degree of newness of data based on the latest state. And when updating data so that the newness of data does not fall, there exists a problem that the non-volatile performance of a storage block falls. In an actual system, it is required to avoid both the loss of data and the decrease in data freshness, and it is a problem to realize this. Patent documents 1 and 2 do not mention this subject. The main object of the present invention is to provide a memory control circuit or the like that solves this problem.

本願発明の一態様に係るメモリ制御回路は、現在までのデータの書き込み回数に依存した不揮発性能を個々に有する第一及び第二の記憶ブロックを有する、書き換え可能な不揮発性メモリにおける前記第一の記憶ブロックに対してデータが書き込まれたときに、前記第一の記憶ブロックに対する、それまでの前記書き込み回数を測定する回数測定手段と、前記回数測定手段により測定された前記書き込み回数が、所定の回数条件を満たすか否かを判定する判定手段と、前記判定手段により、前記書き込み回数が前記回数条件を満たすと判定されたときに、前記第一の記憶ブロックに書き込まれた前記データを、前記第二の記憶ブロックに対して書き込む書き込み手段と、を備える。   A memory control circuit according to an aspect of the present invention includes the first and second memory blocks each having a first and a second memory block each having a non-volatile performance depending on the number of times data has been written. When data is written to the storage block, the number of times measuring means for measuring the number of times of writing to the first storage block, and the number of times of writing measured by the number of times measuring means are predetermined. When the determination unit determines whether or not the number of times condition is satisfied, and the determination unit determines that the number of times of writing satisfies the number of times, the data written to the first storage block is And writing means for writing to the second storage block.

上記目的を達成する他の見地において、本願発明の一態様に係るメモリ制御方法は、情報処理装置によって、現在までのデータの書き込み回数に依存した不揮発性能を個々に有する第一及び第二の記憶ブロックを有する、書き換え可能な不揮発性メモリにおける前記第一の記憶ブロックに対してデータが書き込まれたときに、前記第一の記憶ブロックに対する、それまでの前記書き込み回数を測定し、測定された前記書き込み回数が、所定の回数条件を満たすか否かを判定し、前記書き込み回数が前記回数条件を満たすと判定されたときに、前記第一の記憶ブロックに書き込まれた前記データを、前記第二の記憶ブロックに対して書き込む。   In another aspect of achieving the above object, a memory control method according to an aspect of the present invention provides first and second memories each having a non-volatile performance depending on the number of times data has been written by an information processing device. When data is written to the first storage block in the rewritable nonvolatile memory having a block, the number of times of writing to the first storage block is measured, and the measured It is determined whether or not the number of times of writing satisfies a predetermined number of times, and when it is determined that the number of times of writing satisfies the number of times, the data written to the first storage block is Write to the storage block.

また、上記目的を達成する更なる見地において、本願発明の一態様に係るメモリ制御プログラムは、現在までのデータの書き込み回数に依存した不揮発性能を個々に有する第一及び第二の記憶ブロックを有する、書き換え可能な不揮発性メモリにおける前記第一の記憶ブロックに対してデータが書き込まれたときに、前記第一の記憶ブロックに対する、それまでの前記書き込み回数を測定する回数測定処理と、前記回数測定処理により測定された前記書き込み回数が、所定の回数条件を満たすか否かを判定する判定処理と、前記判定処理により、前記書き込み回数が前記回数条件を満たすと判定されたときに、前記第一の記憶ブロックに書き込まれた前記データを、前記第二の記憶ブロックに対して書き込む書き込み処理と、をコンピュータに実行させるためのプログラムである。   Further, in a further aspect to achieve the above object, a memory control program according to an aspect of the present invention has first and second storage blocks that individually have nonvolatile performance depending on the number of data writes up to now. When the data is written to the first storage block in the rewritable nonvolatile memory, the number measurement process for measuring the number of times of writing to the first storage block, and the number measurement A determination process for determining whether or not the number of times of writing measured by the process satisfies a predetermined number of times, and when the determination process determines that the number of times of writing satisfies the number of times, A writing process for writing the data written in the storage block to the second storage block; Is a program for executing.

更に、本願発明は、係るメモリ制御プログラム(コンピュータプログラム)が格納された、コンピュータ読み取り可能な、不揮発性の記録媒体によっても実現可能である。   Furthermore, the present invention can also be realized by a computer-readable non-volatile recording medium storing such a memory control program (computer program).

本願発明は、書き換え可能な不揮発性メモリに記憶されたデータの最新性が低下することを回避しつつ、当該データが消失することを回避することを可能とする。   The present invention makes it possible to avoid the loss of the data while avoiding a decrease in the freshness of the data stored in the rewritable nonvolatile memory.

本願発明の第1の実施形態に係るメモリ制御システム1の構成を示すブロック図である。1 is a block diagram showing a configuration of a memory control system 1 according to a first embodiment of the present invention. 本願発明の第1の実施形態に係るメモリ制御回路10が、CPU2から受信したデータをFROM20に書き込む動作を示すフローチャートである。4 is a flowchart showing an operation in which the memory control circuit 10 according to the first embodiment of the present invention writes data received from the CPU 2 to the FROM 20. 本願発明の第1の実施形態に係るメモリ制御回路10が、通常時アクセス用ブロックに格納されているデータを、非常時アクセス用ブロック22に書き込む動作を示すフローチャートである。4 is a flowchart showing an operation in which the memory control circuit 10 according to the first embodiment of the present invention writes data stored in a normal access block to an emergency access block 22; 本願発明の第2の実施形態に係るメモリ制御回路30の構成を示すブロック図である。It is a block diagram which shows the structure of the memory control circuit 30 which concerns on the 2nd Embodiment of this invention. 本願発明の各実施形態に係るメモリ制御回路を実行可能な情報処理回路の構成を示すブロック図である。It is a block diagram which shows the structure of the information processing circuit which can execute the memory control circuit which concerns on each embodiment of this invention. フラッシュメモリの書き換え回数と、データ保持保障時間と、フラッシュメモリの温度との関係を概念的に説明する図である。It is a figure which illustrates notionally the relationship between the frequency | count of rewriting of flash memory, data retention guarantee time, and the temperature of flash memory. フラッシュメモリに格納されたデータが消失する場合を考慮して、格納されたデータを更新する一般的な第1の方法例を示す図である。It is a figure which shows the example of the general 1st method of updating the stored data in consideration of the case where the data stored in flash memory lose | disappear. フラッシュメモリに格納されたデータが消失する場合を考慮して、格納されたデータを更新する一般的な第2の方法例を示す図である。It is a figure which shows the example of the 2nd general method of updating the stored data in consideration of the case where the data stored in flash memory lose | disappear. 第1の実施形態に係るFROM20について、使用を開始してからの時間とデータ保持保障時間との関係を概念的に説明する図である。It is a figure which illustrates notionally the relationship between the time after starting use about the FROM20 which concerns on 1st Embodiment, and data retention guarantee time.

以下、本願発明の実施の形態について図面を参照して詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

<第1の実施形態>
図1は、本願発明の第1の実施の形態に係るメモリ制御システム1を概念的に示すブロック図である。メモリ制御システム1は、大別して、メモリ制御回路10、及び、FROM20を備える。メモリ制御システム1は、CPU(Central Processing Unit)2と通信可能に接続されている。メモリ制御システム1と通信可能に接続されるCPU2は、複数であってもよい。メモリ制御回路10は、CPU2からFROM20に対する、データの読み出し要求及びデータの書き込み要求について処理する回路である。メモリ制御システム1は、例えば1つの半導体チップの中に構築されてもよい。
<First Embodiment>
FIG. 1 is a block diagram conceptually showing a memory control system 1 according to the first embodiment of the present invention. The memory control system 1 roughly includes a memory control circuit 10 and a FROM 20. The memory control system 1 is communicably connected to a CPU (Central Processing Unit) 2. A plurality of CPUs 2 may be connected to be communicable with the memory control system 1. The memory control circuit 10 is a circuit that processes data read requests and data write requests from the CPU 2 to the FROM 20. The memory control system 1 may be constructed, for example, in one semiconductor chip.

FROM20は、CPU2が使用するデータを記憶するフラッシュメモリである。FROM20は、通常時アクセス用ブロック(第1の記憶ブロック)21、及び、非常時アクセス用ブロック(第2の記憶ブロック)22を備えている。通常時アクセス用ブロック21、及び、非常時アクセス用ブロック22は、互いに独立して、記憶するデータを書き換え可能である。通常時アクセス用ブロック21は、CPU2からの要求に応じて更新されるデータを記憶する記憶ブロックである。非常時アクセス用ブロック22は、通常時アクセス用ブロック21に記憶されたデータが消失した場合に備えて、当該データのバックアップを記憶する記憶ブロックである。   The FROM 20 is a flash memory that stores data used by the CPU 2. The FROM 20 includes a normal access block (first storage block) 21 and an emergency access block (second storage block) 22. The normal access block 21 and the emergency access block 22 can rewrite stored data independently of each other. The normal access block 21 is a storage block for storing data updated in response to a request from the CPU 2. The emergency access block 22 is a storage block that stores a backup of the data in case the data stored in the normal access block 21 is lost.

通常時アクセス用ブロック21は、511個のサブブロック21−1乃至21−511を備えている。サブブロック21−1乃至21−511は、互いに独立して、記憶するデータを書き換え可能である。通常時アクセス用ブロック21が備えるサブブロックの数は511個に限定されず、FROM20の記憶容量等に応じて、異なる値を取り得る。サブブロックの数は1個でもよい。   The normal access block 21 includes 511 sub-blocks 21-1 to 21-511. The sub blocks 21-1 to 21-511 can rewrite stored data independently of each other. The number of sub-blocks included in the normal access block 21 is not limited to 511, and can take different values depending on the storage capacity of the FROM 20 or the like. The number of subblocks may be one.

このように、サブブロック21−1乃至21−511、及び、非常時アクセス用ブロック22は、互いに独立して、記憶するデータを書き換え可能である。したがって、これらの記憶ブロックは、個々に、現在までの自記憶ブロックに対するデータの書き込み回数に依存した不揮発性能を有する。   As described above, the sub-blocks 21-1 to 21-511 and the emergency access block 22 can rewrite stored data independently of each other. Therefore, each of these storage blocks has a non-volatile performance that depends on the number of times data is written to the own storage block up to the present.

本実施形態に係るメモリ制御回路10は、CPU2からの要求に従い、サブブロック21−i(iは1乃至511のいずれかの整数)に格納されているデータを更新する場合、未使用のサブブロック21−j(jはiとは異なる1乃至511のいずれかの整数)に更新後のデータを格納する。メモリ制御回路10は、この際、サブブロック21−iに格納されていた更新前のデータを削除する。メモリ制御回路10は、例えば、データを更新するたびに、当該データの格納先が、ラウンドロビン方式によって、空の状態にあるサブブロック21−1乃至21−511のいずれかに移動するように、格納先であるサブブロックを選択する。尚、メモリ制御回路10は、これとは異なる方法によって、格納先であるサブブロックを選択してもよい。   When the memory control circuit 10 according to the present embodiment updates data stored in the subblock 21-i (i is an integer from 1 to 511) in accordance with a request from the CPU 2, the unused subblock The updated data is stored in 21-j (j is an integer from 1 to 511 different from i). At this time, the memory control circuit 10 deletes the pre-update data stored in the sub-block 21-i. For example, each time the memory control circuit 10 updates data, the storage destination of the data is moved to one of the empty sub blocks 21-1 to 21-511 by the round robin method. Select the sub-block that is the storage destination. Note that the memory control circuit 10 may select a sub-block that is a storage destination by a different method.

本実施形態に係るメモリ制御回路10は、回数測定部11、時間測定部12、温度測定部13、判定部14、及び、書き込み部15を備えている。回数測定部11、判定部14、及び、書き込み部15は、電子回路の場合もあれば、コンピュータプログラムとそのコンピュータプログラムに従って動作するプロセッサによって実現される場合もある。時間測定部12は、時計(計時手段)を内包するデバイスである。温度測定部13は、温度センサーを内包するデバイスである。   The memory control circuit 10 according to the present embodiment includes a number measurement unit 11, a time measurement unit 12, a temperature measurement unit 13, a determination unit 14, and a writing unit 15. The frequency measurement unit 11, the determination unit 14, and the writing unit 15 may be an electronic circuit, or may be realized by a computer program and a processor that operates according to the computer program. The time measuring unit 12 is a device that includes a clock (time measuring means). The temperature measurement unit 13 is a device that includes a temperature sensor.

回数測定部11は、現在までに、通常時アクセス用ブロック21に対してデータが書き込まれた回数(書き込み回数)、すなわち、サブブロック21−1乃至21−511に対しる書き込み回数の合計値を測定する。回数測定部11は、その書き込み回数が、システム管理者等によって定められた所定の回数閾値に達するたびに、測定結果であるカウント値を初期値(例えば0)にリセットする。この回数閾値を、例えば、サブブロック21−1乃至21−511に対して10回ずつ書き込みが行われたときの回数とする場合、その値は5110回となる。回数測定部11は、測定したカウント値を、判定部14へ通知する。   The number measuring unit 11 calculates the number of times data has been written to the normal access block 21 (the number of times of writing), that is, the total number of times of writing to the sub-blocks 21-1 to 21-511. taking measurement. The count measuring unit 11 resets the count value, which is a measurement result, to an initial value (for example, 0) every time the number of writings reaches a predetermined count threshold determined by a system administrator or the like. For example, when the number-of-times threshold is set to the number of times of writing to the sub-blocks 21-1 to 21-511 10 times, the value is 5110 times. The number measurement unit 11 notifies the determination unit 14 of the measured count value.

時間測定部12は、所定のタイミング(例えば定期的)に、通常時アクセス用ブロク21に対する書き込みが最後に行われてからの経過時間を測定する。時間測定部12は、測定した経過時間を、判定部14へ通知する。時間測定部12は、その経過時間が、システム管理者等によって定められた所定の時間閾値に達するたびに、測定結果である経過時間を初期値(例えば0)にリセットする。尚、この時間閾値としては、例えば、FROM20の不揮発性能に依存するデータ保持保障時間であることが望ましいい。   The time measuring unit 12 measures an elapsed time from the last writing to the normal access block 21 at a predetermined timing (for example, periodically). The time measurement unit 12 notifies the determination unit 14 of the measured elapsed time. The time measurement unit 12 resets the elapsed time as a measurement result to an initial value (for example, 0) every time the elapsed time reaches a predetermined time threshold determined by a system administrator or the like. The time threshold is preferably a data retention guarantee time depending on the nonvolatile performance of the FROM 20, for example.

温度測定部13は、FROM20の表面等に設置された温度センサーを介して、FROM20の温度を測定する。温度測定部13は、測定したFROM20の温度を、判定部14へ通知する。   The temperature measurement unit 13 measures the temperature of the FROM 20 via a temperature sensor installed on the surface of the FROM 20 or the like. The temperature measurement unit 13 notifies the determination unit 14 of the measured temperature of the FROM 20.

判定部14は、回数測定部11から通知されたカウント値(書き込み回数)が、所定の回数条件を満たすか否かを判定する。この回数条件は、例えば、カウント値が回数閾値に達したか否か等である。判定部14は、時間計測部12から通知された経過時間が、時間閾値に達したか否かを判定する。判定部14は、これらの判定結果を、書き込み部15へ通知する。   The determination unit 14 determines whether the count value (number of writings) notified from the number measurement unit 11 satisfies a predetermined number of times. This number condition is, for example, whether or not the count value has reached the number threshold. The determination unit 14 determines whether or not the elapsed time notified from the time measurement unit 12 has reached a time threshold value. The determination unit 14 notifies the writing unit 15 of these determination results.

判定部14は、カウント値が回数閾値に達するごとに、回数閾値を徐々に小さくしてもよい。例えば、回数閾値が、当初、サブブロック21−1乃至21−511に対して10回ずつ書き込みが行われたときの回数(即ち5110回)に設定されていることとする。この場合、判定部14は、カウント値が5110回に達したのち、回数閾値を、例えばサブブロック21−1乃至21−511に対して9回ずつ書き込みが行われたときの回数(即ち4599回)に小さくする。判定部14は、その後、カウント値が4599回に達したのち、回数閾値を、例えばサブブロック21−1乃至21−511に対して8回ずつ書き込みが行われたときの回数(即ち4088回)に小さくする。判定部14は、同様の処理を繰り返すことによって、回数閾値を徐々に小さくする。判定部14は、同様に、カウント値が回数閾値に達するごとに、時間閾値を徐々に小さくしてもよい。   The determination unit 14 may gradually reduce the number threshold every time the count value reaches the number threshold. For example, it is assumed that the number threshold is initially set to the number of times (ie, 5110 times) when writing is performed 10 times for each of the sub-blocks 21-1 to 21-511. In this case, after the count value reaches 5110 times, the determination unit 14 sets the number threshold, for example, the number of times when writing is performed 9 times for each of the sub-blocks 21-1 to 21-511 (that is, 4599 times). ). Thereafter, after the count value reaches 4599 times, the determination unit 14 writes the threshold value for the number of times, for example, when the sub-blocks 21-1 to 21-511 are written eight times each (that is, 4088 times). Make it smaller. The determination unit 14 gradually decreases the number threshold by repeating the same process. Similarly, the determination unit 14 may gradually decrease the time threshold every time the count value reaches the number-of-times threshold.

判定部14は、温度測定部13から通知されたFROM20の温度に応じて、回数条件の内容を変更してもよい。判定部14は、例えば、FROM20の温度が高いほど、回数閾値を小さくする。判定部14は、また、温度測定部13から通知されたFROM20の温度に応じて、時間閾値を変更してもよい。判定部14は、例えば、FROM20の温度が高いほど、時間閾値を小さくする。   The determination unit 14 may change the content of the frequency condition according to the temperature of the FROM 20 notified from the temperature measurement unit 13. For example, the determination unit 14 decreases the number-of-times threshold as the temperature of the FROM 20 increases. The determination unit 14 may change the time threshold according to the temperature of the FROM 20 notified from the temperature measurement unit 13. For example, the determination unit 14 decreases the time threshold as the temperature of the FROM 20 increases.

書き込み部15は、判定部14により、書き込み回数が回数条件を満たすと判定されたときに、通常時アクセス用ブロック21におけるサブブロック21−jに書き込まれた、CPU2から受信したデータを、非常時アクセス用ブロック22に書き込む。書き込み部15は、また、判定部14により、時間測定部12により測定された経過時間が時間閾値に達したと判定されたときに、サブブロック21−jに書き込まれているデータを、非常時アクセス用ブロック22に書き込む。   When the determination unit 14 determines that the number of times of writing satisfies the number of times, the writing unit 15 outputs the data received from the CPU 2 written in the sub-block 21-j in the normal access block 21 in an emergency state. Write to the access block 22. The writing unit 15 also stores the data written in the sub-block 21-j in an emergency when the determining unit 14 determines that the elapsed time measured by the time measuring unit 12 has reached the time threshold. Write to the access block 22.

次に図2及び図3のフローチャートを参照して、本実施形態に係るメモリ制御回路10の動作(処理)について詳細に説明する。   Next, the operation (processing) of the memory control circuit 10 according to the present embodiment will be described in detail with reference to the flowcharts of FIGS.

図2は、実施形態に係るメモリ制御回路10が、CPU2から受信したデータをFROM20に書き込む動作を示すフローチャートである。   FIG. 2 is a flowchart illustrating an operation in which the memory control circuit 10 according to the embodiment writes data received from the CPU 2 in the FROM 20.

書き込み部15は、CPU2から受信した更新後データをサブブロック21−jに書き込む(ステップS101)。書き込み部15は、サブブロック21−iに記憶されている更新前データを消去する(ステップS102)。回数測定部11は、カウント値を1加算する(ステップS103)。判定部14は、カウント値を回数閾値と比較する(ステップS104)。   The writing unit 15 writes the updated data received from the CPU 2 in the sub-block 21-j (Step S101). The writing unit 15 erases the pre-update data stored in the sub-block 21-i (Step S102). The number measuring unit 11 adds 1 to the count value (step S103). The determination unit 14 compares the count value with the frequency threshold (step S104).

カウント値が回数閾値でない場合(ステップS105でNo)、全体の処理は終了する。カウント値が回数閾値である場合(ステップS105でYes)、回数測定部は、カウント値を0にリセットする(ステップS106)。書き込み部15は、CPU2から受信した更新後データを非常時アクセス用ブロック22に書き込み(ステップS107)、全体の処理は終了する。   If the count value is not the number-of-times threshold (No in step S105), the entire process ends. When the count value is a threshold value for the number of times (Yes in step S105), the number measuring unit resets the count value to 0 (step S106). The writing unit 15 writes the updated data received from the CPU 2 to the emergency access block 22 (step S107), and the entire process ends.

図3は、実施形態に係るメモリ制御回路10が、通常時アクセス用ブロック21に格納されているデータを、非常時アクセス用ブロック22に書き込む動作を示すフローチャートである。   FIG. 3 is a flowchart illustrating an operation in which the memory control circuit 10 according to the embodiment writes the data stored in the normal access block 21 to the emergency access block 22.

時間測定部12は、所定のタイミングに、非常時アクセス用ブロック22に対する書き込みが最後に行われてからの経過時間を測定する(ステップS201)。判定部14は、経過時間を時間閾値と比較する(ステップS202)。   The time measurement unit 12 measures the elapsed time since the last writing to the emergency access block 22 at a predetermined timing (step S201). The determination unit 14 compares the elapsed time with a time threshold value (step S202).

経過時間が時間閾値以上でない場合(ステップS203でNo)、全体の処理は、ステップS201へ戻る。経過時間が時間閾値以上である場合(ステップS203でYes)、時間測定部12は、経過時間の測定値を0にリセットする。書き込み部15は、通常時アクセス用ブロック21に格納されているデータを、非常時アクセス用ブロック22に書き込み(ステップS205)、全体の処理は、ステップS201へ戻る。   If the elapsed time is not equal to or greater than the time threshold (No in step S203), the entire process returns to step S201. When the elapsed time is equal to or greater than the time threshold (Yes in step S203), the time measurement unit 12 resets the measured value of elapsed time to 0. The writing unit 15 writes the data stored in the normal access block 21 to the emergency access block 22 (step S205), and the entire process returns to step S201.

本実施形態に係るメモリ制御回路10は、書き換え可能な不揮発性メモリに記憶されたデータの最新性が低下することを回避しつつ、当該データが消失することを回避することができる。その理由は、回数測定部11は、FROM20における通常時アクセス用ブロック21に対してデータが書き込まれる際に、これまでの書き込み回数を測定し、書き込み部15は、その書き込み回数が回数閾値に達した場合に、当該データを、FROM20における非常時アクセス用ブロック22に書き込むからである。   The memory control circuit 10 according to the present embodiment can avoid the loss of the data while avoiding a decrease in the freshness of the data stored in the rewritable nonvolatile memory. The reason is that the number-of-times measuring unit 11 measures the number of times of writing when data is written to the normal access block 21 in the FROM 20, and the writing unit 15 reaches the number of times threshold. In this case, the data is written in the emergency access block 22 in the FROM 20.

以下に、本実施形態に係るメモリ制御回路10によって実現される効果について、詳細に説明する。   Hereinafter, effects realized by the memory control circuit 10 according to the present embodiment will be described in detail.

フラッシュメモリにデータを格納するシステムにおいて、データが消失しないようにするために、出荷後にデータの更新を行わない記憶ブロックを設けることによって、当該記憶ブロックの不揮発性能が劣化することを回避する場合は、当該記憶ブロックに格納されたデータの最新性が低下するという問題がある。一方、係るシステムにおいて、データの最新性が低下しないようにデータを更新する場合は、記憶ブロックの不揮発性能が低下するという問題がある。実際のシステムでは、データが消失することと、データの最新性が低下することと、を両方とも回避することが求められるので、これを実現することが課題である。   In a system that stores data in flash memory, in order to prevent data from being lost, by providing a storage block that does not update data after shipment, to avoid deterioration of the nonvolatile performance of the storage block There is a problem that the latestness of the data stored in the storage block is lowered. On the other hand, in such a system, when the data is updated so that the data freshness does not deteriorate, there is a problem that the nonvolatile performance of the storage block is deteriorated. In an actual system, it is required to avoid both the loss of data and the decrease in data freshness, and it is a problem to realize this.

これに対して、本実施形態に係るメモリ制御回路10では、回数測定部11は、通常時アクセス用ブロック21に対してデータが書き込まれたときに、通常時アクセス用ブロック21に対する、それまでの前記書き込み回数を測定する。判定部14は、回数測定部11により測定された書き込み回数が、所定の回数条件を満たす(回数閾値に達した)か否かを判定する。書き込み部15は、判定部14により、書き込み回数が回数条件を満たすと判定されたときに、通常時アクセス用ブロック21に書き込まれたデータを、非常時アクセス用ブロック22に対して書き込む。これにより、本実施形態に係るメモリ制御回路30は、フラッシュメモリに記憶されたデータの最新性が低下することを回避しつつ、当該データが消失することを回避することができる。   On the other hand, in the memory control circuit 10 according to the present embodiment, when the data is written in the normal access block 21, the number measurement unit 11 does not apply to the normal access block 21 until then. The number of times of writing is measured. The determination unit 14 determines whether the number of writings measured by the number measurement unit 11 satisfies a predetermined number of times (has reached the number threshold). The writing unit 15 writes the data written in the normal access block 21 to the emergency access block 22 when the determination unit 14 determines that the write count satisfies the number of times. Thereby, the memory control circuit 30 according to the present embodiment can avoid the loss of the data while avoiding a decrease in the freshness of the data stored in the flash memory.

図9は、本実施形態に係るFROM20について、使用を開始してからの時間とデータ保持保障時間との関係を概念的に説明する図である。図9は、FROM20における通常時アクセス用ブロック21の各サブブロックに対して、T時間の周期でまとめて10N回のデータの書き換えが行われた場合における、通常時アクセス用ブロック21の各サブブロック、及び、非常時アクセス用ブロック22について、データ保持保障時間の推移を示している。尚、実際のシステムでは、通常時アクセス用ブロック21の各サブブロックに対して、まとめて10N回のデータの書き換えが行われることはないが、説明を簡略化するために、このような動作が行われることとする。また、FROM20は、図6に示す特性を有し、FROM20の温度は55℃であることとする。   FIG. 9 is a diagram conceptually illustrating the relationship between the time since the start of use of the FROM 20 according to the present embodiment and the data retention guaranteed time. FIG. 9 shows each sub-block of the normal-time access block 21 when data is rewritten 10N times in a cycle of T time for each sub-block of the normal-time access block 21 in the FROM 20. And, the transition of the data retention guarantee time is shown for the emergency access block 22. In an actual system, the data is not rewritten 10N times for each sub-block of the normal access block 21. However, in order to simplify the description, such an operation is performed. To be done. The FROM 20 has the characteristics shown in FIG. 6, and the temperature of the FROM 20 is 55 ° C.

図9に示す太線は、FROM20の使用を開始してからの時間における、通常時アクセス用ブロック21及び非常時アクセス用ブロック22のデータ保持保障時間の長さを表す。図9に示す通り、FROM20の使用を開始してから1T時間後に通常時アクセス用ブロック21の各サブブロックに対して10N回の書き換えが行われる。このときの通常時アクセス用ブロック21のデータ保持保障時間は、図6に示す通り1T時間である。本実施形態では、上述の通り、通常時アクセス用ブロック21の各サブブロックに対して、10回書き換えが行われるたびに、非常時アクセス用ブロック22に対して、1回書き換えが行われる。したがって、FROM20の使用を開始してから1T時間後に、非常時アクセス用ブロック22に対して、1N回の書き換えが行われる。このときの非常時アクセス用ブロック22のデータ保持保障時間は、図6に示す通り10T時間である。   The thick line shown in FIG. 9 represents the length of the data retention guarantee time of the normal access block 21 and the emergency access block 22 in the time after the use of the FROM 20 is started. As shown in FIG. 9, 10N times of rewriting is performed on each sub-block of the normal-time access block 21 1T time after the use of the FROM 20 is started. The data retention guarantee time of the normal access block 21 at this time is 1T time as shown in FIG. In the present embodiment, as described above, each time the rewrite is performed 10 times for each sub-block of the normal access block 21, the emergency access block 22 is rewritten once. Therefore, the emergency access block 22 is rewritten 1N times 1T time after the use of the FROM 20 is started. The data retention guarantee time of the emergency access block 22 at this time is 10T as shown in FIG.

図9に示す通り、FROM20の使用を開始してから2T時間後に、通常時アクセス用ブロック21の各サブブロックに対して、20N回の書き換えが行われる。このときの通常時アクセス用ブロック21のデータ保持保障時間は、0.9T時間に低下する。そして、FROM20の使用を開始してから2T時間後に、非常時アクセス用ブロック22に対して2N回の書き換えが行われる。このときの非常時アクセス用ブロック22のデータ保持保障時間は、9T時間に低下する。   As shown in FIG. 9, 20N times of rewriting is performed on each sub-block of the normal access block 21 after 2T hours from the start of use of the FROM 20. At this time, the data retention guarantee time of the normal access block 21 is reduced to 0.9 T time. Then, 2N times after the start of use of the FROM 20, the emergency access block 22 is rewritten 2N times. At this time, the data retention guarantee time of the emergency access block 22 is reduced to 9T time.

このように、通常時アクセス用ブロック21及び非常時アクセス用ブロック22のデータ保持保障時間は、FROM20の使用を開始してから1T時間経過するたびに10%ずつ減少する。そして、非常時アクセス用ブロック22に対するデータの書き換え回数は、通常時アクセス用ブロック21の各サブブロックに対するデータの書き換え回数の10分の1である。したがって、同じ時間における、非常時アクセス用ブロック22のデータ保持保障時間は、通常時アクセス用ブロック21のデータ保持保障時間の10倍を維持することができる。そして、非常時アクセス用ブロック22に記憶されているデータは、適宜更新される。したがって、本実施形態に係るメモリ制御回路10によれば、通常時アクセス用ブロック21に記憶されたデータが消失した場合であっても、当該データに関する最新性をある程度維持した状態で、当該データを復旧することができる。   As described above, the data retention guarantee time of the normal access block 21 and the emergency access block 22 decreases by 10% every time 1T time has elapsed since the start of use of the FROM 20. The number of data rewrites for the emergency access block 22 is one tenth of the number of data rewrites for each sub-block of the normal access block 21. Therefore, the data retention guarantee time of the emergency access block 22 at the same time can be maintained 10 times the data retention guarantee time of the normal access block 21. The data stored in the emergency access block 22 is updated as appropriate. Therefore, according to the memory control circuit 10 according to the present embodiment, even when the data stored in the normal access block 21 is lost, the data is stored in a state in which the latest data is maintained to some extent. It can be recovered.

また、本実施形態に係るメモリ制御回路10では、時間測定部12は、所定のタイミングに、非常時アクセス用ブロック22に対する書き込みが最後に行われてからの経過時間を測定する。書き込み部15は、判定部14が、当該経過時間が時間閾値に達したと判定した場合に、通常時アクセス用ブロック21に記憶されているデータを、非常時アクセス用ブロック22に対して書き込む。これにより、本実施形態に係るメモリ制御回路10は、通常時アクセス用ブロック21に記憶されているデータが消失する可能性がある時間が経過したときに、当該データのバックアップとして、当該データを非常時アクセス用ブロック22に書き込むので、データが消失することを、より確実に回避することができる。   In the memory control circuit 10 according to the present embodiment, the time measurement unit 12 measures the elapsed time since the last writing to the emergency access block 22 at a predetermined timing. When the determination unit 14 determines that the elapsed time has reached the time threshold value, the writing unit 15 writes the data stored in the normal access block 21 to the emergency access block 22. As a result, the memory control circuit 10 according to the present embodiment makes the data emergency as a backup of the data when the time when the data stored in the normal access block 21 may be lost has elapsed. Since data is written in the time access block 22, it is possible to more reliably avoid the loss of data.

また、図6及び図9に示す通り、FROM20のデータ保持保障時間は、FROM20に対する書き換え回数が増えるとともに減少する。そして、本実施形態に係るメモリ制御回路10では、判定部14は、回数測定部11により測定された書き込み回数が回数閾値に達するごとに、回数閾値、あるいは、時間閾値を小さくすることができる。したがって、本実施形態に係るメモリ制御回路10は、FROM20の不揮発性能が低下するにしたがい、より頻繁に、データのバックアップを非常時アクセス用ブロック22に書き込むようにするので、データが消失することを、より確実に回避することができる。   As shown in FIGS. 6 and 9, the data retention guarantee time of the FROM 20 decreases as the number of rewrites to the FROM 20 increases. In the memory control circuit 10 according to the present embodiment, the determination unit 14 can decrease the number threshold or the time threshold every time the number of writes measured by the number measuring unit 11 reaches the number threshold. Therefore, the memory control circuit 10 according to the present embodiment writes the data backup to the emergency access block 22 more frequently as the nonvolatile performance of the FROM 20 deteriorates. Can be avoided more reliably.

さらに、本実施形態に係るメモリ制御回路10では、温度測定部13は、FROM20の温度を測定する。そして、判定部14は、温度測定部13により測定された温度に応じて、回数閾値及び時間閾値の少なくとも何れかを変更することができる。図6に示す通り、FROM20の不揮発性能は、その温度が高くなるにしたがって低下する。判定部14は、FROM20の温度が高くなるにしたがって、回数閾値及び時間閾値の少なくとも何れかを小さくする。これにより、本実施形態に係るメモリ制御回路10は、FROM20の温度が高くなるにしたがい、より頻繁に、データのバックアップを非常時アクセス用ブロック22に書き込むようにするので、データが消失することを、より確実に回避することができる。   Furthermore, in the memory control circuit 10 according to the present embodiment, the temperature measurement unit 13 measures the temperature of the FROM 20. And the determination part 14 can change at least any one of a frequency | count threshold value and a time threshold value according to the temperature measured by the temperature measurement part 13. FIG. As shown in FIG. 6, the non-volatile performance of the FROM 20 decreases as the temperature increases. The determination unit 14 decreases at least one of the number threshold and the time threshold as the temperature of the FROM 20 increases. As a result, the memory control circuit 10 according to the present embodiment writes the data backup to the emergency access block 22 more frequently as the temperature of the FROM 20 becomes higher. Can be avoided more reliably.

<第2の実施形態>
図4は、第2の実施形態に係るメモリ制御回路30の構成を概念的に示すブロック図である。
<Second Embodiment>
FIG. 4 is a block diagram conceptually showing the configuration of the memory control circuit 30 according to the second embodiment.

本実施形態に係るメモリ制御回路30は、回数測定部31、判定部34、及び、書き込み部35を備えている。   The memory control circuit 30 according to the present embodiment includes a number measurement unit 31, a determination unit 34, and a writing unit 35.

メモリ制御回路30が制御の対象とする書き換え可能な不揮発性メモリ40は、現在までのデータの書き込み回数に依存した不揮発性能を個々に有する、第1の記憶ブロック41及び第2の記憶ブロック42を有している。   The rewritable nonvolatile memory 40 to be controlled by the memory control circuit 30 includes a first storage block 41 and a second storage block 42 that individually have nonvolatile performance depending on the number of data writings up to now. Have.

回数測定部31は、第1の記憶ブロック41に対してデータが書き込まれたときに、第1の記憶ブロック41に対する、それまでの書き込み回数を測定する。   When the data is written in the first storage block 41, the number measurement unit 31 measures the number of times of writing to the first storage block 41 so far.

判定部34は、回数測定部31により測定された書き込み回数が、所定の回数条件を満たすか否かを判定する。   The determination unit 34 determines whether or not the number of writes measured by the number measurement unit 31 satisfies a predetermined number of times.

書き込み部35は、判定部34により、当該書き込み回数が当該回数条件を満たすと判定されたときに、第1の記憶ブロック41に書き込まれた当該データを、第2の記憶ブロック42に対して書き込む。   The writing unit 35 writes the data written in the first storage block 41 to the second storage block 42 when the determination unit 34 determines that the number of times of writing satisfies the number of times condition. .

本実施形態に係るメモリ制御回路30は、書き換え可能な不揮発性メモリに記憶されたデータの最新性が低下することを回避しつつ、当該データが消失することを回避することができる。その理由は、回数測定部31は、第1の記憶ブロック41に対してデータが書き込まれる際に、これまでの書き込み回数を測定し、書き込み部35は、その書き込み回数が回数閾値に達した場合に、当該データを、第2の記憶ブロック42に書き込むからである。   The memory control circuit 30 according to the present embodiment can avoid the loss of the data while avoiding a decrease in the freshness of the data stored in the rewritable nonvolatile memory. The reason is that the number-of-times measuring unit 31 measures the number of times of writing so far when data is written to the first storage block 41, and the writing unit 35 is when the number of times of writing reaches the number of times threshold. This is because the data is written into the second storage block 42.

<ハードウェア構成例>
上述した各実施形態において図1、及び、図4に示した各部は、専用のHW(HardWare)(電子回路)によって実現することができる。また、図1及び図4において、少なくとも、下記構成は、ソフトウェアプログラムの機能(処理)単位(ソフトウェアモジュール)と捉えることができる。
・回数測定部11及び31、
・判定部14及び34、
・書き込み部15及び35。
<Hardware configuration example>
In each embodiment described above, each unit illustrated in FIGS. 1 and 4 can be realized by a dedicated HW (HardWare) (electronic circuit). 1 and 4, at least the following configuration can be regarded as a function (processing) unit (software module) of the software program.
・ Number of times measurement unit 11 and 31,
-Determination units 14 and 34,
Write units 15 and 35.

但し、これらの図面に示した各部の区分けは、説明の便宜上の構成であり、実装に際しては、様々な構成が想定され得る。この場合のハードウェア環境の一例を、図5を参照して説明する。   However, the division of each part shown in these drawings is a configuration for convenience of explanation, and various configurations can be assumed for mounting. An example of the hardware environment in this case will be described with reference to FIG.

図5は、本願発明の各実施形態に係るメモリ制御回路を実行可能な情報処理回路900(コンピュータ)の構成を例示的に説明する図である。即ち、図5は、図1及び図4に示したメモリ制御回路を実現可能なコンピュータ(情報処理回路)の構成であって、上述した実施形態における各機能を実現可能なハードウェア環境を表す。   FIG. 5 is a diagram for exemplifying the configuration of an information processing circuit 900 (computer) that can execute the memory control circuit according to each embodiment of the present invention. That is, FIG. 5 is a configuration of a computer (information processing circuit) capable of realizing the memory control circuit shown in FIGS. 1 and 4 and represents a hardware environment capable of realizing each function in the above-described embodiment.

図5に示した情報処理回路900は、構成要素として下記を備えている。
・CPU(Central_Processing_Unit)901、
・ROM(Read_Only_Memory)902、
・RAM(Random_Access_Memory)903、
・バス904(通信線)。
The information processing circuit 900 shown in FIG. 5 includes the following as components.
CPU (Central_Processing_Unit) 901,
ROM (Read_Only_Memory) 902,
RAM (Random_Access_Memory) 903,
-Bus 904 (communication line).

即ち、上記構成要素を備える情報処理回路900は、これらの構成がバス904を介して接続された一般的なコンピュータである。   That is, the information processing circuit 900 including the above-described components is a general computer in which these configurations are connected via the bus 904.

そして、上述した実施形態を例に説明した本願発明は、図5に示した情報処理回路900に対して、次の機能を実現可能なコンピュータプログラムを供給する。その機能とは、その実施形態の説明において参照したブロック構成図(図1及び図4)における上述した構成、或いはフローチャート(図2及び図3)の機能である。本願発明は、その後、そのコンピュータプログラムを、当該ハードウェアのCPU901に読み出して解釈し実行することによって達成される。また、当該装置内に供給されたコンピュータプログラムは、読み書き可能な揮発性のメモリ(RAM903)等の不揮発性の記憶デバイスに格納すれば良い。   The present invention described by taking the above embodiment as an example supplies a computer program capable of realizing the following functions to the information processing circuit 900 shown in FIG. The function is the above-described configuration in the block configuration diagram (FIGS. 1 and 4) referred to in the description of the embodiment, or the function of the flowcharts (FIGS. 2 and 3). The present invention is then achieved by reading the computer program to the CPU 901 of the hardware, interpreting it and executing it. Further, the computer program supplied to the apparatus may be stored in a nonvolatile storage device such as a readable / writable volatile memory (RAM 903).

以上、上述した実施形態を模範的な例として本願発明を説明した。しかしながら、本願発明は、上述した実施形態には限定されない。即ち、本願発明は、本願発明のスコープ内において、当業者が理解し得る様々な態様を適用することができる。   The present invention has been described above using the above-described embodiment as an exemplary example. However, the present invention is not limited to the embodiment described above. That is, the present invention can apply various modes that can be understood by those skilled in the art within the scope of the present invention.

1 メモリ制御システム
10 メモリ制御回路
11 回数測定部
12 時間測定部
13 温度測定部
14 判定部
15 書き込み部
20 FROM
21 通常時アクセス用ブロック
21−1乃至21−511 サブブロック
22 非常時アクセス用ブロック
2 CPU
30 メモリ制御回路
31 回数測定部
34 判定部
35 書き込み部
40 不揮発性メモリ
41 第1の記憶ブロック
42 第2の記憶ブロック
50 FROM
50−1乃至50−512 記憶ブロック
900 情報処理回路
901 CPU
902 ROM
903 RAM
904 バス
DESCRIPTION OF SYMBOLS 1 Memory control system 10 Memory control circuit 11 Count measurement part 12 Time measurement part 13 Temperature measurement part 14 Judgment part 15 Writing part 20 FROM
21 Block for normal access 21-1 to 21-511 Sub-block 22 Block for emergency access 2 CPU
DESCRIPTION OF SYMBOLS 30 Memory control circuit 31 Count measurement part 34 Judgment part 35 Writing part 40 Nonvolatile memory 41 1st memory block 42 2nd memory block 50 FROM
50-1 to 50-512 Storage block 900 Information processing circuit 901 CPU
902 ROM
903 RAM
904 bus

Claims (9)

現在までのデータの書き込み回数に依存した不揮発性能を個々に有する第一及び第二の記憶ブロックを有する、書き換え可能な不揮発性メモリにおける前記第一の記憶ブロックに対してデータが書き込まれたときに、前記第一の記憶ブロックに対する、それまでの前記書き込み回数を測定する回数測定手段と、
前記第二の記憶ブロックに対する書き込みが最後に行われてからの経過時間を測定する時間測定手段と、
前記回数測定手段により測定された前記書き込み回数が、所定の回数条件を満たすか否かを判定するとともに、前記時間測定手段により測定された前記経過時間が所定の時間閾値に達したか否かを判定する判定手段と、
前記判定手段により、前記書き込み回数が前記回数条件を満たす、あるいは前記経過時間が前記時間閾値に達したと判定されたときに、前記第一の記憶ブロックに書き込まれた前記データを、前記第二の記憶ブロックに対して書き込む書き込み手段と、
を備える、
メモリ制御回路。
When data is written to the first storage block in the rewritable nonvolatile memory having first and second storage blocks each having nonvolatile performance depending on the number of times of data writing up to now Count measuring means for measuring the number of times of writing to the first storage block,
Time measuring means for measuring an elapsed time since the last writing to the second storage block;
It is determined whether or not the number of times of writing measured by the number of times measuring unit satisfies a predetermined number of times, and whether or not the elapsed time measured by the time measuring unit has reached a predetermined time threshold. Determination means for determining ;
When the determination means determines that the number of times of writing satisfies the number of times condition or the elapsed time has reached the time threshold, the data written to the first storage block is Writing means for writing to the storage block;
Comprising
Memory control circuit.
前記回数測定手段は、前記書き込み回数が所定の回数閾値に達するのに応じて、前記書き込み回数を初期値にリセットし、
前記判定手段は、前記回数条件として、前記書き込み回数が前記回数閾値に達したか否かを判定する、
請求項に記載のメモリ制御回路。
The number-of-times measuring means resets the number of times of writing to an initial value when the number of times of writing reaches a predetermined number of times threshold,
The determination means determines whether the number of times of writing has reached the number of times threshold as the number of times condition,
The memory control circuit according to claim 1 .
前記判定手段は、前記書き込み回数が前記回数閾値に達するのに応じて、前記回数閾値を小さくする、
請求項に記載のメモリ制御回路。
The determination unit reduces the number-of-times threshold as the number of times of writing reaches the number-of-times threshold.
The memory control circuit according to claim 2 .
前記判定手段は、前記書き込み回数が前記回数閾値に達するのに応じて、前記時間閾値を小さくする、
請求項またはに記載のメモリ制御回路。
The determination unit decreases the time threshold as the number of times of writing reaches the number of times threshold.
The memory control circuit according to claim 2 or 3.
前記不揮発性メモリの温度を測定する温度測定手段をさらに備え、
前記判定手段は、前記温度測定手段により測定された前記不揮発性メモリの温度に応じて、前記回数条件の内容、及び、前記時間閾値の少なくとも何れかを変更する、
請求項乃至のいずれか一項に記載のメモリ制御回路。
Temperature measuring means for measuring the temperature of the nonvolatile memory,
The determination unit changes at least one of the contents of the number condition and the time threshold according to the temperature of the nonvolatile memory measured by the temperature measurement unit.
The memory control circuit according to any one of claims 1 to 4.
前記回数測定手段は、複数のサブブロックを含む前記第一の記憶ブロックに対して前記データが書き込まれるのに応じて、前記データの書き込み先である前記サブブロックがラウンドロビン方式によって移動する場合に、前記複数のサブブロックへの書き込み回数の合計値を測定する、
請求項1乃至のいずれか一項に記載のメモリ制御回路。
In the case where the sub-block to which the data is written moves in a round robin manner in response to the data being written to the first storage block including a plurality of sub-blocks, Measuring the total number of times of writing to the plurality of sub-blocks;
The memory control circuit according to any one of claims 1 to 5.
請求項1乃至のいずれか一項に記載のメモリ制御回路と、
前記不揮発性メモリと、
を有するメモリ制御システム。
A memory control circuit according to any one of claims 1 to 6 ;
The nonvolatile memory;
A memory control system.
情報処理装置によって、
現在までのデータの書き込み回数に依存した不揮発性能を個々に有する第一及び第二の記憶ブロックを有する、書き換え可能な不揮発性メモリにおける前記第一の記憶ブロックに対してデータが書き込まれたときに、前記第一の記憶ブロックに対する、それまでの前記書き込み回数を測定し、
前記第二の記憶ブロックに対する書き込みが最後に行われてからの経過時間を測定し、
測定された前記書き込み回数が、所定の回数条件を満たすか否かを判定するとともに測定された前記経過時間が所定の時間閾値に達したか否かを判定し、
前記書き込み回数が前記回数条件を満たす、あるいは前記経過時間が前記時間閾値に達したと判定されたときに、前記第一の記憶ブロックに書き込まれた前記データを、前記第二の記憶ブロックに対して書き込む、
メモリ制御方法。
Depending on the information processing device,
When data is written to the first storage block in the rewritable nonvolatile memory having first and second storage blocks each having nonvolatile performance depending on the number of times of data writing up to now , Measure the number of writes to the first storage block so far,
Measuring the elapsed time since the last write to the second storage block;
Measured the number of times of writing has, together with determining whether a predetermined number of times satisfying, the elapsed time is measured to determine whether it has reached a predetermined time threshold,
When it is determined that the number of times of writing satisfies the number of times condition or the elapsed time has reached the time threshold, the data written to the first storage block is transferred to the second storage block. Write
Memory control method.
現在までのデータの書き込み回数に依存した不揮発性能を個々に有する第一及び第二の記憶ブロックを有する、書き換え可能な不揮発性メモリにおける前記第一の記憶ブロックに対してデータが書き込まれたときに、前記第一の記憶ブロックに対する、それまでの前記書き込み回数を測定する回数測定処理と、
前記第二の記憶ブロックに対する書き込みが最後に行われてからの経過時間を測定する時間測定処理と、
前記回数測定処理により測定された前記書き込み回数が、所定の回数条件を満たすか否かを判定するとともに、前記時間測定処理により測定された前記経過時間が所定の時間閾値に達したか否かを判定する判定処理と、
前記判定処理により、前記書き込み回数が前記回数条件を満たす、あるいは前記経過時間が前記時間閾値に達したと判定されたときに、前記第一の記憶ブロックに書き込まれた前記データを、前記第二の記憶ブロックに対して書き込む書き込み処理と、
をコンピュータに実行させるためのメモリ制御プログラム。
When data is written to the first storage block in the rewritable nonvolatile memory having first and second storage blocks each having nonvolatile performance depending on the number of times of data writing up to now , A number measurement process for measuring the number of times of writing to the first storage block,
A time measurement process for measuring an elapsed time since the last writing to the second storage block;
It is determined whether or not the number of times of writing measured by the number of times measurement process satisfies a predetermined number of times, and whether or not the elapsed time measured by the time measurement process has reached a predetermined time threshold value. A determination process for determining ;
When the determination process determines that the number of times of writing satisfies the number of times condition or the elapsed time has reached the time threshold, the data written to the first storage block is changed to the second storage block. Write processing to write to the storage block,
Memory control program for causing a computer to execute.
JP2016011203A 2016-01-25 2016-01-25 Memory control circuit, memory control system, memory control method, and memory control program Active JP6329185B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016011203A JP6329185B2 (en) 2016-01-25 2016-01-25 Memory control circuit, memory control system, memory control method, and memory control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016011203A JP6329185B2 (en) 2016-01-25 2016-01-25 Memory control circuit, memory control system, memory control method, and memory control program

Publications (2)

Publication Number Publication Date
JP2017134440A JP2017134440A (en) 2017-08-03
JP6329185B2 true JP6329185B2 (en) 2018-05-23

Family

ID=59504460

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016011203A Active JP6329185B2 (en) 2016-01-25 2016-01-25 Memory control circuit, memory control system, memory control method, and memory control program

Country Status (1)

Country Link
JP (1) JP6329185B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114138206B (en) * 2021-12-09 2024-03-19 北京紫光芯能科技有限公司 Data processing method, device, equipment and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09120376A (en) * 1995-10-25 1997-05-06 Fujitsu Ten Ltd Data processor
JPH1011344A (en) * 1996-06-24 1998-01-16 Mitsubishi Electric Corp Data backup method
JP3421581B2 (en) * 1998-06-29 2003-06-30 株式会社日立製作所 Storage device using nonvolatile semiconductor memory
JP2001229069A (en) * 2000-02-17 2001-08-24 Dainippon Printing Co Ltd Ic module
JP5517184B2 (en) * 2008-09-26 2014-06-11 Necエンベデッドプロダクツ株式会社 Flash memory life extension device, method and program thereof
JP2012238259A (en) * 2011-05-13 2012-12-06 Sony Corp Control unit, storage device and control method
JP2013171600A (en) * 2012-02-20 2013-09-02 Denso Corp Nonvolatile memory device

Also Published As

Publication number Publication date
JP2017134440A (en) 2017-08-03

Similar Documents

Publication Publication Date Title
US11704239B2 (en) Garbage collection method for storage medium, storage medium, and program product
JP4844639B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
US8015371B2 (en) Storage apparatus and method of managing data storage area
TWI420303B (en) Method, non-transistory computer readable medium and apparatus for writing data to different portions of memory based on write frequency
JP4472010B2 (en) Storage device
JP4790007B2 (en) Method for achieving wear leveling in flash memory using relative grades
JP5448013B2 (en) System, method, and computer program product for delaying operations that reduce memory life
JP2014241158A (en) Improvement of lifetime of plurality of blocks of memory
JP5570406B2 (en) Memory controller and data recording apparatus
US20150103593A1 (en) Method of Writing Data in Non-Volatile Memory and Non-Volatile Storage Device Using the Same
JP5592478B2 (en) Nonvolatile storage device and memory controller
US9948809B2 (en) Image forming apparatus, memory management method for image forming apparatus, and program, using discretely arranged blocks in prioritizing information
US9984731B2 (en) Storage device and storage method
JP6329185B2 (en) Memory control circuit, memory control system, memory control method, and memory control program
JP6306548B2 (en) Memory management circuit, storage device, memory management method, and memory management program
US10915441B2 (en) Storage system having non-volatile memory device
US10067828B2 (en) Memory controller and data control method
JP5687649B2 (en) Method for controlling semiconductor memory device
JP5520880B2 (en) Flash memory device
JP4818453B1 (en) Electronic device and data reading method
JP2010015222A (en) Memory card
JP2020135656A (en) File management system
WO2018051387A1 (en) Information processing system and data storage method
JP2012037971A (en) Memory controller, nonvolatile memory system provided with memory controller, and method for controlling nonvolatile memory
JP2009211202A (en) Memory system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170515

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180213

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180309

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: 20180327

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180419

R150 Certificate of patent or registration of utility model

Ref document number: 6329185

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150