Calculation circuit unit, neural network calculation circuit, and method for driving neural network calculation circuit

By dividing the weight coefficients into high and low bits in the neural network computing circuit and controlling the current range of each bit separately, the problem of difficult to take into account current accuracy and total current in the prior art is solved, and low power consumption and large-scale Integrated neural network computing circuit.

CN118922835APending Publication Date: 2024-11-08NUVOTON TECH CORP JAPAN NAGAOKAKYO CITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380025683.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-03-11
Filing Date
2023-02-24
Publication Date
2024-11-08

Smart Images

  • Figure CN118922835A_ABST
    Figure CN118922835A_ABST
Patent Text Reader

Abstract

In a neural network arithmetic circuit that outputs output data (y) on the basis of an arithmetic result of a product sum of input data (x1-xn) and coupling weight coefficients (w1-wn), an arithmetic circuit unit (PU1) that represents one coupling weight is provided with a plurality of selection transistors (TPU1, TPL1, TNU1, TNL1) and a plurality of non-volatile resistance change elements (RPU1, RPL1, RNU1, RNL1) that represent the weight coefficients with different loads. The non-volatile resistance change elements (RPU1, RPL1, RNU1, RNL1) each hold information about a high bit of the absolute value of the positive weight coefficient, information about a low bit of the absolute value of the positive weight coefficient, information about a high bit of the absolute value of the negative weight coefficient, and information about a low bit of the absolute value of the negative weight coefficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an operation circuit unit using a nonvolatile semiconductor storage element, a neural network operation circuit and a driving method thereof. Background Art

[0002] With the development of information and communication technology, the advent of IoT (Internet of Things), where all objects are connected to the Internet, has attracted much attention. In IoT technology, various electronic devices are connected to the Internet, and the high performance of the devices is expected to be improved. However, as a technology to achieve higher performance, the research and development of artificial intelligence (AI) technology, which allows electronic devices to learn and judge by themselves, has been actively carried out in recent years.

[0003] In artificial intelligence technology, research and development of semiconductor integrated circuits that can perform neural network operations at high speed and low power consumption are prevalent, using neural network technology that simulates human brain-type information processing in engineering.

[0004] Neural networks are composed of basic elements called neurons (sometimes also called perceptrons), which are connected in a coupling manner called synapses in which multiple inputs have different coupling weight coefficients (hereinafter also referred to as "weight coefficients"), and multiple neurons are connected to each other, thereby enabling advanced computing such as image recognition and voice recognition. In neurons, a product-sum operation is performed to add all the values ​​obtained by multiplying each input by each coupling weight coefficient.

[0005] Non-patent document 1 discloses an example of a neural network operation circuit using a resistance variable non-volatile memory (hereinafter also referred to as a non-volatile resistance variable element or "resistance element"). A resistance variable non-volatile memory capable of setting an analog resistance value (in other words, conductance) is used to form a neural network operation circuit, an analog resistance value equivalent to a coupling weight coefficient is stored in a non-volatile memory element, an analog voltage value equivalent to an input is applied to the non-volatile memory element, and an analog current value flowing through the non-volatile memory element is used at this time. The product-sum operation performed by the neuron is performed by storing multiple coupling weight coefficients as analog resistance values ​​in multiple non-volatile memory elements, applying multiple analog voltage values ​​equivalent to multiple inputs to multiple non-volatile memory elements, and obtaining an analog current value obtained by summing the current values ​​flowing through multiple non-volatile memory elements as a product-sum operation result. A neural network operation circuit using a non-volatile memory element can achieve low power consumption, and in recent years, process development, device development, and circuit development of a resistance variable non-volatile memory capable of setting an analog resistance value are being actively carried out.

[0006] In Patent Document 1 and Patent Document 2, respectively, a neural network operation circuit is disclosed that stores analog resistance values ​​as weight coefficients of a neural network. In these prior art documents, each weight coefficient is formed by a combination of an analog resistance element and a selection transistor. The input vector to the neural network operation circuit is a vector consisting of 0 or 1, and in the word line corresponding to each component of the vector, the selected is input 1, and the unselected is input 0, and an input voltage is applied to the gate terminal of the selection transistor. In a state where multiple word lines corresponding to input 1 are selected, the current flowing through the same data line is totaled by the analog resistance value equivalent to the weight coefficient, thereby obtaining the total current as the result of the product-sum operation. In Patent Document 2, the area saving of the selection transistor is achieved by using a ferroelectric field effect transistor (Ferroelectric-gate Field-Effect Transistor: FeFET) and a fixed resistor. In Patent Document 3, the weight coefficient is set to a programmable current reduction, but the principle of the product-sum operation circuit is similar to that of Patent Document 1 and Patent Document 2.

[0007] When a neural network operation circuit is constructed in a computer using a CMOSFET logic circuit implemented by a conventional CPU or the like, it is necessary to successively perform the load of the transmission of the weight coefficients from the memory area that holds the weight coefficients, or the sum operation required for the product-sum operation calculation, which is known as the von Neumann bottleneck. The purpose of the neural network operation circuit structure represented by the patent document 1 is to solve the problem of increased calculation time due to the transmission and successive addition of the weight coefficients by means of a structure in which the operation circuit holds the weight coefficients by means of a non-volatile memory element and a circuit structure in which the product-sum operation can be performed by the sum of analog currents, and to perform the neural network operation at a higher speed.

[0008] Prior art literature

[0009] Non-patent literature

[0010] Non-patent document 1: M. Prezioso, et al., "Training and operation of anintegrated neuromorphic network based on metal-oxide memoristors," Nature, no.521, pp.61-64, 2015

[0011] Patent Literature

[0012] Patent Document 1: International Publication No. 2019 / 049741

[0013] Patent Document 2: International Publication No. 2019 / 188457

[0014] Patent Document 3: International Publication No. 2019 / 182730 Summary of the invention

[0015] Problems to be solved by the invention

[0016] In these neural network operation circuits, the sum operation in the product-sum operation is replaced by the sum of the currents flowing through the resistance elements corresponding to the weight coefficients as parallel currents on one data line to obtain a current corresponding to the operation result. In order to illustrate the problem to be solved by the present disclosure, the representative structures of these neural network operation circuits are described.

[0017] use Figure 2 and Figure 3 The relationship between the neural network and the total current will be described.

[0018] Figure 2 is a diagram for explaining the computational model in neurons constituting a neural network. More specifically, Figure 2 (a) represents the computational model of neurons. Figure 2 (b) means Figure 2 The meaning of the symbols shown in (a) is, Figure 2 (c) is a graph showing an example of an activation function f that a neuron has. Figure 2 (d) represents the formula describing the activation function f and the output y. For a single or multiple input vector x = (x1, x2, ..., xn), the vectors multiplied by the numerical vector w = (w1, w2, ..., wn) called the weight coefficient are added (i.e., the inner product is taken), and then the activation function f is applied, thereby obtaining the final output y. The bottleneck of the amount of computation in the neural network is that the operations in this part occupy the majority, especially the operation of taking the inner product between the vectors of the previous stage that applies the activation function f is called a sum-of-products operation. In the neural network operation circuit that utilizes current summing represented by Patent Document 1, the sum-of-products operation is replaced by the current flowing through the circuit.

[0019] Figure 3 1 is a diagram for explaining a typical circuit structure for implementing a product-sum operation. Figure 3 (a) shows a typical circuit structure for implementing product-sum operations. Figure 3 (b) means Figure 3 The meaning of the symbols shown in (a) is, Figure 3(c) represents the formula for describing the total current I. For simplicity, the input vector is described using a binary case. The input vector x = (x1, x2, ..., xn) corresponds to the selection and non-selection of word lines WL1, WL2, ..., WLn. In addition, the selection transistors T1, T2, ..., Tn and the resistors R1, R2, ..., Rn are connected corresponding to the weight coefficients w = (w1, w2, ..., wn). Each pair of selection transistors Tk and resistor elements Rk forms a cell, and in particular, the cell currents I1, I2, ..., In flowing through the cell represent the product of each weight coefficient and the corresponding input vector. Based on this structure, if the source line SL is grounded (Vss) and a voltage (Vdd) is applied to the bit line BL, then corresponding to the input of the word line WL, the current flows in the cell selected by the input vector. According to Kirchhoff's current law, the total current of all selected cells flows through the bit line BL. Through this total current, it is expressed Figure 2 The product and sum operation in the computational model.

[0020] exist Figure 2 In the calculation model of the neural network shown in FIG, the weight coefficient is calculated by a signed real number. In addition, the final output is obtained by applying the value after the product-sum operation to the activation function f. Figure 4 A typical configuration for realizing these circuits will be described. Figure 4 1 is a diagram for explaining a structure including a product-sum operation circuit based on current totalization and a determination circuit. More specifically, Figure 4 (a) shows a circuit having a product-sum operation and a determination circuit C. Figure 4 (b) means Figure 4 The meaning of the symbols shown in (a) is, Figure 4 (c) represents the equation of the total current IP corresponding to the product-sum calculation result of the positive weight coefficient, the total current IN corresponding to the product-sum calculation result of the negative weight coefficient, and the output Y of the determination circuit C.

[0021] exist Figure 4 In the Figure 3 The product-sum operation circuit structure in the system is constructed in such a way that operations are performed for each positive and negative weight coefficient in order to express a signed real number. That is, two cells are connected to one word line WL, but in accordance with the positive and negative weight coefficients to be expressed, the resistance value is set in one cell so that a cell current corresponding to the absolute value of the weight coefficient flows, and a sufficiently high resistance value is set in the other cell, thereby suppressing the current equivalent to the unselected current. In other words, two cells are used to express one weight coefficient. Use Figure 4The selection transistors TP1, ..., TPn and the resistor elements RP1, ..., RPn in the circuit are used to form a cell current expression corresponding to a positive value of the weight coefficient. On the other hand, the selection transistors TN1, ..., TNn and the resistor elements RN1, ..., RNn are used to form a cell current expression corresponding to a negative value of the weight coefficient. By setting such a structure, if the source lines SLP and SLN are grounded (Vss) and the same voltage (Vdd) is applied to the bit lines BLP and BLN, then according to Figure 3 According to the operation principle, a total current IP corresponding to the product-sum operation result of the positive weight coefficient and a total current IN corresponding to the product-sum operation result of the negative weight coefficient flow through the bit lines BLP and BLN, respectively.

[0022] For simplicity, the activation function is Figure 2 As an example, the step function shown in FIG. 1 is a function that outputs 1 or 0 depending on the positive or negative input. The input of the activation function is Figure 4 The problem of comparing the total current IP and the total current IN in the circuit is reduced to the problem of comparing the sizes of the total current IP and the total current IN. As a determination circuit C that realizes this function, it can be easily realized using a well-known technology, such as a current differential sensing amplifier. In addition, the connection between the product-sum operation circuit and the determination circuit C is a logical connection, and a signal equivalent to the total current IP flowing through the bit line BLP and a signal equivalent to the total current IN flowing through the bit line BLN are input to the determination circuit C. Instead of the total current IP flowing through the bit line BLP, a signal equivalent to the total current IP flowing through the source line SLP and a signal equivalent to the total current IN flowing through the bit line BLN and flowing through the source line SLN may be input to the determination circuit C.

[0023] In addition, in this description, for simplicity, the operation of binarizing input and output to 0 and 1 is described, but it is also possible to consider a structure that further improves the accuracy of the simulation of the circuit of the operation model of the neural network by providing an analog-to-digital conversion (AD conversion) and a digital-to-analog conversion (DA conversion) circuit. As an example, the input level of the word line WL is set to an intermediate level of 0 / 1, the comparison circuit of the total current IP and the total current IN is compared in analog, or the activation function is made more accurate by setting the output corresponding to the comparison level, etc., but these are technologies that can be inferred from the above description, so the description is omitted.

[0024] The following describes a problem regarding the usable range (dynamic range) of the current of each resistor element, which becomes a problem in realizing a circuit that performs such a product-sum operation based on the current sum.

[0025] As a factor affecting the calculation accuracy when implementing these neural network calculation circuits in a manner of summing up multiple currents at a time, the use of Figure 5The allowable amount of current flowing through each bit line is described. Figure 5 This is a circuit diagram showing an example of a transistor circuit that is usually included in a product-sum operation circuit based on current summation. When constructing a neural network operation circuit, Figure 5 As shown, Figure 3 The power supply (Vdd) connected to the bit line BL and the ground (Vss) connected to the source line SL are connected via the bit line selection switch SWBL and the source line selection switch SWSL as switches, the SL grounding transistor TDSL as a driving circuit, and the BL-Vdd connection transistor TDBL as a driving circuit. Therefore, when the circuit is actually constructed, the total current is clamped by the current tolerance of the transistors connected in series in the path from the power supply (Vdd) to the ground (Vss). In order to increase the current tolerance, it is necessary to improve the transistor capabilities of the selection transistors and the driving circuits that become switches, but this will lead to an increase in the transistor size and circuit scale. In addition, when these neural network operation circuits are formed as LSIs by microfabrication on a silicon substrate, the allowable current density of the wiring of the bit line BL and the source line SL is also determined by the physical properties of the conductor that forms the wiring, so the allowable current of these bit lines BL needs to be considered in the circuit design.

[0026] The following describes a problem that occurs when the upper limit of the total current is restricted by these allowable current amounts and the current of each cell representing the weight coefficient is reduced.

[0027] The weight coefficients of the neural network as a mathematical model take real values. Therefore, in order to associate the current flowing through the resistor with the weight coefficient, it is necessary to associate the current range of the resistor with the current range that the weight coefficient can take. Figure 6 is a graph showing the relationship between the ideal weight coefficient and the cell current. Figure 6 In the example, the weight coefficient on the horizontal axis is normalized to the maximum absolute value, and the cell current on the vertical axis can be variably set from the cell current lower limit Imin as the minimum value to the cell current upper limit Imax as the maximum value. At this time, when the absolute value of a certain weight coefficient is w, Figure 6 As shown, the current Iw corresponding to the weight coefficient w is used. In addition, the cell current lower limit Imin and the cell current upper limit Imax are the minimum value and the maximum value of the set cell current, respectively.

[0028] In the neural network operation circuit, a signed real number is represented in two cells. Figure 7 is a diagram showing the current values ​​(IP1, IN1) of the two cells when the weight coefficient w with a sign is expressed using the two cells. Figure 7In the figure, the case where w>0 is considered is shown. That is, it is set that the current Iw flows in the positive cell CellP, and the cell current lower limit Imin flows in the negative cell CellN. By setting in this way, the same amount of the cell current lower limit Imin is added to the positive bit line BLP and the negative bit line BLN after the current is added, so they are offset when compared. That is, the total current I is calculated according to

[0029] I=(Imax-Imin)×w+Imin

[0030] Therefore, by determining the value of I corresponding to the weight coefficient w, the weight coefficient w taking a value between 0 and 1 can be associated with the cell current lower limit Imin and the cell current upper limit Imax. It can be seen that the linearity of the product-sum operation is theoretically maintained by this association. However, as described above, the current that increases as the currents of multiple cells are added together is not infinitely allowed, but is clamped at a certain current level. From the perspective of the linearity of the operation, if this clamping phenomenon is considered, it can be said that it is a problem of linear deterioration due to clamping.

[0031] On the other hand, it is considered to reduce the upper limit Imax of the cell current in order to ensure the linearity related to the total current. As mentioned above, the lower limit Imin of the cell current cancels out in the calculation, so for simplicity, it can be considered that Imin=0(A). When representing a real number greater than 0 and less than 1, reducing the upper limit Imax of the cell current requires higher precision for the controllability of the cell current, especially in the manufacture of actual products, especially in mass production, which will lead to the problem of being easily affected by manufacturing deviations.

[0032] As described above, in the conventional neural network operation circuit, regarding the current amount of the cell, there are two contradictory issues: the issue of the allowable current amount flowing through the bit line of the total current and the issue of maintaining the current accuracy of the low current.

[0033] The present disclosure is intended to solve the above-mentioned conventional problems, and its object is to provide an operation circuit unit, a neural network operation circuit, and a driving method thereof that can achieve both maintenance of current accuracy and reduction of total current.

[0034] Means for solving problems

[0035] In order to achieve the above-mentioned purpose, an operation circuit unit involved in one embodiment of the present disclosure is an operation circuit unit that maintains a weight coefficient having a positive or negative value corresponding to input data that can selectively take a first logic value and a second logic value, and provides a current corresponding to the product of the input data and the weight coefficient, and comprises: a word line; a first data line, a second data line, a third data line, a fourth data line, a fifth data line, a sixth data line, a seventh data line and an eighth data line; a first non-volatile semiconductor memory element, a second non-volatile semiconductor memory element, a third non-volatile semiconductor memory element and a fourth non-volatile semiconductor memory element; and a first selection transistor, a second selection transistor, a third selection transistor and a fourth selection transistor. transistor, the gates of the first selection transistor, the second selection transistor, the third selection transistor and the fourth selection transistor are connected to the word line, one end of the first nonvolatile semiconductor storage element is connected to the drain terminal of the first selection transistor, one end of the second nonvolatile semiconductor storage element is connected to the drain terminal of the second selection transistor, one end of the third nonvolatile semiconductor storage element is connected to the drain terminal of the third selection transistor, one end of the fourth nonvolatile semiconductor storage element is connected to the drain terminal of the fourth selection transistor, the first data line is connected to the source terminal of the first selection transistor, and the third data line is connected to the source terminal of the second selection transistor The fifth data line is connected to the source terminal of the third selection transistor, the seventh data line is connected to the source terminal of the fourth selection transistor, the second data line is connected to the other end of the first nonvolatile semiconductor storage element, the fourth data line is connected to the other end of the second nonvolatile semiconductor storage element, the sixth data line is connected to the other end of the third nonvolatile semiconductor storage element, the eighth data line is connected to the other end of the fourth nonvolatile semiconductor storage element, the first nonvolatile semiconductor storage element maintains the information of the positive weight coefficient as a resistance value in a manner having a different load than the second nonvolatile semiconductor storage element, and the third nonvolatile semiconductor storage element is connected to the other end of the first nonvolatile semiconductor storage element. The semiconductor memory element maintains the information of the negative weight coefficient as a resistance value in a manner having a different load compared to the fourth non-volatile semiconductor memory element, and the operational circuit unit grounds the first data line, the third data line, the fifth data line, and the seventh data line, and applies a voltage to the second data line, the fourth data line, the sixth data line, and the eighth data line, thereby providing a current corresponding to the product corresponding to the first logic value when the word line is not selected, and providing a current corresponding to the product corresponding to the second logic value when the word line is selected, based on the current flowing through the second data line, the fourth data line, the sixth data line, and the eighth data line.

[0036] In order to achieve the above-mentioned purpose, a neural network operation circuit of one embodiment of the present invention comprises: a main area, which is composed of a plurality of the above-mentioned operation circuit units; a first additional area, a second additional area, a third additional area and a fourth additional area, which are composed of a non-volatile semiconductor memory element and a selection transistor having the same structure as the non-volatile semiconductor memory element used in the plurality of the above-mentioned operation circuit units; a first control circuit, which is used to select a word line connected to the gate of the selection transistor in the first additional area; a second control circuit, which is used to select a word line connected to the gate of the selection transistor in the second additional area; a third control circuit, which is used to select a word line connected to the gate of the selection transistor in the third additional area; a fourth control circuit, which is used to select a word line connected to the gate of the selection transistor in the fourth additional area; a first node, a second node, a third node, a fourth node, a fifth node, a sixth node, a seventh node and an eighth node;and a first determination circuit and a second determination circuit, wherein the first data line of each arithmetic circuit unit in the main region is connected to the first node, the second data line of each arithmetic circuit unit in the main region is connected to the second node, the third data line of each arithmetic circuit unit in the main region is connected to the third node, the fourth data line of each arithmetic circuit unit in the main region is connected to the fourth node, the fifth data line of each arithmetic circuit unit in the main region is connected to the fifth node, the sixth data line of each arithmetic circuit unit in the main region is connected to the sixth node, the seventh data line of each arithmetic circuit unit in the main region is connected to the seventh node, the eighth data line of each arithmetic circuit unit in the main region is connected to the eighth node, the first determination circuit is connected to the second node and the sixth node, the second determination circuit is connected to the fourth node and the eighth node, and the The first control circuit is connected to the word line of the first additional region, the second control circuit is connected to the word line of the second additional region, the third control circuit is connected to the word line of the third additional region, and the fourth control circuit is connected to the word line of the fourth additional region, and corresponding binary data is input to the plurality of word lines of the main region, the neural network operation circuit controls the first control circuit, the third control circuit, and the second determination circuit based on the current flowing through the fourth node and the eighth node by grounding the third node and the seventh node and applying voltages to the fourth node and the eighth node, thereby determining the operation result of the lower bit, and determining the control of the second control circuit and the fourth control circuit based on the operation result of the lower bit, and outputting the operation result corresponding to the sum of the products of the plurality of operation circuit units using the first determination circuit by grounding the first node and the fifth node and applying voltages to the second node and the sixth node. ;

[0037] In order to achieve the above-mentioned purpose, a driving method of a neural network operation circuit involved in one embodiment of the present invention comprises: a process of normalizing the absolute value of the weight coefficient of each of the multiple operation circuit units constituting the neural network operation circuit by dividing the maximum value of the weight coefficient; a process of quantizing each of the normalized weight coefficients according to a certain bit number; a process of dividing the quantized information into high-order bits and low-order bits; and a process of determining the current amount of the current flowing through the non-volatile semiconductor storage element corresponding to the high-order bit constituting the multiple operation circuit units and the current amount of the current flowing through the non-volatile semiconductor storage element corresponding to the low-order bit according to the divided high-order bit and the low-order bit.

[0038] Effects of the Invention

[0039] According to the operation circuit unit, neural network operation circuit and driving method thereof disclosed in the present invention, the contradictory issues of lowering the current and maintaining the accuracy within the current usage range in the prior art can be taken into account, and a neural network operation circuit using non-volatile semiconductor memory elements that can achieve low power consumption and large-scale integration can be realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a structural diagram of the neural network operation circuit of the first embodiment.

[0041] Figure 2 A diagram for explaining a computational model of neurons that constitute a neural network.

[0042] Figure 3 This is a diagram for explaining a typical circuit configuration for realizing a product-sum operation.

[0043] Figure 4 This is a diagram for explaining a configuration including a product-sum operation circuit based on current totalization and a determination circuit.

[0044] Figure 5 This is a circuit diagram showing an example of a transistor circuit generally included in a product-sum operation circuit based on current summation.

[0045] Figure 6 It is a graph showing the relationship between the ideal weight coefficient and the cell current.

[0046] Figure 7 This is a diagram showing current values ​​of two cells when two cells are used to express signed weight coefficients.

[0047] Fig. 8A This is a diagram showing the structure of a conventional circuit for performing a product-sum operation based on current summation.

[0048] Figure 8B Yes means Fig. 8A Data on the relationship between the arithmetic sum of the cell currents and the measured total current.

[0049] Fig. 9 This is a diagram for explaining a case where the maximum current of the cell current is reduced.

[0050] Fig.10 It is for Fig. 9 Existing Conditions 1 and 2 in FIG. 3 simulate the overlapping diagrams of the distributions between different quantization levels.

[0051] Fig.11AThis is a diagram for explaining the structure of an operation circuit unit for expressing one weight coefficient in the neural network operation circuit of the first embodiment.

[0052] Fig. 11B This is a diagram showing a comparison between the prior art and implementation methods with respect to the setting conditions and characteristics of a cell.

[0053] Fig. 11C is a flow chart showing an algorithm for dividing weight coefficients into upper bits and lower bits.

[0054] Fig.12 : is a circuit diagram showing an example of a read determination circuit.

[0055] Fig.13 It is a diagram for explaining the structure of the additional area according to the first embodiment.

[0056] Fig.14 This is a flowchart of the read operation of the neural network operation circuit according to the first embodiment.

[0057] Fig.15 is from Figure 1 This diagram shows an extract of a circuit configuration required for the first operation stage of the read operation of the neural network operation circuit according to the first embodiment.

[0058] Fig.16 This is a diagram for explaining calculation required for calculating a carry in a read operation of the word line selection circuit of the neural network operation circuit according to the first embodiment.

[0059] Fig.17 It is used to find Fig.16 Flowchart of the binary search algorithm of the word line selection circuit for the change point QLdiff shown.

[0060] Fig.18 is from Figure 1 This diagram shows an extract of a circuit configuration required for the second operation stage of the read operation of the neural network operation circuit according to the first embodiment.

[0061] Fig.19 A diagram is a schematic diagram for explaining a general neural network calculation model.

[0062] Fig. 20 It is a diagram showing the structure of a parallel neural network circuit according to the second embodiment.

[0063] Fig.21 This is a diagram showing a configuration in which only a readout determination circuit is made common among the parallelized neural network circuits of the second embodiment.

[0064] Fig. 22This is a diagram showing a configuration in which an additional region and a readout determination circuit in a parallel neural network circuit are made common according to the second embodiment.

[0065] Fig.23 It is a diagram showing the structure of a calculation circuit unit for expressing weight coefficients using six cells according to the third embodiment.

[0066] Fig.24 This is a structural diagram of a neural network operation circuit composed of an operation circuit unit that uses 6 cells to express weight coefficients using the third embodiment.

[0067] Fig.25 This is a flowchart of simultaneous reading of upper cells and lower cells according to the fourth embodiment.

[0068] Fig.26 This is a diagram showing a table indicating output determinism in simultaneous reading of high-order cells and low-order cells according to the fourth embodiment.

[0069] Fig. 27 This is a diagram showing a table indicating output determinism in simultaneous reading of high-order cells and low-order cells according to the fourth embodiment.

[0070] Fig.28 It is a configuration diagram of a neural network operation circuit corresponding to unsigned weight coefficients according to a modification of the first embodiment. DETAILED DESCRIPTION

[0071] Hereinafter, embodiments of the present disclosure will be described with reference to the drawings.

[0072] (Basic data for this disclosure)

[0073] First, experimental data related to a representative structure of a neural network operation circuit serving as a basis for the present disclosure will be described.

[0074] Fig. 8A is a diagram for explaining the structure of a conventional neural network operation circuit. More specifically, Fig. 8A (a) shows the structure of a conventional neural network computing circuit. Fig. 8A (b) means Fig. 8A The setting conditions in the structure of (a). Figure 8B Yes means Fig. 8A The data on the relationship between the arithmetic sum of the cell currents in the structure and the measured total current. That is, Figure 8B is Fig. 8A In the structure shown, various currents are set for each cell, and the relationship between the arithmetic sum of the cell currents for various input selections and the total current actually flowing through the bit line BL is plotted.

[0075] from Figure 8B As can be seen from the graph shown, as the arithmetic sum of the cell currents of the target cells to be combined increases, the increase in the total current on the bit line becomes gentle and saturated. This saturation characteristic is caused by the clamping of the current characteristics of the bit line selection switch SWBL and the source line selection switch SWSL that select the bit line BL or the source line SL, the driving transistor used for connecting the power supply (Vdd) and the ground (Vss), namely the SL grounding transistor TDSL and the BL-Vdd connection transistor TDBL. In this way, the characteristic that the allowable current of the bit line is clamped as the total current increases is formulated as a problem of deterioration in the linearity of the operation from the perspective of product-sum operation. At this time, the maximum current of the cell current, namely the settable upper limit of the cell current Imax0, is 50μA. This Imax0 is the original dynamic range of the memory cell, that is, the actual maximum value of the cell current (the settable upper limit of the cell current). Therefore, in Fig. 8A In the existing neural network operation circuit shown in (a), as Fig. 8A As shown in (b), the upper limit Imax0 of the cell current can be set to 50μA, the number of elements of the non-volatile resistance change element is 1 cell for each symbol, the number of quantization bits is 7, so the quantization level Q is 0≤Q≤127, and the cell current of each quantization unit is Imax / 127.

[0076] In view of this problem, the characteristics when the maximum current of the cell current is reduced are shown. Fig. 9 is a diagram for explaining the case where the maximum current of the cell current is reduced. More specifically, Fig. 9 (a) means that Fig. 8A (a) In the product-sum operation circuit with the same structure as Fig. 8A (b) the same existing conditions 1( Fig. 9 (b)) and the existing condition 2 when the cell current is reduced to 1 / 3 ( Fig. 9 As a result, it is considered that the total current assumed in the existing condition 2 is as follows Fig. 9 As shown in the graph (a) of FIG. 1 , the current amount is reduced as a whole, so that it can be used in a region where the linearity is improved. On the other hand, there is a problem from the viewpoint of the controllability of the current.

[0077] The weight coefficient of the neural network has a simulated real value greater than 0 and less than 1 in the mathematical model, but in the neural network operation circuit, when it is implemented on the circuit, it is grouped into discrete levels through appropriate quantization from the perspective of convenience. In this data, the absolute value is represented by 7 bits and 1 bit is used as the coding bit, so that the weight coefficient is represented as an 8-bit signed integer. That is, the quantization order (number of quantization) is 127, and the current obtained by dividing the cell current upper limit Imax by 127 is called the cell current per quantization unit (refer to Fig. 9 (b)).

[0078] The optimal number of quantization bits varies depending on the accuracy of the product-sum operation to be calculated, but from the perspective of the operational stability of the neural network operation circuit, it is preferable that the deviation of the cell current belonging to a certain quantization level be separated from the deviation of the cell current belonging to a different quantization level. As the main cause of the deviation in the cell current, various factors such as the characteristics of the nonvolatile resistance variable element, the circuit accuracy of the current writing, and the Vth deviation of the selection transistor can be considered, but if Fig. 9 If the circuit operation is simply performed in the region where the overall cell current upper limit Imax is low as in the conventional condition 2 shown in (c), the influence of these deviations becomes even greater. Fig.10 The distribution of the cell current belonging to two orders is generated by simulation. The horizontal axis represents the current value, and the vertical axis represents the normal distribution point (deviation from the average value). In more detail, Fig.10 (a) and (b) respectively represent Fig. 9 The following is a graph of the results obtained by simulating the overlap of distributions between different quantization steps under the existing conditions 1 and 2 in FIG. Although it is a simple simulation, it can be easily understood that the separation of the distribution becomes difficult by uniformly reducing the cell current upper limit Imax under the state of constant deviation ( Fig.10 (b)).

[0079] Next, in response to these problems, an embodiment of the present disclosure will be described in which the maximum current of the cell current is reduced while ensuring the cell current per quantization unit.

[0080] (First Embodiment)

[0081] Fig.11A 1 is a diagram for explaining the structure of an operation circuit unit for expressing a weight coefficient in the neural network operation circuit of the first embodiment. More specifically, Fig.11A (a) shows the structure of a calculation circuit unit for expressing a weight coefficient. Fig.11A (b) means Fig.11A The setting conditions of the cell in (a).

[0082] like Fig.11A As shown in (a), the operation circuit unit of this embodiment is an operation circuit unit that maintains a weight coefficient having a positive or negative value corresponding to input data that can selectively take a first logic value and a second logic value, and provides a current corresponding to the product of the input data and the weight coefficient, and has a word line WL1, a first data line (source line SLPU), a second data line (bit line BLPU), a third data line (source line SLPL), a fourth data line (bit line BLPL), a fifth data line (source line SLNU), a sixth data line (bit line BLNU), a seventh data line (source line SLNL), and an eighth data line (bit line BLNL), a first nonvolatile semiconductor storage element (nonvolatile resistance change element RPU1), a second nonvolatile semiconductor storage element (nonvolatile resistance change element RPL1), a third nonvolatile semiconductor storage element (nonvolatile resistance change element RNU1), and a fourth nonvolatile semiconductor storage element (nonvolatile resistance change element RNL1), a first selection transistor TPU1, a second selection transistor TPL1, a third selection transistor TNU1, and a fourth selection transistor TNL1.

[0083] The gates of the first selection transistor TPU1, the second selection transistor TPL1, the third selection transistor TNU1 and the fourth selection transistor TNL1 are connected to the word line WL1, one end of the first nonvolatile semiconductor storage element (nonvolatile resistance change element RPU1) is connected to the drain terminal of the first selection transistor TPU1, one end of the second nonvolatile semiconductor storage element (nonvolatile resistance change element RPL1) is connected to the drain terminal of the second selection transistor TPL1, one end of the third nonvolatile semiconductor storage element (nonvolatile resistance change element RNU1) is connected to the drain terminal of the third selection transistor TNU1, and one end of the fourth nonvolatile semiconductor storage element (nonvolatile resistance change element RNL1) is connected to the drain terminal of the fourth selection transistor TNL1. The first data line (source line SLPU) is connected to the source terminal of the first selection transistor TPU1, the third data line (source line SLPL) is connected to the source terminal of the second selection transistor TPL1, the fifth data line (source line SLNU) is connected to the source terminal of the third selection transistor TNU1, and the seventh data line (source line SLNL) is connected to the source terminal of the fourth selection transistor TNL1. The second data line (bit line BLPU) is connected to the other end of the first nonvolatile semiconductor memory element (nonvolatile resistance change element RPU1), the fourth data line (bit line BLPL) is connected to the other end of the second nonvolatile semiconductor memory element (nonvolatile resistance change element RPL1), the sixth data line (bit line BLNU) is connected to the other end of the third nonvolatile semiconductor memory element (nonvolatile resistance change element RNU1), and the eighth data line (bit line BLNL) is connected to the other end of the fourth nonvolatile semiconductor memory element (nonvolatile resistance change element RNL1).

[0084] The first nonvolatile semiconductor memory element (nonvolatile resistance change element RPU1) maintains the information of the positive weight coefficient as a resistance value with a different load compared to the second nonvolatile semiconductor memory element (nonvolatile resistance change element RPL1), and the third nonvolatile semiconductor memory element (nonvolatile resistance change element RNU1) maintains the information of the negative weight coefficient as a resistance value with a different load compared to the fourth nonvolatile semiconductor memory element (nonvolatile resistance change element RNL1).

[0085] The operation circuit unit grounds the first data line (source line SLPU), the third data line (source line SLPL), the fifth data line (source line SLNU) and the seventh data line (source line SLNL), and applies voltage to the second data line (bit line BLPU), the fourth data line (bit line BLPL), the sixth data line (bit line BLNU) and the eighth data line (bit line BLNL), thereby providing a current corresponding to the product corresponding to the first logic value when the word line WL1 is not selected, and providing a current corresponding to the product corresponding to the second logic value when the word line WL1 is selected, based on the current flowing in the second data line (bit line BLPU), the fourth data line (bit line BLPL), the sixth data line (bit line BLNU) and the eighth data line (bit line BLNL).

[0086] The first nonvolatile semiconductor storage element (nonvolatile resistance change element RPU1) stores information on the high-order bits of the absolute value of the positive weight coefficient, the second nonvolatile semiconductor storage element (nonvolatile resistance change element RPL1) stores information on the low-order bits of the absolute value of the positive weight coefficient, the third nonvolatile semiconductor storage element (nonvolatile resistance change element RNU1) stores information on the high-order bits of the absolute value of the negative weight coefficient, and the fourth nonvolatile semiconductor storage element (nonvolatile resistance change element RNL1) stores information on the low-order bits of the absolute value of the negative weight coefficient.

[0087] In more detail, Fig.11A An operation circuit unit shown in (a) has 4 cells consisting of selection transistors and non-volatile resistance change elements. According to the sign of the weight coefficient, it is allocated to 2 cells each. For positive weight coefficients, CellPU and CellPL are used, and for negative weight coefficients, CellNU and CellNL are used. Each symbol has 2 cells. On the positive side, CellPU is called a high-order cell and CellPL is called a low-order cell. After dividing into 2 cells for each symbol, the method of setting the absolute value of the weight coefficient as the current level of the high-order cell and the low-order cell is explained.

[0088] First, the cell current upper limit Imax of each cell current is determined to be within a range that is not affected by the clamping current when the sum is calculated. In the experimental data described above, by setting the cell current upper limit Imax to about Imax0 / 3, the influence of clamping can be reduced, so this page is explained based on this (refer to Fig.11A (b)).

[0089] When the number of quantization bits to be expressed is set to 7 bits, half of the number of bits, that is, the quantization order, is reduced to the square root level for current setting. That is, the lower 4 bits of the quantized weight are allocated to the lower cell CellPL, and the upper 3 bits are allocated to the higher cell CellPU. The advantages of this allocation are as follows: Fig.11A As shown in table (b), by reducing the number of quantization bits, the cell current per quantization unit can be increased.

[0090] More generally, when considering the relationship between the number of quantization bits B and the rate of decrease R of the upper cell current limit Imax, the quantization order 2^B that is intended to be expressed is divided into 2^(B / 2) by the upper and lower bits. Here, 2^B means 2 to the power of B. In addition, the division is rounded up to an integer value. Therefore, the rate of increase or decrease of the cell current per quantization unit Runit is

[0091] Runit=R×(2^B-1) / (2^(B / 2)-1)

[0092] If the current reduction rate R can be set so that Runit exceeds 1, the overall current can be reduced without reducing the cell current per quantized unit. Dividing the bit number B into two has the effect of reducing the overall current to the square root level. From the perspective of the amount of calculation, the effect is greater than the reduction rate R of a constant multiple, and it can be expected that Runit can be set relatively easily. In the above description.

[0093] Runit=(1 / 3)×(2^7-1) / (2^4-1)=2.67

[0094] Therefore, while increasing the cell current per quantization unit by 2.67 times, the total current flowing through the bit line in the product-sum operation can be suppressed to 1 / 3.

[0095] By forming an operation circuit unit with such four cells, the contradictory issues of low current and maintaining accuracy can be taken into account. On the other hand, when it is installed in a neural network operation circuit, the sum-of-product operations are performed on each of the high-order and low-order cells of each symbol. Therefore, in order to obtain the final output, the operation results of the high-order cell and the operation results of the low-order cell need to be combined to determine the final output.

[0096] Fig. 11B This is a diagram showing a comparison between the prior art and the implementation method for the setting conditions and characteristics of the cell. Here, the column "Existing Condition 1" in the column "Existing Condition" is equivalent to Fig. 9 The prior art shown in (b) of the present invention is equivalent to the column of "Existing Condition 2" Fig. 9 The prior art shown in (c) is equivalent to the column of "Implementation Method" Fig.11A Implementation method shown in (b).

[0097] As shown in this figure, the "cell current upper limit Imax of the element" is Imax0 in the "existing condition 1", Imax0 / 3 in the "existing condition 2", and Imax0 / 3 in the "implementation method", so the "linearity" of the total current is "deteriorated" in the "existing condition 1", "improved" in the "existing condition 2", and "improved" in the "implementation method".

[0098] In addition, the "cell current per quantization unit" is Imax0 / 127 in the "existing condition 1", is Imax0 / 127 / 3 in the "existing condition 2", and is Imax0 / 15 / 3 in the "implementation method". Therefore, if the "existing condition 1" is set to the "baseline value", the "current accuracy" of the cell current is "deteriorated" in the "existing condition 2" and is "normal" or "improved" in the "implementation method".

[0099] Thus, in the "prior art", regarding the amount of current in the cell, there are two contradictory issues: the allowable amount of current flowing through the bit line of the total current (linearity of the total current) and the maintenance of current accuracy at low current. However, according to the operational circuit unit of the implementation method, it is possible to take into account both the maintenance of current accuracy and the reduction of the total current.

[0100] As an example of a method for driving a neural network operation circuit, Fig. 11C As shown, an algorithm for dividing the weight coefficient into high-order bits and low-order bits is shown. Fig. 11C The flowchart of the algorithm for dividing the weight coefficient into high-order bits and low-order bits is shown. First, the absolute values ​​of the weight coefficients of the plurality of operation circuit units constituting the neural network operation circuit are divided by the maximum value of the weight coefficients to be normalized (S1), and each normalized weight coefficient is quantized according to a predetermined number of bits (e.g., 7 bits) (S2). Then, the quantized information is divided into high-order bits (e.g., 3 high-order bits) and low-order bits (e.g., 4 low-order bits) (S3), and the current amount of the current flowing through the non-volatile semiconductor storage element corresponding to the high-order bits constituting the plurality of operation circuit units is determined according to the divided high-order bits and low-order bits (e.g., the upper limit Imax of the cell current is set to about Imax0 / 3), and the current amount of the current flowing through the non-volatile semiconductor storage element corresponding to the low-order bits is determined (e.g., the upper limit Imax of the cell current is set to about Imax0 / 3) (S4).

[0101] Next, use Figure 1 The structure of a neural network operation circuit using this operation circuit unit is described. Figure 1 Indicates a specific circuit structure. Figure 1The neural network operation circuit of the first embodiment is a structural diagram of the neural network operation circuit. The neural network operation circuit comprises: a main area PUs, which is composed of a plurality of operation circuit units PUn; a first additional area PCPLs, a second additional area PCPUs, a third additional area PCNLs, and a fourth additional area PCNUs, which are composed of non-volatile semiconductor memory elements and selection transistors having the same structure as the non-volatile semiconductor memory elements used in the plurality of operation circuit units PUn; a first control circuit (positive side comparison control circuit C21) for selecting a word line WL1 connected to the gate of the selection transistor of the first additional area PCPLs; a second control circuit (positive side carry control circuit C22) for selecting a word line WL1 connected to the gate of the selection transistor of the second additional area PCPUs; a third control circuit (negative side comparison control circuit C23) for selecting a word line WL1 connected to the gate of the selection transistor of the third additional area The word line WL1 is connected to the gate of the selection transistor of the domain PCNLs; the fourth control circuit (negative side carry control circuit C24) is used to select the word line WL1 connected to the gate of the selection transistor of the fourth additional region PCNUs; the first node (the terminal connected to the source line SLPU), the second node (the terminal connected to the bit line BLPU), the third node (the terminal connected to the source line SLPL), the fourth node (the terminal connected to the bit line BLPL), the fifth node (the terminal connected to the source line SLNU), the sixth node (the terminal connected to the bit line BLNU), the seventh node (the terminal connected to the source line SLNL), and the eighth node (the terminal connected to the bit line BLNL); and the first determination circuit (the high-order read determination circuit C4), and the second determination circuit (the low-order read determination circuit C3).

[0102] The first data line (source line SLPU) possessed by each operation circuit unit PUn in the main area PUs is connected to the first node (the terminal connected to the source line SLPU), the second data line (bit line BLPU) possessed by each operation circuit unit PUn in the main area PUs is connected to the second node (the terminal connected to the bit line BLPU), and the third data line (source line SLPL) possessed by each operation circuit unit PUn in the main area PUs is connected to the third node (the terminal connected to the source line SLPL). The fourth data line (bit line BLPL) possessed by each operation circuit unit PUn in the main area PUs is connected to the fourth node (terminal connected to the bit line BLPL), the fifth data line (source line SLNU) possessed by each operation circuit unit PUn in the main area PUs is connected to the fifth node (terminal connected to the source line SLNU), the sixth data line (bit line BLNU) possessed by each operation circuit unit PUn in the main area PUs is connected to the sixth node (terminal connected to the bit line BLNU), the seventh data line (source line SLNL) possessed by each operation circuit unit PUn in the main area PUs is connected to the seventh node (terminal connected to the source line SLNL), and the eighth data line (bit line BLNL) possessed by each operation circuit unit PUn in the main area PUs is connected to the eighth node (terminal connected to the bit line BLNL). The first determination circuit (high-order read determination circuit C4) is connected to the second node and the sixth node (terminals connected to the bit line BLNU), the second determination circuit (low-order read determination circuit C3) is connected to the fourth node and the eighth node (terminals connected to the bit line BLNL), the first control circuit (positive side comparison control circuit C21) is connected to the word line WL1 of the first additional area PCPLs, the second control circuit (positive side carry control circuit C22) is connected to the word line WL1 of the second additional area PCPUs, the third control circuit (negative side comparison control circuit C23) is connected to the word line WL1 of the third additional area PCNLs, and the fourth control circuit (negative side carry control circuit C24) is connected to the word line WL1 of the fourth additional area PCNUs, and is input with binary data corresponding to the plurality of word lines WL1 of the main area PUs.

[0103] The neural network operation circuit grounds the third node (the terminal connected to the source line SLPL) and the seventh node (the terminal connected to the source line SLNL), applies voltage to the fourth node (the terminal connected to the bit line BLPL) and the eighth node (the terminal connected to the bit line BLNL), respectively, and controls the first control circuit (positive side comparison control circuit C21), the third control circuit (negative side comparison control circuit C23) and the second determination circuit (low-bit readout determination circuit C3) based on the current flowing in the fourth node and the eighth node, thereby determining the low-bit operation result. The operation result on the low bit determines the control of the second control circuit (positive side carry control circuit C22) and the fourth control circuit (negative side carry control circuit C24), the first node (the terminal connected to the source line SLPU) and the fifth node (the terminal connected to the source line SLNU) are grounded, and voltages are applied to the second node (the terminal connected to the bit line BLPU) and the sixth node (the terminal connected to the bit line BLNU), respectively, so that the first determination circuit (high bit read determination circuit C4) is used to output the operation result equivalent to the sum of the products of each of the multiple operation circuit units PUn.

[0104] The first additional area PCPLs, the second additional area PCPUs, the third additional area PCNLs and the fourth additional area PCNUs respectively control the first control circuit (positive side comparison control circuit C21), the second control circuit (positive side carry control circuit C22), the third control circuit (negative side comparison control circuit C23) and the fourth control circuit (negative side carry control circuit C24) to allow the desired amount of current to flow through the first node (the terminal connected to the source line SLPU), the third node (the terminal connected to the source line SLPL), the fifth node (the terminal connected to the source line SLNU) and the seventh node (the terminal connected to the source line SLNL).

[0105] In more detail, the operation circuit units PU1, ..., PUn composed of four cells set the current for each cell in a manner representing the weight coefficient according to the method. The operation circuit units PU1, ..., PUn are connected to the common source lines SLPU, SLPL, SLNU, SLNL through the common bit lines BLPU, BLPL, BLNU, BLNL, respectively, so that the positive side and the negative side have the same relationship with the high-order cell and the low-order cell of each symbol. The word line selection circuit C1 controls the word lines WL1, ..., WLn according to the input vector x = (x1, x2, ..., xn) of the neural network.

[0106] The DIS signal and source line selection transistors DT1, ..., DT4 in the figure control the connection of the source lines SLPU, SLPL, SLNU, and SLNL to the ground (Vss). During the read operation, the DIS signal is activated and functions as the ground for the current applied from the read determination circuit (low-order read determination circuit C3 and high-order read determination circuit C4). The low-order read determination circuit C3 and the high-order read determination circuit C4 include: a driving circuit that applies a read current to the connected bit line; and a circuit that determines the size of the current of the connected bit line pair. Various structures can be considered for the read determination circuit, but an example of a structure with the minimum required function will be described later.

[0107] In addition to the main area PUs composed of the operation circuit units representing the weight coefficients, the present neural network operation circuit also has additional areas PCPLs and PCNLs composed of memory cells for comparing the product-sum operation results of the lower cells, and additional areas PCPUs and PCNUs for adding the carry of the product-sum operation results of the lower cells to the higher cells.

[0108] A word line selection circuit C2 is provided for controlling these additional areas. The word line selection circuit C2 includes a positive side carry control circuit C22, a positive side comparison control circuit C21, a negative side carry control circuit C24, and a negative side comparison control circuit C23 as a selection circuit for controlling the selection and non-selection of the memory cells of the additional areas PCPUs, PCPLs, PCNUs, and PCNLs; and a logic circuit block (not shown), which, in particular, calculates a carry to an upper cell based on the calculation result of the lower cell in conjunction with the lower readout determination circuit C3.

[0109] Fig.12 Show Figure 1 A configuration example of the readout determination circuit (lower-order readout determination circuit C3 and upper-order readout determination circuit C4) in FIG. Fig.121 is a circuit diagram showing an example of a readout determination circuit (low-bit readout determination circuit C3 and high-bit readout determination circuit C4). The bit line nodes on the positive and negative sides are connected to the bit lines BLP and BLN, which are inputs. The readout drive circuit has a readout drive circuit; a bit line selection switch SWBLP and SWBLN for selecting the bit line; and a wiring for transmitting the ColSel signal as its selection signal. The readout drive circuit is composed of the same readout power supply Vdd, readout power supply connection transistors TLoadP and TLoadN that connect Vdd to each bit line, and a wiring for transmitting the XRD signal that becomes a readout start signal. By setting the ColSel signal to H, the XRD signal is set to L in the state where the bit line pair is selected, thereby applying a read current to the bit line pair. The amount of current flowing through the bit lines BLP and BLN at this time is determined by using a differential sense amplifier Comp, and the result is used as the output Yout of the readout determination circuit.

[0110] about Figure 1 The additional regions PCPUs, PCPLs, PCNUs, PCNLs in the example above have the same structure. Fig.13 A preferred implementation of each cell in the additional area is described. Fig.13 1 is a diagram for explaining the structure of the additional area of ​​the first embodiment. Fig.13 (a) is a circuit diagram showing the structure of the additional region of the first embodiment, Fig.13 (b) shows Fig.13 (a) is a table of conditions that can be set for a cell, Fig.13 (c) shows Fig.13 An example of a cell current in an additional area of ​​(a). The additional area is composed of a plurality of cells, and each cell is preferably composed of the same cell structure as the main area, that is, composed of the same non-volatile resistance change element as the selection transistor of the same size. The cell current IC1, ..., ICm of each cell CellC1, ..., CellCm is pre-set to a specified value. The current setting method preferably satisfies the following conditions by a selection method for selecting word lines CW1, ..., CWm. That is, when the maximum value of the total of the step values ​​added in the product-sum operation of the main area connected to the same bit line BL is set to T, the step values ​​of each cell CellC1, ..., CellCm of the additional area are set in a manner that can achieve a step value from 0 to T by appropriately selecting the word lines CW1, ..., CWm.

[0111] As an example of a method for setting conditions for realizing the cell current for each of the above cells, Fig.13 The setting method is shown in (c). Fig.13As shown in (b), in this embodiment, the upper limit Imax of the cell current in the main area is reduced to Imax0 / 3, and the quantization order is divided into 15. Therefore, the cell current in the main area is the cell current Iunit of each quantization unit.

[0112] Iunit=Imax0 / 3 / 15

[0113] Furthermore, the current of the memory cell is set with a current value that is an integer multiple of the cell current Iunit per quantization unit (refer to Fig.13 (c)). The cells of the additional area set the current in such a way that the quantization step values ​​become 1, 2, 4, 8 and 2 powers, based on the cell current Iunit of each quantization unit. As a characteristic of the non-volatile resistance change element monomer, in view of the fact that the cell current upper limit Imax can be set, in the embodiment, the cell current upper limit Imax is not exceeded until Iunit×32, so 32 can be used as the set step value of the additional area. Afterwards, a plurality of cells with a settable step value upper limit of 32 in the step value set to the power of 2 are prepared. The desired number of memory cells m is preferably determined by fully selecting the additional area to exceed the maximum value T of the total of the step values. By setting in this way, the step value from 0 to T can be achieved by appropriately selecting the word lines CW1, ..., CWm.

[0114] In addition, regarding the additional areas PCPUs, PCPLs, PCNUs, and PCNLs, each cell preferably uses the same structure as the cell of the main area, but as long as it is a structure that can achieve the same effect, as a non-volatile semiconductor storage element, it can also be composed of different fixed resistance elements or non-volatile resistance change elements. On the other hand, as an advantage of being the same cell as the main area, it can be cited that it is easy to make the characteristics of the additional area follow when the cell current Iunit of each quantization unit or the cell current upper limit Imax is changed. In particular, when an AD conversion circuit is set externally as in patent document 3, if it is assumed that the cell current Iunit of each quantization unit changes, a higher precision AD conversion circuit and operation are required, and an increase in the circuit scale can be foreseen. In addition, there are many devices in which non-volatile resistance change elements show some resistance changes over time due to long-term storage, but in contrast, the use of the same cell structure can also suppress the change of relative cell current differences. Therefore, it is believed that compared with the formation of additional areas based on other external structures and the provision of AD conversion circuits, a structure based on the same element is preferred.

[0115] Fig.14The flowchart of the operation of the neural network operation circuit of the present embodiment (i.e., the driving method of the neural network operation circuit) is shown. In the neural network operation circuit of the present embodiment, two stages of operation (operation stage STEP1 and operation stage STEP2) are required to complete a product-sum operation. That is, the operation is performed through the operation stage STEP1 and the operation stage STEP2. The operation stage STEP1 implements the product-sum operation of the low-order cell, compares the total current of the positive-side low-order cell with the current of the negative-side low-order cell, and calculates the current difference as the step value through the additional area and the selection method on the low-order cell side; the operation stage STEP2 calculates the carry of the step value according to the step value calculated in the operation stage STEP1, connects the carry amount as a parallel cell current through the additional area and the selection method on the high-order cell side, and performs the product-sum operation of the high-order cell. Afterwards, in the readout judgment (operation stage STEP3), the comparison result of the high-order cell is output as the final product-sum operation result of the neural network operation circuit, and the comparison result of the low-order cell is adopted when the comparison results of the high-order cells are equal.

[0116] First, the first stage of action STEP1 is described in detail. Fig.14 As shown, in the action phase STEP1, first, data is input from the word line selection circuit C1. This process is equivalent to the process of selecting the word line of the main area for the input signal given to the neural network operation circuit. Next, by the control of the positive side comparison control circuit C21 or the negative side comparison control circuit C23, the memory cell of the additional area PCPLs or PCNLs is additionally selected so that the total current of the positive side low bit is balanced with the total current of the negative side low bit. This process is equivalent to the process of determining the operation result of the low bit by controlling the first control circuit, the third control circuit and the second determination circuit based on the current flowing in the fourth node and the eighth node.

[0117] use Fig.15 and Fig.16 , describing in detail the circuit action in the action phase STEP1. Fig.15 is from Figure 1The diagram of the circuit structure required for the action stage STEP1 of the neural network operation circuit of the first embodiment is extracted. In the action stage STEP1, operations are performed by the lower cells on the positive and negative sides of the main area, the bit lines BL identical to the lower cells of these main areas, the additional areas PCPLs and PCNLs connected to the source line SL, the low-order read determination circuit C3 connected to the bit line pair (BLPL, BLNL), and the positive side comparison control circuit C21 and the negative side comparison control circuit C23 that control the cell selection of the additional areas PCPLs and PCNLs. First, the word line selection circuit C1 selects the word line corresponding to the input vector to the neural network, and the read is performed by the low-order read determination circuit C3. As a result, in the bit lines BLPL and BLNL of the lower cells, the cell currents IPL1, ..., IPLAn or the cell currents INL1, ..., INLn are respectively summed. The total current on the positive side is set to IsumP, and the total current on the negative side is set to IsumN. That is,

[0118] IsumP=ΣIPLk(k=1,···,n)

[0119] IsumN=ΣINLk(k=1,···,n)

[0120] Here, the low-order readout determination circuit C3 compares the magnitudes of IsumP and IsumN. The word line selection circuit C2 that obtains the comparison result selects the positive side comparison control circuit C21 when IsumP is less than IsumN, and selects the negative side comparison control circuit C23 when IsumN is less than IsumP. For ease of explanation, it is assumed here that IsumP is less than IsumN and the positive side comparison control circuit C21 is selected. According to the description of the preferred embodiment of the additional area, if the positive side comparison control circuit C21 is used appropriately, the total current ICPLs flowing in the cell of the additional area PCPLs can be controlled. Next, a method of calculating the current difference between IsumP and IsumN as a step value using this point is described.

[0121] use Fig.16 An embodiment of a method of calculating the current difference between IsumP and IsumN as a step value will be described. Fig.16 1 is a diagram for explaining the calculation required for calculating the carry in the read operation of the word line selection circuit C2 of the neural network operation circuit of the first embodiment. More specifically, Fig.16(a) shows a graph in which the horizontal axis is set to the range of the step value that can be selected by the positive side comparison control circuit C21, and the vertical axis is set to the total current ICPLs of the additional area PCPLs flowing at this time. In addition, regarding IsumP and IsumN, they are also recorded in the graph as fixed regardless of the selection of the positive side comparison control circuit C21. The transition of IsumP+ICPLs calculated by these is also recorded in the graph. Fig.16 (b) is a graph in which the horizontal axis represents the range of gradation values ​​selectable by the positive side comparison control circuit C21 and the vertical axis represents the output of the positive side comparison control circuit C21.

[0122] from Fig.16 From (a) and (b), it can be seen that the value of ICPLs+IsumP is reversed with IsumN at a certain level value QLdiff. Fig.16 As shown in (b), the step value at which the magnitude relationship is reversed is obtained as the switching point of the output of the positive side comparison control circuit C21. Therefore, the word line selection circuit C2 can determine the point where ICPLs+IsumP and IsumN are balanced by searching for the point at which the output of the positive side comparison control circuit C21 switches while repeatedly making judgments through the control of the total current ICPLs. This can be done using a linear search that makes judgments one by one while increasing the total current ICPLs in sequence, or a binary search using a binary method as a more time-efficient method.

[0123] Binary search is a well-known technique. Fig.17 An example of an algorithm in this embodiment is shown. Fig.17 It is used to find Fig.16Flowchart of the binary search algorithm of the change point QLdiff performed by the word line selection circuit C2 shown in FIG. 1. First, the word line selection circuit C2 initializes the variable Lhs=0 and the variable Rhs=T (S10). Next, the word line selection circuit C2 determines whether (Rhs-Lhs) is greater than 1 (S11). If it is greater ("true" in S11), the binary value (Rhs-Lhs) / 2 of the variable Lhs and the variable Rhs is set as the variable mid (S13). In addition, the calculation of the binary value is performed by integer operation (discarding decimals). Next, the positive side comparison control circuit C21 selects the value of the variable mid currently calculated (step value mid) as the step value (S14). Then, the low-order read determination circuit C3 compares the sizes of (ICPLs+IsumP corresponding to the step value mid) and IsumN (S15). Based on the result, the word line selection circuit C2 sets the value of the variable mid to the variable Lhs when (ICPLs+IsumP corresponding to the step value mid) < IsumN. Otherwise, the value of the variable mid is set to the variable Rhs (S16), and steps S11 to S16 are repeated again.

[0124] In step S11 , when it is determined that (Rhs−Lhs) is not greater than 1 (“false” in S11 ), the word line selection circuit C2 determines the value of the variable Lhs as the change point QLdiff ( S12 ).

[0125] Next, Fig.14 The second stage of the flow chart STEP2 is described in detail. Fig.14 As shown, in the action phase STEP2, the carry amount is calculated based on the result of the additional area selection in the action phase STEP1 in which data is input from the word line selection circuit C1, and the positive side carry control circuit C22 or the negative side carry control circuit C24 is appropriately selected, so that the carry amount is connected in parallel to the high-order cell on the positive side or the negative side as the cell current. This processing is equivalent to the step of determining the control of the second control circuit and the fourth control circuit based on the low-order operation result.

[0126] use Fig.18 , describing in detail the circuit action of the action phase STEP2. Fig.18 is from Figure 1The figure shows the circuit structure required in the action stage STEP2 of the read action of the neural network operation circuit of the first embodiment. In the action stage STEP2, the operation is performed by the upper cells on the positive and negative sides of the main area, the bit lines BL identical to the upper cells of the main area, the additional areas PCPUs and PCNUs connected to the source line SL, the upper read determination circuit C4 connected to the bit line pair (BLPU, BLNU), and the positive side carry control circuit C22 and the negative side carry control circuit C24 that control the cell selection of the additional areas PCPUs and PCNUs.

[0127] In the second action stage STEP2, the gradation value of the carry amount is calculated based on the differential gradation value QLdiff of the product-sum operation of the low-order cell obtained in the first action stage STEP1, and is read out in a state where the gradation value is attached. Now, in the present embodiment, each symbol 2 cell is used to implement the expression of the quantization gradation of the weight coefficient for each cell. In particular, the cardinality of the bits that will become the high-order bits and the low-order bits is set to 16. Therefore, the quotient of the gradation value QLdiff of the low-order current difference divided by the cardinality (discarding the decimal) becomes the carry amount to be added to the high-order cell. Division based on 16 can be implemented in a binary logic circuit by a simple bit shift operation, so it can be easily installed using a simple logic circuit. The gradation value Qcarry of the carry amount is obtained by

[0128] Qcarry = QLdiff / 16 (division operation is integer division, the decimal is discarded)

[0129] In this description, in the comparison of the total current of the lower bits, the current on the negative side is larger, so the cell selection corresponding to the gradation value Qcarry is selected by controlling the negative side carry control circuit C24 of the negative side additional area PCNUs.

[0130] Finally, if Fig.14 As shown in the third stage of the flowchart of the operation stage STEP3, the total current of the positive side high bits and the total current of the negative side high bits are compared by the high bit read determination circuit C4 in the state of connecting the carry amount of the operation stage STEP2, and the comparison and determination result of the high bit read determination circuit is used as the final output. When the high bits are compared equal, the low bit comparison result is used as the final output. This process is equivalent to the process of outputting the calculation result of the first determination circuit used for the control of the second control circuit and the fourth control circuit and the selection of the word line of the main area.

[0131] That is, in the state where the carry amount of the additional area PCNUs on the negative side is taken as the cell current and is calculated in parallel with the high-order cell as in the operation in the operation stage STEP2, the word line corresponding to the input vector to the neural network is selected by the word line selection circuit C1, and the reading is performed by the high-order read determination circuit C4. As the final output result, the comparison determination result of the high-order read determination circuit C4 is used as the final output, but when the high-order comparison is equal, the comparison result of the low-order read determination circuit C3 is used as the final output.

[0132] In the description so far, it is described that the inputs are determined to be equal by the readout determination circuit, but generally, in the current comparison determination using the differential current type sense amplifier, etc., a logical value of 0 or 1 is usually output according to the size of the input. For inputs where the currents are equal or the difference is very small, it is well known that there is an output uncertainty area called a blind zone, and it is not common to expect the action of determining that the inputs are equal as a comparison function in the differential type sense amplifier. However, in the case of the present embodiment in which the current comparison is performed in a quantized state, for example, a method equivalent to a residual reading of a computer ε can be used as an equal sign determination, such as determining whether the difference in the inputs is sufficiently close to 0 than the resolution of the quantization step, etc., which is equivalent to a residual reading of a computer ε, etc.

[0133] By using the above-described neural network operation circuit and operation method, it is possible to reduce the total current of the product-sum operation of the current addition method in the bit line and ensure the cell current for each quantization unit.

[0134] As described above, the arithmetic circuit unit of the present embodiment is an arithmetic circuit unit that maintains a weight coefficient having a positive or negative value corresponding to input data that can selectively take a first logic value and a second logic value, and provides a current corresponding to the product of the input data and the weight coefficient, and comprises: a word line; a first data line, a second data line, a third data line, a fourth data line, a fifth data line, a sixth data line, a seventh data line, and an eighth data line; a first non-volatile semiconductor memory element, a second non-volatile semiconductor memory element, a third non-volatile semiconductor memory element, and a fourth non-volatile semiconductor memory element; and a first selection transistor, a second selection transistor, a third selection transistor and a fourth selection transistor, the gates of the first selection transistor, the second selection transistor, the third selection transistor and the fourth selection transistor are connected to the word line, one end of the first nonvolatile semiconductor storage element is connected to the drain terminal of the first selection transistor, one end of the second nonvolatile semiconductor storage element is connected to the drain terminal of the second selection transistor, one end of the third nonvolatile semiconductor storage element is connected to the drain terminal of the third selection transistor, one end of the fourth nonvolatile semiconductor storage element is connected to the drain terminal of the fourth selection transistor, the first data line is connected to the source terminal of the first selection transistor, and the The third data line is connected to the source terminal of the second selection transistor, the fifth data line is connected to the source terminal of the third selection transistor, the seventh data line is connected to the source terminal of the fourth selection transistor, the second data line is connected to the other end of the first nonvolatile semiconductor storage element, the fourth data line is connected to the other end of the second nonvolatile semiconductor storage element, the sixth data line is connected to the other end of the third nonvolatile semiconductor storage element, the eighth data line is connected to the other end of the fourth nonvolatile semiconductor storage element, and the first nonvolatile semiconductor storage element transmits information of the positive weight coefficient to a different load than the second nonvolatile semiconductor storage element. The third nonvolatile semiconductor memory element maintains the information of the negative weight coefficient as a resistance value in a manner with a different load compared to the fourth nonvolatile semiconductor memory element. The operation circuit unit grounds the first data line, the third data line, the fifth data line, and the seventh data line, and applies a voltage to the second data line, the fourth data line, the sixth data line, and the eighth data line, thereby providing a current corresponding to the product corresponding to the first logic value when the word line is not selected based on the current flowing through the second data line, the fourth data line, the sixth data line, and the eighth data line, and providing a current corresponding to the product corresponding to the second logic value when the word line is selected.

[0135] Thus, the positive weight coefficient is represented by two nonvolatile semiconductor memory elements with different loads, and the negative weight coefficient is represented by two nonvolatile semiconductor memory elements with different loads, so that it is possible to balance the maintenance of current accuracy and the reduction of total current in the product-sum operation, which was a contradictory issue in the past. Therefore, it is possible to realize a neural network operation circuit using nonvolatile semiconductor memory elements that can achieve low power consumption and large-scale integration.

[0136] In more detail, the first nonvolatile semiconductor storage element holds information about the upper bits of the absolute value of the positive weight coefficient, the second nonvolatile semiconductor storage element holds information about the lower bits of the absolute value of the positive weight coefficient, the third nonvolatile semiconductor storage element holds information about the upper bits of the absolute value of the negative weight coefficient, and the fourth nonvolatile semiconductor storage element holds information about the lower bits of the absolute value of the negative weight coefficient. Thus, both the positive weight coefficient and the negative weight coefficient are represented by 2 bits.

[0137] Furthermore, the first nonvolatile semiconductor memory element, the second nonvolatile semiconductor memory element, the third nonvolatile semiconductor memory element, and the fourth nonvolatile semiconductor memory element may also be a variable resistance memory element, a phase change memory element, a field effect transistor element, or a resistor element having a predetermined fixed resistance value, thereby realizing an operation circuit unit using various nonvolatile semiconductor memory elements.

[0138] In addition, the neural network operation circuit of the embodiment comprises: a main area, which is composed of a plurality of operation circuit units; a first additional area, a second additional area, a third additional area, and a fourth additional area, which are composed of a non-volatile semiconductor memory element and a selection transistor having the same structure as the non-volatile semiconductor memory element used in the plurality of operation circuit units; a first control circuit for selecting a word line connected to the gate of the selection transistor of the first additional area; a second control circuit for selecting a word line connected to the gate of the selection transistor of the second additional area; a third control circuit for selecting a word line connected to the gate of the selection transistor of the third additional area; and a fourth control circuit for selecting a word line connected to the gate of the selection transistor of the third additional area. a control circuit for selecting a word line connected to the gate of the selection transistor of the fourth additional region; a first node, a second node, a third node, a fourth node, a fifth node, a sixth node, a seventh node, and an eighth node; and a first determination circuit and a second determination circuit, a first data line possessed by each operation circuit unit in the main region is connected to the first node, a second data line possessed by each operation circuit unit in the main region is connected to the second node, a third data line possessed by each operation circuit unit in the main region is connected to the third node, a fourth data line possessed by each operation circuit unit in the main region is connected to the fourth node, and each operation circuit unit in the main region A fifth data line of the unit is connected to the fifth node, a sixth data line of each operation circuit unit in the main region is connected to the sixth node, a seventh data line of each operation circuit unit in the main region is connected to the seventh node, an eighth data line of each operation circuit unit in the main region is connected to the eighth node, a first determination circuit is connected to the second node and the sixth node, a second determination circuit is connected to the fourth node and the eighth node, a first control circuit is connected to the word line of the first additional region, a second control circuit is connected to the word line of the second additional region, a third control circuit is connected to the word line of the third additional region, and a fourth control circuit is connected to the word line of the fourth additional region. The neural network operation circuit is connected, and the corresponding two-value data are input to the multiple word lines of the main area respectively. The third node and the seventh node are grounded, and the fourth node and the eighth node are applied with voltage respectively, thereby controlling the first control circuit, the third control circuit and the second determination circuit based on the current flowing through the fourth node and the eighth node, thereby determining the low-bit operation result, and determining the control of the second control circuit and the fourth control circuit according to the low-bit operation result, and the first node and the fifth node are grounded, and the second node and the sixth node are applied with voltage respectively, thereby using the first determination circuit to output the operation result equivalent to the sum of the products of the multiple operation circuit units.

[0139] Thus, a neural network operation circuit composed of a plurality of operation circuit units capable of maintaining current accuracy and reducing total current in product-sum operation can be realized. In other words, a neural network operation circuit using a nonvolatile semiconductor memory element capable of achieving low power consumption and large-scale integration can be realized.

[0140] Here, the first additional region, the second additional region, the third additional region, and the fourth additional region respectively pass through the first control circuit, the second control circuit, the third control circuit, and the fourth control circuit to make the desired current flow through the first node, the third node, the fifth node, and the seventh node. Thus, the difference between the positive weight coefficient and the negative weight coefficient is calculated, and the carry from the lower bit to the higher bit can be properly processed.

[0141] In addition, the allowable current amount flowing through the first node, the second node, the third node, the fourth node, the fifth node, the sixth node, the seventh node, and the eighth node is set so that the total current flowing through the plurality of operation circuit units constituting the main region does not damage the linearity of the total current corresponding to the current flowing through each of the plurality of operation circuit units. Thus, the linearity of the total current is ensured.

[0142] In addition, the first control circuit, the second control circuit, the third control circuit, and the fourth control circuit determine the desired current amount at which the currents flowing through the second node connected to the first determination circuit and the sixth node are balanced, and the desired current amount at which the currents flowing through the fourth node connected to the second determination circuit and the eighth node are balanced, based on the output results of the first determination circuit and the second determination circuit, by linear search or binary search. Thus, with respect to the positive weight coefficient and the negative weight coefficient, the amount of carry from the lower digit to the higher digit can be calculated in a short time.

[0143] In addition, the driving method of the neural network operation circuit of the present embodiment comprises: a process of normalizing by dividing the absolute value of the weight coefficient of each of the multiple operation circuit units constituting the neural network operation circuit by the maximum value of the weight coefficient; a process of quantizing each normalized weight coefficient according to a certain bit number; a process of dividing the quantized information into high-order bits and low-order bits; and a process of determining the current amount of the current flowing through the non-volatile semiconductor storage element corresponding to the high-order bit constituting the multiple operation circuit units and the current amount of the current flowing through the non-volatile semiconductor storage element corresponding to the low-order bit according to the divided high-order bits and low-order bits.

[0144] Therefore, after the weight coefficient is normalized, it is divided into high-order bits and low-order bits, and the current amounts corresponding to the high-order bits and low-order bits are determined. Therefore, it is possible to realize a neural network operation circuit that can balance the maintenance of current accuracy in product-sum operations and the reduction of total current, which was a contradictory issue in the past.

[0145] In addition, the driving method of the neural network operation circuit of the present embodiment comprises: a process in which a word line of a main area is selected with respect to an input signal to a given neural network operation circuit; a process in which a low-bit operation result is determined by controlling a first control circuit, a third control circuit, and a second determination circuit based on currents flowing through a fourth node and an eighth node; a process in which control of a second control circuit and a fourth control circuit is determined based on the low-bit operation result; and a process in which the operation result using the first determination circuit is output with respect to the control of the second control circuit and the fourth control circuit and the selection of the word line of the main area.

[0146] Thus, the difference between the positive weight coefficient and the negative weight coefficient of the low-order bit is transmitted to the high-order bit, and finally, the size of the positive weight coefficient and the negative weight coefficient of the low-order bit and the high-order bit is determined to obtain the output of the activation function in the neuron.

[0147] (Second Embodiment)

[0148] In the first embodiment, an embodiment of a structure for implementing a product-sum operation is shown. In the second embodiment, an embodiment for implementing a neural network composed of multiple product-sum operations by the neural network operation circuit of the present disclosure is shown. Therefore, first, the relationship between the structure of the neural network and the neural network operation circuit of the present disclosure is made clearer.

[0149] Fig.19 is a diagram for explaining a schematic diagram of a general neural network calculation model. More specifically, Fig.19 (a) is a schematic diagram of a general neural network computing model. Fig.19 (b) means Fig.19 Explanation of the symbols in (a), Fig.19 (c) represents the formula for the activation function f. Fig.19 As shown in FIG. 1 , in general, the computational model of a neural network refers to the process of multiplying an input vector consisting of multiple input values ​​by a matrix and applying an activation function f to each value of the output as a unit, which is called a layer. In fact, a neural network used for inference, etc., can approximate complex multi-output functions compared to conventional linear approximation models by using a multi-layer structure in which multiple layers are connected, and its output is used for classification problems, etc.

[0150] The first embodiment shows an embodiment for performing one product-sum operation, but in view of the practical structure of the above-mentioned neural network, by parallelizing the product-sum operations of the same layer, the overall operation can be accelerated. Next, a preferred embodiment is described.

[0151] Fig. 20 A block diagram is shown as an example of parallelization. That is, Fig. 20 It is a diagram showing the structure of a parallel neural network circuit according to the second embodiment. Fig. 20 PUs1, ..., PUs4 in the figure represent the main area for maintaining the weight coefficients. The structure of each PUs1, ..., PUs4 and their attached additional areas is the same as Figure 1 The PUs in are the same. Fig. 20 In the description, for convenience, the structure required for reading out two parallel connections is described, but the same structure can be applied to the case where the number of parallel connections increases.

[0152] In the 2-parallel readout operation, each basic component unit or its output in the parallel readout unit is called a bit. Fig. 20 In the parallel readout unit Wd1, the first bit corresponds to PUs1, and PUs2 corresponds to the second bit. In the next parallel readout unit Wd2, PUs3 and PUs4 correspond to the first bit and the second bit, respectively.

[0153] The additional areas PCPUs, PCPLs, PCNUs, PCNLs and the word line groups CPUWLs, CPLWLs, CNUWLs, CNLWLs for controlling them need to be controlled independently for each bit in the parallel readout unit. On the other hand, since they have no influence on different parallel readout units, they can be used in common. In view of these circumstances, Fig. 20 As shown, it is necessary to connect the additional area to a different word line address for each parallel bit. That is, the additional areas PCPUs1, PCPLs1, PCNUs1, PCNLs1 and PCPUs2, PCPLs2, PCNUs2, PCNLs2 are controlled by different word line groups CPUWLs1, CPLWLs1, CNUWLs1, CNLWLs1 and CPUWLs2, CPLWLs2, CNUWLs2, CNLWLs2, respectively. On the other hand, in PUs1 as the first bit of the parallel read unit Wd1 and PUs3 as the first bit of the parallel read unit Wd2, these additional areas can be controlled by a common word line group. That is, the additional areas PCPUs1, PCPLs1, PCNUs1, PCNLs1 and PCPUs3, PCPLs3, PCNUs3, PCNLs3 are controlled by the same word line groups CPUWLs1, CPLWLs1, CNUWLs1, CNLWLs1, respectively. By setting such a structure, parallel reading of multiple outputs can be realized without damaging the function of the operation unit of the neural network provided in the first embodiment.

[0154] As a common memory array design technique, a method often used is to use a common circuit for reading or writing, and to use a column selector to connect to a bit line or source line to be accessed when reading or writing. Based on this viewpoint, in this embodiment, the circuit and structure related to reading can also be common.

[0155] Fig.21 This is a configuration example in which only the determination circuit is made common. Fig. 22 This shows a structural example of a case where an additional area is included and made common. That is, Fig.21 This is a diagram showing a structure in which only the readout determination circuit is made common in the parallelized neural network circuit of the second embodiment. Here, for the parallel readout unit Wd1 and the parallel readout unit Wd2, the main area and the additional area are connected to the common readout determination circuit CRead via the selection switch block ColSelSWs1 composed of a plurality of selection switches and the selection switch block ColSelSWs1. Fig. 22 This is a diagram showing a structure in which the additional area and the readout determination circuit in the parallelized neural network circuit are made common according to the second embodiment. Here, for the parallel readout unit Wd1 and the parallel readout unit Wd2, the main area is connected to the readout determination circuit CReadArr including the commonized additional area via the selection switch block ColSelSWs1 including a plurality of selection switches and the selection switch block ColSelSWs1.

[0156] They have the effect of saving area, but on the other hand, regarding the path from each cell to the readout judgment circuit, there may be design issues such as deviation in path length caused by layout configuration and increase in resistance component of the selection switch. When designing the circuit, it is necessary to comprehensively determine the structure in consideration of these issues.

[0157] (Third Embodiment)

[0158] In the first embodiment, the operation circuit unit for expressing a weight coefficient is divided into two small areas for each sign of the weight, and the burden of the number of bits in the quantization level of the weight is halved to realize the operation circuit of the neural network that takes into account both the low current of the small area and the maintenance of the operation accuracy, but it can also be divided into more small areas. This situation is shown in the third embodiment.

[0159] Fig.23 1 is a block diagram of a calculation circuit unit for expressing weight coefficients in six cells according to the third embodiment. Fig.23 (a) shows the structure of the operation circuit unit that represents the weight coefficient of 6 cells. Fig.23 (b) means Fig.23 (a) The setting conditions of the cell. Fig.23As shown in (a), the arithmetic circuit unit of this embodiment has Fig.11A In addition to the structure shown, it also has: a fifth nonvolatile semiconductor memory element (nonvolatile resistance change element RP21), which maintains the information of the positive weight coefficient as a resistance value in a manner with a different load compared to the first nonvolatile semiconductor memory element (nonvolatile resistance change element RP11) and the second nonvolatile semiconductor memory element (nonvolatile resistance change element RP31); and a sixth nonvolatile semiconductor memory element (nonvolatile resistance change element RN21), which maintains the information of the negative weight coefficient as a resistance value in a manner with a different load compared to the third nonvolatile semiconductor memory element (nonvolatile resistance change element RN11) and the fourth nonvolatile semiconductor memory element (nonvolatile resistance change element RN31).

[0160] In more detail, Fig.23 (a) shows the structure of an operation circuit unit in the case where 3 cells for each symbol are used to express a weight coefficient. Similar to the first embodiment, after reducing the upper limit Imax of the cell current to 1 / 3 of the original current performance of the element, that is, the upper limit Imax0 that can be set for the cell current, in this embodiment, the 7 bits required to express the absolute value of the weight are allocated to the 3 cells. That is, CellP1 is considered as the most significant bit (MSB), CellP2 is considered as the second bit, and CellP3 is considered as the least significant bit (LSB), and they are quantized with 3 quantization bits respectively. In particular, the base of the carry becomes 2^3=8. Here, ^ represents exponentiation. By dividing in this way, as Fig.23 As shown in (b), it is possible to ensure that the cell current per quantization unit is larger than Imax0 / 3 / 7.

[0161] In this way, by dividing the quantization bit number, the cell current per quantization unit can be increased, but the number of elements required for this increases in proportion to the number of divisions, so it is necessary to determine an appropriate number of divisions based on these constraints during design. In general, if the number of quantization bits B, the rate of decrease R of the cell current upper limit Imax and the number of divisions m are used, the increase or decrease rate Runit of the cell current per quantization unit is

[0162] Runit=R×(2^B-1) / (2^(B / m)-1)

[0163] Here, B / m is rounded up to an integer value.

[0164] use Fig.24 A configuration example using the neural network operation circuit according to the third embodiment will be described. Fig.24This is a structural diagram of a neural network operation circuit that is constructed using an operation circuit unit that expresses the weight coefficients of the third embodiment with 6 cells. Fig.24 PUs represents a main area, and a plurality of operation circuit units using six cells of the third embodiment are configured. Bit lines BLP1, BLP2, BLP3, BLN1, BLN2, BLN3 and source lines SLP1, SLP2, SLP3, SLN1, SLN2, SLN3 are appropriately connected to each bit of the operation circuit unit in PUs. That is, for example, the bit line BLP1 and the source line SLP1 are connected to the positive most significant bit in the six cells of each operation circuit unit, and the bit line BLN3 and the source line SLN3 are connected to the negative least significant bit in the six cells of each operation circuit unit.

[0165] The product-sum operation is the same as in the first embodiment and needs to be performed for each 1 bit. That is, it is necessary to perform m steps of operation for the division number m. As in the first embodiment, in addition to the operation of the highest bit, it is necessary to calculate the carry amount in order, and control the connection of the additional areas PCPLs3, PCPLs2, PCNLs3, and PCNLs2 through the operation of CPLWLs and CNLWLs, and use the readout judgment circuits CT3 and CT2 to determine the order of switching. This method is the same as in the first embodiment, and detailed description is omitted. Regarding the carry, as in the first embodiment, the additional current amount of the high-order cell of the carry is determined by dividing the quantization order equivalent to the carry calculated in the previous stage by the base represented by the bit.

[0166] Here, as a difference from the first embodiment, the product-sum operation of bits other than the highest bit and the lowest bit is supplemented. In such a bit, it is necessary to consider the carry amount from the lower bit in the calculation to the higher bit. That is, after adding the current amount that becomes the carry amount from the lower bit to the total current amount on the bit line of the bit, the carry amount to the higher bit is calculated. However, such an operation is only necessary if Fig.24 The structure shown in the figure is sufficient. For example, when the result of the calculation of the least significant bit is the current amount of the carry added to the second phase on the positive side, the control for maintaining the carry amount is added to the bit line BLP2 through CPUWLs and the additional area PCPU2s. In this state, the product-sum operation results of each positive and negative second bit are compared. When calculating the difference, the switching of the output of the read determination circuit CT2 is determined by the control of CPLWLs and CNLWLs and the connection of the additional areas PCPL2s and PCNL2s thereby performed, but according to the structure of this embodiment, the PCPU2s that maintains the carry amount from the lower bit and the process of the difference calculation are separated. Therefore, the carry amount to the higher bit can be calculated in the state where the carry amount from the lower bit is added. Thereafter, by repeating the same operation toward the higher bit, the calculation up to the highest bit can be completed.

[0167] The final product-sum calculation result output of the neural network calculation circuit is the same as the first embodiment, with the comparison result of the higher-order cell being given priority, and when the comparison results of the higher-order cells are equal, the comparison result of the next lower-order cell is adopted.

[0168] As described above, the arithmetic circuit unit of this embodiment has Fig.11A In addition to the structures of the first to fourth nonvolatile semiconductor memory elements shown, the present invention further comprises: a fifth nonvolatile semiconductor memory element that maintains information on positive weight coefficients as resistance values ​​with a different load compared to the first nonvolatile semiconductor memory element and the second nonvolatile semiconductor memory element; and a sixth nonvolatile semiconductor memory element that maintains information on negative weight coefficients as resistance values ​​with a different load compared to the third nonvolatile semiconductor memory element and the fourth nonvolatile semiconductor memory element.

[0169] Thus, the operation circuit unit is composed of 6 cells, and the positive weight coefficient and the negative weight coefficient are represented by 3 bits, which can realize a neural network operation circuit corresponding to the weight coefficient with a larger quantization level.

[0170] (Fourth Embodiment)

[0171] In the first embodiment, two operation stages are required to read out the product-sum calculation result. However, in the case of simple determination, a method of completing the calculation in one stage will be described as a fourth embodiment.

[0172] Generally, the network structure of a neural network, especially the distribution of values ​​for weight coefficients, varies depending on its purpose and scale, but in practical networks, optimization and learning methods for sparseness have been widely studied. In the sparse weight coefficients, most weights are considered to be 0, and a few weight coefficients have meaningful values. In such a case, it can be considered that the results of the product-sum operation are also concentrated near 0, or the probability of being located at a value that deviates from 0 to a certain extent is higher.

[0173] Fig.25 This indicates an operation algorithm including a simple judgment based on 1-stage reading. Fig.25 4 is a flowchart of simultaneously reading out the upper and lower cells in the fourth embodiment. Figure 1In the structure, the high-order cells and the low-order cells are read out together (S20). At this time, the outputs of the high-order read determination circuit C4 and the low-order read determination circuit C3 do not consider the carry amount from the low-order, and output the size determination result of each bit. These are limited combinations, and through their combination, there is a situation where the final size comparison determination can be made without considering the carry. That is, it is determined whether the sign can be determined by the product-sum operation results read out at the same time (S21). When the sign can be determined ("true" in S21), the operation can be ended without considering the carry by outputting the determined sign (S22). In addition, when the sign cannot be determined ("false" in S21), the product-sum operation (S23) is performed sequentially from the low-order cells in the same way as in the above-mentioned embodiment. By using such a screening method, part of the calculation can be simplified, and the overall power saving of the operation can be achieved.

[0174] Fig.26 This indicates a combination that can determine the final result based on the upper-order read results and the lower-order read results. Fig.26 This is a diagram showing a table indicating output determinism in simultaneous reading of an upper cell and a lower cell according to a fourth embodiment. As shown in this figure, when both the upper readout determination circuit C4 and the lower readout determination circuit C3 determine that the total current IsumP on the positive side is greater than the total current IsumN on the negative side, the output sign can be positive as the product-sum operation result, and further, when the total current IsumN on the negative side is greater than the total current IsumP on the positive side, the output sign can be negative as the product-sum operation result.

[0175] Fig. 27 This shows a combination in which the comparison determination circuit has a function of realizing the coincidence determination as described in the first embodiment. Fig. 27 This is a diagram showing a table showing output determinism in simultaneous reading of a high-order cell and a low-order cell according to a fourth embodiment. The case where the determination cannot be made by reading without considering the carry is the case where the determination results of the high-order cell and the low-order cell are different (in Fig. 27 This is because the determination result of the high position is different from the determination result when the carry is not taken into account due to the carry from the low position. However, in view of the technical background such as the sparsification described above, the combination of weight coefficients used to cause this situation, such as a situation where a meaningful value is included on both the positive side and the negative side, and a result exists near 0 through cancellation by product-sum operation, is not expected to be frequent, and in most cases, it is expected that the final output can be determined by the determination results of the high-order cell and the low-order cell.

[0176] According to the above description, the simplification of the operation by elimination described as the fourth embodiment can realize the speed-up of the operation in the neural network operation circuit.

[0177] (Conclusion)

[0178] As described above, the neural network operation circuit of the present invention uses the current value flowing in the non-volatile semiconductor memory element to implement the product-sum operation in the neural network calculation model. As a result, it is possible to perform product-sum operations without using a multiplication circuit, an accumulation circuit (accumulator circuit), etc. using conventional digital circuits, thereby achieving low power consumption of the neural network operation circuit and a reduction in chip area of ​​the semiconductor integrated circuit. In particular, the contradictory issues in the conventional technology, namely, the reduction of cell current and the maintenance of calculation accuracy, can be divided into a plurality of cells for calculation, thereby providing cells that realize their functions for a wider variety of neural network models.

[0179] The embodiments of the present disclosure have been described above, but the neural network operation circuit using the nonvolatile semiconductor memory element of the present disclosure is not limited to the above-mentioned examples, and is also effective for circuits to which various changes have been made without departing from the scope of the present disclosure.

[0180] For example, a neural network operation circuit using the non-volatile semiconductor memory element of the above-mentioned embodiment is an example of a resistance variable non-volatile memory (ReRAM), but the present disclosure can also be applied to resistance variable non-volatile resistance elements such as phase change memory elements (PRAM), flash memories, or variable current elements that indirectly use non-volatile semiconductor memory elements other than these.

[0181] In addition, when the neural network operation circuit of the present disclosure is regarded as a product-sum operation circuit, the content of the embodiment is a description related to a signed integer that quantizes a signed real number, but for example, it is also possible to extract only the function of performing unsigned operations. In this case, for example, Fig.28 As shown, consider using a structure that assumes that the input on the negative side is always 0. Fig.28 This is a structural diagram of a neural network operation circuit corresponding to an unsigned weight coefficient of a modified example of the first embodiment. In this structure, the input on the negative side does not need to be prepared in the same number as the number of bit divisions, and can be common. These methods are also included in the main purpose of the present disclosure.

[0182] [Industrial Availability]

[0183] Since the neural network operation circuit using the nonvolatile semiconductor memory element disclosed in the present invention is configured to perform product-sum operations using the nonvolatile semiconductor memory element, it is possible to perform product-sum operations without having to carry a multiplication circuit or accumulation circuit (accumulator circuit) using a conventional digital circuit. In addition, by digitizing the input data and output data into binary values, large-scale neural network circuits can be easily integrated. Therefore, it has the effect of being able to achieve low power consumption and large-scale integration of neural network operation circuits, and is useful, for example, for semiconductor integrated circuits equipped with artificial intelligence (AI) technology that performs self-learning and judgment, and electronic devices equipped with them.

[0184] Explanation of symbols

[0185] T1 to Tn, TP1 to TPn, TP11 to TP31, TPU1 to TPUn, TPL1 to TPLn, TN1 to TNn, TN11 to TN31, TNU1 to TNn, TNL1 to TNn, TC1 to TCm selection transistors R1 to Rn, RP1 to RPn, RP11 to RP31, RPU1 to RPUn, RPL1 to RPLn, RN1 to RNn, RN11 to RN31, RNU1 to RNUn, RNL1 to RNLn, RC1 to RCm nonvolatile resistance variable element (resistance element)

[0186] x1~xn input signal

[0187] WL1~WLn, WLs, CPLWL1~CPLWLm, CPUWL1~CPUWLm, CNLWL1~CNLWLm, CNUWL1~CNUWLm, CWL1~CWLm word lines PCPLs, PCPLs1~PCPLs4, PCPL2s, PCPL3s, PCPUs, PCPUs1~PCPUs4, PCPU1s, PCPU2s, PCNLs, PCNLs1~PCNLs4, PCNL2s, PCNL3s, PCNUs, PCNUs1~PCNUs4, PCNU1s, PCNU2s, PCNcmn additional area PUs, PUs1~PUs4, main area

[0188] PU1~Pun operation circuit unit

[0189] SL, SLP, SLP1~SLP3, SLPU, SLPU1~SLPU4, SLPL, SLPL1~SLPL4, SLN, SLN1~SLN3, SLNU, SLNU1~SLNU4, SLNL, SLNL1~SLNL4, SLNcmn source line

[0190] BL, BLP, BLP1~BLP3, BLPU, BLPU1~BLPU4, BLPL, BLPL1~BLPL4, BLN, BLN1~BLN3, BLNU, BLNU1~BLNU4, BLNL, BLNL1~BLNL4, BLPcmn bit lines

[0191] C1, C2 word line selection circuit

[0192] C21 positive side comparison control circuit

[0193] C22 positive side carry control circuit

[0194] C23 Negative side comparison control circuit

[0195] C24 negative side carry control circuit

[0196] DT1, DT2, DT3, DT4, DTcmn source line selection transistor

[0197] Yout, Y, y output

[0198] I1~In, IP1~IPn, IP11~IP31, IN1~INn, IN11~IN31, IC1~ICm, IPL1~IPLn, INL1~INLn, IPU1~IPUn, INU1~INUn cell current

[0199] Total current of I, IN, IP, ICPLs, ICNLs, ICPUs, and ICNUs

[0200] Vss Ground

[0201] Vdd power supply

[0202] C3, C31 ~ C34 low-order readout judgment circuit

[0203] C4, C41 ~ C44 high-order readout judgment circuit

[0204] CT1, CT2, CT3 readout judgment circuit

[0205] SWBL, SWBLP, SWBLN bit line select switches

[0206] SWSL Source Line Select Switch

[0207] SelSL SL selection signal

[0208] SelBL BL selection signal

[0209] DSL SL ground signal

[0210] TDSL SL grounding transistor

[0211] TDBL BL-Vdd connection transistor

[0212] DBL BL-Vdd connection signal

[0213] Iw and the current corresponding to the weight coefficient w

[0214] Imin cell current lower limit

[0215] Imax0 The upper limit of the cell current can be set

[0216] Imax cell current upper limit

[0217] ColSel bit line selection signal

[0218] TLoadP, TLoadN readout power supply connection transistor

[0219] Comp Differential Sense Amplifier

[0220] Iunit Quantitative unit of cell current

[0221] IsumP Total current on the positive side

[0222] IsumN Total current on the negative side

[0223] CPLWLs1, CPUWLs1, CNWLs1, CNUWLs1, CPLWLs2, CPUWLs2, CNWLs2, CNUWLs2 word line group

[0224] Wd1, Wd2 parallel readout unit

[0225] ColSelSWs1, ColSelSWs2 select switch blocks

[0226] CRead common read determination circuit

[0227] CReadArr includes a common additional area readout determination circuit

[0228] CellP1~CellP3, CellN1~CellN3 cell structure

Claims

1. An arithmetic circuit unit, is a calculation circuit unit that holds a weight coefficient having a positive or negative value corresponding to input data that can selectively take a first logic value and a second logic value, and provides a current corresponding to the product of the input data and the weight coefficient, The arithmetic circuit unit comprises: word line; a first data line, a second data line, a third data line, a fourth data line, a fifth data line, a sixth data line, a seventh data line, and an eighth data line; a first nonvolatile semiconductor memory element, a second nonvolatile semiconductor memory element, a third nonvolatile semiconductor memory element, and a fourth nonvolatile semiconductor memory element; and a first selection transistor, a second selection transistor, a third selection transistor, and a fourth selection transistor, The gates of the first selection transistor, the second selection transistor, the third selection transistor, and the fourth selection transistor are connected to the word line. One end of the first nonvolatile semiconductor memory element is connected to the drain terminal of the first selection transistor, One end of the second nonvolatile semiconductor memory element is connected to the drain terminal of the second selection transistor, One end of the third nonvolatile semiconductor memory element is connected to the drain terminal of the third selection transistor, One end of the fourth nonvolatile semiconductor memory element is connected to the drain terminal of the fourth selection transistor, The first data line is connected to the source terminal of the first selection transistor, The third data line is connected to the source terminal of the second selection transistor, The fifth data line is connected to the source terminal of the third selection transistor, The seventh data line is connected to the source terminal of the fourth selection transistor, The second data line is connected to the other end of the first nonvolatile semiconductor memory element. The fourth data line is connected to the other end of the second nonvolatile semiconductor memory element. The sixth data line is connected to the other end of the third nonvolatile semiconductor storage element. The eighth data line is connected to the other end of the fourth nonvolatile semiconductor memory element. The first nonvolatile semiconductor memory element holds the information of the positive weight coefficient as a resistance value with a different load than that of the second nonvolatile semiconductor memory element. The third nonvolatile semiconductor memory element holds the information of the negative weight coefficient as a resistance value with a different load than that of the fourth nonvolatile semiconductor memory element. The operation circuit unit applies voltage to the second data line, the fourth data line, the sixth data line, and the eighth data line by grounding the first data line, the third data line, the fifth data line, and the seventh data line. Thus, based on the current flowing through the second data line, the fourth data line, the sixth data line and the eighth data line, providing a current corresponding to the product corresponding to the first logic value when the word line is not selected, When the word line is selected, a current corresponding to the product corresponding to the second logic value is supplied.

2. The arithmetic circuit unit according to claim 1, The first nonvolatile semiconductor memory element stores information of a high-order bit of the absolute value of the positive weight coefficient. The second nonvolatile semiconductor memory element stores information of lower bits of the absolute value of the positive weight coefficient. The third nonvolatile semiconductor memory element stores information of a high-order bit of the absolute value of the negative weight coefficient. The fourth nonvolatile semiconductor memory element holds information of lower bits of the absolute value of the negative weight coefficient.

3. The arithmetic circuit unit according to claim 1, Also available: a fifth nonvolatile semiconductor memory element that holds the information of the positive weight coefficient as a resistance value with a different load than the first nonvolatile semiconductor memory element and the second nonvolatile semiconductor memory element; and The sixth nonvolatile semiconductor memory element holds the information of the negative weight coefficient as a resistance value with a different load than the third nonvolatile semiconductor memory element and the fourth nonvolatile semiconductor memory element.

4. The arithmetic circuit unit according to claim 1, The first nonvolatile semiconductor memory element, the second nonvolatile semiconductor memory element, the third nonvolatile semiconductor memory element, and the fourth nonvolatile semiconductor memory element are resistance variable memory elements, phase change memory elements, field effect transistor elements, or resistance elements having a predetermined fixed resistance value.

5. An arithmetic circuit unit, is a calculation circuit unit that holds a weight coefficient having a positive value corresponding to input data that can selectively take a first logic value and a second logic value, and provides a current corresponding to the product of the input data and the weight coefficient, have: word line; a first data line, a second data line, a third data line, and a fourth data line; A first nonvolatile semiconductor memory element, and a second nonvolatile semiconductor memory element; as well as a first selection transistor and a second selection transistor, The gates of the first selection transistor and the second selection transistor are connected to the word line. One end of the first nonvolatile semiconductor memory element is connected to the drain terminal of the first selection transistor, One end of the second nonvolatile semiconductor memory element is connected to the drain terminal of the second selection transistor, The first data line is connected to the source terminal of the first selection transistor, The third data line is connected to the source terminal of the second selection transistor, The second data line is connected to one end of the first nonvolatile semiconductor storage element. The fourth data line is connected to one end of the second nonvolatile semiconductor memory element. The first nonvolatile semiconductor memory element holds the information of the weight coefficient as a resistance value with a different load than that of the second nonvolatile semiconductor memory element. The arithmetic circuit unit applies a voltage to the second data line and the fourth data line by grounding the first data line and the third data line. Thus, based on the current flowing through the second data line and the fourth data line, providing a current corresponding to the product corresponding to the first logic value when the word line is not selected, A current corresponding to the product corresponding to the second logic value is provided when the word line is selected.

6. A neural network computing circuit, have: A main area, composed of a plurality of operation circuit units according to claim 1; The first additional region and the third additional region are formed using nonvolatile semiconductor memory elements and selection transistors having the same structure as the nonvolatile semiconductor memory elements used in the arithmetic circuit unit according to claim 1; a first control circuit for selecting a word line connected to a gate of the selection transistor of the first additional region; a third control circuit for selecting a word line connected to the gate of the selection transistor of the third additional region; the third node, the fourth node, the seventh node, and the eighth node; as well as The second decision circuit, The third data line according to claim 1 included in each of the arithmetic circuit units in the main region is connected to the third node. The fourth data line according to claim 1 included in each of the arithmetic circuit units in the main region is connected to the fourth node. The seventh data line according to claim 1 included in each of the arithmetic circuit units in the main region is connected to the seventh node. The eighth data line according to claim 1 included in each of the arithmetic circuit units in the main region is connected to the eighth node. The second determination circuit is connected to the fourth node and the eighth node, The first control circuit is connected to the word line of the first additional region, The third control circuit is connected to the word line of the third additional region, Inputting corresponding binary data to the plurality of word lines in the main region, The neural network operation circuit applies voltage to the fourth node and the eighth node respectively by grounding the third node and the seventh node. Thus, based on the current flowing through the fourth node and the eighth node, The first control circuit, the third control circuit, and the second determination circuit are controlled to thereby determine the calculation result of the lower bits.

7. The neural network operation circuit according to claim 6, The first additional region and the third additional region cause desired current amounts to flow to the third node and the seventh node through the first control circuit and the third control circuit, respectively.

8. The neural network operation circuit according to claim 6, The allowable amount of current flowing in the third node, the fourth node, the seventh node, and the eighth node is set so that the total current flowing in the multiple operational circuit units constituting the main area does not impair the linearity of the total corresponding to the current flowing through each of the multiple operational circuit units.

9. The neural network operation circuit according to claim 7, The first control circuit and the third control circuit determine the desired current amount that balances the currents flowing through the fourth node and the eighth node connected to the second determination circuit through linear search or binary search based on the output result of the second determination circuit.

10. The neural network operation circuit according to claim 6, Also available: The second additional region and the fourth additional region are formed using a nonvolatile semiconductor memory element and a selection transistor having the same structure as the nonvolatile semiconductor memory element used in the plurality of operation circuit units; a second control circuit for selecting a word line connected to a gate of the selection transistor of the second additional region; a fourth control circuit for selecting a word line connected to a gate of the selection transistor of the fourth additional region; a first node, a second node, a fifth node, and a sixth node; as well as The first determination circuit, The first data line according to claim 1 included in each of the arithmetic circuit units in the main region is connected to the first node. The second data line of claim 1 provided in each operation circuit unit in the main region is connected to the second node The fifth data line according to claim 1 included in each of the arithmetic circuit units in the main region is connected to the fifth node. The sixth data line according to claim 1 included in each of the arithmetic circuit units in the main region is connected to the sixth node. The first determination circuit is connected to the second node and the sixth node, The second control circuit is connected to the word line of the second additional region, The fourth control circuit is connected to the word line of the fourth additional region, Inputting corresponding binary data to the plurality of word lines in the main region, The neural network operation circuit determines the control of the second control circuit and the fourth control circuit based on the operation result of the lower bit, By grounding the first node and the fifth node and applying voltages to the second node and the sixth node, Thus, the first determination circuit is used to output a calculation result corresponding to the sum of the products of the plurality of calculation circuit units.

11. The neural network operation circuit according to claim 10, The first additional region, the second additional region, the third additional region and the fourth additional region respectively allow the desired amount of current to flow to the first node, the third node, the fifth node and the seventh node through the first control circuit, the second control circuit, the third control circuit and the fourth control circuit.

12. The neural network operation circuit according to claim 10, The allowable amount of current flowing in the first node, the second node, the third node, the fourth node, the fifth node, the sixth node, the seventh node and the eighth node is determined so that the total current flowing in the multiple operational circuit units constituting the main area does not impair the linearity of the total corresponding to the current flowing through each of the multiple operational circuit units.

13. The neural network operation circuit according to claim 11, The first control circuit, the second control circuit, the third control circuit and the fourth control circuit determine the desired current amount that balances the currents flowing through the second node and the sixth node connected to the first determination circuit, and the desired current amount that balances the currents flowing through the fourth node and the eighth node connected to the second determination circuit, respectively, based on the output results of the first determination circuit and the second determination circuit, through linear search or binary search.

14. A method for driving a neural network operation circuit, comprising: A step of normalizing the weight coefficients of the plurality of operation circuit units constituting the neural network operation circuit by dividing the absolute value of the weight coefficients by the maximum value of the weight coefficients; A step of quantizing each of the normalized weight coefficients according to a certain number of digits; The process of dividing the quantized information into high-order bits and low-order bits; as well as A process for determining the amount of current flowing through the nonvolatile semiconductor storage element corresponding to the high-order bits and the amount of current flowing through the nonvolatile semiconductor storage element corresponding to the low-order bits constituting the plurality of operation circuit units according to the divided high-order bits and the low-order bits.

15. A method for driving a neural network operation circuit, The method for driving the neural network operation circuit according to claim 10, The driving method comprises: A step of selecting the word line of the main area in response to a given input signal to the neural network operation circuit; a step of determining a lower-order operation result by controlling the first control circuit, the third control circuit, and the second determination circuit based on the current flowing through the fourth node and the eighth node; A step of determining control of the second control circuit and the fourth control circuit based on the lower-order operation result; and and outputting a calculation result using the first determination circuit for control of the second control circuit and the fourth control circuit and selection of the word line in the main region.