TWM628940U - Master device and slave device - Google Patents

Master device and slave device Download PDF

Info

Publication number
TWM628940U
TWM628940U TW110213458U TW110213458U TWM628940U TW M628940 U TWM628940 U TW M628940U TW 110213458 U TW110213458 U TW 110213458U TW 110213458 U TW110213458 U TW 110213458U TW M628940 U TWM628940 U TW M628940U
Authority
TW
Taiwan
Prior art keywords
time
period
signal
time point
day
Prior art date
Application number
TW110213458U
Other languages
Chinese (zh)
Inventor
王育民
張智維
Original Assignee
優達科技股份有限公司
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 優達科技股份有限公司 filed Critical 優達科技股份有限公司
Priority to TW110213458U priority Critical patent/TWM628940U/en
Publication of TWM628940U publication Critical patent/TWM628940U/en

Links

Images

Abstract

The disclosure provides a master device and a slave device. The master device performs: in a first period of an i-th second, sending a synchronization signal frame to the slave device, wherein the synchronization signal frame includes a synchronization header, a pulse per second (1PPS) signal, a first time of date (ToD) information, and a first phase compensation information, wherein the first phase compensation information is used to request the slave device to correct a transmission time point at which a first reference 1PPS signal is transmitted in a second period of the i-th second; during the second period of the i-th second, receiving the first reference 1PPS signal from the slave device; determining a second phase compensation information sent to the slave device in a first period of an (i+1)-th second according to a receiving time point when the first reference 1PPS signal is received.

Description

主控裝置及僕裝置Master device and slave device

本新型是有關於一種裝置間的同步機制,且特別是有關於一種主控裝置及僕裝置。 The present invention relates to a synchronization mechanism between devices, and more particularly, to a master device and a slave device.

請參照圖1A,其是習知的同步機制示意圖。在圖1A中,主控(Master)裝置可透過3條信號傳輸線連接於僕(slave)裝置,而主控裝置可透過這些信號傳輸線分別傳送頻率資訊(例如10MHz)、相位資訊(例如一秒脈衝(a pulse per second,1PPS)信號)及日時間(Time of date,ToD)資訊至僕裝置,以讓僕裝置據以進行同步。 Please refer to FIG. 1A , which is a schematic diagram of a conventional synchronization mechanism. In FIG. 1A , the master device can be connected to the slave device through three signal transmission lines, and the master device can transmit frequency information (such as 10MHz) and phase information (such as one-second pulse) through these signal transmission lines. (a pulse per second, 1PPS) signal) and time of date (Time of date, ToD) information to the slave device, so that the slave device can synchronize accordingly.

然而,由於圖1A的方式需使用3條信號傳輸線,因此佈線上並不方便。 However, since the method of FIG. 1A needs to use three signal transmission lines, the wiring is inconvenient.

請參照圖1B,其是習知的另一同步機制示意圖。在圖1B中,主控裝置可透過單一條信號傳輸線連接於僕裝置,並可透過脈衝寬度調變(pulse width modulation,PWM)來將同步信號(例如嵌入式PPS(embedded PPS,ePPS)信號)發送至僕裝置,藉以實 現如靶場間儀器組-B(Inter-Range Instrumentation Group B,IRIG-B)的技術。 Please refer to FIG. 1B , which is a schematic diagram of another conventional synchronization mechanism. In FIG. 1B , the master device can be connected to the slave device through a single signal transmission line, and the synchronization signal (such as an embedded PPS (ePPS) signal) can be converted by pulse width modulation (PWM) sent to the slave device for Now such as the Inter-Range Instrumentation Group-B (Inter-Range Instrumentation Group B, IRIG-B) technology.

請參照圖1C,其是習知的PWM示意圖。在本實施例中,位元「0」例如可基於PWM的概念而調變為工作週期(duty cycle)為25%的脈波,而位元「1」例如可基於PWM的概念而調變為工作週期為75%的脈波。在圖1C中,信號「1011」例如可依上述原則而調變為所示的脈波序列,但可不限於此。 Please refer to FIG. 1C , which is a schematic diagram of a conventional PWM. In this embodiment, the bit "0" can be adjusted to a pulse wave with a duty cycle of 25% based on the concept of PWM, for example, and the bit "1" can be adjusted to, for example, based on the concept of PWM. The duty cycle is 75% pulse. In FIG. 1C , the signal “1011” can be modulated into the pulse wave sequence shown, for example, according to the above principles, but it is not limited to this.

由圖1B可看出,其雖降低了佈線上的難度,但由於主控裝置係單向傳輸信號至僕裝置,故僕裝置無法得知因線長或其他因素所導致的延遲誤差。 It can be seen from FIG. 1B that although the difficulty of wiring is reduced, since the master device transmits signals to the slave device in one direction, the slave device cannot know the delay error caused by the line length or other factors.

有鑑於此,本新型提供一種主控裝置及僕裝置,其可用於解決上述技術問題。 In view of this, the present invention provides a master device and a slave device, which can be used to solve the above technical problems.

本新型提供一種主控裝置,包括處理電路及補償估計電路。處理電路經配置以:在第i秒鐘的第一期間中,發送一同步信號框至一僕裝置,其中同步信號框包括一同步標頭、一第一一秒脈衝(a pulse per second,1PPS)信號、第一日時間資訊及第一相位補償資訊,其中第一相位補償資訊用以要求僕裝置修正在所述第i秒鐘的第二期間中發送一第一參考1PPS信號的一發送時間點。補償估計電路耦接處理電路,並經配置以:在所述第i秒鐘的第二期間中從僕裝置接收第一參考1PPS信號;依據接收第一參考1PPS 信號的一接收時間點決定在第i+1秒鐘的第一期間中發送至僕裝置的一第二相位補償資訊。 The utility model provides a main control device, which includes a processing circuit and a compensation estimation circuit. The processing circuit is configured to: in the first period of the ith second, send a synchronization signal frame to a slave device, wherein the synchronization signal frame includes a synchronization header, a first pulse per second (1PPS) ) signal, the first time of day information, and the first phase compensation information, wherein the first phase compensation information is used to request the slave device to correct a sending time for sending a first reference 1PPS signal during the second period of the i-th second point. The compensation estimation circuit is coupled to the processing circuit and is configured to: receive the first reference 1PPS signal from the slave device during the second period of the ith second; according to receiving the first reference 1PPS A reception time point of the signal determines a second phase compensation information sent to the slave device during the first period of the i+1th second.

本新型提供一種僕裝置,包括接收器及處理電路。接收器經配置以:在第i秒鐘的第一期間中,從一主控裝置接收一同步信號框,其中同步信號框包括一同步標頭、一第一一秒脈衝(a pulse per second,1PPS)信號、第一日時間資訊及第一相位補償資訊。處理電路耦接於接收器,並經配置以:依據第一相位補償資訊修正在所述第i秒鐘的第二期間中發送一第一參考1PPS信號的一發送時間點;在所述第i秒鐘的第二期間的發送時間點發送第一參考1PPS信號至主控裝置。 The present invention provides a slave device, which includes a receiver and a processing circuit. The receiver is configured to receive a synchronization signal frame from a master device during a first period of the ith second, wherein the synchronization signal frame includes a synchronization header, a first pulse per second (a pulse per second, 1PPS) signal, first day time information and first phase compensation information. The processing circuit is coupled to the receiver, and is configured to: correct a sending time point of sending a first reference 1PPS signal in the second period of the ith second according to the first phase compensation information; The first reference 1PPS signal is sent to the master device at the sending time point of the second period of seconds.

200:同步系統 200: Sync System

210:主控裝置 210: Master control device

211:補償估計電路 211: Compensation Estimation Circuit

212:處理電路 212: Processing Circuits

213:日時間電路 213: Day Time Circuit

220:僕裝置 220: Servant Device

221:接收器 221: Receiver

222:處理電路 222: Processing circuit

411:同步標頭 411: Sync header

412:第一1PPS信號 412: First 1PPS signal

413:第一日時間資訊 413: First day time information

413a:第一成分 413a: First Ingredient

413b:第二成分 413b: Second ingredient

414:第一相位補償資訊 414: First phase compensation information

511:振盪器 511: Oscillator

512:鎖相迴路 512: Phase Locked Loop

513:雙向傳輸控制器 513: Bidirectional transmission controller

611:振盪器 611: Oscillator

612:鎖相迴路 612: Phase Locked Loop

613:解碼器 613: Decoder

614:日時間電路 614: Day Time Circuit

615:雙向傳輸控制器 615: Bidirectional Transmission Controller

F1,F2:同步信號框 F1, F2: Sync signal box

RS:第一參考1PPS信號 RS: first reference 1PPS signal

SC1:系統時鐘信號 SC1: system clock signal

ET:外部日時間 ET: External Day Time

T1:第一期間 T1: The first period

T2:第二期間 T2: The second period

T3:第三期間 T3: The third period

GT:預設保護時間 GT: Preset protection time

PT:預設時間點 PT: Preset time point

EC:外部時鐘信號 EC: External clock signal

EP:外部1PPS信號 EP: External 1PPS signal

LC1:本地時鐘信號 LC1: local clock signal

ST:系統日時間 ST: system day time

FS:信號頻率 FS: signal frequency

S311~S313、S321~S323:步驟 S311~S313, S321~S323: Steps

圖1A是習知的同步機制示意圖。 FIG. 1A is a schematic diagram of a conventional synchronization mechanism.

圖1B是習知的另一同步機制示意圖。 FIG. 1B is a schematic diagram of another conventional synchronization mechanism.

圖1C是習知的PWM示意圖。 FIG. 1C is a schematic diagram of a conventional PWM.

圖2是依據本新型之一實施例繪示的同步系統示意圖。 FIG. 2 is a schematic diagram of a synchronization system according to an embodiment of the present invention.

圖3是依據本新型之一實施例繪示的同步校正方法流程圖。 FIG. 3 is a flowchart of a synchronization calibration method according to an embodiment of the present invention.

圖4是依據本新型之一實施例繪示的第i秒鐘的第一期間及第二期間示意圖。 4 is a schematic diagram illustrating the first period and the second period of the i-th second according to an embodiment of the present invention.

圖5是依據圖2繪示的主控裝置示意圖。 FIG. 5 is a schematic diagram of the main control device shown in FIG. 2 .

圖6是依據圖2繪示的僕裝置示意圖。 FIG. 6 is a schematic diagram of the slave device shown in FIG. 2 .

請參照圖2,其是依據本新型之一實施例繪示的同步系統示意圖。在圖2中,同步系統200包括主控裝置210及僕裝置220,其中主控裝置210及僕裝置220之間可透過一雙向傳輸介面(其例如是一種同步串列匯流排)連接。亦即,在一些實施例中,主控裝置210除了可將同步所需的資訊發送至僕裝置220之外,亦可從僕裝置220接收反饋的資訊,而主控裝置210及僕裝置220即可在此種雙向溝通的機制中進行同步的校正。 Please refer to FIG. 2 , which is a schematic diagram of a synchronization system according to an embodiment of the present invention. In FIG. 2, the synchronization system 200 includes a master device 210 and a slave device 220, wherein the master device 210 and the slave device 220 can be connected through a bidirectional transmission interface (eg, a synchronous serial bus). That is, in some embodiments, the master device 210 can not only send information required for synchronization to the slave device 220, but also receive feedback information from the slave device 220, and the master device 210 and the slave device 220 are Synchronized corrections can be made in this mechanism of two-way communication.

在一實施例中,主控裝置210包括補償估計電路211及處理電路212,其中處理電路212耦接於補償估計電路211。在一些實施例中,主控裝置210還可包括耦接於處理電路212的日時間電路213,但可不限於此。另外,僕裝置220包括彼此耦接的接收器221及處理電路222。 In one embodiment, the main control device 210 includes a compensation estimation circuit 211 and a processing circuit 212 , wherein the processing circuit 212 is coupled to the compensation estimation circuit 211 . In some embodiments, the main control device 210 may further include a time-of-day circuit 213 coupled to the processing circuit 212, but it is not limited thereto. In addition, the slave device 220 includes a receiver 221 and a processing circuit 222 coupled to each other.

在本新型的實施例中,主控裝置210及僕裝置220可協同實現本新型的同步校正方法,其細節詳述如下。 In the embodiment of the present invention, the master device 210 and the slave device 220 can cooperate to implement the synchronization calibration method of the present invention, the details of which are described below.

請參照圖3,其是依據本新型之一實施例繪示的同步校正方法流程圖。本實施例的方法可由圖2的主控裝置210及僕裝置220執行,以下即搭配圖2所示的元件說明圖3各步驟的細節。 Please refer to FIG. 3 , which is a flowchart of a synchronization calibration method according to an embodiment of the present invention. The method of this embodiment can be executed by the master device 210 and the slave device 220 in FIG. 2 . The details of each step in FIG. 3 will be described below with the elements shown in FIG. 2 .

在本新型的實施例中,主控裝置210及僕裝置220在每秒鐘的時間區間內所執行的操作原則大致相同/相似,故以下暫以第i秒鐘內所執行的操作為例作說明,但可不限於此。 In the embodiment of the present invention, the operation principles performed by the master device 210 and the slave device 220 in the time interval of each second are roughly the same/similar, so the operation performed in the ith second is used as an example below. description, but not limited to.

首先,在步驟S311中,在第i秒鐘的第一期間中,主控裝置210的處理電路212發送同步信號框F1至僕裝置220。相應地,在步驟S321中,在第i秒鐘的第一期間中,僕裝置220的接收器221從主控裝置210接收同步信號框F1。 First, in step S311 , in the first period of the ith second, the processing circuit 212 of the master device 210 sends the synchronization signal frame F1 to the slave device 220 . Correspondingly, in step S321 , in the first period of the ith second, the receiver 221 of the slave device 220 receives the synchronization signal frame F1 from the master device 210 .

在本新型的實施例中,第i秒鐘至少可區分為第一期間及第二期間,其中第一期間例如是可讓主控裝置210發送信號至僕裝置220的期間,而第二期間例如是主控裝置210聆聽僕裝置220所發送信號的期間,但可不限於此。 In the embodiment of the present invention, the ith second can be at least divided into a first period and a second period, wherein the first period is, for example, a period during which the master device 210 can send a signal to the slave device 220, and the second period is, for example, It is the period during which the master device 210 listens to the signal sent by the slave device 220, but it is not limited to this.

請參照圖4,其是依據本新型之一實施例繪示的第i秒鐘的第一期間及第二期間示意圖。如圖4所示,主控裝置210在第i秒鐘的第一期間T1中發送的同步信號框F1例如可依序包括同步標頭411、第一1PPS信號412、第一日時間資訊413及第一相位補償資訊414。在其他實施例中,設計者亦可依需求而調整第一1PPS信號412、第一日時間資訊413及第一相位補償資訊414在同步信號框F1中的順序,但可不限於此。 Please refer to FIG. 4 , which is a schematic diagram of the first period and the second period of the ith second according to an embodiment of the present invention. As shown in FIG. 4 , the synchronization signal frame F1 sent by the master device 210 in the first period T1 of the ith second may include, for example, a synchronization header 411 , a first 1PPS signal 412 , a first time of day information 413 and The first phase compensation information 414 . In other embodiments, the designer can also adjust the order of the first 1PPS signal 412 , the first time of day information 413 and the first phase compensation information 414 in the synchronization signal frame F1 according to requirements, but it is not limited thereto.

在一實施例中,處理電路212可在取得同步標頭411、第一1PPS信號412、第一日時間資訊413及第一相位補償資訊414的內容後,依先前提及的PWM機制將同步標頭411、第一1PPS信號412、第一日時間資訊413及第一相位補償資訊414編碼為對應的PWM信號並進行發送,但可不限於此。 In one embodiment, the processing circuit 212 may, after obtaining the contents of the synchronization header 411 , the first 1PPS signal 412 , the first time of day information 413 and the first phase compensation information 414 , synchronize the synchronization header according to the aforementioned PWM mechanism. The header 411 , the first 1PPS signal 412 , the first time of day information 413 and the first phase compensation information 414 are encoded into corresponding PWM signals and sent, but not limited thereto.

在一實施例中,同步標頭411的內容可設計為某個特定位元組合,藉以讓僕裝置220可在偵測到此特定位元組合之後, 判定已收到同步信號框F1,進而將後續的第一1PPS信號412、第一日時間資訊413及第一相位補償資訊414取出並執行後續操作。在不同的實施例中,同步標頭411的長度及內容可依設計者的需求而決定。舉例而言,假設同步標頭411的長度為7位元,且其內容例如為「1011000」。在此情況下,當僕裝置220偵測到「1011000」的特定位元組合之後,僕裝置220即可依據第一1PPS信號412、第一日時間資訊413及第一相位補償資訊414個別對應的預設信號長度而取得第一1PPS信號412、第一日時間資訊413及第一相位補償資訊414。 In one embodiment, the content of the sync header 411 can be designed as a specific combination of bytes, so that the slave device 220 can detect the specific combination of bytes, It is determined that the synchronization signal frame F1 has been received, and the subsequent first 1PPS signal 412 , the first time of day information 413 and the first phase compensation information 414 are extracted and the subsequent operations are performed. In different embodiments, the length and content of the sync header 411 can be determined according to the designer's requirements. For example, it is assumed that the length of the sync header 411 is 7 bits, and its content is, for example, "1011000". In this case, after the slave device 220 detects the specific bit combination of “1011000”, the slave device 220 can correspond to the first 1PPS signal 412 , the first time of day information 413 and the first phase compensation information 414 respectively The first 1PPS signal 412 , the first time-of-day information 413 and the first phase compensation information 414 are obtained by presetting the signal length.

舉例而言,假設第一1PPS信號412、第一日時間資訊413及第一相位補償資訊414的預設信號長度分別為1位元、80位元及32位元,則在僕裝置220偵測到內容為「1011000」的同步標頭411之後,僕裝置220可經配置以:將同步標頭411的次一位元判定為第一1PPS信號412;將第一1PPS信號412後的80個位元判定為第一日時間資訊413;以及將第一日時間資訊413之後的32個位元判定為第一相位補償資訊414,但可不限於此。 For example, assuming that the default signal lengths of the first 1PPS signal 412 , the first time of day information 413 and the first phase compensation information 414 are 1 bit, 80 bits and 32 bits respectively, the slave device 220 detects After reaching the sync header 411 whose content is “1011000”, the slave device 220 may be configured to: determine the second bit of the sync header 411 as the first 1PPS signal 412 ; The element is determined as the first time of day information 413; and the 32 bits after the first time of day information 413 are determined as the first phase compensation information 414, but not limited thereto.

在一實施例中,主控裝置210可透過日時間電路213決定同步信號框F1中的第一日時間資訊413。在一實施例中,日時間電路213可在取得對應於第i秒鐘的外部日時間ET之後,據以決定第一日時間資訊413的第一成分413a。在一實施例中,所述外部日時間ET例如是紀元時間(epoch time),其可由日時間電路213從網路或其他類似的外部來源所取得,並用以作為第一日時間 資訊413的第一成分413a。在本新型的實施例中,在第一日時間資訊413的預設信號長度假設為80位元的情況下,第一成分413a例如可佔第一日時間資訊413的前48個位元,但可不限於此。 In one embodiment, the main control device 210 can determine the first time of day information 413 in the synchronization signal frame F1 through the time of day circuit 213 . In one embodiment, the time-of-day circuit 213 may determine the first component 413a of the first time-of-day information 413 after obtaining the external time-of-day ET corresponding to the ith second. In one embodiment, the external time of day ET is, for example, an epoch time, which can be obtained by the time of day circuit 213 from the Internet or other similar external sources and used as the first time of day The first component 413a of the information 413. In the embodiment of the present invention, when the default signal length of the first time of day information 413 is assumed to be 80 bits, the first component 413a may occupy the first 48 bits of the first time of day information 413, for example, but But not limited to this.

在一實施例中,日時間電路213可基於系統時鐘信號SC1估計第一日時間資訊413的第二成分413b。在一實施例中,系統時鐘信號SC1可包括多個脈波,而這些脈波的週期例如可因應於系統時鐘信號SC1的頻率而決定。舉例而言,假設系統時鐘信號SC1的頻率為125MHz,則這些脈波的週期例如是8ns(即1/125M)。亦即,每8ns會出現一個脈波。 In one embodiment, the time of day circuit 213 may estimate the second component 413b of the first time of day information 413 based on the system clock signal SC1. In one embodiment, the system clock signal SC1 may include a plurality of pulses, and the periods of these pulses may be determined according to the frequency of the system clock signal SC1, for example. For example, assuming that the frequency of the system clock signal SC1 is 125MHz, the period of these pulses is, for example, 8ns (ie, 1/125M). That is, a pulse occurs every 8ns.

在此情況下,反應於日時間電路213偵測到系統時鐘信號SC1的脈波的其中之一,日時間電路213可遞增第一計數值。亦即,在系統時鐘信號SC1的頻率為125MHz的情況下,日時間電路213每8ns即會遞增第一計數值。在一實施例中,日時間電路213可以第一計數值作為第一日時間資訊413的第二成分413b。在本新型的實施例中,在第一日時間資訊413的預設信號長度假設為80位元且第一成分413a佔第一日時間資訊413的前48個位元的情況下,第二成分413b例如可佔第一日時間資訊413的後32個位元,但可不限於此。 In this case, in response to the time-of-day circuit 213 detecting one of the pulse waves of the system clock signal SC1, the time-of-day circuit 213 may increment the first count value. That is, when the frequency of the system clock signal SC1 is 125 MHz, the time-of-day circuit 213 increments the first count value every 8 ns. In one embodiment, the time-of-day circuit 213 may use the first count value as the second component 413b of the first time-of-day information 413 . In the embodiment of the present invention, when the default signal length of the first time of day information 413 is assumed to be 80 bits and the first component 413a occupies the first 48 bits of the first time of day information 413, the second component For example, 413b may occupy the last 32 bits of the first day time information 413, but it is not limited thereto.

簡言之,第一日時間資訊413的第一成分413a可由日時間電路213基於外部日時間ET(其精度僅為秒)決定,而第一日時間資訊413的第二成分413b(其精度可達ns)可由日時間電路413自行計數而得,但可不限於此。 In short, the first component 413a of the first time of day information 413 can be determined by the time of day circuit 213 based on the external time of day ET (which has an accuracy of only seconds), while the second component 413b of the first time of day information 413 (whose accuracy can be up to ns) can be calculated by the time-of-day circuit 413 by itself, but it is not limited to this.

在一實施例中,第一相位補償資訊414用以要求僕裝置220修正在所述第i秒鐘的第二期間T2中發送第一參考1PPS信號RS的發送時間點。 In one embodiment, the first phase compensation information 414 is used to request the slave device 220 to modify the transmission time point of the first reference 1PPS signal RS in the second period T2 of the ith second.

概略而言,僕裝置220在每秒鐘的第二期間中都經配置以在一預設時間點發送第一參考1PPS信號RS。在一實施例中,第一參考1PPS信號RS例如是1,而第二期間中的其他位元例如是0。換言之,若第二期間的長度經設定為N個位元,則此N個位元中僅有1個位元為1,其他位元皆為0,但可不限於此。 Roughly speaking, the slave device 220 is configured to transmit the first reference 1PPS signal RS at a preset time point during the second period of every second. In one embodiment, the first reference 1PPS signal RS is, for example, 1, and other bits in the second period are, for example, 0. In other words, if the length of the second period is set to be N bits, only one of the N bits is 1, and the other bits are all 0, but not limited to this.

在一實施例中,若主控裝置210及僕裝置220雙方之間為完美同步,則主控裝置210將會在每秒鐘的第二期間中的預設時間點收到來自僕裝置220的第一參考1PPS信號RS。 In one embodiment, if the master device 210 and the slave device 220 are perfectly synchronized, the master device 210 will receive a message from the slave device 220 at a preset time point in the second period of every second. The first reference 1PPS signal RS.

然而,由於主控裝置210及僕裝置220之間的同步一般並非完美,因此主控裝置210可能不會在第二期間的預設時間點收到來自僕裝置220的第一參考1PPS信號。例如,主控裝置210可能會在第i-1秒鐘的第二期間中的預設時間點之前/之後收到第一參考1PPS信號RS。亦即,主控裝置210在第i-1秒鐘的第二期間中接收第一參考1PPS信號RS的接收時間點與預設時間點之間可能存在特定時間差。在此情況下,主控裝置210的補償估計電路211可基於此特定時間差產生相應的第一相位補償資訊414,藉以在第i秒鐘的第一期間T1中透過同步信號框F1中將第一相位補償資訊414告知僕裝置220。 However, since the synchronization between the master device 210 and the slave device 220 is generally not perfect, the master device 210 may not receive the first reference 1PPS signal from the slave device 220 at the preset time point of the second period. For example, the main control device 210 may receive the first reference 1PPS signal RS before/after a preset time point in the second period of the i-1th second. That is, there may be a certain time difference between the reception time point when the main control device 210 receives the first reference 1PPS signal RS in the second period of the i-1th second and the preset time point. In this case, the compensation estimation circuit 211 of the main control device 210 can generate the corresponding first phase compensation information 414 based on the specific time difference, so as to convert the first phase compensation information 414 through the synchronization signal frame F1 in the first period T1 of the ith second. The phase compensation information 414 is notified to the slave device 220 .

因應於第一相位補償資訊414的內容,僕裝置220可在 第二期間T2中提前/延後發送第一參考1PPS信號RS,以試圖讓主控裝置210在第二期間T2的預設時間點接收到第一參考1PPS信號RS。 According to the content of the first phase compensation information 414, the slave device 220 can The first reference 1PPS signal RS is sent in advance/delay in the second period T2, so as to try to allow the master control device 210 to receive the first reference 1PPS signal RS at a preset time point of the second period T2.

在一實施例中,補償估計電路211可取得第i-1秒鐘的第二期間中的預設時間點。在一實施例中,補償估計電路211可取得第i-1秒鐘的同步信號框,並在此同步信號框的結束時間之後加上預設保護時間作為第i-1秒鐘的第二期間中的預設時間點。在不同的實施例中,上述預設保護時間可依設計者的需求而定。 In one embodiment, the compensation estimation circuit 211 may obtain a preset time point in the second period of the i-1th second. In one embodiment, the compensation estimation circuit 211 can obtain the synchronization signal frame of the i-1th second, and add a preset guard time after the end time of the synchronization signal frame as the second period of the i-1th second. preset time point in . In different embodiments, the above-mentioned preset protection time can be determined according to the needs of the designer.

在一實施例中,假設第二期間的長度經設定為N個位元,則預設保護時間例如可設定為N/2個位元,但可不限於此。舉例而言,假設N為240,則補償估計電路211例如可在第i-1秒鐘的同步信號框後加上長度為120個(即240/2)位元的預設保護時間作為第i-1秒鐘的第二期間中的預設時間點,但可不限於此。換言之,若主控裝置210與僕裝置220之間為完美同步,則在第i-1秒鐘的第二期間中,應只有第120個位元為1(即,第一參考1PPS信號RS),其他的位元皆為0。然而,若主控裝置210與僕裝置220之間不為完美同步,則第一參考1PPS信號RS出現的位置將不會位於第二期間中的第120個位元。 In one embodiment, assuming that the length of the second period is set to be N bits, the predetermined guard time may be set to, for example, N/2 bits, but not limited to this. For example, assuming that N is 240, the compensation estimation circuit 211 can add a preset guard time of 120 (ie 240/2) bits as the i-th after the synchronization signal frame of the i-1 second. - A preset time point in the second period of 1 second, but may not be limited thereto. In other words, if the master device 210 and the slave device 220 are perfectly synchronized, in the second period of the i-1th second, only the 120th bit should be 1 (ie, the first reference 1PPS signal RS) , all other bits are 0. However, if the master device 210 and the slave device 220 are not perfectly synchronized, the position where the first reference 1PPS signal RS appears will not be located at the 120th bit in the second period.

因此,補償估計電路211可取得在第i-1秒鐘的第二期間中接收第一參考1PPS信號RS的接收時間點與上述預設時間點之間的特定時間差,並基於上述特定時間差決定第一相位補償資訊414。 Therefore, the compensation estimation circuit 211 can obtain the specific time difference between the reception time point when the first reference 1PPS signal RS is received in the second period of the i-1th second and the above-mentioned preset time point, and determine the specific time difference based on the above-mentioned specific time difference. A phase compensation information 414 .

在一實施例中,反應於判定上述接收時間點超前預設時間點達特定時間差,補償估計電路211可將第一相位補償資訊414設定為用於要求僕裝置220在第i秒鐘的第二期間T2中延後特定時間差發送第一參考1PPS信號RS。例如,假設第一參考1PPS信號RS出現的位置為第二期間的第118個位元,此即代表第一參考1PPS信號RS提前2個位元(即,特定時間差)被主控裝置210接收到。因此,補償估計電路211可將第一相位補償資訊414設定為用於要求僕裝置220在第i秒鐘的第二期間T2中延後2個位元發送第一參考1PPS信號RS。 In one embodiment, in response to determining that the receiving time point is ahead of the predetermined time point by a specific time difference, the compensation estimation circuit 211 may set the first phase compensation information 414 to be used to request the slave device 220 to perform the second phase compensation in the ith second. In the period T2, the first reference 1PPS signal RS is sent after a certain time difference. For example, it is assumed that the position where the first reference 1PPS signal RS appears is the 118th bit of the second period, which means that the first reference 1PPS signal RS is received by the master device 210 in advance of 2 bits (ie, a specific time difference). . Therefore, the compensation estimation circuit 211 can set the first phase compensation information 414 to be used to request the slave device 220 to send the first reference 1PPS signal RS with a delay of 2 bits in the second period T2 of the ith second.

另一方面,反應於判定上述接收時間點落後預設時間點達特定時間差,補償估計電路211可將第一相位補償資訊414設定為用於要求僕裝置220在第i秒鐘的第二期間T2中提前特定時間差發送第一參考1PPS信號RS。例如,假設第一參考1PPS信號RS出現的位置為第二期間的第123個位元,此即代表第一參考1PPS信號RS延後3個位元(即,特定時間差)被主控裝置210接收到。因此,補償估計電路211可將第一相位補償資訊414設定為用於要求僕裝置220在第i秒鐘的第二期間T2中提前3個位元發送第一參考1PPS信號RS。 On the other hand, in response to determining that the receiving time point is behind the preset time point by a specific time difference, the compensation estimation circuit 211 may set the first phase compensation information 414 to be used to request the slave device 220 to perform the second period T2 of the ith second The first reference 1PPS signal RS is sent in advance by a specific time difference. For example, it is assumed that the position where the first reference 1PPS signal RS appears is the 123rd bit of the second period, which means that the first reference 1PPS signal RS is received by the master device 210 after being delayed by 3 bits (ie, a specific time difference). arrive. Therefore, the compensation estimation circuit 211 can set the first phase compensation information 414 to be used to request the slave device 220 to send the first reference 1PPS signal RS by 3 bits in advance in the second period T2 of the ith second.

在一實施例中,假設第一相位補償資訊414的預設信號長度為32個位元,則其最高有效位元(most significant bit,MSB)例如可用於指示僕裝置220應提前/延後發送第一參考1PPS信號RS,而剩餘的31個位元可用於表示上述特定時間差。例如,當第 一相位補償資訊414的MSB為1時,第一相位補償資訊414例如可用於要求僕裝置220延後特定時間差發送第一參考1PPS信號RS。另外,當第一相位補償資訊414的MSB為0時,第一相位補償資訊414例如可用於要求僕裝置220提前特定時間差發送第一參考1PPS信號RS,但可不限於此。 In one embodiment, assuming that the default signal length of the first phase compensation information 414 is 32 bits, the most significant bit (MSB) of the first phase compensation information 414 can be used, for example, to indicate that the slave device 220 should send in advance/late. The first reference 1PPS signal RS, and the remaining 31 bits can be used to represent the above-mentioned specific time difference. For example, when the first When the MSB of a phase compensation information 414 is 1, the first phase compensation information 414 can be used, for example, to request the slave device 220 to send the first reference 1PPS signal RS after a specific time difference. In addition, when the MSB of the first phase compensation information 414 is 0, the first phase compensation information 414 may be used, for example, to request the slave device 220 to send the first reference 1PPS signal RS in advance by a specific time difference, but not limited thereto.

基此,在步驟S322中,僕裝置220的處理電路222依據第一相位補償資訊414修正在第i秒鐘的第二期間T2中發送第一參考1PPS信號RS的發送時間點。 Based on this, in step S322, the processing circuit 222 of the slave device 220 corrects the sending time point of sending the first reference 1PPS signal RS in the second period T2 of the ith second according to the first phase compensation information 414.

在一實施例中,僕裝置220的處理電路222取得在第i秒鐘的第二期間T2中發送第一參考1PPS信號RS的預設時間點。在一實施例中,僕裝置220的處理電路222可在同步信號框F1的結束時間之後加上預設保護時間GT作為預設時間點PT,但可不限於此。 In one embodiment, the processing circuit 222 of the slave device 220 obtains a preset time point at which the first reference 1PPS signal RS is transmitted in the second period T2 of the ith second. In one embodiment, the processing circuit 222 of the slave device 220 may add the preset guard time GT as the preset time point PT after the end time of the synchronization signal frame F1, but it is not limited thereto.

之後,反應於判定第一相位補償資訊414指示延後特定時間差發送第一參考1PPS信號RS,處理電路222可將預設時間點PT延後特定時間差作為發送時間點PT’。例如,當第一相位補償資訊414的MSB為1時,處理電路222可依據第一相位補償資訊414剩餘的31個位元指示的特定時間差延後預設時間點PT。 Then, in response to determining that the first phase compensation information 414 indicates that the first reference 1PPS signal RS is sent after a specific time difference, the processing circuit 222 can delay the preset time point PT by a specific time difference as the sending time point PT'. For example, when the MSB of the first phase compensation information 414 is 1, the processing circuit 222 can delay the predetermined time point PT according to the specific time difference indicated by the remaining 31 bits of the first phase compensation information 414 .

另一方面,反應於判定第一相位補償資訊414指示提前特定時間差發送第一參考1PPS信號RS,處理器222可將預設時間點GT提前特定時間差作為發送時間點PT’。例如,當第一相位補償資訊414的MSB為0時,處理電路222可依據第一相位補償 資訊414剩餘的31個位元指示的特定時間差提前預設時間點PT。 On the other hand, in response to determining that the first phase compensation information 414 indicates that the first reference 1PPS signal RS is sent in advance by a specific time difference, the processor 222 may advance the preset time point GT by a specific time difference as the transmission time point PT'. For example, when the MSB of the first phase compensation information 414 is 0, the processing circuit 222 may compensate according to the first phase The specific time difference indicated by the remaining 31 bits of the information 414 is advanced by a predetermined time point PT.

之後,在步驟S323中,僕裝置220的處理電路222在第i秒鐘的第二期間T2的發送時間點PT’發送第一參考1PPS信號RS至主控裝置210。相應地,在步驟S312中,主控裝置210的補償估計電路211在第i秒鐘的第二期間T2中從僕裝置220接收第一參考1PPS信號RS。 After that, in step S323, the processing circuit 222 of the slave device 220 sends the first reference 1PPS signal RS to the master device 210 at the sending time point PT' of the second period T2 of the ith second. Correspondingly, in step S312, the compensation estimation circuit 211 of the master device 210 receives the first reference 1PPS signal RS from the slave device 220 in the second period T2 of the ith second.

之後,在步驟S313中,補償估計電路211依據接收第一參考1PPS信號RS的接收時間點決定在第i+1秒鐘的第一期間中發送至僕裝置220的第二相位補償資訊。 Then, in step S313, the compensation estimation circuit 211 determines the second phase compensation information to be sent to the slave device 220 in the first period of the i+1th second according to the reception time point of the first reference 1PPS signal RS.

在一實施例中,補償估計電路211決定第二相位補償資訊的方式與決定第一相位補償資訊414的方式類似。舉例而言,補償估計電路211取得第i秒鐘的第二期間T2中的預設時間點PT。例如,補償估計電路211可在同步信號框F1的結束時間之後加上預設保護時間GT作為第i秒鐘的第二期間T2中的預設時間點PT,但可不限於此。之後,補償估計電路211可取得此接收時間點與預設時間點PT之間的特定時間差,並基於此特定時間差決定第二相位補償資訊。 In one embodiment, the manner in which the compensation estimation circuit 211 determines the second phase compensation information is similar to the manner in which the first phase compensation information 414 is determined. For example, the compensation estimation circuit 211 obtains the preset time point PT in the second period T2 of the ith second. For example, the compensation estimation circuit 211 may add the preset guard time GT as the preset time point PT in the second period T2 of the ith second after the end time of the synchronization signal frame F1, but it is not limited thereto. Afterwards, the compensation estimation circuit 211 can obtain the specific time difference between the receiving time point and the predetermined time point PT, and determine the second phase compensation information based on the specific time difference.

在一實施例中,反應於判定接收時間點超前預設時間點PT達特定時間差,補償估計電路211可將第二相位補償資訊設定為用於要求僕裝置220在所述第i+1秒鐘的第二期間中延後特定時間差發送第一參考1PPS信號RS。另一方面,反應於判定接收時間點落後預設時間點PT達特定時間差,補償估計電路211可將 第二相位補償資訊設定為用於要求僕裝置220在所述第i+1秒鐘的第二期間中提前特定時間差發送第一參考1PPS信號RS。以上手段的細節可參照先前實施例的說明,於此不另贅述。 In one embodiment, in response to determining that the receiving time point is ahead of the preset time point PT by a certain time difference, the compensation estimation circuit 211 may set the second phase compensation information to be used to request the slave device 220 to perform the i+1th second. The first reference 1PPS signal RS is sent after a certain time difference in the second period of . On the other hand, in response to determining that the receiving time point is behind the preset time point PT by a certain time difference, the compensation estimation circuit 211 may The second phase compensation information is set for requesting the slave device 220 to send the first reference 1PPS signal RS in advance by a specific time difference in the second period of the i+1th second. For details of the above means, reference may be made to the descriptions of the previous embodiments, which will not be repeated here.

之後,主控裝置210即可再相應地產生對應於第i+1秒鐘的同步信號框F2,進而控制僕裝置220修正在第i+1秒鐘的第二期間中發送第一參考1PPS信號RS的發送時間點,但可不限於此。 After that, the master device 210 can accordingly generate a synchronization signal frame F2 corresponding to the i+1th second, and then control the slave device 220 to modify the transmission of the first reference 1PPS signal in the second period of the i+1th second The transmission time point of the RS, but not limited to this.

由上可知,本新型的實施例可讓主控裝置210及僕裝置220在僅透過單一條信號傳輸線(其例如是一種同步串列匯流排)連接的情況下,仍能雙向地進行溝通。進一步而言,主控裝置210可依據僕裝置220在前一秒鐘反饋第一參考1PPS信號RS的情況,相應地決定下一秒鐘提供給僕裝置220的相位補償資訊。藉此,可讓僕裝置220依據相位補償資訊修正發送第一參考1PPS信號的時間點,進而使主控裝置210及僕裝置220彼此達到較佳的同步效果。 As can be seen from the above, the embodiment of the present invention enables the master device 210 and the slave device 220 to communicate bidirectionally under the condition that only a single signal transmission line (eg, a synchronous serial bus) is connected. Further, the master control device 210 can correspondingly determine the phase compensation information to be provided to the slave device 220 in the next second according to the feedback of the first reference 1PPS signal RS by the slave device 220 in the previous second. In this way, the slave device 220 can correct the time point of sending the first reference 1PPS signal according to the phase compensation information, thereby enabling the master device 210 and the slave device 220 to achieve a better synchronization effect with each other.

請參照圖5,其是依據圖2繪示的主控裝置示意圖。在圖5中,主控裝置210除了包括補償估計電路211、處理電路212及日時間電路213之外,還可包括振盪器511、鎖相迴路512及雙向傳輸控制器513。 Please refer to FIG. 5 , which is a schematic diagram of the main control device shown in FIG. 2 . In FIG. 5 , in addition to the compensation estimation circuit 211 , the processing circuit 212 and the time-of-day circuit 213 , the main control device 210 may further include an oscillator 511 , a phase-locked loop 512 and a bidirectional transmission controller 513 .

在一實施例中,振盪器511例如是恆溫控制晶體振盪器(Oven Controlled Crystal Oscillator,OCXO)或是其他精準可控的時鐘信號產生器,並可用於提供本地時鐘信號LC1。 In one embodiment, the oscillator 511 is, for example, an oven controlled crystal oscillator (OCXO) or other precisely controllable clock signal generators, and can be used to provide the local clock signal LC1.

在一實施例中,鎖相迴路512耦接於振盪器511、補償估計電路211、處理電路212及日時間電路213,並可實現為數位鎖相迴路(digital phase lock loop,DPLL)。在一實施例中,鎖相迴路512可接收外部時鐘信號EC、外部1PPS信號EP及來自振盪器511的本地時鐘信號LC1,並可據以產生系統時鐘信號SC1及第一1PPS信號412。 In one embodiment, the phase lock loop 512 is coupled to the oscillator 511 , the compensation estimation circuit 211 , the processing circuit 212 and the time of day circuit 213 , and can be implemented as a digital phase lock loop (DPLL). In one embodiment, the phase-locked loop 512 can receive the external clock signal EC, the external 1PPS signal EP and the local clock signal LC1 from the oscillator 511 , and can generate the system clock signal SC1 and the first 1PPS signal 412 accordingly.

在一實施例中,日時間電路213可從鎖相迴路512取得系統時鐘信號SC1及第一1PPS信號412,並依據先前的教示而決定日時間資訊413中的第二成分413b。 In one embodiment, the time-of-day circuit 213 may obtain the system clock signal SC1 and the first 1PPS signal 412 from the phase-locked loop 512, and determine the second component 413b of the time-of-day information 413 according to the previous teaching.

在一實施例中,補償估計電路211可依據在第i-1秒鐘的第二期間所收到的第一參考1PPS信號RS而決定第一相位補償資訊414,並將第一相位補償資訊414提供予處理電路212。 In one embodiment, the compensation estimation circuit 211 may determine the first phase compensation information 414 according to the first reference 1PPS signal RS received during the second period of the i-1th second, and calculate the first phase compensation information 414 Provided to the preprocessing circuit 212 .

在一實施例中,處理電路212可在取得來自於日時間電路213的系統時鐘信號SC1及日時間資訊413、來自於鎖相迴路512的第一1PPS信號412及來自補償估計電路211的第一相位補償資訊414之後,透過例如PWM的機制而將上述資訊編碼為同步信號框F1。 In one embodiment, the processing circuit 212 can obtain the system clock signal SC1 and the time-of-day information 413 from the time-of-day circuit 213 , the first 1PPS signal 412 from the phase-locked loop 512 , and the first signal from the compensation estimation circuit 211 . After the phase compensation information 414, the above information is encoded into the synchronization signal frame F1 through a mechanism such as PWM.

在一實施例中,雙向傳輸控制器513例如可連接於僕裝置220,並可用於控制主控裝置210與僕裝置220之間的雙向傳輸。舉例而言,在第i秒鐘的第一期間T1中,雙向傳輸控制器513例如可將主控裝置210與僕裝置220之間的同步串列匯流排切換低阻抗狀態(即俗稱的low-Z狀態),藉以讓處理電路212將所產 生的同步信號框F1發送至僕裝置220。 In one embodiment, the bidirectional transmission controller 513 can be connected to, for example, the slave device 220 , and can be used to control the bidirectional transmission between the master device 210 and the slave device 220 . For example, in the first period T1 of the ith second, the bidirectional transmission controller 513 can switch the synchronous serial bus between the master device 210 and the slave device 220 to a low impedance state (commonly known as low-impedance state). Z state), thereby allowing the processing circuit 212 to The generated synchronization signal frame F1 is sent to the slave device 220 .

另外,在第i秒鐘的第二期間T2中,雙向傳輸控制器513例如可將主控裝置210與僕裝置220之間的同步串列匯流排切換高阻抗狀態(即俗稱的high-Z狀態),藉以讓補償估計電路211可聆聽來自僕裝置220的第一參考1PPS信號RS。之後,補償估計電路211可依據在第二期間T2收到的第一參考1PPS信號RS而產生第二相位補償資訊,以讓處理電路212可據以產生對應於第i+1秒鐘的同步信號框。相關細節可參照先前實施例中的說明,於此不另贅述。 In addition, in the second period T2 of the ith second, the bidirectional transmission controller 513 can, for example, switch the synchronous serial bus between the master device 210 and the slave device 220 to a high-impedance state (ie, the so-called high-Z state). ), so that the compensation estimation circuit 211 can listen to the first reference 1PPS signal RS from the slave device 220 . After that, the compensation estimation circuit 211 can generate the second phase compensation information according to the first reference 1PPS signal RS received in the second period T2, so that the processing circuit 212 can generate the synchronization signal corresponding to the i+1th second accordingly. frame. For related details, reference may be made to the descriptions in the previous embodiments, which will not be repeated here.

請參照圖6,其是依據圖2繪示的僕裝置示意圖。在圖6中,僕裝置220除了包括接收器221及處理電路222之外,還包括振盪器611及雙向傳輸控制器615。 Please refer to FIG. 6 , which is a schematic diagram of the slave device shown in FIG. 2 . In FIG. 6 , in addition to the receiver 221 and the processing circuit 222 , the slave device 220 also includes an oscillator 611 and a bidirectional transmission controller 615 .

在一實施例中,雙向傳輸控制器615可用於在每秒鐘的第一期間中從主控裝置210接收對應的同步信號框,並在第二期間中將處理電路222提供的第一參考1PPS信號RS發送至主控裝置210。 In one embodiment, the bidirectional transmission controller 615 may be configured to receive the corresponding synchronization signal frame from the master device 210 during a first period of each second, and to process the first reference 1PPS provided by the circuit 222 during the second period. The signal RS is sent to the master device 210 .

在一實施例中,接收器211可包括鎖相迴路612、解碼器613及日時間電路614。在一實施例中,在第i秒鐘的第一期間T1,解碼器613例如可在從雙向傳輸控制器615取得來自主控裝置210的同步信號框F1之後,解碼同步信號框F1以取得第一1PPS信號412、日時間資訊413、第一相位補償資訊414及對應於同步信號框F1的信號頻率FS。 In one embodiment, the receiver 211 may include a phase locked loop 612 , a decoder 613 and a time of day circuit 614 . In one embodiment, in the first period T1 of the ith second, the decoder 613 may decode the synchronization signal frame F1 to obtain the synchronization signal frame F1 after obtaining the synchronization signal frame F1 from the master device 210 from the bidirectional transmission controller 615, for example. A 1PPS signal 412, time-of-day information 413, first phase compensation information 414, and a signal frequency FS corresponding to the synchronization signal frame F1.

在一實施例中,解碼器613可基於同步信號框F1中各個位元之間的時間差而估計同步信號框F1的信號頻率FS。舉例而言,假設同步信號框F1的位元之間的時間差為8ns,則解碼器613可經估計而得到同步信號框F1的信號頻率FS為125MHz(即1/8ns),但可不限於此。 In one embodiment, the decoder 613 may estimate the signal frequency FS of the synchronization signal frame F1 based on the time difference between the bits in the synchronization signal frame F1. For example, assuming that the time difference between the bits of the synchronization signal frame F1 is 8ns, the decoder 613 can estimate that the signal frequency FS of the synchronization signal frame F1 is 125MHz (ie 1/8ns), but it is not limited thereto.

在一實施例中,振盪器611例如是OCXO或是其他精準可控的時鐘信號產生器,並可用於提供本地時鐘信號LC2。 In one embodiment, the oscillator 611 is, for example, an OCXO or other precisely controllable clock signal generators, and can be used to provide the local clock signal LC2.

在一實施例中,鎖相迴路612耦接於振盪器611及解碼器613,並可基於本地時鐘信號LC2及來自解碼器613的信號頻率FS及第一1PPS信號412而產生系統時鐘信號SC1及第一參考1PPS信號RS。 In one embodiment, the phase-locked loop 612 is coupled to the oscillator 611 and the decoder 613, and can generate the system clock signals SC1 and SC1 based on the local clock signal LC2 and the signal frequency FS from the decoder 613 and the first 1PPS signal 412. The first reference 1PPS signal RS.

在一實施例中,日時間電路614耦接於解碼器613及鎖相迴路612,並可從解碼器613接收日時間資訊413及第一相位補償資訊414,以及從鎖相迴路612接收系統時鐘信號SC1及第一參考1PPS信號RS。 In one embodiment, the time-of-day circuit 614 is coupled to the decoder 613 and the phase-locked loop 612 , and can receive the time-of-day information 413 and the first phase compensation information 414 from the decoder 613 , and receive the system clock from the phase-locked loop 612 The signal SC1 and the first reference 1PPS signal RS.

在一實施例中,日時間電路614可將日時間資訊413的第一成分413a作為系統日時間ST的第一時間成分(其精度為秒),再基於系統時鐘信號SC1及日時間資訊413的第二成分413b估計系統日時間ST的第二時間成分(其精度達ns)。 In one embodiment, the time-of-day circuit 614 can use the first component 413a of the time-of-day information 413 as the first time component of the system time-of-day ST (the precision of which is seconds), and then based on the system clock signal SC1 and the time-of-day information 413 The second component 413b estimates the second time component of the system time of day ST (with an accuracy of ns).

舉例而言,依先前所言,第二成分413b係由日時間電路213經計數而得的第一計數值,而其數值(以K表示)即代表日時間電路213先前計數了幾個8ns。因此,日時間電路614可相應地 藉由計數K個8ns而得到系統日時間ST的第二時間成分。之後,日時間電路614可結合(例如相加)上述第一時間成分及第二時間成分而得到系統日時間ST,但可不限於此。 For example, as mentioned above, the second component 413b is the first count value obtained by the time-of-day circuit 213, and its value (represented by K) represents the number of 8ns previously counted by the time-of-day circuit 213 . Therefore, the time of day circuit 614 can correspondingly The second time component of the system day time ST is obtained by counting K 8ns. After that, the time of day circuit 614 can combine (eg add) the first time component and the second time component to obtain the system day time ST, but it is not limited thereto.

在一實施例中,日時間電路614可基於第一相位補償資訊414而修正第一參考1PPS信號RS的發送時間點。舉例而言,當第一相位補償資訊414的MSB為1時,日時間電路614可在取得在第二期間T2中發送第一參考1PPS信號RS的預設時間點及由第一相位補償資訊414剩餘的31個位元指示的特定時間差之後,將預設時間點延後此特定時間差來修正第一參考1PPS信號RS的發送時間點。另外,當第一相位補償資訊414的MSB為0時,日時間電路614可在取得在第二期間T2中發送第一參考1PPS信號RS的預設時間點及由第一相位補償資訊414剩餘的31個位元指示的特定時間差之後,將預設時間點提前此特定時間差來修正第一參考1PPS信號RS的發送時間點。 In one embodiment, the time-of-day circuit 614 can correct the transmission time point of the first reference 1PPS signal RS based on the first phase compensation information 414 . For example, when the MSB of the first phase compensation information 414 is 1, the time-of-day circuit 614 can obtain the preset time point at which the first reference 1PPS signal RS is transmitted in the second period T2 and use the first phase compensation information 414 After the specific time difference indicated by the remaining 31 bits, the preset time point is delayed by the specific time difference to correct the sending time point of the first reference 1PPS signal RS. In addition, when the MSB of the first phase compensation information 414 is 0, the time-of-day circuit 614 can obtain the preset time point at which the first reference 1PPS signal RS is transmitted in the second period T2 and the remaining time from the first phase compensation information 414 After the specific time difference indicated by the 31 bits, the preset time point is advanced by the specific time difference to correct the transmission time point of the first reference 1PPS signal RS.

之後,處理電路222可依據日時間電路614提供的第一參考1PPS信號RS的修正後發送時間點來發送第一參考1PPS信號至主控裝置210。 Afterwards, the processing circuit 222 may send the first reference 1PPS signal to the main control device 210 according to the corrected sending time point of the first reference 1PPS signal RS provided by the time-of-day circuit 614 .

相應地,主控裝置210可再依據在第二期間T2中接收第一參考1PPS信號RS的情形而適應性地調整對應於第i+1秒鐘的同步信號框中的第二相位補償資訊的內容,其細節於此不另贅述。 Correspondingly, the main control device 210 can then adaptively adjust the second phase compensation information in the synchronization signal frame corresponding to the i+1th second according to the situation of receiving the first reference 1PPS signal RS in the second period T2. content, and its details will not be repeated here.

在一實施例中,在僕裝置220取得第一1PPS信號412、信號頻率FS及系統日時間ST之後,僕裝置220可據以執行同步 操作,以試圖同步於主控裝置210,但可不限於此。 In one embodiment, after the slave device 220 obtains the first 1PPS signal 412 , the signal frequency FS and the system day time ST, the slave device 220 can perform synchronization accordingly operation in an attempt to synchronize with the master device 210, but not limited thereto.

在一些實施例中,第i秒鐘還可更包括圖4所示的第三期間T3,而此第三期間T3位於第i秒鐘的第二期間T2與第i+1秒鐘的同步信號框F2的第一期間之間,而主控裝置210及僕裝置220可皆不在第三期間T3中進行傳送/接收,但可不限於此。此外,在一實施例中,主控裝置210可在第三期間T3中只傳送頻率訊號(例如是工作週期的50%)至僕裝置220,藉以讓僕裝置220據以與主控裝置210維持頻率同步。 In some embodiments, the ith second may further include the third period T3 shown in FIG. 4 , and the third period T3 is located between the second period T2 of the ith second and the synchronization signal of the ith+1th second During the first period of the frame F2, neither the master device 210 nor the slave device 220 may transmit/receive in the third period T3, but it is not limited thereto. In addition, in one embodiment, the master device 210 may only transmit the frequency signal (eg, 50% of the duty cycle) to the slave device 220 in the third period T3, so that the slave device 220 can maintain the relationship with the master device 210 accordingly. frequency synchronization.

此外,在一些實施例中,雖主控裝置210在第二期間T2中未發送信號給僕裝置220,但僕裝置220的鎖相迴路612可進入維時(holdovcr)模式,藉以在第二期間T2中保持與主控裝置210的同步。 In addition, in some embodiments, although the master device 210 does not send a signal to the slave device 220 in the second period T2, the phase-locked loop 612 of the slave device 220 can enter the holdovcr mode, so that the second period T2 The synchronization with the master device 210 is maintained in T2.

綜上所述,本新型的實施例可讓主控裝置及僕裝置在僅透過單一同步串列匯流排連接的情況下,仍能雙向地進行溝通。例如,主控裝置可依據僕裝置在前一秒鐘反饋第一參考1PPS信號RS的情況,相應地決定下一秒鐘提供給僕裝置的相位補償資訊。藉此,可讓僕裝置依據相位補償資訊修正發送第一參考1PPS信號的時間點,進而使主控裝置及僕裝置彼此達到較佳的同步效果。 To sum up, the embodiment of the present invention enables the master device and the slave device to communicate bidirectionally under the condition that the master device and the slave device are only connected through a single synchronous serial bus. For example, the master device can accordingly determine the phase compensation information to be provided to the slave device in the next second according to the situation of the first reference 1PPS signal RS fed back by the slave device in the previous second. In this way, the slave device can correct the time point of sending the first reference 1PPS signal according to the phase compensation information, so that the master device and the slave device can achieve better synchronization effect with each other.

雖然本新型已以實施例揭露如上,然其並非用以限定本新型,任何所屬技術領域中具有通常知識者,在不脫離本新型的精神和範圍內,當可作些許的更動與潤飾,故本新型的保護範圍當視後附的申請專利範圍所界定者為準。 Although the present invention has been disclosed above with the embodiments, it is not intended to limit the present invention. Anyone with ordinary knowledge in the technical field can make some changes and modifications without departing from the spirit and scope of the present invention. The scope of protection of this new model shall be determined by the scope of the appended patent application.

200:同步系統 200: Sync System

210:主控裝置 210: Master control device

211:補償估計電路 211: Compensation Estimation Circuit

212:處理電路 212: Processing Circuits

213:日時間電路 213: Day Time Circuit

220:僕裝置 220: Servant Device

221:接收器 221: Receiver

222:處理電路 222: Processing circuit

F1:同步信號框 F1: Sync signal box

RS:第一參考1PPS信號 RS: first reference 1PPS signal

SC1:系統時鐘信號 SC1: system clock signal

ET:外部日時間 ET: External Day Time

Claims (11)

一種主控裝置,包括: 一處理電路,其經配置以: 在第i秒鐘的第一期間中,發送一同步信號框至一僕裝置,其中該同步信號框包括一同步標頭、一第一一秒脈衝(a pulse per second,1PPS)信號、第一日時間資訊及第一相位補償資訊,其中該第一相位補償資訊用以要求該僕裝置修正在所述第i秒鐘的第二期間中發送一第一參考1PPS信號的一發送時間點; 一補償估計電路,其耦接該處理電路,並經配置以: 在所述第i秒鐘的該第二期間中從該僕裝置接收該第一參考1PPS信號; 依據接收該第一參考1PPS信號的一接收時間點決定在第i+1秒鐘的第一期間中發送至該僕裝置的一第二相位補償資訊。 A main control device, comprising: a processing circuit configured to: During the first period of the ith second, a synchronization signal frame is sent to a slave device, wherein the synchronization signal frame includes a synchronization header, a first pulse per second (1PPS) signal, a first time-of-day information and first phase compensation information, wherein the first phase compensation information is used to request the slave device to correct a sending time point of sending a first reference 1PPS signal during the second period of the i-th second; a compensation estimation circuit coupled to the processing circuit and configured to: receiving the first reference 1PPS signal from the slave device during the second period of the ith second; A second phase compensation information sent to the slave device in the first period of the i+1th second is determined according to a reception time point of the first reference 1PPS signal. 如請求項1所述的主控裝置,其中該補償估計電路經配置以: 取得所述第i秒鐘的該第二期間中的一預設時間點; 取得該接收時間點與該預設時間點之間的一特定時間差; 基於該特定時間差決定該第二相位補償資訊。 The master device of claim 1, wherein the compensation estimation circuit is configured to: obtaining a preset time point in the second period of the i-th second; obtaining a specific time difference between the receiving time point and the preset time point; The second phase compensation information is determined based on the specific time difference. 如請求項2所述的主控裝置,其中該補償估計電路經配置以: 反應於判定該接收時間點超前該預設時間點達該特定時間差,將該第二相位補償資訊設定為用於要求該僕裝置在所述第i+1秒鐘的第二期間中延後該特定時間差發送該第一參考1PPS信號; 反應於判定該接收時間點落後該預設時間點達該特定時間差,將該第二相位補償資訊設定為用於要求該僕裝置在所述第i+1秒鐘的該第二期間中提前該特定時間差發送該第一參考1PPS信號。 The master device of claim 2, wherein the compensation estimation circuit is configured to: In response to determining that the receiving time point is ahead of the preset time point by the specific time difference, the second phase compensation information is set to be used to request the slave device to delay the specific time during the second period of the i+1th second The time difference sends the first reference 1PPS signal; In response to determining that the receiving time point is behind the preset time point by the specific time difference, the second phase compensation information is set to be used to request the slave device to advance the second period in the i+1th second The first reference 1PPS signal is transmitted at a specific time difference. 如請求項2所述的主控裝置,其中該補償估計電路經配置以: 在該同步信號框的結束時間之後加上一預設保護時間作為所述第i秒鐘的該第二期間中的該預設時間點。 The master device of claim 2, wherein the compensation estimation circuit is configured to: A preset protection time is added after the end time of the synchronization signal frame as the preset time point in the second period of the ith second. 如請求項1所述的主控裝置,更包括耦接於該處理電路的一日時間電路,其中該日時間電路經配置以: 取得對應於所述第i秒鐘的一外部日時間,並據以決定該第一日時間資訊的一第一成分; 基於一系統時鐘信號估計該第一日時間資訊的一第二成分。 The main control device of claim 1, further comprising a time of day circuit coupled to the processing circuit, wherein the time of day circuit is configured to: obtaining an external time of day corresponding to the ith second, and determining a first component of the first time of day information accordingly; A second component of the first time of day information is estimated based on a system clock signal. 如請求項5所述的主控裝置,其中該外部日時間包括一紀元時間,且該日時間電路經配置以使用該紀元時間作為該第一日時間資訊的該第一成分。The master device of claim 5, wherein the external time of day includes an epoch time, and the time of day circuit is configured to use the epoch time as the first component of the first time of day information. 如請求項5所述的主控裝置,其中該系統時鐘信號包括多個脈波,且該日時間電路經配置以: 反應於偵測到該系統時鐘信號的該些脈波的其中之一,遞增一第一計數值,並以該第一計數值作為該第一日時間資訊的該第二成分。 The master device of claim 5, wherein the system clock signal includes a plurality of pulses, and the time of day circuit is configured to: In response to detecting one of the pulse waves of the system clock signal, a first count value is incremented, and the first count value is used as the second component of the first time of day information. 如請求項1所述的主控裝置,其中該同步信號依序包括該同步標頭、該第一1PPS信號、該第一日時間資訊及該第一相位補償資訊。The master control device of claim 1, wherein the synchronization signal sequentially includes the synchronization header, the first 1PPS signal, the first time of day information, and the first phase compensation information. 一種僕裝置,包括: 一接收器,其經配置以: 在第i秒鐘的第一期間中,從一主控裝置接收一同步信號框,其中該同步信號框包括一同步標頭、一第一一秒脈衝(a pulse per second,1PPS)信號、第一日時間資訊及第一相位補償資訊; 一處理電路,其耦接於該接收器,並經配置以: 依據該第一相位補償資訊修正在所述第i秒鐘的第二期間中發送一第一參考1PPS信號的一發送時間點; 在所述第i秒鐘的該第二期間的該發送時間點發送該第一參考1PPS信號至該主控裝置。 A slave device, comprising: a receiver configured to: During the first period of the ith second, a synchronization signal frame is received from a master control device, wherein the synchronization signal frame includes a synchronization header, a first pulse per second (1PPS) signal, a first pulse per second (1PPS) signal, and a Time of day information and first phase compensation information; a processing circuit coupled to the receiver and configured to: correcting a sending time point of sending a first reference 1PPS signal in the second period of the ith second according to the first phase compensation information; The first reference 1PPS signal is sent to the master device at the sending time point of the second period of the ith second. 如請求項9所述的僕裝置,其中該處理電路經配置以: 取得在所述第i秒鐘的該第二期間中發送該第一參考1PPS信號的一預設時間點; 反應於判定該第一相位補償資訊指示延後一特定時間差發送該第一參考1PPS信號,將該預設時間點延後該特定時間差作為該發送時間點; 反應於判定該第一相位補償資訊指示提前該特定時間差發送該第一參考1PPS信號,將該預設時間點提前該特定時間差作為該發送時間點。 The slave device of claim 9, wherein the processing circuit is configured to: obtaining a preset time point at which the first reference 1PPS signal is sent in the second period of the ith second; In response to determining that the first phase compensation information indicates that the first reference 1PPS signal is sent after a specific time difference, the predetermined time point is delayed by the specific time difference as the sending time point; In response to determining that the first phase compensation information indicates that the first reference 1PPS signal is sent ahead of the specific time difference, the predetermined time point is advanced by the specific time difference as the sending time point. 如請求項10所述的僕裝置,其中該處理電路經配置以: 在該同步信號框的結束時間之後加上一預設保護時間作為該預設時間點。 The slave device of claim 10, wherein the processing circuit is configured to: A preset protection time is added as the preset time point after the end time of the synchronization signal frame.
TW110213458U 2021-11-15 2021-11-15 Master device and slave device TWM628940U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW110213458U TWM628940U (en) 2021-11-15 2021-11-15 Master device and slave device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW110213458U TWM628940U (en) 2021-11-15 2021-11-15 Master device and slave device

Publications (1)

Publication Number Publication Date
TWM628940U true TWM628940U (en) 2022-07-01

Family

ID=83437253

Family Applications (1)

Application Number Title Priority Date Filing Date
TW110213458U TWM628940U (en) 2021-11-15 2021-11-15 Master device and slave device

Country Status (1)

Country Link
TW (1) TWM628940U (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI809564B (en) * 2021-11-15 2023-07-21 優達科技股份有限公司 Synchronization correction method, master device and slave device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI809564B (en) * 2021-11-15 2023-07-21 優達科技股份有限公司 Synchronization correction method, master device and slave device

Similar Documents

Publication Publication Date Title
US11272465B2 (en) Methods and apparatus for synchronization of media playback within a wireless network
US11177896B2 (en) Time synchronization device and time synchronization method
KR102278867B1 (en) Method of synchronising clocks of network devices
US7251199B2 (en) Distributed system time synchronization including a timing signal path
WO2014083725A1 (en) Synchronization apparatus, synchronization system, wireless communication apparatus and synchronization method
WO2011131556A1 (en) Update of a cumulative residence time of a packet in a packet-switched communication network
CN103763055A (en) Method for precise time synchronization
US20160087738A1 (en) Time synchronization slave apparatus capable of adjusting time synchronization period, and method of determining time synchronization period
JP2012222833A (en) System and method to overcome wander accumulation to achieve precision clock distribution over large networks
GB2586175A9 (en) System for timestamping events on edge devices
JPH024172B2 (en)
CN104243079A (en) Microsecond clock synchronization method for real-time Ethernet
JP2007282093A (en) Apparatus and method for clock signal generation
TWM628940U (en) Master device and slave device
KR101730313B1 (en) Network system, time master station, and time slave station
WO2018099375A1 (en) Synchronization method, synchronization device, synchronization apparatus and communication system
CN101686093A (en) Transmission network clock synchronizing method, equipment and system
US20230164725A1 (en) Synchronization correction method, master device and slave device
TWI809564B (en) Synchronization correction method, master device and slave device
CN111092713A (en) Clock synchronization device and clock synchronization method
CN113359948A (en) Time synchronization device and synchronization method
CN114513273A (en) Method and device for realizing PTP chip clock module
CN107911207A (en) A kind of periodic signal synchronous method based on time adjustment
JP2022119409A (en) Information processing device
JPH0542209B2 (en)