Differential link calibration method, system, electronic device and storage medium

By splitting the signal in the differential link and performing dynamic calibration, the code error problem caused by latch window transfer is solved, ensuring the accuracy of data acquisition and the stability of the link.

CN118869175BActive Publication Date: 2024-12-10HEFEI I TEK OPTOELECTRONICS CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411276708.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-12-10
Estimated Expiration
2044-09-12

AI Technical Summary

Technical Problem

The transfer of latch windows in differential links leads to code error problems. Especially under the operating temperature of the image sensor and the high link rate, the offset relationship between the clock signal and the differential signal changes, resulting in the failure of the sampling point position and the occurrence of noise. Pixels.

Method used

By splitting the differential signal into a positive polarity signal and a negative polarity signal, select one of the signals as the reference signal, and determine whether the opposite value of the working signal and the signal to be compared is the same. If it is different, the signal will be moved in reverse to the preset time period, and then perform the Dynamic calibration of the latch window to maintain the accuracy of signal acquisition.

Benefits of technology

It effectively avoids the code error problem caused by latch window transfer, ensures the normal operation of the differential link and the accuracy of data acquisition, and improves the stability of image transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118869175B_ABST
    Figure CN118869175B_ABST
Patent Text Reader

Abstract

The present application discloses a calibration method, system, electronic device and storage medium for a differential link, and relates to the field of data processing. The method includes: splitting the differential signal in the differential link into a positive polarity signal and a negative polarity signal; selecting the positive polarity signal or the negative polarity signal as a reference signal, and the remaining signal as a working signal for transmitting data in the differential link; judging whether the signal data of the working signal and the opposite value of the signal of the first signal to be compared are the same, if so, keeping the original time position of the positive polarity signal and the negative polarity signal unchanged; if not, moving the positive polarity signal and the negative polarity signal in reverse to a preset time period relative to the original time position. Based on the above processing, it is possible to predict the sampling point failure problem that may occur in the differential link, and perform latch window calibration in advance by moving the positive polarity signal and the negative polarity signal in reverse, thereby avoiding the bit error problem that may be caused by latch window transfer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of data processing, and in particular relates to a calibration method, system, electronic equipment and storage medium for a differential link. Background Art

[0002] Differential links are commonly found in various systems such as data acquisition and transmission. For example, in the field of machine vision, image sensors use differential links to collect image data and transmit it over long distances. Window detection and signal calibration in differential links are often completed when the signal output end is powered on and initialized, and window detection and calibration are not performed again during the operation of the differential link. For example, in differential links used for image transmission, window detection and signal calibration are usually completed when the image sensor is powered on and initialized. Once it enters the normal working state, the image sensor continues to output data streams, and window detection and calibration are no longer performed again.

[0003] If the operating temperature of the sensor changes significantly (for example, from about 25 degrees when powered on in a cold start to 60-70 degrees when working at full speed), and the link rate is high (above 1Gbps) and the ripple of the power supply of the sensor-side data interface is not well controlled, the offset relationship between the clock signal and the differential signal in the differential link may change significantly compared to that detected during power-on initialization. For example, if the original latch window of the differential signal in the differential link is too small, it is likely to cause the original sampling point position based on the clock signal to fail, and then data acquisition errors will occur. At this time, many pixels similar to noise will appear in the image data. Among them, the latch window represents the time window in which the logic level can be stably acquired based on the effective clock edge of the clock signal.

[0004] Therefore, there is an urgent need for a calibration method for the latch window of a differential signal in a differential link to avoid bit errors that may be caused by latch window shift. Summary of the invention

[0005] The present application proposes a differential link calibration method, system, electronic device and storage medium to avoid bit error problems that may be caused by latch window transfer.

[0006] To achieve the above objectives, this application proposes the following technical solutions:

[0007] In a first aspect of the present application, a differential link calibration method is provided, comprising:

[0008] Splitting the differential signal in the differential link into a positive polarity signal and a negative polarity signal;

[0009] Selecting the positive polarity signal or the negative polarity signal as a reference signal, and the remaining signal as a working signal for transmitting data in the differential link;

[0010] Determine whether the signal data of the working signal and the signal opposite value of the first signal to be compared are the same, if so, keep the original time positions of the positive polarity signal and the negative polarity signal unchanged; if not, move the positive polarity signal and the negative polarity signal in the opposite direction to a preset time period relative to the original time position;

[0011] Among them, the first signal to be compared is a signal after the reference signal is moved forward for a preset time period; the forward movement is represented by time delay or time advance, and the reverse movement represents the opposite time operation relative to the forward movement; the signal data of the working signal and the opposite signal value of the first signal to be compared are collected at the same time; the opposite signal value of the signal to be compared represents the value obtained after inverting the collected signal data of the signal to be compared.

[0012] Optionally, the signal receiving end of the differential link is configured as a fully differential circuit.

[0013] Optionally, the differential link includes a clock signal for collecting the signal data.

[0014] Optionally, the method further includes:

[0015] Executing a data determination step, the data determination step comprising determining whether the signal data of the working signal and the opposite signal value of the first signal to be compared are the same;

[0016] If not, the positive polarity signal and the negative polarity signal are reversely moved to a preset time period relative to the original time position, and the process goes to the data determination step;

[0017] If yes, then determine whether the signal data of the working signal and the opposite signal value of the second signal to be compared are the same; wherein the second signal to be compared is obtained after the reference signal is moved in the reverse direction for a preset time period;

[0018] If so, keep the original time positions of the positive polarity signal and the negative polarity signal unchanged and proceed to the data judgment step; if not, move the positive polarity signal and the negative polarity signal in the positive direction to a preset time period relative to the original time position and proceed to the data judgment step.

[0019] Optionally, the method further includes:

[0020] Determine whether the positive polarity signal and the negative polarity signal after the movement match; if so, complete a calibration, and proceed to the step of determining whether the signal data of the working signal and the signal opposite value of the first signal to be compared are the same; if not, cancel the step of moving the positive polarity signal and the negative polarity signal to a preset time period relative to the original time position, and shorten the length of the preset time period, and proceed to the step of determining whether the signal data of the working signal and the signal opposite value of the first signal to be compared are the same;

[0021] The movement includes forward movement and reverse movement; the matching determination method is: determining whether the signal data of the positive polarity signal after the movement is the same as the opposite value of the signal of the negative polarity signal after the movement.

[0022] Optionally, the preset time period is within half of the latch window time length of the differential signal.

[0023] Optionally, the latch window detection method includes:

[0024] The differential signal in the split differential link is a positive polarity signal and a negative polarity signal;

[0025] Delaying the clock signal in the differential link for multiple times in a row, and after each delay, collecting signal data of the positive polarity signal and the negative polarity signal at different delay times as a first data sequence and a second data sequence, respectively;

[0026] performing inversion processing on the signal data in the second data sequence to obtain a third data sequence;

[0027] A delay time interval having the same data in the first data sequence and the third data sequence is selected as a latch window for the differential signal.

[0028] In a second aspect of the present application, a differential link calibration system is provided, comprising:

[0029] A signal splitting module, used for splitting the differential signal in the differential link into a positive polarity signal and a negative polarity signal;

[0030] A signal selection module, used to select the positive polarity signal or the negative polarity signal as a reference signal, and the remaining signal as a working signal for transmitting data in the differential link;

[0031] A data judgment module, used to judge whether the signal data of the working signal and the signal opposite value of the first signal to be compared are the same, if so, keep the original time position of the positive polarity signal and the negative polarity signal unchanged; if not, reversely move the positive polarity signal and the negative polarity signal to a preset time period relative to the original time position;

[0032] Among them, the first signal to be compared is obtained after the reference signal is moved forward for a preset time period; the forward movement is represented by time delay or time advance, and the reverse movement represents the opposite time operation relative to the forward movement; the signal data of the working signal and the opposite signal value of the first signal to be compared are collected at the same time; the opposite signal value of the signal to be compared represents the value obtained after the collected signal data of the signal to be compared is inverted.

[0033] In a third aspect of the present application, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0034] Memory, used to store computer programs;

[0035] The processor is used to implement the steps of any calibration method when executing the program stored in the memory.

[0036] In a fourth aspect of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any calibration method are implemented.

[0037] The beneficial effects of this application are as follows:

[0038] The present application provides a differential link calibration method, including: splitting the differential signal in the differential link into a positive polarity signal and a negative polarity signal; selecting the positive polarity signal or the negative polarity signal as a reference signal, and the remaining signal as a working signal for transmitting data in the differential link; judging whether the signal data of the working signal and the opposite value of the signal of the first signal to be compared are the same, and if so, keeping the original time position of the positive polarity signal and the negative polarity signal unchanged; if not, moving the positive polarity signal and the negative polarity signal in the opposite direction to a preset time period relative to the original time position.

[0039] Based on the above processing, the present application transmits the data in the differential link through the working signal to ensure the normal operation of the differential link. At the same time, by adjusting the reference signal and comparing it with the working signal, it can predict the sampling point failure problem that may occur in the differential link, and perform latch window calibration in advance by moving the positive polarity signal and the negative polarity signal in reverse, thereby avoiding the bit error problem that may be caused by the latch window transfer. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0041] Figure 1 It is a schematic diagram of a latch window movement provided by the present application;

[0042] Figure 2 is a flow chart of a calibration method provided by the present application;

[0043] Figure 3 It is a schematic diagram of a latch window calibration process provided by the present application;

[0044] Figure 4 It is a flowchart of another latch window calibration provided by the present application;

[0045] Figure 5 is a schematic diagram of a process for improving the effective latch window;

[0046] Figure 6 This is a flowchart of a window detection provided by this application

[0047] Figure 7 It is a flow chart of a signal acquisition process provided by this application;

[0048] Figure 8 It is a schematic diagram of an actual workflow provided by this application;

[0049] Fig. 9 It is a structural diagram of a differential link window detection system provided by the present application;

[0050] Fig.10 It is a structural diagram of an electronic device provided by this application. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.

[0052] Sending a digital signal can be understood as sending a sequence of 0s or 1s. When communicating with different devices, the timing information needs to be associated with the transmitted bits, so a clock signal is needed to provide timing signals for each part of the digital circuit system so that each signal data transmission process can be triggered at a precise time point. The clock signal is used to synchronize the digital signal transmitter and signal receiver during the data transmission process. Among them, the determined edge of the clock is also called the effective clock edge. The digital signal transmitter triggers new data transmission at each effective clock edge, and the signal receiver samples data at each effective clock edge.

[0053] In order to improve the anti-interference ability of signal transmission and suppress electromagnetic interference, the prior art usually uses differential signals to transmit the required digital signals. In the actual transmission process, the voltage change process on the two lines transmitting the differential signal takes a certain amount of time, resulting in a voltage change region for a period of time at both ends and a voltage constant region in the middle within a cycle of the differential signal. Correspondingly, at the effective clock edge of the clock signal, the signal receiving end can stably collect the logic "1" and logic "0" states from the voltage constant region. Among them, the voltage constant region in the above differential signal is defined as the latch window of the differential signal in this application. Alternatively, the latch window can also be understood as: when the signal receiving end samples the data on the digital line, the setup time and hold time form a stable window near the effective clock edge of the signal receiving end, so that the signal receiving end can reliably collect data.

[0054] Taking the field of machine vision as an example, image sensor data acquisition, long-distance transmission of image data and most other occasions use differential links. The level standards range from LVDS to sub-LVDS to SLVS, and the interface types range from CameraLink interface commonly used in industrial cameras, MIPI interface commonly used in mobile phones, and PCIE interface commonly used in computers. Almost all data acquisition systems are composed of front-end image sensors and back-end processors. Considering the complexity and cost of implementation, most image sensor data outputs currently use LVDS-like differential interfaces, and use no protocol (pure data mode) or MIPI protocol to output data. In order to be compatible with the driver design (generally FPGA or other embedded processors), the interface rate is usually below 1.6Gbps, and the double-edge (DDR) data latch mode is used.

[0055] With the continuous improvement of image sensor resolution and output frame rate, the image sensor data interface is usually composed of a single clock and many data channels (such as 144 data channels). Due to the influence of routing delays and chip packaging parasitic parameters, there are always various delay differences between the clock signal and data (that is, the differential signal in this application) and between the data and the data channel, which eventually leads to the original fixed data acquisition method of delaying the clock signal by 90 degrees gradually becoming invalid. Especially when the number of data channels is large, it usually leads to a smaller effective latch window of the differential signal. Among them, in the technical solution provided by the present application, the data channel represents a channel for transmitting a differential signal, and the effective latch window represents a common interval of different latch windows in multiple data channels.

[0056] However, for differential links that have completed delay alignment or for differential links that do not require delay alignment, the delay alignment process is often only performed once when the signal output end (such as the image sensor) is powered on and initialized, and no adjustment is made during subsequent normal operation. When the working environment of the image sensor and the signal receiving end (FPGA) undergoes significant changes, such as temperature changes, changes in certain operating voltages may cause the original latch window to shift when the link rate is high, causing the previously set sampling point to no longer be valid, thereby causing bit errors.

[0057] Specifically, the latch window detection and calibration process is usually completed when the sensor is powered on and initialized. Once it enters the normal working state, the sensor continues to output data streams, and usually does not re-detect and calibrate the window during operation. Therefore, if the operating temperature of the sensor changes significantly (such as rising from about 25 degrees when powered on at cold start to 60-70 degrees at full speed), and the differential link rate is high (above 1Gbps) and the power supply ripple of the sensor-side data interface is not well controlled, the offset relationship between the clock signal and the data channel may change significantly compared to the detection at power-on initialization, such as Figure 1 If the original latch window is too small, it is likely to cause the original sampling point position to fail and thus cause data acquisition errors. At this time, many pixels similar to noise will appear in the image data.

[0058] To solve this problem, the present application provides a differential link calibration method to solve the latch window transfer problem caused by changes in the working environment, so as to avoid the bit error problem that may be caused by the latch window transfer. Figure 2 As shown, the present application provides a differential link calibration method, comprising the following steps:

[0059] S201 . Split a differential signal in a differential link into a positive polarity signal and a negative polarity signal.

[0060] S202: Select a positive polarity signal or a negative polarity signal as a reference signal, and use the remaining signal as a working signal for transmitting data in a differential link.

[0061] S203, determine whether the signal data of the working signal and the signal opposite value of the first signal to be compared are the same. If so, keep the original time position of the positive polarity signal and the negative polarity signal unchanged; if not, move the positive polarity signal and the negative polarity signal in the opposite direction to a preset time period relative to the original time position.

[0062] The first signal to be compared is a signal after the reference signal is forward moved by a preset time period. Forward movement is represented by time delay or time advance, and reverse movement represents the opposite time operation relative to forward movement. Specifically, if forward movement is time delay, reverse movement is time advance.

[0063] The signal data of the working signal and the signal opposite value of the first signal to be compared are collected at the same time. The signal opposite value of the signal to be compared is obtained by inverting the collected signal data of the signal to be compared.

[0064] Based on the above processing, the present application transmits the data in the differential link through the working signal to ensure the normal operation of the differential link. At the same time, by adjusting the reference signal and comparing it with the working signal, it can predict the sampling point failure problem that may occur in the differential link, and perform latch window calibration in advance by moving the positive polarity signal and the negative polarity signal in reverse, thereby avoiding the bit error problem that may be caused by the latch window transfer.

[0065] For step S201, a fully differential circuit is set at the signal receiving end of the differential link, and then the differential signal in the differential link is split into a positive polarity signal and a negative polarity signal based on the fully differential circuit. In view of the characteristics of the existence of positive and negative end signals in the differential signal, the signal receiving end adopts a circuit with differential input and differential output (for example, a fully differential amplifier) ​​to receive the differential signal and still convert it to differential processing. Each data channel is actually divided into two sub-data channels at the signal receiving end according to the differential positive and negative end signals, including a positive sub-data channel and a negative sub-data channel. Among them, the positive sub-data channel is used to transmit the positive end signal (that is, the positive polarity signal), and the negative sub-data channel is used to transmit the negative end signal (that is, the negative polarity signal). The above scheme is effectively different from the traditional method in which the signal receiving end adopts differential input, and the single-ended output amplifier converts the differential signal to a single-ended post-processing process.

[0066] Due to the asymmetry of the circuit parameters on the signal transmitting end, the slight difference in the routing delay (differential signal routing is generally required to be equal in length, but there will still be a delay difference), the load difference on the signal receiving end, etc., there will be a slight delay difference between the two sub-data channels. However, this delay difference is generally within 100ps, which can be basically ignored for a bit width of 10ns. The adverse effects brought by this solution can actually be understood as only losing part of the latch window.

[0067] For step S202, the working signal is used to transmit valid data of the differential signal in the differential link. Specifically, the working signal is used as a carrier for data transmission and signal acquisition is performed, and the acquired signal data is always within the latch window of the working signal, thereby ensuring normal data transmission.

[0068] In one implementation, the differential link includes a clock signal for collecting the signal data, wherein the signal data is collected based on the effective clock edge of the clock signal, ensuring that the signal data collected from different signals are at the same collection time.

[0069] In some embodiments, the length of the preset time period can be determined by the latch window interval of the differential signal. Specifically, the preset time period is within half of the latch window time length. That is, the range of the preset time period is: 0<T< S. Wherein, T represents a preset time period, and S represents the time length of the latching interval of the differential signal.

[0070] Specifically, after completing the power-on initialization window detection and calibration, the sampling points of the positive polarity signal and the negative polarity signal obtained by splitting each differential signal are at the optimal position (that is, the center of the effective window), that is, Figure 3 The corresponding relationship between the clock signal and the data positive subchannel and the data negative subchannel at the original position is shown in . Therefore, the length of the preset time period is set to not more than half of the latch window size. Usually, the window is cut into N equal parts according to the effective window size, and the delay time represented by each equal part is TN. Figure 3 As shown, by performing a 90-degree periodic phase shift on the negative polarity signal in the data negative sub-channel relative to the effective window, that is, N is set to 4, and the preset time period is set to one quarter of the latch window size.

[0071] In some embodiments, the present application also provides a dynamic calibration method for a latch link, such as Figure 4 As shown, after step S202, the dynamic calibration method includes the following steps:

[0072] S401, execute the data judgment step, if not, go to S402; if yes, go to S403. The data judgment step includes judging whether the signal data of the working signal and the signal opposite value of the first signal to be compared are the same.

[0073] S402 , reversely move the positive polarity signal and the negative polarity signal to a preset time period relative to the original time position, and go to S401 .

[0074] S403, determine whether the signal data of the working signal and the signal opposite value of the second signal to be compared are the same; if so, go to S404, if not, go to S405. The second signal to be compared is obtained after the reference signal is moved in the reverse direction for a preset period of time.

[0075] S404: Keep the original time positions of the positive polarity signal and the negative polarity signal unchanged, and go to S401.

[0076] S405 , positively move the positive polarity signal and the negative polarity signal to a preset time period relative to the original time position, and go to S401 .

[0077] Based on the above processing, dynamic calibration of the differential link is achieved, thereby ensuring the accuracy of data collection during the overall data transmission process.

[0078] After the positive polarity signal and the negative polarity signal are moved forward or reversely to a preset time period relative to the original time position, the moved signal needs to be checked to confirm whether a calibration is completed. That is, in the aforementioned steps S402 and S405, the above-mentioned checking process is performed before going to step S401.

[0079] Specifically, in step S402 or S405, the following contents are included:

[0080] Step A, determine whether the positive polarity signal and the negative polarity signal after the movement match. If so, complete a calibration and go to S401; if not, go to step B. Wherein, the movement includes forward movement and reverse movement. The matching determination method is: determine whether the signal data of the positive polarity signal after the movement and the signal opposite value of the negative polarity signal after the movement are the same.

[0081] Step B: cancel the operation of moving the positive polarity signal and the negative polarity signal to the preset time period relative to the original time position, and reduce the length of the preset time period, and go to S401.

[0082] Based on the above processing, after canceling the operation of moving the positive polarity signal and the negative polarity signal to the preset time period relative to the original time position, the time length of the preset time period is shortened, and the differential signal is dynamically calibrated again. It is worth noting that by shortening the length of the preset time period, the time length of the reference time delay or advance can be reduced, which not only improves the detection accuracy of the latch window movement, but also can realize dynamic calibration when the latch window interval becomes smaller.

[0083] In actual work, after step S202, the calibration method further includes the following steps:

[0084] S204, comparing whether the signal data of the left-shifted signal to be compared and the signal opposite value of the working signal at the same acquisition time are the same; if not, go to step S205; wherein the left-shifted signal to be compared represents a signal obtained by a preset time period in advance of the reference signal.

[0085] S205 , delaying the positive polarity signal and the negative polarity signal for a preset time period.

[0086] Based on the above processing, in the case of a preset time period in advance of the reference signal, by comparing the left-shifted signal to be compared and the working signal, if the comparison results are the same, it can be known that the original latch window has a certain margin in the time advance direction, and there is no need to delay or advance the differential signal. If the comparison results are different, it can be known that the margin of the latch window in the time advance direction is low, so the positive polarity signal and the negative polarity signal are subsequently delayed by a preset time period relative to the original position to increase the margin of the latch window in the time advance direction. Figure 1 As shown, based on the above processing, the problem of low margin in the latch window moving to the left (ie, the time advance direction) is solved.

[0087] In one implementation, after step S205, the calibration method further includes the following steps:

[0088] S206, if yes, compare the signal data of the right-shifted signal to be compared and the signal opposite value of the working signal at the same acquisition time to see if they are the same, if not, go to S207. If yes, go to S204. The right-shifted signal to be compared is a signal obtained by delaying the reference signal by a preset time period.

[0089] S207 , advance the positive polarity signal and the negative polarity signal by a preset time period.

[0090] Based on the above processing, if the comparison results of the right-shifted signal to be compared and the working signal are different, it can be seen that the margin of the latch window in the time delay direction is low. Therefore, the positive polarity signal and the negative polarity signal are subsequently advanced by a preset time period relative to the original position to increase the margin of the latch window in the time delay direction, thereby solving the problem of low margin of the latch window in the rightward moving direction (i.e., the time delay direction).

[0091] In actual work, Figure 3 As shown, after the power-on calibration is completed, the positive polarity signal in the data positive sub-channel is set as the working signal, and the negative polarity signal in the data negative sub-channel is operated as follows:

[0092] Step 1: Shift the data to the left by TN (i.e., the positive shift in this application) relative to the original position as the first signal to be compared. Detect the data matching of the positive and negative sub-channels within the time t0. If the data matches completely, it means that the latch window margin on the right side of the sampling point is sufficient, and jump to step 2, otherwise jump to step 3.

[0093] The detection of data matching between the positive and negative sub-channels within the time period t0 indicates that the data sampling of the positive polarity signal and the negative polarity signal is completed within the time period t0, and the sampled signal data are compared to see whether they are the same. The data sampling is also completed based on the effective clock edge of the clock signal.

[0094] Step 2: Shift right TN relative to the original position (i.e., reverse shift in this application) as the second signal to be compared. Measure the data matching of the positive and negative sub-channels within time t0. If the data matches completely, it means that the latch window margin on the left side of the sampling point is sufficient, and jump to step 1, otherwise jump to step 4.

[0095] Step 3: Entering this step means that due to environmental changes, the latch window margin on the right side of the current sampling point is insufficient, and the entire data channel needs to be moved to the right by TN. Note that the positive and negative sub-channels of the data need to be moved to the right by TN at the same time, and jump to step 5.

[0096] Step 4: Entering this step means that due to environmental changes, the latch window margin on the left side of the current sampling point is insufficient, and the entire data channel needs to be moved to the left by TN. Note that the positive and negative sub-channels of the data need to be moved to the left by TN at the same time, and jump to step 5.

[0097] Step 5. Entering this step means that the position of the original latch window has just been adjusted, and the validity of the adjusted position needs to be tested. The data matching of the positive and negative sub-channels is tested within the t0 time. If the data matches completely, it means that there is no problem with the adjusted window position; if not, cancel the window movement in steps 3 and 4 and re-enter step 1.

[0098] For step 5, if there is still data mismatch (bit error) after dynamic adjustment and calibration of the window, the current strategy is to cancel the previous adjustment operation and re-calibrate the latch window. Before re-calibrating the window, the time length of TN needs to be shortened to reduce the time length of the reference time delay or advance, which not only improves the calibration accuracy of the latch window movement, but also enables dynamic calibration when the latch window interval becomes smaller.

[0099] In addition, there is an extreme case where there is a data mismatch in the adjustment window, that is, the original latch window is small, and after being affected by changes in environmental factors such as temperature, the effective latch window is further compressed to the point where there is no effective latch window. Otherwise, dynamic adjustment and calibration of the latch window will improve the sampling accuracy of the sampling point.

[0100] It is worth noting that in the above-mentioned movement process (i.e., delay or advance), the original position of the positive polarity signal or the negative polarity signal is used as the reference point. Among them, the original position represents the time position before the calibration method is executed. Specifically, if the latch window is only calibrated once during the differential signal transmission process, the original position can be understood as the time position after the delay compensation of the differential signal is completed. If the latch window is dynamically calibrated multiple times during the differential signal transmission process, the original position corresponds to the time position after the last calibration is completed.

[0101] The process of simultaneously moving the data positive and negative sub-channels to the right by TN in the above step 3 may be: after step 1 is completed, the negative polarity signal in the data negative sub-channel is restored to the original position, and both the positive polarity signal and the negative polarity signal are moved to the right by TN in step 3. Alternatively, the process may also be: after step 1 is completed, the negative polarity signal in the data negative sub-channel is not restored to the original position, but in step 3, the positive polarity signal is moved to the right by TN, and the negative polarity signal is moved to the right by 2 times TN.

[0102] Note that the above window calibration method does not sacrifice data integrity, that is, by dynamically adjusting the data negative sub-channel once or multiple times, the possible sampling point failure problem is predicted in advance and the window calibration is performed in advance. At this time, the data is always collected using the data positive sub-channel as the sample and the collected data is always within the valid window, that is, the data collection process is always accurate.

[0103] In addition, the granularity and step size of the window calibration can be adjusted by setting the TN size, and the frequency of the window calibration can be set by t0. Among them, the calibration frequency in the dynamic calibration can be increased by reducing the value of t0. According to the time when the delay amount setting inside the existing FPGA takes effect, the technical solution provided by the present application can support a calibration frequency of milliseconds, and can cope with all factors of changes in external environmental conditions that can affect the change of the effective data latch window, such as the most important temperature change.

[0104] In addition, before dynamically adjusting the latch window of the differential link, it is usually necessary to first detect the latch window of each data channel in the differential link, and then perform delay alignment on each data channel. Figure 5 , Figure 5 A flow chart of improving the effective latch window provided by the present application. As shown in Figure 5, before the delay alignment of each data channel, each channel has a delay time relative to the reference time. The difference in this delay time is the result of a combination of factors such as the output delay of the data transmitter (for example, the image sensor), the routing delay, the device packaging, and the parasitic parameters in the device, which results in a very small effective latch window for the data under a unified latch signal, which is very likely to cause bit errors. By calculating the delay amount of each channel, such as Figure 5 By calculating t1-t4 in the delay chain, the aligned data channels can be obtained. At this time, the effective latch window in the differential link will be greatly improved, thereby ensuring data integrity and avoiding bit errors.

[0105] Before solving the problem of the effective latch window becoming smaller in the differential link, it is necessary to first detect the latch window position and size of each data channel to calculate the delay amount of each data channel (for example Figure 5Then the delay chains can be used to compensate for the aligned data channels.

[0106] In order to detect the latch window of the differential signal in the data channel, the present application also provides a window detection method for a differential link. After splitting the differential signal in the differential link into a positive polarity signal and a negative polarity signal, the method includes the following steps:

[0107] S301 , collecting signal data of the positive polarity signal and the negative polarity signal at different delay times as a first data sequence and a second data sequence, respectively.

[0108] S302: Perform inversion processing on the signal data in the second data sequence to obtain a third data sequence.

[0109] S303: Select a delay time interval with the same data in the first data sequence and the third data sequence as a latch window for a differential signal.

[0110] Based on the above processing, the present application screens out the stable intervals of the positive polarity signal and the negative polarity signal by comparing the first data sequence and the third data sequence, and then uses the interval with the same data as the latch window, effectively realizing the rapid detection of the latch window position and size. In addition, the technical solution provided by the present application can directly detect the latch window position and size by processing the differential signal that continuously works in the differential link. It is a delay detection method for a data channel that does not require a training data set, has great universality, and can effectively improve the stability of data acquisition and transmission in the differential link.

[0111] In some embodiments, the differential link includes a clock signal. Accordingly, step S301 may include the following steps:

[0112] S30101. Based on a fixed delay step, delay the clock signal in the differential link multiple times.

[0113] S30102. After each delay, collect signal data of the positive polarity signal and the negative polarity signal based on the delayed clock signal.

[0114] In actual work, the clock signal can be delayed by a delay chain to scan the data channel to collect multiple signal data of positive polarity signals and negative polarity signals. That is, each time the clock signal moves a fixed value step, data of positive polarity signals and negative polarity signals are collected. Specifically, step S301 includes the following steps:

[0115] S30103: Use a delay chain to continuously delay the clock signal in the differential link for multiple times, wherein the step lengths between different delays are the same.

[0116] S30104. After each delay, signal data of the positive polarity signal and the negative polarity signal are collected based on the clock signal.

[0117] With respect to step S30103, in the process of delaying the clock signal of the delay chain to scan the data channel, the clock signal can be moved by one step each time, and data of the positive polarity signal and the negative polarity signal can be collected. The signal data of the positive polarity signal collected after the first delay is set as D1, and the signal data of the negative polarity signal is set as B1. If it is assumed that the clock signal is delayed and moved n times, the data sequence D1-Dn of the positive polarity signal data and the data sequence B1-Bn of the negative polarity signal data can be obtained.

[0118] Based on the above processing, the data sequence D1-Dn of the positive polarity signal data is used as the first data sequence, and the data sequence B1-Bn of the negative polarity signal data is used as the second data sequence. Then, each sampled data in the second data sequence is inverted to obtain the inverted data sequence C1-Cn as the third data sequence.

[0119] Then, D1-Dn and C1-Cn are compared. When the acquisition interval is in the unstable interval (such as Figure 6 The interval where D1 or C1 is located). At this time, since the differential signal has not yet stabilized and the slight delay difference of the positive and negative signals and the delay difference of the sampling clock routing are superimposed, D1 is not always equal to C1 (that is, the unstable interval in the differential signal). Under a certain clock step, by detecting the data changes over a period of time, the comparison result of Dx! = Cx can always be obtained for the unstable area. For the stable interval, the comparison result of Dx=Cx can always be obtained. Among them, Dx represents the signal data of the positive polarity signal collected after the xth delay, and Cx represents the signal data of the negative polarity signal collected after the xth delay. Therefore, the effective latch window of the data channel can be obtained by comparing the data sequence results, such as Figure 6 The Dj-Dk or Cj-Ck interval is shown in .

[0120] In the actual working process, the signal data (such as D1, C1, etc.) sampled after each delay can be a 1-bit or multi-bit binary value. Among them, the total number of bits in the signal data is related to the number of samplings after each delay. Specifically, after each delay of the clock signal, based on the effective clock edge of the clock signal, the above-mentioned positive polarity signal and negative polarity signal can be sampled once or multiple times for logic level, thereby obtaining a 1-bit or multi-bit binary value as the signal data. For example, if the number of samplings is 5, the corresponding sampling data D1 is "01110", B1 is "10001", and C1 after inverting B1 is "01110". At this time, the data in D1 and C1 are exactly the same, indicating that D1 matches C1, that is, D1=C1.

[0121] In addition, in actual operation, the window detection method provided by the present application does not require storing the complete data sequence (for example, D1-Dn and C1-Cn) before performing data comparison. Instead, data comparison can be performed simultaneously during the sampling process of the signal data to improve the efficiency of latch window detection.

[0122] This application uses a fully differential circuit at the signal receiving end to split the original data channel into two positive and negative sub-channels (i.e., split the differential signal into a positive polarity signal and a negative polarity signal), and simultaneously scans and collects data on the two sub-channels, and then compares the data collected by the two sub-channels to obtain the latch window position and size in the data channel (i.e., the differential signal in this application). It is worth noting that the above processing process eliminates the requirement that the data channel must output a training data set, and can be applied to the collection of all data signals based on differential links.

[0123] It is worth noting that the signal data of the positive polarity signal and the negative polarity signal are collected in different signal cycles under different delay times. Among them, signal data is usually collected only once in each signal cycle. In the technical solution provided in the present application, the position of the latch window of the differential signal is basically fixed in different signal cycles. The window detection method provided in the present application can be understood as: in multiple signal cycles, the data sequences of the positive polarity signal and the negative polarity signal under different delay times are collected respectively, and the data in the above two data sequences are compared (before comparison, the data sequence of the negative polarity signal has been inverted), and the delay time interval corresponding to the same comparison result is used as the latch window of the differential signal.

[0124] In addition, the present application proposes that the additional cost of a fully differential (i.e., differential input and differential output) receiving circuit relative to a differential to single-ended (i.e., differential input and single-ended output) circuit is basically negligible, and most existing FPGAs support fully differential input circuits. Therefore, the above-mentioned window detection method for the differential link can be implemented based on FPGA.

[0125] In some embodiments, the latch window can also be detected by link training data set and delay chain scanning. That is, the signal output end (such as an image sensor) is set to output fixed pattern data as a training data set (Training Pattern), and the signal receiving end (usually an FPGA) calculates the delay of each data channel by detecting the training data.

[0126] The delay of each channel can be calculated by scanning the delay chain and outputting a fixed training data set from the image sensor, such as Figure 5Specifically, the clock channel is delayed by a delay chain (the data channel is not delayed at this time, or the clock channel is not delayed in another operation mode, and the data channel is moved one step each time, the principle is the same) to scan the data channel, move one step each time and collect data, let the data collected for the first time be D1, then after moving n times, the data sequence from D1 to Dn can be obtained. Because the data channel output is a fixed-mode training data set at this time, it is only necessary to find the data sequence that meets the training data set from D1-Dn, and its corresponding interval (such as Figure 7 The interval Dj-Dk in the figure is the latch window position and size of the data channel. Figure 7 The effective latch window position of the data channel shown in the figure is j, and the window size is kj, and the unit is the number of delay chain steps. According to this method, the window position and size of all data channels can be obtained, so as to prepare for the next step of aligning all data channels through delay compensation.

[0127] Based on the above processing, the window position and size of all data channels can be obtained, thereby increasing the size of the effective latch window. However, this method depends on the training data set of the data channel. If the signal sending end (such as the image sensor or the data sending module) does not support the training data set output mode, this method will fail directly.

[0128] After completing the latch window detection in the differential link, the delay chain can be used to align the delays of the channels to maximize the data latch window, including the following steps:

[0129] Step a: obtaining a latch window of each data channel in the differential link, wherein each data channel is used to transmit a differential signal.

[0130] Step b: Determine the delay step value of each data channel based on the time value of the center of the latch window.

[0131] Step c: Based on the delay step value and delay chain of each data channel, delay compensation is performed on each data channel in the differential link to make the time value of the center of the latch window in each data channel the same.

[0132] Among them, the above steps ac can be completed by the delay chain integrated inside the FPGA. Specifically, after the differential signal is scanned by the delay chain delay clock signal, the delay step interval corresponding to the latch window interval of different differential signals is obtained. For example, the delay step numbers contained in a certain delay step number interval are "3, 4, 5, 6, 7" respectively. Among them, the latch window of the differential signal can be obtained using the above delay step interval, and the delay step number 5 is used as the center point of the latch window. Then, the delay chain is used to delay compensate the differential signal so that the sampling point of the differential signal is set at the center of the latch window, that is, the effective clock edge of the clock signal corresponds to the center point of the latch window.

[0133] In addition, the above-mentioned window detection method and dynamic calibration method can be applied separately or simultaneously in FPGA. Among them, the window detection method can be combined with the internal delay chain of FPGA to obtain the effective latch window position and size of each data channel and perform delay compensation, which can maximize the data latch window and ensure data integrity. At the same time, the calibration method of the latch window can be used to solve the bit error problem that may be caused by the transfer of the data latch window. The above method does not rely on the training data set, has great universality, can greatly increase the stability of differential signal data acquisition and transmission, and provide a strong guarantee for many image acquisition and transmission occasions in the field of machine vision.

[0134] See also Figure 8 , the window detection and calibration method provided in this application can be applied to FPGA. The specific workflow is as follows Figure 8 As shown, at the initial moment, the transmission system of the differential link performs power-on processing and completes internal initialization of the signal transmitter and the signal receiver. Among them, the dynamic detection and calibration of the link (i.e., latch window) can be used as a configuration option. When enabled, after completing the power-on initialization window detection and calibration, the dynamic detection and calibration module will perform real-time calibration of the latch window during the working process. If it is not enabled, it will end after completing the power-on initialization window detection and calibration, that is, the position of the sampling point is always fixed in the subsequent work. When the differential link rate is not high or the window is large, and the link is relatively stable, a single power-on detection and calibration can be used.

[0135] In some embodiments, the present application also provides a differential link calibration system, such as Fig. 9 As shown, the calibration system includes:

[0136] The signal splitting module 901 is used to split the differential signal in the differential link into a positive polarity signal and a negative polarity signal.

[0137] The signal selection module 902 is used to select a positive polarity signal or a negative polarity signal as a reference signal, and the remaining signal as a working signal for transmitting data in a differential link.

[0138] The data judgment module 903 is used to judge whether the signal data of the working signal and the signal opposite value of the first signal to be compared are the same. If so, the original time position of the positive polarity signal and the negative polarity signal is kept unchanged; if not, the positive polarity signal and the negative polarity signal are moved in reverse to a preset time period relative to the original time position.

[0139] Among them, the first signal to be compared is obtained after the reference signal is moved forward for a preset time period; the forward movement is represented by time delay or time advance, and the reverse movement represents the opposite time operation relative to the forward movement; the signal data of the working signal and the opposite signal value of the first signal to be compared are collected at the same time; the opposite signal value of the signal to be compared represents the value obtained after the collected signal data of the signal to be compared is inverted.

[0140] The present application also provides an electronic device, such as Fig.10 As shown, it includes a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002, and the memory 1003 communicate with each other through the communication bus 1004.

[0141] Memory 1003, used for storing computer programs;

[0142] The processor 1001 is configured to implement any of the above differential link calibration methods when executing the program stored in the memory 1003 .

[0143] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0144] The communication interface is used for communication between the above electronic device and other devices.

[0145] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0146] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0147] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of the calibration method for any differential link described above are implemented.

[0148] In another embodiment provided by the present application, a computer program product including instructions is also provided. When the computer program product is run on a computer, the computer executes the steps of the differential link calibration method in any one of the above embodiments.

[0149] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A differential link calibration method, characterized in that: include: Splitting the differential signal in the differential link into a positive polarity signal and a negative polarity signal; Selecting the positive polarity signal or the negative polarity signal as a reference signal, and the remaining signal as a working signal for transmitting data in the differential link; Determine whether the signal data of the working signal and the signal opposite value of the first signal to be compared are the same, if so, keep the original time positions of the positive polarity signal and the negative polarity signal unchanged; if not, move the positive polarity signal and the negative polarity signal in the opposite direction to a preset time period relative to the original time position; Among them, the first signal to be compared is a signal after the reference signal is moved forward for a preset time period; the forward movement is represented by time delay or time advance, and the reverse movement represents the opposite time operation relative to the forward movement; the signal data of the working signal and the opposite signal value of the first signal to be compared are collected at the same time; the opposite signal value of the signal to be compared represents the value obtained after inverting the collected signal data of the signal to be compared.

2. The method according to claim 1, characterized in that The signal receiving end of the differential link is configured as a fully differential circuit.

3. The method according to claim 1, characterized in that The differential link includes a clock signal for collecting the signal data.

4. The method according to claim 1, characterized in that: The method further comprises: Executing a data determination step, the data determination step comprising determining whether the signal data of the working signal and the opposite signal value of the first signal to be compared are the same; If not, the positive polarity signal and the negative polarity signal are reversely moved to a preset time period relative to the original time position, and the process goes to the data determination step; If yes, then determine whether the signal data of the working signal and the opposite signal value of the second signal to be compared are the same; wherein the second signal to be compared is obtained after the reference signal is moved in the reverse direction for a preset time period; If so, keep the original time positions of the positive polarity signal and the negative polarity signal unchanged and proceed to the data judgment step; if not, move the positive polarity signal and the negative polarity signal in the positive direction to a preset time period relative to the original time position and proceed to the data judgment step.

5. The method according to claim 1 or 4, characterized in that: The method further comprises: Determine whether the positive polarity signal and the negative polarity signal after the movement match; if so, complete a calibration, and proceed to the step of determining whether the signal data of the working signal and the signal opposite value of the first signal to be compared are the same; if not, cancel the step of moving the positive polarity signal and the negative polarity signal to a preset time period relative to the original time position, and shorten the length of the preset time period, and proceed to the step of determining whether the signal data of the working signal and the signal opposite value of the first signal to be compared are the same; The movement includes forward movement and reverse movement; the matching determination method is: determining whether the signal data of the positive polarity signal after the movement is the same as the opposite value of the signal of the negative polarity signal after the movement.

6. The method according to claim 1, characterized in that The preset time period is within half of the latch window time length of the differential signal.

7. The method according to claim 6, characterized in that The detection method of the latch window includes: The differential signal in the split differential link is a positive polarity signal and a negative polarity signal; Delaying the clock signal in the differential link for multiple times in a row, and after each delay, collecting signal data of the positive polarity signal and the negative polarity signal at different delay times as a first data sequence and a second data sequence, respectively; performing inversion processing on the signal data in the second data sequence to obtain a third data sequence; A delay time interval having the same data in the first data sequence and the third data sequence is selected as a latch window for the differential signal.

8. A differential link calibration system, characterized in that: include: A signal splitting module, used for splitting the differential signal in the differential link into a positive polarity signal and a negative polarity signal; A signal selection module, used to select the positive polarity signal or the negative polarity signal as a reference signal, and the remaining signal as a working signal for transmitting data in the differential link; A data judgment module, used to judge whether the signal data of the working signal and the signal opposite value of the first signal to be compared are the same, if so, keep the original time position of the positive polarity signal and the negative polarity signal unchanged; if not, reversely move the positive polarity signal and the negative polarity signal to a preset time period relative to the original time position; Among them, the first signal to be compared is obtained after the reference signal is moved forward for a preset time period; the forward movement is represented by time delay or time advance, and the reverse movement represents the opposite time operation relative to the forward movement; the signal data of the working signal and the opposite signal value of the first signal to be compared are collected at the same time; the opposite signal value of the signal to be compared represents the value obtained after the collected signal data of the signal to be compared is inverted.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor is used to implement the calibration method described in any one of claims 1 to 7 when executing the program stored in the memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the calibration method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • A method, system and device for detecting link polarity

    CN101166081A

  • Capacitor mismatching testing system and method for pipelined analog-to-digital converter

    CN106230438A

  • Calibration method and circuit, storage medium, clock recovery circuit and electronic device

    CN115903998A

  • Automatic correction of data polarity on a differential serial bus

    US20090296859A1

  • Ground-based system and method to extend the detection of excessive delay gradients using parity corrections

    US20150293231A1