JP2015198399A - communication device - Google Patents
communication device Download PDFInfo
- Publication number
- JP2015198399A JP2015198399A JP2014076301A JP2014076301A JP2015198399A JP 2015198399 A JP2015198399 A JP 2015198399A JP 2014076301 A JP2014076301 A JP 2014076301A JP 2014076301 A JP2014076301 A JP 2014076301A JP 2015198399 A JP2015198399 A JP 2015198399A
- Authority
- JP
- Japan
- Prior art keywords
- time
- spacewire
- data
- transmission
- synchronization
- 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
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
Description
本発明は、主として、人工衛星搭載用のデータ処理装置などのデータ通信を行う通信装置に関する。 The present invention mainly relates to a communication device that performs data communication such as a data processing device mounted on an artificial satellite.
人工衛星搭載用のデータ通信処理装置間の通信として、従来はMIL―STD―1553B規格やRS422やLVDSによる3線式シリアル通信など多種多様な通信方法が用いられてきた。このような通信方法の乱立は人工衛星開発のコストの増加、開発期間の長期間化に繋がる要因と考え、人工衛星内の通信方法の統一を目指した通信規格としてSpaceWireが策定された。非特許文献1に示すSpaceWire規格書ではSpaceWireの通信規格が定められており、SpaceWireとしてOSI参照モデルでいうところの物理層からネットワーク層までが決められている。SpaceWireは全二重のシリアル通信方式であり、通常データの他にデータ終端を示す、EOP(End of Packet)、Time−Code、通信リンクを維持するためのNULLを送信する。Time−Codeは送信側がネットワーク上のターゲット機器に対してブロードキャストでデータを送るためのデータで、各通信インタフェースでのFIFOに入れられないため小さい遅延時間で送信ができる。そのため時刻配信用に使うことが有効であるが、その使用方法までは規格では定められていない。
Conventionally, various communication methods such as the MIL-STD-1553B standard, RS422 or LVDS three-wire serial communication have been used for communication between data communication processing devices mounted on artificial satellites. Considering that such an unbalanced communication method is a factor leading to an increase in the cost of satellite development and a long development period, SpaceWire has been established as a communication standard aimed at unifying the communication method in the satellite. In the SpaceWire standard document shown in Non-Patent
衛星内の観測装置がある自然現象や時間を記録しておくために各観測装置は時計を持つ必要がある。また、人工衛星内を制御する装置は衛星の状態変化を記録しておく時計を持つ必要がある。この時計はTimePulse信号を基準としてカウンタで時間が刻まれる。これらのTimePulseは各装置の持つ発振器でカウントアップされる時刻カウンタで一定カウンと値に達すると生成されることが一般的である。しかしながら、これらの発振器は、発振器ごとの製造ばらつきや温度変化による周波数変化により、長時間経過すると各観測装置の時計はずれてきてしまい、正確な事象記録ができなくなる。そこで衛星制御計算機を中心にすべての搭載装置の時刻を同期させる方法が必要となるが、SpaceWireを装置間のネットワークとして用いる場合、衛星制御計算機からTime−Codeを送信し、各観測装置はTime−Codeの受信タイミングをもって同期信号とする方法が取られている。従来、このような技術として、例えばTime−Codeを受信したタイミングでパルスを発生させて、時刻同期のタイミングとするシステムがあった(例えば、特許文献1参照)。また、非特許文献2には、ルータを経由して装置を接続する場合、Time−Codeにどの程度の遅延が生じるかを解析しその発生原因について示されている。
Each observation device needs to have a clock in order to keep track of natural phenomena and time. In addition, a device that controls the inside of an artificial satellite needs to have a clock that records changes in the state of the satellite. This clock is clocked by a counter with the TimePulse signal as a reference. These Time Pulses are generally generated when a certain counter and value are reached by a time counter that is counted up by an oscillator of each device. However, these oscillators, due to manufacturing variations among the oscillators and frequency changes due to temperature changes, shift the clock of each observation device after a long time, making it impossible to accurately record events. Therefore, there is a need for a method of synchronizing the time of all on-board devices centering on the satellite control computer. However, when SpaceWire is used as a network between devices, the satellite control computer transmits Time-Code, and each observation device transmits a Time-Code. A method is adopted in which a synchronization signal is generated at the reception timing of the code. Conventionally, as such a technique, for example, there has been a system in which a pulse is generated at the timing when a Time-Code is received and the timing is synchronized with time (see, for example, Patent Document 1). Non-Patent
しかしながら、特許文献1に記載されているような従来のシステムでは、Time−Codeを受信したタイミングでパルスを発生させて、時刻同期のタイミングとするため、高精度な時刻同期が実現できないという問題があった。その理由は、Time−CodeはSpaceWire上のネットワークで伝送する場合、送信するごとに確率的に揺らぎが生じてしまうという性質があるからである。このTime−Codeの揺らぎはSpaceWireのプロトコル規定から生じるものであるため減じることはできない。
図2に示すような構成でSpaceWireのエンコード部105とSpaceWireデコード部201はシリアル通信を行うが、SpaceWireのデータリンク初期化後の動作は図6のように状態遷移で通信を行う。なお、図2中の構成については実施の形態1で説明する。
However, in the conventional system as described in
In the configuration shown in FIG. 2, the SpaceWire
SpaceWireでは、図6のフローチャートに示すように、送信FIFO105aにデータがない場合(ステップST2:NO)や、Time−Codeの送信要求がない場合(ステップST1:NO)はNULLを送信する。NULLは8ビットのデータで8ビットを1クロックずつ送信するため8クロック要する。このNULL送信中はTime−Codeやデータは送信できない。すなわちTime−Code送信要求をした場合、送信は0クロックから8クロック待たされることになる。何クロック待たされるかは一様確率分布となる。この待ち時間はTime−Code伝送の揺らぎの原因となる。さらに1つのルータを経由して装置を接続する場合、このSpaceWireエンコード部が1つ増えるためにこの揺らぎが2つ重ね合わられることになる。ルータが増えるごとに揺らぎが重ね合わせられ大きくなっていくことになる。
In the case of SpaceWire, as shown in the flowchart of FIG. 6, NULL is transmitted when there is no data in the
Time−Codeはブロードキャストで送信されるため、複数の装置がTime−Codeを受信するが、SpaceWireのネットワークトポロジによって各装置が何個のSpaceWireルータを経由しているか異なる。そのため装置ごとに同期の揺らぎの大きさも異なるため装置ごとに時計がずれることになる。 Since the Time-Code is transmitted by broadcast, a plurality of devices receive the Time-Code, but the number of SpaceWire routers that pass through each device varies depending on the network topology of SpaceWire. For this reason, since the magnitude of the synchronization fluctuation is different for each device, the clock is shifted for each device.
この発明は上記のような課題を解決するためになされたもので、高精度な時刻同期を実現することのできる通信装置を得ることを目的とする。 The present invention has been made to solve the above-described problems, and an object of the present invention is to obtain a communication apparatus capable of realizing highly accurate time synchronization.
この発明に係る通信装置は、SpaceWireで接続されたイニシエータノードとターゲットノードからなる通信装置において、イニシエータノードは、SpaceWireパケットのエンコードを行ってターゲットノードに送信するSpaceWireエンコード部と、SpaceWireエンコード部のNULL送信を止めた後に同期データと同期データの送信時刻とをSpaceWireエンコード部に送信する同期データ送信部とを備え、ターゲットノードは、同期データの送信時刻と、同期データの自ターゲットノードにおける受信時刻と、ターゲットノードとイニシエータノードとが時刻同期している状態での送信時刻と受信時刻の差とを用いて、自ターゲットノードの時刻を補正する時刻補正部を備えたものである。 The communication device according to the present invention is a communication device composed of an initiator node and a target node connected by SpaceWire. The initiator node encodes a SpaceWire packet and transmits it to the target node, and a NULL of the SpaceWire encoding unit. A synchronization data transmission unit that transmits the synchronization data and the transmission time of the synchronization data to the SpaceWire encoding unit after the transmission is stopped, and the target node includes the transmission time of the synchronization data, the reception time of the synchronization data at the target node, and A time correction unit that corrects the time of the target node using the difference between the transmission time and the reception time when the target node and the initiator node are synchronized in time is provided.
この発明の通信装置は、SpaceWireエンコード部のNULL送信を止めた後に同期データと同期データの送信時刻とをターゲットノードに送信し、この送信時刻と、ターゲットノード側の受信時刻と、時刻同期している場合の送信時刻と受信時刻との差とを用いてターゲットノードの時刻を補正するようにしたので、高精度な時刻同期を実現することができる。 The communication device of the present invention transmits the synchronization data and the transmission time of the synchronization data to the target node after stopping the NULL transmission of the SpaceWire encoding unit, and synchronizes the transmission time with the reception time on the target node side. Since the time of the target node is corrected using the difference between the transmission time and the reception time in the case of being present, highly accurate time synchronization can be realized.
実施の形態1.
図1は、この発明の実施の形態1による通信装置を示す構成図である。
図1に示す通信装置は、イニシエータノード100とターゲットノード200がSpaceWire300で接続され、通信を行う。イニシエータノード100は、時刻を管理する主系機器であり、ターゲットノード200は、イニシエータノード100によって時刻管理される従系機器である。
1 is a block diagram showing a communication apparatus according to
In the communication apparatus shown in FIG. 1, an
イニシエータノード100は、データ送信部101、時刻発生部102、同期開始データ送信部103、Time−Code送信部104、SpaceWireエンコード部105を備える。データ送信部101は、イニシエータノード100としてターゲットノード200へのデータ送信を行う処理部である。時刻発生部102は、イニシエータノード100における時刻データを発生する処理部であり、発振器102aと時刻カウンタ102bを備えている。発振器102aは、予め定められた周波数のデータを発生する発振器であり、時刻カウンタ102bは、発振器102aからの発信周波数をカウントしてクロックとして出力するカウンタである。同期開始データ送信部103は、ターゲットノード200との時刻同期を行うための同期開始データを送信する処理部であり、計測カウンタ部103aと開始データ送信部103bを備えている。計測カウンタ部103aは、時刻発生部102からのカウント値をカウントして同期データのEOPの送信時刻を検出するためのカウンタであり、開始データ送信部103bは、計測カウンタ部103aのカウント値を出力する処理部である。Time−Code送信部104は、時刻発生部102の時刻と開始データ送信部103bからの同期データをTime−Codeとして送信する処理部である。SpaceWireエンコード部105は、SpaceWireとしてのシリアルデータにエンコードする処理部である。なお、SpaceWireエンコード部105の内部構成については後述する。また、データ送信部101〜Time−Code送信部104で、SpaceWireエンコード部105のNULL送信を止めた後に同期データとこの同期データの送信時刻をSpaceWireエンコード部105に送信する同期データ送信部が構成されている。
The
ターゲットノード200は、SpaceWireデコード部201、データデコード部202、データ受信部203、リセット部204、時刻生成部205、処理回路部206を備えている。SpaceWireデコード部201は、SpaceWire300を介して受け取ったイニシエータノード100からのSpaceWireパケットをデコードする処理部であり、その詳細については後述する。データデコード部202は、SpaceWireデコード部201でデコードされたデータに基づいて、時刻同期動作の開始および終了を判定する処理部である。データ受信部203は、データデコード部202からのSTOP信号とSTART信号とに基づいてSpaceWireデコード部201からのデータ受信を行う処理部である。リセット部204は、データデコード部202からのSTOP信号に基づいてEOP待ちを行い、SpaceWireデコード部201からEOPが出力された場合は、この情報を時刻生成部205に送出する処理部である。
The
時刻生成部205は、ターゲットノード200における時刻生成を行う処理部であり、発振器205a、計測カウンタ部205b、遅れ補正部205c、プリセット値205d、時刻カウンタ205eを備えている。ここで、発振器205aおよび時刻カウンタ205eは、イニシエータノード100の時刻発生部102における発振器102aおよび時刻カウンタ102bと同様に、ターゲットノード200における時刻を生成するための処理部である。計測カウンタ部205bは、リセット部204からのSTART信号と時刻カウンタ205eからのSTOP信号に基づいてEOPの受信時刻をカウントするためのカウンタである。遅れ補正部205cは、計測カウンタ部205bでカウントされたEOPの受信時刻と、予め計測されたイニシエータノード100とターゲットノード200とが時刻同期している状態での送信時刻と受信時刻の差と、データ受信部203で受信されたイニシエータノード100におけるEOPの送信時刻とに基づいて、遅れ補正値を算出する処理部である。プリセット値205dは、時刻カウンタ205eがカウントする際のプリセット値であり、遅れ補正部205cによって補正される値である。また、データデコード部202〜時刻生成部205によって、ターゲットノード200の時刻を補正する時刻補正部が構成されている。
また、処理回路部206は、ターゲットノード200における各種処理を行う回路である。
The
The
図2は、SpaceWireエンコード部105とSpaceWireデコード部201の構成図である。図示のように、SpaceWireエンコード部105は、送信FIFO105aとシリアル化送信部105bを備えている。送信FIFO105aは、データを一時的に格納し、送出する先入れ先出しメモリである。シリアル化送信部105bは、Time−Codeまたは送信FIFO105aからのデータをシリアル化してSpaceWire300に出力する処理部である。SpaceWireデコード部201は、パラレル化受信部201aと受信FIFO201bを備えている。パラレル化受信部201aは、SpaceWire300からのシリアルパケットをパラレルデータとして出力する処理部であり、受信FIFO201bは、受信データを一時的に格納する先入れ先出しメモリである。
FIG. 2 is a configuration diagram of the
次に、実施の形態1の通信装置の動作について説明する。
データ送信部101は、SpaceWireエンコード部105のFULL信号をモニタしながらDATAを送る。DATAの終端にEOPを送信する。SpaceWireエンコード部105は、受信した8bitデータをシリアルデータに変換し、SpaceWire規格に従った信号を発生させてターゲットノード200に送る。ターゲットノード200のSpaceWireデコード部201は、シリアルデータをパラレル化受信部201aでパラレルデータに変換した後、受信FIFO201bに蓄積し、データ受信部203が受け取るのを待つ。データ受信部203はSpaceWireデコード部201からのEMPTY信号をモニタし、EMPTY信号がデアサートされた場合、データ受信可能と認識しSpaceWireデコード部201よりデータを受信する。
Next, the operation of the communication apparatus according to the first embodiment will be described.
The
イニシエータノード100の持つ時刻発生部102における時刻カウンタ102bが基準となる時刻を示し、ターゲットノード200の持つ時刻生成部205の時刻カウンタ205eは、当初はイニシエータノード100の時刻カウンタ102bと同期して動作する。時刻カウンタ205eは50MHzの発振器205aの発生するクロックによりカウントアップし、プリセット値205dに設定された値に達すると、Time_Pulseを発生させリセットされる。Time_Pulseは、処理回路部206をスケジュールに従って駆動するためのタイミング信号として使用される。時間が経過すると、50MHzの発振器102aと50MHzの発振器205aの固有差によりずれが生じていく。本実施の形態ではこのずれを補正する。
The
50MHzの発振器102aを基準に動作をしているイニシエータノード100と、同じく50MHzの発振器205aを基準に動作をしているターゲットノード200が、2MHzのSpaceWire300で接続されている構成において、イニシエータノード100の時刻基準信号Time_Pulseとターゲットノード200の時刻基準信号Time_Pulseとを合わせる。イニシエータノード100とターゲットノード200の発振器102aと発振器205aの周波数は50MHzのデバイスを使用するが、製造ばらつきや温度変化によって徐々にずれて行き、やがては時刻カウンタ102bと時刻カウンタ205eが異なり、Time_Pulseがずれてくる。そこでTime_Pulseを再度同じタイミングとするためにイニシエータノード100から同期動作の開始を意味するヘッダ400aを有するSpaceWireパケット400をターゲットノード200へ送信する。図3にSpaceWireパケット400のフォーマットを示す。図示のように、SpaceWireパケット400は、ヘッダ400aとデータ部400bと終端部(EOP)400cで構成されている。
In the configuration in which the
また、図4はイニシエータノード100とターゲットノード200の動作を示す説明図である。図4では、ステップST11で、イニシエータノード100から同期開始ヘッダ付きデータが送信されている。
FIG. 4 is an explanatory diagram showing operations of the
ターゲットノード200は当該データを受信後、データデコード部202でそのヘッダをデコードして同期動作が開始したことを認識する。同期動作の開始にあたり、データ受信部203に対してSTOP信号を出力し、以降のデータを受信しないようにする(ステップST21)。つまりSpaceWireデコード部201のEMPTY信号が非有効になってデータが取得可能な状態になってもデータを取得しないようにする(ステップST22)。また、リセット部204にもSTOP信号を出力して当該データのSpaceWireパケットの終端部のEOP検出待ちを行うようにする(ステップST23)。
After receiving the data, the
このようにした状態でイニシエータノード100は、データ送信部101がSpaceWireエンコード部105にSpaceWireパケット400を送信し続ける(ステップST12)。SpaceWireエンコード部105とSpaceWireデコード部201のFIFOが一杯になると、イニシエータノード100のSpaceWireエンコード部105は、データ送信部101に対してFULL信号を出力する。これによりデータ送信部101は、データの送信を停止し、また、次の送信データはEOPとする(ステップST13)。
In this state, in the
次に、イニシエータノード100の同期開始データ送信部103は、Time−Codeとして0xFFをターゲットノード200に送信する(ステップST14)。
ターゲットノード200は、Time−Codeとして0xFFを受信するとデータデコード部202は、START信号をデータ受信部203に送信する。データ受信部203は、START信号を受信すると、SpaceWireデコード部201からデータを受信し続ける(ステップST24)。データ受信部203は、SpaceWire300上の図示しないSpaceWireルータを含むSpaceWireデコード部201の受信FIFO201bが一杯にならないように十分高速にデータを受信し続ける。
Next, the synchronization start data transmission unit 103 of the
When the
イニシエータノード100は、送信FIFO105aのFULL信号がデアサートされたときに終端部(EOP)400cのデータを送信する。イニシエータノード100の同期開始データ送信部103は、時刻生成部102からのTime_PulseをSTART信号としてEOPの送信時刻T1を測定する(ステップST15)。一方、ターゲットノード200の時刻生成部205では、時刻カウンタ205eの生成するTime_Pulseをスタートとして、リセット部204が受信したEOPに基づき、EOP受信時刻T3を計測する(ステップST25)。装置構成時初期のイニシエータノード100とターゲットノード200のTime_Pulseがそろった状態でのT3―T1をT2としておく。T2は固定値として使用する。
The
時刻同期が外れていくとT3−T1とT2が異なる値を取るようになる。ターゲットノード200側の発振器205aが遅れると、T3−T1<T2となり、ターゲットノード200側の発振器205aが速くなるとT3−T1>T2となる。イニシエータノード100は、T1の値をTime−Codeでターゲットノード200に送信し(ステップST16)、ターゲットノード200側は、遅れ補正部205cが(T3−T1)−T2を計算し、結果をプリセット値205dに1回のみ加える(ステップST26)。時刻カウンタ205eは修正されたプリセット値205dに達すると0に戻り、Time_Pulseのタイミングが補正される。
この様子を示したのが図5のタイミングチャートである。図示例では、ターゲットノード200側のタイミングがN−4遅れているため、N−4のタイミングでプリセット値のタイミングが補正される。
As time synchronization is lost, T3-T1 and T2 take different values. When the
This is shown in the timing chart of FIG. In the illustrated example, since the timing on the
SpaceWireエンコード部105は、図6に示すように、データとNULL、Time−Codeを送るためのフローチャートに従ってSpaceWireのリンクレート2MHzの1クロックごとに処理が進むことになる。従来のTime−Codeを検出してTime_Pulseを発生させて同期を取る方法の場合、Time−Codeを送信するタイミングにデータあるいはNULL送信している場合はTime−Codeの送信処理は待たされることになる。データの送信途中の場合は最大10クロック、5000nsの待ち時間が発生する。一方で、NULL送信あるいはデータの送信が完了した直後にTime−Codeを送信する場合は待ち時間なしで送信が可能となる。従って、Time−Codeで時刻同期を行う場合の精度は5000nsとなる。
As shown in FIG. 6, the
一方、本実施の形態の場合、SpaceWireデコード部201でSpaceWireのデータとターゲットノード200のクロック50MHzでデータの非同期の受け渡しがあるためEOP検出時間に揺らぎが生じることになる。この揺らぎはターゲットノード200の50MHzのクロックが1クロック遅れる場合と遅れない場合の揺らぎで発生するため、20nsのゆらぎとなる。また、SpaceWireエンコード部105とイニシエータノード100でのEOPの非同期の受け渡しが生じる。SpaceWireエンコード部105がEOPを送出したタイミングをイニシエータノード100のクロック50MHzでサンプリングして検出するため20nsの揺らぎが発生する。従って本実施の形態の場合、40nsでの精度での時刻同期を実現する。このことから従来構成の5000nsの精度と比較して本実施の形態では40nsでの精度での時刻同期を実現し、125倍の精度での時刻同期を実現することになる。
On the other hand, in the case of the present embodiment, there is a fluctuation in the EOP detection time because the
なお、イニシエータノード100において、SpaceWireの状態遷移で一時的に時刻同期モードに遷移させてSpaceWireエンコード部105のNULL送信を止めるようにしてもよい。すなわち、本実施の形態が対象とする通信装置では、通信のモードとして、ユーザが送受信したいデータ(センサ取得データ等)を送信している状態(通常状態)と、時刻同期状態に分けられる。時刻同期状態は、一時的に時刻の同期を行うための状態で、ユーザが送信したいデータの送受信は中断される。ユーザにとっては、送受信データが送れないことで不便が生じるが、規定されているSpaceWireのプロトコル規格ECSS−E−ST−50−12Cの変更を行うことなく、またそれに対応した既存のSpaceWireの送受信用回路ロジックを修正することなく、時刻同期が行える。
Note that the
また、イニシエータノード100は、SpaceWireで規定されているデータフォーマット以外の、時刻同期を開始及び停止するためのコードを示すデータを送信し、また、ターゲットノード200側では、このデータをデコードして時刻同期を行うようにしてもよい。すなわち「SpaceWireで規定されているデータフォーマット以外のデータ」としてすでに規定されているControl CodesのNULL(8ビットデータ)、Time−Code(14ビットデータ)に加えて、新たな第3、第4のControl Codesとして、時刻同期を開始、停止するためのコード(例えば、時刻同期スタート用パリティ(1110101)、ストップ用パリティ(1110110))を加え、プロトコルに修正を加える。このControl CodesをSpaceWireデコード部201が受信するとデータデコード部202のSTART信号に相当する信号を出力することで時刻同期を開始する。また、停止コードをSpaceWireデコード部201が受信すると、データデコード部202のSTOP信号に相当する信号を出力する。
In addition, the
さらに、イニシエータノード100からEOPの送信時刻を複数回のTime−Codeで送信し、ターゲットノード200は、複数回のTime−Codeで受信したビット分の精度で時刻補正動作を行うようにしてもよい。
例えば、SpaceWire(規格ECSS−E−ST−50−12C)で規定されているTimce-Codeは1回の送信で8ビットで表現されるデータを送ることができる。ここで、1ビット分の時間を40nsとすると8ビットで256×40nsであるため最大時間ずれ10240nsまで精度40nsの補正が可能である。ここで、最大時間を犠牲にして1ビット分を10nsとすればより精度が高まるが、最大時間が2560nsのずれまでしか補正することができない。そこで、Time−Codeを2回送信すると16ビット分のデータが送れるため、10nsの精度で655360nsの最大時間ずれまでを補正することができる。
Further, the EOP transmission time may be transmitted from the
For example, the Time-Code defined by SpaceWire (standard ECSS-E-ST-50-12C) can send data represented by 8 bits in one transmission. Here, if the time for one bit is 40 ns, it is 256 × 40 ns for 8 bits, and therefore, it is possible to correct the accuracy to 40 ns up to the maximum time shift of 10240 ns. Here, if one bit is set to 10 ns at the expense of the maximum time, the accuracy is improved. However, the maximum time can be corrected only up to a deviation of 2560 ns. Therefore, when the Time-Code is transmitted twice, 16-bit data can be transmitted, so that the maximum time shift of 655360 ns can be corrected with an accuracy of 10 ns.
以上説明したように、実施の形態1の通信装置によれば、SpaceWireで接続されたイニシエータノードとターゲットノードからなる通信装置において、イニシエータノードは、SpaceWireパケットのエンコードを行ってターゲットノードに送信するSpaceWireエンコード部と、SpaceWireエンコード部のNULL送信を止めた後に同期データと同期データの送信時刻とをSpaceWireエンコード部に送信する同期データ送信部とを備え、ターゲットノードは、同期データの送信時刻と、同期データの自ターゲットノードにおける受信時刻と、ターゲットノードとイニシエータノードとが時刻同期している状態での送信時刻と受信時刻の差とを用いて、自ターゲットノードの時刻を補正する時刻補正部を備えたので、高精度な時刻同期を実現することができる。 As described above, according to the communication device of the first embodiment, in a communication device composed of an initiator node and a target node connected by SpaceWire, the initiator node encodes the SpaceWire packet and transmits it to the target node. An encoding unit, and a synchronization data transmitting unit that transmits the synchronization data and the transmission time of the synchronization data to the SpaceWire encoding unit after stopping the NULL transmission of the SpaceWire encoding unit. A time correction unit that corrects the time of the local target node using the reception time of the data at the local target node and the difference between the transmission time and the reception time when the target node and the initiator node are in time synchronization. So equipped, it is possible to realize highly accurate time synchronization.
また、実施の形態2の通信装置によれば、同期データとして、同期開始を示すヘッダと終端部であるEOP(End of Packet)とを含むSpaceWireパケットを用い、同期データ送信部は、EOPの送信時刻を通知すると共に、時刻補正部は、通知されたEOPの送信時刻と、EOPの受信時刻と、ターゲットノードとイニシエータノードとが時刻同期している状態での送信時刻と受信時刻との差とを用いて補正を行うようにしたので、SpaceWireのデータをそのままを使用することができ、また、特定のターゲットノードを選択して時刻同期を行うことができる。 Further, according to the communication apparatus of the second embodiment, the synchronization data transmission unit uses the SpaceWire packet including the header indicating the start of synchronization and the EOP (End of Packet) as the termination unit as the synchronization data, and the synchronization data transmission unit transmits the EOP. The time correction unit notifies the transmission time of the notified EOP, the reception time of the EOP, and the difference between the transmission time and the reception time when the target node and the initiator node are in time synchronization. Since the correction is performed by using the SpaceWire data, the SpaceWire data can be used as it is, and a specific target node can be selected to perform time synchronization.
また、実施の形態1の通信装置によれば、SpaceWireエンコード部は送信FIFOを備え、送信FIFOのデータに基づいてSpaceWireパケットのエンコードを行うと共に、同期データ送信部は、SpaceWireエンコード部に対して、送信FIFOをフル状態とするデータ量を送信することでNULL送信を止めるようにしたので、SpaceWireプロトコルの修正を必要とせずに、高精度な時刻同期を実現することができる。 Further, according to the communication device of the first embodiment, the SpaceWire encoding unit includes a transmission FIFO, encodes the SpaceWire packet based on the data of the transmission FIFO, and the synchronous data transmission unit performs the following operations on the SpaceWire encoding unit: Since the NULL transmission is stopped by transmitting the amount of data that makes the transmission FIFO full, it is possible to realize highly accurate time synchronization without the need to modify the SpaceWire protocol.
また、実施の形態1の通信装置によれば、同期データ送信部は、SpaceWireの状態遷移で一時的に時刻同期モードに遷移させてSpaceWireエンコード部のNULL送信を止めるようにしたので、既存のSpaceWireの送受信用回路ロジックを修正することなく時刻同期を行うことができる。 Also, according to the communication device of the first embodiment, the synchronous data transmission unit temporarily transits to the time synchronous mode by the state transition of SpaceWire and stops NULL transmission of the SpaceWire encoding unit, so the existing SpaceWire The time synchronization can be performed without correcting the transmission / reception circuit logic.
また、実施の形態1の通信装置によれば、同期データ送信部は、時刻同期動作を示すヘッダを付加したデータを送信し、時刻補正部は、データのヘッダをデコードすることで時刻同期動作を開始するようにしたので、余分なハードウェア信号線を付加することなくSpaceWireをそのまま使用することができる。 Further, according to the communication device of the first embodiment, the synchronization data transmission unit transmits data with a header indicating the time synchronization operation, and the time correction unit performs the time synchronization operation by decoding the data header. Since it is started, SpaceWire can be used as it is without adding an extra hardware signal line.
また、実施の形態1の通信装置によれば、同期データ送信部は、SpaceWireで規定されているデータフォーマット以外の、時刻同期動作を開始および停止するためのコードを示すデータを送信し、時刻補正部は、データをデコードして時刻同期動作を行うようにしたので、後段のユーザ機能のデータデコード部を不要とすることができる。 In addition, according to the communication device of the first embodiment, the synchronization data transmission unit transmits data indicating a code for starting and stopping the time synchronization operation other than the data format defined by SpaceWire, and time correction Since the unit decodes the data and performs the time synchronization operation, the data decoding unit of the user function at the subsequent stage can be omitted.
また、実施の形態1の通信装置によれば、同期データ送信部は、EOPの送信時刻を複数回のTime−Codeで送信し、時刻補正部は、複数回のTime−Codeで受信したビット分の精度で時刻補正動作を行うようにしたので、さらに高精度な時刻同期を実現することができる。 Further, according to the communication apparatus of the first embodiment, the synchronous data transmission unit transmits the EOP transmission time by a plurality of times of time-code, and the time correction unit receives the bits received by the plurality of times of time-code. Since the time correction operation is performed with the above accuracy, even more accurate time synchronization can be realized.
実施の形態2.
上記実施の形態1では、イニシエータノード100とターゲットノード200は、SpaceWire300によって1対1で接続されていたが、図7に示すようにイニシエータノード100とターゲットノード200がSpaceWireルータ500経由で接続されていてもよく、これを実施の形態2として以下説明する。なお、イニシエータノード100とターゲットノード200の内部構成については、実施の形態1と同様であるため、ここでの説明は省略する。
In the first embodiment, the
実施の形態2では、SpaceWireルータ500がSpaceWire300中に一つ挟まるためにTime−Code送信の揺らぎは1箇所増加することになる。
イニシエータノード100の発振器102a、ターゲットノード200の発振器205aおよびSpaceWire300の内部クロックが50MHzで、SpaceWire300のリンクレートが2MHzの場合、従来方法ではイニシエータノード100とSpaceWireルータ500間で実施の形態1で説明したように5000nsの揺らぎが生じる。さらに、SpaceWireルータ500とターゲットノード200間で再度5000nsの揺らぎが生じるため、合計10μsの揺らぎが生じることになる。
In the second embodiment, since one
When the internal clock of the
一方、本実施の形態では、イニシエータノード100とSpaceWireルータ500の間で40nsの揺らぎが発生し、さらにSpaceWireルータ500とターゲットノード200間で40nsの揺らぎが発生するため、合計80nsの揺らぎとなる。このように、SpaceWireルータ500を経由した場合においても、本実施の形態では従来方法に比べて125倍の精度での時刻同期精度を実現することができる。
On the other hand, in this embodiment, a 40 ns fluctuation occurs between the
実施の形態3.
上記実施の形態2では、一つのSpaceWireルータ500のみを経由して、イニシエータノード100とターゲットノード200を接続していた。これに対し、実施の形態3では、図8に示すように、カスケード接続した複数のSpaceWireルータ500−1〜500−mを備えたSpaceWireネットワーク301を介して複数のターゲットノード200−1〜200−nを接続する。なお、実施の形態3においても、イニシエータノード100とターゲットノード200−1〜200−nの内部構成については実施の形態1と同様である。
In the second embodiment, the
この場合、Time−Codeはブロードキャストされて全ターゲットノード200−1〜200−nに送信されるが、SpaceWireパケット400のヘッダ部に特定のターゲットノード向けのアドレスを付加することにより、特定のターゲットノードのみにSpaceWireパケット400を送ることもできる。すなわち、従来方法では全ターゲットノード一斉に同期を行うが本実施の形態では特定のターゲットノードだけを選択して同期動作を行うことができる。これにより、特に時刻精度が必要なターゲットノードの同期動作を行い、効率的な動作が実現できる。
In this case, the Time-Code is broadcast and transmitted to all the target nodes 200-1 to 200-n. By adding an address for a specific target node to the header part of the
以上説明したように、実施の形態3の通信装置によれば、イニシエータノードとターゲットノードとの間にSpaceWireルータを設け、ターゲットノードを複数備えたので、SpaceWireルータを使用した実際の使用に近いトポロジでも高精度な時刻同期を実現することができる。また、高精度な同期が必要なターゲットノードを選択して時刻同期を行うことができる。 As described above, according to the communication device of the third embodiment, the SpaceWire router is provided between the initiator node and the target node, and a plurality of target nodes are provided. Therefore, the topology close to the actual use using the SpaceWire router. However, highly accurate time synchronization can be realized. In addition, time synchronization can be performed by selecting a target node that requires highly accurate synchronization.
実施の形態4.
実施の形態3では、SpaceWireルータを複数用いてツリー型のネットワークトポロジーを構成したが、実施の形態4では、図9に示すようにSpaceWireルータ500−1〜500−nをリング状に接続にしたSpaceWireネットワーク302を構成する。また、図示のように、ターゲットノード200−1〜200−mを複数接続してもよい。なお、ターゲットノード200−1〜200−mのそれぞれは、実施の形態1のターゲットノード200と同様である。
In the third embodiment, a tree-type network topology is configured using a plurality of SpaceWire routers. However, in the fourth embodiment, the SpaceWire routers 500-1 to 500-n are connected in a ring shape as shown in FIG. A
このようなトポロジにおいて、イニシエータノード100は2つのSpaceWireインタフェースを有することができる。このため、一つのSpaceWireインタフェースが故障した場合でも、もう一方のSpaceWireインタフェースから時刻同期を行うことができる。
In such a topology, the
以上説明したように、実施の形態4の通信装置によれば、SpaceWireルータは、リング型のトポロジで構成された複数のSpaceWireルータからなるようにしたので、イニシエータノードの1つのSpaceWireインタフェースが故障しても、もう一方のSpaceWireインタフェースを利用して同期を行うことができる。 As described above, according to the communication device of the fourth embodiment, the SpaceWire router is composed of a plurality of SpaceWire routers configured in a ring type topology, so that one SpaceWire interface of the initiator node fails. However, synchronization can be performed using the other SpaceWire interface.
なお、本願発明はその発明の範囲内において、各実施の形態の自由な組み合わせ、あるいは各実施の形態の任意の構成要素の変形、もしくは各実施の形態において任意の構成要素の省略が可能である。 In the present invention, within the scope of the invention, any combination of the embodiments, or any modification of any component in each embodiment, or omission of any component in each embodiment is possible. .
100 イニシエータノード、101 データ送信部、102 時刻発生部、102a 発振器、102b 時刻カウンタ、103 同期開始データ送信部、103a 計測カウンタ部、103b 開始データ送信部、104 Time−Code送信部、105 SpaceWireエンコード部、105a 送信FIFO、105b シリアル化送信部、200,200−1〜200−n ターゲットノード、201 SpaceWireデコード部、201a パラレル化受信部、201b 受信FIFO、202 データデコード部、203 データ受信部、204 リセット部、205 時刻生成部、205a 発振器、205b 計測カウンタ部、205c 遅れ補正部、205d プリセット値、205e 時刻カウンタ、206 処理回路部、300 SpaceWire、301,302 SpaceWireネットワーク、400 SpaceWireパケット、400a ヘッダ、400b データ部、400c 終端部(EOP)、500,500−1〜500−n SpaceWireルータ。
DESCRIPTION OF
Claims (9)
前記イニシエータノードは、SpaceWireパケットのエンコードを行って前記ターゲットノードに送信するSpaceWireエンコード部と、当該SpaceWireエンコード部のNULL送信を止めた後に同期データと当該同期データの送信時刻とを前記SpaceWireエンコード部に送信する同期データ送信部とを備え、
前記ターゲットノードは、前記同期データの送信時刻と、前記同期データの自ターゲットノードにおける受信時刻と、前記ターゲットノードと前記イニシエータノードとが時刻同期している状態での送信時刻と受信時刻の差とを用いて、前記自ターゲットノードの時刻を補正する時刻補正部を備えたことを特徴とする通信装置。 In a communication device composed of an initiator node and a target node connected by SpaceWire,
The initiator node encodes a SpaceWire packet and transmits it to the target node, and after stopping the NULL transmission of the SpaceWire encoder, the synchronization data and the transmission time of the synchronous data are sent to the SpaceWire encoder. A synchronous data transmission unit for transmitting,
The target node includes a transmission time of the synchronization data, a reception time of the synchronization data at its target node, and a difference between the transmission time and the reception time when the target node and the initiator node are in time synchronization. And a time correction unit that corrects the time of the target node.
前記同期データ送信部は、前記EOPの送信時刻を通知すると共に、前記時刻補正部は、前記通知された前記EOPの送信時刻と、前記EOPの受信時刻と、前記ターゲットノードと前記イニシエータノードとが時刻同期している状態での送信時刻と受信時刻との差とを用いて補正を行うことを特徴とする請求項1記載の通信装置。 As the synchronization data, a SpaceWire packet including a header indicating the start of synchronization and an EOP (End of Packet) which is a terminal portion is used.
The synchronous data transmission unit notifies the transmission time of the EOP, and the time correction unit determines whether the notified transmission time of the EOP, reception time of the EOP, the target node, and the initiator node. The communication apparatus according to claim 1, wherein correction is performed using a difference between a transmission time and a reception time in a time synchronization state.
前記同期データ送信部は、前記SpaceWireエンコード部に対して、前記送信FIFOをフル状態とするデータ量を送信することでNULL送信を止めることを特徴とする請求項1または請求項2記載の通信装置。 The SpaceWire encoding unit includes a transmission FIFO, encodes a SpaceWire packet based on the data of the transmission FIFO,
3. The communication apparatus according to claim 1, wherein the synchronous data transmission unit stops NULL transmission by transmitting a data amount that makes the transmission FIFO full to the SpaceWire encoding unit. .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014076301A JP2015198399A (en) | 2014-04-02 | 2014-04-02 | communication device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014076301A JP2015198399A (en) | 2014-04-02 | 2014-04-02 | communication device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2015198399A true JP2015198399A (en) | 2015-11-09 |
Family
ID=54547848
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014076301A Pending JP2015198399A (en) | 2014-04-02 | 2014-04-02 | communication device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2015198399A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111740800A (en) * | 2020-07-30 | 2020-10-02 | 浙江工商大学 | Multi-precision clock synchronization method based on SDN framework 5G intelligent node |
WO2021049354A1 (en) * | 2019-09-13 | 2021-03-18 | ソニーセミコンダクタソリューションズ株式会社 | Communication device, communication method, and program |
-
2014
- 2014-04-02 JP JP2014076301A patent/JP2015198399A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021049354A1 (en) * | 2019-09-13 | 2021-03-18 | ソニーセミコンダクタソリューションズ株式会社 | Communication device, communication method, and program |
CN111740800A (en) * | 2020-07-30 | 2020-10-02 | 浙江工商大学 | Multi-precision clock synchronization method based on SDN framework 5G intelligent node |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10887211B2 (en) | Indirect packet classification timestamping system and method | |
US7620075B2 (en) | Serial communication system with baud rate generator | |
US9300421B2 (en) | Methods to achieve accurate time stamp in IEEE 1588 for system with FEC encoder | |
KR102031268B1 (en) | Method and apparatus for communicating time information between time-aware devices | |
JP4652261B2 (en) | Parallel conversion circuit | |
CN109699199B (en) | Message processing method and network equipment | |
US8842793B2 (en) | Communication circuit and method of adjusting sampling clock signal | |
CN105393500B (en) | Cyclic annular synchronous network system and time slave station | |
CN103929293A (en) | Asymmetrically-delayed time synchronization method and system | |
JP6351889B1 (en) | Communication system and slave device | |
JP2009182659A (en) | Timing synchronizing method, synchronization device, synchronization system, and synchronization program | |
JP2007282093A (en) | Apparatus and method for clock signal generation | |
WO2023109147A1 (en) | Timestamp pulse synchronization method and apparatus, and electronic device and storage medium | |
CN101719858B (en) | Synchronous processing method of bit timing of control area network (CAN) controller | |
JP4582932B2 (en) | Synchronous correction circuit | |
JP2015198399A (en) | communication device | |
JP6205152B2 (en) | Serial communication system, receiving apparatus and serial communication method | |
JP2011045076A (en) | System and method for detection of multiple timing masters in network | |
CN112640355B (en) | MAC device and time point estimation method | |
JP4841927B2 (en) | Asynchronous transmission device and asynchronous transmission method | |
JP3557801B2 (en) | Sampling synchronization method in PCM relay | |
JP7186741B2 (en) | data sending device | |
JP4879846B2 (en) | FRAME SYNCHRONIZATION DATA TRANSFER METHOD, TRANSMITTER DEVICE AND RECEPTION DEVICE | |
KR102225619B1 (en) | High-speed serial data receiving apparatus | |
JP6607591B2 (en) | Phase information transfer system, phase information transmitter, phase information receiver, phase information transfer method, and program |