JP6516217B2 - Synchronization message transmitter, time synchronization system, synchronization message transmission method and program - Google Patents

Synchronization message transmitter, time synchronization system, synchronization message transmission method and program Download PDF

Info

Publication number
JP6516217B2
JP6516217B2 JP2015063045A JP2015063045A JP6516217B2 JP 6516217 B2 JP6516217 B2 JP 6516217B2 JP 2015063045 A JP2015063045 A JP 2015063045A JP 2015063045 A JP2015063045 A JP 2015063045A JP 6516217 B2 JP6516217 B2 JP 6516217B2
Authority
JP
Japan
Prior art keywords
message
synchronization
transmission
synchronization message
time
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.)
Active
Application number
JP2015063045A
Other languages
Japanese (ja)
Other versions
JP2016184811A (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.)
Seiko Solutions Inc.
Original Assignee
Seiko Solutions Inc.
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 Seiko Solutions Inc. filed Critical Seiko Solutions Inc.
Priority to JP2015063045A priority Critical patent/JP6516217B2/en
Priority to PCT/JP2016/052226 priority patent/WO2016152237A1/en
Publication of JP2016184811A publication Critical patent/JP2016184811A/en
Application granted granted Critical
Publication of JP6516217B2 publication Critical patent/JP6516217B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、同期メッセージ送出装置、時刻同期システム、同期メッセージ送出方法およびプログラムに関する。   The present invention relates to a synchronous message transmission device, a time synchronization system, a synchronous message transmission method, and a program.

Ethernet(登録商標)をはじめとする非同期ネットワークにおいて、時刻同期手段としてIEEE1588v2(プレシジョンタイムプロトコル(Precision Time Protocol)。以下、PTPと称する)が知られている。PTPでは、グランドマスタークロック(Grandmaster Clock;GMC)はGNSS(Global Navigation Satellite System(s)、全地球航法衛星システム)等から得た極めて精度の高い時刻情報を、PTPにて規定されているフォーマットの時刻同期パケットに打刻し、時刻同期対象装置であるスレーブに対し送信する。スレーブは、GMCからのパケットを受信し、PTPの規定にて決められた演算をすることで、GMCと同期した周波数、位相、及び、絶対時刻情報を得ることができる。   In an asynchronous network such as Ethernet (registered trademark), IEEE 1588 v2 (Precision Time Protocol, hereinafter referred to as PTP) is known as a time synchronization means. In PTP, Grandmaster Clock (GMC) has extremely accurate time information obtained from GNSS (Global Navigation Satellite System (s), Global Navigation Satellite System), etc. in a format specified by PTP. A time synchronization packet is stamped and transmitted to a slave that is a time synchronization target device. The slave can obtain the frequency, phase, and absolute time information synchronized with the GMC by receiving a packet from the GMC and performing an operation determined by the PTP.

PTPにてGMCとスレーブとの時刻同期を取る際、ネットワークにおける伝送時間の遅延及び揺らぎと、GMCにおける時刻同期パケットの送信間隔の揺らぎとが、時刻同期の精度を低下させる要因となる。
これらのうち、ネットワークにおける伝送時間の遅延及び揺らぎに関しては、IEEE1588v2にてトランスペアレントクロック(Transparent Clock、TC)やバウンダリークロック(Boundary Clock、BC)を用いた対応策が提案されている。
When time synchronization is performed between GMC and a slave by PTP, delay and fluctuation of transmission time in the network and fluctuation of transmission interval of time synchronization packet in GMC are factors that lower the accuracy of time synchronization.
Among these, regarding the delay and fluctuation of the transmission time in the network, a countermeasure using transparent clock (Transparent Clock (TC)) and boundary clock (Boundary Clock (BC)) has been proposed in IEEE 1588 v2.

また、時刻同期の精度の向上に関連して、特許文献1に記載の時刻同期システムは、時刻同期パケットの通信を行って時刻同期の処理を行う時刻同期処理部と時刻同期以外の処理を行うメイン処理部とを有し、時刻同期処理部とメイン処理部とに異なるIPアドレスを付与したマスタと、マスタのうちメイン処理部と通信を行うときにはメイン処理部のIPアドレスに通常パケットの通信を行い、時刻同期の通信を行うときには時刻同期処理部のIPアドレスに時刻同期パケットの通信を行う複数のスレーブと、マスタとスレーブとの間を接続し、IPアドレスごとに通信されるパケットを振り分け、IPアドレスごとに第1バッファ、第2バッファを設けた中継装置と、を備えている。
特許文献1では、かかる構成により、パケットが集中したときでも、ネットワーク遅延のバラツキを減少させることで、時刻同期精度を向上させる、とされている。
Further, in relation to the improvement of time synchronization accuracy, the time synchronization system described in Patent Document 1 performs processing other than time synchronization processing with a time synchronization processing unit that performs time synchronization processing by communicating time synchronization packets. A master that has a main processing unit and assigns different IP addresses to the time synchronization processing unit and the main processing unit, and when communicating with the main processing unit among the masters, communication of a normal packet to the IP address of the main processing unit When performing time synchronization communication, connect multiple slaves that communicate time synchronization packets to the IP address of the time synchronization processing unit, and the master and the slave, and distribute packets to be communicated for each IP address, The relay apparatus provided with the 1st buffer and the 2nd buffer for every IP address is provided.
According to Patent Document 1, with such a configuration, even when packets are concentrated, the time synchronization accuracy is improved by reducing variations in network delay.

特開2013−143748号公報JP, 2013-143748, A

GMCとスレーブとの時刻同期の精度を高めるためには、GMCにおける時刻同期パケットの送信間隔の揺らぎについても対応策が求められる。特に、時刻同期パケットの送信タイミングが到来したときにGMCが時刻同期パケット以外のパケットを送信中であった場合、送信中のパケットの送信完了を待って時刻同期パケットを送信することで時刻同期パケットの送信に遅延が生じ、また、時刻同期パケットの送信間隔に揺らぎが生じる。
かかる同期パケットの送信遅延及び送信間隔の揺らぎへの対策として、特許文献1に記載の技術を用いて、同期パケットと同期パケット以外のパケットとを別々のIPアドレスにて送信する方法が考えられる。しかしながら、この方法では、GMCに複数のIPアドレスを割り当てる必要があり、IPアドレスの管理が煩雑になる。
In order to improve the accuracy of time synchronization between GMC and slaves, measures are also required for fluctuations in the transmission interval of time synchronization packets in GMC. In particular, if the GMC is transmitting a packet other than the time synchronization packet when the transmission timing of the time synchronization packet arrives, the time synchronization packet is sent by waiting for the transmission completion of the packet being transmitted and transmitting the time synchronization packet. Transmission delays, and fluctuations occur in the transmission interval of time synchronization packets.
As a countermeasure against the transmission delay of the synchronization packet and the fluctuation of the transmission interval, a method of transmitting the synchronization packet and the packets other than the synchronization packet with different IP addresses can be considered using the technique described in Patent Document 1. However, in this method, it is necessary to assign a plurality of IP addresses to the GMC, and management of the IP addresses becomes complicated.

本発明は、時刻同期パケットの送信と時刻同期パケット以外のパケットの送信とで別々のIPアドレスを用いる必要無しに、GMC(グランドマスタークロック装置)における時刻同期パケットの送信間隔の揺らぎを低減させることができる同期メッセージ送出装置、時刻同期システム、同期メッセージ送出方法およびプログラムを提供する。   The present invention reduces fluctuations in the transmission interval of time synchronization packets in a GMC (grand master clock device) without the need to use separate IP addresses for transmission of time synchronization packets and transmission of packets other than time synchronization packets. The present invention provides a synchronous message transmission device, a time synchronization system, a synchronous message transmission method, and a program.

本発明の第1の態様によれば、同期メッセージ送出装置は、時刻情報を含む同期メッセージを送出する同期メッセージ送出装置であって、CPUによって実行され、前記同期メッセージの送出間隔の情報を取得するSync登録処理部と、前記CPUが用いるクロック信号よりも高精度なクロック信号を用いて動作し、前記同期メッセージ、及び、前記同期メッセージ以外のメッセージである一般メッセージを送出する送出部と、前記CPUが用いるクロック信号よりも高精度なクロック信号を用いて動作し、前記Sync登録処理部が取得した前記同期メッセージの送出間隔の情報に基づいて、前記同期メッセージの送出タイミングか否かを判定するスケジューラ部と、を備え、前記送出部は、前記スケジューラ部が同期メッセージの送出タイミングであると判定すると、新たな同期メッセージ及び一般メッセージの送出を抑制し、一般メッセージの送出に要する時間として規定されている規定時間が経過した後、前記同期メッセージを送出する。
前記同期メッセージを生成する同期メッセージ生成部と、前記同期メッセージ以外のメッセージである一般メッセージを生成する一般メッセージ生成部と、を備え、前記同期メッセージ生成部が、前記一般メッセージ生成部よりも下位層に設けられていてもよい。
According to a first aspect of the present invention, a synchronous message transmitting apparatus is a synchronous message transmitting apparatus that transmits a synchronous message including time information, which is executed by a CPU to obtain information on the synchronous message transmission interval. and sync registration processing unit, and the CPU operates with the high accuracy clock signal than the clock signal to be used, the synchronization message and sending unit for sending a general message is a message other than the synchronization message, the CPU A scheduler that operates using a clock signal that is more accurate than the clock signal used by the device, and determines whether it is the transmission timing of the synchronization message based on the information of the transmission interval of the synchronization message acquired by the Sync registration processing unit And the sending unit is configured to send the synchronization message by the scheduler unit. If it is determined that it is timing, the transmission of the new synchronization message and the general message is suppressed, and the synchronization message is transmitted after a specified time defined as the time required for the transmission of the general message has elapsed.
A synchronization message generation unit that generates the synchronization message, and a general message generation unit that generates a general message that is a message other than the synchronization message, the synchronization message generation unit being a layer lower than the general message generation unit May be provided.

同一の時刻同期対象機器に対する同期メッセージ送信間隔の最小値として規定されている間隔毎にカウントする第1カウンターと、前記同一の時刻同期対象機器に対する同期メッセージ送信間隔の最小値を時刻同期対象機器の数でさらに分割した間隔毎にカウントする第2カウンターとを備え、前記スケジューラ部は、前記時刻同期対象機器毎に設定された同期メッセージ送出タイミングの情報のうち、前記第2カウンターの値によって特定される時刻同期対象機器の同期メッセージ送出タイミングの情報と、前記第1カウンターの値との比較に基づいて、その時刻同期対象機器に対して同期メッセージを送出するタイミングか否かを判定し、前記送出部は、前記スケジューラ部が同期メッセージを送出するタイミングであると判定すると当該同期メッセージを送出する、ようにしてもよい。 The first counter that counts each interval defined as the minimum value of the synchronization message transmission interval for the same time synchronization target device, and the minimum value of the synchronization message transmission interval for the same time synchronization target device The scheduler unit is specified by the value of the second counter among the information of the synchronization message transmission timing set for each of the time synchronization target devices , and includes a second counter for counting at intervals divided by a number. It is determined whether it is the timing to send a synchronization message to the time synchronization target device based on comparison of the information of the synchronization message transmission timing of the time synchronization target device with the value of the first counter, and the transmission Section determines that it is the timing at which the scheduler section sends out a synchronization message. Sends a synchronization message, it may be.

前記規定時間は、一般メッセージの送出に要する最長時間であってもよい。   The specified time may be the maximum time required to send a general message.

本発明の第2の態様によれば、時刻同期システムは、同期メッセージ送出装置と、時刻同期対象装置とを備え、前記同期メッセージ送出装置は、時刻情報を含む同期メッセージを送出する同期メッセージ送出装置であって、CPUによって実行され、前記同期メッセージの送出間隔の情報を取得するSync登録処理部と、前記CPUが用いるクロック信号よりも高精度なクロック信号を用いて動作し、前記同期メッセージ、及び、前記同期メッセージ以外のメッセージである一般メッセージを送出する送出部と、前記CPUが用いるクロック信号よりも高精度なクロック信号を用いて動作し、前記Sync登録処理部が取得した前記同期メッセージの送出間隔の情報に基づいて、前記同期メッセージの送出タイミングか否かを判定するスケジューラ部と、を備え、前記送出部は、前記スケジューラ部が同期メッセージの送出タイミングであると判定すると、新たな同期メッセージ及び一般メッセージの送出を抑制し、前記一般メッセージの送出に要する時間として規定されている規定時間が経過した後、前記同期メッセージを送出し、前記時刻同期対象装置は、前記同期メッセージ送出装置が送出する前記同期メッセージに基づいて、当該同期メッセージ送出装置との時刻同期を行う。 According to a second aspect of the present invention, a time synchronization system includes a synchronization message transmission device and a time synchronization target device, and the synchronization message transmission device transmits a synchronization message including time information. A Sync registration processing unit that is executed by the CPU and acquires information on the transmission interval of the synchronization message, and operates using a clock signal that is more accurate than the clock signal used by the CPU, the synchronization message, and A sending unit that sends a general message that is a message other than the synchronization message, and a clock signal that is more accurate than a clock signal used by the CPU , and that sends the synchronization message acquired by the Sync registration processing unit It is determined whether or not it is the transmission timing of the synchronization message based on the information of the interval. And the sending unit suppresses sending of a new synchronization message and a general message when the scheduler unit determines that it is a sending timing of a synchronization message, and defines the time required for sending the general message. The synchronization message is sent out after the specified period of time has passed, and the time synchronization target device performs time synchronization with the synchronization message transmission device based on the synchronization message sent by the synchronization message transmission device. .

本発明の第3の態様によれば、同期メッセージ送出方法は、時刻情報を含む同期メッセージを送出する同期メッセージ送出装置の同期メッセージ送出方法であって、CPUによって実行され、前記同期メッセージの送出間隔の情報を取得するステップと、前記CPUが用いるクロック信号よりも高精度なクロック信号を用いて動作し、前記同期メッセージ、及び、前記同期メッセージ以外のメッセージである一般メッセージを送出する送出ステップと、前記CPUが用いるクロック信号よりも高精度なクロック信号を用いて動作し、前記同期メッセージの送出間隔の情報に基づいて、前記同期メッセージの送出タイミングか否かを判定する判定ステップと、を有し、前記送出ステップでは、前記判定ステップにて前記同期メッセージの送出タイミングであると判定すると、新たな同期メッセージ及び一般メッセージの送出を抑制し、前記一般メッセージの送出に要する時間として規定されている規定時間が経過した後、前記同期メッセージを送出する。 According to a third aspect of the present invention, a synchronization message transmission method is a synchronization message transmission method of a synchronization message transmission device for transmitting a synchronization message including time information, which is executed by a CPU, and the transmission interval of the synchronization message. Obtaining information , and sending out a synchronous message and a general message which is a message other than the synchronous message, operating using a clock signal that is more accurate than the clock signal used by the CPU . Operating using a clock signal that is more accurate than a clock signal used by the CPU, and determining whether it is a transmission timing of the synchronization message based on information of the transmission interval of the synchronization message. In the sending step, the sending step of the synchronization message in the determining step If it is determined that the timing is "imming", the transmission of the new synchronization message and the general message is suppressed, and the synchronization message is transmitted after a predetermined time defined as the time required for the transmission of the general message has elapsed.

本発明の第4の態様によれば、プログラムは、時刻情報を含む同期メッセージを送出する同期メッセージ送出装置を制御するコンピュータに、CPUによって実行され、前記同期メッセージの送出間隔の情報を取得するステップと、前記CPUが用いるクロック信号よりも高精度なクロック信号を用いて動作し、前記同期メッセージ、及び、前記同期メッセージ以外のメッセージである一般メッセージを送出する送出ステップと、前記CPUが用いるクロック信号よりも高精度なクロック信号を用いて動作し、前記同期メッセージの送出間隔の情報に基づいて、前記同期メッセージの送出タイミングか否かを判定する判定ステップと、を実行させ、前記送出ステップでは、前記判定ステップにて前記同期メッセージの送出タイミングであると判定すると、新たな同期メッセージ及び一般メッセージの送出を抑制し、一般メッセージの送出に要する時間として規定されている規定時間が経過した後、前記同期メッセージを送出させるためのプログラムである。 According to a fourth aspect of the present invention, the program is executed by a CPU in a computer that controls a synchronization message transmitting apparatus that transmits a synchronization message including time information, and acquires information on the transmission interval of the synchronization message. When, than the clock signal the CPU is used to operate with a high-precision clock signal, the synchronization message, and a sending step of sending the general message is a message other than the synchronization message, the clock signals the CPU is used Operating using a clock signal with a higher accuracy than that, and determining whether it is a transmission timing of the synchronization message based on the information of the transmission interval of the synchronization message, and If it is the transmission timing of the synchronization message in the determination step It is a program for suppressing transmission of a new synchronization message and a general message, and transmitting the synchronization message after a predetermined time defined as the time required for transmission of the general message has elapsed.

本発明によれば、時刻同期パケットの送信と時刻同期パケット以外のパケットの送信とで別々のIPアドレスを用いる必要無しに、GMCにおける時刻同期パケットの送信間隔の揺らぎを低減させることができる。   According to the present invention, it is possible to reduce the fluctuation of the transmission interval of the time synchronization packet in the GMC without having to use separate IP addresses for the transmission of the time synchronization packet and the transmission of packets other than the time synchronization packet.

本発明の一実施形態における時刻同期システムの装置構成を示す概略構成図である。It is a schematic block diagram which shows the apparatus structure of the time synchronization system in one Embodiment of this invention. IEEE1588v2時刻同期プロセスにおける階層構造を示す説明図である。It is explanatory drawing which shows the hierarchical structure in IEEE1588v2 time synchronization process. 従来のグランドマスタークロック装置の構成例を示す概略ブロック図である。It is a schematic block diagram which shows the example of a structure of the conventional grand master clock apparatus. 従来のグランドマスタークロック装置が送出する同期メッセージにおける遅延および揺らぎの例を示す説明図である。It is explanatory drawing which shows the example of the delay and fluctuation | variation in the synchronous message which the conventional grand master clock apparatus sends. 同実施形態の時刻同期プロセスにおける階層構造を示す説明図である。It is explanatory drawing which shows the hierarchical structure in the time synchronization process of the embodiment. 同実施形態におけるグランドマスタークロック装置の構成例を示す概略ブロック図である。It is a schematic block diagram which shows the structural example of the grand master clock apparatus in the embodiment. 同実施形態におけるグランドマスタークロック装置が送出する同期メッセージにおける遅延の例を示す説明図である。It is explanatory drawing which shows the example of the delay in the synchronous message which the grand master clock apparatus in the embodiment sends. IEEE1588v2の同期メッセージのフォーマットを示す説明図である。It is explanatory drawing which shows the format of the synchronous message of IEEE1588v2. 同実施形態におけるグローバルプロファイル記憶部が記憶するグローバルプロファイルのデータ構造の例を示す説明図である。It is explanatory drawing which shows the example of the data structure of the global profile which the global profile memory | storage part in the embodiment memorize | stores. 同実施形態におけるSMIDプロファイル記憶部が記憶するSMIDプロファイルのデータ構造の例を示す説明図である。It is explanatory drawing which shows the example of the data structure of the SMID profile which the SMID profile memory | storage part in the embodiment memorize | stores. 同実施形態におけるSMIDテーブル記憶部が記憶するSMIDテーブルのデータ構造の例を示す説明図である。It is explanatory drawing which shows the example of the data structure of the SMID table which the SMID table memory | storage part in the embodiment memorize | stores. 同実施形態におけるMAC部の機能構成を示す概略ブロック図である。It is a schematic block diagram which shows the function structure of the MAC part in the embodiment. 同実施形態における同期メッセージのデータ構造の例を示す説明図である。It is explanatory drawing which shows the example of the data structure of the synchronous message in the embodiment. 同実施形態で、複数のスレーブ装置が存在するネットワークにおける同期メッセージの送出間隔の例を示す説明図である。FIG. 8 is an explanatory view showing an example of a transmission interval of a synchronization message in a network in which a plurality of slave devices exist in the same embodiment. 同実施形態におけるSMIDテーブルのデータ構造の例を示す説明図である。It is explanatory drawing which shows the example of the data structure of the SMID table in the embodiment. 同実施形態におけるスケジューラの動作の例を示す説明図である。It is explanatory drawing which shows the example of operation | movement of the scheduler in the embodiment. 同実施形態における同期メッセージ送出時のデータの流れの例を示す説明図である。It is explanatory drawing which shows the example of the flow of data at the time of synchronous message transmission in the embodiment. 同実施形態において、強制廃棄方式の場合にSync送出部が行う動作の例を示す説明図である。FIG. 14 is an explanatory view showing an example of an operation performed by the Sync sending unit in the case of the forced discard method in the embodiment. 同実施形態において、高優先送出方式の場合にSync送出部が行う動作の例を示す説明図である。FIG. 14 is an explanatory view showing an example of an operation performed by the Sync sending unit in the case of the high priority sending method in the embodiment. 同実施形態において、送信時刻予約方式の場合にSync送出部が行う動作の例を示す説明図である。FIG. 14 is an explanatory diagram showing an example of an operation performed by the Sync sending unit in the case of the transmission time reservation method in the embodiment. 同実施形態において、送信時刻予約方式にて送信待ち受けがどの程度発生するかを示す説明図である。In the same embodiment, it is an explanatory view showing how much transmission standby occurs in the transmission time reservation method.

以下、本発明の実施形態を説明するが、以下の実施形態は特許請求の範囲にかかる発明を限定するものではない。また、実施形態の中で説明されている特徴の組み合わせの全てが発明の解決手段に必須であるとは限らない。
図1は、本発明の一実施形態における時刻同期システムの装置構成を示す概略構成図である。同図において、時刻同期システム1は、グランドマスタークロック(Grandmaster Clock)装置100と、アンテナ200と、トランスペアレントクロック(Transparent Clock)装置300と、1つ以上のスレーブ(Slave)装置400とを備える。
Hereinafter, although the embodiment of the present invention is described, the following embodiment does not limit the invention concerning a claim. Moreover, not all combinations of features described in the embodiments are essential to the solution of the invention.
FIG. 1 is a schematic block diagram showing an apparatus configuration of a time synchronization system according to an embodiment of the present invention. In the same figure, the time synchronization system 1 comprises a Grandmaster Clock device 100, an antenna 200, a Transparent Clock device 300, and one or more slave devices 400.

グランドマスタークロック装置100とトランスペアレントクロック装置300とは、ネットワーク810を介して接続されている。トランスペアレントクロック装置300とスレーブ装置400とも、ネットワーク810を介して接続されている。トランスペアレントクロック装置300とスレーブ装置400とが、ネットワーク810に加えてL2スイッチ820を介して接続されていてもよい。グランドマスタークロック装置100及びスレーブ装置400との関係では、トランスペアレントクロック装置300、L2スイッチ820及びネットワーク810が、グランドマスタークロック装置100とスレーブ装置400とを接続する通信経路800に含まれる。
また、アンテナ200は測位システム900から得られる測位情報を受信し、アンテナ200はグランドマスタークロック装置100に接続されている。
Grand master clock device 100 and transparent clock device 300 are connected via network 810. The transparent clock device 300 and the slave device 400 are also connected via the network 810. The transparent clock device 300 and the slave device 400 may be connected via the L2 switch 820 in addition to the network 810. In relation to the grand master clock device 100 and the slave device 400, the transparent clock device 300, the L2 switch 820 and the network 810 are included in the communication path 800 connecting the grand master clock device 100 and the slave device 400.
Also, the antenna 200 receives positioning information obtained from the positioning system 900, and the antenna 200 is connected to the grand master clock device 100.

ネットワーク810は、例えばEthernet(登録商標)による通信ネットワークなど、非同期の通信ネットワークである。
測位システム900は、衛星を用いた測位システム(Global Navigation Satellite System;GNSS、全地球航法衛星システム)である。測位システム900の例として、GPS(Global Positioning System)、QZSS(Quasi Zenith Satellite System)又はGLONASS(Global Navigation Satellite System)を上げることができるが、これに限らない。測位システム900は、測位の原理として高精度の時刻と衛星の航法情報を元に三角測量を行うシステムであり、地上に設置された数台のセシウム原子時計と時刻が一致するように、常に時刻情報の補正を行っている。時刻同期システム1では、測位システム900を時刻源として利用する。具体的には、時刻同期システム1は、測位システム900の人工衛星が送信する高精度の時刻情報を利用して時刻を検出する。
The network 810 is an asynchronous communication network, such as a communication network by Ethernet (registered trademark), for example.
The positioning system 900 is a positioning system using satellites (Global Navigation Satellite System; GNSS, Global Navigation Satellite System). Examples of the positioning system 900 may include, but not limited to, GPS (Global Positioning System), Quasi Zenith Satellite System (QZSS), or Global Navigation Satellite System (GLONASS). The positioning system 900 is a system that performs triangulation based on high precision time and navigation information of satellite as the principle of positioning, and the time is always so that the time coincides with several cesium atomic clocks installed on the ground We are correcting the information. The time synchronization system 1 uses the positioning system 900 as a time source. Specifically, the time synchronization system 1 detects the time using the highly accurate time information transmitted by the artificial satellite of the positioning system 900.

アンテナ200は、測位システム900の衛星が送信する測位情報を受信し、得られた測位情報をグランドマスタークロック装置100へ出力する。
グランドマスタークロック装置100は、時刻同期システム1の中枢となる時刻同期源であり、アンテナ200を介して測位システム900から受信した測位情報に基づいて時刻を検出し、検出した時刻に基づいて、時刻同期パケットの形式による時刻情報を生成してスレーブ装置400の各々へ送信する。グランドマスタークロック装置100は、時刻同期対象であるスレーブ装置400の時刻を測位システム900の時刻に同期させることを目的として、時刻情報のスレーブ装置400への送信を行う。なお、送信を送出とも称する。グランドマスタークロック装置100は、同期メッセージ送出装置の例に該当する。
The antenna 200 receives the positioning information transmitted by the satellite of the positioning system 900, and outputs the obtained positioning information to the grand master clock device 100.
The grand master clock device 100 is a time synchronization source that is the center of the time synchronization system 1, detects the time based on the positioning information received from the positioning system 900 via the antenna 200, and detects the time based on the detected time. Time information in the form of synchronization packets is generated and transmitted to each of the slave devices 400. The grand master clock device 100 transmits time information to the slave device 400 for the purpose of synchronizing the time of the slave device 400 that is the time synchronization target with the time of the positioning system 900. Transmission is also referred to as transmission. The grand master clock device 100 corresponds to an example of a synchronous message transmission device.

トランスペアレントクロック装置300、L2スイッチ820は、いずれも、グランドマスタークロック装置100とスレーブ装置400との通信を中継する。
トランスペアレントクロック装置300は、グランドマスタークロック装置100からの時刻同期パケットを受信して送信先のスレーブ装置400へ送信する。その際、トランスペアレントクロック装置300は、送信時刻から受信時刻を減算してトランスペアレントクロック装置300内での遅延時間を算出し、算出した遅延時間を時刻同期パケット内に書き込む(打刻する)。当該時刻同期パケットを受信したスレーブ装置400では、時刻同期パケット内に書き込まれた遅延時間に基づく補正を行うことで、時刻同期に対するトランスペアレントクロック装置300における伝送時間の遅延(Delay)や揺らぎ(Jitter)の影響を低減させることができる。
一方、L2スイッチ820は、一般的な多ポートスイッチであり、時刻同期パケットの識別等の処理は行わない。時刻同期パケットがL2スイッチ820を通過するのに要する時間は、通信経路800における伝送時間の遅延や揺らぎの一因となる。
The transparent clock unit 300 and the L2 switch 820 both relay communication between the grandmaster clock unit 100 and the slave unit 400.
The transparent clock device 300 receives the time synchronization packet from the grandmaster clock device 100 and transmits it to the slave device 400 of the transmission destination. At this time, the transparent clock device 300 subtracts the reception time from the transmission time to calculate the delay time in the transparent clock device 300, and writes the calculated delay time in the time synchronization packet (stamps). The slave device 400 that has received the time synchronization packet performs correction based on the delay time written in the time synchronization packet, thereby delaying or delaying (jitter) the transmission time of the transparent clock device 300 with respect to time synchronization. Can reduce the effects of
On the other hand, the L2 switch 820 is a general multiport switch and does not perform processing such as identification of a time synchronization packet. The time required for the time synchronization packet to pass through the L2 switch 820 contributes to the delay and fluctuation of the transmission time on the communication path 800.

スレーブ装置400は、時刻同期システム1における時刻同期対象の装置である。スレーブ装置400は、通信経路800を介してグランドマスタークロック装置100から受信した時刻同期パケットを用いて、スレーブ装置400内部の時刻をグランドマスタークロック装置100内部の時刻に同期させる処理を行う。ここでいう装置内部の時刻とは、当該装置が備えるクロックを時刻同期パケットにて補正したものである。   The slave device 400 is a device for time synchronization in the time synchronization system 1. The slave device 400 synchronizes the internal time of the slave device 400 with the internal time of the grand master clock device 100 using the time synchronization packet received from the grand master clock device 100 via the communication path 800. Here, the time inside the device is obtained by correcting the clock included in the device with a time synchronization packet.

図1に示す装置構成は、従来の時刻同期システムにおける装置構成と同様である。本実施形態において特別な装置を追加する必要は無く、後述するようにグランドマスタークロック装置100内部の構成が従来の時刻同期システムの場合と異なる。
また、時刻同期対象であるスレーブ装置400を識別するために、グランドマスタークロック装置100がスレーブ装置400にSMID(SYNC mesage ID)を付与する。SMIDは、スレーブ装置400毎に固有の値を有する整数の通し番号である。
但し、SMIDはスレーブ装置400内に保管されるものではなく、グランドマスタークロック装置100が、スレーブ装置400を識別するためにグランドマスタークロック装置100内部に記憶しておく。
The apparatus configuration shown in FIG. 1 is the same as the apparatus configuration in the conventional time synchronization system. There is no need to add a special device in the present embodiment, and the internal configuration of the grand master clock device 100 differs from that of the conventional time synchronization system as described later.
Also, in order to identify the slave device 400 that is the time synchronization target, the grand master clock device 100 gives the slave device 400 an SMID (SYNC message ID). The SMID is an integer serial number having a value unique to each slave device 400.
However, the SMID is not stored in the slave device 400, and the grand master clock device 100 is stored in the grand master clock device 100 in order to identify the slave device 400.

本実施形態では、グランドマスタークロック装置100に、最大500台のスレーブ装置400を登録可能である場合を例に説明する。グランドマスタークロック装置100は、500台のスレーブ装置400に対して0〜499のSMIDを付与する。
但し、グランドマスタークロック装置100に登録可能なスレーブ装置400の台数は500台以下に限らない。グランドマスタークロック装置100が、1000台のslaveに対し時刻同期を実施する場合は、500台の場合よりもSMIDビットを1ビット増やすことで、SMIDを容易にスケールアップすることができる。なお、一台のグランドマスタークロック装置100が大量のスレーブ装置400を時刻同期する場合、通信経路800構成が複雑になり、トランスペアレントクロック装置300など時刻同期をサポートしたスイッチ以外のL2スイッチ820が多段に挟まる可能性がある点について留意が必要である。
In the present embodiment, a case where up to 500 slave devices 400 can be registered in the grand master clock device 100 will be described as an example. The grand master clock device 100 assigns an SMID of 0 to 499 to 500 slave devices 400.
However, the number of slave devices 400 that can be registered in the grand master clock device 100 is not limited to 500 or less. When the grandmaster clock device 100 performs time synchronization to 1000 slaves, it is possible to easily scale up the SMID by increasing the SMID bit by 1 bit as compared with the case of 500 slaves. When one grand master clock device 100 synchronizes a large number of slave devices 400 with time, the configuration of communication path 800 becomes complicated, and L2 switches 820 other than the switches supporting time synchronization such as transparent clock device 300 are multistaged. It should be noted that there is a possibility of getting caught.

なお、グランドマスタークロック装置100とスレーブ装置400との接続関係は、図1に示すものに限らない。例えば、グランドマスタークロック装置100とスレーブ装置400とが1対1で接続されていてもよい。また、グランドマスタークロック装置100とスレーブ装置400とが、トランスペアレントクロック装置300やL2スイッチ820を介さずに、単にネットワーク810を介して接続されていてもよい。   The connection relationship between the grandmaster clock device 100 and the slave device 400 is not limited to that shown in FIG. For example, the grand master clock device 100 and the slave device 400 may be connected on a one-to-one basis. Also, the grandmaster clock device 100 and the slave device 400 may be connected simply via the network 810 without the transparent clock device 300 or the L2 switch 820.

ここで、図2〜4を参照して、IEEE1588v2時刻同期プロセスによるグランドマスタークロック装置における時刻同期パケットの送信間隔の揺らぎについて説明する。一般には、グランドマスタークロック装置はIEEE1588v2時刻同期プロセスに従って動作する。
図2は、IEEE1588v2時刻同期プロセスにおける階層構造を示す説明図である。同図において、グランドマスタークロック装置1100とスレーブ装置1400とが示されており、グランドマスタークロック装置1100とスレーブ装置1400とは通信経路1800で接続されている。
Here, with reference to FIGS. 2 to 4, fluctuation of the transmission interval of the time synchronization packet in the grand master clock device according to the IEEE 1588 v 2 time synchronization process will be described. In general, the grandmaster clock unit operates according to the IEEE 1588v2 time synchronization process.
FIG. 2 is an explanatory view showing a hierarchical structure in the IEEE 1588v2 time synchronization process. In the figure, a grand master clock device 1100 and a slave device 1400 are shown, and the grand master clock device 1100 and the slave device 1400 are connected by a communication path 1800.

また、グランドマスタークロック装置1100、スレーブ装置1400とも、5層の階層構造をなすプロトコルに従って動作する。5つの階層構造は下位から順に物理層(PHY層)、メディアアクセスコントローラ(Media Access Controller;MAC)層、インターネットプロトコル(Internet Protocol;IP)層、ユーザデータグラムプロトコル(User Datagram Protocol;UDP)層、プレシジョンタイムプロトコル(Precision Time Protocol;PTP)層である。メディアアクセスコントローラ層にはタイムスタンプユニット(Timestamp Unit;TSU)が含まれる。   In addition, both the grand master clock device 1100 and the slave device 1400 operate according to a protocol forming a five-layer hierarchical structure. The five hierarchical structures are, from the lower level, a physical layer (PHY layer), a media access controller (MAC) layer, an internet protocol (IP) layer, a user datagram protocol (UDP) layer, It is a Precision Time Protocol (PTP) layer. The media access controller layer includes a time stamp unit (TSU).

グランドマスタークロック装置1100は時刻同期源であり、スレーブ装置1400は時刻同期対象である。グランドマスタークロック装置1100、スレーブ装置1400ともに、時刻同期に必要なプロトコルであるPTP層は最上位層に位置し、通常はCPU(Central Processing Unit、中央処理装置)にて処理が行われる。時刻同期パケットに関しても、PTP層の処理において一定間隔でスケジュールされたタイミングにて下位層に伝達される。   The grand master clock device 1100 is a time synchronization source, and the slave device 1400 is a time synchronization target. In both the grand master clock device 1100 and the slave device 1400, the PTP layer, which is a protocol necessary for time synchronization, is located at the highest layer, and processing is usually performed by a central processing unit (CPU). The time synchronization packet is also transmitted to the lower layer at scheduled timings in the process of the PTP layer.

UDP層、IP層は、いずれもプロトコルスタック層であり、OS(Operating System)に実装される。PTP層にて生成される時刻同期パケットはUDPパケットであることから、通常、UDP層およびIP層を経由して更に下位層へと伝達される。
MAC層は、PTP層、UDP層およびIP層のプロトコルスタックによってカプセル化されたPTPパケットにMACアドレス情報の付与、FCS(Frame Check Sequence)演算処理等の処理を行い、また、物理層とのインタフェースとして機能する。また、MAC層に含まれるタイムスタンプユニットは、PTP層の重要な要素であるタイムスタンプを実施する。
The UDP layer and the IP layer are both protocol stack layers, and are implemented in the OS (Operating System). Since the time synchronization packet generated in the PTP layer is a UDP packet, it is usually transmitted to the lower layer via the UDP layer and the IP layer.
The MAC layer performs processing such as addition of MAC address information, FCS (Frame Check Sequence) calculation processing, and the like to PTP packets encapsulated by the PTP layer, the UDP layer, and the protocol stack of the IP layer, and an interface with the physical layer. Act as. Also, the time stamp unit included in the MAC layer implements the time stamp that is an important element of the PTP layer.

IEEE1588v2が他の時刻同期方式に対して優位な点として、MAC層にタイムスタンプユニットを有することが挙げられる。これにより、PTP層から発行されたPTPパケットは、タイムスタンプの打刻に関して、MAC層より上位のPTP層、UDP層及びIP層における遅延(Delay)や揺らぎ(Jitter)の影響を受けない。
一方、従来のグランドマスタークロック装置では、パケットの送信タイミングについて、PTP層、UDP層およびIP層における遅延(Delay)や揺らぎ(Jitter)の影響を受ける。この点について図3を参照して説明する。
The advantage of IEEE 1588 v 2 over other time synchronization schemes is that it has a timestamp unit in the MAC layer. As a result, PTP packets issued from the PTP layer are not affected by delay or jitter in the PTP layer above the MAC layer, the UDP layer, and the IP layer with respect to time stamp stamping.
On the other hand, in the conventional grand master clock device, the packet transmission timing is affected by delay (Delay) and jitter (Jitter) in the PTP layer, the UDP layer and the IP layer. This point will be described with reference to FIG.

図3は、従来のグランドマスタークロック装置の構成例を示す概略ブロック図である。
同図において、グランドマスタークロック装置1100は、GNSS同期型周波数発振器(GNSSDO)1110と、物理層チップ(PHY)1120と、メディアアクセスコントローラ(Media Access Controller;MAC)部1130と、水晶振動子1150と、メインメモリ1160と、CPU(Central Processing Unit、中央処理装置)1170とを備える。GNSS同期型周波数発振器1110は、GNSS受信機1111と、クロック調整器1112と、水晶振動子1113とを備える。MAC部1130は、受信タイムスタンプユニット(Receive Timestamp Unit;RTSU)1131と、受信FIFO(First-in First-out)1132と、送信FIFO1133と、送信タイムスタンプユニット(Transmit Timestamp Unit;TTSU)1137と、プレシジョンタイムカウンターユニット(Precision Time Counter Unit;PRTCU)1142とを備える。CPU1170は、ハードウェア(HW)アクセス部1171と、ドライバ1172と、OS(Operating System)カーネル1173と、GNSS管理デーモン(GNSSD)1174と、プロトコルスタック1175と、Delayreq送出処理部1176と、Sync送出処理部1177と、スケジューラ(Scheduler)1178とメモリコントローラ1181とを備える。
FIG. 3 is a schematic block diagram showing a configuration example of a conventional grand master clock device.
In the figure, a grand master clock device 1100 includes a GNSS synchronous frequency oscillator (GNSSDO) 1110, a physical layer chip (PHY) 1120, a media access controller (MAC) unit 1130, and a crystal oscillator 1150. , And a CPU (Central Processing Unit) 1170. The GNSS synchronous frequency oscillator 1110 includes a GNSS receiver 1111, a clock adjuster 1112 and a crystal oscillator 1113. The MAC unit 1130 includes a receive time stamp unit (RTSU) 1131, a receive FIFO (first-in first-out) 1132, a transmit FIFO 1133, and a transmit time stamp unit (TTSU) 1137. And a Precision Time Counter Unit (PRTCU) 1142. The CPU 1170 includes a hardware (HW) access unit 1171, a driver 1172, an operating system (OS) kernel 1173, a GNSS management daemon (GNSSD) 1174, a protocol stack 1175, a Delayreq transmission processing unit 1176, and a Sync transmission processing. A section 1177, a scheduler 1178, and a memory controller 1181.

CPU1170は、グランドマスタークロック装置1100が備える記憶デバイスからプログラムを読み出して実行することで、CPU1170内の各部を実現する。一方、GNSS同期型周波数発振器1110、物理層チップ1120、及びMAC部1130は、ハードウェアにて構成されている。
また、物理層チップ1120が物理層の処理を実行し、MAC部1130がMAC層の処理を実行し、CPU1170が、IP層、UDP層及びPTP層の処理を実行する。
The CPU 1170 implements each unit in the CPU 1170 by reading and executing a program from a storage device provided in the grand master clock device 1100. On the other hand, the GNSS synchronous frequency oscillator 1110, the physical layer chip 1120, and the MAC unit 1130 are configured by hardware.
Also, the physical layer chip 1120 executes processing of the physical layer, the MAC unit 1130 executes processing of the MAC layer, and the CPU 1170 executes processing of the IP layer, the UDP layer, and the PTP layer.

グランドマスタークロック装置1100は、測位システムからの測位情報を受信するためのアンテナ(ANT)1200と接続されている。具体的には、アンテナ1200は、同軸ケーブルにてGNSS同期型周波数発振器1110と接続されており、受信した測位情報から抽出した時刻情報をGNSS同期型周波数発振器1110へ出力する。
GNSS同期型周波数発振器1110は、アンテナ1200から得たGNSSの信号から、ToD(Time Of Day、年・月・日・時・分・秒の時刻情報)、1PPS(正確な毎一秒を通知するパルス信号)、及び、125メガヘルツ(MHz)周波数信号を取得してグランドマスタークロック装置1100内部に提供する。
The grand master clock device 1100 is connected to an antenna (ANT) 1200 for receiving positioning information from the positioning system. Specifically, the antenna 1200 is connected to the GNSS synchronous frequency oscillator 1110 via a coaxial cable, and outputs time information extracted from the received positioning information to the GNSS synchronous frequency oscillator 1110.
The GNSS synchronous frequency oscillator 1110 reports ToD (Time Of Day, year, month, day, hour, minute, second time information), 1 PPS (accurate one second from the GNSS signal obtained from the antenna 1200) A pulse signal) and a 125 megahertz (MHz) frequency signal are acquired and provided inside the grand master clock device 1100.

GNSS受信機1111はアンテナ1200にて受信するGNSS信号から時刻情報、及び、GNSSの航法情報を抽出する。そして、GNSS受信機1111は、GNSSの航法情報と、定期的にGNSSから送付される時刻情報とに基づいて、三角測量の原理で衛星の現在位置(衛星とグランドマスタークロック装置1100との相対位置)の特定を行う。現在位置が確定すると、GNSS受信機1111は、時刻情報の換算を実施する。   The GNSS receiver 1111 extracts time information and navigation information of the GNSS from the GNSS signal received by the antenna 1200. Then, the GNSS receiver 1111 determines the current position of the satellite (the relative position between the satellite and the grand master clock device 1100 according to the principle of triangulation based on the navigation information of the GNSS and the time information periodically sent from the GNSS. To identify). When the current position is determined, the GNSS receiver 1111 converts the time information.

GNSSに含まれる時刻情報は、地上に配置されたセシウム原子時計により定期的に補正されているためGNSS信号から得られた時刻情報は非常に正確な時刻を示す。GNSS信号から得られた時刻情報は、いわば、この世で唯一の絶対時刻に同期していると見做すことができる。時刻情報は同時に周波数と位相に関する情報であるため、クロック調整器1112は、毎秒のパルスの投入を受けて水晶振動子1113に対して補正をかける。これにより、クロック調整器1112は、水晶振動子1113の周波数が125メガヘルツに高精度に一致するように補正をかける。なお、本実施形態では125メガヘルツを基本周波数とする場合を例に説明しているが、10メガヘルツまたは25メガヘルツ等、基本周波数を予め決定した周波数に置き換えることが可能である。   The time information included in the GNSS is periodically corrected by the cesium atomic clock placed on the ground, and the time information obtained from the GNSS signal indicates a very accurate time. The time information obtained from the GNSS signal can be regarded as synchronizing to the world's only absolute time, so to speak. Since the time information is information on frequency and phase simultaneously, the clock adjuster 1112 corrects the crystal oscillator 1113 in response to the injection of a pulse per second. Thus, the clock adjuster 1112 corrects the frequency of the crystal oscillator 1113 so as to match the frequency of 125 MHz with high accuracy. In the present embodiment, the case where 125 MHz is used as the fundamental frequency is described as an example, but it is possible to replace the fundamental frequency with a predetermined frequency, such as 10 MHz or 25 MHz.

MAC部1130において、受信タイムスタンプユニット1131は、受信パケット(グランドマスタークロック装置1100が受信したパケット)に受信時刻を書き込む(受信タイムスタンプを打刻する)。
受信FIFO1132は、受信パケットを一時的に格納する。
送信FIFO1133は、送信パケット(グランドマスタークロック装置1100が送信するパケット)を一時的に格納する。
送信タイムスタンプユニット1137は、送信パケットに送信時刻を書き込む(送信タイムスタンプを打刻する)。
In the MAC unit 1130, the reception time stamp unit 1131 writes the reception time in the reception packet (the packet received by the grand master clock device 1100) (the reception time stamp is stamped).
The receive FIFO 1132 temporarily stores the received packet.
The transmission FIFO 1133 temporarily stores transmission packets (packets transmitted by the grand master clock device 1100).
The transmission time stamp unit 1137 writes the transmission time in the transmission packet (stamps the transmission time stamp).

水晶振動子1150は、水晶振動子1113よりも周波数精度が低い水晶振動子である。水晶振動子1150は、CPU1170の基準クロックとして用いられる。
メインメモリ1160は、グランドマスタークロック装置1100が備える記憶デバイスを用いて構成され、各種情報を記憶する。
The crystal unit 1150 is a crystal unit whose frequency accuracy is lower than that of the crystal unit 1113. The crystal oscillator 1150 is used as a reference clock of the CPU 1170.
The main memory 1160 is configured using a storage device provided in the grand master clock device 1100, and stores various information.

CPU1170において、ハードウェアアクセス部1171は、バスとドライバ1172とを接続し、ドライバ1172がハードウェアを制御する。バスは、一般にPCIバスまたはローカルバスにて提供される。
CPU1170は、ハードウェアアクセス部1171を経由してToDの取得及び送受信パケットのハンドリングを行う。送受信パケットのハンドリングにおいて、CPU1170は、送信パケットについては、OSカーネル1173から指示のあったメインメモリアドレスをメインメモリコントローラ1181に出力して、メインメモリ1160から送信パケット情報を読み込む。そして、CPU1170は、読み込んだ送信パケット情報をMAC部1130に出力する。CPU1170は、受信パケットについては送信パケットの場合と逆に、MAC部1130から受信したパケットを、メインメモリ1160の、OSカーネル1173が指示したメインメモリアドレスに蓄積する。
In the CPU 1170, a hardware access unit 1171 connects the bus and the driver 1172, and the driver 1172 controls the hardware. The bus is generally provided by a PCI bus or a local bus.
The CPU 1170 performs ToD acquisition and transmission / reception packet handling via the hardware access unit 1171. In transmission and reception packet handling, the CPU 1170 outputs the main memory address instructed from the OS kernel 1173 to the main memory controller 1181 and reads transmission packet information from the main memory 1160 for the transmission packet. Then, the CPU 1170 outputs the read transmission packet information to the MAC unit 1130. The CPU 1170 stores the packet received from the MAC unit 1130 in the main memory address of the main memory 1160 instructed by the OS kernel 1173, contrary to the case of the transmission packet for the received packet.

ここで、送受信パケット処理ではDMA(ダイレクトメモリアクセス)を利用してCPU1170の演算ユニットを利用することなく、メインメモリ1160およびメインメモリコントローラ1181とMAC部1130とで直接実施する方式が主流である。図3に示すグランドマスタークロック装置1100では、メモリコントローラ1181内にDMAが内蔵されており、このDMAを利用して送受信パケット処理を行う。   Here, in the transmission / reception packet processing, a system directly implemented by the main memory 1160, the main memory controller 1181, and the MAC unit 1130 without using the operation unit of the CPU 1170 using DMA (direct memory access) is the mainstream. In the grand master clock device 1100 shown in FIG. 3, a DMA is built in the memory controller 1181, and transmit / receive packet processing is performed using this DMA.

OSカーネル1173は、Linux(登録商標)やUNIX(登録商標)、windowsなどオペレーティングシステムの中枢であり、各種プロセスの実行管理を行うスケジューラ1178の制御やメモリ空間の割り当てなどを行う。
GNSSD1174は、GNSS同期型周波数発振器1110を制御する制御デーモンであり、GNSSから得たToD情報を元に、MAC部1130のプレシジョンタイムカウンターユニット1142の秒粒度以上の時刻合わせ、および、GNSS同期型周波数発振器1110の状態監視を実施する。具体的には、GNSSD1174は、GNSS同期型周波数発振器1110が前回行った時刻合わせ(水晶振動子1113の発振の補正)に基づいて時刻合わせを行う。そして、GNSSD1174は、GNSS電波の受信状況などによりGNSS同期型周波数発振器1110内の水晶振動子1113が自走状態(Holdover)になったことなどの状態変化を管理し、各プロセスからの被参照処理を実施する。
The OS kernel 1173 is the core of the operating system such as Linux (registered trademark), UNIX (registered trademark), and windows, and controls the scheduler 1178 that performs execution management of various processes and allocates memory space.
The GNSSD 1174 is a control daemon that controls the GNSS synchronous frequency oscillator 1110, and based on the ToD information obtained from the GNSS, the time adjustment of the second or more granularity of the precision time counter unit 1142 of the MAC unit 1130, and the GNSS synchronous frequency. The state monitoring of the oscillator 1110 is performed. Specifically, the GNSSD 1174 performs time alignment based on the time alignment (correction of oscillation of the crystal oscillator 1113) previously performed by the GNSS synchronous frequency oscillator 1110. Then, the GNSSD 1174 manages state changes such as the crystal oscillator 1113 in the GNSS synchronous frequency oscillator 1110 becoming a free-running state (Holdover) according to the reception status of GNSS radio waves, etc. Conduct.

プロトコルスタック1175は、UDP、IPの各層の処理を実施する。プロトコルスタック1175は、OSカーネル1173と共にコンパイルされて実装されるか、あるいは、追加で導入することが可能である。ユーザがプロトコルスタック1175を実装する負担を軽減させるために、一般的には標準的なプロトコルが、OSカーネル1173と共にコンパイルされて実装されている。   The protocol stack 1175 performs processing of each layer of UDP and IP. The protocol stack 1175 may be compiled and implemented with the OS kernel 1173 or may be additionally introduced. A standard protocol is generally compiled and implemented with the OS kernel 1173 to reduce the burden of the user in implementing the protocol stack 1175.

スケジューラ1178は、上記のような各種プロセスの実行管理を行う。
Sync送出処理部1177は、スレーブ装置1400とPTPプロトコルにて事前に取り決め(ネゴシエーション)を行った同期間隔(Sync間隔、Sync interval)を基に、スケジューラ1178に対し、送信対象となるスレーブ装置のID(以下、スレーブIDと称する)を登録する。スケジューラ1178は、一定の粒度(例えば500us)にてスレーブID領域(スレーブ装置のIDが登録された領域)を参照し、スレーブIDが存在すれば、Sync送出処理部1177にスレーブIDを伝達する。Sync送出処理部1177は、当該スレーブIDに関する同期メッセージ(Synchronous message(Sync message))を時刻同期パケットにて生成し、プロトコルスタック1175に対して付加情報と共に出力する。
The scheduler 1178 manages the execution of the various processes as described above.
The Sync transmission processing unit 1177 transmits the ID of the slave device to be transmitted to the scheduler 1178 based on the synchronization interval (Sync interval, Sync interval) previously negotiated (negotiated) with the slave device 1400 according to the PTP protocol. (Hereinafter referred to as slave ID) is registered. The scheduler 1178 refers to the slave ID area (area where the ID of the slave device is registered) with a fixed granularity (for example, 500 us), and transmits the slave ID to the Sync transmission processing unit 1177 if the slave ID exists. The Sync transmission processing unit 1177 generates a synchronization message (Synchronous message (Sync message)) relating to the slave ID as a time synchronization packet, and outputs it with the additional information to the protocol stack 1175.

ここでスケジューラ1178の粒度が時刻同期システムに関して大きな問題となり得る。例えば、500usの粒度で同期メッセージを送出する時刻同期システムにおいて、1秒間に128個の同期メッセージを送出したい場合、正しい間隔は1/128=7,812マイクロ秒(μs)であり、500usの近傍である数値は8,000マイクロ秒又は7,500マイクロ秒となる。8,000マイクロ秒、7,500マイクロ秒のいずれも、正しい間隔である7,812マイクロ秒と差があり、この差によって揺らぎ(Jitter)が発生する。   Here, the granularity of scheduler 1178 can be a major issue for time synchronization systems. For example, in a time synchronization system that sends synchronization messages at a granularity of 500 us, if it is desired to send 128 synchronization messages per second, the correct interval is 1/128 = 7,812 microseconds (us) and a neighborhood of 500 us The numerical value is 8,000 microseconds or 7,500 microseconds. In both 8,000 microseconds and 7,500 microseconds, there is a difference from 7,812 microseconds which is the correct interval, and this difference generates jitter.

また、CPU1170が、GNSSから抽出された時刻と同期する高精度の水晶振動子1113と同期していないこともjitterや一方向へのdelayを発生させる要因となり得る。さらにCPU1170は様々なプロセスを実行しているため、スケジューラ1178が指定する時刻にSync送出処理(同期メッセージの送出処理)を開始できる保証が無い。さらにSync送出タイミング(同期メッセージの送出タイミング)が到来した際に、既に同期メッセージ以外の一般メッセージのパケットの送信処理を実施していた場合には、その送出処理終了を待つ必要が生じる。
ここで、一般メッセージは、例えば、CPU1170において送出処理を実施する、例えば管理メッセージや後述するdelayrespメッセージなど、同期メッセージ以外のメッセージを示す。
In addition, the fact that the CPU 1170 is not synchronized with the high-precision crystal oscillator 1113 synchronized with the time extracted from the GNSS can also be a factor that generates jitter in one direction or jitter. Furthermore, since the CPU 1170 is executing various processes, there is no guarantee that the Sync transmission process (synchronization message transmission process) can be started at the time designated by the scheduler 1178. Furthermore, when the Sync transmission timing (the transmission timing of the synchronization message) arrives, if the transmission processing of the packet of the general message other than the synchronization message has already been performed, it is necessary to wait for the transmission processing end.
Here, the general message indicates, for example, a message other than the synchronization message, such as a management message or a delay resp message described later, for which the CPU 1170 performs transmission processing.

Delayreq送出処理部1176は、グランドマスタークロック装置1100が、スレーブ装置からdelayreqメッセージ(delayreq message)を受信すると、受信時刻を記録し、記録した受信時刻をdelayrespメッセージ内に記録する。そして、Delayreq送出処理部1176は、IEEE1588v2規定のフォーマットにて、delayreqメッセージを送出したスレーブ装置に対してdelayrespメッセージ(delayresp message)を送出する処理を行う。このdelayrespメッセージは、スレーブ装置がネットワーク遅延時間を算出するのに用いられる。   When the grandmaster clock device 1100 receives the delayreq message (delayreq message) from the slave device, the Delayreq transmission processing unit 1176 records the reception time and records the recorded reception time in the delayresp message. Then, the Delayreq transmission processing unit 1176 performs processing of transmitting a delayresp message (delayresp message) to the slave device that has transmitted the delayreq message in a format prescribed by IEEE 1588 v2. The delayresp message is used by the slave device to calculate the network delay time.

上記のように、CPU処理には多数の揺らぎ要因があり、正確なSync interval(同期メッセージの送出間隔)を保つのは困難である。一方、MAC部1130は、受信FIFO1132及び送信FIFO1133と、GNSSと同等の正確な時刻源であるプレシジョンタイムカウンターユニット1142とによって、受信タイムスタンプユニット1131および送信タイムスタンプユニット1137にてPTPパケットに対し正確な時刻を打刻する。
物理層チップ(PHY)1120は、ネットワークを介してスレーブ装置1400と通信を行う。
As described above, CPU processing has many fluctuation factors, and it is difficult to maintain an accurate Sync interval (interval for sending a synchronization message). On the other hand, the MAC unit 1130 corrects the PTP packet in the reception time stamp unit 1131 and the transmission time stamp unit 1137 by the reception FIFO 1132 and the transmission FIFO 1133 and the precision time counter unit 1142 which is an accurate time source equivalent to GNSS. I stamp a good time.
The physical layer chip (PHY) 1120 communicates with the slave device 1400 via a network.

図4は、従来のグランドマスタークロック装置が送出する同期メッセージにおける遅延および揺らぎの例を示す説明図である。同図において、横軸は時刻を表しており、図に向かって右側ほど後の時刻を示している。また、同図の縦には、同期メッセージ送出経路における各部を示している。
図4において、Sync送出処理部1177は、毎正秒(1PPS)等間隔で同期メッセージを送出するものとしてスレーブ装置1400とネゴシエーションしており、スケジューラ1178に対して1秒毎のタイミングで同期メッセージIDを書き込む。
なお、図4では、同期メッセージの送出間隔が1PPSである場合の例を示しているため、図3を参照して説明した粒度の問題については言及しない。
FIG. 4 is an explanatory view showing an example of delay and fluctuation in a synchronization message transmitted by the conventional grandmaster clock device. In the figure, the horizontal axis represents time, and indicates the later time toward the right of the figure. Further, the vertical lines in the figure show each part in the synchronous message transmission path.
In FIG. 4, the Sync transmission processing unit 1177 negotiates with the slave device 1400 as transmitting synchronization messages at regular intervals of every second (1 PPS), and the synchronization message ID is sent to the scheduler 1178 every one second. Write
Note that FIG. 4 shows an example where the transmission interval of the synchronization message is 1 PPS, so the problem of the granularity described with reference to FIG. 3 will not be mentioned.

スケジューラ1178は、CPUの基準クロックである低精度の水晶振動子1150にて動作するため、スケジューラ1178の動作は絶対時刻軸に対して揺らぎを有する。すなわち、水晶振動子1150によるクロックの誤差により、スケジューラ1178が示す同期メッセージの送出タイミングは、1秒間隔に対して誤差を含み得る。
次に、スケジューラ1178が同期メッセージの送出タイミングを検出すると、Sync送出処理部1177が送出タイミングとなった同期メッセージをメインメモリ1160へと書き込む。この際、メインメモリ1160への書込による遅延が生じる。また、同期メッセージの書込中に他のプロセスが同一のメインメモリに対してアクセスすると、揺らぎ(Jitter)が発生し得る。
Since the scheduler 1178 operates with the low-precision crystal oscillator 1150 which is the reference clock of the CPU, the operation of the scheduler 1178 has fluctuations with respect to the absolute time axis. That is, due to an error of the clock by the quartz oscillator 1150, the transmission timing of the synchronization message indicated by the scheduler 1178 may include an error for one second interval.
Next, when the scheduler 1178 detects the transmission timing of the synchronization message, the Sync transmission processing unit 1177 writes the synchronization message at the transmission timing to the main memory 1160. At this time, a delay due to the writing to the main memory 1160 occurs. Also, jitter may occur if another process accesses the same main memory while writing a synchronization message.

メインメモリ1160に格納された同期メッセージは、高精度の水晶振動子1113にて動作するMAC1130内のTTSU1137によって、グランドマスタークロック装置1100からの正確な送出時刻を打刻される。そして、送出時刻を打刻された同期メッセージは、グランドマスタークロック装置1100から送出される。   The synchronization message stored in the main memory 1160 is stamped with the accurate transmission time from the grandmaster clock device 1100 by the TTSU 1137 in the MAC 1130 operated by the high precision quartz oscillator 1113. Then, the synchronization message whose transmission time has been stamped is transmitted from the grand master clock device 1100.

ここで、ネットワーク遅延をΔdelayi(iは、正整数)と表記すると、スレーブ装置1400に到達するパケットの到着時刻は、図中に示した「Δdelay1+100ns」、「Δdelay2+300,500ns」、・・・のように分散する。特に、ネットワーク遅延の揺らぎが小さい場合、グランドマスタークロック装置1100内で発生した揺らぎ成分が、同期メッセージの到着間隔に大きな影響を及ぼす。
また、図3を参照して説明した粒度の問題の問題が生じると、同期メッセージのスレーブ装置1400への到着間隔の精度がさらに低下する。
Here, when the network delay is expressed as Δdelayi (i is a positive integer), the arrival time of the packet arriving at the slave device 1400 is as shown in “Δdelay1 + 100 ns”, “Δdelay2 + 300, 500 ns”,. Distributed to In particular, when the network delay fluctuation is small, fluctuation components generated in the grandmaster clock device 1100 have a great influence on the arrival interval of the synchronization message.
Also, the granularity problem described with reference to FIG. 3 further reduces the accuracy of the arrival interval of the synchronization message to the slave device 1400.

図5は、本実施形態の時刻同期プロセスにおける階層構造を示す説明図である。同図において、グランドマスタークロック装置100とスレーブ装置400とが示されており、グランドマスタークロック装置100とスレーブ装置400とは通信経路800で接続されている。   FIG. 5 is an explanatory view showing a hierarchical structure in the time synchronization process of the present embodiment. In the figure, a grand master clock device 100 and a slave device 400 are shown, and the grand master clock device 100 and the slave device 400 are connected by a communication path 800.

また、グランドマスタークロック装置100、スレーブ装置400とも、5層の階層構造をなすプロトコルに従って動作する。5つの階層構造は下位から順に物理層(PHY層)、メディアアクセスコントローラ(Media Access Controller;MAC)層、インターネットプロトコル(Internet Protocol;IP)層、ユーザデータグラムプロトコル(User Datagram Protocol;UDP)層、プレシジョンタイムプロトコル(Precision Time Protocol;PTP)層である。メディアアクセスコントローラ層にはタイムスタンプユニット(Timestamp Unit;TSU)が含まれる。   Further, both the grand master clock device 100 and the slave device 400 operate according to a protocol forming a five-layer hierarchical structure. The five hierarchical structures are, from the lower level, a physical layer (PHY layer), a media access controller (MAC) layer, an internet protocol (IP) layer, a user datagram protocol (UDP) layer, It is a Precision Time Protocol (PTP) layer. The media access controller layer includes a time stamp unit (TSU).

グランドマスタークロック装置100は時刻同期源であり、スレーブ装置400は時刻同期対象である。スレーブ装置400は時刻同期に必要なプロトコルであるPTPを最上位層にてCPUを用いて処理する。
一方、グランドマスタークロック装置100は、同期メッセージの送出処理を、CPUからプロファイルで指定された間隔、及び、スレーブ装置400に関する情報などに基づいて、MAC層内のプロセスにて実行する。このように、グランドマスタークロック装置100は、同期メッセージの送出処理をCPUから分離して実行する。
The grand master clock device 100 is a time synchronization source, and the slave device 400 is a time synchronization target. The slave device 400 processes PTP, which is a protocol necessary for time synchronization, in the highest layer using the CPU.
On the other hand, the grandmaster clock device 100 executes the process of transmitting the synchronization message in the process in the MAC layer based on the interval designated by the profile from the CPU, the information on the slave device 400, and the like. As described above, the grandmaster clock device 100 separates the synchronous message transmission process from the CPU and executes it.

PTPはUDPパケットであることから、通常、OSに実装されたUDP、IPプロトコルスタックを経由して更に下位層へと伝達される。一方、同期メッセージに特化した場合、そのパケットのサイズ及びフィールド位置は全てのスレーブ装置400に対し一定であり、相手アドレスがスレーブ装置400毎に異なり、シーケンス番号やUDPチェックサム等が送信時に一意に決定するデータとなる。   Since PTP is a UDP packet, it is usually transmitted to a lower layer via UDP and IP protocol stacks implemented in the OS. On the other hand, when specializing in synchronization messages, the size and field position of the packet are constant for all slave devices 400, the other party's address is different for each slave device 400, and sequence numbers, UDP checksums, etc. are unique when transmitted. It will be the data to be determined.

グランドマスタークロック装置100は、MAC層において、PTP、UDP及びIPの各プロトコルスタックが出力する情報をプロファイルとして記憶する。その際、MAC層では、グローバルプロファイル、SMIDプロファイル(同期メッセージプロファイル)、SMテーブル(同期メッセージテーブル)に分割して記憶する。後述するように、グローバルプロファイルは、全てのスレーブ装置400に対して一定のデータを纏めたものである。また、SMIDプロファイルは、スレーブ装置400毎に異なるデータを纏めたものである。SMIDテーブルは、送信時に一意に決定するデータ(同期メッセージ毎に値が異なるデータ)を纏めたものである。
そして、グランドマスタークロック装置100はMAC層において、GNSSを起源とする極めて高精度のクロックによってスケジュールされた時刻に同期メッセージを送出することで、CPU層での処理による送出タイミングの揺らぎを排除し、一定の遅延のみで同期メッセージ送出を実現する。
The grand master clock device 100 stores, as a profile, information output from each protocol stack of PTP, UDP, and IP in the MAC layer. At that time, the MAC layer divides and stores the global profile, the SMID profile (synchronization message profile), and the SM table (synchronization message table). As described later, the global profile is a collection of constant data for all slave devices 400. Also, the SMID profile is a collection of different data for each slave device 400. The SMID table is a collection of data uniquely determined at the time of transmission (data having different values for each synchronization message).
Then, the grandmaster clock device 100 sends out the synchronization message at the time scheduled by the very high precision clock originating from GNSS in the MAC layer, thereby eliminating the fluctuation of the delivery timing due to the processing in the CPU layer, Realize synchronous message transmission with only a fixed delay.

図6は、本実施形態におけるグランドマスタークロック装置の構成例を示す概略ブロック図である。
同図において、グランドマスタークロック装置100は、GNSS同期型周波数発振器(GNSSDO)110と、物理層チップ(PHY)120と、メディアアクセスコントローラ(Media Access Controller;MAC)部130と、水晶振動子150と、メインメモリ160と、CPU(Central Processing Unit、中央処理装置)170とを備える。GNSS同期型周波数発振器110は、GNSS受信機111と、クロック調整器112と、水晶振動子113とを備える。MAC部130は、受信タイムスタンプユニット(Receive Timestamp Unit;RTSU)131と、受信FIFO(First-in First-out)132と、送信FIFO133と、Syncプロファイル記憶部134と、Sync生成部135と、Sync送出部136と、送信タイムスタンプユニット(Transmit Timestamp Unit;TTSU)137と、スケジューラ(Scheduler)141と、プレシジョンタイムカウンターユニット(Precision Time Counter Unit;PRTCU)142とを備える。なお、MAC部130の、より詳細な構成については後述する。
CPU170は、ハードウェア(HW)アクセス部171と、ドライバ172と、OS(Operating System)カーネル173と、GNSS管理デーモン(GNSSD)174と、プロトコルスタック175と、Delayreq送出処理部176と、Sync登録処理部177と、メモリコントローラ181とを備える。
FIG. 6 is a schematic block diagram showing a configuration example of the grand master clock device in the present embodiment.
In the figure, the grand master clock device 100 includes a GNSS synchronous frequency oscillator (GNSSDO) 110, a physical layer chip (PHY) 120, a media access controller (MAC) unit 130, and a crystal oscillator 150. , A main memory 160, and a CPU (Central Processing Unit) 170. The GNSS synchronous frequency oscillator 110 includes a GNSS receiver 111, a clock adjuster 112, and a crystal oscillator 113. The MAC unit 130 includes a reception time stamp unit (RTSU) 131, a reception FIFO (first-in first-out) 132, a transmission FIFO 133, a sync profile storage unit 134, a sync generation unit 135, and a sync. A transmission unit 136, a transmission time stamp unit (TTSU) 137, a scheduler 141, and a precision time counter unit (PRTCU) 142 are provided. The more detailed configuration of the MAC unit 130 will be described later.
The CPU 170 includes a hardware (HW) access unit 171, a driver 172, an OS (Operating System) kernel 173, a GNSS management daemon (GNSSD) 174, a protocol stack 175, a Delayreq transmission processing unit 176, and a Sync registration process. And a memory controller 181.

CPU170は、グランドマスタークロック装置100が備える記憶デバイスからプログラムを読み出して実行することで、CPU170内の各部を実現する。一方、GNSS同期型周波数発振器110、物理層チップ120、及びMAC部130は、ハードウェアにて構成されている。
また、物理層チップ120が物理層の処理を実行し、MAC部130がMAC層の処理を実行し、CPU170が、IP層、UDP層及びPTP層の処理を実行する。
The CPU 170 implements each unit in the CPU 170 by reading and executing a program from a storage device provided in the grand master clock device 100. On the other hand, the GNSS synchronous frequency oscillator 110, the physical layer chip 120, and the MAC unit 130 are configured by hardware.
Also, the physical layer chip 120 executes processing of the physical layer, the MAC unit 130 executes processing of the MAC layer, and the CPU 170 executes processing of the IP layer, the UDP layer, and the PTP layer.

GNSS同期型周波数発振器110の構成及び機能は、図3のGNSS同期型周波数発振器1110の構成及び機能と同様であり、説明を省略する。
MAC部130において、受信タイムスタンプユニット131、送信タイムスタンプユニット137の機能は、それぞれ図3の受信タイムスタンプユニット1131、送信タイムスタンプユニット1137の機能と同様であり、説明を省略する。
また、水晶振動子150、メインメモリ160の機能も、それぞれ図3の水晶振動子1150、メインメモリ1160の機能と同様であり、説明を省略する。
CPU170は、図3のSync送出処理部1177及びスケジューラ1178に代えてSync登録処理部177を備える点以外は、図3のCPU1170と同様である。なお、CPU170もOSのスケジューラ機能を実行するが、同期メッセージの送出において、当該機能を直接には使用しないので、図6にはCPUのスケジューラを記載していない。CPU170は、一般メッセージ生成部の例に該当し、図6のCPU1170と同様、一般メッセージを生成する。
The configuration and function of the GNSS synchronous frequency oscillator 110 are the same as the configuration and function of the GNSS synchronous frequency oscillator 1110 in FIG.
The functions of the reception time stamp unit 131 and the transmission time stamp unit 137 in the MAC unit 130 are the same as the functions of the reception time stamp unit 1131 and the transmission time stamp unit 1137 in FIG.
Further, the functions of the crystal unit 150 and the main memory 160 are the same as the functions of the crystal unit 1150 and the main memory 1160 in FIG. 3, respectively, and the description will be omitted.
The CPU 170 is the same as the CPU 1170 of FIG. 3 except that a Sync registration processing unit 177 is provided instead of the Sync transmission processing unit 1177 and the scheduler 1178 of FIG. 3. Although the CPU 170 also executes the scheduler function of the OS, the CPU scheduler is not shown in FIG. 6 because the function is not directly used in sending the synchronization message. The CPU 170 corresponds to an example of a general message generation unit, and generates a general message as in the CPU 1170 of FIG.

Sync登録処理部177は、スレーブ装置400とネゴシエーションを行った同期メッセージ間隔及び相手先アドレスなどを、ハードウェアアクセス部171を経由してMAC部130へと通知する。これにより、同期メッセージの送出に際してCPU170のスケジューラ機能を用いる必要が無くなる。このため、同期メッセージの送出において、低精度の水晶振動子150に起因する送出タイミングの揺らぎや、スケジューラ粒度に起因する送出タイミングの揺らぎが生じない。
またCPU170が、定期的な同期メッセージ送出処理から解放されることによりGNSSD処理,Delayreq送出処理など他処理に多くの時間を割くことが可能となり装置のパフォーマンス向上が期待できる。Delayreq送出処理部176の機能は、図3のDelayreq送出処理部1176の機能と同様であり、説明を省略する。
The Sync registration processing unit 177 notifies the MAC unit 130 of the synchronization message interval negotiated with the slave device 400, the destination address, and the like via the hardware access unit 171. This eliminates the need to use the scheduler function of the CPU 170 when sending out a synchronization message. Therefore, in the transmission of the synchronization message, the fluctuation of the transmission timing caused by the low-precision crystal oscillator 150 and the fluctuation of the transmission timing caused by the scheduler granularity do not occur.
Further, since the CPU 170 is released from the periodic synchronization message transmission processing, it is possible to devote a lot of time to other processing such as GNSSD processing and Delayreq transmission processing, and it is possible to expect improvement in the performance of the apparatus. The function of the Delayreq transmission processing unit 176 is the same as the function of the Delayreq transmission processing unit 1176 in FIG.

MAC部130は、Sync登録処理部177から指示を受け、Syncプロファイル記憶部134に、スレーブ装置400毎のSync特性を格納する。具体的には、MAC部130は、Sync interval(同期メッセージの送出間隔)、スレーブ装置400に至るアドレス情報、及び、同期メッセージを構成する各要素を取得し、Syncプロファイル記憶部134内の3つの要素に分解し格納する。3つの要素については後述する。   The MAC unit 130 receives an instruction from the Sync registration processing unit 177, and stores Sync characteristics for each slave device 400 in the Sync profile storage unit 134. Specifically, the MAC unit 130 acquires the Sync interval (the transmission interval of the synchronization message), the address information leading to the slave device 400, and each of the elements constituting the synchronization message, and the three in the Sync profile storage unit 134. Disassemble into elements and store. The three elements will be described later.

MAC部130は、さらにスケジューラ141を有し、スケジューラ141は、後述するようにSMIDを有する。SMIDは、7,812,500ナノ秒をさらに500分割した15,625ナノ秒間隔でカウントアップする。   The MAC unit 130 further includes a scheduler 141, and the scheduler 141 has an SMID as described later. The SMID counts up at intervals of 15,625 nanoseconds obtained by further dividing the 7,812,500 nanoseconds by 500.

スケジューラ141は、毎秒パルスである1PPS受信後はSMIDをカウントアップし、現時刻において送出すべき同期メッセージが存在するか否かをSMID_tabel内のnextIntervalとSYNCID counterとを比較することにより判定する。nextIntervalとSYNCID counterとが等しいと判定した場合、スケジューラ141は、sync送出パルス(Transmit pulse)をSync送出部136に対して出力する。
スケジューラ141は、スケジューラ部の例に該当する。
The scheduler 141 counts up the SMID after receiving 1 PPS which is a pulse per second, and determines whether or not there is a synchronization message to be sent at the current time by comparing nextInterval in the SMID_tabel with the SYNCID counter. If it is determined that the nextInterval and the SYNCID counter are equal, the scheduler 141 outputs a sync transmission pulse (Transmit pulse) to the Sync transmission unit 136.
The scheduler 141 corresponds to an example of a scheduler unit.

Sync生成部135は、CPU170のSync登録処理部177が予め設定した、同期メッセージを構成する3つの要素をマージ処理して同期メッセージを生成し得られた同期メッセージをSync送出部136に提示する。Sync生成部135は同期メッセージ生成部の例に該当する。
Sync送出部136は、後述する3方式のいずれかにより、同期メッセージの送出を行う。Sync送出部136は、送出部の例に該当する。
The Sync generation unit 135 merges three elements constituting the synchronization message set in advance by the Sync registration processing unit 177 of the CPU 170, generates a synchronization message, and presents the synchronization message obtained to the Sync transmission unit 136. The Sync generation unit 135 corresponds to an example of a synchronization message generation unit.
The Sync sending unit 136 sends the synchronization message by any of the three methods described later. The Sync sending unit 136 corresponds to an example of the sending unit.

なお、同期メッセージの送信を行う部分はMAC部130に限らない。例えば、MAC部130とは別のFPGAにて同期メッセージの送信を行う部分を構成するようにしてもよい。この場合、下位側の層から順に物理層チップ、FPGA、MACという構成になり、FPGAでタイムスタンプの打刻を行う。   Note that the part that transmits the synchronization message is not limited to the MAC unit 130. For example, a part other than the MAC unit 130 may be configured to transmit a synchronization message using an FPGA. In this case, the physical layer chip, the FPGA, and the MAC are configured in order from the lower layer, and the time stamp is stamped with the FPGA.

図7は、本実施形態におけるグランドマスタークロック装置が送出する同期メッセージにおける遅延の例を示す説明図である。同図において、横軸は時刻を表しており、図に向かって右側ほど後の時刻を示している。また、同図の縦には、同期メッセージ送出経路における各部を示している。
図7において、Sync登録処理部177は、毎正秒(1PPS)等間隔で同期メッセージを送出するものとしてスレーブ装置400とネゴシエーションしており、MAC部130のSyncプロファイル記憶部134に、送信間隔、同期メッセージを構成する各要素を登録する。CPU170が同期メッセージの送出に関して行う処理は、Syncプロファイル記憶部134への登録処理に限定される。これにより、CPU170は、その他のPTP処理並びに装置管理に必要なプロセスの実行に専念することができる。
FIG. 7 is an explanatory view showing an example of a delay in a synchronization message transmitted by the grand master clock device in the present embodiment. In the figure, the horizontal axis represents time, and indicates the later time toward the right of the figure. Further, the vertical lines in the figure show each part in the synchronous message transmission path.
In FIG. 7, the Sync registration processing unit 177 negotiates with the slave device 400 to send synchronization messages at regular intervals of every second (1 PPS), and the Sync profile storage unit 134 of the MAC unit 130 transmits the transmission interval, Register each element that composes the synchronization message. The process performed by the CPU 170 in connection with the transmission of the synchronization message is limited to the registration process in the Sync profile storage unit 134. This allows the CPU 170 to concentrate on the execution of processes necessary for other PTP processing and device management.

1PPSでの同期メッセージの送出は、SYNCプロファイル記憶部134に登録され、しかも後述するSMID(Sync message ID)単位でプロファイルを管理する。MAC部130では、GNSSを起源とする高精度の水晶振動子113によって内部の論理回路が動作する。MAC部130は、SMIDを定期監視するとともに、送出すべきSMIDが存在する場合に同期メッセージを組み立て、送出を実施する。   The transmission of the synchronization message in 1 PPS is registered in the SYNC profile storage unit 134, and manages the profile in units of SMID (Sync message ID) described later. In the MAC unit 130, the internal logic circuit operates with the high-precision crystal oscillator 113 originating from GNSS. The MAC unit 130 periodically monitors the SMID, assembles a synchronization message when there is an SMID to be transmitted, and performs transmission.

Sync送出部136は、後述する3つのルールのいずれかに基づいて同期メッセージの送出処理を行う。特に、後述する強制廃棄方式および送信時刻予約方式では、毎正秒に同期メッセージを送出することが可能となる。従ってグランドマスタークロック装置100における同期メッセージ送出タイミングの揺らぎ成分が無くなり、スレーブ装置400に対して通信経路における遅延成分や揺らぎ成分のみで同期メッセージを伝達することが可能になる。特に、通信経路における遅延成分Δdelayi(iは正整数)が一定である場合、同期メッセージが正確に一定間隔でスレーブ装置400に到達する。このように、CPUにおける揺らぎ成分を排除することで、スレーブ装置400における時刻精度の向上と時刻同期時間の短縮を図ることか可能となる。   The Sync sending unit 136 performs the sending process of the synchronization message based on any of the three rules described later. In particular, in the forced discard method and transmission time reservation method described later, it is possible to send out a synchronization message every every second. Therefore, the fluctuation component of the synchronization message transmission timing in the grandmaster clock device 100 is eliminated, and the synchronization message can be transmitted to the slave device 400 only by the delay component or fluctuation component in the communication path. In particular, when the delay component Δdelayi (i is a positive integer) in the communication path is constant, the synchronization message arrives at the slave device 400 exactly at regular intervals. As described above, by eliminating the fluctuation component in the CPU, it is possible to improve the time accuracy in the slave device 400 and shorten the time synchronization time.

図8は、IEEE1588v2の同期メッセージのフォーマットを示す説明図である。同図では、横方向に32ビット(bit)、つまり4バイト(BYTE)を示しており、左端のビットから回線に送出される。
また、同図の下方向に向けては、32ビットの集合が連続したデータとして表しており、上の行のデータから下の行のデータへと順に、回線に送信される。
また、同図の左端に記載している1、5、9、・・・は、32ビットの集合の左端、すなわち、ネットワークに最初に送出されるバイト位置を示している。例えば、上から1行目の左端のビットは、1バイト目に含まれており、上から2行目の左端のビットは、5バイト目に含まれている。
FIG. 8 is an explanatory view showing the format of an IEEE 1588 v2 synchronization message. In the figure, 32 bits (bit), that is, 4 bytes (BYTE) are shown in the horizontal direction, and are transmitted to the line from the leftmost bit.
In the downward direction of the figure, a set of 32 bits is represented as continuous data, and is transmitted to the line from the data of the upper row to the data of the lower row in order.
Further, 1, 5, 9,... Described at the left end of the figure indicate the left end of the set of 32 bits, that is, the byte position which is first sent to the network. For example, the leftmost bit of the first line from the top is included in the first byte, and the leftmost bit of the second line from the top is included in the fifth byte.

図8に示されるように、同期メッセージはFCS(Frame Check Sequence)を含まない場合で86バイトの固定長である。VLAN tagなどでその長さが変更になる可能性はあるが、グランドマスタークロック装置100内において固定長となる。
同期メッセージは複数のプロトコルにて構成される。
As shown in FIG. 8, the synchronization message has a fixed length of 86 bytes when it does not include the FCS (Frame Check Sequence). Although the length may be changed by a VLAN tag or the like, the length is fixed in the grand master clock device 100.
The synchronization message is composed of multiple protocols.

Ether headerはEthernet(登録商標)を伝搬するすべてのパケットに付与される領域であり、宛先MACアドレスであるMAC−DA、送信元MACアドレス(グランドマスタークロック装置100のMACアドレス)であるMAC−SA、継続するプロトコル種別を示すEtherTypeで構成される。なお同期メッセージの場合はIPv4であるため、Ethertype=0x0800で固定である。   The Ether header is an area given to all packets propagating Ethernet (registered trademark), MAC-DA which is a destination MAC address, and MAC-SA which is a transmission source MAC address (MAC address of the grand master clock device 100). , And EtherType indicating the type of protocol to be continued. In addition, since it is IPv4 in the case of a synchronous message, it is fixed to Ethertype = 0x0800.

IP headerはIPのバージョン番号(version、=4)、IPヘッダ長(length、=5)、サービス・タイプ(TOS)、データグラム長(data length、=72)、ID(ランダム値)、フラグフィールド(flag)およびフラグメントオフセット(fragment offset、=0x00)、TTL(=1)、プロトコル番号(protocol No、=17:UDP)、ヘッダチェックサム(header checksum、IPヘッダ部のチェックサム値、計算方式はRFC1071にて規定されている)で構成される。   IP header is IP version number (version = 4), IP header length (length = 5), service type (TOS), datagram length (data length = 72), ID (random value), flag field (Flag) and fragment offset (fragment offset, = 0x00), TTL (= 1), protocol number (protocol No, = 17: UDP), header checksum (header checksum, IP header part checksum value, calculation method is Defined in RFC 1071).

UDP headerは、送信元(グランドマスタークロック装置100)UDPポート番号(UDP-SP、=319:IEEE1588v2にて規定されている固定値)、相手先(スレーブ装置400)UDPポート番号(UDP-DP、=319:IEEE1588v2にて規定されている固定値)、UDPパケット長(UDP-length、=52)、UDPチェックサム(UDP-checksum、UDP疑似ヘッダ12byte+UDPヘッダ+UDPペイロード)の3つの部分の1の補数の和によって算出される値である。なおUDPチェックサムの値を0とすることで、相手先装置にてUDPチェックサム計算が無効化されチェックが実施されない。グランドマスタークロック装置の実装においてはタイムスタンプがリアルタイムに変化するため、UDPチェックサム領域を0とする実装が簡易であり多くグランドマスタークロック装置やソフトウェアベースのグランドマスタークロック装置に実装されている、しかしながらネットワーク上もしくは装置内の何らかの問題で時刻同期において最も重要なタイムスタンプの信頼度を損なうことは望ましくない。そこで、グランドマスタークロック装置100は、パケット毎にUDPチェックサムを演算し、UDPチェックサム領域内に格納する。   The UDP header is a source (grand master clock device 100) UDP port number (UDP-SP, = 319: fixed value defined in IEEE 1588 v2), destination (slave device 400) UDP port number (UDP-DP, = 319: 1's complement of 3 parts: fixed value specified in IEEE 1588 v 2), UDP packet length (UDP-length, = 52), UDP checksum (UDP-checksum, UDP pseudo header 12 bytes + UDP header + UDP payload) Is the value calculated by the sum of By setting the value of the UDP checksum to 0, the UDP checksum calculation is invalidated in the destination device and the check is not performed. Since the time stamp changes in real time in the implementation of the grand master clock device, the implementation that sets the UDP checksum area to 0 is simple and implemented in many grand master clock devices and software-based grand master clock devices, however It is not desirable to compromise the reliability of the most important timestamps in time synchronization due to any problem on the network or in the device. Therefore, the grand master clock device 100 calculates the UDP checksum for each packet and stores it in the UDP checksum area.

PTP headerは、IEEE1588v2にて規定された時刻同期パケット用のヘッダフォーマットであり同期メッセージも含まれる。Transmitspecificは今後の拡張のためにグランドマスタークロック装置100の管理者が自由に設定可能な4ビット値である(default=1)。メッセージタイプ(MessageType)は同期メッセージである(=0)。versionPTPは本願ではPTPv2を前提としているため(=2)である。   The PTP header is a header format for time synchronization packets defined in IEEE 1588 v 2 and includes synchronization messages. Transmitspecific is a 4-bit value (default = 1) freely configurable by the administrator of the grandmaster clock device 100 for future expansion. The message type (MessageType) is a synchronization message (= 0). In this application, version PTP is based on PTPv2 (= 2).

message lengthは、同期メッセージの場合(=44)固定である。domain Numberは、グランドマスタークロック装置が所属する時刻同期グループ=ドメインをグランドマスタークロック装置の管理者が設定する。FlagFieldはグランドマスタークロック装置の特性を設定するフィールドでありグランドマスタークロック装置の管理者が設定する。correction Fieldは、グランドマスタークロック装置では使用しない領域である。clockIdentityは、グランドマスタークロック装置を一意に示す識別子でありネットワーク上に複数のグランドマスタークロック装置が存在する場合等に有効な領域であるIEEE1588v2において、MACSAつまりネットワーク上に1個しか存在しないMACアドレスを3バイト毎に分割し、その間にFF−FFを挿入することで計8バイトとすることが規定されている。sourcePortIDはグランドマスタークロック装置の何番目のポートから出力されたメッセージであるかを示す領域である。sequenceIDは同期メッセージの送信に対しシーケンシャルに振られる番号であり、単一のスレーブ装置から見た場合、1ずつインクリメント(increment)するように見える。このIDにおいて同期メッセージの抜けを発見し何らかの対処をすることが可能となる。また経路によるIDの逆転など時刻同期を阻害する要因を削除することが可能となる。controlFieldは同期メッセージを表す(=0)。logMessagePeriodは、通常は0である。同期メッセージ payloadは同期メッセージの場合、originTimestampで構成される。originTimestampは、48ビットの秒領域と、32ビットのナノ秒領域で構成され、originTimestampは同期メッセージがグランドマスタークロック装置100から送出される際にGNSSを起源とする絶対時刻を打刻する領域である。以上のように同期メッセージが送付したい情報である時刻情報以外にも多数の情報を送付する必要がある。また、図8では、生成する情報を4種類に分類している。第1は、同一のグランドマスタークロック装置から送信する全ての同期メッセージで同一の値になる領域である。第2は、同一のグランドマスタークロック装置から送付され、かつ、同一のスレーブ装置に送出する同期メッセージで同一の値となる領域である。第3は、同期メッセージ毎に異なる値を有する領域である。第4は、リザーブ領域であり将来の拡張用である。   The message length is fixed in the case of a synchronization message (= 44). The domain number is set by the administrator of the grandmaster clock device for the time synchronization group = domain to which the grandmaster clock device belongs. FlagField is a field for setting the characteristics of the grandmaster clock device, and is set by the manager of the grandmaster clock device. The correction field is an area not used in the grand master clock device. clockIdentity is an identifier uniquely indicating a grandmaster clock device, and is an effective area when there are a plurality of grandmaster clock devices on the network, etc. In IEEE 1588v2, a MACSA, that is, a MAC address having only one MAC address on the network It is defined that a total of 8 bytes can be obtained by dividing every 3 bytes and inserting FF-FF between them. sourcePortID is an area indicating which port of the grandmaster clock device is the message output from. The sequenceID is a number sequentially assigned to the transmission of the synchronization message, and appears to be incremented by one when viewed from a single slave device. It is possible to detect the omission of the synchronization message in this ID and take some action. Moreover, it becomes possible to delete the factor which disturbs time synchronization, such as reversal of ID by a route. controlField represents a synchronization message (= 0). logMessagePeriod is usually 0. Synchronization Message Payload is composed of originTimestamp if it is a synchronization message. The originTimestamp is composed of a 48-bit second area and a 32-bit nanosecond area, and the originTimestamp is an area for stamping an absolute time originating from GNSS when the synchronization message is sent from the grandmaster clock device 100. . As described above, it is necessary to send a lot of information in addition to the time information which is the information that the synchronization message wants to send. Further, in FIG. 8, information to be generated is classified into four types. The first is an area having the same value in all synchronization messages transmitted from the same grand master clock device. The second is an area sent from the same grand master clock device and having the same value in the synchronization message sent to the same slave device. The third is an area having a different value for each synchronization message. The fourth is a reserve area for future expansion.

図9は、Syncプロファイル記憶部134(グローバルプロファイル記憶部134−1)が記憶するグローバルプロファイル(Gloval profile)のデータ構造の例を示す説明図である。
グローバルプロファイルは、図8に示す各領域のうち、同一のグランドマスタークロック装置から送信する全ての同期メッセージで同一の値になる領域(第1の領域)のデータを纏めたものである。
FIG. 9 is an explanatory view showing an example of the data structure of the global profile (Gloval profile) stored by the Sync profile storage unit 134 (global profile storage unit 134-1).
The global profile is a collection of data of areas (first areas) having the same value in all synchronization messages transmitted from the same grand master clock device among the areas shown in FIG.

図9に示す48バイトは、リザーブ領域(RSVD)も含めて常に同一の値(各同期メッセージに共通の値)であり、Syncプロファイル記憶部134は、1つのグローバルプロファイルを記憶する。単一のメモリ領域で管理することは装置コストの面から有効な手段である。
例外は、ID(random value)領域であり、ID(random value)領域の値は毎パケット異なる。ID(random value)領域の値は文字通りランダムであり一意の値をGloval profile内に保持する必要は無い。ただし、図9の例では、ランダム値を生成するseed値(初期値)を設定するなどの利用のために領域を確保している。なお、ID(random value)領域のランダム値生成方式として、公知のランダム値生成方式を用いることができる。
The 48 bytes shown in FIG. 9 are always the same value (a value common to each synchronization message) including the reserved area (RSVD), and the Sync profile storage unit 134 stores one global profile. Managing in a single memory area is an effective means in terms of device cost.
An exception is an ID (random value) area, and the value of the ID (random value) area differs every packet. The values in the ID (random value) area are literally random, and there is no need to keep unique values in the Gloval profile. However, in the example of FIG. 9, an area is secured for use such as setting a seed value (initial value) for generating a random value. In addition, a well-known random value production | generation system can be used as a random value production | generation system of ID (random value) area | region.

図10は、Syncプロファイル記憶部134(SMIDプロファイル記憶部134−2)が記憶するSMIDプロファイル(SMID_profile)のデータ構造の例を示す説明図である。
SMIDプロファイルは、図8に示す各領域のうち、同一のグランドマスタークロック装置から送出され、かつ、同一のスレーブ装置に送出される同期メッセージで同一の値となる領域(第2の領域)のデータを纏めたものである。なお、図10に示すように、リザーブ領域(RSVD)を含んでいる。
Syncプロファイル記憶部134は、スレーブ装置400毎にSMIDプロファイルを記憶する。図10に示すSMIDプロファイルは、28バイトで構成されている。500個のスレーブ装置400を時刻同期する場合、Syncプロファイル記憶部134は、28×500=14,000バイトの領域を用いてSMIDプロファイルを記憶する。
FIG. 10 is an explanatory drawing showing an example of the data structure of the SMID profile (SMID_profile) stored by the Sync profile storage unit 134 (SMID profile storage unit 134-2).
The SMID profile is data of an area (second area) having the same value in the synchronization message transmitted from the same grand master clock device and transmitted to the same slave device among the areas shown in FIG. Give up on As shown in FIG. 10, a reserve area (RSVD) is included.
The Sync profile storage unit 134 stores an SMID profile for each slave device 400. The SMID profile shown in FIG. 10 is composed of 28 bytes. When time synchronization is performed on 500 slave devices 400, the Sync profile storage unit 134 stores the SMID profile using an area of 28 × 500 = 14,000 bytes.

図11は、Syncプロファイル記憶部134(SMIDテーブル記憶部134−3)が記憶するSMIDテーブル(SMID_table)のデータ構造の例を示す説明図である。
SMIDテーブルは、図8に示す各領域のうち、同期メッセージ毎に異なる値を有する領域(第3の領域)のデータを纏めたものである。なお、図11に示すように、リザーブ領域(RSVD)を含んでいる。
図11に示すSMIDテーブルは、8バイトで構成されている。500個のスレーブ装置400を時刻同期する場合、Syncプロファイル記憶部134は、8×500=4,000バイトの領域を用いてSMIDテーブルを記憶する。
FIG. 11 is an explanatory drawing showing an example of the data structure of the SMID table (SMID_table) stored by the Sync profile storage unit 134 (SMID table storage unit 134-3).
The SMID table is a table in which data of areas (third areas) having different values for each synchronization message among the areas shown in FIG. 8 are collected. Note that, as shown in FIG. 11, a reserve area (RSVD) is included.
The SMID table shown in FIG. 11 is composed of 8 bytes. When time synchronization is performed on 500 slave devices 400, the Sync profile storage unit 134 stores the SMID table using an area of 8 × 500 = 4,000 bytes.

以上より、Syncプロファイル記憶部134がGloval profile、SMIDプロファイル、及びSMIDテーブルを記憶するのに必要な記憶容量は式(1)で求めることができる。   From the above, the storage capacity necessary for the Sync profile storage unit 134 to store the Gloval profile, the SMID profile, and the SMID table can be determined by Expression (1).

48+14,000+4,000=18,048(バイト) ・・・ (1)       48 + 14,000 + 4,000 = 18,048 (bytes) (1)

約18キロバイト(k BYTE)の領域は昨今のメモリ技術においては極めて小さく、ASICやFPGA内に搭載するにあたって障害とならない。   The area of about 18 kilobytes (k BYTE) is extremely small in modern memory technology and does not pose an obstacle for mounting in an ASIC or FPGA.

図12は、MAC部130の機能構成を示す概略ブロック図である。同図において、MAC部130は、受信タイムスタンプユニット(RTSU)131と、受信FIFO132と、送信FIFO133と、Syncプロファイル記憶部134と、Sync生成部135と、Sync送出部136と、送信タイムスタンプユニット(TTSU)137と、SYNCメッセージFIFO139と、スケジューラ141と、プレシジョンタイムカウンターユニット(PRTCU)142とを備える。Syncプロファイル記憶部134は、グローバルプロファイル記憶部134−1と、SIMDプロファイル記憶部134−2と、SMIDテーブル記憶部134−3とを備える。   FIG. 12 is a schematic block diagram showing a functional configuration of the MAC unit 130. As shown in FIG. In the figure, the MAC unit 130 includes a reception time stamp unit (RTSU) 131, a reception FIFO 132, a transmission FIFO 133, a Sync profile storage unit 134, a Sync generation unit 135, a Sync transmission unit 136, and a transmission time stamp unit. (TTSU) 137, a SYNC message FIFO 139, a scheduler 141, and a precision time counter unit (PRTCU) 142. The Sync profile storage unit 134 includes a global profile storage unit 134-1, a SIMD profile storage unit 134-2, and an SMID table storage unit 134-3.

MAC部130は、GNSSを起源とする高精度の1PPS(秒パルス)および125メガヘルツのクロック信号を受信する。そして、MAC部130の内部の各プロセスは、125メガヘルツにて極めて正確なタイミングで動作を行う。またToDは日付および時刻情報である。   The MAC unit 130 receives a high-precision 1 PPS (second pulse) originating from GNSS and a clock signal of 125 MHz. Then, each process in the MAC unit 130 operates at extremely accurate timing at 125 MHz. Also, ToD is date and time information.

プレシジョンタイムカウンターユニット142は、装置内時刻源であり、現在時刻の年月日時分秒の情報を48ビットで記憶するSec領域と、125メガヘルツの逆数である8ナノ秒を最小単位として秒未満の時刻情報を30ビットで記憶するNsec領域とを有する。プレシジョンタイムカウンターユニット142は、ToDを取得して秒情報を確定し、125MHzの逆数である8nsにてNsec領域をカウントアップする。また、プレシジョンタイムカウンターユニット142は、1PPSパルスにてNsecカウンターを0リセットし毎正秒にてNsecを微調整する機構を有する。プレシジョンタイムカウンターユニット142によって生成された秒情報、ナノ秒情報は受信タイムスタンプユニット(RTSU)131及び送信タイムスタンプユニット(TTSU)137に通知され同期メッセージ生成時にoriginalTimestamp領域に打刻される。   The precision time counter unit 142 is a device internal time source, and stores a Sec field storing 48 bits of date, hour, minute, and second information of the current time, and subseconds with a minimum unit of 8 nanoseconds, which is the reciprocal of 125 MHz. And an Nsec area for storing time information in 30 bits. The precision time counter unit 142 acquires ToD, determines the second information, and counts up the Nsec region at 8 ns, which is the reciprocal of 125 MHz. Further, the precision time counter unit 142 has a mechanism for resetting the Nsec counter to 0 with 1 PPS pulse and finely adjusting Nsec in every positive second. The second information and nanosecond information generated by the precision time counter unit 142 are notified to the reception time stamp unit (RTSU) 131 and the transmission time stamp unit (TTSU) 137, and are stamped in the originalTimestamp field when the synchronization message is generated.

Syncプロファイル記憶部134はDPRAM(デュアルポートRAM)にて構成されている。これにより、CPU170とMAC部130の各プロセスとが、非同期にSyncプロファイル領域134にアクセスすることによる待ち合わせを排除することができる。Syncプロファイル記憶部134は、図9、図10及び図11にて前述したグローバルプロファイル、SMIDプロファイル<0〜499>およびSMIDテーブル<0〜499>を記憶するメモリ空間である。具体的には、グローバルプロファイル記憶部134−1は、グローバルプロファイルを記憶する。SMIDプロファイル記憶部134−2は、SMIDプロファイルを記憶する。SMIDテーブル記憶部134−3は、SMIDテーブルを記憶する。
Syncプロファイル記憶部134へのアクセスでは、CPU170が、アドレス(ADDR)およびデータ(DATA)を指定して各データの書込を行う。CPU170が書き込んだデータは、MAC部130の各プロセスからは固定値として扱われる。また、リード機能を利用することで現在の同期メッセージの送出状態を監視することが可能である。
The Sync profile storage unit 134 is configured by a DPRAM (dual port RAM). As a result, it is possible to eliminate waiting due to the CPU 170 and each process of the MAC unit 130 accessing the Sync profile area 134 asynchronously. The Sync profile storage unit 134 is a memory space for storing the global profile, the SMID profile <0 to 499>, and the SMID table <0 to 499> described above with reference to FIGS. 9, 10 and 11. Specifically, the global profile storage unit 134-1 stores a global profile. The SMID profile storage unit 134-2 stores an SMID profile. The SMID table storage unit 134-3 stores the SMID table.
In access to the Sync profile storage unit 134, the CPU 170 writes each data by specifying an address (ADDR) and data (DATA). The data written by the CPU 170 is treated as a fixed value by each process of the MAC unit 130. In addition, it is possible to monitor the current sending state of the synchronization message by using the read function.

受信FIFO132は、物理層チップ120がネットワーク810から受信したPTPおよびPTP以外のパケットを記憶するメモリ空間である。受信FIFO132は、受信タイムスタンプユニット131から到達した受信データを、DataEnable(データ有りを示す信号)がアサート(assert)されている間FIFO形式で格納する。また、受信FIFO132はEmptyFlagを有し、データが存在する場合、EmptyFlagをネゲート(negate)する。これにより、有効な受信データが存在することをCPU170に伝達することができる。   The reception FIFO 132 is a memory space for storing PTPs received by the physical layer chip 120 from the network 810 and packets other than PTPs. The reception FIFO 132 stores the reception data received from the reception time stamp unit 131 in a FIFO format while DataEnable (signal indicating that there is data) is asserted. Also, the receive FIFO 132 has an EmptyFlag, and negates the EmptyFlag if data is present. Thus, the presence of valid reception data can be transmitted to the CPU 170.

CPU170は、EmptyFlagを定期的に監視し(低精度の水晶振動子150を用いた)CPUクロックに同期して、受信DATAのCPU170への取込処理を行う。なお、CPU170が取得するデータは、PTP以外にも様々なものがあってもよい。   The CPU 170 periodically monitors the EmptyFlag and performs processing for loading the received DATA into the CPU 170 in synchronization with the CPU clock (using the low-precision crystal oscillator 150). The data acquired by the CPU 170 may be various other than PTP.

送信FIFO133は、CPU170がMAC部130へ出力するパケットを保存するメモリ空間である。CPU170がMAC部130へ出力するパケットは、同期メッセージ以外のパケット(一般メッセージのパケット)である。CPU170は、FullFlagがネゲートされている場合に、送信DATAを送信FIFO133に対して出力する。一方、FullFlagがアサートされている場合、CPU170はパケット送出処理を行わず、送出すべきデータをメインメモリ等に保管する。送信FIFO133はまた、EmptyFlag、ReadPulse、送信DATAの各パスにてSync送出部136と接続される。
Sync送出部136は、同期メッセージが存在しない場合にはReadPulse(FIFOからデータを読み込むための信号)を出力し、送信DATAの読み込みを実行する。
The transmission FIFO 133 is a memory space for storing a packet output from the CPU 170 to the MAC unit 130. The packet output from the CPU 170 to the MAC unit 130 is a packet other than the synchronization message (a packet of a general message). The CPU 170 outputs the transmission DATA to the transmission FIFO 133 when FullFlag is negated. On the other hand, when FullFlag is asserted, the CPU 170 does not perform packet transmission processing, and stores data to be transmitted in the main memory or the like. The transmission FIFO 133 is also connected to the Sync transmission unit 136 in each path of EmptyFlag, ReadPulse, and transmission DATA.
The Sync transmission unit 136 outputs ReadPulse (a signal for reading data from the FIFO) when there is no synchronization message, and executes reading of the transmission DATA.

SYNCメッセージFIFO139は、同期メッセージのみが格納される領域でありSync生成部135が生成した同期メッセージを格納する。SYNCメッセージFIFO139が格納する同期メッセージは、常に1個以下である。また、SYNCメッセージFIFO139は、EmptyFlag、ReadPulse、送信DATAにてSync送出部136と接続される。SYNCメッセージFIFO139は、EmptyFlag(データ無しを示す信号)がアサートされた際にSync送出部136のルールに従っていずれかの時刻タイミング後にReadPulseに従って送信DATAを送出する。   The SYNC message FIFO 139 is an area in which only the synchronization message is stored, and stores the synchronization message generated by the Sync generation unit 135. The SYNC message FIFO 139 always stores one or less synchronization messages. Also, the SYNC message FIFO 139 is connected to the Sync sending unit 136 by Empty Flag, Read Pulse, and transmission DATA. The SYNC message FIFO 139 sends out the transmission DATA according to the ReadPulse after any time timing according to the rule of the Sync sending unit 136 when the EmptyFlag (signal indicating no data) is asserted.

スケジューラ141は、1秒/128でカウントアップするSYNCIDを備える。SYNCIDは、同期メッセージ送出におけるSyncIntervalと対応する。
また、スケジューラ141は、SYNCIDの1サイクルをさらに500に分割したタイミングでカウントアップするカウンターであるSMIDを備える。
The scheduler 141 has a SYNC ID counting up at 1 second / 128. The SYNCID corresponds to the SyncInterval in sync message transmission.
Further, the scheduler 141 includes SMID which is a counter that counts up at the timing when one cycle of the SYNCID is further divided into 500.

また、スケジューラ141は、SMIDの値を、SMIDテーブルのアドレス及びSMIDプロファイルのアドレスへと変換し、アドレス情報をSyncプロファイルに設定する。スケジューラ141は、アドレスが決定したSMIDテーブルから、nextInterval情報、syncIntervalおよびsequenceIDを読み出す。nextIntervalがSYNCIDと一致した場合、スケジューラ141は、同期メッセージを送出するタイミングであると判定し、TransmitPulseをSync生成部135およびSync送出部136に対して出力する。また、nextIntervalがSYNCIDと一致した場合、スケジューラ141は、nextIntervalの値とsequenceIDの値とを更新する。具体的には、スケジューラ141は、nextIntervalの値を、syncIntervalの値から算出した次回の送出タイミングに更新する。また、スケジューラ141は、sequenceIDに1をインクリメントした数値をSMIDテーブルに対して書き込む。   The scheduler 141 also converts the SMID value into the address of the SMID table and the address of the SMID profile, and sets the address information in the Sync profile. The scheduler 141 reads nextInterval information, syncInterval, and sequenceID from the SMID table determined by the address. If the nextInterval matches the SYNCID, the scheduler 141 determines that it is the timing to transmit a synchronization message, and outputs TransmitPulse to the Sync generator 135 and the Sync transmitter 136. Also, when the nextInterval matches the SYNCID, the scheduler 141 updates the value of the nextInterval and the value of the sequenceID. Specifically, the scheduler 141 updates the value of nextInterval to the next transmission timing calculated from the value of syncInterval. Also, the scheduler 141 writes a numerical value obtained by incrementing 1 in sequenceID to the SMID table.

ここで、nextIntervalは、スレーブ装置400毎に設定されている同期メッセージ送出間隔に対応するための情報である。同期メッセージ送出間隔が128PPSに設定されているスレーブ装置400に対しては、グランドマスタークロック装置100は、SyncIDが1インクリメントする間隔と同じ間隔で同期メッセージを送出すればよい。一方、同期メッセージ送出間隔が64PPSに設定されているスレーブ装置400に対しては、グランドマスタークロック装置100は、SyncIDが2インクリメントする間隔と同じ間隔で同期メッセージを送出する必要がある。   Here, nextInterval is information for corresponding to the synchronization message transmission interval set for each slave device 400. With respect to the slave device 400 in which the synchronization message transmission interval is set to 128 PPS, the grand master clock device 100 may transmit the synchronization message at the same interval as the SyncID incrementing interval. On the other hand, for the slave device 400 in which the synchronization message transmission interval is set to 64 PPS, the grand master clock device 100 needs to transmit the synchronization message at the same interval as the interval in which the SyncID is incremented by two.

そこで、スケジューラ141はスレーブ装置400毎にSyncプロファイル記憶部134に格納しているnextIntervalとSMIDとを比較する。nextIntervalの値とSMIDの値とが同じであると判定した場合、スケジューラ141は、同期メッセージを送出するタイミングが到来したと判定する。
さらに、スケジューラ141は、スレーブ装置400毎にSyncプロファイル記憶部134に格納しているsyncIntervalから次回の送出タイミングを算出しnextIntervalに書き込む。128PPSが規格上の最小間隔であるため、算出式を128÷SyncIntervalとし、現在のnextInterval値に上記算出結果を加算することとする。
例えば、同期メッセージ送出間隔が64PPSに設定されているスレーブ装置400の場合、128÷64=2となり、nextIntervalに記憶されていた値に2を加算しnextInterval領域への書き込み(更新)を行う。
また、同期メッセージ送出間隔が32PPSに設定されているスレーブ装置400の場合、128÷32=4となり、nextIntervalに記憶されていた値に4を加算しnextInterval領域への書き込み(更新)を行う。
Therefore, the scheduler 141 compares the nextInterval stored in the Sync profile storage unit 134 with the SMID for each slave device 400. If it is determined that the value of nextInterval and the value of SMID are the same, the scheduler 141 determines that the timing for transmitting the synchronization message has come.
Further, the scheduler 141 calculates the next transmission timing from the sync Interval stored in the Sync profile storage unit 134 for each slave device 400 and writes the next transmission timing. Since 128 PPS is the standard minimum interval, the calculation formula is set to 128 ÷ Sync Interval, and the above calculation result is added to the current next Interval value.
For example, in the case of the slave device 400 in which the synchronous message transmission interval is set to 64 PPS, 128 ÷ 64 = 2, and 2 is added to the value stored in nextInterval to write (update) in the nextInterval area.
Further, in the case of the slave apparatus 400 in which the synchronization message transmission interval is set to 32 PPS, 128 ÷ 32 = 4, 4 is added to the value stored in nextInterval, and writing (updating) to the nextInterval area is performed.

Sync生成部135は、スケジューラ141からのTransmit pulseを受信すると、SMIDテーブルおよびSMIDプロファイルからデータを読み出す。なお、アドレスについては既にスケジューラ141にて決定しているため、読み出す必要は無い。また、Sync生成部135は、全ての同期メッセージに共通のグローバルプロファイルを読み出し、図8にて示した同期メッセージを組み立てる。組み立て処理は単純なフィールドの移動のみで完了する。またID領域に関してはランダムの値が期待されるので、Sync生成部135は、ランダム値ジェネレータにてランダム値を挿入する。Sync生成部135が用いるランダム値ジェネレータは、ランダム値を生成可能なものであればよく、公知のランダム値ジェネレータを用いることができる。
Sync生成部135は、同期メッセージの組み立てが完了すると、直ちに当該同期メッセージをSYNCメッセージFIFO139へ出力する。
When receiving the Transmit pulse from the scheduler 141, the Sync generation unit 135 reads data from the SMID table and the SMID profile. Since the address has already been determined by the scheduler 141, there is no need to read it. Also, the Sync generation unit 135 reads a global profile common to all synchronization messages, and assembles the synchronization message shown in FIG. The assembly process is completed with only simple field movement. In addition, since a random value is expected for the ID area, the Sync generation unit 135 inserts a random value with a random value generator. The random value generator used by the Sync generation unit 135 may be any random value generator that can generate a random value, and a known random value generator can be used.
The Sync generation unit 135 outputs the synchronization message to the SYNC message FIFO 139 as soon as the assembly of the synchronization message is completed.

Sync送出部136は、同期メッセージ送信ルール(Sync transmit rule)をCPU170から設定可能なレジスタ領域を有する。当該レジスタにて、(1)強制廃棄方式(Discard)、(2)高優先送出方式(H.Priority)、(3)送信時刻予約方式(Reserved)の3種の送出方式のいずれかを設定可能である。同期メッセージ送信ルールの設定は、例えば、グランドマスタークロック装置100の管理者が、グランドマスタークロック装置100を適用するネットワークの特性を考慮して行う。   The Sync transmission unit 136 has a register area in which the synchronization message transmission rule (Sync transmit rule) can be set from the CPU 170. In the register, one of three types of transmission methods can be set: (1) forced discard method (Discard), (2) high priority transmission method (H.Priority), and (3) transmission time reservation method (Reserved) It is. For example, the administrator of the grandmaster clock device 100 performs the setting of the synchronous message transmission rule in consideration of the characteristics of the network to which the grandmaster clock device 100 is applied.

(1)強制廃棄方式では、同期メッセージの送出タイミングが到来すると、現在送信中の全ての同期メッセージ以外のパケット(一般メッセージのパケット。以後、CPUパケットと称する)の送出を中断して同期メッセージを送出する方式である。送出を中断したパケットについては、当該パケットの終了まで廃棄処理を行う。
相手装置はエラーを検知するが上位層による再送が期待できる場合に、特に有効な方式である。
(2)高優先送出方式では、同期メッセージの送出タイミングが到来すると、現在送信中のCPUパケットが完了するのを待ち、次回の送出では必ず同期メッセージを送出する。仮にCPUパケットが連続して発行されている場合においても最優先で同期メッセージを送信する。
(3)送信時刻予約方式では、CPUパケットの最大値がEthernet(登録商標)の規定で1518バイトと決まっていることに着目して、同期メッセージの送出タイミングから1518バイト分前(実際にはIFGやFCSが存在するため1542オクテット(octet)時間前)の時刻になると、新たなCPUパケットの送出を抑制する。これにより、1542オクテット経過後に、確実に同期メッセージを送出することができる。なお、1542オクテットは一般メッセージの送出に要する時間として規定されている規定時間の例に該当する。また、CPUパケットは、同期メッセージ及び一般メッセージの例に該当する。
送信時刻予約方式では、1542オクテット時間が経由した時点で同期メッセージの送出を開始することで、メッセージの送出間隔は常に一定となる。時刻同期においては、メッセージの到着速度は問題ではなく、メッセージの間隔ならびにメッセージ内のタイムスタンプの正確度が重要であるため、送信時刻予約方式が有効である。また、送信時刻予約方式では同期メッセージが存在する場合にのみCPUパケットの送出を停止するため、スレーブ装置400の台数が少ない場合など、同期メッセージの送出間隔(Sync interval)が長い場合でも、CPUメッセージを効率的に送出することができる。
なお、ここでは一般メッセージの送出に要する最長時間を規定時間としているが、これに限らず、規定時間は一般メッセージの送出に要する時間であればよい。この場合でも、同期メッセージの送出間隔は一定となる。
(1) In the forced discard method, when the transmission timing of a synchronization message arrives, transmission of packets (general message packets, hereinafter referred to as CPU packets) other than all synchronization messages currently being transmitted is interrupted and the synchronization message is output. It is a method of sending. The packet whose transmission has been interrupted is discarded until the end of the packet.
This is a particularly effective method when the partner apparatus detects an error but retransmission by the upper layer can be expected.
(2) In the high priority transmission method, when the transmission timing of the synchronization message comes, the CPU packet waiting for the current transmission is waited for completion, and the next transmission always transmits the synchronization message. Even if CPU packets are issued consecutively, the synchronization message is transmitted with the highest priority.
(3) In the transmission time reservation method, focusing on the fact that the maximum value of the CPU packet is determined to be 1518 bytes by Ethernet (registered trademark), 1518 bytes before the transmission timing of the synchronization message (actually IFG At the time of 1542 octets (octet time before) due to the presence of the FCS and the FCS, transmission of a new CPU packet is suppressed. This makes it possible to send out the synchronization message with certainty after 1542 octets. The 1542 octets correspond to an example of defined time defined as the time required to send a general message. The CPU packet also corresponds to an example of a synchronization message and a general message.
In the transmission time reservation method, the transmission interval of messages is always constant by starting transmission of synchronization messages when 1542 octets have passed. In time synchronization, the arrival time of the message does not matter, and the transmission time reservation scheme is effective because the message interval and the accuracy of the time stamp in the message are important. In addition, since transmission of CPU packets is stopped only when there is a synchronization message in the transmission time reservation method, even if the transmission interval (Sync interval) of synchronization messages is long, such as when the number of slave devices 400 is small, the CPU message Can be sent out efficiently.
Here, although the maximum time required for sending a general message is defined as a specified time, the present invention is not limited to this, and the specified time may be any time required for sending a general message. Even in this case, the transmission interval of the synchronization message is constant.

受信タイムスタンプユニット131は、受信した時刻同期パケットに対し、プレシジョンタイムカウンターユニット142から得た時刻情報を打刻する処理を行う。
送信タイムスタンプユニット137は、送信する時刻同期パケットに対し、プレシジョンタイムカウンターユニット142から得た時刻情報を打刻する処理を行う。
受信タイムスタンプユニット131、送信タイムスタンプユニット137共に、時刻同期パケットを認識して時刻情報を打刻する。同期メッセージも時刻同期パケットであることから、送信タイムスタンプユニット137は、同期メッセージにも正確な時刻情報を打刻する。
The reception time stamp unit 131 performs processing for imprinting time information obtained from the precision time counter unit 142 on the received time synchronization packet.
The transmission time stamp unit 137 performs processing for imprinting time information obtained from the precision time counter unit 142 on the time synchronization packet to be transmitted.
The reception time stamp unit 131 and the transmission time stamp unit 137 both recognize the time synchronization packet and stamp time information. Since the synchronization message is also a time synchronization packet, the transmission timestamp unit 137 also stamps accurate time information in the synchronization message.

物理層チップ120は、ネットワーク810の物理インタフェースと、MAC部130の物理インタフェースとの変換処理を行う。   The physical layer chip 120 performs conversion processing between the physical interface of the network 810 and the physical interface of the MAC unit 130.

図13は、同期メッセージのデータ構造の例を示す説明図である。同図に向かって左がMSBであり、ネットワーク810に対して最初に送信されるデータである。Ethernet(登録商標)の規定でインターフレームギャップ(IFG)は最低12オクテット必要である。インターフレームギャップは、フレーム間を分離するために設けられている。
preamble+FSDは7オクテットのpreambleと1オクテットのFSD(フレームスタートデリミタ)にて構成されている。preamble+FSDは、それ以後、Etherパケットのペイロードがスタートすることを示すフラグ領域である。
FIG. 13 is an explanatory view showing an example of the data structure of the synchronization message. The left side of the figure is the MSB, which is the first data transmitted to the network 810. According to Ethernet (registered trademark), an interframe gap (IFG) needs at least 12 octets. An interframe gap is provided to separate the frames.
The preamble + FSD is composed of 7 octet preamble and 1 octet FSD (Frame Start Delimiter). The preamble + FSD is a flag area indicating that the payload of the Ether packet starts thereafter.

IEEE1588v2同期メッセージ(Sync messasge)は、IEEE1588v2にて規定されたフォーマットの同期メッセージが格納される領域である。IEEE1588v2同期メッセージは、図8で示した複数の要素によって構成され、時刻情報をグランドマスタークロック装置100からスレーブ装置400に対して伝達する。IEEE1588v2同期メッセージのサイズは固定長であり、UDPで同期メッセージを構成す場合は86バイトである。   The IEEE 1588 v2 synchronization message (Sync message) is an area in which a synchronization message of a format defined in the IEEE 1588 v2 is stored. The IEEE 1588 v2 synchronization message is composed of a plurality of elements shown in FIG. 8 and transmits time information from the grand master clock unit 100 to the slave unit 400. The size of the IEEE 1588 v2 synchronization message is a fixed length, and is 86 bytes when the synchronization message is configured by UDP.

FCSはフレームチェックシーケンスであり、Etherパケットのデータ領域から一意に算出されるチェックサム領域である。FCSは、伝送路上で何らかの障害が発生し、パケットのデータ領域を信頼できない場合に、当該パケットを破棄できるように設けられている。また、FCSは回線の品質を示す指標として用いられることもある。   The FCS is a frame check sequence, which is a checksum area uniquely calculated from the data area of the Ether packet. The FCS is provided to be able to discard the packet when some failure occurs on the transmission path and the data area of the packet can not be trusted. Also, the FCS may be used as an index indicating the quality of the line.

同期メッセージの要素を全て合わせると110オクテットのサイズとなる。また1オクテットは8ビットにて構成されるため、110オクテットは880ビットとなる。ここで880ビットがどの程度帯域に対する影響を及ぼすかを換算するために、10ギガビット毎秒(Gbps)、1ギガビット毎秒それぞれの回線レートで送信した場合のパケット占有時間を算出すると、10ギガビット毎秒の場合は88ナノ秒、1ギガビット毎秒の場合は880ナノ秒となる。ここで、同期メッセージは秒間最大128回発行可能であることがITU−T G.8265で規定されており、1秒/128回=7,812,500ナノ秒の間隔となる。従って、単一のスレーブ装置400に対して時刻同期を行う場合、10ギガビット毎秒、1ギガビット毎秒のいずれの回線レートにおいても問題なく同期メッセージを送出可能である。   If all the elements of the synchronization message are combined, the size is 110 octets. Also, since one octet is composed of 8 bits, 110 octets are 880 bits. Here, in order to calculate how much the 880 bits affect the bandwidth, the packet occupancy time when transmitting at 10 gigabits per second (Gbps) and 1 gigabit per second, respectively, is 10 gigabits per second Is 88 nanoseconds, and 1 gigabit per second is 880 nanoseconds. Here, it is possible that the synchronization message can be issued up to 128 times per second. It is specified in 8265, and it becomes an interval of 1 sec / 128 times = 7,812,500 nanoseconds. Therefore, when time synchronization is performed for a single slave device 400, synchronization messages can be sent without problems at any line rate of 10 Gigabits per second or 1 gigabit per second.

図14は、複数のスレーブ装置400が存在するネットワークにおける同期メッセージの送出間隔の例を示す説明図である。同図では、同期メッセージの送信間隔のワーストケースを示している。具体的には、最もネットワーク帯域がひっ迫する場合の例を示している。上記のように、各同期メッセージは、最短で7,812,500ナノ秒の間隔となる。図14では、この同期メッセージを500個のスレーブ装置400に対して送出するケースを示している。   FIG. 14 is an explanatory drawing showing an example of a transmission interval of synchronization messages in a network in which a plurality of slave devices 400 exist. The figure shows the worst case of the transmission interval of the synchronization message. Specifically, an example is shown in which the network bandwidth is the closest. As noted above, each synchronization message will be at least 7,812,500 nanoseconds apart. FIG. 14 shows the case where this synchronization message is sent to 500 slave devices 400.

7,812,500ナノ秒をさらにスレーブ装置400の数である500に分割する。1つのスレーブ装置400に割り当て可能な同期メッセージの送信間隔は、7,812,500ナノ秒÷500=15,625ナノ秒である。この15,625ナノ秒を同期メッセージに関する最小時間間隔として定義する。図13を参照して説明したパケット占有時間のうち、回線速度が最も低速であり1つの同期メッセージの送信時間が最長となる1ギガビット毎秒においても、15,625ナノ秒>880ナノ秒となる。従って、同期メッセージに着目した場合、帯域を確保可能である。ただし、同期メッセージ以外の通信量に応じて、グランドマスタークロック装置100が一度に制御するスレーブ装置400の数×各スレーブ装置400のSYNC intervalの積を適切な値に配分することが必要である。なお、SYNC intervalは、スレーブ装置400毎に設定可能である。   The 7,812,500 nanoseconds are further divided into 500 which is the number of slave devices 400. The transmission interval of synchronization messages that can be assigned to one slave device 400 is 7,812,500 nanoseconds / 500 = 15,625 nanoseconds. This 15,625 nanoseconds is defined as the minimum time interval for synchronous messages. Among the packet occupation times described with reference to FIG. 13, even at 1 gigabit per second, where the line speed is the slowest and the transmission time of one synchronization message is the longest, 15,625 nanoseconds> 880 nanoseconds. Therefore, when focusing on the synchronization message, the bandwidth can be secured. However, it is necessary to allocate the product of the number of slave devices 400 controlled by the grandmaster clock device 100 at one time by the SYNC interval of each slave device 400 to an appropriate value according to the amount of communication other than the synchronization message. The SYNC interval can be set for each slave device 400.

図14では、1秒の最初に1番目のSyncスロットにSyncID0を割り当て、最大127までSyncIDがカウントアップする。SyncIDは、127となった後0になる。また同期メッセージを送出するタイミングを生成するためにSMIDを導入し、各SMIDと対応付けて、スレーブ装置400に関する情報を格納するエリアを設ける。
SMIDは0〜499の正整数の値をとり、15,625ナノ秒でカウントアップする構成とする。なお、同一のスレーブ装置400に対する同期メッセージ情報には、必ず同一のSMIDを対応付ける必要がある。どのSMIDを利用するかは例えば、グランドマスタークロック装置100の管理者が決定する。同期メッセージ間隔を一定にするために1つのスレーブ装置400に対応するSMIDは一意である必要がある。
なお、SyncIDは、第1カウンターの例に該当する。SMIDは、第2カウンターの例に該当する。
In FIG. 14, SyncID 0 is assigned to the first Sync slot at the beginning of one second, and the SyncID counts up up to 127. SyncID becomes 0 after being 127. Also, in order to generate timing for sending a synchronization message, an SMID is introduced, and an area for storing information on the slave device 400 is provided in association with each SMID.
The SMID takes a positive integer value of 0 to 499 and counts up in 15,625 nanoseconds. Note that it is necessary to associate the same SMID with the synchronization message information for the same slave device 400 without fail. The manager of the grandmaster clock device 100 determines, for example, which SMID to use. In order to make the synchronization message interval constant, the SMID corresponding to one slave device 400 needs to be unique.
The SyncID corresponds to an example of the first counter. The SMID corresponds to the example of the second counter.

図15は、SMIDテーブルのデータ構造の例を示す説明図である。
SMIDテーブルはSMIDを登録する11ビットの領域と、同期メッセージの送信間隔であるSyncInterval領域と、当該SMIDに該当する同期メッセージを送出した際に次回の送出タイミングを決定するためのNextIntervalと、1ずつデータがインクリメントされるsequenceIDとを含んで構成される。NextIntervalは、128÷SyncIntervalによって決定される値であり同期メッセージの送出後にアップデートされる。sequenceIDは読み込んだ値に1インクリメントして書き込まれるだけである。スレーブ装置400では、このsequenceIDを用いてSYNC messgeの抜けや順序逆転が生じていないことを確認するために利用する。
FIG. 15 is an explanatory view showing an example of the data structure of the SMID table.
The SMID table includes an 11-bit area for registering an SMID, a SyncInterval area as a transmission interval of a synchronization message, and NextInterval for determining the next transmission timing when transmitting a synchronization message corresponding to the SMID, one each. It is configured including sequenceID in which data is incremented. Next Interval is a value determined by 128 ÷ Sync Interval, and is updated after sending out a synchronization message. The sequenceID is only written by incrementing the read value by one. The slave device 400 uses this sequence ID to confirm that there is no SYNC messge omission or order reversal.

図16は、スケジューラ141の動作の例を示す説明図である。スケジューラ141はハードウェアで構成されており、図16のステップS101〜S110の処理と、ステップS120〜S130の処理とを並列に実行する。
プレシジョンタイムカウンターユニット142からの毎秒パルスを取得すると、スケジューラ141は、ステップS101を実行する。ステップS101では、スケジューラ141は、SyncID、SMID、SMID.counterの3つのカウンターの0クリアを実行する。SMID.counterは、SMIDを1インクリメントするタイミングを検出するためのカウンターである。
FIG. 16 is an explanatory view showing an example of the operation of the scheduler 141. As shown in FIG. The scheduler 141 is configured by hardware, and executes the processes of steps S101 to S110 of FIG. 16 and the processes of steps S120 to S130 in parallel.
Upon acquiring the pulse per second from the precision time counter unit 142, the scheduler 141 executes step S101. In step S101, the scheduler 141 sets SyncID, SMID, SMID. Execute 0 clear of 3 counters of counter. SMID. The counter is a counter for detecting the timing of incrementing the SMID by one.

ステップS102では、スケジューラ141は、同期メッセージを送信するタイミングが到来したか否かを判定する。具体的には、スケジューラ141は、SMID.counterの値が、SMIDの時刻境界である15,625ナノ秒か否かを判定する。SMID.counterの値が時刻境界であることは、同期メッセージを送信するタイミングであることを示している。
時刻境界であると判定した場合(ステップS102:YES)、ステップS103にて、スケジューラ141は、SMIDを1インクリメントする。これにより、次のSMIDの処理へと移行する。
ステップS104では、スケジューラ141は、SMID.counterを0クリアし、ステップS120での処理のためにSMIDpulseを発生させる。このSMIDpulseは同期メッセージを送出する最小周期(128PPS)が経過したことを示している。ステップS104の後、ステップS105へ遷移する。
In step S102, the scheduler 141 determines whether it is time to transmit a synchronization message. Specifically, the scheduler 141 sets the SMID. It is determined whether the value of counter is 15,625 nanoseconds, which is the time boundary of SMID. SMID. The fact that the value of counter is a time boundary indicates that it is the timing to transmit a synchronization message.
If it is determined that the time is a time boundary (step S102: YES), the scheduler 141 increments the SMID by one in step S103. By this, the processing shifts to the processing of the next SMID.
In step S104, the scheduler 141 clears SMID.counter to 0 and generates an SMID pulse for the processing in step S120. This SMIDpulse indicates that the minimum period (128 PPS) for sending a synchronization message has elapsed. After step S104, the process proceeds to step S105.

一方、ステップS102において、SMID.counterが15,625ナノ秒に達していないと判定した場合(ステップS102:NO)、スケジューラ141は、ステップS110にて、SMID.counterを1インクリメントし、ステップS102へ遷移する。
ステップS105では、スケジューラ141は、SMIDがその最大値である499に達したか否かを判定する。
On the other hand, in step S102, the SMID. If it is determined that the counter does not reach 15,625 nanoseconds (step S102: NO), the scheduler 141 determines in step S110 that the SMID. The counter is incremented by 1 and the process proceeds to step S102.
In step S105, the scheduler 141 determines whether the SMID has reached its maximum value 499.

SMIDが499に達していないと判定した場合(ステップS105:NO)、まだ未処理のSMIDが存在するためステップS102へ遷移する。
一方、SMIDが499に達していると判定した場合(ステップS105:YES)、全てのSMID処理を完了したことを意味するので、スケジューラ141は、ステップS106にて、SMID=0つまり初期値に設定する。
If it is determined that the SMID has not reached 499 (step S105: NO), there is still an unprocessed SMID, and the process transitions to step S102.
On the other hand, when it is determined that the SMID has reached 499 (step S105: YES), this means that all the SMID processing has been completed, so that the scheduler 141 sets SMI = 0, that is, the initial value in step S106. Do.

ステップS107では、スケジューラ141は、SyncIDを1インクリメントする。これにより、次のSyncIDの処理へ進む。
ステップS108では、スケジューラ141は、全てのSyncID処理が完了したか否かを判定する。具体的には、スケジューラ141は、SyncIDが127か否かを判定する。
SyncIDが127であると判定した場合(ステップS108:YES)、ステップS109にて、スケジューラ141は、SyncID=0とする。ステップS109の後、ステップS102へ遷移する。
一方、ステップS108において、SyncIDが127以外であると判定した場合(ステップS108:No)、処理すべきSyncIDが存在するため、ステップS102へ遷移する。
In step S107, the scheduler 141 increments the Sync ID by one. By this, it proceeds to the process of the next SyncID.
In step S108, the scheduler 141 determines whether all SyncID processing has been completed. Specifically, the scheduler 141 determines whether the Sync ID is 127 or not.
When it is determined that the SyncID is 127 (Step S108: YES), the scheduler 141 sets SyncID = 0 in Step S109. After step S109, the process proceeds to step S102.
On the other hand, when it is determined in step S108 that the SyncID is other than 127 (step S108: No), there is a SyncID to be processed, so the process transitions to step S102.

ステップS120では、スケジューラ141は、SMIDpulseが発生しているか、つまり同期メッセージ送出タイミングが到来しているか否かを判定する。
同期メッセージ送出タイミングが到来していると判定した場合(ステップS120:YES)、ステップS121へ遷移する。
ステップS121では、スケジューラ141は、DPRAMのアドレスを、該SMIDが格納されている先頭アドレスへと変換する。
In step S120, the scheduler 141 determines whether or not the SMID pulse is generated, that is, whether or not the synchronization message transmission timing has come.
If it is determined that the synchronization message transmission timing has come (step S120: YES), the process proceeds to step S121.
In step S121, the scheduler 141 converts the address of the DPRAM into the top address in which the SMID is stored.

ステップS122では、スケジューラ141は、先頭アドレスが確定したオフセット値を元にNextIntervalを取得する。
ステップS123では、スケジューラ141は、ステップS122で取得したNextIntervalとSyncIDとが同じか否かを判定する。同じではないと判定した場合(ステップS123:No)、ステップS120へ遷移する。これにより、SMIDpulse待ち状態になる。
In step S122, the scheduler 141 acquires Next Interval based on the offset value for which the start address has been determined.
In step S123, the scheduler 141 determines whether the NextInterval acquired in step S122 is the same as the Sync ID. If it is determined that they are not the same (step S123: No), the process proceeds to step S120. As a result, an SMID pulse waiting state is established.

一方、SyncIDとNextIntervalとが同じであると判定した場合(ステップS123:Yes)、同期メッセージを送出するタイミングであり、ステップS124へ遷移する。
ステップS124では、スケジューラ141は、SMIDテーブルよりSyncIntervalを読み込む。
ステップS125では、スケジューラ141は、現在のNextIntervalを更新するために128÷SyncIntervalを演算する。
On the other hand, when it is determined that the SyncID and the NextInterval are the same (step S123: Yes), this is the timing for transmitting the synchronization message, and the process transitions to step S124.
In step S124, the scheduler 141 reads SyncInterval from the SMID table.
In step S125, the scheduler 141 calculates 128 ÷ SyncInterval to update the current NextInterval.

ステップS126では、スケジューラ141は、NextIntervalに128÷SyncIntervalを加算した値をSMIDテーブルに書き込む。なお、加算の結果、NextIntervalの値が127よりも大きくなった場合は、当該値から128を減算した値を、SMIDテーブルに書き込む。
ステップS127では、スケジューラ141は、SMIDテーブルからsequenceIDを読み込む。
sequenceIDは1ずつインクリメントされることがIEEE1588v2にて規定されているため、ステップS128では、スケジューラ141は、sequenceIDのインクリメント処理を行う。
In step S126, the scheduler 141 writes a value obtained by adding 128 ÷ Sync Interval to Next Interval into the SMID table. When the value of NextInterval becomes greater than 127 as a result of addition, a value obtained by subtracting 128 from the value is written to the SMID table.
In step S127, the scheduler 141 reads sequenceID from the SMID table.
Since IEEE 1588 v2 stipulates that sequenceID is incremented by one, in step S128, the scheduler 141 increments sequenceID.

ステップS129では、スケジューラ141は、sequenceIDをSMIDテーブルへ書き戻す。
以上で一連の同期メッセージに関する処理が完了したので、ステップS130において、スケジューラ141は、同期メッセージ送信PulseをSync生成部に送信し、ステップS120へ遷移する。
In step S129, the scheduler 141 writes sequenceID back to the SMID table.
Since the process related to the series of synchronization messages is completed as described above, in step S130, the scheduler 141 transmits the synchronization message transmission pulse to the sync generation unit, and the process transitions to step S120.

図17は、同期メッセージ送出時のデータの流れの例を示す説明図である。
同図において、送信FIFO133は、グランドマスタークロック装置100からの全ての送信パケットのうち同期メッセージ以外のパケット(CPUパケット)が一時格納されるFIFOメモリである。
各パケットでは、パケット情報に加えてSOF(スタートオブフレーム)、EOF(エンドオブフレーム)を前後に付けることでパケット間の切れ目を明確にしている。
TFIFO.EmptyFlagは送信FIFO133が空の状態を通知するフラグである。
FIG. 17 is an explanatory view showing an example of the flow of data at the time of sending a synchronization message.
In the figure, the transmission FIFO 133 is a FIFO memory for temporarily storing packets (CPU packets) other than the synchronization message among all the transmission packets from the grandmaster clock device 100.
In each packet, in addition to packet information, an SOF (start of frame) and an EOF (end of frame) are added before and after to clarify a break between packets.
TFIFO.EmptyFlag is a flag for notifying that the transmission FIFO 133 is empty.

TFIFO.ReadPulseは、FIFOのリード側のビット幅(以後1ライン)を読み込むための1クロック(CLK)のパルス信号である。連続してデータを送出する場合は、TFIFO.ReadPulseを連続してアサートする場合もある。
TFIFO.DATAは、TFIFO.ReadPulseのパルス信号の1サイクル後に出力される、EOF、SOFもしくは同期メッセージ以外のパケットデータである。
TFIFO.ReadPulse is a pulse signal of one clock (CLK) for reading a bit width (hereinafter, one line) on the read side of the FIFO. When sending data continuously, TFIFO.ReadPulse may be asserted continuously.
TFIFO. DATA is packet data other than EOF, SOF or synchronization message, which is output one cycle after the pulse signal of TFIFO.ReadPulse.

SYNCメッセージFIFO139は、同期メッセージが格納される領域である。具体的には、SYNC生成部135が生成した同期メッセージが、SYNCメッセージFIFO139に格納される。
SFIFO.EmptyFlagは、同期メッセージの有無を示すフラグである。
SFIFO.ReadPulseは、TFIFO.ReadPulseと同一の動作をSYNCメッセージFIFOに対して行うリードパルスである。
The SYNC message FIFO 139 is an area in which a synchronization message is stored. Specifically, the synchronization message generated by the SYNC generation unit 135 is stored in the SYNC message FIFO 139.
SFIFO.EmptyFlag is a flag indicating the presence or absence of a synchronization message.
SFIFO. ReadPulse is a read pulse for performing the same operation as TFIFO.ReadPulse on the SYNC message FIFO.

SFIFO.DATAはリードパルスの1サイクル後に出力される、同期メッセージを構成する1ラインのデータである。
Sync送出部136は、(1)強制廃棄方式、(2)高優先送出方式、(3)送信時刻予約方式のいずれかを選択するSync Transmit rule ID領域を有する。そして、SYNC送出部136は、Sync Transmit rule ID領域に設定されているルールに従って送信FIFO133もしくはSYNCメッセージFIFO139の何れかからパケットデータを読み出す。そして、Sync送出部136は、送信データと、送信データが有効であることを示すDataEnableとを、後段の処理ブロックである送信タイムスタンプユニット137へ出力する。
SFIFO. DATA is data of one line constituting a synchronization message, which is output one cycle after the read pulse.
The Sync transmission unit 136 has a Sync Transmit rule ID area for selecting one of (1) forced discarding method, (2) high priority transmission method, and (3) transmission time reservation method. Then, the SYNC transmission unit 136 reads packet data from either the transmission FIFO 133 or the SYNC message FIFO 139 in accordance with the rule set in the Sync Transmit rule ID area. Then, the Sync sending unit 136 outputs the transmission data and DataEnable indicating that the transmission data is valid, to the transmission time stamp unit 137 which is a processing block of the subsequent stage.

図18は、強制廃棄方式の場合にSync送出部136が行う動作の例を示す説明図である。
ステップS201では、Sync送出部136は、カウンター等のリセットを行い、OSからのSYNC送信開始信号を待ち受ける。
次に、ステップS202へ遷移し、SYNC送出部136は、DataEnable=0を設定する。以上が前処理である。
FIG. 18 is an explanatory view showing an example of an operation performed by the Sync sending unit 136 in the case of the forced discard method.
In step S201, the Sync transmission unit 136 resets a counter or the like, and waits for a SYNC transmission start signal from the OS.
Next, the process proceeds to step S202, and the SYNC transmission unit 136 sets DataEnable = 0. The above is pre-processing.

ステップS203では、SYNC送出部136は、SFIFO.EmptyFlagを参照して同期メッセージの有無を判定する。同期メッセージが存在すると判定した場合(ステップS203:Not Empty)、ステップS204へ遷移し、と進み、送信データとして、同期メッセージであるSFIFO.DATAを選択する。
S205にて、SYNC送出部136は、DataEnable=1を設定する。
その後、ステップS203へと進み、同期メッセージの送出完了まで送出処理を継続する。
In step S203, the SYNC transmission unit 136 determines the presence or absence of a synchronization message by referring to the SFIFO.EmptyFlag. If it is determined that a synchronization message exists (step S203: Not Empty), the process proceeds to step S204, and proceeds as transmission data, and the synchronization message SFIFO. Select DATA.
At S205, the SYNC sending unit 136 sets DataEnable = 1.
Thereafter, the process proceeds to step S203, and transmission processing is continued until transmission of the synchronization message is completed.

一方、ステップS203において同期メッセージが存在しないと判定した場合(ステップS203:Empty)、ステップS210へと進み、TFIFO.EmptyFlagを参照して送信FIFO133が空か否かを判定する。
送信FIFO133が空であると判定した場合(ステップS210:Empty)、ステップS202へ遷移する。
On the other hand, if it is determined in step S203 that no synchronization message is present (step S203: Empty), the process proceeds to step S210, and TFIFO. It is determined whether the transmission FIFO 133 is empty with reference to EmptyFlag.
If it is determined that the transmission FIFO 133 is empty (step S210: Empty), the process proceeds to step S202.

一方、送信FIFO133が空でないと判定した場合(ステップS210:Not Empty)、ステップS211へ遷移し、SYNC送出部136は、送信データ=TFIFO.DATAとする。
ステップS212では、SYNC送出部136は、DATAEnable=1とし同期メッセージ以外のパケット送信処理(すなわち、CPUパケットの送信処理)を実行する。
On the other hand, when it is determined that the transmission FIFO 133 is not empty (step S210: Not Empty), the process proceeds to step S211, and the SYNC transmission unit 136 transmits transmission data = TFIFO. Assume it is DATA.
In step S212, the SYNC transmission unit 136 performs data transmission processing (that is, transmission processing of CPU packets) other than the synchronization message with DATAEnable = 1.

ステップS213では、SYNC送出部136は、SFIFO.EmptyFlagを参照して同期メッセージの有無を判定する。
同期メッセージが存在しないと判定した場合(ステップS213:Empty)、SYNC送出部136は、同期メッセージ以外のパケット送出処理を継続する。
一方、同期メッセージが存在すると判定した場合(ステップS213:Not Empty)、ステップS204とステップS213とに処理を分岐する。なお、ステップS204以降の処理とステップS213以降の処理をと同時並行処理にて実行する。
In step S213, the SYNC transmission unit 136 determines the presence or absence of a synchronization message by referring to the SFIFO.EmptyFlag.
When it is determined that the synchronization message does not exist (step S213: Empty), the SYNC transmitting unit 136 continues the packet transmission processing other than the synchronization message.
On the other hand, when it is determined that the synchronization message is present (step S213: Not Empty), the process branches to step S204 and step S213. The processes after step S204 and the processes after step S213 are executed simultaneously and in parallel.

ステップS214において、SYNC送出部136は、送信FIFO133のデータを廃棄する(TFIFO.DATA=廃棄)。
ステップS215において、SYNC送出部136は、送信FIFO133からのデータリードは継続処理する。
ステップS216において、SYNC送出部136は、送信FIFO133から読み出したデータがEOF(TFIFO.DATA=EOF)か否かを判定する。
In step S214, the SYNC transmission unit 136 discards the data of the transmission FIFO 133 (TFIFO.DATA = discard).
In step S215, the SYNC sending unit 136 continuously processes the data read from the transmission FIFO 133.
In step S216, the SYNC transmission unit 136 determines whether the data read from the transmission FIFO 133 is EOF (TFIFO.DATA = EOF).

EOFであったと判定した場合(ステップS216:EOF)、ステップS203へ遷移する。
一方、EOF以外であったと判定した場合(ステップS216:Not EOF)、ステップS214へ遷移する。この場合、送信FIFO133から1パケットのデータを読み出すまで(EOFまで)、ステップS214〜S216のループにて廃棄処理を継続する。
If it is determined that it is EOF (step S216: EOF), the process proceeds to step S203.
On the other hand, when it is determined that it is other than EOF (Step S216: Not EOF), the process proceeds to Step S214. In this case, the discarding process is continued in the loop of steps S214 to S216 until data of one packet is read out from the transmission FIFO 133 (until EOF).

図19は、高優先送出方式の場合にSync送出部136が行う動作の例を示す説明図である。
ステップS301では、Sync送出部136は、カウンター等のリセットを行い、OSからのSYNC送信開始信号を待ち受ける。
ステップS302では、SYNC送出部136は、DataEnable=0とする。
FIG. 19 is an explanatory view showing an example of an operation performed by the Sync sending unit 136 in the case of the high priority sending method.
In step S301, the Sync sending unit 136 resets a counter or the like, and waits for a SYNC transmission start signal from the OS.
In step S302, the SYNC transmission unit 136 sets DataEnable = 0.

ステップS303では、SYNC送出部136は、SFIFO.EmptyFlagを参照して同期メッセージが存在するか否かを判定する。同期メッセージが存在すると判定した場合(ステップS303:Not Empty)、ステップS304〜S305にて同期メッセージの送信を実施する。
一方、ステップS303において同期メッセージが存在しないと判定した場合(ステップS303:Empty)、ステップS310へ遷移する。
In step S303, the SYNC sending unit 136 outputs SFIFO. It is determined whether or not a synchronization message exists with reference to EmptyFlag. If it is determined that the synchronization message is present (Step S303: Not Empty), the transmission of the synchronization message is performed in Steps S304 to S305.
On the other hand, when it is determined in step S303 that no synchronization message exists (step S303: Empty), the process proceeds to step S310.

ステップS310では、SYNC送出部136は、TFIFO.EmptyFlagを参照して送信FIFO133にデータ(同期メッセージ)が存在するか否かを判定する。送信FIFO133が空である(同期メッセージが存在しない)と判定した場合(ステップS310:Empty)、ステップS303へと移行する。
一方、送信FIFO133にデータが存在すると判定した場合(ステップS310:Not Empty)、ステップS311、S312及びS313にて一般メッセージを送出処理する。
In step S310, the SYNC sending unit 136 outputs T.sub.FIFO. It is determined whether or not data (synchronization message) exists in the transmission FIFO 133 with reference to EmptyFlag. If it is determined that the transmission FIFO 133 is empty (the synchronization message does not exist) (step S310: Empty), the process proceeds to step S303.
On the other hand, when it is determined that data exists in the transmission FIFO 133 (step S310: Not Empty), the general message is sent out in steps S311, S312 and S313.

ステップS313では、SYNC送出部136は、TFIFO.DATAを参照してEOFか否かを判定する。EOFであると判定した場合(ステップS313:EOF)、ステップS302へ遷移する。
一方、EOF以外であると判定した場合(ステップS313:Not EOF)、ステップS310へ遷移する。
In step S313, the SYNC sending unit 136 outputs T.sub.FIFO. It is determined whether it is EOF or not with reference to DATA. If it is determined to be EOF (step S313: EOF), the process proceeds to step S302.
On the other hand, when it is determined that it is other than EOF (step S313: Not EOF), the process proceeds to step S310.

図20は、送信時刻予約方式の場合にSync送出部136が行う動作の例を示す説明図である。
送信時刻予約方式では、同期メッセージを、IPv4の最大パケットサイズである1542オクテット時間待ちの後に送出開始する。同期メッセージが存在するwait状態ではWaitFlag=1となる。WaitFlagは、通常パケット(CPUパケット)の送出開始時にのみ評価が実施され、WaitFlag=1の場合は、通常パケットは送信抑制状態となる。一方、通常パケットの送信中にはWaitFlagの評価は行われない。また、送信時刻予約方式では、同期メッセージの状態監視と、WaitFlagの操作とを行う第1のルーチンと、通常パケットの送信開始時にWaitFlag=0であれば送出を開始する第2のルーチンとが同時に実行される。
FIG. 20 is an explanatory view showing an example of an operation performed by the Sync sending unit 136 in the case of the transmission time reservation method.
In the transmission time reservation method, transmission of synchronization messages is started after waiting for 1542 octets time, which is the maximum packet size of IPv4. In the wait state in which the synchronization message exists, WaitFlag = 1. The WaitFlag is evaluated only at the start of transmission of a normal packet (CPU packet). When WaitFlag = 1, the normal packet is in the transmission suppression state. On the other hand, evaluation of WaitFlag is not performed during transmission of a normal packet. Furthermore, in the transmission time reservation method, the first routine for monitoring the status of the synchronization message and the operation of WaitFlag, and the second routine for starting transmission when WaitFlag = 0 at the start of transmission of the normal packet are simultaneously performed. To be executed.

図20の処理において、ステップS401、ステップS420のそれぞれでは、Sync送出部136は、カウンター等のリセットを行い、OSからのSYNC送信開始信号を待ち受ける。なお、ステップS401のSTART1ステートと、ステップS420のSTART2ステートは同時に開始されるものとする。   In the process of FIG. 20, in each of steps S401 and S420, the Sync sending unit 136 resets a counter or the like, and waits for a SYNC transmission start signal from the OS. The START1 state of step S401 and the START2 state of step S420 are assumed to be started at the same time.

ステップS402では、SYNC送出部136は、DataEnable=0とする。
ステップS403では、SYNC送出部136は、WaitFlag=0とする。
ステップS404では、SYNC送出部136は、SFIFO.EmptyFlagを参照し、同期メッセージが存在するか否かを判定する。
同期メッセージが存在すると判定した場合(ステップS404:Not Empty)、ステップS405へ遷移する。
In step S402, the SYNC transmission unit 136 sets DataEnable = 0.
In step S403, the SYNC transmission unit 136 sets WaitFlag = 0.
In step S404, the SYNC sending unit 136 outputs SFIFO. It refers to EmptyFlag to determine whether a synchronization message exists.
If it is determined that the synchronization message is present (Step S404: Not Empty), the process proceeds to Step S405.

一方、同期メッセージが存在しない(SYNCメッセージFIFO139が空である)と判定した場合(ステップS404:Empty)、ステップS404へ遷移する。すなわち、ステップS404を再評価するループ処理を実行する。   On the other hand, when it is determined that the synchronization message does not exist (the SYNC message FIFO 139 is empty) (step S404: Empty), the process proceeds to step S404. That is, a loop process is performed to reevaluate step S404.

ステップS405では、SYNC送出部136は、SendWait=1542を代入し、処理をステップS406へと進める。
ステップS406では、SYNC送出部136は、WaitFlag=1をセットし処理をステップS407へと進める。
ステップS407では、SYNC送出部136は、SendWaitを1減算する。
ステップS408では、SYNC送出部136は、SendWaitが0か否かを判定する。SendWaitが0でないと判定した場合(ステップS408:No)、ステップS407へ遷移する。この場合、SendWait=0となるまでステップS407〜S408のループ処理を実行する。
In step S405, the SYNC transmission unit 136 substitutes SendWait = 1542, and advances the process to step S406.
In step S406, the SYNC transmission unit 136 sets WaitFlag = 1 and advances the process to step S407.
In step S407, the SYNC sending unit 136 subtracts one from SendWait.
In step S408, the SYNC transmission unit 136 determines whether SendWait is 0 or not. If it is determined that SendWait is not 0 (step S408: No), the process proceeds to step S407. In this case, the loop process of steps S407 to S408 is executed until SendWait = 0.

ステップS408においてSendWait=0となったと判定した場合(ステップS408:Yes)、ステップS409へ遷移する。
ステップS409では、SYNC送出部136は、送信データとして同期メッセージを選択する(送信データ=SFIFO.DATA)。
ステップS410では、SYNC送出部136は、DataEnable=1とする。
If it is determined in step S408 that SendWait = 0 (step S408: Yes), the process proceeds to step S409.
In step S409, the SYNC transmission unit 136 selects a synchronization message as transmission data (transmission data = SFIFO.DATA).
In step S410, the SYNC sending unit 136 sets DataEnable = 1.

ステップS411では、SYNC送出部136は、SFIFO.EmptyFlagを参照して送信FIFO133が空か否かを判定する。
送信FIFO133が空であると判定した場合(ステップS411:Empty)、ステップS402遷移する。
一方、送信FIFO133が空でない(同期メッセージが存在する)と判定した場合(ステップS411:Not Empty)、ステップS408へと遷移する。この場合、同期メッセージの送信を継続する。
In step S411, the SYNC sending unit 136 outputs SFIFO. It is determined whether the transmission FIFO 133 is empty with reference to EmptyFlag.
If it is determined that the transmission FIFO 133 is empty (step S411: Empty), the process proceeds to step S402.
On the other hand, when it is determined that the transmission FIFO 133 is not empty (a synchronization message exists) (step S411: Not Empty), the process proceeds to step S408. In this case, transmission of the synchronization message is continued.

ステップS421では、SYNC送出部136は、TFIFO.EmptyFlagを参照して送信FIFO133が空か否かを判定する。
送信FIFO133が空であると判定した場合(ステップS421:Empty)、ステップS421へ遷移する。すなわち、ステップS421を再評価するループ処理を実行する。
In step S421, the SYNC transmitting unit 136 outputs T.sub.FIFO. It is determined whether the transmission FIFO 133 is empty with reference to EmptyFlag.
If it is determined that the transmission FIFO 133 is empty (step S421: Empty), the process proceeds to step S421. That is, a loop process of re-evaluating step S421 is executed.

一方、送信FIFO133が空でないと判定した場合(ステップS421:Not Empty)、すなわち一般メッセージが存在すると判定した場合は、ステップS422へ遷移する。
ステップS422では、SYNC送出部136は、WaitFlagが0か否かを判定する。WaitFlagが0でない(WaitFlag=1)と判定した場合(ステップs422:No)、すなわち同期メッセージの送出待ち時間となっている場合、ステップS421へ遷移する。
WaitFlag=0であると判定した場合(ステップS422:Yes)、すなわち同期メッセージの送出待ち時間ではないと判定した場合、ステップS423へと進む。
ステップS423において、SYNC送出部136は、送信データとして、一般メッセージであるTFIFO.DATAを選択する。
ステップS424において、DataEnable=1とする。
その後、ステップS425において、SYNC送出部136は、TFIFO.DATA=EOFか否かを判定する。
EOFであると判定した場合(ステップS425:EOF)、ステップS426へ遷移する。一方、EOF以外であると判定した場合(ステップS425:Not EOF)、ステップS423へ遷移する。この場合、CPUパケット(同期メッセージ以外のパケット)の送出を継続する。
ステップS426では、SYNC送出部136は、DataEnable=0をセットし、ステップS421へ遷移する。
On the other hand, if it is determined that the transmission FIFO 133 is not empty (step S421: Not Empty), that is, if it is determined that a general message exists, the process proceeds to step S422.
In step S422, the SYNC transmission unit 136 determines whether the WaitFlag is 0 or not. If it is determined that the WaitFlag is not 0 (WaitFlag = 1) (Step s422: No), that is, if it is a waiting time for sending a synchronization message, the process proceeds to Step S421.
If it is determined that WaitFlag = 0 (step S422: Yes), that is, if it is determined that it is not the transmission waiting time of the synchronization message, the process proceeds to step S423.
In step S423, the SYNC transmission unit 136 uses the general message TFIFO. Select DATA.
In step S424, DataEnable is set to 1.
After that, in step S425, the SYNC sending unit 136 outputs T.sub.FIFO. It is determined whether or not DATA = EOF.
If it is determined that it is EOF (step S425: EOF), the process proceeds to step S426. On the other hand, when it is determined that it is other than EOF (Step S425: Not EOF), the process proceeds to Step S423. In this case, transmission of the CPU packet (packet other than the synchronization message) is continued.
In step S426, the SYNC transmission unit 136 sets DataEnable = 0, and the process transitions to step S421.

図21は、送信時刻予約方式にて送信待ち受けがどの程度発生するかを示す説明図である。
同図に示すパケットの構成要素は図13の場合と同様であり、説明を省略する。
図21において、SMIDslot長とは、秒間128発の同期メッセージを500台のslaveに送信することを想定した場合に、1つの同期メッセージに割り当てることが可能な時間間隔である。SMIDslot長=15,625nsは、同期メッセージ送信間隔の最小値が15,625ナノ秒であることを表す。
また1542オクテットのパケットはIPv4の最大パケット長を有するパケットを示している。1542オクテットは、12336ビットであり、回線速度が10Gbpsの場合、送信に要する時間は1234ナノ秒である。また、回線速度が10Gbpsの場合、当該パケットの送信に要する時間は12336ナノ秒である。いずれも、15625ナノ秒よりも短く、同期メッセージ送信間隔にて送信可能である。
FIG. 21 is an explanatory view showing how much transmission standby occurs in the transmission time reservation method.
The components of the packet shown in the figure are the same as in the case of FIG.
In FIG. 21, the SMID slot length is a time interval that can be assigned to one synchronization message when it is assumed that 128 synchronization messages per second are sent to 500 slaves. The SMID slot length = 15,625 ns represents that the minimum value of the synchronization message transmission interval is 15,625 nanoseconds.
The packet of 1542 octets indicates a packet having a maximum packet length of IPv4. The 1542 octets are 12336 bits, and if the line speed is 10 Gbps, the time required for transmission is 1234 nanoseconds. When the line speed is 10 Gbps, the time required to transmit the packet is 12336 nanoseconds. Both are shorter than 15625 nanoseconds and can be transmitted at synchronous message transmission intervals.

以上のように、Sync送出部136は、スケジューラ141が同期メッセージの送出タイミングであると判定すると、新たな同期メッセージ及び一般メッセージの送出を抑制し、一般メッセージの送出に要する時間として規定されている規定時間が経過した後、同期メッセージを送出する。
これにより、Sync送出部136は、一般メッセージの送出に要する最長時間として規定されている規定時間が経過した後、必ず、メッセージ送出を行っていない状態から同期メッセージを送出することができる。この点において、グランドマスタークロック装置100は、同期メッセージの送出タイミング到来時に、直ちに同期メッセージを送出することができ、同期メッセージ(例えば、時刻同期パケット)の送信と一般メッセージ(例えば、時刻同期パケット以外のパケット)の送信とで別々のネットワークアドレス(例えば、IPアドレス)を用いる必要無しに、同期メッセージの送出間隔の揺らぎを低減させることができる。
また、スケジューラ141が同期メッセージの送出タイミングであると判定した場合のみ、Sync送出部136が新たなメッセージの送出を抑制する点で、一般メッセージの送出が制限される頻度が少ない。この点において、グランドマスタークロック装置100は、一般メッセージの送出の遅延を低減させることができる。
As described above, when the scheduler 141 determines that it is the transmission timing of the synchronization message, the Sync transmission unit 136 suppresses the transmission of the new synchronization message and the general message, and is defined as the time required to transmit the general message. After the specified time has elapsed, send a synchronization message.
As a result, the Sync sending unit 136 can always send the synchronization message from the state where the message sending is not performed after the specified time defined as the longest time required for sending the general message has elapsed. In this respect, the grand master clock device 100 can immediately transmit the synchronization message when the transmission timing of the synchronization message comes, and the transmission of the synchronization message (for example, time synchronization packet) and the general message (for example, time synchronization packet) The transmission interval of the synchronization message can be reduced without having to use a separate network address (e.g., an IP address) for the transmission of the packet.
Further, only when the scheduler 141 determines that it is the transmission timing of the synchronization message, the frequency at which the transmission of the general message is restricted is small in that the Sync transmission unit 136 suppresses the transmission of a new message. In this regard, the grandmaster clock device 100 can reduce the delay of sending general messages.

また、SyncIDは、同一のスレーブ装置400に対する同期メッセージ送信間隔の最小値として規定されている間隔毎にカウント(1インクリメント)する。SMIDは、同一のスレーブ装置400に対する同期メッセージ送信間隔の最小値を時刻同期対象機器の数でさらに分割した間隔毎にカウント(1インクリメント)する。そして、スケジューラ141は、SMIDが示すスレーブ装置400に対して同期メッセージを送出するタイミングか否かをSyncIDの値に基づいて判定する。
これにより、スケジューラ141は、SyncIDの値と、SMIDが示すスレーブ装置400に対応付けられた値とを比較するという簡単な処理で、同期メッセージ送出タイミングを検出することができる。
Also, SyncID is counted (one increment) at each interval defined as the minimum value of the synchronization message transmission interval to the same slave device 400. The SMID counts (increment by one) every interval obtained by further dividing the minimum value of the synchronization message transmission interval for the same slave device 400 by the number of time synchronization target devices. Then, the scheduler 141 determines, based on the value of SyncID, whether or not it is time to send a synchronization message to the slave device 400 indicated by SMID.
Thus, the scheduler 141 can detect the synchronization message transmission timing by a simple process of comparing the value of SyncID with the value associated with the slave device 400 indicated by the SMID.

なお、以上では図12に示すように、同期メッセージ送出タイミングの検出と、同期メッセージの生成と、同期メッセージおよび一般メッセージの送出と、の各処理をMAC部130が行う場合を例に説明したが、これらの処理の全部または一部をCPU170(図6)が行うようにしてもよい。例えば、OSカーネル173が、これらの処理の全部または一部を行うようにしてもよい。   In the above, as shown in FIG. 12, the case where the MAC unit 130 performs each processing of detection of synchronization message transmission timing, generation of synchronization message, transmission of synchronization message and general message has been described as an example. The CPU 170 (FIG. 6) may perform all or part of these processes. For example, the OS kernel 173 may perform all or part of these processes.

なお、本実施形態では、IEEE802.3の規定における最大パケットサイズである1518を基準として必ずその期間待ち合わせが入るようにしているが、待ち合わせの期間(規定時間)を1518よりも小さな値とする指令をCPU170から出力できるようにしてもよい。前述のとおりグランドマスタークロック装置100は、同期メッセージという比較的短いメッセージをやり取りしている。グランドマスタークロック装置100自らが送出する一般メッセージについてもIPフラグメント機構などを用いて最大100バイトとすれば、規定時間(上記の待ち合わせの期間)を短くすることができる。なお、待ち合わせの期間を短くした場合、装置のファームウェアバージョンアップなど大きな帯域を必要とする場合には規定時間を再度1518に戻すようにしてもよい。   In this embodiment, queuing is always performed based on 1518 which is the maximum packet size in the definition of IEEE 802.3. May be output from the CPU 170. As described above, the grandmaster clock device 100 exchanges relatively short messages, called synchronization messages. The regular time (the above-mentioned waiting period) can be shortened if the general message sent by the grandmaster clock device 100 itself is 100 bytes at maximum using the IP fragmentation mechanism or the like. When the waiting period is shortened, and when a large bandwidth is required, such as a firmware version upgrade of the apparatus, the specified time may be returned to 1518 again.

なお、本発明は、いろいろな時刻同期の場面に適用可能である。例えば、以下に本発明を適用するようにしてもよい。
1.携帯基地局間の時刻同期、周波数同期に用いる本願記載のGMC装置
2.センサーネットワークの各センサの時刻、周波数同期に用いる本願記載のGMC装置
3.電力変電所の保護リレー装置の作動時刻同期に用いる本願記載のGMC装置
4.オーディオ、ビデオなどAV分野におけるカメラ、記録機器、映像、ビデオ信号伝送装置、管理コンソール、サーバ群の時刻と、周波数の同期に用いつ本願記載のGMC装置
5.自動車内ネットワークにおける時刻、周波数同期に用いる本願記載のGMC装置
6.SDN,NFVなど複数装置で構成され中央集権設定が実行される環境における時刻、周波数同期に用いる本願記載のGMC装置
7.QoS(Quality Of Service)を実現するための機構に用いる本願記載のGMC装置
The present invention is applicable to various time synchronization scenes. For example, the present invention may be applied to the following.
1. The GMC apparatus described in the present application used for time synchronization and frequency synchronization between mobile base stations. 2. GMC apparatus described in the present application used for time synchronization and frequency synchronization of each sensor in the sensor network. The GMC apparatus according to the present invention, which is used for synchronizing operation time of the protection relay apparatus of the power substation. 5. GMC apparatus described in the present application, used for synchronization of time and frequency of cameras, recording devices, video and video signal transmission apparatuses, management consoles, servers in the AV field such as audio and video. 5. GMC apparatus according to the present invention used for time and frequency synchronization in an in-vehicle network 7. GMC apparatus described in the present application which is used for time synchronization and frequency synchronization in an environment where a plurality of apparatuses such as SDN and NFV are configured and centralization setting is performed. The GMC apparatus according to the present application used in a mechanism for realizing QoS (Quality Of Service)

なお、グランドマスタークロック装置100の全部または一部の機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより各部の処理を行ってもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。
また、「コンピュータシステム」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。
また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含むものとする。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであってもよい。
Note that a program for realizing all or a part of functions of the grandmaster clock device 100 is recorded in a computer readable recording medium, and the computer system reads the program recorded in the recording medium and executes it. The processing of each part may be performed by Here, the “computer system” includes an OS and hardware such as peripheral devices.
The "computer system" also includes a homepage providing environment (or display environment) if the WWW system is used.
The term "computer-readable recording medium" refers to a storage medium such as a flexible disk, a magneto-optical disk, a ROM, a portable medium such as a ROM or a CD-ROM, or a hard disk built in a computer system. Furthermore, “computer-readable recording medium” dynamically holds a program for a short time, like a communication line in the case of transmitting a program via a network such as the Internet or a communication line such as a telephone line. In this case, the volatile memory in the computer system which is the server or the client in that case, and the one that holds the program for a certain period of time is also included. The program may be for realizing a part of the functions described above, or may be realized in combination with the program already recorded in the computer system.

以上、この発明の実施形態について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計変更等も含まれる。   The embodiment of the present invention has been described in detail with reference to the drawings, but the specific configuration is not limited to this embodiment, and design changes within the scope of the present invention are also included.

100 グランドマスタークロック装置
110 GNSS同期型周波数発振器
111 GNSS受信機
112 クロック調整器
113 水晶振動子
120 物理層チップ
130 メディアアクセスコントローラ部
131 受信タイムスタンプユニット
132 受信FIFO
133 送信FIFO
134 Syncプロファイル記憶部
134−1 グローバルプロファイル記憶部
134−2 SMIDプロファイル記憶部
134−3 SMIDテーブル記憶部
135 Sync生成部
136 Sync送出部
137 送信タイムスタンプユニット
139 Sync message FIFO
141 スケジューラ
142 プレシジョンタイムカウンターユニット
150 水晶振動子
160 メインメモリ
170 CPU
171 ハードウェアアクセス部
172 ドライバ
173 OSカーネル
174 GNSS管理デーモン
175 プロトコルスタック
176 Delayreq送出処理部
177 Sync登録処理部
181 メモリコントローラ
100 Grandmaster clock device 110 GNSS synchronous frequency oscillator 111 GNSS receiver 112 clock adjuster 113 crystal oscillator 120 physical layer chip 130 media access controller section 131 reception time stamp unit 132 reception FIFO
133 Transmit FIFO
134 Sync profile storage unit 134-1 Global profile storage unit 134-2 SMID profile storage unit 134-3 SMID table storage unit 135 Sync generation unit 136 Sync transmission unit 137 Transmission time stamp unit 139 Sync message FIFO
141 scheduler 142 precision time counter unit 150 crystal oscillator 160 main memory 170 CPU
171 hardware access unit 172 driver 173 OS kernel 174 GNSS management daemon 175 protocol stack 176 delayreq transmission processing unit 177 sync registration processing unit 181 memory controller

Claims (7)

時刻情報を含む同期メッセージを送出する同期メッセージ送出装置であって、
CPUによって実行され、前記同期メッセージの送出間隔の情報を取得するSync登録処理部と、
前記CPUが用いるクロック信号よりも高精度なクロック信号を用いて動作し、前記同期メッセージ、及び、前記同期メッセージ以外のメッセージである一般メッセージを送出する送出部と、
前記CPUが用いるクロック信号よりも高精度なクロック信号を用いて動作し、前記Sync登録処理部が取得した前記同期メッセージの送出間隔の情報に基づいて、前記同期メッセージの送出タイミングか否かを判定するスケジューラ部と、
を備え、
前記送出部は、前記スケジューラ部が同期メッセージの送出タイミングであると判定すると、新たな同期メッセージ及び一般メッセージの送出を抑制し、前記一般メッセージの送出に要する時間として規定されている規定時間が経過した後、前記同期メッセージを送出する、
同期メッセージ送出装置。
A synchronous message transmitting apparatus for transmitting a synchronous message including time information, comprising:
A Sync registration processing unit that is executed by the CPU and acquires information on the transmission interval of the synchronization message;
A sending unit that operates using a clock signal that is more accurate than the clock signal used by the CPU , and sends the synchronization message and a general message that is a message other than the synchronization message;
It operates using a clock signal with higher accuracy than the clock signal used by the CPU, and determines whether it is the transmission timing of the synchronization message based on the information of the transmission interval of the synchronization message acquired by the Sync registration processing unit. The scheduler unit to
Equipped with
When the transmission unit determines that the scheduler unit is the transmission timing of the synchronization message, the transmission unit suppresses the transmission of the new synchronization message and the general message, and the specified time defined as the time required for the transmission of the general message has elapsed. Send out the synchronization message after
Synchronous message sender.
前記同期メッセージを生成する同期メッセージ生成部と、A synchronization message generator for generating the synchronization message;
前記同期メッセージ以外のメッセージである一般メッセージを生成する一般メッセージ生成部と、A general message generator for generating a general message which is a message other than the synchronization message;
を備え、Equipped with
前記同期メッセージ生成部が、前記一般メッセージ生成部よりも下位層に設けられている、The synchronization message generation unit is provided in a layer lower than the general message generation unit,
請求項1に記載の同期メッセージ送出装置。The synchronous message transmission device according to claim 1.
同一の時刻同期対象機器に対する同期メッセージ送信間隔の最小値として規定されている間隔毎にカウントする第1カウンターと、
前記同一の時刻同期対象機器に対する同期メッセージ送信間隔の最小値を時刻同期対象機器の数でさらに分割した間隔毎にカウントする第2カウンターと
を備え、
前記スケジューラ部は、前記時刻同期対象機器毎に設定された同期メッセージ送出タイミングの情報のうち、前記第2カウンターの値によって特定される時刻同期対象機器の同期メッセージ送出タイミングの情報と、前記第1カウンターの値との比較に基づいて、その時刻同期対象機器に対して同期メッセージを送出するタイミングか否かを判定し、
前記送出部は、前記スケジューラ部が同期メッセージを送出するタイミングであると判定すると当該同期メッセージを送出する、
請求項1または請求項2に記載の同期メッセージ送出装置。
A first counter that counts at intervals specified as the minimum value of the synchronization message transmission interval for the same time synchronization target device;
And a second counter for counting the minimum value of the synchronization message transmission interval for the same time synchronization target device by the number of time synchronization target devices.
The scheduler unit includes information on synchronization message transmission timing of a time synchronization target device specified by the value of the second counter among information on synchronization message transmission timing set for each of the time synchronization target devices , and the first information. Based on the comparison with the value of the counter, it is determined whether or not it is time to send a synchronization message to the time synchronization target device ,
The transmission unit transmits the synchronization message when it is determined that it is the timing to transmit the synchronization message by the scheduler unit.
The synchronous message transmission device according to claim 1 or 2 .
前記規定時間は、前記一般メッセージの送出に要する最長時間である、
請求項1から3の何れか一項に記載の同期メッセージ送出装置。
The specified time is the maximum time required to send the general message.
The synchronous message transmission device according to any one of claims 1 to 3 .
同期メッセージ送出装置と、時刻同期対象装置とを備え、
前記同期メッセージ送出装置は、
時刻情報を含む同期メッセージを送出する同期メッセージ送出装置であって、
CPUによって実行され、前記同期メッセージの送出間隔の情報を取得するSync登録処理部と、
前記CPUが用いるクロック信号よりも高精度なクロック信号を用いて動作し、前記同期メッセージ、及び、前記同期メッセージ以外のメッセージである一般メッセージを送出する送出部と、
前記CPUが用いるクロック信号よりも高精度なクロック信号を用いて動作し、前記Sync登録処理部が取得した前記同期メッセージの送出間隔の情報に基づいて、前記同期メッセージの送出タイミングか否かを判定するスケジューラ部と、
を備え、
前記送出部は、前記スケジューラ部が同期メッセージの送出タイミングであると判定すると、新たな同期メッセージ及び一般メッセージの送出を抑制し、前記一般メッセージの送出に要する時間として規定されている規定時間が経過した後、前記同期メッセージを送出し、
前記時刻同期対象装置は、
前記同期メッセージ送出装置が送出する前記同期メッセージに基づいて、当該同期メッセージ送出装置との時刻同期を行う、
時刻同期システム。
A synchronization message sending device and a time synchronization target device;
The synchronous message sending device
A synchronous message transmitting apparatus for transmitting a synchronous message including time information, comprising:
A Sync registration processing unit that is executed by the CPU and acquires information on the transmission interval of the synchronization message;
A sending unit that operates using a clock signal that is more accurate than the clock signal used by the CPU , and sends the synchronization message and a general message that is a message other than the synchronization message;
It operates using a clock signal with higher accuracy than the clock signal used by the CPU, and determines whether it is the transmission timing of the synchronization message based on the information of the transmission interval of the synchronization message acquired by the Sync registration processing unit. The scheduler unit to
Equipped with
When the transmission unit determines that the scheduler unit is the transmission timing of the synchronization message, the transmission unit suppresses the transmission of a new synchronization message and a general message, and the specified time defined as the time required to transmit the general message has elapsed And send out the synchronization message,
The time synchronization target device is
The time synchronization with the synchronous message transmitting device is performed based on the synchronous message transmitted by the synchronous message transmitting device.
Time synchronization system.
時刻情報を含む同期メッセージを送出する同期メッセージ送出装置の同期メッセージ送出方法であって、
CPUによって実行され、前記同期メッセージの送出間隔の情報を取得するステップと、
前記CPUが用いるクロック信号よりも高精度なクロック信号を用いて動作し、前記同期メッセージ、及び、前記同期メッセージ以外のメッセージである一般メッセージを送出する送出ステップと、
前記CPUが用いるクロック信号よりも高精度なクロック信号を用いて動作し、前記同期メッセージの送出間隔の情報に基づいて、前記同期メッセージの送出タイミングか否かを判定する判定ステップと、
を有し、
前記送出ステップでは、前記判定ステップにて前記同期メッセージの送出タイミングであると判定すると、新たな同期メッセージ及び一般メッセージの送出を抑制し、前記一般メッセージの送出に要する時間として規定されている規定時間が経過した後、前記同期メッセージを送出する、
同期メッセージ送出方法。
A synchronous message transmitting method of a synchronous message transmitting device for transmitting a synchronous message including time information, comprising:
Executed by the CPU to obtain information on the sending interval of the synchronization message;
A sending step operating with a clock signal that is more accurate than a clock signal used by the CPU , and sending the synchronization message and a general message that is a message other than the synchronization message;
Determining using a clock signal that is more accurate than a clock signal used by the CPU, and determining whether it is a transmission timing of the synchronization message based on information of a transmission interval of the synchronization message;
Have
In the transmission step, when it is determined in the determination step that it is the transmission timing of the synchronization message, transmission of a new synchronization message and a general message is suppressed, and a prescribed time defined as a time required for transmission of the general message Sending out the synchronization message after
Synchronous message transmission method.
時刻情報を含む同期メッセージを送出する同期メッセージ送出装置を制御するコンピュータに、
CPUによって実行され、前記同期メッセージの送出間隔の情報を取得するステップと、
前記CPUが用いるクロック信号よりも高精度なクロック信号を用いて動作し、前記同期メッセージ、及び、前記同期メッセージ以外のメッセージである一般メッセージを送出する送出ステップと、
前記CPUが用いるクロック信号よりも高精度なクロック信号を用いて動作し、前記同期メッセージの送出間隔の情報に基づいて、前記同期メッセージの送出タイミングか否かを判定する判定ステップと、
を実行させ、
前記送出ステップでは、前記判定ステップにて前記同期メッセージの送出タイミングであると判定すると、新たな同期メッセージ及び一般メッセージの送出を抑制し、前記一般メッセージの送出に要する時間として規定されている規定時間が経過した後、前記同期メッセージを送出させる
ためのプログラム。
A computer that controls a synchronization message transmitting device that transmits a synchronization message including time information;
Executed by the CPU to obtain information on the sending interval of the synchronization message;
A sending step operating with a clock signal that is more accurate than a clock signal used by the CPU , and sending the synchronization message and a general message that is a message other than the synchronization message;
Determining using a clock signal that is more accurate than a clock signal used by the CPU, and determining whether it is a transmission timing of the synchronization message based on information of a transmission interval of the synchronization message;
To run
In the transmission step, when it is determined in the determination step that it is the transmission timing of the synchronization message, transmission of a new synchronization message and a general message is suppressed, and a prescribed time defined as a time required for transmission of the general message A program for sending out the synchronization message after a lapse of.
JP2015063045A 2015-03-25 2015-03-25 Synchronization message transmitter, time synchronization system, synchronization message transmission method and program Active JP6516217B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2015063045A JP6516217B2 (en) 2015-03-25 2015-03-25 Synchronization message transmitter, time synchronization system, synchronization message transmission method and program
PCT/JP2016/052226 WO2016152237A1 (en) 2015-03-25 2016-01-27 Synchronization message transmission device, time synchronization system, and synchronization message transmission method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015063045A JP6516217B2 (en) 2015-03-25 2015-03-25 Synchronization message transmitter, time synchronization system, synchronization message transmission method and program

Publications (2)

Publication Number Publication Date
JP2016184811A JP2016184811A (en) 2016-10-20
JP6516217B2 true JP6516217B2 (en) 2019-05-22

Family

ID=57243303

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015063045A Active JP6516217B2 (en) 2015-03-25 2015-03-25 Synchronization message transmitter, time synchronization system, synchronization message transmission method and program

Country Status (1)

Country Link
JP (1) JP6516217B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6805938B2 (en) * 2017-03-31 2020-12-23 株式会社明電舎 Virtual LAN time synchronization method
JP6962099B2 (en) * 2017-09-25 2021-11-05 オムロン株式会社 Control system and control device
CN113702850B (en) * 2021-08-27 2024-04-16 深圳市新威尔电子有限公司 Battery detection method for sending CAN message based on process flow
WO2023175857A1 (en) * 2022-03-17 2023-09-21 三菱電機株式会社 Relay device, communication system, and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5834650A (en) * 1981-08-24 1983-03-01 Hitachi Ltd Packet switching system
JP3993508B2 (en) * 2002-12-02 2007-10-17 株式会社エヌ・ティ・ティ・ドコモ Wireless access network system, wireless communication method, synchronization server, and node device
JP4931108B2 (en) * 2005-11-09 2012-05-16 独立行政法人情報通信研究機構 High-precision time synchronization processing device and program thereof, and network congestion level warning device and program thereof
US9392565B2 (en) * 2010-03-05 2016-07-12 Samsung Electronics Co., Ltd. Method and system for accurate clock synchronization through interaction between communication layers and sub-layers for communication systems
JP2013074527A (en) * 2011-09-28 2013-04-22 Fujitsu Ltd Transmission device, transmission system and communication control method
JP5702708B2 (en) * 2011-12-08 2015-04-15 日本電信電話株式会社 Packet control method and packet control apparatus
JP5459628B2 (en) * 2012-01-12 2014-04-02 横河電機株式会社 Time synchronization system
JP5811895B2 (en) * 2012-02-28 2015-11-11 三菱電機株式会社 Communication apparatus and communication method

Also Published As

Publication number Publication date
JP2016184811A (en) 2016-10-20

Similar Documents

Publication Publication Date Title
JP5811794B2 (en) Communication device
US8879586B2 (en) Inband timestamping
US7835402B2 (en) Synchronization module
CN101977104B (en) IEEE1588 based accurate clock synchronization protocol system and synchronization method thereof
US9667370B2 (en) Communication device with peer-to-peer assist to provide synchronization
US8370675B2 (en) Precise clock synchronization
JP5941293B2 (en) How to time-synchronize free-running nodes in an avionics network
US8385212B2 (en) Method and apparatus for finding latency floor in packet networks
US8107502B2 (en) Method and apparatus for monitoring packet networks
JP6516217B2 (en) Synchronization message transmitter, time synchronization system, synchronization message transmission method and program
US11050501B2 (en) Performing PHY-level hardware timestamping and time synchronization in cost-sensitive environments
CN101496322A (en) Consistent distributed timestamp counters
JP5127482B2 (en) Timing synchronization method, synchronization apparatus, synchronization system, and synchronization program
EP3930266A1 (en) Packet scheduling system with desired physical transmission time for packets
EP3174237B1 (en) Time synchronization method and apparatus for network devices and time synchronization server
CN111726189B (en) Dual-core system clock synchronization method and device based on timestamp marking circuit
CN103563287A (en) Synchronization device and synchronization method
WO2016152237A1 (en) Synchronization message transmission device, time synchronization system, and synchronization message transmission method
CN110572230A (en) correction method and device for realizing time synchronization
US9065748B2 (en) Symmetrical latency with TDM circuit emulated service
JP6516216B2 (en) Synchronization message transmitter, time synchronization system, synchronization message transmission method and program
JP6516215B2 (en) Synchronization message transmitter, time synchronization system, synchronization message transmission method and program
JP6391013B2 (en) Synchronous message transmission apparatus, time synchronization system, and synchronous message transmission method
US11831403B2 (en) Network interface card structure and clock synchronization method to precisely acquire heterogeneous PTP synchronization information for PTP synchronization network extension
JP2001244932A (en) Method and system for measuring network delay

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180111

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180911

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20181102

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181105

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: 20190319

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190408

R150 Certificate of patent or registration of utility model

Ref document number: 6516217

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250