A method and system for analog-to-digital conversion data acquisition based on LVDS
By generating a local data reception clock and input delay calibration in a programmable logic device, the problem of excessive high-speed differential signal links caused by in-circuit clocks and frame synchronization signals in the prior art is solved. Stable data sampling and determination of data word boundaries are achieved, reducing wiring and resource consumption, and reducing the pressure on high-speed clock logic.
Patent Information
- Application Number
- CN202611426277.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-15
- Publication Date
- 2026-11-17
AI Technical Summary
Existing source-synchronous LVDS data acquisition methods require the transmission of on-path clock and frame synchronization signals, resulting in a large number of high-speed differential signal links. Furthermore, omitting these signals makes it difficult to determine stable data sampling timing and data word boundaries.
The system uses a programmable logic device to provide a master reference clock, generates a local data reception clock, and utilizes a predetermined ratio between the serial data bit rate and the master reference clock, combined with input delay calibration and data feature identification, to determine data word boundaries, thereby reducing dependence on the accompanying clock and frame synchronization signal.
It achieves stable determination of data sampling timing and data word boundaries without relying on the accompanying clock and frame synchronization signal, reducing the differential signal resource occupation of PCB routing and programmable logic devices, and reducing the switching activities and timing convergence pressure of high-speed clock logic.
Smart Images

Figure CN123122547A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of high-speed data acquisition technology, and in particular to an analog-to-digital conversion data acquisition method and system based on LVDS. Background Technology
[0002] In high-speed, multi-channel data acquisition scenarios such as X-ray flat panel detectors and industrial non-destructive testing, analog front-end acquisition chips are typically used to perform analog-to-digital conversion on multiple analog signals, and then transmit the converted data to programmable logic devices such as FPGAs for further processing. For these acquisition chips, to improve the serial data transmission rate and ensure that the receiving end can acquire data at the appropriate sampling time, an LVDS interface is usually used for data transmission.
[0003] In existing source-synchronous LVDS data transmission methods, in addition to outputting serial data through LVDS differential data lines, the acquisition chip typically also outputs a corresponding LVDS clock line to accompany the serial data. The receiving end samples the serial data based on this clock line. Some acquisition chips also have independent frame synchronization signals to assist the receiving end in determining data word boundaries or frame boundaries. Therefore, data, clock, and frame synchronization signal links need to be simultaneously established between the acquisition chip and the programmable logic device.
[0004] In high-density acquisition systems, the additional accompanying clock and frame synchronization differential links consume PCB routing space, connector pins, and differential input resources of programmable logic devices, increasing routing and timing constraints for high-speed differential signals. These problems are exacerbated, especially when multiple acquisition channels or chips are used. Furthermore, omitting the accompanying clock signal can lead to phase discrepancies between the locally generated data reception clock and the data output from the acquisition chip; omitting the frame synchronization signal also requires the received data itself to determine data word boundaries or data organization positions. Therefore, there is still room for improvement in establishing reliable data reception timing, determining stable sampling positions, and completing data word alignment without relying on the accompanying clock and frame synchronization signals output by the acquisition chip. Summary of the Invention
[0005] This application provides an analog-to-digital conversion data acquisition method and system based on LVDS, which at least solves the problems of existing source-synchronous LVDS data acquisition methods requiring the transmission of on-path clock and frame synchronization signals, resulting in a large number of high-speed differential signal links, and the difficulty in determining stable data sampling timing and data word boundaries after omitting the above signals.
[0006] To achieve the above objectives, the first aspect of this application provides an LVDS-based analog-to-digital conversion data acquisition method, comprising: a programmable logic device providing a master reference clock to an acquisition chip with analog-to-digital conversion function; the acquisition chip outputting serial data through an LVDS differential data output terminal based on the master reference clock; the acquisition chip further comprising an LVDS accompanying clock output terminal and an LVDS frame synchronization output terminal; no accompanying clock signal channel is provided between the LVDS accompanying clock output terminal and the programmable logic device; no frame synchronization signal channel is provided between the LVDS frame synchronization output terminal and the programmable logic device; and the bit rate of the serial data has a predetermined ratio to the frequency of the master reference clock. The programmable logic device generates a local data receiving clock based on the master reference clock and a predetermined ratio. During the calibration phase, the input delay of the serial data is adjusted, and the delayed serial data is sampled using the local data receiving clock. The target input delay is determined based on the identification results of predetermined data features in the sampled data. During the data acquisition phase, the serial sampled data output by the acquisition chip is delayed according to the target input delay. The delayed serial sampled data is received using the local data receiving clock. The data word boundaries are determined based on the predetermined data features in the received serial sampled data, and the analog-to-digital conversion data is extracted based on the data word boundaries.
[0007] In one implementation, the input delay is adjusted according to a first adjustment step size, and predetermined data features are identified under each candidate input delay. A coarse localization interval is determined based on the identification results. Within the coarse localization interval, the input delay is adjusted according to a second adjustment step size smaller than the first adjustment step size, and a first boundary and a second boundary of the stable sampling interval are determined based on the identification results of the predetermined data features. Further, a target input delay is determined based on the median value between the input delay corresponding to the first boundary and the input delay corresponding to the second boundary.
[0008] In one implementation, the serially sampled data is organized into data words, each data word including analog-to-digital conversion data and an alignment vector, and the predetermined data features include at least one of the following: a data sequence start identifier and cyclic redundancy check information in the alignment vector.
[0009] In one implementation, serial sampling data is converted from serial to parallel to obtain parallel data with a bit width of one bit in each reception cycle. The bit width of the data word is three times the bit width of the first bit. The parallel data obtained in the two reception cycles prior to the current reception cycle is stored using a historical data buffer. A phase counter with three cyclic counting states is set up, and the counting state of the phase counter is updated when parallel data is obtained. A sliding data window is formed based on the current parallel data and historical parallel data. An alignment vector is identified in the sliding data window, and the data word boundary is determined by combining the identified position of the alignment vector and the counting state of the phase counter.
[0010] In one implementation, the first bit width is 8 bits, the storage width of the historical data buffer is 16 bits, the serial sampling data is organized in 24-bit data words, each 24-bit data word includes 16 bits of analog-to-digital conversion data and an 8-bit alignment vector, and the phase counter counts cyclically in 0, 1 and 2.
[0011] In one implementation, after determining the candidate recognition position of the alignment vector, the alignment vector is detected at the corresponding position of multiple subsequent sliding data windows. When the detection result meets the preset stability condition, the alignment position is locked. Based on the locked alignment position and the counting state of the phase counter, the current parallel data and historical parallel data are selected, shifted, and reassembled. The formed alignment data word is latched to the subsequent logic within one local data receiving clock cycle after the shifting and reassembly are completed. If the detection result in the locked state does not meet the preset locking condition, the alignment vector recognition is re-executed.
[0012] In one implementation, the programmable logic device uses each valid sampling edge of the local data receive clock to sample the corresponding data bits in the serial data, and changes the phase position of the serial data relative to the valid sampling edge by adjusting the input delay, without having to use a high-frequency oversampling method relative to the serial data bit rate to sample the same data bit multiple times.
[0013] In one implementation, multiple acquisition chips are connected in parallel. A programmable logic device provides the same master reference clock to the multiple acquisition chips. Each acquisition chip outputs serial data through a corresponding LVDS differential data link. The programmable logic device performs input delay calibration on each LVDS differential data link and determines the corresponding target input delay.
[0014] A second aspect of this application provides an LVDS-based analog-to-digital (ADC) data acquisition system, comprising an acquisition chip with ADC functionality and a programmable logic device (PLD). The acquisition chip has an LVDS differential data output terminal, an LVDS in-circuit clock output terminal, and an LVDS frame synchronization output terminal. Only the LVDS differential data output terminal establishes a differential signal channel with the PLD for receiving serial data; the LVDS in-circuit clock output terminal and the LVDS frame synchronization output terminal do not establish corresponding signal channels with the PLD. The PLD is used to execute the aforementioned ADC data acquisition method, determine data word boundaries based on predetermined data characteristics in the received serial sampled data, and extract ADC data based on the data word boundaries.
[0015] The above technical solution has the following advantages compared to the existing technology: By providing a master reference clock to the acquisition chip through a programmable logic device (PLD), and generating a local data receiving clock within the PLD using a predetermined ratio between the serial data bit rate and the master reference clock frequency, the accompanying clock and frame synchronization signal output by the acquisition chip do not need to be transmitted to the PLD through a separate differential signal link. Simultaneously, by calibrating the input delay of the serial data according to predetermined data characteristics in the received data, phase deviations introduced by the actual data transmission link and the device's internal timing can be compensated, ensuring that the sampling time corresponding to the local data receiving clock is within a stable sampling range. Therefore, while stably receiving analog-to-digital converted data, the required LVDS differential signal link between the acquisition chip and the PLD can be reduced, thus lowering the PCB routing, connector pin requirements, and differential input resource requirements of the PLD.
[0016] The above technical solution also has the following advantages: By employing different adjustment step sizes to perform phased calibration of the input delay, both calibration range and calibration accuracy can be balanced. By saving only the historical parallel data from the first two reception cycles and combining it with the current parallel data to form a sliding data window covering a data word, the historical data buffer width can be controlled while maintaining the ability to search for cross-cycle data boundaries. By jointly determining the data word boundary through cyclic phase counting and alignment vector identification, and performing data selection and reassembly according to the determined position after locking, unnecessary selection and comparison logic can be reduced. By matching the effective sampling edge of the local data reception clock with the data bit output timing, without relying on high-frequency oversampling, the switching activity of high-speed clock logic can be reduced and the high-frequency timing convergence pressure can be decreased. In multi-acquisition chip scenarios, sharing the main reference clock and performing input delay calibration separately for each LVDS data link can adapt to the independent propagation delay of different links. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of an existing source-synchronous LVDS data acquisition architecture; Figure 2 This is a schematic diagram of the structure of an analog-to-digital conversion data acquisition system based on LVDS provided in an embodiment of this application; Figure 3 A schematic diagram of the overall flow of an analog-to-digital conversion data acquisition method based on LVDS provided in an embodiment of this application; Figure 4 This is a schematic flowchart of an input delay calibration method provided in an embodiment of this application; Figure 5 This is a schematic diagram of a data sliding alignment structure provided in an embodiment of this application. Detailed Implementation
[0018] The technical solution of this application will be further described below with reference to the accompanying drawings. It should be noted that the following embodiments are used to illustrate the technical solution of this application, and are not intended to limit the scope of protection of this application. Unless otherwise specified, the various embodiments of this application and the technical features within them can be combined with each other.
[0019] The acquisition chip described in this application can be an analog front-end acquisition chip or an analog-to-digital converter chip with analog-to-digital conversion function and capable of outputting serial data through an LVDS interface; the programmable logic device can be a logic device such as an FPGA capable of performing clock generation, data sampling, data alignment, and calibration control. The following explanation uses data acquisition between a multi-channel analog front-end acquisition chip and an FPGA in an X-ray flat panel detector as an example.
[0020] The master reference clock described in this application is used to establish the data transmission timing basis of the acquisition chip; the local data reception clock is a reception clock generated locally by the programmable logic device based on the master reference clock and a predetermined proportional relationship between the serial data bit rate and the master reference clock frequency. In this embodiment, the local data reception clock is not obtained by extracting the embedded clock from the serial LVDS data stream, but is generated based on the master reference clock associated with the transmission timing of the acquisition chip, and the phase deviation between the data transmission timing and the local data reception timing is compensated by adjusting the input delay of the serial data reception path.
[0021] like Figure 1 As shown, in a conventional source-synchronous LVDS data acquisition architecture, the programmable logic device (PLD) provides the master reference clock (MCLK) to the acquisition chip. The acquisition chip outputs serial sampled data to the PLD via an LVDS differential data link and outputs a corresponding LVDS clock via an independent LVDS clock link. It can also output a frame synchronization signal via an independent LVDS frame synchronization link. The PLD samples the serial data based on the clock and can use the frame synchronization signal to help determine data word boundaries or data organization positions.
[0022] like Figure 2As shown, an embodiment of this application provides a data acquisition system including an acquisition chip and a programmable logic device (PLD). The acquisition chip has an LVDS differential data output terminal, an LVDS in-circuit clock output terminal, and an LVDS frame synchronization output terminal. The LVDS differential data output terminal is connected to the PLD; no in-circuit clock signal channel is provided between the LVDS in-circuit clock output terminal and the PLD; no frame synchronization signal channel is provided between the LVDS frame synchronization output terminal and the PLD. The acquisition chip can still generate DOUT, DCLK, and FCLK according to its existing data transmission timing and data output format, but in this embodiment, data reception only establishes the DOUT differential data channel, without utilizing DCLK or FCLK as data sampling or data positioning input for the PLD.
[0023] The programmable logic device may include a master reference clock, a clock generation unit, a programmable input delay unit, a data sampling unit, and a calibration control unit. The master reference clock is output to the acquisition chip and also provided to the clock generation unit. The clock generation unit generates a local data receiving clock based on the master reference clock and a predetermined ratio. The programmable input delay unit is located in the DOUT serial data receiving path and is used to delay the serial data according to the input delay. The data sampling unit samples the delayed serial data using the local data receiving clock. The calibration control unit adjusts the input delay of the programmable input delay unit based on predetermined data feature identification results in the data sampling results.
[0024] Therefore, this embodiment does not require transmitting the DCLK and FCLK generated by the acquisition chip to the programmable logic device. It can establish a stable data reception timing using the master reference clock, local data reception clock, and input delay calibration, and complete data word positioning using the alignment information carried by the serial data itself.
[0025] like Figure 3 As shown, an embodiment of this application provides an analog-to-digital conversion data acquisition method that may include steps S100 to S400.
[0026] Step S100: Provide the master reference clock and acquire the serial data output by the acquisition chip.
[0027] Specifically, the programmable logic device (PLD) provides the master reference clock (MCLK) to the acquisition chip with analog-to-digital conversion (ADC) functionality. The acquisition chip uses the master reference clock to generate a serial data transmission timing sequence and outputs the serial data through the LVDS differential data output terminal. The acquisition chip also has an LVDS accompanying clock output terminal and an LVDS frame synchronization output terminal, but neither of these output terminals establishes a corresponding signal channel with the PLD.
[0028] The serial data bit rate has a predetermined ratio to the frequency of the master reference clock. This predetermined ratio can be selected according to the data output configuration of the acquisition chip. In one specific embodiment of the AFE2256, the ratio of the MCLK frequency to the DOUT data bit rate can be configured by software to be 1:24, 1:12, 1:6, or 1:3. The acquisition chip internally forms the DOUT data transmission timing according to the clock relationship corresponding to the selected configuration. The effective sampling edge of DCLK corresponds to the DOUT data bit output timing; FCLK has a predetermined frequency relationship with DCLK, but the data reception in this application does not use DCLK or FCLK.
[0029] In one specific implementation, the acquisition chip can be a multi-channel analog front-end acquisition chip for X-ray flat panel detectors, such as the AFE2256. The acquisition chip has multiple ADCs, each responsible for a corresponding set of analog input channels. ADC conversion and LVDS serial output can be executed according to a preset timing pipeline within the acquisition chip. The converted analog-to-digital data is output via the LVDS differential data output terminal in a predetermined output order. The channel affiliation of the ADCs and the position of the data in the output sequence can be represented by the corresponding alignment information in the data words, allowing the programmable logic device to complete subsequent data organization.
[0030] In one specific data organization method of the AFE2256, serial sampling data is organized into 24-bit data words, where D[23:8] is 16-bit analog-to-digital conversion data and D[7:0] is an 8-bit alignment vector. The alignment vector may include a data sequence start identifier representing the start position of the corresponding ADC data sequence, bank selection information, timing parameter selection information, and cyclic redundancy check (CRC) information. The programmable logic device can use the data sequence start identifier to complete data positioning and combine it with the CRC information to determine whether the current link reception status is stable. The data organization form of the above 24-bit data words is independent of the specific proportional relationship between the MCLK frequency and the DOUT data bit rate, and is not limited to one 24-bit data word per MCLK cycle.
[0031] Step S200: Generate a local data receiving clock based on the master reference clock and a predetermined ratio.
[0032] Specifically, the clock generation unit of the programmable logic device generates a local data receiving clock that matches the serial data receiving rate, based on the master reference clock and a predetermined ratio between the serial data bit rate and the master reference clock frequency. The clock generation unit can be implemented using a PLL or other clock management resources within the programmable logic device.
[0033] Both the data transmission clock path inside the acquisition chip and the local data reception clock path inside the programmable logic device may introduce fixed or slowly varying phase deviations. Furthermore, LVDS data may experience propagation delays after passing through the chip output path, package, PCB traces, connectors, and the programmable logic device input path. Therefore, this application does not require the data transmission clock inside the acquisition chip and the local data reception clock to be physically in phase. Instead, it uses subsequent input delay calibration to ensure that the effective sampling edge of the local data reception clock is at a suitable timing position for sampling.
[0034] In one specific implementation, the programmable logic device samples the corresponding data bits in the serial data using each valid sampling edge of the local data receive clock, without using a sampling clock with a frequency higher than the serial data bit rate to sample the same data bit multiple times. Therefore, it eliminates the need to rely on high-frequency oversampling to obtain the data phase. Instead, it adjusts the phase position of the serial data relative to the valid sampling edges by adjusting the input delay, which helps reduce the operating frequency and switching activity of high-speed clock logic and decreases the timing convergence pressure of high-frequency logic.
[0035] Step S300: Adjust the input delay and determine the target input delay based on predetermined data characteristics.
[0036] Specifically, during the calibration phase, the programmable logic device adjusts the input delay of the LVDS serial data receiving path and samples the delayed serial data using the local data receiving clock. Predetermined data characteristics in the sampled data are identified, and based on the identification results, it is determined whether the sampling state corresponding to the current input delay is suitable for data reception, thereby determining the target input delay.
[0037] The predetermined data features may include at least one of the following: identification information used to characterize the start position of the data sequence in the alignment vector, and cyclic redundancy check information. For example, the current sampling state and data positioning state can be determined based on whether the start identifier of the data sequence can be stably identified at the expected data organization position, and the stability of the link reception can be determined by combining the CRC check result.
[0038] like Figure 4 As shown, a specific input delay calibration process in step S300 may include steps S301 to S305.
[0039] Step S301: Scan candidate input delays according to the first adjustment step size. When the system powers on or needs recalibration, the programmable logic device can first sample the LVDS serial data using the initial input delay; if the data feature identification result that meets the preset requirements cannot be obtained based on the current input delay, the input delay is changed according to the first adjustment step size, and data sampling and predetermined data feature identification are repeated under different candidate input delays. The first adjustment step size can be set to a relatively large adjustment step size to quickly traverse the adjustable input delay range.
[0040] Step S302: Determine the coarse localization interval based on the recognition results of the predetermined data features. For each candidate input delay during the coarse scanning process, the corresponding predetermined data feature recognition results can be recorded, and the refinement search range containing the candidate input delays that meet the preset requirements can be determined based on the recognition results corresponding to each candidate input delay. This refinement search range is then used as the coarse localization interval.
[0041] Step S303: Scan the candidate input delay within the coarse positioning interval using a second adjustment step size. The second adjustment step size is smaller than the first adjustment step size. After determining the coarse positioning interval using the first adjustment step size, a smaller second adjustment step size is used within the coarse positioning interval for a refined scan. This can reduce the full-range point-by-point scanning time while improving the accuracy of determining the boundary of the stable sampling interval.
[0042] Step S304: Determine the first boundary and the second boundary based on the recognition result of the predetermined data features. As the input delay changes within the coarse positioning interval, the boundaries on both sides of the stable sampling interval can be determined based on whether the predetermined data features meet the stable recognition requirements, and these boundaries are respectively used as the first boundary and the second boundary. The stable sampling interval can be understood as: the delay range within which the predetermined data features can be stably identified according to predetermined criteria when the input delay takes a value within this range.
[0043] Step S305: Determine the target input delay based on the first boundary and the second boundary. For example, the midpoint between the input delay corresponding to the first boundary and the input delay corresponding to the second boundary can be determined as the target input delay, so that the target sampling position has a timing margin relative to both boundaries of the stable sampling interval.
[0044] In one FPGA implementation, LVDS serial data can first undergo delay adjustment via IDELAY or hardware resources with equivalent input delay adjustment capabilities, and then be converted from serial to parallel by ISERDES or a serial-to-parallel conversion module with equivalent functionality. Input delay calibration is used to adjust the phase position of the serial data relative to the effective sampling edge of the local data receive clock, while the data word boundary is further determined by the following sliding data alignment structure.
[0045] like Figure 5As shown, in a specific data sliding alignment implementation, the serial-to-parallel conversion unit outputs 8 bits of parallel data in each reception cycle. A 16-bit historical data buffer is set up to store the 8 bits of parallel data obtained in the two reception cycles preceding the current reception cycle. The 8 bits of parallel data obtained in the current reception cycle and the 16 bits of historical parallel data together form a 24-bit sliding data window, which includes three 8-bit regions: historical data 1, historical data 2, and current data. Thus, by storing only the data from the previous two reception cycles, a 24-bit data window covering three consecutive reception cycles can be formed in the current reception cycle.
[0046] Simultaneously, a phase counter (phase cnt) is set and updated cyclically according to 0, 1, and 2 to identify the received phase corresponding to three consecutive reception cycles. The alignment vector identification unit performs a sliding search within a 24-bit sliding data window to determine candidate identification positions for the 8-bit alignment vector. Combining these candidate identification positions with the current phase counter's counting state, the boundary relationship between the 24-bit data word and the consecutive 8 bits of parallel data can be determined.
[0047] After determining the candidate recognition position, the alignment vector at the corresponding position can continue to be detected in multiple subsequent sliding data windows. When the alignment vector continuously meets the preset stability condition at the candidate recognition position, the alignment position locking unit locks that position. In the locked state, alignment vector detection can be performed only for the locked position to reduce repeated full-window searches; when the continuous or cumulative detection results no longer meet the preset locking condition, the lock is released and the sliding search is re-executed.
[0048] The data selection and shift / reassemble unit selects corresponding data from historical data in the 16-bit historical data buffer and the 8-bit parallel data obtained in the current reception cycle based on the locked alignment position and the phase counter's count state. It then performs shifting and reassembly to form an aligned 24-bit data word. The reassembled 24-bit data word can be latched into subsequent logic within one local data reception clock cycle after the shifting and reassembly are completed. Through the combined operation of the historical data buffer, cyclic phase counter, and locked position, the buffer width and data selection range can be controlled while covering cross-cycle data word boundaries. This helps reduce the need for registers, multiplexers (MUX), and related combinational logic resources, while maintaining pipelined data output. In this embodiment, since the width of the 24-bit data word is three times the width of the 8-bit parallel data obtained in each reception cycle, by saving the 16-bit historical data corresponding to the previous two reception cycles and combining this 16-bit historical data with the 8-bit parallel data obtained in the current reception cycle, a data window covering a complete 24-bit data word can be formed without needing to save a wider range of historical data for data boundary searches. Simultaneously, by recording the cyclic phase relationship between the three reception cycles using a phase counter, the phase state can be used to characterize the candidate cycle position of the current parallel data within the data word. Therefore, after locking the alignment position, data selection, shifting, and reassembly can be completed from a limited data range based on the alignment position and the phase count state. This helps reduce historical data buffer resources and the size of combinational logic required for data selection, lowers the timing convergence pressure of the data alignment logic, and enables the reassembled 24-bit data word to be latched into subsequent logic within one local data reception clock cycle.
[0049] Step S400: Receive serial sampled data based on the target input delay and the local data receiving clock. After determining the target input delay during the calibration phase, the programmable logic device controls the programmable input delay unit to delay the serial sampled data output by the acquisition chip according to the target input delay. The local data receiving clock is then used to sample and perform serial-to-parallel conversion on the delayed serial sampled data. Data word boundaries are determined based on predetermined data characteristics in the received serial sampled data, and data alignment and analog-to-digital conversion data extraction are performed based on the data word boundaries.
[0050] During the data acquisition phase, information such as the start identifier of the data sequence and the CRC check result in the alignment vector can be continuously or periodically detected to determine the data alignment status and data correctness. When the continuous or cumulative detection results of the alignment vector at the locked position do not meet the preset locking conditions, or the CRC check result does not meet the preset requirements, the sliding data window search can be re-executed. If it is further determined that the sampling timing may be offset, the input delay calibration corresponding to step S300 can be re-executed to redetermine the target input delay.
[0051] In some implementations, environmental parameters characterizing the operating state of the data transmission link can also be acquired, and the initial value of the input delay or the calibration search range can be determined based on these environmental parameters. Environmental parameters may include, for example, temperature. The target input delay obtained from previous calibrations under different temperature conditions can be recorded, establishing a correspondence between temperature and target input delay to form a training table. Upon subsequent power-on or recalibration, the training table can be queried based on the current temperature, and the corresponding historical target input delay or its nearest neighbor value can be used as the initial calibration value to reduce the search range. The target input delay obtained during recalibration can also be stored in relation to the current temperature to update the training table.
[0052] In multi-acquisition chip applications, multiple acquisition chips can be connected in parallel, with a programmable logic device (PLD) providing the same master reference clock to all chips. Each acquisition chip outputs serial data to the PLD through a corresponding set of LVDS differential data links, while the DCLK and FCLK of each acquisition chip do not establish corresponding differential signal channels to the PLD. Since the PCB paths, packages, and input paths of different LVDS data links may have different propagation delays, the PLD sets corresponding programmable input delays for each LVDS differential data link and performs independent calibration to obtain the target input delay for each link. Therefore, timing differences between data links can be compensated separately even when multiple acquisition chips share the same master reference clock.
[0053] This application can be applied to data transmission between multi-channel analog front-end acquisition chips and FPGAs in X-ray flat panel detectors. It can also be used in other acquisition scenarios where serial analog-to-digital conversion data transmission is performed using an LVDS interface, and the data transmission rate of the acquisition chip can establish a predetermined relationship with the master reference clock. For rotating gantry detectors, small-sized detectors, and high-density arrays with multiple acquisition chips in parallel, reducing the DCLK and FCLK differential links can further reduce the occupation of high-speed differential signal lines, connector pins, and differential input resources of programmable logic devices.
[0054] correspond Figure 2 In programmable logic devices, the clock generation unit, programmable input delay unit, data sampling unit, and calibration control unit can be implemented using FPGA internal hardware resources, configurable logic resources, and combinations thereof. Figure 5 The serial-to-parallel conversion unit, historical data cache, phase counter, alignment vector identification unit, alignment position locking unit, data selection and shift reassembly unit, and data word latch structure can also be implemented by the logic and storage resources inside the FPGA.
[0055] Those skilled in the art will understand that, without departing from the technical concept of this application, the generation method of the local data receiving clock, the granularity of the input delay adjustment, the specific fields of the alignment vector, the width of the historical data buffer, and the data alignment implementation method can be adapted according to the data format of the acquisition chip, the serial output rate, the input delay resources of the programmable logic device, and the system timing requirements. All of the above modifications can be used to implement a technical solution that establishes local receiving timing based on the master reference clock, determines a stable sampling position through input delay calibration, and completes data word alignment based on the received data itself.
Claims
1. A method for acquiring analog-to-digital conversion data based on LVDS, characterized in that, include: A programmable logic device provides a master reference clock to a data acquisition chip with analog-to-digital conversion function. The data acquisition chip outputs serial data through an LVDS differential data output terminal based on the master reference clock. The data acquisition chip also has an LVDS in-circuit clock output terminal and an LVDS frame synchronization output terminal. There is no in-circuit clock signal channel between the LVDS in-circuit clock output terminal and the programmable logic device, and there is no frame synchronization signal channel between the LVDS frame synchronization output terminal and the programmable logic device. The bit rate of the serial data has a predetermined proportional relationship with the frequency of the master reference clock. The programmable logic device generates a local data receiving clock based on the master reference clock and the predetermined ratio; During the calibration phase, the input delay of the serial data is adjusted, the delayed serial data is sampled using the local data receiving clock, and the target input delay is determined based on the identification results of predetermined data features in the sampled data. During the data acquisition phase, the serial sampling data output by the acquisition chip is delayed according to the target input delay, and the delayed serial sampling data is received using the local data receiving clock. The data word boundary is determined according to the predetermined data characteristics in the received serial sampling data, and the analog-to-digital conversion data is extracted according to the data word boundary.
2. The analog-to-digital conversion data acquisition method based on LVDS according to claim 1, characterized in that, Determining the target input delay includes: The input delay is adjusted according to the first adjustment step size, and the predetermined data features are identified under each candidate input delay. The coarse positioning interval is determined based on the identification results. Within the coarse positioning interval, the input delay is adjusted by a second adjustment step size smaller than the first adjustment step size, and the first and second boundaries of the stable sampling interval are determined based on the identification results of the predetermined data features. The target input delay is determined based on the median value between the input delay corresponding to the first boundary and the input delay corresponding to the second boundary.
3. The analog-to-digital conversion data acquisition method based on LVDS according to claim 1, characterized in that, The serial sampling data is organized according to data words, and each data word includes analog-to-digital conversion data and an alignment vector; The predetermined data features include at least one of the data sequence start identifier and cyclic redundancy check information in the alignment vector; Data alignment of the serially sampled data includes: The serial sampled data is converted from serial to parallel to obtain parallel data with a bit width of one bit in each receiving cycle. The bit width of the data word is three times the bit width of the first bit width. The parallel data obtained in the two receiving cycles before the current receiving cycle is stored using a historical data buffer. Set up a phase counter with three cyclic counting states, and update the counting state of the phase counter when the parallel data is obtained; A sliding data window is formed based on the parallel data obtained in the current receiving cycle and the parallel data in the historical data cache, and the alignment vector is identified in the sliding data window; The data word boundary is determined based on the identification position of the alignment vector and the counting state of the phase counter, and the alignment position corresponding to the data word boundary is determined.
4. The LVDS-based analog-to-digital conversion data acquisition method according to claim 3, characterized in that, The first bit width is 8 bits, the storage width of the historical data cache is 16 bits, the data word is 24 bits, and the 24-bit data word includes 16 bits of analog-to-digital conversion data and an 8-bit alignment vector; The phase counter has three cyclic counting states: 0, 1, and 2.
5. The LVDS-based analog-to-digital conversion data acquisition method according to claim 4, characterized in that, After determining the candidate recognition position of the alignment vector, the alignment vector at the position corresponding to the candidate recognition position is detected in multiple subsequent sliding data windows; When the detection result of the alignment vector meets the preset stability condition, the candidate recognition position is locked as the alignment position; After locking the alignment position, the alignment vector in the subsequent data words is detected according to the alignment position, and the recognition of the alignment vector is re-executed if the detection result does not meet the preset locking condition.
6. The analog-to-digital conversion data acquisition method based on LVDS according to claim 5, characterized in that, Based on the locked alignment position and the counting state of the phase counter, corresponding data is selected from the parallel data in the historical data buffer and the parallel data obtained in the current receiving cycle, and the selected data is shifted and reassembled to form an aligned 24-bit data word. The aligned 24-bit data word is latched into the subsequent logic within one local data receive clock cycle after the shift and reassembly are completed.
7. The LVDS-based analog-to-digital conversion data acquisition method according to claim 1, characterized in that, The programmable logic device uses each valid sampling edge of the local data receiving clock to sample the corresponding data bits in the serial data, and changes the phase position of the serial data relative to the valid sampling edge by adjusting the input delay.
8. The analog-to-digital conversion data acquisition method based on LVDS according to claim 1, characterized in that, The number of acquisition chips is multiple, and the multiple acquisition chips are connected in parallel. The programmable logic device provides the same master reference clock to the multiple acquisition chips, and each acquisition chip outputs serial data to the programmable logic device through a corresponding LVDS differential data link. The programmable logic device performs input delay calibration on each of the LVDS differential data links and determines the target input delay corresponding to each of the LVDS differential data links.
9. A data acquisition system for analog-to-digital conversion based on LVDS, characterized in that, This includes data acquisition chips with analog-to-digital conversion capabilities and programmable logic devices; The acquisition chip has an LVDS differential data output terminal, an LVDS in-circuit clock output terminal, and an LVDS frame synchronization output terminal. The LVDS differential data output terminal is connected to the programmable logic device. There is no in-circuit clock signal channel between the LVDS in-circuit clock output terminal and the programmable logic device, and there is no frame synchronization signal channel between the LVDS frame synchronization output terminal and the programmable logic device. The programmable logic device is used to provide a master reference clock to the acquisition chip, and the acquisition chip is used to output serial data through the LVDS differential data output terminal based on the master reference clock. The bit rate of the serial data has a predetermined proportional relationship with the frequency of the master reference clock. The programmable logic device is further configured to generate a local data receiving clock based on the master reference clock and the predetermined ratio, adjust the input delay of the serial data during the calibration phase, sample the delayed serial data using the local data receiving clock, determine the target input delay based on the identification result of predetermined data features in the sampled data, and delay the serial sampled data output by the acquisition chip according to the target input delay during the data acquisition phase, receive the delayed serial sampled data using the local data receiving clock, determine the data word boundary based on the predetermined data features in the received serial sampled data, and extract analog-to-digital conversion data based on the data word boundary.
10. The LVDS-based analog-to-digital conversion data acquisition system according to claim 9, characterized in that, The system includes multiple acquisition chips connected in parallel. Each acquisition chip receives the same master reference clock provided by the programmable logic device and is connected to the programmable logic device through a corresponding LVDS differential data link. The programmable logic device includes a programmable input delay unit corresponding to each of the LVDS differential data links, and is configured to perform input delay calibration on each of the LVDS differential data links to determine the target input delay corresponding to each of the LVDS differential data links.
