JP2006201891A - Flash memory management device - Google Patents
Flash memory management device Download PDFInfo
- Publication number
- JP2006201891A JP2006201891A JP2005011072A JP2005011072A JP2006201891A JP 2006201891 A JP2006201891 A JP 2006201891A JP 2005011072 A JP2005011072 A JP 2005011072A JP 2005011072 A JP2005011072 A JP 2005011072A JP 2006201891 A JP2006201891 A JP 2006201891A
- Authority
- JP
- Japan
- Prior art keywords
- flash memory
- memory management
- information
- management device
- bit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000012544 monitoring process Methods 0.000 abstract description 2
- 238000007726 management method Methods 0.000 description 48
- 238000010586 diagram Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 238000000034 method Methods 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
Images
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
本発明は、フラッシュメモリの書き込み回数を監視するフラッシュメモリ管理装置に関する。 The present invention relates to a flash memory management device that monitors the number of times a flash memory is written.
図4は、安全制御装置に適用された従来のフラッシュメモリ管理装置の一例を示す機能ブロック図である。1は安全制御装置であり、異常発生時にプラント2からのトリップ要求を受けて停止操作を実行する。3は通信バスであり、安全制御装置1はこの通信バスを介してエンジニアリングステーション等の上位装置4と通信する。
FIG. 4 is a functional block diagram showing an example of a conventional flash memory management device applied to the safety control device.
安全制御装置1内のCPUモジュールにおいて、11はCPUであり、CPUバス12を介してこれに接続されたフラッシュメモリ13及びRAM14と通信して制御アプリケーションを実行する。フラッシュメモリ13には、上位装置4よりダウンロードされるプログラムやデータベース及び管理データが保存されている。
In the CPU module in the
フラッシュメモリ13に保存されたデータより必要なデータがRAM14にロードされ、CPU1はRAM14より起動され、RAMにロードされたアプリケーションプログラムを実行する。
Necessary data is loaded into the
フラッシュメモリ13は、上位装置4からの更新やプログラム等により書き込みが実行されるとイレーズが発生する。一般にフラッシュメモリの信頼性確保の手法として、イレーズ回数を監視し、スペックで指定された回数に達した時に交換を実行する管理が行われる。フラッシュメモリが安全制御装置内に実装されている場合には、システムの信頼性確保のために、この交換管理は重要である。
The
安全制御装置1において、15はフラッシュメモリ管理手段であり、フラッシュメモリ13内に設けた書き込み回数カウンタ13aのカウント値Nを監視し、これが所定の設定値を超えたときに交換要求情報を上位装置4に通知する。
In the
特許文献1には、フラッシュメモリの書き込み回数を制御する装置が記載されている。
このように、フラッシュメモリ内に書き込み回数カウンタを設ける従来のフラッシュメモリ管理装置では、次のような問題点がある。
(1)カウント値Nの正当性はフラッシュメモリが正常動作をしていることが前提となるから、フラッシュメモリ自体の信頼性が問題となる背景では、このカウント値Nの正当性が確保されてるとは言えない。
As described above, the conventional flash memory management device provided with the write number counter in the flash memory has the following problems.
(1) Since the correctness of the count value N is based on the premise that the flash memory is operating normally, the correctness of the count value N is ensured in the background where the reliability of the flash memory itself becomes a problem. It can not be said.
(2)安全制御装置におけるCPUモジュールは、オフライン又はオンライン時にフラッシュメモリに頻繁にイレーズする可能性が高いので、書き込み回数カウンタ13aを書き込み頻度に対応して高速化する必要があるが、応答速度に限界があり、そのカウント値の正当性が確保されているとは言えない。 (2) Since the CPU module in the safety control device is likely to be frequently erased in the flash memory when offline or online, it is necessary to speed up the write number counter 13a in accordance with the write frequency. There is a limit, and it cannot be said that the correctness of the count value is ensured.
従って本発明が解決しようとする課題は、書き込み回数情報の正当性を確保すると共に、フラッシュメモリ内に設けた書き込み管理領域へのアクセスを高速化したフラッシュメモリ管理装置を実現することにある。 Accordingly, the problem to be solved by the present invention is to realize a flash memory management device that ensures the validity of the write count information and speeds up access to the write management area provided in the flash memory.
このような課題を達成するために、本発明の構成は次の通りである。
(1)フラッシュメモリの書き込み回数を監視するフラッシュメモリ管理装置において、
前記フラッシュメモリには、書き込みの発生毎にビット状態が変わるビット列情報が記憶され、
書き込みの発生毎にカウントする回数情報が記憶されるRAMと、
前記ビット列情報と前記回数情報とを照合するフラッシュメモリ管理手段と、
を備えたことを特徴とするフラッシュメモリ管理装置。
In order to achieve such an object, the configuration of the present invention is as follows.
(1) In a flash memory management device that monitors the number of flash memory writes,
The flash memory stores bit string information whose bit state changes every time a write occurs,
RAM in which information on the number of times counted for each occurrence of writing is stored;
Flash memory management means for collating the bit string information and the number-of-times information;
A flash memory management device comprising:
(2)前記ビット列情報は、あらかじめ全てのビットを「1」にセットした複数のビット列に対して書き込みの発生毎に先頭ビットから順番に「1」を「0」に書き換えた情報であることを特徴とする(1)に記載のフラッシュメモリ管理装置。 (2) The bit string information is information in which “1” is rewritten to “0” in order from the first bit every time a write occurs for a plurality of bit strings in which all bits are set to “1” in advance. The flash memory management device according to (1), which is characterized.
(3)前記フラッシュメモリ管理手段は、書き込みの発生毎に前記回数情報から演算される情報と前記ビット列情報を照合し、一致している場合には前記ビット列情報の最初のビット「1」を「0」に更新することを特徴とする(1)又は(2)に記載のフラッシュメモリ管理装置。 (3) The flash memory management means collates information calculated from the number-of-times information with the bit string information every time a write occurs, and if they match, sets the first bit “1” of the bit string information to “ The flash memory management device according to (1) or (2), wherein the flash memory management device is updated to “0”.
(4)前記フラッシュメモリにアクセスするCPUを備え、前記演算は、前記回数情報を前記CPUのアクセスビット幅で除算し、その商と余りを算出する除算演算であることを特徴とする(3)に記載のフラッシュメモリ管理装置。
(4) A CPU for accessing the flash memory is provided, and the operation is a division operation for dividing the number-of-times information by the access bit width of the CPU and calculating a quotient and a remainder (3) A flash memory management device according to
(5)前記フラッシュメモリ管理手段は、前記除算演算の商及び余りに基づいて前記ビット列情報の正当性を判断することを特徴とする(4)に記載のフラッシュメモリ管理装置。 (5) The flash memory management device according to (4), wherein the flash memory management means determines the validity of the bit string information based on a quotient and a remainder of the division operation.
(6)前記CPU、RAM、フラッシュメモリ並びに前記フラッシュメモリ管理手段は、プラントのトリップ要求に基づいて停止操作を実行する安全制御装置内に形成されていることを特徴とする(4)または(5)に記載のフラッシュメモリ管理装置。 (6) The CPU, the RAM, the flash memory, and the flash memory management means are formed in a safety control device that executes a stop operation based on a trip request of a plant (4) or (5) ) Flash memory management device.
以上説明したことから明らかなように、本発明によれば次のような効果がある。
(1)フラッシュメモリとRAMの領域に保持された書込回数情報を照合することで、書き込み回数の正当性を確保できる。従って、そのモジュールの交換時期を正しく把握でき、システムの信頼性を向上させることができる。
As is apparent from the above description, the present invention has the following effects.
(1) The validity of the number of writings can be ensured by collating the number of writings held in the flash memory and RAM areas. Therefore, it is possible to correctly grasp the replacement time of the module and improve the reliability of the system.
(2)フラッシュメモリの書込回数管理は、あらかじめ全てのビットを「1」にセットしたビット列に対して書き込みの発生毎に先頭ビットから順番に「1」を「0」に書き換える単純なアクセスのため、書き換え管理の高速化を実現することができる。 (2) The flash memory write count management is a simple access that rewrites “1” to “0” in order from the first bit every time a write occurs to a bit string in which all bits are set to “1” in advance. Therefore, high-speed rewrite management can be realized.
以下、本発明を図面により詳細に説明する。図1は本発明を安全制御装置に適用した一実施形態を示す機能ブロック図である。図4で説明した従来装置と同一要素には同一符号を付して説明を省略する。以下、本発明の特徴部につき説明する。 Hereinafter, the present invention will be described in detail with reference to the drawings. FIG. 1 is a functional block diagram showing an embodiment in which the present invention is applied to a safety control device. The same elements as those of the conventional apparatus described with reference to FIG. Hereinafter, the characteristic part of the present invention will be described.
図1において、100は本発明が適用された安全制御装置であり、CPU101、CPUバス102、フラッシュメモリ103、RAM104の構成要素は、図4で説明したCPU11、CPUバス12、フラッシュメモリ13、RAM14と同一機能を有する。
In FIG. 1,
103aは、フラッシュメモリ103の任意の固定セクタ内に設けた書き込み管理領域である。104aは、RAMの任意のアドレスに割り当てられた書き込み回数保持領域である。
フラッシュメモリ103の書き込み管理領域103aには、あらかじめ全てのビットを「1」にセットした複数のビット列に対して書き込みの発生毎に先頭ビットから順番に「1」を「0」に書き換えたビット列情報が記憶される。RAM104の書き込み回数保持領域104aには、書き込みの発生毎にカウントアップする回数情報が記憶される。なお、書き込みの発生毎にカウントダウンする回数情報が記憶されてもよい。書き込み回数を示す情報が記憶されていればよい。
In the
105は、フラッシュメモリ管理手段であり、書き込み発生情報をRAM104から取得すると、直前の書き込み回数保持領域104aの回数情報をCPUのアクセスビット幅で除算する演算を実行し、その商と余りからフラッシュメモリの書き込み管理領域103aの現在のビット列情報を推定検索し、この検索情報と現実の書き込み管理領域103aのビット列情報とを照合する。
フラッシュメモリ管理手段105は、照合の結果、両者が一致していればフラッシュメモリの書き込み管理領域103aのビット列情報は正当性を有するものと判断して、更新情報をフラッシュメモリ103に与え、書き込み管理領域103aビット列の先頭の「1」を「0」に書き換える。
The flash
次に、図2及び図3により本発明の管理手法を説明する。図2(A)及び(B)は、初回使用時のフラッシュメモリの書き込み管理領域103aの保持状態及びRAMの書き込み回数保持領域104aの保持状態を示す。
Next, the management method of the present invention will be described with reference to FIGS. 2A and 2B show the holding state of the
図3(A)及び(B)は、10回の書き込みが発生した後のフラッシュメモリの書き込み管理領域103aの保持状態及びRAMの書き込み回数保持領域104aの保持状態を示す。
FIGS. 3A and 3B show the holding state of the
図2(A)において、フラッシュメモリの初回使用時にチップイレーズ(フラッシュメモリ全体のイレーズであり、基本的に1回のみ)し、書込み管理領域マーク“CHIP”をセクタ268にセットする。セクタ269が書き込み管理領域103aであり、全てを「1」とした複数のビット列の最初のビットが「0」にセットされる。
In FIG. 2A, chip erase (erasure of the entire flash memory and basically only once) is performed at the first use of the flash memory, and the write management area mark “CHIP” is set in the sector 268. The sector 269 is the
図2(B)において、RAMのアドレス0xa2c0に指定された書き込み回数保持領域104aの回数情報が1にセットされる。
In FIG. 2B, the number of times information of the write
この初期状態から書き込みが発生した都度、フラッシュメモリのセクタ269にあるビット列の1ビットを「1」から「0」に書き換えると共に、RAMのアドレス0xa2c0の回数情報を1カウントずつカウントアップする。 Each time a write occurs from this initial state, 1 bit of the bit string in the sector 269 of the flash memory is rewritten from “1” to “0”, and the count information of the RAM address 0xa2c0 is counted up by one count.
図3(A)及び(B)は、10回の書き込み(イレーズ)が発生した後のフラッシュメモリのセクタ269にあるビット列情報及びRAMのアドレス0xa2c0の回数情報を示すものであり、ビット列情報は先頭から10個が「0」にセットされ、RAMのアドレス0xa2c0の回数情報はa(16進数の10)となる。 FIGS. 3A and 3B show the bit string information in the sector 269 of the flash memory and the number information of the RAM address 0xa2c0 after 10 writing (erasing) has occurred. 10 are set to “0”, and the number of times information of the RAM address 0xa2c0 is a (hexadecimal number 10).
次にフラッシュメモリ管理手段105による正当性判断の処理手法につき説明する。RAMの書き込み回数保持領域104aの回数情報は、フラッシュメモリの書込み管理領域103aに書込むビット位置を高速に検索するために使用する。その検索ロジックは、回数情報をCPUのアクセスビット幅で除算し、その商と余りを算出することで実現する。ここで、CPUのアクセスビット幅が32ビットである場合には、
書込み回数 ÷ 32 = 商:32ビット単位アクセス数
余り:対象ビット位置
を表す。
Next, a processing method for determining validity by the flash
Number of writes ÷ 32 = quotient: number of 32-bit unit accesses
Remainder: Indicates the target bit position.
例えば、書込み回数が33であった場合には、商は1、余りは1となる。この情報に基づいて現在のフラッシュメモリの書込み管理領域103aのビット列を推定検索すると、先頭から32ビットが連続して「0」であり、次の32ビットの先頭が「0」である。
For example, if the write count is 33, the quotient is 1 and the remainder is 1. When the bit string in the
この推定検索情報と、現実のフラッシュメモリの書込み管理領域103aのビット列情報とを照合し、両者が一致していればフラッシュメモリの書込み管理情報が正当性を有すると判断し、1ビットシフトした位置のビット列「1」を「0」に書き換える更新を実行する。
The estimated search information and the bit string information of the actual flash memory
照合の結果、一致していない場合には、エラー情報が上位装置に渡されてオペレータに対応を促す。もし、RAMの内容が破壊されて推定ビット位置と内容がマッチングしなかった場合でも、フラッシュメモリの書込回数管理領域のデータをリードして、二分岐法で高速にビットサーチを行うロジックとする対応をとることで、正当性判断を実行することができる。 If they do not match as a result of the collation, error information is passed to the host device to prompt the operator to respond. Even if the contents of the RAM are destroyed and the estimated bit position does not match the contents, the data in the write count management area of the flash memory is read and the logic is used to perform a high-speed bit search by the two-branch method. The correctness judgment can be executed by taking the countermeasure.
以上説明した実施形態では、安全制御装置のCPUモジュールに本発明を適用した場合を説明したが、これに限定されるものではなく、フラッシュメモリを有するモジュール一般のイレーズ回数管理に適用することが可能であり、システムの信頼性向上に寄与することができる。 In the embodiment described above, the case where the present invention is applied to the CPU module of the safety control apparatus has been described. However, the present invention is not limited to this, and can be applied to general erase count management of a module having a flash memory. Therefore, it is possible to contribute to improving the reliability of the system.
2 プラント
3 通信バス
4 上位装置
100 安全制御装置
101 CPU
102 CPUバス
103 フラッシュメモリ
103a 書き込み管理領域
104 RAM
104a 書き込み回数保持領域
105 フラッシュメモリ管理手段
2 Plant 3 Communication bus 4
102
104a Write
Claims (6)
前記フラッシュメモリには、書き込みの発生毎にビット状態が変わるビット列情報が記憶され、
書き込みの発生毎にカウントする回数情報が記憶されるRAMと、
前記ビット列情報と前記回数情報とを照合するフラッシュメモリ管理手段と、
を備えたことを特徴とするフラッシュメモリ管理装置。 In a flash memory management device that monitors the number of flash memory writes,
The flash memory stores bit string information whose bit state changes every time a write occurs,
RAM in which information on the number of times counted for each occurrence of writing is stored;
Flash memory management means for collating the bit string information and the number-of-times information;
A flash memory management device comprising:
6. The flash according to claim 4, wherein the CPU, the RAM, the flash memory, and the flash memory management unit are formed in a safety control device that executes a stop operation based on a trip request of a plant. Memory management device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005011072A JP4632123B2 (en) | 2005-01-19 | 2005-01-19 | Flash memory management device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005011072A JP4632123B2 (en) | 2005-01-19 | 2005-01-19 | Flash memory management device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2006201891A true JP2006201891A (en) | 2006-08-03 |
JP4632123B2 JP4632123B2 (en) | 2011-02-16 |
Family
ID=36959857
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005011072A Active JP4632123B2 (en) | 2005-01-19 | 2005-01-19 | Flash memory management device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4632123B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100462944C (en) * | 2007-03-07 | 2009-02-18 | 北京飞天诚信科技有限公司 | Power-fail protection method based on two continuous logical blocks for non-volatile memory |
JP2013205806A (en) * | 2012-03-29 | 2013-10-07 | Jsr Corp | Radiation-sensitive resin composition, method for forming resist pattern, and polymer |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1021146A (en) * | 1996-06-28 | 1998-01-23 | Oki Electric Ind Co Ltd | Frequency counter |
JP2000090686A (en) * | 1998-09-14 | 2000-03-31 | Nec Ic Microcomput Syst Ltd | Circuit for counting number of rewrite operation of nonvolatile memory |
JP2003140963A (en) * | 2001-11-07 | 2003-05-16 | Mitsubishi Electric Corp | Semiconductor storage system |
-
2005
- 2005-01-19 JP JP2005011072A patent/JP4632123B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1021146A (en) * | 1996-06-28 | 1998-01-23 | Oki Electric Ind Co Ltd | Frequency counter |
JP2000090686A (en) * | 1998-09-14 | 2000-03-31 | Nec Ic Microcomput Syst Ltd | Circuit for counting number of rewrite operation of nonvolatile memory |
JP2003140963A (en) * | 2001-11-07 | 2003-05-16 | Mitsubishi Electric Corp | Semiconductor storage system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100462944C (en) * | 2007-03-07 | 2009-02-18 | 北京飞天诚信科技有限公司 | Power-fail protection method based on two continuous logical blocks for non-volatile memory |
JP2013205806A (en) * | 2012-03-29 | 2013-10-07 | Jsr Corp | Radiation-sensitive resin composition, method for forming resist pattern, and polymer |
Also Published As
Publication number | Publication date |
---|---|
JP4632123B2 (en) | 2011-02-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11121853B2 (en) | Techniques for preventing memory timing attacks | |
US20170139839A1 (en) | Data storage device and data maintenance method thereof | |
US6629108B2 (en) | Method for insuring data integrity for mirrored independently accessible memory devices | |
US8055859B2 (en) | Apparatus and method for providing atomicity with respect to request of write operation for successive sector | |
US9563249B2 (en) | Data storage device and power-interruption detection method | |
CN101375287A (en) | Technique for providing secure firmware | |
US10593421B2 (en) | Method and apparatus for logically removing defective pages in non-volatile memory storage device | |
CN102385533A (en) | Computer and restart method thereof during run-time error of memory | |
CN106910528A (en) | A kind of optimization method and device of solid state hard disc data routing inspection | |
CN101101794A (en) | Memory testing | |
CN101251817A (en) | System and method for reproduction of storage error | |
CN105354059A (en) | Upgrade method and apparatus for controller of air-conditioner system | |
CN111324549B (en) | Memory and control method and device thereof | |
JP4632123B2 (en) | Flash memory management device | |
JP5464226B2 (en) | Information processing apparatus, information processing apparatus control method, and information processing apparatus control program | |
CN104809031A (en) | Dynamic Data Density ECC | |
CN109508145B (en) | Memory access control using address aliases | |
CN111897632B (en) | Interrupt processing method and device, electronic equipment and storage medium | |
JP4972410B2 (en) | Method for controlling access in flash memory and system for implementation of such method | |
CN108614664A (en) | Read error treating method and apparatus based on NANDflash | |
JP2015049722A (en) | Microcomputer and block control method of non-volatile memory | |
JP2009223435A (en) | Data storage method and device, and program | |
CN105164656B (en) | Complete the return of bag | |
US20170200503A1 (en) | Storage apparatus, flash memory control apparatus, and program | |
JP6364847B2 (en) | Main memory access control device, main memory access control system, main memory access control method, and main memory access control program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070905 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100824 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20101006 |
|
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: 20101022 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20101104 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4632123 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131126 Year of fee payment: 3 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |