A serial data receiving and recovery method, a computer-readable storage medium and an electronic device
Through multiple sampling circuits with different preset phase delay sampling signals sampled serial data multiple times in the same transmission period, the problem of high frequency requirements of CDR circuits in the prior art at high transmission rates is solved, and the structure is simple and efficient data recovery.
Patent Information
- Application Number
- CN202411161717.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-08-23
AI Technical Summary
The prior art lacks a simple structure and suitable for high transmission rate requirements. Traditional CDR circuits need to increase the sampling frequency at high transmission rates, resulting in high system complexity and frequency requirements.
The sampling circuit of multiple preset phase delay sampling signals is used to sample serial data, so as to achieve multiple sampling times within the same transmission period, avoid increasing the sampling frequency, and thus implement a CDR circuit with high transmission rate requirements.
The system structure is simplified, the number of connection lines is reduced, and the CDR circuit suitable for high transmission rates is realized. It also samples multiple times in the same transmission cycle through multiple sampling signals to ensure the correctness and reliability of data transmission.
Smart Images

Figure CN118694508B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of integrated circuit design, and in particular relates to a serial data receiving and recovery method, a computer-readable storage medium and an electronic device. Background Art
[0002] With the rapid development of communication technology, users in the fields of aerospace, automobile, medical and industrial automation control have put forward higher requirements for data transmission. For the traditional parallel transmission method, on the one hand, the inevitable noise, the time domain deviation between the data channels and the time domain deviation between the data and the clock will limit the transmission speed of a single channel. On the other hand, the total transmission rate cannot be increased by increasing the number of parallel paths indefinitely, because as the number of parallel paths increases, crosstalk and switching noise will cause a serious decline in signal quality. In addition, too many IO (Input / Output) numbers are also unacceptable in applications. Therefore, in order to increase the data interface transmission speed and reduce the complexity of system connections, serial communication interfaces came into being.
[0003] The most critical technology in the field of serial communication technology is the CDR (Clock and Data Recovery) circuit, which completes the functions of clock generation and data reset and plays a decisive role in the performance of the entire communication system. The CDR circuit consists of two parts: clock recovery and data recovery, and data recovery can be subdivided into clock data phase adjustment circuit and data sampling decision circuit. According to the phase relationship between the local clock and data during data sampling and the different implementation methods, the structure of CDR is roughly divided into three categories: feedforward phase tracking type, feedback phase tracking type and (no phase tracking) blind oversampling type. Among them, both feedforward phase tracking type and feedback phase tracking type CDR require clock tracking and phase calibration, so they have the characteristics of complex structure and slow phase locking speed. Although the blind oversampling type CDR circuit has a simple structure and is easy to transplant, it generally uses a sampling rate of 3 to 4 times. For the case of higher serial data transmission rate, it needs to match a higher oversampling frequency, which puts forward high frequency requirements on the system.
[0004] In summary, there is no CDR circuit in the prior art that has a simple structure and is suitable for high transmission rate requirements. Summary of the invention
[0005] The present invention provides a serial data receiving and recovery method, which samples serial data respectively through multi-channel sampling circuits, reduces the sampling frequency of each sampling circuit, and is suitable for high transmission rate requirements.
[0006] Other purposes and advantages of the present invention can be further understood from the technical features disclosed in the present invention.
[0007] In order to achieve one or part or all of the above purposes or other purposes, a technical solution of the present invention provides a serial data receiving and recovery method, including: a transmitting end obtains business data, converts parallel business data into serial data and then outputs it; a receiving end receives the serial data, generates a sampling circuit with multiple different preset phase delay sampling signals to sample the serial data respectively to obtain sampling data, analyzes the sampling data to obtain sampling results, and restores the sampling results to parallel data before sending them to user logic. The beneficial effect of this technical solution is that the serial data is sampled respectively by sampling circuits with multiple different preset phase delay sampling signals, so that the serial data can be sampled multiple times in the same transmission cycle. Therefore, the receiving end does not need to increase the sampling frequency, thereby realizing a CDR circuit suitable for high transmission rate requirements.
[0008] The sampling circuit generates the sampling signal in the following manner: according to the number of the sampling signals, the timing of a sampling cycle of the sampling signal is divided into a plurality of shift timings in equal proportion; and the plurality of sampling signals are asynchronously shifted at equal intervals according to a shift timing to generate a plurality of the sampling signals.
[0009] In any data transmission cycle, the serial data is sampled through the multiple sampling signals, and the sampling data with the largest number of repetitions is collected as the final sampling result.
[0010] The number of the sampling signals is at least 5.
[0011] The sampling period is the same as the data transmission period.
[0012] The sending end performs CRC check on the acquired service data to obtain a first CRC check result, and performs parallel-to-serial conversion on the parallel service data and the first CRC check result before sending them.
[0013] The receiving end also includes a CRC check module, and the parallel data restored from the sampling result is subjected to CRC check to obtain a second CRC check result; the parallel data restored from the sampling result and the second CRC check result are sent to the user logic together.
[0014] The second CRC check result is compared with the first CRC check result to see if they are consistent, and the comparison result, the parallel data restored by the sampling result, and the second CRC check result are sent to the user logic together.
[0015] The transmitting end transmits the data to the receiving end by differential signal transmission.
[0016] The receiving end receives serial data and converts the differentially transmitted data into single-ended data. The sampling results obtained after sampling and analysis of the single-ended data are subjected to serial-to-parallel conversion and CRC check.
[0017] A technical solution of the present invention provides a computer-readable storage medium, on which a serial data reception recovery program is stored. When the serial data reception recovery program is executed by a processor, the serial data reception recovery method described above is implemented.
[0018] A technical solution of the present invention provides an electronic device, comprising: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the serial data reception recovery method described above.
[0019] Compared with the prior art, the beneficial effects of the present invention mainly include:
[0020] 1. The present invention samples the serial data respectively through sampling circuits with multiple sampling signals of different preset phase delays, thereby sampling the serial data multiple times in the same transmission cycle. Therefore, the receiving end does not need to increase the sampling frequency, thereby realizing a CDR circuit suitable for high transmission rate requirements.
[0021] 2. The present invention adopts a sampling circuit whose sampling frequency is the same as the data transmission rate and the sampling signal is a multi-channel sampling clock signal. Compared with the feedforward phase tracking type and feedback phase tracking type CDR, the accompanying clock is omitted, which greatly saves the wiring in the system and simplifies the system structure.
[0022] In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the specific embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 This is a flow chart of the serial data receiving and recovery circuit of the present invention.
[0025] Figure 2 It is a system block diagram of the serial data receiving and recovery circuit of the present invention.
[0026] Figure 3 This is a timing diagram of a 5-channel sampling circuit in Example 1 of the present invention.
[0027] Figure 4 This is a timing diagram of a 4-channel sampling circuit in Example 1 of the present invention.
[0028] Figure 5 This is a timing diagram of the three-way sampling circuit in Example 1 of the present invention.
[0029] Figure 6 Schematic diagram of the timing of the two-channel sampling circuit in Example 1 of the present invention. DETAILED DESCRIPTION
[0030] The above and other technical contents, features and effects of the present invention will be clearly presented in the following detailed description of a preferred embodiment with reference to the drawings. The directional terms mentioned in the following embodiments, such as up, down, left, right, front or back, etc., are only referenced to the directions of the attached drawings. Therefore, the directional terms used are used to illustrate and not to limit the present invention.
[0031] A serial data receiving and recovery method of the present invention is explained in detail below with reference to the accompanying drawings.
[0032] In the present invention, the transmitting end obtains parallel business data, which is data in bytes. In order to improve the reliability of data transmission, the transmitting end adds CRC check results after the business data for framing. The parallel-to-serial conversion module of the transmitting end converts the parallel business data into serial data in bits, and then transmits the converted signal to the receiving end using low voltage differential signal transmission technology (LVDS). The low voltage differential signal transmission technology here has the advantages of high sensitivity and good anti-interference performance. The converted serial data is transmitted to the receiving end one by one along any differential signal transmission channel between the transmitting end and the receiving end.
[0033] Figure 2 There are two differential signal transmission channels between the transmitter and the receiver, namely Serial_data_P and Serial_data_N. In the actual transmission process, the differential transmission interface needs to appear in pairs, so multiple pairs of differential signal transmission channels can be set.
[0034] After receiving the serial data, the receiving end converts the serial differential signal into a single-ended signal through the differential-to-single-ended module, and then samples the single-ended signal through a multi-channel sampling circuit, wherein the sampling period of the multi-channel sampling signals generated by the sampling circuit is the same, and a sampling period is set to a phase angle (i.e., phase) of 360 degrees. On the basis of the reference clock sampling circuit, a shift timing is generated by presetting the phase angle, and multiple sampling signals are asynchronously shifted according to a shift timing to generate sampling signals at multiple sampling moments. Among them, the reference clock sampling circuit is specifically a sampling circuit with a delayed phase angle of 0 degrees at the sampling moment.
[0035] In order to better explain the invention, the multi-channel sampling circuit of the first embodiment takes 5 channels as an example to explain the functions realized by the sampling circuit. Figure 3 , divide the phase angle of a sampling period of 360 degrees into 5 shift timings in proportion to obtain a preset delayed phase angle of 72 degrees (360° / 5=72°). Based on the sampling signal with a phase angle of 0 degree generated by the sampling circuit, the sampling signal of 0 degree is shifted according to a shift timing of 72 degrees to obtain a clock signal with a delayed phase angle of 72 degrees, namely clk_72 in the figure. Based on the clock with a phase angle of 72 degrees, the phase angle is shifted again by 72 degrees to obtain a clock signal clk_144 with a delayed phase angle of 144 degrees. Similarly, according to the shifting method above, the clock signals clk_216 with a phase angle of 216 degrees and the clock signal clk_288 with a phase angle of 288 degrees are shifted respectively. The 5 clock signals with phase delays of 0 degrees, 72 degrees, 144 degrees, 216 degrees and 288 degrees generated by the asymmetric shifting are as follows Figure 3 As shown, there are 5 sampling signals, and any adjacent sampling signals have a phase delay of 72° phase angle. Each sampling clock signal samples and recovers the serial transmission data according to its rising edge. Of course, each falling edge can also be set as the sampling moment.
[0036] Based on the above 5 sampling signals, the serial data Serial_data is sampled respectively to obtain sampling data. In any data transmission cycle, the data collected by each of the 5 sampling signals is analyzed, and the data with the largest number of repetitions collected by each sampling signal is the data result collected in the data transmission cycle.
[0037] See also Figure 3The red rising edge of the serial data Serial_data is the transmission period of one bit of data, and the rising edge marked by the red arrows of the five sampling signals is the sampling start time of the sampling signals. In the red rising edge of Serial_data, at least the sampling signal in the middle of the five sampling signals can collect data. The sampling signals on both sides of the five sampling signals may have errors due to the jump edge of the collected data bits, but the sampling results of the three sampling signals in the middle are likely to be consistent, which can well ensure the correctness of data reception.
[0038] Finally, the serial sampling results are restored to parallel data and sent to the user logic. Since the receiving end in this solution does not need to use a higher frequency to oversample the serial data, the clock selected by the data sampling signal is consistent with the transmission rate of the serial data, which can achieve higher frequency serial data transmission.
[0039] The transmission cycle of serial data is the same as the sampling cycle of the sampling circuit. Figure 3 and Figure 4 The red line interval of Serial data is the valid data interval. For example, a high level interval and a low level interval in Clk_0 are used together as a sampling period, that is, the length of the valid data interval and the sampling period are the same, that is, the transmission rate of the serial data is the same as the sampling frequency of each sampling circuit.
[0040] refer to Figure 4 If sampling is performed using two clocks with phase delays of 0 and 180 degrees respectively, the red line position of the serial data is the data bit to be sampled, and the red arrows in Clk_0 and Clk_180 indicate the moment when the rising edge of the clock samples the sampled data bit, thereby sampling each data bit twice. However, due to Figure 4 The rising edge of Clk_0 will produce a metastable state when sampling the data bit edge, which will cause data errors. Therefore, one channel of data sampling will be correct while the other channel of data sampling will be wrong, making it impossible to make a correct judgment, resulting in low judgment accuracy.
[0041] refer to Figure 5 If sampling is performed using three clocks with phase delays of 0, 120, and 240 degrees respectively, and if the quality of the serial data signal is poor, such as offset or jitter, Clk_120 and Clk_240 may both be sampled incorrectly, resulting in errors in the overall judgment. Therefore, the accuracy of sampling using the three clocks is also low.
[0042] refer to Figure 6 , if sampling is performed using 4 clocks with phase delays of 0, 90, 180, and 270 degrees respectively, and Figure 5 The scheme of the 3-way sampling clock is similar. Clk_90 and Clk_180 will sample incorrectly when the quality of the serial data signal is poor. When the results of the two sampling errors are consistent, the correct sampling result and the incorrect sampling result will have the same ratio, which may lead to wrong judgment. Therefore, the accuracy of sampling with 4-way clock is also low.
[0043] It should be noted that if the phase delay is 6, 7 or 8 channels respectively, and sampling is performed through sampling clock signals greater than 5 channels, the problem that the traditional technology cannot be applied to high transmission rates can also be solved. However, compared with sampling through 5 channels of clocks, the structure is more complicated. Therefore, generating 5 sampling clock signals is the most preferred sampling circuit.
[0044] Reference Figure 2 The sending end obtains the business data, verifies the business data to obtain a first CRC check result, that is, the first CRC check result is the result obtained after the sender performs a check before sending the data. The business data is data in bytes. The sending end converts the business data and the first CRC check result into serial data of bits, and then sends the obtained serial data to the receiving end one by one in the form of differential signal transmission.
[0045] The receiving end is provided with a differential to single-ended module, which converts the signal transmitted by the differential signal transmission channel into single-ended data, and transmits it to the sampling circuit for sampling. The generated sampling data generates parallel sampling result data after sampling judgment. The parallel sampling result data is subjected to CRC check to obtain the second CRC check result, and the first CRC check result and the second CRC check result are detected to be consistent (if the first CRC check result and the second CRC check result are consistent, it is considered that the reception is correct) to generate a comparison result, and the comparison result and the parallel sampling result data are sent to the user logic together.
[0046] CRC check is performed on parallel data at the sending end and the receiving end respectively to detect whether the CRC check results of the sending end and the receiving end are consistent, and then to detect whether there is any error in data transmission in the system, which can be used to characterize the reliability of received data.
[0047] Compared with the traditional receiving end sampling method based on 3 to 4 times the sampling frequency for serial data, the present invention samples the serial data respectively through sampling circuits with multiple sampling signals with different preset phase delays, and realizes multiple sampling of serial data in the same transmission cycle. Therefore, the receiving end does not need to increase the sampling frequency, thereby realizing a CDR (Clock and Data Recovery) circuit suitable for high transmission rate requirements. At the same time, the sampling circuit of the present invention, whose sampling frequency is the same as the data transmission rate and whose sampling signal is a multi-channel sampling clock signal, has a simpler structure than the feedforward phase tracking type and feedback phase tracking type CDR.
[0048] Embodiment 2
[0049] Embodiment 2 provides a computer-readable storage medium, on which a serial data reception recovery program is stored, and the serial data reception recovery program is executed by a processor to implement the serial data reception recovery method in Embodiment 1. Embodiment 2 implements the serial data reception recovery method in Embodiment 1 through a program stored on a computer-readable storage medium, and has the advantages of simple and efficient data reception recovery operation.
[0050] Embodiment 3
[0051] Embodiment 3 provides an electronic device, which includes one or more processors and a memory; one or more applications are stored in the memory and configured to be executed by the one or more processors, and the above-mentioned application is configured to execute the serial data reception recovery method in embodiment 1.
[0052] The above is a detailed introduction to a serial data receiving and recovery method, a computer-readable storage medium and an electronic device provided by the present invention. The structure and working principle of the present invention are described in detail using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, the present invention can also be improved and modified, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A serial data receiving and recovery method, characterized in that: include: The sending end obtains the service data, converts the parallel service data into serial data and then outputs it; The receiving end receives the serial data, and a sampling circuit that generates multiple sampling signals with different preset phase delays samples the serial data respectively to obtain sampling data. The sampling circuit generates the sampling signal in the following manner: according to the number of the sampling signals, the timing of one sampling cycle of the sampling signal is proportionally divided into multiple shift timings; the multiple sampling signals are asynchronously shifted equidistantly according to one shift timing to generate multiple sampling signals; the number of the sampling signals is at least 5, and the sampling cycle is the same as the data transmission cycle; In any data transmission cycle, the serial data is sampled by using multiple sampling signals. The sampling data is analyzed to obtain the sampling results, and the sampling data collected with the most repetitions is used as the final sampling result; the sampling results are restored to parallel data and then sent to the user logic.
2. A serial data receiving and recovery method according to claim 1, characterized in that: The sending end performs CRC check on the acquired service data to obtain a first CRC check result, and performs parallel-to-serial conversion on the parallel service data and the first CRC check result before sending them.
3. A serial data receiving and recovery method according to claim 2, characterized in that: The receiving end also includes a CRC check module, which performs CRC check on the parallel data restored by the sampling result to obtain a second CRC check result; The parallel data restored from the sampling result and the second CRC check result are sent together to the user logic.
4. A serial data receiving and recovery method according to claim 3, characterized in that: The second CRC check result is compared with the first CRC check result to see if they are consistent, and the comparison result, the parallel data restored by the sampling result, and the second CRC check result are sent to the user logic together.
5. The serial data receiving and recovery method according to claim 1, characterized in that: The transmitting end transmits the data to the receiving end by differential signal transmission.
6. The serial data receiving and recovery method according to claim 1, characterized in that: The receiving end receives serial data and converts the differentially transmitted data into single-ended data. The sampling results obtained after sampling and analysis of the single-ended data are subjected to serial-to-parallel conversion and CRC check.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a serial data reception recovery program, and when the serial data reception recovery program is executed by a processor, the serial data reception recovery method according to any one of claims 1 to 6 is implemented.
8. An electronic device, characterized in that: include: one or more processors; Memory; One or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more application programs are configured to execute the serial data reception recovery method according to any one of claims 1 to 6.
