CN111800212A - Timestamp jitter compensation method and device - Google Patents

Timestamp jitter compensation method and device Download PDF

Info

Publication number
CN111800212A
CN111800212A CN202010536368.5A CN202010536368A CN111800212A CN 111800212 A CN111800212 A CN 111800212A CN 202010536368 A CN202010536368 A CN 202010536368A CN 111800212 A CN111800212 A CN 111800212A
Authority
CN
China
Prior art keywords
timestamp
identification signal
clock
clock domain
sampling identification
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.)
Granted
Application number
CN202010536368.5A
Other languages
Chinese (zh)
Other versions
CN111800212B (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.)
Wuhan Changjiang Computing Technology Co ltd
Fiberhome Telecommunication Technologies Co Ltd
Original Assignee
Fiberhome Telecommunication 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 Fiberhome Telecommunication Technologies Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Priority to CN202010536368.5A priority Critical patent/CN111800212B/en
Publication of CN111800212A publication Critical patent/CN111800212A/en
Application granted granted Critical
Publication of CN111800212B publication Critical patent/CN111800212B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0682Clock or time synchronisation in a network by delay compensation, e.g. by compensation of propagation delay or variations thereof, by ranging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/004Synchronisation arrangements compensating for timing error of reception due to propagation delay

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The embodiment of the invention provides a timestamp jitter compensation method and a timestamp jitter compensation device, wherein the method comprises the following steps: performing clock synchronization on the timestamp sampling identification signal of the first system clock domain based on the 1588 clock to obtain a timestamp sampling identification signal of the 1588 clock domain; based on a system clock, performing clock synchronization on the timestamp sampling identification signal of the 1588 clock domain to obtain a timestamp sampling identification signal of a second system clock domain; and according to the interval period between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain, performing timestamp delay compensation. According to the time stamp jitter compensation method and device provided by the embodiment of the invention, the jitter of the time stamp is effectively compensated by amplifying the error caused by the synchronization of the time stamp sampling identification signal of the system clock domain and then carrying out discrimination compensation.

Description

Timestamp jitter compensation method and device
Technical Field
The present invention relates to the field of time synchronization technologies, and in particular, to a timestamp jitter compensation method and apparatus.
Background
With the advent of the 5G communication era, 5G communication has presented new requirements and challenges for time synchronization technology, and improving the accuracy of timestamps is a key to meeting the new requirements.
When the time stamp is processed, the problem of conversion from the time stamp sampling identification signal of a system clock domain or a local clock domain to the time stamp sampling identification signal of a 1588 clock domain exists, for a 1588 clock of 125MHz, the clock domain conversion error of the time stamp sampling identification signal is +/-8 ns, and the error can cause the jitter of the time stamp, so that the time synchronization performance is influenced.
In the prior art, a timestamp jitter compensation method includes increasing the frequency of a sampling clock, performing multiphase sampling and the like, but by increasing the frequency of the sampling clock and performing multiphase sampling, the time sequence requirement on an FPGA device is high, the selection requirement on components is high, and the cost is high.
Therefore, a new timestamp jitter compensation method is needed to solve the above problem.
Disclosure of Invention
In order to solve the problem that a clock domain conversion error of ± 8ns exists between a timestamp sampling identification signal of a system clock domain or a local clock domain and a timestamp sampling identification signal of a 1588 clock domain, which causes timestamp jitter, embodiments of the present invention provide a timestamp jitter compensation method and apparatus that overcome the above problem or at least partially solve the above problem.
In a first aspect, an embodiment of the present invention provides a timestamp jitter compensation method, including:
performing clock synchronization on the timestamp sampling identification signal of the first system clock domain based on the 1588 clock to obtain a timestamp sampling identification signal of the 1588 clock domain;
based on a system clock, performing clock synchronization on the timestamp sampling identification signal of the 1588 clock domain to obtain a timestamp sampling identification signal of a second system clock domain;
and according to the interval period between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain, performing timestamp delay compensation.
The clock synchronization is performed on the timestamp sampling identification signal of the first system clock domain based on the 1588 clock, so as to obtain the timestamp sampling identification signal of the 1588 clock domain, and the clock synchronization method includes:
and if the 1588 clock is in a metastable state area during clock synchronization, synchronously obtaining a timestamp sampling identification signal of the 1588 clock domain in the second clock period, and recording the timestamp sampling identification signal of the 1588 clock domain obtained synchronously in the second clock period as the timestamp sampling identification signal of the first 1588 clock domain.
The clock synchronization is performed on the timestamp sampling identification signal of the first system clock domain based on the 1588 clock, so as to obtain the timestamp sampling identification signal of the 1588 clock domain, and the method further includes:
and if the 1588 clock is not in the metastable state region during clock synchronization, synchronously obtaining a timestamp sampling identification signal of the 1588 clock domain in the first clock period, and marking the timestamp sampling identification signal of the 1588 clock domain obtained synchronously in the first clock period as a timestamp sampling identification signal of the second 1588 clock domain.
Wherein, according to the interval period between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain, performing timestamp delay compensation, comprises:
and if the phase interval between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain is a theoretical value x, performing delay processing on the timestamp according to the clock period.
Wherein, according to the interval period between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain, performing timestamp delay compensation, further comprising:
and if the phase interval between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain is the phase of adding 1 clock cycle to the theoretical value x, keeping the timestamp unchanged.
Second aspect an embodiment of the present invention further provides a timestamp jitter compensation apparatus, including:
the 1588 clock synchronization module is used for performing clock synchronization on the timestamp sampling identification signal of the first system clock domain based on the 1588 clock to obtain a timestamp sampling identification signal of the 1588 clock domain;
the system clock synchronization module is used for performing clock synchronization on the timestamp sampling identification signal of the 1588 clock domain based on a system clock to obtain a timestamp sampling identification signal of a second system clock domain;
and the timestamp compensation module is used for performing timestamp delay compensation according to the interval period between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain.
Wherein, the 1588 clock synchronization module comprises:
a metastable state area synchronizing unit, configured to, if the 1588 clock is in a metastable state area during clock synchronization, obtain a timestamp sampling identification signal of the 1588 clock domain in the second clock cycle in synchronization, and record the timestamp sampling identification signal of the 1588 clock domain obtained in the second clock cycle in synchronization as the timestamp sampling identification signal of the first 1588 clock domain
Wherein, the 1588 clock synchronization module further comprises:
and the non-metastable state area synchronization unit is used for synchronously obtaining a timestamp sampling identification signal of the 1588 clock domain in the first clock cycle if the 1588 clock is not in the metastable state area during clock synchronization, and recording the timestamp sampling identification signal of the 1588 clock domain obtained synchronously in the first clock cycle as the timestamp sampling identification signal of the second 1588 clock domain.
Wherein the timestamp compensation module is specifically configured to:
and if the phase interval between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain is a theoretical value x, performing delay processing on the timestamp according to the clock period.
Wherein the timestamp compensation module is further to:
and if the phase interval between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain is the phase of adding 1 clock cycle to the theoretical value x, keeping the timestamp unchanged.
Third aspect an embodiment of the present invention provides an electronic device, including:
a processor, a memory, a communication interface, and a bus; the processor, the memory and the communication interface complete mutual communication through the bus; the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform one of the timestamp jitter compensation methods described above.
A fourth aspect of the present invention provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute a timestamp jitter compensation method as described above.
According to the timestamp jitter compensation method and device provided by the embodiment of the invention, the jitter of the timestamp is effectively compensated by amplifying the error caused by the synchronization of the timestamp sampling identification signal of the system clock domain and then carrying out identification compensation; compared with the mode of improving the frequency of the sampling clock and multi-phase sampling, the method has the advantages of low requirement on the time sequence of the FPGA, low requirement on the FPGA and capability of reducing the cost, and meanwhile, the mode has no limitation on the frequency, is wider in application range and has stronger compatibility.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a flowchart illustrating a method for compensating for jitter of a timestamp according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating meta-stable region clock synchronization provided by an embodiment of the present invention;
FIG. 3 is a schematic diagram of non-metastable region clock synchronization provided by the embodiment of the invention;
fig. 4 is a schematic structural diagram of a time stamp jitter compensating apparatus according to an embodiment of the present invention;
fig. 5 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments, but not all embodiments, of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flowchart of a timestamp jitter compensation method according to an embodiment of the present invention, as shown in fig. 1, including:
101. performing clock synchronization on the timestamp sampling identification signal of the first system clock domain based on the 1588 clock to obtain a timestamp sampling identification signal of the 1588 clock domain;
102. based on a system clock, performing clock synchronization on the timestamp sampling identification signal of the 1588 clock domain to obtain a timestamp sampling identification signal of a second system clock domain;
103. and according to the interval period between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain, performing timestamp delay compensation.
It should be noted that the timestamp is one of the key factors of time synchronization, a timestamp mode and a timestamp requirement are specified in the 1588V2 protocol, 1588 is a precision clock synchronization protocol standard of a network measurement and control system defined by IEEE, in the whole 1588V2 network, all clocks are organized together according to a master-slave hierarchical relationship, and the reference time of the system is a highest-level clock. For the event message, time stamping is needed during receiving and sending, so that the line delay is convenient to calculate. The jitter of the time stamp can cause the jitter of the line delay, thereby affecting the performance index of the time synchronization. In view of the above scenario, embodiments of the present invention provide a way to compensate for time stamp jitter, so as to meet the time synchronization performance index.
Specifically, in step 101, the embodiment of the present invention first synchronizes the timestamp sampling identification signal of the first system clock domain from the system time domain to the 1588 clock domain. It should be understood that, the first system clock domain refers to a local clock domain of a sending or receiving device, and for convenience of description, in all embodiments of the present invention, a timestamp process of sending an event packet is taken as an example for description, and a sending process may be referred to for a process of receiving a timestamp, which is not specifically limited in this embodiment of the present invention. Then, a timestamp sampling identification signal of the first system clock domain, that is, a timestamp sampling identification signal generated by the local device at a frame header, for example, a leading byte when the local device sends the event packet, is named SOF _ sys in the embodiment of the present invention, and a real-time according to the timestamp sampling identification signal is used as a sending timestamp, but the timestamp sampling identification signal belongs to the system clock domain, and the signal needs to be transferred to the 1588 clock domain to obtain the timestamp sampling identification signal of the 1588 clock domain, which is denoted SOF _1588 in the embodiment of the present invention.
Further, in step 102, it is understood that a conversion error is introduced by the system time domain during the conversion process to the 1588 time domain, and the clock domain conversion, for example, a common 125MHz clock frequency, introduces an error of ± 8ns (1/125MHz), thereby causing a jitter of ± 8ns in the timestamp. To reduce this jitter, embodiments of the present invention employ amplifying the error and then compensating for the magnitude of the error. Specifically, in the embodiment of the present invention, the system clock is used to perform resynchronization on the SOF _1588 signal after 1588 clock synchronization, which is equivalent to lengthening the phase, thereby amplifying the error of clock domain conversion to obtain a timestamp sampling identification signal of the second system clock domain, which is denoted as SOF _1588_ SYS in the embodiment of the present invention.
Finally, in step 103, the timestamp sampling identification signal SOF _ SYS of the first system clock domain and the timestamp sampling identification signal SOF _1588_ SYS of the second system clock domain are compared to determine a phase difference existing after amplification, and then a certain delay compensation is performed on the timestamp according to the frequency of the clock cycle, so that the jitter of the timestamp is reduced, and a general compensation value is half of one clock cycle.
According to the timestamp jitter compensation method provided by the embodiment of the invention, the jitter of the timestamp is effectively compensated by amplifying the error caused by the synchronization of the timestamp sampling identification signal of the system clock domain and then carrying out identification compensation; compared with the mode of improving the frequency of the sampling clock and multi-phase sampling, the method has the advantages of low requirement on the time sequence of the FPGA, low requirement on the FPGA and capability of reducing the cost, and meanwhile, the mode has no limitation on the frequency, is wider in application range and has stronger compatibility.
On the basis of the foregoing embodiment, the performing clock synchronization on the timestamp sampling identification signal of the first system clock domain based on the 1588 clock to obtain the timestamp sampling identification signal of the 1588 clock domain includes:
and if the 1588 clock is in a metastable state area during clock synchronization, synchronously obtaining a timestamp sampling identification signal of the 1588 clock domain in the second clock period, and recording the timestamp sampling identification signal of the 1588 clock domain obtained synchronously in the second clock period as the timestamp sampling identification signal of the first 1588 clock domain.
As can be seen from the contents of the foregoing embodiments, in the embodiments of the present invention, firstly, a signal in a system clock domain is synchronized to a 1588 clock domain to obtain a timestamp sampling identification signal SOF _1588 in the 1588 clock domain for timestamp, so that in a process of time synchronization from the system clock domain to the 1588 clock domain, two possible scenarios may occur when a 1588 clock is in a metastable state region, one scenario is that a timestamp sampling identification signal of the 1588 clock domain cannot be directly synchronized in a current period when the 1588 clock is in the metastable state region, fig. 2 is a metastable state region clock synchronization schematic diagram provided by the embodiments of the present invention, as shown in fig. 2, clk _1588_ a cannot be synchronized in a metastable state region in a first clock period to obtain SOF _1588_ a, a timestamp sampling identification signal of the 1588 clock domain needs to be synchronized in a second clock period for differentiation, the embodiment of the invention refers to SOF _1588_ a as a timestamp sampling identification signal of a first 1588 clock domain.
On the basis of the foregoing embodiment, the clock synchronization is performed on the timestamp sampling identification signal of the first system clock domain based on the 1588 clock, so as to obtain the timestamp sampling identification signal of the 1588 clock domain, and the method further includes:
and if the 1588 clock is not in the metastable state region during clock synchronization, synchronously obtaining a timestamp sampling identification signal of the 1588 clock domain in the first clock period, and marking the timestamp sampling identification signal of the 1588 clock domain obtained synchronously in the first clock period as a timestamp sampling identification signal of the second 1588 clock domain.
As can be seen from the above description, in the embodiment of the present invention, the signal in the system clock domain is synchronized to the 1588 clock domain, so as to obtain the timestamp sampling identification signal SOF _1588 in the 1588 clock domain, for time stamping, then during time synchronization from the system clock domain to the 1588 clock domain, the state held by the 1588 clock, two possible scenarios may occur, the other being the case where the 1588 clock is in the non-metastable region, FIG. 3 is a schematic diagram of the non-metastable region clock synchronization provided by the embodiment of the present invention, as shown in FIG. 3, clk _1588_ b is not in the metastable region, SOF _1588_ b can be obtained directly in a first clock cycle, a timestamp sampling identification signal of a 1588 clock domain can be obtained in a second clock cycle, for differentiation, the embodiment of the present invention refers to SOF _1588_ b as a timestamp sampling identification signal of the second 1588 clock domain. On the basis of the foregoing embodiment, the performing timestamp delay compensation according to the interval period between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain includes:
and if the phase interval between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain is a theoretical value x, performing delay processing on the timestamp according to the clock period. The theoretical value X is a phase less than one clock cycle.
As can be seen from the contents of the above embodiments, in the embodiments of the present invention, the timestamp sampling identification signal SOF _1588_ a of the first 1588 clock domain and the timestamp sampling identification signal SOF _1588_ b of the second 1588 clock domain are obtained by respectively processing according to two situations whether clk _1588 is in the metastable state region, as shown in the content of fig. 3, after system clock synchronization is performed on SOF _1588_ b again, SOF _1588_ SYS _ b is obtained, that is, the timestamp sampling identification signal SOF the second system clock domain under the non-metastable state region, and is compared with the original timestamp sampling identification signal SOF _ SYS of the first system clock domain, there is a phase difference with a fixed value x, and x can be theoretically calculated according to different signal differences, for the phase error generated in such a situation, the embodiments of the present invention perform delay compensation on the phase error, so as to reduce the timestamp situation, the compensated delay is generally determined according to the signal clock period, for example, a 125MHz (8nm) clock frequency signal, then the compensation value can be set to +4nm, i.e., 4nm delay compensation is performed, so that the time stamp jitter is reduced to about ± 5ns, and the performance requirement of 5G ultra-high precision time synchronization can be met.
On the basis of the foregoing embodiment, the performing timestamp delay compensation according to an interval period between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain further includes:
and if the phase interval between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain is the phase of adding 1 clock cycle to the theoretical value x, keeping the timestamp unchanged.
As can be seen from the contents of the above embodiments, in the embodiments of the present invention, a timestamp sampling identification signal SOF _1588_ a of a first 1588 clock domain and a timestamp sampling identification signal SOF _1588_ b of a second 1588 clock domain are obtained by respectively processing according to two situations whether clk _1588 is in a metastable state region, as shown in the content of fig. 2, after system clock synchronization is performed on SOF _1588_ a again, SOF _1588_ SYS _ a, that is, a timestamp sampling identification signal of a second system clock domain in the metastable state region, is obtained, and is compared with an original timestamp sampling identification signal SOF _ SYS of a first system clock domain, a phase interval obtained is a theoretical value x +1, where +1 indicates one more cycle, but it should be noted that, timestamp jitter of a signal in the metastable state region is already within an allowable range, and may have adverse effects if delay compensation is performed again, therefore, for such a situation, the embodiment of the invention can ensure that the jitter of the timestamp can meet the performance requirement of 5G ultrahigh-precision time synchronization by only keeping the timestamp unchanged.
It can be seen from the above embodiments that, in the embodiments of the present invention, after amplifying the phase of the signal synchronization error, the phase compensation is performed on one of the situations caused by the error, so as to reduce the jitter of the timestamp.
Fig. 4 is a schematic structural diagram of a time stamp jitter compensating apparatus according to an embodiment of the present invention, as shown in fig. 4, including: 1588 clock synchronization module 401, system clock synchronization module 402, and timestamp compensation module 403, wherein:
the 1588 clock synchronization module 401 is configured to perform clock synchronization on the timestamp sampling identification signal of the first system clock domain based on the 1588 clock to obtain a timestamp sampling identification signal of the 1588 clock domain;
the system clock synchronization module 402 is configured to perform clock synchronization on the timestamp sampling identification signal of the 1588 clock domain based on a system clock to obtain a timestamp sampling identification signal of a second system clock domain;
the timestamp compensation module 403 is configured to perform timestamp delay compensation according to an interval period between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain.
Specifically, how to implement the technical solution of the embodiment of the timestamp jitter compensation method shown in fig. 1 through the 1588 clock synchronization module 401, the system clock synchronization module 402, and the timestamp compensation module 403 may be implemented, which has similar implementation principles and technical effects, and is not described herein again.
According to the time stamp jitter compensation device provided by the embodiment of the invention, the jitter of the time stamp is effectively compensated by amplifying the error caused by the synchronization of the time stamp sampling identification signal of the system clock domain and then carrying out discrimination compensation.
On the basis of the above embodiments, the 1588 clock synchronization module includes:
and the metastable state area synchronizing unit is used for synchronously obtaining the timestamp sampling identification signal of the first 1588 clock domain in the second clock period if the 1588 clock is in the metastable state area during clock synchronization.
On the basis of the above embodiment, the 1588 clock synchronization module further includes:
and the non-metastable state area synchronization unit is used for synchronously obtaining a timestamp sampling identification signal of a second 1588 clock domain in a first clock period if the 1588 clock is not in the metastable state area during clock synchronization.
On the basis of the foregoing embodiment, the timestamp compensation module is specifically configured to:
and if the interval period between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain is a theoretical value x, performing delay processing on the timestamp according to the clock period.
On the basis of the foregoing embodiment, the timestamp compensation module is further configured to:
and if the interval period between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain is the theoretical value x plus 1, keeping the timestamp unchanged.
Fig. 5 is a block diagram of an electronic device according to an embodiment of the present invention, and referring to fig. 5, the electronic device includes: a processor (processor)501, a communication Interface (Communications Interface)502, a memory (memory)503, and a bus 504, wherein the processor 501, the communication Interface 502, and the memory 503 are configured to communicate with each other via the bus 504. The processor 501 may call logic instructions in the memory 503 to perform the following method: performing clock synchronization on the timestamp sampling identification signal of the first system clock domain based on the 1588 clock to obtain a timestamp sampling identification signal of the 1588 clock domain; based on a system clock, performing clock synchronization on the timestamp sampling identification signal of the 1588 clock domain to obtain a timestamp sampling identification signal of a second system clock domain; and according to the interval period between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain, performing timestamp delay compensation.
An embodiment of the present invention discloses a computer program product, which includes a computer program stored on a non-transitory computer readable storage medium, the computer program including program instructions, when the program instructions are executed by a computer, the computer can execute the methods provided by the above method embodiments, for example, the method includes: performing clock synchronization on the timestamp sampling identification signal of the first system clock domain based on the 1588 clock to obtain a timestamp sampling identification signal of the 1588 clock domain; based on a system clock, performing clock synchronization on the timestamp sampling identification signal of the 1588 clock domain to obtain a timestamp sampling identification signal of a second system clock domain; and according to the interval period between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain, performing timestamp delay compensation.
Embodiments of the present invention provide a non-transitory computer-readable storage medium, which stores computer instructions, where the computer instructions cause the computer to perform the methods provided by the above method embodiments, for example, the methods include: performing clock synchronization on the timestamp sampling identification signal of the first system clock domain based on the 1588 clock to obtain a timestamp sampling identification signal of the 1588 clock domain; based on a system clock, performing clock synchronization on the timestamp sampling identification signal of the 1588 clock domain to obtain a timestamp sampling identification signal of a second system clock domain; and according to the interval period between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain, performing timestamp delay compensation.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to each embodiment or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method of time stamp jitter compensation, comprising:
performing clock synchronization on the timestamp sampling identification signal of the first system clock domain based on the 1588 clock to obtain a timestamp sampling identification signal of the 1588 clock domain;
based on a system clock, performing clock synchronization on the timestamp sampling identification signal of the 1588 clock domain to obtain a timestamp sampling identification signal of a second system clock domain;
and according to the interval period between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain, performing timestamp delay compensation.
2. The timestamp jitter compensation method of claim 1, wherein the clock synchronizing the timestamp sampling identification signal of the first system clock domain based on the 1588 clock to obtain the timestamp sampling identification signal of the 1588 clock domain comprises:
and if the 1588 clock is in a metastable state area during clock synchronization, synchronously obtaining a timestamp sampling identification signal of the 1588 clock domain in the second clock period, and recording the timestamp sampling identification signal of the 1588 clock domain obtained synchronously in the second clock period as the timestamp sampling identification signal of the first 1588 clock domain.
3. The timestamp jitter compensation method of claim 2, wherein the clock synchronization is performed on the timestamp sampling identification signal of the first system clock domain based on the 1588 clock to obtain the timestamp sampling identification signal of the 1588 clock domain, further comprising:
and if the 1588 clock is not in the metastable state region during clock synchronization, synchronously obtaining a timestamp sampling identification signal of the 1588 clock domain in the first clock period, and marking the timestamp sampling identification signal of the 1588 clock domain obtained synchronously in the first clock period as a timestamp sampling identification signal of the second 1588 clock domain.
4. The timestamp jitter compensation method of claim 3, wherein the timestamp delay compensation according to the interval period between the timestamp sample identification signal of the first system clock domain and the timestamp sample identification signal of the second system clock domain comprises:
and if the phase interval between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain is a theoretical value x, performing delay processing on the timestamp according to the clock period.
5. The timestamp jitter compensation method of claim 4, wherein the timestamp delay compensation is performed according to an interval period between the timestamp sample identification signal of the first system clock domain and the timestamp sample identification signal of the second system clock domain, further comprising:
and if the phase interval between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain is the phase of adding 1 clock cycle to the theoretical value x, keeping the timestamp unchanged.
6. A time stamp jitter compensating apparatus, comprising:
the 1588 clock synchronization module is used for performing clock synchronization on the timestamp sampling identification signal of the first system clock domain based on the 1588 clock to obtain a timestamp sampling identification signal of the 1588 clock domain;
the system clock synchronization module is used for performing clock synchronization on the timestamp sampling identification signal of the 1588 clock domain based on a system clock to obtain a timestamp sampling identification signal of a second system clock domain;
and the timestamp compensation module is used for performing timestamp delay compensation according to the interval period between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain.
7. The timestamp jitter compensation apparatus of claim 6, wherein the 1588 clock synchronization module comprises:
and the metastable state area synchronizing unit is used for synchronously obtaining a timestamp sampling identification signal of the 1588 clock domain in the second clock period if the 1588 clock is in the metastable state area during clock synchronization, and recording the timestamp sampling identification signal of the 1588 clock domain obtained synchronously in the second clock period as the timestamp sampling identification signal of the first 1588 clock domain.
8. The timestamp jitter compensation apparatus of claim 7, wherein the 1588 clock synchronization module further comprises:
and the non-metastable state area synchronization unit is used for synchronously obtaining a timestamp sampling identification signal of the 1588 clock domain in the first clock cycle if the 1588 clock is not in the metastable state area during clock synchronization, and recording the timestamp sampling identification signal of the 1588 clock domain obtained synchronously in the first clock cycle as the timestamp sampling identification signal of the second 1588 clock domain.
9. The timestamp jitter compensation apparatus of claim 8, wherein the timestamp compensation module is specifically configured to:
and if the phase interval between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain is a theoretical value x, performing delay processing on the timestamp according to the clock period.
10. The timestamp jitter compensation apparatus of claim 9, wherein the timestamp compensation module is further configured to:
and if the phase interval between the timestamp sampling identification signal of the first system clock domain and the timestamp sampling identification signal of the second system clock domain is the phase of adding 1 clock cycle to the theoretical value x, keeping the timestamp unchanged.
CN202010536368.5A 2020-06-12 2020-06-12 Timestamp jitter compensation method and device Active CN111800212B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010536368.5A CN111800212B (en) 2020-06-12 2020-06-12 Timestamp jitter compensation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010536368.5A CN111800212B (en) 2020-06-12 2020-06-12 Timestamp jitter compensation method and device

Publications (2)

Publication Number Publication Date
CN111800212A true CN111800212A (en) 2020-10-20
CN111800212B CN111800212B (en) 2022-04-15

Family

ID=72803285

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010536368.5A Active CN111800212B (en) 2020-06-12 2020-06-12 Timestamp jitter compensation method and device

Country Status (1)

Country Link
CN (1) CN111800212B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114461012A (en) * 2022-01-19 2022-05-10 许昌许继软件技术有限公司 Method and device for acquiring running time stamps of different clock domains of embedded system
WO2022160283A1 (en) * 2021-01-29 2022-08-04 华为技术有限公司 Sampling method, sampling circuit, and clock synchronization method of distributed network

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016000352A1 (en) * 2014-06-30 2016-01-07 中兴通讯股份有限公司 Method and device for compensating time stamp of clock
CN107528654A (en) * 2016-06-21 2017-12-29 中兴通讯股份有限公司 It is a kind of based on 1588 method for synchronizing time and device
US20180191802A1 (en) * 2017-01-03 2018-07-05 Globalfoundries Inc. Nanosecond accuracy under precision time protocol for ethernet by using high accuracy timestamp assist device
CN109039514A (en) * 2018-07-19 2018-12-18 烽火通信科技股份有限公司 A method of improving IEEE1588 timestamp precision
EP3422580A1 (en) * 2017-06-28 2019-01-02 Analog Devices, Inc. Apparatus and methods for clock synchronization and frequency translation
CN111106894A (en) * 2019-12-24 2020-05-05 北京无线电计量测试研究所 Time synchronization method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016000352A1 (en) * 2014-06-30 2016-01-07 中兴通讯股份有限公司 Method and device for compensating time stamp of clock
CN107528654A (en) * 2016-06-21 2017-12-29 中兴通讯股份有限公司 It is a kind of based on 1588 method for synchronizing time and device
US20180191802A1 (en) * 2017-01-03 2018-07-05 Globalfoundries Inc. Nanosecond accuracy under precision time protocol for ethernet by using high accuracy timestamp assist device
EP3422580A1 (en) * 2017-06-28 2019-01-02 Analog Devices, Inc. Apparatus and methods for clock synchronization and frequency translation
CN109039514A (en) * 2018-07-19 2018-12-18 烽火通信科技股份有限公司 A method of improving IEEE1588 timestamp precision
CN111106894A (en) * 2019-12-24 2020-05-05 北京无线电计量测试研究所 Time synchronization method and system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022160283A1 (en) * 2021-01-29 2022-08-04 华为技术有限公司 Sampling method, sampling circuit, and clock synchronization method of distributed network
CN116671193A (en) * 2021-01-29 2023-08-29 华为技术有限公司 Sampling method, sampling circuit and clock synchronization method of distributed network
CN116671193B (en) * 2021-01-29 2024-05-17 华为技术有限公司 Sampling method, sampling circuit and clock synchronization method of distributed network
CN114461012A (en) * 2022-01-19 2022-05-10 许昌许继软件技术有限公司 Method and device for acquiring running time stamps of different clock domains of embedded system
CN114461012B (en) * 2022-01-19 2024-05-10 许昌许继软件技术有限公司 Method and device for acquiring running time stamps of different clock domains of embedded system

Also Published As

Publication number Publication date
CN111800212B (en) 2022-04-15

Similar Documents

Publication Publication Date Title
US10680924B2 (en) Method, a computer program product, and a carrier for indicating one-way latency in a data network
CN111800212B (en) Timestamp jitter compensation method and device
JP5321923B2 (en) Clock synchronization system, node, clock synchronization method and program
CN111416617B (en) Clock synchronization method and device and electronic equipment
EP3163787B1 (en) Method and device for compensating time stamp of clock
EP2288070A1 (en) Time synchronizing method, device and system of master clock side and slave clock side in synchronous network
WO2017219881A1 (en) Method and device for time synchronization based on 1588 standard
US20130215910A1 (en) Transmission apparatus, transmission method, program, and communication system
CN110572230A (en) correction method and device for realizing time synchronization
WO2023045881A1 (en) Time synchronization apparatus, system, and method
WO2023098683A1 (en) Real-time clock synchronization method and system for power distribution terminal, and power distribution terminal
CN107800529B (en) Clock frequency synchronization method of network node
CN115801175A (en) Time frequency synchronization method, system, storage medium and electronic device
CN114389735A (en) Clock synchronization method based on IEEE802.1AS redundant master clock
EP1277349A2 (en) A method of generating timestamps for isochronous data
EP4329219A1 (en) Packet transmission method and apparatus, device, and storage medium
CN112511255B (en) Time synchronization method and device
CN112019288B (en) Time synchronization method, service single board and network equipment
CN111614428A (en) Method and device for improving synchronization precision among multiple clocks
US20240039822A1 (en) Circuit and Method for Timestamp Filtering with RLS Filter
US20240039819A1 (en) Circuit and Method for Timestamp Filtering with Input/Output Format Conversion
US20240048469A1 (en) Circuit and Method for Timestamp Jitter Reduction
CN115664576A (en) Non-hopping time synchronization method based on NTP
WO2023004576A1 (en) Clock synchronization method, apparatus and system, and chip
CN114598412A (en) Clock synchronization processing method and device, electronic equipment, storage medium and product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240704

Address after: 430000 No. 6, High-tech Fourth Road, Donghu High-tech Development Zone, Wuhan City, Hubei Province

Patentee after: FIBERHOME TELECOMMUNICATION TECHNOLOGIES Co.,Ltd.

Country or region after: China

Patentee after: Wuhan Changjiang Computing Technology Co.,Ltd.

Address before: 430000 No. 6, High-tech Fourth Road, Donghu High-tech Development Zone, Wuhan City, Hubei Province

Patentee before: FIBERHOME TELECOMMUNICATION TECHNOLOGIES Co.,Ltd.

Country or region before: China