Serdes-based serial bus adaptive synchronization method
The adaptive synchronization method for SERDES serial bus improves data transmission accuracy and reliability by dynamically adjusting synchronization parameters and aligning data packets using link coding, addressing challenges posed by non-ideal transmission characteristics and interference.
Patent Information
- Application Number
- CN202411707177.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-11-27
AI Technical Summary
Traditional synchronization methods for SERDES serial bus struggle with accurately recovering the clock signal and aligning data due to non-ideal transmission characteristics and external interference, leading to increased data transmission errors and reduced system reliability.
An adaptive synchronization method that adjusts synchronization parameters in real time by inserting link codes between parallel data packets, performing discrete wavelet transforms, and calculating clock phase deviations to achieve high-precision synchronization and data alignment.
Enhances data transmission accuracy and reliability by reducing clock phase deviation calculation difficulty, enabling real-time adaptation to changing communication conditions, and minimizing data misjudgment and errors, suitable for high-reliability environments like industrial control and data centers.
Smart Images

Figure CN119210930A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of serial communication, and in particular to a self-adaptive synchronization method based on a serdes serial bus. Background Art
[0002] With the rapid development of modern communication technology, SERDES serial bus has been widely used in many fields such as data centers, high-speed network transmission, industrial automation, etc. SERDES serial bus mainly includes serializers and deserializers. Due to the differences in the characteristics of the transmission lines, the instability of the clock source, and the existence of various external interference factors, it has become a challenging problem to accurately recover the clock signal synchronized with the transmitter at the receiving end and correctly align the data. Due to the influence of various factors such as the non-ideal characteristics of the transmission medium, the jitter of the clock source, and external electromagnetic interference, achieving accurate and stable synchronization has always been a key challenge. Traditional synchronization methods are often based on fixed parameter settings, which are difficult to dynamically adapt to changing communication conditions, resulting in problems such as increased data transmission error rate and reduced system reliability. Summary of the invention
[0003] In view of the above-mentioned deficiencies in the prior art, the present invention provides a method for adaptive synchronization based on a serdes serial bus, which can adjust synchronization parameters in real time, achieve high-precision adaptive synchronization, and effectively improve the reliability of serial bus data transmission.
[0004] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is: Provided is a method for adaptive synchronization based on a serdes serial bus, comprising: Step S1: Data receiving end obtains n A parallel data packet is transmitted, a parallel data packet sequence is generated according to the bandwidth requirement of the serial data transmission channel, and different link codes are inserted between the parallel data packets in the parallel data packet sequence to form a serial data packet; Step S2: the data transmitting end sends the serial data packet to the data receiving end through the serial data transmission channel, and the data receiving end decodes the serial data packet based on the link coding to obtain a decoded serial data packet; samples the decoded serial data packet and performs discrete wavelet transform to obtain a preprocessed sampling sequence; Step S3: Calculate the clock phase deviation and cumulative phase difference of the sampling sequence, and then estimate the clock phase deviation of the data packet in the decoded serial data; Step S4: defining the clock adjustment step size of the data receiving end, and adjusting the clock phase data of the data packet in the decoded serial data according to the clock phase deviation; Step S5: performing data alignment on each data packet in the decoded serial data based on the concatenated coding.
[0005] Further, step S1 includes: Step S11: Data receiving end obtains n parallel data packets, and clock data for each parallel data packet, Step S12: Sort the parallel data packets according to the sequence of the clock data. If the clock data of two parallel data packets are the same, compare the sizes of the two parallel data packets and sort the smaller parallel data packet before the larger parallel data packet to form a parallel data packet sequence. Step S13: In the parallel data packet sequence, the size of each parallel data is obtained, and the largest parallel data packet is selected, and the maximum parallel data packet is selected according to the bandwidth of the serial data transmission channel. D Calculate the base bandwidth for each parallel packet ; n is the number of parallel data packets; Step S14: Compare basic bandwidth The bandwidth required for the maximum number of parallel packets The size of the bandwidth is calculated and the bandwidth redundancy factor is introduced. f ;like , the bandwidth of the serial data transmission channel meets the requirement; otherwise, execute step S15, the bandwidth redundancy coefficient f Generally, it is taken as 0.1; Step S15: determining whether the largest parallel data packet is the last one in the parallel data packet sequence; If yes, directly delete the largest parallel data from the parallel data packet sequence to form a new parallel data packet sequence, and then return to step S13; Otherwise, the last parallel data packet in the parallel data packet sequence is deleted to form a new parallel data packet sequence, and then the process returns to step S13; Step S16: until a parallel data packet sequence whose bandwidth of the serial data transmission channel meets the requirement is obtained, the parallel data packets in the parallel data packet sequence whose bandwidth meets the requirement are screened out. A , with parallel packets A Based on the bandwidth size, the parallel data packets are A Add link codes between them, so that each link code is different, and the parallel data packets are connected in series into serial data packets through link codes; ; in, S is the encoding sequence of the serial data packet, The first parallel data packet sequence that meets the bandwidth requirement w parallel packets, w is the number of parallel data packets, For parallel packets A The encoding, For the w parallel packets with the w - 1 concatenated encoding term between parallel packets, The base encoding for the link encoding, For dynamic encoding, is the basic item for dynamic encoding. For the w Linked coded dynamic variable functions, is the bandwidth size function of parallel data packets, Clock data function for parallel data packets.
[0006] Further, step S2 includes: Step S21: The data transmitting end sends the serial data packet to the data receiving end through the serial data transmission channel, and the data receiving end receives the encoding sequence of the received serial data packet. S Decoding is performed, and different link codes are used as references during the decoding process to obtain decoded serial data packets; Step S22: Decoding the serial data packet contains the data that are sorted according to the order of the clock data. n Data packets are sampled in each data packet of the decoded serial data to obtain a sampling sequence , u is the sampling point number; then the sampling sequence Perform discrete wavelet transform and calculate wavelet function coefficients ; ; in, j is the scale parameter of the sampling sequence, k is the level parameter of the sampling sequence, is the wavelet basis function The conjugate function of ; Step S23: Setting the threshold of wavelet function coefficients , quantize the wavelet function coefficients to obtain the quantized wavelet coefficients ; ; Step S24: Using wavelet coefficients Reconstruct the sampling sequence to obtain the preprocessed sampling sequence ; ; in, K is the range of the scale parameter, J is the range of the horizontal parameter.
[0007] Further, step S3 includes: Step S31: Constructing a sampling sequence The autocorrelation function ; ; in, M The sampling sequence The data length, m is the delay of the sampling sequence; Step S32: When the delay amount m Equal to the clock data cycle of the data packet t 2 o'clock , The autocorrelation function will have a peak value. According to the peak position of the autocorrelation function Calculate clock data cycle t 2 corresponding delay, and then calculate the clock phase deviation of the data packet ; ; in, t 1 is the local reference clock data period of the data receiving end; Step S33: Calculate the sampling sequence Adjacent sampling points The phase difference between ; ; in, The sampling sequence The Hilbert transform of Step S34: Perform phase difference calculation on each sampling point Accumulate and get the accumulated phase difference ; ; Step S35: Using the accumulated phase difference and clock phase deviation Calculate the sampling sequence Clock phase deviation , clock phase deviation As the clock phase deviation of the data packet within the decoded serial data.
[0008] Further, step S4 includes: Step S41: define the clock adjustment step size of the data receiving end , introducing a phase deviation from the clock Related dynamic adjustment coefficients ; ; in, To adjust the sensitivity coefficient; Step S42: The actual adjustment step length is , calculate the clock phase of the data receiving end after clock adjustment ; ; in, is the initial phase of the data receiving end; Step S43: Introducing damping factor Avoid oscillation during clock adjustment and calculate the updated clock phase ; ; Step S44: Calculate the new clock phase of the data receiving end ; ; Step S44: The data receiving end receives the data according to the new clock phase. Adjusts the clock phase data of the data packets within the decoded serial data.
[0009] Further, step S5 includes: Step S51: Based on the dynamic coding basic items And dynamic variable functions , get the link coding sequence between each data packet , For the w parallel packets with the w -1 ideal link coding term between parallel packets; ; Step S52: Calculate each link coding item obtained after the data receiving end decodes the serial data packet , and calculate the error coefficient of the link coding term ; ; in, i is the number of the link coding item, After decoding, i Linked encoding items, For the i ideal link coding items; Step S52: Setting the error threshold of the link coding item ; like , it is determined that the data packets in the decoded serial data packets have been aligned; Otherwise, return to step S2 to adjust the initial position of the code for decoding the serial data packet during the decoding process until the constraint condition is satisfied; .
[0010] The beneficial effects of the present invention are as follows: the present invention introduces link coding data between parallel data packets to ensure that the clock sequence between parallel data packets is fixed and accurate, reduce the difficulty of calculating the clock phase deviation, increase the accuracy of adjusting the clock phase data, facilitate real-time adaptive adjustment, and can quickly adapt to factors such as changes in clock sources and differences in the characteristics of transmission lines in complex and changeable communication environments, achieve high-precision clock synchronization and data alignment, and greatly improve the accuracy of data transmission. In addition, in the process of data alignment, link coding data is used for auxiliary judgment. Link coding data has the characteristics of small data volume and low error rate, which effectively avoids data misjudgment and transmission errors caused by synchronization problems, thereby improving the reliability of the entire serial bus communication system, so that it can operate stably in fields with high reliability requirements such as industrial control and data centers. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 The figure is a flow chart of an adaptive synchronization method based on serdes serial bus. DETAILED DESCRIPTION
[0012] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0013] like Figure 1 As shown, a method for adaptive synchronization based on a serdes serial bus includes: Step S1: Data receiving end obtains n A parallel data packet is generated according to the bandwidth requirement of the serial data transmission channel, and different link codes are inserted between the parallel data packets in the parallel data packet sequence to form a serial data packet.
[0014] Step S1 specifically includes: Step S11: Data receiving end obtains n parallel data packets, and clock data for each parallel data packet, Step S12: Sort the parallel data packets according to the sequence of the clock data. If the clock data of two parallel data packets are the same, compare the sizes of the two parallel data packets and sort the smaller parallel data packet before the larger parallel data packet to form a parallel data packet sequence. Step S13: In the parallel data packet sequence, the size of each parallel data is obtained, and the largest parallel data packet is selected, and the maximum parallel data packet is selected according to the bandwidth of the serial data transmission channel. D Calculate the base bandwidth for each parallel packet ; n is the number of parallel data packets; Step S14: Compare basic bandwidth The bandwidth required for the maximum number of parallel packets The size of the bandwidth is calculated and the bandwidth redundancy factor is introduced. f ;like , the bandwidth of the serial data transmission channel meets the requirement; otherwise, execute step S15, the bandwidth redundancy coefficient f Generally, it is taken as 0.1; Step S15: determining whether the largest parallel data packet is the last one in the parallel data packet sequence; If yes, directly delete the largest parallel data from the parallel data packet sequence to form a new parallel data packet sequence, and then return to step S13; Otherwise, the last parallel data packet in the parallel data packet sequence is deleted to form a new parallel data packet sequence, and then the process returns to step S13; Step S16: until a parallel data packet sequence whose bandwidth of the serial data transmission channel meets the requirement is obtained, the parallel data packets in the parallel data packet sequence whose bandwidth meets the requirement are screened out. A , with parallel packets A Based on the bandwidth size, the parallel data packets are A Add link codes between them, so that each link code is different, and the parallel data packets are connected in series into serial data packets through link codes; ; in, S is the encoding sequence of the serial data packet, The first parallel data packet sequence that meets the bandwidth requirement w parallel packets, w is the number of parallel data packets, For parallel packets A The encoding, For the w parallel packets with the w - 1 concatenated encoding term between parallel packets, The base encoding for the link encoding, For dynamic encoding, is the basic item for dynamic encoding. For the w Linked coded dynamic variable functions, is the bandwidth size function of parallel data packets, Clock data function for parallel data packets.
[0015] Step S2: the data transmitting end sends the serial data packet to the data receiving end through the serial data transmission channel. The data receiving end decodes the serial data packet based on the link coding to obtain a decoded serial data packet; samples the decoded serial data packet and performs discrete wavelet transform to obtain a preprocessed sampling sequence.
[0016] Step S2 specifically includes: Step S21: The data transmitting end sends the serial data packet to the data receiving end through the serial data transmission channel, and the data receiving end receives the encoding sequence of the received serial data packet. S Decoding is performed, and different link codes are used as references during the decoding process to obtain decoded serial data packets; Step S22: Decoding the serial data packet contains the data that are sorted according to the order of the clock data. n Data packets are sampled in each data packet of the decoded serial data to obtain a sampling sequence , u is the sampling point number; then the sampling sequence Perform discrete wavelet transform and calculate wavelet function coefficients ; ; in, j is the scale parameter of the sampling sequence, k is the level parameter of the sampling sequence, is the wavelet basis function The conjugate function of ; Step S23: Setting the threshold of wavelet function coefficients , quantize the wavelet function coefficients to obtain the quantized wavelet coefficients ; ; Step S24: Using wavelet coefficients Reconstruct the sampling sequence to obtain the preprocessed sampling sequence ; ; in, K is the range of the scale parameter, J is the range of the horizontal parameter.
[0017] Step S3: Calculate the sampling sequence The clock phase deviation and the accumulated phase difference are used to estimate the clock phase deviation of the data packet in the decoded serial data. Step S3 specifically includes: Step S31: Constructing a sampling sequence The autocorrelation function ; ; in, M The sampling sequence The data length, m is the delay of the sampling sequence; Step S32: When the delay amount m Equal to the clock data cycle of the data packet t 2 o'clock , The autocorrelation function will have a peak value. According to the peak position of the autocorrelation function Calculate clock data cycle t 2 corresponding delay, and then calculate the clock phase deviation of the data packet ; ; in, t 1 is the local reference clock data period of the data receiving end; Step S33: Calculate the sampling sequence Adjacent sampling points The phase difference between ; ; in, The sampling sequence The Hilbert transform of Step S34: Perform phase difference calculation on each sampling point Accumulate and get the accumulated phase difference ; ; Step S35: Using the accumulated phase difference and clock phase deviation Calculate the sampling sequence Clock phase deviation , clock phase deviation As the clock phase deviation of the data packet within the decoded serial data.
[0018] Step S4: Define the clock adjustment step size of the data receiving end , according to the clock phase deviation Adjust the clock phase data of the data packet in the decoded serial data. Step S4 specifically includes: Step S41: define the clock adjustment step size of the data receiving end , introducing a phase deviation from the clock Related dynamic adjustment coefficients ; ; in, To adjust the sensitivity coefficient; Step S42: The actual adjustment step length is , calculate the clock phase of the data receiving end after clock adjustment ; ; in, is the initial phase of the data receiving end; Step S43: Introducing damping factor Avoid oscillation during clock adjustment and calculate the updated clock phase ; ; Step S44: Calculate the new clock phase of the data receiving end ; ; Step S44: The data receiving end receives the data according to the new clock phase. Adjusts the clock phase data of the data packets within the decoded serial data.
[0019] Step S5: aligning each data packet in the decoded serial data based on the link coding. Specifically including: Step S51: Based on the dynamic coding basic items And dynamic variable functions , get the link coding sequence between each data packet , For the w parallel packets with the w -1 ideal link coding term between parallel packets; ; Step S52: Calculate each link coding item obtained after the data receiving end decodes the serial data packet , and calculate the error coefficient of the link coding term ; ; in, i is the number of the link coding item, After decoding, i Linked encoding items, For the i ideal link coding items; Step S52: Setting the error threshold of the link coding item ; Error threshold Indicates the maximum value allowed for the error coefficient of the link coding item. When the error coefficient of the link coding item is less than the error threshold , which proves that the data packets are aligned during the decoding process of the serial data packets by the data receiving end.
[0020] like , it is determined that the data packets in the decoded serial data packets have been aligned; Otherwise, return to step S2 to adjust the initial position of the code for decoding the serial data packet during the decoding process until the constraint condition is satisfied; .
[0021] The present invention introduces link coding data between parallel data packets to ensure that the clock sequence between parallel data packets is fixed and accurate, reduce the difficulty of calculating the clock phase deviation, increase the accuracy of adjusting the clock phase data, facilitate real-time adaptive adjustment, and can quickly adapt to factors such as changes in clock sources and differences in characteristics of transmission lines in complex and changeable communication environments, achieve high-precision clock synchronization and data alignment, and greatly improve the accuracy of data transmission. In addition, in the process of data alignment, link coding data is used for auxiliary judgment. Link coding data has the characteristics of small data volume and low error rate, which effectively avoids data misjudgment and transmission errors caused by synchronization problems, thereby improving the reliability of the entire serial bus communication system, so that it can be stably operated in fields with high reliability requirements such as industrial control and data centers.
Claims
1. A method for adaptive synchronization based on serdes serial bus, characterized in that: include: Step S1: Data receiving end obtains n A parallel data packet is transmitted, a parallel data packet sequence is generated according to the bandwidth requirement of the serial data transmission channel, and different link codes are inserted between the parallel data packets in the parallel data packet sequence to form a serial data packet; Step S2: the data transmitting end sends the serial data packet to the data receiving end through the serial data transmission channel, and the data receiving end decodes the serial data packet based on the link code to obtain a decoded serial data packet; Sampling the decoded serial data packets and performing discrete wavelet transform to obtain a preprocessed sampling sequence; Step S3: Calculate the clock phase deviation and cumulative phase difference of the sampling sequence, and then estimate the clock phase deviation of the data packet in the decoded serial data; Step S4: defining the clock adjustment step size of the data receiving end, and adjusting the clock phase data of the data packet in the decoded serial data according to the clock phase deviation; Step S5: performing data alignment on each data packet in the decoded serial data based on the concatenated coding.
2. The method for adaptive synchronization based on serdes serial bus according to claim 1, characterized in that: The step S1 comprises: Step S11: Data receiving end obtains n parallel data packets, and clock data for each parallel data packet, Step S12: Sort the parallel data packets according to the sequence of the clock data. If the clock data of two parallel data packets are the same, compare the sizes of the two parallel data packets and sort the smaller parallel data packet before the larger parallel data packet to form a parallel data packet sequence. Step S13: In the parallel data packet sequence, the size of each parallel data is obtained, and the largest parallel data packet is selected, and the maximum parallel data packet is selected according to the bandwidth of the serial data transmission channel. D Calculate the base bandwidth for each parallel packet ; n is the number of parallel data packets; Step S14: Compare basic bandwidth The bandwidth required for the maximum number of parallel packets The size of the bandwidth is calculated and the bandwidth redundancy factor is introduced. f ;like , the bandwidth of the serial data transmission channel meets the requirement; otherwise, execute step S15; Step S15: determining whether the largest parallel data packet is the last one in the parallel data packet sequence; If yes, directly delete the largest parallel data from the parallel data packet sequence to form a new parallel data packet sequence, and then return to step S13; Otherwise, the last parallel data packet in the parallel data packet sequence is deleted to form a new parallel data packet sequence, and then the process returns to step S13; Step S16: until a parallel data packet sequence whose bandwidth of the serial data transmission channel meets the requirement is obtained, the parallel data packets in the parallel data packet sequence whose bandwidth meets the requirement are screened out. A , with parallel packets A Based on the bandwidth size, the parallel data packets are A Add link codes between them, so that each link code is different, and the parallel data packets are connected in series into serial data packets through link codes; ; in, S is the encoding sequence of the serial data packet, The first parallel data packet sequence that meets the bandwidth requirement w parallel packets, w is the number of parallel data packets, For parallel packets A The encoding, For the w parallel packets with the w - 1 concatenated encoding term between parallel packets, The base encoding for the link encoding, For dynamic encoding, is the basic item for dynamic encoding. For the w Linked coded dynamic variable functions, is the bandwidth size function of parallel data packets, Clock data function for parallel data packets.
3. The method for adaptive synchronization based on serdes serial bus according to claim 2, characterized in that: The step S2 comprises: Step S21: The data transmitting end sends the serial data packet to the data receiving end through the serial data transmission channel, and the data receiving end receives the encoding sequence of the received serial data packet. S Decoding is performed, and different link codes are used as references during the decoding process to obtain decoded serial data packets; Step S22: Decoding the serial data packet contains the data that are sorted according to the order of the clock data. n Data packets are sampled in each data packet of the decoded serial data to obtain a sampling sequence , u is the sampling point number; then the sampling sequence Perform discrete wavelet transform and calculate wavelet function coefficients ; ; in, j is the scale parameter of the sampling sequence, k is the level parameter of the sampling sequence, is the wavelet basis function The conjugate function of ; Step S23: Setting the threshold of wavelet function coefficients , quantize the wavelet function coefficients to obtain the quantized wavelet coefficients ; ; Step S24: Using wavelet coefficients Reconstruct the sampling sequence to obtain the preprocessed sampling sequence ; ; in, K is the range of the scale parameter, J is the range of the horizontal parameter.
4. The method for adaptive synchronization based on serdes serial bus according to claim 3, characterized in that: The step S3 comprises: Step S31: Constructing a sampling sequence The autocorrelation function ; ; in, M The sampling sequence The data length, m is the delay of the sampling sequence; Step S32: When the delay amount m Equal to the clock data cycle of the data packet t 2 o'clock , The autocorrelation function will have a peak value. According to the peak position of the autocorrelation function Calculate clock data cycle t 2 corresponding delay, and then calculate the clock phase deviation of the data packet ; ; in, t 1 is the local reference clock data period of the data receiving end; Step S33: Calculate the sampling sequence Adjacent sampling points The phase difference between ; ; in, The sampling sequence The Hilbert transform of Step S34: Perform phase difference calculation on each sampling point Accumulate and get the accumulated phase difference ; ; Step S35: Using the accumulated phase difference and clock phase deviation Calculate the sampling sequence Clock phase deviation , clock phase deviation As the clock phase deviation of the data packet within the decoded serial data.
5. The method for adaptive synchronization based on serdes serial bus according to claim 4, characterized in that: The step S4 comprises: Step S41: define the clock adjustment step size of the data receiving end , introducing a phase deviation from the clock Related dynamic adjustment coefficients ; ; in, To adjust the sensitivity coefficient; Step S42: The actual adjustment step length is , calculate the clock phase of the data receiving end after clock adjustment ; ; in, is the initial phase of the data receiving end; Step S43: Introducing damping factor Avoid oscillation during clock adjustment and calculate the updated clock phase ; ; Step S44: Calculate the new clock phase of the data receiving end ; ; Step S44: The data receiving end receives the data according to the new clock phase. Adjusts the clock phase data of the data packets within the decoded serial data.
6. The method for adaptive synchronization based on serdes serial bus according to claim 5, characterized in that: The step S5 comprises: Step S51: Based on the dynamic coding basic items And dynamic variable functions , get the link coding sequence between each data packet , For the w parallel packets with the w -1 ideal link coding term between parallel packets; ; Step S52: Calculate each link coding item obtained after the data receiving end decodes the serial data packet , and calculate the error coefficient of the link coding term ; ; in, i is the number of the link coding item, After decoding, i Linked encoding items, For the i ideal link coding items; Step S52: Setting the error threshold of the link coding item ; like , it is determined that the data packets in the decoded serial data packets have been aligned; Otherwise, return to step S2 to adjust the initial position of the code for decoding the serial data packet during the decoding process until the constraint condition is satisfied; 。
Citation Information
Patent Citations
Self-adaption timing sequence calibrating method of high-speed serial communication interface
CN103036667A
Adaptive high-speed transmission system based on SERDES in FPGA
CN107491407A
Self-adaptive line sequence adjustment method, device, equipment, system and storage medium
CN113810071A
USB 3.0 data transmission system and method based on FPGA
CN116418889A
High-speed serial data transceiving system and time sequence self-adaption method
CN117852488A
Cited By
Real-time synchronous control method and system based on EtherMAC bus
CN120881125A