Low-voltage differential signal delay calibration method and device and electronic equipment
By using delay control parameter arrays and fixed pattern data in low-voltage differential signal communication to automatically adjust signal delays, the problem of high signal delay calibration complexity in the existing technology is solved, and efficiency and intelligence are improved.
Patent Information
- Application Number
- CN202410577055.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-10
- Publication Date
- 2024-08-27
AI Technical Summary
In low-voltage differential signal communication, as the communication frequency and number of channels increase, the complexity of signal delay calibration increases. The existing technology requires manual matching of delays, which is inefficient and not intelligent enough, resulting in complicated debugging.
Provides a low-voltage differential signal delay calibration method. By receiving fixed pattern data of bit clock and frame clock signals, initializes and adjusts the delay of each signal, and uses the delay control parameter array to increase synchronously until fixed pattern data is collected. Calculate the correct delay configuration and reduce the number of iterations.
It significantly reduces the number of iterations of delay parameter adaptation, improves the efficiency of low-voltage differential signal delay calibration, reduces complexity, and realizes an automated calibration process.
Smart Images

Figure CN118550357A
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of data transmission, and in particular to a method, device and electronic device for calibrating a delay of a low voltage differential signal. Background Art
[0002] In the process of data exchange, low-voltage differential signaling (LVDS) is usually used for communication because of its advantages of high speed, low power consumption, and good noise performance. For low-voltage differential signaling signals with N signal differential pairs, it includes a bit clock signal differential pair bclk_p / n, a frame clock signal differential pair fclk_p / n, and several data signal differential pairs sig1_p / n, sig2_p / n, ..., sigN_p / n. After differential conversion to single-ended, the bit clock signal differential pair, the frame clock signal differential pair, and several data signal differential pairs are obtained to obtain the bit clock signal bclk, the frame clock signal fclk, and several data signals sig1, sig2, ..., sigN.
[0003] Use the rising or falling edge of the bit clock signal to collect the data signal. Ideally, the transition edge of the bit clock signal is in the middle of the frame clock signal and 1 bit of several data signals. At this time, the data can be sampled more reliably. When the sampling error occurs, the bit clock signal is usually aligned with the transition edge of the frame clock signal and 1 bit of several data signals. At this time, it is necessary to adjust the delay of each signal to sample and obtain the correct low voltage differential signal data.
[0004] With the increase of communication frequency and the increase of number of channels, the complexity of high-precision delay processing of low voltage differential signal after differential conversion to single-ended signal also increases. At this time, it is necessary to adjust the delay of each signal to sample and obtain correct low voltage differential signal data. The communication frequency of low voltage differential signal is relatively high, the bit clock signal can be as high as 1.2Ghz, the frequency of frame clock signal is 1 / X of the bit clock signal frequency, and the highest frequency of data signal is the frequency of bit clock signal, and the timing relationship requirements between signals also increase accordingly.
[0005] Since there are many low voltage differential signals and the delay width of each signal is usually Y bits, each signal has MAX configurations, MAX = 2^Y-1. In the worst case, MAX^(N+2) configurations need to be adjusted to find the correct configuration. Moreover, as the application environment becomes more complex and diversified, there are certain differences between designs, which means that every adjustment of the hardware environment requires manual matching of the delays of each signal to obtain the correct data, which makes debugging complex, inefficient, and not intelligent enough. Summary of the invention
[0006] The main technical problem solved by the embodiments of the present invention is to provide a low voltage differential signal delay calibration method, device and electronic device, which can greatly reduce the number of delay parameter adaptation iterations and is easy to realize automatically; the maximum number of iterations is (N+1)*2*NUM+2^(N+1)-1, where (N+1)*2*NUM is delay adaptation, and at this time, 2^(N+1)-1 is the adaptation number of dly_add_en.
[0007] In order to solve the above technical problems, a technical solution adopted in an embodiment of the present invention is: to provide a low voltage differential signal delay calibration method, including: receiving bit clock data sent by a bit clock signal, preset first fixed mode data sent by a frame clock signal, and preset second fixed mode data sent by a plurality of data signals; initializing and adjusting the delay, the bit clock delay of the bit clock signal, the frame clock delay of the frame clock signal and the data delay of the plurality of data signals, the clock-to-clock delay or the plurality of clock-to-data delays between the frame clock signal or the plurality of data signals and the bit clock signal, and an array of delay control parameters; aligning the frame clock signal with the bit clock signal as a reference, and when the first fixed mode data is collected, adjusting the clock-to-clock delay until erroneous data is collected, and storing the clock-to-clock delay at this time. The clock-to-clock delay is the first delay; according to the preset order of the data signals, the corresponding data signals are aligned with the clock signal as a reference, and when the corresponding second fixed pattern data is collected, the corresponding clock-to-data delay is adjusted until the error data is collected, and the corresponding clock-to-data delay at this time is stored, and the corresponding clock-to-data delay at this time is the corresponding second delay; the frame clock delay and the plurality of data delays are calculated according to the adjustment delay, the bit clock delay, the first delay, the plurality of second delays, the delay control parameter array and the preset delay adjustment unit, so that the jumping edge of the bit clock signal is respectively aligned with the middle of the frame clock signal and the middle of the bit data of the plurality of data signals; each delay control parameter in the delay control parameter array is synchronously incremented until the first fixed pattern data and the second fixed pattern data are collected.
[0008] In some embodiments, before synchronously incrementing each delay control parameter in the delay control parameter array until the first fixed pattern data and the second fixed pattern data are collected, the method further includes: controlling the low voltage differential signal sending end to enter a calibration mode so that the frame clock signal sends the first fixed pattern data and a plurality of data signals send the second fixed pattern data.
[0009] In some embodiments, after synchronously incrementing each delay control parameter in the delay control parameter array until the first fixed pattern data and the second fixed pattern data are collected, the method further includes: controlling the low voltage differential signal transmitting end to exit the calibration mode.
[0010] In some embodiments, the initialization adjustment delay, the bit clock delay of the bit clock signal, the frame clock delay of the frame clock signal and the data delay of the several data signals, the clock-to-clock delay or several clock-to-data delays between the frame clock signal or the several data signals and the bit clock signal, and the delay control parameter array include: setting the bit clock delay to a preset maximum value; setting the frame clock delay to the preset maximum value; setting each data delay to the preset maximum value; setting the clock-to-clock delay to 0; setting each clock-data delay to 0; setting the adjustment delay to the delay adjustment unit; setting each delay control parameter in the delay control parameter array to 0.
[0011] In some embodiments, when the first fixed pattern data is collected, the clock-to-clock delay is adjusted until error data is collected, and the clock-to-clock delay at this time is stored as the first delay, including: determining whether the first fixed pattern data is collected; if so, decreasing the frame clock delay by the delay step precision; increasing the clock-to-clock delay by the delay step precision, and storing the clock-to-clock delay at this time as the first delay; determining whether the first delay is equal to twice the delay adjustment unit; if not, repeating the above steps until error data is collected; if so, sending an error message to indicate that there is a quality problem with the low voltage differential signal.
[0012] In some embodiments, the corresponding data signal is aligned with the clock signal as a reference according to the preset order of the data signal, and when the corresponding second fixed mode data is collected, the corresponding clock-data delay is adjusted until the erroneous data is collected, and the corresponding clock-data delay at this time is stored as the second delay, including: collecting data of the corresponding data signal according to the preset order, and determining whether the corresponding second fixed mode data is collected; if so, decreasing the corresponding data delay by the delay step accuracy; increasing the corresponding clock-data delay by the delay step accuracy, and storing the clock-data delay at this time as the corresponding second delay; determining whether the corresponding second delay is equal to twice the delay adjustment unit; if not, repeating the above steps until the erroneous data is collected; if so, sending an error message to prompt that there is a quality problem with the low voltage differential signal.
[0013] In some embodiments, the corresponding data signals are aligned based on the clock signal in accordance with the preset order of the data signals, and when the corresponding second fixed pattern data is collected, the corresponding clock-data delay is adjusted until the erroneous data is collected, and the corresponding clock-data delay at this time is stored as the second delay. It also includes: if the corresponding second fixed pattern data is collected, it is determined whether all data signals have been traversed; if not, the data of the corresponding data signal is collected in accordance with the preset order.
[0014] In some embodiments, the frame clock delay and the plurality of data delays are calculated according to the adjustment delay, the bit clock delay, the first delay, the plurality of second delays, the delay control parameter array and the preset delay adjustment unit, including:
[0015] The frame clock delay is calculated according to the following formula:
[0016] fclk_dly_num=bclk_dly_num-(bclk_fclk_dly_num+dly_add_en[0]*2*NUM)-cfg_num;
[0017] fclk_dly_num is the frame clock delay, bclk_dly_num is the bit clock delay, cfg_num is the adjustment delay, bclk_fclk_dly_num is the first delay, dly_add_en[0] is the zeroth delay control parameter, and NUM is the delay adjustment unit;
[0018] According to the following formula, the corresponding data delay is calculated:
[0019] sigN_dly_num=bclk_dly_num-(bclk_sigN_dly_num+dly_add_en[N]*2*NUM)-cfg_num;
[0020] sigN_dly_num is the data delay of the data signal with sequence number N, bclk_sigN_dly_num is the second delay corresponding to the data signal with sequence number N, dly_add_en[N] is the Nth delay control parameter; N is greater than or equal to 1.
[0021] In some embodiments, the synchronous accumulation of each delay control parameter in the delay control parameter array until the first fixed mode data and the second fixed mode data are collected includes: determining whether the first fixed mode data and the second fixed mode data are collected; if so, completing the delay calibration of the low voltage differential signal; if not, synchronously incrementing each delay control parameter in the delay control parameter array; and re-executing the calculation based on the adjustment delay, the bit clock delay, the first delay, several second delays, the delay control parameter array and the preset delay adjustment unit to obtain the frame clock delay and several data delays according to the delay control parameter array after the synchronous increment.
[0022] In some embodiments, the synchronous accumulation of each delay control parameter in the delay control parameter array until the first fixed mode data and the second fixed mode data are collected, before the judgment of whether the first fixed mode data and the second fixed mode data are collected, also includes: accumulating the delay control parameter array to obtain a control parameter accumulated value; judging whether the control parameter accumulated value is greater than a preset accumulated value; if so, sending an error message to indicate that there is a quality problem with the low voltage differential signal.
[0023] In some embodiments, the preset maximum value is calculated according to the following formula:
[0024] MAX = 2^Y-1,
[0025] Among them, MAX is the preset maximum value, Y is the bit width of the bit clock delay, and the bit width of the frame clock delay and the bit width of the data delay are both Y.
[0026] In some embodiments, the preset accumulated value is calculated according to the following formula:
[0027] Add = 2^(N+1)-1,
[0028] Wherein, Add is the preset accumulated value, and N is the number of the data signals.
[0029] In some embodiments, the delay adjustment unit is calculated according to the following formula:
[0030] NUM = Tlvds_x2_clk / 2 / tap+1,
[0031] Wherein, NUM is the delay adjustment unit, Tlvds_x2_clk=Tbclk / 2, Tbclk is the clock period of the bit clock signal, Tlvds_x2_clk is half the clock period of the bit clock signal, and tap is the delay step accuracy.
[0032] In order to solve the above technical problems, another technical solution adopted in the embodiment of the present invention is: to provide a low voltage differential signal delay calibration device, including: a receiving module, used to receive the bit clock data sent by the bit clock signal, the preset first fixed mode data sent by the frame clock signal, and the preset second fixed mode data sent by a plurality of data signals; an initialization module, used to initialize the adjustment delay, the bit clock delay of the bit clock signal, the frame clock delay of the frame clock signal and the data delay of the plurality of data signals, the clock-to-clock delay or the plurality of clock-to-data delays between the frame clock signal or the plurality of data signals and the bit clock signal, and an array of delay control parameters; a first delay module, used to align the frame clock signal with the bit clock signal as a reference, and when the first fixed mode data is collected, adjust the clock-to-clock delay until the erroneous data is collected, and store the clock-to-clock delay at this time, and this The clock-to-clock delay at the time of the acquisition is the first delay; the second delay module is used to align the corresponding data signals with the clock signal as a reference according to the preset order of the data signals, and when the corresponding second fixed pattern data is collected, the corresponding clock-data delay is adjusted until the error data is collected, and the corresponding clock-data delay at this time is stored, and the corresponding clock-data delay at this time is the corresponding second delay; a calculation module is used to calculate the frame clock delay and the plurality of data delays according to the adjustment delay, the bit clock delay, the first delay, the plurality of second delays, the delay control parameter array and the preset delay adjustment unit, so that the jump edge of the bit clock signal is respectively aligned with the middle of the frame clock signal and the middle of the bit data of the plurality of data signals; an adjustment module is used to synchronously increment each delay control parameter in the delay control parameter array until the first fixed pattern data and the second fixed pattern data are collected.
[0033] To solve the above technical problems, another technical solution adopted in the embodiment of the present invention is: to provide an electronic device, comprising: at least one processor; at least one network interface, which is communicatively connected to the corresponding processor; and a memory which is communicatively connected to the at least one processor; wherein the network interface is used to establish a communication connection between the processor and other external devices; the memory stores instructions which can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the low voltage differential signal delay calibration method as described above.
[0034] In order to solve the above technical problems, another technical solution adopted in the embodiment of the present invention is: providing a non-volatile computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are executed by one or more processors, so that the one or more processors can execute the low voltage differential signal delay calibration method as described above.
[0035] The beneficial effects of the embodiments of the present invention are: different from the prior art, the embodiments of the present invention can reduce the amount of calculation for calibrating the low voltage differential signal delay, reduce the complexity of improving the low voltage differential signal delay calibration, and improve the calibration efficiency of the low voltage differential signal delay. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a structural schematic diagram of a low voltage differential signal data exchange system;
[0037] Figure 2 It is a flow chart of a low voltage differential signal delay calibration method provided by an embodiment of the present invention;
[0038] Figure 3 yes Figure 2 A schematic flow chart of step S300 of the low voltage differential signal delay calibration method is shown;
[0039] Figure 4 yes Figure 2 A schematic flow chart of step S400 of the low voltage differential signal delay calibration method is shown;
[0040] Figure 5 yes Figure 2 A schematic flow chart of step S500 of the low voltage differential signal delay calibration method is shown;
[0041] Figure 6 yes Figure 2 A schematic flow chart of step S600 of the low voltage differential signal delay calibration method is shown;
[0042] Figure 7 yes Figure 2 The flowchart of step S700 of the low voltage differential signal delay calibration method is shown;
[0043] Figure 8 It is a structural schematic diagram of a low voltage differential signal delay calibration device provided by an embodiment of the present invention;
[0044] Fig. 9 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to facilitate the understanding of the present application, the present application is described in more detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that when an element is described as "fixed to" another element, it can be directly on another element or there can be one or more centered elements therebetween. When an element is described as "connected" to another element, it can be directly connected to another element or there can be one or more centered elements therebetween. The orientation or positional relationship indicated by the terms "upper", "lower", "inner", "outer", "bottom" and the like used in this specification is based on the orientation or positional relationship shown in the accompanying drawings, only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second", "third" and the like are used only for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0046] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used in this specification and in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used in this specification includes any and all combinations of one or more of the related listed items.
[0047] In addition, the technical features involved in the different embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.
[0048] The technical solution in this application will be described below in conjunction with the accompanying drawings.
[0049] For LVDS with N signal differential pairs, the composition is as follows:
[0050] (1) The bit clock signal differential pair bclk_p / n is the signal differential pair of the bit clock. In LVDS communication, bitclock refers to the clock signal used to synchronize data transmission, usually used to indicate when data is available and when to sample. bclk_p represents the positive clock signal line, and bclk_n represents the reverse clock signal line. The bit clock signal bclk is obtained after differential conversion to single-ended;
[0051] (2) The frame clock signal differential pair fclk_p / n is the signal differential pair of the frame format signal frame clock. In LVDS communication, frame clock refers to the frame format clock signal, which is used to indicate the start and end position of the data frame. fclk_p represents the positive frame clock signal line, and fclk_n represents the reverse frame clock signal line. The frame clock signal fclk is obtained by converting the differential to single-ended.
[0052] (3) Several data signal differential pairs sig1_p / n, sig2_p / n, ..., sigN_p / n are data signal differential pairs, which are corresponding data signals sig1, sig2, ..., sigN after differential conversion to single-ended.
[0053] Data signals sig1, sig2, ..., sigN share the bit clock signal bclk and the frame clock signal fclk, and use the rising edge or falling edge of the bitclock to collect the sig signal to obtain 1 bit of data. The frame clock signal fclk is used to align the data to obtain an X bit of data. When the bit clock signal bclk samples the frame clock signal fclk and the data signal sig1, ..., sigN, ideally, the transition edge of the bit clock signal bclk is in the middle of the frame clock signal fclk and the data signal sig1, ..., sigN 1 bit, and the frame clock signal fclk and sig1, ..., sigN are edge-aligned, so data can be sampled more reliably. When sampling errors occur, the bit clock signal bclk is usually aligned with the transition edges of the frame clock signal fclk and the data signal sig1, ..., sigN. At this time, it is necessary to adjust the delay of each signal to sample and obtain the correct LVDS data.
[0054] As the communication frequency increases and the number of channels increases, the complexity of high-precision delay processing of LVDS differential to single-ended signals also increases. At this time, it is necessary to adjust the delay of each signal to sample and obtain the correct LVDS data.
[0055] The LVDS communication frequency is relatively high. The bit clock signal bclk can be as high as 1.2Ghz. The frequency of the frame clock signal fclk is 1 / X of the frequency of the bit clock signal bclk. The highest frequency of the data signals sig1, sig2, ..., sigN is the frequency of the bit clock signal bclk, and the timing relationship requirements between signals are also increased accordingly.
[0056] Currently, LVDS reception is developed based on the FPGA platform. In the FPGA, the differential input clock buffer (Dedicated Differential Signaling Input Buffer with Selectable I / OInterface, IBUFDS) is first called to convert the signal from differential to single-ended, and then the delay processing unit IDELAYE is used to add a delay to the single-ended signal, and then the input serializer ISERDES is used to convert the serial to parallel processing to obtain the LVDS data.
[0057] Each single-ended signal has a corresponding delay management module to control the delay of the signal. A common practice is to define a delay register for each signal, such as the delay register cfg_bclk_dly_num of the bit clock signal bclk, the delay register cfg_fclk_dly_num of the frame clock signal fclk, and the delay registers cfg_sig1_dly_num, ..., cfg_sigN_dly_num of the data signals sig1, sig2, ..., sigN. The delay reference unit is controlled by the delay processing control unit IDELAYCTRL, and the delay step accuracy can reach the ps level.
[0058] The traditional method of adjusting the delay register of the signal is manual debugging, and setting the delay value dly num of each signal step by step according to the actual hardware environment. Usually, the frame clock signal fclk sends fixed pattern data, and the delay of the bit clock signal bclk is adjusted to ensure that the correct pattern data sent by the frame clock signal fclk can be received. Then debug the delay of the data signals sig1, sig2, ..., sigN in turn until the expected sig1, sig2, ..., sigN data is obtained. Usually, the data of sig1, sig2, ..., sigN is non-repetitive data.
[0059] Figure 1 A structural schematic diagram of a low voltage differential signal data exchange system is shown, which includes a low voltage differential signal transmitting end 100 and a low voltage differential signal receiving end 200, wherein the low voltage differential signal receiving end 200 includes a differential input clock buffer unit 210, a delay processing unit 220 and an input deserialization unit 230.
[0060] It is not difficult to understand based on the above description that the differential input clock buffer unit 210 includes a plurality of differential input clock buffers for converting the corresponding signals into differential-to-single-ended signals; the delay processing unit 220 is used to perform delay processing on the corresponding single-ended signals; and the input deserialization unit 230 includes a plurality of input deserializers for converting the corresponding delayed single-ended signals into serial-to-parallel signals.
[0061] Based on the above-mentioned low voltage differential signal data exchange system, an embodiment of the present invention provides a low voltage differential signal delay calibration method, and its flow chart is as follows: Figure 2 As shown, the method specifically comprises the following steps:
[0062] Step S100: controlling the low voltage differential signal transmitting end to enter a calibration mode, so that the frame clock signal transmits first fixed pattern data, and a plurality of data signals transmit second fixed pattern data.
[0063] Specifically, a calibration mode control switch is provided, and the low voltage differential signal transmitting end is controlled to enter the calibration mode by opening the switch, so that the bit clock signal sends the bit clock data normally, the frame clock signal sends the first fixed mode data, and several data signals send the corresponding second fixed mode data.
[0064] The first fixed pattern data and the second fixed pattern data are reference data, and the signal delay is adjusted based on whether the correct first pattern data and second pattern data are received as a judgment standard. As an example but not a limitation, the first pattern data or the second pattern data can be a continuous data stream of alternating 0 and 1, and this pattern data can be easily observed and detected, thereby helping to determine whether the signal delay adjustment is correct.
[0065] Step S200: receiving bit clock data sent by a bit clock signal, preset first fixed pattern data sent by a frame clock signal, and preset second fixed pattern data sent by a plurality of data signals.
[0066] Step S300: Initialize the adjustment delay, the bit clock delay of the bit clock signal, the frame clock delay of the frame clock signal and the data delay of several data signals, the clock-clock delay or several clock-data delays between the frame clock signal or several data signals and the bit clock signal, and the delay control parameter array.
[0067] Step S400: aligning the frame clock signal with the bit clock signal as a reference, and when collecting the first fixed pattern data, adjusting the clock-to-clock delay until the error data is collected, and storing the clock-to-clock delay at this time, which is the first delay.
[0068] Step S500: Align the corresponding data signals according to the preset order of the data signals and take the clock signal as the reference. When the corresponding second fixed mode data is collected, adjust the corresponding clock-data delay until the erroneous data is collected, and store the corresponding clock-data delay at this time. The corresponding clock-data delay at this time is the corresponding second delay.
[0069] Step S600: Calculate the frame clock delay and several data delays according to the adjustment delay, the bit clock delay, the first delay, several second delays, the delay control parameter array and the preset delay adjustment unit, so that the transition edge of the bit clock signal is aligned with the middle of the frame clock signal and the middle of the bit data of several data signals respectively.
[0070] Step S700: synchronously incrementing each delay control parameter in the delay control parameter array until the first fixed pattern data and the second fixed pattern data are collected.
[0071] Step S800: controlling the low voltage differential signal transmitting end to exit the calibration mode.
[0072] In some embodiments of the present application, step S300 specifically includes the following steps, and its flowchart is as follows: Figure 3 As shown:
[0073] Step S310: setting the bit clock delay to a preset maximum value.
[0074] In the embodiment of the present application, there is a preset maximum value for the delay adjustment of any signal, and the preset maximum value is calculated according to the following formula:
[0075] MAX = 2^Y-1,
[0076] Among them, Y is the bit width of the bit clock delay, the bit width of the frame clock delay and the bit width of the data delay are all Y.
[0077] Through initialization setting, the delay register of the bit clock signal is assigned a value, that is, the bit clock delay is set to the preset maximum value MAX.
[0078] Step S320: setting the frame clock delay to a preset maximum value.
[0079] Through initialization setting, the delay register of the frame clock signal is assigned a value, that is, the frame clock delay is set to the preset maximum value MAX.
[0080] Step S330: setting each data delay to a preset maximum value.
[0081] Through initialization setting, the delay register of each data signal is assigned a value, that is, each data delay is set to a preset maximum value MAX.
[0082] Step S340: Set the clock-to-clock delay to 0.
[0083] Corresponding to the bit clock signal and the frame clock signal, it is also necessary to define a delay register between the bit clock signal and the frame clock signal, that is, the clock-to-clock delay in the embodiment of the present application. It should be noted that, through the settings of step S310 and step S320, the bit clock delay is equal to the frame clock delay, that is, the delay between the bit clock signal and the frame clock signal is 0. Despite this, the delay register between the bit clock signal and the frame clock signal is still not assigned a value, so it is still necessary to assign a value to the clock-to-clock delay. Through the initialization setting, the delay register between the bit clock signal and the frame clock signal is assigned a value, that is, the clock-to-clock delay is set to 0.
[0084] Step S350: Set each clock-data delay to 0.
[0085] Corresponding to the bit clock signal and each data delay, it is also necessary to define a number of delay registers between the bit clock signal and the data signal, that is, the clock-data delay in the embodiment of the present application. It should be noted that, through the settings of step S310 and step S330, the bit clock delay is equal to the data delay, that is, the delay between the bit clock signal and each data signal is 0. Despite this, the delay register between the bit clock signal and each data signal is still not assigned a value, so the clock-data delay is still required for assignment. Through the initialization setting, the delay register between the bit clock signal and each data signal is assigned a value, that is, each clock-data delay is set to 0.
[0086] Step S360: setting the adjustment delay as the delay adjustment unit.
[0087] In the embodiment of the present application, a delay register is further provided, which is defined as adjusting the delay, and a value of the delay register is assigned to the delay adjustment unit.
[0088] In the embodiment of the present application, the delay adjustment unit is calculated by the following formula:
[0089] NUM = Tlvds_x2_clk / 2 / tap+1,
[0090] Wherein, NUM is the delay adjustment unit, Tlvds_x2_clk=Tbclk / 2, Tbclk is the clock period of the bit clock signal, Tlvds_x2_clk is half the clock period of the bit clock signal, and tap is the delay step accuracy.
[0091] Delay step accuracy refers to the smallest unit of delay adjustment. Using tap as the unit of delay step accuracy means that the delay adjustment represented by each tap is fixed, and the delay can be finely controlled by adjusting the tap value.
[0092] Generally speaking, the smaller the delay step precision, the more finely the delay can be adjusted, so that the signal can be more accurately aligned with other signals. However, a larger delay step precision may result in insufficient precision when adjusting the delay, making it difficult to achieve accurate signal alignment.
[0093] Step S370: setting each delay control parameter in the delay control parameter array to 0.
[0094] In an embodiment of the present application, a delay control parameter array is defined, which includes N+1 elements, and the number of data signals is N, that is, the number of elements in the delay control parameter array and the number of frame clock signals plus the number of data signals, and the parameters in the delay control parameter array correspond to the clock-to-clock delay and the clock-to-data delay.
[0095] By initializing the settings, each parameter in the delay control parameter array is assigned a value of 0.
[0096] In some embodiments of the present application, step S400 specifically includes the following steps, and its flowchart is as follows: Figure 4 As shown:
[0097] Step S410: Determine whether first fixed pattern data is collected.
[0098] Specifically, the bit clock signal is used as a reference, and the bit clock delay is assigned to a preset maximum value MAX, to align the frame clock signal, specifically through bitslip. The trigger adjustment of bitslip uses the first fixed pattern data sent by the frame clock signal as a judgment condition. When the correct first fixed pattern data is sampled, step S420 is executed; if the wrong first fixed pattern data is sampled, it is considered that the bit clock signal and the frame clock signal at this time are edge-aligned, and step S500 is executed.
[0099] Step S420: Decrease the frame clock delay in units of delay step accuracy.
[0100] Specifically, a frame clock delay whose initial value is a preset maximum value MAX is decremented with a delay step accuracy, and the frame clock delay is reassigned.
[0101] Step S430: Increment the clock-to-clock delay in units of delay step accuracy, and store the clock-to-clock delay at this time as the first delay.
[0102] Accordingly, the clock-to-clock delay whose initial value is 0 is incremented with the delay step accuracy, the clock-to-clock delay is reassigned, and the reassigned clock-to-clock delay is stored as the first delay.
[0103] Step S440: Determine whether the first delay is equal to twice the delay adjustment unit.
[0104] It is determined whether the first delay is equal to twice the delay adjustment unit NUM. If so, step S450 is executed; if not, step S410 is executed again.
[0105] Step S450: Send an error message to indicate that there is a quality problem with the low voltage differential signal.
[0106] In some embodiments of the present application, step S500 specifically includes the following steps, and its flowchart is as follows: Figure 5 As shown:
[0107] Step S510: collecting data of corresponding data signals in a preset order.
[0108] Specifically, the following steps are performed on the corresponding data signal in a preset order. In some embodiments, the data of the corresponding data signal can be collected from small to large according to the serial number of the data signal, such as first collecting the data of the data signal sig1, and then performing the following step S520 until the second fixed pattern data of the data signal sig1 error is collected, then collecting the data of the data signal sig2, and so on. Of course, the data of the corresponding data signal can also be collected from large to small according to the serial number of the data signal, and the order can also be pre-set to collect the data of the corresponding data signal in a preset order.
[0109] Step S520: Determine whether corresponding second fixed pattern data is collected.
[0110] Specifically, the bit clock signal is used as a reference, and the bit clock delay is assigned to a preset maximum value MAX, to align the corresponding data signal, specifically through bitslip. The trigger adjustment of bitslip uses the second fixed pattern data sent by the corresponding data signal as a judgment condition. When the correct second fixed pattern data is sampled, step S530 is executed; if the wrong second fixed pattern data is sampled, it is considered that the bit clock signal and the corresponding data signal at this time are edge-aligned, and step S540 is executed.
[0111] Step S530: Decrement the corresponding data delay in units of delay step accuracy.
[0112] Specifically, a corresponding data delay whose initial value is a preset maximum value MAX is decremented with a delay step accuracy, and the corresponding data delay is reassigned.
[0113] Step S540: Determine whether all data signals have been traversed.
[0114] It is determined whether all data signals have been delayed adjusted. If not, step S510 is executed; if yes, it is considered that the bit clock signal and all data signals have been edge-aligned.
[0115] Step S550: increasing the corresponding clock-data delay in units of delay step accuracy, and storing the clock-data delay at this time as the corresponding second delay.
[0116] Accordingly, the corresponding clock-data delay having an initial value of 0 is incremented with the delay step accuracy, the corresponding clock-clock delay is reassigned, and the reassigned corresponding clock-clock delay is stored as the corresponding second delay.
[0117] Step S560: Determine whether the corresponding second delay is equal to twice the delay adjustment unit.
[0118] It is determined whether the corresponding second delay is equal to twice the delay adjustment unit NUM. If so, step S570 is executed; if not, step S510 is executed again.
[0119] Step S570: Send an error message to indicate that there is a quality problem with the low voltage differential signal.
[0120] In some embodiments of the present application, step S600 specifically includes the following steps, and its flowchart is as follows: Figure 6 As shown:
[0121] Step S610: Calculate the frame clock delay according to the following formula:
[0122] fclk_dly_num=bclk_dly_num-(bclk_fclk_dly_num+dly_add_en[0]*2*NUM)-cfg_num.
[0123] Among them, fclk_dly_num is the frame clock delay, bclk_dly_num is the bit clock delay, cfg_num is the adjustment delay, bclk_fclk_dly_num is the first delay, dly_add_en[0] is the zeroth delay control parameter, and NUM is the delay adjustment unit.
[0124] Step S620: Calculate the corresponding data delay according to the following formula:
[0125] sigN_dly_num=bclk_dly_num-(bclk_sigN_dly_num+dly_add_en[N]*2*NUM)-cfg_num.
[0126] sigN_dly_num is the data delay of the data signal with sequence number N, bclk_sigN_dly_num is the second delay corresponding to the data signal with sequence number N, and dly_add_en[N] is the Nth delay control parameter;
[0127] It should be noted that N is greater than or equal to 1.
[0128] In some embodiments of the present application, step S700 specifically includes the following steps, and its flowchart is as follows: Figure 7 As shown:
[0129] Step S710: Accumulate the delay control parameter array to obtain the control parameter accumulated value.
[0130] Specifically, each control parameter in the delay control parameter array is accumulated to obtain a control parameter accumulated value.
[0131] Step S720: Determine whether the control parameter accumulated value is greater than a preset accumulated value.
[0132] Determine whether the control parameter accumulated value is greater than the preset accumulated value, if so, execute step S740; if not, execute step S730.
[0133] In the implementation manner of the present application, the preset accumulated value is calculated according to the following formula:
[0134] Add = 2^(N+1)-1,
[0135] Wherein, Add is a preset accumulated value, and N is the number of data signals.
[0136] Step S730: Determine whether the first fixed pattern data or the second fixed pattern data is collected.
[0137] Determine whether the first fixed pattern data or the second fixed pattern data is collected, if so, execute step S760; if not, execute step S750.
[0138] Step S740: Send an error message to indicate that there is a quality problem with the low voltage differential signal.
[0139] Step S750: synchronously incrementing each delay control parameter in the delay control parameter array.
[0140] Each delay control parameter in the delay control parameter array is synchronously incremented, and each delay control parameter is reassigned.
[0141] Step S760: completing the delay calibration of the low voltage differential signal.
[0142] When the correct first fixed pattern data and all the correct second fixed pattern data are collected, it is considered that the transition edge of the bit clock signal is aligned with the middle of the frame clock signal and 1 bit of all data signals, and the delay adaptation of each signal is completed, and step S800 is further executed.
[0143] Step S770: according to the synchronously incremented delay control parameter array, re-execute the calculation according to the adjustment delay, the bit clock delay, the first delay, the plurality of second delays, the delay control parameter array and the preset delay adjustment unit to obtain the frame clock delay and the plurality of data delays.
[0144] Step S600 is re-executed with the synchronously incremented delay control parameter.
[0145] Different from the prior art, the embodiments of the present invention can reduce the amount of calculation for calibrating the low voltage differential signal delay, reduce the complexity of improving the low voltage differential signal delay calibration, and improve the calibration efficiency of the low voltage differential signal delay.
[0146] Based on the low voltage differential signal delay calibration method provided in the above embodiment, the embodiment of the present invention further provides a low voltage differential signal delay calibration device, the structural diagram of which is shown in FIG. Figure 8 As shown, the low voltage differential signal delay calibration device includes: a receiving module 310 , an initialization module 320 , a first delay module 330 , a second delay module 340 , a calculation module 350 and an adjustment module 360 .
[0147] The receiving module 310 is used to receive the bit clock data sent by the bit clock signal, the preset first fixed pattern data sent by the frame clock signal, and the preset second fixed pattern data sent by a plurality of data signals.
[0148] The initialization module 320 is used to initialize the adjustment delay, the bit clock delay of the bit clock signal, the frame clock delay of the frame clock signal and the data delay of several data signals, the clock-clock delay or several clock-data delays between the frame clock signal or several data signals and the bit clock signal, and the delay control parameter array.
[0149] The first delay module 330 is used to align the frame clock signal with the bit clock signal as a reference. When the first fixed pattern data is collected, the clock-to-clock delay is adjusted until the error data is collected, and the clock-to-clock delay at this time is stored. The clock-to-clock delay at this time is the first delay.
[0150] The second delay module 340 is used to align the corresponding data signals according to the preset order of the data signals and based on the clock signal. When the corresponding second fixed pattern data is collected, the corresponding clock-data delay is adjusted until the error data is collected, and the corresponding clock-data delay at this time is stored. The corresponding clock-data delay at this time is the corresponding second delay.
[0151] The calculation module 350 is used to calculate the frame clock delay and several data delays according to the adjustment delay, the bit clock delay, the first delay, several second delays, the delay control parameter array and the preset delay adjustment unit, so that the transition edge of the bit clock signal is aligned with the middle of the frame clock signal and the middle of the bit data of several data signals respectively.
[0152] The adjustment module 360 is used to synchronously increase each delay control parameter in the delay control parameter array until the first fixed pattern data and the second fixed pattern data are collected.
[0153] The embodiment of the present invention also provides an electronic device based on the above-mentioned low voltage differential signal delay calibration method, and its structural schematic diagram is as shown in FIG. Fig. 9 As shown, the electronic device 40 includes:
[0154] One or more processors 401, network interface 402 and memory 403, Fig. 9 In the figure, a processor 401, a network interface 402 and a memory 403 are taken as an example.
[0155] The network interface 402 is in communication with the corresponding processor 401, and the processor 401 and the memory 402 can be connected via a bus or other means. Fig. 9 The example of connecting through bus is taken in the following.
[0156] The network interface 402 is used to establish a communication connection between the processor 401 and other external devices, including the following types: RJ-45 interface, SC optical fiber interface, AUI interface, FDDI interface, Console interface and other interface types.
[0157] The memory 403 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The processor 401 executes various functional applications and data processing of the electronic device by running the non-volatile software programs, instructions and units stored in the memory 403, that is, the low voltage differential signal delay calibration method of the above method embodiment is implemented.
[0158] The memory 403 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 403 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 403 may optionally include a memory remotely arranged relative to the processor 401, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0159] The one or more units are stored in the memory 403, and when executed by one or more processors 401, the low voltage differential signal delay calibration method in any of the above method embodiments is executed, for example, the low voltage differential signal delay calibration method described above is executed. Figure 2 The method comprises steps S100 to S700.
[0160] The above electronic device can execute the low voltage differential signal delay calibration method provided by the embodiment of the present invention, and has the corresponding program module and beneficial effects of the execution method. For technical details not fully described in the electronic device embodiment, please refer to the low voltage differential signal delay calibration method provided by the embodiment of the present invention.
[0161] The embodiment of the present invention also provides a non-volatile computer-readable storage medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above non-volatile computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the low voltage differential signal delay calibration method of the embodiment of the present disclosure is implemented.
[0162] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes in different aspects of the present application as above, which are not provided in detail for the sake of simplicity. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A low voltage differential signal delay calibration method, It is characterized in that include: Receive bit clock data sent by a bit clock signal, preset first fixed pattern data sent by a frame clock signal, and preset second fixed pattern data sent by a plurality of data signals; Initialize adjustment delay, bit clock delay of the bit clock signal, frame clock delay of the frame clock signal and data delay of the plurality of data signals, clock-to-clock delay or clock-to-data delays between the frame clock signal or the plurality of data signals and the bit clock signal, and delay control parameter array; The frame clock signal is aligned with the bit clock signal as a reference, and when the first fixed pattern data is collected, the clock-to-clock delay is adjusted until the error data is collected, and the clock-to-clock delay at this time is stored, where the clock-to-clock delay at this time is the first delay; According to the preset order of the data signals, the corresponding data signals are aligned with the clock signal as a reference, and when the corresponding second fixed pattern data is collected, the corresponding clock-data delay is adjusted until the error data is collected, and the corresponding clock-data delay at this time is stored, and the corresponding clock-data delay at this time is the corresponding second delay; The frame clock delay and the plurality of data delays are calculated according to the adjustment delay, the bit clock delay, the first delay, the plurality of second delays, the delay control parameter array and the preset delay adjustment unit, so that the transition edge of the bit clock signal is aligned with the middle of the frame clock signal and the middle of the bit data of the plurality of data signals respectively; Each delay control parameter in the delay control parameter array is synchronously incremented until the first fixed pattern data and the second fixed pattern data are collected.
2. The method according to claim 1, It is characterized in that Before the synchronously incrementing each delay control parameter in the delay control parameter array until the first fixed pattern data and the second fixed pattern data are collected, the method further includes: The low voltage differential signal transmitting end is controlled to enter a calibration mode, so that the frame clock signal transmits the first fixed pattern data, and a plurality of data signals transmit the second fixed pattern data.
3. The method according to claim 1, It is characterized in that After synchronously increasing each delay control parameter in the delay control parameter array until the first fixed pattern data and the second fixed pattern data are collected, the method further includes: Controls the low voltage differential signal transmitter to exit calibration mode.
4. The method according to claim 1, It is characterized in that The initialization adjustment delay, the bit clock delay of the bit clock signal, the frame clock delay of the frame clock signal and the data delay of the plurality of data signals, the clock-clock delay or the plurality of clock-data delays between the frame clock signal or the plurality of data signals and the bit clock signal, and the delay control parameter array, include: Setting the bit clock delay to a preset maximum value; Setting the frame clock delay to the preset maximum value; Setting each data delay to the preset maximum value; Set the clock-to-clock delay to 0; Set each clock-data delay to 0; Setting the adjustment delay to the delay adjustment unit; Set each delay control parameter in the delay control parameter array to 0.
5. The method according to claim 1, It is characterized in that When the first fixed pattern data is collected, adjusting the clock-to-clock delay until error data is collected, and storing the clock-to-clock delay at this time as the first delay, comprises: Determining whether the first fixed pattern data is collected; If yes, then decrement the frame clock delay by the delay step precision; Incrementing the clock-to-clock delay in units of the delay step precision, and storing the clock-to-clock delay at this time as the first delay; Determining whether the first delay is equal to twice the delay adjustment unit; If not, repeat the above steps until error data is collected; If so, an error message is sent to indicate that there is a quality problem with the low voltage differential signal.
6. The method according to claim 1, It is characterized in that The method of aligning the corresponding data signals according to the preset sequence of the data signals and taking the clock signal as a reference, and when the corresponding second fixed pattern data is collected, adjusting the corresponding clock-data delay until the error data is collected, and storing the corresponding clock-data delay at this time as the second delay, comprises: Collecting data of corresponding data signals according to the preset sequence; Determining whether corresponding second fixed mode data is collected; If yes, then the corresponding data delay is decreased by the delay step precision; Incrementing the corresponding clock-data delay in units of the delay step precision, and storing the clock-data delay at this time as the corresponding second delay; Determining whether the corresponding second delay is equal to twice the delay adjustment unit; If not, repeat the above steps until error data is collected; If so, an error message is sent to indicate that there is a quality problem with the low voltage differential signal.
7. The method according to claim 6, It is characterized in that The method further comprises: aligning the corresponding data signals according to the preset sequence of the data signals and taking the clock signal as a reference, adjusting the corresponding clock-data delay until the erroneous data is collected when the corresponding second fixed pattern data is collected, and storing the corresponding clock-data delay at this time as the second delay. If the corresponding second fixed pattern data is collected, determining whether all data signals have been traversed; If not, data of the corresponding data signal is collected according to the preset sequence.
8. The method according to claim 1, It is characterized in that The frame clock delay and the plurality of data delays are calculated according to the adjustment delay, the bit clock delay, the first delay, a plurality of second delays, the delay control parameter array and a preset delay adjustment unit, including: The frame clock delay is calculated according to the following formula: fclk_dly_num=bclk_dly_num-(bclk_fclk_dly_num+dly_add_en[0]*2*NUM)-cfg_num; fclk_dly_num is the frame clock delay, bclk_dly_num is the bit clock delay, cfg_num is the adjustment delay, bclk_fclk_dly_num is the first delay, dly_add_en[0] is the zeroth delay control parameter, and NUM is the delay adjustment unit; According to the following formula, the corresponding data delay is calculated: sigN_dly_num=bclk_dly_num-(bclk_sigN_dly_num+dly_add_en[N]*2*NUM)-cfg_num; sigN_dly_num is the data delay of the data signal with sequence number N, bclk_sigN_dly_num is the second delay corresponding to the data signal with sequence number N, and dly_add_en[N] is the Nth delay control parameter; N is greater than or equal to 1.
9. The method according to claim 1, It is characterized in that The synchronously accumulating each delay control parameter in the delay control parameter array until the first fixed pattern data and the second fixed pattern data are collected includes: Determining whether the first fixed pattern data and the second fixed pattern data are collected; If yes, the delay calibration of the low voltage differential signal is completed; If not, then synchronously incrementing each delay control parameter in the delay control parameter array; According to the synchronously incremented delay control parameter array, the frame clock delay and several data delays are calculated based on the adjustment delay, the bit clock delay, the first delay, several second delays, the delay control parameter array and the preset delay adjustment unit to obtain the frame clock delay and several data delays.
10. The method according to claim 9, It is characterized in that The synchronously accumulating each delay control parameter in the delay control parameter array until the first fixed pattern data and the second fixed pattern data are collected, and before the determining whether the first fixed pattern data and the second fixed pattern data are collected, further comprises: Accumulating the delay control parameter array to obtain a control parameter accumulated value; Determining whether the control parameter accumulated value is greater than a preset accumulated value; If so, an error message is sent to indicate that there is a quality problem with the low voltage differential signal.
11. The method according to claim 4, It is characterized in that The preset maximum value is calculated according to the following formula: MAX = 2^Y-1, Among them, MAX is the preset maximum value, Y is the bit width of the bit clock delay, and the bit width of the frame clock delay and the bit width of the data delay are both Y.
12. The method according to claim 10, It is characterized in that The preset accumulated value is calculated according to the following formula: Add = 2^(N+1)-1, Wherein, Add is the preset accumulated value, and N is the number of the data signals.
13. The method according to any one of claims 1 to 12, It is characterized in that The delay adjustment unit is calculated according to the following formula: NUM = Tlvds_x2_clk / 2 / tap+1, Wherein, NUM is the delay adjustment unit, Tlvds_x2_clk=Tbclk / 2, Tbclk is the clock period of the bit clock signal, Tlvds_x2_clk is half the clock period of the bit clock signal, and tap is the delay step accuracy.
14. A low voltage differential signal delay calibration device, It is characterized in that include: A receiving module, used for receiving bit clock data sent by a bit clock signal, preset first fixed pattern data sent by a frame clock signal, and preset second fixed pattern data sent by a plurality of data signals; An initialization module, used for initializing the adjustment delay, the bit clock delay of the bit clock signal, the frame clock delay of the frame clock signal and the data delay of the plurality of data signals, the clock-to-clock delay or the plurality of clock-to-data delays between the frame clock signal or the plurality of data signals and the bit clock signal, and an array of delay control parameters; A first delay module, used for aligning the frame clock signal with the bit clock signal as a reference, and when the first fixed pattern data is collected, adjusting the clock-to-clock delay until error data is collected, and storing the clock-to-clock delay at this time, where the clock-to-clock delay at this time is the first delay; A second delay module is used to align the corresponding data signals according to the preset order of the data signals and take the clock signal as a reference, and when the corresponding second fixed pattern data is collected, adjust the corresponding clock-data delay until the error data is collected, and store the corresponding clock-data delay at this time, which is the corresponding second delay; a calculation module, configured to calculate the frame clock delay and a plurality of data delays according to the adjustment delay, the bit clock delay, the first delay, a plurality of second delays, the delay control parameter array and a preset delay adjustment unit, so that the transition edge of the bit clock signal is aligned with the middle of the frame clock signal and the middle of the bit data of the plurality of data signals respectively; The adjustment module is used to synchronously increment each delay control parameter in the delay control parameter array until the first fixed pattern data and the second fixed pattern data are collected.
15. An electronic device, It is characterized in that include: at least one processor; at least one network interface, the network interface being communicatively connected to a corresponding processor; as well as, a memory communicatively connected to the at least one processor; wherein, The network interface is used to establish a communication connection between the processor and other external devices; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the low voltage differential signal delay calibration method as described in any one of claims 1-13.
16. A non-volatile computer storage medium, It is characterized in that The computer storage medium stores computer executable instructions, which are executed by one or more processors, so that the one or more processors can execute the low voltage differential signal delay calibration method as described in any one of claims 1 to 13.
