Latch, data operation unit and chip

The integration of a leakage compensation unit using subthreshold region current in semiconductor latches prevents data loss by maintaining data integrity, overcoming leakage issues in semiconductor latches.

CN113299327BActive Publication Date: 2024-12-06杭州缘及科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110558208.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-21
Publication Date
2024-12-06
Estimated Expiration
2041-05-21

AI Technical Summary

Technical Problem

Semiconductor latches suffer from data loss due to leakage current when in the off state, causing the stored data to deteriorate over time.

Method used

Incorporation of a leakage compensation unit utilizing field effect transistors operating in the subthreshold region to counteract leakage at the data storage node, maintaining data integrity by generating a compensation current when the latch is in a high-impedance state.

Benefits of technology

Prevents data loss by ensuring the data storage node maintains its state through subthreshold region current compensation, effectively addressing the leakage issue without interfering with normal data writing processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113299327B_ABST
    Figure CN113299327B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a latch, a data operation unit and a chip, wherein the latch comprises: an input terminal for inputting data; a clock signal terminal for providing a clock signal; a latch unit connected to the input terminal for latching data input from the input terminal under the control of the clock signal; an output unit connected to the latch unit for transmitting data output by the latch unit; a data storage node between the output unit and the latch unit; an output terminal for reading data from the output unit; a leakage compensation unit electrically connected between the data storage node and the output terminal, and when the latch unit is in a high-impedance state under the control of the clock signal, the leakage compensation unit is used to compensate the data storage node for leakage through the current generated by the field effect transistor working in the subthreshold region. The latch of the embodiment of the present invention can avoid the problem of data loss in the latch due to leakage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the technical field of semiconductor devices, and in particular to a latch, a data operation unit, and a chip. Background Art

[0002] A latch is a storage unit circuit that is sensitive to pulse levels. It can change its state under the action of a specific input pulse level and is mainly used to cache data.

[0003] The existing latch usually includes: a latch unit and an output unit, and the latch unit and the output unit are connected in series. When the latch unit is in the on state under the control of the clock signal, the data input to the latch passes through the latch unit and the output unit in sequence, and can be directly output from the output end; when the latch unit is in the high-impedance state (off state) under the control of the clock signal, the input end cannot continue to input data, and the parasitic capacitance (gate capacitance) of the transistor in the output unit temporarily stores the data at the data storage node between the latch unit and the output unit. In this way, the level state at the data storage node can be maintained based on the charge in the parasitic capacitance, so that the output unit continues to output data.

[0004] However, semiconductor elements have leakage current, that is, in the off state, there is also a small current in the semiconductor element. When the latch unit is in the off state, due to the leakage current in the latch unit, leakage occurs at the data storage node, eventually causing data loss in the latch. Summary of the invention

[0005] The object of the present invention is to provide a latch, a data operation unit and a chip, which are used to avoid the problem of data loss in the latch due to leakage.

[0006] According to a first aspect of an embodiment of the present invention, a latch is provided, comprising:

[0007] Input terminal, used for inputting data;

[0008] A clock signal terminal, used for providing a clock signal;

[0009] a latch unit connected to the input terminal and used for latching data input from the input terminal under the control of the clock signal;

[0010] An output unit connected to the latch unit and used to transmit data output by the latch unit; a data storage node is provided between the output unit and the latch unit;

[0011] An output terminal, used for reading data from the output unit;

[0012] A leakage compensation unit is electrically connected between the data storage node and the output end. When the latch unit is in a high-impedance state under the control of the clock signal, the leakage compensation unit is used to compensate for the leakage of the data storage node through the current generated by the field effect transistor working in the subthreshold region.

[0013] Optionally, the leakage compensation unit includes: a first leakage compensation circuit and a second leakage compensation circuit;

[0014] One end of the first leakage compensation circuit is connected to the data storage node, and the other end is connected to the output end; when the data storage node is in a high level state, the first leakage compensation circuit is used to perform leakage compensation on the data storage node through the current generated by the first PMOS transistor working in the subthreshold region; wherein the source of the first PMOS transistor is connected to a power supply, and the drain of the first PMOS transistor is connected to the data storage node;

[0015] One end of the second leakage compensation circuit is connected to the data storage node, and the other end is connected to the output end; when the data storage node is in a low level state, the second leakage compensation circuit is used to perform leakage compensation on the data storage node through the current generated by the first NMOS transistor operating in the subthreshold region; wherein the source of the first NMOS transistor is connected to the ground, and the drain of the first NMOS transistor is connected to the data storage node.

[0016] Optionally, the first leakage compensation circuit further includes: a second PMOS transistor;

[0017] The drain of the second PMOS transistor is connected to the gate of the first PMOS transistor; the gate of the second PMOS transistor is connected to the drain of the first PMOS transistor; the source of the second PMOS transistor is connected to the output terminal;

[0018] The second leakage compensation circuit further includes: a second NMOS transistor;

[0019] The drain of the second NMOS transistor is connected to the gate of the first NMOS transistor; the gate of the second NMOS transistor is connected to the drain of the first NMOS transistor; and the source of the second NMOS transistor is connected to the output terminal.

[0020] Optionally, the latch unit comprises: an inverter and a first transmission gate;

[0021] The inverter is connected to the input end and is used to perform an inversion operation on the data input from the input end;

[0022] The first transmission gate is connected to the inverter and is used to transmit the data inverted by the inverter; the first transmission gate is connected to the clock signal terminal and is used to control the state of the latch unit, and the state of the latch unit includes: high impedance state or conduction state.

[0023] Optionally, the first transmission gate is an anti-leakage device.

[0024] Optionally, the latch unit includes: a second transmission gate.

[0025] Optionally, the latch unit includes: a three-state inverter.

[0026] Optionally, the tri-state inverter includes: a third PMOS transistor, a fourth PMOS transistor, a third NMOS transistor and a fourth NMOS transistor; the third PMOS transistor, the fourth PMOS transistor, the third NMOS transistor and the fourth NMOS transistor are sequentially connected in series between a power supply and a ground.

[0027] According to a second aspect of an embodiment of the present invention, a data operation unit is provided, and the data operation unit includes: at least one latch as described in the first aspect.

[0028] According to a third aspect of an embodiment of the present invention, a chip is provided, comprising: at least one data operation unit as described in the second aspect above.

[0029] According to the latch, data operation unit and chip provided by the embodiments of the present invention, the latch includes: an input end for inputting data; a clock signal end for providing a clock signal; a latch unit connected to the input end and used to latch the data input from the input end under the control of the clock signal; an output unit connected to the latch unit and used to transmit the data output by the latch unit; a data storage node is provided between the output unit and the latch unit; an output end is used to read data from the output unit; a leakage compensation unit is electrically connected between the data storage node and the output end, and when the latch unit is in a high-impedance state under the control of the clock signal, the leakage compensation unit is used to perform leakage compensation on the data storage node through the current generated by the field effect transistor working in the subthreshold region.

[0030] The latch in the embodiment of the present invention can perform leakage compensation on the data storage node by using the current generated by the field effect transistor operating in the subthreshold region when the latch unit is in a high-resistance state, thereby avoiding leakage at the data storage node and further avoiding the problem of data loss in the latch due to leakage. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0032] Figure 1 is a circuit structure diagram of a latch in Embodiment 1 of the present invention;

[0033] Figure 2 is a circuit structure diagram of a latch in Embodiment 2 of the present invention;

[0034] Figure 3 is a circuit structure diagram of a latch in Embodiment 3 of the present invention;

[0035] Figure 4 Schematic diagram of the structure of a data operation unit in Embodiment 7 of the present invention;

[0036] Figure 5 This is a schematic diagram of the structure of the chip in Embodiment 8 of the present invention.

[0037] Description of symbols

[0038] D: input terminal; CLKP, CLKN: clock signal; 101: latch unit

[0039] 102: output unit; S: data storage node; Q, QN: output terminal; 103: leakage compensation unit;

[0040] 1031: a first leakage compensation circuit; 1032: a second leakage compensation circuit;

[0041] KN: drain terminal of the second NMOS transistor 1032N2;

[0042] KP: drain terminal of the second PMOS transistor 1031P2;

[0043] 1031P1: a first PMOS transistor in a first leakage compensation circuit;

[0044] 1031P2: a second PMOS transistor in the first leakage compensation circuit;

[0045] 1032N1: a first NMOS transistor in a second leakage compensation circuit;

[0046] 1032N2: a second NMOS transistor in a second leakage compensation circuit;

[0047] 101P3: the third PMOS transistor in the latch unit;

[0048] 101P4: the fourth PMOS transistor in the latch unit;

[0049] 101N3: the third NMOS transistor in the latch unit;

[0050] 101N4: a fourth NMOS transistor in the latch unit;

[0051] 700: data operation unit; 701: control circuit in the data operation unit;

[0052] 702: operation circuit in the data operation unit; 703: latch;

[0053] 800: chip; 801: control unit of the chip. DETAILED DESCRIPTION

[0054] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only configured to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the present application are shown in the accompanying drawings.

[0055] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0056] See also Figure 1 , Figure 1 1 is a circuit structure diagram of a latch in Embodiment 1 of the present invention, the latch comprises: an input terminal D for inputting data; a clock signal terminal for providing a clock signal, specifically: for providing two clock signals which are inverse signals to each other: a clock signal CLKP and a clock signal CLKN; a latch unit 101 connected to the input terminal D, for latching the data inputted by the input terminal D under the control of the clock signals CLKP and CLKN; an output unit 102 connected to the latch unit 101, for transmitting the data outputted by the latch unit 101, and a data storage node S is provided between the output unit 102 and the latch unit 101; an output terminal Q for reading data from the output unit 102; a leakage compensation unit 103, electrically connected between the data storage node S and the output terminal Q, when the latch unit 101 is in a high impedance state under the control of the clock signal, the leakage compensation unit 103 is used to perform leakage compensation on the data storage node S through the current generated by the field effect transistor working in the subthreshold region.

[0057] In the embodiment of the present invention, the output unit 102 is used to transmit the data output by the latch unit 101, and to shield and isolate the output terminal Q from the data storage node S, so as to prevent the data at the output terminal Q from affecting the data at the data storage node S. The output unit 102 can be any combinational logic device with driving capability, and the specific structure of the output unit 102 is not limited here. Figure 1As shown, the output unit 102 can be an inverter to perform an inverse operation on the data output by the latch unit 101 and transmit the inverted data to the output terminal Q; for example, the output unit 102 can also be a buffer composed of two inverters connected in series to transmit the data output by the latch unit 101.

[0058] See also Figure 1 The latch unit 101 may include: an inverter and a first transmission gate; the inverter is connected to the input terminal D, and is used to invert the data input by the input terminal D; the first transmission gate is connected to the inverter, and is used to transmit the data inverted by the inverter; the first transmission gate is connected to the clock signal terminal, and is used to control the state of the latch unit 101, and the state of the latch unit 101 includes: a high-impedance state or a conductive state.

[0059] Specifically, when the latch unit 101 is in the on state under the control of the clock signal, the data input from the input terminal D passes through the inverter in the latch unit 101, the first transmission gate in the latch unit 101 and the output unit 102 in sequence, and can be directly output from the output terminal Q; when the latch unit 101 is in the high-impedance state (cut-off state) under the control of the clock signal, the input terminal D can no longer input data, and the parasitic capacitance (gate capacitance) of the transistor in the output unit 102 temporarily stores the data at the data storage node S. In this way, the level state at the data storage node S can be maintained based on the charge in the parasitic capacitance, so that the output unit 102 continues to output data.

[0060] For ease of understanding, before describing the leakage compensation process of the latch in the first embodiment of the present invention, the leakage phenomenon is first explained:

[0061] when Figure 1 When only the latch unit 101 and the output unit 102 are included, and the leakage compensation unit 103 is not provided, there is leakage at the data storage node S. Specifically, the leakage phenomenon is divided into two types:

[0062] The first leakage phenomenon: when the clock signal CLKP is at a low level, the clock signal CLKN is at a high level, and the data input at the input terminal D is "0", the latch unit 101 is in a conducting state, and the data input at the input terminal D will be written into the latch normally. Specifically, the inverter in the latch unit 101 will invert the data "0" input at the input terminal D to obtain data "1", and then transmit the data "1" to the first transmission gate and the data storage node S in sequence, and store it in the parasitic capacitance of the transistor in the output unit 102; if the clock signal is flipped afterwards, that is, CLKP becomes a high level, CLKN becomes a low level, and the latch unit 101 becomes a high-impedance state. For details, see Figure 1, the first transmission gate in the latch unit 101 is in the cut-off state. At this time, if the input data of the input terminal D changes from "0" to "1", the NMOS transistor 101N1 in the inverter is turned on. Since the first transmission gate has leakage current in the cut-off state and the source of the NMOS transistor 101N1 is grounded, the data "1" at the data storage node S will leak through the first transmission gate and 101N1. As time goes by, the data "1" at the data storage node S will become "0", that is, data loss will occur.

[0063] The second leakage phenomenon: when the clock signal CLKP is low, the clock signal CLKN is high, and the data input at the input terminal D is "1", the latch unit 101 is in the on state, and the data input at the input terminal D will be written into the latch normally. Specifically, the inverter in the latch unit 101 will invert the data "1" input at the input terminal D to obtain data "0", and then transmit the data "0" to the node S; if the clock signal is flipped afterwards, that is, CLKP becomes high, CLKN becomes low, and the latch unit 101 becomes a high-impedance state. For details, see Figure 1 , the first transmission gate in the latch unit 101 is in the cut-off state. At this time, if the input data of the input terminal D changes from "1" to "0", the PMOS transistor 101P1 in the latch unit 101 is turned on. Since the first transmission gate has leakage current in the cut-off state, and the source of the PMOS transistor 101P1 is connected to the power supply, the data "0" at the data storage node S will leak through the first transmission gate and 101P1, that is, the power supply charges the data storage node S. As time goes by, the data "0" at the data storage node S will change to "1", that is, data loss will occur.

[0064] To summarize the above process:

[0065] The first leakage phenomenon is: when the latch unit 101 changes from an on state to an off state, and the data input at the input terminal D changes from "0" to "1", leakage occurs at the data storage node S, and the data changes from "1" to "0", resulting in data loss. The second leakage phenomenon is: when the latch unit 101 changes from an on state to an off state, and the data input at the input terminal D changes from "1" to "0", leakage occurs at the data storage node S, and the data changes from "0" to "1", resulting in data loss.

[0066] See also Figure 1The leakage compensation unit 103 in the embodiment of the present invention may include: a first leakage compensation circuit 1031 and a second leakage compensation circuit 1032; one end of the first leakage compensation circuit 1031 is connected to the data storage node S, and the other end is connected to the output end Q; when the data storage node S is in a high level state, the first leakage compensation circuit 1031 is used to perform leakage compensation on the data storage node S through the current generated by the first PMOS transistor 1031P1 working in the subthreshold region; wherein the source of the first PMOS transistor 1031P1 is connected to the power supply, and the drain of the first PMOS transistor 1031P1 is connected to the data storage node S.

[0067] One end of the second leakage compensation circuit 1032 is connected to the data storage node S, and the other end is connected to the output terminal Q; when the data storage node S is in a low level state, the second leakage compensation circuit 1032 is used to perform leakage compensation on the data storage node S through the current generated by the first NMOS transistor 1032N1 operating in the subthreshold region; wherein the source of the first NMOS transistor 1032N1 is connected to the ground, and the drain of the first NMOS transistor 1032N1 is connected to the data storage node.

[0068] Further, such as Figure 1 As shown, the first leakage compensation circuit 1031 may also include: a second PMOS transistor 1031P2; the drain of the second PMOS transistor 1031P2 is connected to the gate of the first PMOS transistor 1031P1; the gate of the second PMOS transistor 1031P2 is connected to the drain of the first PMOS transistor 1031P1; and the source of the second PMOS transistor 1031P2 is connected to the output end.

[0069] The second leakage compensation circuit 1032 may further include: a second NMOS transistor 1032N2;

[0070] The drain of the second NMOS transistor 1032N2 is connected to the gate of the first NMOS transistor 1032N1; the gate of the second NMOS transistor 1032N2 is connected to the drain of the first NMOS transistor 1032N1; and the source of the second NMOS transistor 1032N2 is connected to the output terminal.

[0071] The following is a detailed description of the leakage compensation process of the latch in the first embodiment of the present invention:

[0072] For the first leakage phenomenon mentioned above, Figure 1 The leakage compensation process of the leakage compensation unit 103 in the latch shown in the figure for the data storage node S is:

[0073] At the moment when the latch unit 101 changes from the on state to the off state and the data input at the input terminal D changes from "0" to "1", the data at the data storage node S is still "1". After being inverted by the output unit 102, the data output at the output terminal Q is "0". At this time, 101N1 is turned on, the first transmission gate is turned off, and the data "1" at the data storage node S will pass through the first transmission gate and 101N1 and start to pull down the leakage (the pull-down leakage current makes the data at S gradually decrease from "1" to "0"); since the data at the data storage node S is "1", the second NMOS transistor 1032N2 of the second leakage compensation circuit 1032 in the leakage compensation unit 103 is turned on, and the data at the drain terminal KN of the second NMOS transistor 1032N2 is the same as that at the output terminal Q, both of which are "0", and the first NMOS transistor 1032N1 is turned off; at the same time, the second PM The OS transistor 1031P2 is cut off, the drain terminal KP of the second PMOS transistor 1031P2 is floating, and the first PMOS transistor 1031P1 is in a weakly turned-off state: with the leakage at the data storage node S, the second PMOS transistor 1031P2 will operate in the subthreshold region (the second PMOS transistor 1031P2 will be in a weakly turned-on state), and through the second PMOS transistor 1031P2 and the output terminal Q, the data at KP gradually decreases to "0", thereby making the first PMOS transistor 1031P1 operate in the subthreshold region (making the first PMOS transistor 1031P1 in a weakly turned-on state), and since the source of the first PMOS transistor 1031P1 is connected to the power supply, a subthreshold region current that is pulled up is formed between the data storage node S and the power supply through the first PMOS transistor 1031P1 operating in the subthreshold region as a compensation current. In addition, since the current generated by the field effect transistor working in the subthreshold region (subthreshold region current) is usually greater than the leakage current in the field effect transistor in the cut-off state, the above-mentioned pull-up compensation current will be greater than the pull-down leakage current, so that the data "1" at the data storage node S will not be changed in the end, that is, the first leakage compensation circuit 1031 in the leakage compensation unit 103 inputs a compensation current greater than the leakage current at the data storage node S, so that the data at the data storage node S is always "1". In addition, since the above-mentioned compensation current is a subthreshold region current, the compensation current is relatively weak and will not affect the normal data writing process of the latch.

[0074] For the second leakage phenomenon mentioned above, Figure 1 The leakage compensation process of the leakage compensation unit 103 in the latch shown in the figure for the data storage node S is:

[0075] At the moment when the latch unit 101 changes from the on state to the off state and the data input at the input terminal D changes from "1" to "0", the data at the data storage node S is still "0". After being inverted by the output unit 102, the data output by the output terminal Q is "1". At this time, 101P1 is turned on, the first transmission gate is turned off, and the data "0" at the data storage node S will start to pull up the leakage through the first transmission gate and 101P1 (the pull-up leakage current makes the data at S gradually increase from "0" to "1"); since the data at the data storage node S is "0", the second PMOS transistor 1031P2 of the first leakage compensation circuit 1031 in the leakage compensation unit 103 is turned on, and the data at the drain terminal KP of the second PMOS transistor 1031P2 is the same as that at the output terminal Q, both of which are "1", and the first PMOS transistor 1031P1 is turned off; at the same time, the second N MOS transistor 1032N2 is turned off, the drain terminal KN of the second NMOS transistor 1032N2 is floating, and the first NMOS transistor 1032N1 is in a weakly turned-off state: with the leakage at the data storage node S, the second NMOS transistor 1032N2 will operate in the subthreshold region (the second NMOS transistor 1032N2 will be in a weakly turned-on state), and through the second NMOS transistor 1032N2 and the output terminal Q, the data at KN gradually increases to "1", thereby making the first NMOS transistor 1032N1 operate in the subthreshold region (making the first NMOS transistor 1032N1 in a weakly turned-on state), and since the source of the first NMOS transistor 1032N1 is grounded, a pull-down subthreshold region current is formed between the data storage node S and the ground through the first NMOS transistor 1032N1 operating in the subthreshold region as a compensation current. In addition, since the current generated by the field effect transistor working in the subthreshold region (subthreshold region current) is usually greater than the leakage current in the field effect transistor in the cut-off state, the pull-down compensation current mentioned above will be greater than the pull-up leakage current, so that the data "0" at the data storage node S will not be changed in the end, that is, the second leakage compensation circuit 1032 in the leakage compensation unit 103 inputs a compensation current greater than the leakage current at the data storage node S, so that the data at the data storage node S is always "0". In addition, since the above compensation current is a subthreshold region current, the compensation current is relatively weak and will not affect the normal data writing process of the latch.

[0076] Further, in some optional embodiments, an anti-leakage device can be selected as the first transmission gate, so that when the latch unit 101 is in a high-resistance state, the first transmission gate can slow down the speed of leakage at the data storage node. Specifically, the anti-leakage device can be a low-leakage device with a large threshold voltage, or a device with a long gate length.

[0077] Figure 1In the latch of the illustrated embodiment, when the latch unit 101 is in a high-resistance state, the leakage compensation unit 103 can perform leakage compensation on the data storage node S through the current generated by the field effect transistor operating in the subthreshold region (specifically, the current generated by the first PMOS transistor 1031P1, or the current generated by the first NMOS transistor 1032N1 operating in the subthreshold region), thereby avoiding leakage at the data storage node S, and further avoiding the problem of data loss in the latch due to leakage.

[0078] See also Figure 2 , Figure 2 1 is a circuit structure diagram of a latch in Embodiment 2 of the present invention, the latch comprises: an input terminal D, for inputting data; a clock signal terminal, for providing a clock signal, specifically: for providing two clock signals which are inverse signals to each other: a clock signal CLKP and a clock signal CLKN; a latch unit 101, connected to the input terminal D, for latching the data inputted by the input terminal D under the control of the clock signals CLKP and CLKN; an output unit 102, connected to the latch unit 101, for transmitting the data outputted by the latch unit 101, and a data storage node S is provided between the output unit 102 and the latch unit 101; an output terminal QN, for reading data from the output unit 102; a leakage compensation unit 103, electrically connected between the data storage node S and the output terminal QN, when the latch unit 101 is in a high impedance state under the control of the clock signal, the leakage compensation unit 103 is used to perform leakage compensation on the data storage node S based on the data outputted by the output terminal QN.

[0079] In the embodiment of the present invention, the output unit 102 is used to transmit the data output by the latch unit 101, and to shield and isolate the output terminal QN from the data storage node S, so as to prevent the data at the output terminal QN from affecting the data at the data storage node S. The output unit 102 can be any combinational logic device with driving capability, and the specific structure of the output unit 102 is not limited here. Figure 2 As shown, the output unit 102 can be an inverter to perform an inverse operation on the data output by the latch unit 101 and transmit the inverted data to the output terminal QN; for example, the output unit 102 can also be a buffer composed of two inverters connected in series to transmit the data output by the latch unit 101.

[0080] See also Figure 2 , the latch unit 101 may include: a second transmission gate.

[0081] Specifically, when the second transmission gate is in the on state under the control of the clock signal, the data input from the input terminal D passes through the second transmission gate and the output unit 102 in sequence, and can be directly output from the output terminal QN after being inverted by the output unit 102; when the second transmission gate is in the high-impedance state (cut-off state) under the control of the clock signal, the input terminal D can no longer input data, and the parasitic capacitance (gate capacitance) of the transistor in the output unit 102 temporarily stores the data at the data storage node S. In this way, the level state at the data storage node S can be maintained based on the charge in the parasitic capacitance, so that the output unit 102 continues to output data.

[0082] See also Figure 2 The leakage compensation unit 103 in the embodiment of the present invention may include: a first leakage compensation circuit 1031 and a second leakage compensation circuit 1032; one end of the first leakage compensation circuit 1031 is connected to the data storage node S, and the other end is connected to the output terminal QN; when the data storage node S is in a high level state, the first leakage compensation circuit 1031 is used to perform leakage compensation on the data storage node S through the current generated by the first PMOS transistor 1031P1 working in the subthreshold region; wherein the source of the first PMOS transistor 1031P1 is connected to the power supply, and the drain of the first PMOS transistor 1031P1 is connected to the data storage node S.

[0083] One end of the second leakage compensation circuit 1032 is connected to the data storage node S, and the other end is connected to the output terminal QN; when the data storage node S is in a low level state, the second leakage compensation circuit 1032 is used to perform leakage compensation on the data storage node S through the current generated by the first NMOS transistor 1032N1 operating in the subthreshold region; wherein the source of the first NMOS transistor 1032N1 is connected to the ground, and the drain of the first NMOS transistor 1032N1 is connected to the data storage node.

[0084] Further, such as Figure 2 As shown, the first leakage compensation circuit 1031 may also include: a second PMOS transistor 1031P2; the drain of the second PMOS transistor 1031P2 is connected to the gate of the first PMOS transistor 1031P1; the gate of the second PMOS transistor 1031P2 is connected to the drain of the first PMOS transistor 1031P1; and the source of the second PMOS transistor 1031P2 is connected to the output end.

[0085] The second leakage compensation circuit 1032 may further include: a second NMOS transistor 1032N2;

[0086] The drain of the second NMOS transistor 1032N2 is connected to the gate of the first NMOS transistor 1032N1; the gate of the second NMOS transistor 1032N2 is connected to the drain of the first NMOS transistor 1032N1; and the source of the second NMOS transistor 1032N2 is connected to the output terminal.

[0087] The following is a detailed description of the leakage compensation process of the latch in the second embodiment of the present invention:

[0088] At the moment when the latch unit 101 changes from the on state to the off state and the data input at the input terminal D changes from "0" to "1", the data at the data storage node S is still "0". After being inverted by the output unit 102, the data output by the output terminal QN is "1". At this time, the data "0" at the data storage node S will be pulled up and leaked (the pull-up leakage current causes the data at S to gradually increase from "0" to "1"); since the data at the data storage node S is "0", the second PMOS transistor 1031P2 of the first leakage compensation circuit 1031 in the leakage compensation unit 103 is turned on, and the data at the drain terminal KP of the second PMOS transistor 1031P2 is the same as that at the output terminal QN, both of which are "1", and the first PMOS transistor 1031P1 is turned off; at the same time, the second NMOS transistor 1032N2 is turned off, The drain terminal KN of the second NMOS transistor 1032N2 is floating, and the first NMOS transistor 1032N1 is in a weakly turned-off state: with the leakage at the data storage node S, the second NMOS transistor 1032N2 will operate in the subthreshold region (the second NMOS transistor 1032N2 will be in a weakly turned-on state), and through the second NMOS transistor 1032N2 and the output terminal QN, the data at KN gradually increases to "1", thereby making the first NMOS transistor 1032N1 operate in the subthreshold region (making the first NMOS transistor 1032N1 in a weakly turned-on state), and since the source of the first NMOS transistor 1032N1 is grounded, a pull-down subthreshold region current is formed between the data storage node S and the ground through the first NMOS transistor 1032N1 operating in the subthreshold region as a compensation current. In addition, since the current generated by the field effect transistor working in the subthreshold region (subthreshold region current) is usually greater than the leakage current in the field effect transistor in the cut-off state, the pull-down compensation current mentioned above will be greater than the pull-up leakage current, so that the data "0" at the data storage node S will not be changed in the end, that is, the second leakage compensation circuit 1032 in the leakage compensation unit 103 inputs a compensation current greater than the leakage current at the data storage node S, so that the data at the data storage node S is always "0". In addition, since the above compensation current is a subthreshold region current, the compensation current is relatively weak and will not affect the normal data writing process of the latch.

[0089] At the moment when the latch unit 101 changes from the on state to the off state and the data input at the input terminal D changes from "1" to "0", the data at the data storage node S is still "1", and after being inverted by the output unit 102, the data output by the output terminal QN is "0". At this time, the data "1" at the data storage node S will be pulled down by leakage (the pull-down leakage current causes the data at S to gradually decrease from "1" to "0"); since the data at the data storage node S is "1", the second NMOS transistor 1032N2 of the second leakage compensation circuit 1032 in the leakage compensation unit 103 is turned on, and the data at the drain terminal KN of the second NMOS transistor 1032N2 is the same as that at the output terminal QN, both of which are "0", and the first NMOS transistor 1032N1 is turned off; at the same time, the second PMOS transistor 1031P2 is turned off, and the first PMOS transistor 1031P2 is turned off. The drain terminal KP of the second PMOS transistor 1031P2 is floating, and the first PMOS transistor 1031P1 is in a weakly turned-off state: with the leakage at the data storage node S, the second PMOS transistor 1031P2 will operate in the subthreshold region (the second PMOS transistor 1031P2 will be in a weakly turned-on state), and through the second PMOS transistor 1031P2 and the output terminal QN, the data at KP gradually decreases to "0", thereby making the first PMOS transistor 1031P1 operate in the subthreshold region (making the first PMOS transistor 1031P1 in a weakly turned-on state), and since the source of the first PMOS transistor 1031P1 is connected to the power supply, a subthreshold region current that is pulled up is formed between the data storage node S and the power supply through the first PMOS transistor 1031P1 operating in the subthreshold region as a compensation current. In addition, since the current generated by the field effect transistor working in the subthreshold region (subthreshold region current) is usually greater than the leakage current in the field effect transistor in the cut-off state, the above-mentioned pull-up compensation current will be greater than the pull-down leakage current, so that the data "1" at the data storage node S will not be changed in the end, that is, the first leakage compensation circuit 1031 in the leakage compensation unit 103 inputs a compensation current greater than the leakage current at the data storage node S, so that the data at the data storage node S is always "1". In addition, since the above-mentioned compensation current is a subthreshold region current, the compensation current is relatively weak and will not affect the normal data writing process of the latch.

[0090] Figure 2In the latch of the illustrated embodiment, when the latch unit 101 is in a high-resistance state, the leakage compensation unit 103 can perform leakage compensation on the data storage node S through the current generated by the field effect transistor operating in the subthreshold region (specifically, the current generated by the first PMOS transistor 1031P1, or the current generated by the first NMOS transistor 1032N1 operating in the subthreshold region), thereby avoiding leakage at the data storage node S, and further avoiding the problem of data loss in the latch due to leakage.

[0091] See also Figure 3 , Figure 3 1 is a circuit structure diagram of a latch in Embodiment 3 of the present invention, the latch comprising: an input terminal D for inputting data; a clock signal terminal for providing a clock signal, specifically: for providing two clock signals which are inverse signals to each other: a clock signal CLKP and a clock signal CLKN; a latch unit 101 connected to the input terminal D, for latching the data inputted by the input terminal D under the control of the clock signals CLKP and CLKN; an output unit 102 connected to the latch unit 101, for transmitting the data outputted by the latch unit 101, and a data storage node S is provided between the output unit 102 and the latch unit 101; an output terminal Q for reading data from the output unit 102; a leakage compensation unit 103, electrically connected between the data storage node S and the output terminal Q, when the latch unit 101 is in a high impedance state under the control of the clock signal, the leakage compensation unit 103 is used to perform leakage compensation on the data storage node S by means of the current generated by the field effect transistor working in the subthreshold region.

[0092] In the embodiment of the present invention, the output unit 102 is used to transmit the data output by the latch unit 101, and to shield and isolate the output terminal Q from the data storage node S, so as to prevent the data at the output terminal Q from affecting the data at the data storage node S. The output unit 102 can be any combinational logic device with driving capability, and the specific structure of the output unit 102 is not limited here. Figure 3 As shown, the output unit 102 can be an inverter to perform an inverse operation on the data output by the latch unit 101 and transmit the inverted data to the output terminal Q; for example, the output unit 102 can also be a buffer composed of two inverters connected in series to transmit the data output by the latch unit 101.

[0093] See also Figure 3, the latch unit 101 may include: a tri-state inverter. Further, the tri-state inverter includes: a third PMOS transistor 101P3, a fourth PMOS transistor 101P4, a third NMOS transistor 101N3 and a fourth NMOS transistor 101N4; the third PMOS transistor 101P3, the fourth PMOS transistor 101P4, the third NMOS transistor 101N3 and the fourth NMOS transistor 101N4 are sequentially connected in series between the power supply and the ground.

[0094] The clock signal terminal is respectively connected to the gate of the fourth PMOS transistor 101P4 and the gate of the third NMOS transistor 101N3, and is used to control the state of the latch unit 101, and the state of the latch unit includes: high-impedance state or on state; the input terminal is respectively connected to the gate of the third PMOS transistor 101P3 and the gate of the fourth NMOS transistor 101N4, and is used to transmit the data input by the input terminal D to the latch unit 101.

[0095] See also Figure 3 The leakage compensation unit 103 in the embodiment of the present invention may include: a first leakage compensation circuit 1031 and a second leakage compensation circuit 1032; one end of the first leakage compensation circuit 1031 is connected to the data storage node S, and the other end is connected to the output end Q; when the data storage node S is in a high level state, the first leakage compensation circuit 1031 is used to perform leakage compensation on the data storage node S through the current generated by the first PMOS transistor 1031P1 working in the subthreshold region; wherein the source of the first PMOS transistor 1031P1 is connected to the power supply, and the drain of the first PMOS transistor 1031P1 is connected to the data storage node S.

[0096] One end of the second leakage compensation circuit 1032 is connected to the data storage node S, and the other end is connected to the output terminal Q; when the data storage node S is in a low level state, the second leakage compensation circuit 1032 is used to perform leakage compensation on the data storage node S through the current generated by the first NMOS transistor 1032N1 operating in the subthreshold region; wherein the source of the first NMOS transistor 1032N1 is connected to the ground, and the drain of the first NMOS transistor 1032N1 is connected to the data storage node.

[0097] Further, such as Figure 3 As shown, the first leakage compensation circuit 1031 may also include: a second PMOS transistor 1031P2; the drain of the second PMOS transistor 1031P2 is connected to the gate of the first PMOS transistor 1031P1; the gate of the second PMOS transistor 1031P2 is connected to the drain of the first PMOS transistor 1031P1; and the source of the second PMOS transistor 1031P2 is connected to the output end.

[0098] The second leakage compensation circuit 1032 may further include: a second NMOS transistor 1032N2;

[0099] The drain of the second NMOS transistor 1032N2 is connected to the gate of the first NMOS transistor 1032N1; the gate of the second NMOS transistor 1032N2 is connected to the drain of the first NMOS transistor 1032N1; and the source of the second NMOS transistor 1032N2 is connected to the output terminal.

[0100] The following is a detailed description of the leakage compensation process of the latch in the third embodiment of the present invention:

[0101] At the moment when the latch unit 101 changes from the on state to the off state and the data input at the input terminal D changes from "0" to "1", the data at the data storage node S is still "1". After being inverted by the output unit 102, the data output by the output terminal Q is "0". At this time, only 101N3 in the latch unit 101 is turned on, and the other transistors are turned off. Due to the leakage current in 101N4, the data "1" at the data storage node S will start to pull down the leakage through 101N3 and 101N4 (the pull-down leakage current causes the data at S to gradually decrease from "1" to "0"); since the data at the data storage node S is "1", the second NMOS transistor 1032N2 of the second leakage compensation circuit 1032 in the leakage compensation unit 103 is turned on, and the data at the drain terminal KN of the second NMOS transistor 1032N2 is the same as that at the output terminal Q, both of which are "0". The first NMOS transistor 1032 N1 is turned off; at the same time, the second PMOS transistor 1031P2 is turned off, the drain terminal KP of the second PMOS transistor 1031P2 is floating, and the first PMOS transistor 1031P1 is in a weakly closed state: with the leakage at the data storage node S, the second PMOS transistor 1031P2 will operate in the subthreshold region (the second PMOS transistor 1031P2 will be in a weakly turned-on state), and through the second PMOS transistor 1031P2 and the output terminal Q, the data at KP gradually decreases to "0", thereby making the first PMOS transistor 1031P1 operate in the subthreshold region (making the first PMOS transistor 1031P1 in a weakly turned-on state), and since the source of the first PMOS transistor 1031P1 is connected to the power supply, a subthreshold region current that is pulled up is formed between the data storage node S and the power supply through the first PMOS transistor 1031P1 operating in the subthreshold region as a compensation current. In addition, since the current generated by the field effect transistor working in the subthreshold region (subthreshold region current) is usually greater than the leakage current in the field effect transistor in the cut-off state, the above-mentioned pull-up compensation current will be greater than the pull-down leakage current, so that the data "1" at the data storage node S will not be changed in the end, that is, the first leakage compensation circuit 1031 in the leakage compensation unit 103 inputs a compensation current greater than the leakage current at the data storage node S, so that the data at the data storage node S is always "1". In addition, since the above-mentioned compensation current is a subthreshold region current, the compensation current is relatively weak and will not affect the normal data writing process of the latch.

[0102] At the moment when the latch unit 101 changes from the on state to the off state and the data input at the input terminal D changes from "1" to "0", the data at the data storage node S is still "0". After being inverted by the output unit 102, the data output by the output terminal Q is "1". At this time, only 101P3 in the latch unit 101 is turned on, and the other transistors are turned off. The data "0" at the data storage node S will start to pull up the leakage through 101P3 and 101P4 (the leakage current pulled up makes the data at S gradually increase from "0" to "1"); because the data at the data storage node S is "0", the second PMOS transistor 1031P2 of the first leakage compensation circuit 1031 in the leakage compensation unit 103 is turned on, and the data at the drain terminal KP of the second PMOS transistor 1031P2 is the same as that at the output terminal Q, both of which are "1", and the first PMOS transistor 1031P1 is turned off; When the second NMOS transistor 1032N2 is turned off, the drain terminal KN of the second NMOS transistor 1032N2 is floating, and the first NMOS transistor 1032N1 is in a weakly turned-off state: with the leakage at the data storage node S, the second NMOS transistor 1032N2 will operate in the subthreshold region (the second NMOS transistor 1032N2 will be in a weakly turned-on state), and through the second NMOS transistor 1032N2 and the output terminal Q, the data at KN gradually increases to "1", thereby making the first NMOS transistor 1032N1 operate in the subthreshold region (making the first NMOS transistor 1032N1 in a weakly turned-on state), and since the source of the first NMOS transistor 1032N1 is grounded, a pull-down subthreshold region current is formed between the data storage node S and the ground through the first NMOS transistor 1032N1 operating in the subthreshold region as a compensation current. In addition, since the current generated by the field effect transistor working in the subthreshold region (subthreshold region current) is usually greater than the leakage current in the field effect transistor in the cut-off state, the pull-down compensation current mentioned above will be greater than the pull-up leakage current, so that the data "0" at the data storage node S will not be changed in the end, that is, the second leakage compensation circuit 1032 in the leakage compensation unit 103 inputs a compensation current greater than the leakage current at the data storage node S, so that the data at the data storage node S is always "0". In addition, since the above compensation current is a subthreshold region current, the compensation current is relatively weak and will not affect the normal data writing process of the latch.

[0103] Figure 3In the latch of the illustrated embodiment, when the latch unit 101 is in a high-resistance state, the leakage compensation unit 103 can perform leakage compensation on the data storage node S through the current generated by the field effect transistor operating in the subthreshold region (specifically, the current generated by the first PMOS transistor 1031P1, or the current generated by the first NMOS transistor 1032N1 operating in the subthreshold region), thereby avoiding leakage at the data storage node S, and further avoiding the problem of data loss in the latch due to leakage.

[0104] In another embodiment of the present invention, the connection relationship between each transistor in the three-state inverter and the clock control terminal and the input terminal D can also be adopted as follows: the clock signal terminal is respectively connected to the gate of the third PMOS transistor 101P3 and the gate of the fourth NMOS transistor 101N4, which is used to control the state of the latch unit, and the state of the latch unit includes: high impedance state or conduction state; the input terminal D is respectively connected to the gate of the fourth PMOS transistor 101P4 and the gate of the third NMOS transistor 101N3, which is used to transmit the data input by the input terminal D to the latch unit. In this embodiment, the connection relationship of the other parts of the latch is the same as Figure 3 The latches shown are the same and will not be described again here.

[0105] The latch provided in the embodiment of the present invention can be used as a customized standard unit to realize data storage in general computing scenarios. For example, it can be used as a computing core unit in a CPU / CPU for data storage in ultra-large-scale computing scenarios; it can also be used as a computing processing unit in an AI (Artificial Intelligence) chip for data storage in high-density computing scenarios; it can also be used as a system-level computing unit such as a SOC (System on Chip) / FPGA (Field Programmable Gate Array) for data storage in low-power computing scenarios.

[0106] The embodiment of the present invention further provides a data operation unit, Figure 4 FIG. 4 is a schematic diagram of the structure of a data operation unit in Embodiment 4 of the present invention. Figure 4 As shown, the data operation unit 400 includes a control circuit 401, an operation circuit 402 and a plurality of latches 403. The control circuit 401 refreshes the data in the latch 403 and reads the data from the latch 403, the operation circuit 402 operates on the read data, and then the control circuit 401 outputs the operation result.

[0107] The embodiment of the present invention further provides a chip. Figure 5 FIG. 1 is a schematic diagram of the structure of the chip in the fifth embodiment of the present invention. Figure 5 As shown, the chip 500 includes a control unit 501 and one or more data operation units 400. The control unit 501 inputs data to the data operation unit 400 and processes the data output by the data operation unit 400.

[0108] The expressions "first", "second", "first" or "second" used in various embodiments of the present disclosure may modify various components regardless of order and / or importance, but these expressions do not limit the corresponding components. The above expressions are only configured for the purpose of distinguishing an element from other elements. For example, a first user device and a second user device represent different user devices, although both are user devices. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element without departing from the scope of the present disclosure.

[0109] When one element (e.g., a first element) is referred to as being "(operably or communicatively) coupled" or "(operably or communicatively) coupled to" or "connected to" another element (e.g., a second element), it is understood that the one element is directly connected to the other element or the one element is indirectly connected to the other element via yet another element (e.g., a third element). Conversely, it is understood that when an element (e.g., a first element) is referred to as being "directly connected" or "directly coupled" to another element (the second element), no element (e.g., a third element) is interposed between the two.

[0110] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A latch, characterized in that: include: Input terminal, used for inputting data; A clock signal terminal, used for providing a clock signal; a latch unit connected to the input terminal and used for latching data input from the input terminal under the control of the clock signal; an output unit, connected to the latch unit and used for transmitting data output by the latch unit; There is a data storage node between the output unit and the latch unit; An output terminal, used for reading data from the output unit; A leakage compensation unit is electrically connected between the data storage node and the output end. When the latch unit is in a high-impedance state under the control of the clock signal, the leakage compensation unit is used to compensate for the leakage of the data storage node through the current generated by the field effect transistor working in the subthreshold region.

2. The latch according to claim 1, characterized in that: The leakage compensation unit comprises: a first leakage compensation circuit and a second leakage compensation circuit; One end of the first leakage compensation circuit is connected to the data storage node, and the other end is connected to the output end; when the data storage node is in a high level state, the first leakage compensation circuit is used to perform leakage compensation on the data storage node through the current generated by the first PMOS transistor working in the subthreshold region; wherein the source of the first PMOS transistor is connected to a power supply, and the drain of the first PMOS transistor is connected to the data storage node; One end of the second leakage compensation circuit is connected to the data storage node, and the other end is connected to the output end; when the data storage node is in a low level state, the second leakage compensation circuit is used to perform leakage compensation on the data storage node through the current generated by the first NMOS transistor operating in the subthreshold region; wherein the source of the first NMOS transistor is connected to the ground, and the drain of the first NMOS transistor is connected to the data storage node.

3. The latch according to claim 2, characterized in that: The first leakage compensation circuit further includes: a second PMOS transistor; The drain of the second PMOS transistor is connected to the gate of the first PMOS transistor; the gate of the second PMOS transistor is connected to the drain of the first PMOS transistor; the source of the second PMOS transistor is connected to the output terminal; The second leakage compensation circuit further includes: a second NMOS transistor; The drain of the second NMOS transistor is connected to the gate of the first NMOS transistor; the gate of the second NMOS transistor is connected to the drain of the first NMOS transistor; and the source of the second NMOS transistor is connected to the output terminal.

4. The latch according to any one of claims 1 to 3, characterized in that: The latch unit comprises: an inverter and a first transmission gate; The inverter is connected to the input end and is used to perform an inversion operation on the data input from the input end; The first transmission gate is connected to the inverter and is used to transmit the data inverted by the inverter; the first transmission gate is connected to the clock signal terminal and is used to control the state of the latch unit, and the state of the latch unit includes: high impedance state or conduction state.

5. The latch according to claim 4, characterized in that: The first transmission gate is an anti-leakage device.

6. The latch according to any one of claims 1 to 3, characterized in that: The latch unit includes: a second transmission gate.

7. The latch according to any one of claims 1 to 3, characterized in that: The latch unit includes: a three-state inverter.

8. The latch according to claim 7, characterized in that: The tri-state inverter comprises: a third PMOS transistor, a fourth PMOS transistor, a third NMOS transistor and a fourth NMOS transistor; the third PMOS transistor, the fourth PMOS transistor, the third NMOS transistor and the fourth NMOS transistor are sequentially connected in series between a power supply and a ground.

9. A data operation unit, comprising a control circuit, an operation circuit, and a plurality of latches that are interconnected, wherein the latch is the latch according to any one of claims 1 to 8.

10. A chip, characterized in that: The device comprises at least one data operation unit as claimed in claim 9.