JP2013175118A - Control device, memory failure detection method thereof and self-diagnostic method thereof - Google Patents

Control device, memory failure detection method thereof and self-diagnostic method thereof Download PDF

Info

Publication number
JP2013175118A
JP2013175118A JP2012040292A JP2012040292A JP2013175118A JP 2013175118 A JP2013175118 A JP 2013175118A JP 2012040292 A JP2012040292 A JP 2012040292A JP 2012040292 A JP2012040292 A JP 2012040292A JP 2013175118 A JP2013175118 A JP 2013175118A
Authority
JP
Japan
Prior art keywords
data
memory
failure detection
area
cpu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2012040292A
Other languages
Japanese (ja)
Inventor
Hiroshi Nakatani
博司 中谷
Naoya Onishi
直哉 大西
Satoshi Amagi
智 天木
Yoshitomi Sameda
芳富 鮫田
Jun Takehara
潤 竹原
Makoto Toko
誠 登古
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2012040292A priority Critical patent/JP2013175118A/en
Publication of JP2013175118A publication Critical patent/JP2013175118A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a control device that allows coupling failure detection of a memory to be efficiently performed while reducing a processing load of a CPU and reducing CPU processing time required for failure detection of the memory, and further to provide a memory failure detection method thereof and a self-diagnostic method thereof.SOLUTION: A control device comprises a CPU 20, a memory 40 for storing data therein and a memory failure detection section 30 for diagnosing failure of a data area. A memory failure detection method of the control device is provided such that the CPU 20 transmits a memory failure detection command specifying an address for failure detection, the data area and a data rewriting area to the memory failure detection section 30, the memory failure detection section 30 compares first coded data at the time of writing and second coded data that are read-out from the memory 40 and are coded with respect to an address of the data area and detects failure of the memory 40 and, further, the memory failure detection section 30 changes the data rewriting area and detects memory failure of all data areas.

Description

本発明の実施形態は、制御装置、及びそのメモリ故障検出方法、その自己診断方法に関する。   Embodiments described herein relate generally to a control device, a memory failure detection method thereof, and a self-diagnosis method thereof.

近年国際標準として、装置の製造者・供給者に対して、機能安全規格が国際電気標準化会議の規格IEC61508「電気・電子・プログラマブル電子安全関連系の機能安全」が、更に、特定の産業用機能安全システムにおいては、特定の用途に合わせた規格が定められている。   In recent years, as an international standard, functional safety standards for equipment manufacturers and suppliers are IEC61508 “Functional safety of electrical / electronic / programmable electronic safety-related systems” of the International Electrotechnical Commission. In safety systems, standards are set for specific applications.

例えば、安全計装システムについては、システムの設計者・インテグレータ・ユーザに対してプロセス用アプリケーション規格IEC61511が定められている。   For example, for safety instrumented systems, the process application standard IEC61511 is defined for system designers, integrators, and users.

これらの規格では、システムの設計、保守、廃棄に至るライフサイクルにおける安全を評価し、リスク軽減の要求レベルである安全度水準(SIL; Safety Integrity Level)を定量的な評価尺度として定めている。   These standards evaluate safety in the life cycle from system design, maintenance, and disposal, and define a safety integrity level (SIL), which is a required level of risk reduction, as a quantitative evaluation scale.

特に、高い安全度水準を求められる安全計装システムにおいては、記憶装置に対する故障の検出機能が必要となる。   In particular, in a safety instrumented system that requires a high safety level, a failure detection function for a storage device is required.

安全計装システムの場合、長時間連続稼働に対応するため、システムのメモリ障害や、放射線粒子によるメモリのソフトエラーに対応するため、システム起動時だけでなくシステム稼働中においても記憶装置に対する診断が要求され、故障を検出した際には、システムの出力を安全状態に遷移させる必要がある。   In the case of a safety instrumented system, in order to cope with continuous operation for a long time, in order to cope with a memory failure of the system and a memory soft error due to radiation particles, the storage device can be diagnosed not only at system startup but also during system operation. When required and a failure is detected, the system output must be transitioned to a safe state.

メモリ故障検出の方法としては、一般的には診断対象のメモリに対してテストデータパターンを書き込み、同一アドレスからデータを読み出し、書き込みと読み出しのデータパターンの一致を確認する方法がある。   As a method of detecting a memory failure, there is generally a method of writing a test data pattern to a memory to be diagnosed, reading data from the same address, and confirming a match between the data pattern of writing and reading.

この際、メモリに格納されている値の書き換えを伴うため、CPUからアクセス中のメモリ領域に対しては故障検出を行う事が出来ない。このような場合には、メモリの退避領域を用いてシステム稼働中でもメモリ故障検出を行える手法がある(例えば特許文献1)。   At this time, since the value stored in the memory is rewritten, failure detection cannot be performed on the memory area being accessed from the CPU. In such a case, there is a technique capable of detecting a memory failure even when the system is operating by using a memory save area (for example, Patent Document 1).

また、高い安全性を証明するためには、メモリアドレス線の障害によるカップリング故障などに対応した故障検出率の高い検出手法を用いる必要があるが、検出率の高い手法は複雑なメモリアクセスを必要とするため、システム制御処理を担当するCPUがメモリ故障検出を行うとCPU負荷が高くなり、システム制御処理をするための処理時間に制約を与える恐れがある。   In addition, in order to prove high safety, it is necessary to use a detection method with a high failure detection rate corresponding to a coupling failure due to a failure in the memory address line, but a method with a high detection rate requires complicated memory access. Therefore, if the CPU in charge of system control processing detects a memory failure, the CPU load increases, and there is a possibility that processing time for system control processing may be restricted.

そのため、メモリ故障検出に要する処理時間を短縮しシステム制御処理の合間に実行可能とする手法として、メモリ故障検出を階層的に行い、メモリアクセス回数を減らす手法がある(例えば特許文献2)。   Therefore, as a technique for shortening the processing time required for detecting a memory failure and making it possible to execute between system control processes, there is a technique for performing memory failure detection hierarchically and reducing the number of memory accesses (for example, Patent Document 2).

特許第3570388号公報Japanese Patent No. 3570388 特許第4312818号公報Japanese Patent No. 4312818

上述した特許文献1においては、システム稼働中でもメモリ故障検出を行えるようにするため、CPUの外部に退避用メモリと故障検出専用のプロセッサを必要とする。   In Patent Document 1 described above, in order to be able to detect a memory failure even while the system is operating, a save memory and a processor dedicated to failure detection are required outside the CPU.

この手法では故障検出専用のハードウエアを必要とするため、その分ハードウエアコストの増大に繋がることに加え、追加ハードウエア自体の故障による信頼性の低下が起こる。   Since this method requires hardware dedicated to failure detection, in addition to the corresponding increase in hardware cost, the reliability decreases due to failure of the additional hardware itself.

上述した特許文献2においては、故障検出処理にシステム制御処理用のCPUを用いているため、診断速度が向上したとしても、メモリ容量の増加とともに診断時間が長くなるという問題がある。   In Patent Document 2 described above, since a CPU for system control processing is used for failure detection processing, there is a problem that even if the diagnostic speed is improved, the diagnostic time becomes longer as the memory capacity increases.

本発明は上述した問題点を解決するためになされたものであり、CPUとそのメモリを備える制御装置のメモリ故障検出において、CPUの処理負担を軽減し、メモリの故障検出に要するCPU処理時間を短縮するとともに、メモリのカップリング故障検出が効率よく行えるようにした制御装置、及びそのメモリ故障検出方法、その自己診断方法を提供することを目的とする。   The present invention has been made to solve the above-described problems. In the memory failure detection of the control device including the CPU and its memory, the CPU processing load is reduced and the CPU processing time required for detecting the memory failure is reduced. It is an object of the present invention to provide a control device, a memory failure detection method thereof, and a self-diagnosis method thereof that can be shortened and can efficiently detect a memory coupling failure.

上記目的を達成するために、本実施形態の制御装置は、制御プログラムを備え、自身の外部バスと接続される入出力部を介してプラントを制御するCPUと、当該制御プログラム、及び前記制御プログラムの実行中に使用するデータを記憶するメモリと、一方を前記CPUの外部バスと、他方を前記メモリとを接続して、前記CPUが前記制御プログラムの実行中のアイドルタイムにおいて、予め設定される前記メモリの診断対象となるデータ領域を指定する「メモリ故障検出」命令に基づいて、当該データ領域の故障を診断するメモリ故障検出部と、を備え、前記メモリ故障検出部は、アドレス変換部と、符号化計算部と、命令受付部と、検出用データ書き換え部と、を備え、前記アドレス変換部は、前記CPUから前記メモリにデータを転送する場合には、前記制御プログラムの論理アドレスを前記メモリの物理アドレスに、また、前記メモリから前記CPUにデータを転送する場合には前記メモリの物理アドレスを前記論理アドレスに変換し、前記符号化計算部は、前記「メモリ故障検出」命令に基づいて、前記データ領域にデータを書き込む場合、予め書き込まれる当該データ領域のデータに対して、予め設定される符号化ルールに基づく符号化演算を行い第1の符号化データを作成して、前記データ領域と対応付けられた符号領域に書き込み、前記CPUからの前記「メモリ故障検出」命令で前記メモリの故障診断を行う場合、当該データ領域から読み出したデータに対して前記符号化演算を行い第2の符号化データとし、前記第1の符号化データと前記第2の符号化データとを比較して、故障の有無を検出し、前記検出用データ書き換え部は、前記CPUからの「メモリ故障検出」命令を、前記命令受付部を介して通知され、当該「メモリ故障検出」命令で予め設定される前記データ領域内のデータ書き換え領域のデータを予め設定される書き換え変換パターンで書き換え、前記命令受付部は、前記CPUからの「メモリ故障検出」命令を受信して、前記符号化計算部、前記アドレス変換部、及び前記検出用データ書き換え部に送り、前記CPUは、前記メモリ故障検出部に対して、前記故障検出用アドレス、前記データ領域、前記データ書き換え領域を指定する前記「メモリ故障検出」命令を送信し、前記メモリ故障検出部は、前記「メモリ故障検出」命令に基づく前記データ領域のアドレスに対して、書き込み時の第1の符号化データと、前記メモリのから読み出して符号化した第2の符号化データとを比較し、その相違の有無から前記データ書き換え領域のメモリの故障を判定し、前記メモリのデータ書き換え領域を設定し、当該データ書き換え領域の書き込みデータと読み出しデータの符号化演算結果とを比較して、前記データ領域のメモリ故障を検出するようにしたことを特徴とする。   In order to achieve the above object, the control device of the present embodiment includes a control program, a CPU that controls a plant via an input / output unit connected to its own external bus, the control program, and the control program A memory for storing data used during execution of the CPU, one of which is connected to the external bus of the CPU and the other is connected to the memory, and the CPU is preset in an idle time during execution of the control program. A memory failure detection unit for diagnosing a failure in the data region based on a “memory failure detection” command that specifies a data region to be diagnosed in the memory, the memory failure detection unit comprising: an address conversion unit; A coding calculation unit, a command receiving unit, and a detection data rewriting unit, wherein the address conversion unit stores data from the CPU into the memory. In the case of transmission, the logical address of the control program is converted into a physical address of the memory, and when data is transferred from the memory to the CPU, the physical address of the memory is converted into the logical address. When writing data to the data area based on the “memory failure detection” instruction, the encoding calculation unit performs an encoding operation based on a preset encoding rule for the data in the data area to be written in advance. When the first encoded data is created and written into the code area associated with the data area, and the memory fault diagnosis is performed by the “memory fault detection” command from the CPU, The encoding operation is performed on the read data to obtain second encoded data, and the first encoded data and the second encoded data are processed. The data rewriting unit for detection is notified of the “memory failure detection” command from the CPU via the command receiving unit, and the “memory failure detection” is detected. Rewriting the data in the data rewrite area in the data area preset by the instruction with the preset rewrite conversion pattern, the instruction receiving unit receives the “memory failure detection” instruction from the CPU, and the code The CPU sends to the calculation calculation unit, the address conversion unit, and the detection data rewrite unit, the CPU specifies the failure detection address, the data area, and the data rewrite area to the memory failure detection unit A “memory failure detection” command is transmitted, and the memory failure detection unit writes to the address of the data area based on the “memory failure detection” command. The first encoded data at the time of loading is compared with the second encoded data read from the memory and encoded, a failure of the memory in the data rewrite area is determined from the presence or absence of the difference, and the memory The data rewrite area is set, the write data in the data rewrite area is compared with the encoding operation result of the read data, and a memory failure in the data area is detected.

上記目的を達成するために、本実施形態の制御装置のメモリ故障検出方法は、制御プログラムを備え、自身の外部バスと接続される入出力部を介してプラントを制御するCPUと、当該制御プログラム、及び前記制御プログラムの実行中に使用するデータを記憶するメモリと、一方を前記CPUの外部バスと、他方を前記メモリとを接続して、前記CPUが前記制御プログラムの実行中のアイドルタイムにおいて、予め設定される前記メモリの診断対象となるデータ領域を指定する「メモリ故障検出」命令に基づいて、当該データ領域の故障を診断するメモリ故障検出部と、を備える制御装置のメモリの故障検出方法であって、前記CPUは、前記メモリ故障検出部に対して、前記故障検出用アドレス、前記データ領域、前記データ書き換え領域を指定する前記「メモリ故障検出」命令を送信し、前記メモリ故障検出部は、前記「メモリ故障検出」命令に基づく前記データ領域のアドレスに対して、書き込み時の第1の符号化データと、前記メモリのから読み出して符号化した第2の符号化データとを比較し、その相違の有無から前記データ書き換え領域のメモリの故障を判定し、前記メモリのデータ書き換え領域を設定し、この領域の書き込みデータと読み出しデータの符号化演算結果を比較して、前記データ領域のメモリ故障を検出するようにしたことを特徴とする。   In order to achieve the above object, a memory failure detection method for a control device according to this embodiment includes a control program, a CPU that controls a plant via an input / output unit connected to its own external bus, and the control program And a memory for storing data used during execution of the control program, one of the external buses of the CPU and the other connected to the memory, and the CPU is in an idle time during execution of the control program. And a memory failure detection unit for diagnosing a failure in the data area based on a preset “memory failure detection” command for designating a data area to be diagnosed in the memory. The CPU provides the failure detection address, the data area, and the data rewrite to the memory failure detection unit. The “memory failure detection” command designating an area is transmitted, and the memory failure detection unit, for the address of the data region based on the “memory failure detection” command, the first encoded data at the time of writing and Comparing the second encoded data read and encoded from the memory, determining whether or not the memory in the data rewriting area is faulty based on the difference, and setting the data rewriting area of the memory. The memory area in the data area is detected by comparing the encoding operation results of the write data and the read data.

上記目的を達成するために、本実施形態の制御装置の自己診断方法は、制御プログラムを備え、自身の外部バスと接続される入出力部を介してプラントを制御するCPUと、当該制御プログラム、及び前記制御プログラムの実行中に使用するデータを記憶するメモリと、一方を前記CPUの外部バスと、他方を前記メモリとを接続して、前記CPUが前記制御プログラムの実行中のアイドルタイムにおいて、予め設定される前記メモリの診断対象となるデータ領域を指定する「メモリ故障検出」命令に基づいて、当該データ領域の故障を診断するメモリ故障検出部と、を備える制御装置の制御装置の自己診断方法であって、前記CPUは、前記メモリ故障検出部が実行する符号化計算機能を備え、予め設定される「自己診断」命令とその診断用データを前記メモリ故障検出部に送信し、前記メモリ故障検出部では、前記診断用データに対して、予め設定される符号化演算を実行して、その符号化データを前記CPUに返信し、前記CPUでは、返信された符号化データと自身で演算した符号化データとを照合して、前記メモリ故障検出部または前記CPUの故障を自己診断するようにしたことを特徴とする。   In order to achieve the above object, the control device self-diagnosis method of the present embodiment includes a control program, a CPU for controlling the plant via an input / output unit connected to its own external bus, the control program, And a memory for storing data used during the execution of the control program, one of the external buses of the CPU and the other connected to the memory, and the CPU is in an idle time during the execution of the control program, A self-diagnosis of the control device of the control device, comprising: a memory failure detection unit that diagnoses a failure in the data region based on a “memory failure detection” command that designates a preset data region to be diagnosed in the memory The CPU includes a coding calculation function executed by the memory failure detection unit, and a preset “self-diagnosis” command and its diagnosis The data is transmitted to the memory failure detection unit, the memory failure detection unit performs a preset encoding operation on the diagnostic data, and returns the encoded data to the CPU, The CPU is characterized by collating the returned encoded data with the encoded data calculated by itself to self-diagnose the failure of the memory failure detection unit or the CPU.

第1の実施形態の制御装置の構成図。The block diagram of the control apparatus of 1st Embodiment. 第1の実施形態のメモリの故障検出用アドレス、データ領域、データ書き換え領域、及び符号領域の設定例を説明する図。FIG. 6 is a diagram for explaining an example of setting a failure detection address, a data area, a data rewrite area, and a code area in the memory according to the first embodiment. 第1の実施形態の他の符号領域の設定例を説明する図。The figure explaining the example of a setting of the other code field of a 1st embodiment. 第2の実施形態の他のデータ書き換え領域の設定例を説明する図。The figure explaining the example of a setting of the other data rewriting area | region of 2nd Embodiment. 第2の実施形態のデータ領域の走査方法の説明図。Explanatory drawing of the scanning method of the data area of 2nd Embodiment. 第3の実施形態のデータ領域の更新動作を説明する図。The figure explaining the update operation | movement of the data area of 3rd Embodiment.

以下、本発明の実施形態について図面を参照して説明する。   Embodiments of the present invention will be described below with reference to the drawings.

(第1の実施形態)
図1乃至図3を参照して説明する。第1の実施形態の制御装置の構成を図1に示す。図1において、制御装置10は、制御プログラムを備え、自身の外部バス50と接続される入出力部を介してプラントを制御するCPU20と、制御プログラム、及び制御プログラムの実行中に使用するデータを記憶するメモリ40と、一方をCPUの外部バス50と、他方をメモリ40とを接続して、CPU20が制御プログラムの最初の起動時、または制御プログラム実行中のアイドルタイムにおいて、予め設定されるメモリ40の故障検出対象となる詳細を後述するメモリ40のデータ領域を指定する「メモリ故障検出」命令に基づいて、データ領域の故障を診断するメモリ故障検出部30と、を備える。
(First embodiment)
This will be described with reference to FIGS. The configuration of the control device of the first embodiment is shown in FIG. In FIG. 1, a control device 10 includes a control program, a CPU 20 that controls a plant via an input / output unit connected to its own external bus 50, a control program, and data used during execution of the control program. A memory 40 to be stored, one of which is connected to the external bus 50 of the CPU, and the other is connected to the memory 40, and the CPU 20 is preset when the control program is first started or at an idle time during execution of the control program. And a memory failure detection unit 30 for diagnosing a failure in the data region based on a “memory failure detection” command for designating a data region in the memory 40, which will be described later in detail.

即ち、CPU20は、メモリ故障検出部30を介して、メモリ40に間接的にアクセスする構成としている。   That is, the CPU 20 is configured to indirectly access the memory 40 via the memory failure detection unit 30.

次に、各部の詳細構成を説明する前に、先ず、メモリ40のデータ領域と、これを指定する「メモリ故障検出」命令について、説明する。   Next, before describing the detailed configuration of each unit, first, a data area of the memory 40 and a “memory failure detection” command for designating the data area will be described.

制御プログラムが実行される場合のデータが記憶されているメモリ40の検査対象領域は、「メモリ故障検出」命令で定義される。メモリ40の全検査対象領域は、実行中データ領域、及び検査対象データ領域の少なくとも2つ以上の領域に、予めCPU40で識別されているものとする。例えば、図1に示すようにこの全検査対象領域は、A〜Eの5分割され、その内の何れかが検査対象データ領域として指定され、その他は実行中データ領域とされる。   The inspection target area of the memory 40 in which data when the control program is executed is defined by a “memory failure detection” command. It is assumed that all the inspection target areas in the memory 40 are identified in advance by the CPU 40 as at least two areas of the execution data area and the inspection target data area. For example, as shown in FIG. 1, the entire inspection target area is divided into five parts A to E, one of which is designated as the inspection target data area, and the other is set as the data area during execution.

夫々の記憶エリアの検査は、「メモリ故障検出」命令に付随した故障検出用アドレスで一意に指定される。図2は、メモリ40の検査対象データ領域Dが「メモリ故障検出」命令が実行された場合の記憶状態を示す。   The inspection of each storage area is uniquely specified by a failure detection address associated with the “memory failure detection” command. FIG. 2 shows a storage state when the “memory failure detection” command is executed in the inspection target data area D of the memory 40.

この場合、「メモリ故障検出」命令は、特定のデータ領域のアドレスを指定する故障検出用アドレスjh、その故障検出用アドレスjhに対応する複数のデータ領域41、夫々のデータ領域に対して故障を検出するためのデータ書き換え領域nh43が指定される。   In this case, the “memory failure detection” command causes a failure detection address jh for designating an address of a specific data region, a plurality of data regions 41 corresponding to the failure detection address jh, and a failure for each data region. A data rewrite area nh43 for detection is designated.

また、夫々のデータ領域41に対して生成される詳細を後述する符号化データを記憶する符号領域42が、メモリデータアクセス幅の末尾に備えられる。または、図3に示すように、夫々のデータ領域41の故障検出用アドレスに対して固定のオフセット値Kを加算した符号用アドレスK+・・・hを専用に設けても良い。   Also, a code area 42 for storing encoded data, which will be described later in detail, for each data area 41 is provided at the end of the memory data access width. Alternatively, as shown in FIG. 3, a code address K +... H obtained by adding a fixed offset value K to the failure detection address in each data area 41 may be provided exclusively.

この場合、符号領域42は、符号用アドレスによって一意に識別される。故障検出用アドレスと符号用アドレスは、アドレスオフセットKを除く同一のアドレス値がそれぞれ対応する領域を示す。例えば、故障検出用アドレス01hのデータ領域と符号用アドレスK+01hの符号領域はそれぞれ対応する。   In this case, the code area 42 is uniquely identified by the code address. The failure detection address and the code address indicate areas corresponding to the same address value excluding the address offset K, respectively. For example, the data area of the failure detection address 01h corresponds to the code area of the code address K + 01h.

また、符号用アドレスK+・・・hは、メモリアドレスの自然数L分の1の値とする。この場合、連続したメモリアドレスを占める複数の記憶単位毎、単一の故障検出用アドレスjhが割り付けられる。   Further, the sign address K +... H is a value of 1 / L of the natural number of the memory address. In this case, a single failure detection address jh is assigned to each of a plurality of storage units occupying consecutive memory addresses.

例えば、図3で符号領域の横幅が、CPU20のメモリデータアクセス幅=32ビット、Lビット=4ビットの場合、符号用アドレスの実アドレス値は、アクセス幅のバイト数(32ビット→4バイト)×4ビットごとの飛び飛びの値となる。   For example, in FIG. 3, when the horizontal width of the code area is the memory data access width of the CPU 20 = 32 bits and the L bit = 4 bits, the actual address value of the code address is the number of bytes of the access width (32 bits → 4 bytes). × Skip value every 4 bits.

この場合、例えば、符号用アドレスの先頭が0000hの場合、次の行のアドレスは0010h、その次の行は0020hとなる(16ビット単位で実アドレスが進む)。このアドレス0000〜000Fhまで(=連続したメモリアドレスを占める記憶単位)をアドレスjh、0010〜001Fhまでをj+1h、0020〜002Fhをj+2hと言った風に、故障検出用アドレスを割り振る。   In this case, for example, when the head of the code address is 0000h, the address of the next row is 0010h, and the next row is 0020h (the real address advances in units of 16 bits). A failure detection address is assigned in such a manner that addresses 0000 to 000Fh (= storage units occupying consecutive memory addresses) are address jh, 0010 to 001Fh are j + 1h, and 0020 to 002Fh are j + 2h.

また、故障検出用アドレスjhに対応するデータ領域41のメモリデータアクセス幅のビット数Mと、符号領域42のメモリデータアクセス幅Lは異なっても良い。   The number of bits M of the memory data access width of the data area 41 corresponding to the failure detection address jh and the memory data access width L of the code area 42 may be different.

次に、このような「メモリ故障検出」命令を受けて、メモリ40の故障を検出するメモリ故障検出部30の詳細構成について説明する。アドレス変換部31と、符号化計算部32と、命令受付部33と、検出用データ書き換え部34と、を備える。   Next, a detailed configuration of the memory failure detection unit 30 that receives such a “memory failure detection” command and detects a failure of the memory 40 will be described. An address conversion unit 31, an encoding calculation unit 32, an instruction reception unit 33, and a detection data rewriting unit 34 are provided.

先ず、命令受付部33は、CPU20からの命令を受付け、アドレス変換部31、符号化計算部32、及び検出用データ書き換え部34に送る。この命令受付部33は図示しない入力回路と命令レジスタから構成される。命令受付部33は命令レジスタを用いずに入力回路から直接、アドレス変換部31と符号化計算部32に命令を伝達する構成でも構わない。   First, the command receiving unit 33 receives a command from the CPU 20 and sends the command to the address converting unit 31, the encoding calculation unit 32, and the detection data rewriting unit 34. The instruction receiving unit 33 includes an input circuit (not shown) and an instruction register. The instruction receiving unit 33 may be configured to transmit an instruction directly from the input circuit to the address conversion unit 31 and the encoding calculation unit 32 without using an instruction register.

アドレス変換部31は、CPU20からメモリ40にデータを転送する場合には、制御プログラムのソフトウェアが認識する論理アドレスをメモリ40の物理アドレスに、また、メモリ40からCPU20にデータを転送する場合には、メモリ40の物理アドレスを論理アドレスに変換するアドレス変換機能を備える。   When transferring data from the CPU 20 to the memory 40, the address conversion unit 31 transfers a logical address recognized by the software of the control program to a physical address of the memory 40, and when transferring data from the memory 40 to the CPU 20. An address conversion function for converting a physical address of the memory 40 into a logical address is provided.

符号化計算部32は、「メモリ故障検出」命令に基づいて、データ領域41にデータを書き込む場合、予め書き込まれる当該データ領域41のデータに対して、予め設定される符号化ルールに基づく符号化演算を行い(第1の)符号化データを作成して、データ領域41と対応付けられた符号領域43に書き込み、CPU40からの「メモリ故障検出」命令でメモリの故障診断を行う場合、当該データ領域41から読み出したデータに対して符号化演算を行い(第2の)符号化データとし、第1の符号化データと第2の符号化データとを比較して、故障の有無を検出する。   When the data is written in the data area 41 based on the “memory failure detection” command, the encoding calculation unit 32 encodes the data in the data area 41 written in advance based on a preset encoding rule. When (first) encoded data is calculated and written into the code area 43 associated with the data area 41 and the memory fault diagnosis is performed by the “memory fault detection” command from the CPU 40, the data An encoding operation is performed on the data read from the area 41 to obtain (second) encoded data, and the first encoded data and the second encoded data are compared to detect the presence or absence of a failure.

符号化ルールは、例えば。CRC(Cyclic Redundancy Check)コードの様に、高い故障検出能力を持つ符号を用いる。また、符号化計算部32の符号化ルールには、ECC(Error Check and Correct)のようなビットエラー検出とビットエラー訂正能力を兼ね備えた符号を用いても良い。   The encoding rule is, for example. A code having a high fault detection capability is used, such as a CRC (Cyclic Redundancy Check) code. The encoding rule of the encoding calculation unit 32 may be a code having both bit error detection and bit error correction capability such as ECC (Error Check and Correct).

検出用データ書き換え部34は、CPU40からの「メモリ故障検出」命令を、命令受付部33を介して通知され、当該「メモリ故障検出」命令で予め設定される前記データ領域内のデータ書き換え領域nhのデータを予め設定される詳細を後述する特定の変化ルールに基づいて変換処理して、データを上書きし、または、メモリ40から読み出して逆変換しCPU40に送る場合がある。   The data rewriting unit for detection 34 is notified of the “memory failure detection” command from the CPU 40 via the command receiving unit 33, and the data rewriting region nh in the data region preset by the “memory failure detection” command. In some cases, the preset data is converted on the basis of a specific change rule to be described later, and the data is overwritten, or the data is read from the memory 40 and inversely converted and sent to the CPU 40.

次に、このように構成された、第1の実施形態による制御装置10のメモリ40のメモリ故障検出動作について説明する。   Next, the memory failure detection operation of the memory 40 of the control device 10 configured as described above according to the first embodiment will be described.

(ステップ1)
メモリ40のデータ領域41には制御演算に用いられる対象データが、符号領域42には、データ領域41の対象データに対応した符号化データが、制御装置10の起動時、または、「メモリ故障検出」命令の前に、予め、記憶される。
(Step 1)
The target data used for the control calculation is stored in the data area 41 of the memory 40, and the encoded data corresponding to the target data in the data area 41 is stored in the code area 42 when the control device 10 is started or “memory failure detection” is performed. Is pre-stored before the command.

(ステップ2)
次に、CPU20からの「メモリ故障検出」命令が命令受付部33に伝達され、メモリ40内に複数存在する、実行中データ領域以外の検査対象データ領域であるデータ領域41の内、CPU20からの指定による対象となるデータ書き換え領域43に記憶されている検査対象データが検出用データ書き換え部34に読み出される。
(Step 2)
Next, a “memory failure detection” command from the CPU 20 is transmitted to the command receiving unit 33, and a plurality of data areas 41 in the memory 40, which are data areas 41 to be inspected other than the data area being executed, are received from the CPU 20. The inspection target data stored in the data rewrite area 43 to be specified is read to the detection data rewrite unit 34.

(ステップ3)
引き続き、命令受付部33からの伝達により、検出用データ書き換え部34は、読み出したデータ書き換え領域43のデータを、予め定める、特定の変化ルールに基づく変換処理をして書き換える。(以後、ここでは読み出したデータを変換処理して上書きすることを「書き換える」と言う。)。
(Step 3)
Subsequently, the detection data rewrite unit 34 rewrites the read data in the data rewrite area 43 through a conversion process based on a predetermined change rule by transmission from the instruction receiving unit 33. (Hereinafter, the conversion of the read data and overwriting is referred to as “rewriting”.)

ここで言う特定の変化ルールに基づく変換処理とは、例えば、データ書き換え領域43のデータをビット反転させた値に書き換えるというものである。   The conversion process based on the specific change rule referred to here is, for example, rewriting data in the data rewriting area 43 to a value obtained by bit-inversion.

また、特定の変化ルールに基づく変換処理は、読み出したデータと検出用データ書き換え部34に予め記憶しておく変換データ(例えば、0101010101010101=5555h)との排他的論理和(XOR)などの積和演算であっても構わない。この際、符号化計算部32により、対応する符号領域42の値の書き換えも行う。   Also, the conversion process based on a specific change rule is a product sum such as an exclusive OR (XOR) of the read data and conversion data (for example, 001010101010101 = 5555h) stored in advance in the detection data rewriting unit 34. It may be an operation. At this time, the encoding calculation unit 32 also rewrites the value of the corresponding code area 42.

(ステップ4)
書き換え後のデータ書き換え領域43のデータを、検出用データ書き換え部34の図示しないメモリに読み出し、ステップ3で書き換えた(データ書き換え領域43に一時記憶した参照)のデータと、書き換え後のデータ書き換え領域43からの読み出したデータとが一致する事を検出用データ書き換え部34で確認する。
(Step 4)
The data in the data rewrite area 43 after rewriting is read into a memory (not shown) of the detection data rewriting unit 34 and rewritten in step 3 (the reference temporarily stored in the data rewrite area 43) and the data rewritten area after rewriting. The detection data rewriting unit 34 confirms that the data read from the data 43 matches.

ここでもし、書き換えた参照データと、書き換え後の読み出しデータとが一致しない場合は、メモリ40のデータ書き換え領域43に故障がある事を意味するので、データ書き換え領域43に関してメモリ故障を検出する。   Here, if the rewritten reference data and the read data after rewriting do not match, it means that there is a failure in the data rewrite area 43 of the memory 40, so a memory failure is detected for the data rewrite area 43.

即ち、これまでのステップでは、データ書き換え領域43、及び対応する符号領域42の異常が検出される。   That is, in the steps so far, an abnormality in the data rewrite area 43 and the corresponding code area 42 is detected.

(ステップ5)
次に、メモリ40の、データ書き換え領域43とは異なる全ての故障検出用アドレスjh(図2の故障検出用アドレス00h〜jh、アドレスnhを除く)について、命令受付部33からの伝達により、符号化計算部32がデータ領域41からの読み出しデータから符号化データを計算し、対応する符号領域42に保存済みの符号化データと、計算した符号化データで比較照合検査を行う。
(Step 5)
Next, all the failure detection addresses jh (except failure detection addresses 00h to jh and addresses nh in FIG. 2) of the memory 40 that are different from the data rewrite area 43 are encoded by transmission from the instruction receiving unit 33. The calculation calculation unit 32 calculates the encoded data from the read data from the data area 41, and performs a comparison check with the encoded data stored in the corresponding code area 42 and the calculated encoded data.

ここで、このステップ5で検査対象となる故障検出用アドレス(図2の故障検出用アドレス00h〜jh)は、メモリ40の検査可能な状態の検査対象データ領域に渡っていても構わない。   Here, the failure detection addresses (failure detection addresses 00h to jh in FIG. 2) to be inspected in this step 5 may extend over the inspection target data area of the memory 40 in the inspectable state.

また故障検出用アドレス(図2の故障検出用アドレス00h〜jh)は、図1のメモリ40のうち領域A〜Eのいずれかの範囲中に限定されていても構わない。   Further, the failure detection address (failure detection addresses 00h to jh in FIG. 2) may be limited to any one of the areas A to E in the memory 40 of FIG.

また、ここで、もしデータ書き換え領域43のアドレス線と他のアドレス線の間でカップリング故障モードが存在する場合には、データ書き換え領域43の書き換え時に、データ書き換え検出用アドレスnh以外のアドレスにもデータ変化が生じる。   Here, if a coupling failure mode exists between the address line of the data rewrite area 43 and another address line, an address other than the data rewrite detection address nh is set when the data rewrite area 43 is rewritten. Data changes.

ステップ5のデータ書き換え領域43とは異なる全ての故障検出用アドレスの符号化計算による比較照合検査により、このカップリング故障を検出することが可能である。   It is possible to detect this coupling failure by a comparison check by encoding calculation of all failure detection addresses different from the data rewrite area 43 in step 5.

また、ここで、符号化計算部32の符号化ルールにECCのようなビットエラー検出とビットエラー訂正能力を兼ね備えた符号を用いる構成では、単一ビット故障についてはビット故障の訂正が可能である。   Here, in a configuration in which a code having both bit error detection and bit error correction capability such as ECC is used for the encoding rule of the encoding calculation unit 32, a bit failure can be corrected for a single bit failure. .

この場合、アベイラビリティを向上させるために、単一ビット故障を検出した際にはビットエラーを訂正し、システム制御を継続することも可能である。この場合、複数ビットの故障時において単一ビット故障を誤検出する恐れがあるが、その際でも該当メモリアドレスがデータ書き換え領域43の対象となった際にステップ4の処理により故障検出が行われる。   In this case, in order to improve availability, when a single bit failure is detected, it is possible to correct the bit error and continue the system control. In this case, there is a possibility that a single bit failure is erroneously detected in the case of a failure of a plurality of bits, but even at that time, when the corresponding memory address becomes the target of the data rewrite area 43, the failure detection is performed by the process of step 4. .

(ステップ6)
ステップ2〜ステップ5のメモリ故障検出処理の後、データ書き換え領域43のデータは、ステップ2で読み出しておいた元のデータに検出用データ書き換え部34が書き戻す。(即ち、データ書き換え領域43の特定の変化ルールで変換処理されたデータを逆変換して上書きすることを以後「書き戻す」と言う。)。
(Step 6)
After the memory failure detection processing in steps 2 to 5, the data rewriting area 43 writes the data in the data rewriting area 43 back to the original data read in step 2. (In other words, the reverse conversion of the data converted by the specific change rule in the data rewrite area 43 and overwriting is hereinafter referred to as “writing back”).

また、データ書き換え領域43のデータは、書き戻さずに、ステップ3によって書き換えた値のままであっても構わない。書き戻さない場合、アドレス変換部31は、書き換え処理を行ったデータ書き換え領域43の故障検出用アドレスnhを記憶しておき、新たに、同一アドレスに書き込みがあるまで、同アドレスからの読み出しデータにステップ3と同一の特定の変化ルールでの変換処理を行う。   Further, the data in the data rewrite area 43 may remain as the value rewritten in step 3 without being rewritten. When not writing back, the address conversion unit 31 stores the failure detection address nh of the data rewriting area 43 that has been subjected to the rewriting process, and newly reads data from the same address until there is writing to the same address. A conversion process with the same specific change rule as in step 3 is performed.

即ち、ステップ3がビット反転ならば再ビット反転、ステップ3が特定データパターンとのXOR演算ならば特定データパターンとの再XOR演算を行い、書き戻しのための処理時間を短縮する。   That is, if step 3 is bit inversion, re-bit inversion is performed, and if step 3 is an XOR operation with a specific data pattern, re-XOR operation with a specific data pattern is performed to shorten the processing time for writing back.

(ステップ7)
CPU20、または、命令受付部33からのデータ書き換え領域43のアドレス変更指令により、データ書き換え領域43の故障検出用アドレスを図2の故障検出用アドレス00h〜jh全範囲にわたって変化させ、ステップ2〜ステップ6を繰り返す。これによりメモリ40の全領域または図1のメモリ40のうち領域A〜Eのいずれかの領域の全範囲について、メモリ故障検出が完了する。
(Step 7)
In response to an address change command for the data rewrite area 43 from the CPU 20 or the instruction accepting unit 33, the failure detection address in the data rewrite area 43 is changed over the entire range of the failure detection addresses 00h to jh in FIG. Repeat 6 Thereby, the memory failure detection is completed for the entire area of the memory 40 or the entire range of any of the areas A to E in the memory 40 of FIG.

ここでアドレス変更指令を命令受付部33から行う場合、データ書き換え領域43のアドレスは、最初にCPU20から与えられたアドレスを元に。予め設定されるアドレス更新ルール(例えば1ずつインクリメント)により自動的に変化させることにより行う。   Here, when an address change command is issued from the instruction receiving unit 33, the address of the data rewrite area 43 is based on the address first given from the CPU 20. This is performed by automatically changing according to a preset address update rule (for example, incrementing by one).

(ステップ8)
ステップ1〜ステップ7が完了する都度、検出用データ書き換え部34による特定の変化ルールに基づく変換処理を、ビット演算から排他的論理和へ、排他的論理和からビット演算へ、また排他的論理和についても別々のデータパターンに基づくものへ、変更してステップ1〜ステップ7を繰り返しても良い。
(Step 8)
Each time Step 1 to Step 7 are completed, the conversion processing based on a specific change rule by the detection data rewriting unit 34 is changed from bit operation to exclusive OR, from exclusive OR to bit operation, and to exclusive OR. Also, the steps 1 to 7 may be repeated by changing to those based on different data patterns.

ステップ8の例では、例えば、同一アドレスのデータ領域41内部の近傍ビット間のカップリング故障など、単一の変化ルールに基づく変換処理で検出出来ない故障についても、変化ルールを変更する事により検出できる可能性がある。   In the example of step 8, for example, a failure that cannot be detected by conversion processing based on a single change rule, such as a coupling failure between neighboring bits in the data area 41 of the same address, is detected by changing the change rule. There is a possibility.

上記ステップ1〜ステップ6の処理のうち、CPU20が関与するのはステップ1の処理のみで、他のステップ2〜6の処理は、メモリ故障検出部30とメモリ40とにより自動的に実行される。   Of the processes in steps 1 to 6, the CPU 20 is involved only in the process in step 1, and the other processes in steps 2 to 6 are automatically executed by the memory failure detection unit 30 and the memory 40. .

また、ステップ7のアドレス変更指令を命令受付部33から行う場合は、ステップ7もCPU20が関与せず実行することが出来る。   Further, when the instruction for changing the address in Step 7 is issued from the instruction receiving unit 33, Step 7 can also be executed without involving the CPU 20.

このように本第1の実施形態によれば、カップリング故障モードに対応したメモリ故障検出の大部分の処理を、CPU20を介さずにメモリ故障検出部30による、例えば、FPGA(Field-Programmable Gate Array)のようなハードウェア処理により実施でき、メモリ故障検出の制御用のCPU20のプロセッサ処理時間を低減することができる。   As described above, according to the first embodiment, most of the memory failure detection processing corresponding to the coupling failure mode is performed by the memory failure detection unit 30 without using the CPU 20, for example, an FPGA (Field-Programmable Gate). This can be implemented by hardware processing such as (Array), and the processor processing time of the CPU 20 for controlling memory failure detection can be reduced.

これによりCPU20はステップ1で命令受付部33に命令を与えた後は、メモリ故障検出以外の制御処理に専念することが出来、制御装置10のメモリ40のメモリ容量が増加しても、CPU20に負荷をかけずにメモリの故障検出を実行することができる。   As a result, after giving the instruction to the instruction receiving unit 33 in step 1, the CPU 20 can concentrate on the control processing other than the memory failure detection. Even if the memory capacity of the memory 40 of the control device 10 increases, the CPU 20 Memory failure detection can be performed without applying a load.

即ち、CPU40は、メモリ故障検出部30に対して、故障検出用アドレスjh、データ領域41、データ書き換え領域43を指定する「メモリ故障検出」命令を送信し、メモリ故障検出部30は、「メモリ故障検出」命令に基づくデータ領域41のアドレスに対して、書き込み時の符号化データと、メモリ40のから読み出して符号化した符号化データと、を比較し、その相違の有無から全検査対象データ領域のメモリの故障を検出する。   That is, the CPU 40 transmits a “memory failure detection” command for designating the failure detection address jh, the data area 41, and the data rewrite area 43 to the memory failure detection unit 30. The encoded data at the time of writing is compared with the encoded data read from the memory 40 and encoded with respect to the address of the data area 41 based on the “failure detection” instruction, and all inspection target data is determined based on the difference between the encoded data. Detect a memory failure in the region.

したがって、第1の実施形態に拠れば、CPUとそのメモリを備える制御装置のメモリ故障検出において、CPUの処理負担を軽減し、メモリの故障検出に要するCPU処理時間を短縮するとともに、メモリのカップリング故障検出が効率よく行えるようにした制御装置、及びそのメモリ故障検出方法、その自己診断方法を提供することができる。   Therefore, according to the first embodiment, the CPU processing load is reduced in the memory failure detection of the control device including the CPU and its memory, the CPU processing time required for the memory failure detection is reduced, and the memory cup It is possible to provide a control device capable of efficiently detecting a ring fault, a memory fault detection method thereof, and a self-diagnosis method thereof.

(第2の実施形態)
次に、本発明に係るメモリ故障検出装置の第2の実施形態について図4、5を参照して説明する。第2の実施形態の各部について第1の実施形態と同一の部分は同じ符号を付し、その説明を省略する。
(Second Embodiment)
Next, a second embodiment of the memory failure detection apparatus according to the present invention will be described with reference to FIGS. About each part of 2nd Embodiment, the part same as 1st Embodiment attaches | subjects the same code | symbol, and abbreviate | omits the description.

第2の実施形態が第1の実施形態と異なる点は、図4に示すように、データ書き換え領域43は、データ領域41のデメモリデータアクセス幅全体ではなく、データアクセス幅方向の一部のデータ書き換え領域43aを対象とするようにしたことにある。   As shown in FIG. 4, the second embodiment is different from the first embodiment in that the data rewrite area 43 is not the entire dememory data access width of the data area 41 but a part of the data access width direction. This is because the data rewrite area 43a is targeted.

第1の実施形態の処理ステップ7においては、本実施形態2では、データ書き換え領域43aのアドレスは、図4の故障検出用アドレス00h〜jh全範囲を網羅するように、図5の矢印線で示すように走査する。   In the processing step 7 of the first embodiment, in the second embodiment, the address of the data rewrite area 43a is indicated by the arrow line in FIG. 5 so as to cover the entire range of the failure detection addresses 00h to jh in FIG. Scan as shown.

この走査では、故障検出用アドレスだけでなく、メモリデータアクセス幅の位置も変える。   In this scan, not only the failure detection address but also the position of the memory data access width is changed.

本第2の実施形態の構成により、以下の効果が得られる。例えば、第1の実施形態における同一の故障検出用アドレスのデータ領域41内部の近傍ビット間のカップリング故障が起きていて、且つ、メモリ故障検出の処理動作に入る前からデータ領域41に備えられたデータが0000hなど、データ領域41の全体について同一の値であった場合には、第1の実施形態の仕組みでは、同一データをビット反転してもXOR演算しても書き換え後のデータ領域41の値が全ビット同じ値になるのは自明であり、近傍ビット間のカップリング故障が起きていた場合は、これを検出することが出来ない。   The following effects are obtained by the configuration of the second embodiment. For example, the coupling failure between adjacent bits in the data area 41 of the same failure detection address in the first embodiment occurs, and the data area 41 is provided before the processing operation of the memory failure detection starts. If the data is the same value for the entire data area 41, such as 0000h, in the mechanism of the first embodiment, the rewritten data area 41 even if the same data is bit-inverted or XOR-calculated. It is self-evident that all the bits have the same value. If a coupling failure between neighboring bits has occurred, this cannot be detected.

一方、本第2の実施形態による故障検出では、カップリング故障が起きているビット間が図4のデータ書き換え領域43の境界を跨っている場合、カップリング故障が検出可能である。   On the other hand, in the failure detection according to the second embodiment, a coupling failure can be detected when the bit where the coupling failure occurs crosses the boundary of the data rewrite area 43 in FIG.

これにより、第2の実施形態によれば、近傍ビット間のカップリング故障などの第1の実施形態では検出不可能な故障に関しても、メモリ故障の検出が可能である。   Thus, according to the second embodiment, it is possible to detect a memory failure even for a failure that cannot be detected in the first embodiment, such as a coupling failure between neighboring bits.

(第3の実施形態)
次に、本発明の第3の実施形態について図6を参照して説明する。第3の実施形態の各部について、第1実施形態と同一部分は同一の符号を付し、その説明を省略する。
(Third embodiment)
Next, a third embodiment of the present invention will be described with reference to FIG. About each part of 3rd Embodiment, the same part as 1st Embodiment attaches | subjects the same code | symbol, and abbreviate | omits the description.

本発明の第3の実施形態が第1の実施形態と異なる点は、第1の実施形態においては、メモリ40の全記憶エリアは、実行中データ領域、及び検査対象データ領域の2つ以上の領域に予めCPU40で識別されていたが、第3の実施形態では、メモリ40の検査対象データ領域の分割位置が、図6に示すように複数の分割位置を変えて設定するようにしたことにある。   The third embodiment of the present invention is different from the first embodiment in that, in the first embodiment, the entire storage area of the memory 40 includes at least two data areas, that is, an executing data area and an inspection target data area. In the third embodiment, the division position of the inspection target data area in the memory 40 is set by changing a plurality of division positions as shown in FIG. 6. is there.

本第3の実施形態においては、第1の実施形態の処理ステップ1〜ステップ7が完了し、メモリ40の全検査対象データ領域A〜Eについてのメモリ故障検出処理が終了すると、次の「メモリ故障検出」命令からは、メモリ40の領域分割を図6における検査対象データ領域A‘〜F’のように、検査対象データ領域域A〜Eとは異なる故障検出用アドレス位置で分割し、処理ステップ1ないしステップ7を検査対象データ領域A’〜F’について実施する。   In the third embodiment, when the processing steps 1 to 7 of the first embodiment are completed and the memory failure detection processing for all the inspection target data areas A to E in the memory 40 is completed, the following “memory From the “failure detection” instruction, the area division of the memory 40 is divided at a failure detection address position different from the inspection target data area areas A to E as in the inspection target data areas A ′ to F ′ in FIG. Steps 1 to 7 are performed on the inspection target data areas A ′ to F ′.

以上の処理によって、下記の効果が得られる。メモリ40内のカップリング故障が、図6における検査対象データ領域A’〜F’の領域間を跨るような、例えば、領域Bと領域Cを跨るカップリング故障44に対しても、メモリ40の領域分割を変更した後は、カップリング故障が同一の領域C‘内に収まる様になり、第3の実施形態で示した処理ステップ1〜ステップ7の手順で故障検出が可能となる。   The following effects are acquired by the above processing. The coupling failure in the memory 40 also crosses between the areas of the inspection target data areas A ′ to F ′ in FIG. After the area division is changed, the coupling fault becomes within the same area C ′, and the fault can be detected by the processing steps 1 to 7 shown in the third embodiment.

以上、本第3の実施形態によれば、メモリ40の検査対象データ領域A’〜F’について、複数種の分割位置を設定可能とすることで、分割の境界を跨るカップリング故障の検出が可能となる。   As described above, according to the third embodiment, a plurality of types of division positions can be set for the inspection target data areas A ′ to F ′ of the memory 40, thereby detecting a coupling failure across the division boundary. It becomes possible.

(第4の実施形態)
本発明の第4の実施形態について、再び、図1を参照して説明する。第4の実施形態の各部について、第1の実施形態と同一部分は同じ符号を付し、その説明を省略する。
(Fourth embodiment)
The fourth embodiment of the present invention will be described again with reference to FIG. About each part of 4th Embodiment, the same part as 1st Embodiment attaches | subjects the same code | symbol, and abbreviate | omits the description.

第4の実施形態が第1の実施形態と異なる点は、CPU20が実行するプログラム構成として、更に、符号化計算部32と同一の符号化計算が可能な符号化プログラムを備え、CPU40は「自己診断」命令を命令受付部33に送るようにしたことにある。   The fourth embodiment is different from the first embodiment in that the program configuration executed by the CPU 20 is further provided with an encoding program capable of performing the same encoding calculation as the encoding calculation unit 32. This is because a “diagnosis” command is sent to the command receiving unit 33.

この構成においては、CPU40は、符号化計算部32と同じ符号化ルールで、一定のメモリデータアクセス幅のデータに対し、符号化計算が可能な構成、または、この演算にための構成を備えず、符号化プログラムによって求めた、データと符号化データとを対応付けして記憶する構成としても良い。   In this configuration, the CPU 40 does not have a configuration capable of performing an encoding calculation on data having a certain memory data access width or a configuration for this calculation with the same encoding rule as the encoding calculation unit 32. The data obtained by the encoding program and the encoded data may be stored in association with each other.

本第4の実施形態においては、符号化プログラムを備えるCPU40と、「自己診断」命令を受けた命令受付部33とは、符号化計算部32の正常動作を相互に検算する事が可能である。   In the fourth embodiment, the CPU 40 including the encoding program and the instruction receiving unit 33 that has received the “self-diagnosis” instruction can mutually verify the normal operation of the encoding calculation unit 32. .

この符号化計算の冗長化処理は、先ず、「自己診断」命令によって、命令受付部33に検算用の対象データが与えられる。   In this encoding calculation redundancy process, first, the target data for verification is given to the instruction receiving unit 33 by the “self-diagnosis” instruction.

そして、符号化計算部32は検算用の対象データを元に、検算用の符号化データを算出する。   Then, the encoding calculation unit 32 calculates encoded data for verification based on the target data for verification.

検算用の符号化データはメモリ故障検出部30からCPU20に返送され、符号化プログラムが有する符号化データと、CPU20メモリ故障検出部30から返送された、符号化計算部32による検算用の符号化データの一致確認を行う。   The encoded data for verification is returned from the memory failure detection unit 30 to the CPU 20, the encoded data included in the encoding program, and the encoding for verification by the encoding calculation unit 32 returned from the CPU 20 memory failure detection unit 30. Check the data match.

したがって、第4の実施形態によれば、CPU20は、命令受付部33による符号化データの検算機能を有する事により、符号化データと符号化計算部32の計算結果が一致しない場合は、CPU20かメモリ故障検出部30の何れかが故障していることを検出できる。   Therefore, according to the fourth embodiment, since the CPU 20 has the encoded data verification function by the instruction receiving unit 33, if the encoded data and the calculation result of the encoded calculation unit 32 do not match, the CPU 20 It can be detected that any one of the memory failure detection units 30 has failed.

本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   Although several embodiments of the present invention have been described, these embodiments are presented by way of example and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.

10 メモリ故障検出装置
20 CPU
30 メモリ故障検出部
31 アドレス変換部
32 符号化計算部
33 命令受付部
34 検出用データ書き換え部
40 メモリ
50 外部バス
10 Memory failure detection device 20 CPU
30 Memory failure detection unit 31 Address conversion unit 32 Coding calculation unit 33 Instruction reception unit 34 Data rewrite unit for detection 40 Memory 50 External bus

Claims (12)

制御プログラムを備え、自身の外部バスと接続される入出力部を介してプラントを制御するCPUと、
当該制御プログラム、及び前記制御プログラムで使用するデータを記憶するメモリと、
一方を前記CPUの外部バスと、他方を前記メモリとを接続して、前記CPUが前記制御プログラム起動時、または、前記制御プログラム実行中のアイドルタイムにおいて、予め設定される前記メモリの診断対象となるデータ領域を指定する「メモリ故障検出」命令に基づいて、当該データ領域の故障を診断するメモリ故障検出部と、
を備え、
前記メモリ故障検出部は、アドレス変換部と、符号化計算部と、命令受付部と、検出用データ書き換え部と、を備え、
前記命令受付部は、前記CPUからの「メモリ故障検出」命令を受信して、前記符号化計算部、前記アドレス変換部、及び前記検出用データ書き換え部に送り、
前記アドレス変換部は、前記CPUからの「メモリ故障検出」命令で前記メモリにデータを転送する場合には、前記制御プログラムの論理アドレスを前記メモリの物理アドレスに、また、前記メモリから前記CPUにデータを転送する場合には前記メモリの物理アドレスを前記論理アドレスに変換し、
前記符号化計算部は、前記「メモリ故障検出」命令に基づいて、前記データ領域にデータを書き込む場合、予め書き込まれる当該データ領域のデータに対して、予め設定される符号化ルールに基づく符号化演算を行い第1の符号化データを作成して、前記データ領域と対応付けられた符号領域に書き込み、前記CPUからの前記「メモリ故障検出」命令で前記メモリの故障診断を行う場合、当該データ領域から読み出したデータに対して前記符号化演算を行い第2の符号化データとし、前記第1の符号化データと前記第2の符号化データとを比較して、故障の有無を検出し、
前記検出用データ書き換え部は、前記CPUからの「メモリ故障検出」命令を、前記命令受付部を介して通知され、当該「メモリ故障検出」命令で予め設定される前記データ領域内のデータ書き換え領域のデータを予め設定される特定の変化ルールで変換処理した参照データに書き換え、更に、当該書き換え後の書き換えた筈のデータ書き換え領域のデータを読み出し、当該参照データと読み出し時のデータを比較して故障を検出し、
前記命令受付部は、前記CPUからの「メモリ故障検出」命令を受信して、前記符号化計算部、前記アドレス変換部、及び前記検出用データ書き換え部に送り、
前記CPUは、前記メモリ故障検出部に対して、前記故障検出用アドレス、前記データ領域、前記データ書き換え領域を指定する前記「メモリ故障検出」命令を送信し、
前記メモリ故障検出部は、前記「メモリ故障検出」命令に基づく前記データ領域のアドレスに対して、書き込み時の第1の符号化データと、前記メモリのから読み出して符号化した第2の符号化データとを比較し、その相違の有無から前記データ書き換え領域のメモリの故障を判定し、
前記メモリのデータ書き換え領域を設定し、当該データ書き換え領域の書き込みデータと読み出しデータの符号化演算結果とを比較して、前記データ領域のメモリ故障を検出するようにしたことを特徴とする制御装置。
A CPU having a control program and controlling the plant via an input / output unit connected to its own external bus;
A memory for storing the control program and data used in the control program;
One of the external buses of the CPU is connected to the other, and the other is connected to the memory, and the memory is set as a diagnosis target of the memory that is set in advance when the control program is started or during idle time during execution of the control program. A memory failure detection unit for diagnosing a failure in the data region based on a “memory failure detection” command that designates a data region;
With
The memory failure detection unit includes an address conversion unit, an encoding calculation unit, an instruction reception unit, and a detection data rewriting unit,
The command receiving unit receives a “memory failure detection” command from the CPU and sends it to the encoding calculation unit, the address conversion unit, and the detection data rewriting unit,
When the address conversion unit transfers data to the memory in response to a “memory failure detection” command from the CPU, the logical address of the control program is changed to the physical address of the memory, and from the memory to the CPU. When transferring data, the physical address of the memory is converted to the logical address,
When the data is written in the data area based on the “memory failure detection” command, the coding calculation unit performs coding based on a preset coding rule for the data in the data area written in advance. When calculating and writing first encoded data, writing to the code area associated with the data area, and performing a memory fault diagnosis with the “memory fault detection” command from the CPU, the data Performing the encoding operation on the data read from the region to obtain the second encoded data, comparing the first encoded data and the second encoded data, detect the presence or absence of a failure,
The detection data rewriting unit is notified of a “memory failure detection” command from the CPU via the command receiving unit, and is a data rewriting region in the data region set in advance by the “memory failure detection” command. The data is rewritten with reference data converted according to a specific change rule set in advance, and further, the data in the data rewrite area after rewriting is read out, and the reference data and the data at the time of reading are compared. Detect faults,
The command receiving unit receives a “memory failure detection” command from the CPU and sends it to the encoding calculation unit, the address conversion unit, and the detection data rewriting unit,
The CPU transmits, to the memory failure detection unit, the “memory failure detection” command that designates the failure detection address, the data area, and the data rewrite area,
The memory failure detection unit includes a first encoded data at the time of writing and a second encoding that is read from the memory and encoded with respect to the address of the data area based on the “memory failure detection” command Compare the data, determine the failure of the memory in the data rewrite area from the presence or absence of the difference,
A control device characterized in that a data rewrite area of the memory is set and a memory failure in the data area is detected by comparing the write operation result of the write data and the read data of the data rewrite area. .
前記符号化計算部は、前記命令受付部からの指令で、前記検出用データ書き換え部が前記命令受付部からの指令で故障検出処理した前記データ書き換え領域以外のデータ領域のデータを読み出し、符号化演算処理を実行して求めた符号化データと、自身に保存する対応する符号化データとを比較照合して、故障検出するようにした請求項1に記載の制御装置。   The encoding calculation unit reads and encodes data in a data area other than the data rewrite area that has been subjected to failure detection processing by the detection data rewrite unit in response to a command from the command receiving unit. The control device according to claim 1, wherein the failure detection is performed by comparing and comparing the encoded data obtained by executing the arithmetic processing and the corresponding encoded data stored in itself. 前記検出用データ書き換え部は、前記特定の変化スールを複数備え、全ての前記データ領域の故障検出が完了すると、予め設定される当該特定の変化スールに基づいて、前記書き換え領域のデータを書き換えるようにしたことを特徴とする請求項1に記載の制御装置。   The detection data rewriting unit includes a plurality of the specific change tools and, when failure detection of all the data areas is completed, rewrites the data in the rewrite area based on the specific change tools set in advance. The control device according to claim 1, wherein 前記CPUは、前記「メモリ故障検出」命令において、前記故障検出用アドレスの先頭アドレスのみを送信し、
前記命令受付部は、前記データ書き換え領域を指定するアドレスを自動的に更新するようにした請求項1に記載の制御装置。
The CPU transmits only the first address of the failure detection address in the “memory failure detection” instruction,
The control device according to claim 1, wherein the instruction receiving unit automatically updates an address designating the data rewriting area.
前記検出用データ書き換え部は、前記「メモリ故障検出」命令に基づく処理が終了し、前記制御プログラムの処理に移行後も、書き換えた前記データ書き換え領域のデータを逆変換処理して再書き込みする書き戻しをせず、
前記アドレス変換部は、当該書き換えた前記故障検出用アドレスを記憶し、
前記CPUから当該故障検出用アドレスに書き込み命令があるまでは、前記故障検出用アドレスから読み出したデータに対して、前記検出用データ書き換え部による前記逆変換処理を行って前記CPUに送信するようにした請求項1に記載の制御装置。
The detection data rewrite unit performs a reverse conversion process on the rewritten data in the data rewrite area after the process based on the “memory failure detection” command is completed and the process proceeds to the process of the control program. Without returning
The address conversion unit stores the rewritten address for failure detection,
Until the CPU has a write command to the failure detection address, the data read from the failure detection address is subjected to the reverse conversion process by the detection data rewriting unit and transmitted to the CPU. The control device according to claim 1.
前記符号化計算部の符号化ルールは、ビットエラー検出とビットエラー訂正が可能な符号を用いて、単一ビットエラーの場合には前記制御プログラムの継続処理を可能とした請求項1に記載の制御装置。   The encoding rule of the encoding calculation unit uses a code capable of bit error detection and bit error correction, and enables continuous processing of the control program in the case of a single bit error. Control device. 前記検出用データ書き換え部は、前記故障検出用アドレスが指定するデータ領域に対して、その一部領域を前記データ書き換え領域とするようにした請求項1に記載の制御装置。   2. The control device according to claim 1, wherein the detection data rewrite unit sets a partial area as the data rewrite area with respect to a data area specified by the failure detection address. 前記メモリの前記データ領域、前記データ書き換え領域は、複数種類を時分割で更新することにより、前記データ領域及び前記データ書き換え領域に基づく領域分割による境界に跨るメモリ故障を検出するようにした請求項1に記載の制御装置。   The data area of the memory and the data rewrite area are updated in a time division manner to detect a memory failure across a boundary due to an area division based on the data area and the data rewrite area. The control apparatus according to 1. 前記制御装置の自己診断機能であって、前記CPUは、前記メモリ故障検出部が実行する符号化計算機能を備え、
予め設定される「自己診断」命令を前記メモリ故障検出部に送信し、
前記「自己診断」命令に基づく診断用データを前記命令受付部に送信し
前記メモリ故障検出部では、前記診断用データに対して、予め設定される符号化演算を前記符号化計算部で実行して、その符号化データを前記CPUに返信し、
前記CPUでは、返信された符号化データと自身で演算した符号化データとを照合して、前記メモリ故障検出部または前記CPUの故障を自己診断するようにした請求項1に記載の制御装置。
A self-diagnosis function of the control device, wherein the CPU includes an encoding calculation function executed by the memory failure detection unit;
Send a “self-diagnosis” command set in advance to the memory failure detection unit,
The diagnostic data based on the “self-diagnosis” command is transmitted to the command receiving unit, and the memory failure detection unit executes a preset coding operation on the diagnostic data in the coding calculation unit. And return the encoded data to the CPU,
The control device according to claim 1, wherein the CPU collates the returned encoded data with the encoded data calculated by itself to self-diagnose a failure of the memory failure detection unit or the CPU.
制御プログラムを備え、自身の外部バスと接続される入出力部を介してプラントを制御するCPUと、
当該制御プログラム、及び前記制御プログラムで使用するデータを記憶するメモリと、
一方を前記CPUの外部バスと、他方を前記メモリとを接続して、前記CPUが前記制御プログラム起動時、または前期制御プログラム実行中のアイドルタイムにおいて、予め設定される前記メモリの診断対象となるデータ領域を指定する「メモリ故障検出」命令に基づいて、当該データ領域の故障を診断するメモリ故障検出部と、
を備える制御装置のメモリの故障検出方法であって、
前記CPUは、前記メモリ故障検出部に対して、前記故障検出用アドレス、前記データ領域、前記データ書き換え領域を指定する前記「メモリ故障検出」命令を送信し、
前記メモリ故障検出部は、前記「メモリ故障検出」命令に基づく前記データ領域のアドレスに対して、書き込み時の第1の符号化データと、前記メモリのから読み出して符号化した第2の符号化データとを比較し、その相違の有無から前記データ書き換え領域のメモリの故障を判定し、
前記メモリのデータ書き換え領域を設定し、この領域の書き込みデータと読み出しデータの符号化演算結果を比較して、前記データ領域のメモリ故障を検出するようにしたことを特徴とする制御装置のメモリ故障検出方法。
A CPU having a control program and controlling the plant via an input / output unit connected to its own external bus;
A memory for storing the control program and data used in the control program;
One is connected to the external bus of the CPU and the other is connected to the memory, and the CPU becomes a diagnosis target of the memory set in advance when the control program is started or during an idle time during the execution of the previous control program Based on a “memory failure detection” command that designates a data area, a memory failure detection unit that diagnoses a failure in the data area;
A memory failure detection method for a control device comprising:
The CPU transmits, to the memory failure detection unit, the “memory failure detection” command that designates the failure detection address, the data area, and the data rewrite area,
The memory failure detection unit includes a first encoded data at the time of writing and a second encoding that is read from the memory and encoded with respect to the address of the data area based on the “memory failure detection” command Compare the data, determine the failure of the memory in the data rewrite area from the presence or absence of the difference,
A memory failure in a control device, wherein a data failure area in the memory is detected by setting a data rewrite area in the memory and comparing the result of encoding operation of write data and read data in the area Detection method.
更に、前記「メモリ故障検出」で処理した前記データ書き換え領域以外のデータ領域のデータを読み出して求めた符号化データと、自身に保存する対応する前記「メモリ故障検出」処理前の符号化データとを比較照合して、故障検出するようにしたことを特徴とする請求項10に記載の制御装置のメモリ故障検出方法。   Furthermore, the encoded data obtained by reading out data in the data area other than the data rewrite area processed in the “memory failure detection”, and the corresponding encoded data before the “memory failure detection” process stored in the memory 11. The memory failure detection method for a control device according to claim 10, wherein a failure is detected by comparing and comparing the two. 制御プログラムを備え、自身の外部バスと接続される入出力部を介してプラントを制御するCPUと、
当該制御プログラム、及び前記制御プログラムで使用するデータを記憶するメモリと、
一方を前記CPUの外部バスと、他方を前記メモリとを接続して、前記CPUが前記制御プログラムの起動時、または、前期制御プログラム実行中のアイドルタイムにおいて、予め設定される前記メモリの診断対象となるデータ領域を指定する「メモリ故障検出」命令に基づいて、当該データ領域の故障を診断するメモリ故障検出部と、
を備える制御装置の制御装置の自己診断方法であって、
前記CPUは、前記メモリ故障検出部が実行する符号化計算機能を備え、
予め設定される「自己診断」命令とその診断用データを前記メモリ故障検出部に送信し、
前記メモリ故障検出部では、前記診断用データに対して、予め設定される符号化演算を実行して、その符号化データを前記CPUに返信し、
前記CPUでは、返信された符号化データと自身で演算した符号化データとを照合して、
前記メモリ故障検出部または前記CPUの故障を自己診断するようにしたことを特徴とする制御装置の自己診断方法。
A CPU having a control program and controlling the plant via an input / output unit connected to its own external bus;
A memory for storing the control program and data used in the control program;
One of the external buses of the CPU is connected to the other, and the other is connected to the memory. When the control program is started or during an idle time during the execution of the previous control program, the memory diagnosis target set in advance A memory failure detection unit for diagnosing a failure in the data region based on a “memory failure detection” command that designates a data region to be
A control device self-diagnosis method for a control device comprising:
The CPU includes an encoding calculation function executed by the memory failure detection unit,
Send a “self-diagnosis” command set in advance and its diagnostic data to the memory failure detection unit,
The memory failure detection unit performs a preset encoding operation on the diagnostic data, and returns the encoded data to the CPU.
The CPU collates the returned encoded data with the encoded data calculated by itself,
A self-diagnosis method for a control device, wherein the memory failure detection unit or CPU failure is self-diagnosed.
JP2012040292A 2012-02-27 2012-02-27 Control device, memory failure detection method thereof and self-diagnostic method thereof Pending JP2013175118A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012040292A JP2013175118A (en) 2012-02-27 2012-02-27 Control device, memory failure detection method thereof and self-diagnostic method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012040292A JP2013175118A (en) 2012-02-27 2012-02-27 Control device, memory failure detection method thereof and self-diagnostic method thereof

Publications (1)

Publication Number Publication Date
JP2013175118A true JP2013175118A (en) 2013-09-05

Family

ID=49267952

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012040292A Pending JP2013175118A (en) 2012-02-27 2012-02-27 Control device, memory failure detection method thereof and self-diagnostic method thereof

Country Status (1)

Country Link
JP (1) JP2013175118A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160110148A (en) * 2015-03-09 2016-09-21 삼성전자주식회사 Memory devices and modules
CN108255746A (en) * 2017-12-29 2018-07-06 北京元心科技有限公司 Memory rewrites detection method and device
US10372558B2 (en) 2016-05-02 2019-08-06 Samsung Electronics Co., Ltd. Storage device, an operating method of the storage device and an operating method of a computing system including the storage device and a host device
US10445200B2 (en) 2016-05-02 2019-10-15 Samsung Electronics Co., Ltd. Storage device having various recovery methods and recovery modes
CN112102875A (en) * 2020-09-23 2020-12-18 深圳佰维存储科技股份有限公司 LPDDR test method, device, readable storage medium and electronic equipment

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160110148A (en) * 2015-03-09 2016-09-21 삼성전자주식회사 Memory devices and modules
KR102262575B1 (en) 2015-03-09 2021-06-09 삼성전자주식회사 Memory devices and modules
US10372558B2 (en) 2016-05-02 2019-08-06 Samsung Electronics Co., Ltd. Storage device, an operating method of the storage device and an operating method of a computing system including the storage device and a host device
US10445200B2 (en) 2016-05-02 2019-10-15 Samsung Electronics Co., Ltd. Storage device having various recovery methods and recovery modes
CN108255746A (en) * 2017-12-29 2018-07-06 北京元心科技有限公司 Memory rewrites detection method and device
CN112102875A (en) * 2020-09-23 2020-12-18 深圳佰维存储科技股份有限公司 LPDDR test method, device, readable storage medium and electronic equipment
CN112102875B (en) * 2020-09-23 2023-04-11 深圳佰维存储科技股份有限公司 LPDDR test method, device, readable storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
KR101606289B1 (en) Programmable controller
US10379946B2 (en) Controller
JP2013175118A (en) Control device, memory failure detection method thereof and self-diagnostic method thereof
US8255769B2 (en) Control apparatus and control method
JP5464128B2 (en) RAM failure diagnosis apparatus and program thereof
US6539338B1 (en) Self-diagnostic testing of a network interface adapter
US7484147B2 (en) Semiconductor integrated circuit
EP3955112A1 (en) Method and apparatus for memory error detection
JP7379932B2 (en) Control device, user program execution control method, and system program
El-Bayoumi An enhanced algorithm for memory systematic faults detection in multicore architectures suitable for mixed-critical automotive applications
JP5563700B2 (en) Control device
JP2016066344A (en) Memory diagnostic circuit
JP5632804B2 (en) Control device with bus diagnostic function
JP4357373B2 (en) High reliability control device
US11600352B2 (en) Storage device
JP5352815B2 (en) Control apparatus and control method
JP2014159982A (en) Semiconductor device and diagnostic method thereof
JP5521684B2 (en) Self-diagnosis device and self-diagnosis method
JP6358122B2 (en) Microcomputer
WO2019211927A1 (en) Memory diagnosis device and memory diagnosis method
CN116931825A (en) Method for operating a memory unit and executing an application program with memory checking
JP2014225110A (en) Safety controller
JP2018163539A (en) Self-diagnosis method and self-diagnosis program
JP2012048277A (en) Semiconductor integrated circuit, debugging system, debugging method, debugging program, and recording medium
JP2011227646A (en) Computer diagnosis device and diagnosis method

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20150216

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20150218