Method and device for timing training of LVDS interface
By separately processing the P-side and N-side delay series of the LVDS differential data signal in the LVDS interface, and calculating and setting the delay series of the received data, the impact of the chip OCV difference and signal asymmetry on the window is solved, and the signal is realized Improved accuracy and stability.
Patent Information
- Application Number
- CN202310368747.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2043-03-28
AI Technical Summary
Existing LVDS interface timing training methods cannot effectively handle the impact of chip OCV differences and LVDS signal P data and N data asymmetry on the data valid window, resulting in glitches being introduced into the data stream when the delay chain series is switched, affecting signal accuracy.
By inputting the P end and N end of the LVDS differential data signal into the first and second delay chains respectively, collecting and recording the respective delay series, calculating the delay series difference, and setting it as the delay series of the received data , to handle the impact of OCV and signal slope asymmetry on the window and avoid the generation of burrs.
It effectively handles the impact of chip OCV differences and signal asymmetry on the window, reduces the delay chain design requirements, avoids the occurrence of glitches in the data stream, and improves the accuracy and stability of the signal.
Smart Images

Figure CN116501674B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of FPGA (Field Programmable Gate Array), and in particular relates to a method and a device for performing timing training on an LVDS interface. Background Art
[0002] The LVDS (Low Voltage Differential Signaling) interface of FPGA (Field Programmable Gate Array) usually adjusts the phase of the sampling clock or serial data by changing the delay chain level, thereby ensuring the establishment and maintenance relationship between the serial data and the sampling clock. However, when the delay chain level is switched, it is easy to introduce glitches in the data stream.
[0003] Chips in different areas on the same wafer may have different errors due to changes in external and production conditions, resulting in the overall speed of transistors in chips in certain areas of the same wafer becoming faster or slower. At the same time, different areas on the same chip will also have further differences due to the above factors, namely the error on the same chip (OCV, on-chip variation).
[0004] When the LVDS interface receiver performs timing training, it usually determines the sampling position by sending a training data sequence for a certain period of time, and determines the center position of the data valid window by comparing the fixed training sequence multiple times. However, the existing timing training method cannot deal with the adverse effects of chip OCV differences on window accuracy; for example, the delay value of a delay unit in a delay chain is designed to be 10ps. For the same circuit, the actual delay in the chip may be 9.5ps or 10.5ps. After the delay chain is cascaded, the actual delay difference will be greater; temperature, voltage, and process will also affect the delay value of the delay unit. The existing timing training method cannot avoid the impact of the difference in data rising slope and falling slope on the data valid window, that is, it cannot avoid the impact of the asymmetry of P data and N data of the LVDS signal on the data valid window, such as Figure 1 FIG. 1 is a schematic diagram showing the influence of the rise and fall time symmetry (Rise and Fall Time Symmetry) of the P data and N data of the OCV and LVDS signals on the data window. Summary of the invention
[0005] Based on this, the present invention provides a method and device for timing training of an LVDS interface, which solves the problems that the switching of the delay chain levels causes glitches in the data stream to cause bit errors, the interface timing training requires sending a training sequence, the adverse effects of chip OCV differences on window accuracy cannot be avoided, and the effects of the asymmetry of LVDS signal P data and N data on the data valid window cannot be avoided.
[0006] The present invention provides a method for performing timing training on an LVDS interface, the method comprising:
[0007] S1: The P-end of the LVDS differential data signal is input into the first delay chain and converted into the first parallel data through serial-to-parallel conversion; the N-end of the LVDS differential data signal is input into the second delay chain and converted into the second parallel data through serial-to-parallel conversion;
[0008] S2: taking the second parallel data as reference data and the first parallel data as scanning data to perform data sampling, and collecting the relative position between the sampling position corresponding to the current delay level and the center of the scanning data window; when the sampling position corresponding to the current delay level is located at the center of the scanning data window, recording the current delay level as the first delay level;
[0009] S3: taking the first parallel data as reference data and the second parallel data as scanning data for data sampling, and setting the initial delay level of the second parallel data as the first delay level, collecting the relative position between the sampling position corresponding to the current delay level and the center of the scanning data window, and when the sampling position corresponding to the current delay level is located at the center of the scanning data window, recording the current first delay level as the second delay level;
[0010] S4: obtaining a delay level difference through the first delay level and the second delay level, setting the sum of the first delay level and one half of the delay level difference as the delay level of the first parallel data, and using the second parallel data as scan data to receive the LVDS differential data.
[0011] Further, the S2 includes:
[0012] S21: using the second parallel data as reference data, setting the initial delay level of the first parallel data for data sampling, and collecting the relative position corresponding to the initial delay level; wherein the initial delay level is less than the total delay level of the first delay chain;
[0013] S22: if the sampling position corresponding to the current initial delay level is biased to the left relative to the center of the window of the first parallel data, reduce the current initial delay level, and update the reduced initial delay level to the initial delay level, and then re-sample the relative position;
[0014] If the sampling position corresponding to the current initial delay level is biased to the right relative to the center of the window of the first parallel data, increase the current initial delay level, and update the increased initial delay level to the initial delay level, and then re-sample the relative position;
[0015] S23: taking the initial delay level when the sampling position corresponding to the initial delay level is located at the center of the window of the first parallel data as the first delay level.
[0016] Further, the S3 includes:
[0017] S31: using the first parallel data as reference data, setting the first delay level as the initial delay level of the second parallel data and scanning, and simultaneously acquiring the relative position corresponding to the initial delay level;
[0018] S32: if the sampling position corresponding to the current initial delay level is biased to the left relative to the center of the window of the second parallel data, reduce the current initial delay level, update the reduced initial delay level to the initial delay level, and then re-sample the relative position;
[0019] If the sampling position corresponding to the current initial delay level is biased to the right relative to the center of the window of the first parallel data, increase the current initial delay level, and update the increased initial delay level to the initial delay level, and then re-sample the relative position;
[0020] S33: taking the initial delay level when the sampling position corresponding to the initial delay level is located at the center of the window of the second parallel data as the second delay level.
[0021] Furthermore, the relative position of the sampling position corresponding to the acquisition delay level in S2 and S3 and the center of the scan data window includes:
[0022] S51: selecting one of the first parallel data and the second parallel data as reference data and the other as scan data for data acquisition, wherein the delay level of the scan data is the current delay level corresponding to the scan data in the first parallel data and the second parallel data;
[0023] S52: gradually decreasing the current delay level to monitor whether the reference data and the scan data are consistent within a specific time period;
[0024] S53: If they are consistent, and the current delay level has not decreased to zero, repeat S52;
[0025] Otherwise, the current delay level is recorded as the first sub-delay level, and the process goes to S54;
[0026] S54: re-loading the current delay level;
[0027] S55: increasing the current delay level step by step, and monitoring whether the reference data and the scan data are consistent within a specific time period;
[0028] S56: If they are consistent, and the current delay level has not reached the maximum delay level, repeat S55;
[0029] Otherwise, the current delay level is recorded as the second sub-delay level;
[0030] S57: Obtain a first sub-delay level difference and a second sub-delay level difference based on the current delay level, the first sub-delay level and the second sub-delay level, compare the first sub-delay level difference with the second sub-delay level difference, and obtain the relative position of the sampling position corresponding to the current delay level and the center of the scanning data window.
[0031] Further, the S57 includes:
[0032] S571: the difference between the current delay level and the first sub-delay level is the first sub-delay level difference, and the difference between the second sub-delay level and the current delay level is the second sub-delay level difference;
[0033] S572: If the first sub-delay level difference is greater than the second sub-delay level difference, the current sampling position corresponding to the current delay level is offset to the left relative to the center of the scan data window in the first parallel data and the second parallel data;
[0034] If the first sub-delay level difference is smaller than the second sub-delay level difference, the current sampling position corresponding to the current delay level is offset to the right relative to the center of the scan data window in the first parallel data and the second parallel data;
[0035] If the first sub-delay level difference is equal to the second sub-delay level difference, the current sampling position corresponding to the current delay level is at the center of the scan data window in the first parallel data and the second parallel data.
[0036] Furthermore, the total delay of the first delay chain and the second delay chain is greater than the serial data window width.
[0037] Furthermore, before S1, the step further includes:
[0038] S0: Scramble the LVDS differential data, convert it into serial data through parallel-to-serial conversion, and then input it into the delay chain;
[0039] The S4 also includes:
[0040] S6: Descramble and restore the received LVDS differential data.
[0041] Furthermore, the initial delay level is half of the total delay level of the first delay chain.
[0042] Furthermore, the smaller the delay series difference is, the smaller the difference in delay series caused by the error on the same chip and the asymmetry of the slopes of the P-end and the N-end of the LVDS differential data is.
[0043] The present invention also provides a device for performing timing training on an LVDS interface, the device comprising:
[0044] Conversion module: used for the P-end of the LVDS differential data signal to be input into the first delay chain and converted into the first parallel data through serial-to-parallel conversion; the N-end of the LVDS differential data signal to be input into the second delay chain and converted into the second parallel data through serial-to-parallel conversion;
[0045] A first sampling module: used for performing data sampling with the second parallel data as reference data and the first parallel data as scanning data, and collecting the relative position between the sampling position corresponding to the delay series and the center of the scanning data window, and when the sampling position corresponding to the delay series is located at the center of the scanning data window, recording the current delay series as the first delay series;
[0046] A second sampling module: used for performing data sampling with the first parallel data as reference data and the second parallel data as scanning data, and setting the initial delay level of the second parallel data as the first delay level, collecting the relative position of the sampling position corresponding to the delay level and the center of the scanning data window, and when the sampling position corresponding to the first delay level is located at the center of the scanning data window, recording the current first delay level as the second delay level;
[0047] Data output path determination module: used to obtain the delay level difference through the first delay level and the second delay level, set the sum of the first delay level and one-half of the delay level difference as the delay level of the first parallel data, and receive the LVDS differential data using the second parallel data as scan data.
[0048] The method for timing training of the LVDS interface provided by the present invention is as follows: the P end and the N end of the LVDS differential data signal are respectively input into the first delay chain and the second delay chain, and then the second parallel data is used as the reference data and the first parallel data is used as the scanning data for data sampling, if the sampling position corresponding to the current delay level is located at the window center of the scanning data, the first delay level is obtained; then the first parallel data is used as the reference data and the second parallel data is used as the scanning data for data sampling, and the initial delay level of the second parallel data is set to the first delay level, when the sampling position corresponding to the current delay level is located at the window center of the scanning data, the second delay level is obtained; the delay level difference is obtained through the first delay level and the second delay level, and finally the sum of the first delay level and one-half of the delay level difference is set as the delay level of the first parallel data, and the second parallel data is used as the scanning data to receive the LVDS differential data. It can handle the influence of the asymmetric slope of the P-end and N-end signals of OCV and LVDS differential data on the data valid window, and at the same time, avoid the introduction of burrs in the data stream when the delay chain series is switched, and reduce the design requirements of the delay chain. The device for timing training of the LVDS interface provided by the present invention can also achieve the above effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in 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.
[0050] Figure 1 Schematic diagram of the impact of the rise and fall time inconsistency (Rise and Fall Time Symmetry) of the P data and N data of the OCV and LVDS signals on the data window
[0051] Figure 2 A schematic diagram of an LVDS transceiver architecture for applying a timing training method for an LVDS interface provided by an embodiment of the present invention;
[0052] Figure 3 A flow chart of a method for performing timing training on an LVDS interface provided by an embodiment of the present invention;
[0053] Figure 4 A schematic diagram of a process for obtaining a first delay level;
[0054] Figure 5 A schematic diagram of a process for obtaining a second delay level;
[0055] Figure 6 A schematic diagram of a flow chart of the relative position between the sampling position corresponding to the acquisition delay level and the center of the scanning data window;
[0056] Figure 7 A schematic flow chart of another method for performing timing training on an LVDS interface provided by an embodiment of the present invention;
[0057] Figure 8 A block diagram of a timing training device for an LVDS interface provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0058] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0059] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0060] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0061] In the following description, use of suffixes such as “module,” “part,” or “unit” used to refer to elements is merely for facilitating description of the present application, and has no specific meaning by itself.
[0062] like Figure 2As shown, a schematic diagram of the LVDS transceiver architecture for applying the timing training method for the LVDS interface provided by an embodiment of the present invention includes a transmitting end and a receiving end of the LVDS transceiver, the transmitting end includes a scrambling module and a parallel-to-serial module, and the receiving end includes a delay chain 1, a serial-to-parallel module 1, a delay chain 2, a serial-to-parallel module 2, a delay series selection module, a sampling position scanning module, a timing training control module, a data path selection module, and a descrambling module. Among them, the transmission path composed of the delay chain 1 and the serial-to-parallel module 1 is marked as path 1, and the transmission path composed of the delay chain 2 and the serial-to-parallel module 2 is marked as path 2. At the transmitting end of the LVDS transceiver, the parallel data is scrambled by the scrambling module, and then the scrambling module transmits the scrambled parallel data to the parallel-to-serial module. After the parallel-to-serial module converts the parallel data into serial data, the serial data stream is sent out at the LVDS level. At the receiving end of the LVDS transceiver, the P end and N end of the input LVDS differential data signal are input into path 1 and path 2 respectively, and then serial-to-parallel conversion is performed respectively to convert them into parallel data. The current sampling position is determined by comparing the two parallel data.
[0063] like Figure 3 FIG. 1 is a flow chart of a method for performing timing training on an LVDS interface provided by an embodiment of the present invention, which is applied to Figure 2 The method comprises:
[0064] S1: The P-end of the LVDS differential data signal is input into the first delay chain and converted into the first parallel data through serial-to-parallel conversion; the N-end of the LVDS differential data signal is input into the second delay chain and converted into the second parallel data through serial-to-parallel conversion;
[0065] S2: taking the second parallel data as reference data and the first parallel data as scanning data to perform data sampling, and collecting the relative position between the sampling position corresponding to the delay level and the center of the scanning data window, when the sampling position corresponding to the delay level is located at the center of the scanning data window, recording the current delay level as the first delay level;
[0066] S3: taking the first parallel data as reference data and the second parallel data as scanning data for data sampling, and setting the initial delay level of the second parallel data as the first delay level, collecting the relative position of the sampling position corresponding to the delay level and the center of the scanning data window, and when the sampling position corresponding to the first delay level is located at the center of the scanning data window, recording the current first delay level as the second delay level;
[0067] S4: obtaining a delay level difference through the first delay level and the second delay level, setting the sum of the first delay level and one half of the delay level difference as the delay level of the first parallel data, and using the second parallel data as scan data to receive the LVDS differential data.
[0068] Specifically, in this embodiment, Figure 2 The timing training module in the sampling position scanning module sends a sampling signal to the sampling position scanning module, and the sampling position scanning module scans the position relationship between the sampling position and the center of the window to monitor the position relationship between the scanning sampling position and the center of the window. If the data window deviates from the center of the window, the sampling position is calibrated. In this embodiment, when the sampling position scanning module receives the sampling signal from the timing training module, the P-end input of the LVDS differential data signal Figure 2 The data outputted from the delay chain 1 is then inputted into the serial-to-parallel module 1 to convert it into the first parallel data; the N-end of the LVDS differential data signal is inputted into the Figure 2Delay chain 2 in the example, then the data outputted by delay chain 2 is inputted into serial-to-parallel module 2, and converted into the second parallel data for explanation. Take path 2 as the scanning path and path 1 as the reference path for timing training. Set the initial delay series of delay chain 1 (such as being set to half of the total delay series of delay chain 1), and the sampling position scanning module starts to collect the relative position between the sampling position corresponding to the initial delay series and the center of the scanning data window. If the sampling position corresponding to the initial delay series is located at the center of the scanning data window, the initial delay series is recorded as the first delay series; if the sampling position corresponding to the initial delay series is not located at the center of the scanning data window, the delay series is adjusted according to the position result obtained by the sampling position scanning module and sent to the delay series selection module. After the delay series selection module sends the adjusted delay series to delay chain 1, the sampling position scanning module continues to scan. When the sampling position scanning module scans that the sampling position is located at the center of the scanning data window, the current delay series is recorded as the first delay series. Then, the timing training is performed with path 1 as the scanning path and path 2 as the reference path. The initial delay level of delay chain 2 is set to the first delay level, and the sampling position scanning module starts to collect the relative position of the sampling position corresponding to the first delay level and the center of the scanning data window. If the sampling position corresponding to the first delay level is located in the center of the scanning data window, the first delay level is recorded as the second delay level; if the sampling position corresponding to the first delay level is not in the center of the scanning data window, the first delay level is adjusted according to the position result obtained by the sampling position scanning module and sent to the delay level selection module. After the delay level selection module sends the adjusted delay level to delay chain 2, the sampling position scanning module, when the sampling position scanning module scans that the sampling position is located in the center of the scanning data window, records the current delay level as the second delay level. Then, the delay level difference is obtained from the first delay level and the second delay level, and the delay level of delay chain 1 is set to the sum of the first delay level and half of the delay level difference through the delay level selection module, and path 2 is selected as the scanning path and sent to the data path selection module to receive LVDS differential data.
[0069] In some embodiments, Figure 4 As shown, it is a schematic diagram of a process for obtaining a first delay level, wherein S2 includes:
[0070] S21: using the second parallel data as reference data, setting the initial delay level of the first parallel data for data sampling, and collecting the relative position corresponding to the initial delay level; wherein the initial delay level is less than the total delay level of the first delay chain;
[0071] S22: if the sampling position corresponding to the current initial delay level is biased to the left relative to the center of the window of the first parallel data, reduce the current initial delay level, and update the reduced initial delay level to the initial delay level, and then re-sample the relative position;
[0072] If the sampling position corresponding to the current initial delay level is biased to the right relative to the center of the window of the first parallel data, increase the current initial delay level, and update the increased initial delay level to the initial delay level, and then re-sample the relative position;
[0073] S23: taking the initial delay level when the sampling position corresponding to the initial delay level is located at the center of the window of the first parallel data as the first delay level.
[0074] Specifically, in this embodiment, path 1 is selected as the scanning path, path 2 is selected as the reference path, and the initial delay level of delay chain 1 is set. The initial delay level can be set to any number less than the total delay level of delay chain 1, and then the sampling position scanning module scans the relative position between the sampling position corresponding to the initial delay level and the window center of the first parallel data. If the sampling position corresponding to the current initial delay level is located in the window center of the first parallel data, the current initial delay level is recorded as the first delay level. If the sampling position corresponding to the current initial delay level is to the left of the window center of the first parallel data, the timing training control module reduces the initial delay level and sends the reduced delay level to the delay level selection module, the delay level of delay chain 1 is updated to the reduced delay level, and then the sampling position collects the relative position between the sampling position corresponding to the current delay level and the window center of the first parallel data; if the sampling position corresponding to the current delay level is to the right of the window center of the first parallel data, the timing training control module increases the current initial delay level and sends the increased delay level to the delay level selection module, the delay level of delay chain 1 is updated to the increased delay level, and then the sampling position collects the relative position between the sampling position corresponding to the current delay level and the window center of the first parallel data; when the sampling position corresponding to the adjusted delay level of delay chain 1 is located at the window center of the first parallel data, the current delay level of delay chain 1 is recorded as the first delay level.
[0075] In some embodiments, preferably, the initial delay level is half of the total delay level of the first delay chain.
[0076] In some embodiments, Figure 5 As shown, it is a schematic diagram of a process for obtaining a second delay level, wherein S3 includes:
[0077] S31: using the first parallel data as reference data, setting the first delay level as the initial delay level of the second parallel data and scanning, and simultaneously acquiring the relative position corresponding to the initial delay level;
[0078] S32: if the sampling position corresponding to the current initial delay level is biased to the left relative to the center of the window of the second parallel data, reduce the current initial delay level, update the reduced initial delay level to the initial delay level, and then re-sample the relative position;
[0079] If the sampling position corresponding to the current initial delay level is biased to the right relative to the center of the window of the first parallel data, increase the current initial delay level, and update the increased initial delay level to the initial delay level, and then re-sample the relative position;
[0080] S33: taking the initial delay level when the sampling position corresponding to the initial delay level is located at the center of the window of the second parallel data as the second delay level.
[0081] Specifically, in this embodiment, path 2 is selected as the scanning path, path 1 is selected as the reference path, the initial delay level of delay chain 2 is set to the first delay level, and then the sampling position scanning module scans the relative position between the sampling position corresponding to the initial delay level and the window center of the second parallel data. If the sampling position corresponding to the current first delay level is located in the window center of the second parallel data, the current first delay level is recorded as the second delay level. If the sampling position corresponding to the current first delay level is to the left of the window center of the second parallel data, the timing training control module reduces the initial delay level and sends the reduced delay level to the delay level selection module, the delay level of delay chain 2 is updated to the reduced delay level, and then the sampling position collects the relative position between the sampling position corresponding to the current delay level and the window center of the first parallel data; if the sampling position corresponding to the current first level is to the right of the window center of the second parallel data, the timing training control module increases the current initial delay level and sends the increased delay level to the delay level selection module, the delay level of delay chain 2 is updated to the increased delay level, and then the sampling position collects the relative position between the sampling position corresponding to the current delay level and the window center of the second parallel data; when the sampling position corresponding to the adjusted delay level of delay chain 2 is located at the window center of the second parallel data, the current delay level of delay chain 2 is recorded as the second delay level.
[0082] In some embodiments, Figure 6As shown, it is a flow chart of the relative position of the sampling position corresponding to the acquisition delay level and the center of the scan data window. In S2 and S3, the relative position of the sampling position corresponding to the acquisition delay level and the center of the scan data window includes:
[0083] S51: selecting one of the first parallel data and the second parallel data as reference data and the other as scan data for data acquisition, wherein the delay level of the scan data is the current delay level corresponding to the scan data in the first parallel data and the second parallel data;
[0084] S52: gradually decreasing the current delay level to monitor whether the reference data and the scan data are consistent within a specific time period;
[0085] S53: If they are consistent, and the current delay level has not decreased to zero, repeat S52;
[0086] Otherwise, the current delay level is recorded as the first sub-delay level, and the process goes to S54;
[0087] S54: re-loading the current delay level;
[0088] S55: increasing the current delay level step by step, and monitoring whether the reference data and the scan data are consistent within a specific time period;
[0089] S56: If they are consistent, and the current delay level has not reached the maximum delay level, repeat S55; otherwise, record the current delay level as the second sub-delay level;
[0090] S57: Obtain a first sub-delay level difference and a second sub-delay level difference based on the current delay level, the first sub-delay level and the second sub-delay level, compare the first sub-delay level difference with the second sub-delay level difference, and obtain the relative position of the sampling position corresponding to the current delay level and the center of the scanning data window.
[0091] Specifically, in this embodiment, when the timing training control module sends a sampling signal to the sampling position scanning module, the sampling position scanning module obtains the current delay level corresponding to the scanning path in the delay chain 1 and the delay chain 2 determined in the current timing training control module, selects any one group of data in the delay chain 1 or the delay chain 2 as reference data, and the remaining group is the scanning data, and sets the delay level of the selected scanning data to the current delay level corresponding to the scanning path in the delay chain 1 and the delay chain 2 determined in the timing training control module. Then, the current delay level is decreased step by step to monitor whether the reference data and the scan data are consistent within a specific time period; if they are consistent and the current delay level has not decreased to zero, the delay level continues to be decreased; if they are inconsistent, the current delay level is recorded as the first sub-delay level, and the current delay level is loaded again; the current delay level is increased step by step to monitor whether the reference data and the scan data are consistent within a specific time period; if they are consistent and the current delay level has not reached the maximum value of the delay level, the current delay level is continued to be increased; if they are inconsistent, the current delay level is recorded as the second sub-delay level; then, based on the current delay level, the first sub-delay level and the second sub-delay level, the relative position of the sampling position corresponding to the current delay level and the center of the scan data window is obtained.
[0092] In some embodiments, Figure 7 As shown, it is a flow chart of obtaining the relative position of the sampling position corresponding to the current delay level and the center of the scan data window based on the current delay level, the first sub-delay level and the second sub-delay level provided by an embodiment of the present invention, wherein S57 includes:
[0093] S571: the difference between the current delay level and the first sub-delay level is the first sub-delay level difference, and the difference between the second sub-delay level and the current delay level is the second sub-delay level difference;
[0094] S572: If the first sub-delay level difference is greater than the second sub-delay level difference, the current sampling position corresponding to the current delay level is offset to the left relative to the center of the scan data window in the first parallel data and the second parallel data;
[0095] If the first sub-delay level difference is smaller than the second sub-delay level difference, the current sampling position corresponding to the current delay level is offset to the right relative to the center of the scan data window in the first parallel data and the second parallel data;
[0096] If the first sub-delay level difference is equal to the second sub-delay level difference, the current sampling position corresponding to the current delay level is at the center of the scan data window in the first parallel data and the second parallel data.
[0097] Specifically, in this embodiment, record the current delay level as step0, the first sub-delay level as step1, and the second sub-delay level as step2; if step0 - step1 > step2 - step0, the sampling position corresponding to step0 is to the left of the center of the sampling data window in the first parallel data and the second parallel data; if step0 - step1 < step2 - step0, the sampling position corresponding to step0 is to the right of the center of the sampling data window in the first parallel data and the second parallel data; if step0 - step1 = step2 - step0, the sampling position corresponding to step0 is located at the center of the sampling data window in the first parallel data and the second parallel data.
[0098] In some embodiments, the total delay of the first delay chain and the second delay chain is greater than the width of the serial data window.
[0099] In some embodiments, as Figure 6 shown, it is a schematic flowchart of another method for timing training of an LVDS interface provided by an embodiment of the present invention. Before S1, it further includes:
[0100] S0: Scramble the LVDS differential data, convert it into serial data through serial-to-parallel conversion, and then input it into the delay chain.
[0101] After S4, it further includes:
[0102] S6: Descramble and restore the received LVDS differential data.
[0103] Specifically, in the existing timing training method, in an interface that supports dynamic calibration of the sampling position, when there is no valid data at the interface, a continuous constant 0 / constant 1 data stream will occur, resulting in the failure of window calibration and also causing the sampling position to deviate from the center of the data window. Therefore, in this embodiment, in the Figure 2 LVDS transceiver at the sending end, the LVDS differential data is scrambled by a scrambling module, and the parallel data is converted into serial data by a serial-to-parallel conversion module and then sent to the receiving end of the LVDS transceiver. At the receiving end of the LVDS transceiver, the data output by the data path selection module is descrambled by a descrambling module. By scrambling and descrambling, it is avoided that when there is no valid data transmission at the sending end, the serial data stream will be constant 0 / constant 1, resulting in the inability of the receiving end to perform timing training and window calibration; it can avoid the situation where the sampling position cannot be effectively obtained when there is no valid data for a long time.
[0104] In some embodiments, the smaller the difference in the number of delay levels, the smaller the difference in the number of delay levels caused by errors and P / N slope asymmetry on the same chip.
[0105] Specifically, in this embodiment, the first delay level is step_path1, and the second delay level is step_path2, then offset = step_path1-step_path2 represents the asymmetry between the path path1 and the path path2 data caused by the asymmetric slew of the P-end and N-end of the OCV and LVDS differential data. The smaller the offset is, the smaller the difference in the delay levels caused by the error on the same chip and the asymmetric slope of the P-end and N-end of the LVDS differential data.
[0106] In some embodiments, Figure 8 As shown, it is a block diagram of a timing training device for an LVDS interface provided by an embodiment of the present invention, and the device includes:
[0107] Conversion module 701: used for the P-end of the LVDS differential data signal to be input into the first delay chain and converted into the first parallel data through serial-to-parallel conversion; the N-end of the LVDS differential data signal to be input into the second delay chain and converted into the second parallel data through serial-to-parallel conversion;
[0108] The first sampling module 702 is used to perform data sampling with the second parallel data as reference data and the first parallel data as scanning data, and collect the relative position of the sampling position corresponding to the delay level and the center of the scanning data window, and when the sampling position corresponding to the delay level is located at the center of the scanning data window, record the current delay level as the first delay level;
[0109] The second sampling module 703 is used to perform data sampling with the first parallel data as reference data and the second parallel data as scan data, and the initial delay level of the second parallel data is set to the first delay level, collect the relative position of the sampling position corresponding to the delay level and the center of the scan data window, and when the sampling position corresponding to the first delay level is located at the center of the scan data window, record the current first delay level as the second delay level;
[0110] Data output path determination module 704: used to obtain the delay level difference through the first delay level and the second delay level, set the sum of the first delay level and one-half of the delay level difference as the delay level of the first parallel data, and receive the LVDS differential data using the second parallel data as scan data.
[0111] For the specific definition of the LVDS interface timing training device, please refer to the definition of the LVDS interface timing training method above, which will not be repeated here. Each module in the above-mentioned LVDS interface timing training device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0112] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0113] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0114] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0115] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for performing timing training on an LVDS interface, characterized in that: The method comprises: S1: The P-end of the LVDS differential data signal is input into the first delay chain and converted into the first parallel data through serial-to-parallel conversion; the N-end of the LVDS differential data signal is input into the second delay chain and converted into the second parallel data through serial-to-parallel conversion; S2: taking the second parallel data as reference data and the first parallel data as scanning data to perform data sampling, and collecting the relative position between the sampling position corresponding to the current delay level and the center of the scanning data window; when the sampling position corresponding to the current delay level is located at the center of the scanning data window, recording the current delay level as the first delay level; S3: taking the first parallel data as reference data and the second parallel data as scanning data for data sampling, and setting the initial delay level of the second parallel data as the first delay level, collecting the relative position between the sampling position corresponding to the current delay level and the center of the scanning data window, and when the sampling position corresponding to the current delay level is located at the center of the scanning data window, recording the current first delay level as the second delay level; S4: obtaining a delay level difference through the first delay level and the second delay level, setting the sum of the first delay level and one half of the delay level difference as the delay level of the first parallel data, and using the second parallel data as scan data to receive the LVDS differential data.
2. The method for performing timing training on an LVDS interface according to claim 1, wherein: The S2 includes: S21: using the second parallel data as reference data, setting the initial delay level of the first parallel data for data sampling, and collecting the relative position corresponding to the initial delay level; wherein the initial delay level is less than the total delay level of the first delay chain; S22: if the sampling position corresponding to the current initial delay level is biased to the left relative to the center of the window of the first parallel data, reduce the current initial delay level, update the reduced initial delay level to the initial delay level, and then re-sample the relative position; If the sampling position corresponding to the current initial delay level is biased to the right relative to the center of the window of the first parallel data, increase the current initial delay level, and update the increased initial delay level to the initial delay level, and then re-sample the relative position; S23: taking the initial delay level when the sampling position corresponding to the initial delay level is located at the center of the window of the first parallel data as the first delay level.
3. The method for performing timing training of the LVDS interface according to claim 1, characterized in that: The S3 includes: S31: using the first parallel data as reference data, setting the first delay level as the initial delay level of the second parallel data and scanning, and simultaneously acquiring the relative position corresponding to the initial delay level; S32: if the sampling position corresponding to the current initial delay level is biased to the left relative to the center of the window of the second parallel data, reduce the current initial delay level, update the reduced initial delay level to the initial delay level, and then re-sample the relative position; If the sampling position corresponding to the current initial delay level is biased to the right relative to the center of the window of the first parallel data, increase the current initial delay level, and update the increased initial delay level to the initial delay level, and then re-sample the relative position; S33: taking the initial delay level when the sampling position corresponding to the initial delay level is located at the center of the window of the second parallel data as the second delay level.
4. The method for timing training of the LVDS interface according to any one of claims 1 to 3, characterized in that: The relative position between the sampling position corresponding to the acquisition delay level in S2 and S3 and the center of the scan data window includes: S51: selecting one of the first parallel data and the second parallel data as reference data and the other as scan data for data acquisition, wherein the delay level of the scan data is the current delay level corresponding to the scan data in the first parallel data and the second parallel data; S52: gradually decreasing the current delay level to monitor whether the reference data and the scan data are consistent within a specific time period; S53: If they are consistent, and the current delay level has not decreased to zero, repeat S52; Otherwise, the current delay level is recorded as the first sub-delay level, and the process goes to S54; S54: re-loading the current delay level; S55: increasing the current delay level step by step, and monitoring whether the reference data and the scan data are consistent within a specific time period; S56: If they are consistent, and the current delay level has not reached the maximum delay level, repeat S55; Otherwise, the current delay level is recorded as the second sub-delay level; S57: Obtain a first sub-delay level difference and a second sub-delay level difference based on the current delay level, the first sub-delay level and the second sub-delay level, compare the first sub-delay level difference with the second sub-delay level difference, and obtain the relative position of the sampling position corresponding to the current delay level and the center of the scanning data window.
5. The method for performing timing training of the LVDS interface according to claim 4, characterized in that: The S57 includes: S571: the difference between the current delay level and the first sub-delay level is the first sub-delay level difference, and the difference between the second sub-delay level and the current delay level is the second sub-delay level difference; S572: If the first sub-delay level difference is greater than the second sub-delay level difference, the current sampling position corresponding to the current delay level is offset to the left relative to the center of the scan data window in the first parallel data and the second parallel data; If the first sub-delay level difference is smaller than the second sub-delay level difference, the current sampling position corresponding to the current delay level is offset to the right relative to the center of the scan data window in the first parallel data and the second parallel data; If the first sub-delay level difference is equal to the second sub-delay level difference, the current sampling position corresponding to the current delay level is at the center of the scan data window in the first parallel data and the second parallel data.
6. The method for performing timing training of an LVDS interface according to claim 1, characterized in that: The total delay of the first delay chain and the second delay chain is greater than the serial data window width.
7. The method for performing timing training of an LVDS interface according to claim 1, characterized in that: The S1 also includes: S0: Scramble the LVDS differential data, convert it into serial data through parallel-to-serial conversion, and then input it into the delay chain; The S4 also includes: S6: Descramble and restore the received LVDS differential data.
8. The method for performing timing training of an LVDS interface according to claim 2, characterized in that: The initial delay level is half of the total delay level of the first delay chain.
9. The method for performing timing training of an LVDS interface according to claim 1, characterized in that: The smaller the delay series difference is, the smaller the difference in delay series caused by the error on the same chip and the asymmetry of the slopes of the P-end and the N-end of the LVDS differential data is.
10. A device for performing timing training on an LVDS interface, characterized in that: The device comprises: Conversion module: used for the P-end of the LVDS differential data signal to be input into the first delay chain and converted into the first parallel data through serial-to-parallel conversion; the N-end of the LVDS differential data signal to be input into the second delay chain and converted into the second parallel data through serial-to-parallel conversion; A first sampling module: used for performing data sampling with the second parallel data as reference data and the first parallel data as scanning data, and collecting the relative position between the sampling position corresponding to the delay series and the center of the scanning data window, and when the sampling position corresponding to the delay series is located at the center of the scanning data window, recording the current delay series as the first delay series; A second sampling module: used for performing data sampling with the first parallel data as reference data and the second parallel data as scanning data, and setting the initial delay level of the second parallel data as the first delay level, collecting the relative position of the sampling position corresponding to the delay level and the center of the scanning data window, and when the sampling position corresponding to the first delay level is located at the center of the scanning data window, recording the current first delay level as the second delay level; Data output path determination module: used to obtain the delay level difference through the first delay level and the second delay level, set the sum of the first delay level and one-half of the delay level difference as the delay level of the first parallel data, and receive the LVDS differential data using the second parallel data as scan data.
