A range switching circuit and an apparatus for chip power consumption test

By controlling the switching switch through a switch driver circuit to switch the sampling resistor, the problem of slow range switching speed in chip power consumption testing is solved, the testing requirements for rapid current changes are met, and costs are reduced.

CN225032102UActive Publication Date: 2026-11-27MAXIO TECHNOLOGY (HANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202522554346.2
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-11-27
Estimated Expiration
2035-12-01

AI Technical Summary

Technical Problem

Existing technologies for chip power consumption testing have slow range switching speeds, making it difficult to meet the testing requirements for rapid current changes, and are also costly.

Method used

A switch-driven circuit is used to control the switching switch to be on or off, thereby switching the sampling resistor and directly switching the range, avoiding the process of ADC conversion and MCU judgment.

Benefits of technology

It speeds up range switching, reduces costs, and improves circuit scalability, making it suitable for applications requiring multiple current sensing channels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN225032102U_ABST
    Figure CN225032102U_ABST
Patent Text Reader

Abstract

The application discloses a range switching circuit and a device for chip power consumption test, and belongs to the field of testing. The range switching circuit comprises a first sampling resistor, a second sampling resistor, a switching switch, a first signal amplifier, a second signal amplifier and a switch driving circuit. The first sampling resistor and the second sampling resistor are connected in parallel. The second sampling resistor is connected with the switching switch in series. The first sampling resistor is connected with the switch driving circuit through the first signal amplifier, the second sampling resistor is connected with the switch driving circuit through the second signal amplifier, and the switch driving circuit is connected with the control end of the switching switch.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of testing, specifically relating to a range switching circuit and an apparatus for chip power consumption testing. Background Technology

[0002] Currently, in the power consumption testing of various chips, it is necessary to test the operating current of the chip under different power consumption states, and the operating current of the chip varies greatly under different power consumption states. In order to improve the test range and test accuracy, power consumption testing equipment usually needs to be set with multiple ranges. When the measured current is small, the smaller range range is switched for testing, and when the measured current is large, the larger range range is switched for testing.

[0003] In related technologies, operational amplifiers are generally used to acquire and amplify the measured signal. The amplified measured signal is then converted by an analog-to-digital converter (ADC) and input into a microcontroller unit (MCU) to determine the current magnitude. The MCU then adjusts the value of the feedback resistor of the operational amplifier according to the determination result, thereby adjusting it to a suitable range.

[0004] However, the related technologies suffer from slow range switching speeds, making it difficult to meet practical testing needs. This is because, in the process of using an MCU to control and switch ranges, the operational amplifier acquires and amplifies the measured signal, which then undergoes ADC conversion before being input to the MCU for program execution and judgment. Limited by the performance of the ADC and MCU, the range switching speed is often slow. In scenarios where the chip's operating current changes rapidly, this can easily cause chip malfunctions, making it difficult to meet actual testing requirements. Utility Model Content

[0005] This application provides a range switching circuit and a device for chip power consumption testing. It can use a switch driving circuit to control the switching switch to be turned on or off, thereby switching the sampling resistor and thus switching the range. Compared with related technologies, it is not necessary to convert the measured signal through an ADC and then input it into an MCU for program execution to switch the range. Instead, it directly uses the switch driving circuit to control the switching switch to achieve the range switching, which speeds up the range switching speed and solves the problem of slow range switching speed in related technologies, which is difficult to meet the actual testing needs.

[0006] In a first aspect, embodiments of this application provide a range switching circuit, including: a first sampling resistor, a second sampling resistor, a switching switch, a first signal amplifier, a second signal amplifier, and a switch driving circuit; The first sampling resistor and the second sampling resistor are connected in parallel; the second sampling resistor is connected in series with the switch; the first sampling resistor is connected to the switch driving circuit through the first signal amplifier, the second sampling resistor is connected to the switch driving circuit through the second signal amplifier, and the switch driving circuit is connected to the control terminal of the switch.

[0007] Secondly, embodiments of this application provide an apparatus for chip power consumption testing, including the range switching circuit described in the first aspect.

[0008] In this embodiment, the range switching circuit includes a first sampling resistor, a second sampling resistor, a switching switch, a first signal amplifier, a second signal amplifier, and a switch driving circuit. The first sampling resistor and the second sampling resistor are connected in parallel. The second sampling resistor and the switching switch are connected in series. The first sampling resistor is connected to the switch driving circuit through the first signal amplifier, and the second sampling resistor is connected to the switch driving circuit through the second signal amplifier. The switch driving circuit is connected to the control terminal of the switching switch. Thus, in the range switching circuit provided in this embodiment, because the first sampling resistor and the second sampling resistor are connected in parallel, the second sampling resistor is connected in series with the switching switch, and the switch driving circuit is connected to the control terminal of the switching switch, the switch driving circuit can control the switching switch to be on or off, thereby switching the sampling resistor and thus switching the range. Compared with related technologies, it eliminates the need for ADC conversion of the measured signal before inputting it into the MCU for program execution and range switching. Instead, it directly uses the switch driving circuit—a hardware control of the switching switch—to achieve range switching, accelerating the range switching speed and solving the problem of slow range switching speed in related technologies, which is difficult to meet actual testing needs. Attached Figure Description

[0009] Figure 1 A schematic structural diagram of a range switching circuit provided in some embodiments of this application; Figure 2 A schematic structural diagram of a range switching circuit provided in some embodiments of this application; Figure 3 A schematic structural diagram of a range switching circuit provided in some embodiments of this application; Figure 4 This is a schematic structural diagram of an apparatus for chip power consumption testing provided in some embodiments of this application.

[0010] Explanation of reference numerals in the attached figures: 10 - Range switching circuit; IN - Input terminal of range switching circuit; OUT - Output terminal of range switching circuit; R S1 - First sampling resistor; R S2- Second sampling resistor; T1 - Switch; U1 - First signal amplifier; U2 - Second signal amplifier; 100 - Switch drive circuit; U3 - First comparator; V ref1 - First reference voltage terminal; U4 - Second comparator; V ref2 - Second reference voltage terminal; 110 - Logic circuit; U5 - OR gate; U6 - NOT gate; U7 - XOR gate; R1 - First resistor; R2 - Second resistor; M1 - First transistor; M2 - Second transistor; V CC - Power supply voltage terminal; MCU - Microcontroller unit; ADC - Analog-to-digital converter; 40 - Device for chip power consumption testing. Detailed Implementation

[0011] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0012] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0013] In the description of this application, it should be understood that the terms "inner" and "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.

[0014] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "connection" and "coupled" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; a mechanical connection or an electrical connection; a wired connection or a wireless connection; a direct connection or an indirect connection through an intermediate medium; or a connection within two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0015] The terminology used in the implementation section of this application is for the purpose of explaining specific embodiments of this application only, and is not intended to limit this application.

[0016] The range switching circuit provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.

[0017] Figure 1 This is a schematic structural diagram of a range switching circuit provided in an embodiment of this application.

[0018] like Figure 1 As shown, the range switching circuit 10 provided in this embodiment may include: a first sampling resistor R S1 Second sampling resistor R S2 The system includes a switching switch T1, a first signal amplifier U1, a second signal amplifier U2, and a switch drive circuit 100. First sampling resistor R S1 With the second sampling resistor R S2 Parallel connection; second sampling resistor R S2 Connected in series with switch T1; first sampling resistor R S1 The first signal amplifier U1 is connected to the switch drive circuit 100, and the second sampling resistor R... S2 The second signal amplifier U2 is connected to the switch drive circuit 100, and the switch drive circuit 100 is connected to the control terminal of the switching switch T1.

[0019] In this embodiment, the measurement range is associated with the sampling resistor. The smaller the resistance value of the sampling resistor, the larger the measurement range. The switch driving circuit 100 can control the switching switch T1 to be turned on or off, thereby switching the sampling resistor and thus switching the measurement range. For example, when the switch driving circuit 100 controls the switching switch T1 to be in the on state, the resistance value of the sampling resistor is based on the first sampling resistor R connected in parallel. S1 With the second sampling resistor R S2 The total resistance is determined, and in this case, it corresponds to the first range. When the switch drive circuit 100 controls the switching switch T1 to be in the open state, the resistance value of the sampling resistor is based on the first sampling resistor R. S1 Once the resistance value is determined, this corresponds to the second range.

[0020] To improve testing accuracy, the first sampling resistor R S1 The resistance value can be greater than that of the second sampling resistor R. S2 The resistance value makes the first sampling resistor R connected in parallel... S1 With the second sampling resistor R S2 The total resistance can be approximately equal to the second sampling resistor R. S2The resistance value.

[0021] For example, with the first sampling resistor R S1 The resistance is 0.5 ohms, and the second sampling resistor R S2 Taking a resistance of 0.005 ohms as an example, when the switch T1 is in the on state, the resistance of the sampling resistor is the same as the first sampling resistor R connected in parallel. S1 With the second sampling resistor R S2 The total resistance (0.00495 ohms) is approximately equal to the second sampling resistor R. S2 The resistance of the sampling resistor is 0.005 ohms, corresponding to a first range of several μA current. When the switch T1 is in the open state, the resistance of the sampling resistor is 0.5 ohms, corresponding to a second range of several A current. Thus, by controlling the switching switch T1 to be on or off through the switch drive circuit 100, the switching between the first and second ranges can be achieved, while simultaneously measuring currents in the μA to A range.

[0022] It should be noted that the method of switching the range by converting the measured signal through an ADC and then inputting it into an MCU for program execution is limited by the performance of the ADC and MCU. This often results in a slow range switching speed, which can easily cause chip malfunctions in testing scenarios with rapid current changes. Using a high-performance ADC and MCU would increase costs. Furthermore, the amplification factor is also limited by the performance of the operational amplifier. In contrast, the embodiment of this application uses a switch driver circuit 100 to control the switching switch T1 to turn on or off, thereby switching the sampling resistor and thus switching the range. This improves the range switching speed, saves costs, and offers good scalability, making it suitable for applications requiring multiple current detection channels.

[0023] Thus, in the range switching circuit provided in this application embodiment, due to the first sampling resistor R S1 With the second sampling resistor R S2 Parallel connection; second sampling resistor R S2 Connected in series with the switch T1, the switch drive circuit 100 is connected to the control terminal of the switch T1. The switch drive circuit 100 can control the switch T1 to be turned on or off, thereby switching the sampling resistor and thus switching the measurement range. Compared with related technologies, it is not necessary to convert the measured signal through an ADC and then input it into the MCU for program execution to switch the range. Instead, the switch drive circuit 100 is used directly to control the switch T1 to switch the range, which speeds up the range switching speed and solves the problem of slow range switching speed in related technologies, which is difficult to meet the actual testing requirements.

[0024] The range switching circuit 10 provided in this application embodiment will be illustrated below with examples of the specific structures of each functional module in the range switching circuit 10.

[0025] In practical applications, the first signal amplifier U1 and the second signal amplifier U2 have signal acquisition and signal amplification functions. The first signal amplifier U1 and the second signal amplifier U2 can be operational amplifiers, differential amplifiers, or other types of amplifiers. Differential amplifiers have better anti-interference performance than operational amplifiers. This application does not limit the specific types of the first signal amplifier U1 and the second signal amplifier U2.

[0026] In practical applications, such as Figure 1 As shown, the range switching circuit 10 has an input terminal IN and an output terminal OUT; The input terminal IN of the range switching circuit 10 is connected to the first sampling resistor R. S1 The first terminal is connected to the first sampling resistor R. S1 The first terminal is also connected to the first terminal of the first signal amplifier U1, and the first sampling resistor R S1 The second terminal is connected to the second terminal of the first signal amplifier U1, and the third terminal of the first signal amplifier U1 is connected to the switch drive circuit 100; the third terminal of the first signal amplifier U1 is also connected to the output terminal OUT of the range switching circuit 10. The input terminal IN of the range switching circuit 10 is also connected to the second sampling resistor R via a switching switch T1. S2 The first terminal is connected to the second sampling resistor R. S2 The first terminal is also connected to the first terminal of the second signal amplifier U2, and the second sampling resistor R S2 The second terminal is connected to the first sampling resistor R S1 The second terminal is connected to the second sampling resistor R. S2 The second terminal is also connected to the second terminal of the second signal amplifier U2, and the third terminal of the second signal amplifier U2 is connected to the switch drive circuit 100; the third terminal of the second signal amplifier U2 is also connected to the output terminal OUT of the range switching circuit 10.

[0027] In this embodiment, the input terminal IN of the range switching circuit 10 can be used to input the signal to be measured. When the switching switch T1 is in the open state, the signal to be measured flows through the first sampling resistor R. S1 The first signal amplifier U1 is connected to the first sampling resistor R. S1 The signal under test is frequently sampled and amplified, and then output to the output terminal OUT of the range switching circuit 10, where it can be converted from analog to digital by an analog-to-digital converter (ADC).

[0028] In this embodiment, the input terminal IN of the range switching circuit 10 can be used to input the signal to be measured. When the switching switch T1 is in the on state, the signal to be measured can flow through the second sampling resistor R. S2 The second signal amplifier U2 is connected to the second sampling resistor R. S2 The signal to be measured is sampled and amplified, and then output to the output terminal OUT of the range switching circuit 10. It can then be converted from analog to digital by an analog-to-digital converter (ADC).

[0029] In this embodiment, the switch driving circuit 100 can output a control signal based on the signal output by the first signal amplifier U1 or the second signal amplifier U2 to control whether the working state of the switching switch T1 is on or off, thereby switching to a suitable range for testing.

[0030] For example, when the current of the signal to be measured input at the input terminal IN of the range switching circuit 10 is greater than the second preset current I2, the switching switch T1 is in the on state. When the current of the signal to be tested input at the input terminal IN is less than the first preset current I1, the switch T1 is in the off state. Wherein, the second preset current I2 is greater than or equal to the first preset current I1.

[0031] Thus, in high-current testing scenarios, such as when the current of the signal under test is greater than the second preset current I2, the switching switch T1 can be in the conducting state, thereby utilizing the second sampling resistor R. S2 The second signal amplifier U2 samples and amplifies the signal under test, with a corresponding second range for high currents in the several amperes range. In low-current testing scenarios, such as when the current of the signal under test is less than the first preset current I1, the switch T1 can be in the open state, thus utilizing the first sampling resistor R... S1 The first signal amplifier U1 samples and amplifies the signal under test, and the corresponding first range is a small current in the range of a few uA.

[0032] In a specific example, such as Figure 2 As shown, the switch driving circuit 100 may include a first comparator U3, a second comparator U4, and a logic circuit 110; The first input terminal of the first comparator U3 is connected to the third terminal of the first signal amplifier U1, and the second input terminal of the first comparator U3 is connected to the first reference voltage terminal V. ref1 The output of the first comparator U3 is connected to the first input of the logic circuit 110; The first input terminal of the second comparator U4 is connected to the third terminal of the second signal amplifier U2, and the second input terminal of the second comparator U4 is connected to the second reference voltage terminal V.ref2 The output of the second comparator U4 is connected to the second input of the logic circuit 110; The output terminal of logic circuit 110 is coupled to the control terminal of switch T1.

[0033] Among them, the first reference voltage terminal V ref1 The reference voltage can be determined based on the first preset current I1. Therefore, the first comparator U3 can be used to determine the relationship between the current of the signal under test and the first preset current I1. For example, if the current of the signal under test is less than the first preset current I1, the output of the first signal amplifier U1 will be less than the first reference voltage terminal V. ref1 When the reference voltage is found, the first comparator U3 outputs a low-level signal; conversely, when the current of the signal under test is greater than the first preset current I1, the output of the first signal amplifier U1 is greater than the first reference voltage V. ref1 The reference voltage is used, and the first comparator U3 outputs a high-level signal.

[0034] Among them, the second reference voltage terminal V ref2 The reference voltage can be determined based on the second preset current I2. Therefore, the second comparator U4 can be used to determine the relationship between the current of the signal under test and the second preset current I2. For example, if the current of the signal under test is less than the second preset current I2, the output of the second signal amplifier U2 will be less than the second reference voltage V. ref2 When the reference voltage is greater than the second preset current I2, the second comparator U4 outputs a low-level signal; conversely, when the current of the signal under test is greater than the second preset current I2, the output of the second signal amplifier U2 is greater than the second reference voltage V. ref2 The reference voltage is used, and the second comparator U4 outputs a high-level signal.

[0035] The logic circuit 110 can determine the relationship between the current of the signal under test and the first preset current I2 and the second preset current I2 based on the output of the first comparator U3 and the output of the second comparator U4. Based on the relationship between the current of the signal under test and the first preset current I1 and the second preset current I2, the logic circuit 110 generates and outputs a control signal to the control terminal of the switching switch T1. The control signal is used to control the working state of the switching switch T1.

[0036] For example, if logic circuit 110 determines, based on the output signal of the first comparator U3, that the current of the signal under test is greater than the second preset current I2, it can output a first control signal to the control terminal of the switch T1 to turn on the switch T1, thereby switching to a suitable large range (e.g., a second range of several A) to test a larger current. The first control signal can be a high-level signal.

[0037] For example, if logic circuit 110 determines, based on the output signal of the second comparator U4, that the current of the signal under test is less than the first preset current I1, it can output a second control signal to the control terminal of the switch T1 to make the switch T1 open, thereby switching to a suitable small range (e.g., the first range at a few μA) for testing a smaller current. The second control signal can be a low-level signal.

[0038] Thus, in this embodiment of the application, the magnitude relationship between the current of the signal under test and the first preset current I1 and the second preset current I2 can be determined based on the output of the first comparator U3 and the output of the second comparator U4. Then, the logic circuit 110 generates a control signal based on the output of the first comparator U3 and the output of the second comparator U4 to control the working state of the switching switch T1, so as to turn on the switching switch T1 to switch to a suitable large range (e.g., a second range of several A) for testing a larger current, or turn off the switching switch T1 to switch to a suitable small range (e.g., a first range of several μA) for testing a smaller current.

[0039] In a specific example, such as Figure 3 As shown, in order to enable the logic circuit 110 to quickly generate the control signal for the switching switch T1, the logic circuit 110 may include an OR gate U5. The first input terminal of the OR gate U5 is connected to the output terminal of the first comparator U3, the second input terminal of the OR gate U5 is connected to the output terminal of the second comparator U4, and the output terminal of the OR gate U5 is coupled to the control terminal of the switching switch T1.

[0040] Among them, OR gate U5 can generate a control signal based on the output of the first comparator U3 and the output of the second comparator U4, and output the control signal to the control terminal of the switch T1 to control the working state of the switch T1.

[0041] For example, when the current of the signal to be measured is greater than the second preset current I2, the first comparator U3 outputs a high-level signal to the OR gate U5, the second comparator U4 also outputs a high-level signal to the OR gate U5, and the OR gate U5 outputs a high-level signal to the control terminal of the switch T1, so that the switch T1 is in the conducting state, thereby switching the appropriate large range (e.g., the second range of several A) to perform a larger current test.

[0042] For example, when the current of the signal to be measured is less than the second preset current I2 and greater than the first preset current I1, the first comparator U3 outputs a high-level signal to the OR gate U5, the second comparator U4 outputs a low-level signal to the OR gate U5, and the OR gate U5 outputs a high-level signal to the control terminal of the switch T1, so that the switch T1 is in the conducting state, thereby switching the appropriate large range (e.g., the second range of several A) to perform a larger current test.

[0043] For example, when the current of the signal to be measured is less than the first preset current I1, the first comparator U3 outputs a low-level signal to the OR gate U5, the second comparator U4 also outputs a low-level signal to the OR gate U5, and the OR gate U5 outputs a low-level signal to the control terminal of the switch T1, so that the switch T1 is in the open state, thereby disconnecting the switch T1 and switching to a suitable small range (e.g., the first range of a few uA) for testing a smaller current.

[0044] Of course, in addition to OR gates, other logic gates can also be used in the embodiments of this application to implement the control function of the switching switch. The embodiments of this application do not limit the specific structure of the logic circuit.

[0045] In addition, in practical applications, in order to fix the current sampling range to the large range mode, such as Figure 3 As shown, the range switching circuit 10 may also include a microcontroller unit (MCU), and the OR gate U5 may also include a third input terminal, which is connected to the third input terminal of the OR gate U5.

[0046] Thus, in scenarios where the current sampling range needs to be fixed to a large range mode, the microcontroller unit (MCU) can input a high-level signal to the third input terminal of the OR gate U5, thereby causing the OR gate U5 to output a high-level signal to the control terminal of the switch T1, so that the switch T1 is in the conducting state, thereby enabling the switch T1 to switch to a suitable large range (e.g., the second range at several A levels) for testing a larger current.

[0047] In a specific example, to achieve electrical isolation of the control terminal of the switch T1, such as Figure 3 As shown, the switch driving circuit 100 provided in this application embodiment may further include a first resistor R1, a first transistor M1, a second transistor M2, and a second resistor R2. The first terminal of the first transistor M1 is connected to the power supply voltage terminal V. CCThe second terminal of the first transistor M1 is coupled to the control terminal of the switch T1, and the second terminal of the first transistor M1 is also grounded through the second resistor R2; the third terminal of the first transistor M1 is connected to the first terminal of the second transistor M2, and the first terminal of the second transistor M2 is also connected to the power supply voltage terminal V through the first resistor R1. CC The second transistor M2 is connected to ground, and the third transistor M2 is connected to the output of logic circuit 110.

[0048] For example, when a high-level signal is output at the output terminal of logic circuit 110, the second transistor M2 is turned off and the first transistor M1 is turned on, so that the control terminal of switch T1 receives a high-level signal, thereby turning switch T1 on.

[0049] For example, when a low-level signal is output at the output terminal of logic circuit 110, the second transistor M2 is turned on and the first transistor M1 is turned off, so that the control terminal of switch T1 receives a low-level signal, thereby putting switch T1 in the off state.

[0050] In this way, the control terminal of the switch T1 and the output terminal of the logic circuit 110 are electrically isolated by the first transistor M1 and the second transistor M2, thereby improving the reliability of the control signal of the switch T1.

[0051] For example, in a specific example, the first transistor M1 includes an NMOS transistor, and the second transistor M2 includes a PMOS transistor; the third terminal of the first transistor M1 is the gate, and the third terminal of the second transistor M2 is the gate; wherein, as Figure 3 As shown, when logic circuit 110 includes OR gate U5, the output terminal of OR gate U5 is connected to the third terminal of the second transistor M2.

[0052] Among them, in V CC Upon initial power-up, the first transistor M1 (e.g., an NMOS transistor) is turned on, and the control terminal of the switch T1 is at a high level, so that the switch T1 is in the on state. The initial range is the large range setting, and the test is performed while maintaining the large range setting.

[0053] When the current of the signal under test continues to decrease until it is less than the preset value I1, the output of the first signal amplifier U1 is less than the first reference voltage V. ref1 When the reference voltage is reached, the first comparator U3 outputs a low-level signal, and at this time, the output of the second signal amplifier U2 is also less than the second reference voltage terminal V. ref2The reference voltage is used, the second comparator U4 outputs a low-level signal, the OR gate U5 outputs a low-level signal, the second transistor M2 (e.g., a PMOS transistor) remains on, the first transistor M1 (e.g., an NMOS transistor) remains off, the control terminal of the switch T1 is in a low-level state, and the test is switched to a small range.

[0054] When the current of the signal under test continues to increase until it exceeds the second preset current I2, that is, when the output of the second signal amplifier U2 exceeds the second reference voltage V... ref2 The reference voltage is set, the second comparator U4 outputs a high-level signal, the OR gate U5 outputs a high-level signal, the second transistor M2 (e.g., a PMOS transistor) remains off, the first transistor M1 (e.g., an NMOS transistor) remains on, the control terminal of the switch T1 is at a high level, and the test is switched to the large range.

[0055] In addition, in practical applications, to avoid the problem of switching between large and small ranges, such as Figure 3 As shown, the logic circuit 110 provided in this application embodiment may further include NOT gate U6 and XOR gate U7; the output terminal of the first comparator U3 is connected to the first input terminal of XOR gate U7, the output terminal of the second comparator U4 is connected to the second input terminal of XOR gate U7 through NOT gate U6, and the output terminal of XOR gate U7 is connected to the control terminal of the first comparator U3.

[0056] It should be noted that the output of the first comparator U3 in this embodiment has a locking function, and the low-level control signal is valid. By sending the low-level signal from the XOR gate U7 to the control terminal of the first comparator U3, the output value of the first comparator U3 can be locked, thereby avoiding the problem of switching back and forth between large and small ranges.

[0057] For example, at the instant of switching from a small range to a large range, that is, during the process of the current of the signal under test continuously increasing from less than the second preset current I2 to greater than the second preset current I2, when the current of the signal under test is less than the second preset current I2, the first comparator U3 outputs a high-level signal "1", the second comparator U3 outputs a low-level signal "0", the NOT gate U6 outputs a high-level signal "1", and the XOR gate U7 outputs a low-level signal "0" to the control terminal of the first comparator U3. The first comparator U3 has a locking function and is active low. The output of the first comparator U3 is locked at the high-level signal "1". This ensures that during the process of switching from a small range to a large range, the switching transistor remains in the conducting state and will not switch back and forth.

[0058] Furthermore, as the current of the signal under test continues to increase until it exceeds the second preset current I2, the output of the second signal amplifier U2 exceeds the second reference voltage V. ref2When the reference voltage is reached, the second comparator U3 outputs a high-level signal "1", the NOT gate U6 outputs a low-level signal "0", and the XOR gate U7 outputs a high-level signal "1", and the state lock of the first comparator U3 is released.

[0059] Thus, at the instant of switching from a small range to a large range, this embodiment of the application uses the output control signals from the NOT gate U6 and the XOR gate U7 to lock the output of the first comparator U3 at a high level signal "1", thereby ensuring that the switching transistor remains continuously conducting during the process of switching from a small range to a large range, avoiding the problem of switching back and forth between large and small ranges.

[0060] Of course, in addition to NOT gates and XOR gates, other logic gate circuits can also be used in the embodiments of this application to implement the output state locking function of the first comparator U3. The embodiments of this application do not limit the specific structure of the logic circuit.

[0061] Based on the same concept as the range switching circuit provided in the above embodiments, this application embodiment can also provide a device for chip power consumption testing.

[0062] like Figure 4 As shown in the figure, this application provides an apparatus 40 for chip power consumption testing, including an analog-to-digital converter (ADC) and a range switching circuit 10 provided in the above embodiment, wherein the output terminal of the range switching circuit 10 is connected to the analog-to-digital converter (ADC).

[0063] The analog-to-digital converter (ADC) can perform analog-to-digital conversion on the measured signal output from the first signal amplifier or the second signal amplifier in the range switching circuit 10, thereby realizing current sampling of the measured signal.

[0064] It should be noted that the device 40 for chip power consumption testing provided in this application embodiment includes the range switching circuit 10 provided in the above embodiment and can achieve the same function. To avoid repetition, it will not be described again here.

[0065] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0066] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A range switching circuit, characterized in that, include: First sampling resistor (R) S1 ), second sampling resistor (R) S2 ), switching switch (T1), first signal amplifier (U1), second signal amplifier (U2) and switch drive circuit (100); The first sampling resistor (R) S1 ) and the second sampling resistor (R) S2 The second sampling resistor (R) is connected in parallel; S2 The first sampling resistor (R) is connected in series with the switching switch (T1); S1 The first signal amplifier (U1) is connected to the switch drive circuit (100), and the second sampling resistor (R) is connected to the switch drive circuit (100). S2 The second signal amplifier (U2) is connected to the switch driving circuit (100), and the switch driving circuit (100) is connected to the control terminal of the switching switch (T1).

2. The range switching circuit according to claim 1, characterized in that, The range switching circuit (10) has an input terminal (IN) and an output terminal (OUT). The input terminal (IN) of the range switching circuit (10) and the first sampling resistor (R) S1 The first terminal of the first sampling resistor (R) is connected to the first sampling resistor (R). S1 The first terminal of the first sampling resistor (R) is also connected to the first terminal of the first signal amplifier (U1). S1 The second end of the first signal amplifier (U1) is connected to the second end of the first signal amplifier (U1), and the third end of the first signal amplifier (U1) is connected to the switch drive circuit (100); the third end of the first signal amplifier (U1) is also connected to the output terminal (OUT) of the range switching circuit (10); The input terminal (IN) of the range switching circuit (10) is also connected to the second sampling resistor (R) via the switching switch (T1). S2 The first terminal of the sampling resistor (R) is connected, and the second sampling resistor (R) is connected. S2 The first terminal of the second sampling resistor (R) is also connected to the first terminal of the second signal amplifier (U2), and the second sampling resistor (R) S2 The second terminal of ) is connected to the first sampling resistor (R) S1 The second terminal of the second sampling resistor (R) is connected to the second sampling resistor (R). S2 The second end of the second signal amplifier (U2) is also connected to the second end of the second signal amplifier (U2), and the third end of the second signal amplifier (U2) is connected to the switch drive circuit (100); the third end of the second signal amplifier (U2) is also connected to the output terminal (OUT) of the range switching circuit (10).

3. The range switching circuit according to claim 2, characterized in that, When the current of the signal to be measured input at the input terminal (IN) of the range switching circuit (10) is greater than the second preset current, the switching switch (T1) is in the on state. When the current of the signal to be tested input at the input terminal (IN) is less than the first preset current, the switching switch (T1) is in the off state; Wherein, the second preset current is greater than or equal to the first preset current.

4. The range switching circuit according to claim 2, characterized in that, The switch driving circuit (100) includes a first comparator (U3), a second comparator (U4), and a logic circuit (110). The first input terminal of the first comparator (U3) is connected to the third terminal of the first signal amplifier (U1), and the second input terminal of the first comparator (U3) is connected to the first reference voltage terminal (V). ref1 The output of the first comparator (U3) is connected to the first input of the logic circuit (110); the first input of the second comparator (U4) is connected to the third terminal of the second signal amplifier (U2), and the second input of the second comparator (U4) is connected to the second reference voltage terminal (V). ref2 The output of the second comparator (U4) is connected to the second input of the logic circuit (110); the output of the logic circuit (110) is coupled to the control terminal of the switching switch (T1).

5. The range switching circuit according to claim 4, characterized in that, The logic circuit (110) includes an OR gate (U5), the first input terminal of the OR gate (U5) is connected to the output terminal of the first comparator (U3), the second input terminal of the OR gate (U5) is connected to the output terminal of the second comparator (U4), and the output terminal of the OR gate (U5) is coupled to the control terminal of the switching switch (T1).

6. The range switching circuit according to claim 5, characterized in that, The range switching circuit (10) further includes a microcontroller unit (MCU), and the OR gate (U5) further includes a third input terminal, which is connected to the third input terminal of the OR gate (U5).

7. The range switching circuit according to claim 4, characterized in that, The switch driving circuit (100) further includes a first resistor (R1), a first transistor (M1), a second transistor (M2), and a second resistor (R2); The first terminal of the first transistor (M1) is connected to the power supply voltage terminal (V). CC The second terminal of the first transistor (M1) is coupled to the control terminal of the switch (T1), and the second terminal of the first transistor (M1) is also grounded through the second resistor (R2); the third terminal of the first transistor (M1) is connected to the first terminal of the second transistor (M2), and the first terminal of the second transistor (M2) is also connected to the power supply voltage terminal (V) through the first resistor (R1). CC The second transistor (M2) is connected to the ground, and the third terminal of the second transistor (M2) is connected to the output terminal of the logic circuit (110).

8. The range switching circuit according to claim 7, characterized in that, The first transistor (M1) includes an NMOS transistor, and the second transistor (M2) includes a PMOS transistor; the third terminal of the first transistor (M1) is the gate, and the third terminal of the second transistor (M2) is the gate. Wherein, when the logic circuit (110) includes an OR gate (U5), the output terminal of the OR gate (U5) is connected to the third terminal of the second transistor (M2).

9. The range switching circuit according to claim 4, characterized in that, The logic circuit (110) further includes a NOT gate (U6) and an XOR gate (U7); the output of the first comparator (U3) is connected to the first input of the XOR gate (U7), the output of the second comparator (U4) is connected to the second input of the XOR gate (U7) through the NOT gate (U6), and the output of the XOR gate (U7) is connected to the control terminal of the first comparator (U3).

10. An apparatus for chip power consumption testing, characterized in that, It includes an analog-to-digital converter (ADC) and a range switching circuit (10) as described in any one of claims 1-9; wherein the output of the range switching circuit (10) is connected to the analog-to-digital converter (ADC).