JP2015198399A - communication device - Google Patents

communication device Download PDF

Info

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
Application number
JP2014076301A
Other languages
Japanese (ja)
Inventor
佐々木 通
Toru Sasaki
通 佐々木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2014076301A priority Critical patent/JP2015198399A/en
Publication of JP2015198399A publication Critical patent/JP2015198399A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a communication device capable of achieving highly accurate time synchronization.SOLUTION: An initiator node 100 comprises a synchronization data transmission unit that transmits synchronization data and transmission time of the synchronization data to a Space Wire encoding unit 105 after stopping null transmission by the Space Wire encoding unit 105. A target node 200 comprises a time correction unit that corrects time of the target node 200 using the transmission time of the synchronization data, reception time of the synchronization data, and difference between transmission time and reception time in the state of the initiator node 100 synchronizing the target node 200 in terms of time.

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 Document 1, a SpaceWire communication standard is defined, and from the physical layer to the network layer in the OSI reference model is determined as SpaceWire. SpaceWire is a full-duplex serial communication system, and transmits EOP (End of Packet), Time-Code, and NULL for maintaining a communication link, indicating the end of data in addition to normal data. Time-Code is data for the transmission side to send data to the target device on the network by broadcast. Since it cannot be put into the FIFO in each communication interface, it can be transmitted with a small delay time. Therefore, it is effective to use for time distribution, but the usage method is not defined by the standard.

衛星内の観測装置がある自然現象や時間を記録しておくために各観測装置は時計を持つ必要がある。また、人工衛星内を制御する装置は衛星の状態変化を記録しておく時計を持つ必要がある。この時計は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 Document 2 shows how much delay occurs in the Time-Code when a device is connected via a router, and shows the cause of the analysis.

特開2012−39349号公報JP 2012-39349 A

SpaceWire規格書“ECSS−E−ST−50−12C”SpaceWire standard "ECSS-E-ST-50-12C" M.Suess(2013),“SpaceWire Time−Code Latency and Jitter”,European Space Agency ESTEC, International SpaceWire Conference 2013M.M. Suses (2013), “SpaceWire Time-Code Latency and Jitter”, European Space Agency ESTEC, International SpaceWire Conference 2013

しかしながら、特許文献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 Patent Document 1, a pulse is generated at the timing when the Time-Code is received to obtain the time synchronization timing, so that there is a problem that highly accurate time synchronization cannot be realized. there were. The reason is that when Time-Code is transmitted in a network on SpaceWire, there is a characteristic that fluctuation occurs probabilistically every time it is transmitted. This Time-Code fluctuation is caused by the protocol definition of SpaceWire and cannot be reduced.
In the configuration shown in FIG. 2, the SpaceWire encoding unit 105 and the SpaceWire decoding unit 201 perform serial communication, but the operation after the initialization of the SpaceWire data link performs communication by state transition as shown in FIG. The configuration in FIG. 2 will be described in Embodiment 1.

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 transmission FIFO 105a (step ST2: NO) or when there is no time-code transmission request (step ST1: NO). NULL requires 8 clocks to transmit 8 bits one clock at a time with 8 bits of data. During this NULL transmission, Time-Code and data cannot be transmitted. That is, when a Time-Code transmission request is made, the transmission waits from 0 clock to 8 clocks. The number of clocks to wait for is a uniform probability distribution. This waiting time causes fluctuations in Time-Code transmission. Further, when the devices are connected via one router, the number of SpaceWire encoding units is increased by one, so that two fluctuations are superimposed. As the number of routers increases, fluctuations overlap and become larger.

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による通信装置を示す構成図である。It is a block diagram which shows the communication apparatus by Embodiment 1 of this invention. この発明の実施の形態1による通信装置のSpaceWireエンコード部とSpaceWireデコード部の詳細を示す構成図である。It is a block diagram which shows the detail of the SpaceWire encoding part and SpaceWire decoding part of the communication apparatus by Embodiment 1 of this invention. この発明の実施の形態1による通信装置のSpaceWireパケットのフォーマットを示す説明図である。It is explanatory drawing which shows the format of the SpaceWire packet of the communication apparatus by Embodiment 1 of this invention. この発明の実施の形態1による通信装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the communication apparatus by Embodiment 1 of this invention. この発明の実施の形態1による通信装置のイニシエータノードとターゲットノードの時刻タイミングを示すタイミングチャートである。It is a timing chart which shows the time timing of the initiator node of the communication apparatus by Embodiment 1 of this invention, and a target node. この発明の実施の形態1による通信装置のTime−CodeとデータとNULLの送信処理を示す説明図である。It is explanatory drawing which shows the transmission process of Time-Code of the communication apparatus by Embodiment 1 of this invention, data, and NULL. この発明の実施の形態2による通信装置を示す構成図である。It is a block diagram which shows the communication apparatus by Embodiment 2 of this invention. この発明の実施の形態3による通信装置を示す構成図である。It is a block diagram which shows the communication apparatus by Embodiment 3 of this invention. この発明の実施の形態4による通信装置を示す構成図である。It is a block diagram which shows the communication apparatus by Embodiment 4 of this invention.

実施の形態1.
図1は、この発明の実施の形態1による通信装置を示す構成図である。
図1に示す通信装置は、イニシエータノード100とターゲットノード200がSpaceWire300で接続され、通信を行う。イニシエータノード100は、時刻を管理する主系機器であり、ターゲットノード200は、イニシエータノード100によって時刻管理される従系機器である。
Embodiment 1 FIG.
1 is a block diagram showing a communication apparatus according to Embodiment 1 of the present invention.
In the communication apparatus shown in FIG. 1, an initiator node 100 and a target node 200 are connected by a SpaceWire 300 to perform communication. The initiator node 100 is a master device that manages time, and the target node 200 is a slave device that is time-managed by the initiator node 100.

イニシエータノード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 initiator node 100 includes a data transmission unit 101, a time generation unit 102, a synchronization start data transmission unit 103, a Time-Code transmission unit 104, and a SpaceWire encoding unit 105. The data transmission unit 101 is a processing unit that performs data transmission to the target node 200 as the initiator node 100. The time generation unit 102 is a processing unit that generates time data in the initiator node 100, and includes an oscillator 102a and a time counter 102b. The oscillator 102a is an oscillator that generates data of a predetermined frequency, and the time counter 102b is a counter that counts the transmission frequency from the oscillator 102a and outputs it as a clock. The synchronization start data transmission unit 103 is a processing unit that transmits synchronization start data for performing time synchronization with the target node 200, and includes a measurement counter unit 103a and a start data transmission unit 103b. The measurement counter unit 103a is a counter for counting the count value from the time generation unit 102 and detecting the transmission time of the synchronization data EOP, and the start data transmission unit 103b outputs the count value of the measurement counter unit 103a. Is a processing unit. The Time-Code transmission unit 104 is a processing unit that transmits the time of the time generation unit 102 and the synchronization data from the start data transmission unit 103b as Time-Code. The SpaceWire encoding unit 105 is a processing unit that encodes serial data as SpaceWire. The internal configuration of the SpaceWire encoding unit 105 will be described later. In addition, the data transmission unit 101 to the Time-Code transmission unit 104 constitute a synchronization data transmission unit that transmits the synchronization data and the transmission time of the synchronization data to the SpaceWire encoding unit 105 after the NULL transmission of the SpaceWire encoding unit 105 is stopped. ing.

ターゲットノード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 target node 200 includes a SpaceWire decoding unit 201, a data decoding unit 202, a data receiving unit 203, a reset unit 204, a time generation unit 205, and a processing circuit unit 206. The SpaceWire decoding unit 201 is a processing unit that decodes a SpaceWire packet received from the initiator node 100 via the SpaceWire 300, and details thereof will be described later. The data decoding unit 202 is a processing unit that determines the start and end of the time synchronization operation based on the data decoded by the SpaceWire decoding unit 201. The data receiving unit 203 is a processing unit that receives data from the SpaceWire decoding unit 201 based on the STOP signal and the START signal from the data decoding unit 202. The reset unit 204 is a processing unit that waits for EOP based on the STOP signal from the data decoding unit 202 and sends this information to the time generation unit 205 when EOP is output from the SpaceWire decoding unit 201.

時刻生成部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 time generation unit 205 is a processing unit that generates time in the target node 200, and includes an oscillator 205a, a measurement counter unit 205b, a delay correction unit 205c, a preset value 205d, and a time counter 205e. Here, the oscillator 205a and the time counter 205e are processing units for generating the time at the target node 200, similarly to the oscillator 102a and the time counter 102b in the time generation unit 102 of the initiator node 100. The measurement counter unit 205b is a counter for counting the EOP reception time based on the START signal from the reset unit 204 and the STOP signal from the time counter 205e. The delay correction unit 205c receives the EOP reception time counted by the measurement counter unit 205b, the difference between the transmission time and the reception time when the initiator node 100 and the target node 200 are time-synchronized. The processing unit calculates a delay correction value based on the EOP transmission time in the initiator node 100 received by the data receiving unit 203. The preset value 205d is a preset value when the time counter 205e counts, and is a value corrected by the delay correction unit 205c. The data decoding unit 202 to the time generation unit 205 constitute a time correction unit that corrects the time of the target node 200.
The processing circuit unit 206 is a circuit that performs various processes in the target node 200.

図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 SpaceWire encoding unit 105 and the SpaceWire decoding unit 201. As illustrated, the SpaceWire encoding unit 105 includes a transmission FIFO 105a and a serialized transmission unit 105b. The transmission FIFO 105a is a first-in first-out memory that temporarily stores and transmits data. The serialization transmission unit 105b is a processing unit that serializes data from the Time-Code or the transmission FIFO 105a and outputs the data to the SpaceWire 300. The SpaceWire decoding unit 201 includes a parallelization reception unit 201a and a reception FIFO 201b. The parallel receiving unit 201a is a processing unit that outputs a serial packet from the SpaceWire 300 as parallel data, and the reception FIFO 201b is a first-in first-out memory that temporarily stores received data.

次に、実施の形態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 data transmission unit 101 sends DATA while monitoring the FULL signal of the SpaceWire encoding unit 105. Send EOP to the end of DATA. The SpaceWire encoding unit 105 converts the received 8-bit data into serial data, generates a signal according to the SpaceWire standard, and sends the signal to the target node 200. The SpaceWire decoding unit 201 of the target node 200 converts the serial data into parallel data by the parallelization receiving unit 201a, accumulates it in the reception FIFO 201b, and waits for the data receiving unit 203 to receive it. The data receiving unit 203 monitors the EMPTY signal from the SpaceWire decoding unit 201. When the EMPTY signal is deasserted, the data receiving unit 203 recognizes that data can be received and receives data from the SpaceWire decoding unit 201.

イニシエータノード100の持つ時刻発生部102における時刻カウンタ102bが基準となる時刻を示し、ターゲットノード200の持つ時刻生成部205の時刻カウンタ205eは、当初はイニシエータノード100の時刻カウンタ102bと同期して動作する。時刻カウンタ205eは50MHzの発振器205aの発生するクロックによりカウントアップし、プリセット値205dに設定された値に達すると、Time_Pulseを発生させリセットされる。Time_Pulseは、処理回路部206をスケジュールに従って駆動するためのタイミング信号として使用される。時間が経過すると、50MHzの発振器102aと50MHzの発振器205aの固有差によりずれが生じていく。本実施の形態ではこのずれを補正する。   The time counter 102b in the time generation unit 102 of the initiator node 100 indicates a reference time, and the time counter 205e of the time generation unit 205 of the target node 200 initially operates in synchronization with the time counter 102b of the initiator node 100. To do. The time counter 205e is counted up by the clock generated by the 50 MHz oscillator 205a, and when the value set in the preset value 205d is reached, Time_Pulse is generated and reset. Time_Pulse is used as a timing signal for driving the processing circuit unit 206 according to the schedule. When time elapses, a deviation occurs due to the inherent difference between the 50 MHz oscillator 102a and the 50 MHz oscillator 205a. In this embodiment, this deviation is corrected.

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 initiator node 100 that operates based on the 50 MHz oscillator 102a and the target node 200 that also operates based on the 50 MHz oscillator 205a are connected by a 2 MHz SpaceWire 300, the initiator node 100 The time reference signal Time_Pulse and the time reference signal Time_Pulse of the target node 200 are matched. The frequency of the oscillator 102a and the oscillator 205a of the initiator node 100 and the target node 200 uses a device of 50 MHz. However, the time counter 102b and the time counter 205e are different from each other due to manufacturing variations and temperature changes. It will shift. Therefore, in order to make Time_Pulse the same timing again, the initiator node 100 transmits a SpaceWire packet 400 having a header 400a indicating the start of the synchronization operation to the target node 200. FIG. 3 shows the format of the SpaceWire packet 400. As illustrated, the SpaceWire packet 400 includes a header 400a, a data part 400b, and an end part (EOP) 400c.

また、図4はイニシエータノード100とターゲットノード200の動作を示す説明図である。図4では、ステップST11で、イニシエータノード100から同期開始ヘッダ付きデータが送信されている。   FIG. 4 is an explanatory diagram showing operations of the initiator node 100 and the target node 200. In FIG. 4, data with a synchronization start header is transmitted from the initiator node 100 in step ST11.

ターゲットノード200は当該データを受信後、データデコード部202でそのヘッダをデコードして同期動作が開始したことを認識する。同期動作の開始にあたり、データ受信部203に対してSTOP信号を出力し、以降のデータを受信しないようにする(ステップST21)。つまりSpaceWireデコード部201のEMPTY信号が非有効になってデータが取得可能な状態になってもデータを取得しないようにする(ステップST22)。また、リセット部204にもSTOP信号を出力して当該データのSpaceWireパケットの終端部のEOP検出待ちを行うようにする(ステップST23)。   After receiving the data, the target node 200 recognizes that the data decoding unit 202 decodes the header and starts the synchronization operation. At the start of the synchronization operation, a STOP signal is output to the data receiving unit 203 so that subsequent data is not received (step ST21). That is, data is not acquired even when the EMPTY signal of the SpaceWire decoding unit 201 becomes invalid and data can be acquired (step ST22). Further, the STOP signal is also output to the reset unit 204 to wait for EOP detection at the end of the SpaceWire packet of the data (step ST23).

このようにした状態でイニシエータノード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 initiator node 100, the data transmission unit 101 continues to transmit the SpaceWire packet 400 to the SpaceWire encoding unit 105 (step ST12). When the FIFOs of the SpaceWire encoding unit 105 and the SpaceWire decoding unit 201 become full, the SpaceWire encoding unit 105 of the initiator node 100 outputs a FULL signal to the data transmission unit 101. As a result, the data transmission unit 101 stops data transmission and sets the next transmission data as EOP (step ST13).

次に、イニシエータノード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 initiator node 100 transmits 0xFF as the Time-Code to the target node 200 (step ST14).
When the target node 200 receives 0xFF as Time-Code, the data decoding unit 202 transmits a START signal to the data receiving unit 203. When receiving the START signal, the data receiving unit 203 continues to receive data from the SpaceWire decoding unit 201 (step ST24). The data reception unit 203 continues to receive data at a sufficiently high speed so that the reception FIFO 201b of the SpaceWire decoding unit 201 including a SpaceWire router (not shown) on the SpaceWire 300 is not full.

イニシエータノード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 initiator node 100 transmits the data of the termination unit (EOP) 400c when the FULL signal of the transmission FIFO 105a is deasserted. The synchronization start data transmission unit 103 of the initiator node 100 measures the EOP transmission time T1 using the Time_Pulse from the time generation unit 102 as a START signal (step ST15). On the other hand, the time generation unit 205 of the target node 200 starts the Time_Pulse generated by the time counter 205e, and measures the EOP reception time T3 based on the EOP received by the reset unit 204 (step ST25). T3-T1 in a state where the Time_Pulse of the initiator node 100 and the target node 200 at the initial stage when the apparatus is configured is set as T2. T2 is used as a fixed value.

時刻同期が外れていくと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 oscillator 205a on the target node 200 side is delayed, T3−T1 <T2, and when the oscillator 205a on the target node 200 side is fast, T3−T1> T2. The initiator node 100 transmits the value of T1 to the target node 200 by Time-Code (step ST16), and on the target node 200 side, the delay correction unit 205c calculates (T3-T1) -T2, and the result is a preset value. It is added only once to 205d (step ST26). When the time counter 205e reaches the corrected preset value 205d, it returns to 0, and the timing of Time_Pulse is corrected.
This is shown in the timing chart of FIG. In the illustrated example, since the timing on the target node 200 side is delayed by N-4, the timing of the preset value is corrected at the timing of N-4.

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 encoding unit 105 proceeds with processing for each clock of a SpaceWire link rate of 2 MHz according to a flowchart for sending data, NULL, and Time-Code. In the conventional method of detecting Time-Code and generating Time_Pulse to synchronize, if data or NULL transmission is performed at the time of transmitting Time-Code, the transmission processing of Time-Code is awaited. . In the middle of data transmission, a maximum waiting time of 10 clocks and 5000 ns occurs. On the other hand, when the Time-Code is transmitted immediately after the NULL transmission or the data transmission is completed, the transmission can be performed without waiting time. Therefore, the accuracy when time synchronization is performed with Time-Code is 5000 ns.

一方、本実施の形態の場合、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 SpaceWire decoding unit 201 asynchronously exchanges the data of SpaceWire and the data of the target node 200 with a clock of 50 MHz. This fluctuation is caused by fluctuation when the 50 MHz clock of the target node 200 is delayed by one clock and when it is not delayed, and therefore, fluctuation is 20 ns. In addition, asynchronous delivery of EOP between the SpaceWire encoding unit 105 and the initiator node 100 occurs. Since the timing at which the SpaceWire encoding unit 105 sends EOP is detected by sampling with the clock 50 MHz of the initiator node 100, a fluctuation of 20 ns occurs. Therefore, in the case of the present embodiment, time synchronization with an accuracy of 40 ns is realized. Therefore, compared with the accuracy of 5000 ns of the conventional configuration, the present embodiment realizes time synchronization with accuracy of 40 ns and realizes time synchronization with 125 times accuracy.

なお、イニシエータノード100において、SpaceWireの状態遷移で一時的に時刻同期モードに遷移させてSpaceWireエンコード部105のNULL送信を止めるようにしてもよい。すなわち、本実施の形態が対象とする通信装置では、通信のモードとして、ユーザが送受信したいデータ(センサ取得データ等)を送信している状態(通常状態)と、時刻同期状態に分けられる。時刻同期状態は、一時的に時刻の同期を行うための状態で、ユーザが送信したいデータの送受信は中断される。ユーザにとっては、送受信データが送れないことで不便が生じるが、規定されているSpaceWireのプロトコル規格ECSS−E−ST−50−12Cの変更を行うことなく、またそれに対応した既存のSpaceWireの送受信用回路ロジックを修正することなく、時刻同期が行える。   Note that the initiator node 100 may temporarily transition to the time synchronization mode by the SpaceWire state transition, and stop the NULL transmission of the SpaceWire encoding unit 105. That is, in the communication device targeted by the present embodiment, the communication mode can be divided into a state (normal state) in which the user wants to transmit and receive data (sensor acquisition data and the like) and a time synchronization state. The time synchronization state is a state for temporarily synchronizing time, and transmission / reception of data that the user wants to transmit is interrupted. For the user, inconvenience is caused by not being able to send transmission / reception data, but without changing the specified SpaceWire protocol standard ECSS-E-ST-50-12C and for transmission / reception of the existing SpaceWire corresponding thereto Time synchronization can be performed without correcting the circuit logic.

また、イニシエータノード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 initiator node 100 transmits data indicating a code for starting and stopping time synchronization other than the data format defined by SpaceWire, and the target node 200 side decodes this data to generate a time You may make it synchronize. That is, in addition to NULL (8-bit data) and Time-Code (14-bit data) of Control Codes already defined as “data other than the data format specified by SpaceWire”, the third, fourth new As Control Codes, codes for starting and stopping time synchronization (for example, time synchronization start parity (1110101) and stop parity (1110110)) are added, and the protocol is modified. When the SpaceWire decoding unit 201 receives this Control Codes, it outputs a signal corresponding to the START signal of the data decoding unit 202 to start time synchronization. In addition, when the SpaceWire decoding unit 201 receives the stop code, it outputs a signal corresponding to the STOP signal of the data decoding unit 202.

さらに、イニシエータノード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 initiator node 100 by a plurality of times-codes, and the target node 200 may perform the time correction operation with the accuracy of the bits received by the plurality of times-codes. .
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と同様であるため、ここでの説明は省略する。
Embodiment 2. FIG.
In the first embodiment, the initiator node 100 and the target node 200 are connected one-to-one by the SpaceWire 300, but the initiator node 100 and the target node 200 are connected via the SpaceWire router 500 as shown in FIG. This will be described below as a second embodiment. Note that the internal configurations of the initiator node 100 and the target node 200 are the same as those in the first embodiment, and a description thereof will be omitted here.

実施の形態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 SpaceWire router 500 is sandwiched in the SpaceWire 300, the fluctuation of Time-Code transmission increases by one place.
When the internal clock of the oscillator 102a of the initiator node 100, the oscillator 205a of the target node 200 and the SpaceWire 300 is 50 MHz, and the link rate of the SpaceWire 300 is 2 MHz, the conventional method has been described in Embodiment 1 between the initiator node 100 and the SpaceWire router 500. Thus, a fluctuation of 5000 ns occurs. Further, since a fluctuation of 5000 ns occurs again between the SpaceWire router 500 and the target node 200, a total fluctuation of 10 μs occurs.

一方、本実施の形態では、イニシエータノード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 initiator node 100 and the SpaceWire router 500, and a 40 ns fluctuation occurs between the SpaceWire router 500 and the target node 200, resulting in a total fluctuation of 80 ns. As described above, even in the case of passing through the SpaceWire router 500, in this embodiment, it is possible to realize time synchronization accuracy with 125 times higher accuracy than the conventional method.

実施の形態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と同様である。
Embodiment 3 FIG.
In the second embodiment, the initiator node 100 and the target node 200 are connected via only one SpaceWire router 500. In contrast, in the third embodiment, as shown in FIG. 8, a plurality of target nodes 200-1 to 200- are connected via a SpaceWire network 301 including a plurality of cascade-connected SpaceWire routers 500-1 to 500-m. n is connected. In the third embodiment, the internal configurations of the initiator node 100 and the target nodes 200-1 to 200-n are the same as those in the first embodiment.

この場合、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 SpaceWire packet 400, the specific target node is transmitted. Only the SpaceWire packet 400 can be sent. In other words, in the conventional method, all target nodes are synchronized all at once, but in this embodiment, only a specific target node can be selected to perform the synchronization operation. As a result, the synchronization operation of the target node that requires time accuracy in particular can be performed, and an efficient operation can be realized.

以上説明したように、実施の形態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と同様である。
Embodiment 4 FIG.
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 SpaceWire network 302 is configured. Further, as illustrated, a plurality of target nodes 200-1 to 200-m may be connected. Each of the target nodes 200-1 to 200-m is the same as the target node 200 of the first embodiment.

このようなトポロジにおいて、イニシエータノード100は2つのSpaceWireインタフェースを有することができる。このため、一つのSpaceWireインタフェースが故障した場合でも、もう一方のSpaceWireインタフェースから時刻同期を行うことができる。   In such a topology, the initiator node 100 can have two SpaceWire interfaces. For this reason, even if one SpaceWire interface fails, time synchronization can be performed from the other SpaceWire interface.

以上説明したように、実施の形態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 SYMBOLS 100 Initiator node, 101 Data transmission part, 102 Time generation part, 102a Oscillator, 102b Time counter, 103 Synchronization start data transmission part, 103a Measurement counter part, 103b Start data transmission part, 104 Time-Code transmission part, 105 SpaceWire encoding part , 105a transmission FIFO, 105b serialization transmission unit, 200, 200-1 to 200-n target node, 201 SpaceWire decoding unit, 201a parallelization reception unit, 201b reception FIFO, 202 data decoding unit, 203 data reception unit, 204 reset 205, time generation unit, 205a oscillator, 205b measurement counter unit, 205c delay correction unit, 205d preset value, 205e time counter, 206 processing circuit unit, 300 SpaceWire, 301,302 SpaceWire network, 400 SpaceWire packet, 400a header, 400b data part, 400c termination part (EOP), 500, 500-1 to 500-n SpaceWire router.

Claims (9)

SpaceWireで接続されたイニシエータノードとターゲットノードからなる通信装置において、
前記イニシエータノードは、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(End of Packet)とを含むSpaceWireパケットを用い、
前記同期データ送信部は、前記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を備え、当該送信FIFOのデータに基づいてSpaceWireパケットのエンコードを行うと共に、
前記同期データ送信部は、前記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. .
前記同期データ送信部は、SpaceWireの状態遷移で一時的に時刻同期モードに遷移させて前記SpaceWireエンコード部のNULL送信を止めることを特徴とする請求項1または請求項2記載の通信装置。   3. The communication apparatus according to claim 1, wherein the synchronization data transmission unit temporarily transitions to a time synchronization mode by a state transition of SpaceWire and stops NULL transmission of the SpaceWire encoding unit. 前記同期データ送信部は、時刻同期動作を示すヘッダを付加したデータを送信し、前記時刻補正部は、前記データのヘッダをデコードすることで時刻同期動作を開始すること特徴とする請求項1から請求項4のうちのいずれか1項記載の通信装置。   The synchronization data transmission unit transmits data with a header indicating a time synchronization operation, and the time correction unit starts a time synchronization operation by decoding the header of the data. The communication apparatus according to claim 4. 前記同期データ送信部は、SpaceWireで規定されているデータフォーマット以外の、時刻同期動作を開始および停止するためのコードを示すデータを送信し、前記時刻補正部は、当該データをデコードして時刻同期動作を行うことを特徴とする請求項1記載の通信装置。   The synchronous data transmission unit transmits data indicating a code for starting and stopping a time synchronization operation other than the data format defined by SpaceWire, and the time correction unit decodes the data to perform time synchronization. The communication apparatus according to claim 1, wherein the communication apparatus performs an operation. 前記同期データ送信部は、前記EOPの送信時刻を複数回のTime−Codeで送信し、前記時刻補正部は、当該複数回のTime−Codeで受信したビット分の精度で時刻補正動作を行うことを特徴とする請求項2記載の通信装置。   The synchronous data transmission unit transmits the transmission time of the EOP by a plurality of times of time-code, and the time correction unit performs a time correction operation with the accuracy of bits received by the plurality of times of time-codes. The communication device according to claim 2. 前記イニシエータノードと前記ターゲットノードとの間にSpaceWireルータを設け、前記ターゲットノードを複数備えたことを特徴とする請求項1から請求項7のうちのいずれか1項記載の通信装置。   8. The communication apparatus according to claim 1, wherein a SpaceWire router is provided between the initiator node and the target node, and a plurality of the target nodes are provided. 9. 前記SpaceWireルータは、リング型のトポロジで構成された複数のSpaceWireルータからなることを特徴とする請求項8記載の通信装置。   9. The communication apparatus according to claim 8, wherein the SpaceWire router includes a plurality of SpaceWire routers configured in a ring topology.
JP2014076301A 2014-04-02 2014-04-02 communication device Pending JP2015198399A (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (2)

* Cited by examiner, † Cited by third party
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