JP2016194839A - Control device and communication interface circuit - Google Patents

Control device and communication interface circuit Download PDF

Info

Publication number
JP2016194839A
JP2016194839A JP2015074713A JP2015074713A JP2016194839A JP 2016194839 A JP2016194839 A JP 2016194839A JP 2015074713 A JP2015074713 A JP 2015074713A JP 2015074713 A JP2015074713 A JP 2015074713A JP 2016194839 A JP2016194839 A JP 2016194839A
Authority
JP
Japan
Prior art keywords
data
unit
control
buffer memory
monitoring data
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
JP2015074713A
Other languages
Japanese (ja)
Inventor
植田 基之
Motoyuki Ueda
基之 植田
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.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Co 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 Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP2015074713A priority Critical patent/JP2016194839A/en
Publication of JP2016194839A publication Critical patent/JP2016194839A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Testing And Monitoring For Control Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To prepare a communication buffer memory of a control device against soft errors without sacrificing realtimeness and simultaneity.SOLUTION: A computation unit 102 obtains monitor data RCD or control data TXD from a communication unit 101 or CPU 110, respectively, and then computes ECC from the data and writes the ECC in association with the data used for the computation in a storage unit 103. The computation unit 102 then writes the data in a communication buffer memory 120. A validation unit 104 responds to a read instruction from the CPU 110 by reading data instructed by the CPU 110 from the communication buffer memory 120. Next, the validation unit 104 reads ECC corresponding to the data from the storage unit 103, validates presence/non-presence of soft errors in the data based on the ECC, and makes corrections if soft errors present are one-bit errors.SELECTED DRAWING: Figure 3

Description

本発明は、制御システムにおけるソフトエラーの検出および訂正を行う技術に関する。   The present invention relates to a technique for detecting and correcting soft errors in a control system.

工場や各種プラント等の産業施設に設置される制御システムには、産業施設内に設置されたセンサからの監視データの収集やその収集結果に応じて電動機等の駆動制御を行う制御装置が含まれている。このような制御装置としては、DCS(Distributed Control System:分散型制御システム或いは分散型制御装置)やプログラマブルロジックコントローラ(以下、PLC)が用いられる。一般的なFA(Factory Automation)システムでは制御装置としてPLCが用いられることが多く、高信頼性を要求されるプラント設備では制御装置としてDCSが用いられることが多い。   Control systems installed in industrial facilities such as factories and various plants include control devices that collect monitoring data from sensors installed in industrial facilities and control the drive of electric motors according to the results of the collection. ing. As such a control device, a DCS (Distributed Control System) or a programmable logic controller (hereinafter, PLC) is used. In a general FA (Factory Automation) system, PLC is often used as a control device, and in plant facilities that require high reliability, DCS is often used as a control device.

この種の制御システムでは、制御装置は所定のアプリケーションを実行することにより、センサから監視データを収集し、当該データを基に制御対象機器を制御するための制御データを生成するという処理を繰り返し実行する。この繰り返し実行される処理の単位はタクトと呼ばれる。制御装置は半導体メモリなどの内部メモリを有しており、この内部メモリには、上記アプリケーションを実現するためのプログラムが予め記憶されている。   In this type of control system, the control device repeatedly executes a predetermined application to collect monitoring data from the sensor and generate control data for controlling the control target device based on the data. To do. The unit of processing that is repeatedly executed is called a tact. The control device has an internal memory such as a semiconductor memory, and a program for realizing the application is stored in the internal memory in advance.

内部メモリに記憶されたプログラムやデータ、或いは制御装置のCPU(Central Processing Unit)内部のキャッシュメモリに格納されたデータの構成ビットのうちの1または複数が、中性子線やα線の影響で反転する現象が知られている。この現象はソフトエラーと呼ばれている。制御装置が実行するプログラムにソフトエラーが発生すると、誤った処理が為され、制御の継続に支障が生じる場合がある。このため、プログラム等を格納するメモリやCPU内部のキャッシュメモリには、例えば冗長ビットの付加や属性情報の付加等のソフトエラー対策が施されている。   One or more of the constituent bits of the program or data stored in the internal memory or the data stored in the cache memory inside the CPU (Central Processing Unit) of the control device is inverted due to the influence of neutron rays or α rays. The phenomenon is known. This phenomenon is called soft error. When a soft error occurs in a program executed by the control device, an erroneous process may be performed, which may hinder control continuation. For this reason, countermeasures against soft errors such as addition of redundant bits and addition of attribute information are taken in a memory for storing programs and the like and a cache memory in the CPU.

ソフトエラーはCPU内部のキャッシュメモリ等に格納されたデータ等だけでなく、通信バッファメモリに格納されたデータにも発生する場合がある。通信バッファメモリとは、電動機などの制御対象機器やセンサ等とのデータ通信用に制御装置に設けられているバッファメモリである。例えば、センサ等から制御装置へ送信された監視データは一旦通信バッファメモリに格納され、その後、CPUによって読み出される、といった具合である。通信バッファメモリに格納された監視データにソフトエラーが発生した場合、誤った制御データが生成される可能性があり、制御の継続に支障が生じる虞がある。通信バッファメモリの一例としてはSRAMが挙げられる。このような通信バッファメモリに関するソフトエラーの検出を目的とした技術としては、特許文献1に開示の技術が挙げられる。   A soft error may occur not only in data stored in a cache memory or the like inside the CPU but also in data stored in a communication buffer memory. The communication buffer memory is a buffer memory provided in the control device for data communication with devices to be controlled such as electric motors and sensors. For example, the monitoring data transmitted from the sensor or the like to the control device is temporarily stored in the communication buffer memory and then read out by the CPU. When a soft error occurs in the monitoring data stored in the communication buffer memory, erroneous control data may be generated, and there is a possibility that the continuation of control may be hindered. An SRAM is an example of the communication buffer memory. As a technique for detecting a soft error related to such a communication buffer memory, a technique disclosed in Patent Document 1 can be cited.

特許文献1には、ソフトエラー検出機能を備えた通信用FPGA(Field Programmable Gate
Array)が開示されている。CPUがメインメモリから送信データを読み出し、当該データをこのFPGA内部のバッファメモリに書き込むと、FPGAは当該送信データと所定の保持データとの排他的論理和(第1の排他的論理和)を算出し、当該第1の排他的論理和を示す排他的論理和データを記憶する。送信データの送信時、FPGAはバッファメモリから読み出した送信データと第1の排他的論理和との排他的論理和(第2の排他的論理和)を算出する。そして、FPGAは算出した第2の排他的論理和と保持データとを比較し、当該第2の排他的論理和が保持データと一致しない場合にはエラーが発生していると判断し送信データの送信を停止する。
Patent Document 1 discloses a field programmable gate (FPGA) for communication having a soft error detection function.
Array) is disclosed. When the CPU reads the transmission data from the main memory and writes the data to the buffer memory inside the FPGA, the FPGA calculates an exclusive OR (first exclusive OR) between the transmission data and predetermined hold data. Then, exclusive OR data indicating the first exclusive OR is stored. At the time of transmission of transmission data, the FPGA calculates an exclusive OR (second exclusive OR) of the transmission data read from the buffer memory and the first exclusive OR. Then, the FPGA compares the calculated second exclusive OR with the retained data, and if the second exclusive OR does not match the retained data, it determines that an error has occurred and the transmission data Stop sending.

また、外部機器から受信した受信データがFPGA内部のバッファメモリに書き込まれると、FPGAは当該受信データと所定の保持データとの排他的論理和(第1の排他的論理和)を算出し、当該第1の排他的論理和を示す排他的論理和データを記憶する。CPUがバッファメモリから受信データを読み出すと、FPGAは当該受信データと第1の排他的論理和との排他的論理和(第2の排他的論理和)を算出する。そして、FPGAは算出した第2の排他的論理和と保持データとを比較し、当該第2の排他的論理和が保持データと一致しない場合にはエラーが発生していると判断し受信データを破棄する。   When the received data received from the external device is written to the buffer memory inside the FPGA, the FPGA calculates an exclusive OR (first exclusive OR) between the received data and the predetermined retained data. Exclusive OR data indicating the first exclusive OR is stored. When the CPU reads the received data from the buffer memory, the FPGA calculates an exclusive OR (second exclusive OR) between the received data and the first exclusive OR. Then, the FPGA compares the calculated second exclusive OR with the held data, and if the second exclusive OR does not match the held data, it determines that an error has occurred and determines the received data Discard.

特開2014−86924号公報JP 2014-86924 A

制御システムに要求される特性として、リアルタイム性と同時性がある。リアルタイム性とは、次のタクトに跨ることなく1つのタクト内で監視データの受信から制御データの送信までを実行することを言う。また、同時性とは、複数の監視データを一括して処理する場合、いずれか1つでも監視データが欠けることにより制御データの生成が妨げられることがないよう、1つのタクト内で受信すべき複数の監視データをすべて受信することを言う。制御システムには、リアルタイム性と同時性の充足が要求されるのであるが、制御システムの通信バッファメモリについてのソフトエラー対策として特許文献1に開示の技術を用いると、リアルタイム性と同時性の確保に支障が生じる虞がある。その理由は以下の通りである。   Properties required for the control system include real-time performance and simultaneity. The real-time property refers to executing from monitoring data reception to control data transmission within one tact without straddling the next tact. In addition, simultaneity means that when a plurality of monitoring data is processed at a time, it should be received within one tact so that the generation of control data is not hindered by the lack of any monitoring data. Receiving all monitoring data. The control system is required to satisfy both real-time characteristics and simultaneity. However, when the technology disclosed in Patent Document 1 is used as a countermeasure against soft errors for the communication buffer memory of the control system, real-time characteristics and simultaneity are ensured. May cause trouble. The reason is as follows.

特許文献1に開示のFPGAは、送信データにソフトエラーを検出するとその送信を停止する。このため、通信バッファメモリに格納された制御データにソフトエラーが発生すると、制御対象機器への制御データの送信は停止する。この場合、このとき実行中のタクトでは制御データは制御対象機器に送信されず、リトライ、すなわち、次の周期のタクトでの制御データの送信が実行される。つまり、リアルタイム性が損なわれる。   The FPGA disclosed in Patent Document 1 stops transmission when a soft error is detected in transmission data. For this reason, when a soft error occurs in the control data stored in the communication buffer memory, transmission of the control data to the control target device is stopped. In this case, the control data is not transmitted to the control target device at the tact being executed at this time, and retry, that is, transmission of the control data at the tact of the next cycle is executed. That is, the real time property is impaired.

また、特許文献1に開示のFPGAは、受信データにソフトエラーを検出すると当該受信データを破棄する。このため、タクトの実行時、通信バッファメモリに格納された処理対象である複数の監視データの一部にソフトエラーが発生すると、この監視データは破棄される。この場合、処理に必要な監視データの一部がCPUに転送されず、同時性が損なわれる。   The FPGA disclosed in Patent Document 1 discards the received data when a soft error is detected in the received data. Therefore, when a tact is executed, if a soft error occurs in a part of the plurality of monitoring data to be processed stored in the communication buffer memory, the monitoring data is discarded. In this case, part of the monitoring data necessary for processing is not transferred to the CPU, and simultaneity is impaired.

この発明は、以上のような事情に鑑みてなされたものであり、リアルタイム性と同時性を損なうことなく、制御システムの通信バッファメモリにソフトエラー対策を施すことを可能にする技術を提供することを目的とする。   The present invention has been made in view of the circumstances as described above, and provides a technique that makes it possible to take measures against soft errors in a communication buffer memory of a control system without impairing real-time performance and simultaneity. With the goal.

上記課題を解決するために本発明は、受信した監視データを通信バッファメモリに書き込み、当該監視データを用いて制御対象機器を制御する制御データを演算し前記通信バッファメモリに書き込む制御装置に以下の算出部と記憶部と検証部とを設けることを特徴とする。算出部は、通信バッファメモリに書き込む監視データまたは制御データについて、少なくとも1ビットのエラーを訂正することができるエラーチェックコードを算出する。記憶部は、算出部により算出されたエラーチェックコードを、算出元のデータと対応付けて保持する。検証部は、通信バッファメモリからデータを読み出す際に当該データに対応するエラーチェックコードを記憶部から読み出し、当該エラーチェックコードを用いてエラーの有無の検証を行い、エラーの訂正を行う。   In order to solve the above problems, the present invention provides a control device that writes received monitoring data in a communication buffer memory, calculates control data for controlling a control target device using the monitoring data, and writes the control data in the communication buffer memory. A calculation unit, a storage unit, and a verification unit are provided. The calculation unit calculates an error check code capable of correcting an error of at least one bit for the monitoring data or control data written to the communication buffer memory. The storage unit holds the error check code calculated by the calculation unit in association with the calculation source data. When the data is read from the communication buffer memory, the verification unit reads an error check code corresponding to the data from the storage unit, verifies the presence or absence of an error using the error check code, and corrects the error.

本発明によれば、エラーチェックコードが1ビットの誤りの訂正および2ビットのビット誤りの検出を可能なものであれば、通信バッファメモリ内のデータにソフトエラーが発生しても、1ビットのビット誤りであれば、検証部によってそのビット誤りは訂正される。このため、本発明を制御システムに適用すると、通信バッファメモリ内のデータ(監視対象機器から受信した監視データおよび制御対象機器に送信する制御データ)にソフトエラーが発生しても1ビットのビット誤りであればタクトの実行時にリトライが発生することがなく、1つのタクトで所定の処理を完結することができる。したがって、従来技術に比べてリアルタイム性を確保することができる。また、1つのタクトにおいて複数の監視データを用いて制御データを演算する場合、当該処理に必要な監視データの一部にソフトエラーが発生したとしても、1ビットのビット誤りであれば、制御データの演算に必要な監視データの全てを揃えることができるので、従来技術に比べて同時性を確保することができる。   According to the present invention, if the error check code can correct a 1-bit error and detect a 2-bit bit error, even if a soft error occurs in the data in the communication buffer memory, If it is a bit error, the verification unit corrects the bit error. Therefore, when the present invention is applied to a control system, even if a soft error occurs in data in the communication buffer memory (monitoring data received from the monitoring target device and control data transmitted to the control target device), a 1-bit bit error occurs. If this is the case, no retry occurs during the execution of the tact, and the predetermined process can be completed with one tact. Therefore, real-time performance can be ensured as compared with the prior art. In addition, when calculating control data using a plurality of monitoring data in one tact, even if a soft error occurs in a part of the monitoring data necessary for the processing, if the bit error is 1 bit, the control data Since all of the monitoring data necessary for the calculation can be prepared, simultaneity can be ensured as compared with the prior art.

より好ましい態様においては、上記制御装置は、通信バッファメモリに書き込むデータを複製して通信バッファメモリに書き込む書き込み部を備え、検証部は、複製元のデータと複製されたデータの少なくとも一方に対して上記検証を行うことを特徴とする。詳細については後述するが、本態様によれば、複製元のデータと複製されたデータの両方に訂正不能なソフトエラーが発生しない限り、リトライを行う必要はない。したがって、上記複製を行わない態様に比較してより高い確度でリアルタイム性および同時性を確保することが可能になる。なお、検証部における検証態様としては、複製元のデータに対する検証と複製されたデータに対する検証を並列に実行する態様と、両者を直列に実行する態様とが考えられる。両者を直列に実行する態様とは、複製元のデータおよび複製されたデータのうち、予め定められた一方について上記検証を実行し、当該検証により訂正不能なエラーが検出された場合に他方についての上記検証を実行する態様である。   In a more preferred aspect, the control device includes a writing unit that replicates data to be written to the communication buffer memory and writes the data to the communication buffer memory, and the verification unit is configured to perform at least one of the replication source data and the replicated data. The verification is performed. Although details will be described later, according to this aspect, it is not necessary to perform a retry unless an uncorrectable soft error occurs in both the replication source data and the replicated data. Therefore, it is possible to ensure real-time performance and simultaneity with higher accuracy compared to the above-described mode in which replication is not performed. In addition, as a verification aspect in a verification part, the aspect which performs the verification with respect to the replication source data and the verification with respect to the replicated data in parallel, and the aspect which performs both in series are considered. A mode in which both are executed in series means that the above verification is performed on one of the replication source data and the replicated data, and when an uncorrectable error is detected by the verification, This is a mode for executing the verification.

上記課題を解決するために本発明は、制御システムにおける制御装置用の通信インタフェース回路として、以下の算出部、記憶部、および検証部を備える通信インタフェース回路を提供する。算出部は、通信バッファメモリに書き込むデータについて、少なくとも1ビットのエラーを訂正することができるエラーチェックコードを算出する。通信インタフェース回路が通信バッファメモリに書き込むデータの具体例としては、センサ等から受信して制御装置のCPUへ引き渡す監視データと、当該CPUから受け取って制御対象機器へ送信する制御データが挙げられる。記憶部は、算出部により算出されたエラーチェックコードをその算出元となったデータと対応付けて保持する。検証部は、通信バッファメモリからのデータの読み出し指示を与えられたことを契機として、通信バッファメモリから該当データを読み出すとともに、当該データに対応するエラーチェックコードを記憶部から読み出し、当該エラーチェックコードを用いてエラーの有無の検証を行い、エラーの訂正を行う。そして、本通信インタフェース回路は、検証部による検証を経たデータを読み出し指示の送信元へ出力する。従来の制御装置における通信インタフェース回路を本発明の通信インタフェース回路に置き換えることで、当該制御装置を本発明の制御装置として機能させることが可能になる。   In order to solve the above problems, the present invention provides a communication interface circuit including the following calculation unit, storage unit, and verification unit as a communication interface circuit for a control device in a control system. The calculation unit calculates an error check code that can correct an error of at least one bit for data to be written to the communication buffer memory. Specific examples of data that the communication interface circuit writes to the communication buffer memory include monitoring data received from a sensor or the like and delivered to the CPU of the control device, and control data received from the CPU and transmitted to the control target device. The storage unit holds the error check code calculated by the calculation unit in association with the data that is the calculation source. When the verification unit is given an instruction to read data from the communication buffer memory, the verification unit reads the corresponding data from the communication buffer memory and reads the error check code corresponding to the data from the storage unit. Is used to verify the presence of an error and correct the error. Then, the communication interface circuit outputs the data that has been verified by the verification unit to the source of the read instruction. By replacing the communication interface circuit in the conventional control device with the communication interface circuit of the present invention, the control device can function as the control device of the present invention.

この発明によれば、リアルタイム性と同時性を損なうことなく、制御システムの通信バッファメモリにソフトエラー対策を施すことが可能になる。   According to the present invention, it is possible to take measures against a soft error in the communication buffer memory of the control system without impairing real-time performance and simultaneity.

本発明の第1実施形態である制御装置10を含む制御システム1の構成例を示す図である。It is a figure which shows the structural example of the control system 1 containing the control apparatus 10 which is 1st Embodiment of this invention. 同実施形態における制御装置10の構成を示す図である。It is a figure which shows the structure of the control apparatus 10 in the embodiment. 同実施形態における通信インタフェース回路100の構成を示す図である。It is a figure which shows the structure of the communication interface circuit 100 in the embodiment. 本発明の第2実施形態である制御装置20の構成を示す図である。It is a figure which shows the structure of the control apparatus 20 which is 2nd Embodiment of this invention. 同実施形態において、算出部202が実行するECC算出処理およびデータ格納処理の内容を示すフローチャートである。4 is a flowchart showing the contents of ECC calculation processing and data storage processing executed by a calculation unit 202 in the embodiment. 同実施形態において、検証部204が実行するソフトエラー検証処理の内容を示すフローチャートである。4 is a flowchart showing the contents of a soft error verification process executed by a verification unit 204 in the embodiment. 本発明の第3実施形態である制御装置30の構成を示す図である。It is a figure which shows the structure of the control apparatus 30 which is 3rd Embodiment of this invention. 選択部305が実行するデータ選択処理の内容を示すフローチャートである。It is a flowchart which shows the content of the data selection process which the selection part 305 performs.

<第1実施形態>
図1は、本発明の第1実施形態である制御装置10を含む制御システム1の構成例を示す図である。この制御システム1は、例えば工場や各種プラント等の産業施設において構築される。図1に示すように、制御システム1は、制御装置10、I/O機器20_n(n=1〜N:Nは任意の自然数)、監視対象機器30_nおよび制御対象機器40_nを有している。なお、図1以降の各図では、IO機器は、「I/O」と略記されている。
<First Embodiment>
FIG. 1 is a diagram illustrating a configuration example of a control system 1 including a control device 10 according to the first embodiment of the present invention. The control system 1 is constructed in an industrial facility such as a factory or various plants. As shown in FIG. 1, the control system 1 includes a control device 10, an I / O device 20_n (n = 1 to N: N is an arbitrary natural number), a monitoring target device 30_n, and a control target device 40_n. 1 and the subsequent drawings, the IO device is abbreviated as “I / O”.

監視対象機器30_nと制御対象機器40_nは、I/O機器20_nを介して制御装置10に接続されている。I/O機器20_n、監視対象機器30_nおよび制御対象機器40_nは、従来の制御システムにおいて一般的に用いられているものと特段に変わるところはなく、概略は以下の通りである。監視対象機器30_nは、例えば産業施設内に設置されたセンサであり、監視データを収集し、当該監視データを制御装置10へ送信する。制御対象機器40_nは、例えば電動機であり、制御装置10から制御データを受信すると、当該制御データに基づいた駆動を行う。I/O機器20_nは、制御装置10と監視対象機器30_nとの間のデータ通信、或いは制御装置10と制御対象機器40_nとの間のデータ通信を中継する中継装置である。I/O機器20_nは、監視対象機器30_nから送信された監視データを受信すると、当該監視データを制御装置10に転送する。また、I/O機器20_nは、制御装置10から送信された制御データを受信すると、当該制御データを制御対象機器40_nに転送する。   The monitoring target device 30_n and the control target device 40_n are connected to the control device 10 via the I / O device 20_n. The I / O device 20_n, the monitoring target device 30_n, and the control target device 40_n are not particularly different from those generally used in the conventional control system, and are outlined as follows. The monitoring target device 30_n is, for example, a sensor installed in an industrial facility, collects monitoring data, and transmits the monitoring data to the control device 10. The control target device 40_n is, for example, an electric motor, and when it receives control data from the control device 10, it performs driving based on the control data. The I / O device 20_n is a relay device that relays data communication between the control device 10 and the monitoring target device 30_n or data communication between the control device 10 and the control target device 40_n. Upon receiving the monitoring data transmitted from the monitoring target device 30_n, the I / O device 20_n transfers the monitoring data to the control device 10. In addition, when receiving the control data transmitted from the control device 10, the I / O device 20_n transfers the control data to the control target device 40_n.

制御装置10は、例えばPLCである。制御装置10は、I/O機器20_nを介して監視対象機器30_nから監視データを受信すると、当該監視データを基に制御データを演算し、当該制御データをI/O機器20_nを介して制御対象機器40_nに送信する処理を実行する。   The control device 10 is, for example, a PLC. When receiving the monitoring data from the monitoring target device 30_n via the I / O device 20_n, the control device 10 calculates the control data based on the monitoring data, and the control data is controlled via the I / O device 20_n. A process of transmitting to the device 40_n is executed.

前述したように、監視データをI/O機器20_nから収集した後制御データを制御対象機器40_nに送信するまでの間に制御装置10が実行する一連の処理はタクトと呼ばれる。このタクトを所定の周期で繰り返し実行させることで、各制御対象機器40_nの駆動制御が実現される。本実施形態では、制御装置10に本発明の特徴を顕著に示す処理を実行させることで、リアルタイム性や同時性を損なうことなく、通信バッファメモリに対するソフトエラー対策を行うことが可能になっている。以下、制御装置10の詳細について説明する。   As described above, a series of processing executed by the control device 10 after collecting monitoring data from the I / O device 20_n and before transmitting control data to the control target device 40_n is called a tact. By repeatedly executing this tact with a predetermined period, drive control of each control target device 40_n is realized. In the present embodiment, by causing the control device 10 to execute processing that clearly shows the features of the present invention, it is possible to take measures against soft errors in the communication buffer memory without impairing real-time performance and simultaneity. . Details of the control device 10 will be described below.

図2は、制御装置10の構成を示す図である。図2に示すように、制御装置10は、通信インタフェース回路100、CPU110、通信バッファメモリ120を有している。   FIG. 2 is a diagram illustrating a configuration of the control device 10. As illustrated in FIG. 2, the control device 10 includes a communication interface circuit 100, a CPU 110, and a communication buffer memory 120.

通信バッファメモリ120は、例えばSRAM(Static Random Access Memory)であり、監視データおよび制御データを格納するために設けられたものである。本実施形態では、1つのタクトにおいて複数の監視対象機器30_nおよび複数の制御対象機器40_nとデータ通信する場合があり、そのため、通信バッファメモリ120として大容量のSRAMが採用されている。   The communication buffer memory 120 is, for example, an SRAM (Static Random Access Memory), and is provided for storing monitoring data and control data. In the present embodiment, data communication may be performed with a plurality of monitoring target devices 30_n and a plurality of control target devices 40_n in one tact. Therefore, a large-capacity SRAM is employed as the communication buffer memory 120.

CPU110は、制御装置10の制御中枢である。CPU110は、図示しない内部メモリに格納されているプログラムにしたがってタクトを周期的に実行する。より詳細には、CPU110は、通信バッファメモリ120に格納された監視データを基に制御データを演算し、その演算結果の制御データを通信バッファメモリ120に格納する動作をタクト毎に実行する。   The CPU 110 is a control center of the control device 10. The CPU 110 periodically executes tact according to a program stored in an internal memory (not shown). More specifically, the CPU 110 calculates control data based on the monitoring data stored in the communication buffer memory 120, and executes an operation for storing the control data of the calculation result in the communication buffer memory 120 for each tact.

通信インタフェース回路100は、例えばFPGAやASIC(Application Specific Integrated Circuit)であり、CPU110と通信バッファメモリ120との間のデータ授受を仲介するとともに外部機器(監視対象機器30_nや制御対象機器40_n)と通信バッファメモリ120との間のデータ授受を仲介するデータ通信機能を有している。より詳細に説明すると、通信インタフェース回路100は、監視対象機器30_nから受信した監視データを通信バッファメモリ120に書き込むとともに、CPU110からの指示に応じて当該監視データを通信バッファメモリ120から読み出してCPU110に与える。また通信インタフェース回路100は、CPU110から与えられた制御データを通信バッファメモリ120に書き込むとともに、CPU110からの指示に応じて当該制御データを通信バッファメモリ120から読み出し、その宛先の制御対象機器40_nへ送信する。加えて、通信インタフェース回路100は、通信バッファメモリ120に格納された監視データおよび制御データについてのソフトエラーの検出や訂正を行うための機能を有する。以下、通信インタフェース回路100の詳細を説明する。   The communication interface circuit 100 is, for example, an FPGA or an ASIC (Application Specific Integrated Circuit), mediates data exchange between the CPU 110 and the communication buffer memory 120, and communicates with external devices (the monitoring target device 30_n and the control target device 40_n). It has a data communication function that mediates data exchange with the buffer memory 120. More specifically, the communication interface circuit 100 writes the monitoring data received from the monitoring target device 30_n to the communication buffer memory 120, and reads the monitoring data from the communication buffer memory 120 in response to an instruction from the CPU 110 to the CPU 110. give. Further, the communication interface circuit 100 writes the control data given from the CPU 110 to the communication buffer memory 120, reads the control data from the communication buffer memory 120 according to an instruction from the CPU 110, and transmits the control data to the destination control target device 40_n. To do. In addition, the communication interface circuit 100 has a function for detecting and correcting soft errors in the monitoring data and control data stored in the communication buffer memory 120. Details of the communication interface circuit 100 will be described below.

図3は、通信インタフェース回路100の構成を示す図である。図3には、理解を容易にするため、通信インタフェース回路100に加えて、CPU110および通信バッファメモリ120が記載されている。通信バッファメモリ120は、監視データを記憶するためのリングバッファを形成する受信データ領域121_k(k=1〜m:mは任意の自然数)と制御データを記憶するためのリングバッファを形成する送信データ領域122_k(k=1〜m:mは任意の自然数)を有する。図3に示すように、通信インタフェース回路100は、通信部101、算出部102、記憶部103および検証部104を有している。通信部101、算出部102および検証部104は、通信インタフェース回路100が有するCPU(図示略)により実現されるソフトウェアモジュールである。また、記憶部103は、通信インタフェース回路100が有するメモリ(図示略)である。この図において、実線で示す矢印は監視データ(RXD)の転送過程を示し、破線で示す矢印は制御データ(TXD)の転送過程を示す。以下、図3を参照しながら、通信インタフェース回路100の各部の機能について、監視データの転送過程および制御データの転送過程に即して説明する。   FIG. 3 is a diagram illustrating a configuration of the communication interface circuit 100. FIG. 3 shows a CPU 110 and a communication buffer memory 120 in addition to the communication interface circuit 100 for easy understanding. The communication buffer memory 120 is a reception data area 121_k (k = 1 to m: m is an arbitrary natural number) that forms a ring buffer for storing monitoring data and transmission data that forms a ring buffer for storing control data It has area | region 122_k (k = 1-m: m is arbitrary natural numbers). As illustrated in FIG. 3, the communication interface circuit 100 includes a communication unit 101, a calculation unit 102, a storage unit 103, and a verification unit 104. The communication unit 101, the calculation unit 102, and the verification unit 104 are software modules realized by a CPU (not shown) included in the communication interface circuit 100. The storage unit 103 is a memory (not shown) included in the communication interface circuit 100. In this figure, an arrow indicated by a solid line indicates a transfer process of monitoring data (RXD), and an arrow indicated by a broken line indicates a transfer process of control data (TXD). Hereinafter, the function of each unit of the communication interface circuit 100 will be described with reference to FIG. 3 in accordance with the monitoring data transfer process and the control data transfer process.

まず、監視データの転送過程について説明する。通信部101は、I/O機器20_nを介して監視対象機器30_nから監視データRXDを受信すると、当該監視データを算出部102に与える。   First, the monitoring data transfer process will be described. When the communication unit 101 receives the monitoring data RXD from the monitoring target device 30_n via the I / O device 20_n, the communication unit 101 gives the monitoring data to the calculation unit 102.

算出部102は、通信部101から監視データRXDを受け取ると、当該監視データを基にエラーチェックコード(以下、ECCという)を算出する。本実施形態では、1ビットのビット誤りの訂正および2ビットのビット誤りの検出が可能なECCが採用されている。なお、ECC算出アルゴリズムについては周知のものを用いるようにすれば良い。また、2ビット以上のビット誤りを訂正可能なECCを用いても良い。算出部102は、監視データRXDを基に算出したECCを記憶部103に書き込む。記憶部103は、受信データ領域121_kに格納される監視データを基に算出されたECCを格納するための受信ECC領域131_kを有する。また、記憶部103は、送信データ領域122_kに格納される制御データを基に算出されたECCを格納するための送信ECC領域132_kを有する。つまり、記憶部103には、ECCの算出元のデータと対応付けて当該ECCが記憶される。監視データの転送過程では、算出部102は、記憶部103の受信ECC領域131_kにECCを書き込み、通信バッファメモリ120の受信データ領域121_kに監視データRXDを書き込む。   Upon receiving the monitoring data RXD from the communication unit 101, the calculation unit 102 calculates an error check code (hereinafter referred to as ECC) based on the monitoring data. In the present embodiment, an ECC capable of correcting a 1-bit bit error and detecting a 2-bit bit error is employed. Note that a well-known ECC calculation algorithm may be used. An ECC capable of correcting a bit error of 2 bits or more may be used. The calculation unit 102 writes the ECC calculated based on the monitoring data RXD in the storage unit 103. The storage unit 103 includes a reception ECC area 131_k for storing an ECC calculated based on the monitoring data stored in the reception data area 121_k. Further, the storage unit 103 includes a transmission ECC area 132_k for storing an ECC calculated based on the control data stored in the transmission data area 122_k. That is, the ECC is stored in the storage unit 103 in association with the ECC calculation source data. In the monitoring data transfer process, the calculation unit 102 writes the ECC in the reception ECC area 131_k of the storage unit 103, and writes the monitoring data RXD in the reception data area 121_k of the communication buffer memory 120.

監視データRXDおよびECCの書込みが完了すると、通信インタフェース回路100はその旨をCPU110に通知する。この通知には、監視データRXDの格納場所を示す情報(アドレス)が含まれている。例えば、監視データRXDが受信データ領域121_mに格納されているのであれば、上記通知には、受信データ領域121_mの先頭アドレスが含まれている。CPU110は、この通知に応じて通信インタフェース回路100に監視データRXDの読み出しを指示する。   When the writing of the monitoring data RXD and ECC is completed, the communication interface circuit 100 notifies the CPU 110 to that effect. This notification includes information (address) indicating the storage location of the monitoring data RXD. For example, if the monitoring data RXD is stored in the reception data area 121_m, the notification includes the head address of the reception data area 121_m. In response to this notification, the CPU 110 instructs the communication interface circuit 100 to read the monitoring data RXD.

CPU110からの読み出し指示を契機として、検証部104はCPU110により指示された監視データRXDを通信バッファメモリ120から読み出す。本動作例では、検証部104は通信バッファメモリ120の受信データ領域121_mから監視データRXDを読み出す。検証部104は、受信データ領域121_mから監視データRXDを読み出すと、記憶部103から当該監視データに対応するECC(すなわち、受信ECC領域131_mに格納されているECC)を読み出す。検証部104は、監視データRXDおよびこれに対応するECCを読み出すと、当該ECCを基にこの監視データにソフトエラーが発生しているか否か検証する。検証部104は、監視データRXDにソフトエラーを検出しなかった場合、当該監視データをCPU110に与える。CPU110は、検証部104からソフトエラーの検証処理を経た監視データRXDを受け取ると、当該監視データを基に制御データTXDを生成する。   In response to a read instruction from the CPU 110, the verification unit 104 reads the monitoring data RXD instructed by the CPU 110 from the communication buffer memory 120. In this operation example, the verification unit 104 reads the monitoring data RXD from the reception data area 121_m of the communication buffer memory 120. When the verification unit 104 reads the monitoring data RXD from the reception data area 121_m, the verification unit 104 reads the ECC corresponding to the monitoring data from the storage unit 103 (that is, the ECC stored in the reception ECC area 131_m). When the verification unit 104 reads the monitoring data RXD and the corresponding ECC, the verification unit 104 verifies whether a soft error has occurred in the monitoring data based on the ECC. When the verification unit 104 does not detect a soft error in the monitoring data RXD, the verification unit 104 provides the monitoring data to the CPU 110. Upon receiving the monitoring data RXD that has undergone the soft error verification processing from the verification unit 104, the CPU 110 generates control data TXD based on the monitoring data.

検証部104は、監視データRXDに1ビットのソフトエラーを検出した場合、ECCによりこのソフトエラーを訂正する。ここで、検証部104がソフトエラーの訂正を行うためには、訂正の処理に要する時間の分だけ処理時間が必要となる。そこで、検証部104がソフトエラーを検出すると、通信インタフェース回路100は検証部104によるソフトエラーの訂正が完了するまでの間、CPU110にWAIT信号を送信しCPU110にその間の処理を待機させる。これにより、検証部104はソフトエラーの訂正を行うための処理時間を確保することができる。検証部104が訂正後の監視データをCPU110に与えると、通信インタフェース回路100はCPU110にRDY信号を送信することで、CPU110に処理を再開させる。これに対して、監視データRXDに2ビットのソフトエラーを検出した場合には、検証部104は、例えばその旨をCPU110に通知する。この場合、CPU110は、リトライを実行して次の周期のタクトで上述した処理を実行する。   When the verification unit 104 detects a 1-bit soft error in the monitoring data RXD, the verification unit 104 corrects the soft error by ECC. Here, in order for the verification unit 104 to correct a soft error, processing time is required for the time required for the correction processing. Therefore, when the verification unit 104 detects a soft error, the communication interface circuit 100 transmits a WAIT signal to the CPU 110 and causes the CPU 110 to wait for processing during the period until the correction of the soft error by the verification unit 104 is completed. As a result, the verification unit 104 can secure a processing time for correcting the soft error. When the verification unit 104 provides the corrected monitoring data to the CPU 110, the communication interface circuit 100 transmits the RDY signal to the CPU 110, thereby causing the CPU 110 to resume processing. On the other hand, when a 2-bit soft error is detected in the monitoring data RXD, the verification unit 104 notifies the CPU 110 of that fact, for example. In this case, the CPU 110 executes a retry and executes the above-described process at the next cycle tact.

本実施形態によると、通信バッファメモリ120に格納されている監視データにソフトエラーが発生したとしても、1ビットのビット誤りであれば検証部104によりそのビット誤りは訂正され、訂正後の監視データがCPU110に与えられる。このため、1ビットのビット誤りに起因するリトライが発生することはない。   According to the present embodiment, even if a soft error occurs in the monitoring data stored in the communication buffer memory 120, if the bit error is 1 bit, the bit error is corrected by the verification unit 104, and the corrected monitoring data Is given to the CPU 110. For this reason, no retry due to a bit error of 1 bit occurs.

次に、制御データTXDの転送過程について説明する。CPU110は、監視データRXDを基に制御データTXDを生成すると、当該制御データを算出部102に与える。   Next, the transfer process of the control data TXD will be described. When the CPU 110 generates the control data TXD based on the monitoring data RXD, the CPU 110 gives the control data to the calculation unit 102.

CPU110から制御データTXDを受け取ったことを契機として、算出部102は当該制御データを基にECCを算出する。制御データの転送過程では、算出部102は、記憶部103の送信ECC領域132_mに当該ECCを書き込み、通信バッファメモリ120の送信データ領域122_mに制御データTXDを書き込む。   When the control data TXD is received from the CPU 110, the calculation unit 102 calculates the ECC based on the control data. In the transfer process of the control data, the calculation unit 102 writes the ECC in the transmission ECC area 132_m of the storage unit 103 and writes the control data TXD in the transmission data area 122_m of the communication buffer memory 120.

制御データTXDおよびECCの書込みが完了すると、通信インタフェース回路100はその旨をCPU110に通知する。この通知には、送信データ領域122_m(すなわち、制御データTXDの格納場所)を示す情報(アドレス等)が含まれている。CPU110は、この通知に応じて通信インタフェース回路100に制御データTXDの送信を指示する。   When the writing of the control data TXD and ECC is completed, the communication interface circuit 100 notifies the CPU 110 to that effect. This notification includes information (address, etc.) indicating the transmission data area 122_m (that is, the storage location of the control data TXD). In response to this notification, the CPU 110 instructs the communication interface circuit 100 to transmit the control data TXD.

CPU110からの送信指示を契機として、検証部104はCPU110により指示された制御データTXDを通信バッファメモリ120から読み出す。本動作例では、検証部104は通信バッファメモリ120の送信データ領域122_mから制御データTXDを読み出す。検証部104は、送信データ領域122_mから制御データTXDを読み出すと、記憶部103から当該制御データに対応するECC(すなわち、送信ECC領域132_mに格納されているECC)を読み出す。検証部104は、制御データTXDおよびこれに対応するECCを読み出すと、当該ECCを基にこの制御データにソフトエラーが発生しているか否か判定する。検証部104は、制御データTXDにソフトエラーを検出しなかった場合、当該制御データを通信部101に与える。通信部101は、検証部104からソフトエラーの検証処理を経た制御データTXDを受け取ると、当該制御データを制御対象機器40_nへ宛てて送信する。   In response to the transmission instruction from the CPU 110, the verification unit 104 reads the control data TXD instructed by the CPU 110 from the communication buffer memory 120. In this operation example, the verification unit 104 reads the control data TXD from the transmission data area 122_m of the communication buffer memory 120. When the verification unit 104 reads the control data TXD from the transmission data area 122_m, the verification unit 104 reads the ECC corresponding to the control data (that is, the ECC stored in the transmission ECC area 132_m) from the storage unit 103. When the verification unit 104 reads the control data TXD and the ECC corresponding thereto, the verification unit 104 determines whether a soft error has occurred in the control data based on the ECC. When the verification unit 104 does not detect a soft error in the control data TXD, the verification unit 104 gives the control data to the communication unit 101. Upon receiving the control data TXD that has undergone the soft error verification process from the verification unit 104, the communication unit 101 transmits the control data to the control target device 40_n.

一方、検証部104が制御データTXDにソフトエラーを検出した場合、通信インタフェース回路100はCPU110にWAIT信号を送信し、検証部104が当該ソフトエラーの訂正を行うための処理時間を確保する。   On the other hand, when the verification unit 104 detects a soft error in the control data TXD, the communication interface circuit 100 transmits a WAIT signal to the CPU 110 to ensure a processing time for the verification unit 104 to correct the soft error.

検証部104は、制御データTXDに1ビットのソフトエラーを検出した場合、ECCによりこのソフトエラーを訂正し、訂正後の制御データTXDを通信部101に与える。その後、通信インタフェース回路100はCPU110にRDY信号を送信し、CPU110に処理を再開させる。これに対して、制御データTXDに2ビットのソフトエラーを検出した場合には、検証部104は、例えばその旨をCPU110に通知する。この場合、CPU110は、リトライを実行して次の周期のタクトで上述した処理を実行する。   When the verification unit 104 detects a 1-bit soft error in the control data TXD, the verification unit 104 corrects the soft error by ECC and provides the corrected control data TXD to the communication unit 101. Thereafter, the communication interface circuit 100 transmits an RDY signal to the CPU 110 and causes the CPU 110 to resume processing. On the other hand, when a 2-bit soft error is detected in the control data TXD, the verification unit 104 notifies the CPU 110 to that effect, for example. In this case, the CPU 110 executes a retry and executes the above-described process at the next cycle tact.

本実施形態によると、通信バッファメモリ120に格納されている制御データにソフトエラーが発生したとしても、1ビットのビット誤りであればそのビット誤りは検証部104によって訂正され、訂正後の制御データが制御対象機器40_nへ宛てて送信される。このため、1ビットのビット誤りに起因するリトライが発生することはない。   According to the present embodiment, even if a soft error occurs in the control data stored in the communication buffer memory 120, if the bit error is 1 bit, the bit error is corrected by the verification unit 104, and the corrected control data Is transmitted to the control target device 40_n. For this reason, no retry due to a bit error of 1 bit occurs.

以上説明したように、本実施形態によれば、CPU110が実行するタクトの過程で、通信バッファメモリ120に格納された監視データ或いは制御データに1ビットのビット誤りが発生したとしても、CPU110は監視データの受信から制御データの送信までの一連の処理を中断することなく完結させることができる。この結果、1ビットのビット誤りに起因するリトライを行う必要はなく、従来に比べてリアルタイム性を確保することができる。   As described above, according to this embodiment, even if a 1-bit bit error occurs in the monitoring data or control data stored in the communication buffer memory 120 during the tact executed by the CPU 110, the CPU 110 A series of processes from data reception to control data transmission can be completed without interruption. As a result, there is no need to perform a retry due to a 1-bit bit error, and real-time performance can be ensured as compared with the conventional case.

また、CPU110が複数の監視データを一括して処理する場合、当該処理に必要な監視データの一部にソフトエラーが発生したとしても、1ビットのビット誤りであればリトライを行う必要がなく、従来に比べて同時性を確保することができる。   Further, when the CPU 110 processes a plurality of monitoring data at once, even if a soft error occurs in a part of the monitoring data necessary for the processing, there is no need to retry if a bit error is 1 bit. As compared with the conventional case, simultaneity can be ensured.

<第2実施形態>
図4は、本発明の第2実施形態である制御装置20の構成を示す図である。図4では、図3と同一の構成要素には同一の符号が付されている。図3と図4を対比すれば明らかなように、本実施形態による制御装置20は、通信インタフェース回路100に代えて通信インタフェース回路200を、通信バッファメモリ120に代えて通信バッファメモリ220を有する点において第1実施形態による制御装置10と異なる。以下、第1実施形態との相違点である通信インタフェース回路200および通信バッファメモリ220を中心に説明する。
Second Embodiment
FIG. 4 is a diagram illustrating a configuration of the control device 20 according to the second embodiment of the present invention. In FIG. 4, the same components as those in FIG. 3 are denoted by the same reference numerals. As apparent from the comparison between FIG. 3 and FIG. 4, the control device 20 according to the present embodiment includes a communication interface circuit 200 instead of the communication interface circuit 100 and a communication buffer memory 220 instead of the communication buffer memory 120. However, it differs from the control apparatus 10 by 1st Embodiment. Hereinafter, the communication interface circuit 200 and the communication buffer memory 220 that are different from the first embodiment will be mainly described.

第1実施形態による通信インタフェース回路100は、2ビットのビット誤りを検出した場合には、CPU110にその旨を通知しソフトエラーの検証を終了した。これに対して、本実施形態による通信インタフェース回路200は、2ビットのビット誤りを検出した場合であっても、ソフトエラーの検証を継続して実行する。通信インタフェース回路200は、算出部102に代えて算出部202を、検証部104に代えて検証部204を有する点において通信インタフェース回路100と異なる。算出部202は、通信バッファメモリ220に監視データRXD或いは制御データTXDを書き込むだけでなく、当該監視データ或いは制御データをS個(Sは任意の自然数)複製し、複製された監視データ或いは制御データについても通信バッファメモリ220に書き込むという点において、算出部102と異なる。以下では、通信バッファメモリ220に書き込まれる1+S個の監視データを監視データRXD_s(s=0〜S)と表記する。ここで、監視データRXD_0は、複製元の監視データであり、監視データRXD_s(s=1〜S)は複製された監視データである。同様に、通信バッファメモリ220に書き込まれる1+S個の制御データを制御データTXD_s(s=0〜S)と表記する。ここで、制御データTXD_0は、複製元の制御データであり、制御データTXD_s(s=1〜S)は複製された制御データである。検証部204は、監視データRXD_0或いは制御データTXD_0について、当該監視データ或いは制御データに対応するECCを用いてソフトエラーの検証を行うだけでなく、監視データRXD_s(s=1〜S)或いは制御データTXD_s(s=1〜S)についても当該ECCを用いてソフトエラーの検証を行う場合があるという点において、検証部104と異なる。   When the communication interface circuit 100 according to the first embodiment detects a 2-bit bit error, the communication interface circuit 100 notifies the CPU 110 of the fact and ends the soft error verification. On the other hand, the communication interface circuit 200 according to the present embodiment continuously performs the soft error verification even when a 2-bit bit error is detected. The communication interface circuit 200 is different from the communication interface circuit 100 in that a calculation unit 202 is provided instead of the calculation unit 102 and a verification unit 204 is provided instead of the verification unit 104. The calculation unit 202 not only writes the monitoring data RXD or the control data TXD to the communication buffer memory 220 but also replicates the monitoring data or control data S (S is an arbitrary natural number), and the copied monitoring data or control data Is different from the calculation unit 102 in that it is written in the communication buffer memory 220. Hereinafter, 1 + S pieces of monitoring data written in the communication buffer memory 220 are referred to as monitoring data RXD_s (s = 0 to S). Here, the monitoring data RXD_0 is the monitoring data of the copy source, and the monitoring data RXD_s (s = 1 to S) is the copied monitoring data. Similarly, 1 + S control data written to the communication buffer memory 220 is represented as control data TXD_s (s = 0 to S). Here, the control data TXD_0 is the copy source control data, and the control data TXD_s (s = 1 to S) is the copied control data. The verification unit 204 not only verifies the soft error for the monitoring data RXD_0 or the control data TXD_0 using the ECC corresponding to the monitoring data or control data, but also monitors the monitoring data RXD_s (s = 1 to S) or the control data. TXD_s (s = 1 to S) is also different from the verification unit 104 in that a soft error may be verified using the ECC.

通信バッファメモリ220は、監視データRXD_s(s=0〜S)を記憶するためのリングバッファを形成する受信データ領域221_k(k=1〜m:mは任意の自然数)を有する。受信データ領域221_kは1+S個の記憶領域に等分されており、s番目の記憶領域には監視データRXD_sが書き込まれる。また、通信バッファメモリ220は、制御データTXD_s(s=0〜S)を記憶するためのリングバッファを形成する送信データ領域222_k(k=1〜m:mは任意の自然数)を有する。送信データ領域222_kは1+S個の記憶領域に等分されており、s番目の記憶領域には制御データTXD_sが書き込まれる。   The communication buffer memory 220 has a reception data area 221_k (k = 1 to m: m is an arbitrary natural number) that forms a ring buffer for storing the monitoring data RXD_s (s = 0 to S). The reception data area 221_k is equally divided into 1 + S storage areas, and monitoring data RXD_s is written in the sth storage area. The communication buffer memory 220 includes a transmission data area 222_k (k = 1 to m: m is an arbitrary natural number) that forms a ring buffer for storing control data TXD_s (s = 0 to S). The transmission data area 222_k is equally divided into 1 + S storage areas, and control data TXD_s is written in the sth storage area.

以下、図5および図6を参照しながら監視データの転送過程における制御装置20の動作について説明する。図5は、算出部202が実行するECC算出処理およびデータ格納処理の内容を示すフローチャートである。図5に示すように、算出部202は、通信部101から監視データRXDを受け取ると(ステップSA10)、当該監視データを基にECCを算出し、算出したECCを記憶部103の受信ECC領域131_mに書き込む(ステップSA20)。また、算出部202は監視データRXDを複製し、監視データRXD_s(s=0〜S)を通信バッファメモリ220の受信データ領域221_mに書き込む(ステップSA30)。   Hereinafter, the operation of the control device 20 during the monitoring data transfer process will be described with reference to FIGS. 5 and 6. FIG. 5 is a flowchart showing the contents of ECC calculation processing and data storage processing executed by the calculation unit 202. As illustrated in FIG. 5, when receiving the monitoring data RXD from the communication unit 101 (Step SA10), the calculating unit 202 calculates an ECC based on the monitoring data, and the calculated ECC is received in the received ECC area 131_m of the storage unit 103. (Step SA20). The calculating unit 202 duplicates the monitoring data RXD and writes the monitoring data RXD_s (s = 0 to S) in the reception data area 221_m of the communication buffer memory 220 (step SA30).

監視データおよびECCの書込みが完了すると、通信インタフェース回路200はその旨をCPU110に通知する。この通知にも、監視データRXD_sの格納場所を示す情報(アドレス)が含まれている。本動作例では、監視データRXD_sは受信データ領域221_mに格納されているため、上記通知には、受信データ領域221_mの先頭アドレスが含まれている。CPU110は、この通知を受け取ると、通信インタフェース回路200に受信データ領域221_mに格納された監視データの読み出しを指示する。   When the writing of the monitoring data and the ECC is completed, the communication interface circuit 200 notifies the CPU 110 to that effect. This notification also includes information (address) indicating the storage location of the monitoring data RXD_s. In this operation example, since the monitoring data RXD_s is stored in the reception data area 221_m, the notification includes the head address of the reception data area 221_m. Upon receiving this notification, the CPU 110 instructs the communication interface circuit 200 to read the monitoring data stored in the reception data area 221_m.

図6は、監視データの読み出しを指示されたことを契機として検証部204が実行するソフトエラー検証処理の内容を示すフローチャートである。検証部204は、記憶部103からCPU110により指示された監視データRXDに対応するECC(すなわち、受信ECC領域131_mに格納されているECC)を読み出す(ステップSB10)。検証部204は、受信ECC領域131_mからECCを読み出すと、検証対象である監視データを示すインデックスsに“0(すなわち、受信データ領域221_mのs番目(s=0)の記憶領域に格納された監視データRXD_0を示すインデックス)”を設定する(ステップSB20)。次いで、検証部204は、インデックスsに対応する監視データ(すなわち、監視データRXD_s)を通信バッファメモリ220から読み出す(ステップSB30)。次いで、検証部204は、ステップSB10にて読み出したECCを基にステップSB30にて読み出した監視データにソフトエラーが発生しているか否かを判定する(ステップSB40)。ステップSB40の判定結果が「NO」の場合、検証部204は当該監視データをCPU110に与える(ステップSB70)。CPU110は、検証部204からソフトエラーの検証処理を経た監視データを受け取ると、当該監視データを基に制御データTXDを生成する。   FIG. 6 is a flowchart showing the contents of the soft error verification process executed by the verification unit 204 when an instruction to read the monitoring data is given. The verification unit 204 reads the ECC corresponding to the monitoring data RXD instructed by the CPU 110 from the storage unit 103 (that is, the ECC stored in the reception ECC area 131_m) (step SB10). When the verification unit 204 reads the ECC from the reception ECC area 131_m, the verification unit 204 stores “0” in the index s indicating the monitoring data to be verified (that is, stored in the sth (s = 0) storage area of the reception data area 221_m). The index indicating the monitoring data RXD_0) ”is set (step SB20). Next, the verification unit 204 reads the monitoring data corresponding to the index s (that is, the monitoring data RXD_s) from the communication buffer memory 220 (Step SB30). Next, the verification unit 204 determines whether or not a soft error has occurred in the monitoring data read in step SB30 based on the ECC read in step SB10 (step SB40). If the determination result in step SB40 is “NO”, the verification unit 204 provides the monitoring data to the CPU 110 (step SB70). When the CPU 110 receives monitoring data that has undergone soft error verification processing from the verification unit 204, the CPU 110 generates control data TXD based on the monitoring data.

ステップSB40の判定結果が「YES」の場合、検証部204は監視データRXD_sに発生したソフトエラーが1ビットのビット誤りであるか否かを判定する(ステップSB50)。ステップSB50の判定結果が「YES」の場合、通信インタフェース回路200はCPU110にWAIT信号を送信し、検証部204が当該ソフトエラーの訂正を行うための処理時間を確保する。そして、検証部204はECCによりこのソフトエラーを訂正し(ステップSB60)、訂正後の監視データをCPU110に与える(ステップSB70)。   If the determination result in step SB40 is “YES”, the verification unit 204 determines whether or not the soft error that has occurred in the monitoring data RXD_s is a 1-bit bit error (step SB50). When the determination result in step SB50 is “YES”, the communication interface circuit 200 transmits a WAIT signal to the CPU 110, and ensures a processing time for the verification unit 204 to correct the soft error. Then, the verification unit 204 corrects this soft error by ECC (step SB60), and gives the corrected monitoring data to the CPU 110 (step SB70).

ステップSB50の判定結果が「NO」である場合、検証部204はインデックスsの値がSであるか否かを判定する(ステップSB80)。ステップSB80の判定結果が「NO」である場合、検証部204はインデックスsに“1”を加算し(ステップSB90)、ステップSB30以降の処理を再度実行する。   When the determination result in step SB50 is “NO”, the verification unit 204 determines whether or not the value of the index s is S (step SB80). When the determination result in step SB80 is “NO”, the verification unit 204 adds “1” to the index s (step SB90), and executes the processes after step SB30 again.

これに対して、ステップSB80の判定結果が「YES」である場合には、受信データ領域221_mに格納されている1+S個の監視データのすべてについてソフトエラーの検証処理が実行されているので、検証部204はソフトエラーの検証処理を終了する。この場合、検証部204は、例えばその旨をCPU110に通知する。この通知に応じて、CPU110はリトライを実行して次の周期のタクトで上述した処理を実行する。   On the other hand, if the determination result in step SB80 is “YES”, the verification process of the soft error is executed for all of the 1 + S pieces of monitoring data stored in the reception data area 221_m. The unit 204 ends the soft error verification process. In this case, the verification unit 204 notifies the CPU 110 to that effect, for example. In response to this notification, the CPU 110 executes a retry and executes the above-described processing at the tact of the next cycle.

以上、監視データの転送過程における制御装置20の動作を説明したが、制御データの転送過程における制御装置20の動作についても、監視データの転送過程において説明したことがそのまま当てはまる。すなわち、算出部202がCPU110から制御データTXDを受け取った後、通信部101がソフトエラーの検証処理を経た制御データTXD_s(s=0〜S)を制御対象機器40_nへ宛てて送信するまでの間に制御装置20により実行される処理は、上述した監視データの転送過程における制御装置20の動作の説明において、「監視データRXD」を「制御データTXD」と、「監視データRXD_s」を「制御データTXD_s」と、「受信データ領域221_m」を「送信データ領域222_m」と、「受信ECC領域131_m」を「送信ECC領域132_m」と読み替えることにより実現される。   The operation of the control device 20 in the monitoring data transfer process has been described above, but the operation described in the monitoring data transfer process also applies to the operation of the control device 20 in the control data transfer process. That is, after the calculation unit 202 receives the control data TXD from the CPU 110, the communication unit 101 transmits the control data TXD_s (s = 0 to S) that has undergone the soft error verification process to the control target device 40_n. In the description of the operation of the control device 20 in the above-described monitoring data transfer process, “monitoring data RXD” is changed to “control data TXD”, and “monitoring data RXD_s” is changed to “control data”. This is realized by replacing “TXD_s”, “reception data area 221_m” with “transmission data area 222_m”, and “reception ECC area 131_m” with “transmission ECC area 132_m”.

本実施形態でも第1実施形態と同様の効果が得られる。加えて、本実施形態によれば、CPU110が実行するタクトの過程で、通信バッファメモリ220に格納された監視データ或いは制御データに2ビット以上のビット誤りが発生したとしても、当該監視データ或いは制御データを複製した1または複数の監視データ或いは制御データのうち、いずれか1の監視データ或いは制御データに2ビット以上のビット誤りが発生していなければ、当該監視データおよび制御データを用いて、CPU110は監視データの受信から制御データの送信までに行う一連の処理を中断することなく完結させることができる。つまり、本実施形態によれば、第1実施形態よりも高い確度でリアルタイム性を確保することができる。   In this embodiment, the same effect as that of the first embodiment can be obtained. In addition, according to the present embodiment, even if a bit error of 2 bits or more occurs in the monitoring data or control data stored in the communication buffer memory 220 during the tact executed by the CPU 110, the monitoring data or control If no bit error of 2 bits or more has occurred in any one of the one or a plurality of monitoring data or control data obtained by duplicating the data, the CPU 110 uses the monitoring data and the control data. Can complete a series of processing performed from reception of monitoring data to transmission of control data without interruption. That is, according to this embodiment, real-time property can be ensured with higher accuracy than in the first embodiment.

また、CPU110が複数の監視データを一括して処理する場合、当該処理に必要な監視データの一部に2ビット以上のビット誤りが発生したとしても、当該監視データを複製した1または複数の監視データのうち、いずれか1の監視データに2ビット以上のビット誤りが発生していなければリトライを行う必要がなく、第1実施形態よりも高い確度で同時性を確保することができる。   Further, when the CPU 110 processes a plurality of pieces of monitoring data at a time, even if a bit error of 2 bits or more occurs in a part of the monitoring data necessary for the processing, one or a plurality of pieces of monitoring that duplicate the monitoring data. If a bit error of 2 bits or more does not occur in any one of the monitoring data among the data, there is no need to retry, and simultaneity can be ensured with higher accuracy than in the first embodiment.

また、本実施形態では、監視データ或いは制御データの複製数に応じてリトライの発生頻度を制御することが可能であり、システムに要求されるリアルタイム性および同時性の確保の程度に応じて上記複製数を定めるようにすれば良い。   In this embodiment, it is possible to control the occurrence frequency of retries according to the number of copies of monitoring data or control data. The number should be determined.

<第3実施形態>
図7は、本発明の第3実施形態である制御装置30の構成を示す図である。図7では、図4と同一の構成要素には同一の符号が付されている。図4と図7を対比すれば明らかなように、本実施形態による制御装置30は、通信インタフェース回路200に代えて通信インタフェース回路300を、通信バッファメモリ220に代えて通信バッファメモリ320Aおよび320Bを有する点において第2実施形態による制御装置20と異なる。以後、通信バッファメモリ320Aおよび320Bを区別しない場合には、通信バッファメモリ320と表記する。以下、第2実施形態との相違点である通信インタフェース回路300および通信バッファメモリ320を中心に説明する。
<Third Embodiment>
FIG. 7 is a diagram illustrating a configuration of the control device 30 according to the third embodiment of the present invention. In FIG. 7, the same components as those in FIG. 4 are denoted by the same reference numerals. 4 and 7, the control device 30 according to the present embodiment includes a communication interface circuit 300 instead of the communication interface circuit 200, and communication buffer memories 320A and 320B instead of the communication buffer memory 220. It differs from the control apparatus 20 by 2nd Embodiment in the point to have. Hereinafter, when the communication buffer memories 320A and 320B are not distinguished from each other, they are referred to as the communication buffer memory 320. Hereinafter, the communication interface circuit 300 and the communication buffer memory 320 which are different from the second embodiment will be mainly described.

第2実施形態による通信インタフェース回路200では、監視データの転送過程において、複製元の監視データに訂正不能なソフトエラーを検出した場合、通信バッファメモリ220から複製された監視データを読み出し、当該監視データについてソフトエラーの検証処理を実行した。同様に、制御データの転送過程において、複製元の制御データに訂正不能なソフトエラーを検出した場合、通信バッファメモリ220から複製された制御データを読み出し、当該制御データについてソフトエラーの検証処理を実行した。これに対して、本実施形態による通信インタフェース回路300では、監視データの転送過程において、複製元の監視データに対するソフトエラーの検証処理と複製された監視データに対するソフトエラーの検証処理を並列に実行する。同様に、制御データの転送過程において、複製元の制御データに対するソフトエラーの検証処理と複製された制御データに対するソフトエラーの検証処理を並列に実行する。   In the communication interface circuit 200 according to the second embodiment, when an uncorrectable soft error is detected in the copy source monitoring data in the monitoring data transfer process, the copied monitoring data is read from the communication buffer memory 220, and the monitoring data is read. A soft error verification process was executed for. Similarly, when an uncorrectable soft error is detected in the copy source control data during the control data transfer process, the duplicated control data is read from the communication buffer memory 220 and the soft error verification process is executed for the control data. did. On the other hand, in the communication interface circuit 300 according to the present embodiment, in the monitoring data transfer process, the soft error verification processing for the copy source monitoring data and the soft error verification processing for the copied monitoring data are executed in parallel. . Similarly, in the process of transferring control data, a soft error verification process for the copy source control data and a soft error verification process for the copied control data are executed in parallel.

通信インタフェース回路300は、通信部101に代えて通信部301を、算出部202に代えて算出部302を、検証部204に代えて検証部304Aおよび304Bを有し、さらに上記各部に加えて選択部305を有する点において通信インタフェース回路200と異なる。以後、検証部304Aおよび304Bを区別しない場合には、検証部304と表記する。通信部301は、ソフトエラーの検証処理を経た制御データを選択部305から受け取るという点においてのみ、通信部101と異なる。算出部302は、監視データRXD或いは制御データTXDをS個(本実施形態ではS=1)複製するという点では算出部202と共通するが、複製元の監視データおよび制御データを通信バッファメモリ320Aに、複製された監視データおよび制御データを通信バッファメモリ320Bに書き込むという点において、算出部202と異なる。以下では、通信バッファメモリ320Aに書き込まれる監視データおよび制御データを、それぞれ監視データRXD_Aおよび制御データTXD_Aと表記する。同様に、通信バッファメモリ320Bに書き込まれる監視データおよび制御データを、それぞれRXD_Bおよび制御データTXD_Bと表記する。検証部304Aは、複製元の監視データおよび制御データについて、ECCを用いてソフトエラーの検証処理を実行する。検証部304Bは、複製された監視データおよび制御データについて上記処理を実行する。   The communication interface circuit 300 includes a communication unit 301 instead of the communication unit 101, a calculation unit 302 instead of the calculation unit 202, verification units 304A and 304B instead of the verification unit 204, and a selection in addition to the above-described units. The communication interface circuit 200 is different from the communication interface circuit 200 in that the unit 305 is provided. Hereinafter, when the verification units 304A and 304B are not distinguished, they are referred to as verification units 304. The communication unit 301 is different from the communication unit 101 only in that control data that has undergone a soft error verification process is received from the selection unit 305. The calculation unit 302 is the same as the calculation unit 202 in that it copies S pieces of monitoring data RXD or control data TXD (S = 1 in this embodiment), but the monitoring data and control data of the copy source are stored in the communication buffer memory 320A. In addition, it is different from the calculation unit 202 in that the copied monitoring data and control data are written in the communication buffer memory 320B. Hereinafter, the monitoring data and control data written to the communication buffer memory 320A are referred to as monitoring data RXD_A and control data TXD_A, respectively. Similarly, monitoring data and control data written to the communication buffer memory 320B are expressed as RXD_B and control data TXD_B, respectively. The verification unit 304A performs a soft error verification process using ECC on the monitoring data and control data of the copy source. The verification unit 304B executes the above process on the copied monitoring data and control data.

選択部305は、例えばマルチプレクサである。選択部305は、検証部304A或いは検証部304Bのいずれか一方からソフトエラーの検証処理を経た監視データを受け取った場合、当該監視データをCPU110に与える。選択部305は、検証部304Aと検証部304Bの両方からソフトエラーの検証処理を経た監視データを受け取った場合、検証部304Aから受け取った監視データをCPU110に与える。同様に、選択部305は、検証部304A或いは検証部304Bのいずれか一方からソフトエラーの検証処理を経た制御データを受け取った場合、当該制御データを通信部301に与える。選択部305は、検証部304Aと検証部304Bの両方からソフトエラーの検証処理を経た制御データを受け取った場合、検証部304Aから受け取った制御データを通信部301に与える。   The selection unit 305 is, for example, a multiplexer. When receiving monitoring data that has undergone a soft error verification process from either the verification unit 304A or the verification unit 304B, the selection unit 305 gives the monitoring data to the CPU 110. When receiving the monitoring data that has undergone the soft error verification processing from both the verification unit 304A and the verification unit 304B, the selection unit 305 gives the monitoring data received from the verification unit 304A to the CPU 110. Similarly, when the selection unit 305 receives control data that has undergone a soft error verification process from either the verification unit 304A or the verification unit 304B, the selection unit 305 gives the control data to the communication unit 301. When receiving the control data that has undergone the soft error verification process from both the verification unit 304A and the verification unit 304B, the selection unit 305 gives the control data received from the verification unit 304A to the communication unit 301.

通信バッファメモリ320Aは、複製元の監視データを記憶するためのリングバッファを形成する受信データ領域321A_k(k=1〜m:mは任意の自然数)と複製元の制御データを記憶するためのリングバッファを形成する送信データ領域322A_k(k=1〜m:mは任意の自然数)を有する。同様に、通信バッファメモリ320Bは、複製された監視データを記憶するためのリングバッファを形成する受信データ領域321B_k(k=1〜m:mは任意の自然数)と複製された制御データを記憶するためのリングバッファを形成する送信データ領域322B_k(k=1〜m:mは任意の自然数)を有する。本実施形態では、通信バッファメモリ320Aおよび通信バッファメモリ320Bは、各々別個のメモリチップとして実装されている。このため、通信バッファメモリ320Aと通信バッファメモリ320Bを1個のメモリチップで実装する場合に比較して故障に対する耐性が高くなる。なお、通信バッファメモリ320Aと通信バッファメモリ320Bを1個のメモリチップで実装しても勿論良い。   The communication buffer memory 320A has a reception data area 321A_k (k = 1 to m: m is an arbitrary natural number) forming a ring buffer for storing monitoring data of a copy source and a ring for storing control data of the copy source. It has a transmission data area 322A_k (k = 1 to m: m is an arbitrary natural number) forming a buffer. Similarly, the communication buffer memory 320B stores a reception data area 321B_k (k = 1 to m: m is an arbitrary natural number) forming a ring buffer for storing the replicated monitoring data and the replicated control data. Transmission data area 322B_k (k = 1 to m: m is an arbitrary natural number) forming a ring buffer. In the present embodiment, the communication buffer memory 320A and the communication buffer memory 320B are each implemented as separate memory chips. For this reason, compared with the case where the communication buffer memory 320A and the communication buffer memory 320B are mounted by one memory chip, the tolerance with respect to a failure becomes high. Of course, the communication buffer memory 320A and the communication buffer memory 320B may be mounted on one memory chip.

以下、図8を参照しながら監視データの転送過程における制御装置30の動作について説明する。算出部302は、通信部301から監視データRXDを受け取ると、当該監視データを基にECCを算出し、算出したECCを記憶部103の受信ECC領域131_k(k=1〜m)のいずれかに書き込む。本動作例では、算出部302は、当該ECCを受信ECC領域131_mに書き込む。また、算出部302は監視データRXDを複製し、複製元の監視データRXD_Aを通信バッファメモリ320Aの受信データ領域321A_kのいずれかに書き込む。本動作例では、算出部302は、受信ECC領域131_mに対応する受信データ領域、すなわち受信データ領域321A_mに当該監視データを書き込む。同様に、算出部302は、複製された監視データRXD_Bを受信データ領域321B_mに書き込む。   Hereinafter, the operation of the control device 30 in the monitoring data transfer process will be described with reference to FIG. Upon receiving the monitoring data RXD from the communication unit 301, the calculation unit 302 calculates an ECC based on the monitoring data, and stores the calculated ECC in any of the received ECC areas 131_k (k = 1 to m) in the storage unit 103. Write. In this operation example, the calculation unit 302 writes the ECC in the reception ECC area 131_m. Further, the calculation unit 302 duplicates the monitoring data RXD and writes the duplication source monitoring data RXD_A in any of the reception data areas 321A_k of the communication buffer memory 320A. In this operation example, the calculation unit 302 writes the monitoring data in the reception data area corresponding to the reception ECC area 131_m, that is, the reception data area 321A_m. Similarly, the calculation unit 302 writes the copied monitoring data RXD_B in the reception data area 321B_m.

監視データおよびECCの書込みが完了すると、通信インタフェース回路300はその旨をCPU110に通知する。この通知にも、監視データRXD_AおよびRXD_Bの格納場所を示す情報(アドレス)が含まれている。本動作例では、監視データRXD_AおよびRXD_Bは、それぞれ受信データ領域321A_mおよび321B_mに格納されているため、上記通知には、受信データ領域321A_mおよび321B_mの先頭アドレスが含まれている。CPU110は、この通知を受け取ると、通信インタフェース回路300に受信データ領域321A_mに格納された監視データRXD_Aおよび受信データ領域321B_mに格納された監視データRXD_Bの読み出しを指示する。   When the writing of the monitoring data and the ECC is completed, the communication interface circuit 300 notifies the CPU 110 to that effect. This notification also includes information (address) indicating the storage location of the monitoring data RXD_A and RXD_B. In this operation example, since the monitoring data RXD_A and RXD_B are stored in the reception data areas 321A_m and 321B_m, respectively, the notification includes the top addresses of the reception data areas 321A_m and 321B_m. Upon receiving this notification, the CPU 110 instructs the communication interface circuit 300 to read the monitoring data RXD_A stored in the reception data area 321A_m and the monitoring data RXD_B stored in the reception data area 321B_m.

CPU110からの読み出し指示を契機として、検証部304Aおよび304Bにより以下に示す処理が並列に実行される。検証部304A(304B)はCPU110により指示された監視データRXD_A(RXD_B)を通信バッファメモリ320A(320B)から読み出す。本動作例では、検証部304A(304B)は通信バッファメモリ320A(320B)の受信データ領域321A_m(321B_m)から監視データRXD_A(RXD_B)を読み出す。検証部304A(304B)は、受信データ領域321A_m(321B_m)から監視データRXD_A(RXD_B)を読み出すと、記憶部103から当該監視データに対応するECC(すなわち、受信ECC領域131_mに格納されているECC)を読み出す。検証部304A(304B)は、監視データRXD_A(RXD_B)およびこれに対応するECCを読み出すと、当該ECCを基にこの監視データにソフトエラーが発生しているか否かを検証する。検証部304A(304B)は、監視データRXD_A(RXD_B)にソフトエラーを検出しなかった場合、当該監視データを選択部305に与える。検証部304A(304B)は、監視データRXD_A(RXD_B)に1ビットのビット誤りを検出した場合は、選択部305にその旨を通知し、その後、選択部305からソフトエラーの訂正指示を受信した場合に限り、当該ソフトエラーの訂正を行い、訂正後の監視データを選択部305に与える。検証部304A(304B)は、監視データRXD_A(RXD_B)に2ビットのビット誤りを検出した場合には、選択部305にその旨を通知する。   In response to a read instruction from the CPU 110, the verification units 304A and 304B execute the following processes in parallel. The verification unit 304A (304B) reads the monitoring data RXD_A (RXD_B) instructed by the CPU 110 from the communication buffer memory 320A (320B). In this operation example, the verification unit 304A (304B) reads the monitoring data RXD_A (RXD_B) from the reception data area 321A_m (321B_m) of the communication buffer memory 320A (320B). When the verification unit 304A (304B) reads the monitoring data RXD_A (RXD_B) from the reception data area 321A_m (321B_m), the ECC corresponding to the monitoring data from the storage unit 103 (that is, the ECC stored in the reception ECC area 131_m). ). When the verification unit 304A (304B) reads the monitoring data RXD_A (RXD_B) and the ECC corresponding thereto, the verification unit 304A (304B) verifies whether a soft error has occurred in the monitoring data based on the ECC. When the verification unit 304A (304B) does not detect a soft error in the monitoring data RXD_A (RXD_B), the verification unit 304A (304B) gives the monitoring data to the selection unit 305. When the verification unit 304A (304B) detects a 1-bit bit error in the monitoring data RXD_A (RXD_B), the verification unit 304A (304B) notifies the selection unit 305 to that effect, and then receives a soft error correction instruction from the selection unit 305. Only in the case, the soft error is corrected, and the corrected monitoring data is given to the selection unit 305. When the verification unit 304A (304B) detects a 2-bit bit error in the monitoring data RXD_A (RXD_B), the verification unit 304A (304B) notifies the selection unit 305 to that effect.

図8は、選択部305が実行するデータ選択処理の内容を示すフローチャートである。選択部305は、検証部304Aと検証部304Bの少なくとも一方から監視データを取得したか否かを判定する(ステップSC10)。本動作例では、検証部304Aと検証部304Bの両方から、ソフトエラーの発生を通知された場合に、ステップSC10の判定結果は「NO」となる。ステップSC10の判定結果が「YES」の場合、選択部305は取得した監視データの個数が1個か否かを判定する(ステップSC20)。ステップSC20の判定結果が「YES」の場合、すなわち、監視データRXD_A或いは監視データRXD_Bの一方にソフトエラーが発生し、他方の監視データだけが選択部305に与えられた場合、選択部305は当該監視データをCPU110に与える(ステップSC30)。CPU110は、選択部305からソフトエラーの検証処理を経た監視データを受け取ると、当該監視データを基に制御データTXDを生成する。一方、ステップSC20の判定結果が「NO」の場合、すなわち、監視データRXD_AおよびRXD_Bにソフトエラーが発生していなく、両方の監視データが選択部305に与えられた場合、選択部305は監視データRXD_AをCPU110に与える(ステップSC40)。本動作例では、この場合、監視データRXD_AをCPU110に与えたが、監視データRXD_Bを与えても勿論良い。   FIG. 8 is a flowchart showing the contents of data selection processing executed by the selection unit 305. The selection unit 305 determines whether monitoring data has been acquired from at least one of the verification unit 304A and the verification unit 304B (step SC10). In this operation example, when the occurrence of the soft error is notified from both the verification unit 304A and the verification unit 304B, the determination result in step SC10 is “NO”. When the determination result of step SC10 is “YES”, the selection unit 305 determines whether or not the number of acquired monitoring data is one (step SC20). When the determination result in step SC20 is “YES”, that is, when a soft error occurs in one of the monitoring data RXD_A or the monitoring data RXD_B and only the other monitoring data is given to the selection unit 305, the selection unit 305 Monitoring data is given to the CPU 110 (step SC30). When the CPU 110 receives monitoring data that has undergone a soft error verification process from the selection unit 305, the CPU 110 generates control data TXD based on the monitoring data. On the other hand, if the determination result in step SC20 is “NO”, that is, if no soft error has occurred in the monitoring data RXD_A and RXD_B and both monitoring data are given to the selecting unit 305, the selecting unit 305 RXD_A is given to CPU 110 (step SC40). In this operation example, the monitoring data RXD_A is given to the CPU 110 in this case, but the monitoring data RXD_B may be given.

ステップSC10の判定結果が「NO」の場合、選択部305は検証部304Aと検証部304Bの両方から、2ビットのビット誤りが発生した旨の通知を受けたか否かを判定する(ステップSC50)。ステップSC50の判定結果が「YES」の場合、すなわち監視データRXD_AおよびRXD_Bのいずれにも2ビットのビット誤りが検出された場合、選択部305はCPU110にその旨を通知し(ステップSC60)、処理を終了する。この場合、CPU110は、リトライを実行して次の周期のタクトで上述した処理を実行する。   If the determination result in step SC10 is “NO”, the selection unit 305 determines whether or not a notification that a 2-bit bit error has occurred has been received from both the verification unit 304A and the verification unit 304B (step SC50). . If the determination result in step SC50 is “YES”, that is, if a 2-bit bit error is detected in both the monitoring data RXD_A and RXD_B, the selection unit 305 notifies the CPU 110 of that fact (step SC60), and processing Exit. In this case, the CPU 110 executes a retry and executes the above-described process at the next cycle tact.

ステップSC50の判定結果が「NO」の場合、すなわち監視データRXD_AおよびRXD_Bの両方に1ビットのビット誤りが検出された場合、或いは監視データRXD_AまたはRXD_Bの一方に1ビットのビット誤りが検出され、他方に2ビットのビット誤りが検出された場合、選択部305はCPU110にWAIT信号を送信し(ステップSC70)、当該ビット誤りを検出した検証部がソフトエラーの訂正を行うための処理時間を確保する。その後、選択部305は、1ビットのビット誤りを検出した検証部に対して、このソフトエラーの訂正を指示し(ステップSC80)、当該指示を受けた検証部は、当該ソフトエラーを訂正し、訂正後の監視データを選択部305に与える。なお、検証部304Aと検証部304Bの両方が1ビットのビット誤りを検出した場合、選択部305は検証部304Aと検証部304Bのいずれか一方にソフトエラーの訂正を指示する。本動作例では、選択部305は検証部304Aにソフトエラーの訂正を指示する。選択部305は、訂正指示を送信した検証部から当該ソフトエラーの訂正を経た監視データを受け取ると、当該監視データをCPU110に与える(ステップSC90)。   When the determination result in step SC50 is “NO”, that is, when a 1-bit bit error is detected in both the monitoring data RXD_A and RXD_B, or a 1-bit bit error is detected in one of the monitoring data RXD_A or RXD_B, On the other hand, when a 2-bit bit error is detected, the selection unit 305 transmits a WAIT signal to the CPU 110 (step SC70), and secures a processing time for the verification unit detecting the bit error to correct the soft error. To do. Thereafter, the selection unit 305 instructs the verification unit that has detected a 1-bit bit error to correct the soft error (step SC80). The verification unit that receives the instruction corrects the soft error, The corrected monitoring data is given to the selection unit 305. If both the verification unit 304A and the verification unit 304B detect a 1-bit bit error, the selection unit 305 instructs either the verification unit 304A or the verification unit 304B to correct the soft error. In this operation example, the selection unit 305 instructs the verification unit 304A to correct the soft error. Upon receiving the monitoring data that has been corrected for the soft error from the verification unit that has transmitted the correction instruction, the selection unit 305 gives the monitoring data to the CPU 110 (step SC90).

以上、監視データの転送過程における制御装置30の動作を説明したが、制御データの転送過程における制御装置30の動作についても、監視データの転送過程において説明したことがそのまま当てはまる。すなわち、算出部302がCPU110から制御データTXDを受け取った後、選択部305がソフトエラーの検証処理を経た制御データTXD_A或いはTXD_Bを通信部301へ宛てて送信するまでの間に制御装置30により実行される処理は、上述した監視データの転送過程における制御装置30の動作の説明において、「監視データRXD_A(監視データRXD_B)」を「制御データTXD_A(制御データTXD_B)」と、「受信データ領域321A_m(321B_m)」を「送信データ領域322A_m(322B_m)」と、「受信ECC領域131_m」を「送信ECC領域132_m」と読み替えることにより実現される。   The operation of the control device 30 in the monitoring data transfer process has been described above, but the operation described in the monitoring data transfer process also applies to the operation of the control device 30 in the control data transfer process. That is, after the calculation unit 302 receives the control data TXD from the CPU 110, the selection unit 305 executes the control data TXD_A or TXD_B that has undergone the soft error verification process and transmits the control data TXD_B to the communication unit 301. In the description of the operation of the control device 30 during the monitoring data transfer process described above, “monitoring data RXD_A (monitoring data RXD_B)” is replaced with “control data TXD_A (control data TXD_B)” and “reception data area 321A_m”. (321B_m) ”is replaced with“ transmission data area 322A_m (322B_m) ”and“ reception ECC area 131_m ”is replaced with“ transmission ECC area 132_m ”.

本実施形態でも第2実施形態と同様の効果が得られる。加えて、本実施形態によれば、複製元の監視データ或いは制御データに対するソフトエラーの検証処理と複製された監視データ或いは制御データに対するソフトエラーの検証処理が並列に実行されるため、複製元のデータと複製されたデータの両方について検証処理を実行することが必要な場合、例えば、第2実施形態において先に検証される方のデータに2ビット以上のソフトエラーが発生している場合に、処理に要する時間を第2実施形態よりも短くすることができる。   In the present embodiment, the same effect as in the second embodiment can be obtained. In addition, according to the present embodiment, the verification process of the soft error for the monitoring data or control data of the copy source and the verification process of the soft error for the copied monitoring data or control data are executed in parallel. When it is necessary to execute verification processing for both data and replicated data, for example, when a soft error of 2 bits or more has occurred in the data to be verified first in the second embodiment, The time required for processing can be made shorter than in the second embodiment.

また、本実施形態によると、監視データRXD_A或いは監視データRXD_Bのいずれか一方にソフトエラーが発生しても、他方の監視データにソフトエラーが発生していなければ、WAIT信号をCPUに送信する必要はなく、ソフトエラーの訂正を行うための処理時間の確保に起因するタクトの処理時間の長期化を防止することができる。この場合、ソフトエラーを検出した検証部に当該ソフトエラーを訂正させる必要はなく、ソフトエラーの訂正処理を省略できる分だけ当該検証部に掛かる負荷が低減される。   Further, according to the present embodiment, even if a soft error occurs in one of the monitoring data RXD_A or the monitoring data RXD_B, if no soft error occurs in the other monitoring data, it is necessary to transmit a WAIT signal to the CPU. However, it is possible to prevent an increase in tact processing time due to securing of processing time for correcting soft errors. In this case, it is not necessary for the verification unit that has detected the soft error to correct the soft error, and the load on the verification unit is reduced by the amount that the soft error correction process can be omitted.

<他の実施形態>
以上、この発明の各実施形態について説明したが、この発明には他にも実施形態が考えられる。例えば、以下の通りである。
(1)上記第2実施形態の通信インタフェース回路200或いは上記第3実施形態の通信インタフェース回路300では、算出部202或いは算出部302が監視データ或いは制御データを複製したが、別途監視データ或いは制御データを複製して通信バッファメモリに書き込む書き込み部を設けても良い。これにより、算出部202或いは算出部302が実行する処理の負荷を低減させることができる。
<Other embodiments>
As mentioned above, although each embodiment of this invention was described, other embodiment can be considered to this invention. For example, it is as follows.
(1) In the communication interface circuit 200 of the second embodiment or the communication interface circuit 300 of the third embodiment, the calculation unit 202 or the calculation unit 302 duplicates the monitoring data or control data. May be provided for writing to the communication buffer memory. Thereby, the load of the process which the calculation part 202 or the calculation part 302 performs can be reduced.

(2)上記各実施形態では、制御システムの制御装置への本発明の適用例を説明したが、通信インタフェース回路100、200或いは300を単体で製造販売しても良い。また、上記実施形態では、本発明の特徴を顕著に示す算出部、および検証部をソフトウェアにより実現したが電子回路などのハードウェアにより実現しても良く、また、上記書き込み部についても同様である。また、上記第3実施形態の選択部をソフトウェアにより実現しても良い。 (2) In each of the above embodiments, the application example of the present invention to the control device of the control system has been described. However, the communication interface circuit 100, 200, or 300 may be manufactured and sold alone. In the above-described embodiment, the calculation unit and the verification unit that clearly show the features of the present invention are realized by software, but may be realized by hardware such as an electronic circuit, and the same applies to the writing unit. . Further, the selection unit of the third embodiment may be realized by software.

(3)上記第3実施形態の通信インタフェース回路300では、監視データ或いは制御データを1個複製した。しかし、複製する監視データ或いは制御データの個数はこれに限定されるものではなく、2個以上複製してもよい。なお、監視データ或いは制御データを2個以上複製する場合は、その増加に応じた分だけ通信バッファメモリ320および検証部304を新たに設ける必要があることは言うまでもない。 (3) In the communication interface circuit 300 of the third embodiment, one piece of monitoring data or control data is duplicated. However, the number of monitoring data or control data to be duplicated is not limited to this, and two or more may be duplicated. In addition, when duplicating two or more monitoring data or control data, it is needless to say that the communication buffer memory 320 and the verification unit 304 need to be newly provided in accordance with the increase.

(4)上記各実施形態では、制御装置へ監視データを送信する監視対象機器と制御装置による制御対象の制御対象機器とが別体の装置であったが、監視対象機器と制御対象機器とが一体となった装置であっても勿論良い。例えば、制御対象機器にその駆動状態等を検出するためのセンサが内蔵されている場合などである。要は、受信した監視データを通信バッファメモリに書き込み、当該監視データを用いて制御対象機器を制御する制御データを演算し前記通信バッファメモリに書き込む制御装置であれば、本発明を適用可能である。 (4) In each of the above embodiments, the monitoring target device that transmits monitoring data to the control device and the control target device to be controlled by the control device are separate devices, but the monitoring target device and the control target device are different from each other. Of course, an integrated device may be used. For example, there is a case where a sensor for detecting the driving state or the like is built in the control target device. In short, the present invention can be applied to any control device that writes the received monitoring data to the communication buffer memory, calculates control data for controlling the control target device using the monitoring data, and writes the control data to the communication buffer memory. .

1…制御システム、10,20,30…制御装置、20_1〜20_n…I/O機器、30_1〜30_n…監視対象機器、40_1〜40_n…制御対象機器、100,200,300…通信インタフェース回路、110…CPU、120,220,320…通信バッファメモリ、101,301…通信部、102,202,302…算出部、103…記憶部、104,204,304…検証部、121_k,221_k,321_k…受信データ領域、122_k,222_k,322_k…送信データ領域、131_k…受信ECC領域、132_k…送信ECC領域、RXD,RXD_s,RXD_A,RXD_B…監視データ、TXD,TXD_s,TXD_A,TXD_B…制御データ。 DESCRIPTION OF SYMBOLS 1 ... Control system 10, 20, 30 ... Control apparatus, 20_1-20_n ... I / O apparatus, 30_1-30_n ... Monitoring object apparatus, 40_1-40_n ... Control object apparatus, 100, 200, 300 ... Communication interface circuit, 110 ... CPU, 120, 220, 320 ... Communication buffer memory, 101, 301 ... Communication unit, 102, 202, 302 ... Calculation unit, 103 ... Storage unit, 104, 204, 304 ... Verification unit, 121_k, 221_k, 321_k ... Reception Data area, 122_k, 222_k, 322_k ... transmission data area, 131_k ... reception ECC area, 132_k ... transmission ECC area, RXD, RXD_s, RXD_A, RXD_B ... monitoring data, TXD, TXD_s, TXD_A, TXD_B ... control data.

Claims (5)

受信した監視データを通信バッファメモリに書き込み、当該監視データを用いて制御対象機器を制御する制御データを演算し前記通信バッファメモリに書き込む制御装置において、
前記通信バッファメモリに書き込む監視データまたは制御データについて、少なくとも1ビットのエラーを訂正することができるエラーチェックコードを算出する算出部と、
前記算出部により算出されたエラーチェックコードを、算出元のデータと対応付けて保持する記憶部と、
前記通信バッファメモリからデータを読み出す際に当該データに対応するエラーチェックコードを前記記憶部から読み出し、当該エラーチェックコードを用いてエラーの有無の検証を行い、エラーの訂正を行う検証部と
を有することを特徴とする制御装置。
In the control device that writes the received monitoring data to the communication buffer memory, calculates control data for controlling the control target device using the monitoring data, and writes the control data to the communication buffer memory.
A calculation unit for calculating an error check code capable of correcting an error of at least one bit for the monitoring data or the control data to be written to the communication buffer memory;
A storage unit that stores the error check code calculated by the calculation unit in association with the data of the calculation source;
A verification unit that reads an error check code corresponding to the data when reading data from the communication buffer memory, verifies the presence or absence of an error using the error check code, and corrects the error. A control device characterized by that.
前記エラーチェックコードの算出元のデータを複製して前記通信バッファメモリに書き込む書き込み部を有し、
前記検証部は、複製元のデータと複製されたデータの少なくとも一方に対して当該複製元のデータに対応するエラーチェックコードを用いた検証を行う
ことを特徴とする請求項1に記載の制御装置。
A writing unit that replicates the error check code calculation source data and writes the data to the communication buffer memory;
The control device according to claim 1, wherein the verification unit performs verification using an error check code corresponding to the replication source data for at least one of the replication source data and the replicated data. .
前記検証部は、前記複製元のデータに対する検証と前記複製されたデータに対する検証を並列に実行することを特徴とする請求項2に記載の制御装置。   The control apparatus according to claim 2, wherein the verification unit performs verification on the replication source data and verification on the replicated data in parallel. 前記検証部は、前記複製元のデータと複製されたデータのうち、予め定められた方についての検証を行い、当該検証により検出されたエラーが訂正不能なものである場合に、他方についての検証を行う
ことを特徴とする請求項2に記載の制御装置。
The verification unit performs verification on a predetermined one of the data at the copy source and the copied data, and when the error detected by the verification is uncorrectable, the verification on the other The control device according to claim 2, wherein:
通信バッファメモリに書き込むデータについて、少なくとも1ビットのエラーを訂正することができるエラーチェックコードを算出する算出部と、
前記算出部により算出されたエラーチェックコードを、算出元のデータと対応付けて保持する記憶部と、
前記通信バッファメモリからのデータの読み出し指示を与えられたことを契機として、前記通信バッファメモリから該当データを読み出すとともに、当該データに対応するエラーチェックコードを前記記憶部から読み出し、当該エラーチェックコードを用いてエラーの有無についての検証を行い、エラーの訂正を行う検証部と、
を有し、
前記検証部による検証を経たデータを前記読み出し指示の送信元へ出力することを特徴とする通信インタフェース回路。
A calculation unit for calculating an error check code capable of correcting an error of at least 1 bit for data to be written to the communication buffer memory;
A storage unit that stores the error check code calculated by the calculation unit in association with the data of the calculation source;
Upon receiving an instruction to read data from the communication buffer memory, the corresponding data is read from the communication buffer memory, an error check code corresponding to the data is read from the storage unit, and the error check code is And verifying the presence or absence of errors using a verification unit that corrects errors,
Have
A communication interface circuit that outputs data that has been verified by the verification unit to a source of the read instruction.
JP2015074713A 2015-04-01 2015-04-01 Control device and communication interface circuit Pending JP2016194839A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015074713A JP2016194839A (en) 2015-04-01 2015-04-01 Control device and communication interface circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015074713A JP2016194839A (en) 2015-04-01 2015-04-01 Control device and communication interface circuit

Publications (1)

Publication Number Publication Date
JP2016194839A true JP2016194839A (en) 2016-11-17

Family

ID=57323943

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015074713A Pending JP2016194839A (en) 2015-04-01 2015-04-01 Control device and communication interface circuit

Country Status (1)

Country Link
JP (1) JP2016194839A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190089155A (en) * 2018-01-18 2019-07-30 미쓰비시덴키 가부시키가이샤 PLC, network unit, CPU unit, and data transmission method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190089155A (en) * 2018-01-18 2019-07-30 미쓰비시덴키 가부시키가이샤 PLC, network unit, CPU unit, and data transmission method
KR102016629B1 (en) 2018-01-18 2019-08-30 미쓰비시덴키 가부시키가이샤 PLC, network unit, CPU unit, and data transfer method

Similar Documents

Publication Publication Date Title
TWI465897B (en) Systems and methods for error checking and correcting for a memory module
US6604177B1 (en) Communication of dissimilar data between lock-stepped processors
TWI546814B (en) Memory device having error correction logic
US8862944B2 (en) Isolation of faulty links in a transmission medium
US5701313A (en) Method and apparatus for removing soft errors from a memory
US8566682B2 (en) Failing bus lane detection using syndrome analysis
EP1224548B1 (en) System and method improving fault isolation and diagnosis in computers
US20080046802A1 (en) Memory controller and method of controlling memory
US9141485B2 (en) Storage device, control device and data protection method
JP6713740B2 (en) Memory module
JP5966243B2 (en) Storage device and storage device control method
JP4723265B2 (en) Error detection / correction device control method, error detection / correction device, information processing system, error detection / correction device control program, data processing device
JP2016194839A (en) Control device and communication interface circuit
WO2015068285A1 (en) Programmable device and electronic system device using same
US9043655B2 (en) Apparatus and control method
WO2011160957A1 (en) Isolation of faulty links in a transmission medium
JP6332134B2 (en) Memory diagnostic circuit
WO2021038923A1 (en) Control device, execution control method for user program, and system program
US9519539B2 (en) Monitoring data error status in a memory
US20070174722A1 (en) Input/output control method, computer product, and disk control apparatus
US11809272B2 (en) Error correction code offload for a serially-attached memory device
JP2017059017A (en) Control device with memory access part
JP2018077679A (en) Control device, transmitting device, and control method
JP2009042855A (en) Method and system for transferring data between circuits
CN115904797A (en) CPU memory diagnosis method, system and equipment based on field programmable gate array