Neural network-like operational circuit and operational device in memory thereof
By designing the storage unit array and compensating storage unit string in the in-memory arithmetic device, so that the peak value of the weight value falls into the 0 state, and the signal compensation is performed through the arithmetic unit, the problem of calculation accuracy and loss caused by the weight value distribution state in the neural network is solved. Stability issues are solved and efficient calculation results are achieved.
Patent Information
- Application Number
- CN202310290410.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-02-22
- Filing Date
- 2023-03-23
- Publication Date
- 2024-08-23
AI Technical Summary
In neural network-like systems, different distribution states of weight values lead to accuracy and stability problems in in-memory operations. How to set up high-performance in-memory arithmetic devices to effectively store and operate weight values in these different distribution states.
An in-memory computing device is designed, including a storage unit array and a compensation storage unit string. By making the peak value of the weight value of the storage unit fall to 0 in the stable state, and using the arithmetic unit to perform signal multiplication and addition operations, compensation is provided to ensure the operation the correctness of the results.
It improves the accuracy and stability of in-memory operations, ensures the correctness of multiplication and addition operations, and improves the quality of results of neural network-like operations.
Smart Images

Figure CN118536558A
Abstract
Description
Technical Field
[0001] The present disclosure relates to a neural network-like operation circuit and an operation device in a memory thereof, and more particularly to a neural network-like operation circuit and an operation device in a memory thereof that operate in a stable state of a storage unit. Background Art
[0002] With the evolution of artificial intelligence technology, providing highly powerful in-memory computing devices to perform multiplication and addition operations has become an important trend. In a neural network-like system, the weight values in some computing layers may have a distribution state in which the weight value peak is equal to 0, and the weight values in another computing layer may have a distribution state in which the weight value peak is not equal to 0.
[0003] In order to effectively and stably store these weight values of different distribution states, and taking into account the accuracy of the in-memory computing operation, how to set up a high-performance in-memory computing device has become an important issue for engineers. Summary of the invention
[0004] The present disclosure provides a neural network-like computing circuit and a computing device in a memory thereof that can improve the accuracy of multiplication and addition operations.
[0005] The first aspect of the present disclosure provides an in-memory computing device, comprising a memory cell array, a compensation memory cell string, and an operator. The memory cell array has a plurality of memory cells for storing a plurality of weight values, and the memory cell array has a plurality of word lines and a plurality of bit lines. The compensation memory cell string has a plurality of compensation memory cells coupled to the compensation bit lines, the compensation memory cells are respectively coupled to the word lines, and each compensation memory cell stores a unit weight value. The operator couples the bit lines and the compensation bit lines, multiplies the signal of the compensation bit lines with the peak weight information of the weight value to generate a first signal, and adds the first signal to each signal on the bit lines to obtain a plurality of computing results respectively.
[0006] The neural network-like computing circuit provided in the second aspect of the present disclosure includes a plurality of in-memory computing devices as provided in the first aspect of the present disclosure.
[0007] Based on the above, in the in-memory computing device disclosed in the present invention, when writing the weight value to the storage unit, the peak value of the weight value of the storage unit is made to fall on 0 in a stable state. When performing operations, the in-memory computing device can use an operator to multiply a peak weight information of the weight value with the signal provided by the compensation storage unit string, and compensate for the in-memory computing action. In this way, the in-memory computing device disclosed in the present invention can simultaneously make the storage unit operable in a stable reset state without affecting the correctness of the multiplication and addition operations, effectively improving the accuracy of the calculation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 A schematic diagram illustrating the distribution of weight values of a computing device in a memory according to an embodiment of the present disclosure;
[0009] Figure 2 A schematic diagram of a computing device in a memory according to an embodiment of the present disclosure is shown;
[0010] Figures 3 to 5 A schematic diagram of a computing device in memory according to various embodiments of the present disclosure is shown;
[0011] Fig. 6A as well as Figure 6B Schematic diagrams respectively illustrating different implementations of a computing unit in the in-memory computing device according to an embodiment of the present disclosure; and
[0012] Figure 7 A schematic diagram of a neural network-like computing circuit according to an embodiment of the present disclosure is shown. Description of the drawings:
[0014] 110, 120: distribution curve;
[0015] 200, 300, 400, 500, 710-71N: in-memory computing device;
[0016] 210, 310, 410, 510: storage cell array;
[0017] 220, 320, 420, 520: compensation storage unit string;
[0018] 230, 330, 430, 530, 610, 610': operator;
[0019] 331, 431, 613: multipliers;
[0020] 332, 432, 612: adders;
[0021] 440, 530: offset storage cell array;
[0022] 531: Arithmetic logic circuits;
[0023] 550: voltage divider;
[0024] 611, 611': subtractor;
[0025] 700: Neural network computing circuit;
[0026] ADC1~ADCj, CADC, ADCi, ADCi+1: analog-to-digital converter;
[0027] b1~bj: offset value;
[0028] BL1~BLj, BLi, BLi+1: bit lines;
[0029] bMC1~bMCj: offset storage unit;
[0030] CBL: Compensation bit line;
[0031] CMC1~CMCn+1: compensation storage unit;
[0032] CR1~CRj, CRi: operation results;
[0033] CWL: Compensation word line;
[0034] G+, G-: weight value;
[0035] I+, I-: signal;
[0036] MC11~MCnj: storage unit;
[0037] P: peak weight information;
[0038] S1: first signal;
[0039] SX1~SWn: source signal;
[0040] WL1~WLn: word lines;
[0041] X1~Xn: input signal. DETAILED DESCRIPTION
[0042] Please refer to Figure 1 , Figure 1 A schematic diagram of the weight value distribution of the in-memory computing device of the present disclosure embodiment is depicted. In the present disclosure embodiment, in the in-memory computing device, a plurality of storage cells of the storage cell array can store a plurality of weight values. The distribution of the weight values and the corresponding number of storage cells can be shown as a distribution curve 110, wherein in the distribution curve 110, the weight peak value corresponding to the maximum number of storage cells can be equal to P.
[0043] When performing a weight value writing operation, taking the implementation of an in-memory computing device through a phase change memory cell array as an example, the memory cell can be selected to be written to a reset state, and thereby provide a weight value as a differential state. The reason is that, in a phase change memory, the conductance value (or resistance value) of the memory cell in the reset state is more stable than the conductance value (or resistance value) in the set state. Furthermore, by operating one memory cell in each memory cell pair in a high impedance state in the reset state, and operating the corresponding other memory cell in a low impedance state in the reset state. Furthermore, in this embodiment, the weight peak value in the distribution curve 120 of the weight value and the corresponding number of memory cells in the memory cell array can fall at a position where the weight value is equal to 0.
[0044] When performing in-memory computing operations, the in-memory computing device of the disclosed embodiment can compensate for the error between the distribution curves 110 and 120 and between the weight peaks 0 and P, thereby maintaining the accuracy of the generated computing results.
[0045] Please refer to the following Figure 2 , Figure 2 A schematic diagram of an in-memory computing device according to an embodiment of the present disclosure is shown. The in-memory computing device 200 includes a memory cell array 210, a compensation memory cell string 220, and an operator 230. The memory cell array 210 has a plurality of memory cells MC11-MCnj, and has a plurality of word lines WL1-WLn and a plurality of bit lines BL1-BLj. Each memory cell MC11-MCnj is coupled between a corresponding word line WL1-WLn and a corresponding bit line BL1-BLj. The memory cells MC11-MCnj are used to store a plurality of weight values W11-Wnj, respectively, wherein the weight values W11-Wnj may be the conductance values or resistance values of the memory cells MC11-MCnj. The signals provided by the bit lines BL1-BLj and the compensation bit lines CBL may be current signals or voltage signals. In the present embodiment, the weight values W11-Wnj may have a peak weight information equal to P, wherein the peak weight information is the weight peak value having the largest number of memory cells.
[0046] The memory cell array 210 can receive a plurality of input signals X1-Xn respectively through word lines WL1-WLn. The memory cells MC11-MCnj can perform multiplication operations on the corresponding received input signals X1-Xn and the stored weight values WI1-Wnj, and add the multiplication results of the plurality of memory cells MC11-MCnj on the same bit lines BL1-BLj to generate a plurality of multiplication-addition results on the bit lines BL1-BLj.
[0047] On the other hand, the compensation memory cell string 220 has a plurality of compensation memory cells CMC1-CMCn coupled to the compensation bit line CBL. In the present embodiment, the number of the compensation memory cells CMC1-CMCn is the same as the number of the word lines WL1-WLn, and the compensation memory cells CMC1-CMCn are coupled to the word lines WL1-WLn, respectively. The same unit weight value (e.g., equal to 1) is stored in the compensation memory cells CMC1-CMCn. The compensation memory cells CMC1-CMCn respectively multiply the input signals X1-Xn with the unit weight value to generate a plurality of multiplication results, and add the multiplication results on the compensation bit line CBL to generate another multiplication-addition result.
[0048] The operator 230 is coupled to the bit lines BL1-BLj and the compensation bit line CBL. The operator 230 multiplies the multiplication and addition operation result on the compensation bit line CBL with the weight information (e.g., equal to P) to obtain a first signal. In addition, the operator 230 can respectively add the multiplication and addition operation results on the bit lines BL1-BLj to the first signal to generate a plurality of operation results CR1-CRj.
[0049] Please note that in the correct state, taking the corresponding bit line BL1 as an example, the operation result CR1 to be generated by the memory operation device 200 should be equal to However, in order to obtain the stability of the memory cells MC11-MCn1, the weight peak value of the distribution range of the weight values W11-Wn1 of the memory cells MC11-MCn1 is set to 0. Therefore, the calculation result that the memory cell array 210 can calculate is equal to Therefore, it can be inferred
[0050] It can be seen from the above mathematical formula that the compensation storage unit string 220 of the present embodiment can multiply the input signals X1-Xn by the unit weight value and add the multiplication results (equal to ), and then cooperate with the operator 230 to multiply the multiplication and addition result generated by the compensation storage cell string 220 by P times (equal to ) can compensate for the operation result a1′ calculated by the memory cell array 210 and obtain the correct operation result CR1.
[0051] From the above description, it can be seen that the in-memory operation device 200 can effectively compensate for the multiple multiplication and addition operation results on the bit lines BL1~BLj by adding the first signals of the multiple multiplication and addition operation results on the bit lines BL1~BLj respectively, and generate correct operation results CR1~CRj.
[0052] Incidentally, the memory cells MC11-MCnj in the disclosed embodiment may be, in addition to phase change memory cells, resistive memory cells, ferroelectric memory cells, ferroelectric gate field effect transistor memory cells, magnetoresistive memory cells or any form of flash memory cells.
[0053] Please refer to Figure 3 , Figure 3 A schematic diagram of an in-memory computing device according to another embodiment of the present disclosure is shown. The in-memory computing device 300 includes a memory cell array 310, a compensation memory cell string 320, and an operator 330. The memory cell array 310 includes a plurality of memory cells MC11-MCnj. Each memory cell MC11-MCnj is coupled between a corresponding word line WL1-WLn and a corresponding bit line BL1-BLj. The memory cells MC11-MCnj receive a plurality of input signals X1-Xn through the word lines WL1-WLn. The compensation memory cell string 320 includes a plurality of compensation memory cells CMC1-CMCn. The compensation memory cells CMC1-CMCn are respectively coupled to the word lines WL1-WLn.
[0054] In the present embodiment, the operator 330 includes a plurality of analog-to-digital converters ADC1-ADCj, CADC, a multiplier 331 and an adder 332. The analog-to-digital converters ADC1-ADCj are respectively coupled to the bit lines BL1-BLj, and the analog-to-digital converter CADC is coupled to the compensation bit line CBL. The analog-to-digital converters ADC1-ADCj are respectively used to convert the signals on the bit lines BL1-BLj into digital formats, and the analog-to-digital converter CADC is used to convert the signals on the compensation bit line CBL into digital formats. The multiplier 331 is coupled to the analog-to-digital converter CADC and performs a multiplication operation on the signal on the compensation bit line CBL. In the present embodiment, the multiplier 331 can multiply the signal on the compensation bit line CBL by P to generate a first signal S1, where P is the peak weight information of the weight values W11-Wnj. The adder 332 is coupled to the output terminals of the analog-to-digital converters ADC1-ADCj and the output terminal of the multiplier 331. The adder 332 can add the signals on the bit lines BL1 ˜BLj and the output (first signal S1 ) of the multiplier 331 to generate operation results CR1 ˜CRj respectively.
[0055] The multiplier 331 and the adder 332 in this embodiment can be implemented by using a digital signal multiplication circuit and an addition circuit well known to those skilled in the art, without any specific limitation.
[0056] Please refer to Figure 4 , Figure 4A schematic diagram of an in-memory computing device according to another embodiment of the present disclosure is shown. The in-memory computing device 400 includes a memory cell array 410, a compensation memory cell string 420, an operator 430, and an offset memory cell array 440. The memory cell array 410 includes a plurality of memory cells MC11-MCnj. Each memory cell MC11-MCnj is coupled between a corresponding word line WL1-WLn and a corresponding bit line BL1-BLj. The memory cells MC11-MCnj receive a plurality of input signals X1-Xn through the word lines WL1-WLn. The offset memory cell array 440 includes an offset memory cell string corresponding to the compensation word line CWL. The offset memory cell string has a plurality of offset memory cells bMC1-bMCj respectively coupled to the bit lines BL1-BLj. The offset memory cells bMC1-bMCj can store a plurality of offset values b1-bj respectively. The compensation memory cell string 420 includes a plurality of compensation memory cells CMC1-CMCn+1. The compensation memory cells CMC1 -CMCn+1 are coupled to the word lines WL1 -WLn and the compensation word line CWL, respectively. The operator 430 includes a plurality of analog-to-digital converters ADC1 -ADCj, CADC, a multiplier 431 and an adder 432 .
[0057] and Figure 3 In a different embodiment, the memory computing device 400 of this embodiment is further provided with an offset memory cell array 440. The plurality of offset memory cells bMC1-bMCj in the offset memory cell array 440 respectively store offset values b1-bj, and respectively multiply the offset values b1-bj with a unit signal (e.g., equal to 1) received on the compensation word line CWL. The offset memory cell array 440 also provides the multiplication result of the offset values b1-bj and the unit signal to perform an offset operation on the signals on the bit lines BL1-BLj respectively.
[0058] Please refer to Figure 5 , Figure 5 A schematic diagram of an in-memory computing device according to another embodiment of the present disclosure is shown. The in-memory computing device 500 includes a memory cell array 510, a compensation memory cell string 520, an operator 530, an offset memory cell array 540, and a voltage divider 550. The memory cell array 510, the compensation memory cell string 520, and the offset memory cell array 540 have the same circuit architecture as the memory cell array 410, the compensation memory cell string 420, the operator 430, the offset memory cell array 440, and the voltage divider 450, respectively, and the details are not repeated here.
[0059] Different from the above-mentioned embodiments, in this embodiment, the operator 530 includes a plurality of analog-to-digital converters ADC1-ADCj, CADC, and an arithmetic logic circuit 531. The arithmetic logic circuit 531 is coupled to the output terminals of the analog-to-digital converters ADC1-ADCi and CADC, and is used to multiply the output of the analog-to-digital converter CADC by the peak weight information P to generate a first signal. The arithmetic logic circuit 531 adds the first signal to the plurality of outputs of the analog-to-digital converters ADC1-ADCj, respectively, to generate operation results CR1-CRj.
[0060] In this embodiment, the arithmetic logic circuit 531 may be a digital circuit with computing capability, such as an arithmetic logic unit (ALU).
[0061] The voltage divider 550 is coupled to the word lines WL1-WLn and the compensation word line CWL. The voltage divider 550 receives a plurality of source signals SX1-SWn and a unit signal (=1), and generates a plurality of input signals respectively input to the word lines WL1-WLn according to the source signals SX1-SWn and the unit signal through a voltage dividing action. For example, the source signals SX1-SWn may be a plurality of digital signals, and the voltage divider 550 may calculate a voltage dividing ratio corresponding to each source signal SX1-SWn according to the source signals SX1-SWn, and divide the voltage according to the voltage dividing ratio for a default voltage value to generate each input signal corresponding to each word line WL1-WLn.
[0062] Please refer to the following Fig. 6A as well as Figure 6B , Fig. 6A as well as Figure 6B Schematic diagrams of different implementations of the arithmetic unit in the memory computing device of the present disclosure are respectively drawn. In this implementation, when the memory cells in the memory cell array are phase change memory cells, Fig. 6A In the embodiment, the operator 610 can distinguish two adjacent bit lines of the memory cell array as a bit line pair. For example, two adjacent bit lines BLi and BLi+1 are distinguished as a bit line pair. Based on the fact that each pair of memory cells is a phase change memory cell, a weight value can be provided. The memory cell on the bit line BLi provides a positive weight value G+, and the memory cell on the bit line BLi+1 provides a negative weight value G-. In addition, analog-to-digital converters ADCi and ADCj+1 are respectively set corresponding to the paired bit lines BLi and BLi+1 in the operator 610. The analog-to-digital converters ADCi and ADCj+1 are respectively used to convert the signals I+ and I- generated on the bit lines BLi and BLi+1 according to the input signal Xin into digital signals.
[0063] The operator 610 may be provided with a subtractor 611 and an adder 612 corresponding to the bit line pair. The subtractor 611 is used to subtract the output signals of the analog-to-digital converters ADCi and ADCi+1, and the adder 612 is used to add the output of the subtractor 611 and the first signal S1 generated by the multiplier 613 to generate a compensated operation result CRi. The multiplier 613 is used to multiply the signal on the compensation bit line CBL with the peak weight information P to generate the first signal S1.
[0064] exist Figure 6B In the embodiment, the operator 610' can also distinguish two adjacent bit lines of the memory cell array as a bit line pair, and set a subtractor 611 corresponding to the bit line pair. In the present embodiment, the subtractor 611' is coupled to the bit lines BLi and BLi+1, and the signals on the bit lines BLi and BLi+1 are subtracted. The operator 610' is also configured to set an analog-to-digital converter ADCi corresponding to the subtractor 611, which is used to convert the output signal of the subtractor 611' into a digital format. The adder 612 is coupled to the output end of the analog-to-digital converter ADCi and the multiplier 613, and is used to add the output signal of the digital converter ADCi and the first signal S1 generated by the multiplier 613 to generate a compensated operation result CRi. The multiplier 613 is used to multiply the signal on the compensation bit line CBL with the peak weight information P, and generate the first signal S1.
[0065] It is worth mentioning that the subtractor 611 in the above embodiment may be a digital signal subtractor, and the subtractor 611 ′ may be an analog signal subtractor.
[0066] Please refer to Figure 7 , Figure 7 A schematic diagram of a neural network computing circuit of an embodiment of the present disclosure is shown. The neural network computing circuit 700 includes a plurality of in-memory computing devices 710 to 71N. The in-memory computing devices 710 to 71N correspond to a plurality of computing layers of the neural network 701, respectively. Each in-memory computing device 710 to 71N can be implemented by applying any of the in-memory computing devices in the aforementioned multiple embodiments and implementation methods. The implementation methods and operation details of the in-memory computing devices 710 to 71N have been described in detail in the aforementioned embodiments and implementation methods, and will not be elaborated on here.
[0067] In summary, the in-memory computing device disclosed in the present invention can store the weight values of the memory cells in a relatively stable reset state where the peak weight information is 0, and perform compensation actions on the computing results through a compensation storage unit string without external settings to maintain the correctness of the computing results. In this way, the accuracy of the computing results of the in-memory computing device can be effectively improved, and the correctness of the corresponding neural network-like computing can be improved.
Claims
1. An in-memory computing device, comprising: A memory cell array having a plurality of memory cells for storing a plurality of weight values, the memory cell array having a plurality of word lines and a plurality of bit lines; A compensation memory cell string, comprising a plurality of compensation memory cells coupled to a compensation bit line, the plurality of compensation memory cells are respectively coupled to the plurality of word lines, and each of the compensation memory cells stores a unit weight value; as well as An operator is coupled to the plurality of bit lines and the compensation bit line, so that the signal of the compensation bit line is multiplied by a peak weight information of the plurality of weight values to generate a first signal, and the first signal is added to the signals on each of the bit lines to obtain a plurality of operation results respectively. 2 . The in-memory computing device according to claim 1 , wherein the plurality of word lines receive a plurality of input signals respectively.
3. The in-memory computing device according to claim 1, further comprising: An offset memory cell array includes an offset memory cell string corresponding to a compensation word line respectively. The offset memory cell string has a plurality of offset memory cells respectively coupled to the plurality of bit lines. The plurality of offset memory cells respectively store a plurality of offset values.
4. The in-memory computing device according to claim 1, wherein the computing unit comprises: A plurality of analog-to-digital converters convert signals of the plurality of bit lines and the compensation bit line into digital formats; as well as An arithmetic logic circuit multiplies the digital signal of the compensation bit line with the peak weight information of the plurality of weight values to generate the first signal, and adds each digital signal on each bit line to the first signal to generate each operation result.
5. The in-memory computing device according to claim 1, wherein the computing unit comprises: A plurality of analog-to-digital converters convert signals of the plurality of bit lines and the compensation bit line into digital formats; a multiplier for multiplying the compensation bit line signal in digital format with the peak weight information of the plurality of weight values to generate the first signal; as well as An adder adds each of the digital signals on each of the bit lines to the first signal to generate each of the operation results.
6. The in-memory computing device according to claim 1, further comprising: A voltage divider circuit is coupled to the plurality of word lines. The voltage divider circuit receives a plurality of source signals and generates a plurality of input signals respectively through voltage division according to the plurality of source signals. 7 . The in-memory computing device according to claim 1 , wherein each of the weight values is a conductance value or a resistance value.
8. A type of neural network operation circuit, comprising: A plurality of in-memory computing devices, each of the in-memory computing devices comprising: A memory cell array having a plurality of memory cells for respectively storing a plurality of weight values, the memory cell array having a plurality of word lines and a plurality of bit lines; a compensation memory cell string, comprising a plurality of compensation memory cells coupled to a compensation bit line, the plurality of compensation memory cells being respectively coupled to the plurality of word lines, each of the compensation memory cells storing a unit weight value; and An operator is coupled to the plurality of bit lines and the compensation bit line, so that the signal of the compensation bit line is multiplied by a peak weight information of the plurality of weight values to generate a first signal, and the first signal is added to the signals on each of the bit lines to obtain a plurality of operation results respectively.
9. The neural network computing circuit according to claim 8, wherein the plurality of computing devices in the memory respectively correspond to a plurality of computing layers of the neural network.
10. The neural network-like computing circuit according to claim 8, wherein each of the computing devices in the memory further comprises: An offset memory cell array includes an offset memory cell string corresponding to a compensation word line respectively. The offset memory cell string has a plurality of offset memory cells respectively coupled to the plurality of bit lines. The plurality of offset memory cells respectively store a plurality of offset values.
Citation Information
Patent Citations
neural network data operation method based on a NOR Flash module
CN109800876A
In-memory computing accelerator and optimization method thereof
CN112529171A
Data sensing device and data sensing method thereof
CN112633486A
In-memory arithmetic unit and in-memory arithmetic method
CN114816326A
In-memory computation device and in-memory computation method
US20220238151A1
