Weight-considered thermometer code bubble error correction method
By using a bit-by-bit shifting error correction link constructed from basic logic units of "OR" gates and "AND" gates, and considering the weight difference of "1" in the thermometer code, the problems of circuit complexity and limited correction order in the prior art are solved, and efficient arbitrary-order bubble error correction is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-09
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies for correcting thermometer code bubble errors involve complex circuits and can only correct a limited number of orders, resulting in significant errors in the correction results.
The basic logic unit is constructed using OR gates and AND gates. The error correction link is formed by shifting the bits up one by one. By associating the input and output signals, and considering the weight difference of "1" in the thermometer code, the error of arbitrary order bubble can be corrected.
The circuit structure is simplified, the complexity is reduced, the correction error is reduced, and it can correct bubble errors of any order, thus improving the error correction performance.
Smart Images

Figure CN121814093A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of coding technology, and relates to thermometer codes, specifically to a weighted method for correcting bubble errors in thermometer codes. Background Technology
[0002] Thermometer codes are typically generated by a set of comparators used in analog-to-digital converters. In this encoding, a "1" or a string of "1"s is followed by all "0"s, resembling the shape of a mercury thermometer, hence the name thermometer code. If a "0" appears in the middle of a string of "1", it resembles a bubble in a mercury thermometer, and is therefore called a bubble error. Bubble errors can be first-order or higher, and may be caused by comparator errors, malfunctions, or sampling errors in the registers after the comparator. Currently reported methods suffer from circuit complexity, can only correct bubbles of a limited order, and have relatively large errors in the correction results. Therefore, we propose a weighted thermometer code bubble error correction method. Summary of the Invention
[0003] To overcome the shortcomings of the prior art, the purpose of this invention is to provide a weighted thermometer code bubble error correction method for any circuit with thermometer code bubble errors caused by timing errors, comparator threshold offsets, or register non-steady-state sampling, and to correct bubble errors of any order at a relatively low cost.
[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A weighted method for correcting errors in thermometer code bubbles includes the following steps: The basic logic units are constructed using OR and AND gates. These basic logic units are then shifted up bit by bit. Several basic logic units are interconnected through input and output signals to form a bit-by-bit error correction link, correcting the code of a thermometer with arbitrary bit length. The correction logic operation implemented by each combinational logic unit is as follows:
[0005] in, Indicates input data, The symbols indicate the output data. "+" represents the "OR" logical operation, and "." represents the "AND" logical operation.
[0006] The basic logic unit contains one OR gate and three AND gates.
[0007] The basic logic unit is used 5 times, requiring a total of five OR gates and fifteen AND gates. The basic logic units are associated with each other through input and output signals to form a bit-by-bit error correction link to correct the eight-bit thermometer code.
[0008] The correction of the eight-bit thermometer code, assuming the input eight-bit thermometer code data is T1T2T3T4T5T6T7T8, involves bit-by-bit error correction by shifting the basic logic unit up five times to form a combinational logic unit, including the following steps: Step 1: In the first basic logic unit, the inputs of T8 and T7 are OR gates and the first AND gate. The output of the OR gate is B8. The output of the first AND gate serves as one input to the OR and AND gates in the second repeating basic logic unit. The input of the second AND gate in this basic logic unit is the output of the first AND gate and data T6. Its output serves as the other input to the OR and AND gates in the second repeating basic logic unit. The input of the third AND gate in this basic logic unit is the output of the second AND gate and data T5. Its output serves as the input to the second AND gate in the second repeating basic logic unit. Step 2: In the second basic logic unit, the inputs of the OR gate and the first AND gate are the outputs of the first AND gate and the second AND gate in the first basic logic unit. The output of the OR gate is B7. The output of the first AND gate serves as one input to the OR gate and the AND gate in the third repeating basic logic unit. The input of the second AND gate is the output of the first AND gate and the output of the third AND gate in the first basic logic unit. Its output serves as the other input to the OR gate and the AND gate in the third repeating basic logic unit. The input of the third AND gate is the data T4 and the output of the second AND gate. Its output serves as the input to the second AND gate in the third repeating basic logic unit. Step 3: In the third basic logic unit, the input of the OR gate and the first AND gate is the output of the first AND gate and the second AND gate in the second basic logic unit. The output of the OR gate is B6. The output of the first AND gate serves as one input of the OR gate and the AND gate in the fourth repeating basic logic unit. The input of the second AND gate is the output of the first AND gate and the output of the third AND gate in the second basic logic unit. Its output serves as the other input of the OR gate and the AND gate in the fourth repeating basic logic unit. The input of the third AND gate is the data T3 and the output of the second AND gate. Its output serves as the input of the second AND gate in the fourth repeating basic logic unit. Step 4: In the fourth basic logic unit, the input of the OR gate and the first AND gate is the output of the first AND gate and the second AND gate in the third basic logic unit. The output of the OR gate is B5. The output of the first AND gate serves as one input of the OR gate and the AND gate in the fifth repeating basic logic unit. The input of the second AND gate is the output of the first AND gate and the output of the third AND gate in the third basic logic unit. Its output serves as the other input of the OR gate and the AND gate in the fifth repeating basic logic unit. The input of the third AND gate is the data T2 and the output of the second AND gate. Its output serves as the input of the second AND gate in the fifth repeating basic logic unit. Step 5: In the fifth basic logic unit, the inputs of the OR gate and the first AND gate are the outputs of the first AND gate and the second AND gate in the fourth basic logic unit. The output of the OR gate is B4, and the output of the first AND gate is B3. The input of the second AND gate is the output of the first AND gate and the output of the third AND gate in the fourth basic logic unit, and its output is B2. The input of the third AND gate is the data T1 and the output of the second AND gate, and its output is B1. Therefore, after shifting the basic logic unit up five times bit by bit, the final corrected thermometer code data is B1B2B3B4B5B6B7B8.
[0009] The error correction process considers the weight difference of "1" in the thermometer code bubble. The earlier "1" has a greater weight than the later "1". Through the processing of combined logic units, the result of the corrected thermometer code is more accurate, thus improving the error correction performance of the thermometer code.
[0010] The bit-by-bit shift-up error correction process sequentially processes different bit segments of the thermometer code by the basic logic unit, i.e., from T8 to T1, to achieve full-segment error correction of the eight-bit thermometer code. It does not require prior detection of the bubble error order and can directly complete the error correction.
[0011] The aforementioned error correction is applicable to various scenarios where temperature gauge code bubble errors are caused by delay errors due to timing differences, comparator failures, or trigger metastability, and is compatible with temperature gauge code bubble error correction requirements from different sources.
[0012] The error correction method described above can effectively correct first-order, second-order, and third-order bubble errors. Furthermore, based on the repeated verification logic structure of bit-by-bit shifting, it can be extended to correct higher-order bubble errors, breaking through the order limitation of traditional error correction methods.
[0013] The beneficial effects of this invention are: This method uses AND and OR gates to form a logic circuit for correcting thermometer code bubble errors. Considering the influence of weights, the first "1" has a greater weight. This correction logic can reduce the error after correction. At the same time, the logic units are linked through input and output signals to form a bit-by-bit error correction link, which can correct bubble errors of any order.
[0014] Compared to traditional wire-OR gate error correction methods, Wallace tree error correction methods, and three-way AND gate error correction methods, this method only uses OR gates and AND gates to construct the logic circuit, eliminating the need for complex circuit structures and improving the speed of the error correction circuit. At the same time, by using a bit-by-bit shifting structure, it solves the problems of "circuit complexity" and "limited correction order" in traditional methods. This method has a simple structure, reduces circuit complexity, and does not require prior verification of the bubble error order; it can be used directly for error correction. Attached Figure Description
[0015] Figure 1 This is the basic logic unit circuit diagram of the present invention.
[0016] Figure 2 The logic unit circuit diagram for correcting bubble errors in an eight-digit thermometer code.
[0017] Figure 3 The input and output waveforms are for an example of a first-order bubble error in an eight-bit thermometer code.
[0018] Figure 4 The input and output waveforms are shown for an example of a two-order bubble error in an eight-bit thermometer code.
[0019] Figure 5 The input and output waveforms are shown for an example of a third-order bubble error in an eight-bit thermometer code. Detailed Implementation
[0020] The invention will be further described below with reference to the accompanying drawings.
[0021] like Figure 1 , 2 As shown, a weighted method for correcting errors in thermometer code bubbles includes the following steps: The basic logic units are constructed using OR and AND gates. These basic logic units are then shifted up bit by bit. Several basic logic units are interconnected through input and output signals to form a bit-by-bit error correction link, correcting the code of a thermometer with arbitrary bit length. The correction logic operation implemented by each combinational logic unit is as follows:
[0022] in, Indicates input data, The symbols indicate the output data. "+" represents the "OR" logical operation, and "." represents the "AND" logical operation.
[0023] like Figure 1 As shown, a basic logic unit circuit was constructed, containing one OR gate and three AND gates. The correction results for each four-bit thermometer code are shown in Table 1 below: Table 1
[0024] The error correction method considers the weight difference of "1" in the thermometer code. The earlier "1" has a greater weight than the later "1". Through the signal processing logic of the logic unit, the error of the error correction result is reduced and the rationality of the error correction is improved.
[0025] The logic unit circuits are interconnected through input and output signals to form a bit-by-bit error correction link, which can correct bubble errors of any order. Table 2 shows the error correction results of bubble errors in three different orders of eight-bit thermometer codes: Table 2
[0026] The basic logic unit is used 5 times, requiring a total of five OR gates and fifteen AND gates. The basic logic units are associated with each other through input and output signals to form a bit-by-bit error correction link to correct the eight-bit thermometer code.
[0027] like Figure 2 As shown, by shifting the basic logic unit circuit bit by bit upwards and repeatedly checking, the bubble problem of arbitrary order can be corrected. The correction of the eight-bit thermometer code, assuming the input eight-bit thermometer code data is T1T2T3T4T5T6T7T8, involves shifting the basic logic unit upwards five times bit by bit to form a combinational logic unit. This includes the following steps: Step 1: In the first basic logic unit, the inputs of T8 and T7 are OR gates and the first AND gate. The output of the OR gate is B8. The output of the first AND gate serves as one input to the OR and AND gates in the second repeating basic logic unit. The input of the second AND gate in this basic logic unit is the output of the first AND gate and data T6. Its output serves as the other input to the OR and AND gates in the second repeating basic logic unit. The input of the third AND gate in this basic logic unit is the output of the second AND gate and data T5. Its output serves as the input to the second AND gate in the second repeating basic logic unit. Step 2: In the second basic logic unit, the inputs of the OR gate and the first AND gate are the outputs of the first AND gate and the second AND gate in the first basic logic unit. The output of the OR gate is B7. The output of the first AND gate serves as one input to the OR gate and the AND gate in the third repeating basic logic unit. The input of the second AND gate is the output of the first AND gate and the output of the third AND gate in the first basic logic unit. Its output serves as the other input to the OR gate and the AND gate in the third repeating basic logic unit. The input of the third AND gate is the data T4 and the output of the second AND gate. Its output serves as the input to the second AND gate in the third repeating basic logic unit. Step 3: In the third basic logic unit, the input of the OR gate and the first AND gate is the output of the first AND gate and the second AND gate in the second basic logic unit. The output of the OR gate is B6. The output of the first AND gate serves as one input of the OR gate and the AND gate in the fourth repeating basic logic unit. The input of the second AND gate is the output of the first AND gate and the output of the third AND gate in the second basic logic unit. Its output serves as the other input of the OR gate and the AND gate in the fourth repeating basic logic unit. The input of the third AND gate is the data T3 and the output of the second AND gate. Its output serves as the input of the second AND gate in the fourth repeating basic logic unit. Step 4: In the fourth basic logic unit, the input of the OR gate and the first AND gate is the output of the first AND gate and the second AND gate in the third basic logic unit. The output of the OR gate is B5. The output of the first AND gate serves as one input of the OR gate and the AND gate in the fifth repeating basic logic unit. The input of the second AND gate is the output of the first AND gate and the output of the third AND gate in the third basic logic unit. Its output serves as the other input of the OR gate and the AND gate in the fifth repeating basic logic unit. The input of the third AND gate is the data T2 and the output of the second AND gate. Its output serves as the input of the second AND gate in the fifth repeating basic logic unit. Step 5: In the fifth basic logic unit, the inputs of the OR gate and the first AND gate are the outputs of the first AND gate and the second AND gate in the fourth basic logic unit. The output of the OR gate is B4, and the output of the first AND gate is B3. The input of the second AND gate is the output of the first AND gate and the output of the third AND gate in the fourth basic logic unit, and its output is B2. The input of the third AND gate is the data T1 and the output of the second AND gate, and its output is B1. Therefore, after shifting the basic logic unit up five times bit by bit, the final corrected thermometer code data is B1B2B3B4B5B6B7B8. Example
[0028] Design a logic circuit and use simulation software to simulate a thermometer code with an air bubble error. The error correction results are as follows: Figure 3 , Figure 4 , Figure 5 T8T7T6T5T4T3T2T1 represents the input data, and B8B7B6B5B4B3B2B1 represents the input data. This indicates the output data.
[0029] Simulation results show that the weighted thermometer code error correction method designed in this invention can successfully correct bubble errors. Here, logic level "0" corresponds to 0V, and logic level "1" corresponds to 1.8V. Figure 3 The simulation results of the first-order bubble error show that the error code "01111111" is corrected to "10000000", the error code "10110000" is corrected to "10000000", and the error code "11010000" is corrected to "11000000". Figure 4 The simulation results for second-order bubble errors show that the error codes "10011100" are corrected to "10000000", "11001000" to "11000000", "11100100" to "11100000", and "11110010" to "11100000". Figure 5 The simulation results for third-order bubble errors show that correcting error codes "10001000" to "10000000", "11000100" to "11000000", "11100010" to "11100000", and "11110001" to "1110000" demonstrates that weighted error correction for thermometer codes can be achieved. Figure 3 , Figure 4 , Figure 5 The circuit demonstrates its ability to correct errors in bubbles of orders one through three. However, this method can correct errors beyond the third order. Following the foregoing description of this invention, it is possible to achieve bubble correction of any order with minimal hardware overhead. Furthermore, the error correction method described in this invention exhibits even smaller errors and can correct bubbles of higher orders.
[0030] A logic circuit constructed using AND and OR gates is used to form a bit-by-bit error correction link by associating the input and output signals between the logic units, thus achieving correct bubble correction of any order. This reduces circuit complexity, minimizes error correction, and is a more rational approach.
Claims
1. A weighted method for correcting errors in thermometer code bubbles, characterized in that, Includes the following steps: The basic logic units are constructed using OR and AND gates. These basic logic units are then shifted up bit by bit. Several basic logic units are interconnected through input and output signals to form a bit-by-bit error correction link, correcting the thermometer code of arbitrary length. The correction logic operation implemented by each combinational logic unit is as follows: ; in, Indicates input data, The output data is represented by "+", which represents the "OR" logical operation, and "." represents the "AND" logical operation.
2. The method for correcting errors in thermometer code bubbles considering weights according to claim 1, characterized in that, The basic logic unit contains one OR gate and three AND gates.
3. The method for correcting errors in thermometer code bubbles considering weights according to claim 1, characterized in that, The basic logic unit is used 5 times, requiring a total of five OR gates and fifteen AND gates. The basic logic units are associated with each other through input and output signals to form a bit-by-bit error correction link to correct the eight-bit thermometer code.
4. The method for correcting errors in thermometer code bubbles considering weights according to claim 3, characterized in that, The correction of the eight-bit thermometer code, assuming the input eight-bit thermometer code data is T1T2T3T4T5T6T7T8, involves bit-by-bit error correction by shifting the basic logic unit up five times to form a combinational logic unit, including the following steps: Step 1: In the first basic logic unit, the inputs of T8 and T7 are OR gates and the first AND gate. The output of the OR gate is B8. The output of the first AND gate serves as one input to the OR and AND gates in the second repeating basic logic unit. The input of the second AND gate in this basic logic unit is the output of the first AND gate and data T6. Its output serves as the other input to the OR and AND gates in the second repeating basic logic unit. The input of the third AND gate in this basic logic unit is the output of the second AND gate and data T5. Its output serves as the input to the second AND gate in the second repeating basic logic unit. Step 2: In the second basic logic unit, the input of the OR gate and the first AND gate is the output of the first AND gate and the second AND gate in the first basic logic unit. The output of the OR gate is B7. The output of the first AND gate serves as one input to the OR gate and the AND gate in the third repeating basic logic unit. The input of the second AND gate is the output of the first AND gate and the output of the third AND gate in the first basic logic unit. Its output serves as the other input to the OR gate and the AND gate in the third repeating basic logic unit. The input of the third AND gate is the data T4 and the output of the second AND gate. Its output serves as the input to the second AND gate in the third repeating basic logic unit. Step 3: In the third basic logic unit, the input of the OR gate and the first AND gate is the output of the first AND gate and the second AND gate in the second basic logic unit. The output of the OR gate is B6. The output of the first AND gate serves as one input of the OR gate and the AND gate in the fourth repeating basic logic unit. The input of the second AND gate is the output of the first AND gate and the output of the third AND gate in the second basic logic unit. Its output serves as the other input of the OR gate and the AND gate in the fourth repeating basic logic unit. The input of the third AND gate is the data T3 and the output of the second AND gate. Its output serves as the input of the second AND gate in the fourth repeating basic logic unit. Step 4: In the fourth basic logic unit, the input of the OR gate and the first AND gate is the output of the first AND gate and the second AND gate in the third basic logic unit. The output of the OR gate is B5. The output of the first AND gate serves as one input to the OR gate and the AND gate in the fifth repeating basic logic unit. The input of the second AND gate is the output of the first AND gate and the output of the third AND gate in the third basic logic unit. Its output serves as the other input to the OR gate and the AND gate in the fifth repeating basic logic unit. The input of the third AND gate is the data T2 and the output of the second AND gate. Its output serves as the input to the second AND gate in the fifth repeating basic logic unit. Step 5: In the fifth basic logic unit, the input of the OR gate and the first AND gate is the output of the first AND gate and the second AND gate in the fourth basic logic unit. The output of the OR gate is B4, and the output of the first AND gate is B3. The input of the second AND gate is the output of the first AND gate and the output of the third AND gate in the fourth basic logic unit, and its output is B2. The input of the third AND gate is the data T1 and the output of the second AND gate, and its output is B1. Therefore, after shifting the basic logic unit up five times bit by bit, the final corrected thermometer code data is B1B2B3B4B5B6B7B8.
5. The method for correcting errors in thermometer code bubbles considering weights according to claim 1, characterized in that, The correction process considers the weight difference of "1" in the thermometer code bubble. The earlier "1" has a greater weight than the later "1". Through the processing of combined logic units, the result of the corrected thermometer code is more accurate, thus improving the error correction performance of the thermometer code.
6. The method for correcting errors in thermometer code bubbles considering weights according to claim 1, characterized in that, Bit-by-bit error correction achieves full-segment error correction of the eight-bit thermometer code by sequentially processing different bit segments of the thermometer code from T8 to T1 using the basic logic unit. This eliminates the need to detect the order of bubble errors in advance and completes the error correction directly.