TWM628940U - Master device and slave device - Google Patents
Master device and slave device Download PDFInfo
- 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
Links
Images
Landscapes
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
Description
本新型是有關於一種裝置間的同步機制,且特別是有關於一種主控裝置及僕裝置。 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
在一實施例中,主控裝置210包括補償估計電路211及處理電路212,其中處理電路212耦接於補償估計電路211。在一些實施例中,主控裝置210還可包括耦接於處理電路212的日時間電路213,但可不限於此。另外,僕裝置220包括彼此耦接的接收器221及處理電路222。
In one embodiment, the
在本新型的實施例中,主控裝置210及僕裝置220可協同實現本新型的同步校正方法,其細節詳述如下。
In the embodiment of the present invention, the
請參照圖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
在本新型的實施例中,主控裝置210及僕裝置220在每秒鐘的時間區間內所執行的操作原則大致相同/相似,故以下暫以第i秒鐘內所執行的操作為例作說明,但可不限於此。
In the embodiment of the present invention, the operation principles performed by the
首先,在步驟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
在本新型的實施例中,第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
請參照圖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
在一實施例中,處理電路212可在取得同步標頭411、第一1PPS信號412、第一日時間資訊413及第一相位補償資訊414的內容後,依先前提及的PWM機制將同步標頭411、第一1PPS信號412、第一日時間資訊413及第一相位補償資訊414編碼為對應的PWM信號並進行發送,但可不限於此。
In one embodiment, the
在一實施例中,同步標頭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
舉例而言,假設第一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
在一實施例中,主控裝置210可透過日時間電路213決定同步信號框F1中的第一日時間資訊413。在一實施例中,日時間電路213可在取得對應於第i秒鐘的外部日時間ET之後,據以決定第一日時間資訊413的第一成分413a。在一實施例中,所述外部日時間ET例如是紀元時間(epoch time),其可由日時間電路213從網路或其他類似的外部來源所取得,並用以作為第一日時間
資訊413的第一成分413a。在本新型的實施例中,在第一日時間資訊413的預設信號長度假設為80位元的情況下,第一成分413a例如可佔第一日時間資訊413的前48個位元,但可不限於此。
In one embodiment, the
在一實施例中,日時間電路213可基於系統時鐘信號SC1估計第一日時間資訊413的第二成分413b。在一實施例中,系統時鐘信號SC1可包括多個脈波,而這些脈波的週期例如可因應於系統時鐘信號SC1的頻率而決定。舉例而言,假設系統時鐘信號SC1的頻率為125MHz,則這些脈波的週期例如是8ns(即1/125M)。亦即,每8ns會出現一個脈波。
In one embodiment, the time of
在此情況下,反應於日時間電路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-
簡言之,第一日時間資訊413的第一成分413a可由日時間電路213基於外部日時間ET(其精度僅為秒)決定,而第一日時間資訊413的第二成分413b(其精度可達ns)可由日時間電路413自行計數而得,但可不限於此。
In short, the
在一實施例中,第一相位補償資訊414用以要求僕裝置220修正在所述第i秒鐘的第二期間T2中發送第一參考1PPS信號RS的發送時間點。
In one embodiment, the first
概略而言,僕裝置220在每秒鐘的第二期間中都經配置以在一預設時間點發送第一參考1PPS信號RS。在一實施例中,第一參考1PPS信號RS例如是1,而第二期間中的其他位元例如是0。換言之,若第二期間的長度經設定為N個位元,則此N個位元中僅有1個位元為1,其他位元皆為0,但可不限於此。
Roughly speaking, the
在一實施例中,若主控裝置210及僕裝置220雙方之間為完美同步,則主控裝置210將會在每秒鐘的第二期間中的預設時間點收到來自僕裝置220的第一參考1PPS信號RS。
In one embodiment, if the
然而,由於主控裝置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
因應於第一相位補償資訊414的內容,僕裝置220可在
第二期間T2中提前/延後發送第一參考1PPS信號RS,以試圖讓主控裝置210在第二期間T2的預設時間點接收到第一參考1PPS信號RS。
According to the content of the first
在一實施例中,補償估計電路211可取得第i-1秒鐘的第二期間中的預設時間點。在一實施例中,補償估計電路211可取得第i-1秒鐘的同步信號框,並在此同步信號框的結束時間之後加上預設保護時間作為第i-1秒鐘的第二期間中的預設時間點。在不同的實施例中,上述預設保護時間可依設計者的需求而定。
In one embodiment, the
在一實施例中,假設第二期間的長度經設定為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
因此,補償估計電路211可取得在第i-1秒鐘的第二期間中接收第一參考1PPS信號RS的接收時間點與上述預設時間點之間的特定時間差,並基於上述特定時間差決定第一相位補償資訊414。
Therefore, the
在一實施例中,反應於判定上述接收時間點超前預設時間點達特定時間差,補償估計電路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
另一方面,反應於判定上述接收時間點落後預設時間點達特定時間差,補償估計電路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
在一實施例中,假設第一相位補償資訊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
基此,在步驟S322中,僕裝置220的處理電路222依據第一相位補償資訊414修正在第i秒鐘的第二期間T2中發送第一參考1PPS信號RS的發送時間點。
Based on this, in step S322, the
在一實施例中,僕裝置220的處理電路222取得在第i秒鐘的第二期間T2中發送第一參考1PPS信號RS的預設時間點。在一實施例中,僕裝置220的處理電路222可在同步信號框F1的結束時間之後加上預設保護時間GT作為預設時間點PT,但可不限於此。
In one embodiment, the
之後,反應於判定第一相位補償資訊414指示延後特定時間差發送第一參考1PPS信號RS,處理電路222可將預設時間點PT延後特定時間差作為發送時間點PT’。例如,當第一相位補償資訊414的MSB為1時,處理電路222可依據第一相位補償資訊414剩餘的31個位元指示的特定時間差延後預設時間點PT。
Then, in response to determining that the first
另一方面,反應於判定第一相位補償資訊414指示提前特定時間差發送第一參考1PPS信號RS,處理器222可將預設時間點GT提前特定時間差作為發送時間點PT’。例如,當第一相位補償資訊414的MSB為0時,處理電路222可依據第一相位補償
資訊414剩餘的31個位元指示的特定時間差提前預設時間點PT。
On the other hand, in response to determining that the first
之後,在步驟S323中,僕裝置220的處理電路222在第i秒鐘的第二期間T2的發送時間點PT’發送第一參考1PPS信號RS至主控裝置210。相應地,在步驟S312中,主控裝置210的補償估計電路211在第i秒鐘的第二期間T2中從僕裝置220接收第一參考1PPS信號RS。
After that, in step S323, the
之後,在步驟S313中,補償估計電路211依據接收第一參考1PPS信號RS的接收時間點決定在第i+1秒鐘的第一期間中發送至僕裝置220的第二相位補償資訊。
Then, in step S313, the
在一實施例中,補償估計電路211決定第二相位補償資訊的方式與決定第一相位補償資訊414的方式類似。舉例而言,補償估計電路211取得第i秒鐘的第二期間T2中的預設時間點PT。例如,補償估計電路211可在同步信號框F1的結束時間之後加上預設保護時間GT作為第i秒鐘的第二期間T2中的預設時間點PT,但可不限於此。之後,補償估計電路211可取得此接收時間點與預設時間點PT之間的特定時間差,並基於此特定時間差決定第二相位補償資訊。
In one embodiment, the manner in which the
在一實施例中,反應於判定接收時間點超前預設時間點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
之後,主控裝置210即可再相應地產生對應於第i+1秒鐘的同步信號框F2,進而控制僕裝置220修正在第i+1秒鐘的第二期間中發送第一參考1PPS信號RS的發送時間點,但可不限於此。
After that, the
由上可知,本新型的實施例可讓主控裝置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
請參照圖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
在一實施例中,振盪器511例如是恆溫控制晶體振盪器(Oven Controlled Crystal Oscillator,OCXO)或是其他精準可控的時鐘信號產生器,並可用於提供本地時鐘信號LC1。
In one embodiment, the
在一實施例中,鎖相迴路512耦接於振盪器511、補償估計電路211、處理電路212及日時間電路213,並可實現為數位鎖相迴路(digital phase lock loop,DPLL)。在一實施例中,鎖相迴路512可接收外部時鐘信號EC、外部1PPS信號EP及來自振盪器511的本地時鐘信號LC1,並可據以產生系統時鐘信號SC1及第一1PPS信號412。
In one embodiment, the
在一實施例中,日時間電路213可從鎖相迴路512取得系統時鐘信號SC1及第一1PPS信號412,並依據先前的教示而決定日時間資訊413中的第二成分413b。
In one embodiment, the time-of-
在一實施例中,補償估計電路211可依據在第i-1秒鐘的第二期間所收到的第一參考1PPS信號RS而決定第一相位補償資訊414,並將第一相位補償資訊414提供予處理電路212。
In one embodiment, the
在一實施例中,處理電路212可在取得來自於日時間電路213的系統時鐘信號SC1及日時間資訊413、來自於鎖相迴路512的第一1PPS信號412及來自補償估計電路211的第一相位補償資訊414之後,透過例如PWM的機制而將上述資訊編碼為同步信號框F1。
In one embodiment, the
在一實施例中,雙向傳輸控制器513例如可連接於僕裝置220,並可用於控制主控裝置210與僕裝置220之間的雙向傳輸。舉例而言,在第i秒鐘的第一期間T1中,雙向傳輸控制器513例如可將主控裝置210與僕裝置220之間的同步串列匯流排切換低阻抗狀態(即俗稱的low-Z狀態),藉以讓處理電路212將所產
生的同步信號框F1發送至僕裝置220。
In one embodiment, the
另外,在第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
請參照圖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
在一實施例中,雙向傳輸控制器615可用於在每秒鐘的第一期間中從主控裝置210接收對應的同步信號框,並在第二期間中將處理電路222提供的第一參考1PPS信號RS發送至主控裝置210。
In one embodiment, the
在一實施例中,接收器211可包括鎖相迴路612、解碼器613及日時間電路614。在一實施例中,在第i秒鐘的第一期間T1,解碼器613例如可在從雙向傳輸控制器615取得來自主控裝置210的同步信號框F1之後,解碼同步信號框F1以取得第一1PPS信號412、日時間資訊413、第一相位補償資訊414及對應於同步信號框F1的信號頻率FS。
In one embodiment, the
在一實施例中,解碼器613可基於同步信號框F1中各個位元之間的時間差而估計同步信號框F1的信號頻率FS。舉例而言,假設同步信號框F1的位元之間的時間差為8ns,則解碼器613可經估計而得到同步信號框F1的信號頻率FS為125MHz(即1/8ns),但可不限於此。
In one embodiment, the
在一實施例中,振盪器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
在一實施例中,日時間電路614耦接於解碼器613及鎖相迴路612,並可從解碼器613接收日時間資訊413及第一相位補償資訊414,以及從鎖相迴路612接收系統時鐘信號SC1及第一參考1PPS信號RS。
In one embodiment, the time-of-
在一實施例中,日時間電路614可將日時間資訊413的第一成分413a作為系統日時間ST的第一時間成分(其精度為秒),再基於系統時鐘信號SC1及日時間資訊413的第二成分413b估計系統日時間ST的第二時間成分(其精度達ns)。
In one embodiment, the time-of-
舉例而言,依先前所言,第二成分413b係由日時間電路213經計數而得的第一計數值,而其數值(以K表示)即代表日時間電路213先前計數了幾個8ns。因此,日時間電路614可相應地
藉由計數K個8ns而得到系統日時間ST的第二時間成分。之後,日時間電路614可結合(例如相加)上述第一時間成分及第二時間成分而得到系統日時間ST,但可不限於此。
For example, as mentioned above, the
在一實施例中,日時間電路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-
之後,處理電路222可依據日時間電路614提供的第一參考1PPS信號RS的修正後發送時間點來發送第一參考1PPS信號至主控裝置210。
Afterwards, the
相應地,主控裝置210可再依據在第二期間T2中接收第一參考1PPS信號RS的情形而適應性地調整對應於第i+1秒鐘的同步信號框中的第二相位補償資訊的內容,其細節於此不另贅述。
Correspondingly, the
在一實施例中,在僕裝置220取得第一1PPS信號412、信號頻率FS及系統日時間ST之後,僕裝置220可據以執行同步
操作,以試圖同步於主控裝置210,但可不限於此。
In one embodiment, after the
在一些實施例中,第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
此外,在一些實施例中,雖主控裝置210在第二期間T2中未發送信號給僕裝置220,但僕裝置220的鎖相迴路612可進入維時(holdovcr)模式,藉以在第二期間T2中保持與主控裝置210的同步。
In addition, in some embodiments, although the
綜上所述,本新型的實施例可讓主控裝置及僕裝置在僅透過單一同步串列匯流排連接的情況下,仍能雙向地進行溝通。例如,主控裝置可依據僕裝置在前一秒鐘反饋第一參考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)
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)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI809564B (en) * | 2021-11-15 | 2023-07-21 | 優達科技股份有限公司 | Synchronization correction method, master device and slave device |
-
2021
- 2021-11-15 TW TW110213458U patent/TWM628940U/en unknown
Cited By (1)
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 |
---|---|---|
US20200267669A1 (en) | Methods and apparatus for synchronization of media playback within a wireless network | |
TWI693850B (en) | Method of synchronising clocks of network devices | |
US8576883B2 (en) | Measurement and adjustment of real-time values according to residence time in networking equipment without access to real time | |
US11177896B2 (en) | Time synchronization device and time synchronization method | |
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 | |
US20170195980A1 (en) | Synchronizing clocks in a network | |
JP2007282093A (en) | Apparatus and method for clock signal generation | |
GB2586175A9 (en) | System for timestamping events on edge devices | |
JPH024172B2 (en) | ||
TWM628940U (en) | Master device and slave device | |
WO2018099375A1 (en) | Synchronization method, synchronization device, synchronization apparatus and communication 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 | |
CN114520703B (en) | Clock drift compensation method and circuit for time synchronization between industrial network devices | |
CN113359948A (en) | Time synchronization device and synchronization method | |
JP7161505B2 (en) | Information communication system and information communication device | |
CN114513273A (en) | Method and device for realizing PTP chip clock module | |
CN107911207A (en) | A kind of periodic signal synchronous method based on time adjustment | |
CN117155507A (en) | Clock synchronization system and method | |
CN116647299A (en) | Time stamping for multiple synchronization domains in a network device | |
JPH02241321A (en) | Synchronous control system for sampling time |