Binary weight network in-memory computing circuit and module based on 6T-SRAM

By using 6T-SRAM and redesigned functional parts in the in-memory computing circuit, the problem of the large area occupied by the existing 8T-SRAM circuit is solved, and more efficient 5-bit signed numbers and 1-bit weight calculations are realized, which is suitable for edge devices Lightweight neural network deployment.

CN118446268BActive Publication Date: 2024-09-24ANHUI UNIV
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410904475.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2024-09-24
Estimated Expiration
2044-07-08

AI Technical Summary

Technical Problem

Existing in-memory computing circuits based on 8T-SRAM occupy a large area, making it difficult to deploy lightweight neural networks in edge devices.

Method used

A binary weight network in-memory calculation circuit based on 6T-SRAM is used to realize the multiplication and accumulation calculation of 5-bit signed numbers and 1-bit weight through the storage part, shutdown control part and in-memory calculation part, reducing the number of MOS tubes and redesigning the supporting equipment Functional part, provides two discharge paths to improve parallelism.

Benefits of technology

While maintaining the same function, the circuit occupancy area is reduced, parallelism and calculation accuracy are improved, and the unit area is avoided from becoming larger, making it suitable for lightweight neural network deployment on edge devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118446268B
    Figure CN118446268B
Patent Text Reader

Abstract

The present invention relates to the field of integrated circuit technology, and specifically to an in-memory computing circuit and module for a binary weighted network based on 6T-SRAM. The present invention provides an in-memory computing circuit for a binary weighted network based on 6T-SRAM, comprising: a storage unit, a shutdown control unit, an in-memory computing unit, and a global bit line unit. Compared with existing patents, the in-memory computing circuit of the present invention adopts a different structural design. On the one hand, it adopts a 6T-SRAM with a smaller number of MOS tubes, and on the other hand, the structure of the supporting functional unit is redesigned, so that the in-memory computing circuit of the present invention reduces the number of devices while the overall function remains unchanged, thereby reducing the circuit occupation area. The present invention solves the problem that the in-memory computing circuit based on 8T-SRAM and current mirror provided by the existing patents occupies a large area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of integrated circuit technology, and more specifically, to a binary weight network in-memory computing circuit and module based on 6T-SRAM. Background Art

[0002] The current popular large neural networks are difficult to deploy on edge devices, so lightweight networks have emerged. Lightweight networks can be implemented through in-memory computing circuits.

[0003] The existing Chinese invention patent with patent number 2023114519342 discloses an in-memory calculation circuit based on 8T-SRAM and current mirror, which includes a storage unit, an in-memory calculation unit, a transmission control unit, a current mirror unit, an inverter unit, and a shutdown control unit. On the one hand, the patent stores 1-bit weight in the 8T-SRAM unit, and on the other hand, divides the 5-bit signed number into two parts, 1-bit sign bit and 4-bit unsigned number, and inputs them into the 8T-SRAM unit and the transmission control unit respectively, thereby realizing the multiplication and XOR accumulation of the 5-bit signed number and the 1-bit weight in the near-memory calculation mode.

[0004] However, since the patent uses 8T-SRAM to store 1-bit weight and sets up corresponding functional parts around the storage part, the area of ​​the overall circuit is relatively large and there is still room for improvement. Summary of the invention

[0005] Based on this, it is necessary to provide a binary weight network in-memory computing circuit and module based on 6T-SRAM to address the problem that the in-memory computing circuit based on 8T-SRAM and current mirror provided by the existing patent occupies a large area.

[0006] The present invention is implemented by the following technical solutions:

[0007] In a first aspect, the present invention provides a binary weight network in-memory computing circuit based on 6T-SRAM, which is used to implement the multiplication and accumulation calculation of a 5-bit signed number multiplied by a 1-bit weight.

[0008] The binary weight network in-memory computing circuit based on 6T-SRAM includes: a storage unit, a shutdown control unit, an in-memory computing unit, and a global bit line unit.

[0009] The storage unit includes a column of N 6T-SRAM cells, where N≥1. Each 6T-SRAM cell is used to store a 1-bit weight; and the N 6T-SRAM cells in a column share the same bit line BL and the same bit line BLB.

[0010] The shutdown control unit is used to control BL and BLB to be disconnected or connected so as to switch the entire circuit between the read-write mode and the calculation mode.

[0011] When the shutdown control unit controls BL and BLB to be disconnected, the entire circuit enters a read-write mode; when the shutdown control unit controls BL and BLB to be connected, the entire circuit enters a calculation mode.

[0012] The in-memory computing unit is used to discharge the computing bit lines PBL and NBL in the computing mode.

[0013] The global bit line unit is used to precharge BL through the global bit line GBL and to precharge BLB through the global bit line GBLB in the read / write mode.

[0014] Among them, when performing multiplication and accumulation calculations in the calculation mode, the 5-bit signed number is divided into a 1-bit sign bit and a 4-bit unsigned number.

[0015] Each time a 6T-SRAM unit is turned on, a 1-bit sign bit is input to the 6T-SRAM unit, and a 4-bit unsigned number is input to the in-memory calculation unit; the in-memory calculation unit calculates the 5-bit signed number multiplied by the 1-bit weight based on the 1-bit weight stored in the 6T-SRAM unit, the 1-bit sign bit input, and the 4-bit unsigned number input by the in-memory calculation unit, and discharges the PBL and NBL for a corresponding length of time to accumulate the calculation results to the PBL and NBL.

[0016] The implementation of the 6T-SRAM-based binary weight network in-memory computing circuit is based on the method or process of an embodiment of the present disclosure.

[0017] In a second aspect, the present invention provides a binary weight network in-memory computing module based on 6T-SRAM, which adopts the layout of the binary weight network in-memory computing circuit based on 6T-SRAM as disclosed in the first aspect.

[0018] The implementation of the 6T-SRAM-based binary weight network in-memory computing module is a method or process according to an embodiment of the present disclosure.

[0019] Compared with the prior art, the present invention has the following beneficial effects:

[0020] 1. The present invention provides a binary weight network in-memory calculation circuit based on 6T-SRAM. On the one hand, 1-bit weight is stored in the 6T-SRAM unit, and on the other hand, a 5-bit signed number is divided into two parts, a 1-bit sign bit and a 4-bit unsigned number, and the two parts are input into the 6T-SRAM unit and the in-memory calculation unit respectively, so as to realize the multiplication of the 5-bit signed number and the 1-bit weight in a near-in-memory calculation mode, and then realize the accumulation on the calculation bit lines PBL and NBL.

[0021] 2. Compared with the existing patents, the in-memory computing circuit of the present invention adopts a different structural design. On the one hand, it adopts 6T-SRAM with fewer MOS tubes, and on the other hand, the structure of the supporting functional parts is redesigned, so that the in-memory computing circuit of the present invention reduces the number of devices while maintaining the same function, thereby reducing the circuit occupation area.

[0022] 3. The in-memory calculation circuit of the present invention is designed based on 6T-SRAM, and there is no need to modify the 6T-SRAM structure, and no nonlinear devices such as capacitors are introduced, which can ensure the accuracy of the calculation results and avoid the increase of the unit area.

[0023] 4. Compared with the existing patents, the circuit of the present invention provides two discharge paths, which increases the signal margin of each line by two times, so that the storage unit can open more rows at the same time and improve the parallelism. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0025] Figure 1 A circuit structure diagram of a binary weight network in-memory computing circuit based on 6T-SRAM provided in Example 1 of the present invention;

[0026] Figure 2 A pin distribution diagram of a binary weight network in-memory computing module based on 6T-SRAM provided in Example 2 of the present invention;

[0027] Figure 3 This is a diagram showing the simulation results of the discharge of the PBL provided in Example 3 of the present invention;

[0028] Figure 4 This is a diagram showing the simulation results of the discharge of the NBL provided in Example 3 of the present invention;

[0029] Figure 5 This is a discharge linearity result diagram of the PBL provided in Example 3 of the present invention;

[0030] Figure 6 This is a graph showing the discharge linearity results of the NBL provided in Example 3 of the present invention. DETAILED DESCRIPTION

[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0032] It should be noted that when a component is referred to as being "mounted on" another component, it may be directly on the other component or there may be a central component. When a component is considered to be "set on" another component, it may be directly set on the other component or there may be a central component at the same time. When a component is considered to be "fixed to" another component, it may be directly fixed on the other component or there may be a central component at the same time.

[0033] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "or / and" used herein includes any and all combinations of one or more of the related listed items.

[0034] Example 1

[0035] See also Figure 1 , is a circuit structure diagram of a binary weight network in-memory computing circuit based on 6T-SRAM provided in this embodiment 1. It should be noted that this storage computing circuit is intended to implement a multiplication and accumulation calculation of a 5-bit signed number multiplied by a 1-bit weight.

[0036] Functionally, the in-memory computing circuit includes: a storage unit, a shutdown control unit, an in-memory computing unit, and a global bit line unit.

[0037] When performing multiplication and accumulation calculations, the 5-bit signed number is divided into two parts: a 1-bit sign bit and a 4-bit unsigned number. Among them, the 1-bit weight is pre-stored in the storage unit, the 1-bit sign bit is input into the storage unit, and the 4-bit unsigned number is input into the in-memory calculation unit.

[0038] See also Figure 1 , specifically explain the composition of each functional unit:

[0039] 1. For the storage part, it includes 1 column of N 6T-SRAM cells, N≥1. Each 6T-SRAM cell is used to store a 1-bit weight. 1 column of N 6T-SRAM cells share the same bit line BL and the same bit line BLB.

[0040] Since the structures of N 6T-SRAM cells in a column are the same, the nth (n∈[1,N]) 6T-SRAM cell is introduced as follows:

[0041] The nth 6T-SRAM cell includes: 2 NMOS tubes N1[n]~N2[n], 2 inverters I0[n]~I1[n]. The gate of N1[n] is connected to the word line WLL[n], and the drain is connected to BL. The gate of N2[n] is connected to the word line WLR[n], and the drain is connected to BLB. The input end of I0[n] is connected to the source of N1[n] and is provided with a storage node Q[n]. The output end is connected to the source of N2[n] and is provided with a storage node QB[n]. The input end of I1[n] is connected to the source of N2[n], and the output end is connected to the source of N1[n].

[0042] It should be noted that if only the multiplication and accumulation calculation of a 5-bit signed number multiplied by a 1-bit weight is needed, N=1. However, since a macro unit needs to be constructed when the in-memory calculation circuit is applied to a binary neural network, N is generally set to 8.

[0043] 2. The shutdown control unit is used to control BL and BLB to be disconnected or connected so as to switch the entire circuit between the read-write mode and the calculation mode.

[0044] When the shutdown control unit controls BL and BLB to be disconnected, the entire circuit enters a read-write mode; when the shutdown control unit controls BL and BLB to be connected, the entire circuit enters a calculation mode.

[0045] Specifically, the shutdown control unit includes: a transmission gate TG, wherein the input end of the TG is connected to the BL, the output end is connected to the BLB, the control end 1 is connected to the input signal EN, and the control end 2 is connected to the input signal ENB.

[0046] Among them, EN and ENB are opposite signals.

[0047] 3. For the in-memory computing unit, it is used to discharge the computing bit lines PBL and NBL in the computing mode.

[0048] Specifically, the in-memory computing unit includes: 2 inverters H1~H2, 3 NMOS tubes N3~N5. The input end of H1 is connected to BLB. The input end of H2 is connected to the output end of H1. The gate of N3 is connected to the output end of H2, and the drain is connected to PBL. The gate of N4 is connected to the output end of H1, and the drain is connected to NBL. The gate of N5 is connected to the input signal IN, the source is connected to VSS, and the drain is connected to the sources of N3 and N4.

[0049] Among them, IN is used to input a 4-bit unsigned number.

[0050] In addition, PBL and NBL are also externally connected to analog-to-digital converters for reading voltage.

[0051] 4. For the global bit line part, it is used to precharge BL through the global bit line GBL and precharge BLB through the global bit line GBLB in the read / write mode.

[0052] Specifically, the global bit line unit includes: 2 NMOS transistors N6 and N7. The gate of N6 is connected to the horizontal word line HWL, the drain is connected to GBL, and the source is connected to BL. The gate of N7 is connected to HWL, the drain is connected to GBLB, and the source is connected to BLB.

[0053] In addition, GBL and GBLB are also externally connected to functional circuits, such as a sensitive amplifier SA, a pre-charge circuit, etc.

[0054] Based on the above circuit structure, it has two modes:

[0055] ① Read and write mode: 1-bit weight reading and writing can be performed.

[0056] In read / write mode, EN is set to low level, ENB is set to high level, TG is turned off, and BL and BLB are disconnected.

[0057] If the nth 6T-SRAM cell is read or written with 1-bit weight, WLL[n] and WLR[n] are set to high level, HWL is set to high level, N6 and N7 are turned on, Q[n] completes data writing or reading through N1[n], BL, N6, and GBL, and QB[n] completes data writing or reading through N2[n], BLB, N7, and GBLB.

[0058] ② Calculation mode: It can perform multiplication and accumulation calculation of 5-bit signed number multiplied by 1-bit weight.

[0059] In general, when performing multiplication and accumulation calculations in the calculation mode, a 5-bit signed number is divided into a 1-bit sign bit and a 4-bit unsigned number; each time a 6T-SRAM unit is turned on, and a 1-bit sign bit is input to the 6T-SRAM unit, and a 4-bit unsigned number is input to the in-memory calculation unit; the in-memory calculation unit calculates the 5-bit signed number multiplied by the 1-bit weight based on the 1-bit weight stored in the 6T-SRAM unit and the input 1-bit sign bit, and the 4-bit unsigned number input by the in-memory calculation unit, and discharges the PBL and NBL for a corresponding length of time to achieve the accumulation of the calculation results on the PBL and NBL.

[0060] Specifically, for the process of multiplying a 5-bit signed number by a 1-bit weight:

[0061] EN is set to high level, ENB is set to low level, TG is turned on, BL and BLB are connected; HWL is set to low level, PBL and NBL are precharged to high potential.

[0062] 1. 1-bit weight is stored in the nth 6T-SRAM cell;

[0063] 2. When the 5-bit signed number is "0abcd" (a=0 or 1, b=0 or 1, c=0 or 1, d=0 or 1), the corresponding 4-bit unsigned number is "abcd" and the 1-bit sign bit is "-1".

[0064] When the 5-bit signed number is "1abcd", the corresponding 4-bit unsigned number is "abcd", and the 1-bit sign bit is "1".

[0065] Among them, the 4-bit unsigned number is converted into the corresponding pulse width signal and input into the internal calculation part as IN.

[0066] IN is a pulse width of M A high-level signal of Δt; M = 8a + 4b + 2c + d; Δt is the pulse width of IN corresponding to the 4-bit unsigned number "0001".

[0067] Among them, the 1-bit sign bit is input to WLL[n] and WLR[n].

[0068] If the 1-bit sign bit is "+1", WLL[n]=1, WLR[n]=0, N1[n] is turned on;

[0069] If the 1-bit sign bit is "-1", WLL[n]=0, WLR[n]=1, and N2[n] is turned on.

[0070] Then, a 5-bit signed number multiplied by a 1-bit weight can be divided into the following four cases:

[0071] ① If the 1-bit weight stored in the nth 6T-SRAM cell is "+1" and the 5-bit signed number is "0abcd", N1[n] is turned on, Q[n] is connected to BL and BLB; BL and BLB are charged to a high level by Q[n], H1 outputs a low level, N4 is disconnected, H2 outputs a high level, and N3 is turned on; N3 and N5 form a positive discharge path; PBL discharges to VSS through N3 and N5, and the amount of discharged charge is M Δt Δv.

[0072] ② If the 1-bit weight stored in the nth 6T-SRAM cell is "+1" and the 5-bit signed number is "1abcd", N2[n] is turned on, QB[n] is connected to BL and BLB; BL and BLB discharge to QB[n] to a low level, H1 outputs a high level, N4 is turned on, H2 outputs a low level, and N3 is disconnected; N4 and N5 form a negative discharge path; NBL discharges to VSS through N4 and N5, and the amount of discharged charge is M Δt Δv.

[0073] ③ If the 1-bit weight stored in the nth 6T-SRAM cell is "-1" and the 5-bit signed number is "0abcd", N1[n] is turned on, Q[n] is connected to BL and BLB; BL and BLB discharge to Q[n] to a low level, H1 outputs a high level, N4 is turned on, H2 outputs a low level, and N3 is disconnected; N4 and N5 form a negative discharge path; NBL discharges to VSS through N4 and N5, and the amount of discharged charge is M Δt Δv.

[0074] ④ If the 1-bit weight stored in the nth 6T-SRAM cell is "-1" and the 5-bit signed number is "1abcd", N2[n] is turned on, QB[n] is connected to BL and BLB; BL and BLB are charged to a high level by Q[n], H1 outputs a low level, N4 is disconnected, H2 outputs a high level, and N3 is turned on; N3 and N5 form a positive discharge path; PBL discharges to VSS through N3 and N5, and the amount of discharged charge is M Δt Δv.

[0075] For the above four cases, Δv is the total amount of charge discharged by PBL and NBL when the 4-bit unsigned number is "0001".

[0076] That is to say, unlike the design of only one discharge path in the existing patent, the in-memory computing circuit provides two discharge paths, which increases the signal margin of each line by two times, so that the storage unit can open more rows at the same time and improve parallelism.

[0077] In the above four cases, the calculation process is completed after the PBL and NBL are discharged. If the calculation result needs to be quantified, it is necessary to read the voltage of PBL and NBL through the analog-to-digital converter to obtain the calculation result on PBL and the calculation result on NBL; then add them through the adder to obtain the final calculation result.

[0078] Example 2

[0079] This embodiment 2 discloses a binary weight network in-memory computing module based on 6T-SRAM, which adopts the circuit layout of the binary weight network in-memory computing circuit based on 6T-SRAM disclosed in embodiment 1. The mode of packaging into a module makes it easier to promote and apply the above-mentioned in-memory computing circuit.

[0080] See also Figure 2 The pins of this in-memory computing module include the following 12 types of pins:

[0081] The first type of pins are VDD pins, which are used to connect VDD.

[0082] The second type of pin is the VSS pin, which is used to connect to VSS.

[0083] The third type of pins are HWL pins, which are used to connect to horizontal word lines HWL.

[0084] The fourth type of pins are IN pins, which are used to connect input signals IN.

[0085] The fifth type of pins are PBL pins, which are used to connect to the computing bit line PBL.

[0086] The sixth type of pins are NBL pins, which are used to connect to the computing bit line NBL.

[0087] The seventh type of pins are GBL pins, which are used to connect to the global bit line GBL.

[0088] The eighth type of pins are GBLB pins, which are used to connect to the global bit line GBLB.

[0089] The ninth type of pins are WLL pins, and N WLL pins are provided; among them, the nth WLL pin is used to connect WLL[n].

[0090] The tenth type of pins are WLR pins, and N WLR pins are provided; among them, the nth WLR pin is used to connect WLR[n].

[0091] The eleventh pin is the EN pin, which is used to connect the input signal EN.

[0092] The twelfth pin is an ENB pin, which is used to connect an input signal ENB.

[0093] Example 3

[0094] In order to more clearly demonstrate the technical solution and the technical effect provided by Example 1, this Example 3 simulates and verifies the in-memory computing circuit of Example 1:

[0095] See also Figure 3 , Figure 4, shows the simulation diagram of PBL and NBL discharge when a 6T-SRAM cell is turned on and a 5-bit signed number is multiplied by a 1-bit weight calculation. Among them, 900mV is the set voltage that the PBL and NBL pre-charge reaches before the calculation (2ns ago).

[0096] At 2ns, the 5-bit signed number is multiplied by the 1-bit weight calculation:

[0097] When the 5-bit signed number is "00001" and the 1-bit weight is "+1", the PBL discharges and the voltage drops to 889.1mV, with a difference of 10.9mV.

[0098] When the 5-bit signed number is "10001" and the 1-bit weight is "+1", the NBL discharges and the voltage drops to 888.4mV, with a difference of 11.6mV.

[0099] It can be seen that the two differences 10.9mV and 11.6mV can be considered equal within the allowable error range, indicating that the calculation circuit in this memory can achieve equal discharge speed.

[0100] See also Figure 5 , Figure 6 , shows the linearity result of turning on a 6T-SRAM cell to perform a 5-bit signed number multiplied by a 1-bit weight calculation. Among them, 900mV is the set voltage reached by the PBL and NBL precharge before the calculation (2ns ago).

[0101] At 2ns, the 5-bit signed number is multiplied by the 1-bit weight calculation:

[0102] When the 5-bit signed number is "00001" and the 1-bit weight is "+1", the PBL discharges and the voltage drops to 889.1mV;

[0103] When the 5-bit signed number is "00010" and the 1-bit weight is "+1", the PBL discharges and the voltage drops to 877.7mV;

[0104] When the 5-bit signed number is “00011” and the 1-bit weight is “+1”, the PBL discharges and the voltage drops to 866.2mV.

[0105] 900mV, 889.1mV, 877.7mV, and 866.2mV constitute three differences respectively: 10.9mV, 11.4mV, and 11.5mV.

[0106] It can be seen that the fluctuations of these three differences are within the allowable error range, indicating that the in-memory calculation circuit has good linearity when discharging on the PBL.

[0107] When the 5-bit signed number is "10001" and the 1-bit weight is "+1", the NBL discharges and the voltage drops to 888.4mV;

[0108] When the 5-bit signed number is "10010" and the 1-bit weight is "+1", the NBL discharges and the voltage drops to 876.9mV;

[0109] When the 5-bit signed number is "10011" and the 1-bit weight is "+1", the NBL discharges and the voltage drops to 865.4mV.

[0110] 900mV, 888.4mV, 876.9mV, and 865.4mV constitute three differences respectively: 11.6mV, 11.5mV, and 11.5mV.

[0111] It can be seen that the fluctuations of these three differences are also within the allowable error range, indicating that the in-memory calculation circuit also has good linearity when discharging on the NBL.

[0112] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0113] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A binary weight network in-memory computing circuit based on 6T-SRAM, characterized in that: It is used to implement the multiplication and accumulation calculation of a 5-bit signed number multiplied by a 1-bit weight; The binary weight network in-memory computing circuit based on 6T-SRAM includes: A storage unit, comprising a column of N 6T-SRAM cells, N≥1; each 6T-SRAM cell is used to store a 1-bit weight; the N 6T-SRAM cells in a column share the same bit line BL and the same bit line BLB; A shutdown control unit, which is used to control BL and BLB to be disconnected or connected, so as to switch the entire circuit between a read-write mode and a calculation mode; An in-memory computing unit, which is used to discharge the computing bit lines PBL and NBL in a computing mode; as well as A global bit line unit, which is used to precharge BL through the global bit line GBL and precharge BLB through the global bit line GBLB in the read / write mode; When the shutdown control unit controls BL and BLB to be disconnected, the entire circuit enters a read-write mode; when the shutdown control unit controls BL and BLB to be connected, the entire circuit enters a calculation mode; When performing multiplication and accumulation calculations in the calculation mode, a 5-bit signed number is divided into a 1-bit sign bit and a 4-bit unsigned number; each time a 6T-SRAM unit is turned on, and a 1-bit sign bit is input to the 6T-SRAM unit, and a 4-bit unsigned number is input to the in-memory calculation unit; the in-memory calculation unit calculates the 5-bit signed number multiplied by the 1-bit weight based on the 1-bit weight stored in the 6T-SRAM unit and the input 1-bit sign bit, and the 4-bit unsigned number input by the in-memory calculation unit, and discharges the PBL and NBL for a corresponding length of time to accumulate the calculation results to the PBL and NBL.

2. The binary weight network in-memory computing circuit based on 6T-SRAM according to claim 1, characterized in that: n∈[1,N], the nth 6T-SRAM cell includes: NMOS transistor N1[n], whose gate is connected to word line WLL[n] and whose drain is connected to BL; NMOS transistor N2[n], whose gate is connected to word line WLR[n] and whose drain is connected to BLB; An inverter I0[n], whose input terminal is connected to the source of N1[n] and is provided with a storage node Q[n], and whose output terminal is connected to the source of N2[n] and is provided with a storage node QB[n]; as well as An inverter I1[n], having an input connected to the source of N2[n] and an output connected to the source of N1[n]; Among them, the 1-bit sign bit is input to WLL[n] and WLR[n]; If the 1-bit sign bit is "+1", WLL[n]=1, WLR[n]=0, N1[n] is turned on; If the 1-bit sign bit is "-1", WLL[n]=0, WLR[n]=1, and N2[n] is turned on.

3. The binary weight network in-memory computing circuit based on 6T-SRAM according to claim 2, characterized in that: N=8。 4. The binary weight network in-memory computing circuit based on 6T-SRAM according to claim 2 or 3, characterized in that: The in-memory computing unit comprises: Inverter H1, whose input terminal is connected to BLB; Inverter H2, whose input terminal is connected to the output terminal of H1; NMOS tube N3, whose gate is connected to the output end of H2 and whose drain is connected to PBL; NMOS tube N4, whose gate is connected to the output end of H1 and whose drain is connected to NBL; NMOS tube N5, whose gate is connected to the input signal IN, source is connected to VSS, and drain is connected to the sources of N3 and N4; Among them, IN is used to input a 4-bit unsigned number.

5. The binary weight network in-memory computing circuit based on 6T-SRAM according to claim 4, characterized in that: The shutdown control unit includes: A transmission gate TG, whose input terminal is connected to BL, whose output terminal is connected to BLB, whose control terminal 1 is connected to an input signal EN, and whose control terminal 2 is connected to an input signal ENB; Among them, EN and ENB are opposite signals.

6. The binary weight network in-memory computing circuit based on 6T-SRAM according to claim 5, characterized in that: The global bit line section comprises: NMOS transistor N6, whose gate is connected to the horizontal word line HWL, whose drain is connected to GBL, and whose source is connected to BL; as well as The NMOS tube N7 has a gate connected to HWL, a drain connected to GBLB, and a source connected to BLB.

7. The binary weight network in-memory computing circuit based on 6T-SRAM according to claim 6, characterized in that: In read / write mode, EN is set to low level, ENB is set to high level, TG is turned off, and BL and BLB are disconnected; For the nth 6T-SRAM cell, WLL[n] and WLR[n] are set to high level, HWL is set to high level, N6 and N7 are turned on, Q[n] completes data writing or reading through N1[n], BL, N6, and GBL, and QB[n] completes data writing or reading through N2[n], BLB, N7, and GBLB.

8. The binary weight network in-memory computing circuit based on 6T-SRAM according to claim 6, characterized in that: When a 5-bit signed number is multiplied by a 1-bit weight in calculation mode, EN is set to high level, ENB is set to low level, TG is turned on, BL and BLB are connected; HWL is set to low level, PBL and NBL are precharged to high potential; The 1-bit weight is stored in the nth 6T-SRAM cell; When the 5-bit signed number is "0abcd", the corresponding 4-bit unsigned number is "abcd", and the 1-bit sign bit is "-1"; a=0 or 1, b=0 or 1, c=0 or 1, d=0 or 1; When the 5-bit signed number is "1abcd", the corresponding 4-bit unsigned number is "abcd", and the 1-bit sign bit is "1"; Among them, the 4-bit unsigned number is converted into the corresponding pulse width signal and input into the internal calculation part as IN; IN is a high-level signal with a pulse width of M*Δt; M=8a+4b+2c+d; Δt is the pulse width of IN corresponding to the 4-bit unsigned number "0001".

9. The binary weight network in-memory computing circuit based on 6T-SRAM according to claim 8, characterized in that: If the 1-bit weight stored in the nth 6T-SRAM cell is "+1" and the 5-bit signed number is "0abcd", N1[n] is turned on, Q[n] is connected to BL and BLB; BL and BLB are charged to a high level by Q[n], H1 outputs a low level, N4 is disconnected, H2 outputs a high level, and N3 is turned on; N3 and N5 form a positive discharge path; PBL discharges to VSS through N3 and N5, and the amount of discharged charge is M*Δt*Δv; If the 1-bit weight stored in the nth 6T-SRAM cell is "+1" and the 5-bit signed number is "1abcd", N2[n] is turned on, QB[n] is connected to BL and BLB; BL and BLB discharge to QB[n] to a low level, H1 outputs a high level, N4 is turned on, H2 outputs a low level, and N3 is disconnected; N4 and N5 form a negative discharge path; NBL discharges to VSS through N4 and N5, and the amount of discharged charge is M*Δt*Δv; If the 1-bit weight stored in the nth 6T-SRAM cell is "-1" and the 5-bit signed number is "0abcd", N1[n] is turned on, Q[n] is connected to BL and BLB; BL and BLB discharge to Q[n] to a low level, H1 outputs a high level, N4 is turned on, H2 outputs a low level, and N3 is disconnected; N4 and N5 form a negative discharge path; NBL discharges to VSS through N4 and N5, and the amount of discharged charge is M*Δt*Δv; If the 1-bit weight stored in the nth 6T-SRAM cell is "-1" and the 5-bit signed number is "1abcd", N2[n] is turned on, QB[n] is connected to BL and BLB; BL and BLB are charged to a high level by Q[n], H1 outputs a low level, N4 is disconnected, H2 outputs a high level, and N3 is turned on; N3 and N5 form a positive discharge path; PBL discharges to VSS through N3 and N5, and the amount of discharged charge is M*Δt*Δv; Wherein, Δv is the total amount of charge discharged from PBL and NBL when the 4-bit unsigned number is "0001".

10. A binary weight network in-memory computing module based on 6T-SRAM, characterized in that: It adopts the layout of the binary weight network in-memory computing circuit based on 6T-SRAM as described in any one of claims 1-9.

Citation Information

Patent Citations

  • In-memory calculation circuit based on 8T-SRAM and current mirror

    CN117219140A

  • Calculation method and device applied to neural networks

    CN107944545A

  • Multi-bit input and multi-bit weight multiply-accumulate in-memory computing unit

    CN112599165A

  • In-memory calculation unit with positive and negative calculation, array and device

    CN113971971A

  • Single-bit all-digital in-memory computing unit based on dynamic logic multiplication

    CN116594587A