WO2021181712A1 - Data processing device, data processing method, and program - Google Patents

Data processing device, data processing method, and program Download PDF

Info

Publication number
WO2021181712A1
WO2021181712A1 PCT/JP2020/015665 JP2020015665W WO2021181712A1 WO 2021181712 A1 WO2021181712 A1 WO 2021181712A1 JP 2020015665 W JP2020015665 W JP 2020015665W WO 2021181712 A1 WO2021181712 A1 WO 2021181712A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
area
processor
region
register
Prior art date
Application number
PCT/JP2020/015665
Other languages
French (fr)
Japanese (ja)
Inventor
融 村田
大介 八木
敦史 上村
田中 裕
拓也 谷口
雄作 小林
Original Assignee
オムロン株式会社
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 オムロン株式会社 filed Critical オムロン株式会社
Publication of WO2021181712A1 publication Critical patent/WO2021181712A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/18Error detection or correction of the data by redundancy in hardware using passive fault-masking of the redundant circuits
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/32Address formation of the next instruction, e.g. by incrementing the instruction counter
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/34Addressing or accessing the instruction operand or the result ; Formation of operand address; Addressing modes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Executing Machine-Instructions (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

In the present invention, a processor moves data residing on a register to a first region of a memory in response to an save command, and restores the data residing on the first region to the register in response to a restore command. After execution of the move command, the processor writes the data residing on the first region to each of regions, starting with a second region and up to Nth region, in the memory. Before execution of the restore command, the processor compares the data residing on each of the regions, from the first region to the Nth region, with each other, and in response to a situation where the data residing on a majority of the regions match but the data residing on the first region does not match the data residing on the majority of the regions, overwrites the data residing on the first region with the data residing on the majority of the regions. This configuration makes it possible to prevent temporary stopping of the system caused by damage to data temporarily moved from the register to the memory.

Description

データ処理装置、データ処理方法およびプログラムData processing equipment, data processing methods and programs
 本開示は、データ処理装置、データ処理方法およびプログラムに関する。 This disclosure relates to data processing devices, data processing methods and programs.
 半導体デバイスの高集積化および微細化に伴い、メモリにおける一過性のビットエラー(ソフトエラー)が急増している。ソフトエラーにより、データが破損する(データ化けが発生する)。ソフトエラーは、例えばα粒子や宇宙線中性子の衝突によって生じる。ソフトエラーの起こりうるメモリをシステムに適用すると、データの破損によるシステムの一時的な停止が生じうる。 With the increasing integration and miniaturization of semiconductor devices, transient bit errors (soft errors) in memory are rapidly increasing. Data is corrupted due to a soft error (data is garbled). Soft errors are caused, for example, by collisions of alpha particles and cosmic ray neutrons. Applying soft-error-prone memory to a system can result in a temporary system outage due to data corruption.
 データの破損によるシステムの一時的な停止を回避するための技術が開発されている。例えば、特開2007-18414号公報(特許文献1)には、RAM(Random Access Memory)の変数データを書き換える場合に、同一のデータをRAM内の異なる3以上のアドレスの各々に書き込む制御装置が開示されている。この制御装置は、プログラムの実行によって変数を読み出すとき、RAM内の異なる3以上のアドレスの各々からデータを読み出す。そして、制御装置は、異なる3以上のアドレスからそれぞれ読み出したデータのうち、任意の1個のデータが他の複数個のデータと異なっている場合には、異なっているデータを他の複数個のデータに書き換える。 Technology has been developed to avoid temporary system outages due to data corruption. For example, Japanese Patent Application Laid-Open No. 2007-18414 (Patent Document 1) includes a control device that writes the same data to each of three or more different addresses in the RAM when rewriting the variable data of the RAM (Random Access Memory). It is disclosed. When the controller reads a variable by executing a program, it reads data from each of three or more different addresses in the RAM. Then, when any one data among the data read from three or more different addresses is different from the other plurality of data, the control device transfers the different data to the other plurality of data. Rewrite to data.
特開2007-18414号公報Japanese Unexamined Patent Publication No. 2007-18414
 メインルーチンの実行中に関数処理(サブルーチン)が発生すると、メインルーチンを中断させるためにスタック操作が行なわれる。スタック操作は、(1)サブルーチン処理開始時に、プロセッサに内蔵されるレジスタに保持されたデータをRAMのスタック領域に一時退避させる退避操作(いわゆるPush操作)と、(2)サブルーチン処理終了時に、スタック領域に退避させたデータをレジスタに復帰させる復帰操作(いわゆるPop操作)とを含む。スタック操作によってデータが一時退避されるスタック領域についてもソフトエラーが起こり得る。しかしながら、サブルーチン処理に伴うスタック操作のコードは、コンパイラによって自動生成される。そのため、汎用のコンパイラを用いる場合、スタック操作に対して特許文献1に記載の技術を適用することができない。 If a function process (subroutine) occurs during the execution of the main routine, a stack operation is performed to interrupt the main routine. The stack operations are (1) a save operation (so-called Push operation) that temporarily saves the data held in the register built in the processor to the stack area of the RAM at the start of the subroutine processing, and (2) a stack at the end of the subroutine processing. It includes a return operation (so-called Pop operation) for returning the data saved in the area to the register. A soft error can also occur in the stack area where data is temporarily saved by the stack operation. However, the code for stack operations associated with subroutine processing is automatically generated by the compiler. Therefore, when a general-purpose compiler is used, the technique described in Patent Document 1 cannot be applied to the stack operation.
 本開示は、上記の問題に鑑みてなされたものであり、その目的は、レジスタからメモリに一時退避されるデータの破損に起因する、システムの一時的な停止を抑制可能なデータ処理装置、データ処理方法およびプログラムを提供することである。 The present disclosure has been made in view of the above problems, and an object thereof is a data processing device and data capable of suppressing a temporary stop of a system due to a corruption of data temporarily saved from a register to a memory. It is to provide a processing method and a program.
 本開示の一例によれば、データ処理装置は、メモリと、メモリを用いて演算処理を実行するプロセッサとを備える。プロセッサは、レジスタを内蔵する。プロセッサは、退避命令に応じて、レジスタに保持されたデータをメモリの第1の領域に退避させ、復帰命令に応じて、第1の領域のデータをレジスタに復帰させる。プロセッサは、退避命令の実行後に第1の処理を実行し、復帰命令の実行前に第2の処理を実行する。第1の処理は、第1の領域のデータを、メモリにおける第2の領域から第Nの領域の各々に書き込む処理を含む。Nは3以上の整数である。第2の処理は、第1の領域から第Nの領域のデータを互いに照合する処理と、第1の領域から第Nの領域のうち過半数の領域のデータが一致し、かつ、第1の領域のデータが過半数の領域のデータと一致しないことに応じて、過半数の領域のデータを第1の領域に上書きする処理とを含む。 According to an example of the present disclosure, the data processing device includes a memory and a processor that executes arithmetic processing using the memory. The processor has a built-in register. The processor saves the data held in the register to the first area of the memory in response to the save instruction, and returns the data in the first area to the register in response to the return instruction. The processor executes the first process after executing the save instruction and executes the second process before executing the return instruction. The first process includes a process of writing the data of the first area to each of the second area to the Nth area in the memory. N is an integer of 3 or more. The second process is a process of collating the data of the first region to the Nth region with each other, and the data of the majority of the regions from the first region to the Nth region are matched, and the first region is the first region. This includes a process of overwriting the data of the majority area with the first area according to the fact that the data of the majority area does not match the data of the majority area.
 この開示によれば、退避命令に応じてデータが一時退避された第1の領域にソフトエラーが発生したとしても、復帰命令の実行前に、第1の領域のデータが修復される。そのため、復帰命令に応じて、レジスタには正しいデータが復帰される。その結果、レジスタからメモリに一時退避されるデータの破損に起因する、システムの一時的な停止を抑制できる。 According to this disclosure, even if a soft error occurs in the first area where the data is temporarily saved in response to the save instruction, the data in the first area is restored before the return command is executed. Therefore, the correct data is returned to the register in response to the return instruction. As a result, it is possible to suppress a temporary stop of the system due to the corruption of the data temporarily saved from the register to the memory.
 上述の開示において、第1の領域は、メモリに設定されたスタック領域に含まれる。プロセッサは、退避命令の実行前後における、スタック領域に設定されたスタックポインタを参照して、第1の領域を特定する。 In the above disclosure, the first area is included in the stack area set in the memory. The processor identifies the first area by referring to the stack pointer set in the stack area before and after the execution of the save instruction.
 この開示によれば、プロセッサは、メモリにおいて、レジスタからデータが一時退避された第1の領域を正しく特定できる。 According to this disclosure, the processor can correctly identify the first area in the memory where the data is temporarily saved from the register.
 上述の開示において、退避命令は、関数処理の呼び出しのために発行される。復帰命令は、関数処理の完了後に発行される。プロセッサは、関数処理の完了に応じて、第2の処理を開始する。この開示によれば、復帰命令の実行の直前において、第1の領域のデータを修復できる。 In the above disclosure, the save instruction is issued for calling the function process. The return instruction is issued after the function processing is completed. The processor starts a second process upon completion of the function process. According to this disclosure, the data in the first region can be restored immediately before the execution of the return instruction.
 本開示の一例によれば、データ処理装置は、メモリと、メモリを用いて演算処理を実行するプロセッサとを備える。プロセッサは、レジスタを内蔵する。データ処理装置のデータ処理方法は、第1~第4のステップを備える。第1のステップは、プロセッサが、退避命令に応じて、レジスタに保持されたデータをメモリの第1の領域に退避させるステップである。第2のステップは、プロセッサが、退避命令の実行後に第1の処理を実行するステップである。第3のステップは、プロセッサが、復帰命令の実行前に第2の処理を実行するステップである。第4のステップは、プロセッサが、復帰命令に応じて、第1の領域のデータをレジスタに復帰させるステップである。第1の処理は、第1の領域のデータを、メモリにおける第2の領域から第Nの領域の各々に書き込む処理を含む。Nは3以上の整数である。第2の処理は、第1の領域から第Nの領域のデータを互いに照合する処理と、第1の領域から第Nの領域のうち過半数の領域のデータが一致し、かつ、第1の領域のデータが過半数の領域のデータと一致しないことに応じて、過半数の領域のデータを第1の領域に上書きする処理とを含む。 According to an example of the present disclosure, the data processing device includes a memory and a processor that executes arithmetic processing using the memory. The processor has a built-in register. The data processing method of the data processing apparatus includes the first to fourth steps. The first step is a step in which the processor saves the data held in the register to the first area of the memory in response to the save instruction. The second step is a step in which the processor executes the first process after executing the save instruction. The third step is a step in which the processor executes the second process before executing the return instruction. The fourth step is a step in which the processor returns the data in the first region to the register in response to the return instruction. The first process includes a process of writing the data of the first area to each of the second area to the Nth area in the memory. N is an integer of 3 or more. The second process is a process of collating the data of the first region to the Nth region with each other, and the data of the majority of the regions from the first region to the Nth region are matched, and the first region is the first region. This includes a process of overwriting the data of the majority area with the first area according to the fact that the data of the majority area does not match the data of the majority area.
 本開示の一例によれば、プログラムは、上記のデータ処理方法をコンピュータに実行させる。これらの開示によっても、レジスタからメモリに一時退避されるデータの破損に起因する、システムの一時的な停止を抑制できる。 According to an example of the present disclosure, the program causes a computer to execute the above data processing method. These disclosures also make it possible to suppress a temporary stoppage of the system due to corruption of data temporarily saved from the register to the memory.
 本開示によれば、レジスタからメモリに一時退避されるデータの破損に起因する、システムの一時的な停止を抑制できる。 According to the present disclosure, it is possible to suppress a temporary stop of the system due to the corruption of the data temporarily saved from the register to the memory.
実施形態に係る制御システムの全体構成を示す概略図である。It is the schematic which shows the overall structure of the control system which concerns on embodiment. 実施の形態に係る安全IOユニットにおけるデータ修復処理の概要を示す図である。It is a figure which shows the outline of the data restoration process in the safety IO unit which concerns on embodiment. 安全IOユニットのハードウェア構成例を示す模式図である。It is a schematic diagram which shows the hardware configuration example of a safety IO unit. メインメモリの領域を示す図である。It is a figure which shows the area of a main memory. メインメモリへのデータの書き込み処理の一例を示す図である。It is a figure which shows an example of the process of writing data to a main memory. メインメモリからのデータの読み出し処理の一例を示す図である。It is a figure which shows an example of the reading process of data from a main memory. Push操作後に実行される処理を示す図である。It is a figure which shows the process which is executed after a Push operation. Pop操作前に実行される処理を示す図である。It is a figure which shows the process which is executed before Pop operation. 標準PLCのハードウェア構成例を示す模式図である。It is a schematic diagram which shows the hardware configuration example of a standard PLC. 安全PLCのハードウェア構成例を示す模式図である。It is a schematic diagram which shows the hardware configuration example of a safety PLC. カプラのハードウェア構成例を示す模式図である。It is a schematic diagram which shows the hardware configuration example of a coupler.
 本発明の実施の形態について、図面を参照しながら詳細に説明する。なお、図中の同一または相当部分については、同一符号を付してその説明は繰返さない。 An embodiment of the present invention will be described in detail with reference to the drawings. The same or corresponding parts in the drawings are designated by the same reference numerals and the description thereof will not be repeated.
 §1 適用例
 航空宇宙システム、自動車、医療機器、通信機器、産業機器など様々に分野において、メモリのソフトエラーに起因するシステムの一時的な停止を抑制することが望まれる。本開示は、このような様々な分野のシステムに適用され得る。以下では、本開示の適用例として、FA(ファクトリオートメーション)分野に組み込まれる制御システムについて説明するが、本開示の適用例は、当該制御システムに限定されない。
§1 Application example In various fields such as aerospace systems, automobiles, medical equipment, communication equipment, and industrial equipment, it is desirable to suppress temporary system outages caused by memory soft errors. The present disclosure may be applied to systems in such various fields. Hereinafter, a control system incorporated in the FA (factory automation) field will be described as an application example of the present disclosure, but the application example of the present disclosure is not limited to the control system.
 図1は、実施形態に係る制御システムの全体構成を示す概略図である。図1に例示される制御システム1は、主要なコンポーネントとして、標準PLC(プログラマブルロジックコントローラ)100と、安全PLC200と、1以上のカプラ300と、1以上の安全IOユニット400とを含む。制御システム1に含まれるこれらの装置は、各種のタスクを実行するデータ処理装置である。 FIG. 1 is a schematic view showing the overall configuration of the control system according to the embodiment. The control system 1 exemplified in FIG. 1 includes a standard PLC (programmable logic controller) 100, a safety PLC 200, one or more couplers 300, and one or more safety IO units 400 as main components. These devices included in the control system 1 are data processing devices that execute various tasks.
 標準PLC100は、予め作成された標準制御プログラムに従って、任意の制御対象に対する標準制御を実行する。「標準制御」は、予め定められた要求仕様に沿って、制御対象を制御するための処理の総称である。制御対象は、例えばサーボモータ、ロボットなどである。 The standard PLC100 executes standard control for an arbitrary control target according to a standard control program created in advance. "Standard control" is a general term for processing for controlling a control target according to a predetermined requirement specification. The control target is, for example, a servo motor, a robot, or the like.
 安全PLC200は、標準PLC100とは独立して、任意の制御対象に対するセーフティ制御を実行する。図1に例示される安全PLC200は、ローカルバスを介して標準PLC100に接続される。「セーフティ制御」は、設備や機械などによって人の安全が脅かされることを防止するための処理の総称である。「セーフティ制御」は、例えばIEC 61508などに規定されたセーフティ機能を実現するための要件を満たすように設計される。 The safety PLC200 executes safety control for an arbitrary control target independently of the standard PLC100. The safety PLC 200 illustrated in FIG. 1 is connected to the standard PLC 100 via a local bus. "Safety control" is a general term for processing to prevent human safety from being threatened by equipment or machines. The "safety control" is designed to meet the requirements for realizing the safety function specified in, for example, IEC 61508.
 カプラ300は、標準PLC100と安全IOユニット400との間のデータの遣り取りを仲介する。カプラ300は、フィールドネットワーク2を介して、標準PLC100と電気的に接続されている。フィールドネットワーク2は、FA用のデータ伝送を実現するための通信媒体である。フィールドネットワーク2において、予め定められた周期でフレーム伝送が可能になっており、ネットワーク内の各ノードに対するデータ到着時間が保証される。このようなデータ到着時間が保証されるプロトコルの一例として、本実施の形態に従う制御システム1においては、フィールドネットワーク2にはEtherCAT(登録商標)を採用する。 The coupler 300 mediates the exchange of data between the standard PLC 100 and the safety IO unit 400. The coupler 300 is electrically connected to the standard PLC 100 via the field network 2. The field network 2 is a communication medium for realizing data transmission for FA. In the field network 2, frame transmission is possible at a predetermined cycle, and the data arrival time for each node in the network is guaranteed. As an example of such a protocol in which the data arrival time is guaranteed, EtherCAT (registered trademark) is adopted as the field network 2 in the control system 1 according to the present embodiment.
 カプラ300は、標準PLC100から受信したデータを安全IOユニット400へ送信するとともに、安全IOユニット400からデータを受信すると、当該受信したデータを次に到着するフレームに格納する準備を行う。 The coupler 300 transmits the data received from the standard PLC 100 to the safety IO unit 400, and when the data is received from the safety IO unit 400, prepares to store the received data in the next arriving frame.
 安全IOユニット400は、安全PLC200またはカプラ300にローカルバスを介して接続される。さらに、安全IOユニット400には任意の安全デバイス(図示せず)が接続される。安全デバイスには、ライトカーテン、非常停止ボタン、セーフティドアスイッチなどが含まれる。 The safety IO unit 400 is connected to the safety PLC 200 or the coupler 300 via the local bus. Further, any safety device (not shown) is connected to the safety IO unit 400. Safety devices include light curtains, emergency stop buttons, safety door switches and the like.
 安全IOユニット400は、安全デバイスからの入力信号を受け付けて、安全PLC200へ当該入力信号を提供する。あるいは、安全IOユニット400は、安全デバイスからの入力信号を受け付けて、カプラ300を介して標準PLC100へ当該入力信号を提供する。標準PLC100へ提供された入力信号は、安全PLC200へ提供される。 The safety IO unit 400 receives the input signal from the safety device and provides the input signal to the safety PLC 200. Alternatively, the safety IO unit 400 receives an input signal from the safety device and provides the input signal to the standard PLC 100 via the coupler 300. The input signal provided to the standard PLC100 is provided to the safe PLC200.
 さらに、安全IOユニット400は、安全PLC200からの指令に応じて、安全デバイスへ出力信号を出力する。あるいは、安全IOユニット400は、カプラ300および標準PLC100を介した安全PLC200からの指令に応じて、安全デバイスへ出力信号を出力する。 Further, the safety IO unit 400 outputs an output signal to the safety device in response to a command from the safety PLC 200. Alternatively, the safety IO unit 400 outputs an output signal to the safety device in response to a command from the safety PLC 200 via the coupler 300 and the standard PLC 100.
 安全IOユニット400は、予め定められた周期ごとに、安全デバイスからの入力信号の受け付け、当該入力信号の提供、安全デバイスへの出力信号の出力などに関する演算処理を実行する。 The safety IO unit 400 executes arithmetic processing related to receiving an input signal from the safety device, providing the input signal, outputting the output signal to the safety device, and the like at predetermined intervals.
 安全PLC200は、安全IOユニット400から提供された入力信号に応じて、セーフティ制御を実行する。例えば、安全PLC200は、ライトカーテンである安全デバイスから人の侵入を示す入力信号が提供されると、標準PLC100の制御対象への電源供給を遮断し、制御システム1を一時的に停止させる。あるいは、安全PLC200は、非常停止ボタンである安全デバイスからボタン押下を示す入力信号が提供されると、標準PLC100の制御対象への電源供給を遮断し、制御システム1を一時的に停止させる。 The safety PLC 200 executes safety control in response to the input signal provided by the safety IO unit 400. For example, when the safety device, which is a light curtain, provides an input signal indicating the intrusion of a person, the safety PLC 200 cuts off the power supply to the controlled object of the standard PLC 100 and temporarily stops the control system 1. Alternatively, when the safety device, which is an emergency stop button, provides an input signal indicating that the button is pressed, the safety PLC 200 cuts off the power supply to the controlled object of the standard PLC 100 and temporarily stops the control system 1.
 このように、安全IOユニット400は、人の安全が脅かされることを防止するためのセーフティ制御に直接関わる。従って、安全PLC200は、安全IOユニット400に故障や異常が発生したときにも、制御システム1を一時的に停止させるように設計されている。 In this way, the safety IO unit 400 is directly involved in safety control to prevent human safety from being threatened. Therefore, the safety PLC 200 is designed to temporarily stop the control system 1 even when a failure or abnormality occurs in the safety IO unit 400.
 安全IOユニット400において、メインルーチンの実行中に関数処理(サブルーチン)が発生すると、プロセッサに内蔵されるレジスタに保持されたデータがメインメモリに一時退避され、関数処理の完了後に、退避されたデータがレジスタに復帰される。レジスタに保持されたデータのメインメモリへの退避は、退避命令であるPush命令に応じて実行される。退避されたデータのレジスタへの復帰は、復帰命令であるPop命令に応じて実行される。 In the safety IO unit 400, when a function process (subroutine) occurs during execution of the main routine, the data held in the register built in the processor is temporarily saved in the main memory, and the saved data is saved after the function process is completed. Is returned to the register. Evacuation of the data held in the register to the main memory is executed in response to the Push instruction which is an evacuation instruction. The return of the saved data to the register is executed in response to the Pop instruction which is a return instruction.
 メインメモリにおいて、データが一時退避された領域にソフトエラーが発生すると、一時退避されたデータが破損する。破損したデータが修復されないまま安全IOユニット400が動作し続けると、安全PLC200は、セーフティ制御を正常に実行できない。そのため、安全IOユニット400は、メインメモリに一時退避されたデータが破損したとしても、当該データを修復する機能を有する。 In the main memory, if a soft error occurs in the area where the data was temporarily saved, the temporarily saved data will be damaged. If the safety IO unit 400 continues to operate without repairing the corrupted data, the safety PLC 200 cannot normally execute the safety control. Therefore, the safety IO unit 400 has a function of recovering the data temporarily saved in the main memory even if the data is damaged.
 図2は、実施の形態に係る安全IOユニットにおけるデータ修復処理の概要を示す図である。図2に示されるプロセッサ402およびメインメモリ404は、安全IOユニット400に備えられる。プロセッサ402は、レジスタ403を内蔵する。 FIG. 2 is a diagram showing an outline of data recovery processing in the safety IO unit according to the embodiment. The processor 402 and the main memory 404 shown in FIG. 2 are provided in the safety IO unit 400. The processor 402 includes a register 403.
 プロセッサ402は、Push命令に応じて、レジスタ403に保持されたデータをメインメモリ404の領域404aに退避させる(ステップS1)。 The processor 402 saves the data held in the register 403 to the area 404a of the main memory 404 in response to the Push instruction (step S1).
 プロセッサ402は、Push命令の実行後に、領域404aのデータを、メインメモリ404における領域404aとは別の2つの領域404b,404cの各々に書き込む(ステップS2)。これにより、メインメモリ404において、レジスタ403から一時退避されたデータが3重化される。 After executing the Push instruction, the processor 402 writes the data in the area 404a to each of the two areas 404b and 404c different from the area 404a in the main memory 404 (step S2). As a result, in the main memory 404, the data temporarily saved from the register 403 is tripled.
 プロセッサ402は、Pop命令の実行前に、領域404a,404b,404cのデータを互いに照合する(ステップS3)。 The processor 402 collates the data in the areas 404a, 404b, and 404c with each other before executing the Pop instruction (step S3).
 さらに、プロセッサ402は、領域404a~404cのうち過半数(すなわち2つ)の領域のデータが一致し、かつ、領域404aのデータが過半数の領域のデータと一致しないことに応じて、過半数の領域のデータを領域404aに上書きする(ステップS4)。ステップS2が完了してからステップS3の開始までの間に、領域404aにソフトエラーが発生した場合、領域404aのデータは、領域404b,404cのデータと一致しない。そのため、領域404b,404cのデータが領域404aに上書きされる。これにより、領域404aにおけるデータの破損が修復される。 Further, the processor 402 determines that the data in the majority (that is, two) regions of the regions 404a to 404c match, and the data in the region 404a does not match the data in the majority region. Overwrite the data in the area 404a (step S4). If a soft error occurs in the area 404a between the completion of step S2 and the start of step S3, the data in the area 404a does not match the data in the areas 404b and 404c. Therefore, the data in the areas 404b and 404c is overwritten in the area 404a. This repairs the data corruption in region 404a.
 その後、プロセッサ402は、Pop命令に応じて、領域404aのデータをレジスタ403に復帰させる(ステップS5)。 After that, the processor 402 returns the data in the area 404a to the register 403 in response to the Pop instruction (step S5).
 上述したように、ステップS2の完了からステップS3の開始までの間に、領域404aにソフトエラーが発生したとしても、ステップS4において、領域404aのデータが修復される。そのため、ステップS4の完了からステップS5の開始までの間に、領域404aにソフトエラーが発生しない限り、レジスタ403には、正しいデータが復帰される。その結果、レジスタ403からメインメモリ404に一時退避されるデータの破損に起因する、システムの一時的な停止を抑制できる。 As described above, even if a soft error occurs in the area 404a between the completion of step S2 and the start of step S3, the data in the area 404a is restored in step S4. Therefore, correct data is returned to the register 403 as long as a soft error does not occur in the area 404a between the completion of step S4 and the start of step S5. As a result, it is possible to suppress a temporary stop of the system due to the corruption of the data temporarily saved from the register 403 to the main memory 404.
 §2 具体例
 <安全IOユニットのハードウェア構成>
 図3は、安全IOユニットのハードウェア構成例を示す模式図である。図3に例示される安全IOユニット400は、プロセッサ402と、メインメモリ404と、ストレージ410と、ローカルバスコントローラ420と、安全IOモジュール430とを含む。これらのコンポーネントは、プロセッサバス440を介して接続されている。
§2 Specific example <Hardware configuration of safety IO unit>
FIG. 3 is a schematic diagram showing a hardware configuration example of the safety IO unit. The safety IO unit 400 illustrated in FIG. 3 includes a processor 402, a main memory 404, a storage 410, a local bus controller 420, and a safety IO module 430. These components are connected via the processor bus 440.
 プロセッサ402は、セーフティ制御を実現するために必要な信号の入出力および管理機能に係る制御演算を実行する演算処理部に相当し、CPUやMPU(Micro Processing Unit)などによって構成される。プロセッサ402は、レジスタ403を内蔵している。レジスタ403は、プロセッサ402による演算結果を一時的に保持したり、メインメモリ404を読み書きする際のアドレスを保持したりする。 The processor 402 corresponds to a calculation processing unit that executes control calculations related to signal input / output and management functions necessary for realizing safety control, and is composed of a CPU, an MPU (Micro Processing Unit), and the like. The processor 402 has a built-in register 403. The register 403 temporarily holds the calculation result of the processor 402, and holds the address when reading and writing the main memory 404.
 メインメモリ404は、例えばDRAMやSRAMのような揮発性メモリによって構成される。SRAMは、記憶部の構造としてフリップフロップを用いており、リフレッシュ動作を必要とせず、DRAMより高速に動作できるという利点を有する。そのため、SRAMをメインメモリ404として用いることが好ましい。 The main memory 404 is composed of a volatile memory such as a DRAM or SRAM. The SRAM uses a flip-flop as the structure of the storage unit, does not require a refresh operation, and has an advantage that it can operate at a higher speed than the DRAM. Therefore, it is preferable to use SRAM as the main memory 404.
 積み上げ型(スタック型)の構造を有するDRAMでは、ソフトエラー耐性が高い。一方、フリップフロップ構造を有するSRAMでは、微細化によりソフトエラー耐性が低下する。そのため、大容量化のために高集積化されたSRAMによって構成されるメインメモリ404を用いる場合、メインメモリ404にソフトエラーが起こりやすい。以下、メインメモリ404がSRAMであるとものとして説明する。 DRAM with a stack type structure has high soft error resistance. On the other hand, in SRAM having a flip-flop structure, soft error resistance is lowered due to miniaturization. Therefore, when the main memory 404 composed of highly integrated SRAM for increasing the capacity is used, a soft error is likely to occur in the main memory 404. Hereinafter, the main memory 404 will be described as being a SRAM.
 ストレージ410は、例えば、SSDやHDDなどの不揮発性記憶装置などで構成される。ストレージ410には、IO機能を実現するための実行可能プログラム41と、書込読出プログラム42と、照合修復プログラム43とが格納される。 The storage 410 is composed of, for example, a non-volatile storage device such as an SSD or an HDD. The storage 410 stores an executable program 41 for realizing the IO function, a write / read program 42, and a collation / repair program 43.
 ローカルバスコントローラ420は、ローカルバスを介して、安全IOユニット400が接続されるデバイス(例えば安全PLC200、カプラ300)との間でデータを遣り取りする。 The local bus controller 420 exchanges data with a device (for example, safety PLC200, coupler 300) to which the safety IO unit 400 is connected via the local bus.
 安全IOモジュール430は、安全デバイスと電気的に接続され、安全デバイスによる検出結果などの入力を受け付けたり、安全デバイスへ信号を出力したりする。 The safety IO module 430 is electrically connected to the safety device, accepts inputs such as detection results by the safety device, and outputs a signal to the safety device.
 <メインメモリ>
 図4は、メインメモリの領域を示す図である。図4に示されるように、メインメモリ404は、スタック領域405、データ領域406およびテキスト領域407を含む。スタック領域405は、レジスタ403に保持されるデータを一時退避させるための領域である。データ領域406は、変数などが配置される領域である。テキスト領域407は、プログラムが展開される領域である。
<Main memory>
FIG. 4 is a diagram showing an area of the main memory. As shown in FIG. 4, the main memory 404 includes a stack area 405, a data area 406, and a text area 407. The stack area 405 is an area for temporarily saving the data held in the register 403. The data area 406 is an area in which variables and the like are arranged. The text area 407 is an area where the program is expanded.
 プロセッサ402は、テキスト領域407に展開されたプログラムの命令を1行ずつ実行する。プロセッサ402は、命令内容に応じて、データ領域406から変数の値を読み出したり、データ領域406に変数の値を書き込んだりする。 The processor 402 executes the instruction of the program expanded in the text area 407 line by line. The processor 402 reads the value of the variable from the data area 406 and writes the value of the variable to the data area 406 according to the instruction content.
 テキスト領域407に展開されるプログラム(図3に示す実行可能プログラム41など)は、コンパイラによって生成される。コンパイラは、メインルーチンの実行中に関数処理(サブルーチン)を呼び出すときにPush命令を生成し、関数処理の完了後にPop命令を生成する。プロセッサ402は、Push命令に従って、レジスタ403に保持されたデータをスタック領域405に一時退避させる。プロセッサ402は、Pop命令に従って、スタック領域405に退避させていたデータをレジスタ403に復帰させる。 The program expanded in the text area 407 (executable program 41 shown in FIG. 3 and the like) is generated by the compiler. The compiler generates a Push instruction when calling a function process (subroutine) during execution of the main routine, and generates a Pop instruction after the function process is completed. The processor 402 temporarily saves the data held in the register 403 to the stack area 405 according to the Push instruction. The processor 402 returns the data saved in the stack area 405 to the register 403 according to the Pop instruction.
 スタック領域405には、スタックポインタSPが設定される。スタックポインタSPは、スタック領域405に置かれたデータの先頭のアドレスを示す。言い換えると、スタックポインタSPは、スタック領域405に最後に置かれたデータのアドレスを示す。スタック領域405に新たなデータが置かれると、スタックポインタSPが更新される。 A stack pointer SP is set in the stack area 405. The stack pointer SP indicates the start address of the data placed in the stack area 405. In other words, the stack pointer SP indicates the address of the last data placed in the stack area 405. When new data is placed in the stack area 405, the stack pointer SP is updated.
 <メインメモリのデータ領域に対する処理>
 メインメモリ404のデータ領域406に対するデータの書き込みおよび読み出しは、書込読出プログラム42に従ってプロセッサ402によって実行される。
<Processing for data area of main memory>
The writing and reading of data to the data area 406 of the main memory 404 is executed by the processor 402 according to the write / read program 42.
 図5は、メインメモリへのデータの書き込み処理の一例を示す図である。図5に示されるように、プロセッサ402は、指定された変数の値を示す対象データをメインメモリ404のデータ領域406に書き込む際に、対象データを2回コピーし、2つのコピーデータを生成する。 FIG. 5 is a diagram showing an example of data writing processing to the main memory. As shown in FIG. 5, when writing the target data indicating the value of the specified variable to the data area 406 of the main memory 404, the processor 402 copies the target data twice and generates two copy data. ..
 プロセッサ402は、データ領域406の部分領域406aに対象データを書き込むとともに、部分領域406b,406cに2つのコピーデータをそれぞれ書き込む。部分領域406a,406b,406cのアドレスは、変数と対応付けて管理される。プロセッサ402は、当該アドレスを用いて、部分領域406a,406b,406cにデータを書き込む。これにより、メインメモリ404において、データが3重化される。 The processor 402 writes the target data in the partial area 406a of the data area 406, and writes the two copy data in the partial areas 406b and 406c, respectively. The addresses of the subregions 406a, 406b, and 406c are managed in association with variables. The processor 402 uses the address to write data to the subregions 406a, 406b, 406c. As a result, the data is tripled in the main memory 404.
 書き込み直後において、部分領域406a,406b,406cのデータは同一である。しかしながら、例えば宇宙線や中性子線の影響により、部分領域406a,406b,406cのいずれかにおいてソフトエラーが生じ得る。 Immediately after writing, the data in the partial areas 406a, 406b, 406c are the same. However, for example, due to the influence of cosmic rays and neutron rays, soft errors may occur in any of the partial regions 406a, 406b, and 406c.
 図6は、メインメモリからのデータの読み出し処理の一例を示す図である。図6に示されるように、プロセッサ402は、メインメモリ404のデータ領域406における部分領域406a,406b,406cからデータを読み出し、部分領域406a,406b,406cから読み出したデータを互いに照合する。具体的には、プロセッサ402は、部分領域406a,406b,406cのデータをレジスタ403にコピーし、レジスタ403にコピーされたデータ同士を照合する。 FIG. 6 is a diagram showing an example of data reading processing from the main memory. As shown in FIG. 6, the processor 402 reads data from the partial areas 406a, 406b, 406c in the data area 406 of the main memory 404, and collates the data read from the partial areas 406a, 406b, 406c with each other. Specifically, the processor 402 copies the data in the partial regions 406a, 406b, and 406c to the register 403, and collates the data copied to the register 403 with each other.
 部分領域406a,406b,406cのいずれにもソフトエラーが発生していない場合、部分領域406a,406b,406cから読み出したデータの全てが一致する。そのため、プロセッサ402は、部分領域406a,406b,406cから読み出したデータの全てが一致することに応じて、部分領域406aから読み出したデータで示される値を用いて演算処理を続行する。 If no soft error has occurred in any of the partial areas 406a, 406b, 406c, all the data read from the partial areas 406a, 406b, 406c match. Therefore, the processor 402 continues the arithmetic processing using the value indicated by the data read from the partial area 406a according to the fact that all the data read from the partial areas 406a, 406b, and 406c match.
 部分領域406a,406b,406cのうちの1つの部分領域にソフトエラーが発生したとしても、残り2つの部分領域から読み出したデータが一致する。そのため、プロセッサ402は、部分領域406a,406b,406cのうち1つの部分領域を除いた2つの領域から読み出したデータが一致することに応じて、当該2つの部分領域から読み出したデータと一致するように当該1つの部分領域から読み出したデータを書き換える。これにより、レジスタ403上において、当該1つの部分領域から読み出されたデータは、修復される。その後、プロセッサ402は、レジスタ403上の部分領域406aから読み出したデータで示される値を用いて演算処理を続行する。 Even if a soft error occurs in one of the subregions 406a, 406b, and 406c, the data read from the remaining two subregions will match. Therefore, the processor 402 matches the data read from the two subregions according to the fact that the data read from the two regions excluding one of the subregions 406a, 406b, and 406c matches. The data read from the one subregion is rewritten. As a result, the data read from the one subregion on the register 403 is restored. After that, the processor 402 continues the arithmetic processing using the value indicated by the data read from the partial area 406a on the register 403.
 さらに、プロセッサ402は、当該2つの部分領域から読み出したデータを、メインメモリ404のデータ領域406における当該1つの部分領域に上書きする。これにより、メインメモリ404上においても、当該1つの部分領域のデータが修復される。 Further, the processor 402 overwrites the data read from the two subregions with the one subregion in the data area 406 of the main memory 404. As a result, the data of the one partial area is restored even on the main memory 404.
 このように、部分領域406a,406b,406cのうちの1つの部分領域にソフトエラーが発生したとしても、読み出し処理において、当該1つの部分領域のデータが修復される。 In this way, even if a soft error occurs in one of the subregions 406a, 406b, and 406c, the data in the one subregion is restored in the read processing.
 <スタック操作に関連付けて実行される処理>
 上述したように、プロセッサ402は、Push命令に従って、レジスタ403に保持されたデータをスタック領域405に一時退避させる(Push操作)。プロセッサ402は、Pop命令に従って、スタック領域405に退避させていたデータをレジスタ403に復帰させる(Pop操作)。ここで、Push命令の代わりに、レジスタ403に保持されたデータを、スタック領域405における3つの部分領域に一時退避させる命令を発行することが考えられる。そして、Pop命令の代わりに、スタック領域405における3つの部分領域のデータを互いに照合し、3つの部分領域のうち過半数の部分領域のデータが一致することに応じて、当該過半数の部分領域のデータをレジスタ403に復帰させる命令を発行することが考えられる。しかしながら、Push命令およびPop命令は、コンパイラによって生成される。そのため、汎用のコンパイラを使用する限り、Push命令およびPop命令の代わりに上記のような命令を発行することができない。
<Processes executed in association with stack operations>
As described above, the processor 402 temporarily saves the data held in the register 403 to the stack area 405 according to the Push instruction (Push operation). The processor 402 restores the data saved in the stack area 405 to the register 403 according to the Pop instruction (Pop operation). Here, instead of the Push instruction, it is conceivable to issue an instruction to temporarily save the data held in the register 403 to three partial areas in the stack area 405. Then, instead of the Pop instruction, the data of the three sub-regions in the stack area 405 are collated with each other, and the data of the majority sub-region is matched according to the fact that the data of the majority sub-region of the three sub-regions matches. It is conceivable to issue an instruction to return the data to the register 403. However, the Push and Pop instructions are generated by the compiler. Therefore, as long as a general-purpose compiler is used, it is not possible to issue the above instructions in place of the Push instruction and the Pop instruction.
 そのため、安全IOユニット400では、スタック操作に関連付けて以下のような処理が実行される。スタック操作に関連付けた以下の処理は、照合修復プログラム43に従ってプロセッサ402によって実行される。 Therefore, in the safety IO unit 400, the following processing is executed in association with the stack operation. The following processing associated with the stack operation is performed by processor 402 according to collation repair program 43.
 図7は、Push操作後に実行される処理を示す図である。図7には、関数処理20を呼び出すためのPush命令が発行され、当該Push命令に応じたPush操作の後に実行される処理が示される。 FIG. 7 is a diagram showing a process executed after the Push operation. FIG. 7 shows a process in which a Push instruction for calling the function process 20 is issued and executed after the Push operation in response to the Push instruction.
 プロセッサ402は、スタック領域405におけるスタックポインタSPを監視している。プロセッサ402は、スタック操作の前後のスタックポインタSPを参照することにより、スタック領域405のうち、Push操作によってデータが退避された部分領域405aを特定する(ステップS11)。 Processor 402 monitors the stack pointer SP in the stack area 405. The processor 402 identifies the partial area 405a of the stack area 405 from which the data has been saved by the Push operation by referring to the stack pointer SP before and after the stack operation (step S11).
 プロセッサ402は、特定した部分領域405aのデータをコピーすることにより得られる2つのコピーデータを、データ領域406における2つの部分領域406d,406eにそれぞれ書き込む(ステップS12)。 The processor 402 writes the two copy data obtained by copying the data in the specified partial area 405a into the two partial areas 406d and 406e in the data area 406, respectively (step S12).
 これにより、メインメモリ404において、Push操作によってスタック領域405に一時退避されたデータが3重化される。 As a result, in the main memory 404, the data temporarily saved in the stack area 405 by the Push operation is tripled.
 図8は、Pop操作前に実行される処理を示す図である。図8には、図7に示すPush操作に対応するPop操作の前に実行される処理が示される。 FIG. 8 is a diagram showing a process executed before the Pop operation. FIG. 8 shows a process executed before the Pop operation corresponding to the Push operation shown in FIG. 7.
 プロセッサ402は、Push命令の後に呼び出された関数処理20の完了を示す行「functionExit();」を実行することにより、関数処理20の完了を認識する(ステップS21)。関数処理20の完了の後、メインルーチンに戻るためにPop命令が発行される。そのため、プロセッサ402は、関数処理を完了してから以下のステップS22,S23を実行する。 The processor 402 recognizes the completion of the function process 20 by executing the line "functionExit ();" indicating the completion of the function process 20 called after the Push instruction (step S21). After the function processing 20 is completed, a Pop instruction is issued to return to the main routine. Therefore, the processor 402 executes the following steps S22 and S23 after completing the function processing.
 プロセッサ402は、関数処理20の完了を認識すると、スタック領域405の部分領域405aおよびデータ領域406の2つの部分領域406a,406bのデータを互いに照合する(ステップS22)。 Upon recognizing the completion of the function processing 20, the processor 402 collates the data of the partial areas 405a of the stack area 405 and the data of the two partial areas 406a and 406b of the data area 406 with each other (step S22).
 プロセッサ402は、部分領域405a,406d,406eのデータの照合結果に応じて、部分領域405a,406d,406eの修復を行なう(ステップS23)。 The processor 402 repairs the partial regions 405a, 406d, 406e according to the collation result of the data in the partial regions 405a, 406d, 406e (step S23).
 図7に示すステップS12の完了から図8のステップS22の開始までの間に、部分領域405a,406d,406eのいずれにもソフトエラーが発生していない場合、部分領域405a,406d,406eから読み出したデータの全てが一致する。この場合には、部分領域405a,406d,406eの修復が必要ないため、ステップS23の処理は省略される。 If no soft error has occurred in any of the partial regions 405a, 406d, and 406e between the completion of step S12 shown in FIG. 7 and the start of step S22 in FIG. 8, the data is read from the partial regions 405a, 406d, and 406e. All of the data are matched. In this case, since it is not necessary to repair the partial regions 405a, 406d, and 406e, the process of step S23 is omitted.
 部分領域405a,406d,406eのうちの1つの部分領域にソフトエラーが発生したとしても、残り2つの部分領域から読み出したデータが一致する。そのため、プロセッサ402は、部分領域405a,406d,406eのうち1つの部分領域を除いた2つの部分領域から読み出したデータが一致することに応じて、当該2つの部分領域から読み出したデータを当該1つの部分領域に上書きする。これにより、当該1つの部分領域のデータが修復される。 Even if a soft error occurs in one of the subregions 405a, 406d, and 406e, the data read from the remaining two subregions will match. Therefore, the processor 402 uses the data read from the two subregions to match the data read from the two subregions excluding one of the subregions 405a, 406d, and 406e. Overwrite one subarea. As a result, the data in the one subregion is restored.
 具体的には、部分領域406d,406eのデータが一致し、部分領域405aのデータが部分領域406d,406eのデータと不一致の場合、部分領域406d,406eのデータが部分領域405aに上書きされる。図8では、部分領域405aにおけるデータ「00103333」が、部分領域406d,406eのデータ「00003333」と一致しない。そのため、部分領域406d,406eのデータ「00003333」が部分領域405aに上書きされる。これにより、部分領域405aのデータが修復される。 Specifically, when the data of the partial regions 406d and 406e match and the data of the partial regions 405a do not match the data of the partial regions 406d and 406e, the data of the partial regions 406d and 406e are overwritten on the partial regions 405a. In FIG. 8, the data “00103333” in the partial area 405a does not match the data “00003333” in the partial areas 406d and 406e. Therefore, the data "00003333" of the partial areas 406d and 406e is overwritten on the partial area 405a. As a result, the data in the partial region 405a is restored.
 なお、部分領域406d,406eのデータは、部分領域405aにソフトエラーが発生しているか否かの判定および部分領域405aの修復に使用される。そのため、部分領域405a,406dのデータが一致し、部分領域406eのデータが部分領域405a,406dのデータと不一致の場合、部分領域406eのデータの修復は省略されてもよい。同様に、部分領域405a,406eのデータが一致し、部分領域406dのデータが部分領域405a,406eのデータと不一致の場合、部分領域406dのデータの修復は省略されてもよい。 The data in the partial regions 406d and 406e are used for determining whether or not a soft error has occurred in the partial region 405a and for repairing the partial region 405a. Therefore, if the data in the partial regions 405a and 406d match and the data in the partial region 406e does not match the data in the partial regions 405a and 406d, the restoration of the data in the partial region 406e may be omitted. Similarly, if the data in the partial regions 405a and 406e match and the data in the partial regions 406d do not match the data in the partial regions 405a and 406e, the restoration of the data in the partial regions 406d may be omitted.
 その後、プロセッサ402は、Pop命令に応じて、部分領域405aのデータをレジスタ403に復帰させる。上述したように、ステップS12の完了からステップS22の開始までの間に、部分領域405aにソフトエラーが発生したとしても、ステップS22およびステップS23により、部分領域405aのデータが修復される。そのため、スタック操作に応じてデータが一時退避されるスタック領域405のソフトエラーに起因する制御システム1の一時的な停止を抑制できる。 After that, the processor 402 returns the data in the partial area 405a to the register 403 in response to the Pop instruction. As described above, even if a soft error occurs in the partial region 405a between the completion of step S12 and the start of step S22, the data in the partial region 405a is restored by step S22 and step S23. Therefore, it is possible to suppress a temporary stop of the control system 1 due to a soft error in the stack area 405 in which data is temporarily saved in response to the stack operation.
 なお、部分領域405a,406d,406eのデータが互いに異なる場合には、どのデータが正しいかを判定できない。そのため、プロセッサ402は、部分領域405a,406d,406eのデータが互いに異なる場合に、エラー通知を行なってもよい。 If the data in the partial regions 405a, 406d, and 406e are different from each other, it cannot be determined which data is correct. Therefore, the processor 402 may give an error notification when the data in the partial regions 405a, 406d, and 406e are different from each other.
 <その他の装置のハードウェア構成>
  (標準PLCのハードウェア構成)
 図9は、標準PLCのハードウェア構成例を示す模式図である。図9に例示される標準PLC100は、プロセッサ102と、メインメモリ104と、ストレージ110と、フィールドネットワークコントローラ108と、ローカルバスコントローラ116とを含む。これらのコンポーネントは、プロセッサバス118を介して接続されている。
<Hardware configuration of other devices>
(Standard PLC hardware configuration)
FIG. 9 is a schematic diagram showing a hardware configuration example of a standard PLC. The standard PLC 100 illustrated in FIG. 9 includes a processor 102, a main memory 104, a storage 110, a field network controller 108, and a local bus controller 116. These components are connected via the processor bus 118.
 プロセッサ102は、主として、標準制御に係る制御演算を実行する演算処理部に相当し、CPUやGPUなどで構成され、レジスタ103を内蔵する。プロセッサ102は、ストレージ110に格納されたプログラム(一例として、システムプログラム1102および標準制御プログラム1104)を読出して、メインメモリ104に展開して実行することで、制御対象に応じた制御演算、および、後述するような各種処理を実現する。 The processor 102 mainly corresponds to an arithmetic processing unit that executes a control operation related to standard control, is composed of a CPU, a GPU, and the like, and has a built-in register 103. The processor 102 reads out the programs (as an example, the system program 1102 and the standard control program 1104) stored in the storage 110, expands them into the main memory 104, and executes them to perform control operations according to the control target. Realize various processes as described later.
 メインメモリ104は、例えばDRAM(Dynamic Random Access Memory)やSRAM(Static Random Access Memory)のような揮発性メモリによって構成される。ストレージ110は、例えば、SSD(Solid State Drive)やHDD(Hard Disk Drive)などの不揮発性記憶装置などによって構成される。 The main memory 104 is composed of volatile memories such as DRAM (Dynamic Random Access Memory) and SRAM (Static Random Access Memory). The storage 110 is composed of, for example, a non-volatile storage device such as an SSD (Solid State Drive) or an HDD (Hard Disk Drive).
 ストレージ110には、基本的な機能を実現するためのシステムプログラム1102、制御対象に応じて作成された標準制御プログラム1104、および標準PLC100での処理を規定するための設定情報1106が格納される。 The storage 110 stores a system program 1102 for realizing basic functions, a standard control program 1104 created according to a control target, and setting information 1106 for defining processing in the standard PLC 100.
 フィールドネットワークコントローラ108は、フィールドネットワーク2を介して任意のデバイス(例えばカプラ300)との間でデータを遣り取りする。 The field network controller 108 exchanges data with an arbitrary device (for example, a coupler 300) via the field network 2.
 ローカルバスコントローラ116は、ローカルバスを介して、標準PLC100に接続される任意のユニット(例えば安全PLC200)との間でデータを遣り取りする。 The local bus controller 116 exchanges data with an arbitrary unit (for example, a safety PLC200) connected to the standard PLC100 via the local bus.
  (安全PLCのハードウェア構成)
 図10は、安全PLCのハードウェア構成例を示す模式図である。図10に例示される安全PLC200は、プロセッサ202と、メインメモリ204と、ストレージ210と、ローカルバスコントローラ216とを含む。これらのコンポーネントは、プロセッサバス218を介して接続されている。
(Hardware configuration of safety PLC)
FIG. 10 is a schematic diagram showing a hardware configuration example of the safety PLC. The safety PLC 200 illustrated in FIG. 10 includes a processor 202, a main memory 204, a storage 210, and a local bus controller 216. These components are connected via the processor bus 218.
 プロセッサ202は、主として、セーフティ制御に係る制御演算を実行する演算処理部に相当し、CPUやGPUなどで構成される。プロセッサ202は、レジスタ203を内蔵する。 The processor 202 mainly corresponds to a calculation processing unit that executes control calculations related to safety control, and is composed of a CPU, a GPU, and the like. The processor 202 includes a register 203.
 メインメモリ204は、例えばDRAMやSRAMのような揮発性メモリによって構成される。ストレージ210は、例えば、SSDやHDDなどの不揮発性記憶装置などによって構成される。 The main memory 204 is composed of a volatile memory such as a DRAM or SRAM. The storage 210 is composed of, for example, a non-volatile storage device such as an SSD or an HDD.
 ストレージ210には、基本的な機能を実現するためのシステムプログラム2102、要求されるセーフティ機能に応じた作成された安全プログラム2104、および安全PLC200での処理を規定するための設定情報2106が格納される。 The storage 210 stores a system program 2102 for realizing basic functions, a safety program 2104 created according to the required safety function, and setting information 2106 for defining processing in the safety PLC 200. NS.
 ローカルバスコントローラ216は、ローカルバスを介して、安全PLC200に接続される安全IOユニット400との間でデータを遣り取りする。 The local bus controller 216 exchanges data with the safety IO unit 400 connected to the safety PLC 200 via the local bus.
  (カプラのハードウェア構成)
 図11は、カプラのハードウェア構成例を示す模式図である。図11に例示されるカプラ300は、プロセッサ302と、メインメモリ304と、ストレージ310と、フィールドネットワークコントローラ308と、ローカルバスコントローラ316とを含む。これらのコンポーネントは、プロセッサバス318を介して接続されている。
(Hardware configuration of coupler)
FIG. 11 is a schematic view showing a hardware configuration example of the coupler. The coupler 300 illustrated in FIG. 11 includes a processor 302, a main memory 304, a storage 310, a field network controller 308, and a local bus controller 316. These components are connected via the processor bus 318.
 プロセッサ302は、主として、カプラ300を動作させるための制御演算を実行する演算処理部に相当し、CPUやGPUなどで構成される。プロセッサ302は、レジスタ303を内蔵する。 The processor 302 mainly corresponds to an arithmetic processing unit that executes a control operation for operating the coupler 300, and is composed of a CPU, a GPU, and the like. The processor 302 includes a register 303.
 メインメモリ304は、例えばDRAMやSRAMのような揮発性メモリによって構成される。ストレージ310は、例えば、SSDやHDDなどの不揮発性記憶装置などによって構成される。 The main memory 304 is composed of a volatile memory such as a DRAM or SRAM. The storage 310 is composed of, for example, a non-volatile storage device such as an SSD or an HDD.
 ストレージ310には、基本的な機能を実現するためのシステムプログラム3102およびカプラ300での処理を規定するための設定情報3106が格納される。 The storage 310 stores the system program 3102 for realizing the basic functions and the setting information 3106 for defining the processing by the coupler 300.
 フィールドネットワークコントローラ308は、フィールドネットワーク2を介して、任意のデバイス(例えば標準PLC100)との間でデータを遣り取りする。 The field network controller 308 exchanges data with an arbitrary device (for example, standard PLC100) via the field network 2.
 ローカルバスコントローラ316は、ローカルバスを介して、カプラ300に接続される安全IOユニット400との間でデータを遣り取りする。 The local bus controller 316 exchanges data with the safety IO unit 400 connected to the coupler 300 via the local bus.
 <作用・効果>
 以上のように、データ処理装置である安全IOユニット400は、メインメモリ404と、メインメモリ404を用いて演算処理を実行するプロセッサ402とを備える。プロセッサ402は、レジスタ403を内蔵する。プロセッサ402は、Push命令に応じて、レジスタ403に保持されたデータをメインメモリ404におけるスタック領域405の部分領域405aに退避させる。プロセッサ402は、Pop命令に応じて、部分領域405aのデータをレジスタ403に復帰させる。プロセッサ402は、Push命令の実行後に第1の処理を実行し、Pop命令の実行前に第2の処理を実行する。第1の処理は、部分領域405aのデータを、メインメモリ404におけるデータ領域406の部分領域406d,406eの各々に書き込む処理を含む。第2の処理は、部分領域405a,406d,406eのデータを互いに照合する処理を含む。第2の処理は、さらに、部分領域406d,406eのデータが一致し、かつ、部分領域405aのデータが当該部分領域406d,406eのデータと一致しないことに応じて、当該部分領域406d,406eのデータを部分領域405aに上書きする処理を含む。
<Action / effect>
As described above, the safety IO unit 400, which is a data processing device, includes a main memory 404 and a processor 402 that executes arithmetic processing using the main memory 404. The processor 402 includes a register 403. In response to the Push instruction, the processor 402 saves the data held in the register 403 to the partial area 405a of the stack area 405 in the main memory 404. The processor 402 returns the data in the partial area 405a to the register 403 in response to the Pop instruction. The processor 402 executes the first process after executing the Push instruction, and executes the second process before executing the Pop instruction. The first process includes a process of writing the data of the partial area 405a to each of the partial areas 406d and 406e of the data area 406 in the main memory 404. The second process includes a process of collating the data of the partial regions 405a, 406d, and 406e with each other. In the second process, the data of the partial regions 406d and 406e are further matched, and the data of the partial regions 405a do not match the data of the partial regions 406d and 406e. The process of overwriting the data in the partial area 405a is included.
 上記の構成によれば、Push命令に応じてデータが一時退避された部分領域405aにソフトエラーが発生したとしても、Pop命令の実行前に、部分領域405aのデータが修復される。そのため、Pop命令に応じて、レジスタ403には正しいデータが復帰される。その結果、レジスタ403からメインメモリ404に一時退避されるデータの破損に起因する、システムの一時的な停止を抑制できる。 According to the above configuration, even if a soft error occurs in the partial area 405a in which the data is temporarily saved in response to the Push instruction, the data in the partial area 405a is restored before the Pop instruction is executed. Therefore, the correct data is returned to the register 403 in response to the Pop instruction. As a result, it is possible to suppress a temporary stop of the system due to the corruption of the data temporarily saved from the register 403 to the main memory 404.
 部分領域405aは、メインメモリ404に設定されたスタック領域405に含まれる。プロセッサ402は、Push命令の実行前後における、スタック領域405に設定されたスタックポインタSPを参照して、部分領域405aを特定する。これにより、プロセッサ402は、メインメモリ404において、レジスタ403からデータが一時退避された部分領域405aを正しく特定できる。 The partial area 405a is included in the stack area 405 set in the main memory 404. The processor 402 identifies the partial area 405a with reference to the stack pointer SP set in the stack area 405 before and after the execution of the Push instruction. As a result, the processor 402 can correctly identify the partial area 405a in which the data is temporarily saved from the register 403 in the main memory 404.
 Push命令は、関数処理20の呼び出しのために発行される。Pop命令は、関数処理20の完了後に発行される。プロセッサ402は、関数処理20の完了に応じて、上記の第2の処理を開始する。これにより、Pop命令の実行の直前において、部分領域405aのデータを修復できる。 The Push instruction is issued for calling the function process 20. The Pop instruction is issued after the function processing 20 is completed. The processor 402 starts the second process described above in response to the completion of the function process 20. As a result, the data in the partial region 405a can be restored immediately before the execution of the Pop instruction.
 <変形例1>
 上記の説明では、プロセッサ402は、Push命令に応じて部分領域405aに一時退避されたデータをコピーすることにより得られるコピーデータを、データ領域406における2つの部分領域406a,406bにそれぞれ書き込むものとした。しかしながら、プロセッサ402は、部分領域405aのデータのコピーデータを、データ領域406における3つ以上の部分領域に書き込んでもよい。これにより、Push命令に応じてスタック領域405に一時退避されたデータが多重化される。
<Modification example 1>
In the above description, the processor 402 writes the copy data obtained by copying the data temporarily saved in the partial area 405a in response to the Push instruction to the two partial areas 406a and 406b in the data area 406, respectively. bottom. However, the processor 402 may write the copy data of the data in the partial area 405a to three or more partial areas in the data area 406. As a result, the data temporarily saved in the stack area 405 is multiplexed according to the Push instruction.
 例えば、プロセッサ402は、部分領域405aのデータのコピーデータを、データ領域406における第2の部分領域~第Nの部分領域に書き込む。Nは4以上の整数である。そして、プロセッサ402は、Pop命令の実行前に、部分領域405aおよび第2の部分領域~第Nの部分領域のデータを互いに照合する。プロセッサ402は、部分領域405aおよび第2の部分領域~第Nの部分領域のうち過半数の部分領域のデータが一致し、かつ、部分領域405aのデータが当該過半数の部分領域のデータと一致しないことに応じて、当該過半数の部分領域のデータを部分領域405aに上書きする。これにより、部分領域405aにソフトエラーが発生したとしても、部分領域405aのデータが修復される。 For example, the processor 402 writes the copy data of the data in the partial area 405a to the second partial area to the Nth partial area in the data area 406. N is an integer of 4 or more. Then, the processor 402 collates the data of the partial region 405a and the data of the second partial region to the Nth partial region with each other before executing the Pop instruction. In the processor 402, the data of the majority of the subregions 405a and the second subregion to the Nth subregion match, and the data of the subregion 405a does not match the data of the majority of the subregions. The data of the majority of the partial areas is overwritten on the partial area 405a accordingly. As a result, even if a soft error occurs in the partial region 405a, the data in the partial region 405a is restored.
 <変形例2>
 標準PLC100、安全PLC200およびカプラ300も、安全IOユニット400と同様に、スタック操作に関連付けて図7および図8に示す処理を行なってもよい。これにより、標準PLC100、安全PLC200およびカプラ300も、スタック操作に応じてスタック領域に一時退避されたデータの破損を修復できる。その結果、制御システム1の停止の頻度が抑制される。
<Modification 2>
The standard PLC 100, the safety PLC 200, and the coupler 300 may also perform the processes shown in FIGS. 7 and 8 in association with the stack operation in the same manner as the safety IO unit 400. As a result, the standard PLC100, the safety PLC200, and the coupler 300 can also repair the damage of the data temporarily saved in the stack area in response to the stack operation. As a result, the frequency of stopping the control system 1 is suppressed.
 §3 付記
 以上のように、本実施の形態は以下のような開示を含む。
§3 Addendum As described above, this embodiment includes the following disclosures.
 (構成1)
 データ処理装置(400)であって、
 メモリ(404)と、
 前記メモリ(404)を用いて演算処理を実行するプロセッサ(402)とを備え、
 前記プロセッサ(402)は、レジスタ(403)を内蔵し、
 前記プロセッサ(402)は、
 退避命令に応じて、前記レジスタ(403)に保持されたデータを前記メモリ(404)の第1の領域(404a,405a)に退避させ、
 復帰命令に応じて、前記第1の領域(404a,405a)のデータを前記レジスタ(403)に復帰させ、
 前記プロセッサ(402)は、前記退避命令の実行後に第1の処理を実行し、前記復帰命令の実行前に第2の処理を実行し、
 前記第1の処理は、前記第1の領域(404a,405a)のデータを、前記メモリ(404)における第2の領域(404b,404c,406d,406e)から第Nの領域(404b,404c,406d,406e)の各々に書き込む処理を含み、
 Nは3以上の整数であり、
 前記第2の処理は、
  前記第1の領域(404a,405a)から前記第Nの領域(404b,404c,406d,406e)のデータを互いに照合する処理と、
  前記第1の領域(404a,405a)から前記第Nの領域(404b,404c,406d,406e)のうち過半数の領域のデータが一致し、かつ、前記第1の領域(404a,405a)のデータが前記過半数の領域のデータと一致しないことに応じて、前記過半数の領域のデータを前記第1の領域(404a,405a)に上書きする処理とを含む、データ処理装置。
(Structure 1)
It is a data processing device (400)
Memory (404) and
A processor (402) that executes arithmetic processing using the memory (404) is provided.
The processor (402) has a built-in register (403).
The processor (402)
In response to the save instruction, the data held in the register (403) is saved in the first area (404a, 405a) of the memory (404).
In response to the return instruction, the data in the first region (404a, 405a) is returned to the register (403).
The processor (402) executes the first process after executing the save instruction, and executes the second process before executing the return instruction.
In the first process, the data in the first region (404a, 405a) is transferred from the second region (404b, 404c, 406d, 406e) in the memory (404) to the Nth region (404b, 404c, Includes processing to write to each of 406d, 406e)
N is an integer greater than or equal to 3
The second process is
A process of collating the data of the first region (404a, 405a) to the data of the Nth region (404b, 404c, 406d, 406e) with each other.
The data of the majority of the regions (404b, 404c, 406d, 406e) from the first region (404a, 405a) to the Nth region (404b, 404c, 406d, 406e) match, and the data of the first region (404a, 405a) A data processing apparatus including a process of overwriting the data of the majority area with the first area (404a, 405a) in response to the fact that the data does not match the data of the majority area.
 (構成2)
 前記第1の領域(405a)は、前記メモリ(404)に設定されたスタック領域(405)に含まれ、
 前記プロセッサ(402)は、前記退避命令の実行前後における、前記スタック領域(405)に設定されたスタックポインタを参照して、前記第1の領域(404a,405a)を特定する、構成1に記載のデータ処理装置。
(Structure 2)
The first area (405a) is included in the stack area (405) set in the memory (404).
The processor (402) is described in the configuration 1 in which the first area (404a, 405a) is specified by referring to the stack pointer set in the stack area (405) before and after the execution of the save instruction. Data processor.
 (構成3)
 前記退避命令は、関数処理の呼び出しのために発行され、
 前記復帰命令は、前記関数処理(20)の完了後に発行され、
 前記プロセッサ(402)は、前記関数処理(20)の完了に応じて、前記第2の処理を開始する、構成1または2に記載のデータ処理装置。
(Structure 3)
The save instruction is issued to call the function processing, and is issued.
The return instruction is issued after the completion of the function processing (20).
The data processing apparatus according to configuration 1 or 2, wherein the processor (402) starts the second process upon completion of the function process (20).
 (構成4)
 データ処理装置(400)のデータ処理方法であって、
 前記データ処理装置(400)は、
 メモリ(404)と、
 前記メモリ(404)を用いて演算処理を実行するプロセッサ(402)とを備え、
 前記プロセッサ(402)は、レジスタ(403)を内蔵し、
 前記データ処理方法は、
 前記プロセッサ(402)が、退避命令に応じて、前記レジスタ(403)に保持されたデータを前記メモリ(404)の第1の領域(404a,405a)に退避させるステップと、
 前記プロセッサ(402)が、前記退避命令の実行後に第1の処理を実行するステップと、
 前記プロセッサ(402)が、復帰命令の実行前に第2の処理を実行するステップと、
 前記プロセッサ(402)が、前記復帰命令に応じて、前記第1の領域(404a,405a)のデータを前記レジスタに復帰させるステップとを備え、
 前記第1の処理は、前記第1の領域(404a,405a)のデータを、前記メモリ(404)における第2の領域(404b,404c,406d,406e)から第Nの領域(404b,404c,406d,406e)の各々に書き込む処理を含み、
 Nは3以上の整数であり、
 前記第2の処理は、
  前記第1の領域(404a,405a)から前記第Nの領域のデータを互いに照合する処理と、
  前記第1の領域(404a,405a)から前記第Nの領域(404b,404c,406d,406e)のうち過半数の領域のデータが一致し、かつ、前記第1の領域(404a,405a)のデータが前記過半数の領域のデータと一致しないことに応じて、前記過半数の領域のデータを前記第1の領域(404a,405a)に上書きする処理とを含む、データ処理方法。
(Structure 4)
It is a data processing method of the data processing apparatus (400).
The data processing device (400)
Memory (404) and
A processor (402) that executes arithmetic processing using the memory (404) is provided.
The processor (402) has a built-in register (403).
The data processing method is
A step in which the processor (402) saves the data held in the register (403) to the first area (404a, 405a) of the memory (404) in response to the save instruction.
A step in which the processor (402) executes the first process after executing the save instruction, and
A step in which the processor (402) executes a second process before executing the return instruction.
The processor (402) includes a step of returning the data of the first region (404a, 405a) to the register in response to the return instruction.
In the first process, the data in the first region (404a, 405a) is transferred from the second region (404b, 404c, 406d, 406e) in the memory (404) to the Nth region (404b, 404c, Includes processing to write to each of 406d, 406e)
N is an integer greater than or equal to 3
The second process is
A process of collating the data of the first region (404a, 405a) to the data of the Nth region with each other, and
The data of the majority of the regions (404b, 404c, 406d, 406e) from the first region (404a, 405a) to the Nth region (404b, 404c, 406d, 406e) match, and the data of the first region (404a, 405a) A data processing method including a process of overwriting the data of the majority area with the first area (404a, 405a) in response to the fact that the data does not match the data of the majority area.
 (構成5)
 構成4に記載のデータ処理方法をコンピュータに実行させるプログラム。
(Structure 5)
A program that causes a computer to execute the data processing method described in Configuration 4.
 本発明の実施の形態について説明したが、今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は請求の範囲によって示され、請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。 Although the embodiments of the present invention have been described, the embodiments disclosed this time should be considered to be exemplary in all respects and not restrictive. The scope of the present invention is indicated by the claims and is intended to include all modifications within the meaning and scope equivalent to the claims.
 1 制御システム、2 フィールドネットワーク、20 関数処理、41 実行可能プログラム、42 書込読出プログラム、43 照合修復プログラム、100 標準PLC、102,202,302,402 プロセッサ、103,203,303,403 レジスタ、104,204,304,404 メインメモリ、108,308 フィールドネットワークコントローラ、110,210,310,410 ストレージ、116,216,316,420 ローカルバスコントローラ、118,218,318,440 プロセッサバス、200 安全PLC、300 カプラ、400 安全IOユニット、404a~404c 領域、405 スタック領域、405a,406a~406e 部分領域、406 データ領域、407 テキスト領域、430 安全IOモジュール、1102,2102,3102 システムプログラム、1104 標準制御プログラム、1106,2106,3106 設定情報、2104 安全プログラム。 1 control system, 2 field network, 20 function processing, 41 executable program, 42 write / read program, 43 collation repair program, 100 standard PLC, 102, 202, 302, 402 processor, 103, 203, 303, 403 register, 104,204,304,404 main memory, 108,308 field network controller, 110,210,310,410 storage, 116,216,316,420 local bus controller, 118,218,318,440 processor bus, 200 safety PLC , 300 coupler, 400 safety IO unit, 404a to 404c area, 405 stack area, 405a, 406a to 406e partial area, 406 data area, 407 text area, 430 safety IO module, 1102, 2102, 3102 system program, 1104 standard control Program, 1106, 2106, 3106 setting information, 2104 safety program.

Claims (5)

  1.  データ処理装置であって、
     メモリと、
     前記メモリを用いて演算処理を実行するプロセッサとを備え、
     前記プロセッサは、レジスタを内蔵し、
     前記プロセッサは、
     退避命令に応じて、前記レジスタに保持されたデータを前記メモリの第1の領域に退避させ、
     復帰命令に応じて、前記第1の領域のデータを前記レジスタに復帰させ、
     前記プロセッサは、前記退避命令の実行後に第1の処理を実行し、前記復帰命令の実行前に第2の処理を実行し、
     前記第1の処理は、前記第1の領域のデータを、前記メモリにおける第2の領域から第Nの領域の各々に書き込む処理を含み、
     Nは3以上の整数であり、
     前記第2の処理は、
      前記第1の領域から前記第Nの領域のデータを互いに照合する処理と、
      前記第1の領域から前記第Nの領域のうち過半数の領域のデータが一致し、かつ、前記第1の領域のデータが前記過半数の領域のデータと一致しないことに応じて、前記過半数の領域のデータを前記第1の領域に上書きする処理とを含む、データ処理装置。
    It is a data processing device
    Memory and
    A processor that executes arithmetic processing using the memory is provided.
    The processor has a built-in register
    The processor
    In response to the save instruction, the data held in the register is saved in the first area of the memory.
    In response to the return instruction, the data in the first area is returned to the register.
    The processor executes the first process after executing the save instruction, and executes the second process before executing the return instruction.
    The first process includes a process of writing data in the first area to each of the second area to the Nth area in the memory.
    N is an integer greater than or equal to 3
    The second process is
    The process of collating the data from the first region to the Nth region with each other,
    According to the fact that the data in the majority of the Nth regions from the first region match and the data in the first region does not match the data in the majority region, the majority region A data processing apparatus including a process of overwriting the first area with the data of the above.
  2.  前記第1の領域は、前記メモリに設定されたスタック領域に含まれ、
     前記プロセッサは、前記退避命令の実行前後における、前記スタック領域に設定されたスタックポインタを参照して、前記第1の領域を特定する、請求項1に記載のデータ処理装置。
    The first area is included in the stack area set in the memory.
    The data processing device according to claim 1, wherein the processor identifies the first area by referring to the stack pointer set in the stack area before and after the execution of the save instruction.
  3.  前記退避命令は、関数処理の呼び出しのために発行され、
     前記復帰命令は、前記関数処理の完了後に発行され、
     前記プロセッサは、前記関数処理の完了に応じて、前記第2の処理を開始する、請求項1または2に記載のデータ処理装置。
    The save instruction is issued to call the function processing, and is issued.
    The return instruction is issued after the function processing is completed.
    The data processing device according to claim 1 or 2, wherein the processor starts the second process in response to the completion of the function process.
  4.  データ処理装置のデータ処理方法であって、
     前記データ処理装置は、
     メモリと、
     前記メモリを用いて演算処理を実行するプロセッサとを備え、
     前記プロセッサは、レジスタを内蔵し、
     前記データ処理方法は、
     前記プロセッサが、退避命令に応じて、前記レジスタに保持されたデータを前記メモリの第1の領域に退避させるステップと、
     前記プロセッサが、前記退避命令の実行後に第1の処理を実行するステップと、
     前記プロセッサが、復帰命令の実行前に第2の処理を実行するステップと、
     前記プロセッサが、前記復帰命令に応じて、前記第1の領域のデータを前記レジスタに復帰させるステップとを備え、
     前記第1の処理は、前記第1の領域のデータを、前記メモリにおける第2の領域から第Nの領域の各々に書き込む処理を含み、
     Nは3以上の整数であり、
     前記第2の処理は、
      前記第1の領域から前記第Nの領域のデータを互いに照合する処理と、
      前記第1の領域から前記第Nの領域のうち過半数の領域のデータが一致し、かつ、前記第1の領域のデータが前記過半数の領域のデータと一致しないことに応じて、前記過半数の領域のデータを前記第1の領域に上書きする処理とを含む、データ処理方法。
    It is a data processing method of a data processing device.
    The data processing device is
    Memory and
    A processor that executes arithmetic processing using the memory is provided.
    The processor has a built-in register
    The data processing method is
    A step in which the processor saves the data held in the register to the first area of the memory in response to the save instruction.
    A step in which the processor executes the first process after executing the save instruction, and
    A step in which the processor executes a second process before executing the return instruction.
    The processor includes a step of returning the data in the first region to the register in response to the return instruction.
    The first process includes a process of writing data in the first area to each of the second area to the Nth area in the memory.
    N is an integer greater than or equal to 3
    The second process is
    The process of collating the data from the first region to the Nth region with each other,
    According to the fact that the data in the majority of the Nth regions from the first region match and the data in the first region does not match the data in the majority region, the majority region A data processing method including a process of overwriting the first area with the data of the above.
  5.  請求項4に記載のデータ処理方法をコンピュータに実行させるプログラム。 A program that causes a computer to execute the data processing method according to claim 4.
PCT/JP2020/015665 2020-03-09 2020-04-07 Data processing device, data processing method, and program WO2021181712A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2020-039749 2020-03-09
JP2020039749A JP6721140B1 (en) 2020-03-09 2020-03-09 Data processing device, data processing method and program

Publications (1)

Publication Number Publication Date
WO2021181712A1 true WO2021181712A1 (en) 2021-09-16

Family

ID=71402421

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/015665 WO2021181712A1 (en) 2020-03-09 2020-04-07 Data processing device, data processing method, and program

Country Status (2)

Country Link
JP (1) JP6721140B1 (en)
WO (1) WO2021181712A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040168078A1 (en) * 2002-12-04 2004-08-26 Brodley Carla E. Apparatus, system and method for protecting function return address
JP2005338946A (en) * 2004-05-24 2005-12-08 Japan Science & Technology Agency Cache memory and control method therefor
US7272748B1 (en) * 2004-03-17 2007-09-18 Symantec Corporation Method and apparatus to detect and recover from a stack frame corruption

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040168078A1 (en) * 2002-12-04 2004-08-26 Brodley Carla E. Apparatus, system and method for protecting function return address
US7272748B1 (en) * 2004-03-17 2007-09-18 Symantec Corporation Method and apparatus to detect and recover from a stack frame corruption
JP2005338946A (en) * 2004-05-24 2005-12-08 Japan Science & Technology Agency Cache memory and control method therefor

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SHINAGAWA, TAKAHIRO: "Preventing Buffer Overflow Attacks using Segmentation Mechanism", IPSJ SIG TECHNICAL REPORT, vol. 2005, no. 48, 27 May 2005 (2005-05-27), pages 113 - 120, ISSN: 0919-6072 *

Also Published As

Publication number Publication date
JP6721140B1 (en) 2020-07-08
JP2021140642A (en) 2021-09-16

Similar Documents

Publication Publication Date Title
US9098074B2 (en) Safety-related control unit and method for controlling an automated installation
WO2021181712A1 (en) Data processing device, data processing method, and program
JPS61188626A (en) Microprocessor
JP6733843B1 (en) Data processing device, control method and program
WO2021157103A1 (en) Information processing device, control method, and program
WO2022185582A1 (en) Data processing device, data processing method, and program
JP2002351504A (en) Device for protecting control data
JPH0317760A (en) Data write confirming system
WO2022085218A1 (en) Information processing system, and method for constructing database
JPS59111501A (en) Sequence controller
JPH11338712A (en) Interruption sequence saving circuit
TW202001543A (en) Image processing circuit and backup/recovery method thereof
JP3231864B2 (en) Task degeneration management device
JPS62256047A (en) Spurious fault generating system
JPS61101845A (en) Test system of information processor
US20020089772A1 (en) Automation system with a work drive unit
JPS62166451A (en) History analyzing device for logical unit
JPS61134850A (en) Debugging method of subsequent processor
JPS62209627A (en) Data processor
JPH02178740A (en) Information processor
JPH0212530A (en) Data processing system
JP2008242592A (en) Memory monitoring circuit, information processing apparatus and memory monitoring method
JPH1165776A (en) Disk system and its control method
JP2001202202A (en) Disk controller and recording medium with recorded program
JPH0553925A (en) Microprogram controller

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20924847

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20924847

Country of ref document: EP

Kind code of ref document: A1