An in-memory computing circuit, device and electronic device based on SRAM

Through the SRAM-based in-memory computing circuit, bit line signals are used to perform addition and multiplication operations, which solves the problems of complexity and high energy consumption in the existing technology and achieves efficient in-memory computing.

CN113889158BActive Publication Date: 2024-08-30SUZHOU ZHAOXIN SEMICON TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111176583.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-09
Publication Date
2024-08-30
Estimated Expiration
2041-10-09

AI Technical Summary

Technical Problem

Existing in-memory computing circuits are complicated to implement addition and multiplication operations and require multiple word lines, resulting in high energy consumption and low efficiency.

Method used

An in-memory computing circuit based on SRAM is used, and through the SRAM storage unit, transmission unit and logic operation unit, only bit line signals are used for operation to realize addition and multiplication operations, which reduces the difficulty of implementation and improves efficiency.

Benefits of technology

Addition and multiplication operations are implemented through bit line operations, which reduces the power consumption of the processor, reduces the array area and energy consumption, and improves the efficiency of the memory circuit.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113889158B
    Figure CN113889158B
Patent Text Reader

Abstract

The embodiment of the present application provides an SRAM-based in-memory computing circuit, device and electronic device, the circuit includes an SRAM storage unit including a latch, a first transmission unit, a second transmission unit and a logic operation unit; the first control end of the first transmission unit is connected to the first output end of the latch in the SRAM storage unit, the second control end of the first transmission unit is connected to the first bit line, the first end of the first transmission unit is connected to the first input end and the third bit line of the logic operation unit; the second end of the first transmission unit is grounded or connected to a power supply; the first control end of the second transmission unit is connected to the second output end of the latch in the SRAM storage unit, the second control end of the second transmission unit is connected to the second bit line, the first end of the second transmission unit is connected to the second input end and the fourth bit line of the logic operation unit; the second end of the second transmission unit is grounded or connected to a power supply. It is used to reduce the difficulty of implementation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic circuits, and in particular to an in-memory computing circuit, device and electronic device based on SRAM. Background Art

[0002] In the traditional von Neumann computer architecture, the data processing unit and the memory are separated, and the data exchange between the two is carried out through the data bus. With the rise of applications such as artificial intelligence and big data in recent years, the exchange of large amounts of data between the data processing unit and the memory has brought huge energy consumption and has become the main bottleneck for performance improvement. This phenomenon is called the memory wall, and in-memory computing has become one of the key technologies to solve the memory wall problem.

[0003] In-memory computing is the combination of memory and data processing units to reduce or even eliminate high-frequency data transmission between the memory and data processing units in the computer. Nowadays, many kinds of memory are widely studied for the development of large-scale, high-performance, low-power in-memory computing designs. Existing in-memory computing circuits generally require multiple word lines to be turned on at the same time to achieve addition and / or multiplication operations, which is complex to implement. Summary of the invention

[0004] In view of this, the present application provides an in-memory computing circuit, device and electronic device based on SRAM, so as to solve the problem of complex implementation of in-memory computing in the prior art.

[0005] In a first aspect, an embodiment of the present application provides an in-memory computing circuit based on SRAM, comprising: an SRAM storage unit including a latch, a first transmission unit, a second transmission unit, and a logic operation unit;

[0006] The first control end of the first transmission unit is connected to the first output end of the latch in the SRAM storage unit, the second control end of the first transmission unit is connected to the first bit line, the first end of the first transmission unit is connected to the first input end of the logic operation unit and the third bit line; the second end of the first transmission unit is grounded or connected to a power supply;

[0007] The first control end of the second transmission unit is connected to the second output end of the latch in the SRAM storage unit, the second control end of the second transmission unit is connected to the second bit line, the first end of the second transmission unit is connected to the second input end of the logic operation unit and the fourth bit line; the second end of the second transmission unit is grounded or connected to a power supply;

[0008] The first transmission unit is used to obtain the first operand from the latch of the SRAM storage unit, obtain the second operand from the first bit line, and control the first signal received by the first input terminal of the logic operation unit according to the first operand and the second operand;

[0009] The second transmission unit is used to obtain the third operand from the latch of the SRAM storage unit, obtain the fourth operand from the second bit line, and control the second signal received by the second input terminal of the logic operation unit according to the third operand and the fourth operand;

[0010] The logic operation unit is used to perform a logic operation according to the first signal received by the first input terminal and the second signal received by the second input terminal to obtain the product of the first operand and the second operand, and / or the sum of the first operand and the second operand.

[0011] Preferably, it also includes: an SRAM selection unit and a first pre-charge unit;

[0012] The input and output terminals of the SRAM storage unit are connected to the first terminal of the SRAM selection unit, and the second terminal of the SRAM selection unit is connected to the first bit line;

[0013] The SRAM selection unit is used to select the SRAM storage unit according to the first control signal received by the control end;

[0014] The first end of the first pre-charge unit is connected to a power source, and the second end of the first pre-charge unit is connected to the first end of the SRAM selection unit, and is used to charge the first end of the SRAM selection unit according to a second control signal received by the control end.

[0015] Preferably, it also includes: a logic selection unit and a second pre-charging unit;

[0016] The first input terminal of the logic operation unit is connected with the third bit line, comprising:

[0017] The first input terminal of the logic operation unit is connected to the first terminal of the logic selection unit, and the second terminal of the logic selection unit is connected to the third bit line;

[0018] The first end of the second pre-charging unit is connected to a power source, and the second end of the second pre-charging unit is connected to the first end of the logic selection unit, and is used to charge the first end of the logic selection unit according to a third control signal received by the control end;

[0019] The logic selection unit is used to control the first signal received by the first input terminal of the logic operation unit according to the fourth control signal received by the control terminal.

[0020] Preferably, the first transmission unit comprises: a first transistor and a second transistor;

[0021] The first control end of the first transmission unit is connected to the first output end of the latch in the SRAM storage unit, the second control end of the first transmission unit is connected to the first bit line, the first end of the first transmission unit is connected to the first input end and the third bit line of the logic operation unit; the second end of the first transmission unit is grounded or connected to the power supply, including:

[0022] The gate of the first transistor is connected to the first output terminal of the latch in the SRAM storage unit, the gate of the second transistor is connected to the first bit line, the source of the first transistor is connected to the drain of the second transistor, the drain of the first transistor is grounded or connected to a power supply, and the source of the second transistor is connected to the first input terminal of the logic operation unit and the third bit line.

[0023] Preferably, the second transmission unit comprises: a third transistor and a fourth transistor;

[0024] The first control end of the second transmission unit is connected to the second output end of the latch in the SRAM storage unit, the second control end of the second transmission unit is connected to the second bit line, the first end of the second transmission unit is connected to the second input end of the logic operation unit and the fourth bit line; the second end of the second transmission unit is grounded or connected to the power supply, including:

[0025] The gate of the third transistor is connected to the second output terminal of the latch in the SRAM storage unit, the gate of the fourth transistor is connected to the second bit line, the source of the third transistor is connected to the drain of the fourth transistor, the drain of the third transistor is grounded or connected to a power supply, and the source of the fourth transistor is connected to the second input terminal of the logic operation unit and the fourth bit line.

[0026] Preferably, when the second end of the first transmission unit is grounded and the second end of the second transmission unit is grounded, the logic operation unit includes: a first XOR gate, a first AND gate, a second AND gate, a first OR gate and a first NOT gate;

[0027] The first end of the first transmission unit is connected with the first input end of the logic operation unit and the third bit line, including:

[0028] The first input end of the first AND gate is connected to the first end of the first transmission unit and the third bit line; the input end of the first NOT gate is connected to the first end of the first transmission unit and the third bit line;

[0029] The first end of the second transmission unit is connected with the second input end of the logic operation unit and the fourth bit line, including:

[0030] The second input terminal of the first AND gate is connected to the first terminal of the second transmission unit and the fourth bit line;

[0031] The output end of the first AND gate is connected to the first input end of the first XOR gate and the first input end of the second AND gate, the output end of the second AND gate is connected to the first input end of the first OR gate, the input end of the first NOT gate is connected to the third bit line, and the output end of the first NOT gate is connected to the second input end of the first OR gate;

[0032] The second input terminal of the second AND gate and the second input terminal of the first XOR gate are used to receive a low-order carry number;

[0033] The output terminal of the first XOR gate is used to output the sum of the first operand and the second operand;

[0034] The output terminal of the first OR gate is used to output a high-order carry number of the sum of the first operand and the second operand;

[0035] The output terminal of the first NOT gate is used to output the product of the first operation and the second operation.

[0036] Preferably, when the second terminal of the first transmission unit is connected to a power supply and the second terminal of the second transmission unit is connected to a power supply, the logic unit includes: a second XOR gate, a third AND gate, a fourth AND gate, a second OR gate, a second NOT gate, a third NOT gate and a fourth NOT gate;

[0037] The first end of the first transmission unit is connected with the first input end of the logic operation unit and the third bit line, including:

[0038] An input end of the second NOT gate is connected to the first end of the first transmission unit and the third bit line;

[0039] The first end of the second transmission unit is connected with the second input end of the logic operation unit and the fourth bit line, including:

[0040] An input end of the third NOT gate is connected to the first end of the second transmission unit and the fourth bit line;

[0041] The output end of the second NOT gate is connected to the first input end of the third AND gate, the second input end of the first AND gate is connected to the output end of the third NOT gate, the output end of the third AND gate is connected to the first input end of the second XOR gate and the first input end of the fourth AND gate, the output end of the fourth AND gate is connected to the first input end of the second OR gate, the input end of the fourth NOT gate is connected to the output end of the second NOT gate, and the output end of the fourth NOT gate is connected to the second input end of the second OR gate;

[0042] The second input end of the fourth AND gate and the second input end of the second XOR gate are used to receive a low-order carry number;

[0043] The output terminal of the second XOR gate is used to output the sum of the first operand and the second operand;

[0044] The output terminal of the second OR gate is used to output a high-order carry number of the sum of the first operand and the second operand;

[0045] The output terminal of the fourth NOT gate is used to output the product of the first operation and the second operation.

[0046] Preferably, the first bit line and the second bit line are also used for reading and writing data of the SRAM storage unit.

[0047] Preferably, the logic selection unit comprises: a fifth transistor, and the second pre-charge unit comprises a sixth transistor;

[0048] The first input terminal of the logic operation unit is connected to the first terminal of the logic selection unit, and the second terminal of the logic selection unit is connected to the third bit line, including:

[0049] The gate of the fifth transistor is used to receive a selection control signal, the source of the fifth transistor is connected to the third bit line and is used to receive a drive signal, and the drain of the fifth transistor is connected to the first input terminal of the logic operation unit;

[0050] The first end of the second pre-charging unit is connected to a power source, and the second end of the second pre-charging unit is connected to the first end of the logic selection unit, including:

[0051] The gate of the sixth transistor is used to receive a pre-charge control signal, the source of the sixth transistor is connected to a power supply, and the drain of the sixth transistor is connected to the source of the fifth transistor.

[0052] Preferably, the signal in the first bit line is a high level signal, and the signal in the second bit line is a low level signal, or the signal in the first bit line is a low level signal, and the signal in the second bit line is a high level signal.

[0053] In a second aspect, an embodiment of the present application provides an in-memory device, comprising an in-memory computing circuit based on SRAM as described in any one of the above-mentioned first aspects.

[0054] Preferably, when at least two of the SRAM-based in-memory computing circuits are included, the output end of the high-order carry number of the adjacent low-order in-memory computing circuit is connected to the input end of the low-order carry number of the adjacent high-order in-memory computing circuit, and the product output end of the adjacent low-order in-memory computing circuit is connected to the input end of the operand of the adjacent high-order in-memory computing circuit.

[0055] In a third aspect, an embodiment of the present application provides an electronic device, comprising the internal storage device described in any one of the second aspects above.

[0056] By adopting the scheme provided in the embodiment of the present application, the multiplication and addition operations in the in-memory calculation are realized through the SRAM storage unit, the first transmission unit, the second transmission unit and the logic operation unit. In the present application, only the bit line signal is reused, and the word line signal is not used, that is, the logic operation is realized through the bit line operation, which reduces the difficulty of implementation, and can realize the logic operation of addition and multiplication at the same time, further improves the efficiency of the in-memory circuit, and reduces the power consumption of the processor. In addition, the present application realizes the multiplication logic operation based on the single-bit storage unit, reduces the array area, reduces the overall area consumption and energy consumption of the in-memory circuit, and improves the efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0058] Figure 1 A schematic diagram of the structure of an in-memory computing circuit based on SRAM provided in an embodiment of the present application;

[0059] Figure 2 A schematic diagram of the structure of another SRAM-based in-memory computing circuit provided in an embodiment of the present application;

[0060] Figure 3 A schematic diagram of the structure of another SRAM-based in-memory computing circuit provided in an embodiment of the present application;

[0061] Figure 4 A schematic diagram of the structure of another SRAM-based in-memory computing circuit provided in an embodiment of the present application;

[0062] Figure 5 A schematic diagram of the structure of another SRAM-based in-memory computing circuit provided in an embodiment of the present application;

[0063] Figure 6 A schematic diagram of the structure of another SRAM-based in-memory computing circuit provided in an embodiment of the present application;

[0064] Figure 7 A schematic diagram of the structure of another SRAM-based in-memory computing circuit provided in an embodiment of the present application;

[0065] Figure 8A schematic diagram of the structure of another SRAM-based in-memory computing circuit provided in an embodiment of the present application;

[0066] Fig. 9 A schematic diagram of the structure of another SRAM-based in-memory computing circuit provided in an embodiment of the present application;

[0067] Fig.10 A schematic diagram of the structure of another SRAM-based in-memory computing circuit provided in an embodiment of the present application;

[0068] Fig.11 A schematic diagram of the structure of a storage device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0069] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0070] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0071] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0072] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0073] Before a detailed introduction to the embodiments of the present application, the terms that are applied or may be applied to the embodiments of the present application are first explained.

[0074] SRAM (Static Random-Access Memory) is a type of random access memory. The so-called "static" means that as long as the memory remains powered, the data stored in it can be kept constant.

[0075] A transistor is a solid semiconductor device (including diodes, triodes, field effect transistors, thyristors, etc., sometimes specifically bipolar devices) with multiple functions such as detection, rectification, amplification, switching, voltage regulation, and signal modulation. As a variable current switch, the transistor can control the output current based on the input voltage. Unlike ordinary mechanical switches (such as relays and switches), transistors use electrical signals to control their own opening and closing.

[0076] In the related art, in the traditional von Neumann computer architecture, the data processing unit and the memory are separated, and the data exchange between the two is carried out through the data bus. With the rise of applications such as artificial intelligence and big data in recent years, the exchange of large amounts of data between the data processing unit and the memory has brought huge energy consumption. In order to solve this problem, in-memory computing was proposed. In-memory computing is to combine the memory and the data processing unit to reduce or even eliminate the high-frequency data transmission between the memory and the data processing unit in the computer. The existing way to implement in-memory computing is to mainly implement multiplication operations through multiple memories and multiple word lines, and to implement addition operations through an external full adder. This method requires multiple memories and multiple word lines to implement multiplication operations, which is complicated to implement.

[0077] In response to the above problems, the embodiments of the present application provide an in-memory computing circuit and device based on SRAM, which implements multiplication and addition operations in in-memory computing through SRAM storage units, first transmission units, second transmission units and logic operation units. In the present application, only the bit line signal is reused, and the word line signal is not used, that is, the logic operation is implemented through the bit line operation, which reduces the difficulty of implementation, and can implement addition and multiplication logic operations at the same time, further improving the efficiency of the in-memory circuit and reducing the power consumption of the processor. In addition, the present application implements multiplication logic operations based on single-bit storage units, reduces the array area, reduces the overall area consumption and energy consumption of the in-memory circuit, and improves efficiency. The following is a detailed description.

[0078] See also Figure 1 , is a schematic diagram of a structure of an in-memory computing circuit based on SRAM provided in an embodiment of the present application. The in-memory computing circuit includes: an SRAM storage unit 10 including a latch 101, a first transmission unit 20, a second transmission unit 30 and a logic operation unit 40.

[0079] Among them, the first control end of the first transmission unit 20 is connected to the first output end of the latch 101 in the SRAM storage unit 10, the second control end of the first transmission unit 20 is connected to the first bit line 50, the first end of the first transmission unit 20 is connected to the first input end of the logic operation unit 40 and the third bit line 70; the second end of the first transmission unit 20 is grounded or connected to the power supply.

[0080] The first control end of the second transmission unit 30 is connected to the second output end of the latch 101 in the SRAM storage unit 10, the second control end of the second transmission unit 30 is connected to the second bit line 60, the first end of the second transmission unit 30 is connected to the second input end of the logic operation unit 40 and the fourth bit line 80; the second end of the second transmission unit 30 is grounded or connected to the power supply.

[0081] A first input terminal of the logic operation unit 40 is connected to the third bit line 70 , and a second input terminal of the logic operation unit 40 is connected to the fourth bit line 80 .

[0082] The first transmission unit 20 is used to obtain a first operand from the latch 101 of the SRAM storage unit 10, obtain a second operand from the first bit line 50, and control a first signal received at a first input terminal of the logic operation unit 40 according to the first operand and the second operand.

[0083] The second transmission unit 30 is used to obtain the third operand from the latch 101 of the SRAM storage unit 10, obtain the fourth operand from the second bit line 60, and control the second signal received by the second input terminal of the logic operation unit 40 according to the third operand and the fourth operand.

[0084] The logic operation unit 40 is used to perform a logic operation according to the first signal received at the first input terminal and the second signal received at the second input terminal to obtain the product of the first operand and the second operand, and / or the sum of the first operand and the second operand.

[0085] In the embodiment of the present application, the SRAM memory 10 includes a latch 101, and the latch 101 latches the first operation data and the third operand. The first operand and the third operand are mutually inverted data. That is, when the first operand is 1 in a binary number, the third operand is 0 in a binary number. The first control end of the first transmission unit 20 is connected to the first output end of the latch 101 in the SRAM memory 10, the second control end of the first transmission unit 20 is connected to the first bit line 50, the first end of the first transmission unit 20 is connected to the first input end of the logic operation unit 40 and the third bit line 70, and the second end of the first transmission unit 20 is grounded or connected to a power supply. In this way, the first transmission unit 20 can control whether its first end and the second end are turned on according to the first operand and the second operand received by its first control end and the second control end. When the first end and the second end are controlled to be non-conductive according to the first operation data and the second operation data, the first input end of the logic operation unit 40 receives the electrical signal in the third bit line 70, and at this time, the electrical signal in the third bit line 70 can be regarded as the first signal. At this time, when the electrical signal in the third bit line 70 is a high-level signal, the first signal is a high-level signal, and when the electrical signal in the third bit line 70 is a low-level signal, the first signal is a low-level signal. When the first end and the second end are controlled to be connected according to the first operation data and the second operation data, since the second end of the first transmission unit 20 is grounded or connected to the power supply, when the second end of the first transmission unit 20 is grounded, the electrical signal in the third bit line 70 is pulled low. At this time, the low-level signal pulled low in the third bit line 70 can be used as the first signal and transmitted to the first input end of the logic operation unit 40. When the second end of the first transmission unit 20 is connected to the power supply, the electrical signal in the third bit line 70 is pulled high. At this time, the high-level signal pulled high in the third bit line 70 can be used as the first signal and transmitted to the first input end of the logic operation unit 40. That is, the first transmission unit 20 can control the first signal received by the first input end of the logic operation unit 40 through the acquired first operand and second operand.

[0086] The first control end of the second transmission unit 30 is connected to the second output end of the latch 101 in the SRAM memory 10, the second control end of the second transmission unit 30 is connected to the second bit line 60, the first end of the second transmission unit 30 is connected to the second input end of the logic operation unit 40 and the fourth bit line 80, and the second end of the second transmission unit 30 is grounded or connected to the power supply. In this way, the second transmission unit 30 can control whether its first end and second end are conductive according to the third operand and the fourth operand received by its first control end and the second control end. When the first end and the second end are controlled to be non-conductive according to the third operation data and the fourth operation data, the second input end of the logic operation unit 40 receives the electrical signal in the fourth bit line 80, and at this time, the electrical signal in the fourth bit line 80 can be regarded as the second signal. At this time, when the electrical signal in the fourth bit line 80 is a high level signal, the second signal is a high level signal, and when the electrical signal in the fourth bit line 80 is a low level signal, the second signal is a low level signal. When the first end and the second end are controlled to be connected according to the third operation data and the fourth operation data, since the second end of the second transmission unit 30 is grounded or connected to the power supply, when the second end of the second transmission unit 30 is grounded, the electrical signal in the fourth bit line 80 is pulled low. At this time, the low-level signal pulled low in the fourth bit line 80 can be used as the second signal and transmitted to the second input end of the logic operation unit 40. When the second end of the second transmission unit 30 is connected to the power supply, the electrical signal in the fourth bit line 80 is pulled high. At this time, the high-level signal pulled high in the fourth bit line 80 can be used as the second signal and transmitted to the second input end of the logic operation unit 40. That is, the second transmission unit 30 can control the second signal received by the second input end of the logic operation unit 40 through the obtained third operand and fourth operand.

[0087] The first input end of the logic operation unit 40 is connected to the first end and the third bit line of the first transmission unit 20, and the second input end is connected to the first end and the fourth bit line of the second transmission unit 30. It is used to obtain the first signal and the second signal according to the control of the first transmission unit 20, and perform logical operations according to the first signal and the second signal to obtain the product of the first operand and the second operand and / or the sum of the first operand and the second operand.

[0088] It should be noted that the second operand and the fourth operand are inverted data, that is, when the second operand is 1 in a binary number, the fourth operand is 0 in a binary number, and when the second operand is 0 in a binary number, the fourth operand is 1 in a binary number. In other words, when the second operand is a high-level signal, the fourth operand is a low-level signal. When the second operand is a low-level signal, the fourth operand is a high-level signal.

[0089] In the embodiments of the present application, Figure 2As shown, the SRAM storage unit 10 including the latch 101 includes: the latch 101 and the seventh transistor T7 and the eighth transistor T8. The latch 101 includes the ninth transistor T9, the tenth transistor T10, the eleventh transistor T11, the twelfth transistor T12, the first output terminal Q1 and the second output terminal Q2. The gate of the ninth transistor T9 is connected to the drain of the tenth transistor T10, the source of the twelfth transistor T12 and the gate of the eleventh transistor T11. The source of the ninth transistor T9 is connected to the power supply, and the drain of the ninth transistor T9 is connected to the source of the eleventh transistor T11, the gate of the tenth transistor T10 and the gate of the twelfth transistor T12. The source of the tenth transistor T10 is connected to the power supply. The drain of the eleventh transistor T11 is grounded. The drain of the twelfth transistor T12 is grounded. The ninth transistor T9 and the eleventh transistor T11 form an inverter, the tenth transistor T10 and the twelfth transistor T12 form an inverter, and the two inverters form a latch 101. The first output terminal Q1 is connected to the drain of the ninth transistor T9 and the source of the eleventh transistor T11, and the second output terminal Q2 is connected to the drain of the tenth transistor T10 and the source of the twelfth transistor T12. The gate of the seventh transistor T7 is connected to the word line, the source of the seventh transistor T7 is connected to the first bit line 50, and the drain of the seventh transistor T7 is connected to the first output terminal Q1 of the latch 101. The gate of the eighth transistor T8 is connected to the word line, the source of the eighth transistor T8 is connected to the second output terminal Q2 of the latch 101, and the drain of the eighth transistor T8 is connected to the second bit line 60. The seventh transistor T7 and the eighth transistor T8 are control switches from the SRAM storage unit 10 to the first bit line 50 and the second bit line 60 for reading and writing.

[0090] That is, the first bit line 50 and the second bit line 60 are also used for reading and writing data of the SRAM storage unit 10. In the embodiment of the present application, the first bit line 50 and the second bit line 60 are respectively connected to the seventh transistor T7 and the eighth transistor T8 of the SRAM storage unit 10 for reading and writing data of the SRAM storage unit 10.

[0091] The SRAM storage unit 10 has three states: a standby state (circuit is idle), a reading state, and a writing state (modifying content).

[0092] When the SRAM memory cell 10 is in the standby state, the word line is a low level signal, so the seventh transistor T7 and the eighth transistor T8 used as control are in an open circuit, and the latch 101 is isolated from the first bit line 50 and the second bit line 60. The latch 101 maintains the data stored therein.

[0093] When the SRAM memory cell 10 is in the reading state, it is assumed that the content stored in the SRAM memory cell 10 is 1, that is, the level at Q1 is a high level signal. At the beginning of the read cycle, the first bit line 50 and the second bit line 60 are pre-charged to a high level signal, that is, the pre-charge value of the first bit line 50 and the second bit line 60 is logic 1, and then the word line WL is charged to a high level signal, so that the two access control transistors T7 and T8 are turned on. Then the value at the first output terminal Q1 of the latch 101 is transferred to the first bit line 50, and the value at the second output terminal Q2 of the latch 101 is transferred to the second bit line 60. At this time, since the value at the first output terminal Q1 of the latch 101 is 1, the first bit line 50 maintains a high level signal. The value outputted from the second output terminal Q2 of the latch 101 is 0, so that the precharge voltage in the second bit line 60 is discharged and becomes a low-level signal. This is directly grounded through the path after the twelfth transistor T12 and the eighth transistor T8 are turned on, so that its value is logic 0 (that is, the high level of the first output terminal Q1 of the latch 101 turns on the twelfth transistor T12). On the first bit line 50 side, the ninth transistor T9 and the seventh transistor T7 are turned on, connecting the first bit line 50 to the logic 1 represented by VDD (the ninth transistor T9 is a P-channel field effect transistor, and the ninth transistor T9 is turned on due to the low-level signal added to the gate). If the content stored in the SRAM storage unit 10 is 0, the opposite circuit state will make the logic value of the signal in the second bit line 60 1 and the logic value of the signal in the first bit line 50 0. Only a small potential difference is required between the first bit line 50 and the second bit line 60, and the reading amplifier circuit will identify which bit line is a high-level signal and which is a low-level signal. The higher the sensitivity, the faster the reading speed.

[0094] When the SRAM memory cell 10 is in the writing state, at the beginning of the write cycle, the state to be written is loaded into the first bit line 50. If 0 is to be written, the signal logic value in the second bit line 60 is set to 1, and the signal logic value of the first bit line 50 is set to 0. Then the word line WL is loaded as a high-level signal, and the states of the first bit line 50 and the second bit line 60 are loaded into the latch 101 of the SRAM memory cell 10. This is because the seventh transistor T7 and the eighth transistor T8 are designed to be stronger than the transistors in the latch 101 by driving the inputs of the first bit line 50 and the second bit line 60, so that the first bit line 50 and the second bit line 60 can cover the previous state of the cross-coupled inverter in the latch 101.

[0095] In the embodiment of the present application, when performing addition and multiplication operations through the SRAM storage unit 10 , the first bit line 50 and the second bit line 60 are used to store the second operand and the fourth operand so as to be acquired by the first transmission unit 20 and the second transmission unit 30 .

[0096] Furthermore, if Figure 3 and Figure 4 As shown, the first transmission unit 20 includes: a first transistor T1 and a second transistor T2. At this time, the first control end of the first transmission unit 20 is connected to the first output end of the latch 101 in the SRAM storage unit 10, the second control end of the first transmission unit 20 is connected to the first bit line 50, the first end of the first transmission unit 20 is connected to the first input end of the logic operation unit 40 and the third bit line 70; the second end of the first transmission unit 20 is grounded or connected to the power supply, including:

[0097] The gate of the first transistor T1 is connected to the first output terminal Q1 of the latch 101 in the SRAM storage unit 10, the gate of the second transistor T2 is connected to the first bit line 50, the source of the first transistor T1 is connected to the drain of the second transistor T2, and the drain of the first transistor T1 is grounded. Figure 3 As shown, or, the drain of the first transistor T1 is connected to the power supply, referring to Figure 4 As shown, the source of the second transistor T2 is connected to the first input terminal of the logic operation unit 40 and the third bit line 70 .

[0098] In the embodiment of the present application, when the in-memory calculation circuit needs to perform addition and / or multiplication operations between the first operand and the second operand, the first operand can be stored in the latch 101 in the SRAM storage unit 10. At this time, the third operand that is inverted with the first operation data is also stored in the latch 101 in the SRAM storage unit 10. The second operand is stored in the first bit line 50, that is, the logic value of the signal in the first bit line 50 is the second operand. For example, the second operand can be 1 or 0. Since the second operand and the fourth operand are inverted, when the second operand is stored in the first bit line 50, the fourth operand is stored in the second bit line 60. At this time, the electrical signal in the first bit line 50 and the electrical signal in the second bit line 60 are inverted, that is, the signal in the first bit line 50 is a high level signal, and the signal in the second bit line 60 is a low level signal, or the signal in the first bit line 50 is a low level signal, and the signal in the second bit line 60 is a high level signal.

[0099] Specifically, when the first operand and the second operand are both 1, the value stored at the first output terminal Q1 of the latch 101 in the SRAM storage unit 10 is 1, and the corresponding output is a high-level signal, and the signal corresponding to the logic value 1 stored in the first bit line 50 is a high-level signal. The gate of the first transistor T1 receives the high-level signal output by the first output terminal Q1 of the latch 101 in the SRAM storage unit 10, and the first transistor T1 is turned on. The gate of the second transistor T2 receives the high-level signal output by the first bit line 50, and the second transistor T2 is turned on. Since the source of the second transistor T2 is connected to the third bit line 70 and the first input terminal of the logic operation unit 40, the drain of the first transistor T1 is grounded or connected to the power supply. When the drain of the first transistor T1 is grounded, the third bit line 70 is directly grounded, and the high-level signal pre-charged therein is pulled low. At this time, the first input terminal of the logic operation unit 40 obtains the first signal as a low-level signal, that is, a signal with a logic value of 0. When the drain of the first transistor T1 is connected to the power supply, the third bit line 70 is directly connected to the power supply, and the pre-charged high-level signal therein maintains a high-level signal. At this time, the first input terminal of the logic operation unit 40 obtains the first signal as a high-level signal, that is, a signal with a logic value of 1 is obtained.

[0100] When the first operand and the second operand are both 0, the value stored in the first output terminal Q1 of the latch 101 in the SRAM storage unit 10 is 0, and the corresponding output is a low-level signal, and the signal corresponding to the logic value 0 stored in the first bit line 50 is a low-level signal. The gate of the first transistor T1 receives the low-level signal output by the first output terminal Q1 of the latch 101 in the SRAM storage unit 10, and the first transistor T1 is disconnected. The gate of the second transistor T2 receives the low-level signal output by the first bit line 50, and the second transistor T2 is disconnected. At this time, the first input terminal of the logic operation unit 40 obtains the first signal as the signal in the third bit line 70. In the embodiment of the present application, when the drain of the first transistor T1 is grounded, the third bit line 70 is pre-charged with a high-level signal at the initial stage of the operation of the in-memory calculation circuit. At this time, the first input terminal of the logic operation unit 40 obtains the first signal as a high-level signal, that is, a signal with a logic value of 1. When the drain of the first transistor T1 is connected to the power supply, the third bit line 70 is pre-charged with a low-level signal at the initial stage of the operation of the in-memory calculation circuit. At this time, the first input terminal of the logic operation unit 40 obtains the first signal which is a low level signal, that is, obtains a signal with a logic value of 0.

[0101] When the first operand is 0 and the second operand is 1, the value stored in the first output terminal Q1 of the latch 101 in the SRAM storage unit 10 is 0, and the corresponding output is a low-level signal, and the signal corresponding to the logic value 1 stored in the first bit line 50 is a high-level signal. The gate of the first transistor T1 receives the low-level signal output by the first output terminal Q1 of the latch 101 in the SRAM storage unit 10, and the first transistor T1 is turned off. The gate of the second transistor T2 receives the high-level signal output by the first bit line 50, and the second transistor T2 is turned on. Since the first transistor T1 is turned off, the path from the second transistor T2 to the first transistor T1 is disconnected. At this time, the first input terminal of the logic operation unit 40 obtains the first signal as the signal in the third bit line 70. In the embodiment of the present application, when the drain of the first transistor T1 is grounded, the third bit line 70 is pre-charged to a high-level signal at the initial stage of the operation of the in-memory calculation circuit. At this time, the first input terminal of the logic operation unit 40 obtains the first signal as a high-level signal, that is, a signal with a logic value of 1. When the drain of the first transistor T1 is connected to the power supply, the third bit line 70 is pre-charged with a low level signal at the initial operation of the internal calculation circuit. At this time, the first input terminal of the logic operation unit 40 obtains a first signal as a low level signal, that is, a signal with a logic value of 0.

[0102] When the first operand is 1 and the second operand is 0, the value stored in the first output terminal Q1 of the latch 101 in the SRAM storage unit 10 is 1, and the corresponding output is a high-level signal, and the signal corresponding to the logic value 0 stored in the first bit line 50 is a low-level signal. The gate of the first transistor T1 receives the high-level signal output by the first output terminal Q1 of the latch 101 in the SRAM storage unit 10, and the first transistor T1 is turned on. The gate of the second transistor T2 receives the low-level signal output by the first bit line 50, and the second transistor T2 is turned off. Since the second transistor T2 is turned off, the path from the second transistor T2 to the first transistor T1 is disconnected. At this time, the first input terminal of the logic operation unit 40 obtains the first signal as the signal in the third bit line 70. In the embodiment of the present application, when the drain of the first transistor T1 is grounded, the third bit line 70 is pre-charged to a high-level signal at the initial stage of the operation of the in-memory calculation circuit. At this time, the first input terminal of the logic operation unit 40 obtains the first signal as a high-level signal, that is, a signal with a logic value of 1. When the drain of the first transistor T1 is connected to the power supply, the third bit line 70 is pre-charged with a low level signal at the initial operation of the internal calculation circuit. At this time, the first input terminal of the logic operation unit 40 obtains a first signal as a low level signal, that is, a signal with a logic value of 0.

[0103] It should be noted that in the embodiment of the present application, the logic value of the high level signal is 1, and the logic value of the low level signal is 0. Of course, the logic value of the low level signal can also be 0, and the logic value of the high level signal can be 1, and the present application does not limit this.

[0104] Further, refer to Figure 3 and Figure 4 As shown, the second transmission unit 30 includes a third transistor T3 and a fourth transistor T4.

[0105] The first control terminal of the second transmission unit 30 is connected to the second output terminal of the latch 101 in the SRAM storage unit 10, the second control terminal of the second transmission unit 30 is connected to the second bit line 60, the first terminal of the second transmission unit 30 is connected to the second input terminal of the logic operation unit 40 and the fourth bit line 80; the second terminal of the second transmission unit 30 is grounded or connected to the power supply, including:

[0106] The gate of the third transistor T3 is connected to the second output terminal Q2 of the latch 101 in the SRAM storage unit 10, the gate of the fourth transistor T4 is connected to the second bit line 60, the source of the third transistor T3 is connected to the drain of the fourth transistor T4, and the drain of the third transistor T3 is grounded. Figure 3 As shown, or, the drain of the third transistor T3 is connected to the power supply, referring to Figure 4 As shown, the source of the fourth transistor T4 is connected to the second input terminal of the logic operation unit 40 and the fourth bit line 80 .

[0107] Since the second transmission unit 30 needs to control the on and off of the third transistor T3 and the fourth transistor T4 according to the obtained third operand and fourth operand, the third operand and the fourth operand need to be obtained. The third operand and the first operand are inversely proportional to each other, and the second operand and the fourth operand are inversely proportional to each other, so after the first operand and the second operand are determined, the third operand and the fourth operand can be determined.

[0108] At this time, when the first operand and the second operand are both 1, the third operand and the fourth operand are both 0, the value stored in the second output terminal Q2 of the latch 101 in the SRAM storage unit 10 is 0, and the corresponding output is a low-level signal, and the signal corresponding to the logic value 0 stored in the second bit line 60 is a low-level signal. The gate of the third transistor T3 receives the low-level signal output by the second output terminal Q2 of the latch 101 in the SRAM storage unit 10, and the third transistor T3 is disconnected. The gate of the fourth transistor T4 receives the low-level signal output by the second bit line 60, and the fourth transistor T4 is disconnected. At this time, the second input terminal of the logic operation unit 40 obtains the second signal as the signal in the fourth bit line 80. In the embodiment of the present application, when the drain of the third transistor T3 is grounded, the fourth bit line 80 is pre-charged to a high-level signal at the initial stage of the operation of the in-memory calculation circuit. At this time, the second input terminal of the logic operation unit 40 obtains the second signal as a high-level signal, that is, a signal with a logic value of 1. When the drain of the first transistor T1 is connected to the power supply, the fourth bit line 80 is pre-charged with a low level signal at the initial operation of the internal calculation circuit. At this time, the second input terminal of the logic operation unit 40 obtains a second signal as a low level signal, that is, a signal with a logic value of 0.

[0109] When the first operand and the second operand are both 0, the third operand and the fourth operand are both 1, the value stored in the second output terminal Q2 of the latch 101 in the SRAM storage unit 10 is 1, and the corresponding output is a high-level signal, and the signal corresponding to the logic value 1 stored in the second bit line 60 is a high-level signal. The gate of the third transistor T3 receives the high-level signal output by the second output terminal Q2 of the latch 101 in the SRAM storage unit 10, and the third transistor T3 is turned on. The gate of the fourth transistor T4 receives the high-level signal output by the second bit line 60, and the fourth transistor T4 is turned on. Since the source of the fourth transistor T4 is connected to the fourth bit line 80 and the second input terminal of the logic operation unit 40, the drain of the third transistor T2 is grounded or connected to the power supply. When the drain of the third transistor T3 is grounded, the fourth bit line 80 is directly grounded, and the pre-charged high-level signal therein is pulled low. At this time, the second input terminal of the logic operation unit 40 obtains the second signal as a low-level signal, that is, the signal with a logic value of 0 is obtained. When the drain of the third transistor T3 is connected to the power supply, the fourth bit line 80 is directly connected to the power supply, and the pre-charged high-level signal therein maintains a high-level signal. At this time, the second input terminal of the logic operation unit 40 obtains the second signal as a high-level signal, that is, a signal with a logic value of 1 is obtained.

[0110] When the first operand is 0 and the second operand is 1, the third operand is 1, the fourth operand is 0, the value stored in the second output terminal Q2 of the latch 101 in the SRAM storage unit 10 is 1, and the corresponding output is a high-level signal, and the signal corresponding to the logic value 0 stored in the second bit line 60 is a low-level signal. The gate of the third transistor T3 receives the high-level signal output by the second output terminal Q2 of the latch 101 in the SRAM storage unit 10, and the third transistor T3 is turned on. The gate of the fourth transistor T4 receives the low-level signal output by the second bit line 60, and the fourth transistor T4 is turned off. Since the fourth transistor T4 is turned off, the path from the fourth transistor T4 to the third transistor T3 is disconnected. At this time, the second input terminal of the logic operation unit 40 obtains the second signal as the signal in the fourth bit line 80. In the embodiment of the present application, when the drain of the third transistor T3 is grounded, the fourth bit line 80 is pre-charged to a high-level signal at the initial stage of the operation of the in-memory calculation circuit. At this time, the second input terminal of the logic operation unit 40 obtains the second signal as a high level signal, that is, a signal with a logic value of 1. When the drain of the first transistor T1 is connected to the power supply, the fourth bit line 80 is pre-charged to a low level signal at the initial operation of the in-memory calculation circuit. At this time, the second input terminal of the logic operation unit 40 obtains the second signal as a low level signal, that is, a signal with a logic value of 0.

[0111] When the first operand is 1 and the second operand is 0, the third operand is 0, the fourth operand is 1, the value stored in the second output terminal Q2 of the latch 101 in the SRAM storage unit 10 is 0, and the corresponding output is a low-level signal, and the signal corresponding to the logic value 1 stored in the second bit line 60 is a high-level signal. The gate of the third transistor T3 receives the low-level signal output by the second output terminal Q2 of the latch 101 in the SRAM storage unit 10, and the third transistor T3 is turned off. The gate of the fourth transistor T4 receives the high-level signal output by the second bit line 60, and the fourth transistor T4 is turned on. Since the third transistor T3 is turned off, the path from the fourth transistor T4 to the third transistor T3 is disconnected. At this time, the second input terminal of the logic operation unit 40 obtains the second signal as the signal in the fourth bit line 80. In the embodiment of the present application, when the drain of the third transistor T3 is grounded, the fourth bit line 80 is pre-charged to a high-level signal at the initial stage of the operation of the in-memory calculation circuit. At this time, the second input terminal of the logic operation unit 40 obtains the second signal as a high level signal, that is, a signal with a logic value of 1. When the drain of the first transistor T1 is connected to the power supply, the fourth bit line 80 is pre-charged to a low level signal at the initial operation of the in-memory calculation circuit. At this time, the second input terminal of the logic operation unit 40 obtains the second signal as a low level signal, that is, a signal with a logic value of 0.

[0112] Through the above circuit, the first input terminal of the logic operation unit 40 receives the first signal, and the second input terminal receives the second signal. The logic operation unit 40 can perform a logic operation based on the first signal and the second signal, and then output the product of the first operand and the second operation data and / or output the sum of the first operand and the second operation data.

[0113] Furthermore, since the second end of the first transmission unit 20 can be grounded or connected to a power supply, similarly, the second end of the second transmission unit 30 can be grounded or connected to a power supply. The specific implementation of the logic operation unit 40 varies according to the different signals connected to the second end of the first transmission unit 20 and the second end of the second transmission unit 30, as follows.

[0114] When the second end of the first transmission unit 20 is grounded and the second end of the second transmission unit 30 is grounded, the logic operation unit 40 includes: a first XOR gate 401, a first AND gate 402, a second AND gate 403, a first OR gate 404 and a first NOT gate 405. Figure 5 shown.

[0115] The first end of the first transmission unit 20 is connected to the first input end of the logic operation unit 40 and the third bit line 70, including: the first input end of the first AND gate 402 is connected to the first end of the first transmission unit 20 and the third bit line 70; the input end of the first NOT gate 405 is connected to the first end of the first transmission unit 20 and the third bit line 70.

[0116] The first end of the second transmission unit 30 is connected to the second input end of the logic operation unit 40 and the fourth bit line 80 , including: the second input end of the first AND gate 402 is connected to the first end of the second transmission unit 30 and the fourth bit line 80 .

[0117] The output end of the first AND gate 402 is connected to the first input end of the first XOR gate 401 and the first input end of the second AND gate 403, the output end of the second AND gate 403 is connected to the first input end of the first OR gate 404, the input end of the first NOT gate 405 is connected to the third bit line 70, and the output end of the first NOT gate 405 is connected to the second input end of the first OR gate 404.

[0118] The second input terminal of the second AND gate 403 and the second input terminal of the first XOR gate 401 are used to receive the low-order carry number;

[0119] The output terminal of the first XOR gate 401 is used to output the sum of the first operand and the second operand.

[0120] The output terminal of the first OR gate 404 is used to output a high-order carry number of the sum of the first operand and the second operand.

[0121] The output terminal of the first NOT gate 405 is used to output the product of the first operation and the second operation.

[0122] In the embodiment of the present application, when the first operand and the second operand are multiplied, the first operand is written into the latch 101 of the SRAM storage unit 10 through the write function of the SRAM storage unit 10. At this time, the latch contains the first operand and the third operand, wherein the first operand and the third operand are mutually inverted. The second operand is passed into the first bit line 50, while the signal in the word line WL of the SRAM storage unit 10 is kept as a low level signal. The second operand is stored as the voltage value of the first bit line 50, and the signals in the first bit line 50 and the second bit line 60 are mutually inverted.

[0123] In the in-memory operation circuit, the on-off of the first transistor T1 and the second transistor T2 is controlled according to the potential of the first output terminal Q1 and the first bit line 50 in the latch 101. The on-off of the third transistor T3 and the fourth transistor T4 is controlled according to the potential of the second output terminal Q2 and the second bit line 60 in the latch 101. The third bit line 70 and the fourth bit line 80 are precharged to high-level signals. The first signal received by the first input terminal of the first AND gate 401 and the input terminal of the first NOT gate 405 in the logic operation circuit 40 is controlled by the on-off of the first transistor T1 and the second transistor T2. The second signal received by the second input terminal of the first AND gate 401 in the logic operation circuit 40 is controlled by the on-off of the third transistor T3 and the fourth transistor T4.

[0124] When performing a multiplication operation, after the input end of the first NOT gate 405 receives the first signal, the multiplication result MOUT is obtained through the first-stage inverter of the first NOT gate 405. The following Table 1 is a truth table of the multiplication operation.

[0125] Table 1

[0126] First operand 0 0 1 1 Second operand 0 1 0 1 First signal 1 1 1 0 Product (MOUT) 0 0 0 1

[0127] For example, when the first operand is 0 and the second operand is 0, it can be seen from the above circuit that the first signal is a high-level signal with a logic value of 1. At this time, the input end of the first NOT gate 405 receives a high-level signal with a logic value of 1, and its output end outputs a low-level signal with a logic value of 0. That is, the product of the first operand and the second operand is 0.

[0128] Alternatively, when the first operand is 0 and the second operand is 1, it can be seen from the above circuit that the first signal is a high-level signal with a logic value of 1. At this time, the input end of the first NOT gate 405 receives a high-level signal with a logic value of 1, and its output end outputs a low-level signal with a logic value of 0. That is, the product of the first operand and the second operand is 0.

[0129] Alternatively, when the first operand is 1 and the second operand is 0, it can be seen from the above circuit that the first signal is a high-level signal with a logic value of 1. At this time, the input end of the first NOT gate 405 receives a high-level signal with a logic value of 1, and its output end outputs a low-level signal with a logic value of 0. That is, the product of the first operand and the second operand is 0.

[0130] Alternatively, when the first operand is 1 and the second operand is 1, it can be seen from the above circuit that the first signal is a low-level signal with a logic value of 0. At this time, the input end of the first NOT gate 405 receives a low-level signal with a logic value of 0, and its output end outputs a high-level signal with a logic value of 1. That is, the product of the first operand and the second operand is 1.

[0131] When performing addition operation, the first signal and the second signal are transmitted to the first input terminal and the second input terminal of the first AND gate 402 of the logic operation unit 40, and the input signal CIN of the low-order carry number is input to the second input terminal of the second AND gate 403 and the second input terminal of the first XOR gate 401. The first XOR gate 401, the first AND gate 402, the second AND gate 403 and the first OR gate 404 perform logical operation to obtain the sum SUM of the first operand and the second operand and the carry output COUT. Table 2 is a truth table of addition operation, which is as follows.

[0132] Table 2

[0133] First operand 0 0 0 0 1 1 1 1 Second operand 0 0 1 1 0 0 1 1 First signal 1 1 1 1 1 1 0 0

[0134]

[0135] For example, when the first operand is 0, the second operand is 0, and the low-order carry number is 0, it can be known from the above circuit that the first signal is a high-level signal with a logic value of 1, and the second signal is a low-level signal with a logic value of 0. The first input end of the first AND gate 402 receives a high-level signal with a logic value of 1, and the second input end of the first AND gate 402 receives a low-level signal with a logic value of 0, and the output end of the first AND gate 402 outputs a low-level signal with a logic value of 0. The input end of the first NOT gate 405 receives a high-level signal with a logic value of 1, and the output end of the first NOT gate 405 outputs a low-level signal with a logic value of 0. The first input end of the first XOR gate 401 receives a low-level signal with a logic value of 0 outputted from the output end of the first AND gate 402, and the signal received at the second input end of the first XOR gate 401 is an input signal of the low-order carry number, which is a low-level signal with a logic value of 0. Since the two input ends of the first XOR gate 401 receive the same signal, the output end of the first XOR gate 401 outputs a low-level signal with a logic value of 0. That is, the sum of the first operand, the second operand and the low-order carry number is 0. The first input end of the second AND gate 403 receives the low-level signal with a logic value of 0 outputted from the output end of the first AND gate 402, and the second input end of the second AND gate 403 receives the input signal of the low-order carry number, which is a low-level signal with a logic value of 0. At this time, the output end of the second AND gate 403 outputs a low-level signal with a logic value of 0. The first input end of the first OR gate 404 receives the low-level signal with a logic value of 0 outputted from the output end of the second AND gate 403, and the second input end of the first OR gate 404 receives the low-level signal with a logic value of 0 outputted from the output end of the first NOT gate 405. The output end of the first OR gate 404 outputs a low-level signal with a logic value of 0, that is, the high-order carry number of the sum of the first operand, the second operand and the low-order carry number is 0.

[0136] Alternatively, when the first operand is 1, the second operand is 0, and the low-order carry number is 1, it can be known from the above circuit that the first signal is a high-level signal with a logic value of 1, the second signal is a high-level signal with a logic value of 1, the first input end of the first AND gate 402 receives a high-level signal with a logic value of 1, the second input end of the first AND gate 402 receives a high-level signal with a logic value of 1, and the output end of the first AND gate 402 outputs a high-level signal with a logic value of 1. The input end of the first NOT gate 405 receives a high-level signal with a logic value of 1, and the output end of the first NOT gate 405 outputs a low-level signal with a logic value of 0. The first input end of the first XOR gate 401 receives a high-level signal with a logic value of 1 outputted from the output end of the first AND gate 402, and the signal received at the second input end of the first XOR gate 401 is an input signal of the low-order carry number, which is a high-level signal with a logic value of 1. Since the two input ends of the first XOR gate 401 receive the same signal, the output end of the first XOR gate 401 outputs a low-level signal with a logic value of 0. That is, the sum of the first operand, the second operand and the low-order carry number is 0. The first input end of the second AND gate 403 receives a high-level signal whose logic value is 1 output from the output end of the first AND gate 402, and the second input end of the second AND gate 403 receives an input signal whose logic value is 1, and the output end of the second AND gate 403 outputs a high-level signal whose logic value is 1. The first input end of the first OR gate 404 receives a high-level signal whose logic value is 1 output from the output end of the second AND gate 403, and the second input end of the first OR gate 404 receives a low-level signal whose logic value is 0 output from the output end of the first NOT gate 405, and the output end of the first OR gate 404 outputs a high-level signal whose logic value is 1, that is, the high-order carry number of the sum of the first operand, the second operand and the low-order carry number is 1.

[0137] Alternatively, when the first operand is 1, the second operand is 1, and the low-order carry number is 1, it can be known from the above circuit that the first signal is a low-level signal with a logic value of 0, the second signal is a low-level signal with a logic value of 1, the first input end of the first AND gate 402 receives a low-level signal with a logic value of 0, the second input end of the first AND gate 402 receives a high-level signal with a logic value of 1, and the output end of the first AND gate 402 outputs a low-level signal with a logic value of 0. The input end of the first NOT gate 405 receives a low-level signal with a logic value of 0, and the output end of the first NOT gate 405 outputs a high-level signal with a logic value of 1. The first input end of the first XOR gate 401 receives a low-level signal with a logic value of 0 output from the output end of the first AND gate 402, and the signal received at the second input end of the first XOR gate 401 is an input signal of the low-order carry number, which is a high-level signal with a logic value of 1. Since the two input ends of the first XOR gate 401 receive different signals, the output end of the first XOR gate 401 outputs a high-level signal with a logic value of 1. That is, the sum of the first operand, the second operand and the low-order carry number is 1. The first input end of the second AND gate 403 receives a low-level signal with a logic value of 0 outputted from the output end of the first AND gate 402, and the second input end of the second AND gate 403 receives an input signal of the low-order carry number, which is a high-level signal with a logic value of 1. At this time, the output end of the second AND gate 403 outputs a low-level signal with a logic value of 0, the first input end of the first OR gate 404 receives a low-level signal with a logic value of 0 outputted from the output end of the second AND gate 403, the second input end of the first OR gate 404 receives a high-level signal with a logic value of 1 outputted from the first NOT gate 405, and the output end of the first OR gate 404 outputs a high-level signal with a logic value of 1, that is, the high-order carry number of the sum of the first operand, the second operand and the low-order carry number is 1.

[0138] It should be noted that other situations of the first operand, the second operand and the low-order carry number can be the above examples, and this application will not go into details.

[0139] In another embodiment, when the second terminal of the first transmission unit 20 is connected to the power supply and the second terminal of the second transmission unit 30 is connected to the power supply, the logic unit 40 includes: a second XOR gate 406, a third AND gate 407, a fourth AND gate 408, a second OR gate 409, a second NOT gate 410, a third NOT gate 411 and a fourth NOT gate 412. Figure 6 shown.

[0140] The first end of the first transmission unit 20 is connected to the first input end of the logic operation unit 40 and the third bit line 70 , including: the input end of the second NOT gate 410 is connected to the first end of the first transmission unit 20 and the third bit line 70 .

[0141] The first end of the second transmission unit 30 is connected to the second input end of the logic operation unit 40 and the fourth bit line 80 , including: the input end of the third NOT gate 411 is connected to the first end of the second transmission unit 30 and the fourth bit line 80 .

[0142] The output end of the second NOT gate 410 is connected to the first input end of the third AND gate 407, the second input end of the third AND gate 407 is connected to the output end of the third NOT gate 411, the output end of the third AND gate 407 is connected to the first input end of the second XOR gate 406 and the first input end of the fourth AND gate 408, the output end of the fourth AND gate 408 is connected to the first input end of the second OR gate 409, the input end of the fourth NOT gate 412 is connected to the output end of the second NOT gate 410, and the output end of the fourth NOT gate 412 is connected to the second input end of the second OR gate 409.

[0143] The second input terminal of the fourth AND gate 408 and the second input terminal of the second XOR gate 406 are used to receive the low-order carry bit.

[0144] The output terminal of the second XOR gate 406 is used to output the sum of the first operand and the second operand.

[0145] The output terminal of the second OR gate 409 is used to output a high-order carry number of the sum of the first operand and the second operand.

[0146] The output terminal of the fourth NOT gate 412 is used to output the product of the first operation and the second operation.

[0147] In the embodiment of the present application, when the first operand and the second operand are multiplied, the first operand is written into the latch 101 of the SRAM storage unit 10 through the write function of the SRAM storage unit 10. At this time, the latch contains the first operand and the third operand, wherein the first operand and the third operand are mutually inverted. The second operand is passed into the first bit line 50, while the signal in the word line WL of the SRAM storage unit 10 is kept as a low level signal. The second operand is stored as the voltage value of the first bit line 50, and the signals in the first bit line 50 and the second bit line 60 are mutually inverted.

[0148] In the in-memory operation circuit, the on-off of the first transistor T1 and the second transistor T2 is controlled according to the potential of the first output terminal Q1 and the first bit line 50 in the latch 101. The on-off of the third transistor T3 and the fourth transistor T4 is controlled according to the potential of the second output terminal Q2 and the second bit line 60 in the latch 101. The third bit line 70 and the fourth bit line 80 are precharged to low-level signals. The first signal received by the input terminal of the second NOT gate 410 in the logic operation circuit 40 is controlled by the on-off of the first transistor T1 and the second transistor T2. The second signal received by the third NOT gate 411 in the logic operation circuit 40 is controlled by the on-off of the third transistor T3 and the fourth transistor T4.

[0149] When performing multiplication, after the input end of the second NOT gate 410 receives the first signal, it is transmitted to the fourth NOT gate 412, and the multiplication result MOUT is obtained through the first-stage inverter of the fourth NOT gate 412. Table 3 below is another truth table of multiplication.

[0150] Table 3

[0151] First operand 0 0 1 1 Second operand 0 1 0 1 First signal 0 0 0 1 Product (MOUT) 0 0 0 1

[0152] For example, when the first operand is 0 and the second operand is 0, it can be known from the above circuit that the first signal is a low-level signal with a logic value of 0. At this time, the input end of the second NOT gate 410 receives a low-level signal with a logic value of 0, and its output end outputs a high-level signal with a logic value of 1, which is transmitted to the input end of the fourth NOT gate 412. The output end of the fourth NOT gate 412 outputs a low-level signal with a logic value of 0, that is, the product of the first operand and the second operand is 0.

[0153] Alternatively, when the first operand is 0 and the second operand is 1, it can be known from the above circuit that the first signal is a low-level signal with a logic value of 0. At this time, the input end of the second NOT gate 410 receives a low-level signal with a logic value of 0, and its output end outputs a high-level signal with a logic value of 1, which is transmitted to the input end of the fourth NOT gate 412. The output end of the fourth NOT gate 412 outputs a low-level signal with a logic value of 0, that is, the product of the first operand and the second operand is 0.

[0154] Alternatively, when the first operand is 1 and the second operand is 0, it can be seen from the above circuit that the first signal is a low-level signal with a logic value of 0. At this time, the input end of the second NOT gate 410 receives a low-level signal with a logic value of 0, and its output end outputs a high-level signal with a logic value of 1, which is transmitted to the input end of the fourth NOT gate 412. The output end of the fourth NOT gate 412 outputs a low-level signal with a logic value of 0, that is, the product of the first operand and the second operand is 0.

[0155] Alternatively, when the first operand is 1 and the second operand is 1, it can be seen from the above circuit that the first signal is a high-level signal with a logic value of 1. At this time, the input end of the second NOT gate 410 receives a high-level signal with a logic value of 1, and its output end outputs a low-level signal with a logic value of 0, which is transmitted to the input end of the fourth NOT gate 412. The output end of the fourth NOT gate 412 outputs a high-level signal with a logic value of 1, that is, the product of the first operand and the second operand is 1.

[0156] When performing addition operation, the first signal and the second signal are transmitted to the input end of the second NOT gate 410 and the input end of the third NOT gate 411 of the logic operation unit 40, and the input signal CIN of the low-order carry number is input to the second input end of the fourth AND gate 408 and the second input end of the second XOR gate 406. The second XOR gate 406, the third AND gate 407, the fourth AND gate 408 and the second OR gate 409 perform logical operation to obtain the sum SUM of the first operand and the second operand and the carry output COUT. Table 4 is another truth table of addition operation, which is as follows.

[0157] Table 4

[0158]

[0159]

[0160] For example, when the first operand is 0, the second operand is 0, and the low-order carry number is 0, it can be seen from the above circuit that the first signal is a low-level signal with a logic value of 0, the second signal is a high-level signal with a logic value of 1, the input end of the second NOT gate 410 receives a low-level signal with a logic value of 0, the input end of the third NOT gate 411 receives a high-level signal with a logic value of 1, and the input end of the fourth NOT gate 412 receives a high-level signal with a logic value of 1 output from the output end of the second NOT gate 410. The first input end of the third AND gate 407 receives a high-level signal with a logic value of 1 output from the output end of the second NOT gate 410, the second input end of the third AND gate 407 receives a low-level signal with a logic value of 0 output from the output end of the third NOT gate, and the output end of the third AND gate 407 outputs a low-level signal with a logic value of 0. The input end of the fourth NOT gate 412 receives a high-level signal with a logic value of 1 output from the output end of the second NOT gate 410, and the output end of the fourth NOT gate 412 outputs a low-level signal with a logic value of 0. The first input end of the second XOR gate 406 receives a low-level signal with a logic value of 0 outputted from the output end of the third AND gate 407, and the signal received from the second input end of the second XOR gate 406 is an input signal of a low-order carry number, which is a low-level signal with a logic value of 0. Since the two input ends of the second XOR gate 406 receive the same signal, the output end of the second XOR gate 406 outputs a low-level signal with a logic value of 0. That is, the sum of the first operand, the second operand and the low-order carry number is 0. The first input end of the fourth AND gate 408 receives a low-level signal with a logic value of 0 outputted from the output end of the third AND gate 407, and the second input end of the fourth AND gate 408 receives an input signal of a low-order carry number. It is a low-level signal with a logic value of 0. At this time, the output end of the fourth AND gate 408 outputs a low-level signal with a logic value of 0. The first input end of the second OR gate 409 receives the low-level signal with a logic value of 0 output by the output end of the fourth AND gate 408. The second input end of the second OR gate 409 receives the low-level signal with a logic value of 0 output by the output end of the fourth NOT gate 412. The output end of the second OR gate 409 outputs a low-level signal with a logic value of 0, that is, the high-order carry number of the sum of the first operand, the second operand and the low-order carry number is 0.

[0161] Alternatively, when the first operand is 0, the second operand is 1, and the low-order carry number is 1, it can be seen from the above circuit that the first signal is a low-level signal with a logic value of 0, the second signal is a low-level signal with a logic value of 0, the input end of the second NOT gate 410 receives a low-level signal with a logic value of 0, the input end of the third NOT gate 411 receives a low-level signal with a logic value of 0, and the input end of the fourth NOT gate 412 receives a high-level signal with a logic value of 1 output from the output end of the second NOT gate 410. The first input end of the third AND gate 407 receives a high-level signal with a logic value of 1 output from the output end of the second NOT gate 410, the second input end of the third AND gate 407 receives a high-level signal with a logic value of 1 output from the output end of the third NOT gate, and the output end of the third AND gate 407 outputs a high-level signal with a logic value of 1. The input end of the fourth NOT gate 412 receives a high-level signal with a logic value of 1 output from the output end of the second NOT gate 410, and the output end of the fourth NOT gate 412 outputs a low-level signal with a logic value of 0. The first input terminal of the second XOR gate 406 receives a high-level signal with a logic value of 1 outputted from the output terminal of the third AND gate 407, and the signal received from the second input terminal of the second XOR gate 406 is an input signal of a low-order carry number, which is a high-level signal with a logic value of 1. Since the two input terminals of the second XOR gate 406 receive the same signal, the output terminal of the second XOR gate 406 outputs a low-level signal with a logic value of 0. That is, the sum of the first operand, the second operand and the low-order carry number is 0. The first input terminal of the fourth AND gate 408 receives a high-level signal with a logic value of 1 outputted from the output terminal of the third AND gate 407, and the second input terminal of the fourth AND gate 408 receives an input signal of a low-order carry number. It is a high-level signal with a logic value of 1. At this time, the output end of the fourth AND gate 408 outputs a high-level signal with a logic value of 1. The first input end of the second OR gate 409 receives the high-level signal with a logic value of 1 outputted from the output end of the fourth AND gate 408. The second input end of the second OR gate 409 receives the low-level signal with a logic value of 0 outputted from the output end of the fourth NOT gate 412. The output end of the second OR gate 409 outputs a high-level signal with a logic value of 1, that is, the high-order carry number of the sum of the first operand, the second operand and the low-order carry number is 1.

[0162] Alternatively, when the first operand is 1, the second operand is 1, and the low-order carry number is 1, it can be seen from the above circuit that the first signal is a high-level signal with a logic value of 1, the second signal is a low-level signal with a logic value of 0, the input end of the second NOT gate 410 receives a high-level signal with a logic value of 1, the input end of the third NOT gate 411 receives a low-level signal with a logic value of 0, and the input end of the fourth NOT gate 412 receives a low-level signal with a logic value of 0 output from the output end of the second NOT gate 410. The first input end of the third AND gate 407 receives a low-level signal with a logic value of 0 output from the output end of the second NOT gate 410, the second input end of the third AND gate 407 receives a high-level signal with a logic value of 1 output from the output end of the third NOT gate, and the output end of the third AND gate 407 outputs a low-level signal with a logic value of 0. The input end of the fourth NOT gate 412 receives a low-level signal with a logic value of 0 output from the output end of the second NOT gate 410, and the output end of the fourth NOT gate 412 outputs a high-level signal with a logic value of 1. The first input terminal of the second XOR gate 406 receives a low-level signal with a logic value of 0 outputted from the output terminal of the third AND gate 407, and the signal received from the second input terminal of the second XOR gate 406 is an input signal of a low-order carry number, which is a high-level signal with a logic value of 1. Since the two input terminals of the second XOR gate 406 receive different signals, the output terminal of the second XOR gate 406 outputs a high-level signal with a logic value of 1. That is, the sum of the first operand, the second operand and the low-order carry number is 1. The first input terminal of the fourth AND gate 408 receives a low-level signal with a logic value of 0 outputted from the output terminal of the third AND gate 407, and the second input terminal of the fourth AND gate 408 receives an input signal of a low-order carry number. It is a high-level signal with a logic value of 1. At this time, the output end of the fourth AND gate 408 outputs a low-level signal with a logic value of 0. The first input end of the second OR gate 409 receives the low-level signal with a logic value of 0 output by the output end of the fourth AND gate 408. The second input end of the second OR gate 409 receives the high-level signal with a logic value of 1 output by the output end of the fourth NOT gate 412. The output end of the second OR gate 409 outputs a high-level signal with a logic value of 1, that is, the high-order carry number of the sum of the first operand, the second operand and the low-order carry number is 1.

[0163] It should be noted that other situations of the first operand, the second operand and the low-order carry number can be the above examples, and this application will not go into details.

[0164] In some embodiments of the present application, Figure 7 As shown, the above-mentioned in-memory calculation circuit also includes: an SRAM selection unit 90 and a first pre-charge unit 100.

[0165] The input and output terminals of the SRAM storage unit 10 are connected to a first terminal of the SRAM selection unit 90 , and a second terminal of the SRAM selection unit 90 is connected to the first bit line 50 .

[0166] The SRAM selection unit 90 is used to select the SRAM storage unit 10 according to the first control signal received by the control end.

[0167] The first end of the first pre-charge unit 100 is connected to the power supply, and the second end of the first pre-charge unit 100 is connected to the first end of the SRAM selection unit 90, for charging the first end of the SRAM selection unit 90 according to the second control signal received by the control end.

[0168] In the embodiment of the present application, the SRAM selection unit 90 is arranged between the first bit line 50 and the input / output end of the SRAM storage unit 10, so that the SRAM selection unit 90 can be controlled to be turned on and off to control whether the path between the first bit line 50 and the input / output end of the SRAM storage unit 10 is turned on, thereby realizing the SRAM storage unit 10 of the selected in-memory computing circuit. When the SRAM storage unit 10 is selected, the SRAM selection unit 90 is controlled to be turned on, thereby turning on the path between the first bit line 50 and the input / output end of the SRAM storage unit 10. When the SRAM storage unit 10 is not selected, the SRAM selection unit 90 is controlled to be turned off, thereby disconnecting the path between the first bit line 50 and the input / output end of the SRAM storage unit 10.

[0169] The first pre-charge unit 100 is used to pre-charge the first bit line 50 .

[0170] Furthermore, if Figure 8 As shown, the SRAM selection unit includes a thirteenth transistor T13. The input and output ends of the SRAM storage unit 10 are connected to the first end of the SRAM selection unit 90, and the second end of the SRAM selection unit 90 is connected to the first bit line 50, including:

[0171] The source of the thirteenth transistor T13 is connected to the first bit line 50, and is used to receive the driving signal of the first bit line 50. The drain of the thirteenth transistor T13 is connected to the input and output terminals of the SRAM storage unit 10. The gate of the thirteenth transistor is used to receive the control signal.

[0172] The first pre-charge unit 100 includes a fourteenth transistor T14. The first end of the first pre-charge unit 100 is connected to the power supply, and the second end of the first pre-charge unit 100 is connected to the first end of the SRAM selection unit 90, including: the source of the fourteenth transistor T14 is connected to the power supply, and the drain of the fourteenth transistor T14 is connected to the drain of the thirteenth transistor.

[0173] In this way, the on-off of the fourteenth transistor T14 can be controlled by controlling the signal input to the gate of the fourteenth transistor T14, thereby controlling the pre-charging of the first bit line 50.

[0174] Further, the fourteenth transistor T14 is a p-channel transistor. When the gate of the fourteenth transistor T14 receives a low-level signal, the fourteenth transistor T14 is turned on, and the power supply connected to the source of the fourteenth transistor T14 pulls up the drain of the thirteenth transistor T13 to a high-level signal, so that the input and output ends of the SRAM storage unit 10 receive the high-level signal. When the gate of the fourteenth transistor T14 receives a high-level signal, the fourteenth transistor T14 is disconnected, and the drain of the thirteenth transistor T13 is in a passive high-level state, that is, the input and output ends of the SRAM storage unit 10 receive a passive high-level signal.

[0175] It should be noted that in the attached Figure 8 In the example, the drain of the first transistor T1 and the drain of the third transistor T3 are grounded. When the drain of the first transistor T1 and the drain of the third transistor T3 are connected to the power supply, the following description can be referred to. Figure 8 The connection structure of the thirteenth transistor T13 and the fourteenth transistor T14 will not be described in detail here.

[0176] In some embodiments of the present application, Fig. 9 As shown, the in-memory computing circuit further includes: a logic selection unit 110 and a second pre-charge unit 120 .

[0177] The first input terminal of the logic operation unit 40 is connected to the third bit line 70, including:

[0178] A first input terminal of the logic operation unit 40 is connected to a first terminal of the logic selection unit 110, and a second terminal of the logic selection unit 110 is connected to the third bit line 70;

[0179] The first end of the second pre-charging unit 120 is connected to the power supply, and the second end of the second pre-charging unit 120 is connected to the first end of the logic selection unit 110, and is used to charge the first end of the logic selection unit 110 according to the third control signal received by the control end;

[0180] The logic selection unit 110 is used to control the first signal received by the first input terminal of the logic operation unit 40 according to the fourth control signal received by the control terminal.

[0181] In the embodiment of the present application, the logic selection unit 110 is arranged between the logic operation unit 40 and the third bit line 70, so that the on-off of the logic selection unit 110 can be controlled to control whether the path between the third bit line 70 and the first input terminal of the logic operation unit 40 is turned on, thereby realizing the selected logic operation unit 40 of the in-memory computing circuit. When the logic operation unit 40 is selected, the logic selection unit 110 is controlled to be turned on, thereby turning on the path between the third bit line 70 and the first input terminal of the logic operation unit 40. When the logic operation unit 40 is not selected, the logic selection unit 110 is controlled to be turned off, thereby turning off the path between the third bit line 70 and the first input terminal of the logic operation unit 40.

[0182] The second pre-charge unit 120 is used to pre-charge the third bit line 70 .

[0183] Furthermore, if Fig.10 As shown, the logic selection unit 110 includes a fifth transistor T5, and the second pre-charge unit 120 includes a sixth transistor T6.

[0184] The first input terminal of the logic operation unit 40 is connected to the first terminal of the logic selection unit 110, and the second terminal of the logic selection unit 110 is connected to the third bit line 70, including: the gate of the fifth transistor T5 is used to receive the selection control signal, the source of the fifth transistor T5 is connected to the third bit line 70, and is used to receive the driving signal, and the drain of the fifth transistor T5 is connected to the first input terminal of the logic operation unit 40.

[0185] The first end of the second pre-charge unit 120 is connected to the power supply, and the second end of the second pre-charge unit 120 is connected to the first end of the logic selection unit 110, including: the gate of the sixth transistor T6 is used to receive the pre-charge control signal, the source of the sixth transistor T6 is connected to the power supply, and the drain of the sixth transistor T6 is connected to the source of the fifth transistor T5.

[0186] In this way, when the logic operation unit 40 controlled by the fifth transistor T5 is selected, a high-level selection control signal can be sent to the gate of the fifth transistor T5, the fifth transistor T5 is turned on, and the path between the third bit line 70 and the first input terminal of the logic operation unit 40 is turned on, so that the corresponding logic operation can be performed. When the logic operation unit 40 controlled by the fifth transistor T5 is not selected, a low-level selection control signal can be sent to the gate of the fifth transistor T5, the fifth transistor T5 is turned off, and the path between the third bit line 70 and the first input terminal of the logic operation unit 40 is disconnected, and the logic operation cannot be performed.

[0187] When precharging is required, the sixth transistor T6 is turned on, and the source of the fifth transistor T5 receives a high-level signal, which is transmitted to the first input terminal of the logic operation unit 40 .

[0188] Further, the sixth transistor T6 is a p-channel transistor. When the gate of the sixth transistor T6 receives a low-level signal, the sixth transistor T6 is turned on, and the power supply connected to the source of the sixth transistor T6 pulls up the drain of the fifth transistor T5 to a high-level signal, so that the first input terminal of the logic operation unit 40 receives a high-level signal. When the gate of the sixth transistor T6 receives a high-level signal, the sixth transistor T6 is disconnected, and the drain of the sixth transistor T6 is in a passive high-level state, that is, the first input terminal of the logic operation unit 40 receives a passive high-level signal.

[0189] It should be noted that in the attached Fig.10 In the example, the drain of the first transistor T1 and the drain of the third transistor T3 are grounded. When the drain of the first transistor T1 and the drain of the third transistor T3 are connected to the power supply, the following description can be referred to. Fig.10 The connection structure of the fifth transistor T5 and the sixth transistor T6 will not be described in detail here.

[0190] Through the SRAM-based in-memory computing circuit of the embodiment of the present application, single-bit multiplication and addition operations are realized by using only a single SRAM storage cell and bit line, without using multiple SRAM storage cells and word lines to realize multiplication operations, thereby reducing the complexity of implementation and the power consumption of the processor. In addition, the present application realizes multiplication logic operations based on single-bit storage cells, reduces the array area, reduces the overall area consumption and energy consumption of the in-memory circuit, and improves efficiency.

[0191] An embodiment of the present application also provides an in-memory device, comprising at least one SRAM-based in-memory computing circuit as described in the above embodiment.

[0192] Furthermore, when at least two SRAM-based in-memory calculation circuits are included, the output end of the high-order carry number of the adjacent low-order in-memory calculation circuit is connected to the input end of the low-order carry number of the adjacent high-order in-memory calculation circuit, and the product output end of the adjacent low-order in-memory calculation circuit is connected to the input end of the operand of the adjacent high-order in-memory calculation circuit, such as Fig.11 shown.

[0193] When the in-memory device includes at least two in-memory computing circuits based on SRAM, multi-bit multiplication and addition operations can be implemented. The following is an example of multiplication of two sets of data.

[0194] Exemplarily, the multiplication operation of the first group of data is calculated in the first in-memory calculation circuit, and the multiplication operation of the second group of data is calculated in the second in-memory calculation circuit. When performing the multiplication operation of the first group of data, the SRAM storage selection unit of the first in-memory calculation circuit is first controlled to be turned on, the path between the first bit line and the input and output ends of the SRAM storage unit is turned on, the first operand in the first group of data is stored in the SRAM storage unit, and the second operand is stored in the first bit line. By turning on the logic selection unit of the first in-memory calculation circuit, the path between the third bit line and the first input end of the logic operation unit is turned on, the first transmission unit obtains the first operation data and the second operand, the second transmission unit obtains the third operand and the fourth operand, the first transmission unit controls the first signal output by the third bit line according to the obtained first operand and the second operation data, the second transmission unit controls the second signal output by the fourth bit line according to the obtained third operand and the fourth operand, the logic operation unit obtains the first signal and the second signal, and performs a logic operation according to the obtained first signal and the second signal to obtain the product MOUT0 of the first group of data. Similarly, when performing the multiplication operation of the second set of data, the product MOUT1 of the second set of data can be obtained through the second in-memory calculation circuit. The product MOUT1 of the second set of data obtained through the second in-memory calculation circuit can be specifically obtained by parameterizing the product MOUT0 of the first set of data obtained through the first in-memory calculation circuit, which will not be repeated here.

[0195] The product MOUT0 of the first set of data and the product MOUT1 of the second set of data are transmitted to the third in-memory computing circuit as the first operand and the second operand of the third in-memory computing circuit respectively, and a full addition operation is performed through the logic operation unit of the third in-memory computing circuit to obtain the sum of the product MOUT0 of the first set of data and the product MOUT1 of the second set of data, thereby obtaining the product of the first set of data and the second set of data.

[0196] In the embodiment of the present application, when performing full addition operations on multiple groups of products, it is necessary to rewrite the partial sums of each two groups back to the in-memory computing circuit and perform the summing again until the final sum is obtained. For 2*N multiplication operations, it is necessary to rewrite back an integer number of times not less than log2 N to obtain the sum of multiple groups of products.

[0197] In the embodiment of the present application, multi-bit operations can be implemented by splitting the multi-bit input multiplication and addition operations into multiple single-bit input multiplication and addition operations.

[0198] Furthermore, an embodiment of the present application also provides an electronic device, comprising the internal storage device described in the above embodiment.

[0199] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention or some parts of the embodiments.

[0200] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the device embodiment and the terminal embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.

Claims

1. An in-memory computing circuit based on SRAM, characterized in that: include: An SRAM storage unit including a latch, a first transmission unit, a second transmission unit and a logic operation unit; The first control end of the first transmission unit is connected to the first output end of the latch in the SRAM storage unit, the second control end of the first transmission unit is connected to the first bit line, the first end of the first transmission unit is connected to the first input end of the logic operation unit and the third bit line; the second end of the first transmission unit is grounded or connected to a power supply; The first control end of the second transmission unit is connected to the second output end of the latch in the SRAM storage unit, the second control end of the second transmission unit is connected to the second bit line, the first end of the second transmission unit is connected to the second input end of the logic operation unit and the fourth bit line; the second end of the second transmission unit is grounded or connected to a power supply; The first transmission unit is used to obtain a first operand from a latch of the SRAM storage unit, obtain a second operand from the first bit line, and control a first signal received by a first input terminal of the logic operation unit according to the first operand and the second operand; The second transmission unit is used to obtain a third operand from the latch of the SRAM storage unit, obtain a fourth operand from the second bit line, and control a second signal received by the second input terminal of the logic operation unit according to the third operand and the fourth operand; The logic operation unit is used to perform a logic operation according to the first signal received by the first input terminal and the second signal received by the second input terminal to obtain the product of the first operand and the second operand, and / or the sum of the first operand and the second operand.

2. The circuit according to claim 1, characterized in that Also includes: SRAM selection unit and first pre-charge unit; The input and output terminals of the SRAM storage unit are connected to the first terminal of the SRAM selection unit, and the second terminal of the SRAM selection unit is connected to the first bit line; The SRAM selection unit is used to select the SRAM storage unit according to the first control signal received by the control end; The first end of the first pre-charge unit is connected to a power source, and the second end of the first pre-charge unit is connected to the first end of the SRAM selection unit, and is used to charge the first end of the SRAM selection unit according to a second control signal received by the control end.

3. The circuit according to claim 2, characterized in that Also includes: A logic selection unit and a second pre-charge unit; The first input terminal of the logic operation unit is connected with the third bit line, comprising: The first input terminal of the logic operation unit is connected to the first terminal of the logic selection unit, and the second terminal of the logic selection unit is connected to the third bit line; The first end of the second pre-charging unit is connected to a power source, and the second end of the second pre-charging unit is connected to the first end of the logic selection unit, and is used to charge the first end of the logic selection unit according to a third control signal received by the control end; The logic selection unit is used to control the first signal received by the first input terminal of the logic operation unit according to the fourth control signal received by the control terminal.

4. The circuit according to claim 1, characterized in that The first transmission unit includes: a first transistor and a second transistor; The first control end of the first transmission unit is connected to the first output end of the latch in the SRAM storage unit, the second control end of the first transmission unit is connected to the first bit line, the first end of the first transmission unit is connected to the first input end and the third bit line of the logic operation unit; the second end of the first transmission unit is grounded or connected to the power supply, including: The gate of the first transistor is connected to the first output terminal of the latch in the SRAM storage unit, the gate of the second transistor is connected to the first bit line, the source of the first transistor is connected to the drain of the second transistor, the drain of the first transistor is grounded or connected to a power supply, and the source of the second transistor is connected to the first input terminal of the logic operation unit and the third bit line.

5. The circuit according to claim 1, characterized in that The second transmission unit includes: a third transistor and a fourth transistor; The first control end of the second transmission unit is connected to the second output end of the latch in the SRAM storage unit, the second control end of the second transmission unit is connected to the second bit line, the first end of the second transmission unit is connected to the second input end of the logic operation unit and the fourth bit line; the second end of the second transmission unit is grounded or connected to the power supply, including: The gate of the third transistor is connected to the second output terminal of the latch in the SRAM storage unit, the gate of the fourth transistor is connected to the second bit line, the source of the third transistor is connected to the drain of the fourth transistor, the drain of the third transistor is grounded or connected to a power supply, and the source of the fourth transistor is connected to the second input terminal of the logic operation unit and the fourth bit line.

6. The circuit according to claim 1, characterized in that When the second end of the first transmission unit is grounded and the second end of the second transmission unit is grounded, the logic operation unit includes: a first XOR gate, a first AND gate, a second AND gate, a first OR gate and a first NOT gate; The first end of the first transmission unit is connected with the first input end of the logic operation unit and the third bit line, including: The first input end of the first AND gate is connected to the first end of the first transmission unit and the third bit line; the input end of the first NOT gate is connected to the first end of the first transmission unit and the third bit line; The first end of the second transmission unit is connected with the second input end of the logic operation unit and the fourth bit line, including: The second input terminal of the first AND gate is connected to the first terminal of the second transmission unit and the fourth bit line; The output end of the first AND gate is connected to the first input end of the first XOR gate and the first input end of the second AND gate, the output end of the second AND gate is connected to the first input end of the first OR gate, the input end of the first NOT gate is connected to the third bit line, and the output end of the first NOT gate is connected to the second input end of the first OR gate; The second input terminal of the second AND gate and the second input terminal of the first XOR gate are used to receive a low-order carry number; The output terminal of the first XOR gate is used to output the sum of the first operand and the second operand; The output terminal of the first OR gate is used to output a high-order carry number of the sum of the first operand and the second operand; The output terminal of the first NOT gate is used to output the product of the first operation and the second operation.

7. The circuit according to claim 6, characterized in that When the second end of the first transmission unit is connected to a power supply and the second end of the second transmission unit is connected to a power supply, the logic unit includes: a second XOR gate, a third AND gate, a fourth AND gate, a second OR gate, a second NOT gate, a third NOT gate and a fourth NOT gate; The first end of the first transmission unit is connected with the first input end of the logic operation unit and the third bit line, including: An input end of the second NOT gate is connected to the first end of the first transmission unit and the third bit line; The first end of the second transmission unit is connected with the second input end of the logic operation unit and the fourth bit line, including: An input end of the third NOT gate is connected to the first end of the second transmission unit and the fourth bit line; The output end of the second NOT gate is connected to the first input end of the third AND gate, the second input end of the first AND gate is connected to the output end of the third NOT gate, the output end of the third AND gate is connected to the first input end of the second XOR gate and the first input end of the fourth AND gate, the output end of the fourth AND gate is connected to the first input end of the second OR gate, the input end of the fourth NOT gate is connected to the output end of the second NOT gate, and the output end of the fourth NOT gate is connected to the second input end of the second OR gate; The second input end of the fourth AND gate and the second input end of the second XOR gate are used to receive a low-order carry number; The output terminal of the second XOR gate is used to output the sum of the first operand and the second operand; The output terminal of the second OR gate is used to output a high-order carry number of the sum of the first operand and the second operand; The output terminal of the fourth NOT gate is used to output the product of the first operation and the second operation.

8. The circuit according to claim 1, characterized in that The first bit line and the second bit line are also used for reading and writing data of the SRAM storage unit.

9. The circuit according to claim 3, characterized in that The logic selection unit includes: a fifth transistor, and the second pre-charge unit includes a sixth transistor; The first input terminal of the logic operation unit is connected to the first terminal of the logic selection unit, and the second terminal of the logic selection unit is connected to the third bit line, including: The gate of the fifth transistor is used to receive a selection control signal, the source of the fifth transistor is connected to the third bit line and is used to receive a drive signal, and the drain of the fifth transistor is connected to the first input terminal of the logic operation unit; The first end of the second pre-charging unit is connected to a power source, and the second end of the second pre-charging unit is connected to the first end of the logic selection unit, including: The gate of the sixth transistor is used to receive a pre-charge control signal, the source of the sixth transistor is connected to a power supply, and the drain of the sixth transistor is connected to the source of the fifth transistor.

10. The circuit according to any one of claims 1 to 9, characterized in that: The signal in the first bit line is a high level signal, and the signal in the second bit line is a low level signal, or the signal in the first bit line is a low level signal, and the signal in the second bit line is a high level signal.

11. A storage device, characterized in that: The invention comprises an in-memory computing circuit based on SRAM as described in any one of claims 1 to 10.

12. The storage device according to claim 11, characterized in that: When at least two of the SRAM-based in-memory computing circuits are included, the output end of the high-order carry number of the adjacent low-order in-memory computing circuit is connected to the input end of the low-order carry number of the adjacent high-order in-memory computing circuit, and the product output end of the adjacent low-order in-memory computing circuit is connected to the input end of the operand of the adjacent high-order in-memory computing circuit.

13. An electronic device, characterized in that: Comprising the storage device as claimed in claim 11 or 12.

Citation Information

Patent Citations

  • Ferroelectric transistor-based in-memory bitwise logic calculation circuit structure

    CN112133339A

  • Memory operation circuit and chip structure

    CN112259137A