LVDS oversampling data recovery method based on FPGA

By employing FPGA pipeline parallel mode and multiple sampling clocks at the same frequency in UAV wireless laser communication, the problem of FPGA clock resource limitation is solved, achieving efficient signal oversampling and data recovery, and ensuring the stability and accuracy of data recovery.

CN119011029APending Publication Date: 2024-11-22BEYI LASER TECH (HUZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411292169.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

In UAV wireless laser communication, existing technologies struggle to achieve efficient signal oversampling and data recovery while ensuring the reliability of FPGA operating timing, especially due to timing degradation issues caused by FPGA clock resource limitations and high-frequency sampling.

Method used

It adopts a parallel high-speed working mode of FPGA pipeline, uses multiple sampling clocks with the same frequency as the signal for oversampling, and reduces clock resource requirements through steps such as beat delay, multiple oversampling, shaping, edge detection and phase coding, so as to ensure the accuracy and stability of data recovery.

Benefits of technology

It enables multiple oversampling at lower frequencies, reduces the demand on FPGA resources, improves the stability and accuracy of data recovery, avoids timing degradation, and is suitable for practical applications of FPGA.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119011029A_ABST
    Figure CN119011029A_ABST
Patent Text Reader

Abstract

The invention relates to an LVDS (Low Voltage Differential Signaling) oversampling data recovery method based on an FPGA (Field Programmable Gate Array), which comprises the following steps: step 1), receiving an LVDS signal, and carrying out beat delay on one end of the LVDS signal; step 2), performing multiple oversampling on the signals at the two ends by using clocks with different phases; step 3), shaping the sampled data, and removing burrs; step 4), performing edge detection on the shaped data; step 5), performing phase discrimination coding on the data according to an edge detection result; and 6) selecting data needing to be recovered from the integer data in the step 3) according to the phase discrimination code. According to the method, the characteristics of an FPGA assembly line parallel working mode are fully utilized, a plurality of same-frequency sampling clocks are simultaneously used for performing oversampling on signals, burr filtering and data recovery are performed, the deterioration of a working time sequence is avoided by reducing the use of too high clock frequency, and the sampling stability and reliability are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This patented technology belongs to the field of wireless laser communication technology for unmanned aerial vehicles, and specifically relates to an LVDS oversampling data recovery method based on FPGA. Background Art

[0002] In UAV wireless laser communication, in order to obtain communication data, the received signal needs to be sampled. The sampling accuracy directly affects the quality of data recovery. Sampling efficiency and accuracy are the guarantee of the reliability of UAV wireless laser communication.

[0003] In signal processing, oversampling usually refers to the process of sampling a signal at a sampling frequency that is more than twice the highest frequency of the signal. Taking a 200M signal as an example, in order to accurately recover the data content of the signal, it is necessary to sample it at a sampling frequency of at least 400MHz. The maximum frequency of a stable working clock of a general FPGA is around 300MHz. A higher frequency means more resources are required, which often leads to timing degradation. In addition, the FPGA clock is a resource with a limited number, and too many clocks will also cause the FPGA working state to be unstable. In order to meet the needs of signal sampling and the reliability of the FPGA working timing at the same time, it is necessary to sample the signal and perform data recovery at a lower frequency and with as few clocks as possible. Summary of the invention

[0004] The purpose of the present invention is to overcome the above-mentioned shortcomings. In combination with the characteristics of the FPGA pipeline parallel high-speed working mode, a method for oversampling data recovery of a signal using a sampling clock with the same frequency as the signal is proposed. The requirements for the FPGA operating frequency are greatly reduced, fewer resources can be used to accurately recover the signal data, and the reliability of the FPGA working timing is guaranteed.

[0005] According to the technical solution provided by the present invention, a LVDS oversampling data recovery method based on FPGA includes the following steps:

[0006] Step 1), receiving LVDS signal and performing beat delay on one end;

[0007] Step 2), using clocks with different phases to perform multiple oversampling on the signals at both ends;

[0008] Step 3), perform integer shaping on the sampled data to remove burrs;

[0009] Step 4), edge detection is performed on the integer data;

[0010] Step 5), phase-code the data according to the edge detection result;

[0011] Step 6), select the data to be restored based on the phase-detection coding of the integer data in step 3).

[0012] As a further improvement of the present invention, the beat delay in step 1) includes: using the primitive idelay to delay the signal at one end by a certain bit, providing two signal sampling samples with different phases for the sampling frequency, so as to reduce the clock resources by half.

[0013] As a further improvement of the present invention, the step 2) includes: the clock manager generates N / 4 sampling clocks with the same frequency as the signal and different phases according to the sampling multiple N.

[0014] As a further improvement of the present invention, the multiple oversampling is to sample the signals at both ends through double edges, so each clock can oversample the data at one end twice, thereby further reducing the demand for clock resources to obtain multiple oversampling.

[0015] As a further improvement of the present invention, the step 3) includes: caching the sampled data d0[0]-d0[N-1] obtained in step 2) for one beat, and the current sampled data d1[0]-d1[N-1], where N is the sampling multiple; adding 5 consecutive data to obtain d_add0-d_add N-1 , compared with the threshold value 3'b010, if it is greater than the threshold value, the sampling signal at this point is judged to be 1'b1, otherwise it is 1'b0.

[0016] As a further improvement of the present invention, the step 4) includes: performing XOR on the shaped adjacent bit data, if the XOR result is 1, it indicates that there is an edge between adjacent signals; if the XOR result is 0, it indicates that there is no edge between adjacent signals.

[0017] As a further improvement of the present invention, the step 5) includes: when encountering a data edge or the code is accumulated to a maximum value N-1, the coding restarts from 0, and the subsequent coding is the previous coding plus 1, where N is the sampling multiple.

[0018] As a further improvement of the present invention, step 6) includes: according to the phase-locked coding result of step 5), selecting data that is relatively in the middle of the data and encoded as (N-1) / 2 as the recovery result, and according to the actual signal duty cycle, the data selection bit can be adjusted accordingly.

[0019] The beneficial effects of the present invention are:

[0020] Make full use of the characteristics of the FPGA pipeline parallel working mode, use multiple sampling clocks with the same frequency to oversample the signal, and perform glitch filtering and data recovery. By reducing the use of excessively high clock frequencies, the degradation of working timing is avoided, ensuring the stability and reliability of sampling.

[0021] Compared with the traditional oversampling data recovery method, this method does not require a sampling frequency that is several times higher than the signal data. It can complete multiple oversampling of the signal with only several sampling clocks of the same frequency, which greatly reduces the resource requirements for the FPGA and has a certain tolerance for frequency deviation. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 The figure is a flow chart of the method of the present invention.

[0023] Figure 2 A flowchart illustrating an oversampled data recovery method in detail.

[0024] Figure 3 This is an example diagram of integer filtering. DETAILED DESCRIPTION

[0025] The present invention will be further described below with reference to the embodiments in the accompanying drawings:

[0026] As shown in the figure, a LVDS oversampling data recovery method based on FPGA includes the following steps:

[0027] Step 1), receiving LVDS signal and performing beat delay on one end;

[0028] Step 2), using clocks with different phases to perform multiple oversampling on the signals at both ends;

[0029] Step 3), perform integer shaping on the sampled data to remove burrs;

[0030] Step 4), edge detection is performed on the integer data;

[0031] Step 5), phase-code the data according to the edge detection result;

[0032] Step 6), select the data to be restored based on the phase-detection coding of the integer data in step 3).

[0033] The beat delay in step 1) includes: using the primitive idelay to delay the signal at one end by a certain bit, providing two signal sampling samples with different phases for the sampling frequency, so as to reduce the clock resources by half.

[0034] Step 2) includes: the clock manager generates N / 4 sampling clocks with the same frequency as the signal and different phases according to the sampling multiple N, and samples the signals at both ends through the double edges. Then, each clock can oversample the data at one end by twice, thereby further reducing the demand for clock resources to obtain multiple oversampling; compared with the existing technology, the sampling clock does not need to be several times the frequency of the signal, and is more suitable for FPGA implementation.

[0035] Step 3) includes: caching the sampled data d0[0]-d0[N-1] obtained in step 2) for one beat, and the current sampled data d1[0]-d1[N-1], where N is the sampling multiple; adding 5 consecutive data to obtain d_add0-d_add N-1 , compared with the threshold value 3'b010, if it is greater than the threshold value, the sampling signal at this point is judged to be 1'b1, otherwise it is 1'b0.

[0036] Step 4) includes: performing XOR on the shaped adjacent bit data, if the XOR result is 1, it indicates that there is an edge between adjacent signals; if the XOR result is 0, it indicates that there is no edge between adjacent signals.

[0037] Step 5) includes: when encountering a data edge or the code is accumulated to a maximum value N-1, the code restarts from 0, and the subsequent code is the previous code plus 1, where N is the sampling multiple.

[0038] Step 6) includes: according to the phase-locked coding result of step 5), the data in the middle of the data and coded as (N-1) / 2 is usually selected as the recovery result, and the data selection bit can be adjusted accordingly according to the actual signal duty cycle. Ideally, there should be only one data to be recovered in each clock cycle, but due to the existence of edge glitches and the clock frequency and signal are not necessarily completely consistent, there may be 0 or 2 data to be recovered in one clock cycle. By judging the number of times the phase-locked coding (N-1) / 2 appears in the cycle, the number of recovered data in the cycle is determined, and the corresponding position data is written into the buffer as the final recovered data. After the data is received, the buffer is cleared to avoid the generation of bit errors due to the buffer being full; this data recovery step allows a certain degree of deviation between the sampling frequency and the signal, taking into account the situation where the sampling frequency is slightly higher / slightly lower than the signal, which meets the actual use needs.

[0039] Example

[0040] Take 8 times oversampling of 200M signal as an example:

[0041] After the differential data enters the FPGA, step 1 is performed to buffer the received differential data for complementary output, beat the p-end data by 1 / 8 bit, and the n-end data has no delay, such as Figure 2 In the middle, DATA_p and ~DATA_n lines.

[0042] Perform step 2 on the two data channels to generate 200MHz clocks CLK0 and CLK90 with two phases of 0 and 90 degrees, and perform double-edge sampling on the two data channels respectively.

[0043] According to step 3, the data d0[0]-d0[7] obtained by double-edge sampling and the current sampling data d1[0]-d1[7] are cached. Figure 3 As shown, taking the sampling data d0 = 10111100 and d1 = 00010011 as an example, 5 consecutive signals are added to obtain d_add0~d_add7: 3'b100, 3'b100, 3'b100, 3'b100, 3'b100, 3'b011, 3'b011, 3'b010, which are compared with the threshold 3'b010 respectively to obtain the integer data d real =8'b01111111.

[0044] Cache a shot of integer data, and perform XOR processing on the current data and the previous shot of data according to step 4, so that the previous shot of data d real =8'b10000000 and current data d real =8'b01111111 as an example, the edge detection result is d trans =8'b01000000.

[0045] Cache one beat of edge detection data, and compare it with the upper data according to step 5. If this bit of edge detection data is 1 (that is, there is an edge flip) or the previous phase-locked code is 7, then the phase-locked code is reset to zero and starts counting again, otherwise +1. trans =8'b01000000 and current data d trans =8'b01000000 as an example, the phase detection code is d samcode ={7,0,1,2,3,4,5,6}.

[0046] According to step 6, the phase-locked code is collected and the position is determined. In order to collect the middle of the data, code 3 or 4 is selected as the best collection position. For example, if the phase-locked code in the cycle is {4,5,6,7,0,1,2,3}, the position is determined to be {0000_0001}. If the code in the cycle is {3,4,5,6,0,1,2,3}, the position is determined to be {1000_0001}.

[0047] The data at the corresponding position is cached into data[cnt], and the data bit count cnt+0 / 1 / 2 is restored as needed. When cnt counts to 7, it is reset to zero, and data[0:7] is written to FIFO. When the count reaches 7 and the acquisition position judgment of this cycle is 2, the high bit needs to be cached to data[8], and data[8] is written to data[0] in the next cycle, and the acquisition data of the next cycle is postponed. When the count is 0, the acquisition position judgment of the previous cycle is not 2, and the acquisition position judgment of this cycle is 0, data is not written to FIFO in this cycle.

Claims

1. A LVDS oversampling data recovery method based on FPGA, characterized in that: The following steps are involved: Step 1), receiving LVDS signal and performing beat delay on one end; Step 2), using clocks with different phases to perform multiple oversampling on the signals at both ends; Step 3), perform integer shaping on the sampled data to remove burrs; Step 4), edge detection is performed on the integer data; Step 5), phase-code the data according to the edge detection result; Step 6), select the data to be restored based on the phase-detection coding of the integer data in step 3).

2. The FPGA-based LVDS oversampling data recovery method according to claim 1, characterized in that: The beat delay in step 1) includes: using the primitive idelay to delay the signal at one end by a certain bit, providing two signal sampling samples with different phases for the sampling frequency, so as to reduce the clock resources by half.

3. The FPGA-based LVDS oversampling data recovery method according to claim 1, characterized in that: The step 2) includes: the clock manager generates N / 4 sampling clocks with the same frequency as the signal and different phases according to the sampling multiple N.

4. The FPGA-based LVDS oversampling data recovery method according to claim 3, characterized in that: The multiple oversampling is to sample the signals at both ends through double edges, so each clock can perform two times oversampling on the data at one end, thereby further reducing the demand for clock resources to obtain multiple oversampling.

5. The FPGA-based LVDS oversampling data recovery method according to claim 1, characterized in that: The step 3) includes: caching the sampled data d0[0]-d0[N-1] obtained in step 2) for one beat, and the current sampled data d1[0]-d1[N-1], where N is the sampling multiple; adding 5 consecutive data to obtain d_add0-d_add N-1 , compared with the threshold value 3'b010, if it is greater than the threshold value, the sampling signal at this point is judged to be 1'b1, otherwise it is 1'b0.

6. The FPGA-based LVDS oversampling data recovery method according to claim 1, characterized in that: The step 4) includes: performing XOR on the shaped adjacent bit data, if the XOR result is 1, it indicates that there is an edge between adjacent signals; if the XOR result is 0, it indicates that there is no edge between adjacent signals.

7. The FPGA-based LVDS oversampling data recovery method according to claim 1, characterized in that: The step 5) includes: when encountering a data edge or the code is accumulated to a maximum value N-1, the code restarts from 0, and the subsequent code is the previous code plus 1, where N is the sampling multiple.

8. The FPGA-based LVDS oversampling data recovery method according to claim 1, characterized in that: The step 6) includes: according to the phase-detection coding result of step 5), selecting the data in the middle of the data and coded as (N-1) / 2 as the recovery result, and adjusting the data selection bit accordingly according to the actual signal duty cycle.