A device for converting thermometer code to binary code
By introducing a correction circuit into the thermometer code to binary code conversion device, the instantaneous decoding error and high power consumption caused by dynamic comparator output jitter are solved, and more accurate decoding results and lower power consumption are achieved.
Patent Information
- Application Number
- CN202411216413.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-09-02
AI Technical Summary
The existing thermometer code-to-binary code conversion methods have problems of instantaneous decoding errors and high power consumption, mainly due to the improper circuit state caused by the jitter output by the dynamic comparator and the external control signal independent of the dynamic comparator output signal.
A thermometer code-to-binary code conversion device including a decoding circuit and a correction circuit is designed. By setting up a correction circuit, the dynamic comparator output jitter affects the decoding result, and reduces the state in which the circuit is connected to the power ground, thereby reducing the power. Consumption.
It effectively avoids instantaneous decoding errors caused by dynamic comparator output jitter, and reduces the operating power consumption of the overall circuit.
Smart Images

Figure CN118740163B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of digital circuits, and in particular to a device for converting thermometer codes into binary codes. Background Art
[0002] Thermometer code is commonly used in analog-to-digital converters and time-to-digital converters. In analog-to-digital converters, it is used to convert analog input signals such as measured voltage into digitally encoded output signals. In time-to-digital converters, it is used to convert phase errors into digitally encoded signals and send them to digital filters for processing. Binary code is the most commonly used digital code in digital circuits. It is used to count numbers based on 2 and is commonly represented by symbols 0 and 1, with each symbol occupying 1 bit.
[0003] There are three main ways to convert thermometer code to binary code, and their decoding logic is consistent. Figure 1 As shown, the difference is that the PMOS tube M1 in the decoding circuit is in different working states in the working and reset states. In one case, the gate voltage CLKC of the PMOS tube M1 is 0 when the decoding logic is not working, the entire circuit is reset, and a 0 output is generated; when the decoding logic is working, the gate voltage CLKC is VDD, M1 is disconnected, and then the decoding logic generates a corresponding output. However, since the decoding logic has two states, on and off, the node A is pulled down to 0 or the original voltage is kept floating. The front pole of the decoding logic, that is, the output of the dynamic comparator, will produce a 0 voltage that rises first and then falls, so that the decoding logic is turned on momentarily when it should be turned off, so that the voltage of the A node, which should be VDD, drops to 0, resulting in a decoding error. In another case, the gate voltage CLKC of the PMOS tube M1 rises from 0 to VDD only after the decoding logic has been working for a period of time. Since the external control signal CLKC is controlled by a clock that is unrelated to the output signal of the dynamic comparator, there may still be a problem that the gate voltage CLKC rises too early, so that the error of the decoding logic output cannot be corrected, or the gate voltage CLKC rises late, the gate of the PMOS tube M1 is grounded and is in a normally open state, and the input end of the inverter A1 can be pulled back in the working interval II. There is a long-term conduction between the power supply and the ground, which wastes power consumption. Summary of the invention
[0004] The purpose of the present invention is to solve two technical problems: first, to reduce the instantaneous decoding error that may occur due to the jitter of the dynamic comparator output; second, to reduce the working power consumption of the overall circuit. To this end, a device for converting thermometer code to binary code is provided.
[0005] In order to achieve the above-mentioned object of the invention, the embodiment of the present invention provides the following technical solutions:
[0006] A thermometer code to binary code conversion device is applied to a dynamic comparator output, the conversion device comprising a decoding circuit and a correction circuit electrically connected to the decoding circuit;
[0007] The decoding circuit includes a PMOS tube M1, a PMOS tube M2, an inverter A2 and a decoding logic; the correction circuit includes a PMOS tube M3, a PMOS tube M4 and a complementary decoding logic; the drain of the PMOS tube M1 is respectively connected to the drain of the PMOS tube M2, the gate of the PMOS tube M3, the input end of the inverter A2 and the output node A of the decoding logic; the drain of the PMOS tube M3 is respectively connected to the drain of the PMOS tube M4, the gate of the PMOS tube M1 and the output node B of the complementary decoding logic; and the output of the dynamic comparator is respectively connected to the decoding logic and the complementary decoding logic.
[0008] Furthermore, the gate of the PMOS tube M2 is connected to an external reset voltage CLKR, and the source of the PMOS tube M1 and the source of the PMOS tube M2 are both connected to a power supply voltage VDD.
[0009] Furthermore, the gate of the PMOS tube M4 is connected to the external reset voltage CLKR, and the source of the PMOS tube M3 and the source of the PMOS tube M4 are both connected to the power supply voltage VDD.
[0010] Furthermore, the output end of the inverter A2 is connected to the output voltage VOUT.
[0011] Further, the dynamic comparator includes a MOS tube MN1, a MOS tube MN2, a MOS tube MN3, a MOS tube MN4, a MOS tube MN5, a MOS tube MN6, a MOS tube MN7, a MOS tube MP1, a MOS tube MP2, a MOS tube MP3, a MOS tube MP4 and a MOS tube MP5, the gates of the MOS tubes MN1, MP1 and MP2 are all connected to an external control signal CLKR, the gate of the MOS tube MN2 is connected to an external control signal Vip, the gate of the MOS tube MN3 is connected to an external control signal Vin, the drain of the MOS tube MN1 is connected to the source of the MOS tubes MN2 and MN3, the drain of the MOS tube MN2 is respectively connected to the drain of the MOS tube MP1 and the gate of the MOS tube MN4, the drain of the MOS tube MN3 is connected to the drain of the MOS tube MP2 and the gate of the MOS tube MN4, and the drain of the MOS tube MN3 is connected to the drain of the MOS tube MP2 and the gate of the MOS tube MN5. The gate of the S transistor MN7 is connected to the gate of the MOS transistor MN7, the drain of the MOS transistor MN4 as the output node Voutp is respectively connected to the drain of the MOS transistor MN5, the drain of the MOS transistor MP3, the gate of the MOS transistor MN6 and the gate of the MOS transistor MP4, the drain of the MOS transistor MN7 as the output node Voutn is respectively connected to the drain of the MOS transistor MN6, the drain of the MOS transistor MP4, the gate of the MOS transistor MN5 and the gate of the MOS transistor MP3, the drain of the MOS transistor MP5 is respectively connected to the source of the MOS transistor MP3 and the source of the MOS transistor MP4, the gate of the MOS transistor MP5 is connected to the external control signal CLKB, the sources of the MOS transistors MN1, MOS transistor MN4, MOS transistor MN5, MOS transistor MN6 and MOS transistor MN7 are all grounded, and the sources of the MOS transistors MP1, MOS transistor MP2 and MOS transistor MP5 are all connected to the power supply voltage.
[0012] Further, when the 7-bit thermometer code is converted into a 3-bit binary code, in the decoding logic of the third binary code, the decoding logic also includes a MOS tube M11, the gate of the MOS tube M11 is connected to the fourth dynamic comparator output Voutp, the drain of the MOS tube M11 is connected to the node A in the decoding circuit, and the source of the MOS tube M11 is grounded; in the complementary decoding logic of the third binary code, the complementary decoding logic also includes a MOS tube M12, the gate of the MOS tube M12 is connected to the fourth dynamic comparator output Voutn, the drain of the MOS tube M12 is connected to the node B in the correction circuit, and the source of the MOS tube M12 is grounded.
[0013] Further, in the decoding logic of the second binary code, the decoding logic also includes a MOS tube M13, a MOS tube M14 and a MOS tube M15, the gate of the MOS tube M13 is connected to the second dynamic comparator output Voutp, the gate of the MOS tube M14 is connected to the fourth dynamic comparator output Voutn, the gate of the MOS tube M15 is connected to the output Voutp of the sixth dynamic comparator, the drain of the MOS tube M13 is connected to the source of the MOS tube M14, the sources of the MOS tube M13 and the MOS tube M15 are connected to the ground voltage, and the drains of the MOS tube M14 and the MOS tube M15 are connected to the node A in the decoding circuit; In the complementary decoding logic of the second binary code, the complementary decoding logic also includes a MOS tube M16, a MOS tube M17 and a MOS tube M18, the gate of the MOS tube M16 is connected to the second dynamic comparator output Voutn, the gate of the MOS tube M17 is connected to the fourth dynamic comparator output Voutp, the gate of the MOS tube M18 is connected to the output Voutn of the sixth dynamic comparator, the source of the MOS tube M18 is connected to the drain of the MOS tube M16 and the drain of the MOS tube M17, the sources of the MOS tube M16 and the MOS tube M17 are connected to the ground voltage, and the drain of the MOS tube M18 is connected to the node B in the correction circuit.
[0014] Further, in the decoding logic of the first bit binary code, the decoding logic also includes MOS tube M19, MOS tube M20, MOS tube M21, MOS tube M22, MOS tube M23, MOS tube M24 and MOS tube M25, the gate of the MOS tube M19 is connected to the first dynamic comparator output Voutp, the gate of the MOS tube M20 is connected to the second dynamic comparator output Voutn, the gate of the MOS tube M21 is connected to the third dynamic comparator output Voutp, and the gate of the MOS tube M22 is connected to the fourth dynamic comparator output Voutp. outn, the gate of the MOS tube M23 is connected to the fifth dynamic comparator output Voutp, the gate of the MOS tube M24 is connected to the sixth dynamic comparator output Voutn, the gate of the MOS tube M25 is connected to the output Voutp of the seventh dynamic comparator, the drain of the MOS tube M19 is connected to the source of the MOS tube M20, the drain of the MOS tube M21 is connected to the source of the MOS tube M22, the drain of the MOS tube M23 is connected to the source of the MOS tube M24, the source of the MOS tube M19, the source of the MOS tube M21, the source of the MOS tube M23, The source of the MOS tube M25 is connected to the ground voltage, and the drains of the MOS tube M20, the drains of the MOS tube M22, the drains of the MOS tube M24, and the drains of the MOS tube M25 are connected to the node A in the decoding circuit; in the complementary decoding logic of the first bit binary code, the complementary decoding logic also includes MOS tubes M26, MOS tubes M27, MOS tubes M28, MOS tubes M29, MOS tubes M30, MOS tubes M31, and MOS tubes M32, the gate of the MOS tube M26 is connected to the first dynamic comparator output Voutn, the gate of the MOS tube M27 is connected to the second dynamic comparator output Voutp, the gate of the MOS tube M28 is connected to the third dynamic comparator output Voutn, and the gate of the MOS tube M29 is connected to the fourth dynamic comparator output Voutp. outp, the gate of the MOS tube M30 is connected to the fifth dynamic comparator output Voutn, the gate of the MOS tube M31 is connected to the sixth dynamic comparator output Voutp, the gate of the MOS tube M32 is connected to the output Voutn of the seventh dynamic comparator, the source of the MOS tube M32 is connected to the drain of the MOS tube M31 and the drain of the MOS tube M30, the source of the MOS tube M31 is connected to the source of the MOS tube M30, the drain of the MOS tube M29, and the drain of the MOS tube M28, the source of the MOS tube M29 is connected to the source of the MOS tube M28, the drain of the MOS tube M27, and the drain of the MOS tube M26, the sources of the MOS tubes M26 and M27 are connected to the ground voltage, and the drain of the MOS tube M32 is connected to the node B in the correction circuit.
[0015] Compared with the prior art, the present invention has the following beneficial effects:
[0016] The present invention ensures that the decoding result is not affected by the jitter of the dynamic comparator output by setting a correction circuit. Since the external control signal CLKR in the decoding circuit is independent of the time when the output signal of the dynamic comparator enters the interval II, and the correction logic is completely generated by the correction circuit, it can effectively avoid the instantaneous decoding error caused by the simultaneous rise of the outputs of the dynamic comparators, which causes the NMOS tubes of the decoding logic to be turned on at the same time. At the same time, the decoding circuit and the correction circuit are less often in a state of being connected to the power ground, thereby effectively reducing the working power consumption of the overall circuit. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 It is a circuit principle diagram of a decoding circuit provided by the background technology of the present invention;
[0019] Figure 2 is a circuit schematic diagram of a conversion device provided by an embodiment of the present invention;
[0020] Figure 3 is a circuit diagram of a dynamic comparator provided by an embodiment of the present invention;
[0021] Figure 4 is a schematic diagram of an output curve of a dynamic comparator provided by an embodiment of the present invention;
[0022] Figure 5 It is a circuit diagram of a binary code conversion logic provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.
[0024] It should be noted that similar numbers and letters represent similar items in the following figures, so once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance, or implying any such actual relationship or order between these entities or operations. In addition, the terms "connected", "connected", etc. can be directly connected between elements, or indirectly connected via other elements.
[0025] The embodiment of the present invention provides a device for converting thermometer code to binary code, which is mainly used for dynamic comparator output. Figure 2 As shown, the conversion device includes a decoding circuit and a correction circuit, and the decoding circuit is electrically connected to the correction circuit.
[0026] In this embodiment, the decoding circuit includes a PMOS tube M1, a PMOS tube M2, an inverter A2 and a decoding logic. The correction circuit includes a PMOS tube M3, a PMOS tube M4 and a complementary decoding logic. Specifically, the drain of the PMOS tube M1 is respectively connected to the drain of the PMOS tube M2, the gate of the PMOS tube M3, the input end of the inverter A2, and the output node A of the decoding logic. The drain of the PMOS tube M3 is respectively connected to the drain of the PMOS tube M4, the gate of the PMOS tube M1, and the output node B of the complementary decoding logic. The output of the dynamic comparator is respectively connected to the decoding logic and the complementary decoding logic. The gate of the PMOS tube M2 is connected to the external reset voltage CLKR, and the source of the PMOS tube M1 and the source of the PMOS tube M2 are both connected to the power supply voltage VDD. The gate of the PMOS tube M4 is connected to the external reset voltage CLKR, and the source of the PMOS tube M3 and the source of the PMOS tube M4 are both connected to the power supply voltage VDD. The output end of the inverter A2 is connected to the output voltage VOUT.
[0027] During operation, this embodiment ensures that the decoding result is not affected by the jitter of the dynamic comparator output through the correction circuit. Since the external control signal CLKR in the decoding circuit is independent of the time when the output signal of the dynamic comparator enters interval II, and the correction logic is completely generated by the correction circuit, it can effectively avoid the instantaneous decoding error caused by the simultaneous rise of the outputs of the dynamic comparators, which causes the NMOS tubes of the decoding logic to be turned on at the same time. At the same time, the decoding circuit and the correction circuit are less often in a state of being connected to the power ground, thereby effectively reducing the working power consumption of the overall circuit.
[0028] like Figure 3As shown, the dynamic comparator includes MOS transistor MN1, MOS transistor MN2, MOS transistor MN3, MOS transistor MN4, MOS transistor MN5, MOS transistor MN6, MOS transistor MN7, MOS transistor MP1, MOS transistor MP2, MOS transistor MP3, MOS transistor MP4 and MOS transistor MP5. Among them, the gates of the MOS transistors MN1, MOS transistor MP1 and MOS transistor MP2 are all connected to the external control signal CLKR. The gate of the MOS transistor MN2 is connected to the external control signal Vip. The gate of the MOS transistor MN3 is connected to the external control signal Vin. The drain of the MOS transistor MN1 is connected to the source of the MOS transistor MN2 and the MOS transistor MN3, the drain of the MOS transistor MN2 is respectively connected to the drain of the MOS transistor MP1 and the gate of the MOS transistor MN4, and the drain of the MOS transistor MN3 is connected to the drain of the MOS transistor MP2 and the gate of the MOS transistor MN7.
[0029] The drain of the MOS transistor MN4 as the output node Voutp is connected to the drain of the MOS transistor MN5, the drain of the MOS transistor MP3, the gate of the MOS transistor MN6 and the gate of the MOS transistor MP4. The drain of the MOS transistor MN7 as the output node Voutn is connected to the drain of the MOS transistor MN6, the drain of the MOS transistor MP4, the gate of the MOS transistor MN5 and the gate of the MOS transistor MP3. The drain of the MOS transistor MP5 is connected to the source of the MOS transistor MP3 and the source of the MOS transistor MP4 respectively, and the gate of the MOS transistor MP5 is connected to the external control signal CLKB. The sources of the MOS transistors MN1, MOS transistor MN4, MOS transistor MN5, MOS transistor MN6 and MOS transistor MN7 are all grounded, and the sources of the MOS transistors MP1, MOS transistor MP2 and MOS transistor MP5 are all connected to the power supply voltage.
[0030] In one embodiment, the output curve of the dynamic comparator is as follows: Figure 4As shown, in the reset state, the value of CLKR is 0, and the value of CLKB is 1, so that the MOS transistor MN1 and the MOS transistor MP5 are turned off, and the MOS transistor MP1 and the MOS transistor MP2 are turned on, so that the voltages of the nodes Vfn and the node Vfp are pulled up to the power supply voltage VDD, so that the MOS transistor MN4 and the MOS transistor MN7 are turned on, and then the output voltages Voutp and Voutn of the dynamic comparator are pulled down to 0 voltage. As a result, the MOS transistor MN5 and the MOS transistor MN6 are turned off, the MOS transistor MP3 and the MOS transistor MP4 are turned on, and the node voltage Vtail also drops to 0 voltage. In the normal working state, the value of CLKR is 0, the value of CLKB is 1, and the dynamic comparator is first in the working interval I state. At this time, the MOS transistor MP1 and the MOS transistor MP2 are turned off, and the MOS transistor MN1 and the MOS transistor MP5 are turned on, so that the node voltage Vtail rises. Since the MOS transistor MP3 and the MOS transistor MP4 are in the on state at this time, the voltage division of the MOS transistor causes the output node voltages Voutp and Voutn to be pulled up from 0. As for the node Vfp and the node Vfn, since the values of the input voltage Vip and the input voltage Vin are inconsistent, the voltage discharge speeds of the two nodes are inconsistent, so that the turn-off time of the MOS transistor MN4 and the MOS transistor MN7 are inconsistent. Here, it is assumed that the input voltage Vip is higher than the input voltage Vin, that is, the output result of the thermometer code 1 should be generated, then the discharge speed of the node Vfp is higher than the discharge speed of the node Vfn, and the MOS transistor MN4 is turned off before the MOS transistor MN7, so that the output node voltage Voutp is pulled up to VDD before the output node voltage Voutn, so that the MOS transistor MN6 is turned on before the MOS transistor MN5, and the MOS transistor MP4 is turned off before the MOS transistor MP3, so that positive feedback is formed to quickly pull the output node voltage Voutn down to the ground voltage 0, thereby entering the working range II. Therefore, when the input signal will generate a thermometer code with a high-level output for the corresponding bit, the dynamic comparator output Voutp of the corresponding bit is the power supply voltage VDD, and the corresponding output Voutn is the ground voltage 0; similarly, when the input signal will generate a thermometer code with a low-level output for the corresponding bit, the dynamic comparator output Voutp of the corresponding bit is the ground voltage 0, and the corresponding output Voutn is the power supply voltage VDD.Taking the dynamic comparator corresponding to the 4th bit of the thermometer code as an example, when it is in the reset state, its output voltages Voutp4 and Voutn4 are both 0 voltage. When it is in the normal working state, that is, in the working range II, when the input signal will produce a high-level output thermometer code, that is, the 4th bit of the thermometer code value is 1, the output Voutp4 of the dynamic comparator is the power supply voltage VDD, corresponding to the high level of the digital signal, the signal value is 1, and the output Voutn4 of the dynamic comparator is the ground voltage 0, corresponding to the low level of the digital signal, and the signal value is 0; when the input signal will produce a low-level output thermometer code, that is, the 4th bit of the thermometer code value is 0, the output Voutp4 of the dynamic comparator is the ground voltage 0, corresponding to the low level of the digital signal, the signal value is 0, and the output Voutn4 of the dynamic comparator is the power supply voltage VDD, corresponding to the high level of the digital signal, and the signal value is 1.
[0031] In one embodiment, Figure 5As shown, when the 7-bit thermometer code is converted into a 3-bit binary code, in the decoding logic of the third binary code, the decoding logic further includes a MOS tube M11, the gate of the MOS tube M11 is connected to the fourth dynamic comparator output Voutp, the drain of the MOS tube M11 is connected to the node A in the decoding circuit, and the source of the MOS tube M11 is grounded; in the complementary decoding logic of the third binary code, the complementary decoding logic further includes a MOS tube M12, the gate of the MOS tube M12 is connected to the fourth dynamic comparator output Voutn, the drain of the MOS tube M12 is connected to the node B in the correction circuit, and the source of the MOS tube M12 is grounded. In the decoding logic of the second binary code, the decoding logic further includes a MOS tube M13, a MOS tube M14 and a MOS tube M15, the gate of the MOS tube M13 is connected to the second dynamic comparator output Voutp, the gate of the MOS tube M14 is connected to the fourth dynamic comparator output Voutn, the gate of the MOS tube M15 is connected to the output Voutp of the sixth dynamic comparator, the drain of the MOS tube M13 is connected to the source of the MOS tube M14, the sources of the MOS tube M13 and the MOS tube M15 are connected to the ground voltage, and the drains of the MOS tube M14 and the MOS tube M15 are connected to the node A in the decoding circuit; in the second In the complementary decoding logic of the 2-bit binary code, the complementary decoding logic also includes a MOS tube M16, a MOS tube M17 and a MOS tube M18, the gate of the MOS tube M16 is connected to the second dynamic comparator output Voutn, the gate of the MOS tube M17 is connected to the fourth dynamic comparator output Voutp, the gate of the MOS tube M18 is connected to the output Voutn of the sixth dynamic comparator, the source of the MOS tube M18 is connected to the drain of the MOS tube M16 and the drain of the MOS tube M17, the sources of the MOS tube M16 and the MOS tube M17 are connected to the ground voltage, and the drain of the MOS tube M18 is connected to the node B in the correction circuit;In the decoding logic of the first bit of binary code, the decoding logic also includes MOS tube M19, MOS tube M20, MOS tube M21, MOS tube M22, MOS tube M23, MOS tube M24 and MOS tube M25, the gate of the MOS tube M19 is connected to the first dynamic comparator output Voutp, the gate of the MOS tube M20 is connected to the second dynamic comparator output Voutn, the gate of the MOS tube M21 is connected to the third dynamic comparator output Voutp, and the gate of the MOS tube M22 is connected to the fourth dynamic comparator output Vout n, the gate of the MOS tube M23 is connected to the fifth dynamic comparator output Voutp, the gate of the MOS tube M24 is connected to the sixth dynamic comparator output Voutn, the gate of the MOS tube M25 is connected to the output Voutp of the seventh dynamic comparator, the drain of the MOS tube M19 is connected to the source of the MOS tube M20, the drain of the MOS tube M21 is connected to the source of the MOS tube M22, the drain of the MOS tube M23 is connected to the source of the MOS tube M24, the source of the MOS tube M19, the source of the MOS tube M21, the source of the MOS tube M23, The source of the MOS tube M25 is connected to the ground voltage, and the drains of the MOS tube M20, the drains of the MOS tube M22, the drains of the MOS tube M24, and the drains of the MOS tube M25 are connected to the node A in the decoding circuit; in the complementary decoding logic of the first bit binary code, the complementary decoding logic also includes MOS tubes M26, MOS tubes M27, MOS tubes M28, MOS tubes M29, MOS tubes M30, MOS tubes M31, and MOS tubes M32, the gate of the MOS tube M26 is connected to the first dynamic comparator output Voutn, the gate of the MOS tube M27 is connected to the second dynamic comparator output Voutp, the gate of the MOS tube M28 is connected to the third dynamic comparator output Voutn, and the gate of the MOS tube M29 is connected to the fourth dynamic comparator output Voutp. outp, the gate of MOS tube M30 is connected to the fifth dynamic comparator output Voutn, the gate of MOS tube M31 is connected to the sixth dynamic comparator output Voutp, the gate of MOS tube M32 is connected to the output Voutn of the seventh dynamic comparator, the source of MOS tube M32 is connected to the drain of MOS tube M31 and the drain of MOS tube M30, the source of MOS tube M31 is connected to the source of MOS tube M30, the drain of MOS tube M29 and the drain of MOS tube M28, the source of MOS tube M29 is connected to the source of MOS tube M28, the drain of MOS tube M27 and the drain of MOS tube M26, the sources of MOS tubes M26 and MOS tube M27 are connected to the ground voltage, and the drain of MOS tube M32 is connected to node B in the correction circuit.;
[0032] In this embodiment, the decoding logic of each bit and its complementary decoding logic are connected as a group to the decoding circuit and the correction circuit in parallel, wherein the expression for converting the first bit is:
[0033] D1=Voutp7*(Voutn6+Voutp5)*(Voutn4+Voutp3)*(Voutn2+Voutp1), and its corresponding complementary decoding logic is to invert the corresponding expression, that is, the expression of the corresponding complementary decoding logic is:
[0034] D1'=Voutn7+Voutp6*Voutn5+Voutp4*Voutn3+Voutp2*Voutn1;
[0035] The expression of the second bit conversion is D2=Voutp6*(Voutp2+Voutn4), and the corresponding complementary decoding logic expression is: D2'=Voutn6+Voutn2*Voutp4;
[0036] The expression of the third bit conversion is: D3=Voutp4, and the corresponding complementary decoding logic expression is:
[0037] D3'=Voutn4.
[0038] Since the output result of the comparator under normal working conditions is the power supply voltage VDD and the ground voltage 0, that is, the high level "1" and the low level "0" in the digital logic, then according to the above expression, when the dynamic comparator has an output voltage, the MOS tube controlled by the corresponding voltage of the decoding logic is in the on or off state, thereby pulling the voltage of node A and node B down to 0 or keeping it unchanged, thereby obtaining the corresponding decoding result.
[0039] Among them, the numbers after Voutp and Voutn represent the comparator outputs of the corresponding digits of the thermometer code, so that the corresponding circuits can be easily introduced. Specifically, Voutp1 and Vout1 represent the comparator outputs of the first digit of the thermometer code, Voutp2 and Vout2 represent the comparator outputs of the second digit of the thermometer code, Voutp3 and Vout3 represent the comparator outputs of the third digit of the thermometer code, Voutp4 and Vout4 represent the comparator outputs of the fourth digit of the thermometer code, Voutp5 and Vout5 represent the comparator outputs of the fifth digit of the thermometer code, Voutp6 and Vout6 represent the comparator outputs of the sixth digit of the thermometer code, and Voutp7 and Vout7 represent the comparator outputs of the seventh digit of the thermometer code.
[0040] Taking the second bit conversion logic of the three-bit binary code as an example, when the dynamic comparator is in the reset state, the CLKR voltage is 0, the output Voutp and Voutn of the dynamic comparator are both 0, the decoding logic and the complementary decoding logic are turned off, the voltages of nodes A and B are both VDD, M1 and M3 are turned off, VOUT is 0, and the overall decoding circuit is in the reset state; when the dynamic comparator is about to leave the reset state, the CLKR voltage rises from 0 to VDD, M1, M2, M3 and M4 are turned off, the decoding logic is also in the off state, nodes A and B are floating, and their voltages remain at VDD; when the dynamic comparator is in interval I of the working state, the generated level has no practical meaning, but the output voltages Voutp and Voutn of the dynamic comparator rise together, which will turn on the decoding logic and the complementary decoding logic, causing the voltages of nodes A and B to drop to 0, from M1 and M3 are also in the on state; when the dynamic comparator is in the working state interval II, the decoding logic and the complementary decoding logic will be in one of two states, one of which is that the decoding logic is on and the complementary decoding logic is off, that is, the value of D2 is 1, and the value of D2' is 0. Since the PMOS tube M3 is on and the complementary decoding logic is off, the voltage of node B rises to VDD, thereby turning off the PMOS tube M1. Since the decoding logic is on, the voltage of node A remains at 0, and the value of VOUT is VDD; the other state is that the decoding logic is off and the complementary decoding logic is on, that is, the value of D2 is 0, and the value of D2' is 1. Since the PMOS tube M1 is on and the decoding logic is off, the voltage of node A rises to VDD, thereby turning off the PMOS tube M3. Since the complementary decoding logic is on, the voltage of node B remains at 0, and the value of VOUT is 0.
[0041] In summary, the embodiment of the present invention ensures that the decoding result is not affected by the jitter of the dynamic comparator output by setting a correction circuit. Since the external control signal CLKR in the decoding circuit is independent of the time when the output signal of the dynamic comparator enters interval II, and the correction logic is completely generated by the correction circuit, it can effectively avoid the instantaneous decoding error caused by the simultaneous rise of the output of the dynamic comparator and the simultaneous conduction of the NMOS tubes of the decoding logic. At the same time, the decoding circuit and the correction circuit are less often in a state of being connected to the power ground, thereby effectively reducing the working power consumption of the overall circuit.
[0042] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A thermometer code to binary code conversion device, applied to dynamic comparator output, characterized in that: The conversion device includes a decoding circuit and a correction circuit electrically connected to the decoding circuit; The decoding circuit includes a PMOS tube M1, a PMOS tube M2, an inverter A2 and a decoding logic, the correction circuit includes a PMOS tube M3, a PMOS tube M4 and a complementary decoding logic, the drain of the PMOS tube M1 is respectively connected to the drain of the PMOS tube M2, the gate of the PMOS tube M3, the input end of the inverter A2, and the output node A of the decoding logic, the drain of the PMOS tube M3 is respectively connected to the drain of the PMOS tube M4, the gate of the PMOS tube M1, the output node A of the complementary decoding logic The gate of the PMOS tube M2 is connected to the external reset voltage CLKR, and the source of the PMOS tube M1 and the source of the PMOS tube M2 are both connected to the power supply voltage VDD; the gate of the PMOS tube M4 is connected to the external reset voltage CLKR, and the source of the PMOS tube M3 and the source of the PMOS tube M4 are both connected to the power supply voltage VDD; the output end of the inverter A2 is connected to the output voltage VOUT.
2. A device for converting thermometer code to binary code according to any one of claim 1, characterized in that: The dynamic comparator includes a MOS transistor MN1, a MOS transistor MN2, a MOS transistor MN3, a MOS transistor MN4, a MOS transistor MN5, a MOS transistor MN6, a MOS transistor MN7, a MOS transistor MP1, a MOS transistor MP2, a MOS transistor MP3, a MOS transistor MP4 and a MOS transistor MP5. The gates of the MOS transistors MN1, MP1 and MP2 are all connected to an external control signal CLKR, the gate of the MOS transistor MN2 is connected to an external control signal Vip, the gate of the MOS transistor MN3 is connected to an external control signal Vin, the drain of the MOS transistor MN1 is connected to the source of the MOS transistor MN2 and the MOS transistor MN3, the drain of the MOS transistor MN2 is respectively connected to the drain of the MOS transistor MP1 and the gate of the MOS transistor MN4, the drain of the MOS transistor MN3 is connected to the drain of the MOS transistor MP2 and the gate of the MOS transistor MP5. The gate of the MOS tube N7 is connected to the gate of the MOS tube N7, the drain of the MOS tube MN4 as the output node Voutp is respectively connected to the drain of the MOS tube MN5, the drain of the MOS tube MP3, the gate of the MOS tube MN6 and the gate of the MOS tube MP4, the drain of the MOS tube MN7 as the output node Voutn is respectively connected to the drain of the MOS tube MN6, the drain of the MOS tube MP4, the gate of the MOS tube MN5 and the gate of the MOS tube MP3, the drain of the MOS tube MP5 is respectively connected to the source of the MOS tube MP3 and the source of the MOS tube MP4, the gate of the MOS tube MP5 is connected to the external control signal CLKB, the sources of the MOS tubes MN1, MOS tube MN4, MOS tube MN5, MOS tube MN6 and MOS tube MN7 are all grounded, and the sources of the MOS tubes MP1, MOS tube MP2 and MOS tube MP5 are all connected to the power supply voltage.
3. A device for converting thermometer code to binary code according to claim 2, characterized in that: When the 7-bit thermometer code is converted into a 3-bit binary code, in the decoding logic of the third binary code, the decoding logic further includes a MOS tube M11, the gate of the MOS tube M11 is connected to the fourth dynamic comparator output Voutp, the drain of the MOS tube M11 is connected to the node A in the decoding circuit, and the source of the MOS tube M11 is grounded; in the complementary decoding logic of the third binary code, the complementary decoding logic further includes a MOS tube M12, the gate of the MOS tube M12 is connected to the fourth dynamic comparator output Voutn, the drain of the MOS tube M12 is connected to the node B in the correction circuit, and the source of the MOS tube M12 is grounded.
4. A device for converting thermometer code to binary code according to claim 3, characterized in that: In the decoding logic of the second binary code, the decoding logic further includes a MOS tube M13, a MOS tube M14 and a MOS tube M15, the gate of the MOS tube M13 is connected to the second dynamic comparator output Voutp, the gate of the MOS tube M14 is connected to the fourth dynamic comparator output Voutn, the gate of the MOS tube M15 is connected to the output Voutp of the sixth dynamic comparator, the drain of the MOS tube M13 is connected to the source of the MOS tube M14, the sources of the MOS tube M13 and the MOS tube M15 are connected to the ground voltage, and the drains of the MOS tube M14 and the MOS tube M15 are connected to the node A in the decoding circuit; in the second In the complementary decoding logic of the 2-bit binary code, the complementary decoding logic also includes a MOS tube M16, a MOS tube M17 and a MOS tube M18, the gate of the MOS tube M16 is connected to the second dynamic comparator output Voutn, the gate of the MOS tube M17 is connected to the fourth dynamic comparator output Voutp, the gate of the MOS tube M18 is connected to the output Voutn of the sixth dynamic comparator, the source of the MOS tube M18 is connected to the drain of the MOS tube M16 and the drain of the MOS tube M17, the sources of the MOS tube M16 and the MOS tube M17 are connected to the ground voltage, and the drain of the MOS tube M18 is connected to the node B in the correction circuit.
5. The device for converting thermometer code to binary code according to claim 4, characterized in that: In the decoding logic of the first bit of binary code, the decoding logic also includes MOS tube M19, MOS tube M20, MOS tube M21, MOS tube M22, MOS tube M23, MOS tube M24 and MOS tube M25, the gate of the MOS tube M19 is connected to the first dynamic comparator output Voutp, the gate of the MOS tube M20 is connected to the second dynamic comparator output Voutn, the gate of the MOS tube M21 is connected to the third dynamic comparator output Voutp, and the gate of the MOS tube M22 is connected to the fourth dynamic comparator output Vout n, the gate of the MOS tube M23 is connected to the fifth dynamic comparator output Voutp, the gate of the MOS tube M24 is connected to the sixth dynamic comparator output Voutn, the gate of the MOS tube M25 is connected to the output Voutp of the seventh dynamic comparator, the drain of the MOS tube M19 is connected to the source of the MOS tube M20, the drain of the MOS tube M21 is connected to the source of the MOS tube M22, the drain of the MOS tube M23 is connected to the source of the MOS tube M24, the source of the MOS tube M19, the source of the MOS tube M21, the source of the MOS tube M23, The source of the MOS tube M25 is connected to the ground voltage, and the drains of the MOS tube M20, the drains of the MOS tube M22, the drains of the MOS tube M24, and the drains of the MOS tube M25 are connected to the node A in the decoding circuit; in the complementary decoding logic of the first bit binary code, the complementary decoding logic also includes MOS tubes M26, MOS tubes M27, MOS tubes M28, MOS tubes M29, MOS tubes M30, MOS tubes M31, and MOS tubes M32, the gate of the MOS tube M26 is connected to the first dynamic comparator output Voutn, the gate of the MOS tube M27 is connected to the second dynamic comparator output Voutp, the gate of the MOS tube M28 is connected to the third dynamic comparator output Voutn, and the gate of the MOS tube M29 is connected to the fourth dynamic comparator output Voutp. outp, the gate of the MOS tube M30 is connected to the fifth dynamic comparator output Voutn, the gate of the MOS tube M31 is connected to the sixth dynamic comparator output Voutp, the gate of the MOS tube M32 is connected to the output Voutn of the seventh dynamic comparator, the source of the MOS tube M32 is connected to the drain of the MOS tube M31 and the drain of the MOS tube M30, the source of the MOS tube M31 is connected to the source of the MOS tube M30, the drain of the MOS tube M29, and the drain of the MOS tube M28, the source of the MOS tube M29 is connected to the source of the MOS tube M28, the drain of the MOS tube M27, and the drain of the MOS tube M26, the sources of the MOS tubes M26 and M27 are connected to the ground voltage, and the drain of the MOS tube M32 is connected to the node B in the correction circuit.
