JP2014146877A - Communication system and time synchronization - Google Patents
Communication system and time synchronization Download PDFInfo
- Publication number
- JP2014146877A JP2014146877A JP2013012906A JP2013012906A JP2014146877A JP 2014146877 A JP2014146877 A JP 2014146877A JP 2013012906 A JP2013012906 A JP 2013012906A JP 2013012906 A JP2013012906 A JP 2013012906A JP 2014146877 A JP2014146877 A JP 2014146877A
- Authority
- JP
- Japan
- Prior art keywords
- time
- communication device
- packet
- virtual channel
- correction amount
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Electric Clocks (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
Description
本発明は、通信システムに関する。 The present invention relates to a communication system.
複数の機器がそれぞれ連動して動作する通信システムにおいて、各機器が同期したクロックを用いて処理を実行する場合がある。このような通信システムには、証券取引向けネットワークサーバ機器や、FA(factory Automation)機器が含まれる。証券取引向けネットワークサーバ機器は、処理の実行時間をタイムスタンプとして正確に記録する必要がある。FA(factory Automation)機器は、複数の工程が正確に時間同期し、生産工程を制御する。 In a communication system in which a plurality of devices operate in conjunction with each other, processing may be performed using a clock in which each device is synchronized. Such a communication system includes a network server device for securities trading and an FA (factory automation) device. The network server device for securities trading needs to accurately record the processing execution time as a time stamp. In FA (factory automation) equipment, a plurality of processes are accurately synchronized in time, and the production process is controlled.
証券取引向けネットワークサーバ機器や、FA機器に、GPSや標準電波からの基準クロック信号を受信する機能や、原始時計を搭載すると非常に高コストになる。このため、イーサネット(登録商標)等のLANを経由して基準クロックを持つマスター機器のクロックに、その他のスレーブとなる機器のクロックを同期させるNTP(Network Time Protocol)技術を利用した通信システムが既に知られている。 If a function for receiving a reference clock signal from a GPS or standard radio wave or a primitive clock is mounted on a network server device for securities trading or an FA device, the cost becomes very high. For this reason, there is already a communication system using NTP (Network Time Protocol) technology that synchronizes the clock of a master device having a reference clock with the clock of a master device having a reference clock via a LAN such as Ethernet (registered trademark). Are known.
NTP技術を利用した通信システムでは、マスター機器のクロックと、スレーブ機器のクロックとの間のクロック同期の誤差が大きくなる。 In a communication system using the NTP technology, an error in clock synchronization between the clock of the master device and the clock of the slave device increases.
そこで、クロック同期の精度を向上させることを目的とする。 Therefore, an object is to improve the accuracy of clock synchronization.
開示の通信システムは、
第1の通信装置と、該第1の通信装置とシリアルIFでそれぞれ接続された1又は複数の第2の通信装置とを有する通信システムであって、
前記第1の通信装置は、
第1の時計と、
前記第1の時計により、前記1又は複数の第2の通信装置に設定されている時刻を要求する時刻要求パケットの送信を開始してから前記1又は複数の第2の通信装置により前記時刻要求パケットに対する応答パケットの受信が開始されるまでの時間を求め、該時間と、前記第1の通信装置と前記1又は複数の第2の通信装置との間で前記時刻要求パケットの伝送に要した時間とに基づいて、前記1又は複数の第2の通信装置の第2の時計の補正量を演算する第1の時刻同期回路と、
前記時刻要求パケットと前記補正量を出力するとともに、前記第1の時刻同期回路へ前記応答パケットを入力する第1のインターフェースと
を有し、
前記第1のインターフェースには、前記時刻要求パケットと前記補正量と前記応答パケットを転送する第1の仮想チャネルと、データを転送する第2の仮想チャネルとが設定され、前記第2の仮想チャネルで転送する前記データよりも前記第1の仮想チャネルで転送する前記時刻要求パケットと前記補正量のタイムスタンプを優先し、前記第2の仮想チャネルで送信する前記データの出力よりも前記第1の仮想チャネルで出力する前記応答パケットを優先的に選択し、
前記1又は複数の第2の通信装置の各々は、
第2の時計と、
前記第2の時計により前記時刻要求パケットの受信を開始してから前記応答パケットの送信を開始するまでの時間を求め、該時間を含む前記応答パケットを作成し、前記第1の通信装置からの前記補正量に基づいて、前記第2の時計を補正する第2の時刻同期回路と、
前記応答パケットを出力するとともに、前記第2の時刻同期回路へ前記補正量を入力する第2のインターフェースと
を有し、
前記第2のインターフェースには、前記時刻要求パケットと前記応答パケットと前記補正量を転送する第3の仮想チャネルと、データを転送する第4の仮想チャネルとが設定され、前記第4の仮想チャネルで転送する前記データよりも前記第3の仮想チャネルで転送する前記応答パケットのタイムスタンプを優先し、前記第4の仮想チャネルで送信する前記データの出力よりも前記第3の仮想チャネルで出力する前記時刻要求パケット、前記補正量を優先的に選択する。
The disclosed communication system is:
A communication system having a first communication device and one or more second communication devices connected to the first communication device by a serial IF,
The first communication device is:
The first watch,
The time request is made by the one or more second communication devices after starting transmission of a time request packet for requesting the time set in the one or more second communication devices by the first clock. The time until the reception of the response packet for the packet is started is obtained, and transmission of the time request packet is required between the time and the first communication device and the one or more second communication devices. A first time synchronization circuit that calculates a correction amount of a second timepiece of the one or more second communication devices based on time,
A first interface that outputs the time request packet and the correction amount, and inputs the response packet to the first time synchronization circuit;
In the first interface, a first virtual channel for transferring the time request packet, the correction amount, and the response packet, and a second virtual channel for transferring data are set, and the second virtual channel is set. The time request packet transferred on the first virtual channel and the time stamp of the correction amount are given priority over the data transferred on the first virtual channel, and the output of the data transmitted on the second virtual channel is prioritized. Preferentially select the response packet to be output on the virtual channel;
Each of the one or more second communication devices includes:
A second watch,
Obtaining a time from the start of reception of the time request packet by the second clock to the start of transmission of the response packet, creating the response packet including the time, from the first communication device A second time synchronization circuit for correcting the second timepiece based on the correction amount;
A second interface for outputting the response packet and inputting the correction amount to the second time synchronization circuit;
In the second interface, a third virtual channel for transferring the time request packet, the response packet, and the correction amount, and a fourth virtual channel for transferring data are set, and the fourth virtual channel is set. Giving priority to the time stamp of the response packet transferred on the third virtual channel over the data transferred on the first virtual channel, and outputting on the third virtual channel over the output of the data transmitted on the fourth virtual channel The time request packet and the correction amount are preferentially selected.
開示の実施例によれば、クロック同期の精度を向上させることができる。 According to the disclosed embodiment, the accuracy of clock synchronization can be improved.
次に、本発明を実施するための形態を、以下の実施例に基づき図面を参照しつつ説明する。
なお、実施例を説明するための全図において、同一機能を有するものは同一符号を用い、繰り返しの説明は省略する。
Next, the form for implementing this invention is demonstrated, referring drawings based on the following Examples.
In all the drawings for explaining the embodiments, the same reference numerals are used for those having the same function, and repeated explanation is omitted.
<実施例>
<通信システム>
図1は、通信システムの一実施例を示す。
<Example>
<Communication system>
FIG. 1 shows an embodiment of a communication system.
通信システムは、第1の通信装置100と、第2の通信装置200とを有する。図1には、主に、第1の通信装置100と、第2の通信装置200のハードウェア構成が示される。
The communication system includes a
第1の通信装置100は時間同期においてマスターとして機能し、第2の通信装置200は時間同期においてスレーブとして機能する。つまり、スレーブとしての第2の通信装置200は、マスターとしての第1の通信装置100の有するクロック(マスタークロック(マスター時計)102)に、自装置の有するクロック(スレーブクロック(スレーブ時計)202)を同期させる処理を実行する。
The
第1の通信装置100と第2の通信装置200との間は、高速シリアルインターフェース(IF)により接続される。通信システムの一実施例には、高速シリアルインターフェースに、PCIeケーブルインターフェースが用いられる。
The
<第1の通信装置100>
第1の通信装置100は、マスタークロック(マスター時計)102と、マスター時刻同期回路104と、データ転送回路106と、IF108とを有する。第1の通信装置100には、IF108を介して、IFカード110が接続される。また、IFカード110には、トランシーバ114が接続される。
<
The
IF108は、第1の通信装置100とIFカード110との間のインターフェース(InterFace)である。IF108は、マスター時刻同期回路104と接続される。例えば、IF108には、PCIe IFが含まれる。PCIe IFは、時分割で、シリアル伝送路を複数のトラフィックで共有する仮想チャネル(VC: Virtual Channel)を複数実装する。第1の通信装置100の一実施例には、2つの仮想チャネルが実装される。具体的には、IF108は、VC0と、VC1の2つの仮想チャネルを実装する。
The IF 108 is an interface (InterFace) between the
IFカード110は、スイッチ112を有する。スイッチ112は、IF108とIFカード110との間で、パケット転送を行う。つまり、スイッチ112は、IF108とIFカード110との間で、パケット転送を処理するブリッジとして機能する。IFカード110には、PCIe Cable IF Cardが含まれる。スイッチ112には、PCIeスイッチが含まれる。スイッチ112は、VC0と、VC1の2つの仮想チャネルを実装する。
The
トランシーバ114は、第2の通信装置200との間で、伝送路300を介して、信号の送受信を行う。トランシーバ114には、光トランシーバが含まれる。伝送路300には、光ファイバーが含まれる。
The
マスタークロック102は、通信システムにおける基準クロックである。
The
マスター時刻同期回路104は、マスタークロック102と接続される。マスター時刻同期回路104は、マスタークロック102から第1の時刻情報を受信する。マスター時刻同期回路104は、IF108のVC1に、第2の通信装置200に時刻を要求する時刻要求パケットを出力する。マスター時刻同期回路104は、IF108のVC1から、時刻要求パケットに対する第2の通信装置200からの時刻応答パケットを受信する。マスター時刻同期回路104は、マスタークロック102に、第2の通信装置200のスレーブクロック202を同期させるための補正量を演算する。マスター時刻同期回路104は、IF108のVC1に、補正量を含む補正量信号を出力する。
The master
データ転送回路106は、IF108と接続される。データ転送回路106は、第1の通信装置100と第2の通信装置200との間でデータ転送を実行する。データ転送回路106は、IF108のVC0へ、第2の通信装置200へ転送するデータを入力する。データ転送回路106は、IF108のVC0から、第2の通信装置200により転送されたデータを受信する。
<第2の通信装置200>
第2の通信装置200は、スレーブクロック(スレーブ時計)202と、スレーブ時刻同期回路204と、データ転送回路206と、IF208とを有する。第2の通信装置200には、IF208を介して、IFカード210が接続される。また、IFカード210には、トランシーバ214が接続される。
<
The
IF208は、第2の通信装置200とIFカード210との間のインターフェース(InterFace)である。IF208は、スレーブ時刻同期回路204と接続される。例えば、IF208には、PCIe IFが含まれる。第2の通信装置200の一実施例には、2つの仮想チャネルが実装される。具体的には、IF208は、VC0と、VC1の2つの仮想チャネルを実装する。
The
IFカード210は、スイッチ212を有する。スイッチ212は、IF208とIFカード210との間で、パケット転送を行う。つまり、スイッチ212は、IF208とIFカード210との間で、パケット転送を処理するブリッジとして機能する。IFカード210には、PCIe Cable IF Cardが含まれる。スイッチ212には、PCIeスイッチが含まれる。スイッチ212は、VC0と、VC1の2つの仮想チャネルを実装する。
The
トランシーバ214は、第1の通信装置100との間で、伝送路300を介して、信号の送受信を行う。トランシーバ214には、光トランシーバが含まれる。
The
スレーブクロック202は、第2の通信装置200におけるクロックである。
The
スレーブ時刻同期回路204は、スレーブクロック202と接続される。スレーブ時刻同期回路204は、スレーブクロック202から第2の時刻情報を受信する。スレーブ時刻同期回路204は、IF208から、第1の通信装置100からの時刻要求パケットを受信する。スレーブ時刻同期回路204は、IF208のVC1へ、時刻要求パケットに対する時刻応答パケットを出力する。スレーブ時刻同期回路204は、IF208のVC1から、補正量信号を受信する。スレーブ時刻同期回路204は、スレーブクロック202に、補正量信号に含まれる補正量を入力する。スレーブクロック202は、スレーブ時刻同期回路204からの補正量に基づいて、クロックを補正する。
Slave
データ転送回路206は、IF208と接続される。データ転送回路206は、第1の通信装置100と第2の通信装置200との間でデータ転送を実行する。データ転送回路206は、IF208のVC0へ、第1の通信装置100へ転送するデータを入力する。データ転送回路206は、IF208のVC0から、第1の通信装置100により転送されたデータを受信する。
<スレーブクロック202の補正量の計算方法>
図2は、スレーブクロック202の補正量の計算方法を示す。図2において、「遅延時間T1」は、第1の通信装置100が時刻要求パケットの送信を開始してから、第1の通信装置200が第2の通信装置200からの時刻応答パケットの受信を開始するまでの時間である。「遅延時間T2」は、第2の通信装置200が第1の通信装置100からの時刻要求パケットの受信を開始してから、第2の通信装置200が時刻応答パケットの送信を開始するまでの時間である。「遅延時間T3」は、第1の通信装置100から第2の通信装置200に、パケットが転送されるのに要した時間である。「遅延時間T4」は、第2の通信装置200から第1の通信装置100に、パケットが転送されるのに要した時間である。
<Calculation method of correction amount of
FIG. 2 shows a method for calculating the correction amount of the
図3は、第1の通信装置100の一実施例を示す。図3には、マスター時刻同期回路104の機能ブロック図が示される。各機能ブロックは、マスター時刻同期回路104の有するCPU(図示なし)により実行されてもよい。
FIG. 3 shows an embodiment of the
CPUは、第1の時刻情報取得部302と、時刻要求パケット作成部304と、補正量演算部306と、補正量信号作成部308として機能する。
The CPU functions as a first time
第1の時刻情報取得部302は、マスタークロック102から時刻Mを取得する。
The first time
時刻要求パケット作成部304は、第1の時刻情報取得部302が時刻Mを取得した後、第2の通信装置200に対する時刻要求パケットを作成し、IF108のVC1に入力する。時刻要求パケットは、IF108、IFカード110、トランシーバ114を介して、第2の通信装置200へ送信される。時刻要求パケット作成部304は、時刻要求パケットを送信した時刻を記録する。例えば、時刻要求パケット作成部304は、IF108のVC1へ、時刻要求パケットを入力した時間を記録するのが好ましい。
After the first time
時刻要求パケットは、伝送路300、第2の通信装置200のトランシーバ214、IFカード210、IF208を経由して、スレーブ時刻同期回路204へ入力される。
The time request packet is input to the slave
第1の通信装置100から時刻要求パケットが送信(転送)され、該時刻要求パケットが第2の通信装置200に受信されるまでの遅延時間をT3とする。
The delay time from when the time request packet is transmitted (transferred) from the
図4は、第2の通信装置200の一実施例を示す。図4には、スレーブ時刻同期回路204の機能ブロック図が示される。各機能ブロックは、スレーブ時刻同期回路204の有するCPU(図示なし)により実行されてもよい。
FIG. 4 shows an example of the
CPUは、第2の時刻情報取得部402と、時刻応答パケット作成部404と、時刻補正処理部406として機能する。
The CPU functions as a second time
スレーブ時刻同期回路204により時刻要求パケットが受信されると、第2の時刻情報取得部402は、スレーブクロック202から時刻Sを取得する。
When the time request packet is received by the slave
時刻応答パケット作成部404は、第2の時刻情報取得部402が取得した時刻Sを含む時刻応答パケットを作成し、IF208に入力する。時刻応答パケット作成部404は、第1の通信装置100へ時刻応答パケットを送信する際に、該時刻応答パケットに時刻要求パケットの受信を開始した時間からの遅延時間T2を含める。時刻応答パケット作成部404は、IF208へ時刻応答パケットを入力する際に、該時刻応答パケットに、時刻要求パケットの受信を開始した時間からの遅延時間T2を含めるのが好ましい。時刻応答パケット作成部404には、システムクロックが入力される。システムクロックは、一定周期のパルスを発生させる回路であるのが好ましい。例えば、時刻応答パケット作成部404は、スレーブクロック202に時刻を問い合わせてから時刻が戻ってくるまでに、システムクロックにより出力されるパルスの数を、クロックカウンタ等を用いて計測することにより経過時間を計算し、時刻応答パケットに含めるのが好ましい。
The time response
時刻応答パケットは、IF208、IFカード210、トランシーバ214を介して、第1の通信装置100へ送信される。さらに、時刻応答パケットは、伝送路300、第1の通信装置100のトランシーバ114、IFカード110、IF108を介して、マスター時刻同期回路104の補正量演算部306へ入力される。
The time response packet is transmitted to the
補正量演算部306は、時刻応答パケットが入力されると、時刻要求パケットを送信する際に記録した時刻Mから、時刻応答パケットの受信を開始するまでに要した遅延時間T1を演算する。補正量演算部306は、遅延時間T1を求める際に、時刻要求パケットを送信する際に記録した時刻Mから時刻応答パケットがマスター時刻同期回路104へ入力されるまでの経過時間を演算するのが好ましい。
When the time response packet is input, the correction
補正量演算部306は、時刻応答パケットに含まれる時刻Sと、遅延時間T2を取得する。
The correction
補正量演算部306は、遅延時間T1−遅延時間T2により、第1の通信装置100と第2の通信装置200との間の往復に、パケット(時刻要求パケット、時刻応答パケット)が要した時間を演算する。通信システムの一実施例では、PCIeが適用されるため、第1の通信装置100から第2の通信装置200へ時刻要求パケットが伝送される際の転送速度と、第2の通信装置200から第1の通信装置100へ時刻応答パケットが伝送される際の転送速度には、ほとんど差がないと想定される。従って、第1の通信装置100から第2の通信装置200に、パケットが転送されるのに要した遅延時間T3と第2の通信装置200から第1の通信装置100に、パケットが転送されるのに要した遅延時間T4は、(遅延時間T1−遅延時間T2)/2により算出できる。
The correction
補正量演算部306は、(時刻S)−(時刻M)−T3により、マスタークロック102にスレーブクロック202を同期させるために、スレーブクロックを補正する補正量を演算する。
The correction
補正量信号作成部308は、補正量を含む補正量パケットを作成し、IF108のVC1に入力する。補正量パケットは、第2の通信装置200へ転送される。
The correction amount
補正量パケットは、IF108、IFカード110、トランシーバ114を介して、第2の通信装置200へ転送される。
The correction amount packet is transferred to the
第2の通信装置200のスレーブ時刻同期回路204に、伝送路300、トランシーバ214、IFカード210、IF208を介して、補正量パケットが入力される。
The correction amount packet is input to the slave
時刻補正処理部406は、補正量パケットに含まれる補正量に基づいて、スレーブクロック202を補正する。
The time
スレーブクロック202を補正することにより、第1の通信装置100のマスタークロック102に、第2の通信装置200のスレーブクロック202を同期させることができる。
By correcting the
<IF108>
図5は、IF108の一実施例を示す。
<IF108>
FIG. 5 shows an example of the
IF108の一実施例は、仮想チャネルを2本実装する。2本の仮想チャネルをVC1、VC2と呼ぶ。IF108が、3本以上の仮想チャネルを実装するようにしてもよい。IF108にPCIe IFを適用する場合、PCIe IFは、2つ以上の仮想チャネルインターフェースを備えることができる。
One embodiment of the
IF108は、VC1送信バッファ502と、VC0送信バッファ504と、アービタ506と、VC1受信バッファ508と、VC0受信バッファ510と、セレクタ512を有する。
The
各VCは受信バッファと送信バッファを有する。つまり、VC0は、VC0受信バッファ510とVC0送信バッファ504とを有する。VC1は、VC1受信バッファ508とVC1送信バッファ502とを有する。
Each VC has a reception buffer and a transmission buffer. That is, VC0 has a
VC1は、マスター時刻同期回路104との通信に使用される。VC1受信バッファ508のサイズは、パケットが1つ格納できる程度であるのが好ましい。VC1送信バッファ502のサイズは、パケットが1つ格納できる程度であるのが好ましい。VC1送信バッファ502のサイズは予め設定されるのが好ましい。
VC1 is used for communication with the master
VC0は、データ転送回路106との通信に使用される。VC0受信バッファ510のサイズは、パケットが複数格納できる程度であるのが好ましい。より好ましくは、VC0受信バッファ510のサイズは、データ転送レートが低下しないように、なるべく多くのパケットが格納できるように、回路サイズやコストが許す限り大きくする。VC0受信バッファ510のサイズは、予め設定されるのが好ましい。
VC0 is used for communication with the
VC0送信バッファ504のサイズは、パケットが複数格納できる程度であるのが好ましい。より好ましくは、VC0送信バッファ504のサイズは、データ転送レートが低下しないように、なるべく多くのパケットが格納できるように、回路サイズやコストが許す限り大きくする。VC0送信バッファ504のサイズは、予め設定されるのが好ましい。
The size of the
IF108の一実施例では、VC0受信バッファ510のサイズを128バイトのペイロードのPCIeパケットが30個格納できるサイズとし、VC0送信バッファ504のサイズを128バイトのペイロードのPCIeパケットが30個格納できるサイズとする。
In one embodiment of the
マスター時刻同期回路104からVC1に入力されたパケットと、データ転送回路106からVC0に入力されたパケットは、出力側で競合が発生しない限り、シリアルインターフェースにそのまま転送される。
The packet input to VC1 from the master
仮に、VC1送信バッファ502、VC0送信バッファ504にパケットが格納されており、競合が発生した場合には、アービタ506は、VC1送信バッファ502とVC0送信バッファ504との間で調停を行う。アービタ506は、VC1送信バッファ502に格納されたパケット、VC0送信バッファ504に格納されたパケットのいずれかを選択し、転送する。IF108の一実施例では、アービタ506は、VC1送信バッファ502に格納されたパケットを優先的に選択し、転送する。つまり、IF108にPCIe IFを適用する場合、PCIe規格に規定されているストリクト(Strict)モードを使用してVC1送信バッファ502に格納されたパケットを優先的に選択するように設定する。ストリクトモードを使用することにより、仮想チャネル毎に固定の優先順でパケットを発行させることができる。このようにすることにより、データ転送回路106からのデータパケットよりも、時刻要求パケット、補正量パケット等の時刻同期用パケットを優先して送信できる。
If packets are stored in the
VC1送信バッファ502に格納されたパケットと、VC0送信バッファ504に格納されたパケットとの間で競合が発生した場合でも、VC1送信バッファ502のサイズは、パケットが1つ格納できる程度であるので、PCIe規格により規定されたフロー制御により連続してVC1送信バッファ502に格納されるパケットが入力されることはない。従って、データ転送回路106からのデータパケットに、時刻同期パケットが優先して連続で転送され続けることはない。このため、時刻同期パケットが転送され続けることにより、データ転送レートが低下することを抑えることができる。
Even if a conflict occurs between the packet stored in the
第2の通信装置200からのパケットは、スイッチ112からセレクタ512に入力される。
A packet from the
セレクタ512は、パケットのヘッダ情報を参照し、VC1受信バッファ508に格納するパケットであるか、VC0受信バッファ510に格納するデータであるかを判定する。
The
セレクタ512は、VC1受信バッファ508に、VC1受信バッファ508に格納するパケットを転送する。VC1受信バッファ508は、マスター時刻同期回路104に接続される。
The
セレクタ512は、VC0受信バッファ510に、VC0受信バッファ510に格納するパケットを転送する。VC0受信バッファ510は、データ転送回路106に接続される。
The
VC0とVC1は、シリアルインターフェースでは、時分割される。セレクタ512は、シリアルインターフェースからのパケットを到着した順に、VC1受信バッファ508とVC0受信バッファ510に順次振り分ける。
VC0 and VC1 are time-divided in the serial interface. The
<スイッチ112>
図6は、スイッチ112の一実施例を示す。
<Switch 112>
FIG. 6 shows an embodiment of the
スイッチ112は、第1のIF602と、クロスバースイッチ616と、第2のIF618とを有する。
The
第1のIF602は、アービタ604と、VC1送信バッファ606と、VC0送信バッファ608と、セレクタ610と、VC1受信バッファ612と、VC0受信バッファ614とを有する。
The first IF 602 includes an
第2のIF618は、VC1受信バッファ620と、VC0受信バッファ622と、セレクタ624と、VC1送信バッファ626と、VC0送信バッファ628と、アービタ630とを有する。
The second IF 618 includes a
スイッチ112は、外部ポートと同様の種類のIFを有する。例えば、スイッチ112は、IF108と同様の種類の第1のIF602と、トランシーバ114と同様の種類の第2のIF618とを有する。第1のIF602にPCIe IF回路を適用する場合、PCIe IF回路は2つ以上のVCインターフェースを備えることができる。第1のIF602の一実施例は、2本のVCを実装する。第2のIF618にPCIe IF回路を適用する場合、PCIe IF回路は2つ以上のVCインターフェースを備えることができる。第2のIF618の一実施例は、2本のVCを実装する。
The
図6に示される例では、第1のIF602はIF108と接続され、第2のIF618はトランシーバ114と接続される。
In the example shown in FIG. 6, the first IF 602 is connected to the
第1のIF602は、クロスバースイッチ616を介して、第2のIF618と接続される。より詳細には、第1のIF602のVC1送信バッファ606は、クロスバースイッチ616を介して、第2のIF618のVC1受信バッファ620と接続される。第1のIF602のVC0送信バッファ608は、クロスバースイッチ616を介して、第2のIF618のVC0受信バッファ622と接続される。第1のIF602のVC1受信バッファ612は、クロスバースイッチ616を介して、第2のIF618のVC1送信バッファ626と接続される。第1のIF602のVC0受信バッファ614は、クロスバースイッチ616を介して、第2のIF618のVC0送信バッファ628と接続される。
The first IF 602 is connected to the second IF 618 via the crossbar switch 616. More specifically, the
第1のIF602について説明する。 The first IF 602 will be described.
各VCは受信バッファと送信バッファを有する。つまり、VC0は、VC0送信バッファ608と、VC0受信バッファ614とを有する。VC1は、VC1送信バッファ606と、VC1受信バッファ612とを有する。
Each VC has a reception buffer and a transmission buffer. That is, VC0 has a VC0 transmission buffer 608 and a VC0 reception buffer 614. The
VC1送信バッファ606のサイズは、パケットが1つ格納できる程度であるのが好ましい。VC1受信バッファ612のサイズは、パケットが1つ格納できる程度であるのが好ましい。VC0送信バッファ608のサイズは、パケットが複数格納できる程度であるのが好ましい。より好ましくは、VC0送信バッファ608のサイズは、データ転送レートが低下しないように、なるべく多くのパケットが格納できるように、回路コストが許す限り大きくする。VC0受信バッファ614のサイズは、パケットが複数格納できる程度であるのが好ましい。より好ましくは、VC0受信バッファ614のサイズは、データ転送レートが低下しないように、なるべく多くのパケットが格納できるように、回路コストが許す限り大きくする。
The size of the
第2のIF618について説明する。 The second IF 618 will be described.
各VCは受信バッファと送信バッファを有する。つまり、VC0は、VC0受信バッファ622と、VC0送信バッファ628とを有する。VC1は、VC1受信バッファ620と、VC1送信バッファ626とを有する。
Each VC has a reception buffer and a transmission buffer. That is, VC0 includes a
VC1受信バッファ620のサイズは、パケットが1つ格納できる程度であるのが好ましい。VC1送信バッファ626のサイズは、パケットが1つ格納できる程度であるのが好ましい。VC0受信バッファ622のサイズは、パケットが複数格納できる程度であるのが好ましい。より好ましくは、VC0受信バッファ622のサイズは、データ転送レートが低下しないように、なるべく多くのパケットが格納できるように、回路コストが許す限り大きくする。VC0送信バッファ628のサイズは、パケットが複数格納できる程度であるのが好ましい。より好ましくは、VC0送信バッファ628のサイズは、データ転送レートが低下しないように、なるべく多くのパケットが格納できるように、回路コストが許す限り大きくする。
The size of the
IF108からVC1に入力されたパケットと、IF108からVC0に入力されたパケットは、出力側で競合が発生しない限り、トランシーバ114にそのまま転送される。
The packet input from the
仮に、VC1送信バッファ626、VC0送信バッファ628にパケットが格納されており、競合が発生した場合には、アービタ630は、VC1送信バッファ626とVC0送信バッファ628との間で調停を行う。アービタ630は、VC1送信バッファ626に格納されたパケット、VC0送信バッファ628に格納されたパケットのいずれかを選択し、転送する。スイッチ112の一実施例では、アービタ630は、VC1送信バッファ626に格納されたパケットを優先的に選択し、転送する。つまり、スイッチ112にPCIe Switchを適用する場合、PCIe規格に規定されているストリクトモードを使用してVC1送信バッファ626に格納されたパケットを優先的に選択するように設定する。ストリクトモードを使用することにより、仮想チャネル毎に固定の優先順でパケットを発行させることができる。このようにすることにより、データパケットよりも、時刻要求パケット、補正量パケット等の時刻同期用パケットを優先して送信できる。
If packets are stored in the
VC1送信バッファ626に格納されたパケットと、VC0送信バッファ628に格納されたパケットとの間で競合が発生した場合でも、VC1送信バッファ626のサイズは、パケットが1つ格納できる程度であるので、PCIe規格により規定されたフロー制御により連続してVC1送信バッファ626に格納されるパケットが入力されることはない。従って、データパケットに、時刻同期パケットが優先して連続で転送され続けることはない。このため、時刻同期パケットが転送され続けることによりデータ転送レートが低下することを抑えることができる。
Even if a conflict occurs between the packet stored in the
セレクタ610は、パケットのヘッダ情報を参照し、VC1受信バッファ612に格納するパケットであるか、VC0受信バッファ614に格納するデータであるかを判定する。
The
セレクタ610は、VC1受信バッファ612にVC1受信バッファ612に格納するパケットを転送する。VC1受信バッファ612は、VC1送信バッファ626に接続される。
The
セレクタ610は、VC0受信バッファ614にVC0受信バッファ614に格納するパケットを転送する。VC0受信バッファ614は、VC0送信バッファ628に接続される。
The
VC0とVC1は、シリアルインターフェースでは、時分割される。セレクタ610は、シリアルインターフェースからのパケットを到着した順に、VC1受信バッファ612とVC0受信バッファ614に順次振り分ける。
VC0 and VC1 are time-divided in the serial interface. The
トランシーバ114からVC1に入力されたパケットと、トランシーバ114からVC0に入力されたパケットは、出力側で競合が発生しない限り、IF108にそのまま転送される。
The packet input from the
仮に、VC1送信バッファ606、VC0送信バッファ608にパケットが格納されており、競合が発生した場合には、アービタ604は、VC1送信バッファ606とVC0送信バッファ608との間で調停を行う。アービタ604は、VC1送信バッファ606に格納されたパケット、VC0送信バッファ608に格納されたパケットのいずれかを選択し、転送する。スイッチ112の一実施例では、アービタ604は、VC1送信バッファ606に格納されたパケットを優先的に選択し、転送する。つまり、スイッチ112にPCIe Switchを適用する場合、PCIe規格に規定されているストリクトモードを使用してVC1送信バッファ606に格納されたパケットを優先的に選択するように設定する。ストリクトモードを使用することにより、仮想チャネル毎に固定の優先順でパケットを発行させることができる。このようにすることにより、データパケットよりも、時刻応答パケット等の時刻同期用パケットを優先して入力できる。
If packets are stored in the
VC1送信バッファ606に格納されたパケットと、VC0送信バッファ608に格納されたパケットとの間で競合が発生した場合でも、VC1送信バッファ606のサイズは、パケットが1つ格納できる程度であるので、PCIe規格により規定されたフロー制御により連続してVC1送信バッファ606に格納されるパケットが入力されることはない。従って、データパケットに、時刻同期パケットが優先して連続で転送され続けることはない。このため、時刻同期パケットが転送され続けることによりデータ転送レートが低下することを抑えることができる。
Even if a conflict occurs between the packet stored in the
セレクタ624は、パケットのヘッダ情報を参照し、VC1受信バッファ620に格納するパケットであるか、VC0受信バッファ622に格納するデータであるかを判定する。
The
セレクタ624は、VC1受信バッファ620にVC1受信バッファ620に格納するパケットを転送する。VC1受信バッファ620は、VC1送信バッファ606に接続される。
The
セレクタ624は、VC0受信バッファ622に、VC0受信バッファ622に格納するパケットを転送する。VC0受信バッファ622は、VC0送信バッファ608に接続される。
The
VC0とVC1は、内部バスでは、時分割される。セレクタ624は、トランシーバ114からのパケットを到着した順に、VC1受信バッファ620とVC0受信バッファ622に順次振り分ける。
VC0 and VC1 are time-divided in the internal bus. The
<IF208>
図7は、IF208の一実施例を示す。
<IF208>
FIG. 7 shows an example of the
IF208の一実施例は、仮想チャネルを2本実装する。2本の仮想チャネルをVC1、VC2と呼ぶ。IF208が、3本以上の仮想チャネルを実装するようにしてもよい。IF208にPCIe IFを適用する場合、PCIe IFは、2つ以上の仮想チャネルインターフェースを備えることができる。
One embodiment of
IF208は、VC1送信バッファ702と、VC0送信バッファ704と、アービタ706と、VC1受信バッファ708と、VC0受信バッファ710と、セレクタ712を有する。
The
各VCは受信バッファと送信バッファを有する。つまり、VC0は、VC0送信バッファ704と、VC0受信バッファ710とを有する。VC1は、VC1送信バッファ702と、VC1受信バッファ708とを有する。
Each VC has a reception buffer and a transmission buffer. That is, VC0 has a
VC1は、スレーブ時刻同期回路204との通信に使用される。VC1受信バッファ708のサイズは、パケットが1つ格納できる程度であるのが好ましい。VC1送信バッファ702のサイズは、パケットが1つ格納できる程度であるのが好ましい。
VC1 is used for communication with the slave
VC0は、データ転送回路206との通信に使用される。VC0受信バッファ710のサイズは、パケットが複数格納できる程度であるのが好ましい。より好ましくは、VC0受信バッファ710のサイズは、データ転送レートが低下しないように、なるべく多くのパケットが格納できるように、回路サイズやコストが許す限り大きくする。VC0送信バッファ704のサイズは、パケットが複数格納できる程度であるのが好ましい。より好ましくは、VC0送信バッファ704のサイズは、データ転送レートが低下しないように、なるべく多くのパケットが格納できるように、回路サイズやコストが許す限り大きくする。
VC0 is used for communication with the
IF208の一実施例では、VC0受信バッファ710のサイズを128バイトのペイロードのPCIeパケットが30個格納できるサイズとし、VC0送信バッファ704のサイズを128バイトのペイロードのPCIeパケットが30個格納できるサイズとする。
In one embodiment of the
スレーブ時刻同期回路204からVC1に入力されたパケットと、データ転送回路206からVC0に入力されたパケットは、出力側で競合が発生しない限り、シリアルインターフェースにそのまま転送される。
The packet input to the VC1 from the slave
仮に、VC1送信バッファ702、VC0送信バッファ704にパケットが格納されており、競合が発生した場合には、アービタ706は、VC1送信バッファ702とVC0送信バッファ704との間で調停を行う。アービタ706は、VC1送信バッファ702に格納されたパケット、VC0送信バッファ704に格納されたパケットのいずれかを選択し、転送する。IF208の一実施例では、アービタ706は、VC1送信バッファ702に格納されたパケットを優先的に選択し、転送する。つまり、IF208にPCIe IFを適用する場合、PCIe規格に規定されているストリクトモードを使用してVC1送信バッファ702に格納されたパケットを優先的に選択するように設定する。ストリクトモードを使用することにより、仮想チャネル毎に固定の優先順でパケットを発行させることができる。このようにすることにより、データ転送回路206からのデータパケットよりも、時刻応答パケットを優先して送信できる。
If packets are stored in the
VC1送信バッファ702に格納されたパケットと、VC0送信バッファ704に格納されたパケットとの間で競合が発生した場合でも、VC1送信バッファ702のサイズは、パケットが1つ格納できる程度であるので、PCIe規格により規定されたフロー制御により連続してVC1送信バッファ702に格納されるパケットが入力されることはない。従って、データ転送回路206からのデータパケットに、時刻同期パケットが優先して連続で転送され続けることはない。このため、時刻同期パケットが転送され続けることによりデータ転送レートが低下することを抑えることができる。
Even if a conflict occurs between the packet stored in the
第1の通信装置100からのパケットは、スイッチ212からセレクタ712に入力される。
A packet from the
セレクタ712は、パケットのヘッダ情報を参照し、VC1受信バッファ708に格納するパケットであるか、VC0受信バッファ710に格納するデータであるかを判定する。
The
セレクタ712は、VC1受信バッファ708に、VC1受信バッファ708に格納するパケットを転送する。VC1受信バッファ708は、スレーブ時刻同期回路204に接続される。
The
セレクタ712は、VC0受信バッファ710に、VC0受信バッファ710に格納するパケットを転送する。VC0受信バッファ710は、データ転送回路206に接続される。
The
VC0とVC1は、シリアルインターフェースでは、時分割される。セレクタ712は、シリアルインターフェースからのパケットを到着した順に、VC1受信バッファ708とVC0受信バッファ710に順次振り分ける。
VC0 and VC1 are time-divided in the serial interface. The
<第1の通信装置100の動作>
図8は、第1の通信装置100の動作の一実施例を示す。図6は、主に、マスター時刻同期回路104の動作を示す。
<Operation of
FIG. 8 shows an example of the operation of the
ステップS802では、第1の通信装置100は、マスタークロック102から、時刻Mを取得する。
In step S <b> 802, the
ステップS804では、第1の通信装置100は、IF108のVC1へ、時刻要求パケットを入力するとともに、送信開始時間を記録する。
In step S804, the
ステップS806では、第1の通信装置100は、IF108のVC1から、時刻応答パケットが受信可能か否かを判定する。時刻応答パケットが受信可能でない場合、ステップS806に戻る。
In step S806, the
ステップS808では、時刻応答パケットが受信可能であると判定された場合、時刻応答パケットの受信開始時間を記録する。 In step S808, when it is determined that the time response packet can be received, the reception start time of the time response packet is recorded.
ステップS810では、第1の通信装置100は、遅延時間T1を計算する。マスター時刻同期回路104は、送信開始時間から受信開始時間を減算することにより、遅延時間T1を計算する。
In step S810, the
ステップS812では、第1の通信装置100は、時刻応答パケットから、スレーブ時刻Sを読み出して記録する。
In step S812, the
ステップS814では、第1の通信装置100は、パケットの伝送遅延時間T3(T4)を計算する。マスター時刻同期回路104は、遅延時間T1から遅延時間T2を減算したものを2で除算することにより、遅延時間T3を計算する。つまり、マスター時刻同期回路104は、(遅延時間T1−遅延時間T2)/2を計算する。
In step S814, the
ステップS816では、第1の通信装置100は、スレーブクロックの補正量を計算する。マスター時刻同期回路104は、時刻Sから時刻Mを減算したものから遅延時間T3を減算することにより、スレーブクロックの補正量を計算する。つまり、マスター時刻同期回路104は、時刻S−時刻M−遅延時間T3を計算する。
In step S816, the
ステップS818では、第1の通信装置100は、IF108へ、補正量を記録した補正量パケットを入力する。
In step S <b> 818, the
ステップS820では、第1の通信装置100は、次の時刻補正時刻まで待機する。時刻補正は、所定の周期で実行されてもよい。次の時刻補正時刻となった場合、ステップS802へ戻る。
In step S820, the
時刻補正は、周期的に行うようにしてもよいし、常時行うようにしてもよい。 Time correction may be performed periodically or constantly.
<第2の通信装置200の動作>
図9は、第2の通信装置200の動作の一実施例を示す。図9は、主に、スレーブ時刻同期回路204の動作を示す。
<Operation of
FIG. 9 shows an example of the operation of the
ステップS902では、第2の通信装置200は、IF208から時刻要求パケットを受信可能であるか否かを判定する。時刻要求パケットが受信可能でない場合、ステップS902に戻る。
In step S <b> 902,
ステップS904では、時刻要求パケットが受信可能であると判定された場合、第2の通信装置200は、時刻要求パケットの受信開始時間を記録する。
In Step S904, when it is determined that the time request packet can be received, the
ステップS906では、第2の通信装置200は、スレーブクロック202から、時刻Sを取得する。
In step S906, the
ステップS908では、第2の通信装置200は、遅延時間T2を計算する。スレーブ時刻同期回路204は、受信開始時間から送信開始時間を減算することにより、遅延時間T2を計算する。
In step S908, the
ステップS910では、第2の通信装置200は、IF208へ、遅延時間T2と時刻Sを含む時刻応答パケットを入力する。
In step S910,
ステップS912では、第2の通信装置200は、IF208から、補正量パケットが受信可能であるか否かを判定する。補正量パケットが受信可能でない場合、ステップS912に戻る。
In step S <b> 912, the
ステップS914では、第2の通信装置200は、補正量パケットから、スレーブ時刻Sの補正量を読み出して記録する。
In step S914, the
ステップS916では、第2の通信装置200は、スレーブクロック202を補正する。スレーブ時刻同期回路204は、時刻Sから補正量を減算することにより、補正後の時刻を求める。スレーブ時刻同期回路204は、スレーブクロック202に、補正後の時刻を設定する。
In step S916, the
<通信システムの一実施例の効果>
図10は、通信システムの一実施例の効果を示す。
<Effect of one embodiment of communication system>
FIG. 10 shows the effect of an embodiment of the communication system.
図10には、時刻同期用パケット(時刻要求パケット、時刻応答パケット、補正量パケット)がIF108のアービタ506、IF208のアービタ706で待たされる遅延時間の比較を示す。第1の通信装置100、第2の通信装置200は、128Byte Payloadのパケットが30個を格納できるサイズのデータ転送用のパケットバッファを有する。図10には、(1)データ転送が無い状態、(2)複数VCを使用しない場合、(3)時刻同期用パケットをVC1で優先して転送する場合を示す。(2)複数VCを使用しない場合が従来の方法に相当する。(3)時刻同期用パケットをVC1で優先して転送する場合が通信システムの一実施例に相当する。
FIG. 10 shows a comparison of delay times when time synchronization packets (time request packet, time response packet, correction amount packet) are waited by the
マスタークロック102とスレーブクロック202との間の同期精度を向上させるには、時刻要求パケット、時刻応答パケット、補正量パケット等の時刻同期パケットが高速シリアルインターフェースを伝送することにより生じる遅延時間の誤差が小さい方が好ましい。
In order to improve the synchronization accuracy between the
この遅延時間の誤差は、時刻同期用パケットとデータ転送用パケットの競合が無い場合は、発生しない。しかし、(2)に示されるように、データパケットと時刻同期用のパケットが共通のバッファを使用する通信システムでは、時刻同期用パケットとデータ転送との間に競合が発生した場合に、大きな誤差が生じる。 This delay time error does not occur when there is no competition between the time synchronization packet and the data transfer packet. However, as shown in (2), in a communication system in which a data packet and a time synchronization packet use a common buffer, when a conflict occurs between the time synchronization packet and the data transfer, a large error occurs. Occurs.
(1)データ転送がない場合
時刻同期用パケットはデータパケットの転送に邪魔されないので、遅延は発生しない。
(1) When there is no data transfer Since the time synchronization packet is not disturbed by the transfer of the data packet, no delay occurs.
(2)複数VCを使用しない場合
バッファにデータパケットが30個格納された後に時刻同期用パケットを転送しようとしても、先に格納された30個のデータパケットの転送が完了するまで時刻同期用パケットは転送されないため、遅延する。
(2) When a plurality of VCs are not used Even if an attempt is made to transfer a time synchronization packet after 30 data packets are stored in the buffer, the time synchronization packet is transferred until the transfer of the 30 stored data packets is completed. Is delayed because it is not transferred.
仮に、高速シリアルIFがPCIe Gen1 (2.5GT/s)x4であるとすると、1つの128Byte Payloadのデータパケットの伝送に152ns程度の時間が必要となる。従って、30個のパケットの転送が終わるまでには、152ns×30=4560nsの遅延が発生して、計測誤差となる。 If the high-speed serial IF is PCIe Gen1 (2.5GT / s) x4, it takes about 152 ns to transmit one 128-byte payload data packet. Therefore, a delay of 152 ns × 30 = 4560 ns occurs until the transfer of 30 packets ends, resulting in a measurement error.
従って、複数VCを使用しない場合には、μsからmsオーダーの同期精度が限界となる。 Therefore, when a plurality of VCs are not used, the synchronization accuracy on the order of μs to ms is limited.
(3)時刻同期用パケットをVC1で優先して転送する場合
複数のVCを使用して、時刻同期用パケットを優先して転送するので、待たされる時間は最大でも、1つのデータパケットの転送にかかる152ns程度となる。つまり、最大遅延がデータパケット1個分以下に保証される。従って、nsオーダーの時刻補正が可能となる。
(3) When the time synchronization packet is preferentially transferred by the VC1 Since the time synchronization packet is preferentially transferred by using a plurality of VCs, the waiting time is limited to the transfer of one data packet. This is about 152 ns. In other words, the maximum delay is guaranteed to be one data packet or less. Therefore, time correction in the ns order is possible.
最大遅延が152ns程度となるため、マスターとスレーブとの間でnsオーダーの精度のクロック同期が可能となる。 Since the maximum delay is about 152 ns, clock synchronization with an accuracy of ns order is possible between the master and the slave.
さらに、データ転送と時刻同期用パケットの転送を同一のインターフェースで実行可能であるため、時刻同期用パケットを転送するために専用のLAN接続も不要となる。従って、簡単に実現できるとともに、低コスト化を実現できる。 Furthermore, since data transfer and time synchronization packet transfer can be executed by the same interface, a dedicated LAN connection is not required to transfer the time synchronization packet. Therefore, it can be realized easily and the cost can be reduced.
さらに、時刻同期用パケットを転送することによりデータ転送レートが低下するような悪影響はほとんどないため、高速シリアルのデータ転送と、高精度なクロック同期処理を両立することができる。 Furthermore, since there is almost no adverse effect that the data transfer rate is lowered by transferring the time synchronization packet, it is possible to achieve both high-speed serial data transfer and highly accurate clock synchronization processing.
通信システムの一実施例では、nsecレベルでのクロック同期を実現できる。 In one embodiment of the communication system, clock synchronization at the nsec level can be realized.
NTP技術を利用した通信システムでは、LANの通信遅延時間や、処理がソフトウェアとして実行されることから通信遅延が長くなっていた。また、クロック同期の誤差が大きく、最大でmsecレベルでのクロック同期が限界であった。 In the communication system using the NTP technology, the communication delay time of the LAN and the communication delay are long because the processing is executed as software. In addition, the clock synchronization error is large, and the clock synchronization at the maximum msec level is the limit.
高精度にクロックを同期するIEEE1588という標準規格では、クロック同期の精度はμsecオーダーである。このため、高精度なnsecオーダーの同期を得るには、精度が不足する。 In the standard of IEEE 1588 that synchronizes clocks with high accuracy, the accuracy of clock synchronization is on the order of μsec. For this reason, the accuracy is insufficient to obtain highly accurate nsec order synchronization.
通信システムの一実施例では、クロック同期のために、別途LANで接続することなく、時刻同期の精度を向上させることができる。複数の機器間で高速なデータ転送が必要な場合には、LANよりも高速なデータ転送帯域を持つPCIe等の高速インターフェースで、複数の機器が接続される場合があった。この場合、クロック同期のために別途LANの接続が必要となり、コストアップにつながっていた。
<変形例(その1)>
通信システムの一変形例では、第1の通信装置100はルートコンプレックスを有し、第2の通信装置200はエンドポイントを有する。
In one embodiment of the communication system, the accuracy of time synchronization can be improved without using a separate LAN for clock synchronization. When high-speed data transfer is required between a plurality of devices, a plurality of devices may be connected by a high-speed interface such as PCIe having a data transfer band faster than a LAN. In this case, a separate LAN connection was required for clock synchronization, leading to an increase in cost.
<Modification (Part 1)>
In a variation of the communication system, the
図11は、通信システムの一変形例を示す。 FIG. 11 shows a modification of the communication system.
図11に示される例では、第1の通信装置100は、図1を参照して説明した第1通信装置100のIF108の代わりに、ルートコンプレックス116を有する。ルートコンプレックス116は、マスター時刻同期回路104と、データ転送回路106と、スイッチ112と接続される。第2の通信装置200は、図1を参照して説明した第2の通信装置200のIF208の代わりに、エンドポイント216を有する。エンドポイント216は、スレーブ時刻同期回路204と、テータ転送回路206と、スイッチ212と接続される。
In the example illustrated in FIG. 11, the
通信システムの一変形例では、nsecレベルのクロック同期を実現できる。
<変形例(その2)>
通信システムの一変形例では、第1の通信装置100はルートコンプレックス116を有し、第2の通信装置200はエンドポイント216を有する。
In a modification of the communication system, nsec level clock synchronization can be realized.
<Modification (Part 2)>
In one variation of the communication system, the
図12は、通信システムの一変形例を示す。 FIG. 12 shows a modification of the communication system.
図12に示される例では、図11を参照して説明した第2の通信装置が複数用意される。第1の通信装置100と、複数の第2の通信装置200n(nは、n>0の整数)とが、スイッチ600を介して接続される。換言すれば、スイッチ600は、ルートコンプレックス116とエンドポイント216との間に配置される。図12には、n=2の場合ついて示す。nが3以上である場合についても同様である。
In the example shown in FIG. 12, a plurality of second communication devices described with reference to FIG. 11 are prepared. The
第1の通信装置100と複数の第2の通信装置200nとの間は、スイッチ600を経由して、時刻同期用パケットの転送、データ転送を行うことができる。
Between the
通信システムの一変形例では、nsecレベルのクロック同期を実現できる。
<変形例(その3)>
通信システムの一変形例では、図11を参照して説明した第1の通信装置100と、第2の通信装置200との間を、第3の通信装置を介して、デイジーチェーン接続する。
In a modification of the communication system, nsec level clock synchronization can be realized.
<Modification (Part 3)>
In a modification of the communication system, the
図13は、通信システムの一変形例を示す。 FIG. 13 shows a modification of the communication system.
図13に示される例では、図11を参照して説明した第1の通信装置100と、第2の通信装置200が用意される。第1の通信装置100と、第2の通信装置200とが、第3の通信装置100を介してデイジーチェーン接続される。
In the example shown in FIG. 13, the
第3の通信装置1000は、共通クロック1002と、スレーブ時刻同期回路1004と、データ転送回路1006と、エンドポイント1016と、マスター時刻同期回路1018と、ルートコンプレックス1026とを有する。第3の通信装置1000には、エンドポイント1016を介して、IFカード1010が接続される。また、IFカード1010には、トランシーバ1014が接続される。第3の通信装置1000には、ルートコンプレックス1026を介して、IFカード1020が接続される。また、IFカード1020には、トランシーバ1024が接続される。
The third communication apparatus 1000 includes a common clock 1002, a slave time synchronization circuit 1004, a data transfer circuit 1006, an
スレーブ時刻同期回路1004はスレーブ時刻同期回路204と同様であり、データ転送回路1006はテータ転送回路206と同様であり、エンドポイント1016はエンドポイント216と同様である。マスター時刻同期回路1018はマスター時刻同期回路104と同様であり、ルートコンプレックス1026はルートコンプレックス116と同様である。IFカード1010はIFカード210と同様であり、スイッチ1012はスイッチ212と同様であり、トランシーバ1014はトランシーバ214と同様である。
IFカード1020はIFカード110と同様であり、スイッチ1022はスイッチ112と同様であり、トランシーバ1024はトランシーバ114と同様である。
The slave time synchronization circuit 1004 is similar to the slave
The
第3の通信装置1000は、第1の通信装置100に対しては時間同期においてスレーブとして機能する。また、第3の通信装置1000は、第2の通信装置200に対しては時間同期においてマスターとして機能する。
The third communication device 1000 functions as a slave with respect to the
第2の通信装置1000は、マスターとしての第1の通信装置100の有するクロック(マスタークロック102)に、自装置の有するクロック(共通クロック1002)を同期させる処理を実行する。
The second communication apparatus 1000 executes a process of synchronizing the clock (common clock 1002) of its own apparatus with the clock (master clock 102) of the
スレーブ時刻同期回路1004は、共通クロック1002と接続される。スレーブ時刻同期回路1004は、共通クロック1002から時刻情報を受信する。スレーブ時刻同期回路1004は、エンドポイント1016から、第1の通信装置100からの時刻要求パケットを受信する。スレーブ時刻同期回路1004は、エンドポイント1016のVC1へ、時刻要求パケットに対する時刻応答パケットを出力する。スレーブ時刻同期回路1004は、エンドポイント1016のVC1から、補正量信号を受信する。スレーブ時刻同期回路1004は、共通クロック1002に、補正量信号に含まれる補正量を入力する。共通クロック1002は、スレーブ時刻同期回路1004からの補正量に基づいて、クロックを補正する。
Slave time synchronization circuit 1004 is connected to common clock 1002. The slave time synchronization circuit 1004 receives time information from the common clock 1002. The slave time synchronization circuit 1004 receives the time request packet from the
マスター時刻同期回路1018は、共通クロック1002と接続される。マスター時刻同期回路1018は、共通クロック1002から時刻情報を受信する。マスター時刻同期回路1018は、ルートコンプレックス1026のVC1に、第2の通信装置200に時刻を要求する時刻要求パケットを出力する。マスター時刻同期回路1018は、ルートコンプレックス1026のVC1から、時刻要求パケットに対する第2の通信装置200からの時刻応答パケットを受信する。マスター時刻同期回路1018は、共通クロック1002に、第2の通信装置200のスレーブクロック202を同期させるための補正量を演算する。マスター時刻同期回路1018は、ルートコンプレックス1026のVC1に、補正量を含む補正量信号を出力する。
Master time synchronization circuit 1018 is connected to common clock 1002. The master time synchronization circuit 1018 receives time information from the common clock 1002. The master time synchronization circuit 1018 outputs a time request packet for requesting the time to the
図13において、複数の第3の通信装置1000をデイジーチェーン接続するようにしてもよい。 In FIG. 13, a plurality of third communication apparatuses 1000 may be daisy chain connected.
この場合、第3の通信装置と接続される他の第3の通信装置は、該第3の通信装置が直接又は間接に第1の通信装置100と接続されている場合に、該第3の通信装置に対しては時間同期においてスレーブとして機能する。
In this case, the other third communication device connected to the third communication device is connected to the third communication device when the third communication device is directly or indirectly connected to the
また、該他の第3の通信装置は、直接又は間接に第2の通信装置200と接続されている第3の通信装置と接続されている場合に、該第3の通信装置に対して時間同期においてマスターとして機能する。
In addition, when the other third communication apparatus is connected to the third communication apparatus that is directly or indirectly connected to the
第3の通信装置は、スレーブとしての他の第3の通信装置の有するクロック(共通クロック)に、該第3の通信装置の有するクロック(共通クロック)を同期させる処理を実行する。 The third communication device executes processing for synchronizing the clock (common clock) of the third communication device with the clock (common clock) of the other third communication device as a slave.
他の第3の通信装置のスレーブ時刻同期回路1004は、他の第3の通信装置の共通クロック1002と接続される。他の第3の通信装置のスレーブ時刻同期回路1004は、他の第3の通信装置の共通クロック1002から時刻情報を受信する。他の第3の通信装置のスレーブ時刻同期回路1004は、他の第3の通信装置のエンドポイント1016から、第3の通信装置からの時刻要求パケットを受信する。他の第3の通信装置のスレーブ時刻同期回路1004は、他の第3の通信装置のエンドポイント1016のVC1へ、時刻要求パケットに対する時刻応答パケットを出力する。他の第3の通信装置のスレーブ時刻同期回路1004は、他の第3の通信装置のエンドポイント1016のVC1から、補正量信号を受信する。他の第3の通信装置のスレーブ時刻同期回路1004は、他の第3の通信装置の共通クロック1002に、補正量信号に含まれる補正量を入力する。他の第3の通信装置の共通クロック1002は、他の第3の通信装置のスレーブ時刻同期回路1004からの補正量に基づいて、クロックを補正する。
The slave time synchronization circuit 1004 of the other third communication device is connected to the common clock 1002 of the other third communication device. The slave time synchronization circuit 1004 of the other third communication device receives time information from the common clock 1002 of the other third communication device. The slave time synchronization circuit 1004 of the other third communication device receives the time request packet from the third communication device from the
他の第3の通信装置のマスター時刻同期回路1018は、他の第3の通信装置の共通クロック1002と接続される。他の第3の通信装置のマスター時刻同期回路1018は、他の第3の通信装置の共通クロック1002から時刻情報を受信する。他の第3の通信装置のマスター時刻同期回路1018は、他の第3の通信装置のルートコンプレックス1026のVC1に、他の第3の通信装置に対してスレーブとして機能する第3の通信装置に時刻を要求する時刻要求パケットを出力する。他の第3の通信装置のマスター時刻同期回路1018は、他の第3の通信装置のルートコンプレックス1026のVC1から、時刻要求パケットに対する第2の通信装置200からの時刻応答パケットを受信する。他の第3の通信装置のマスター時刻同期回路1018は、他の第3の通信装置の共通クロック1002に他の第3の通信装置に対してスレーブとして機能する第3の通信装置の共通クロックを同期させるための補正量を演算する。他の第3の通信装置のマスター時刻同期回路1018は、他の第3の通信装置のルートコンプレックス1026のVC1に、補正量を含む補正量信号を出力する。
The master time synchronization circuit 1018 of the other third communication device is connected to the common clock 1002 of the other third communication device. The master time synchronization circuit 1018 of the other third communication device receives time information from the common clock 1002 of the other third communication device. The master time synchronization circuit 1018 of the other third communication device is connected to the VC1 of the
通信システムの一変形例では、第1の通信装置100のマスタークロック102に1又は複数の第3の通信装置1000の共通クロック1002を合わせることができるとともに、該1又は複数の第3の通信装置1000のうち、第2の通信装置200に接続された1の第3の通信装置の共通クロック1002に第2の通信装置200のスレーブクロック202を合わせることができる。つまり、第1の通信装置100のマスタークロック102に、第3の通信装置1000の共通クロック1002、第2の通信装置200のスレーブクロック202をnsecレベルでクロック同期させることができる。
In a modification of the communication system, the common clock 1002 of one or more third communication devices 1000 can be synchronized with the
<変形例(その4)>
通信システムの一変形例では、画像形成装置への適用例を示す。
<Modification (Part 4)>
A modification of the communication system shows an application example to an image forming apparatus.
図13は、通信システムの一変形例を示す。 FIG. 13 shows a modification of the communication system.
通信システムは、デジタルフロントエンド(DFE: Digital FrontRnd)700と、プリンタ800とを有する。
The communication system includes a digital front end (DFE) 700 and a
デジタルフロントエンド700は、RIP(Raster Image Processing)処理部904と、第1の通信装置100と、IFカード110と、トランシーバ114とを有する。
The digital
RIP処理部904は、CPU906と、レンダリング処理部908と、圧縮処理部910と、伸張処理部912と、HDD914と、ネットワーク処理部916と、メモリ918とを有する。
The RIP processing unit 904 includes a CPU 906, a rendering processing unit 908, a compression processing unit 910, an
プリンタ800は、トランシーバ214と、IFカード210と、第2の通信装置200と、印刷コントローラ802と、印刷エンジン816とを有する。
The
印刷コントローラ802は、CPU804と、書き込み制御部806と、DMAC(Direct Memory Access Controller)808とを有する。印刷エンジン816は、印刷部812を有する。
The
RIP処理部904は、クライアントPC902から送信された印刷ジョブをPDL(Page Description Language)形式から、印刷用のラスター形式の画像データに展開する。 The RIP processing unit 904 expands the print job transmitted from the client PC 902 from PDL (Page Description Language) format to image data in a raster format for printing.
印刷コントローラ802は、印刷エンジン816を制御する。印刷コントローラ802は、印刷エンジン816へ、第2の通信装置200からの画像データを転送する制御を実行する。
The
印刷エンジン816は、所定の方式で、画像データを印刷する。所定の方式には、電子写真方式、インクジェット方式が含まれる。 The print engine 816 prints image data by a predetermined method. The predetermined method includes an electrophotographic method and an ink jet method.
<通信システムの動作>
図13に示された番号に従って、クライアントによる印刷ジョブが実行される際の動作について説明する。
<Operation of communication system>
The operation when a print job is executed by the client according to the numbers shown in FIG. 13 will be described.
(1)クライアントPC902から、LANを経由して、RIP処理部904のネットワーク処理部916に、印刷ジョブが送信される。印刷ジョブの形式は、PDL形式であるのが好ましい。
(1) A print job is transmitted from the client PC 902 to the
(2)ネットワーク処理部916に受信された印刷ジョブは、メモリ918に一時的に保管される。
(2) The print job received by the
(3)レンダリング処理部908は、メモリ918に格納された印刷ジョブを読み出し、レンダリング処理を行うことにより、印刷用画像データに展開する。印刷用画像データはラスター形式であるのが好ましい。
(3) The rendering processing unit 908 reads the print job stored in the
(4)圧縮処理部910は、レンダリング処理部908により展開された画像データを圧縮して、HDD914に格納する。
(4) The compression processing unit 910 compresses the image data expanded by the rendering processing unit 908 and stores it in the
(5)伸張処理部912は、HDD914に格納された圧縮データを、順次伸張し、メモリ918に展開する。
(5) The
(6)データ転送回路106は、メモリ918に展開されたイメージデータを読み込み、IF108に入力する。
(6) The
(7)IF108に入力されたイメージデータは、スイッチ112、トランシーバ114、伝送路300、トランシーバ214、スイッチ212、IF208を経由して、第2の通信装置200のデータ転送回路206に転送される。
(7) The image data input to the
(8)印刷コントローラ802の書き込み制御部806は、印刷コントローラ802のDMAC808と、印刷エンジン816の印刷部812に印刷処理を指示する。DMAC806は、データ転送回路206からイメージデータを読み出し、印刷部812へ転送する。印刷部812は、データ転送回路206から転送された画像データを印刷する。
(8) The
(8)のデータ転送する処理は、印刷ジョブ毎、ページ毎、又は、ページを構成するバンドデータ、バンドデータを構成するラインデータ単位で、同時並行して行われる。データ転送する処理が、所定の単位で、同時変更して行われることにより、印刷処理を実行できる。 The data transfer process (8) is performed simultaneously in parallel for each print job, for each page, or for the band data constituting the page and the line data constituting the band data. The printing process can be executed by performing the data transfer process in a predetermined unit with simultaneous changes.
デジタルフロントエンド700とプリンタ800は、印刷処理を実行する際に、様々なジョブ制御や、障害発生時に参照可能なログデータを取得するために、それぞれが正確に同期した時刻で、タイムスタンプの管理を行わなければならない。
When the digital
画像形成装置に、通信システムの一実施例を適用することで、高速なプリンタのラスター画像転送を行う際に、高速なデータ転送が可能なシリアルインターフェースを時刻同期に利用できる。さらに、DFEがマスターとなり、プリンタがスレーブするとして、時刻同期することで正確なタイムスタンプ管理を実現することが可能となる。 By applying an embodiment of the communication system to the image forming apparatus, a serial interface capable of high-speed data transfer can be used for time synchronization when performing high-speed printer raster image transfer. Furthermore, assuming that the DFE is the master and the printer is the slave, accurate time stamp management can be realized by synchronizing the time.
本発明は特定の実施例を参照しながら説明されてきたが、各実施例は単なる例示に過ぎず、当業者は様々な変形例、修正例、代替例、置換例等を理解するであろう。説明の便宜上、本発明の実施例に従った装置は機能的なブロック図を用いて説明されたが、そのような装置はハードウェアで、ソフトウエアで又はそれらの組み合わせで実現されてもよい。本発明は上記実施例に限定されず、本発明の精神から逸脱することなく、様々な変形例、修正例、代替例、置換例等が包含される。 Although the present invention has been described with reference to particular embodiments, each embodiment is merely illustrative, and those skilled in the art will appreciate various variations, modifications, alternatives, substitutions, and the like. . For convenience of explanation, an apparatus according to an embodiment of the present invention has been described using a functional block diagram, but such an apparatus may be implemented in hardware, software, or a combination thereof. The present invention is not limited to the above-described embodiments, and various variations, modifications, alternatives, substitutions, and the like are included without departing from the spirit of the present invention.
100 第1の通信装置
102 マスタークロック
104 マスター時刻同期回路
106 データ転送回路
108 IF
110 IFカード
112 スイッチ
114 トランシーバ
300 伝送路
200 第2の通信装置
202 マスタークロック
204 マスター時刻同期回路
206 データ転送回路
208 IF
210 IFカード
212 スイッチ
214 トランシーバ
100
110 IF
210 IF
Claims (8)
前記第1の通信装置は、
第1の時計と、
前記第1の時計により、前記1又は複数の第2の通信装置に設定されている時刻を要求する時刻要求パケットの送信を開始してから前記1又は複数の第2の通信装置により前記時刻要求パケットに対する応答パケットの受信が開始されるまでの時間を求め、該時間と、前記第1の通信装置と前記1又は複数の第2の通信装置との間で前記時刻要求パケットの伝送に要した時間とに基づいて、前記1又は複数の第2の通信装置の第2の時計の補正量を演算する第1の時刻同期回路と、
前記時刻要求パケットと前記補正量を出力するとともに、前記第1の時刻同期回路へ前記応答パケットを入力する第1のインターフェースと
を有し、
前記第1のインターフェースには、前記時刻要求パケットと前記補正量と前記応答パケットを転送する第1の仮想チャネルと、データを転送する第2の仮想チャネルとが設定され、前記第2の仮想チャネルで転送する前記データよりも前記第1の仮想チャネルで転送する前記時刻要求パケットと前記補正量のタイムスタンプを優先し、前記第2の仮想チャネルで送信する前記データの出力よりも前記第1の仮想チャネルで出力する前記応答パケットを優先的に選択し、
前記1又は複数の第2の通信装置の各々は、
第2の時計と、
前記第2の時計により前記時刻要求パケットの受信を開始してから前記応答パケットの送信を開始するまでの時間を求め、該時間を含む前記応答パケットを作成し、前記第1の通信装置からの前記補正量に基づいて、前記第2の時計を補正する第2の時刻同期回路と、
前記応答パケットを出力するとともに、前記第2の時刻同期回路へ前記補正量を入力する第2のインターフェースと
を有し、
前記第2のインターフェースには、前記時刻要求パケットと前記応答パケットと前記補正量を転送する第3の仮想チャネルと、データを転送する第4の仮想チャネルとが設定され、前記第4の仮想チャネルで転送する前記データよりも前記第3の仮想チャネルで転送する前記応答パケットのタイムスタンプを優先し、前記第4の仮想チャネルで送信する前記データの出力よりも前記第3の仮想チャネルで出力する前記時刻要求パケット、前記補正量を優先的に選択する、通信システム。 A communication system having a first communication device and one or more second communication devices connected to the first communication device by a serial IF,
The first communication device is:
The first watch,
The time request is made by the one or more second communication devices after starting transmission of a time request packet for requesting the time set in the one or more second communication devices by the first clock. The time until the reception of the response packet for the packet is started is obtained, and transmission of the time request packet is required between the time and the first communication device and the one or more second communication devices. A first time synchronization circuit that calculates a correction amount of a second timepiece of the one or more second communication devices based on time,
A first interface that outputs the time request packet and the correction amount, and inputs the response packet to the first time synchronization circuit;
In the first interface, a first virtual channel for transferring the time request packet, the correction amount, and the response packet, and a second virtual channel for transferring data are set, and the second virtual channel is set. The time request packet transferred on the first virtual channel and the time stamp of the correction amount are given priority over the data transferred on the first virtual channel, and the output of the data transmitted on the second virtual channel is prioritized. Preferentially select the response packet to be output on the virtual channel;
Each of the one or more second communication devices includes:
A second watch,
Obtaining a time from the start of reception of the time request packet by the second clock to the start of transmission of the response packet, creating the response packet including the time, from the first communication device A second time synchronization circuit for correcting the second timepiece based on the correction amount;
A second interface for outputting the response packet and inputting the correction amount to the second time synchronization circuit;
In the second interface, a third virtual channel for transferring the time request packet, the response packet, and the correction amount, and a fourth virtual channel for transferring data are set, and the fourth virtual channel is set. Giving priority to the time stamp of the response packet transferred on the third virtual channel over the data transferred on the first virtual channel, and outputting on the third virtual channel over the output of the data transmitted on the fourth virtual channel A communication system that preferentially selects the time request packet and the correction amount.
前記時刻要求パケットの送信を開始してから前記1又は複数の第2の通信装置からの前記時刻要求パケットに対する応答パケットを受信するまでに要した第1の時間を求め、該第1の時間と前記1又は複数の第2の通信装置が前記時刻要求パケットの受信を開始してから前記応答パケットの送信を開始するまでの第2の時間とに基づいて、前記第1の通信装置と前記1又は複数の第2の通信装置との間で前記時刻要求パケットの伝送に要した第3の時間を予測し、該第3の時間と、前記時刻要求パケットの送信を開始してから前記第2の通信装置により前記時刻要求パケットの受信が開始されるまでの時間に基づいて、前記1又は複数の第2の通信装置の第2の時計の補正量を演算する、請求項1に記載の通信システム。 The first time synchronization circuit includes:
A first time required from the start of transmission of the time request packet to reception of a response packet to the time request packet from the one or more second communication devices is obtained, and the first time and Based on the second time from when the one or more second communication devices start to receive the time request packet to when the response packet starts to be transmitted, the first communication device and the first communication device Alternatively, a third time required for transmission of the time request packet with a plurality of second communication devices is predicted, and transmission of the time request packet is started after the third time is started. 2. The communication according to claim 1, wherein a correction amount of a second clock of the one or more second communication devices is calculated based on a time until reception of the time request packet is started by the communication device. system.
前記第2の仮想チャネルで転送する前記データを格納する第2のバッファと
を有し
前記第1のバッファのサイズは、前記時刻要求パケットのサイズと略同一である、請求項1に記載の通信システム。 The first interface includes a first buffer for storing the time request packet to be transferred in the first virtual channel and the correction amount;
2. The communication according to claim 1, further comprising: a second buffer that stores the data to be transferred through the second virtual channel, wherein a size of the first buffer is substantially the same as a size of the time request packet. system.
前記第2のインターフェースには、第2のルートコンプレックス又はエンドポイントが含まれる、請求項1ないし3のいずれか1項に記載の通信システム。 The first interface includes a first root complex;
The communication system according to any one of claims 1 to 3, wherein the second interface includes a second root complex or an endpoint.
を有する、請求項4に記載の通信システム。 The communication system according to claim 4, further comprising a switch arranged between the first root complex and the endpoint or the second root complex.
前記第2の通信装置は、プリンタに実装される、請求項1ないし5のいずれか1項に記載の通信システム。 The first communication device is mounted on a digital front end;
The communication system according to claim 1, wherein the second communication device is mounted on a printer.
前記第1の通信装置は、
第1の時計と、
前記第1の時計により、前記第1の通信装置に接続されている第3の通信装置に設定されている時刻を要求する第1の時刻要求パケットの送信を開始してから前記第1の通信装置に接続されている第3の通信装置からの前記第1の時刻要求パケットに対する第1の応答パケットの受信が開始されるまでの時間を求め、該時間と、前記第1の通信装置と前記第1の通信装置に接続されている第3の通信装置との間で前記第1の時刻要求パケットの伝送に要した時間とに基づいて、前記第1の通信装置に接続されている第3の通信装置の第3の時計の第1の補正量を演算する第1の時刻同期回路と、
前記第1の時刻要求パケットと前記第1の補正量を出力するとともに、前記第1の時刻同期回路へ前記第1の応答パケットを入力する第1のインターフェースと
を有し、
前記第1のインターフェースには、前記第1の時刻要求パケットと前記第1の補正量と前記第1の応答パケットを転送する第1の仮想チャネルと、第1のデータを転送する第2の仮想チャネルとが設定され、該第2の仮想チャネルで転送する前記第1のデータよりも該第1の仮想チャネルで転送する前記第1の時刻要求パケットと前記第1の補正量のタイムスタンプを優先し、該第2の仮想チャネルで送信する前記第1のデータの出力よりも該第1の仮想チャネルで出力する前記第1の応答パケットを優先的に選択し、
前記1又は複数の第3の通信装置の各々は、
前記第3の時計と、
前記第3の時計により前記第1の時刻要求パケット又は接続された第3の通信装置からの第2の時刻要求パケットの受信を開始してから前記第1の応答パケット又は前記第2の時刻要求パケットに対する第2の応答パケットの送信を開始するまでの時間を求め、該時間を含む前記第1の応答パケット又は前記第2の応答パケットを作成し、前記第1の通信装置からの前記第1の補正量又は前記第2の時刻要求パケットを送信する第3の通信装置からの第2の補正量に基づいて、前記第3の時計を補正する第3の時刻同期回路と、
前記第1の応答パケット又は前記第2の応答パケットを出力するとともに、前記第3の時刻同期回路へ前記第1の補正量又は第2の補正量を入力する第3のインターフェースと、
前記第3の時計により、前記第2の時刻要求パケットを送信する第3の通信装置以外の第3の通信装置のうち接続された第3の通信装置に設定されている時刻を要求する第3の時刻要求パケット又は前記第2の通信装置に設定されている時刻を要求する第4の時刻要求パケットの送信を開始してから前記第3の時刻要求パケットの送信先である第3の通信装置により前記第3の時刻要求パケットに対する第3の応答パケット又は前記第2の通信装置により前記第4の時刻要求パケットに対する第4の応答パケットの受信が開始されるまでの時間を求め、該時間と、前記第3の時刻要求パケットを送信する第3の通信装置と前記第3の時刻要求パケットの送信先である第3の通信装置との間で前記第3の時刻要求パケットの伝送に要した時間又は前記第4の時刻要求パケットを送信する第3の通信装置と第2の通信装置との間で前記第4の時刻要求パケットの伝送に要した時間とに基づいて、前記第3の時刻要求パケットの送信先である第3の通信装置の第3の時計の第3の補正量又は前記第2の通信装置の第2の時計の第4の補正量を演算する第4の時刻同期回路と、
前記第3の時刻要求パケットと前記第3の補正量又は前記第4の時刻要求パケットと前記第4の補正量を出力するとともに、前記第4の時刻同期回路へ前記第3の応答パケット又は前記第4の応答パケットを入力する第4のインターフェースと
を有し、
前記第3のインターフェースには、前記第1の時刻要求パケットと前記第1の応答パケットと前記第1の補正量又は前記第2の時刻要求パケットと前記第2の応答パケットと前記第2の補正量を転送する第5の仮想チャネルと、前記第1のデータを転送する第6の仮想チャネルとが設定され、該第6の仮想チャネルで転送する前記第1のデータよりも該第5の仮想チャネルで転送する前記第1の応答パケット又は前記第2の応答パケットのタイムスタンプを優先し、該第6の仮想チャネルで送信する前記第1のデータの出力よりも該第5の仮想チャネルで出力する前記第1の時刻要求パケットと前記第1の補正量又は前記第2の時刻要求パケットと前記第2の補正量を優先的に選択し、
前記第4のインターフェースには、前記第3の時刻要求パケットと前記第3の応答パケットと前記第3の補正量又は前記第4の時刻要求パケットと前記第4の応答パケットと前記第4の補正量を転送する第7の仮想チャネルと、第2のデータを転送する第8の仮想チャネルとが設定され、該第8の仮想チャネルで転送する前記第2のデータよりも該第7の仮想チャネルで転送する前記第3の時刻要求パケットと前記第3の補正量又は前記第4の時刻要求パケットと前記第4の補正量のタイムスタンプを優先し、該第8の仮想チャネルで送信する前記第2のデータの出力よりも該第7の仮想チャネルで出力する前記第3の応答パケット又は前記第4の応答パケットを優先的に選択し、
前記第2の通信装置は、
前記第2の時計と、
前記第2の時計により前記第4の時刻要求パケットの受信を開始してから前記第4の応答パケットの送信を開始するまでの時間を求め、該時間を含む前記第4の応答パケットを作成し、前記第4の時刻要求パケットを送信した第3の通信装置からの前記第4の補正量に基づいて、前記第2の時計を補正する第2の時刻同期回路と、
前記第4の応答パケットを出力するとともに、前記第2の時刻同期回路へ前記第4の補正量を入力する第2のインターフェースと
を有し、
前記第2のインターフェースには、前記第4の時刻要求パケットと前記第4の応答パケットと前記第4の補正量を転送する第3の仮想チャネルと、前記第2のデータを転送する第4の仮想チャネルとが設定され、該第4の仮想チャネルで転送する前記第2のデータよりも該第3の仮想チャネルで転送する前記第4の応答パケットのタイムスタンプを優先し、該第4の仮想チャネルで送信する前記第2のデータの出力よりも該第3の仮想チャネルで出力する前記第4の時刻要求パケット、前記第4の補正量を優先的に選択する、通信システム。 A first communication device, one or more third communication devices sequentially connected to the first communication device via a serial IF, and one of the one or more third communication devices and a serial IF. A communication system having a connected second communication device,
The first communication device is:
The first watch,
The first communication starts after transmission of a first time request packet for requesting a time set in a third communication device connected to the first communication device by the first clock. A time until reception of the first response packet for the first time request packet from the third communication device connected to the device is started, and the time, the first communication device, and the Based on the time required for transmission of the first time request packet to and from the third communication device connected to the first communication device, the third connected to the first communication device. A first time synchronization circuit for calculating a first correction amount of a third watch of the communication device;
A first interface for outputting the first time request packet and the first correction amount and inputting the first response packet to the first time synchronization circuit;
The first interface includes a first virtual channel that transfers the first time request packet, the first correction amount, and the first response packet, and a second virtual that transfers first data. The first time request packet transferred through the first virtual channel and the first correction amount time stamp are given priority over the first data transferred through the second virtual channel. And preferentially selecting the first response packet to be output on the first virtual channel over the output of the first data to be transmitted on the second virtual channel,
Each of the one or more third communication devices includes:
The third watch;
The first response packet or the second time request from the start of reception of the first time request packet or the second time request packet from the connected third communication device by the third clock A time until the start of transmission of a second response packet to the packet is obtained, the first response packet including the time or the second response packet is created, and the first communication device receives the first response packet from the first communication device. A third time synchronization circuit that corrects the third clock based on a second correction amount or a second correction amount from a third communication device that transmits the second time request packet;
A third interface for outputting the first response packet or the second response packet and inputting the first correction amount or the second correction amount to the third time synchronization circuit;
A third time requesting the time set in the connected third communication device among the third communication devices other than the third communication device transmitting the second time request packet by the third clock. The third communication device that is the transmission destination of the third time request packet after starting the transmission of the fourth time request packet that requests the time set packet of the first time request packet or the time set in the second communication device To obtain a time until reception of a third response packet for the third time request packet or a fourth response packet for the fourth time request packet by the second communication device is started, and The transmission of the third time request packet is required between the third communication device that transmits the third time request packet and the third communication device that is the transmission destination of the third time request packet. Time Based on the time required for transmission of the fourth time request packet between the third communication device that transmits the fourth time request packet and the second communication device, the third time request packet A fourth time synchronization circuit for calculating a third correction amount of the third timepiece of the third communication device that is a transmission destination of the second timepiece or a fourth correction amount of the second timepiece of the second communication device;
The third time request packet and the third correction amount or the fourth time request packet and the fourth correction amount are output, and the third response packet or the fourth time synchronization circuit is output to the fourth time synchronization circuit. A fourth interface for inputting a fourth response packet;
The third interface includes the first time request packet, the first response packet, the first correction amount, or the second time request packet, the second response packet, and the second correction. A fifth virtual channel for transferring the amount and a sixth virtual channel for transferring the first data are set, and the fifth virtual channel is set to be higher than the first data transferred on the sixth virtual channel. Give priority to the time stamp of the first response packet or the second response packet transferred on the channel, and output on the fifth virtual channel over the output of the first data transmitted on the sixth virtual channel Preferentially select the first time request packet and the first correction amount or the second time request packet and the second correction amount,
The fourth interface includes the third time request packet, the third response packet, the third correction amount, or the fourth time request packet, the fourth response packet, and the fourth correction. A seventh virtual channel for transferring the amount of data and an eighth virtual channel for transferring the second data are set, and the seventh virtual channel is more than the second data transferred by the eighth virtual channel. Giving priority to the third time request packet and the third correction amount or the fourth time request packet and the fourth correction amount time stamp transferred in step 8, and transmitting on the eighth virtual channel. Preferentially selecting the third response packet or the fourth response packet to be output on the seventh virtual channel over the output of the data of 2;
The second communication device is:
The second watch;
The time from the start of reception of the fourth time request packet by the second clock to the start of transmission of the fourth response packet is obtained, and the fourth response packet including the time is created. A second time synchronization circuit that corrects the second clock based on the fourth correction amount from the third communication device that has transmitted the fourth time request packet;
A second interface for outputting the fourth response packet and inputting the fourth correction amount to the second time synchronization circuit;
A third virtual channel for transferring the fourth time request packet, the fourth response packet, and the fourth correction amount to the second interface, and a fourth virtual channel for transferring the second data. A virtual channel is set, and the time stamp of the fourth response packet transferred on the third virtual channel is prioritized over the second data transferred on the fourth virtual channel, and the fourth virtual channel is prioritized. A communication system that preferentially selects the fourth time request packet and the fourth correction amount output by the third virtual channel over the output of the second data transmitted by the channel.
前記第1の通信装置は、
第1の時計により、前記1又は複数の第2の通信装置に設定されている時刻を要求する時刻要求パケットの送信を開始してから前記1又は複数の第2の通信装置により前記時刻要求パケットの受信が開始されるまでの時間を求め、該時間と、前記第1の通信装置と前記1又は複数の第2の通信装置との間で前記時刻要求パケットの伝送に要した時間とに基づいて、前記第2の通信装置の第2の時計の補正量を演算し、
第1のインターフェースにより、前記時刻要求パケットと前記補正量を出力するとともに、第1の時刻同期回路へ前記応答パケットを入力し、
前記第1のインターフェースには、前記時刻要求パケットと前記補正量と前記応答パケットを転送する第1の仮想チャネルと、データを転送する第2の仮想チャネルとが設定され、前記第2の仮想チャネルで転送する前記データよりも前記第1の仮想チャネルで転送する前記時刻要求パケットと前記補正量のタイムスタンプを優先し、前記第2の仮想チャネルで送信する前記データの出力よりも前記第1の仮想チャネルで出力する前記応答パケットを優先的に選択し、
前記1又は複数の第2の通信装置の各々は、
第2の時計により前記時刻要求パケットの受信を開始してから前記応答パケットの送信を開始するまでの時間を求め、該時間を含む前記応答パケットを作成し、前記第1の通信装置からの前記補正量に基づいて、前記第2の時計を補正し、
第2のインターフェースにより、前記応答パケットを出力するとともに、前記第2の時刻同期回路へ前記補正量を入力し、
前記第2のインターフェースには、前記時刻要求パケットと前記応答パケットと前記補正量を転送する第1の仮想チャネルと、データを転送する第2の仮想チャネルとが設定され、前記第2の仮想チャネルで転送する前記データよりも前記第1の仮想チャネルで転送する前記応答パケットのタイムスタンプを優先し、前記第2の仮想チャネルで送信する前記データの出力よりも前記第1の仮想チャネルで出力する前記時刻要求パケット、前記補正量を優先的に選択する、時刻同期方法。 A time synchronization method in a communication system having a first communication device and one or more second communication devices connected to the first communication device via a serial IF,
The first communication device is:
The time request packet is transmitted by the one or more second communication devices after starting transmission of the time request packet for requesting the time set in the one or more second communication devices by the first clock. Based on the time required to transmit the time request packet between the first communication device and the one or more second communication devices. Calculating the correction amount of the second timepiece of the second communication device,
The first interface outputs the time request packet and the correction amount, and inputs the response packet to the first time synchronization circuit,
In the first interface, a first virtual channel for transferring the time request packet, the correction amount, and the response packet, and a second virtual channel for transferring data are set, and the second virtual channel is set. The time request packet transferred on the first virtual channel and the time stamp of the correction amount are given priority over the data transferred on the first virtual channel, and the output of the data transmitted on the second virtual channel is prioritized. Preferentially select the response packet to be output on the virtual channel;
Each of the one or more second communication devices includes:
A time from when reception of the time request packet is started by a second clock until transmission of the response packet is obtained, the response packet including the time is created, and the response from the first communication device is generated. Correcting the second clock based on the correction amount;
The second interface outputs the response packet, and inputs the correction amount to the second time synchronization circuit,
In the second interface, a first virtual channel for transferring the time request packet, the response packet, and the correction amount, and a second virtual channel for transferring data are set, and the second virtual channel is set. Giving priority to the time stamp of the response packet transferred on the first virtual channel over the data transferred on the first virtual channel, and outputting on the first virtual channel over the output of the data transmitted on the second virtual channel A time synchronization method for preferentially selecting the time request packet and the correction amount.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013012906A JP2014146877A (en) | 2013-01-28 | 2013-01-28 | Communication system and time synchronization |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013012906A JP2014146877A (en) | 2013-01-28 | 2013-01-28 | Communication system and time synchronization |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2014146877A true JP2014146877A (en) | 2014-08-14 |
Family
ID=51426814
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013012906A Pending JP2014146877A (en) | 2013-01-28 | 2013-01-28 | Communication system and time synchronization |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2014146877A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017142740A (en) * | 2016-02-12 | 2017-08-17 | 日本電信電話株式会社 | Cooperation instruction device, cooperation instruction program, and cooperation instruction method |
JP2017202034A (en) * | 2016-05-09 | 2017-11-16 | キヤノン株式会社 | Radiation imaging apparatus, radiation imaging system, radiation imaging method, and program |
JP2017539178A (en) * | 2014-12-16 | 2017-12-28 | ローベルト ボツシユ ゲゼルシヤフト ミツト ベシユレンクテル ハフツングRobert Bosch Gmbh | How to synchronize network device clocks |
JP2018032065A (en) * | 2016-08-22 | 2018-03-01 | 三菱電機株式会社 | Time synchronization control system |
WO2021002421A1 (en) | 2019-07-04 | 2021-01-07 | オムロン株式会社 | Control system |
-
2013
- 2013-01-28 JP JP2013012906A patent/JP2014146877A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017539178A (en) * | 2014-12-16 | 2017-12-28 | ローベルト ボツシユ ゲゼルシヤフト ミツト ベシユレンクテル ハフツングRobert Bosch Gmbh | How to synchronize network device clocks |
JP2017142740A (en) * | 2016-02-12 | 2017-08-17 | 日本電信電話株式会社 | Cooperation instruction device, cooperation instruction program, and cooperation instruction method |
JP2017202034A (en) * | 2016-05-09 | 2017-11-16 | キヤノン株式会社 | Radiation imaging apparatus, radiation imaging system, radiation imaging method, and program |
JP2018032065A (en) * | 2016-08-22 | 2018-03-01 | 三菱電機株式会社 | Time synchronization control system |
WO2021002421A1 (en) | 2019-07-04 | 2021-01-07 | オムロン株式会社 | Control system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2801162B1 (en) | Method and apparatus for communicating time information between time-aware devices | |
EP3270531B1 (en) | System and method of synchronizing a distributed clock in a packet-compatible network | |
US8081663B2 (en) | Time synchronization method and relay apparatus | |
EP1757410B1 (en) | Robot coordinated control method and system | |
US9906320B2 (en) | Industrial network apparatus and data communication method | |
KR100987389B1 (en) | Synchronization method with fixed delay time in network, and bridge adopting the same method | |
JP2014146877A (en) | Communication system and time synchronization | |
US11979481B2 (en) | Time synchronisation | |
JP5923430B2 (en) | Communication control device | |
WO2014173267A1 (en) | Timestamp generating method, device and system | |
CN109699199B (en) | Message processing method and network equipment | |
CN103988453A (en) | Method for synchronizing clocks in nodes of a vehicle network and node designed to perform the method | |
JP5127482B2 (en) | Timing synchronization method, synchronization apparatus, synchronization system, and synchronization program | |
CN108259109B (en) | Network equipment in PTP domain and TOD synchronization method | |
JP6351889B1 (en) | Communication system and slave device | |
KR20110081910A (en) | Link band estimating apparatus | |
US8649303B2 (en) | Method and device for synchronizing and time-stamping for equipment items of a communication network of AFDX type | |
WO2015125439A1 (en) | Communication system, wireless communication apparatus, and wireless communication method | |
JP5675703B2 (en) | Communication device, control device, and program | |
JP4961589B2 (en) | Network system and slave synchronization method | |
Diarra et al. | Improved clock synchronization start-up time for Ethernet AVB-based in-vehicle networks | |
JP2015117941A (en) | Communication system and time synchronization method | |
TW201731265A (en) | Time-synchronous slave apparatus and communication control method | |
JP5632822B2 (en) | Speed conversion repeater | |
JP2019033333A (en) | Time synchronization method |