CN102638339B - Method and device for realizing precision time synchronization - Google Patents

Method and device for realizing precision time synchronization Download PDF

Info

Publication number
CN102638339B
CN102638339B CN201210118205.0A CN201210118205A CN102638339B CN 102638339 B CN102638339 B CN 102638339B CN 201210118205 A CN201210118205 A CN 201210118205A CN 102638339 B CN102638339 B CN 102638339B
Authority
CN
China
Prior art keywords
time
plug
event message
message
ptp event
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.)
Active
Application number
CN201210118205.0A
Other languages
Chinese (zh)
Other versions
CN102638339A (en
Inventor
赵里遥
梁学伟
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.)
New H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201210118205.0A priority Critical patent/CN102638339B/en
Publication of CN102638339A publication Critical patent/CN102638339A/en
Application granted granted Critical
Publication of CN102638339B publication Critical patent/CN102638339B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)
  • Small-Scale Networks (AREA)
  • Electric Clocks (AREA)

Abstract

The invention provides a method and device for realizing precision time synchronization. The method comprises the following steps of: receiving and/or transmitting a PTP (point-to-point) event message; when the PTP event message flows through each plug-in device of a 1588 protocol processing device, if the residence time of each plug-in device needs measuring, measuring the PTP event message entering time and leaving time on each plug-in device, so that the transmission delay of the PTP event message between a transmitting end and a receiving end can be computed, and the residence time of the PTP event message on each plug-in device can be deducted according to the entering time and the leaving time. According to the invention, the precision of the time synchronization can be improved.

Description

A kind of method and apparatus for realizing exact time synchronization
Technical field
The present invention relates to exact time synchronization, particularly a kind of method and apparatus for realizing exact time synchronization.
Background technology
IEEE 1588 agreement (Precision Time Protocol, PTP, also i.e. Precision Time Protocol) be the Distributed Time synchronous protocol of a kind of regulation devices in system how phase mutually synchronization real-time time, there is the time synchronized performance of submicrosecond (us) level.In IEEE 1588 clock synchronization system, each clock is organized into principal and subordinate's hierarchical structure.Be master clock (Grand-Master clock) at the clock of level top layer, master clock determines the reference time of whole system.From clock by PTP event message mutual with master clock, use the clock of the temporal information adjustment self obtained in mutual PTP event message process consistent with the master clock in level.
IEEE 1588 clock synchronization system can adopt three kinds of clock models, is respectively: boundary clock (BC) model, end-to-end transmission clock (E2ETC) model and point-to-point transmission clock (P2PTC) model.
In BC model, PTP event message comprises synchronously (Sync) message and time delay request (Delay-Req) message two kinds, adjacent clock is respectively master clock and from clock, Sync message and Delay-Req message is used to carry out alternately from clock and master clock, and according to propagation delay time side-play amount computing time (offset) of the Sync message obtained in reciprocal process and Delay-Req message, the clock adjusting self according to offset value keeps clock consistent with master clock.
In E2ETC model, PTP event message comprises synchronously (Sync) message and time delay request (Delay-Req) message two kinds; Master clock and there is multiple transmission clock (TC) between clock, Sync message and Delay-Req message is used to carry out alternately from clock and master clock, and calculating offset value according to the propagation delay time of the Sync message obtained in reciprocal process and Delay-Req message, the clock adjusting self according to offset value keeps clock consistent with master clock.Carrying out in the process of PTP interacting message from clock and master clock, TC is responsible for forwarding PTP event message.Due to TC forward process is carried out to PTP event message time, relate to complicated storage forwarding processing procedure, the processing time is unstable, can cause Delay Variation, therefore, needs to measure the residence time of PTP event message in each TC.The residence time of this PTP event message on each TC is deducted from clock when calculating the propagation delay time of PTP event message, thus the factor introducing Delay Variation is removed.Therefore, the Sync message obtained from clock calculation and the propagation delay time of Delay-Req message only include this PTP event message at master clock with from the time delay all adjacent clock between clock.
In P2PTC model, PTP event message comprises Sync message, point-to-point time delay request (Pdelay-Req) message, point-to-point time delay request (Pdelay-Resp) message three kinds.Master clock and there is multiple TC between clock, master clock and use Sync message to carry out alternately from clock; Pdelay-Req message and Pdelay-Resp message is used to carry out alternately, to obtain the chain-circuit time delay between adjacent clock between adjacent clock.From clock when calculating the propagation delay time of Sync message, need master clock to deduct to from the chain-circuit time delay between any two adjacent clock between clock; In addition, based on the reason identical with E2ETC model, also by the residence time deduction of Sync message on each TC, thus make the propagation delay time obtained be from the time offset (offset) between clock and master clock, can directly be consistent according to this offset value self clock of adjustment and master clock.
In above-mentioned three kinds of models, when calculating the time offset between master clock from clock according to the propagation delay time of PTP event message, be all at master clock with from the stable hypothesis of the propagation delay time between clock based on PTP event message.
Current MAC chip and PHY chip support IEEE 1588 agreement mostly.In systems in practice, often connect multiple or multiple PHY by MAC chip, MAC chip realizes IEEE 1588 agreement, the synchronous demand of chip chamber can be reduced to a certain extent, and MAC chip is generally integrated with uCore now, for time synchronization implementation provides natural support, so realizing IEEE 1588 agreement on MAC is the scheme that a kind of cost performance is higher.In addition, in prior art, also can realize IEEE 1588 agreement on CPU.Be described to realize IEEE 1588 agreement on MAC below:
See Fig. 1; Fig. 1 is the configuration diagram realizing IEEE 1588 agreement on MAC; as shown in Figure 1; timestamp process is carried out between MAC layer and PHY layer; due to the plug-in devices such as MAC, field programmable gate array (FPGA), PHY usually can be increased between MAC chip and physical link; therefore, above-mentioned master clock and in fact include PTP event message on the plug-in device of the MAC of master clock, on physical link and from the time delay the plug-in device of the MAC of clock from the propagation delay time between clock.In present communication system, time delay on physical link is generally stable, but, the plug-in device of MAC but can introduce the Delay Variation to PTP event message, thus make above-mentionedly to be false based on master clock with from the hypothesis that the propagation delay time between clock is stable, cause on MAC, realize IEEE 1588 agreement unstable, inaccurate, and then cause timing tracking accuracy to decline.Equally, when CPU realizes IEEE 1588 agreement, due to the existence of the plug-in device of CPU, also there is same problem.
Summary of the invention
In view of this, the object of the present invention is to provide a kind of method for realizing exact time synchronization, application the method can improve the precision of time synchronized when realizing exact time synchronization.
In order to achieve the above object, the invention provides a kind of method for realizing exact time synchronization, the method comprises:
Receive and/or send PTP event message;
When described PTP event message flows through each plug-in device of 1588 protocol processes devices, if need the residence time measuring this plug-in device, then measure the entry time of described PTP event message on this plug-in device and time departure, in order to when calculating the propagation delay time of described PTP event message between transmitting terminal and receiving terminal, according to described entry time and time departure by the residence time deduction of described PTP event message on this plug-in device.
Present invention also offers a kind of device for realizing exact time synchronization, this device comprises: Transmit-Receive Unit, measuring unit; ;
Described Transmit-Receive Unit, for receiving and/or sending PTP event message;
Described measuring unit, for when described PTP event message flows through each plug-in device of 1588 protocol processes devices, if need the residence time measuring this plug-in device, then measure the entry time of described PTP event message on this plug-in device and time departure, in order to when calculating the propagation delay time of described PTP event message between transmitting terminal and receiving terminal, according to described entry time and time departure by the residence time deduction of described PTP event message on this plug-in device.
From technical scheme above, in the present invention, when receiving and/or send PTP event message, when PTP event message flows through each plug-in device needing the 1588 protocol processes devices measuring residence time, measure entry time on this plug-in device of PTP event message and time departure, and accordingly when calculating propagation delay time between transmitting terminal and receiving terminal of PTP event message by the time delay deduction of PTP event message on this plug-in device, thus the precision of time synchronized can be improved when realizing exact time synchronization.
Accompanying drawing explanation
Fig. 1 is the configuration diagram that prior art realizes IEEE 1588 agreement on MAC;
Fig. 2 is that the embodiment of the present invention is for realizing the method flow diagram of exact time synchronization;
Fig. 3 is that the embodiment of the present invention is for realizing the structural representation of the device of exact time synchronization.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, to develop simultaneously embodiment below in conjunction with accompanying drawing, technical scheme of the present invention is described in detail.
See Fig. 2, Fig. 2 be the embodiment of the present invention for realizing the method flow diagram of exact time synchronization, comprise the following steps:
Step 201, reception and/or transmission PTP event message.
Step 202, when described PTP event message flows through each plug-in device of 1588 protocol processes devices, if need the residence time (time delay also namely in this plug-in device) measuring this plug-in device, then measure the entry time of described PTP event message on this plug-in device and time departure, in order to when calculating the propagation delay time of described PTP event message between transmitting terminal and receiving terminal, according to described entry time and time departure by the residence time deduction of described PTP event message on this plug-in device.
In this step, described 1588 protocol processes devices can be MAC, also can be CPU.When realizing accurate time synchronization protocol on MAC, described 1588 protocol processes devices are MAC; When realizing accurate time synchronization protocol on CPU, described 1588 protocol processes devices are CPU.
In the embodiment of the present invention shown in Fig. 2, in order to measure the entry time of PTP event message in the plug-in device of 1588 protocol processes devices and time departure, a Time Stamp Counter can be set in each plug-in device needing measurement residence time, when described PTP event message enters this plug-in device, Time Stamp Counter value in this plug-in device can be sampled, and then determine the entry time of PTP time message; When described PTP event message leaves this plug-in device, the Time Stamp Counter value in this plug-in device can be sampled, and then determine the time departure of PTP time message.
Here, the counting mode of Time Stamp Counter can have multiple, such as, can count from 0 when PTP event message enters plug-in device, also can continue to count, no matter adopt which kind of counting mode, the time departure of PTP event message and the time interval of entry time all can not be affected.
The method that residence time on PTP event message outside hanging device part is deducted from the propagation delay time of PTP event message is had multiple, such as, the Correction filed territory of PTP event message can be utilized, residence time in PTP event message outside hanging device part is added up, particularly, when PTP event message enters plug-in device, entry time is deducted from Correction filed territory, when PTP event message leaves plug-in device, time departure is added in Correction filed territory.Suppose that T1 is the local zone time of PTP event message plug-in device when entering plug-in device, T2 is the local zone time of PTP event message plug-in device when leaving plug-in device, then the method that the application calculates the residence time of each plug-in device can simply be expressed as:
Residence time=-T1+T2=T2-T1 that plug-in device produces at every turn.
When in each plug-in device needing measurement residence time, setup times stabs counter, the timing of the Time Stamp Counter in each plug-in device can be inconsistent, but count frequency needs to be consistent, count frequency is unanimously consistent in order to ensure each plug-in device accuracy of timekeeping, thus can eliminate the residence time that PTP event message produces in each plug-in device.
In IEEE 1588 clock synchronization system, achieve the synchronous of high accuracy frequency, therefore, the high accuracy frequency in IEEE 1588 clock synchronization system can be utilized, by synchronous with the high accuracy frequency holding frequency in described IEEE 1588 clock synchronization system, thus the count frequency realizing the Time Stamp Counter in each plug-in device of 1588 protocol processes devices is consistent.
The concrete grammar utilizing the high accuracy frequency in IEEE 1588 clock synchronization system to realize the count frequency of the Time Stamp Counter in each plug-in device of 1588 protocol processes devices consistent can be as follows:
Using the reference count frequency of the high accuracy frequency in IEEE 1588 clock synchronization system as the count frequency of Time Stamp Counter; Or, frequency multiplication, frequency division or servo are carried out to the high accuracy frequency in IEEE 1588 clock synchronization system, frequency multiplication, frequency division or servo are obtained the reference frequency of frequency as the count frequency of Time Stamp Counter.
In the embodiment of the present invention shown in Fig. 2, described plug-in device can be the hardware devices such as line card MAC, FPGA, PHY.In actual applications, can to PTP event message flow through the entry time of each plug-in device and time departure measure, also can only to the plug-in device that the propagation delay time of PTP event message can be caused change, (also namely the residence time of PTP event message changes hardware device greatly, PTP event message residence time is thereon change, but not fixed value) entry time and time departure measure, such as FPGA; And very little for the impact changed the propagation delay time of PTP event message, almost negligible plug-in device, then can not carry out the measurement of entry time and time departure, such as PHY.
Therefore, the described all plug-in device needing the plug-in device measuring residence time to comprise the 1588 protocol processes devices that PTP event message flows through; Or, the described all plug-in device needing the plug-in device measuring residence time to comprise the 1588 protocol processes devices that can cause the Delay Variation of PTP event message.
In the embodiment of the present invention shown in Fig. 2, described PTP event message specifically comprises: Sync message, Delay-Req message, Pdelay-Req message and Pdelay-Resp message.
In the application, by indicating each residence time in PTP event message, so that deduct the residence time that PTP event message produces on the plug-in device of each 1588 protocol processes devices in time synchronized correlation computations, improve time precision.The application is applicable to the various application scenarioss of 1588 time synchronized, comprises BC model, E2ETC model and P2PTC model.Below the residence time in PTP event message outside hanging device part is called time delay, below to realize exact time synchronization on MAC, is illustrated for the application of the embodiment of the present invention shown in Fig. 2 in IEEE 1588 clock synchronization system.
First, situation during BC model is adopted to be described to IEEE 1588 clock synchronization system:
In this case, master clock and comprise Sync message and Delay-Req message from the PTP message that clock is mutual, and in reciprocal process, obtain transmitting time and the time of reception of Sync message and Delay-Req message, and obtain the propagation delay time of Sync message and Delay-Req message accordingly.
Do not applying in situation of the present invention, when realizing exact time synchronization in MAC layer, the propagation delay time of Sync message and Delay-Req message includes message on the plug-in device of the MAC of master clock, on physical link and from the time delay the plug-in device of the MAC of clock, due to master clock and from the time delay instability the plug-in device of the MAC of clock, therefore, finally according to the propagation delay time of Sync message and Delay-Req message calculate inaccurate from the time offset of clock and master clock, cause timing tracking accuracy to decline.
When the method for the embodiment of the present invention shown in application drawing 2, master clock can measure the time delay of this Sync message on the plug-in device of all MAC of self in transmission Sync message, measures the time delay of this Delay-Req message on the plug-in device of all MAC of self when receiving Delay-Req message.In like manner, the time delay of this Sync message on the plug-in device of all MAC of self can being measured in reception Sync message from clock, measuring the time delay of this Delay-Req message on the plug-in device of all MAC of self when sending Delay-Req message.
The Sync message and the time delay of Delay-Req message on the plug-in device of all MAC of master clock that master clock measures can be obtained from clock, thus can by Sync message and the Delay-Req message time delay on the plug-in device of the MAC of master clock and from the time delay deduction on the plug-in device of the MAC of clock when calculating the propagation delay time of Sync message and Delay-Req message.Like this, the Sync message obtained from clock calculation and the propagation delay time of Delay-Req message only is included in master clock and from the time delay the physical link between clock.Because the time delay on physical link is stablized, therefore, after application the present invention, set up based on master clock with from the hypothesis that the propagation delay time between clock is stable, thus, according to the propagation delay time of Sync message and Delay-Req message calculate accurate from the time offset of clock and master clock, it can thus be appreciated that application the present invention can improve timing tracking accuracy.
Secondly, situation during E2ETC model is adopted to be described to IEEE 1588 clock synchronization system:
In this case, master clock and comprise Sync message and Delay-Req message from the PTP message that clock is mutual, and in reciprocal process, obtain transmitting time and the time of reception of Sync message and Delay-Req message.In addition, master clock and also there is one or more TC between clock, each TC measures at the residence time of the machine Sync message and Delay-Req message.When calculating the propagation delay time of Sync message and Delay-Req message from clock according to the transmitting time of Sync message and Delay-Req message and time of reception, the residence time deduction in each TC by Sync message and Delay-Req message.
Do not applying in situation of the present invention, when realizing exact time synchronization in MAC layer, the propagation delay time of Sync message and Delay-Req message includes message on the plug-in device of the MAC of master clock, on physical link and from the time delay the plug-in device of the MAC of clock.In addition, because TC carries out timestamp process in MAC layer, therefore, the propagation delay time of Sync message and Delay-Req message also comprises receive time delay on the plug-in device of MAC of each TC flowed through of Sync message and Delay-Req message and transmission delay.Due to master clock, unstable from the time delay the plug-in device of MAC of clock and TC, therefore, finally according to the propagation delay time of Sync message and Delay-Req message calculate inaccurate from the time offset of clock and master clock, cause timing tracking accuracy to decline.
After the method for the embodiment of the present invention shown in application drawing 2, master clock can measure the time delay of this Sync message on the plug-in device of all MAC of self in transmission Sync message, measures the time delay of this Delay-Req message on the plug-in device of all MAC of self when receiving Delay-Req message.In like manner, the time delay of this Sync message on the plug-in device of all MAC of self can being measured in reception Sync message from clock, measuring the time delay of this Delay-Req message on the plug-in device of all MAC of self when sending Delay-Req message.In addition, TC can measure Sync message and the time delay of Delay-Req message on the plug-in device of all MAC of self when receiving and send Sync message and Delay-Req message.
Sync message and the time delay of Delay-Req message on the plug-in device of all MAC of master clock of master clock measurement can be obtained from clock, and receive time delay on the plug-in device of MAC of each TC flowed through and transmission delay, thus when calculating the propagation delay time of Sync message and Delay-Req message can by Sync message and Delay-Req message the time delay on the plug-in device of the MAC of master clock, receive time delay on each TC flowed through and transmission delay, and deducting from the time delay on the plug-in device of the MAC of clock, like this, the Sync message obtained and the propagation delay time of Delay-Req message only are included in master clock and from the time delay the physical link between all adjacent clock between clock.Because the time delay on physical link is stablized, therefore, after application the present invention, set up based on master clock with from the hypothesis that the propagation delay time between clock is stable, thus, according to the propagation delay time of Sync message and Delay-Req message calculate accurate from the time offset of clock and master clock, it can thus be appreciated that application the present invention can improve timing tracking accuracy.
Finally, situation during P2PTC model is adopted to be described to IEEE 1588 clock synchronization system:
In this case, master clock and comprise Sync message from the PTP message that clock is mutual, and in reciprocal process, obtain transmitting time and the time of reception of Sync message.In addition, master clock and also there is one or more TC between clock, each TC measures the residence time of Sync message in the machine.Master clock and comprise Pdelay-Req message and Pdelay-Resp message from mutual PTP message between any two adjacent clock between clock, can obtain the propagation delay time between adjacent clock by mutual Pdelay-Req message and Pdelay-Resp message.When calculating the propagation delay time of Sync message from clock according to the transmitting time of Sync message and time of reception, by the residence time of Sync message in each TC and the master clock flowed through with from the time delay deduction the physical link between all adjacent clock between clock.
Not applying in situation of the present invention, when realizing exact time synchronization in MAC layer, the propagation delay time of the Sync message obtained from clock calculation is exactly in fact the time offset from clock and master clock.But, the propagation delay time obtained by mutual Pdelay-Req message and Pdelay-Resp message due to adjacent clock is inaccurate (when adopting BC model with IEEE 1588 clock synchronization system, master clock and the master clock obtained by mutual Sync message and Delay-Req message from clock and identical from the inaccurate reason of the propagation delay time between clock, be all because the propagation delay time obtained include the time delay of PTP event message on the plug-in device of the MAC of two ends clock, and the time delay on the plug-in device of MAC is unstable), therefore, the adjacent clock time offset finally calculated according to the propagation delay time of Sync is also inaccurate, timing tracking accuracy is caused to decline.
When the method for the embodiment of the present invention shown in application drawing 2, master clock can measure the time delay of this Sync message on the plug-in device of all MAC of self in transmission Sync message.In like manner, the time delay of this Sync message on the plug-in device of all MAC of self can be measured when receiving Sync message from clock.In addition, TC can measure the time delay of Sync message on the plug-in device of all MAC of self when receiving and send Sync message.In addition, the propagation delay time calculated by mutual Pdelay-Req message and Pdelay-Resp message between adjacent clock also only includes the time delay on the physical link between adjacent clock.
The time delay of Sync message on the plug-in device of the MAC of master clock, time delay on each TC flowed through (can be comprised the time delay on each protocol stack of more than the MAC layer of Sync message at TC from clock when calculating Sync message transmission time delay, and reception on the plug-in device of all MAC and transmission delay), at master clock with from the time delay the physical link between all adjacent clock between clock and from the time delay deduction on the plug-in device of the MAC of clock, like this, the propagation delay time of the Sync message obtained is exactly correct time side-play amount.It can thus be appreciated that application the present invention can improve timing tracking accuracy.
Above the embodiment of the present invention being described in detail for the method realizing exact time synchronization, having present invention also offers a kind of device for realizing exact time synchronization.
See Fig. 3, Fig. 3 be the embodiment of the present invention for realizing the structural representation of the device of exact time synchronization, this device comprises: Transmit-Receive Unit 301, measuring unit 302; Wherein,
Transmit-Receive Unit 301, for receiving and/or sending PTP event message;
Measuring unit 302, for when described PTP event message flows through each plug-in device of 1588 protocol processes devices, if need the residence time measuring this plug-in device, then measure the entry time of described PTP event message on this plug-in device and time departure, in order to when calculating the propagation delay time of described PTP event message between transmitting terminal and receiving terminal, according to described entry time and time departure by the residence time deduction of described PTP event message on this plug-in device.
This device also comprises setting unit 303;
Described setting unit 303, for setup times stamp counter in each plug-in device needing measurement residence time;
Described measuring unit 302 is when measuring the entry time of described PTP event message on this plug-in device and time departure, for: when described PTP event message enters this plug-in device, Time Stamp Counter value in this plug-in device is sampled, determines the entry time of described PTP event message; When described PTP event message leaves this plug-in device, the Time Stamp Counter value in this plug-in device is sampled, determine the time departure of described PTP event message.
This device also comprises Frequency Synchronization unit 304, for synchronous with the high accuracy frequency holding frequency in described IEEE 1588 clock synchronization system;
Described setting unit 303 is needing the count frequency of the described Time Stamp Counter arranged in each plug-in device of measurement residence time with the high accuracy frequency in described IEEE 1588 clock synchronization system for reference frequency;
Or,
Described setting unit 303 is needing to measure the count frequency of described Time Stamp Counter that arranges in each plug-in device of residence time with the frequency after carrying out frequency multiplication, frequency division or servo to the high accuracy frequency in described IEEE 1588 clock synchronization system for reference frequency.
Described plug-in device comprises: MAC, FPGA, PHY;
The described all plug-in device needing the plug-in device measuring residence time to comprise the 1588 protocol processes devices that PTP event message flows through;
Or,
The described all plug-in device needing the plug-in device measuring residence time to comprise the 1588 protocol processes devices that can cause the Delay Variation of PTP event message.
Described PTP event message comprises: synchronous Sync message, time delay request Delay-Req message, point-to-point time delay request Pdelay-Req message, point-to-point DELAY RESPONSE Pdelay-Resp message.
Described 1588 protocol processes devices are MAC or CPU.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within the scope of protection of the invention.

Claims (8)

1., for realizing a method for exact time synchronization, be applied to IEEE 1588 clock synchronization system, it is characterized in that, the method comprises:
Receive and/or send PTP event message;
When described PTP event message flows through each plug-in device of 1588 protocol processes devices, if need the residence time measuring this plug-in device, then measure the entry time of described PTP event message on this plug-in device and time departure, in order to when calculating the propagation delay time of described PTP event message between transmitting terminal and receiving terminal, according to described entry time and time departure by the residence time deduction of described PTP event message on this plug-in device;
Wherein,
Need to be provided with Time Stamp Counter in each plug-in device of the 1588 protocol processes devices measuring residence time, and synchronous with the high accuracy frequency holding frequency in described IEEE 1588 clock synchronization system;
The method measuring the entry time of described PTP event message on this plug-in device and time departure is: when described PTP event message enters this plug-in device, Time Stamp Counter value in this plug-in device is sampled, determines the entry time of described PTP event message; When described PTP event message leaves this plug-in device, the Time Stamp Counter value in this plug-in device is sampled, determine the time departure of described PTP event message; The count frequency of described Time Stamp Counter with the high accuracy frequency in described IEEE 1588 clock synchronization system for reference frequency, or, to carry out the frequency after frequency multiplication, frequency division or servo for reference frequency to the high accuracy frequency in described IEEE 1588 clock synchronization system.
2. the method for realizing exact time synchronization according to claim 1, is characterized in that,
Described plug-in device comprises MAC, FPGA, PHY;
The described all plug-in device needing the plug-in device measuring residence time to comprise the 1588 protocol processes devices that PTP event message flows through;
Or,
The described all plug-in device needing the plug-in device measuring residence time to comprise the 1588 protocol processes devices that can cause the Delay Variation of PTP event message.
3. the method for realizing exact time synchronization according to claim 1, is characterized in that,
Described PTP event message comprises: synchronous Sync message, time delay request Delay-Req message, point-to-point time delay request Pdelay-Req message, point-to-point DELAY RESPONSE Pdelay-Resp message.
4. the method for realizing exact time synchronization according to claim 1, is characterized in that,
Described 1588 protocol processes devices are MAC or CPU.
5. for realizing a device for exact time synchronization, be applied to IEEE 1588 clock synchronization system, it is characterized in that, this device comprises: setting unit, Frequency Synchronization unit, Transmit-Receive Unit, measuring unit;
Described setting unit, for setup times stamp counter in each plug-in device needing the 1588 protocol processes devices measuring residence time;
Described Frequency Synchronization unit, for needing each plug-in device of the 1588 protocol processes devices measuring residence time synchronous with the high accuracy frequency holding frequency in described IEEE 1588 clock synchronization system; The count frequency of the described Time Stamp Counter that described each plug-in device is arranged with the high accuracy frequency in described IEEE 1588 clock synchronization system for reference frequency, or, to carry out the frequency after frequency multiplication, frequency division or servo for reference frequency to the high accuracy frequency in described IEEE 1588 clock synchronization system;
Described Transmit-Receive Unit, for receiving and/or sending PTP event message;
Described measuring unit, for when described PTP event message flows through each plug-in device of 1588 protocol processes devices, if need the residence time measuring this plug-in device, then measure the entry time of described PTP event message on this plug-in device and time departure, in order to when calculating the propagation delay time of described PTP event message between transmitting terminal and receiving terminal, according to described entry time and time departure by the residence time deduction of described PTP event message on this plug-in device;
Wherein, described measuring unit is when measuring the entry time of described PTP event message on this plug-in device and time departure, for: when described PTP event message enters this plug-in device, Time Stamp Counter value in this plug-in device is sampled, determines the entry time of described PTP event message; When described PTP event message leaves this plug-in device, the Time Stamp Counter value in this plug-in device is sampled, determine the time departure of described PTP event message.
6. the device for realizing exact time synchronization according to claim 5, is characterized in that,
Described plug-in device comprises: MAC, FPGA, PHY;
The described all plug-in device needing the plug-in device measuring residence time to comprise the 1588 protocol processes devices that PTP event message flows through;
Or,
The described all plug-in device needing the plug-in device measuring residence time to comprise the 1588 protocol processes devices that can cause the Delay Variation of PTP event message.
7. the device for realizing exact time synchronization according to claim 5, is characterized in that,
Described PTP event message comprises: synchronous Sync message, time delay request Delay-Req message, point-to-point time delay request Pdelay-Req message, point-to-point DELAY RESPONSE Pdelay-Resp message.
8. the device for realizing exact time synchronization according to claim 5, is characterized in that,
Described 1588 protocol processes devices are MAC or CPU.
CN201210118205.0A 2012-04-20 2012-04-20 Method and device for realizing precision time synchronization Active CN102638339B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210118205.0A CN102638339B (en) 2012-04-20 2012-04-20 Method and device for realizing precision time synchronization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210118205.0A CN102638339B (en) 2012-04-20 2012-04-20 Method and device for realizing precision time synchronization

Publications (2)

Publication Number Publication Date
CN102638339A CN102638339A (en) 2012-08-15
CN102638339B true CN102638339B (en) 2014-12-24

Family

ID=46622593

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210118205.0A Active CN102638339B (en) 2012-04-20 2012-04-20 Method and device for realizing precision time synchronization

Country Status (1)

Country Link
CN (1) CN102638339B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10349367B2 (en) * 2015-03-03 2019-07-09 Qualcomm Incorporated Methods and systems for synchronizing devices
CN106161121B (en) * 2015-03-24 2020-05-22 中兴通讯股份有限公司 Method, device and system for measuring message forwarding time delay
CN104731736A (en) * 2015-03-27 2015-06-24 深圳怡化电脑股份有限公司 Time synchronization device, method and system
CN111631737B (en) * 2020-05-14 2021-03-05 赛诺威盛科技(北京)有限公司 Method and device for generating synchronous pulse of CT system
CN112615694B (en) * 2020-12-11 2022-08-12 苏州盛科通信股份有限公司 Method and device for realizing network time synchronization
CN118101110A (en) * 2022-11-28 2024-05-28 中兴通讯股份有限公司 Method for processing time synchronization exception, time service terminal, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101827098A (en) * 2010-03-31 2010-09-08 中兴通讯股份有限公司 Processing method and device for time synchronization
CN102098155A (en) * 2011-03-18 2011-06-15 北京国智恒电力管理科技有限公司 Method for realizing sub-microsecond synchronization accuracy based on PTP (Precision Time Protocol)
CN102244572A (en) * 2011-07-18 2011-11-16 中兴通讯股份有限公司 Clock synchronization method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101827098A (en) * 2010-03-31 2010-09-08 中兴通讯股份有限公司 Processing method and device for time synchronization
CN102098155A (en) * 2011-03-18 2011-06-15 北京国智恒电力管理科技有限公司 Method for realizing sub-microsecond synchronization accuracy based on PTP (Precision Time Protocol)
CN102244572A (en) * 2011-07-18 2011-11-16 中兴通讯股份有限公司 Clock synchronization method and device

Also Published As

Publication number Publication date
CN102638339A (en) 2012-08-15

Similar Documents

Publication Publication Date Title
CN102638339B (en) Method and device for realizing precision time synchronization
CN102148652B (en) System and method for measuring network clock synchronization
CN103888237B (en) A kind of method and device for realizing synchronizing clock time
CN106027193B (en) For the clock synchronizing method of time calibration in network system, module, equipment and system
CN104836630B (en) IEEE1588 clock synchronization system and implementation method therefor
CN102332973B (en) Real-time communication and clock synchronization method of chain network
CN102136900B (en) Time synchronization method for passive optical network, device and system
US8819161B1 (en) Auto-syntonization and time-of-day synchronization for master-slave physical layer devices
JP5518191B2 (en) Method and system for optical transmission network carrying time synchronization protocol
CN102638324B (en) Method and device for realizing precise time synchronization
CN102082697A (en) Communication path asymmetric time delay measuring method, device and system
CN103795522B (en) The punctual compensation circuit of pulse per second (PPS) and method
CN103248471B (en) Clock synchronizing method based on PTP protocol Yu Reflective memory network
CN102394715A (en) Method and device for synchronizing clocks
CN110224778A (en) A kind of clock synchronizing method of distributed system
CN105306159A (en) Clock timestamp compensation method and clock timestamp compensation device
CN106603183A (en) Timestamp filtering method and device
CN104184534A (en) Method for achieving accuracy of transparent clock path delay of IEEE1588 protocol
CN103532693A (en) Time synchronizing device and method
CN103647614A (en) Method for reliably improving time synchronization precision based on IEEE1588 protocol
CN104486058A (en) PTP system time synchronization method and device
CN102710359B (en) Accurate clock frequency synchronizing method and device based on IEEE1588 (institute of electrical and electronics engineers)
CN107483136A (en) A kind of clock synchronizing method between fixed communication apparatus
CN101257361B (en) Method and net element for performing accurate time transmission through synchronous digital system network
CN102571253B (en) Method and equipment for implementing precise time synchronization

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Patentee after: Xinhua three Technology Co., Ltd.

Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base

Patentee before: Huasan Communication Technology Co., Ltd.

CP03 Change of name, title or address