Calibration circuit, method and chip for calibrating ADC (Analog to Digital Converter) conversion result
By using a real-time asynchronous calibration circuit and a combinational logic circuit in the ADC conversion result calibration, the problem of low ADC conversion speed in the existing technology is solved, and high-precision and high-rate conversion result calibration is achieved.
Patent Information
- Application Number
- CN202410982502.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-10-11
AI Technical Summary
The existing calibration technology of ADC conversion results requires clock domain synchronization, resulting in low conversion speed and difficulty in balancing conversion accuracy and speed.
A calibration circuit and method are designed. The digital calibration unit performs real-time asynchronous calibration operations on the initial conversion results of the ADC. Combinational logic circuits and storage units are used to optimize the operation delay cycle, avoid clock domain synchronization, and increase the conversion rate.
While ensuring the ADC conversion accuracy, it significantly increases the conversion rate, reduces synchronization time, and increases the sampling rate.
Smart Images

Figure CN118764026A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of analog-to-digital converters, and in particular to a calibration circuit, method and chip for calibrating ADC conversion results. Background Art
[0002] ADC (Analog-to-Digital Converter) is a key component widely used in electronic systems. Its function is to convert analog signals into digital signals. It is widely used in image processing, information storage, wireless communication and other fields. In recent years, with the rapid development of electronic technology, the requirements for the conversion speed and conversion accuracy of ADC have become increasingly higher. However, due to the influence of the manufacturing process and the external environment, the accuracy of the conversion result of ADC has a certain deviation. At present, digital calibration technology can be used to calibrate the conversion result of ADC to effectively improve the conversion accuracy of ADC. However, in order to avoid causing metastable state, the existing digital calibration technology needs to synchronize the clock domain to which the ADC belongs and the clock domain to which the digital calibration unit belongs after the ADC outputs the conversion result, and then the calibration operation can be used to calibrate the conversion result of the ADC to obtain the final conversion result of the ADC, which leads to a low conversion speed of the ADC. Therefore, a calibration scheme that can balance the conversion accuracy and conversion rate is urgently needed. Summary of the invention
[0003] In order to solve the problems in the related art, the embodiments of the present disclosure provide a calibration circuit, method and chip for calibrating ADC conversion results.
[0004] In a first aspect, an embodiment of the present disclosure provides a calibration circuit for calibrating an ADC conversion result, the calibration circuit comprising: The ADC is configured to perform analog-to-digital conversion on the input data when receiving the input data to be converted, and output an initial conversion result from a conversion signal output port of the ADC; The digital calibration unit is connected to the conversion signal output port of the ADC and is configured to perform a real-time calibration operation on the initial conversion result output by the ADC to obtain a calibrated conversion result.
[0005] In a possible implementation, the digital calibration unit includes a combinational logic circuit.
[0006] In a possible implementation, the digital calibration unit includes: The first operator unit is configured to intercept the first bit width y1 and the second bit width y2 from the initial conversion result y, and calculate x1 according to the following formula: x1=round(ya* y1*y2), and the bits of y1 and y2 in y do not overlap; The second operator unit is configured to calculate x2 based on x1 according to the following formula: x2=round(x1*b); The third operator unit is configured to calculate the calibrated conversion result dig_adc_dout based on x2 according to the following formula: dig_adc_dout=round(x2+c); The round function is used to round a number to a given number of digits, and a, b, and c are predetermined operation parameters.
[0007] In a possible implementation, it further includes a detection unit and a sampling circuit; The detection unit is configured to detect the digital calibration clock cycle in which the falling edge of the high pulse signal output by the DRDY port of the ADC is located; The sampling circuit is connected to the detection unit and the digital calibration unit, and is configured to start sampling the calibrated conversion result after a predetermined period of the digital calibration clock period detected by the detection unit.
[0008] In a possible implementation, it further includes a storage unit; The storage unit is configured to pre-store the number of operation delay cycles of the digital calibration unit; The sampling circuit is connected to the storage unit and is configured to start sampling the calibrated conversion result after n cycles of the digital calibration clock detected by the detection unit, where n is the number of operation delay cycles of the digital calibration unit minus 2.
[0009] In a possible implementation, the storage unit includes a register or an on-chip memory.
[0010] In a second aspect, an embodiment of the present disclosure provides a method for calibrating an ADC conversion result, the method being applied to the above-mentioned calibration circuit, the method comprising: When receiving input data to be converted, the ADC performs analog-to-digital conversion on the input data and outputs an initial conversion result; The digital calibration unit performs real-time calibration calculation on the initial conversion result output by the ADC to obtain a calibrated conversion result.
[0011] In a possible implementation manner, the digital calibration unit performs a real-time calibration operation on the initial conversion result output by the ADC to obtain a calibrated conversion result, including: Extract the first bit width y1 and the second bit width y2 from the initial conversion result y, and calculate x1 according to the following formula: x1=round(ya*y1*y2), the bits of y1 and y2 in y do not overlap; Based on x1, x2 is calculated according to the following formula: x2=round(x1*b); Based on x2, the calibrated conversion result dig_adc_dout is calculated according to the following formula: dig_adc_dout=round(x2+c); The round function is used to round a number to a given number of digits, and a, b, and c are predetermined operation parameters.
[0012] In a possible implementation, the method further includes: Detecting the digital calibration clock cycle in which the falling edge of the high pulse signal output by the DRDY port of the ADC is located; beginning sampling the calibrated conversion results after a predetermined period of the detected digital calibration clock period; Preferably, starting to sample the calibrated conversion result after a predetermined period of the detected digital calibration clock period comprises: The calibrated conversion result is sampled after n cycles of the detected digital calibration clock cycle, where n is the number of pre-stored operation delay cycles of the digital calibration unit minus 2.
[0013] In a third aspect, a chip is provided in an embodiment of the present disclosure, wherein the chip comprises a calibration circuit as described in any one of the first aspect.
[0014] According to the technical solution provided by the embodiment of the present disclosure, the digital calibration unit does not care when the high level of ADC_DRDY is output, but performs real-time operation on the signal output by the conversion signal output port ADC_DOUT of the ADC. When the conversion signal output port ADC_DOUT of the ADC stably outputs the initial conversion result, the operation result of the digital calibration unit, that is, the calibrated conversion result dig_adc_dout, will also be stably output. In this way, the digital calibration unit can start asynchronous calibration operation immediately upon receiving the initial conversion result output by the port ADC_DOUT, and no longer perform clock domain synchronization, thereby saving synchronization time, and improving the conversion rate while ensuring the conversion accuracy of the ADC.
[0015] In addition, the technical solution provided by the embodiment of the present disclosure can introduce a storage unit to flexibly configure the operation delay period of the digital calibration unit, so that the sampling circuit can timely sample the calibrated conversion result based on the operation delay period, and the sampling rate is faster.
[0016] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Other features, objectives and advantages of the present disclosure will become more apparent through the following detailed description of non-limiting embodiments in conjunction with the accompanying drawings.
[0018] Figure 1A A schematic diagram of signal timing in an ADC according to an embodiment of the present disclosure is shown.
[0019] Figure 1B A circuit schematic diagram of the existing synchronous digital calibration is shown.
[0020] Figure 1C A schematic diagram of signal synchronization timing in an existing digital calibration circuit is shown.
[0021] Figure 2 A schematic diagram of a calibration circuit for calibrating an ADC conversion result according to an embodiment of the present disclosure is shown.
[0022] Figure 3 A structural block diagram of a digital calibration unit according to an embodiment of the present disclosure is shown.
[0023] Figure 4A A timing diagram of an asynchronous calibration operation according to an embodiment of the present disclosure is shown.
[0024] Figure 4B A timing diagram showing another asynchronous calibration operation according to an embodiment of the present disclosure is shown.
[0025] Figure 4C A timing diagram showing yet another asynchronous calibration operation according to an embodiment of the present disclosure is shown.
[0026] Figure 5 A flow chart showing a method for calibrating an ADC conversion result according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0027] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for the sake of clarity, parts not related to the description of the exemplary embodiments are omitted in the accompanying drawings.
[0028] In the present disclosure, it should be understood that terms such as "include" or "have" are intended to indicate the presence of features, numbers, steps, behaviors, components, parts, or a combination thereof disclosed in the present specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or a combination thereof exist or are added.
[0029] It should also be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0030] Figure 1A FIG. 2 shows a schematic diagram of signal timing in an ADC according to an embodiment of the present disclosure. Figure 1A As shown in the figure, ADC_CLK is the clock signal of the ADC. The clock signal is a periodic square wave. Each cycle is divided into two states: high level and low level. Each clock cycle in ADC_CLK can be recorded as ADC_CLK cycle. When the ADC conversion is completed, Figure 1A As shown, the signal ADC_DRDY output by the port ADC_DRDY will generate a high pulse signal of two or more clock cycles, such as Figure 1A As shown in the figure, the high pulse signal in the signal ADC_DRDY is a high pulse signal of two ADC_CLK cycles. The initial conversion result ADC_DOUT output by the port ADC_DOUT will be updated at the rising edge of the first ADC_CLK cycle after the signal ADC_DRDY becomes a high pulse signal, and will maintain a stable output until the ADC receives a new conversion request, and then a new round of conversion and output will be performed. Figure 1A As shown, at the falling edge of the signal ADC_DRDY, the corresponding Figure 1A After the rising edge of the fourth ADC_CLK cycle, the initial conversion result ADC_DOUT output by the port ADC_DOUT has stabilized and remains unchanged, and the initial conversion result can be digitally calibrated.
[0031] At present, most digital calibration algorithms use synchronous calculation schemes. Figure 1B A schematic diagram of a conventional synchronous digital calibration circuit is shown. Figure 1BAs shown, the ADC ports ADC_DRDY and ADC_DOUT are connected to a synchronous digital calibration unit. When the clock signal dig_clk of the synchronous digital calibration unit detects the falling edge of ADC_DRDY output by the port ADC_DRDY, it can start to digitally calibrate the initial conversion result ADC_DOUT output by the port ADC_DOUT. However, the two signals ADC_DRDY and ADC_DOUT belong to the ADC_CLK clock domain, and the synchronous digital calibration unit belongs to the dig_clk clock domain. The frequencies and phases of the two clocks are uncertain (usually the clock frequency of dig_clk is higher than or equal to ADC_CLK). If signals in different clock domains are directly sampled, metastability may occur, causing the circuit to produce unexpected results. Therefore, in order to avoid the propagation of metastable states, the synchronous digital calibration unit needs to synchronize the signal ADC_DRDY to the dig_clk clock domain before calibrating the initial conversion result (the pulse width of the high pulse signal in the signal ADC_DRDY is greater than dig_clk, which can ensure that dig_clk can definitely sample the high level of the signal ADC_DRDY); the commonly used synchronization methods are Figure 1B The two levels of register synchronization shown. Figure 1C FIG. 4 shows a schematic diagram of signal synchronization timing in an existing digital calibration circuit. Figure 1C As shown, the signal after the ADC_DRDY signal is transferred to the dig_clk clock domain through the first-level register is dig_drdy_sync1, and the signal after the ADC_DRDY signal is synchronized to the dig_clk clock domain through the two-level register is dig_drdy_sync2. The synchronized signal dig_drdy_sync2 belongs to the dig_clk clock domain. In this way, Figure 1B As shown, the calibration algorithm of the synchronous digital calibration unit can perform digital calibration on the received initial conversion result after detecting the falling edge of dig_drdy_sync2.
[0032] The ADC calibration algorithm is implemented by complex addition, subtraction, multiplication and division logic operations. In the above synchronous operation, when the clock frequency of dig_clk is relatively high, the operation cannot be completed in one cycle. In order to meet the timing requirements of the synchronous circuit, the entire operation needs to be completed step by step, one step per clock cycle. In this way, a conversion result may require several clock cycles to complete the calibration operation. Usually, if Figure 1C As shown, the calibration algorithm requires 3 dig_clk cycles ( Figure 1C), it should be noted that, in order to meet the most stringent process conditions, 3 cycles are added with sufficient delay margin when implementing digital circuits, which means that some delay has to be wasted under certain good process conditions. The prior art requires synchronous calibration operation at the beginning of the falling edge of dig_drdy_sync2. When the calibration is completed and the calibrated conversion result is output stably, i.e., dig_adc_dout, the time from the port ADC_DOUT to the stable output of the initial conversion result has been delayed by nearly 6 dig_clk cycles (e.g. Figure 1C 1-6 dig_clk cycles as shown).
[0033] For ADC, the sampling rate is determined by the time interval between two conversions. The shorter the interval, the higher the sampling rate. Figure 1C For ADC, the next conversion can only be started after the stable output of dig_adc_dout, so the completion time of the digital calibration operation will affect the sampling rate of the ADC. Low-speed ADCs do not require high sampling rates, and the existing digital synchronous calibration is a reliable method. However, for high-speed ADCs with sampling rates as high as 1~2MSPS, adding 6 dig_clk cycles will seriously affect the sampling rate.
[0034] In order to solve the above problems, the present disclosure provides a method for calibrating the ADC conversion result, which can ignore the clock frequencies of ADC_CLK and dig_clk and the asynchronous relationship between the clocks. The digital calibration unit can perform real-time asynchronous calibration operations on the signal output by the port ADC_DOUT. When the port ADC_DOUT stably outputs the initial conversion result, the calibrated conversion result dig_adc_dout of the digital calibration unit will also be stably output.
[0035] Figure 2 FIG. 1 is a schematic diagram showing a calibration circuit for calibrating an ADC conversion result according to an embodiment of the present disclosure. Figure 2 As shown, the calibration circuit includes an ADC 201 and a digital calibration unit 202 .
[0036] The ADC refers to a device that converts a continuous variable analog signal into a discrete digital signal. The ADC 201 in this embodiment can be any ADC that needs to be calibrated for the conversion result. When receiving input data to be converted, the ADC 201 can perform analog-to-digital conversion on the input data (i.e., the input analog signal) and output an initial conversion result (i.e., the converted digital signal). The initial conversion result of the ADC 201 can be output from the conversion signal output port ADCDOUT of the ADC 201.
[0037] like Figure 2 As shown, the digital calibration unit 202 is connected to the conversion signal output port ADC_DOUT of the ADC 201, and can perform real-time calibration on the signal ADC_DOUT output by the conversion signal output port ADC_DOUT. In this way, when the conversion signal output port ADC_DOUT of the ADC 201 outputs the initial conversion result, the initial conversion result output by the ADC 201 can be calibrated in real time to obtain the calibrated conversion result dig_adc_dout.
[0038] In this implementation, the digital calibration unit does not care when the high level of ADC_DRDY is output, but performs real-time calculations on the signal output from the conversion signal output port ADC_DOUT of the ADC. When the conversion signal output port ADC_DOUT of the ADC stably outputs the initial conversion result, the calculation result of the digital calibration unit, that is, the calibrated conversion result dig_adc_dout, will also be stably output. In this way, the digital calibration unit can start asynchronous calibration calculations immediately upon receiving the initial conversion result output from the port ADC_DOUT, and no longer perform clock domain synchronization, thereby saving synchronization time, and improving the conversion rate while ensuring the conversion accuracy of the ADC.
[0039] In a possible implementation, the digital calibration unit includes a combinational logic circuit.
[0040] In this embodiment, the digital calibration unit can be implemented as a sequential logic circuit or a combinational logic circuit. The delay of the sequential logic must be less than one clock cycle. If it is greater than one clock cycle, a register must be inserted in the middle of the operation path. Assuming that the delay is greater than one clock cycle, the digital calibration unit can be implemented as a sequential logic circuit or a combinational logic circuit. Figure 1C The operation delay when performing the synchronous calibration operation is shown as 3 dig_clk cycles; therefore, the digital calibration unit used in this embodiment can be implemented by combinational logic, so that there is no need to insert a register check timing between each clock cycle, and the actual operation delay will be less than 3 cycles, which can further reduce the operation delay.
[0041] In this implementation, the combinational logic circuit is composed of gate circuits, and its characteristic is that the output of the combinational logic circuit is related to the input at that moment, so that a real-time calibration operation can be performed on the initial conversion result output by ADC_DOUT.
[0042] In a possible implementation, the digital calibration unit includes: The first operator unit is configured to intercept y1 and y2 of different bit widths from the initial conversion result y, and calculate x1 according to the following formula: x1=round(ya* y1*y2); The second operator unit is configured to calculate x2 based on x1 according to the following formula: x2=round(x1*b); The third operator unit is configured to calculate the calibrated conversion result dig_adc_dout based on x2 according to the following formula: dig_adc_dout=round(x2+c).
[0043] In this embodiment, Figure 3 A structural block diagram of a digital calibration unit according to an embodiment of the present disclosure is shown. Figure 3 As shown, the digital calibration unit includes a first operator unit, a second operator unit and a third operator unit. The round function used in each operator unit is used to round the number to a given number of digits; a, b, c are predetermined operation parameters, which can be pre-stored in an on-chip memory to ensure that they are not lost during power failure.
[0044] In this implementation, the bit width of y1 and y2 can be arbitrary and is not limited here. y1 and y2 have different bit positions in y. For example, assuming that y is 16-bit data, 0-6 bits can be truncated as y1, and 8-14 bits can be truncated as y2.
[0045] In this implementation, operations such as addition, subtraction, multiplication, and division in each operator unit in the digital calibration unit can be implemented through gate circuits, so that the digital calibration unit can be implemented as a combinational logic circuit.
[0046] It should be noted here that Figure 3 The digital calibration unit shown is only an example implementation. The digital calibration unit can also be implemented as other forms of combinational logic circuits, as long as it is a combinational logic circuit that can calibrate the initial conversion result of the ADC, and there is no limitation here.
[0047] In a possible implementation, the calibration circuit further includes a detection unit and a sampling circuit; The detection unit is configured to detect the digital calibration clock cycle in which the falling edge of the high pulse signal output by the DRDY port of the ADC is located; The sampling circuit is connected to the detection unit and the digital calibration unit, and is configured to start sampling the calibrated conversion result after a predetermined period of the digital calibration clock period detected by the detection unit.
[0048] In this embodiment, the calibration circuit further includes a detection unit, which can detect the digital calibration clock cycle where the falling edge of the high pulse signal output by the DRDY port of the ADC, that is, the port ADC_DRDY, is located. The high pulse signal output by the port ADC_DRDY has two ADC_CLK cycles, so the digital calibration clock cycle where the falling edge of the high pulse signal output by the port ADC_DRDY is located can be determined as the second dig_clk cycle for real-time calibration operation of the initial conversion result. Under normal circumstances, the operation delay of the combinational logic will be less than 3 dig_clk cycles, that is, after the third dig_clk cycle, the calibrated conversion result dig_adc_dout can be stably output, so the calibrated conversion result can be sampled after 1 cycle of the digital calibration clock cycle. Of course, if the operation delay of the combinational logic is 4 dig_clk cycles, the calibrated conversion result can be sampled after 2 cycles of the digital calibration clock cycle.
[0049] For example, Figure 4A A timing diagram of an asynchronous calibration operation according to an embodiment of the present disclosure is shown. Figure 4A As shown, it is assumed that the operation delay of the digital calibration unit for asynchronous calibration operation is less than 3 dig_clk cycles (i.e., Figure 4A The 1-3 dig_clk cycles shown in the figure can complete the asynchronous calibration operation). Figure 4A The falling edge of the high pulse signal output by port ADC_DRDY is detected in the second dig_clk cycle, so that the calibrated conversion result dig_adc_dout can be stably output one cycle after the second dig_clk cycle, that is, after the third dig_clk cycle, and the sampling circuit can start sampling the calibrated conversion result from the rising edge of the fourth dig_clk cycle. Figure 1C In the synchronous calibration scheme shown, the stable output of the calibrated conversion result dig_adc_dout is advanced by at least 3 dig_clk cycles, which is crucial to improving the sampling rate of high-speed ADC.
[0050] Due to the uncertainty of the phase relationship between the two asynchronous clocks ADC_CLK and dig_clk, when the port ADC_DOUT stably outputs the initial conversion result, the first dig_clk cycle of dig_clk may have just begun or may be about to end. Figure 4A As shown, the above sampling circuit has no problem sampling in the third dig_clk cycle, but Figure 4B A timing diagram of another asynchronous calibration operation according to an embodiment of the present disclosure is shown. Figure 4BAs shown, if the first dig_clk cycle of dig_clk is about to end when the port ADC_DOUT stably outputs the initial conversion result, it cannot be guaranteed that the asynchronous calibration operation will be completed before the end of the third dig_clk cycle. In order to solve this problem, in a possible implementation, the calibration circuit further includes a storage unit; The storage unit is configured to pre-store the number of operation delay cycles of the digital calibration unit; The sampling circuit is connected to the storage unit and is configured to start sampling the calibrated conversion result after n cycles of the digital calibration clock detected by the detection unit, where n is the number of operation delay cycles of the digital calibration unit minus 2.
[0051] In this implementation, the R&D personnel can pre-test and determine the number of operation delay cycles of the digital calibration unit, and store it in a pre-stored storage unit, such as Figure 4B As shown, the R&D personnel can test that the asynchronous calibration operation is not completed in the third clk_dig cycle, but is completed in the fourth clk_dig cycle. At this time, the number of operation delay cycles of the digital calibration unit in the storage unit can be recorded as 4 through parameter configuration, and the detection unit can be Figure 4B The falling edge of the high pulse signal output by port ADC_DRDY is detected in the second dig_clk cycle, so it is determined that the calibrated conversion result dig_adc_dout can be stably output after the fourth dig_clk cycle. The sampling circuit can start sampling the calibrated conversion result from the rising edge of the fifth dig_clk, which is still 2 dig_clk cycles ahead of the synchronous calibration algorithm.
[0052] Another advantage of introducing a storage unit to configure the number of operation delay cycles of the digital calibration unit is that if the chip works under good process conditions, the operation delay of the digital calibration unit can be reduced, and the number of operation delay cycles can be flexibly configured. For example, Figure 4C A timing diagram of another asynchronous calibration operation according to an embodiment of the present disclosure is shown. Figure 4C As shown in Figure 2, under good process conditions, the operation delay of the digital calibration unit is less than 2 cycles, as shown in Figure 2. Figure 4C As shown, the detection unit detects that the digital calibration clock cycle where the falling edge of the high pulse signal output from the DRDY port of the ADC is located is the second dig_clk cycle. At this time, the calibrated conversion result can be sampled directly from after the second dig_clk cycle, that is, the sampling circuit can start sampling the calibrated conversion result from the rising edge of the third dig_clk cycle, which is 4 dig_clk cycles earlier than the synchronous calibration algorithm, and the sampling rate is faster.
[0053] In a possible implementation, the storage unit includes a register or an on-chip memory, and the number of operation delay cycles stored in the register can be written into the register through an external instruction.
[0054] The present disclosure also provides a method for calibrating an ADC conversion result. Figure 5 A flow chart of a method for calibrating an ADC conversion result according to an embodiment of the present disclosure is shown, as shown in FIG. Figure 5 As shown, the method includes steps S501-S502: In step S501, when the ADC receives input data to be converted, it performs analog-to-digital conversion on the input data and outputs an initial conversion result; In step S502, the digital calibration unit performs a real-time calibration operation on the initial conversion result output by the ADC to obtain a calibrated conversion result.
[0055] ADC refers to a device that converts a continuous variable analog signal into a discrete digital signal. The ADC in this embodiment can be any ADC that needs to be calibrated for the conversion result. When receiving input data to be converted, the ADC can perform analog-to-digital conversion on the input data (i.e., the input analog signal) and output an initial conversion result (i.e., the converted digital signal). The initial conversion result of the ADC can be output from the conversion signal output port ADC_DOUT of the ADC.
[0056] like Figure 2 As shown, the digital calibration unit is connected to the conversion signal output port ADC_DOUT of the ADC, and can perform real-time calibration on the signal ADC_DOUT output by the conversion signal output port ADC_DOUT. In this way, when the conversion signal output port ADC_DOUT of the ADC outputs the initial conversion result, the initial conversion result output by the ADC can be calibrated in real time to obtain the calibrated conversion result dig_adc_dout.
[0057] In this implementation, the digital calibration unit does not care when the high level of ADC_DRDY is output, but performs real-time calculations on the signal output from the conversion signal output port ADC_DOUT of the ADC. When the conversion signal output port ADC_DOUT of the ADC stably outputs the initial conversion result, the calculation result of the digital calibration unit, that is, the calibrated conversion result dig_adc_dout, will also be stably output. In this way, the digital calibration unit can start asynchronous calibration calculations immediately upon receiving the initial conversion result output from the port ADC_DOUT, and no longer perform clock domain synchronization, thereby saving synchronization time, and improving the conversion rate while ensuring the conversion accuracy of the ADC.
[0058] In a possible implementation manner, the digital calibration unit performs a real-time calibration operation on the initial conversion result output by the ADC to obtain a calibrated conversion result, including: Extract the first bit width y1 and the second bit width y2 from the initial conversion result y, and calculate x1 according to the following formula: x1=round(ya*y1*y2), the bits of y1 and y2 in y do not overlap; Based on x1, x2 is calculated according to the following formula: x2=round(x1*b); Based on x2, the calibrated conversion result dig_adc_dout is calculated according to the following formula: dig_adc_dout=round(x2+c); The round function is used to round a number to a given number of digits, and a, b, and c are predetermined operation parameters.
[0059] In this implementation, the bit width of y1 and y2 can be arbitrary and is not limited here. y1 and y2 have different bit positions in y. For example, assuming that y is 16-bit data, 0-6 bits can be truncated as y1, and 8-14 bits can be truncated as y2.
[0060] In a possible implementation, the method further includes: Detecting the digital calibration clock cycle in which the falling edge of the high pulse signal output by the DRDY port of the ADC is located; Sampling of the calibrated conversion results begins after a predetermined period of the digital calibration clock period detected by the detection unit.
[0061] In this embodiment, the falling edge of the high pulse signal output by the DRDY port of the ADC, that is, the digital calibration clock cycle where the falling edge of the high pulse signal output by the port ADC_DRDY is located can be detected. The high pulse signal output by the port ADC_DRDY has two ADC_CLK cycles, so the dig_clk cycle where the falling edge of the high pulse signal output by the port ADC_DRDY is located can be determined as the second dig_clk cycle for real-time calibration operation of the initial conversion result. Under normal circumstances, the operation delay of the combinational logic will be less than 3 dig_clk cycles, that is, after the third dig_clk cycle, the calibrated conversion result dig_adc_dout can be stably output, so the sampling of the calibrated conversion result can be started after 1 cycle of the digital calibration clock cycle. Of course, if the operation delay of the combinational logic is usually 4 dig_clk cycles, the sampling of the calibrated conversion result can be started after 2 cycles of the detected digital calibration clock cycle.
[0062] For example, Figure 4AA timing diagram of an asynchronous calibration operation according to an embodiment of the present disclosure is shown. Figure 4A As shown, it is assumed that the operation delay of the digital calibration unit for asynchronous calibration operation is less than 3 dig_clk cycles (i.e., Figure 4A The 1-3 dig_clk cycles shown in the figure can complete the asynchronous calibration operation). Figure 4A The falling edge of the high pulse signal output by port ADC_DRDY is detected in the second dig_clk cycle, so that the calibrated conversion result dig_adc_dout can be stably output one cycle after the second dig_clk cycle, that is, after the third dig_clk cycle, and the calibrated conversion result can be sampled from the rising edge of the fourth dig_clk cycle. Figure 1C In the synchronous calibration scheme shown, the stable output of the calibrated conversion result dig_adc_dout is advanced by at least 3 dig_clk cycles, which is crucial to improving the sampling rate of high-speed ADC.
[0063] Due to the uncertainty of the phase relationship between the two asynchronous clocks ADC_CLK and dig_clk, when the port ADC_DOUT stably outputs the initial conversion result, the first dig_clk cycle may have just begun or may be about to end. Figure 4A As shown in the figure, there is no problem with sampling in the third dig_clk cycle, but when the port ADC_DOUT stably outputs the initial conversion result, the first dig_clk cycle is almost over, as shown in the figure. Figure 4B As shown, it cannot be guaranteed that the asynchronous calibration operation is completed before the end of the third dig_clk cycle. In order to solve this problem, preferably, in a possible implementation, the sampling of the calibrated conversion result after a predetermined period of the detected digital calibration clock cycle includes: The calibrated conversion result is sampled after n cycles of the detected digital calibration clock cycle, where n is the number of pre-stored operation delay cycles of the digital calibration unit minus 2.
[0064] Researchers can pre-test and determine the number of operation delay cycles of the digital calibration unit, and store it in a pre-stored storage unit, such as Figure 4B As shown, the R&D personnel can test that the asynchronous calibration operation is not completed in the third clk_dig cycle, but is completed in the fourth clk_dig cycle. At this time, the number of operation delay cycles of the digital calibration unit in the storage unit can be recorded as 4 through parameter configuration, and the detection unit can be Figure 4BThe falling edge of the high pulse signal output by port ADC_DRDY is detected in the second dig_clk cycle, so it is determined that the calibrated conversion result dig_adc_dout can be stably output after the fourth dig_clk cycle. The sampling circuit can start sampling the calibrated conversion result from the rising edge of the fifth dig_clk, which is still 2 dig_clk cycles ahead of the synchronous calibration algorithm.
[0065] Another advantage of introducing a storage unit to configure the number of operation delay cycles of the digital calibration unit is that if the chip works under good process conditions, the operation delay of the digital calibration unit can be less, and the number of operation delay cycles can be flexibly configured. For example, under good process conditions, the operation delay of the digital calibration unit is less than 2 cycles, such as Figure 4C As shown, the detection unit detects that the digital calibration clock cycle where the falling edge of the high pulse signal output from the DRDY port of the ADC is located is the second dig_clk cycle. At this time, the calibrated conversion result can be sampled directly from after the second dig_clk cycle, that is, the sampling circuit can start sampling the calibrated conversion result from the rising edge of the third dig_clk cycle, which is 4 dig_clk cycles earlier than the synchronous calibration algorithm, and the sampling rate is faster.
[0066] An embodiment of the present disclosure also provides a chip, which includes the above-mentioned calibration circuit for calibrating the ADC conversion result. The chip can be any chip that can implement a calibration circuit for calibrating the ADC conversion result. The calibration circuit can be implemented as part or all of the chip through software, hardware, or a combination of both.
[0067] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.
Claims
1. A calibration circuit for calibrating a conversion result of an analog-to-digital converter ADC, characterized in that: The calibration circuit comprises: The ADC is configured to perform analog-to-digital conversion on the input data when receiving the input data to be converted, and output an initial conversion result from a conversion signal output port of the ADC; The digital calibration unit is connected to the conversion signal output port of the ADC and is configured to perform a real-time calibration operation on the initial conversion result output by the ADC to obtain a calibrated conversion result.
2. The calibration circuit according to claim 1, characterized in that: The digital calibration unit includes a combinational logic circuit.
3. The calibration circuit according to claim 2, characterized in that: The digital calibration unit comprises: The first operator unit is configured to intercept the first bit width y1 and the second bit width y2 from the initial conversion result y, and calculate x1 according to the following formula: x1=round(ya* y1*y2), and the bits of y1 and y2 in y do not overlap; The second operator unit is configured to calculate x2 based on x1 according to the following formula: x2=round(x1*b); The third operator unit is configured to calculate the calibrated conversion result dig_adc_dout based on x2 according to the following formula: dig_adc_dout=round(x2+c); The round function is used to round a number to a given number of digits, and a, b, and c are predetermined operation parameters.
4. The calibration circuit according to claim 2, characterized in that: Also includes a detection unit and a sampling circuit; The detection unit is configured to detect the digital calibration clock cycle in which the falling edge of the high pulse signal output by the DRDY port of the ADC is located; The sampling circuit is connected to the detection unit and the digital calibration unit, and is configured to start sampling the calibrated conversion result of the digital calibration unit after a predetermined period of the digital calibration clock period detected by the detection unit.
5. The calibration circuit according to claim 4, characterized in that: Also includes a storage unit; The storage unit is configured to pre-store the number of operation delay cycles of the digital calibration unit; The sampling circuit is connected to the storage unit and is configured to start sampling the calibrated conversion result after n cycles of the digital calibration clock detected by the detection unit, where n is the number of operation delay cycles of the digital calibration unit minus 2.
6. The calibration circuit according to claim 5, characterized in that: The storage unit includes a register or an on-chip memory.
7. A method for calibrating an analog-to-digital converter ADC conversion result, characterized in that: The method is applied to the calibration circuit according to any one of claims 1 to 6, and the method comprises: When receiving input data to be converted, the ADC performs analog-to-digital conversion on the input data and outputs an initial conversion result; The digital calibration unit performs real-time calibration calculation on the initial conversion result output by the ADC to obtain a calibrated conversion result.
8. The method according to claim 7, characterized in that The digital calibration unit performs a real-time calibration operation on the initial conversion result output by the ADC to obtain a calibrated conversion result, including: Extract the first bit width y1 and the second bit width y2 from the initial conversion result y, and calculate x1 according to the following formula: x1=round(ya*y1*y2), the bits of y1 and y2 in y do not overlap; Based on x1, x2 is calculated according to the following formula: x2=round(x1*b); Based on x2, the calibrated conversion result dig_adc_dout is calculated according to the following formula: dig_adc_dout=round(x2+c); The round function is used to round a number to a given number of digits, and a, b, and c are predetermined operation parameters.
9. The method according to claim 7, characterized in that: The method further comprises: Detecting the digital calibration clock cycle in which the falling edge of the high pulse signal output by the DRDY port of the ADC is located; beginning sampling the calibrated conversion results after a predetermined period of the detected digital calibration clock period; Preferably, starting to sample the calibrated conversion result after a predetermined period of the detected digital calibration clock period comprises: The calibrated conversion result is sampled after n cycles of the detected digital calibration clock cycle, where n is the number of pre-stored operation delay cycles of the digital calibration unit minus 2.
10. A chip, characterized in that: The chip comprises the calibration circuit as claimed in any one of claims 1-6.
