JP6391013B2 - Synchronous message transmission apparatus, time synchronization system, and synchronous message transmission method - Google Patents

Synchronous message transmission apparatus, time synchronization system, and synchronous message transmission method Download PDF

Info

Publication number
JP6391013B2
JP6391013B2 JP2015063042A JP2015063042A JP6391013B2 JP 6391013 B2 JP6391013 B2 JP 6391013B2 JP 2015063042 A JP2015063042 A JP 2015063042A JP 2015063042 A JP2015063042 A JP 2015063042A JP 6391013 B2 JP6391013 B2 JP 6391013B2
Authority
JP
Japan
Prior art keywords
message
synchronization
sending
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
JP2015063042A
Other languages
Japanese (ja)
Other versions
JP2016184808A (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 JP2015063042A priority Critical patent/JP6391013B2/en
Priority to PCT/JP2016/052226 priority patent/WO2016152237A1/en
Publication of JP2016184808A publication Critical patent/JP2016184808A/en
Application granted granted Critical
Publication of JP6391013B2 publication Critical patent/JP6391013B2/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, and a synchronous message transmission method.

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

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

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

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

GMCとスレーブとの時刻同期の精度を高めるためには、GMCにおける時刻同期パケットの送信間隔の揺らぎについても対応策が求められる。GMCにおける時刻同期パケットの送信間隔の揺らぎは、例えばパケットを生成するCPUにおけるスケジューリングの粒度や、CPUの負荷等に起因して生じる。   In order to improve the accuracy of time synchronization between the GMC and the slave, countermeasures are also required for fluctuations in the transmission interval of time synchronization packets in the GMC. The fluctuation of the transmission interval of the time synchronization packet in the GMC is caused by, for example, the scheduling granularity in the CPU that generates the packet, the CPU load, and the like.

本発明は、GMC(グランドマスタークロック装置)における時刻同期パケットの送信間隔の揺らぎを低減させることができる同期メッセージ送出装置、時刻同期システムおよび同期メッセージ送出方法を提供する。   The present invention provides a synchronization message transmission device, a time synchronization system, and a synchronization message transmission method that can reduce fluctuations in the transmission interval of time synchronization packets in a GMC (Grand Master Clock Device).

本発明の第1の態様によれば、同期メッセージ送出装置は、時刻情報を含む同期メッセージを送出する同期メッセージ送出装置であって、前記同期メッセージを生成する同期メッセージ生成部と、前記同期メッセージ以外のメッセージである一般メッセージを生成する一般メッセージ生成部と、前記同期メッセージ、及び、前記一般メッセージを送出する送出部と、を備え、前記同期メッセージ生成部が、前記一般メッセージ生成部よりも下位層に設けられている。   According to the first aspect of the present invention, the synchronous message transmitting device is a synchronous message transmitting device for transmitting a synchronous message including time information, and includes a synchronous message generating unit for generating the synchronous message, and other than the synchronous message A general message generation unit that generates a general message, and a transmission unit that transmits the synchronization message and the general message. The synchronization message generation unit is lower than the general message generation unit. Is provided.

前記同期メッセージの生成に用いられるデータのうち、同一の同期メッセージ送出装置が送出する全ての同期メッセージで同一の値となるデータであるグローバルプロファイルを記憶するグローバルプロファイル記憶部と、前記同期メッセージの生成に用いられるデータのうち、同一の同期メッセージ送出装置から送出され、かつ、同一の時刻同期対象機器に送出される同期メッセージで同一の値となるデータであるSMIDプロファイルを、時刻同期対象機器毎に記憶するSMIDプロファイル記憶部と、前記同期メッセージの生成に用いられるデータのうち、時刻同期メッセージ毎に異なる値となるデータを示すSMIDテーブルを記憶するSMIDテーブル記憶部と、を備え、前記同期メッセージ生成部は、前記グローバルプロファイル記憶部から読み出したグローバルプロファイルと、前記SMIDプロファイル記憶部から、同期メッセージ送出対象となっている時刻同期対象機器について読み出したSMIDプロファイルと、前記SMIDテーブル記憶部から読み出したSMIDテーブルに基づいて生成したデータとを組み合わせて同期メッセージを生成する、ようにしてもよい。   Of the data used for generating the synchronization message, a global profile storage unit for storing a global profile that is data having the same value in all the synchronization messages transmitted by the same synchronization message transmitting device, and generation of the synchronization message For each time synchronization target device, an SMID profile, which is data sent from the same synchronization message transmission device and having the same value in a synchronization message transmitted to the same time synchronization target device, is used for each time synchronization target device. An SMID profile storage unit for storing, and an SMID table storage unit for storing an SMID table indicating data having different values for each time synchronization message among data used for generating the synchronization message, and generating the synchronization message Department of Global Profile Generated based on the global profile read from the storage unit, the SMID profile read from the SMID profile storage unit for the time synchronization target device that is the target of synchronization message transmission, and the SMID table read from the SMID table storage unit A synchronization message may be generated in combination with data.

前記同期メッセージの送出タイミングか否かを判定するスケジューラ部を備え、前記送出部は、前記スケジューラ部が、前記同期メッセージの送出タイミングであると判定すると、当該同期メッセージを送出し、前記スケジューラ部が、前記一般メッセージ生成部よりも下位層に設けられている、ようにしてもよい。   A scheduler unit that determines whether or not it is a transmission timing of the synchronization message, and the transmission unit transmits the synchronization message when the scheduler unit determines that it is a transmission timing of the synchronization message, and the scheduler unit , It may be provided in a lower layer than the general message generator.

同一の時刻同期対象機器に対する同期メッセージ送信間隔の最小値として規定されている間隔毎にカウントする第1カウンターと、前記同一の時刻同期対象機器に対する同期メッセージ送信間隔の最小値を時刻同期対象機器の数でさらに分割した間隔毎にカウントする第2カウンターとを備え、前記スケジューラ部は、前記第2カウンターが示す時刻同期対象機器に対して同期メッセージを送出するタイミングか否かを前記第1カウンターの値に基づいて判定し、前記送出部は、前記スケジューラ部が同期メッセージを送出するタイミングであると判定すると当該同期メッセージを送出する、ようにしてもよい。   A first counter that counts every interval defined as a minimum value of a synchronization message transmission interval for the same time synchronization target device; and a minimum value of a synchronization message transmission interval for the same time synchronization target device. A second counter that counts every interval further divided by a number, and the scheduler unit determines whether it is time to send a synchronization message to a time synchronization target device indicated by the second counter. The determination may be made based on the value, and the sending unit may send the synchronization message when it is determined that the scheduler unit is ready to send the synchronization message.

前記送出部は、前記スケジューラ部が同期メッセージの送出タイミングであると判定すると、前記一般メッセージを送出中である場合は、当該一般メッセージの送出を中断して、前記同期メッセージを送出する、ようにしてもよい。   When the scheduler unit determines that the timing of sending the synchronization message is reached, if the general message is being sent, the sending unit interrupts the sending of the general message and sends the synchronization message. May be.

前記送出部は、前記スケジューラ部が同期メッセージの送出タイミングであると判定すると、新たな一般メッセージの送出を抑制する、ようにしてもよい。   The sending unit may suppress sending of a new general message when the scheduler unit determines that it is the sending timing of the synchronization message.

前記送出部は、前記スケジューラ部が同期メッセージの送出タイミングであると判定すると、新たな同期メッセージ及び一般メッセージの送出を抑制し、前記一般メッセージの送出に要する時間として規定されている規定時間が経過した後、前記同期メッセージを送出する、ようにしてもよい。   When the sending unit determines that the timing of sending the synchronization message is determined by the scheduler unit, the sending unit suppresses sending of a new synchronization message and a general message, and a specified time specified as a time required for sending the general message has elapsed. Then, the synchronization message may be sent out.

前記送出部が前記同期メッセージを送出するモードとして、前記スケジューラ部が同期メッセージの送出タイミングであると判定すると、前記一般メッセージを送出中である場合は、当該一般メッセージの送出を中断して、前記同期メッセージを送出するモードと、前記スケジューラ部が同期メッセージの送出タイミングであると判定すると、新たな一般メッセージの送出を抑制するモードと、前記スケジューラ部が同期メッセージの送出タイミングであると判定すると、新たな同期メッセージ及び一般メッセージの送出を抑制し、前記一般メッセージの送出に要する時間として規定されている規定時間が経過した後、前記同期メッセージを送出するモードとのうち少なくとも2つのモードからいずれかの選択を受け付ける、ようにしてもよい。   As a mode in which the sending unit sends the synchronization message, when the scheduler unit determines that it is the sending timing of the synchronization message, if the general message is being sent, the sending of the general message is interrupted, When it is determined that the mode for sending a synchronization message and the scheduler unit is the timing for sending a synchronization message, the mode for suppressing the sending of a new general message and the scheduler unit is determined to be the timing for sending a synchronization message, Any one of at least two modes out of the modes for sending out the synchronization message after the stipulated time specified as the time required for sending out the general message is suppressed after sending out the new synchronization message and the general message. You can accept the selection of .

本発明の第2の態様によれば、時刻同期システムは、同期メッセージ送出装置と、時刻同期対象装置とを備え、前記同期メッセージ送出装置は、時刻情報を含む同期メッセージを送出する同期メッセージ送出装置であって、前記同期メッセージを生成する同期メッセージ生成部と、前記同期メッセージ以外のメッセージである一般メッセージを生成する一般メッセージ生成部と、前記同期メッセージ、及び、前記一般メッセージを送出する送出部と、を備え、前記同期メッセージ生成部が、前記一般メッセージ生成部よりも下位層に設けられており、前記時刻同期対象装置は、前記同期メッセージ送出装置が送出する前記同期メッセージに基づいて、当該同期メッセージ送出装置との時刻同期を行う。   According to the 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 synchronization message generation unit that generates the synchronization message, a general message generation unit that generates a general message that is a message other than the synchronization message, a transmission unit that transmits the synchronization message and the general message, The synchronization message generation unit is provided in a lower layer than the general message generation unit, and the time synchronization target device is configured to perform synchronization based on the synchronization message transmitted by the synchronization message transmission device. Synchronize the time with the message sending device.

本発明の第3の態様によれば、同期メッセージ送出方法は、時刻情報を含む同期メッセージを送出する同期メッセージ送出装置の同期メッセージ送出方法であって、前記同期メッセージを生成する同期メッセージ生成ステップと、前記同期メッセージ以外のメッセージである一般メッセージを生成する一般メッセージ生成ステップと、前記同期メッセージ、及び、前記一般メッセージを送出する送出ステップと、を有し、前記同期メッセージ生成ステップは、前記一般メッセージ生成部よりも下位層にて実行される。   According to a third aspect of the present invention, a synchronous message transmission method is a synchronous message transmission method of a synchronous message transmission device that transmits a synchronous message including time information, the synchronous message generating step for generating the synchronous message; A general message generating step for generating a general message that is a message other than the synchronous message, and a sending step for transmitting the synchronous message and the general message, wherein the synchronous message generating step includes: It is executed in a lower layer than the generation unit.

本発明によれば、GMCにおける時刻同期パケットの送信間隔の揺らぎを低減させることができる。   According to the present invention, fluctuations in the transmission interval of time synchronization packets in GMC can be reduced.

本発明の一実施形態における時刻同期システムの装置構成を示す概略構成図である。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 the IEEE1588v2 time synchronous process. 従来のグランドマスタークロック装置の構成例を示す概略ブロック図である。It is a schematic block diagram which shows the structural example 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 grandmaster clock apparatus sends out. 同実施形態の時刻同期プロセスにおける階層構造を示す説明図である。It is explanatory drawing which shows the hierarchical structure in the time synchronous process of the embodiment. 同実施形態におけるグランドマスタークロック装置の構成例を示す概略ブロック図である。It is a schematic block diagram which shows the structural example of the grandmaster clock apparatus in the same embodiment. 同実施形態におけるグランドマスタークロック装置が送出する同期メッセージにおける遅延の例を示す説明図である。It is explanatory drawing which shows the example of the delay in the synchronous message which the grandmaster clock apparatus in the same embodiment sends out. 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 same 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 same 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 same 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. 同実施形態で、複数のスレーブ装置が存在するネットワークにおける同期メッセージの送出間隔の例を示す説明図である。4 is an explanatory diagram illustrating an example of a synchronization message transmission interval in a network in which a plurality of slave devices exist in the embodiment. FIG. 同実施形態における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 same embodiment. 同実施形態における同期メッセージ送出時のデータの流れの例を示す説明図である。It is explanatory drawing which shows the example of the data flow at the time of the synchronous message transmission in the same embodiment. 同実施形態において、強制廃棄方式の場合にSync送出部が行う動作の例を示す説明図である。In the embodiment, it is explanatory drawing which shows the example of the operation | movement which a Sync transmission part performs in the case of a forced discard system. 同実施形態において、高優先送出方式の場合にSync送出部が行う動作の例を示す説明図である。FIG. 6 is an explanatory diagram illustrating an example of an operation performed by a Sync transmission unit in the case of the high priority transmission method in the embodiment. 同実施形態において、送信時刻予約方式の場合にSync送出部が行う動作の例を示す説明図である。In the embodiment, in the case of a transmission time reservation method, it is explanatory drawing which shows the example of the operation | movement which a Sync transmission part performs. 同実施形態において、送信時刻予約方式にて送信待ち受けがどの程度発生するかを示す説明図である。In the same embodiment, it is explanatory drawing which shows how much transmission waiting occurs with a transmission time reservation system.

以下、本発明の実施形態を説明するが、以下の実施形態は特許請求の範囲にかかる発明を限定するものではない。また、実施形態の中で説明されている特徴の組み合わせの全てが発明の解決手段に必須であるとは限らない。
図1は、本発明の一実施形態における時刻同期システムの装置構成を示す概略構成図である。同図において、時刻同期システム1は、グランドマスタークロック(Grandmaster Clock)装置100と、アンテナ200と、トランスペアレントクロック(Transparent Clock)装置300と、1つ以上のスレーブ(Slave)装置400とを備える。
Hereinafter, although embodiment of this invention is described, the following embodiment does not limit the invention concerning a claim. In addition, not all the combinations of features described in the embodiments are essential for the solving means of the invention.
FIG. 1 is a schematic configuration diagram showing a device configuration of a time synchronization system in one embodiment of the present invention. In the figure, the time synchronization system 1 includes 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に接続されている。
The grand master clock device 100 and the transparent clock device 300 are connected via a 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 an L2 switch 820 in addition to the network 810. In the relationship between 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 that connects the grand master clock device 100 and the slave device 400.
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 based on Ethernet (registered trademark).
The positioning system 900 is a positioning system using a satellite (Global Navigation Satellite System; GNSS, Global Navigation Satellite System). Examples of the positioning system 900 include GPS (Global Positioning System), QZSS (Quasi Zenith Satellite System), or GLONASS (Global Navigation Satellite System), but are not limited thereto. The positioning system 900 is a system that performs triangulation based on high-precision time and satellite navigation information as the principle of positioning, and always sets the time so that the time coincides with several cesium atomic clocks installed on the ground. The information is corrected. In the time synchronization system 1, the positioning system 900 is used as a time source. Specifically, the time synchronization system 1 detects time using highly accurate time information transmitted by an artificial satellite of the positioning system 900.

アンテナ200は、測位システム900の衛星が送信する測位情報を受信し、得られた測位情報をグランドマスタークロック装置100へ出力する。
グランドマスタークロック装置100は、時刻同期システム1の中枢となる時刻同期源であり、アンテナ200を介して測位システム900から受信した測位情報に基づいて時刻を検出し、検出した時刻に基づいて、時刻同期パケットの形式による時刻情報を生成してスレーブ装置400の各々へ送信する。グランドマスタークロック装置100は、時刻同期対象であるスレーブ装置400の時刻を測位システム900の時刻に同期させることを目的として、時刻情報のスレーブ装置400への送信を行う。なお、送信を送出とも称する。グランドマスタークロック装置100は、同期メッセージ送出装置の例に該当する。
The antenna 200 receives 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 based on the detected time, Time information in the form of a synchronous packet is generated and transmitted to each slave device 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 target of time synchronization 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における伝送時間の遅延や揺らぎの一因となる。
Both the transparent clock device 300 and the L2 switch 820 relay communication between the grand master clock device 100 and the slave device 400.
The transparent clock device 300 receives the time synchronization packet from the grand master clock device 100 and transmits it to the destination slave device 400. At that time, the transparent clock device 300 subtracts the reception time from the transmission time to calculate a delay time in the transparent clock device 300, and writes (stamps) the calculated delay time in the time synchronization packet. The slave device 400 that has received the time synchronization packet performs correction based on the delay time written in the time synchronization packet, so that the transmission time delay (delay) or fluctuation (jitter) in the transparent clock device 300 with respect to time synchronization is performed. The influence of can be reduced.
On the other hand, the L2 switch 820 is a general multi-port 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 in the communication path 800.

スレーブ装置400は、時刻同期システム1における時刻同期対象の装置である。スレーブ装置400は、通信経路800を介してグランドマスタークロック装置100から受信した時刻同期パケットを用いて、スレーブ装置400内部の時刻をグランドマスタークロック装置100内部の時刻に同期させる処理を行う。ここでいう装置内部の時刻とは、当該装置が備えるクロックを時刻同期パケットにて補正したものである。   The slave device 400 is a time synchronization target device in the time synchronization system 1. The slave device 400 performs processing for synchronizing the time in the slave device 400 with the time in the grand master clock device 100 using the time synchronization packet received from the grand master clock device 100 via the communication path 800. The time inside the device referred to here is obtained by correcting the clock provided 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. In this embodiment, it is not necessary to add a special device, and the internal configuration of the grand master clock device 100 is different from that of the conventional time synchronization system, as will be described later.
In addition, in order to identify the slave device 400 that is the target of time synchronization, 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 unique value for each slave device 400.
However, the SMID is not stored in the slave device 400, and is stored in the grand master clock device 100 so that the grand master clock device 100 identifies 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 a maximum of 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 0 to 499 SMIDs 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 grand master clock device 100 performs time synchronization for 1000 slaves, the SMID can be easily scaled up by increasing the SMID bit by 1 bit as compared to the case of 500 slaves. When a single grand master clock device 100 synchronizes a large number of slave devices 400 with time, the configuration of the communication path 800 becomes complicated, and the L2 switch 820 other than the switch that supports time synchronization, such as the transparent clock device 300, has multiple stages. It should be noted that there is a possibility of being caught.

なお、グランドマスタークロック装置100とスレーブ装置400との接続関係は、図1に示すものに限らない。例えば、グランドマスタークロック装置100とスレーブ装置400とが1対1で接続されていてもよい。また、グランドマスタークロック装置100とスレーブ装置400とが、トランスペアレントクロック装置300やL2スイッチ820を介さずに、単にネットワーク810を介して接続されていてもよい。   The connection relationship between the grand master 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. Further, the grand master clock device 100 and the slave device 400 may be simply connected via the network 810, not via 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, the fluctuation of the transmission interval of the time synchronization packet in the grand master clock device by the IEEE 1588v2 time synchronization process will be described. In general, the grandmaster clock device operates according to the IEEE 1588v2 time synchronization process.
FIG. 2 is an explanatory diagram 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)が含まれる。   Both the grand master clock device 1100 and the slave device 1400 operate according to a protocol having a five-layered structure. The five hierarchical structures are a physical layer (PHY layer), a media access controller (MAC) layer, an Internet protocol (IP) layer, a user datagram protocol (UDP) layer in order from the bottom. 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 in the uppermost layer, and processing is usually performed by a CPU (Central Processing Unit). The time synchronization packet is also transmitted to the lower layer at a timing scheduled at regular intervals in the processing 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 an OS (Operating System). Since the time synchronization packet generated in the PTP layer is a UDP packet, it is normally transmitted to the lower layer via the UDP layer and the IP layer.
The MAC layer performs processing such as adding MAC address information to the PTP packet encapsulated by the protocol stack of the PTP layer, UDP layer, and IP layer, FCS (Frame Check Sequence) calculation processing, etc., and interface with the physical layer Function as. The time stamp unit included in the MAC layer implements time stamping, which is an important element of the PTP layer.

IEEE1588v2が他の時刻同期方式に対して優位な点として、MAC層にタイムスタンプユニットを有することが挙げられる。これにより、PTP層から発行されたPTPパケットは、タイムスタンプの打刻に関して、MAC層より上位のPTP層、UDP層及びIP層における遅延(Delay)や揺らぎ(Jitter)の影響を受けない。
一方、従来のグランドマスタークロック装置では、パケットの送信タイミングについて、PTP層、UDP層およびIP層における遅延(Delay)や揺らぎ(Jitter)の影響を受ける。この点について図3を参照して説明する。
One of the advantages of IEEE 1588v2 over other time synchronization systems is that it has a time stamp unit in the MAC layer. As a result, the PTP packet issued from the PTP layer is not affected by delay or jitter in the PTP layer, UDP layer, and IP layer higher than the MAC layer with respect to time stamping.
On the other hand, in the conventional grand master clock device, the packet transmission timing is affected by delay (delay) and fluctuation (jitter) in the PTP layer, UDP layer, and 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 (Media) (MAC) unit 1130, and a crystal resonator 1150. A main memory 1160 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 resonator 1113. The MAC unit 1130 includes a reception time stamp unit (RTSU) 1131, a reception FIFO (First-in First-out) 1132, a transmission FIFO 1133, a transmission time stamp unit (Transmit Timestamp Unit; TTSU) 1137, A Precision Time Counter Unit (PRTCU) 1142. The CPU 1170 includes a hardware (HW) access unit 1171, a driver 1172, an OS (Operating System) 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 included 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.
The physical layer chip 1120 executes physical layer processing, the MAC unit 1130 executes MAC layer processing, and the CPU 1170 executes IP layer, UDP layer, and PTP layer processing.

グランドマスタークロック装置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 notifies ToD (Time Of Day, time information of year / month / day / hour / minute / second), 1 PPS (accurate every second) from the GNSS signal obtained from the antenna 1200. Pulse signal) and a 125 megahertz (MHz) frequency signal are obtained 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 GNSS navigation information from the GNSS signal received by the antenna 1200. Based on the GNSS navigation information and the time information periodically sent from the GNSS, the GNSS receiver 1111 uses the triangulation principle to determine the current position of the satellite (the relative position between the satellite and the grand master clock device 1100). ). When the current position is determined, the GNSS receiver 1111 performs time information conversion.

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

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 reception FIFO 1132 temporarily stores the reception 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 (ie, stamps the transmission time stamp).

水晶振動子1150は、水晶振動子1113よりも周波数精度が低い水晶振動子である。水晶振動子1150は、CPU1170の基準クロックとして用いられる。
メインメモリ1160は、グランドマスタークロック装置1100が備える記憶デバイスを用いて構成され、各種情報を記憶する。
The crystal resonator 1150 is a crystal resonator having a frequency accuracy lower than that of the crystal resonator 1113. The crystal resonator 1150 is used as a reference clock for 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, the 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 handling transmission / reception packets, the CPU 1170 outputs the main memory address instructed from the OS kernel 1173 to the main memory controller 1181 for the transmission packets, and reads the transmission packet information from the main memory 1160. Then, the CPU 1170 outputs the read transmission packet information to the MAC unit 1130. Contrary to the case of the transmission packet, the CPU 1170 accumulates the packet received from the MAC unit 1130 at the main memory address designated by the OS kernel 1173 in the main memory 1160.

ここで、送受信パケット処理ではDMA(ダイレクトメモリアクセス)を利用してCPU1170の演算ユニットを利用することなく、メインメモリ1160およびメインメモリコントローラ1181とMAC部1130とで直接実施する方式が主流である。図3に示すグランドマスタークロック装置1100では、メモリコントローラ1181内にDMAが内蔵されており、このDMAを利用して送受信パケット処理を行う。   Here, in the transmission / reception packet processing, a method of directly executing the main memory 1160, the main memory controller 1181, and the MAC unit 1130 without using the arithmetic unit of the CPU 1170 by using DMA (direct memory access) is mainstream. In the grand master clock device 1100 shown in FIG. 3, a DMA is built in the memory controller 1181, and transmission / reception 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 center of an operating system such as Linux (registered trademark), UNIX (registered trademark), and Windows, and controls the scheduler 1178 that manages the execution of various processes and allocates memory space.
The GNSSD 1174 is a control daemon that controls the GNSS synchronous frequency oscillator 1110. Based on the ToD information obtained from the GNSS, the time adjustment of the precision time counter unit 1142 of the MAC unit 1130 is more than the second granularity, and the GNSS synchronous frequency. The state of the oscillator 1110 is monitored. Specifically, the GNSSD 1174 performs time adjustment based on the previous time adjustment (correction of oscillation of the crystal resonator 1113) performed by the GNSS synchronous frequency oscillator 1110. The GNSSD 1174 manages state changes such as the crystal resonator 1113 in the GNSS synchronous frequency oscillator 1110 being in a free-running state (Holdover) depending on the reception status of the GNSS radio wave, etc., and the referenced process from each process To implement.

プロトコルスタック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 can be compiled and implemented with the OS kernel 1173, or can be additionally introduced. In order to reduce the burden on the user of implementing the protocol stack 1175, a standard protocol is generally compiled and implemented together with the OS kernel 1173.

スケジューラ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 performs execution management of various processes as described above.
The Sync transmission processing unit 1177 determines the ID of the slave device to be transmitted to the scheduler 1178 based on the synchronization interval (Sync interval) that is negotiated with the slave device 1400 in advance using 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 certain granularity (for example, 500 us), and if there is a slave ID, transmits the slave ID to the sync transmission processing unit 1177. The Sync transmission processing unit 1177 generates a synchronization message (Synchronous message (Sync message)) related to the slave ID as a time synchronization packet and outputs it to the protocol stack 1175 together with additional information.

ここでスケジューラ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 the scheduler 1178 can be a major problem for the time synchronization system. For example, in a time synchronization system that sends out synchronization messages with a granularity of 500 us, if you want to send out 128 synchronization messages per second, the correct interval is 1/128 = 7,812 microseconds (μs), which is around 500 us A numerical value of 8,000 microseconds or 7,500 microseconds. Both 8,000 microseconds and 7,500 microseconds are different from the correct interval of 7,812 microseconds, and this difference causes jitter.

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

Delayreq送出処理部1176は、グランドマスタークロック装置1100が、スレーブ装置からdelayreqメッセージ(delayreq message)を受信すると、受信時刻を記録し、記録した受信時刻をdelayrespメッセージ内に記録する。そして、Delayreq送出処理部1176は、IEEE1588v2規定のフォーマットにて、delayreqメッセージを送出したスレーブ装置に対してdelayrespメッセージ(delayresp message)を送出する処理を行う。このdelayrespメッセージは、スレーブ装置がネットワーク遅延時間を算出するのに用いられる。   When the grandmaster clock device 1100 receives a delayreq message from the slave device, the delayreq transmission processing unit 1176 records the reception time and records the recorded reception time in the delayrep message. Then, the Delayreq transmission processing unit 1176 performs processing of transmitting a delay resp message (delay resp message) to the slave device that has transmitted the delay req message in a format stipulated by IEEE 1588v2. The delay resp 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, there are many fluctuation factors in the CPU process, and it is difficult to maintain an accurate Sync interval (synchronization message transmission interval). On the other hand, the MAC unit 1130 uses 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 to accurately process the PTP packet at the reception time stamp unit 1131 and the transmission time stamp unit 1137. Stamp the correct time.
The physical layer chip (PHY) 1120 communicates with the slave device 1400 via the network.

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

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

メインメモリ1160に格納された同期メッセージは、高精度の水晶振動子1113にて動作するMAC1130内のTTSU1137によって、グランドマスタークロック装置1100からの正確な送出時刻を打刻される。そして、送出時刻を打刻された同期メッセージは、グランドマスタークロック装置1100から送出される。   The synchronization message stored in the main memory 1160 is stamped with an accurate transmission time from the grand master clock device 1100 by the TTSU 1137 in the MAC 1130 operating with the high-precision crystal resonator 1113. Then, the synchronization message in which the sending time is stamped is sent 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 reaching the slave device 1400 is “Δdelay1 + 100 ns”, “Δdelay2 + 300, 500 ns”,. To disperse. In particular, when the fluctuation of the network delay is small, the fluctuation component generated in the grand master clock device 1100 greatly affects the arrival interval of the synchronization message.
Further, when the problem of the granularity problem described with reference to FIG. 3 occurs, the accuracy of the arrival interval of the synchronization message to the slave device 1400 further decreases.

図5は、本実施形態の時刻同期プロセスにおける階層構造を示す説明図である。同図において、グランドマスタークロック装置100とスレーブ装置400とが示されており、グランドマスタークロック装置100とスレーブ装置400とは通信経路800で接続されている。   FIG. 5 is an explanatory diagram 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, the grand master clock device 100 and the slave device 400 operate according to a protocol having a five-layer structure. The five hierarchical structures are a physical layer (PHY layer), a media access controller (MAC) layer, an Internet protocol (IP) layer, a user datagram protocol (UDP) layer in order from the bottom. 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, using the CPU in the highest layer.
On the other hand, the grand master clock device 100 executes the process of sending the synchronization message in a process in the MAC layer based on the interval specified by the profile from the CPU, information on the slave device 400, and the like. In this way, the grand master clock device 100 executes the synchronization message sending process separately from the CPU.

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

グランドマスタークロック装置100は、MAC層において、PTP、UDP及びIPの各プロトコルスタックが出力する情報をプロファイルとして記憶する。その際、MAC層では、グローバルプロファイル、SMIDプロファイル(同期メッセージプロファイル)、SMテーブル(同期メッセージテーブル)に分割して記憶する。後述するように、グローバルプロファイルは、全てのスレーブ装置400に対して一定のデータを纏めたものである。また、SMIDプロファイルは、スレーブ装置400毎に異なるデータを纏めたものである。SMIDテーブルは、送信時に一意に決定するデータ(同期メッセージ毎に値が異なるデータ)を纏めたものである。
そして、グランドマスタークロック装置100はMAC層において、GNSSを起源とする極めて高精度のクロックによってスケジュールされた時刻に同期メッセージを送出することで、CPU層での処理による送出タイミングの揺らぎを排除し、一定の遅延のみで同期メッセージ送出を実現する。
In the MAC layer, the grand master clock device 100 stores information output from each protocol stack of PTP, UDP, and IP as a profile. At that time, the MAC layer stores the global profile, the SMID profile (synchronous message profile), and the SM table (synchronous message table). As will be described later, the global profile is a collection of certain data for all slave devices 400. Further, 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 grand master clock device 100 eliminates the fluctuation of the transmission timing due to the processing in the CPU layer by transmitting the synchronization message at the time scheduled by the extremely high precision clock originating from GNSS in the MAC layer, Synchronous message transmission is realized only with a certain 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 illustrating a configuration example of the grand master clock device according to the present embodiment.
In the figure, a 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, a crystal resonator 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 resonator 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, a Sync, and the like. The transmitter 136 includes a transmission time stamp unit (TTSU) 137, a scheduler 141, and a precision time counter unit (PRTCU) 142. A 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. A unit 177 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 included 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.
In addition, the physical layer chip 120 executes physical layer processing, the MAC unit 130 executes MAC layer processing, and the CPU 170 executes IP layer, UDP layer, and PTP layer processing.

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 shown in FIG.
In the MAC unit 130, the functions of the reception timestamp unit 131 and the transmission timestamp unit 137 are the same as the functions of the reception timestamp unit 1131 and the transmission timestamp unit 1137 in FIG.
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.
The CPU 170 is the same as the CPU 1170 of FIG. 3 except that it includes a Sync registration processing unit 177 instead of the Sync transmission processing unit 1177 and the scheduler 1178 of FIG. The CPU 170 also executes the scheduler function of the OS. However, the CPU scheduler is not shown in FIG. 6 because the function is not directly used for sending the synchronization message. The CPU 170 corresponds to an example of a general message generation unit, and generates a general message as with the CPU 1170 in 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 via the hardware access unit 171 of the synchronization message interval and the destination address negotiated with the slave device 400. This eliminates the need to use the scheduler function of the CPU 170 when sending the synchronization message. For this reason, in the transmission of the synchronization message, the transmission timing fluctuation caused by the low-precision crystal resonator 150 and the transmission timing fluctuation caused by the scheduler granularity do not occur.
Further, when the CPU 170 is released from the periodic synchronous message transmission process, it is possible to spend a lot of time for other processes such as the GNSSD process and the Delayreq transmission process, and the performance of the apparatus can be expected to be improved. 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 the sync characteristics for each slave device 400 in the sync profile storage unit 134. Specifically, the MAC unit 130 acquires the Sync interval (synchronization message transmission interval), the address information reaching the slave device 400, and each element constituting the synchronization message, and acquires the three elements 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, which has an SMID as will be described later. The SMID counts up at intervals of 15,625 nanoseconds obtained by dividing 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 transmitted at the current time by comparing the nextInterval in the SMID_table with the SYNCID counter. When it is determined that nextInterval is equal to SYNCID counter, 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 presents to the sync transmission unit 136 a synchronization message that is generated by merging three elements constituting the synchronization message, which is set in advance by the sync registration processing unit 177 of the CPU 170, to generate the synchronization message. The Sync generation unit 135 corresponds to an example of a synchronization message generation unit.
The Sync sending unit 136 sends out a synchronization message by one of the three methods described later. The Sync sending unit 136 corresponds to an example of a 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, you may make it comprise the part which transmits a synchronous message in FPGA different from the MAC part 130. FIG. In this case, the physical layer chip, FPGA, and MAC are configured in order from the lower layer, and the time stamp is stamped by the FPGA.

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

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

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

図8は、IEEE1588v2の同期メッセージのフォーマットを示す説明図である。同図では、横方向に32ビット(bit)、つまり4バイト(BYTE)を示しており、左端のビットから回線に送出される。
また、同図の下方向に向けては、32ビットの集合が連続したデータとして表しており、上の行のデータから下の行のデータへと順に、回線に送信される。
また、同図の左端に記載している1、5、9、・・・は、32ビットの集合の左端、すなわち、ネットワークに最初に送出されるバイト位置を示している。例えば、上から1行目の左端のビットは、1バイト目に含まれており、上から2行目の左端のビットは、5バイト目に含まれている。
FIG. 8 is an explanatory diagram showing the format of an IEEE 1588v2 synchronization message. In the figure, 32 bits (bits), that is, 4 bytes (BYTE) are shown in the horizontal direction, and are sent to the line from the leftmost bit.
Further, in the downward direction of the figure, a set of 32 bits is represented as continuous data, and is transmitted to the line in order from the data in the upper row to the data in the lower row.
Further, 1, 5, 9,... Described at the left end of the figure indicate the left end of the 32-bit set, that is, the byte position transmitted first to the network. For example, the leftmost bit in the first row from the top is included in the first byte, and the leftmost bit in the second row 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 does not include an FCS (Frame Check Sequence) and has a fixed length of 86 bytes. Although the length may be changed by VLAN tag or the like, the length is fixed in the grand master clock device 100.
The synchronization message is composed of a plurality of 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 that propagate Ethernet (registered trademark), and is a destination MAC address MAC-DA and a source MAC address (MAC address of the grand master clock device 100) MAC-SA. It is composed of EtherType indicating the continuing protocol type. In the case of a synchronous message, since it is IPv4, Ethertype = 0x0800 is fixed.

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), fragment offset (fragment offset, = 0x00), TTL (= 1), protocol number (protocol No, = 17: UDP), header checksum (header checksum, IP header checksum value, calculation method is Stipulated in RFC1071).

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: a fixed value defined in IEEE 1588v2), a destination (slave device 400) UDP port number (UDP-DP, = 319: Fixed value specified in IEEE 1588v2), UDP packet length (UDP-length, = 52), UDP checksum (UDP-checksum, UDP pseudo header 12 bytes + UDP header + UDP payload), one's complement It is a value calculated by the sum of. If the value of the UDP checksum is set to 0, the UDP checksum calculation is invalidated at the counterpart device and the check is not performed. In the implementation of the grand master clock device, since the time stamp changes in real time, it is easy to implement the UDP checksum area as 0, and it is often implemented in a grand master clock device or a software-based grand master clock device. It is not desirable to compromise the reliability of the most important time stamp in time synchronization due to some problem on the network or in the device. Therefore, the grand master clock device 100 calculates a 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 a time synchronization packet defined by IEEE 1588v2, and includes a synchronization message. Transmitspecific is a 4-bit value that can be freely set by the administrator of the grandmaster clock device 100 for future expansion (default = 1). The message type (MessageType) is a synchronous message (= 0). This is because versionPTP assumes PTPv2 in the present application (= 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 synchronous message (= 44). In the domain number, the administrator of the grand master clock device sets the time synchronization group = domain to which the grand master clock device belongs. FlagField is a field for setting the characteristics of the grand master clock device, and is set by the administrator of the grand master clock device. The correction field is an area not used in the grand master clock device. The clockIdentity is an identifier that uniquely indicates the grand master clock device. In IEEE 1588v2, which is an effective area when there are a plurality of grand master clock devices on the network, a MACSA, that is, a MAC address that exists only on the network is used. It is specified that a total of 8 bytes is obtained by dividing every 3 bytes and inserting FF-FF between them. The source Port ID is an area indicating the number of the port of the grand master clock device. The sequence ID is a number assigned sequentially to the transmission of the synchronization message, and when viewed from a single slave device, it appears to increment by one. With this ID, it is possible to detect missing synchronization messages and take some measures. In addition, it is possible to delete a factor that hinders time synchronization such as ID reversal by route. controlField represents a synchronization message (= 0). logMessagePeriod is normally 0. In the case of a synchronous message, the synchronous message payload is composed of originTimestamp. The originTimestamp is composed of a 48-bit second area and a 32-bit nanosecond area. The originTimestamp is an area for recording an absolute time originating from GNSS when a synchronization message is sent from the grand master clock device 100. . As described above, it is necessary to send a lot of information in addition to the time information that is the information that the synchronization message wants to send. In FIG. 8, the information to be generated is classified into four types. The first is an area where all synchronization messages transmitted from the same grand master clock device have the same value. The second is an area that is sent from the same grand master clock device and has 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 reserved area for future expansion.

図9は、Syncプロファイル記憶部134(グローバルプロファイル記憶部134−1)が記憶するグローバルプロファイル(Gloval profile)のデータ構造の例を示す説明図である。
グローバルプロファイルは、図8に示す各領域のうち、同一のグランドマスタークロック装置から送信する全ての同期メッセージで同一の値になる領域(第1の領域)のデータを纏めたものである。
FIG. 9 is an explanatory diagram illustrating an example of a data structure of a global profile stored in the sync profile storage unit 134 (global profile storage unit 134-1).
The global profile is a collection of data of regions (first regions) that have the same value in all the synchronization messages transmitted from the same grand master clock device among the regions 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. Management with a single memory area is an effective means in terms of apparatus cost.
An exception is an ID (random value) area, and the value of the ID (random value) area is different for each packet. The value of the ID (random value) area is literally random, and it is not necessary to store a unique value in the global profile. However, in the example of FIG. 9, an area is reserved for use such as setting a seed value (initial value) for generating a random value. A known random value generation method can be used as a random value generation method for an ID (random value) 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 diagram showing an example of the data structure of the SMID profile (SMID_profile) stored in the Sync profile storage unit 134 (SMID profile storage unit 134-2).
The SMID profile is data in a region (second region) that is sent from the same grand master clock device and has the same value in the synchronization message sent to the same slave device among the regions shown in FIG. Are summarized. In addition, as shown in FIG. 10, the reserve area | region (RSVD) is included.
The sync profile storage unit 134 stores the SMID profile for each slave device 400. The SMID profile shown in FIG. 10 is composed of 28 bytes. When 500 slave devices 400 are time-synchronized, 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 diagram illustrating an example of a data structure of the SMID table (SMID_table) stored in the Sync profile storage unit 134 (SMID table storage unit 134-3).
The SMID table is a collection of data of areas (third areas) having different values for each synchronization message among the areas shown in FIG. In addition, as shown in FIG. 11, the reserve area | region (RSVD) is included.
The SMID table shown in FIG. 11 is composed of 8 bytes. When 500 slave devices 400 are time-synchronized, 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)で求めることができる。   As described above, the storage capacity necessary for the Sync profile storage unit 134 to store the Global profile, the SMID profile, and the SMID table can be obtained by Expression (1).

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

約18キロバイト(k BYTE)の領域は昨今のメモリ技術においては極めて小さく、ASICやFPGA内に搭載するにあたって障害とならない。   The area of about 18 kilobytes (k BYTE) is extremely small in the recent memory technology, and does not become an obstacle to 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 illustrating a functional configuration of the MAC unit 130. In the figure, a 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, SYNC message FIFO 139, scheduler 141, and 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-accuracy 1 PPS (second pulse) originating from GNSS and a clock signal of 125 MHz. Each process in the MAC unit 130 operates at 125 MHz with extremely accurate timing. 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 time source in the apparatus, and includes a Sec area that stores information of year, month, day, hour, minute, and second of the current time in 48 bits, and a subunit of 8 nanoseconds that is the reciprocal number of 125 megahertz. And an Nsec area for storing time information in 30 bits. The precision time counter unit 142 acquires ToD, determines second information, and counts up the Nsec region at 8 ns which is the reciprocal of 125 MHz. The precision time counter unit 142 has a mechanism for resetting the Nsec counter to 0 by 1 PPS pulse and finely adjusting Nsec every 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 original Timestamp area 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 by 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, SMID profile <0-499>, and SMID table <0-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 the SMID profile. The SMID table storage unit 134-3 stores an SMID table.
In accessing the sync profile storage unit 134, the CPU 170 designates an address (ADDR) and data (DATA) and writes each data. Data written by the CPU 170 is handled as a fixed value by each process of the MAC unit 130. In addition, it is possible to monitor the current transmission status 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 that stores the PTP received by the physical layer chip 120 from the network 810 and packets other than PTP. The reception FIFO 132 stores the reception data that has arrived from the reception time stamp unit 131 in a FIFO format while DataEnable (a signal indicating that data is present) is asserted. In addition, the reception FIFO 132 has an EmptyFlag, and when there is data, the EmptyFlag 132 negates the EmptyFlag. Thereby, it can be transmitted to the CPU 170 that valid received data exists.

CPU170は、EmptyFlagを定期的に監視し(低精度の水晶振動子150を用いた)CPUクロックに同期して、受信DATAのCPU170への取込処理を行う。なお、CPU170が取得するデータは、PTP以外にも様々なものがあってもよい。   The CPU 170 periodically monitors the EmptyFlag and performs a process of taking received DATA into the CPU 170 in synchronization with the CPU clock (using the low-precision crystal resonator 150). The data acquired by the CPU 170 may include various data 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 that stores a packet that the CPU 170 outputs to the MAC unit 130. The packet that the CPU 170 outputs to the MAC unit 130 is a packet other than the synchronization message (general message packet). The CPU 170 outputs 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 through each path of EmptyFlag, ReadPulse, and transmission DATA.
When there is no synchronization message, the Sync sending unit 136 outputs ReadPulse (a signal for reading data from the FIFO), and executes reading of 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 synchronization message stored in the SYNC message FIFO 139 is always one or less. The SYNC message FIFO 139 is connected to the Sync sending unit 136 by EmptyFlag, ReadPulse, and transmission DATA. The SYNC message FIFO 139 sends transmission DATA according to ReadPulse after any time timing according to the rule of the Sync sending unit 136 when 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 that counts up at 1 second / 128. SYNCID corresponds to SyncInterval in sending a synchronous message.
Further, the scheduler 141 includes an SMID that is a counter that counts up at a timing when one cycle of 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テーブルに対して書き込む。   Further, the scheduler 141 converts the SMID value into the SMID table address and the SMID profile address, and sets the address information in the Sync profile. The scheduler 141 reads nextInterval information, syncInterval, and sequenceID from the SMID table whose address is determined. If nextInterval matches SYNCID, the scheduler 141 determines that it is time to send a synchronization message, and outputs TransmitPulse to the Sync generation unit 135 and the Sync transmission unit 136. When nextInterval matches SYNCID, the scheduler 141 updates the value of nextInterval and the value of sequenceID. Specifically, the scheduler 141 updates the value of nextInterval at the next transmission timing calculated from the value of syncInterval. Further, the scheduler 141 writes a numerical value obtained by incrementing sequenceID by 1 in the SMID table.

ここで、nextIntervalは、スレーブ装置400毎に設定されている同期メッセージ送出間隔に対応するための情報である。同期メッセージ送出間隔が128PPSに設定されているスレーブ装置400に対しては、グランドマスタークロック装置100は、SyncIDが1インクリメントする間隔と同じ間隔で同期メッセージを送出すればよい。一方、同期メッセージ送出間隔が64PPSに設定されているスレーブ装置400に対しては、グランドマスタークロック装置100は、SyncIDが2インクリメントする間隔と同じ間隔で同期メッセージを送出する必要がある。   Here, nextInterval is information for corresponding to the synchronous message transmission interval set for each slave device 400. For 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 interval at which SyncID is incremented by one. 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 at which 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 next interval stored in the Sync profile storage unit 134 with the SMID for each slave device 400. When it is determined that the value of nextInterval is the same as the value of SMID, the scheduler 141 determines that the timing for sending the synchronization message has arrived.
Furthermore, the scheduler 141 calculates the next transmission timing from the syncInterval stored in the Sync profile storage unit 134 for each slave device 400, and writes it in the nextInterval. Since 128 PPS is the standard minimum interval, the calculation formula is 128 / SyncInterval, and the above calculation result is added to the current nextInterval value.
For example, in the case of the slave device 400 in which the synchronization message transmission interval is set to 64 PPS, 128 ÷ 64 = 2, and 2 is added to the value stored in nextInterval, and writing (updating) is performed in the nextInterval area.
Further, in the case of the slave device 400 in which the synchronization message transmission interval is set to 32 PPS, 128 ÷ 32 = 4, and 4 is added to the value stored in the nextInterval, and writing (updating) is performed in the nextInterval area.

Sync生成部135は、スケジューラ141からのTransmit pulseを受信すると、SMIDテーブルおよびSMIDプロファイルからデータを読み出す。なお、アドレスについては既にスケジューラ141にて決定しているため、読み出す必要は無い。また、Sync生成部135は、全ての同期メッセージに共通のグローバルプロファイルを読み出し、図8にて示した同期メッセージを組み立てる。組み立て処理は単純なフィールドの移動のみで完了する。またID領域に関してはランダムの値が期待されるので、Sync生成部135は、ランダム値ジェネレータにてランダム値を挿入する。Sync生成部135が用いるランダム値ジェネレータは、ランダム値を生成可能なものであればよく、公知のランダム値ジェネレータを用いることができる。
Sync生成部135は、同期メッセージの組み立てが完了すると、直ちに当該同期メッセージをSYNCメッセージFIFO139へ出力する。
When receiving the transmission 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 the address. Also, the Sync generation unit 135 reads a global profile common to all the synchronization messages, and assembles the synchronization message shown in FIG. The assembly process is completed with a simple field movement. Since a random value is expected for the ID area, the sync generation unit 135 inserts a random value using 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 generator 135 outputs the synchronization message to the SYNC message FIFO 139 immediately after 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 a synchronization message transmission rule can be set from the CPU 170. In this register, it is possible to set one of three types of transmission methods: (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 grand master clock device 100 sets the synchronization message transmission rule in consideration of the characteristics of the network to which the grand master 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 synchronization message transmission timing arrives, transmission of packets other than all currently transmitted synchronization messages (general message packets; hereinafter referred to as CPU packets) is interrupted, and the synchronization message is transmitted. This is the transmission method. For packets for which transmission has been interrupted, discard processing is performed until the end of the packet.
This is a particularly effective method when the partner apparatus detects an error but can expect retransmission by an upper layer.
(2) In the high-priority transmission method, when the synchronization message transmission timing arrives, the CPU waits for the completion of the currently transmitted CPU packet and always transmits the synchronization message in the next transmission. Even if CPU packets are issued continuously, the synchronization message is transmitted with the highest priority.
(3) In the transmission time reservation method, paying attention to the fact that the maximum value of the CPU packet is determined to be 1518 bytes according to Ethernet (registered trademark), 1518 bytes before the synchronous message transmission timing (actually, IFG Since the FCS exists, transmission of a new CPU packet is suppressed at the time of 1542 octets (before octet time). As a result, the synchronization message can be reliably transmitted after 1542 octets have elapsed. Note that 1542 octets correspond to an example of a specified time specified as a time required for sending a general message. The CPU packet 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 the transmission of a synchronous message when 1542 octet time passes. In time synchronization, the arrival speed of a message is not a problem, and the interval between messages and the accuracy of the time stamp in the message are important. Therefore, the transmission time reservation method is effective. Further, since the transmission of the CPU packet is stopped only when there is a synchronization message in the transmission time reservation method, even when the synchronization message transmission interval (Sync interval) is long, such as when the number of slave devices 400 is small, the CPU message Can be sent efficiently.
Here, the maximum time required for sending a general message is defined as the specified time. However, the specified time is not limited to this and may be any time required for sending a general message. Even in this case, the synchronization message transmission interval is constant.

受信タイムスタンプユニット131は、受信した時刻同期パケットに対し、プレシジョンタイムカウンターユニット142から得た時刻情報を打刻する処理を行う。
送信タイムスタンプユニット137は、送信する時刻同期パケットに対し、プレシジョンタイムカウンターユニット142から得た時刻情報を打刻する処理を行う。
受信タイムスタンプユニット131、送信タイムスタンプユニット137共に、時刻同期パケットを認識して時刻情報を打刻する。同期メッセージも時刻同期パケットであることから、送信タイムスタンプユニット137は、同期メッセージにも正確な時刻情報を打刻する。
The reception time stamp unit 131 performs a process of stamping the 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 stamping the time information obtained from the precision time counter unit 142 for the time synchronization packet to be transmitted.
Both the reception time stamp unit 131 and the transmission time stamp unit 137 recognize the time synchronization packet and stamp the time information. Since the synchronization message is also a time synchronization packet, the transmission time stamp unit 137 stamps accurate time information on 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 diagram showing an example of the data structure of the synchronization message. The MSB on the left side of the figure is data that is first transmitted to the network 810. The inter frame gap (IFG) is required to be at least 12 octets as defined by Ethernet (registered trademark). The inter frame gap is provided to separate frames.
The preamble + FSD is composed of a 7-octet preamble and a 1-octet FSD (frame start delimiter). 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 1588v2 synchronization message (Sync message) is an area in which a synchronization message having a format defined by IEEE 1588v2 is stored. The IEEE 1588v2 synchronization message is composed of a plurality of elements shown in FIG. 8 and transmits time information from the grand master clock device 100 to the slave device 400. The size of the IEEE 1588v2 synchronization message is a fixed length, and is 86 bytes when the synchronization message is configured by UDP.

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

同期メッセージの要素を全て合わせると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ギガビット毎秒のいずれの回線レートにおいても問題なく同期メッセージを送出可能である。   When all the elements of the synchronization message are combined, the size becomes 110 octets. Since 1 octet is composed of 8 bits, 110 octets are 880 bits. Here, in order to convert how much the 880 bits have an effect on the bandwidth, the packet occupation time when transmitting at the line rate of 10 gigabits per second (Gbps) and 1 gigabit per second is calculated. Is 88 nanoseconds and 1 gigabit per second is 880 nanoseconds. Here, it is noted that the synchronization message can be issued up to 128 times per second. 8265, and 1 second / 128 times = 7,812,500 nanoseconds. Therefore, when performing time synchronization with respect to a single slave device 400, a synchronization message can be transmitted without any problem 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 diagram illustrating an example of a synchronization message transmission interval in a network in which a plurality of slave devices 400 exist. In the figure, the worst case of the transmission interval of the synchronization message is shown. Specifically, an example in which the network bandwidth is most tight is shown. As described above, each synchronization message has a minimum interval of 7,812,500 nanoseconds. FIG. 14 shows a 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 is further divided into 500, which is the number of slave devices 400. The transmission interval of the synchronization message 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 the synchronization message. Among the packet occupation times described with reference to FIG. 13, 15,625 nanoseconds> 880 nanoseconds even at 1 gigabit per second where the line speed is the slowest and the transmission time of one synchronization message is the longest. Therefore, when focusing on the synchronization message, the bandwidth can be secured. However, it is necessary to distribute the product of the number of slave devices 400 controlled by the grand master clock device 100 at a time × SYNC interval of each slave device 400 to an appropriate value according to the communication amount 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 SyncID is counted up to 127 at the maximum. The SyncID becomes 127 after becoming 127. In addition, an SMID is introduced to generate a timing for sending a synchronization message, and an area for storing information related to the slave device 400 is provided in association with each SMID.
The SMID takes a positive integer value from 0 to 499, and is configured to count up in 15,625 nanoseconds. Note that the synchronization message information for the same slave device 400 must be associated with the same SMID. For example, the manager of the grand master clock device 100 determines which SMID is used. In order to make the synchronization message interval constant, the SMID corresponding to one slave device 400 needs to be unique.
SyncID corresponds to an example of the first counter. The SMID corresponds to an 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 diagram showing an example of the data structure of the SMID table.
The SMID table includes an 11-bit area for registering the SMID, a SyncInterval area that is a transmission interval of the synchronization message, a NextInterval for determining the next transmission timing when the synchronization message corresponding to the SMID is transmitted, and one by one. And a sequence ID with which data is incremented. NextInterval is a value determined by 128 / SyncInterval, and is updated after sending the synchronization message. The sequenceID is written by incrementing the read value by one. In the slave device 400, this sequence ID is used to confirm that the SYNC message is not lost or the order is not reversed.

図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 diagram illustrating an example of the operation of the scheduler 141. The scheduler 141 is configured by hardware, and executes the processes in steps S101 to S110 in FIG. 16 and the processes in steps S120 to S130 in parallel.
When acquiring the pulse per second from the precision time counter unit 142, the scheduler 141 executes Step S101. In step S101, the scheduler 141 executes SyncID, SMID, SMID. Execute zero clear of the counters of the counters. SMID. The counter is a counter for detecting the timing for 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 or not the timing for transmitting the synchronization message has arrived. Specifically, the scheduler 141 performs SMID. It is determined whether the value of counter is 15,625 nanoseconds which is the time boundary of SMID. SMID. That the value of counter is a time boundary indicates that it is timing to transmit a synchronization message.
If it is determined that it is a time boundary (step S102: YES), the scheduler 141 increments the SMID by 1 in step S103. As a result, the process proceeds to the next SMID process.
In step S104, the scheduler 141 clears SMID.counter to 0 and generates SMIDpulse for the processing in step S120. This SMIDpulse indicates that the minimum cycle (128 PPS) for sending the 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, SMID. When it is determined that the counter has not reached 15,625 nanoseconds (step S102: NO), the scheduler 141 determines in step S110 that SMID. The counter is incremented by 1, and the process proceeds to step S102.
In step S105, the scheduler 141 determines whether or not the SMID has reached its maximum value of 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), the process proceeds to step S102 because there is still an unprocessed SMID.
On the other hand, if it is determined that the SMID has reached 499 (step S105: YES), it means that all SMID processing has been completed, so the scheduler 141 sets SMID = 0, that is, the initial value in step S106. To 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 SyncID by 1. Thereby, the process proceeds to the next SyncID process.
In step S108, the scheduler 141 determines whether all SyncID processing has been completed. Specifically, the scheduler 141 determines whether or not SyncID is 127.
When it is determined that SyncID is 127 (step S108: YES), in step S109, the scheduler 141 sets SyncID = 0. After step S109, the process proceeds to step S102.
On the other hand, if it is determined in step S108 that the SyncID is other than 127 (step S108: No), the process proceeds to step S102 because there is a SyncID to be processed.

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

ステップS122では、スケジューラ141は、先頭アドレスが確定したオフセット値を元にNextIntervalを取得する。
ステップS123では、スケジューラ141は、ステップS122で取得したNextIntervalとSyncIDとが同じか否かを判定する。同じではないと判定した場合(ステップS123:No)、ステップS120へ遷移する。これにより、SMIDpulse待ち状態になる。
In step S122, the scheduler 141 acquires NextInterval based on the offset value for which the head address is determined.
In step S123, the scheduler 141 determines whether the NextInterval acquired in step S122 is the same as the SyncID. When it determines with it not being the same (step S123: No), it changes to step S120. As a result, the SMIDpulse wait state is entered.

一方、SyncIDとNextIntervalとが同じであると判定した場合(ステップS123:Yes)、同期メッセージを送出するタイミングであり、ステップS124へ遷移する。
ステップS124では、スケジューラ141は、SMIDテーブルよりSyncIntervalを読み込む。
ステップS125では、スケジューラ141は、現在のNextIntervalを更新するために128÷SyncIntervalを演算する。
On the other hand, when it is determined that SyncID and NextInterval are the same (step S123: Yes), it is the timing to send the synchronization message, and the process proceeds to step S124.
In step S124, the scheduler 141 reads SyncInterval from the SMID table.
In step S125, the scheduler 141 calculates 128 / SyncInterval in order 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 ÷ SyncInterval to NextInterval in the SMID table. If the value of NextInterval is greater than 127 as a result of addition, a value obtained by subtracting 128 from the value is written in the SMID table.
In step S127, the scheduler 141 reads sequenceID from the SMID table.
Since IEEE1588v2 defines that sequenceID is incremented by 1, in step S128, scheduler 141 performs sequenceID increment processing.

ステップS129では、スケジューラ141は、sequenceIDをSMIDテーブルへ書き戻す。
以上で一連の同期メッセージに関する処理が完了したので、ステップS130において、スケジューラ141は、同期メッセージ送信PulseをSync生成部に送信し、ステップS120へ遷移する。
In step S129, the scheduler 141 writes the sequence ID back to the SMID table.
Since the processing 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 proceeds to step S120.

図17は、同期メッセージ送出時のデータの流れの例を示す説明図である。
同図において、送信FIFO133は、グランドマスタークロック装置100からの全ての送信パケットのうち同期メッセージ以外のパケット(CPUパケット)が一時格納されるFIFOメモリである。
各パケットでは、パケット情報に加えてSOF(スタートオブフレーム)、EOF(エンドオブフレーム)を前後に付けることでパケット間の切れ目を明確にしている。
TFIFO.EmptyFlagは送信FIFO133が空の状態を通知するフラグである。
FIG. 17 is an explanatory diagram showing an example of the flow of data when sending a synchronous message.
In the figure, a transmission FIFO 133 is a FIFO memory in which packets (CPU packets) other than the synchronization message among all transmission packets from the grand master clock device 100 are temporarily stored.
In each packet, in addition to packet information, SOF (start of frame) and EOF (end of frame) are attached to the front and back to clarify the 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 1-clock (CLK) pulse signal for reading the bit width (hereinafter, 1 line) on the read side of the FIFO. When sending data continuously, TFIFO.ReadPulse may be continuously asserted.
TFIFO. DATA is packet data other than EOF, SOF, or a synchronization message that 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 for storing a synchronization message. 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 one line of data constituting a synchronization message that is output after one cycle of the read pulse.
The Sync sending unit 136 has a Sync Transmit rule ID area for selecting one of (1) forced discarding method, (2) high priority sending method, and (3) transmission time reservation method. Then, the SYNC sending unit 136 reads packet data from either the transmission FIFO 133 or the SYNC message FIFO 139 according to the rule set in the Sync Transmit rule ID area. Then, the Sync transmission 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 subsequent processing block.

図18は、強制廃棄方式の場合にSync送出部136が行う動作の例を示す説明図である。
ステップS201では、Sync送出部136は、カウンター等のリセットを行い、OSからのSYNC送信開始信号を待ち受ける。
次に、ステップS202へ遷移し、SYNC送出部136は、DataEnable=0を設定する。以上が前処理である。
FIG. 18 is an explanatory diagram illustrating 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 sending unit 136 resets a counter and waits for a SYNC transmission start signal from the OS.
Next, the process proceeds to step S202, where the SYNC sending unit 136 sets DataEnable = 0. The above is the preprocessing.

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

一方、ステップS203において同期メッセージが存在しないと判定した場合(ステップS203:Empty)、ステップS210へと進み、TFIFO.EmptyFlagを参照して送信FIFO133が空か否かを判定する。
送信FIFO133が空であると判定した場合(ステップS210:Empty)、ステップS202へ遷移する。
On the other hand, when it is determined in step S203 that there is no synchronization message (step S203: Empty), the process proceeds to step S210, where TFIFO. It is determined whether or not the transmission FIFO 133 is empty with reference to the EmptyFlag.
When 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 the transmission data = TFIFO. DATA.
In step S212, the SYNC sending unit 136 sets DATAEnable = 1 and executes packet transmission processing other than the synchronization message (that is, CPU packet transmission processing).

ステップS213では、SYNC送出部136は、SFIFO.EmptyFlagを参照して同期メッセージの有無を判定する。
同期メッセージが存在しないと判定した場合(ステップS213:Empty)、SYNC送出部136は、同期メッセージ以外のパケット送出処理を継続する。
一方、同期メッセージが存在すると判定した場合(ステップS213:Not Empty)、ステップS204とステップS213とに処理を分岐する。なお、ステップS204以降の処理とステップS213以降の処理をと同時並行処理にて実行する。
In step S213, the SYNC sending unit 136 refers to SFIFO.EmptyFlag to determine whether there is a synchronization message.
When it is determined that there is no synchronization message (step S213: Empty), the SYNC transmission unit 136 continues the packet transmission processing other than the synchronization message.
On the other hand, if it is determined that a synchronization message exists (step S213: Not Empty), the process branches to step S204 and step S213. In addition, the process after step S204 and the process after step S213 are performed by simultaneous parallel processing.

ステップS214において、SYNC送出部136は、送信FIFO133のデータを廃棄する(TFIFO.DATA=廃棄)。
ステップS215において、SYNC送出部136は、送信FIFO133からのデータリードは継続処理する。
ステップS216において、SYNC送出部136は、送信FIFO133から読み出したデータがEOF(TFIFO.DATA=EOF)か否かを判定する。
In step S214, the SYNC sending unit 136 discards the data in the transmission FIFO 133 (TFIFO.DATA = discard).
In step S215, the SYNC sending unit 136 continues the data read from the transmission FIFO 133.
In step S216, the SYNC sending 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のループにて廃棄処理を継続する。
When it determines with it being EOF (step S216: EOF), it changes to step S203.
On the other hand, when it determines with other than EOF (step S216: Not EOF), it changes to step S214. In this case, the discarding process is continued in the loop of steps S214 to S216 until one packet of data is read 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 diagram illustrating an example of an operation performed by the Sync transmission unit 136 in the case of the high priority transmission method.
In step S301, the sync sending unit 136 resets a counter and waits for a SYNC transmission start signal from the OS.
In step S302, the SYNC sending 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 performs SFIFO. It is determined whether a synchronization message exists with reference to EmptyFlag. When it is determined that the synchronization message exists (step S303: Not Empty), the synchronization message is transmitted in steps S304 to S305.
On the other hand, when it is determined in step S303 that there is no synchronization message (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 performs TFIFO. It is determined whether data (synchronization message) exists in the transmission FIFO 133 with reference to the EmptyFlag. When it is determined that the transmission FIFO 133 is empty (no synchronization message exists) (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), a 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 performs TFIFO. It is determined whether it is EOF with reference to DATA. When it determines with it being EOF (step S313: EOF), it changes to step S302.
On the other hand, when it determines with other than EOF (step S313: Not EOF), it changes 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 diagram illustrating 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, the synchronization message starts to be sent after waiting for 1542 octet time which is the maximum packet size of IPv4. In a wait state where a synchronization message exists, WaitFlag = 1. WaitFlag is evaluated only when transmission of a normal packet (CPU packet) is started. When WaitFlag = 1, the normal packet is in a transmission suppression state. On the other hand, evaluation of WaitFlag is not performed during transmission of a normal packet. In addition, in the transmission time reservation method, the first routine for monitoring the status of the synchronization message and the operation of the WaitFlag and the second routine for starting transmission if WaitFlag = 0 at the start of normal packet transmission are simultaneously performed. Executed.

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

ステップS402では、SYNC送出部136は、DataEnable=0とする。
ステップS403では、SYNC送出部136は、WaitFlag=0とする。
ステップS404では、SYNC送出部136は、SFIFO.EmptyFlagを参照し、同期メッセージが存在するか否かを判定する。
同期メッセージが存在すると判定した場合(ステップS404:Not Empty)、ステップS405へ遷移する。
In step S402, the SYNC sending unit 136 sets DataEnable = 0.
In step S403, the SYNC sending unit 136 sets WaitFlag = 0.
In step S404, the SYNC transmission unit 136 performs SFIFO. Referring to EmptyFlag, it is determined whether or not a synchronization message exists.
When it is determined that a synchronization message exists (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 there is no synchronization message (the SYNC message FIFO 139 is empty) (step S404: Empty), the process proceeds to step S404. That is, a loop process for re-evaluating step S404 is executed.

ステップ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 sending unit 136 substitutes SendWait = 1542, and the process proceeds to step S406.
In step S406, the SYNC sending unit 136 sets WaitFlag = 1 and advances the process to step S407.
In step S407, the SYNC sending unit 136 decrements SendWait by 1.
In step S408, the SYNC sending unit 136 determines whether SendWait is 0 or not. When it is determined that SendWait is not 0 (step S408: No), the process proceeds to step S407. In this case, the loop processing 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とする。
When it is determined in step S408 that SendWait = 0 (step S408: Yes), the process proceeds to step S409.
In step S409, the SYNC sending 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 performs SFIFO. It is determined whether or not the transmission FIFO 133 is empty with reference to the EmptyFlag.
When it is determined that the transmission FIFO 133 is empty (step S411: Empty), the process proceeds to step S402.
On the other hand, if it is determined that the transmission FIFO 133 is not empty (there is a synchronization message) (step S411: Not Empty), the process proceeds to step S408. In this case, the transmission of the synchronization message is continued.

ステップS421では、SYNC送出部136は、TFIFO.EmptyFlagを参照して送信FIFO133が空か否かを判定する。
送信FIFO133が空であると判定した場合(ステップS421:Empty)、ステップS421へ遷移する。すなわち、ステップS421を再評価するループ処理を実行する。
In step S421, the SYNC sending unit 136 performs TFIFO. It is determined whether or not the transmission FIFO 133 is empty with reference to the EmptyFlag.
When it is determined that the transmission FIFO 133 is empty (step S421: Empty), the process proceeds to step S421. That is, a loop process for 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, when it is determined that the transmission FIFO 133 is not empty (step S421: Not Empty), that is, when it is determined that a general message exists, the process proceeds to step S422.
In step S422, the SYNC sending unit 136 determines whether WaitFlag is 0 or not. When it is determined that WaitFlag is not 0 (WaitFlag = 1) (step s422: No), that is, when it is the waiting time for sending a synchronous message, the process proceeds to step S421.
When it is determined that WaitFlag = 0 (step S422: Yes), that is, when it is determined that it is not a synchronous message transmission waiting time, the process proceeds to step S423.
In step S423, the SYNC sending unit 136 transmits the TFIFO. Select DATA.
In step S424, DataEnable = 1.
Thereafter, in step S425, the SYNC sending unit 136 sets the TFIFO. It is determined whether DATA = EOF.
When it determines with it being EOF (step S425: EOF), it changes to step S426. On the other hand, when it determines with other than EOF (step S425: Not EOF), it changes to step S423. In this case, transmission of CPU packets (packets other than synchronization messages) is continued.
In step S426, the SYNC sending unit 136 sets DataEnable = 0, and the process proceeds 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 diagram showing how much transmission waiting occurs in the transmission time reservation method.
The constituent elements of the packet shown in the figure are the same as those in 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 of 128 messages are transmitted to 500 slaves per second. SMID slot length = 15,625 ns indicates that the minimum value of the synchronization message transmission interval is 15,625 nanoseconds.
A packet of 1542 octets indicates a packet having a maximum packet length of IPv4. 1542 octets are 12336 bits, and when the line speed is 10 Gbps, the time required for transmission is 1234 nanoseconds. Further, when the line speed is 10 Gbps, the time required for transmitting the packet is 12336 nanoseconds. Both are shorter than 15625 nanoseconds and can be transmitted at a synchronous message transmission interval.

以上のように、同期メッセージを生成するSync生成部135が、一般メッセージを生成するCPU170よりも下位層に設けられている。
これにより、Sync生成部135は、CPU170が行う処理による時間の揺らぎの影響を受けずに同期メッセージを生成することができ、グランドマスタークロック装置100における同期パケットの送信間隔の揺らぎを低減させることができる。
特に、MAC部130がARP(Address Resolution Protocol)を実行した後に、Sync生成部135が同期メッセージを生成することで、実行時間の揺らぎが大きいARPの影響を低減させることができる。
As described above, the Sync generation unit 135 that generates the synchronization message is provided in a lower layer than the CPU 170 that generates the general message.
As a result, the Sync generation unit 135 can generate a synchronization message without being affected by time fluctuations due to processing performed by the CPU 170, and can reduce fluctuations in the transmission interval of synchronization packets in the grandmaster clock device 100. it can.
In particular, after the MAC unit 130 executes ARP (Address Resolution Protocol), the sync generation unit 135 generates a synchronization message, thereby reducing the influence of ARP having a large fluctuation in execution time.

また、同期メッセージの送出タイミングか否かを判定するスケジューラ141が、一般メッセージを生成するCPU170よりも下位層に設けられている。
これにより、スケジューラ141は、CPU170が行う処理による時間の揺らぎの影響を受けずに同期メッセージの送出タイミングを検出することができ、グランドマスタークロック装置100における同期パケットの送信間隔の揺らぎを低減させることができる。
In addition, a scheduler 141 that determines whether or not it is a synchronous message transmission timing is provided in a lower layer than the CPU 170 that generates a general message.
Thereby, the scheduler 141 can detect the transmission timing of the synchronization message without being affected by the fluctuation of the time due to the processing performed by the CPU 170, and can reduce the fluctuation of the transmission interval of the synchronization packet in the grand master clock device 100. Can do.

また、グローバルプロファイル記憶部134−1は、同期メッセージの生成に用いられるデータのうち、同一のグランドマスタークロック装置100が送出する全ての同期メッセージで同一の値となるデータであるグローバルプロファイルを記憶する。SMIDプロファイル記憶部134−2は、同期メッセージの生成に用いられるデータのうち、同一のグランドマスタークロック装置100から送出され、かつ、同一のスレーブ装置400に送出される同期メッセージで同一の値となるデータであるSMIDプロファイルを、スレーブ装置400毎に記憶する。SMIDテーブル記憶部134−3は、同期メッセージの生成に用いられるデータのうち、同時メッセージ毎に異なる値となるデータを示すSMIDテーブルを記憶する。そして、Sync生成部135は、グローバルプロファイル記憶部134−1から読み出したグローバルプロファイルと、SMIDプロファイル記憶部134−2から、同期メッセージ送出対象となっているスレーブ装置400について読み出したSMIDプロファイルと、SMIDテーブル記憶部134−3から読み出したSMIDテーブルに基づいて生成したデータとを組み合わせて同期メッセージを生成する。Sync生成部がSMIDテーブルに基づいて生成したデータは、図15を参照して説明したように、1ずつデータがインクリメントされるsequenceIDなど、同期メッセージ毎に異なる値を有するデータである。
このように、Sync生成部135は、グローバルプロファイルとSMIDプロファイルとSMIDテーブル記憶部134−3から読み出したデータに基づいて生成したデータとを組み合わせるという簡単な処理で、同期メッセージを生成することができる。
In addition, the global profile storage unit 134-1 stores a global profile that is data having the same value in all the synchronization messages transmitted by the same grand master clock device 100 among the data used for generating the synchronization message. . The SMID profile storage unit 134-2 has the same value in the synchronization message transmitted from the same grand master clock device 100 and transmitted to the same slave device 400 among the data used for generating the synchronization message. The SMID profile that is data is stored for each slave device 400. The SMID table storage unit 134-3 stores an SMID table indicating data having different values for each simultaneous message among data used for generating a synchronization message. The sync generation unit 135 then reads the global profile read from the global profile storage unit 134-1, the SMID profile read from the SMID profile storage unit 134-2 for the slave device 400 that is the target of sending the synchronous message, and the SMID. A synchronization message is generated by combining data generated based on the SMID table read from the table storage unit 134-3. The data generated by the Sync generation unit based on the SMID table is data having a different value for each synchronization message, such as sequenceID in which the data is incremented by one as described with reference to FIG.
As described above, the Sync generation unit 135 can generate a synchronization message by a simple process of combining the global profile, the SMID profile, and the data generated based on the data read from the SMID table storage unit 134-3. .

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

また、Sync送出部136は、スケジューラ141が同期メッセージの送出タイミングであると判定すると、同期メッセージ以外のメッセージである一般メッセージを送出中である場合は、当該一般メッセージの送出を中断して、同期メッセージを送出する。
これにより、Sync送出部136は、同期メッセージの送出タイミング到来時に、一般メッセージを送出中であっても直ちに同期メッセージを送出することができる。この点において、グランドマスタークロック装置100は、時間の揺らぎ無しに同期メッセージを送出することができる。
In addition, when the sync sending unit 136 determines that the timing of sending the synchronization message is reached by the scheduler 141, if the general message that is a message other than the synchronization message is being sent, the sending of the general message is interrupted and the synchronization message is sent. Send a message.
As a result, the Sync sending unit 136 can send the synchronization message immediately when the sending timing of the synchronization message arrives, even if the general message is being sent. In this regard, the grand master clock device 100 can send a synchronization message without time fluctuation.

また、Sync送出部136は、スケジューラ141が同期メッセージの送出タイミングであると判定すると、同期メッセージ以外メッセージである一般メッセージの新たな送出を抑制する。
これにより、Sync送出部136は、送出対象の一般メッセージが複数ある場合でも、同期メッセージを優先的に送出することができる。この点において、グランドマスタークロック装置100は、同期メッセージの送出間隔の揺らぎを低減させることができる。
Also, if the sync sending unit 136 determines that the scheduler 141 is the sending timing of the synchronization message, the sync sending unit 136 suppresses new sending of a general message that is a message other than the synchronization message.
Thereby, the Sync sending unit 136 can send the synchronization message with priority even when there are a plurality of general messages to be sent. In this regard, the grand master clock device 100 can reduce fluctuations in the synchronization message transmission interval.

また、Sync送出部136は、スケジューラ141が同期メッセージの送出タイミングであると判定すると、新たな同期メッセージ及び一般メッセージの送出を抑制し、一般メッセージの送出に要する時間として規定されている規定時間が経過した後、同期メッセージを送出する。
これにより、Sync送出部136は、メッセージの送出に要する時間として規定されている規定時間が経過した後、必ず、メッセージ送出を行っていない状態から同期メッセージを送出することができる。この点において、グランドマスタークロック装置100は、同期メッセージの送出タイミング到来時に、直ちに同期メッセージを送出することができ、同期メッセージの送出間隔の揺らぎを低減させることができる。
また、スケジューラ141が同期メッセージの送出タイミングであると判定した場合のみ、Sync送出部136が新たな同期メッセージ及び一般メッセージの送出を抑制する点で、一般メッセージの送出が制限される頻度が少ない。この点において、グランドマスタークロック装置100は、一般メッセージの送出の遅延を低減させることができる。
Further, when the sync sending unit 136 determines that the scheduler 141 is the sending timing of the synchronization message, the sync sending unit 136 suppresses sending of a new synchronization message and a general message, and a specified time defined as a time required for sending the general message. After the elapse, send a synchronization message.
As a result, the Sync sending unit 136 can always send a synchronous message from a state where no message is sent after a stipulated time specified as a time required for sending a message has elapsed. In this respect, the grand master clock device 100 can immediately send out the synchronization message when the sending timing of the synchronization message arrives, and can reduce fluctuations in the sending interval of the synchronization message.
Further, only when the scheduler 141 determines that it is a synchronous message transmission timing, the frequency of the transmission of the general message is limited in that the Sync transmission unit 136 suppresses the transmission of a new synchronous message and a general message. In this respect, the grand master clock device 100 can reduce a delay in sending a general message.

また、Sync送出部136が同期メッセージを送出するモードとして、スケジューラ141が同期メッセージの送出タイミングであると判定すると、一般メッセージを送出中である場合は、当該一般メッセージの送出を中断して、同期メッセージを送出するモードと、スケジューラ141が同期メッセージの送出タイミングであると判定すると、新たな一般メッセージの送出を抑制するモードと、スケジューラ141が同期メッセージの送出タイミングであると判定すると、新たな同期メッセージ及び一般メッセージの送出を抑制し、一般メッセージの送出に要する時間として規定されている規定時間が経過した後、同期メッセージを送出するモードとのうち少なくとも2つのモードからいずれかを選択可能である。
これにより、ユーザは、グランドマスタークロック装置100の運用状況に応じて、上記のモードのいずれかを選択することができる。
When the sync sending unit 136 sends the synchronization message as a mode, the scheduler 141 determines that it is the sending timing of the synchronization message. If the general message is being sent, the sending of the general message is interrupted and the synchronization message is sent. When it is determined that the message sending mode and the scheduler 141 are the sending timing of the synchronization message, the mode for suppressing the sending of a new general message and when the scheduler 141 judges that the sending timing of the synchronization message is the new synchronization message It is possible to select one of at least two modes out of the modes for sending out the synchronization message after the stipulated time specified as the time required for sending out the general message is suppressed by sending out the message and the general message. .
Thus, the user can select one of the above modes according to the operation status of the grand master clock device 100.

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

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

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

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 Grand Master Clock Device 110 GNSS Synchronous Frequency Oscillator 111 GNSS Receiver 112 Clock Adjuster 113 Crystal Oscillator 120 Physical Layer Chip 130 Media Access Controller 131 Reception Time Stamp Unit 132 Reception FIFO
133 Send 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 Sending Unit 137 Transmission Timestamp Unit 139 Sync Message FIFO
141 Scheduler 142 Precision Time Counter Unit 150 Quartz Crystal 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 (10)

時刻情報を含む同期メッセージを送出する同期メッセージ送出装置であって、
前記同期メッセージを生成する同期メッセージ生成部と、
前記同期メッセージ以外のメッセージである一般メッセージを生成する一般メッセージ生成部と、
前記同期メッセージ、及び、前記一般メッセージを送出する送出部と、
を備え、
前記同期メッセージ生成部が、前記一般メッセージ生成部よりも下位層に設けられている、
同期メッセージ送出装置。
A synchronization message sending device for sending a synchronization message including time information,
A synchronization message generator for generating the synchronization message;
A general message generator that generates a general message that is a message other than the synchronization message;
A sending unit for sending the synchronization message and the general message;
With
The synchronization message generator is provided in a lower layer than the general message generator,
Synchronous message sending device.
前記同期メッセージの生成に用いられるデータのうち、同一の同期メッセージ送出装置が送出する全ての同期メッセージで同一の値となるデータであるグローバルプロファイルを記憶するグローバルプロファイル記憶部と、
前記同期メッセージの生成に用いられるデータのうち、同一の同期メッセージ送出装置から送出され、かつ、同一の時刻同期対象機器に送出される同期メッセージで同一の値となるデータであるSMIDプロファイルを、時刻同期対象機器毎に記憶するSMIDプロファイル記憶部と、
前記同期メッセージの生成に用いられるデータのうち、時刻同期メッセージ毎に異なる値となるデータを示すSMIDテーブルを記憶するSMIDテーブル記憶部と、
を備え、
前記同期メッセージ生成部は、前記グローバルプロファイル記憶部から読み出したグローバルプロファイルと、前記SMIDプロファイル記憶部から、同期メッセージ送出対象となっている時刻同期対象機器について読み出したSMIDプロファイルと、前記SMIDテーブル記憶部から読み出したSMIDテーブルに基づいて生成したデータとを組み合わせて同期メッセージを生成する、
請求項1に記載の同期メッセージ送出装置。
A global profile storage unit that stores a global profile that is data having the same value in all the synchronization messages transmitted by the same synchronization message transmission device among the data used to generate the synchronization message;
Of the data used to generate the synchronization message, the SMID profile, which is data sent from the same synchronization message sending device and having the same value in the synchronization message sent to the same time synchronization target device, A SMID profile storage unit for storing each synchronization target device;
Among the data used for generating the synchronization message, a SMID table storage unit that stores a SMID table indicating data that is different for each time synchronization message;
With
The synchronization message generator includes a global profile read from the global profile storage unit, a SMID profile read from the SMID profile storage unit for a time synchronization target device that is a synchronization message transmission target, and the SMID table storage unit. A synchronization message is generated by combining the data generated based on the SMID table read from
The synchronous message transmission apparatus according to claim 1.
前記同期メッセージの送出タイミングか否かを判定するスケジューラ部を備え、
前記送出部は、前記スケジューラ部が、前記同期メッセージの送出タイミングであると判定すると、当該同期メッセージを送出し、
前記スケジューラ部が、前記一般メッセージ生成部よりも下位層に設けられている、
請求項1または請求項2に記載の同期メッセージ送出装置。
A scheduler unit for determining whether or not the synchronization message is transmitted;
The sending unit sends out the synchronization message when the scheduler unit determines that it is the sending timing of the synchronization message,
The scheduler unit is provided in a lower layer than the general message generation unit,
The synchronous message transmission device according to claim 1 or 2.
同一の時刻同期対象機器に対する同期メッセージ送信間隔の最小値として規定されている間隔毎にカウントする第1カウンターと、
前記同一の時刻同期対象機器に対する同期メッセージ送信間隔の最小値を時刻同期対象機器の数でさらに分割した間隔毎にカウントする第2カウンターと
を備え、
前記スケジューラ部は、前記第2カウンターが示す時刻同期対象機器に対して同期メッセージを送出するタイミングか否かを前記第1カウンターの値に基づいて判定し、
前記送出部は、前記スケジューラ部が同期メッセージを送出するタイミングであると判定すると当該同期メッセージを送出する、
請求項3に記載の同期メッセージ送出装置。
A first counter that counts at intervals defined as the minimum value of the synchronization message transmission interval for the same time synchronization target device;
A second counter that counts for each interval further divided by the number of time synchronization target devices, the minimum value of the synchronization message transmission interval for the same time synchronization target device,
The scheduler unit determines whether it is time to send a synchronization message to the time synchronization target device indicated by the second counter based on the value of the first counter,
When the sending unit determines that it is time to send the synchronization message by the scheduler unit, the sending unit sends the synchronization message.
The synchronous message transmission apparatus according to claim 3.
前記送出部は、前記スケジューラ部が同期メッセージの送出タイミングであると判定すると、前記一般メッセージを送出中である場合は、当該一般メッセージの送出を中断して、前記同期メッセージを送出する、請求項3または請求項4に記載の同期メッセージ送出装置。   The sending unit, when the scheduler unit determines that it is a sending timing of a synchronization message, interrupts the sending of the general message and sends the synchronizing message if the general message is being sent. The synchronous message transmission device according to claim 3 or claim 4. 前記送出部は、前記スケジューラ部が同期メッセージの送出タイミングであると判定すると、新たな一般メッセージの送出を抑制する、請求項3または請求項4に記載の同期メッセージ送出装置。   5. The synchronous message transmission device according to claim 3, wherein the transmission unit suppresses transmission of a new general message when the scheduler unit determines that it is a synchronous message transmission timing. 前記送出部は、前記スケジューラ部が同期メッセージの送出タイミングであると判定すると、新たな同期メッセージ及び一般メッセージの送出を抑制し、前記一般メッセージの送出に要する時間として規定されている規定時間が経過した後、前記同期メッセージを送出する、請求項3または請求項4に記載の同期メッセージ送出装置。   When the sending unit determines that the timing of sending the synchronization message is determined by the scheduler unit, the sending unit suppresses sending of a new synchronization message and a general message, and a specified time specified as a time required for sending the general message has elapsed. 5. The synchronization message transmission apparatus according to claim 3, wherein the synchronization message is transmitted after the operation is performed. 前記送出部が前記同期メッセージを送出するモードとして、前記スケジューラ部が同期メッセージの送出タイミングであると判定すると、前記一般メッセージを送出中である場合は、当該一般メッセージの送出を中断して、前記同期メッセージを送出するモードと、前記スケジューラ部が同期メッセージの送出タイミングであると判定すると、新たな一般メッセージの送出を抑制するモードと、前記スケジューラ部が同期メッセージの送出タイミングであると判定すると、新たな同期メッセージ及び一般メッセージの送出を抑制し、前記一般メッセージの送出に要する時間として規定されている規定時間が経過した後、前記同期メッセージを送出するモードとのうち少なくとも2つのモードからいずれかの選択を受け付ける、請求項3または請求項4に記載の同期メッセージ送出装置。   As a mode in which the sending unit sends the synchronization message, when the scheduler unit determines that it is the sending timing of the synchronization message, if the general message is being sent, the sending of the general message is interrupted, When it is determined that the mode for sending a synchronization message and the scheduler unit is the timing for sending a synchronization message, the mode for suppressing the sending of a new general message and the scheduler unit is determined to be the timing for sending a synchronization message, Any one of at least two modes out of the modes for sending out the synchronization message after the stipulated time specified as the time required for sending out the general message is suppressed after sending out the new synchronization message and the general message. Or accepting a selection of claim 3 or Synchronous message transmission device according to Motomeko 4. 同期メッセージ送出装置と、時刻同期対象装置とを備え、
前記同期メッセージ送出装置は、
時刻情報を含む同期メッセージを送出する同期メッセージ送出装置であって、
前記同期メッセージを生成する同期メッセージ生成部と、
前記同期メッセージ以外のメッセージである一般メッセージを生成する一般メッセージ生成部と、
前記同期メッセージ、及び、前記一般メッセージを送出する送出部と、
を備え、
前記同期メッセージ生成部が、前記一般メッセージ生成部よりも下位層に設けられており、
前記時刻同期対象装置は、
前記同期メッセージ送出装置が送出する前記同期メッセージに基づいて、当該同期メッセージ送出装置との時刻同期を行う、
時刻同期システム。
A synchronization message sending device and a time synchronization target device;
The synchronous message sending device comprises:
A synchronization message sending device for sending a synchronization message including time information,
A synchronization message generator for generating the synchronization message;
A general message generator that generates a general message that is a message other than the synchronization message;
A sending unit for sending the synchronization message and the general message;
With
The synchronization message generator is provided in a lower layer than the general message generator,
The time synchronization target device is:
Based on the synchronization message sent by the synchronization message sending device, time synchronization with the synchronization message sending device is performed.
Time synchronization system.
時刻情報を含む同期メッセージを送出する同期メッセージ送出装置の同期メッセージ送出方法であって、
前記同期メッセージを生成する同期メッセージ生成ステップと、
前記同期メッセージ以外のメッセージである一般メッセージを生成する一般メッセージ生成ステップと、
前記同期メッセージ、及び、前記一般メッセージを送出する送出ステップと、
を有し、
前記同期メッセージ生成ステップは、前記一般メッセージ生成ステップよりも下位層にて実行される、
同期メッセージ送出方法。
A synchronization message sending method of a synchronization message sending device for sending a synchronization message including time information,
A synchronization message generating step for generating the synchronization message;
A general message generation step of generating a general message that is a message other than the synchronization message;
A sending step for sending the synchronization message and the general message;
Have
The synchronization message generation step is executed in a lower layer than the general message generation step.
Synchronous message sending method.
JP2015063042A 2015-03-25 2015-03-25 Synchronous message transmission apparatus, time synchronization system, and synchronous message transmission method Active JP6391013B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2015063042A JP6391013B2 (en) 2015-03-25 2015-03-25 Synchronous message transmission apparatus, time synchronization system, and synchronous message transmission method
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
JP2015063042A JP6391013B2 (en) 2015-03-25 2015-03-25 Synchronous message transmission apparatus, time synchronization system, and synchronous message transmission method

Publications (2)

Publication Number Publication Date
JP2016184808A JP2016184808A (en) 2016-10-20
JP6391013B2 true JP6391013B2 (en) 2018-09-19

Family

ID=57243234

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015063042A Active JP6391013B2 (en) 2015-03-25 2015-03-25 Synchronous message transmission apparatus, time synchronization system, and synchronous message transmission method

Country Status (1)

Country Link
JP (1) JP6391013B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
JP5811895B2 (en) * 2012-02-28 2015-11-11 三菱電機株式会社 Communication apparatus and communication method

Also Published As

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

Similar Documents

Publication Publication Date Title
JP5811794B2 (en) Communication device
US8879586B2 (en) Inband timestamping
US7835402B2 (en) Synchronization module
US8370675B2 (en) Precise clock synchronization
CN101977104B (en) IEEE1588 based accurate clock synchronization protocol system and synchronization method thereof
EP1525693B1 (en) Clock synchronizing method over fault-tolerant etherent
US11050501B2 (en) Performing PHY-level hardware timestamping and time synchronization in cost-sensitive environments
US8107502B2 (en) Method and apparatus for monitoring packet networks
US8458364B2 (en) Method for receiving and processing frames and a device having frame receiving and processing capabilities
JP6516217B2 (en) Synchronization message transmitter, time synchronization system, synchronization message transmission method and program
CN101496322A (en) Consistent distributed timestamp counters
JP5127482B2 (en) Timing synchronization method, synchronization apparatus, synchronization system, and synchronization program
EP3174237B1 (en) Time synchronization method and apparatus for network devices and time synchronization server
WO2010057398A1 (en) Device and method for implementing clock transparent transmission
EP3930266A1 (en) Packet scheduling system with desired physical transmission time for packets
US10764201B2 (en) System and method for scheduling communications
WO2016152237A1 (en) Synchronization message transmission device, time synchronization system, and synchronization message transmission method
JP6036179B2 (en) Communication device and synchronization method
CN110572230A (en) correction method and device for realizing time synchronization
CN111726189A (en) Dual-core system clock synchronization method and device based on timestamp marking circuit
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
Kutschera et al. IEEE 1588 clock synchronization over IEEE 802.3/10 GBit ethernet

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180111

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180810

R150 Certificate of patent or registration of utility model

Ref document number: 6391013

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