Method and system for calibration of ring oscillator structure tdc

By comparing the state of the ring oscillator structure TDC and detecting its edges, the ring oscillation state is corrected, solving the problem of inaccurate time intervals caused by sampling errors and improving the accuracy and linearity of time measurement.

CN117724320BActive Publication Date: 2026-05-29SHANDONG TIANJU HUINENG MICROELECTRONICS CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG TIANJU HUINENG MICROELECTRONICS CO LTD
Filing Date
2024-01-25
Publication Date
2026-05-29

Smart Images

  • Figure CN117724320B_ABST
    Figure CN117724320B_ABST
Patent Text Reader

Abstract

The application relates to a correction method and system of a ring oscillator structure TDC, and relates to the technical field of time-to-digital conversion.The application is used to solve the problem that the sampling circuit of the existing ring oscillator structure TDC may be wrong when sampling the output changing delay unit, leading to inaccurate measured time interval.The application can eliminate the error caused by sampling the delay unit near the signal transmission edge by finding the boundary of the ring oscillator unit state change, i.e. the position of the signal transmission, and correcting the sampled ring oscillator state through logical judgment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of time-to-digital conversion technology, and particularly relates to the correction of time-to-digital converters. Background Technology

[0002] A time-to-digital converter (TDC) is a device that converts a time quantity into a digital quantity. It is primarily used for high-precision time measurement and has wide applications in many fields. Among them, the ring oscillator structure TDC is widely used, and its basic structure is as follows: Figure 2 As shown, it mainly consists of a ring oscillator, a ring counter, and a sampling circuit. The ring oscillator is composed of an odd number of inverters connected end-to-end, and has a certain oscillation period. The ring counter counts the ring oscillation period to obtain a coarse measurement time (coarse count value) and expands the range of TDC. The sampling circuit samples the output of each inverter in the ring oscillator when the Start and Stop signals arrive, and obtains a fine count value based on the sampling results. The sampling results should show mostly alternating 0 and 1 phases, with exactly two 0s or two 1s connected.

[0003] Let R st and R sp Let represent the fine count value corresponding to the delay unit state triggered by Start and Stop sampling, respectively; CNT is the coarse count value under this time interval; τ is the delay of the basic delay unit; T is the period of the ring oscillator; and ε is the measurement error. Then, the time interval ΔT to be measured satisfies the following formula:

[0004] ΔT=CNT×T+(R st -R sp )×τ+ε.

[0005] When the sampling circuit samples a delay unit where the output is changing, such as at the rising or falling edge, an error may occur. For example, the correct output might be 10…10010, but if an error occurs when sampling the second delay unit from the least significant bit to the most significant bit, the output becomes 10…10000, causing problems with R after decoding. st and R sp Error, the measured ΔT is inaccurate. Summary of the Invention

[0006] This invention addresses the problem that the sampling circuit of the existing ring oscillator structure TDC may produce errors when sampling the delay unit whose output is changing, resulting in inaccurate time intervals to be measured. A correction method and system for the ring oscillator structure TDC are provided.

[0007] This invention provides two calibration methods and two calibration system schemes:

[0008] The first method for correcting the TDC (Transmitted DC) ring oscillator structure includes the following steps:

[0009] Step 1: Perform a bitwise XOR operation between the actual ring vibration state signal ring and the initial ring vibration state signal ring_original to obtain the state comparison result ring_temp;

[0010] Step 2: Perform an XOR operation on the two adjacent bits in the state comparison result ring_temp to obtain the adjacent bit comparison result. Perform an XOR operation on the highest and lowest bits in the state comparison result ring_temp to obtain the first and last bit comparison result. Use the first and last bit comparison result as the lowest bit and combine it with the adjacent bit comparison result to form the flag signal.

[0011] Step 3: Shift the most significant bit of the flag signal to the least significant bit, and shift the remaining bits one bit to the higher bit to obtain the first shift result. Invert each bit of the first shift result, and perform a bitwise AND operation between the inverted result and the flag signal to obtain the flag_edge signal.

[0012] Step 4: Record the first bit of 1 in the flag_edge signal from low to high as num;

[0013] Step 5: According to the correction rules, iterate through each bit of the actual state signal ring to obtain the correction result ring_check of the ring oscillator structure TDC;

[0014] The correction rule is as follows:

[0015] When k > num, if ring_temp[k] ≠ ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged.

[0016] When k < num, if ring_temp[k] = ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged.

[0017] When k = num, ring[k] remains unchanged.

[0018] ring_temp[k] and ring_temp[num] represent the k-th and num-th signal values ​​in the state comparison result ring_temp, respectively, and ring[k] represents the k-th signal value in the actual state signal ring.

[0019] Furthermore, the aforementioned ring oscillator structure TDC includes a ring oscillator, a ring counter, and a sampling circuit;

[0020] The ring oscillator comprises N inverters connected end to end, where N is an odd number greater than 1;

[0021] The ring counter is used to count the ring oscillation period;

[0022] The sampling circuit is used to sample the output of each inverter in the ring oscillator and the output of the ring counter when the Start and Stop signals arrive.

[0023] Furthermore, the ring oscillator actual state signal 'ring' mentioned above is the ring oscillator output signal acquired by the sampling circuit when the Start and Stop signals arrive.

[0024] The second method for correcting the TDC (Transformer Direct Current) ring oscillator structure includes the following steps:

[0025] Step 1: Perform a bitwise XOR operation between the actual ring oscillation state signal ring collected by the sampling circuit when the Start and Stop signals arrive and the initial ring oscillation state signal ring_original to obtain the state comparison result ring_temp;

[0026] Step 2: Perform an XOR operation on the two adjacent bits in the state comparison result ring_temp to obtain the adjacent bit comparison result. Perform an XOR operation on the highest and lowest bits in the state comparison result ring_temp to obtain the first and last bit comparison result. Use the first and last bit comparison result as the highest bit and combine it with the adjacent bit comparison result to form the flag signal.

[0027] Step 3: Shift the most significant bit of the flag signal to the least significant bit, and shift the remaining bits one bit to the higher bit to obtain the first shift result. Shift the two most significant bits of the flag signal to the two least significant bits, and shift the remaining bits two bits to the higher bit to obtain the second shift result. Perform a bitwise AND operation between the first shift result and the second shift result to obtain the flag_edge signal.

[0028] Step 4: Record the first bit of 1 in the flag_edge signal from low to high as num;

[0029] Step 5: According to the correction rules, iterate through each bit of the actual state signal ring to obtain the correction result ring_check of the ring oscillator structure TDC;

[0030] The correction rule is as follows:

[0031] When k > num, if ring_temp[k] ≠ ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged.

[0032] When k < num, if ring_temp[k] = ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged.

[0033] When k = num, ring[k] remains unchanged.

[0034] ring_temp[k] and ring_temp[num] represent the k-th and num-th signal values ​​in the state comparison result ring_temp, respectively, and ring[k] represents the k-th signal value in the actual state signal ring.

[0035] Furthermore, the aforementioned ring oscillator structure TDC includes a ring oscillator, a ring counter, and a sampling circuit;

[0036] The ring oscillator comprises N inverters connected end to end, where N is an odd number greater than 1;

[0037] The ring counter is used to count the ring oscillation period;

[0038] The sampling circuit is used to sample the output of each inverter in the ring oscillator and the output of the ring counter when the Start and Stop signals arrive.

[0039] Furthermore, the ring oscillator actual state signal 'ring' mentioned above is the ring oscillator output signal acquired by the sampling circuit when the Start and Stop signals arrive.

[0040] The correction system for the first type of ring oscillator structure TDC includes the following units:

[0041] State comparison unit: It is used to perform a bitwise XOR operation on the actual state signal ring and the initial state signal ring_original to obtain the state comparison result ring_temp; it performs an XOR operation on two adjacent bits in the state comparison result ring_temp to obtain the adjacent bit comparison result; it performs an XOR operation on the highest and lowest bits in the state comparison result ring_temp to obtain the first and last bit comparison result; and it uses the first and last bit comparison result as the lowest bit and combines it with the adjacent bit comparison result to form the flag signal.

[0042] Edge detection unit: used to shift the most significant bit of the flag signal to the least significant bit and shift the remaining bits one bit to the higher bit to obtain the first shift result. Invert each bit of the first shift result and perform a bitwise AND operation with the flag signal to obtain the flag_edge signal.

[0043] Error correction unit: It is used to record the first bit of 1 in the flag_edge signal from low to high as num, and to traverse each bit of the actual state signal ring according to the correction rules to obtain the correction result ring_check of the ring oscillator structure TDC.

[0044] The correction rule is as follows:

[0045] When k > num, if ring_temp[k] ≠ ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged.

[0046] When k < num, if ring_temp[k] = ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged.

[0047] When k = num, ring[k] remains unchanged.

[0048] ring_temp[k] and ring_temp[num] represent the k-th and num-th signal values ​​in the state comparison result ring_temp, respectively, and ring[k] represents the k-th signal value in the actual state signal ring.

[0049] Furthermore, the aforementioned ring oscillator structure TDC includes a ring oscillator, a ring counter, and a sampling circuit;

[0050] The ring oscillator comprises N inverters connected end to end, where N is an odd number greater than 1;

[0051] The ring counter is used to count the ring oscillation period;

[0052] The sampling circuit is used to sample the output of each inverter in the ring oscillator and the output of the ring counter when the Start and Stop signals arrive.

[0053] Furthermore, the ring oscillator actual state signal 'ring' mentioned above is the ring oscillator output signal acquired by the sampling circuit when the Start and Stop signals arrive.

[0054] The correction system for the second type of ring oscillator structure TDC includes the following units:

[0055] State comparison unit: It is used to perform bit-by-bit XOR operation between the actual ring state signal ring collected by the sampling circuit when the Start and Stop signals arrive and the ring initial state signal ring_original to obtain the state comparison result ring_temp. It performs XOR operation on two adjacent bits in the state comparison result ring_temp to obtain the adjacent bit comparison result. It performs XOR operation on the highest bit and the lowest bit in the state comparison result ring_temp to obtain the first and last bit comparison result. The first and last bit comparison result is used as the highest bit and the adjacent bit comparison result to form the flag signal.

[0056] Edge detection unit: used to move the most significant bit of the flag signal to the least significant bit and move the remaining bits one bit to the higher bit to obtain the first shift result; move the two most significant bits of the flag signal to the two least significant bits and move the remaining bits two bits to the higher bit to obtain the second shift result; perform bitwise AND operation between the first shift result and the second shift result to obtain the flag_edge signal.

[0057] Error correction unit: It is used to record the first bit of 1 in the flag_edge signal from low to high as num, and to traverse each bit of the actual state signal ring according to the correction rule to obtain the correction result ring_check of the ring oscillator structure TDC.

[0058] The correction rule is as follows:

[0059] When k > num, if ring_temp[k] ≠ ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged.

[0060] When k < num, if ring_temp[k] = ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged.

[0061] When k = num, ring[k] remains unchanged.

[0062] ring_temp[k] and ring_temp[num] represent the k-th and num-th signal values ​​in the state comparison result ring_temp, respectively, and ring[k] represents the k-th signal value in the actual state signal ring.

[0063] Furthermore, the aforementioned ring oscillator structure TDC includes a ring oscillator, a ring counter, and a sampling circuit;

[0064] The ring oscillator comprises N inverters connected end to end, where N is an odd number greater than 1;

[0065] The ring counter is used to count the ring oscillation period;

[0066] The sampling circuit is used to sample the output of each inverter in the ring oscillator and the output of the ring counter when the Start and Stop signals arrive.

[0067] Furthermore, the ring oscillator actual state signal 'ring' mentioned above is the ring oscillator output signal acquired by the sampling circuit when the Start and Stop signals arrive.

[0068] This invention proposes a correction method and system for TDC (Time Delayed Circulator) structures of ring oscillators. By finding the boundary of the state change of the ring oscillator unit, i.e. the location where the signal is transmitted, and correcting the sampled ring oscillator state through logical judgment, the error caused by sampling the delay unit near the signal transmission edge can be eliminated. Attached Figure Description

[0069] Figure 1 This is a schematic diagram of the correction principle of the ring oscillator structure TDC;

[0070] Figure 2 This is a schematic diagram of the structure of a ring delay chain (TDC). Detailed Implementation

[0071] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0072] Specific implementation method one: as follows Figure 2 As shown, the ring oscillator structure TDC includes: a ring oscillator, a ring counter, and a sampling circuit. The ring oscillator comprises N inverters connected end-to-end, where N is an odd number greater than 1. The ring counter is used to count the ring oscillation periods. The sampling circuit samples the output of each inverter in the ring oscillator and the output of the ring counter when the Start and Stop signals arrive, obtaining the ring oscillation state representing fine timing and the counter value representing coarse timing, thereby measuring the time interval between the two signals. The ring oscillator output signal acquired by the sampling circuit when the Start and Stop signals arrive is the actual state signal `ring`.

[0073] Combination Figure 1 As shown in the principle, the calibration method for the ring oscillator structure TDC described in this embodiment includes the following steps:

[0074] Step 1: Perform a bitwise XOR operation between the actual ring vibration state signal ring and the initial ring vibration state signal ring_original to obtain the state comparison result ring_temp; the purpose is to identify whether there is a change between the actual ring vibration state signal ring and the initial ring vibration state signal ring_original.

[0075] Step 2: Perform an XOR operation on the two adjacent bits in the state comparison result ring_temp to obtain the adjacent bit comparison result. Perform an XOR operation on the highest and lowest bits in the state comparison result ring_temp to obtain the first and last bit comparison result. Use the first and last bit comparison result as the lowest bit and combine it with the adjacent bit comparison result to form the flag signal. The purpose is to identify whether the two adjacent bits in the state comparison result ring_temp are in the same state.

[0076] Step 3: Shift the most significant bit of the flag signal to the least significant bit, and shift the remaining bits one bit higher to obtain the first shift result. Invert each bit of the first shift result, and perform a bitwise AND operation between the inverted result and the flag signal to obtain the flag_edge signal. The purpose is to find the position of the flag's state change in the signal transmission direction.

[0077] Step 4: Record the first bit of 1 in the flag_edge signal from low to high as num;

[0078] Step 5: According to the correction rules, iterate through each bit of the actual state signal ring to obtain the correction result ring_check of the ring oscillator structure TDC.

[0079] The correction rule is as follows:

[0080] When k > num, if ring_temp[k] ≠ ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged.

[0081] When k < num, if ring_temp[k] = ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged.

[0082] When k = num, ring[k] remains unchanged.

[0083] ring_temp[k] and ring_temp[num] represent the k-th and num-th signal values ​​in the state comparison result ring_temp, respectively, and ring[k] represents the k-th signal value in the actual state signal ring.

[0084] Specific implementation method two: such as Figure 2 As shown, the ring oscillator structure TDC includes: a ring oscillator, a ring counter, and a sampling circuit. The ring oscillator comprises N inverters connected end-to-end, where N is an odd number greater than 1. The ring counter is used to count the ring oscillation periods. The sampling circuit samples the output of each inverter in the ring oscillator and the output of the ring counter when the Start and Stop signals arrive, obtaining the ring oscillation state representing fine timing and the counter value representing coarse timing, thereby measuring the time interval between the two signals. The ring oscillator output signal acquired by the sampling circuit when the Start and Stop signals arrive is the actual state signal `ring`.

[0085] Combination Figure 1 As shown in the principle, the calibration method for the ring oscillator structure TDC described in this embodiment includes the following steps:

[0086] Step 1: Perform a bitwise XOR operation between the actual ring oscillator state signal ring and the initial ring oscillator state signal ring_original, which are collected by the sampling circuit when the Start and Stop signals arrive, to obtain the state comparison result ring_temp; the purpose is to identify whether there is a change between the actual ring oscillator state signal ring and the initial ring oscillator state signal ring_original.

[0087] Step 2: Perform an XOR operation on the two adjacent bits in the state comparison result ring_temp to obtain the adjacent bit comparison result. Perform an XOR operation on the highest and lowest bits in the state comparison result ring_temp to obtain the first and last bit comparison result. Use the first and last bit comparison result as the highest bit and combine it with the adjacent bit comparison result to form the flag signal. The purpose is to identify whether the two adjacent bits in the state comparison result ring_temp are in the same state.

[0088] Step 3: Move the highest bit of the flag signal to the lowest bit, and move the remaining bits one bit to the higher bit to obtain the first shift result. Move the two highest bits of the flag signal to the two lowest bits, and move the remaining bits two bits to the higher bit to obtain the second shift result. Perform a bitwise AND operation between the first shift result and the second shift result to obtain the flag_edge signal. The purpose is to find the position of the flag's state change in the signal transmission direction.

[0089] Step 4: Record the first bit of 1 in the flag_edge signal from low to high as num;

[0090] Step 5: According to the correction rules, iterate through each bit of the actual state signal ring to obtain the correction result ring_check of the ring oscillator structure TDC.

[0091] The correction rule is as follows:

[0092] When k > num, if ring_temp[k] ≠ ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged.

[0093] When k < num, if ring_temp[k] = ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged.

[0094] When k = num, ring[k] remains unchanged.

[0095] ring_temp[k] and ring_temp[num] represent the k-th and num-th signal values ​​in the state comparison result ring_temp, respectively, and ring[k] represents the k-th signal value in the actual state signal ring.

[0096] Specific implementation method three: such as Figure 2 As shown, the ring oscillator structure TDC includes: a ring oscillator, a ring counter, and a sampling circuit. The ring oscillator comprises N inverters connected end-to-end, where N is an odd number greater than 1. The ring counter is used to count the ring oscillation periods. The sampling circuit samples the output of each inverter in the ring oscillator and the output of the ring counter when the Start and Stop signals arrive, obtaining the ring oscillation state representing fine timing and the counter value representing coarse timing, thereby measuring the time interval between the two signals. The ring oscillator output signal acquired by the sampling circuit when the Start and Stop signals arrive is the actual state signal `ring`.

[0097] Combination Figure 1 As shown in the principle, the correction system of the first ring oscillator structure TDC described in this embodiment includes the following units:

[0098] The state comparison unit is used to perform a bitwise XOR operation between the actual ring oscillation state signal `ring` and the initial ring oscillation state signal `ring_original` to obtain the state comparison result `ring_temp`; to perform an XOR operation on two adjacent bits in the state comparison result `ring_temp` to obtain the adjacent bit comparison result; to perform an XOR operation on the most significant bit and the least significant bit in the state comparison result `ring_temp` to obtain the first and last bit comparison result; and to combine the first and last bit comparison result as the least significant bit with the adjacent bit comparison result to form the flag signal. The purpose is to identify whether there is a change between the actual ring oscillation state signal `ring` and the initial ring oscillation state signal `ring_original`, and to identify whether two adjacent bits in the state comparison result `ring_temp` are in the same state.

[0099] Edge detection unit: It is used to shift the most significant bit of the flag signal to the least significant bit and shift the remaining bits one bit to the higher bit to obtain the first shift result. It inverts each bit of the first shift result and performs a bitwise AND operation with the flag signal to obtain the flag_edge signal. The purpose is to find the position of the state change of the flag in the signal transmission direction.

[0100] Error correction unit: It is used to record the first bit of 1 in the flag_edge signal from low to high as num, and to traverse each bit of the actual state signal ring according to the correction rules to obtain the correction result ring_check of the ring oscillator structure TDC.

[0101] The correction rule is as follows:

[0102] When k > num, if ring_temp[k] ≠ ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged.

[0103] When k < num, if ring_temp[k] = ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged.

[0104] When k = num, ring[k] remains unchanged.

[0105] ring_temp[k] and ring_temp[num] represent the k-th and num-th signal values ​​in the state comparison result ring_temp, respectively, and ring[k] represents the k-th signal value in the actual state signal ring.

[0106] Specific implementation method four: such as Figure 2 As shown, the ring oscillator structure TDC includes: a ring oscillator, a ring counter, and a sampling circuit. The ring oscillator comprises N inverters connected end-to-end, where N is an odd number greater than 1. The ring counter is used to count the ring oscillation periods. The sampling circuit samples the output of each inverter in the ring oscillator and the output of the ring counter when the Start and Stop signals arrive, obtaining the ring oscillation state representing fine timing and the counter value representing coarse timing, thereby measuring the time interval between the two signals. The ring oscillator output signal acquired by the sampling circuit when the Start and Stop signals arrive is the actual state signal `ring`.

[0107] Combination Figure 1 As shown in the principle, the correction system for the second type of ring oscillator structure TDC described in this embodiment includes the following units:

[0108] The state comparison unit is used to perform a bitwise XOR operation between the actual ring oscillator state signal `ring` (acquired by the sampling circuit when the Start and Stop signals arrive) and the initial ring oscillator state signal `ring_original` to obtain the state comparison result `ring_temp`. It then performs an XOR operation on two adjacent bits in `ring_temp` to obtain the adjacent bit comparison result, and finally performs an XOR operation on the most significant and least significant bits in `ring_temp` to obtain the first and last bit comparison result. This first and last bit comparison result is then combined with the adjacent bit comparison result to form the flag signal. The purpose is to identify whether there is a change between the actual ring oscillator state signal `ring` and the initial ring oscillator state signal `ring_original`, and to identify whether two adjacent bits in the state comparison result `ring_temp` are in the same state.

[0109] Edge detection unit: used to move the most significant bit of the flag signal to the least significant bit and move the remaining bits one bit to the higher bit to obtain the first shift result; move the two most significant bits of the flag signal to the two least significant bits and move the remaining bits two bits to the higher bit to obtain the second shift result; perform bitwise AND operation between the first shift result and the second shift result to obtain the flag_edge signal; the purpose is to find the position of the state change of the flag in the signal transmission direction.

[0110] Error correction unit: It is used to record the first bit of 1 in the flag_edge signal from low to high as num, and to traverse each bit of the actual state signal ring according to the correction rules to obtain the correction result ring_check of the ring oscillator structure TDC.

[0111] The correction rule is as follows:

[0112] When k > num, if ring_temp[k] ≠ ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged.

[0113] When k < num, if ring_temp[k] = ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged.

[0114] When k = num, ring[k] remains unchanged.

[0115] ring_temp[k] and ring_temp[num] represent the k-th and num-th signal values ​​in the state comparison result ring_temp, respectively, and ring[k] represents the k-th signal value in the actual state signal ring.

[0116] In summary, the present invention can eliminate the sampling error caused by the delay unit of the delay chain signal transmission edge by the latch, effectively eliminate the fine time measurement error caused by the sampling error of the latch, and improve the accuracy and linearity of TDC time measurement.

[0117] While the invention has been described herein with reference to specific embodiments, it should be understood that these embodiments are merely examples of the principles and applications of the invention. Therefore, it should be understood that many modifications can be made to the exemplary embodiments, and other arrangements can be designed without departing from the spirit and scope of the invention as defined by the appended claims. It should be understood that different dependent claims and features described herein can be combined in ways different from those described in the original claims. It is also understood that features described in conjunction with individual embodiments can be used in other described embodiments.

Claims

1. A calibration method for a ring oscillator structure TDC, characterized in that, Includes the following steps: Step 1: Perform a bitwise XOR operation between the actual ring vibration state signal ring and the initial ring vibration state signal ring_original to obtain the state comparison result ring_temp; Step 2: Perform an XOR operation on the two adjacent bits in the state comparison result ring_temp to obtain the adjacent bit comparison result. Perform an XOR operation on the highest and lowest bits in the state comparison result ring_temp to obtain the first and last bit comparison result. Use the first and last bit comparison result as the lowest bit and combine it with the adjacent bit comparison result to form the flag signal. Step 3: Shift the most significant bit of the flag signal to the least significant bit, and shift the remaining bits one bit to the higher bit to obtain the first shift result. Invert each bit of the first shift result, and perform a bitwise AND operation between the inverted result and the flag signal to obtain the flag_edge signal. Step 4: Record the first bit of 1 in the flag_edge signal from low to high as num; Step 5: According to the correction rules, iterate through each bit of the actual state signal ring to obtain the correction result ring_check of the ring oscillator structure TDC; The correction rule is as follows: When k > num, if ring_temp[k] ≠ ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged. When k < num, if ring_temp[k] = ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged. When k = num, ring[k] remains unchanged. ring_temp[k] and ring_temp[num] represent the k-th and num-th signal values ​​in the state comparison result ring_temp, respectively, and ring[k] represents the k-th signal value in the actual state signal ring.

2. A calibration method for a ring oscillator structure TDC, characterized in that, Includes the following steps: Step 1: Perform a bitwise XOR operation between the actual ring oscillation state signal ring collected by the sampling circuit when the Start and Stop signals arrive and the initial ring oscillation state signal ring_original to obtain the state comparison result ring_temp; Step 2: Perform an XOR operation on the two adjacent bits in the state comparison result ring_temp to obtain the adjacent bit comparison result. Perform an XOR operation on the highest and lowest bits in the state comparison result ring_temp to obtain the first and last bit comparison result. Use the first and last bit comparison result as the highest bit and combine it with the adjacent bit comparison result to form the flag signal. Step 3: Shift the most significant bit of the flag signal to the least significant bit, and shift the remaining bits one bit to the higher bit to obtain the first shift result. Shift the two most significant bits of the flag signal to the two least significant bits, and shift the remaining bits two bits to the higher bit to obtain the second shift result. Perform a bitwise AND operation between the first shift result and the second shift result to obtain the flag_edge signal. Step 4: Record the first bit of 1 in the flag_edge signal from low to high as num; Step 5: According to the correction rules, iterate through each bit of the actual state signal ring to obtain the correction result ring_check of the ring oscillator structure TDC; The correction rule is as follows: When k > num, if ring_temp[k] ≠ ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged. When k < num, if ring_temp[k] = ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged. When k = num, ring[k] remains unchanged. ring_temp[k] and ring_temp[num] represent the k-th and num-th signal values ​​in the state comparison result ring_temp, respectively, and ring[k] represents the k-th signal value in the actual state signal ring.

3. The correction method for the ring oscillator structure TDC according to claim 1 or 2, characterized in that, The ring oscillator structure TDC includes a ring oscillator, a ring counter, and a sampling circuit. The ring oscillator comprises N inverters connected end to end, where N is an odd number greater than 1; The ring counter is used to count the ring oscillation period; The sampling circuit is used to sample the output of each inverter in the ring oscillator and the output of the ring counter when the Start and Stop signals arrive.

4. The correction method for the ring oscillator structure TDC according to claim 3, characterized in that, The actual state signal "ring" is the output signal of the ring oscillator collected by the sampling circuit when the Start and Stop signals arrive.

5. A calibration system for a ring oscillator structure TDC, characterized in that, Includes the following units: State comparison unit: used to perform bitwise XOR operation between the actual state signal ring and the initial state signal ring_original to obtain the state comparison result ring_temp; Perform an XOR operation on two adjacent bits in the state comparison result ring_temp to obtain the adjacent bit comparison result. Perform an XOR operation on the highest and lowest bits in the state comparison result ring_temp to obtain the first and last bit comparison result. Then, use the first and last bit comparison result as the lowest bit and combine it with the adjacent bit comparison result to form the flag signal. Edge detection unit: used to shift the most significant bit of the flag signal to the least significant bit and shift the remaining bits one bit to the higher bit to obtain the first shift result. Invert each bit of the first shift result and perform a bitwise AND operation with the flag signal to obtain the flag_edge signal. Error correction unit: It is used to record the first bit of 1 in the flag_edge signal from low to high as num, and to traverse each bit of the actual state signal ring according to the correction rules to obtain the correction result ring_check of the ring oscillator structure TDC. The correction rule is as follows: When k > num, if ring_temp[k] ≠ ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged. When k < num, if ring_temp[k] = ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged. When k = num, ring[k] remains unchanged. ring_temp[k] and ring_temp[num] represent the k-th and num-th signal values ​​in the state comparison result ring_temp, respectively, and ring[k] represents the k-th signal value in the actual state signal ring.

6. A calibration system for a ring oscillator structure TDC, characterized in that, Includes the following units: State comparison unit: It is used to perform bit-by-bit XOR operation between the actual ring state signal ring collected by the sampling circuit when the Start and Stop signals arrive and the ring initial state signal ring_original to obtain the state comparison result ring_temp. It performs XOR operation on two adjacent bits in the state comparison result ring_temp to obtain the adjacent bit comparison result. It performs XOR operation on the highest bit and the lowest bit in the state comparison result ring_temp to obtain the first and last bit comparison result. The first and last bit comparison result is used as the highest bit and the adjacent bit comparison result to form the flag signal. Edge detection unit: used to move the most significant bit of the flag signal to the least significant bit and move the remaining bits one bit to the higher bit to obtain the first shift result; move the two most significant bits of the flag signal to the two least significant bits and move the remaining bits two bits to the higher bit to obtain the second shift result; perform bitwise AND operation between the first shift result and the second shift result to obtain the flag_edge signal. Error correction unit: It is used to record the first bit of 1 in the flag_edge signal from low to high as num, and to traverse each bit of the actual state signal ring according to the correction rule to obtain the correction result ring_check of the ring oscillator structure TDC. The correction rule is as follows: When k > num, if ring_temp[k] ≠ ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged. When k < num, if ring_temp[k] = ring_temp[num], then ring[k] is inverted; otherwise, ring[k] remains unchanged. When k = num, ring[k] remains unchanged. ring_temp[k] and ring_temp[num] represent the k-th and num-th signal values ​​in the state comparison result ring_temp, respectively, and ring[k] represents the k-th signal value in the actual state signal ring.

7. The correction system for the ring oscillator structure TDC according to claim 5 or 6, characterized in that, The ring oscillator structure TDC includes a ring oscillator, a ring counter, and a sampling circuit. The ring oscillator comprises N inverters connected end to end, where N is an odd number greater than 1; The ring counter is used to count the ring oscillation period; The sampling circuit is used to sample the output of each inverter in the ring oscillator and the output of the ring counter when the Start and Stop signals arrive.

8. The correction system for the ring oscillator structure TDC according to claim 7, characterized in that, The actual state signal "ring" is the output signal of the ring oscillator collected by the sampling circuit when the Start and Stop signals arrive.