Clock recovery system and method

By using the clock follow module and the first-in-first-out storage module in the clock recovery system, the clock frequency is dynamically adjusted, and the problems of clock recovery error and frequency deviation in high-speed communication systems are solved, achieving small jitter and high-accuracy clock recovery effects .

CN118625890BActive Publication Date: 2024-11-05CHENGDU WEIDE QINGYUN ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411109925.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2024-11-05
Estimated Expiration
2044-08-14

AI Technical Summary

Technical Problem

In high-speed serial communication systems, in the continuous data communication and burst data communication scenarios below 1Gbps, the clock cannot be effectively restored, resulting in code error problems. The existing technology exists in reducing clock jitter and solving frequency deviations of non-homologous systems. insufficient.

Method used

The clock recovery system is adopted, including an oversampling module, an oversampling data recovery module, a bit width conversion module, a first-in-first-out storage module and a clock follow module. The frequency control word decision module, a synchronization register, a phase accumulator and a waveform of the clock follow module are used. Data table, dynamically adjust the clock frequency to deal with the frequency deviation problem in non-homologous systems, and generate follow-up clocks through DDS to reduce clock frequency jitter.

Benefits of technology

Effectively reduce clock frequency jitter, solve the frequency deviation problem in non-homologous systems, ensure the accuracy of data recovery and the stability of clock signals, and is suitable for high data rates and low data rates scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118625890B_ABST
    Figure CN118625890B_ABST
Patent Text Reader

Abstract

The present invention provides a clock recovery system and method, including an oversampling module, an oversampling data recovery module, a bit width conversion module, a first-in-first-out storage module and a clock following module, wherein the oversampling module is used to oversample the serial clock signal to be recovered to output parallel oversampled data, the oversampled data recovery module is used to recover the parallel oversampled data to obtain valid data and a flag signal, the bit width conversion module is used to add or delete the valid data according to the flag signal to obtain target bit width data and a data valid flag signal, the first-in-first-out storage module is used to write the target bit width data according to the data valid flag signal and read out the valid data, and the clock following module is used to output an adjustment clock according to the read waterline change of the first-in-first-out storage module to adjust the clock frequency of the first-in-first-out storage module. Not only can the clock frequency jitter be reduced, but also the frequency deviation problem in non-homologous systems can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of clock recovery, and in particular to a clock recovery system and method. Background Art

[0002] FPGA (Field-Programmable Gate Array) chips are used as core chips in communication systems. Their SERDES (serializer / deserializer) core circuits are widely used in the field of high-speed serial communication technology. Its advantages are high line rate and small number of pins, and no need to transmit a clock. However, in many application scenarios, such as fast Ethernet interfaces with a line rate of 100Mbps, STM-1 with a line rate of 155.52Mbps, and STM-4 with a line rate of 622.08Mbps, the data receiver cannot recover the data through CDR (Clock Data Recovery) technology. In addition, although the GPON protocol meets the rate requirements, the data is of burst type and has strict requirements on data recovery time, so general CDR technology cannot be used. The above application scenarios all require the use of oversampling circuits to quickly recover data.

[0003] When using CDR to receive data, the receiving clock will automatically track the data to ensure the correctness of the data. However, when CDR is not used, the clock and received data at the receiving end are asynchronous, which may cause bit errors. Therefore, when CDR is not used, special methods need to be taken to ensure the correct reception of data.

[0004] In the prior art, taking STM-1 as an example, there are two main solutions as follows:

[0005] Method 1: If Figure 1 As shown, the data is recovered through the oversampling circuit and a data valid flag signal is generated. First, set the sampling module 1 to the oversampling mode, and then input the parallel data output by the sampling module 1 into the 8-fold oversampling recovery module 2. Since the CDR is not turned on, the parallel data output by the sampling module 1 is obtained by blind sampling of the high-speed clock at this time, which may cause the edge position of the received data to shift. There will be two extreme shift scenarios. Assume that the data input bit width is M and the oversampling multiple is N. Scenario 1 is as follows Figure 2 As shown in , the current sampling point is N-1, and the sampling point of the previous beat is 0. It is determined that the two sampling data are repeated and the current sampling point needs to be discarded. Figure 3As shown, the current sampling point position is 0, and the sampling position of the previous beat is N-1. It is determined that 1 bit of valid data is less collected between the two samplings, and the 0th bit of the N-1 beat data is inserted before the current valid data.

[0006] During the recovery process, addition and deletion operations are performed according to the validity of the data, and the data is converted to the target bit width through the bit width conversion module 3. Finally, the data and the data valid flag signal are transmitted to the post-stage logic module 4, and the post-stage logic module 4 operates on the data only when the data valid signal is pulled high.

[0007] Method 2: If Figure 4 As shown, it is similar to method one, but the data valid flag signal will not be transmitted to the subsequent logic module 11. Instead, a new clock is generated by the data valid flag signal, and the clock can track the data, and the subsequent logic module 11 can directly use the clock. First, the recovered data and the data valid flag signal are obtained in the manner of method one, and then the data valid flag signal is input into the clock follower module 12 to generate a recovered clock. Finally, the recovered clock is directly given to the subsequent logic module 11 for use.

[0008] Both methods have their own advantages and disadvantages. The disadvantage of method 1 is that it will increase the complexity of subsequent logic and is not easy to update and transplant. Method 2 is an upgrade based on method 1, reducing the complexity of the subsequent logic, but it is easy to cause excessive clock jitter and cause bit errors when the valid data signals are close to each other. Therefore, method 2 is only suitable for scenarios with low line rate and low clock frequency. Summary of the invention

[0009] The object of the present invention is to provide a clock recovery system and method which can not only reduce clock frequency jitter but also solve the frequency deviation problem in non-homologous systems.

[0010] Technical solution: The present invention provides a clock recovery system, including an oversampling module, an oversampling data recovery module, a bit width conversion module, a clock following module and a first-in-first-out storage module, wherein the oversampling module is used to oversample the serial clock signal to be recovered to output parallel oversampled data, the oversampling data recovery module is used to recover the parallel oversampled data to obtain valid data and a flag signal, the bit width conversion module is used to add or delete the valid data according to the flag signal to obtain target bit width data and a data valid flag signal, the first-in-first-out storage module is used to write the target bit width data according to the data valid flag signal and read out the valid data, and the clock following module is used to output an adjustment clock according to a read waterline change of the first-in-first-out storage module to adjust the clock frequency of the first-in-first-out storage module.

[0011] Furthermore, the clock following module includes a frequency control word decision module, a first synchronization register, a first phase accumulator and a waveform data table, the output end of the frequency control word decision module is connected to the input end of the first synchronization register, the output end of the first synchronization register is connected to the input end of the first phase accumulator, the output end of the first phase accumulator is connected to the control end of the waveform data table, the control end of the first synchronization register is connected to the reference clock, the frequency control word decision module is used to generate a frequency control word according to the read pointer address and the reference clock of the first-in-first-out storage module, the first phase accumulator is used to accumulate the frequency control word output by the first synchronization register to output the accumulated frequency control word, and the waveform data table is used to output the adjusted clock according to the accumulated frequency control word.

[0012] Furthermore, the first phase accumulator includes a first adder and a phase accumulator register, the first input end of the first adder is connected to the output end of the first synchronization register, the output end of the first adder is connected to the input end of the phase accumulator register, the output end of the phase accumulator register is connected to the second input end of the first adder, and the control end of the phase accumulator register is connected to the reference clock.

[0013] Furthermore, the clock following module also includes a second phase accumulator, a first input end of the second phase accumulator is connected to the output end of the first phase accumulator, a second input end of the second phase accumulator is connected to the phase control word, and an output end of the second phase accumulator is connected to the control end of the waveform data table.

[0014] Furthermore, the second phase accumulator includes a second adder and a second synchronization register, the first input end of the second adder is connected to the output end of the first phase accumulator, the second input end of the second adder is connected to the output end of the second synchronization register, the input end of the second synchronization register is connected to the phase control word, the output end of the second adder is connected to the control end of the waveform data table, and the control end of the second synchronization register is connected to the reference clock.

[0015] Furthermore, the clock following module further comprises a clock buffer unit, an input end of the clock buffer unit is connected to an output end of the waveform data table, and an output end of the clock buffer unit outputs the adjusted clock.

[0016] Furthermore, the frequency control word decision module is a multiplexer.

[0017] Furthermore, it also includes a post-stage logic module, which is used to read the data stream from the first-in-first-out storage module and receive the clock adjustment frequency output by the clock following module.

[0018] A clock recovery method, comprising:

[0019] Oversampling the serial clock signal to be recovered to output parallel oversampled data;

[0020] Restoring the parallel oversampled data to obtain valid data and a flag signal;

[0021] Adding or deleting the valid data according to the flag signal to obtain target bit width data and a data valid flag signal;

[0022] Writing the target bit width data into a first-in-first-out storage module according to the data valid flag signal, and reading out valid data;

[0023] The frequency of the clock is adjusted in real time according to the change of the read waterline of the FIFO storage module.

[0024] Furthermore, it includes: reading the data stream from the first-in-first-out storage module and receiving the clock adjustment frequency output by the clock following module to perform data processing and logic control.

[0025] Beneficial effects: This solution is controlled through an asynchronous first-in-first-out storage module, and uses the data valid flag signal as the write control signal of the first-in-first-out storage module to cope with the frequency deviation problem in non-homologous systems; the clock following module and the first-in-first-out storage module can not only cope with the relatively large frequency deviation problem from non-homologous systems, but the clock following module can also adaptively adjust its own frequency control word according to the size of the frequency deviation to control the speed of frequency change.

[0026] This solution uses DDS to generate a follower clock. The frequency control word of DDS can dynamically adjust the clock frequency, increasing or decreasing the frequency of the recovered clock in smaller steps, so that the clock frequency changes very slowly and the jitter is very small. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 It is a schematic diagram of the device structure of method 1 in the prior art;

[0028] Figure 2 yes Figure 1 Schematic diagram of scenario 1 where the data edge position is offset;

[0029] Figure 3 yes Figure 1 Schematic diagram of scenario 2 where the data edge position is offset;

[0030] Figure 4 It is a schematic diagram of the device structure of method 2 in the prior art;

[0031] Figure 5is a schematic diagram of the structure of a device according to an embodiment of the present invention;

[0032] Figure 6 This is a schematic diagram of the structure of the clock follower module embodiment of the present invention;

[0033] Figure 7 It is a method flow chart of an embodiment of the present invention.

[0034] Reference numerals:

[0035] 1. Sampling module; 2. Oversampling recovery module; 3. Bit width conversion module; 4. Post-stage logic module; 11. Post-stage logic module; 12. Clock following module; 100. Oversampling module; 200. Oversampling data recovery module; 300. Bit width conversion module; 400. First-in-first-out storage module; 500. Clock following module; 510. Frequency control word decision module; 520. First synchronization register; 530. First adder; 540. Phase accumulation register; 550. Second adder; 560. Second synchronization register; 570. Waveform data table; 580. Clock buffer unit; 600. Post-stage logic module. DETAILED DESCRIPTION

[0036] In order to make the purpose, 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 and completely described below. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Unless otherwise defined, the technical terms or scientific terms used herein should be understood by people with general skills in the field to which the present invention belongs. "Including" and similar words used in this article mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects.

[0037] like Figure 5 As shown, an embodiment of the present invention provides a clock recovery system, including an oversampling module 100, an oversampling data recovery module 200, a bit width conversion module 300, a first-in-first-out storage module 400, a clock following module 500 and a post-stage logic module 600.

[0038] The oversampling module 100 oversamples the serial clock signal to be recovered to output parallel oversampled data. The oversampled data recovery module 200 recovers the parallel oversampled data output by the oversampled module 100 to obtain valid data and a flag signal. The bit width conversion module 300 adds or deletes the valid data according to the flag signal output by the oversampled data recovery module 200 to obtain target bit width data and a data valid flag signal. The first-in-first-out storage module 400 writes the target bit width data according to the data valid flag signal and reads out the valid data. The clock follower module 500 adjusts the clock according to the read waterline change output of the first-in-first-out storage module 400 to adjust the clock frequency of the first-in-first-out storage module 400. The post-stage logic module 600 reads the data stream from the first-in-first-out storage module 400 and receives the clock adjustment frequency output by the clock follower module 500.

[0039] In one embodiment, the oversampling module 100 is used to sample the serial data to obtain sampled data. Preferably, the oversampling module 100 is a high-speed SERDES circuit.

[0040] Specifically, the original serial data rate is 622.08Mbps, and the sampling rate of the high-speed SERDES circuit is configured to 622.08Mbps*8=4976.64Mbps. The oversampled data multiple is 8 times the serial data, so each valid data will be repeatedly sampled 8 times, and the clock frequency may have a deviation of plus or minus 400ppm (i.e. 0.4%). The clock frequency used by the receiving end of the high-speed SERDES circuit to sample parallel data is 77.76Mhz, and the clock frequency used by the transmitting end of the high-speed SERDES circuit to sample parallel data is 155.52Mhz. The transmitting end of the high-speed SERDES circuit converts parallel data into a serial data stream, and the transmitting end outputs 64-bit parallel data. The receiving end of the high-speed SERDES circuit recovers parallel data from the serial data stream, and the receiving end outputs 32-bit parallel data. The data transmission process is oversampled, and the sampling points are increased to improve the recovery accuracy. The high-speed SERDES circuit maintains a high data rate of the circuit. After the oversampled data is restored, the data bit width becomes 4 bits, and the data bit width processed by the post-stage logic module 600 is 8 bits.

[0041] The oversampling data recovery module 200 extracts the original data from the sampled data collected by the high-speed SERDES circuit, including clock synchronization, data de-jittering and data bit width conversion operations, which improves the accuracy of data recovery. The bit width conversion module 300 converts the recovered data bit width into the required bit width to match the bit width requirements of the subsequent processing circuit. The bit width conversion module 300 ensures that the data bit width is synchronized with the system clock so that it can be processed by the first-in-first-out storage module 400.

[0042] The read and write clocks of the first-in-first-out storage module 400 are determined by the line rate and bit width of the high-speed SERDES circuit. The line rate of the high-speed SERDES circuit in this embodiment is set to 4976.64Mbps, and the actual line rate is 622.08Mbps. Since the data bit width becomes 4bit after the oversampling data is recovered, in the bit width conversion module 300, an 8bit bit width data is generated every two clock cycles and the data valid flag signal is pulled high once. Therefore, the write data bandwidth of the first-in-first-out storage module 400 is 155.52MHz*8bit*1 / 2=622.08Mbps without addition and deletion operations. The read data bandwidth is consistent with the write, the read clock should be 622.08Mbps / 8bit=77.76MHz, and the clock follower module 500 needs to generate a 77.76MHz clock.

[0043] The write enable of the FIFO storage module 400 is jointly acted by the write full flag signal and the data valid flag signal. Since the add / delete operation data and the valid flag signal of the bit width conversion module 300 will also change, the write bandwidth of the FIFO storage module 400 changes with the change of the data valid flag signal. When the bandwidth at both ends of the FIFO storage module 400 is strictly consistent, it means that the data rate written to the FIFO storage module 400 is equal to the data rate read from the FIFO storage module 400, and the data in the FIFO storage module 400 is filled and consumed at a constant rate. In this case, the waterline of the FIFO storage module 400 remains at a constant position and does not move up and down, ensuring that the data flow will not be delayed or data lost when passing through the FIFO storage module 400. In the case of inconsistency, when the bandwidth of write data increases, the FIFO storage module 400 is filled faster and the read waterline moves up; when the bandwidth of write data decreases, the filling speed of the FIFO storage module 400 slows down and the read waterline moves down. This inconsistency may cause data accumulation or insufficient data consumption in the FIFO storage module 400, thereby affecting the efficiency of the entire data flow. In order to manage this inconsistency, the FIFO storage module 400 is provided with a read-write waterline mechanism. The read enable signal of the FIFO storage module 400 needs to be pulled high after writing data of half the depth of the FIFO storage module 400 to avoid data errors caused by rapid reading. Preferably, the depth of the FIFO storage module 400 is set to 1k, and the read enable needs to be pulled high when the read pointer address is 512. In this way, the FIFO storage module 400 can automatically adjust its fill level to adapt to the mismatched read and write rates, thereby maintaining the continuity and integrity of the data flow.

[0044] like Figure 6As shown, the clock following module 500 includes a frequency control word decision module 510, a first synchronization register 520, a first adder 530, a phase accumulation register 540, a second adder 550, a second synchronization register 560, a waveform data table 570 and a clock buffer unit 580. The output end of the frequency control word decision module 510 is connected to the input end of the first synchronization register 520, the output end of the first synchronization register 520 is connected to the first input end of the first adder 530, the output end of the first adder 530 is connected to the input end of the phase accumulation register 540, the first output end of the phase accumulation register 540 is connected to the second input end of the first adder 530, and the control ends of the frequency control word decision module 510, the first synchronization register 520 and the phase accumulation register 540 are connected to the reference clock.

[0045] The first input end of the second adder 550 is connected to the second output end of the phase accumulation register 540, the second input end of the second adder 550 is connected to the output end of the second synchronization register 560, the input end of the second synchronization register 560 is connected to the phase control word, the output end of the second adder 550 is connected to the control end of the waveform data table 570, and the control end of the second synchronization register 560 is connected to the reference clock. The input end of the clock buffer unit 580 is connected to the output end of the waveform data table 570, and the output end of the clock buffer unit 580 outputs the adjustment clock.

[0046] Specifically, the reference clock of the high-speed SERDES circuit is used as the input of the phase-locked loop, and the phase-locked loop generates a 311.04 MHz clock as the reference clock of the frequency control word decision module 510. The frequency control word decision module 510 is a multiplexer, and the frequency control word decision module 510 determines the read pointer address and the reference clock of the first-in-first-out storage module 400 according to the first-in-first-out storage module 400. , adjust the output frequency control word to the first synchronization register 520; the frequency control word decision module 510 sets the initial frequency control word to 32'd1073741824, which is calculated based on the design requirements and the expected output frequency; according to the DDS (Direct Digital Synthesis) calculation formula , where B is the frequency control word and N is the bit width of the frequency control word. If the read waterline rdusedw_ff2 of the FIFO storage module 400 exceeds 512+32 (i.e., the amount of data read in the FIFO storage module 400 exceeds a certain threshold), the value of the frequency control word is increased, and the increased value is 32'h0000_29E9, which is a 16-bit binary number, equivalent to an increase of 777Hz (i.e., 10ppm). The adjusted frequency control word value is brought into the DDS calculation formula to obtain a clock of 77.760777MHz, which is 777Hz higher than the standard clock.

[0047] If the read waterline rdusedw_ff2 of the FIFO storage module 400 is lower than 512-32 (i.e., the amount of data read in the FIFO storage module 400 is lower than a certain threshold), the value of the frequency control word is reduced, and the reduced value is 32'h0000_29E9, which is a 16-bit binary number, equivalent to a reduction of 777Hz; the adjusted frequency control word value is substituted into the DDS calculation formula to obtain a clock of 77.759223MHz, which is a reduction of 777Hz relative to the standard clock.

[0048] If the read waterline rdusedw_ff2 of the first-in-first-out storage module 400 varies between 512-32 and 512+32, smaller adjustments can be made. If rdusedw_ff2 is less than rdusedw_ff1, the value of the frequency control word is increased, and the increased value is 32'h0000_14F4, which is equivalent to an increase of 388Hz (5ppm). If rdusedw_ff2 is greater than rdusedw_ff1, the value of the frequency control word is reduced, and the reduced value is also 32'h0000_14F4, which is equivalent to a decrease of 388Hz (5ppm). rdusedw_ff1 and rdusedw_ff2 are both read waterlines of the first-in-first-out storage module 400, rdusedw_ff1 is the read pointer of the first-in-first-out storage module 400, and rdusedw_ff2 is the read pointer of the first-in-first-out storage module 400.

[0049] By adjusting the frequency control word as above, it can be ensured that the waterline is always between 512+32 and 512-32. At the same time, in order to prevent excessive jitter, the frequency control word is adjusted every ten The clock cycle is updated once, and the counter counts from 0 to 9, and rdusedw_ff1 is less than or equal to the preset read use watermark, so the frequency control word can only be changed when the watermark is updated. These adjustments are intended to dynamically adjust the frequency of the output clock according to the amount of data read in the FIFO storage module 400 to keep the data stream synchronized with the clock. In this way, the system can respond to changes in the read operation of the FIFO storage module 400 and adjust the clock frequency accordingly to ensure the correct processing and transmission of data.

[0050] At each rising edge of the clock, the phase accumulation register 540 continuously accumulates the frequency control word, and its overflow frequency (fast or slow) is the signal frequency output by the DDS, and the data output by the phase accumulation register 540 is the value address of the waveform data table 570. The waveform data table 570 takes out the corresponding value according to the data table value address output by the phase accumulation register 540. Since the output in this scheme is not a traditional sine wave waveform, but a clock square wave, there are only two amplitude values ​​1 and 0 in the waveform data table 570, among which the first half of the address is 1 and the second half is 0, which is the most reasonable. It is usually necessary to reasonably select the storage depth of the waveform data table 570, so it is not necessary to retain the output of all phase accumulation registers 540 as the address of the selected address waveform data table. Usually, half the bit width of the output data of the phase accumulation register 540 is intercepted as the depth of the waveform data table 570.

[0051] The waveform data table 570 also adjusts the initial phase of the output clock relative to the reference clock refclk through the phase control word according to the phase requirement of the output clock. In this solution, the phase control word is 0, so the output clock phase is consistent with the reference clock phase.

[0052] The clock follower module generates a reference clock through a phase-locked loop, adjusts the frequency control word according to the read and write waterline of the first-in-first-out storage module 400, generates a clock signal through the phase accumulator register 540 and the waveform data table 570, and adjusts the phase of the output clock according to the phase control word to achieve synchronization between the clock signal and the data signal.

[0053] The frequency and phase of the clock signal are dynamically adjusted according to the read operation and phase control requirements of the FIFO storage module 400 to achieve clock output synchronized with the data stream. By adjusting the frequency control word, the required 77.76MHz clock can be generated, and the frequency variation of the clock relative to the standard clock is controlled within 10ppm, ensuring the stability and accuracy of the clock.

[0054] like Figure 7 As shown, as another embodiment of the present invention, a clock recovery method includes:

[0055] S1: converting serial data into parallel oversampled data through a high-speed SERDES circuit or other oversamplers, and outputting the parallel oversampled data to the oversampled data recovery module 200;

[0056] S2: The oversampled data is passed through the oversampled data recovery module 200 to obtain recovered valid data and an adding flag signal and a deleting flag signal;

[0057] S3: adding or deleting the restored data according to the adding and deleting flag signals in the bit width conversion module 300 to obtain the ideal bit width data and the data valid flag signal;

[0058] S4: The data valid flag signal is used for the write enable of the FIFO storage module 400 to control the write bandwidth of the FIFO storage module 400. The data read from the FIFO storage module 400 is continuous and valid data, and the control of the data valid flag signal is no longer required.

[0059] S5: The clock following module 500 is controlled by reading the waterline change of the FIFO storage module 400, and the clock frequency is adjusted in real time to ensure that the FIFO storage module 400 is not empty or full, thereby achieving the effect of the clock following the data. The post-stage logic module 600 reads the data stream from the FIFO storage module 400 and receives the clock adjustment frequency output by the clock following module 500 for data processing and logic control.

[0060] Although the embodiments of the present invention are described in detail above, it is obvious to those skilled in the art that various modifications and variations can be made to these embodiments. However, it should be understood that such modifications and variations are within the scope and spirit of the present invention as described in the claims. Moreover, the present invention described herein may have other embodiments and may be implemented or realized in a variety of ways.

Claims

1. A clock recovery system, characterized in that: It includes an oversampling module, an oversampling data recovery module, a bit width conversion module, a first-in-first-out storage module and a clock following module, wherein the oversampling module is used to oversample the serial clock signal to be recovered to output parallel oversampled data, the oversampled data recovery module is used to recover the parallel oversampled data to obtain valid data and a flag signal, the bit width conversion module is used to add or delete the valid data according to the flag signal to obtain target bit width data and a data valid flag signal, the first-in-first-out storage module is used to write the target bit width data according to the data valid flag signal and read out the valid data, and the clock following module is used to output an adjustment clock according to a read waterline change of the first-in-first-out storage module to adjust the clock frequency of the first-in-first-out storage module; The clock following module includes a frequency control word decision module, a first synchronization register, a first phase accumulator and a waveform data table. The output end of the frequency control word decision module is connected to the input end of the first synchronization register, the output end of the first synchronization register is connected to the input end of the first phase accumulator, the output end of the first phase accumulator is connected to the control end of the waveform data table, the control end of the first synchronization register is connected to the reference clock, the frequency control word decision module is used to generate a frequency control word according to the read pointer address and the reference clock of the first-in-first-out storage module, the first phase accumulator is used to accumulate the frequency control word output by the first synchronization register to output the accumulated frequency control word, and the waveform data table is used to output the adjusted clock according to the accumulated frequency control word.

2. The clock recovery system according to claim 1, characterized in that: The first phase accumulator includes a first adder and a phase accumulator register, the first input end of the first adder is connected to the output end of the first synchronization register, the output end of the first adder is connected to the input end of the phase accumulator register, the output end of the phase accumulator register is connected to the second input end of the first adder, and the control end of the phase accumulator register is connected to the reference clock.

3. The clock recovery system according to claim 1 or 2, characterized in that: The clock following module also includes a second phase accumulator, a first input end of the second phase accumulator is connected to an output end of the first phase accumulator, a second input end of the second phase accumulator is connected to a phase control word, and an output end of the second phase accumulator is connected to a control end of the waveform data table.

4. The clock recovery system according to claim 3, characterized in that: The second phase accumulator includes a second adder and a second synchronization register, the first input end of the second adder is connected to the output end of the first phase accumulator, the second input end of the second adder is connected to the output end of the second synchronization register, the input end of the second synchronization register is connected to the phase control word, the output end of the second adder is connected to the control end of the waveform data table, and the control end of the second synchronization register is connected to the reference clock.

5. The clock recovery system according to claim 1, characterized in that: The clock following module further includes a clock buffer unit, an input end of the clock buffer unit is connected to an output end of the waveform data table, and an output end of the clock buffer unit outputs the adjusted clock.

6. The clock recovery system according to claim 1, characterized in that: The frequency control word decision module is a multiplexer.

7. The clock recovery system according to claim 1, characterized in that: It also includes a post-stage logic module, which is used to read the data stream from the first-in-first-out storage module and receive the clock adjustment frequency output by the clock following module.

8. A clock recovery method, characterized in that: A clock recovery system as claimed in any one of claims 1 to 7, comprising: Oversampling the serial clock signal to be recovered to output parallel oversampled data; Restoring the parallel oversampled data to obtain valid data and a flag signal; Adding or deleting the valid data according to the flag signal to obtain target bit width data and a data valid flag signal; Writing the target bit width data into a first-in-first-out storage module according to the data valid flag signal, and reading out valid data; The frequency of the clock is adjusted in real time according to the change of the read waterline of the FIFO storage module.

9. The clock recovery method according to claim 8, characterized in that: include: The data stream is read from the FIFO storage module and the clock adjustment frequency output by the receiving clock follower module is performed to perform data processing and logic control.