JP5380884B2 - Data processing apparatus and synchronization method - Google Patents

Data processing apparatus and synchronization method Download PDF

Info

Publication number
JP5380884B2
JP5380884B2 JP2008097889A JP2008097889A JP5380884B2 JP 5380884 B2 JP5380884 B2 JP 5380884B2 JP 2008097889 A JP2008097889 A JP 2008097889A JP 2008097889 A JP2008097889 A JP 2008097889A JP 5380884 B2 JP5380884 B2 JP 5380884B2
Authority
JP
Japan
Prior art keywords
count value
data
time
unit
time counter
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.)
Expired - Fee Related
Application number
JP2008097889A
Other languages
Japanese (ja)
Other versions
JP2009251854A (en
Inventor
智陽 水野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2008097889A priority Critical patent/JP5380884B2/en
Publication of JP2009251854A publication Critical patent/JP2009251854A/en
Application granted granted Critical
Publication of JP5380884B2 publication Critical patent/JP5380884B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Hardware Redundancy (AREA)

Description

本発明は、各々がプロセッサと入出力部とを有する少なくとも2つのシステムを備えるデータ処理装置と、各々がプロセッサと入出力部と時刻カウンタとを有し、異なるクロック源からのクロック信号で動作する少なくとも2つのシステムの同期をとる同期方法とに関する。   The present invention relates to a data processing apparatus including at least two systems each having a processor and an input / output unit, each having a processor, an input / output unit, and a time counter, and operating with clock signals from different clock sources. The present invention relates to a synchronization method for synchronizing at least two systems.

高度な信頼性を提供するコンピュータとして、フォールト・トレラント・コンピュータ(以下、「FTコンピュータ」と略述する)がある(例えば、特許文献1参照)。FTコンピュータは、同一のハードウエア構成を有するモジュールが二重化又は多重化された冗長構成となっている。二重化又は多重化された全てのモジュールは同期して動作する。そのため、例えばあるモジュールで故障が発生したとしても、そのモジュールを切り離し、正常なモジュールだけで処理を続行することができる。これにより、モジュールの故障に対する耐性が向上し、高度な信頼性が得られるようになる。   As a computer that provides high reliability, there is a fault-tolerant computer (hereinafter abbreviated as “FT computer”) (see, for example, Patent Document 1). The FT computer has a redundant configuration in which modules having the same hardware configuration are duplicated or multiplexed. All modules that are duplicated or multiplexed operate synchronously. Therefore, for example, even if a failure occurs in a certain module, the module can be disconnected and the process can be continued with only a normal module. Thereby, the tolerance to the failure of the module is improved, and high reliability can be obtained.

FTコンピュータの各モジュールには、プロセッサ及びメモリを有するCPUサブシステムが含まれている。各CPUサブシステムには、同一のソフトウエアが組み込まれている。各CPUサブシステムは、同じタイミングのクロック信号と同一のデータとを与えると、正常であれば必ず同じ動作をする。この特性を、デターミニズムと呼ぶ。このデターミニズムに基づき、複数のCPUサブシステムが全く同じ動作をしている状態を、ロックステップ同期と呼ぶ。FTコンピュータでは、各モジュールのCPUサブシステムをロックステップ同期させることにより、二重化処理又は多重化処理が実現されている。   Each module of the FT computer includes a CPU subsystem having a processor and memory. The same software is incorporated in each CPU subsystem. When each CPU subsystem gives the same timing clock signal and the same data, it always performs the same operation if it is normal. This characteristic is called determinism. Based on this determinism, a state in which a plurality of CPU subsystems perform exactly the same operation is called lockstep synchronization. In the FT computer, duplex processing or multiplexing processing is realized by synchronizing the CPU subsystem of each module with lockstep.

各CPUサブシステムに入力される同じタイミングのクロック信号を入力させる方法としては、CPUサブシステム間でクロック源を共通化する方法と、出力周波数が同じ複数のクロック源を用いる方法との2つが考えられる。   There are two methods for inputting clock signals of the same timing input to each CPU subsystem: a method of sharing a clock source among CPU subsystems and a method of using a plurality of clock sources having the same output frequency. It is done.

しかしながら、クロック源を共通化した場合には、そのクロック源が故障すれば、FTコンピュータのすべてのモジュールを停止せざるをえなくなる。また、1つのクロック信号をすべてのモジュールに入力するための配線が必要となるため、装置の機構設計の自由度が著しく制限されるようになる。   However, when the clock source is shared, if the clock source fails, all the modules of the FT computer must be stopped. In addition, since wiring for inputting one clock signal to all modules is required, the degree of freedom in designing the mechanism of the apparatus is significantly limited.

一方、複数のクロック源を用いた場合には、各クロック源の出力周波数の微小なばらつきにより、時間経過とともに、それぞれのクロック源から出力されるクロック信号にずれが生じてくる。そこで、各CPUサブシステムが同時に実行する命令については、クロック信号の周波数が最も低く、実行速度の遅いCPUサブシステムにすべてのCPUサブシステムの実行タイミングを合わせる方法が開示されている(例えば、特許文献2参照)。また、クロック信号の位相差を検出し、その位相差に基づいてクロック信号の周波数を調整するデータ処理装置が開示されている(例えば、特許文献3参照)。さらに、時刻カウンタのカウント値を定期的にリセットするなどして、クロック信号の位相差を最小限に止め、ロックステップ同期を維持するデータ処理装置が開示されている(例えば、特許文献4、5参照)。   On the other hand, when a plurality of clock sources are used, the clock signals output from the respective clock sources are shifted over time due to minute variations in the output frequency of each clock source. Thus, for instructions executed simultaneously by each CPU subsystem, a method is disclosed in which the execution timing of all the CPU subsystems is matched to the CPU subsystem having the lowest clock signal frequency and the lowest execution speed (for example, patents). Reference 2). Also disclosed is a data processing device that detects the phase difference of a clock signal and adjusts the frequency of the clock signal based on the phase difference (see, for example, Patent Document 3). Furthermore, a data processing device is disclosed that keeps the lock step synchronization by minimizing the phase difference of the clock signal by periodically resetting the count value of the time counter (for example, Patent Documents 4 and 5). reference).

特開2006−172391号公報JP 2006-172391 A 特表2006−512634号公報JP-T-2006-512634 特開2005−182693号公報JP 2005-182893 A 特開平7−73059号公報JP-A-7-73059 特開2007−249518号公報JP 2007-249518 A

しかしながら、実行速度の遅いCPUサブシステムにすべてのCPUサブシステムの実行タイミングを合わせた場合には、装置全体の処理速度の低下が懸念される。   However, when the execution timings of all the CPU subsystems are matched with the CPU subsystem having a low execution speed, there is a concern that the processing speed of the entire apparatus is lowered.

また、クロック信号のずれを検出する場合には、各CPUサブシステムに入力されるクロック信号を比較するための専用のハードウエアが必要となるうえ、各モジュールのハードウエアの独立性が低下する。   Further, when detecting the shift of the clock signal, dedicated hardware for comparing the clock signals input to the CPU subsystems is required, and the independence of the hardware of each module is lowered.

また、各CPUサブシステムに入力されるクロック信号を、タイマ割り込みなどをかけて定期的にリセットする場合には、タイマ割り込みをかける時間が適切に設定されていなかったり、複数のクロック源の出力周波数のばらつきが大きすぎたりすると、ロックステップ同期を維持することが困難になる。   In addition, when the clock signal input to each CPU subsystem is periodically reset by applying a timer interrupt or the like, the time for applying the timer interrupt is not set appropriately, or the output frequencies of multiple clock sources If there is too much variation, it will be difficult to maintain lockstep synchronization.

本発明は、上記事情に鑑みてなされたもので、より信頼性の高いデータ処理装置を提供することを目的とする。   The present invention has been made in view of the above circumstances, and an object thereof is to provide a more reliable data processing apparatus.

上記目的を達成するために、本発明の第1の観点に係るデータ処理装置は、各々がプロセッサと入出力部とを有する少なくとも2つのシステムを備えるデータ処理装置であって、各前記システムは、クロック信号を出力するクロック源と、前記クロック源から出力されたクロック信号の周波数を調整して前記プロセッサに入力する調整部と、前記調整部から出力されるクロック信号に基づいて計時を行う時刻カウンタと、前記入出力部から入力されたデータを前記プロセッサに送信する際に、送信時の前記時刻カウンタの第1のカウント値と、前記プロセッサにより当該データが処理される実行予定時刻に相当する第2のカウント値とを前記データに付加して送信し、前記第1、第2のカウント値が付加されたデータを、他のシステムにも送信する第1の送信部と、前記第1の送信部から送信されたデータを受信するととともに、受信時の前記時刻カウンタの第3のカウント値を取得し、前記他のシステムの前記第1の送信部から送信されたデータを受信するとともに、受信時の前記時刻カウンタの第4のカウント値を取得する第1の受信部と、付加された前記第1のカウント値が同一であるデータ同士の前記第3、第4のカウント値に基づいて、前記時刻カウンタのカウント値と前記他のシステムの前記時刻カウンタのカウント値とのカウントずれを算出する算出部と、前記算出部で算出されたカウントずれが小さくなるように、前記調整部を制御する制御部と、前記時刻カウンタのカウント値が第2のカウント値となるまで、前記プロセッサに対する、前記第1の受信部で受信されたデータの入力を保留する保留部と、前記プロセッサから入力されたデータを前記入出力部に送信する第2の送信部と、前記第2の送信部から送信されたデータを受信して前記入出力部に出力する第2の受信部と、を備える。 To achieve the above object, a data processing apparatus according to the first aspect of the present invention is a data processing apparatus including at least two systems each having a processor and an input / output unit, and each of the systems includes: A clock source that outputs a clock signal, an adjustment unit that adjusts the frequency of the clock signal output from the clock source and inputs the clock signal, and a time counter that measures time based on the clock signal output from the adjustment unit And when the data input from the input / output unit is transmitted to the processor, the first count value of the time counter at the time of transmission and a scheduled execution time corresponding to the data processed by the processor 2 of the count value transmitted in addition to the data, the first, the data which the second count value are added, sent to other systems And receiving the data transmitted from the first transmitter, obtaining a third count value of the time counter at the time of reception, and the first transmission of the other system The first receiving unit that receives the data transmitted from the unit and obtains the fourth count value of the time counter at the time of reception, and the data that has the same added first count value A calculation unit that calculates a count deviation between the count value of the time counter and the count value of the time counter of the other system based on the third and fourth count values; and the count deviation calculated by the calculation unit as decreases, and a control section for controlling the adjustment unit, until the count value of the time counter becomes the second count value, for the processor, received by said first receiver A holding unit for holding the input of the received data, a second transmission unit for transmitting the data input from the processor to the input / output unit, and the data transmitted from the second transmission unit A second receiving unit for outputting to the entry output unit.

また、本発明の第2の観点に係る同期方法は、各々がプロセッサと入出力部と時刻カウンタとを有し、異なるクロック源からのクロック信号で動作する少なくとも2つのシステムの同期をとる同期方法であって、前記入出力部から入力されたデータを前記プロセッサに送信する際に、送信時の前記時刻カウンタの第1のカウント値と、前記プロセッサにより当該データが処理される実行予定時刻に相当する第2のカウント値とを前記データに付加して送信し、前記第1、第2のカウント値が付加されたデータを、他のシステムにも送信する第1の工程と、前記第1の工程で送信されたデータを受信するととともに、受信時の前記時刻カウンタの第3のカウント値を取得し、前記他のシステムから送信されたデータを受信するとともに、受信時の前記時刻カウンタの第4のカウント値を取得する第2の工程と、付加された前記第1のカウント値が同一であるデータ同士の前記第3、第4のカウント値に基づいて、前記時刻カウンタのカウント値と前記他のシステムの前記時刻カウンタのカウント値とのカウントずれを算出する第3の工程と、前記第3の工程で算出されたカウントずれが小さくなるように、前記クロック信号の周波数を調整する第4の工程と、前記時刻カウンタのカウント値が前記第2のカウント値となるまで、前記プロセッサに対する、前記第2の工程で受信されたデータの入力を保留する第5の工程と、を含む。
The synchronization method according to the second aspect of the present invention is a synchronization method for synchronizing at least two systems, each of which has a processor, an input / output unit, and a time counter and operates with clock signals from different clock sources. When the data input from the input / output unit is transmitted to the processor, it corresponds to the first count value of the time counter at the time of transmission and the scheduled execution time at which the data is processed by the processor A first step of transmitting the second count value to the data and transmitting the data to which the first and second count values have been added to another system; Receiving the data transmitted in the process, obtaining the third count value of the time counter at the time of reception, receiving the data transmitted from the other system, and at the time of reception Based on the second step of acquiring the fourth count value of the time counter and the third and fourth count values of the data having the same added first count value, the time counter A third step of calculating a count deviation between the count value of the other system and the count value of the time counter of the other system, and the frequency of the clock signal so that the count deviation calculated in the third step is reduced And a fifth step of deferring input of the data received in the second step to the processor until the count value of the time counter reaches the second count value. ,including.

本発明によれば、より信頼性の高いデータ処理装置を提供することができる。   According to the present invention, a more reliable data processing apparatus can be provided.

≪第1の実施形態≫
次に、本発明の第1の実施形態について図面を参照して詳細に説明する。
<< First Embodiment >>
Next, a first embodiment of the present invention will be described in detail with reference to the drawings.

図1には、本発明の第1の実施形態に係るデータ処理装置100の構成が示されている。図1に示されるように、データ処理装置100は、システム1Aと、システム1Bと、クロスリンク2とを備えている。システム1Aとシステム1Bは、同一のハードウエア構成及びソフトウエア構成を有する同型のモジュールである。すなわち、データ処理装置100は、ハードウエア構成が同一で、そのハードウエア上で動作するソフトウエアも同一であるシステムが二重化された冗長構成を有するFTコンピュータである。   FIG. 1 shows the configuration of a data processing apparatus 100 according to the first embodiment of the present invention. As shown in FIG. 1, the data processing apparatus 100 includes a system 1 </ b> A, a system 1 </ b> B, and a cross link 2. The system 1A and the system 1B are the same type modules having the same hardware configuration and software configuration. That is, the data processing apparatus 100 is an FT computer having a redundant configuration in which a system having the same hardware configuration and the same software operating on the hardware is duplicated.

クロスリンク2は、システム1Aとシステム1Bとの間における相互のデータ送受信を可能とするデータ伝送路である。システム1Aの各構成要素の符号には、数字にAを付け足したものが用いられている。また、その構成要素に対応するシステム1Bの構成要素には、同一の数字にBを付け足したものが用いられている。以下では、主としてシステム1Aの構成要素について説明するが、システム1Bの各構成要素については、システム1Aの対応する構成要素と同じ機能を有しているものとして必要に応じて説明する。   The cross link 2 is a data transmission path that enables mutual data transmission / reception between the system 1A and the system 1B. As the reference numerals of the constituent elements of the system 1A, numbers obtained by adding A are used. Moreover, what added B to the same number is used for the component of the system 1B corresponding to the component. Below, although the component of the system 1A is mainly demonstrated, each component of the system 1B is demonstrated as needed as what has the same function as the corresponding component of the system 1A.

システム1Aは、クロック源10A、調整部としてのPLL(位相同期回路)11A、CPUサブシステム12A、I/Oサブシステム13Aと、を備えている。   The system 1A includes a clock source 10A, a PLL (phase synchronization circuit) 11A as an adjustment unit, a CPU subsystem 12A, and an I / O subsystem 13A.

クロック源10Aは、例えば、水晶発振子などを備え、所定の周波数のクロック信号を出力している。   The clock source 10A includes, for example, a crystal oscillator and outputs a clock signal having a predetermined frequency.

PLL11Aは、設定されたパラメータに従って、クロック源10Aから出力されたクロック信号の周波数を微調整する。PLL11Aからは、周波数が調整されたクロック信号が出力される。PLL11Aによって周波数が調整されたクロック信号は、CPUサブシステム12Aに入力されている。   The PLL 11A finely adjusts the frequency of the clock signal output from the clock source 10A according to the set parameters. From the PLL 11A, a clock signal whose frequency is adjusted is output. The clock signal whose frequency is adjusted by the PLL 11A is input to the CPU subsystem 12A.

CPUサブシステム12Aは、CPU(中央処理装置)とメモリ(主記憶装置)とを備えるCPU部20Aを中心として構成されたシステム1Aのサブシステムである。CPU部20Aは、一連の命令列を実行するもので、任意の数のCPU、任意の容量のメモリと、それらを相互接続する内部バス(いずれも不図示)とを有している。CPU部20AのCPUは、クロック源10AからPLL11Aを介して入力されるクロック信号に従って、入力されたデータを用いて、メモリに格納された一連の命令列(プログラム)を実行する。このような命令列には、データの入出力命令や、データの演算命令や、分岐などのプログラムの制御命令などが含まれている。   The CPU subsystem 12A is a subsystem of the system 1A that is configured around a CPU unit 20A including a CPU (central processing unit) and a memory (main storage device). The CPU unit 20A executes a series of instruction sequences, and has an arbitrary number of CPUs, an arbitrary capacity memory, and an internal bus (not shown) interconnecting them. The CPU of the CPU unit 20A executes a series of instruction sequences (programs) stored in the memory using the input data in accordance with a clock signal input from the clock source 10A via the PLL 11A. Such an instruction sequence includes a data input / output instruction, a data operation instruction, a program control instruction such as a branch, and the like.

CPUサブシステム12Aには、時刻カウンタ21Aがさらに設けられている。時刻カウンタ21Aは、PLL11Aを介して入力されるクロック信号に基づいて、計時を行う。時刻カウンタ21Aは、不図示のリセット信号が入力された場合には、カウント値をリセットする。時刻カウンタ21Aは、リセット後、クロック源10AからPLL11Aを介して入力されるクロック信号の例えば立ち上がりで、カウント値をインクリメントする。時刻カウンタ21Aは、リセットされてからのクロックサイクル数を保持している。時刻カウンタ20Aのカウント値は、CPUサブシステム12Aを構成するCPU部20A、後述する送信部22A、受信部23A、パケット処理部24A、PLL制御部25Aなどから常に参照することができるようになっている。さらに、時刻カウンタ21Aのカウント値は、専用のサイドバンド信号により、CPUサブシステム12Aから、I/Oサブシステム13Aに常時送信されている。   The CPU subsystem 12A is further provided with a time counter 21A. The time counter 21A measures time based on a clock signal input via the PLL 11A. The time counter 21A resets the count value when a reset signal (not shown) is input. After reset, the time counter 21A increments the count value, for example, at the rising edge of the clock signal input from the clock source 10A via the PLL 11A. The time counter 21A holds the number of clock cycles since it was reset. The count value of the time counter 20A can always be referred to from the CPU unit 20A constituting the CPU subsystem 12A, a transmitting unit 22A, a receiving unit 23A, a packet processing unit 24A, a PLL control unit 25A, etc., which will be described later. Yes. Further, the count value of the time counter 21A is constantly transmitted from the CPU subsystem 12A to the I / O subsystem 13A by a dedicated sideband signal.

なお、CPU部20Aでは、後述するもう一方のシステム1BのCPU部20Bが実行するプログラムと同じプログラムが実行される。CPUサブシステム12Aは、プロセッサとしてのCPU部20Aの他に、送信部22Aと、受信部23Aと、パケット処理部24Aと、PLL制御部25Aと、を備えているが、これらの詳細については後述する。   The CPU unit 20A executes the same program as the program executed by the CPU unit 20B of the other system 1B described later. The CPU subsystem 12A includes a transmission unit 22A, a reception unit 23A, a packet processing unit 24A, and a PLL control unit 25A in addition to the CPU unit 20A as a processor. Details of these will be described later. To do.

I/Oサブシステム13Aは、入出力部としてのI/Oデバイス(図では、単にI/O)30Aを中心として構成されたシステム1Aのサブシステムである。I/Oデバイス30Aは、不図示の外部機器との間でデータの入出力を行う入出力インターフェイスである。I/Oデバイス30Aは、SCSIコントローラ、LANアダプタ等の任意の複数のデバイスであってもよい。I/Oサブシステム13Aは、I/Oデバイス30Aの他に、送信部32Aと、受信部33Aとを備えているが、これらの詳細については後述する。   The I / O subsystem 13A is a subsystem of the system 1A configured around an I / O device (simply I / O in the figure) 30A as an input / output unit. The I / O device 30A is an input / output interface that inputs and outputs data with an external device (not shown). The I / O device 30A may be an arbitrary plurality of devices such as a SCSI controller and a LAN adapter. The I / O subsystem 13A includes a transmission unit 32A and a reception unit 33A in addition to the I / O device 30A. Details thereof will be described later.

システム1Aでは、CPUサブシステム12AのCPU部20Aと、I/Oサブシステム13AのI/Oデバイス30Aとの間で、データパケットの送受信が行われることにより、全体の動作が実現される。図2に示されるように、データパケット50には、パケット種別フィールド51、パケット長フィールド52、データフィールド53、送信時刻フィールド54、実行時刻フィールド55という複数のフィールドが設けられている。   In the system 1A, the entire operation is realized by transmitting and receiving data packets between the CPU unit 20A of the CPU subsystem 12A and the I / O device 30A of the I / O subsystem 13A. As shown in FIG. 2, the data packet 50 is provided with a plurality of fields including a packet type field 51, a packet length field 52, a data field 53, a transmission time field 54, and an execution time field 55.

パケット種別フィールド51には、データパケット50の種別が格納されている。パケット長フィールド52には、そのデータパケット50のパケット長が格納されている。データフィールド53には、外部機器からI/Oデバイス30Aに入力されたデータや、CPU部20Aのプログラムの実行により生成されたデータなどの実体的なデータが格納されている。パケット種別フィールド51、パケット長フィールド52と、データフィールド53とで一般データフィールドが構成されている。   The packet type field 51 stores the type of the data packet 50. The packet length field 52 stores the packet length of the data packet 50. The data field 53 stores substantive data such as data input from an external device to the I / O device 30A and data generated by executing a program of the CPU unit 20A. The packet type field 51, the packet length field 52, and the data field 53 constitute a general data field.

データパケット50には、この一般データフィールドに加え、送信時刻フィールド54と実行時刻フィールド55とが設けられている。送信時刻フィールド54には、I/Oサブシステム13AからCPUサブシステム12Aへデータが送信される時点での時刻カウンタ21Aのカウント値(第1のカウント値)が格納される。実行時刻フィールド55には、CPU部20Aによってそのデータパケット50のデータフィールド53に含まれるデータが実行されるべき時点の時刻カウンタのカウント値(第2のカウント値)が格納される。なお、CPU部20Bにおいても、同じカウント値が、データパケット50の実行時刻フィールド55に格納される。   In addition to the general data field, the data packet 50 is provided with a transmission time field 54 and an execution time field 55. The transmission time field 54 stores the count value (first count value) of the time counter 21A when data is transmitted from the I / O subsystem 13A to the CPU subsystem 12A. The execution time field 55 stores the count value (second count value) of the time counter when the data included in the data field 53 of the data packet 50 is to be executed by the CPU unit 20A. Note that the same count value is also stored in the execution time field 55 of the data packet 50 in the CPU unit 20B.

このようなデータパケット50の送受信及びシステム1Aとシステム1Bとのロックステップ同期(以下、単に「同期」という)を確立するために、CPUサブシステム12Aは、CPU部20A及び時刻カウンタ21Aの他に、送信部22Aと、受信部23Aと、パケット処理部24Aと、PLL制御部25Aとを備えている。また、I/Oサブシステム13Aは、I/Oデバイス30Aの他に、送信部32Aと、受信部33Aとを備えている。本実施形態に係るシステム1Aでは、I/Oサブシステム13Aの送信部32Aが第1の送信部に対応し、CPUサブシステム12Aの受信部23Aが第1の受信部に対応する。また、CPUサブシステム12Aの送信部22Aが第2の送信部に対応し、I/Oサブシステム13Aの受信部33Aが第2の受信部に対応する。   In order to establish transmission / reception of the data packet 50 and lock step synchronization (hereinafter simply referred to as “synchronization”) between the system 1A and the system 1B, the CPU subsystem 12A includes the CPU unit 20A and the time counter 21A. , A transmission unit 22A, a reception unit 23A, a packet processing unit 24A, and a PLL control unit 25A. In addition to the I / O device 30A, the I / O subsystem 13A includes a transmission unit 32A and a reception unit 33A. In the system 1A according to the present embodiment, the transmission unit 32A of the I / O subsystem 13A corresponds to the first transmission unit, and the reception unit 23A of the CPU subsystem 12A corresponds to the first reception unit. The transmission unit 22A of the CPU subsystem 12A corresponds to the second transmission unit, and the reception unit 33A of the I / O subsystem 13A corresponds to the second reception unit.

I/Oサブシステム13Aを構成する送信部32Aは、I/Oデバイス30から入力されたデータパケット50の送信時刻フィールド54に、送信時の時刻カウンタ21Aのカウント値(第1のカウント値)を格納する。そして、送信部32Aは、そのデータパケット50の実行時刻フィールド55に、CPU部20Aによってそのデータパケット50が処理される実行予定時刻に相当するカウント値(第2のカウント値)を格納する。さらに、送信部32Aは、これらのカウント値が付加されたデータパケット50を、受信部23Aに送信するとともにクロスリンク2を介して他のシステム1Bの受信部23Bにも送信する。   The transmission unit 32A configuring the I / O subsystem 13A sets the count value (first count value) of the time counter 21A at the time of transmission in the transmission time field 54 of the data packet 50 input from the I / O device 30. Store. Then, the transmitting unit 32A stores a count value (second count value) corresponding to the scheduled execution time at which the data packet 50 is processed by the CPU unit 20A in the execution time field 55 of the data packet 50. Further, the transmission unit 32A transmits the data packet 50 to which these count values are added to the reception unit 23A and also to the reception unit 23B of the other system 1B via the cross link 2.

CPUサブシステム12Aを構成する、受信部23Aは、送信部32Aから送信されたデータパケット50を受信するととともに、そのデータパケット50の受信時の時刻カウンタ21Aのカウント値(第3のカウント値)を取得する。また、受信部23Aは、他のシステム1Bの送信部32Bから送信されたデータパケット50を受信するとともに、そのデータパケット50の受信時の時刻カウンタ21Aのカウント値(第4のカウント値)を取得する。   The receiving unit 23A constituting the CPU subsystem 12A receives the data packet 50 transmitted from the transmitting unit 32A, and at the same time, obtains the count value (third count value) of the time counter 21A when the data packet 50 is received. get. The receiving unit 23A receives the data packet 50 transmitted from the transmitting unit 32B of the other system 1B, and obtains the count value (fourth count value) of the time counter 21A when the data packet 50 is received. To do.

図3には、受信部23Aの詳細な構成が示されている。図3に示されるように、受信部23Aは、FIFO(ファースト・イン・ファースト・アウト)メモリ40A、40B、41A、41Bを備えている。   FIG. 3 shows a detailed configuration of the receiving unit 23A. As shown in FIG. 3, the receiving unit 23A includes FIFO (first-in-first-out) memories 40A, 40B, 41A, and 41B.

受信部23Aは、I/Oサブシステム13Aの送信部32Aから送信されたデータパケット50をFIFOメモリ40Aに保持する。受信部23Aは、第3のカウント値を、FIFOメモリ41Aに保持する。   The receiving unit 23A holds the data packet 50 transmitted from the transmitting unit 32A of the I / O subsystem 13A in the FIFO memory 40A. The receiving unit 23A holds the third count value in the FIFO memory 41A.

また、受信部23Aは、もう一方のシステム1Bにおける送信部32Bから送信されたデータパケット50をFIFOメモリ40Bに保持する。受信部23Aは、第4のカウント値を、FIFOメモリ41Bに保持する。   In addition, the reception unit 23A holds the data packet 50 transmitted from the transmission unit 32B in the other system 1B in the FIFO memory 40B. The receiving unit 23A holds the fourth count value in the FIFO memory 41B.

なお、クロスリンク2のレイテンシ(システム1Aとシステム1Bのデータの送受信に要する潜在的な時間)のために、第3のカウント値と第4のカウント値との間には、時間差が生じる。したがって、システム1Bにおける送信部32Bからのデータパケット50が受信される前に、送信部32Aから新たなデータパケット50が送られてくる場合も想定される。このため、受信部23Aには、受信データが消失することのないように、FIFOメモリ40A、40B、41A、41Bが設けられている。FIFOメモリ40A、40B、41A、41Bの容量は、クロスリンク2のレイテンシと、I/Oサブシステム13AからCPUサブシステム12Aへ送信されるデータの送信頻度とのバランスを考慮して設定されるのが望ましい。また、これらの容量は、受信部23Aとパケット処理部24Aと間でのデータの入出力を過度に遅延させることがない程度とするのが望ましい。   Note that a time difference occurs between the third count value and the fourth count value due to the latency of the cross link 2 (potential time required for data transmission / reception between the system 1A and the system 1B). Therefore, it is assumed that a new data packet 50 is sent from the transmission unit 32A before the data packet 50 is received from the transmission unit 32B in the system 1B. For this reason, the FIFO memory 40A, 40B, 41A, 41B is provided in the receiving unit 23A so that the received data is not lost. The capacities of the FIFO memories 40A, 40B, 41A and 41B are set in consideration of the balance between the latency of the cross link 2 and the transmission frequency of data transmitted from the I / O subsystem 13A to the CPU subsystem 12A. Is desirable. Further, it is desirable that these capacities are such that data input / output between the receiving unit 23A and the packet processing unit 24A is not excessively delayed.

また、受信部23Aは、FIFOメモリ41Aに格納されたデータパケット50の第3のカウント値と、FIFOメモリ41Bに格納されたデータパケット50の第4のカウント値とに基づいて、時刻カウンタ21Aのカウント値と、他のシステム1Bの時刻カウンタ21Bのカウント値とのカウントずれを算出する。カウントずれの算出のために考慮される第3のカウント値と、第4のカウント値とは、送信時刻フィールドに格納されたカウント値(第1のカウント値)が同一なデータパケット50のものが用いられる。   The receiving unit 23A also sets the time counter 21A based on the third count value of the data packet 50 stored in the FIFO memory 41A and the fourth count value of the data packet 50 stored in the FIFO memory 41B. A count deviation between the count value and the count value of the time counter 21B of the other system 1B is calculated. The third count value and the fourth count value considered for calculating the count deviation are those of the data packet 50 having the same count value (first count value) stored in the transmission time field. Used.

より具体的には、受信部23Aは、まず、第4のカウント値からクロスリンク2のレイテンシ分を差し引く。そして、受信部23Aは、その差し引かれたカウント値と、第3のカウント値との差分を算出することにより、時刻カウンタ21Aのカウント値と他のシステム1Bの時刻カウンタ21Bのカウント値とのカウントずれを算出する。このカウントずれは、データパケット50とともに、パケット処理部24Aに出力される。   More specifically, the receiving unit 23A first subtracts the latency of the cross link 2 from the fourth count value. Then, the receiving unit 23A calculates a difference between the subtracted count value and the third count value, thereby counting the count value of the time counter 21A and the count value of the time counter 21B of the other system 1B. Calculate the deviation. This count deviation is output to the packet processing unit 24A together with the data packet 50.

パケット処理部24Aは、時刻カウンタ21Aのカウント値が、データパケット50の実行時刻フィールド55に格納されたカウント値(第2のカウント値)となるまで、受信部23Aで受信されたデータパケット50のCPU部20Aへの入力を保留する。   The packet processing unit 24A receives the data packet 50 received by the receiving unit 23A until the count value of the time counter 21A reaches the count value (second count value) stored in the execution time field 55 of the data packet 50. The input to the CPU unit 20A is suspended.

また、パケット処理部24Aは、受信部23Aから出力されたカウントずれが、許容値を上回っている場合には、このカウントずれを、PLL制御部25Aに出力する。   Further, when the count deviation output from the receiving unit 23A exceeds the allowable value, the packet processing unit 24A outputs the count deviation to the PLL control unit 25A.

PLL制御部25Aは、パケット処理部24Aから出力されたカウントずれに基づいて、PLL11Aのパラメータを変更することにより、PLL11Aを制御する。これにより、PLL11Aから出力されるクロック信号の周波数が微調整され、システム1Aの時刻カウンタ21Aとシステム1Bの時刻カウンタ21Bとのカウントずれが小さくなる。   The PLL control unit 25A controls the PLL 11A by changing the parameters of the PLL 11A based on the count deviation output from the packet processing unit 24A. As a result, the frequency of the clock signal output from the PLL 11A is finely adjusted, and the count deviation between the time counter 21A of the system 1A and the time counter 21B of the system 1B is reduced.

一方、CPUサブシステム12Aを構成する送信部22Aは、CPU部20Aから出力されたデータパケット50を入力する。送信部22Aは、入力されたデータパケット50を、I/Oサブシステム13Aの受信部33Aに送信するとともに、クロスリンク2を介して、他のシステム1Bの受信部33Bにも送信する。   On the other hand, the transmission unit 22A configuring the CPU subsystem 12A inputs the data packet 50 output from the CPU unit 20A. The transmission unit 22A transmits the input data packet 50 to the reception unit 33A of the I / O subsystem 13A and also to the reception unit 33B of the other system 1B via the cross link 2.

I/Oサブシステム13Aを構成する受信部33Aは、送信部22Aから送信されたデータパケット50を受信してI/Oデバイス30Aに出力する。なお、受信部33Aでは、他のシステム1Bの送信部22Bからもデータパケット50を受信するが、本実施形態では、受信部33Aにおいて、他のシステム1Bから送信されたデータパケット50に対しての処理は、特に行われないものとする。   The receiving unit 33A configuring the I / O subsystem 13A receives the data packet 50 transmitted from the transmitting unit 22A and outputs it to the I / O device 30A. The receiving unit 33A also receives the data packet 50 from the transmitting unit 22B of the other system 1B. In the present embodiment, the receiving unit 33A receives the data packet 50 transmitted from the other system 1B. Processing is not particularly performed.

上述したように、システム1Bの構成は、システム1Aの構成と同一である。すなわち、システム1Bは、クロック源10B、PLL11B、CPUサブシステム12B、I/Oサブシステム13Bと、を備えている。CPUサブシステム12Bは、CPU部20Bと、時刻カウンタ21Bと、送信部22Bと、受信部23Bと、パケット処理部24Bと、PLL制御部25Bと、を備えている。I/Oサブシステム13Bは、I/Oデバイス30Bと、送信部32Bと、受信部33Bとを備えている。   As described above, the configuration of the system 1B is the same as the configuration of the system 1A. That is, the system 1B includes a clock source 10B, a PLL 11B, a CPU subsystem 12B, and an I / O subsystem 13B. The CPU subsystem 12B includes a CPU unit 20B, a time counter 21B, a transmission unit 22B, a reception unit 23B, a packet processing unit 24B, and a PLL control unit 25B. The I / O subsystem 13B includes an I / O device 30B, a transmission unit 32B, and a reception unit 33B.

クロック源10Aとクロック源10Bとは、同一規格のクロック源であり、同じ周波数のクロック信号を出力している。これらクロック信号は、それぞれのPLL11A、11Bを介して、CPUサブシステム12A、13Aに入力されている。すなわち、CPUサブシステム12A、12Bは、周波数が実質的に等しいクロック信号の下で動作している。   The clock source 10A and the clock source 10B are clock sources of the same standard and output clock signals having the same frequency. These clock signals are input to the CPU subsystems 12A and 13A via the PLLs 11A and 11B, respectively. That is, the CPU subsystems 12A and 12B operate under a clock signal having substantially the same frequency.

また、I/Oサブシステム13A、13Bには、外部機器から、全く同じデータが同じタイミングで入力されている。これらのデータは、正常であれば、同じタイミングで、I/Oサブシステム13A、13BからCPUサブシステム12A、12Bに送信される。そして、CPUサブシステム12AのCPU部20A、CPUサブシステム12BのCPU部20Bには、同じデータが同じタイミングで入力される。CPU部20A、20Bは、同じプログラムを実行する。したがって、CPU部20A、20Bは、デターミニズムに基づき、全く同じ動作をし、同じタイミングで同じデータを出力する。この結果、システム1A、1B間の同期が実現される。   In addition, exactly the same data is input from the external device to the I / O subsystems 13A and 13B at the same timing. If normal, these data are transmitted from the I / O subsystems 13A and 13B to the CPU subsystems 12A and 12B at the same timing. The same data is input to the CPU unit 20A of the CPU subsystem 12A and the CPU unit 20B of the CPU subsystem 12B at the same timing. The CPU units 20A and 20B execute the same program. Therefore, the CPU units 20A and 20B perform exactly the same operation based on determinism and output the same data at the same timing. As a result, synchronization between the systems 1A and 1B is realized.

次に、本発明の第1の実施形態に係るデータ処理装置100の動作について図4〜図6のフローチャート及び図7(A)〜図7(C)を参照して詳細に説明する。本実施形態では、システム1Aの動作とシステム1Bの動作とは同じであるため、主としてシステム1Aの動作について説明する。まず、外部機器からI/Oデバイス30Aに入力されたデータが、CPU部20Aに入力されるまでのシステム1Aの動作について説明する。   Next, the operation of the data processing apparatus 100 according to the first embodiment of the present invention will be described in detail with reference to the flowcharts of FIGS. 4 to 6 and FIGS. 7 (A) to 7 (C). In the present embodiment, the operation of the system 1A and the operation of the system 1B are the same, and thus the operation of the system 1A will be mainly described. First, the operation of the system 1A until the data input from the external device to the I / O device 30A is input to the CPU unit 20A will be described.

送信部32Aの動作について説明する。図4には、送信部32Aの動作のフローチャートが示されている。電源投入後、不図示のリセット信号が入力されると、送信部32Aの動作が開始される。まず、ステップ201において、送信部32Aは、初期化処理を行う。初期化処理後、ステップ203において、送信部32Aは、I/Oデバイス30Aからデータパケット50が入力されるまで待つ。   The operation of the transmission unit 32A will be described. FIG. 4 shows a flowchart of the operation of the transmission unit 32A. When a reset signal (not shown) is input after the power is turned on, the operation of the transmission unit 32A is started. First, in step 201, the transmission unit 32A performs an initialization process. After the initialization process, in step 203, the transmission unit 32A waits until the data packet 50 is input from the I / O device 30A.

I/Oデバイス30Aからデータパケット50が入力されると、ステップ203における判定が肯定され、送信部32Aは、ステップ205に進む。ステップ205において、送信部32Aは、送信時刻フィールド54に時刻カウンタ21Aの現在のカウント値を格納し、実行時刻フィールド55にCPU部20の実行時刻に相当するカウント値を格納し、そのデータパケット50を、受信部23Aに送信するとともに、他のシステム1Bの受信部23Bにも送信する。   When the data packet 50 is input from the I / O device 30A, the determination in step 203 is affirmed, and the transmission unit 32A proceeds to step 205. In step 205, the transmission unit 32A stores the current count value of the time counter 21A in the transmission time field 54, stores the count value corresponding to the execution time of the CPU unit 20 in the execution time field 55, and the data packet 50 Is transmitted to the receiving unit 23A and also to the receiving unit 23B of the other system 1B.

図7(A)には、送信部32Aにおけるデータパケット50の送信時刻フィールド54に格納されるカウント値、実行時刻フィールド55に格納されるカウント値の設定例が示されている。図7(A)に示されるクロックパルスは、CPUサブシステム12Aに入力されるクロック信号を示している。   FIG. 7A shows an example of setting the count value stored in the transmission time field 54 and the count value stored in the execution time field 55 of the data packet 50 in the transmission unit 32A. A clock pulse shown in FIG. 7A indicates a clock signal input to the CPU subsystem 12A.

ここで、送信部32Aにおけるデータパケット50の送信時がカウント値t1の時点であったとする。この場合、送信部32Aは、カウント値t1を、送信時刻フィールド54に格納する。   Here, it is assumed that the transmission time of the data packet 50 in the transmission unit 32A is the time point of the count value t1. In this case, the transmission unit 32A stores the count value t1 in the transmission time field 54.

送信部32Aから受信部23Aへのデータの送信に要する時間を時間Sとし、クロスリンクのレイテンシをLとする。これらの時間S、Lは、既知である。また、CPU部20A、20Bの処理の時間差の許容値をPとする。送信部32Aは、カウント値t1に、時間Sと、時間Lと、許容値Pとを加算することにより得られるカウント値t2を、実行時刻フィールド55に格納する。すなわち、実行時刻フィールド55に格納されるカウント値としては、現在の時刻カウンタ21Aのカウント値に、クロスリンク2のレイテンシとCPU部20A、20B間のずれの許容値とを加算した値が設定されるのが望ましい。   The time required for data transmission from the transmission unit 32A to the reception unit 23A is set as time S, and the cross link latency is set as L. These times S and L are known. Further, let P be an allowable value of the time difference between the processing of the CPU units 20A and 20B. The transmission unit 32A stores the count value t2 obtained by adding the time S, the time L, and the allowable value P to the count value t1 in the execution time field 55. That is, the count value stored in the execution time field 55 is set to a value obtained by adding the latency of the cross link 2 and the allowable deviation between the CPU units 20A and 20B to the count value of the current time counter 21A. Is desirable.

なお、受信部23Aで送信部32Aから送信されたデータパケット50が受信されるのは、時間S経過後の時点、すなわち時刻カウンタ21Aのカウント値がt3となる時点となる。また、受信部23Aで、システム1Bの送信部32Bから送信されたデータパケット50が受信されるのは、時刻カウンタ21A、21Bの間にカウントずれがなければ、時刻カウンタ21Aのカウント値がt4となる時点となる。   Note that the data packet 50 transmitted from the transmission unit 32A is received by the reception unit 23A at the time after the time S has elapsed, that is, the time when the count value of the time counter 21A becomes t3. In addition, when the receiving unit 23A receives the data packet 50 transmitted from the transmitting unit 32B of the system 1B, the count value of the time counter 21A is t4 if there is no count deviation between the time counters 21A and 21B. It will be a time.

図4に戻り、データパケット50の送信後は、再びステップ203に戻り、次のデータパケット50がI/Oデバイス30Aから入力されるまで待つ。   Returning to FIG. 4, after transmitting the data packet 50, the process returns to step 203 again and waits until the next data packet 50 is input from the I / O device 30 </ b> A.

このように、送信部32Aは、I/Oデバイス30Aからデータパケット50が入力される度に、そのデータパケット50の送信時刻フィールド54と実行時刻フィールド55とに、それぞれのカウント値を格納して、データパケット50を受信部23A、23Bに送信している。   In this way, each time the data packet 50 is input from the I / O device 30A, the transmission unit 32A stores the respective count values in the transmission time field 54 and the execution time field 55 of the data packet 50. The data packet 50 is transmitted to the receiving units 23A and 23B.

次に、受信部23Aの動作について説明する。図5には、受信部23Aの動作を示すフローチャートが示されている。図5に示されるように、電源投入後、不図示のリセット信号が入力されると、受信部23Aの動作が開始され、まず、ステップ301において、受信部23Aは、初期化処理を行う。初期化処理後、ステップ303において、受信部23Aは、データパケット50が受信されるまで待つ。   Next, the operation of the receiving unit 23A will be described. FIG. 5 shows a flowchart showing the operation of the receiving unit 23A. As shown in FIG. 5, when a reset signal (not shown) is input after turning on the power, the operation of the receiving unit 23A is started. First, in step 301, the receiving unit 23A performs an initialization process. After the initialization process, in step 303, the receiving unit 23A waits until the data packet 50 is received.

送信部32Aからデータパケット50が受信され、FIFOメモリ40Aに格納されると、ステップ303における判定が肯定され、受信部23Aはステップ305に進む。なお、受信部23Aでは、送信部32Aからデータパケット50の受信が完了すると同時に、その受信時の時刻カウンタ21Aのカウント値(第3のカウント値、図7(A)のt3)が、FIFOメモリ41Aに格納される。   When the data packet 50 is received from the transmission unit 32A and stored in the FIFO memory 40A, the determination in step 303 is affirmed, and the reception unit 23A proceeds to step 305. At the reception unit 23A, the reception of the data packet 50 from the transmission unit 32A is completed, and at the same time, the count value of the time counter 21A at the time of reception (third count value, t3 in FIG. 7A) is the FIFO memory. 41A.

ステップ305では、受信部23Aは、送信時刻フィールド54に格納されたカウント値(第1のカウント値)が同じデータパケット50が、他のシステム1Bから受信されたか否かを判定する。受信部23Aは、この判定が肯定されればステップ309に進み、否定されればステップ303に戻る。   In step 305, the receiving unit 23A determines whether or not the data packet 50 having the same count value (first count value) stored in the transmission time field 54 has been received from another system 1B. If this determination is affirmed, the reception unit 23A proceeds to step 309, and if negative, the reception unit 23A returns to step 303.

ステップ303では、受信部23Aは、再びデータパケット50の受信待ちとなる。ここで、送信部32Aからのデータパケット50が受信されるか、他のシステム1Bの送信部32Bからのデータパケット50が受信されると、受信部23Aは、ステップ305に進む。   In step 303, the receiving unit 23A again waits for reception of the data packet 50. Here, when the data packet 50 from the transmission unit 32A is received or the data packet 50 from the transmission unit 32B of another system 1B is received, the reception unit 23A proceeds to Step 305.

送信部32Aからのデータパケット50が受信された場合には、受信されたデータパケット50が、FIFOメモリ40Aに格納され、その受信時の時刻カウンタ21Aのカウント値がFIFOメモリ41Aに格納される。そして、ステップ305の判定が否定され、受信部23Aは、ステップ303に戻る。   When the data packet 50 from the transmission unit 32A is received, the received data packet 50 is stored in the FIFO memory 40A, and the count value of the time counter 21A at the time of reception is stored in the FIFO memory 41A. Then, the determination at step 305 is denied, and the receiving unit 23A returns to step 303.

一方、他のシステム1Bの送信部32Bからのデータパケット50が受信されると、そのデータパケット50は、FIFOメモリ40Bに格納され、受信時の時刻カウンタ21Aのカウント値(第4のカウント値、図7(A)のt4)がFIFOメモリ41Bに格納される。受信された他のシステム1Bからのデータパケット50は、正常な状態であれば、FIFOメモリ40Aに先に格納されたデータパケット50と、送信時刻フィールド54に格納されたカウント値(第1のカウント値)が同一のデータパケットである。FIFOメモリ40Bに格納されたデータパケット50の送信時刻フィールド54に格納されたカウント値が、FIFOメモリ40Aに格納されたデータパケット50のそれと同一であった場合には、ステップ305における判定が肯定され、受信部23Aは、ステップ309に進む。   On the other hand, when the data packet 50 is received from the transmission unit 32B of the other system 1B, the data packet 50 is stored in the FIFO memory 40B, and the count value (fourth count value, 7 (A) is stored in the FIFO memory 41B. If the received data packet 50 from the other system 1B is in a normal state, the data packet 50 previously stored in the FIFO memory 40A and the count value stored in the transmission time field 54 (first count) Data packets with the same value). If the count value stored in the transmission time field 54 of the data packet 50 stored in the FIFO memory 40B is the same as that of the data packet 50 stored in the FIFO memory 40A, the determination in step 305 is affirmed. Then, the receiving unit 23A proceeds to Step 309.

ステップ309では、FIFOメモリ41Aに格納された第3のカウント値と、そのデータと送信時刻フィールドが同一であるFIFO41Bに格納された第4のカウント値とに基づいて、時刻カウンタ21Aのカウント値と、他のシステム1Bの時刻カウンタ21Bのカウント値とのカウントずれを算出する。   In step 309, based on the third count value stored in the FIFO memory 41A and the fourth count value stored in the FIFO 41B having the same data and transmission time field, the count value of the time counter 21A The count deviation from the count value of the time counter 21B of the other system 1B is calculated.

図7(A)に示されるように、FIFOメモリ41Aに格納されたカウント値がt3であり、FIFOメモリ41Bに格納されたカウント値がt4であったとする。受信部23Aは、カウント値t4からクロスリンク2のレイテンシLを差し引いた値と、カウント値t3との差を、時刻カウンタ21Aのカウント値と、時刻カウンタ21Bのカウント値とのカウントずれとして算出する。図7(A)では、このカウントずれは0となる。   As shown in FIG. 7A, it is assumed that the count value stored in the FIFO memory 41A is t3 and the count value stored in the FIFO memory 41B is t4. The receiving unit 23A calculates the difference between the count value t4 and the count value t3 as the difference between the count value of the time counter 21A and the count value of the time counter 21B. . In FIG. 7A, this count deviation is zero.

これに対して、図7(B)に示されるように、CPUサブシステム12Aに入力されるクロック信号(上段の信号)に対して、CPUサブシステム12Bに入力されるクロック信号(下段の信号)が遅れていた場合を考える。このような遅れは、両システムのクロック信号の周波数の違いによりもたらされる。クロック源10Aのクロック信号の周波数と、クロック源10Bのクロック信号の周波数とが、わずかに異なっていると、時刻カウンタ21Aがカウントされるタイミングと、時刻カウンタ21Bがカウントされるタイミングとの間にはずれが生じ、そのずれが累積して、カウントずれとなって現れるのである。   On the other hand, as shown in FIG. 7B, the clock signal (lower signal) input to the CPU subsystem 12B with respect to the clock signal (upper signal) input to the CPU subsystem 12A. Suppose that was late. Such a delay is caused by the difference in frequency of the clock signals of both systems. If the frequency of the clock signal of the clock source 10A and the frequency of the clock signal of the clock source 10B are slightly different, the timing at which the time counter 21A is counted and the timing at which the time counter 21B is counted are between. Deviation occurs, and the deviations accumulate and appear as count deviations.

図7(B)に示される例では、システム1Bからのデータパケット50が受信部23Aで受信される時点は、カウント値t4に相当する時点ではなく、その時点からクロック信号の時間差dだけ遅れた時点、すなわちカウント値t4’に相当する時点となる。受信部23Aは、カウント値t4’からクロスリンク2のレイテンシLを差し引いた値と、カウント値t3との差を、時刻カウンタ21Aのカウント値と、時刻カウンタ21Bのカウント値とのカウントずれとして算出する。ステップ309では、このようにして、カウントずれdが算出される。   In the example shown in FIG. 7B, the time when the data packet 50 from the system 1B is received by the receiving unit 23A is not the time corresponding to the count value t4, but is delayed by the time difference d of the clock signal from that time. The time point, that is, the time point corresponding to the count value t4 ′. The receiving unit 23A calculates the difference between the count value t4 ′ obtained by subtracting the latency L of the cross link 2 and the count value t3 as a count deviation between the count value of the time counter 21A and the count value of the time counter 21B. To do. In step 309, the count deviation d is calculated in this way.

図5に戻り、次のステップ311では、受信部23Aは、FIFOメモリ40Aに格納されたデータパケット50をパケット処理部24Aに出力する。このとき、ステップ309で算出されたカウントずれも、あわせてパケット処理部24Aに出力される。   Returning to FIG. 5, in the next step 311, the receiving unit 23A outputs the data packet 50 stored in the FIFO memory 40A to the packet processing unit 24A. At this time, the count deviation calculated in step 309 is also output to the packet processing unit 24A.

次に、パケット処理部24Aの動作について説明する。図6には、パケット処理部24Aの動作のフローチャートが示されている。図6に示されるように、電源投入後、不図示のリセット信号が入力されると、パケット処理部24Aの動作が開始され、まず、ステップ401において、パケット処理部24Aは、初期化処理を行う。初期化処理後、ステップ403において、パケット処理部24Aは、受信部23Aからデータパケット50及びカウントずれが入力されるまで待つ。   Next, the operation of the packet processing unit 24A will be described. FIG. 6 shows a flowchart of the operation of the packet processing unit 24A. As shown in FIG. 6, when a reset signal (not shown) is input after the power is turned on, the operation of the packet processing unit 24A is started. First, in step 401, the packet processing unit 24A performs an initialization process. . After the initialization process, in step 403, the packet processing unit 24A waits until the data packet 50 and the count deviation are input from the receiving unit 23A.

データパケット50が入力されると、パケット処理部24Aは、ステップ405に進む。ステップ405では、パケット処理部24Aは、時刻カウンタ21Aのカウント値が、実行時刻フィールド55に格納されたカウント値となるまで待つ。時刻カウンタ21Aのカウント値が、実行時刻フィールド55に格納されたカウント値となると、パケット処理部24Aは、ステップ407に進む。ステップ407では、CPU部20Aにデータパケット50を入力する。これにより、CPU部20Aでは、実行時刻フィールド55に格納されたカウント値に相当する時点で、データパケット50に基づく処理が実行されるようになる。例えば、図7(A)に示される例では、時刻カウンタ21Aのカウント値がt2となった時点で、CPU部20Aにデータパケット50が入力され、このデータパケット50のデータフィールド53に格納されたデータを用いた処理が実行されるようになる。   When the data packet 50 is input, the packet processing unit 24A proceeds to Step 405. In step 405, the packet processing unit 24A waits until the count value of the time counter 21A reaches the count value stored in the execution time field 55. When the count value of the time counter 21A becomes the count value stored in the execution time field 55, the packet processing unit 24A proceeds to Step 407. In step 407, the data packet 50 is input to the CPU unit 20A. Thereby, in the CPU unit 20A, processing based on the data packet 50 is executed at a time corresponding to the count value stored in the execution time field 55. For example, in the example shown in FIG. 7A, when the count value of the time counter 21A reaches t2, the data packet 50 is input to the CPU unit 20A and stored in the data field 53 of the data packet 50. Processing using data is executed.

次のステップ409では、パケット処理部24Aは、受信部23Aから入力したカウントずれの絶対値が閾値を超えるか否かを判定する。この判定が肯定された場合にのみステップ411が実行される。ステップ411では、パケット処理部24Aは、カウントずれを、PLL制御部25Aに出力する。PLL制御部25Aは、このカウントずれが小さくなるように、PLL11Aのパラメータを変更し、PLL11Aから出力されるクロック信号の周波数を調整する。   In the next step 409, the packet processing unit 24A determines whether or not the absolute value of the count deviation input from the receiving unit 23A exceeds a threshold value. Only when this determination is affirmative, step 411 is executed. In step 411, the packet processing unit 24A outputs the count deviation to the PLL control unit 25A. The PLL control unit 25A changes the parameters of the PLL 11A and adjusts the frequency of the clock signal output from the PLL 11A so that the count deviation is reduced.

このように、パケット処理部24Aは、受信部23Aからデータパケット50が入力される度に、CPU部20Aへのデータパケット50の入力の時間調整と、必要な場合におけるPLL11Aの制御とを行っている。   Thus, every time the data packet 50 is input from the receiving unit 23A, the packet processing unit 24A performs time adjustment of the input of the data packet 50 to the CPU unit 20A and controls the PLL 11A when necessary. Yes.

図7(B)では、システム1Aのクロック信号の周波数の方が、システム1Bのクロック信号の周波数よりも高い場合が高くなっている。この場合、パケット処理部24Aは、このカウントずれに基づいて、PLL制御部25Aを制御し、システム1Aのクロック信号の周波数が低くなるように、すなわち、その周波数が下段のクロック信号の周波数に近づくように、PLL11Aを調整する。   In FIG. 7B, the frequency of the clock signal of the system 1A is higher than the frequency of the clock signal of the system 1B. In this case, the packet processing unit 24A controls the PLL control unit 25A based on this count deviation so that the frequency of the clock signal of the system 1A is lowered, that is, the frequency approaches the frequency of the lower clock signal. In this manner, the PLL 11A is adjusted.

なお、システム1Aで、このようなカウントずれが検出された場合には、システム1Bでも、正負が逆のカウントずれが検出されており、システム1Bにおけるクロック信号も調整されるようになるので、両システム1A、1Bのクロック信号の周波数は、それまでの両信号の周波数の中間の周波数に調整されるようにするのが望ましい。   If such a count shift is detected in the system 1A, a count shift with the opposite polarity is detected in the system 1B, and the clock signal in the system 1B is also adjusted. It is desirable that the frequency of the clock signals of the systems 1A and 1B be adjusted to a frequency intermediate between the frequencies of the two signals so far.

図7(C)には、CPUサブシステム12Aに入力されるクロック信号と、CPUサブシステム12Bに入力されるクロック信号とにずれがなく、完全に同期している場合が示されている。この場合には、CPU部20A、20Bは、同じ実時刻(カウント値t4に相当する時刻)で同じ処理を実行するようになる。CPU部20A、20Bは、デターミニズムに基づき、同じ時刻に、同じデータを送信部22A、22Bに出力するようになり、送信部22A、22Bに出力されたデータは、同じ時間に、受信部33A、33Bに送信され、I/Oデバイス30A、30Bから同時に出力されるようになる。本実施形態に係るデータ処理装置100では、通常は、図7(C)に示される状態が維持される。そして、クロック源10A、11B等の特性、すなわちクロック信号の微妙なばらつきにより、図7(B)に示される状態となりかけると、上述したクロック信号の調整が行われて、図7(C)に示される状態に復帰する。これにより、ロックステップ同期が実現される。   FIG. 7C shows a case where the clock signal input to the CPU subsystem 12A and the clock signal input to the CPU subsystem 12B are not shifted and are completely synchronized. In this case, the CPU units 20A and 20B execute the same processing at the same actual time (time corresponding to the count value t4). Based on determinism, the CPU units 20A and 20B output the same data to the transmission units 22A and 22B at the same time, and the data output to the transmission units 22A and 22B are received at the same time at the reception unit 33A, 33B and output simultaneously from the I / O devices 30A and 30B. In the data processing apparatus 100 according to the present embodiment, the state shown in FIG. 7C is normally maintained. Then, when the state shown in FIG. 7B is reached due to the characteristics of the clock sources 10A and 11B, that is, subtle variations in the clock signal, the above-described adjustment of the clock signal is performed, and FIG. Return to the indicated state. Thereby, lockstep synchronization is realized.

以上詳細に説明したように、本実施形態に係るデータ処理装置100は、各々がCPU部20A、20BとI/Oデバイス30A、30Bとを有する少なくとも2つのシステム1A、1Bを備えている。システム1Aでは、I/Oデバイス30AとCPU部20Aとの間でデータパケット50の送受信が行われるが、I/Oデバイス30AからCPU部20Aへ送信されるデータパケット50は、送信時の時刻カウンタ21Aのカウント値(第1のカウント値)が付加されて、他のシステム1Bにも送信されるようになっている。さらに、受信部23Aは、I/Oデバイス30AからCPU部20Aに送信されるデータパケット50を受信するとともに、他のシステム1Bから送信されたデータパケット50も受信するが、それぞれのデータパケット50の受信時に時刻カウンタ21Aのカウント値(第3、第4のカウント値)を取得する。そして、第1のカウント値が同一であるデータ同士の第3のカウント値と、第4のカウント値とに基づいて、時刻カウンタ21Aと時刻カウンタ21Bとのカウントずれが算出され、算出されたカウントずれに基づいて、時刻カウンタ21AやCPU部20に入力されるクロック信号の周波数が調整される。   As described above in detail, the data processing apparatus 100 according to the present embodiment includes at least two systems 1A and 1B each having the CPU units 20A and 20B and the I / O devices 30A and 30B. In the system 1A, the data packet 50 is transmitted and received between the I / O device 30A and the CPU unit 20A. The data packet 50 transmitted from the I / O device 30A to the CPU unit 20A is a time counter at the time of transmission. A count value (first count value) of 21A is added and transmitted to another system 1B. Furthermore, the receiving unit 23A receives the data packet 50 transmitted from the I / O device 30A to the CPU unit 20A and also receives the data packet 50 transmitted from the other system 1B. At the time of reception, the count value (third and fourth count values) of the time counter 21A is acquired. Then, the count deviation between the time counter 21A and the time counter 21B is calculated based on the third count value and the fourth count value of data having the same first count value, and the calculated count Based on the deviation, the frequency of the clock signal input to the time counter 21A and the CPU unit 20 is adjusted.

本実施形態では、システム1Bも、システム1Aと同様に動作する。   In the present embodiment, the system 1B operates in the same manner as the system 1A.

このようにすれば、各システム1A、1BのCPU部20A、20Bに入力されるクロック信号の周波数がわずかに異なり時刻カウンタ21A、21Bにカウントずれが発生しても、そのカウントずれが小さくなる方向に、両クロック信号の周波数を調整することができる。この結果、各システム1A、1Bのクロック源として異なるクロック源を用いたとしても、ロックステップ同期を維持することができるようになる。   In this way, even if the frequency of the clock signal input to the CPU units 20A and 20B of the systems 1A and 1B is slightly different and a count deviation occurs in the time counters 21A and 21B, the count deviation is reduced. In addition, the frequency of both clock signals can be adjusted. As a result, even if different clock sources are used as the clock sources of the systems 1A and 1B, lockstep synchronization can be maintained.

また、本実施形態では、時刻カウンタ21A、21Bのカウント値が、データパケット50の実行時刻フィールド55に格納されたカウント値となった時点で、CPU部20A、20Bが実行されるので、CPU部20A、20Bは、同じ処理と同じ時刻に行うことができるようになる。   In this embodiment, since the CPU units 20A and 20B are executed when the count values of the time counters 21A and 21B become the count values stored in the execution time field 55 of the data packet 50, the CPU unit 20A and 20B can be performed at the same time as the same processing.

なお、図6のステップ409、411は、ステップ405における実行時刻待ちの間に行うようにしてもよい。   Note that steps 409 and 411 in FIG. 6 may be performed while waiting for the execution time in step 405.

≪第2の実施形態≫
次に、本発明の第2の実施形態について図8のフローチャートと、図9のタイミングチャートを参照して、詳細に説明する。本実施形態に係るデータ処理装置は、上記第1の実施形態に係るデータ処理装置100の構成と同一であるため、その構成についての詳細な説明を省略する。本実施形態に係るデータ処理装置100は、パケット処理部24A、24Bの動作が、上記第1の実施形態と異なっている。
<< Second Embodiment >>
Next, a second embodiment of the present invention will be described in detail with reference to the flowchart of FIG. 8 and the timing chart of FIG. Since the data processing apparatus according to the present embodiment is the same as the configuration of the data processing apparatus 100 according to the first embodiment, detailed description thereof is omitted. In the data processing apparatus 100 according to the present embodiment, the operations of the packet processing units 24A and 24B are different from those in the first embodiment.

図8には、本実施形態に係るパケット処理部24Aの動作のフローチャートが示されている。図8に示されるように、本実施形態では、ステップ413、415、417の処理が、新たに追加されている点が、図6のフローチャートと異なっている。その他の点は、上記第1の実施形態と同様であるので、詳細な説明を省略する。   FIG. 8 shows a flowchart of the operation of the packet processing unit 24A according to the present embodiment. As shown in FIG. 8, the present embodiment is different from the flowchart of FIG. 6 in that the processes of steps 413, 415, and 417 are newly added. Since other points are the same as those of the first embodiment, detailed description thereof is omitted.

データパケット50が、受信部23Aから入力され、ステップ403の判定が肯定されると、パケット処理部24Aは、ステップ413に進む。ステップ413では、パケット処理部24Aは、データパケット50の実行時刻フィールド55に格納されたカウント値と、現在の時刻カウンタ21Aのカウント値との差(マージン)を算出する。図9のタイミングチャートでは、データパケット50の実行時刻フィールド55に格納されたカウント値がt2であり、時刻カウンタ21Aのカウント値がt2’であったときの例が示されている。この場合、パケット処理部24Aは、カウント値t2とカウント値t2’との差Mを算出する。   When the data packet 50 is input from the receiving unit 23A and the determination in step 403 is affirmed, the packet processing unit 24A proceeds to step 413. In step 413, the packet processing unit 24A calculates a difference (margin) between the count value stored in the execution time field 55 of the data packet 50 and the count value of the current time counter 21A. The timing chart of FIG. 9 shows an example in which the count value stored in the execution time field 55 of the data packet 50 is t2, and the count value of the time counter 21A is t2 '. In this case, the packet processing unit 24A calculates a difference M between the count value t2 and the count value t2 '.

図8に戻り、ステップ413の後、パケット処理部24Aは、上記第1の実施形態と同様に、実行時刻待ち(ステップ405)→CPU部20Aへのデータ入力(ステップ407)→カウントずれの判定(ステップ409)→上記判定が肯定された場合のカウントずれの出力(ステップ411)が行われる。   Returning to FIG. 8, after step 413, the packet processing unit 24A waits for the execution time (step 405) → data input to the CPU unit 20A (step 407) → determination of count deviation, as in the first embodiment. (Step 409) → Count deviation output (step 411) when the above determination is affirmed.

ステップ409で判定が否定された後、又はステップ411が実行された後は、パケット処理部24Aは、ステップ415に進む。ステップ415では、パケット処理部24Aは、マージンが閾値を超えたか否かを判定する。なお、この閾値は、上記ステップ409の閾値とは別の閾値である。この判定が肯定されれば、ステップ417に進み、マージンをPLL制御部25Aに出力する。PLL制御部25Aは、このマージンが小さくなるように、PLL11Aのパラメータを変更し、クロック信号の周波数が高くなるように微調整する。このようにすれば、CPU部20Aの実行時刻を速めることができるようになるので、データ処理装置100の処理速度が向上する。   After the determination is denied in step 409 or after step 411 is executed, the packet processing unit 24A proceeds to step 415. In step 415, the packet processing unit 24A determines whether or not the margin exceeds a threshold value. This threshold value is a different threshold value from the threshold value in step 409. If this determination is positive, the process proceeds to step 417, and the margin is output to the PLL control unit 25A. The PLL control unit 25A changes the parameters of the PLL 11A so as to reduce this margin, and finely adjusts so that the frequency of the clock signal is increased. In this way, the execution time of the CPU unit 20A can be accelerated, so that the processing speed of the data processing apparatus 100 is improved.

なお、パケット処理部24Bも、パケット処理部24Aと同じように動作し、マージンをPLL制御部25Bに出力する。PLL制御部25Bも、PLL制御部25Aと同様に、このマージンが小さくなるように、PLL11Bのパラメータを変更し、クロック信号の周波数が高くなるように微調整する。これにより、CPU部20Bの実行時刻は、CPU部20Aの実行時刻と同じように速まり、CPU部20Aの実行時刻とCPU部20Bの実行時刻との間にずれは生じない。   The packet processing unit 24B operates in the same manner as the packet processing unit 24A, and outputs a margin to the PLL control unit 25B. Similarly to the PLL control unit 25A, the PLL control unit 25B also changes the parameters of the PLL 11B so as to reduce this margin and finely adjusts the frequency of the clock signal to be high. As a result, the execution time of the CPU unit 20B is accelerated in the same manner as the execution time of the CPU unit 20A, and no deviation occurs between the execution time of the CPU unit 20A and the execution time of the CPU unit 20B.

なお、ステップ409、411と、ステップ415,417とは、順番が逆であってもよい。また、図8のステップ409、411、415、417は、ステップ405における実行時刻待ちの間に行うようにしてもよい。   Note that the order of steps 409 and 411 and steps 415 and 417 may be reversed. Also, steps 409, 411, 415, and 417 in FIG. 8 may be performed while waiting for the execution time in step 405.

≪第3の実施形態≫
次に、本発明の第3の実施形態について図10、図11を参照して詳細に説明する。図10には、本実施形態に係るデータ処理装置100の構成が示されている。図10に示されるように、本実施形態に係るデータ処理装置100は、受信部23A、23Bの代わりに、受信部23A’、23B’が、備えられている点が、上記各実施形態と異なっている。本実施形態に係る受信部23A’、23B’が、リセット部に対応する。
<< Third Embodiment >>
Next, a third embodiment of the present invention will be described in detail with reference to FIGS. FIG. 10 shows the configuration of the data processing apparatus 100 according to the present embodiment. As shown in FIG. 10, the data processing apparatus 100 according to the present embodiment is different from the above embodiments in that reception units 23A ′ and 23B ′ are provided instead of the reception units 23A and 23B. ing. The receiving units 23A ′ and 23B ′ according to the present embodiment correspond to a reset unit.

受信部23A’は、リセット信号を時刻カウンタ21Aに出力する点が、受信部23Aと異なっており、受信部23B’は、リセット信号を時刻カウンタ21Bに出力する点が、受信部23Bと異なっている。リセット信号が出力されると、時刻カウンタ21A、22Bのカウント値は、0にリセットされる。   The receiving unit 23A ′ is different from the receiving unit 23A in that it outputs a reset signal to the time counter 21A, and the receiving unit 23B ′ is different from the receiving unit 23B in that it outputs a reset signal to the time counter 21B. Yes. When the reset signal is output, the count values of the time counters 21A and 22B are reset to zero.

図11には、本実施形態に係る受信部23A’の動作のフローチャートが示されている。図11に示されるように、本実施形態では、ステップ313、315の処理が、新たに追加されている点が、図5のフローチャートと異なっている。   FIG. 11 shows a flowchart of the operation of the receiving unit 23A ′ according to this embodiment. As shown in FIG. 11, the present embodiment is different from the flowchart of FIG. 5 in that the processes of steps 313 and 315 are newly added.

ステップ309において、時刻カウンタ21Aと時刻カウンタ21Bとのカウントずれが算出された後、受信部23A’は、ステップ313に進む。ステップ313では、受信部23A’は、カウントずれの絶対値が、閾値を超えたか否かを判定する。受信部23A’は、この判定が肯定されればステップ315に進み、否定されればステップ311に進む。なお、この閾値としては、図8のステップ409の閾値よりも大きい値、すなわち同期エラーとみなせるほどの値が設定されるようになる。   In step 309, after the count difference between the time counter 21 </ b> A and the time counter 21 </ b> B is calculated, the reception unit 23 </ b> A ′ proceeds to step 313. In step 313, the receiving unit 23A 'determines whether or not the absolute value of the count deviation exceeds a threshold value. If this determination is positive, the reception unit 23A ′ proceeds to step 315, and if negative, the reception unit 23A ′ proceeds to step 311. As the threshold value, a value larger than the threshold value in step 409 in FIG. 8, that is, a value that can be regarded as a synchronization error is set.

ステップ315では、受信部23A’は、リセット処理を行う。すなわち、送信部32Aからデータパケット50の受信時刻と、他のシステム1Bからのデータパケット50の受信時刻との時間差が大すぎる場合には、同期エラーが生じたものとして、受信部23A’は、時刻カウンタ21Aにリセット信号を出力する。これにより、時刻カウンタ21Aのカウント値は0となり、0からのカウントアップが開始される。   In step 315, the receiving unit 23A 'performs a reset process. That is, if the time difference between the reception time of the data packet 50 from the transmission unit 32A and the reception time of the data packet 50 from the other system 1B is too large, it is assumed that a synchronization error has occurred, and the reception unit 23A ′ A reset signal is output to the time counter 21A. Thereby, the count value of the time counter 21A becomes 0, and the count-up from 0 is started.

なお、このステップ315では、受信部23A’は、すでに受信し、FIFOメモリ40Aに保持されているデータパケット50の実行時刻フィールド55に格納されたカウント値を、リセット後のカウント値に書き換える。   In step 315, the receiving unit 23A 'rewrites the count value already received and stored in the execution time field 55 of the data packet 50 held in the FIFO memory 40A with the reset count value.

このように、受信部23A’において、同期エラーが検出された場合には、システム1Bの受信部23B’においても、同期エラーが検出されている。したがって、受信部23B’も、時刻カウンタ21Bにリセット信号を出力するようになる。これにより、時刻カウンタ21A、21Bのカウント値は、ほぼ同時にリセットされ、クロック信号の周波数による両者のカウント値のドリフトが解消されるようになる。   Thus, when a synchronization error is detected in the receiving unit 23A ', the synchronization error is also detected in the receiving unit 23B' of the system 1B. Accordingly, the receiving unit 23B 'also outputs a reset signal to the time counter 21B. As a result, the count values of the time counters 21A and 21B are reset almost simultaneously, and the drift of the count values of both due to the frequency of the clock signal is eliminated.

ステップ315実行後は、ステップ311に進み、受信部23A’は、FIFOメモリ40Aに格納されたデータパケット50を、格納された順番に、パケット処理部24Aに出力する。このとき、時刻カウンタ21Aはリセットされているので、カウントずれは、パケット処理部24Aに出力されない。パケット処理部24Aは、上記各実施形態と同様の処理を行う。   After executing Step 315, the process proceeds to Step 311 and the receiving unit 23A 'outputs the data packets 50 stored in the FIFO memory 40A to the packet processing unit 24A in the order in which they are stored. At this time, since the time counter 21A is reset, the count deviation is not output to the packet processing unit 24A. The packet processing unit 24A performs the same processing as in the above embodiments.

なお、本実施形態では、送信部32Aからデータパケット50の受信時刻と、他のシステム1Bからのデータパケット50の受信時刻との時間差で、同期エラーを検出したが、例えば、FIFOメモリ40Aがオーバーフローしたら、同期エラーが発生したものとして、時刻カウンタ21Aをリセットするようにしてもよい。   In this embodiment, a synchronization error is detected based on the time difference between the reception time of the data packet 50 from the transmission unit 32A and the reception time of the data packet 50 from the other system 1B. However, for example, the FIFO memory 40A overflows Then, the time counter 21A may be reset on the assumption that a synchronization error has occurred.

≪第4の実施形態≫
次に、本発明の第4の実施形態について図12を参照して詳細に説明する。本実施形態に係るデータ処理装置は、上記第3の実施形態に係るデータ処理装置の構成と同一であるため、その構成についての詳細な説明を省略する。本実施形態に係るデータ処理装置100は、受信部23A’、23B’の動作が、上記第3の実施形態と異なっている。本実施形態に係る受信部23A’、23B’が、障害検出部に対応する。
<< Fourth Embodiment >>
Next, a fourth embodiment of the present invention will be described in detail with reference to FIG. Since the data processing apparatus according to the present embodiment is the same as the configuration of the data processing apparatus according to the third embodiment, detailed description of the configuration will be omitted. In the data processing apparatus 100 according to the present embodiment, the operations of the receiving units 23A ′ and 23B ′ are different from those of the third embodiment. The receiving units 23A ′ and 23B ′ according to the present embodiment correspond to a failure detecting unit.

図12には、本実施形態に係る受信部23A’の動作のフローチャートが示されている。図12に示されるように、本実施形態では、ステップ317、319の処理が、新たに追加されている点が、図11のフローチャートと異なっている。   FIG. 12 shows a flowchart of the operation of the receiving unit 23A ′ according to this embodiment. As shown in FIG. 12, the present embodiment is different from the flowchart of FIG. 11 in that the processing of steps 317 and 319 is newly added.

ステップ313又はステップ315実行後、受信部23A’は、ステップ317に進む。ステップ317では、FIFOメモリ40Aに格納されたデータパケット50と、FIFOメモリ40Bに格納されたデータパケット50とが一致するか否かを判定する。受信部23A’は、この判定が肯定されれば、ステップ311に進み、否定されれば、ステップ319に進む。   After executing Step 313 or Step 315, the receiving unit 23A 'proceeds to Step 317. In step 317, it is determined whether or not the data packet 50 stored in the FIFO memory 40A matches the data packet 50 stored in the FIFO memory 40B. If this determination is affirmed, the reception unit 23A ′ proceeds to step 311; otherwise, the reception unit 23A ′ proceeds to step 319.

ステップ319では、エラー処理を行う。このエラー処理では、まず、システム1Aが故障したのか、システム1Bが故障したのかの切り分けが行われる。例えば、データパケット50に、誤り訂正符号が付加されていた場合には、その誤り訂正符号に基づいて、データパケット50の誤りを検出することができる。これにより、FIFOメモリ40Aに保持されたデータパケット50と、FIFOメモリ40Bに保持されたデータパケット50とのいずれに誤りがあるのかを検出し、故障したシステムを特定することができる。   In step 319, error processing is performed. In this error processing, first, it is determined whether the system 1A has failed or the system 1B has failed. For example, if an error correction code is added to the data packet 50, an error in the data packet 50 can be detected based on the error correction code. As a result, it is possible to detect which of the data packet 50 held in the FIFO memory 40A and the data packet 50 held in the FIFO memory 40B has an error and to identify the failed system.

例えば、I/Oサブシステム13Aから送信されたデータパケット50の誤りが検出されたとする。この場合には、システム1Aが停止され、この後は、システム1Bだけで処理が続行されるようになる。逆に、I/Oサブシステム13Bから送信されたデータパケットの誤りが検出された場合には、システム1Bが停止され、この後は、システム1Aだけで処理が続行されるようになる。そして、故障が検出された方のシステムについては、保守や修理が行われる。なお、I/Oサブシステム13A、13Bのいずれかの故障が検出された場合には、そのI/Oサブシステムのみを停止し、そのI/Oサブシステムと同じシステム内のCPUサブシステムは、他のシステムのI/Oサブシステムと連携して、処理を続行するようにしてもよい。   For example, assume that an error is detected in the data packet 50 transmitted from the I / O subsystem 13A. In this case, the system 1A is stopped, and thereafter, the processing is continued only by the system 1B. Conversely, when an error in the data packet transmitted from the I / O subsystem 13B is detected, the system 1B is stopped, and thereafter, the processing is continued only by the system 1A. Then, maintenance or repair is performed on the system in which the failure is detected. If any failure of the I / O subsystem 13A, 13B is detected, only the I / O subsystem is stopped, and the CPU subsystem in the same system as the I / O subsystem is Processing may be continued in cooperation with an I / O subsystem of another system.

≪第5の実施形態≫
次に、本発明の第5の実施形態について図13〜図15を参照して詳細に説明する。図13には、本実施形態に係るデータ処理装置100の構成が示されている。本実施形態に係るデータ処理装置100は、受信部33A、33Bの代わりに、受信部33A’、33B’を備えている点が上記第4の実施形態に係るデータ処理装置100の構成と異なっており、送信部22A、22Bの動作が、上記第4の実施形態と異なっている。その他の部分については、上記第4の実施形態と同様であるので、詳細な説明を省略する。
<< Fifth Embodiment >>
Next, a fifth embodiment of the present invention will be described in detail with reference to FIGS. FIG. 13 shows the configuration of the data processing apparatus 100 according to the present embodiment. The data processing apparatus 100 according to the present embodiment is different from the configuration of the data processing apparatus 100 according to the fourth embodiment in that reception units 33A ′ and 33B ′ are provided instead of the reception units 33A and 33B. Thus, the operations of the transmission units 22A and 22B are different from those of the fourth embodiment. Since other parts are the same as those in the fourth embodiment, detailed description thereof is omitted.

図13に示されるように、受信部33A’は、時刻カウンタ21A、PLL制御部25Aに接続され、受信部33B’は、時刻カウンタ21B、PLL制御部25Bに接続されている。受信部33A’、33B’は、パケット処理部24A、24Bと同様に、PLL制御部25A、25Bを制御可能である点と、時刻カウンタ21A、21Bにリセット信号を出力している点が、受信部33A、33Bと異なっている。   As shown in FIG. 13, the receiving unit 33A 'is connected to the time counter 21A and the PLL control unit 25A, and the receiving unit 33B' is connected to the time counter 21B and the PLL control unit 25B. The reception units 33A ′ and 33B ′ receive the points that the PLL control units 25A and 25B can be controlled and the reset signals are output to the time counters 21A and 21B in the same manner as the packet processing units 24A and 24B. It is different from the parts 33A and 33B.

図14には、送信部22Aの動作のフローチャートが示されている。図14に示されるように、送信部22Aの動作は、ステップ205の代わりに、ステップ205’を実行する点が、送信部32Aの動作と異なっている。ステップ205’では、送信部22Aは、データパケット50の送信時刻フィールド54に現在の時刻カウンタ21Aのカウント値を格納して、データパケット50を受信部33A’、33B’に送信する。すなわち、送信部22Aにおいては、実行時刻フィールド55には、カウント値を格納せずに、データパケット50を送信している。   FIG. 14 shows a flowchart of the operation of the transmission unit 22A. As shown in FIG. 14, the operation of the transmission unit 22A is different from the operation of the transmission unit 32A in that step 205 'is executed instead of step 205. In step 205 ', the transmission unit 22A stores the count value of the current time counter 21A in the transmission time field 54 of the data packet 50, and transmits the data packet 50 to the reception units 33A' and 33B '. That is, in the transmission unit 22A, the execution time field 55 transmits the data packet 50 without storing the count value.

図15には、受信部33A’の動作のフローチャートが示されている。図15に示されるように、受信部33A’の動作は、ステップ501〜ステップ509、ステップ513、515、ステップ517、519の処理は、図12の受信部23Aの動作、すなわち、ステップ301〜ステップ309、ステップ313、315、ステップ317、319の処理と同じである。また、ステップ511では、受信部33A’は、I/Oデバイス30Aに、データパケット50を出力している。   FIG. 15 shows a flowchart of the operation of the receiving unit 33A ′. As shown in FIG. 15, the operation of the reception unit 33A ′ is the same as the processing of Step 501 to Step 509, Steps 513 and 515, Steps 517 and 519, and the operation of the reception unit 23A of FIG. 309, steps 313 and 315, and steps 317 and 319 are the same. In step 511, the receiving unit 33A 'outputs the data packet 50 to the I / O device 30A.

ステップ511実行後、受信部33A’は、上記ステップ509で算出されたカウントずれの絶対値が閾値以上であるか否かを判定し、この判定が肯定された場合にのみ、ステップ523にて、カウントずれをPLL制御部25Aに出力する。これにより、CPUサブシステム12Aに入力されるクロック信号の周波数が調整される。なお、ステップ513における閾値は、同期エラーの判定に用いられる閾値であるため、ステップ521における閾値よりも大きい値が設定される。   After execution of step 511, the receiving unit 33A ′ determines whether or not the absolute value of the count deviation calculated in step 509 is equal to or greater than a threshold value, and only when this determination is affirmed, in step 523, The count deviation is output to the PLL control unit 25A. As a result, the frequency of the clock signal input to the CPU subsystem 12A is adjusted. Note that since the threshold value in step 513 is a threshold value used for determination of synchronization error, a value larger than the threshold value in step 521 is set.

なお、受信部33A’では、ステップ513、515の処理と、ステップ517、519の処理については、必ずしも行う必要はない。また、本実施形態に係るデータ処理装置100では、受信部23A’、受信部23B’の代わりに、上記第1、第2の実施形態と同様に、受信部23A、受信部23Bを備えるようにしてもよい。   Note that the reception unit 33A 'does not necessarily need to perform the processing in steps 513 and 515 and the processing in steps 517 and 519. Further, in the data processing device 100 according to the present embodiment, instead of the reception unit 23A ′ and the reception unit 23B ′, the reception unit 23A and the reception unit 23B are provided in the same manner as in the first and second embodiments. May be.

また、図15のステップ513、515と、ステップ517、519は、順番が逆であってもよい。   Further, the order of steps 513 and 515 and steps 517 and 519 in FIG. 15 may be reversed.

これまでの説明から明らかなように、上記各実施形態では、図4のステップ203、205が第1の工程に対応し、図5のステップ303が第2の工程に対応し、ステップ305、309が第3の工程に対応し、図6のステップ409、411が第4の工程に対応し、ステップ405、409が第5の工程に対応する。また、図8のステップ413が第6の工程に対応し、ステップ415、417が第7の工程に対応する。また、図14のステップ205’が第8の工程に対応し、図15のステップ503が第9の工程に対応し、ステップ505、509が第10の工程に対応し、ステップ521、523が第11の工程に対応する。   As is clear from the above description, in each of the above embodiments, steps 203 and 205 in FIG. 4 correspond to the first step, step 303 in FIG. 5 corresponds to the second step, and steps 305 and 309. Corresponds to the third process, steps 409 and 411 in FIG. 6 correspond to the fourth process, and steps 405 and 409 correspond to the fifth process. Further, step 413 in FIG. 8 corresponds to the sixth process, and steps 415 and 417 correspond to the seventh process. 14 corresponds to the eighth process, step 503 in FIG. 15 corresponds to the ninth process, steps 505 and 509 correspond to the tenth process, and steps 521 and 523 correspond to the eighth process. This corresponds to 11 steps.

以上詳細に説明したように、上記各実施形態によれば、CPU部20A、20Bと、I/Oデバイス30A、30Bとの間で送受信されるデータパケット50の受信タイミングの違いで、時刻カウンタ21Aと時刻カウンタ21Bとのカウントずれを検出し、そのカウントずれに基づいて、それぞれのシステム1A、1Bのクロック信号の周波数を調整する。これにより、CPU部20A、30Aにおける実時間における実行時刻の相対的な時間差を一定範囲内に保つことができる。この結果、両システム1A、1Bの同期が維持されるようになる。   As described above in detail, according to each of the above embodiments, the time counter 21A is caused by the difference in the reception timing of the data packet 50 transmitted and received between the CPU units 20A and 20B and the I / O devices 30A and 30B. And the time counter 21B are detected, and the frequency of the clock signal of each of the systems 1A and 1B is adjusted based on the count difference. Thereby, the relative time difference of the execution time in the real time in the CPU units 20A and 30A can be kept within a certain range. As a result, the synchronization of both systems 1A and 1B is maintained.

上記各実施形態によれば、クロック信号の周波数を調整するので、実行速度の遅いCPUサブシステムにすべてのCPUサブシステムの実行タイミングを合わせる必要がなくなる。このため、装置全体の処理速度が低下することはない。逆に、上記第2の実施形態に係るデータ処理装置のように、CPU部20A、20Bの実行時刻を最適化することができるようになるので、装置全体の処理能力が向上する。   According to each of the above embodiments, since the frequency of the clock signal is adjusted, it is not necessary to match the execution timings of all the CPU subsystems with the CPU subsystem having a low execution speed. For this reason, the processing speed of the entire apparatus does not decrease. On the contrary, since the execution times of the CPU units 20A and 20B can be optimized as in the data processing apparatus according to the second embodiment, the processing capability of the entire apparatus is improved.

また、上記各実施形態によれば、各システムの故障を検出するために必須のクロスリンク2を介して送受信されるデータを用いて、ロックステップ同期を実現する。すなわち、上記各実施形態によれば、また、クロック信号のずれを検出するのに、各CPUサブシステムに入力されるクロック信号を比較するための専用のハードウエアを必要としないので、各モジュールのハードウエアの独立性が担保される。   Moreover, according to each said embodiment, lockstep synchronization is implement | achieved using the data transmitted / received via the cross link 2 essential in order to detect the failure of each system. That is, according to each of the above-described embodiments, since dedicated clock for comparing clock signals input to the CPU subsystems is not required to detect a clock signal shift, Hardware independence is guaranteed.

また、上記各実施形態によれば、クロック信号の周波数を調整しているので、タイマ割り込みなどをかけて各CPUサブシステム12A、12Bに入力されるクロック信号を定期的にリセットする必要がなくなる。このため、複数のクロック源の出力周波数のばらつきが大きい場合でも、各CPUサブシステム12A、12Bに入力されるクロック信号の周波数は速やかに調整され、ロックステップ同期を維持することができるようになる。   Further, according to each of the above embodiments, since the frequency of the clock signal is adjusted, it is not necessary to periodically reset the clock signal input to each of the CPU subsystems 12A and 12B by giving a timer interrupt or the like. For this reason, even when the variation in the output frequency of the plurality of clock sources is large, the frequency of the clock signal input to each of the CPU subsystems 12A and 12B is quickly adjusted, and lock step synchronization can be maintained. .

すなわち、上記各実施形態に係るデータ処理装置によれば、クロスリンク2を介してシステム間を双方向に送受信されるデータパケット50を用いて、デターミニズムに基づくシステム1A、1B間の緩やかな同期を実現しつつ、そのデータパケット50の受信タイミングを計測して、各システム1A、1Bに入力されるクロック信号の周波数を調整しているので、両システム1A、1Bを、実時間においても、同期させることができるようになっている。この結果、装置の耐故障性が向上し、その信頼性は極めて高いものとなっている。   That is, according to the data processing apparatus according to each of the above-described embodiments, using the data packet 50 that is bidirectionally transmitted / received between the systems via the cross link 2, the synchronization between the systems 1A and 1B based on determinism is achieved. While realizing, the reception timing of the data packet 50 is measured and the frequency of the clock signal input to each system 1A, 1B is adjusted, so both systems 1A, 1B are synchronized even in real time. Be able to. As a result, the fault tolerance of the apparatus is improved, and its reliability is extremely high.

また、上記各実施形態によれば、例えば、受信部23A等でのシステム1A内のデータパケット50の受信時刻と他のシステム1Bからのデータパケット50の受信時刻との時間差が大きくなりすぎて、受信されたデータパケット50が保持されるFIFOメモリ40A等がオーバーフローしてしまうのを防止することも可能となる。   Further, according to each of the above embodiments, for example, the time difference between the reception time of the data packet 50 in the system 1A and the reception time of the data packet 50 from the other system 1B at the reception unit 23A or the like becomes too large. It is also possible to prevent the FIFO memory 40A or the like in which the received data packet 50 is held from overflowing.

また、上記第2の実施形態によれば、CPU部20A、20Bの実行時刻のマージンを算出し、そのマージンが大きい場合には、そのマージンに基づいて、クロック信号の周波数を調整する。これにより、CPU部20A、20Bの実行時刻をできるだけ早くすることができるようになる。この結果、データ処理装置全体の処理速度を向上させることができる。   Also, according to the second embodiment, the execution time margin of the CPU units 20A and 20B is calculated, and when the margin is large, the frequency of the clock signal is adjusted based on the margin. As a result, the execution times of the CPU units 20A and 20B can be made as early as possible. As a result, the processing speed of the entire data processing apparatus can be improved.

また、上記各実施形態によれば、クロスリンク2のレイテンシを考慮して、CPU20A、20Bの実行予定時刻を設定している。これにより、システム1A、1B間の同期が保たれていることを確認した後に、CPU20A、20Bの処理を実行させることができるようになる。この結果、CPU20A、20Bを、より確実に同期させることができるようになる。   Further, according to the above embodiments, the scheduled execution times of the CPUs 20A and 20B are set in consideration of the latency of the cross link 2. Thereby, after confirming that the synchronization between the systems 1A and 1B is maintained, the processing of the CPUs 20A and 20B can be executed. As a result, the CPUs 20A and 20B can be more reliably synchronized.

また、上記各実施形態によれば、クロスリンク2のレイテンシを考慮して、時刻カウンタ21A、21Bのカウントずれを検出するので、そのカウントずれを正確に検出することができるようになる。この結果、CPU20A、20Bを、より確実に同期させることができるようになる。   Further, according to each of the above embodiments, the count deviation of the time counters 21A and 21B is detected in consideration of the latency of the cross link 2, so that the count deviation can be accurately detected. As a result, the CPUs 20A and 20B can be more reliably synchronized.

また、上記第3の実施形態によれば、時刻カウンタ21A、21Bのカウントずれが、所定レベルを超えた場合には、時刻カウンタ21A、21Bをリセットする。これにより、システム1A、1Bを速やかに同期状態にリカバリさせることができるようになる。この結果、CPU20A、20Bを、より確実に同期させることができるようになる。   Further, according to the third embodiment, when the time difference between the time counters 21A and 21B exceeds a predetermined level, the time counters 21A and 21B are reset. As a result, the systems 1A and 1B can be quickly recovered to the synchronized state. As a result, the CPUs 20A and 20B can be more reliably synchronized.

また、上記第4の実施形態によれば、両システム1A、1Bのデータパケット50を比較して、各システムに発生した障害を検出するので、障害が発生したシステムを除外し、残りのシステムだけで処理を続行することができるようになる。この結果、装置全体の信頼性が向上する。   Further, according to the fourth embodiment, the data packets 50 of both systems 1A and 1B are compared to detect a failure that has occurred in each system, so that the system in which the failure has occurred is excluded and only the remaining systems are excluded. You will be able to continue processing. As a result, the reliability of the entire apparatus is improved.

また、上記第1〜第4の実施形態によれば、I/Oデバイス30A、30Bに入力されたデータを用いて、システム1A、1Bを同期させたが、上記第5の実施形態のように、CPU20A、30Bから出力されたデータも用いて、システム1A、1Bを同期させるようにすれば、両システム1A、1Bは、より正確に同期するようになり、装置の信頼性がさらに向上する。   Further, according to the first to fourth embodiments, the systems 1A and 1B are synchronized using data input to the I / O devices 30A and 30B. However, as in the fifth embodiment. If the systems 1A and 1B are synchronized using the data output from the CPUs 20A and 30B, the systems 1A and 1B can be synchronized more accurately, and the reliability of the apparatus is further improved.

なお、上記各実施形態では、CPUサブシステム12A、12Bの受信部23A、23Bとパケット処理部24A、24Bとは、統合されていてもよい。逆に、I/Oサブシステム13A、13Bの受信部33A、33Bは、CPUサブシステム12A、13Bと同様に、その機能が受信部とパケット処理部とに別れていても良い。   In each of the above embodiments, the receiving units 23A and 23B and the packet processing units 24A and 24B of the CPU subsystems 12A and 12B may be integrated. On the contrary, the receiving units 33A and 33B of the I / O subsystems 13A and 13B may be divided into a receiving unit and a packet processing unit in the same manner as the CPU subsystems 12A and 13B.

なお、上記各実施形態に係るデータ処理装置100では、システムが二重化された装置であったが、システムを三重化以上、すなわち多重化する場合にも、本発明を適用することができるのは勿論である。   In the data processing device 100 according to each of the embodiments described above, the system is a duplexed device. However, the present invention can be applied to a case where the system is more than tripled, that is, multiplexed. It is.

本発明の第1の実施形態に係るデータ処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the data processor which concerns on the 1st Embodiment of this invention. データパケットのデータ構造を示す図である。It is a figure which shows the data structure of a data packet. 図1の受信部の構成を示すブロック図である。It is a block diagram which shows the structure of the receiving part of FIG. 図1の送信部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the transmission part of FIG. 図1の受信部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the receiving part of FIG. 図1のパケット処理部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the packet process part of FIG. 図7(A)〜図7(C)は、データの送受信に関するタイミングを示すタイミングチャートである。FIG. 7A to FIG. 7C are timing charts showing timings related to data transmission / reception. 本発明の第2の実施形態に係るパケット処理部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the packet processing part which concerns on the 2nd Embodiment of this invention. データの送受信に関するタイミングのタイミングチャートである。It is a timing chart of the timing regarding transmission and reception of data. 本発明の第3の実施形態に係るデータ処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the data processor which concerns on the 3rd Embodiment of this invention. 図10の受信部の動作を示すフローチャートである。FIG. 11 is a flowchart showing an operation of the receiving unit in FIG. 10. FIG. 本発明の第4の実施形態に係る受信部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the receiving part which concerns on the 4th Embodiment of this invention. 本発明の第5の実施形態に係るデータ処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the data processor which concerns on the 5th Embodiment of this invention. 図13の送信部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the transmission part of FIG. 図13の受信部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the receiving part of FIG.

符号の説明Explanation of symbols

1A、1B システム
2 クロスリンク
10A、10B クロック源
11A、11B PLL
12A、12B CPUサブシステム
13A、13B I/Oサブシステム
20A、20B CPU部
21A、21B 時刻カウンタ
22A、22B 送信部
23A、23B、23A’、23B’ 受信部
24A、24B パケット処理部
25A、25B PLL制御部
30A、30B I/Oデバイス
32A、32B 送信部
33A、33B、33A’、33B’ 受信部
40A、40B、41A、41B FIFOメモリ
50 データパケット
51 パケット種別フィールド
52 パケット長フィールド
53 データフィールド
54 送信時刻フィールド
55 実行時刻フィールド
100 データ処理装置
1A, 1B system 2 Crosslink 10A, 10B Clock source 11A, 11B PLL
12A, 12B CPU subsystem 13A, 13B I / O subsystem 20A, 20B CPU unit 21A, 21B Time counter 22A, 22B Transmitter unit 23A, 23B, 23A ′, 23B ′ Receiver unit 24A, 24B Packet processing unit 25A, 25B PLL Control unit 30A, 30B I / O device 32A, 32B Transmitter 33A, 33B, 33A ', 33B' Receiver 40A, 40B, 41A, 41B FIFO memory 50 Data packet 51 Packet type field 52 Packet length field 53 Data field 54 Transmission Time field 55 Execution time field 100 Data processing device

Claims (13)

各々がプロセッサと入出力部とを有する少なくとも2つのシステムを備えるデータ処理装置であって、
各前記システムは、
クロック信号を出力するクロック源と、
前記クロック源から出力されたクロック信号の周波数を調整して前記プロセッサに入力する調整部と、
前記調整部から出力されるクロック信号に基づいて計時を行う時刻カウンタと、
前記入出力部から入力されたデータを前記プロセッサに送信する際に、送信時の前記時刻カウンタの第1のカウント値と、前記プロセッサにより当該データが処理される実行予定時刻に相当する第2のカウント値とを前記データに付加して送信し、前記第1、第2のカウント値が付加されたデータを、他のシステムにも送信する第1の送信部と、
前記第1の送信部から送信されたデータを受信するととともに、受信時の前記時刻カウンタの第3のカウント値を取得し、前記他のシステムの前記第1の送信部から送信されたデータを受信するとともに、受信時の前記時刻カウンタの第4のカウント値を取得する第1の受信部と、
付加された前記第1のカウント値が同一であるデータ同士の前記第3、第4のカウント値に基づいて、前記時刻カウンタのカウント値と前記他のシステムの前記時刻カウンタのカウント値とのカウントずれを算出する算出部と、
前記算出部で算出されたカウントずれが小さくなるように、前記調整部を制御する制御部と、
前記時刻カウンタのカウント値が第2のカウント値となるまで、前記プロセッサに対する、前記第1の受信部で受信されたデータの入力を保留する保留部と、
前記プロセッサから入力されたデータを前記入出力部に送信する第2の送信部と、
前記第2の送信部から送信されたデータを受信して前記入出力部に出力する第2の受信部と、を備えるデータ処理装置。
A data processing apparatus comprising at least two systems each having a processor and an input / output unit,
Each said system
A clock source for outputting a clock signal;
An adjusting unit that adjusts the frequency of the clock signal output from the clock source and inputs the frequency to the processor;
A time counter for measuring time based on the clock signal output from the adjustment unit;
When transmitting data input from the input / output unit to the processor, a first count value of the time counter at the time of transmission and a second execution time corresponding to the scheduled execution time at which the data is processed by the processor A first transmission unit that adds a count value to the data and transmits the data, and transmits the data to which the first and second count values are added to another system;
Receives data transmitted from the first transmitter, obtains a third count value of the time counter at the time of reception, and receives data transmitted from the first transmitter of the other system And a first receiving unit for obtaining a fourth count value of the time counter at the time of reception;
Based on the third and fourth count values of the added data having the same first count value, the count value of the time counter and the count value of the time counter of the other system are counted. A calculation unit for calculating the deviation;
A control unit that controls the adjustment unit such that the count deviation calculated by the calculation unit is reduced;
A holding unit for holding input of data received by the first receiving unit to the processor until a count value of the time counter becomes a second count value;
A second transmission unit that transmits data input from the processor to the input / output unit;
A data processing apparatus comprising: a second reception unit that receives data transmitted from the second transmission unit and outputs the data to the input / output unit.
前記保留部は、
前記データに付加された第2のカウント値と、前記時刻カウンタのカウント値との差分を算出し、
前記制御部は、
前記保留部で算出された差分が小さくなるように、前記調整部を制御することを特徴とする請求項1に記載のデータ処理装置。
The holding section is
Calculating the difference between the second count value added to the data and the count value of the time counter;
The controller is
The data processing apparatus according to claim 1, wherein the adjustment unit is controlled so that a difference calculated by the holding unit is small.
前記第1の送信部は、
前記システム間でのデータの送受信に要する時間と、前記システム間でのプロセッサの処理の時間差の許容値とに基づいて、前記第2のカウント値を付加することを特徴とする請求項1又は2に記載のデータ処理装置。
The first transmitter is
3. The second count value is added based on a time required for data transmission / reception between the systems and an allowable value of a time difference in processor processing between the systems. The data processing apparatus described in 1.
前記算出部は、
前記システム間でのデータの送受信に要する時間を考慮して、前記カウントずれを算出することを特徴とする請求項1乃至3のいずれか一項に記載のデータ処理装置。
The calculation unit includes:
4. The data processing apparatus according to claim 1, wherein the count deviation is calculated in consideration of a time required for data transmission / reception between the systems. 5.
前記算出部によって算出された前記カウントずれが所定値を超える場合には、前記時刻カウンタをリセットするリセット部をさらに備えることを特徴とする請求項1乃至4のいずれか一項に記載のデータ処理装置。   5. The data processing according to claim 1, further comprising: a reset unit that resets the time counter when the count deviation calculated by the calculation unit exceeds a predetermined value. 6. apparatus. 付加された前記第1のカウント値が同一であるデータ同士を比較することにより、障害の発生を検出する障害検出部をさらに備えることを特徴とする請求項1乃至5のいずれか一項に記載のデータ処理装置。   6. The apparatus according to claim 1, further comprising a failure detection unit that detects occurrence of a failure by comparing the added data having the same first count value. Data processing equipment. 前記第2の送信部は、
前記プロセッサから入力されたデータを前記入出力部に送信する際に、送信時の前記時刻カウンタの第5のカウント値を付加して送信し、前記第5のカウント値が付加されたデータを、前記他のシステムにも送信し、
前記第2の受信部は、
前記第2の送信部から送信されたデータを受信するととともに、受信時の前記時刻カウンタの第6のカウント値を取得し、前記他のシステムの前記第2の送信部から送信されたデータを受信するとともに、受信時の前記時刻カウンタの第7のカウント値を取得し、
前記算出部は、
付加された前記第5のカウント値が同一であるデータ同士の前記第6、第7のカウント値に基づいて、前記時刻カウンタのカウント値と前記他のシステムの前記時刻カウンタのカウント値とのカウントずれを算出し、
前記制御部は、
前記算出部で算出された前記カウントずれが小さくなるように、前記調整部を制御することを特徴とする請求項1に記載のデータ処理装置。
The second transmitter is
When transmitting the data input from the processor to the input / output unit, the fifth count value of the time counter at the time of transmission is added and transmitted, and the data to which the fifth count value is added, Send it to the other system,
The second receiver is
Receives data transmitted from the second transmitter, obtains a sixth count value of the time counter at the time of reception, and receives data transmitted from the second transmitter of the other system And obtaining a seventh count value of the time counter at the time of reception,
The calculation unit includes:
Based on the sixth and seventh count values of the added data having the same fifth count value, the count value of the time counter and the count value of the time counter of the other system are counted. Calculate the deviation,
The controller is
The data processing apparatus according to claim 1, wherein the adjustment unit is controlled such that the count deviation calculated by the calculation unit is reduced.
前記算出部は、
前記システム間でのデータの送受信に要する時間を考慮して、前記カウントずれを算出することを特徴とする請求項7に記載のデータ処理装置。
The calculation unit includes:
The data processing apparatus according to claim 7, wherein the count deviation is calculated in consideration of a time required for data transmission / reception between the systems.
前記算出部によって算出された前記カウントずれが所定値を超える場合には、前記時刻カウンタをリセットするリセット部をさらに備えることを特徴とする請求項7又は8に記載のデータ処理装置。   The data processing apparatus according to claim 7, further comprising a reset unit that resets the time counter when the count deviation calculated by the calculation unit exceeds a predetermined value. 付加された前記第5のカウント値が同一であるデータ同士を比較することにより、障害の発生を検出する障害検出部をさらに備えることを特徴とする請求項7乃至9のいずれか一項に記載のデータ処理装置。   10. The apparatus according to claim 7, further comprising a failure detection unit that detects the occurrence of a failure by comparing the added data having the same fifth count value. 10. Data processing equipment. 各々がプロセッサと入出力部と時刻カウンタとを有し、異なるクロック源からのクロック信号で動作する少なくとも2つのシステムの同期をとる同期方法であって、
前記入出力部から入力されたデータを前記プロセッサに送信する際に、送信時の前記時刻カウンタの第1のカウント値と、前記プロセッサにより当該データが処理される実行予定時刻に相当する第2のカウント値とを前記データに付加して送信し、前記第1、第2のカウント値が付加されたデータを、他のシステムにも送信する第1の工程と、
前記第1の工程で送信されたデータを受信するととともに、受信時の前記時刻カウンタの第3のカウント値を取得し、前記他のシステムから送信されたデータを受信するとともに、受信時の前記時刻カウンタの第4のカウント値を取得する第2の工程と、
付加された前記第1のカウント値が同一であるデータ同士の前記第3、第4のカウント値に基づいて、前記時刻カウンタのカウント値と前記他のシステムの前記時刻カウンタのカウント値とのカウントずれを算出する第3の工程と、
前記第3の工程で算出されたカウントずれが小さくなるように、前記クロック信号の周波数を調整する第4の工程と、
前記時刻カウンタのカウント値が前記第2のカウント値となるまで、前記プロセッサに対する、前記第2の工程で受信されたデータの入力を保留する第5の工程と、を含む同期方法。
A synchronization method for synchronizing at least two systems, each having a processor, an input / output unit, and a time counter, and operating with clock signals from different clock sources,
When transmitting data input from the input / output unit to the processor, a first count value of the time counter at the time of transmission and a second execution time corresponding to the scheduled execution time at which the data is processed by the processor A first step of adding a count value to the data and transmitting the data, and transmitting the data with the first and second count values added to another system;
The data transmitted in the first step is received, the third count value of the time counter at the time of reception is acquired, the data transmitted from the other system is received, and the time at the time of reception is received. A second step of obtaining a fourth count value of the counter;
Based on the third and fourth count values of the added data having the same first count value, the count value of the time counter and the count value of the time counter of the other system are counted. A third step of calculating the deviation;
A fourth step of adjusting the frequency of the clock signal so that the count deviation calculated in the third step is reduced;
A fifth step of suspending input of the data received in the second step to the processor until the count value of the time counter reaches the second count value.
前記データに付加された第2のカウント値と、前記時刻カウンタのカウント値との差分を算出する第6の工程と、
前記第6の工程で算出された差分が小さくなるように、前記クロック信号の周波数を調整する第7の工程と、をさらに含むことを特徴とする請求項11に記載の同期方法。
A sixth step of calculating a difference between the second count value added to the data and the count value of the time counter;
The synchronization method according to claim 11, further comprising a seventh step of adjusting a frequency of the clock signal so that the difference calculated in the sixth step becomes small.
前記プロセッサから入力されたデータを前記入出力部に送信する際に、送信時の前記時刻カウンタの第5のカウント値を付加して送信し、前記第5のカウント値が付加されたデータを、前記他のシステムにも送信する第8の工程と、
前記第8の工程で送信されたデータを受信するととともに、受信時の前記時刻カウンタの第6のカウント値を取得し、前記他のシステムから送信されたデータを受信するとともに、受信時の前記時刻カウンタの第7のカウント値を取得する第9の工程と、
付加された前記第5のカウント値が同一であるデータ同士の前記第6、第7のカウント値に基づいて、前記時刻カウンタのカウント値と前記他のシステムの前記時刻カウンタのカウント値とのカウントずれを算出する第10の工程と、
前記第10の工程で算出された前記カウントずれが小さくなるように、前記クロック信号の周波数を調整する第11の工程と、をさらに含むことを特徴とする請求項11又は12に記載の同期方法。
When transmitting the data input from the processor to the input / output unit, the fifth count value of the time counter at the time of transmission is added and transmitted, and the data to which the fifth count value is added, An eighth step of transmitting to the other system;
The data transmitted in the eighth step is received, the sixth count value of the time counter at the time of reception is obtained, the data transmitted from the other system is received, and the time at the time of reception is received. A ninth step of obtaining a seventh count value of the counter;
Based on the sixth and seventh count values of the added data having the same fifth count value, the count value of the time counter and the count value of the time counter of the other system are counted. A tenth step of calculating the deviation;
The synchronization method according to claim 11, further comprising an eleventh step of adjusting a frequency of the clock signal so that the count deviation calculated in the tenth step is reduced. .
JP2008097889A 2008-04-04 2008-04-04 Data processing apparatus and synchronization method Expired - Fee Related JP5380884B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008097889A JP5380884B2 (en) 2008-04-04 2008-04-04 Data processing apparatus and synchronization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008097889A JP5380884B2 (en) 2008-04-04 2008-04-04 Data processing apparatus and synchronization method

Publications (2)

Publication Number Publication Date
JP2009251854A JP2009251854A (en) 2009-10-29
JP5380884B2 true JP5380884B2 (en) 2014-01-08

Family

ID=41312517

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008097889A Expired - Fee Related JP5380884B2 (en) 2008-04-04 2008-04-04 Data processing apparatus and synchronization method

Country Status (1)

Country Link
JP (1) JP5380884B2 (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3123844B2 (en) * 1992-12-18 2001-01-15 日本電気通信システム株式会社 Redundant device
JPH0773059A (en) * 1993-03-02 1995-03-17 Tandem Comput Inc Fault-tolerant computer system
JPH1027110A (en) * 1996-07-09 1998-01-27 Toshiba Corp Computer system of plural computers
EP1398700A1 (en) * 2002-09-12 2004-03-17 Siemens Aktiengesellschaft Method and circuit device for synchronizing redundant processing units
JP4062251B2 (en) * 2003-12-24 2008-03-19 日本電気株式会社 Multiplexing system and processor module
JP4182486B2 (en) * 2004-12-20 2008-11-19 日本電気株式会社 Fault tolerant computer reset method and system
JP4154610B2 (en) * 2004-12-21 2008-09-24 日本電気株式会社 Fault tolerant computer and control method thereof
JP4752552B2 (en) * 2006-03-15 2011-08-17 日本電気株式会社 Data processing apparatus and synchronization method thereof

Also Published As

Publication number Publication date
JP2009251854A (en) 2009-10-29

Similar Documents

Publication Publication Date Title
US8503484B2 (en) System and method for a cross channel data link
CN104516306B (en) The automated system of redundancy
US7383458B2 (en) Method and device for synchronizing the cycle time of a plurality of TTCAN buses based on determined global time deviations and corresponding bus system
EP3026515B1 (en) Programmable controller system
KR102162321B1 (en) Processor system and fault detection method thereof
JP2009534738A (en) Error filtering in fault-tolerant computing systems
US11599090B2 (en) System and method of network synchronized time in safety applications
WO2018104237A1 (en) Method, device, and computer program for improving synchronization of clocks in devices linked according to a daisy-chain topology
US10162314B2 (en) Two-way architecture
US9477559B2 (en) Control device, control method and recording medium storing program thereof
KR101560497B1 (en) Method for controlling reset of lockstep replicated processor cores and lockstep system using the same
JP2006209593A (en) Information processor and information processing method
JP5013309B2 (en) Fault tolerant computer and its transaction synchronous control method
US20230318728A1 (en) Diagnostic System and Method for Network Synchronized Time in Safety Applications
US8060769B2 (en) Duplexed field controller
JP4752552B2 (en) Data processing apparatus and synchronization method thereof
JP5380884B2 (en) Data processing apparatus and synchronization method
US7694176B2 (en) Fault-tolerant computer and method of controlling same
JP6722055B2 (en) Process synchronization control system and process synchronization control method
JP2017068353A (en) Numerical control system having synchronous control function between unit
JP5604799B2 (en) Fault tolerant computer
KR20140092132A (en) Method for monitoring os task of twin micom in rtos
KR20120102240A (en) Redundancy plc system and data synchronization method thereof
JP5892083B2 (en) Parameter setting device, parameter setting program and parameter setting method
JP2020123309A (en) Io module duplication control device and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110311

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130327

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130402

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130529

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130618

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130815

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130903

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130916

R150 Certificate of patent or registration of utility model

Ref document number: 5380884

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees