Neural network operational circuit
By using multiple semiconductor memory components in the neural network computing circuit to form a computing unit, the total current value is multiplied and accumulated, the problems of weight coefficient storage range limit and simulated current saturation are solved, and performance and reliability are improved to meet different neural network requirements. .
Patent Information
- Application Number
- CN202380025686.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-03-11
- Filing Date
- 2023-03-07
- Publication Date
- 2024-11-08
Smart Images

Figure CN118922836A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to a neural network operation circuit using a semiconductor memory element. 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, neural network technology that simulates human brain-type information processing in engineering is used, and research and development of semiconductor integrated circuits that can perform neural network operations at high speed and low power consumption are actively carried out.
[0004] Patent document 1 discloses an existing neural network operation circuit. A neural network operation circuit is formed using a resistance variable non-volatile memory (hereinafter, also referred to as a "resistance variable element") capable of setting an analog resistance value (in other words, conductance), an analog resistance value equivalent to a combination weight coefficient (hereinafter, also referred to as a "weight coefficient") is stored in the non-volatile storage element, an analog voltage value equivalent to an input (hereinafter, also referred to as "input data") is applied to the non-volatile storage element, and at this time, an analog current value flowing through the non-volatile storage element is used. The multiplication and accumulation operation performed by the neuron is performed as follows: a plurality of combination weight coefficients are stored as analog resistance values in a plurality of non-volatile storage elements, a plurality of analog voltage values equivalent to a plurality of inputs are applied to a plurality of non-volatile storage elements, and an analog current value obtained by adding the current values flowing through the plurality of non-volatile storage elements is obtained as a result of the multiplication and accumulation operation. Neural network operation circuits using nonvolatile storage elements can achieve lower power consumption than neural network operation circuits composed of digital circuits. In recent years, process development, equipment development, and circuit development of resistance variable nonvolatile memories that can set analog resistance values have been actively carried out.
[0005] Figure 8 It is a diagram showing calculations that represent the operating principle of a conventional neural network operation circuit, and a diagram showing the operation of an operation unit.
[0006] Figure 8 (a) is a diagram showing the calculation of the operation principle of the neural network operation circuit. Figure 8As shown in formula (1) of (a), the operation performed by neuron 10 is the operation of performing the operation of activation function f on the product and addition operation result of input xi and combined weight coefficient wi. Figure 8 As shown in formula (2) of (a), the combination weight coefficient wi is replaced by the current value Ii flowing through the resistance variable element (in other words, the memory cell), and the input xi and the current value Ii flowing through the resistance variable element are multiplied and added.
[0007] Here, the combined weight coefficient wi in the neural network operation takes both positive values (≥0) and negative values (<0). In the multiplication and addition operation, when the product of the input xi and the combined weight coefficient wi is positive, an addition operation is performed, and when it is negative, a subtraction operation is performed. However, since the current value Ii flowing through the variable resistance element can only take positive values, the addition operation when the product of the input xi and the combined weight coefficient wi is positive can be realized by the addition operation of the current value Ii, but the subtraction operation when the product of the input xi and the combined weight coefficient wi is negative needs to be studied using the positive current value Ii.
[0008] Figure 8 (b) is a diagram showing the operation of the operation unit PUi as a conventional neural network operation circuit. In the conventional neural network operation circuit, the combined weight coefficient wi is stored in two resistance change elements RP and RN, the resistance value set for the resistance change element RP is set to Rpi, the resistance value set for the resistance change element RN is set to Rni, the voltage applied to the bit lines BL0 and BL1 is set to Vbl, and the current value flowing through the resistance change elements RP and RN is set to Ipi and Ini. Then, the positive product-addition operation result is added to the current flowing through the bit line BL0, and the negative product-addition operation result is added to the current flowing through the bit line BL1, and the resistance values Rpi and Rni (in other words, the current values Ipi and Ini) of the resistance change elements RP and RN are set in a manner such that the current flows as described above. As Figure 8 As shown in (a), by connecting the operation unit PUi in parallel to the bit lines BL0 and BL1 and inputting the number of inputs x0~xn (corresponding to the combined weight coefficients w0~wn), the positive multiplication and addition operation result of the neuron 10 can be obtained as the current value flowing through the bit line BL0, and the negative multiplication and addition operation result can be obtained as the current value flowing through the bit line BL1.
[0009] Figure 8Formula (3), Formula (4), and Formula (5) of (a) represent the calculation of the above-mentioned operation. That is, by appropriately writing resistance values Rpi and Rni corresponding to the combined weight coefficient wi to the resistance variable elements RP and RN of the operation unit PUi, current values corresponding to the positive multiplication and accumulation results and the negative multiplication and accumulation results can be obtained on the bit lines BL0 and BL1, respectively, and the activation function f is operated by using the current values as input, so that the neural network operation can be performed.
[0010] Prior art literature
[0011] Patent Literature
[0012] Patent Document 1: International Publication No. 2019 / 049741 Summary of the invention
[0013] Problems to be solved by the invention
[0014] However, the above-mentioned existing neural network operation circuit has the following problems. That is, there is a problem that since there is a limit to the range of analog resistance values that can be set in the non-volatile storage element that stores the combination weight coefficient, it is impossible to store the large combination weight coefficient required for improving the performance of the neural network operation. In addition, since multiple analog voltage values equivalent to multiple inputs are applied to multiple non-volatile storage elements, and the analog current value obtained by summing the current values flowing through the multiple non-volatile storage elements is obtained as the result of the multiplication and addition operation, there is also a problem that the summed analog current is saturated due to the influence of parasitic resistance and control circuit, so that the multiplication and addition operation cannot be accurately performed. Furthermore, in order to improve the reliability of the analog resistance value set in the non-volatile memory, it is effective to use a write algorithm corresponding to the set analog resistance value when writing the analog resistance value, but since it needs to be set in the same non-volatile memory area, there is also a problem that the write algorithm corresponding to the set analog resistance value cannot be used. The write algorithm is an algorithm that specifies how to write in combination such as the absolute value of the voltage pulse and current pulse applied when writing to the storage element as the writing object, their pulse widths, and a verification operation to confirm that a specified resistance value has been written.
[0015] In particular, in a resistance variable nonvolatile memory, a filament that serves as a path for current is made for each nonvolatile memory element during the inspection process. In order to improve the reliability of the analog resistance value set in the nonvolatile memory, the size of the filament needs to be a size corresponding to the absolute value of the set analog resistance value, but the set analog resistance value is different for each neural network, and there is also a problem that if it is assumed that the neural network is rewritten to another case, it is impossible to make the optimal filament size for each set analog resistance value.
[0016] The present disclosure is proposed in view of the above-mentioned problems, and its purpose is to provide a neural network operation circuit that achieves at least one of improved performance of neural network operation and improved reliability of semiconductor storage elements that store combined weight coefficients.
[0017] Means for solving problems
[0018] A neural network operation circuit involved in one embodiment of the present invention maintains a plurality of combined weight coefficients corresponding to a plurality of input data that can selectively take a first logic value and a second logic value, and outputs output data of a first logic value or a second logic value based on a product and addition operation result of the plurality of input data and the corresponding combined weight coefficients, wherein the neural network operation circuit has, for each of the plurality of combined weight coefficients, a semiconductor storage element of at least 2 bits of a first semiconductor storage element and a second semiconductor storage element for storing the combined weight coefficient, and the plurality of combined weight coefficients respectively correspond to a total current value obtained by summing the current value of the current flowing through the first semiconductor storage element and the current value of the current flowing through the second semiconductor storage element.
[0019] Effects of the Invention
[0020] According to the neural network operation circuit disclosed in the present invention, the performance of the neural network operation is improved and the reliability of the semiconductor memory element that stores the combined weight coefficients is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a diagram showing the detailed structure of the neural network operation circuit according to the embodiment.
[0022] Figure 2 It is a diagram showing the structure of a deep neural network.
[0023] Figure 3 It is a diagram showing the calculation of neurons in neural network operation.
[0024] Figure 4 This is a diagram showing calculations when the calculation of bias coefficients is distributed to inputs and combined weight coefficients in the calculation of neurons in neural network calculations.
[0025] Figure 5 Graph showing activation functions of neurons in a neural network operation according to an embodiment.
[0026] Figure 6 It is a block diagram showing the overall structure of a neural network operation circuit according to an embodiment.
[0027] Figure 7A circuit diagram, a cross-sectional view, and a diagram showing applied voltages in each operation of a memory cell as a nonvolatile semiconductor memory element according to an embodiment.
[0028] Figure 8 This is a diagram showing the operation of a calculation and operation unit that represents the operation principle of a conventional neural network operation circuit.
[0029] Fig. 9 It is a diagram showing the operation of the calculation and operation unit that represents the operation principle of the neural network operation circuit according to the embodiment.
[0030] Fig.10 It is a diagram showing the detailed operation of the calculation unit according to the embodiment.
[0031] Fig.11 This is a diagram for explaining a method of writing a coupling weight coefficient in the variable resistance element of the calculation unit according to the embodiment by the storage method 1.
[0032] Fig.12 This is a diagram for explaining a method of writing a combined weight coefficient in a variable resistance element of a calculation unit according to an embodiment by storage method 2.
[0033] Fig.13 This is a diagram for explaining a method of writing a combination weight coefficient in the resistance variable element of the calculation unit according to the embodiment by the storage method 3.
[0034] Fig.14 It is a diagram for explaining the structure of a neural network operation circuit of a specific example.
[0035] Fig.15 This is a diagram showing a specific example of the current value storage method 1.
[0036] Fig.16 This is a diagram showing a specific example of the current value storage method 2.
[0037] Fig.17 This is a diagram showing a comparison between the prior art and the present embodiment with respect to a current value obtained as a result of a multiply-add operation relative to an ideal value of the result of a multiply-add operation.
[0038] Fig.18 This is a diagram showing a specific example of current value storage method 3.
[0039] Fig.19 It is a diagram showing a detailed structure of a neural network operation circuit according to a variation of the embodiment. DETAILED DESCRIPTION
[0040] Hereinafter, an embodiment of the neural network operation circuit of the present invention will be described with reference to the accompanying drawings. In addition, the embodiments described below all represent a specific example of the present invention. The numerical values, shapes, materials, constituent elements, configuration positions of constituent elements, connection methods, steps, order of steps, etc. shown in the following embodiments are examples and do not limit the subject matter of the present invention. In addition, the figures are not necessarily strictly illustrated. In each figure, the same reference numerals are given to substantially the same structures, and repeated descriptions are omitted or simplified. In addition, "connection" refers to electrical connection, which includes not only the case where two circuit elements are directly connected, but also the case where two circuit elements are indirectly connected in a state where other circuit elements are inserted between the two circuit elements.
[0041] Figure 1 : is a diagram showing the detailed structure of a neural network operation circuit according to an embodiment. More specifically, Figure 1 (a) is a diagram showing a neuron 10 used in a neural network operation of a neural network operation circuit according to an embodiment. Figure 1 (b) represents the implementation of the neural network operation circuit disclosed in the present invention. Figure 1 The detailed circuit structure diagram of the operation processing performed by the neuron (a) is a representative diagram showing the characteristics of the neural network operation circuit disclosed in the present invention. Figure 1 (a) and Figure 1 (b) is described in detail below.
[0042] <Neural network operation>
[0043] First, the basic theory of neural network operation is explained.
[0044] Figure 2 It is a diagram showing the structure of a deep neural network. The neural network is composed of an input layer 1 that inputs input data, a hidden layer 2 (sometimes also called an intermediate layer) that receives the input data of the input layer 1 and performs calculations, and an output layer 3 that receives the output data of the hidden layer 2 and performs calculations. In each of the input layer 1, the hidden layer 2, and the output layer 3, there are a plurality of basic elements of the neural network called neurons 10, and each neuron 10 is connected via a connection weight 11. The plurality of connection weights 11 respectively have different connection weight coefficients to connect the neurons. A plurality of input data is input to the neuron 10, and the multiplication and addition operations of these multiple input data and the corresponding connection weight coefficients are performed in the neuron 10 and output as output data. Here, the hidden layer 2 is connected with multiple layers ( Figure 2 The structure of neurons in the figure (4 layers) means that a deeper neural network is formed. Figure 2 The neural network shown is called a deep neural network.
[0045] Figure 31 is a diagram showing the calculation of neurons in a neural network operation. Here, the calculation formula performed by neuron 10 is shown in Figure 3 Equations (1) and (2). Neuron 10 is connected with n inputs x1~xn respectively having combination weights of combination weight coefficients w1~wn, and performs multiplication and accumulation operation of inputs x1~xn and combination weight coefficients w1~wn. Neuron 10 has a bias coefficient b, and the bias coefficient b is added to the multiplication and accumulation operation result of inputs x1~xn and combination weight coefficients w1~wn. Neuron 10 has an activation function f, and the result obtained by adding the bias coefficient b to the multiplication and accumulation operation result of inputs x1~xn and combination weight coefficients w1~wn is processed by the activation function, and the output y is output.
[0046] Figure 4 This is a diagram showing the calculation of the case where the calculation of the bias coefficient b is allocated to the input x0 and the combined weight coefficient w0 in the calculation of the neuron in the neural network calculation. The calculation formula performed by the neuron 10 is shown in Figure 4 In the above formula (1) and formula (2). Figure 3 In the example, neuron 10 performs multiplication and accumulation operations of input x1~xn and combined weight coefficients w1~wn and addition operations of bias coefficient b. Figure 4 As shown, the addition operation of the bias coefficient b can be interpreted as, assuming that the input x0=1, the connection weight coefficient w0=b, and the neuron 10 connected with n+1 inputs x0~xn respectively having connection weights of connection weight coefficients w0~wn. Figure 4 As shown in equations (1) and (2), the calculation of the neuron 10 can be simply expressed by the product-addition operation of the inputs x0 to xn and the combined weight coefficients w0 to wn. Figure 4 As shown, the addition operation of the bias coefficient b is expressed as input x0=1 and combined with the weight coefficient w0=b.
[0047] Figure 5 It is a diagram showing the activation function f of a neuron in a neural network operation. The horizontal axis is the input u of the activation function f, and the vertical axis is the output f(u) of the activation function f. In the embodiment of the neural network operation circuit disclosed in the present invention, the activation function f uses a step function. In addition, in the present embodiment, a step function is used as the activation function, but as other activation functions used in neural network operations, there are sigmoid functions and the like, and the neural network operation circuit disclosed in the present invention is not limited to the step function. Figure 5 As shown, the step function is a function that outputs f(u)=0 when the input u is a negative value (<0), and outputs f(u)=1 when the input u is a positive value (≥0). Figure 4In the neuron 10, when the activation function f of the step function is used, when the product-addition operation result of the input x0~xn and the combined weight coefficients w0~wn is a negative value, the output is y=0, and when the product-addition operation result is a positive value, the output is y=1.
[0048] <Overall structure of neural network operation circuit>
[0049] Figure 6 The neural network operation circuit of the present disclosure includes a memory cell array 20 , a word line selection circuit 30 , a column gate 40 , a determination circuit 50 , a write circuit 60 , and a control circuit 70 .
[0050] The memory cell array 20 is a matrix array of nonvolatile semiconductor memory elements, which store the combined weight coefficients used in the neural network calculation. The memory cell array 20 has a plurality of word lines WL0 to WLn, a plurality of bit lines BL0 to BLm, and a plurality of source lines SL0 to SLm.
[0051] The word line selection circuit 30 is a circuit for driving the word lines WL0 to WLn of the memory cell array 20. The word lines are placed in a selected state or a non-selected state in accordance with the input of the neurons in the neural network operation.
[0052] The column selector 40 is connected to the bit lines BL0 to BLm and the source lines SL0 to SLm, and is a circuit for selecting a predetermined bit line and source line from a plurality of bit lines and a plurality of source lines, and connecting the selected bit line and source line to the determination circuit 50 and the write circuit 60 described later.
[0053] The determination circuit 50 is a circuit that connects the bit lines BL0 to BLm and the source lines SL0 to SLm via the column selector 40, detects the current value flowing through the bit lines or the source lines and outputs output data. Its output is the reading result of the data stored in the storage cell of the storage cell array 20 and the output data of the neurons of the neural network operation.
[0054] The write circuit 60 is connected to the bit lines BL0 to BLm and the source lines SL0 to SLm via the column gate 40 , and applies a rewrite voltage to the nonvolatile semiconductor memory element of the memory cell array 20 .
[0055] The control circuit 70 is a circuit that controls the actions of the memory cell array 20, the word line selection circuit 30, the column selector 40, the determination circuit 50, and the write circuit 60, and is composed of a processor that controls the reading action, the writing action, and the neural network calculation action of the memory cells of the memory cell array 20.
[0056] <Structure of Nonvolatile Semiconductor Memory Element>
[0057] Figure 7 A circuit diagram, a cross-sectional view, and a diagram showing applied voltages in each operation of the nonvolatile semiconductor memory element according to the embodiment.
[0058] Figure 7 (a) is a component Figure 6 Circuit diagram of a memory cell MC of a nonvolatile semiconductor memory element in a memory cell array 20. The memory cell MC is composed of a series connection of a resistance change element RP and a cell transistor T0, and is a "1T1R" type memory cell composed of one cell transistor T0 and one resistance change element RP. The resistance change element RP is a nonvolatile semiconductor memory element called a resistance change memory ReRAM (Resistive Random Access Memory). The word line WL of the memory cell MC is connected to the gate terminal of the cell transistor T0, the bit line BL is connected to the resistance change element RP, and the source line SL is connected to the source terminal of the cell transistor T0.
[0059] Figure 7 (b) is Figure 7 (a) is a cross-sectional view of a memory cell MC. Diffusion regions 81a and 81b are formed on a semiconductor substrate 80. The diffusion region 81a functions as a source terminal of the cell transistor T0, and the diffusion region 81b functions as a drain terminal of the cell transistor. The region between the diffusion regions 81a and 81b functions as a channel region of the cell transistor T0. A gate electrode 83 formed of an oxide film 82 and polysilicon is formed on the channel region to operate as the cell transistor T0. The diffusion region 81a, which serves as the source terminal of the cell transistor T0, is connected to the source line SL, which serves as the first wiring layer 85a, via a through hole 84a. The diffusion region 81b, which serves as the drain terminal of the cell transistor T0, is connected to the first wiring layer 85b via a through hole 84b. Furthermore, the first wiring layer 85b is connected to the second wiring layer 87 via a through hole 86, and the second wiring layer 87 is connected to the variable resistance element RP via a through hole 88. The variable resistance element RP is composed of a lower electrode 89, a variable resistance layer 90, and an upper electrode 91. The resistance change element RP is connected to the bit line BL as the third wiring layer 93 via the via 92 .
[0060] Figure 7 (c) means Figure 7 (a) is a diagram showing applied voltages in each operation mode of a memory cell MC.
[0061] In the reset operation (high resistance), the cell transistor T0 is selected by applying a voltage of Vg_reset (e.g., 2V) to the word line WL, applying a voltage of Vreset (e.g., 2.0V) to the bit line BL, and applying a ground voltage VSS (0V) to the source line SL. As a result, a positive voltage is applied to the upper electrode of the variable resistance element RP, and the resistance of the variable resistance element RP changes to a high resistance state.
[0062] In the set operation (low resistance), the cell transistor T0 is selected by applying a voltage of Vg_set (e.g., 2.0 V) to the word line WL, applying a ground voltage VSS (0 V) to the bit line BL, and applying a voltage of Vset (e.g., 2.0 V) to the source line SL. As a result, a positive voltage is applied to the lower electrode of the resistance variable element RP, and the resistance of the resistance variable element RP changes to a low resistance state.
[0063] In the read operation, the cell transistor T0 is selected by applying a voltage of Vg_read (e.g., 1.1V) to the word line WL, a voltage of Vread (e.g., 0.4V) is applied to the bit line BL, and a ground voltage VSS (0V) is applied to the source line SL. Thus, when the resistance change element RP is in a high resistance state (reset state), a small memory cell current flows through the resistance change element RP, and when the resistance change element RP is in a low resistance state (set state), a large memory cell current flows through the resistance change element RP. The difference in the current values is determined by the determination circuit, and the data stored in the memory cell MC is read.
[0064] When the memory cell MC is used as a semiconductor memory for storing data 0 or data 1, the resistance value of the resistance change element RP can take only two resistance states (digital), a high resistance state (data 0) and a low resistance state (data 1). However, when used as a neural network operation circuit disclosed in the present invention, the resistance value of the resistance change element RP is set to a multi-level (i.e., analog) value for use.
[0065] <Detailed structure of neural network operation circuit>
[0066] Figure 1 It is a diagram showing the detailed structure of a neural network operation circuit according to an embodiment.
[0067] Figure 1 (a) is a diagram showing a neuron 10 used in a neural network operation of a neural network operation circuit according to an embodiment, and Figure 4The n+1 inputs x0~xn are input to the neuron 10 with the combined weight coefficients w0~wn respectively. The inputs x0~xn can take any value of 0 data or 1 data, and the combined weight coefficients w0~wn can take multiple levels (simulated) of values. The product and accumulation operation results of the inputs x0~xn and the combined weight coefficients w0~wn are performed. Figure 5 The activation function f shown as a step function is calculated to output the output y. In addition, 0 data and 1 data are examples of one and the other of the first logical value and the second logical value that the input data can selectively take, respectively.
[0068] Figure 1 (b) means to proceed Figure 1 (a) is a diagram showing a detailed circuit configuration of arithmetic processing of the neuron 10. The memory cell array 20 includes a plurality of word lines WL0 to WLn, a plurality of bit lines BL0, BL1, BL2, BL3, and a plurality of source lines SL0, SL1, SL2, SL3.
[0069] Word lines WL0 to WLn correspond to inputs x0 to xn of neuron 10, input x0 corresponds to word line WL0, input x1 corresponds to word line WL1, input xn-1 corresponds to word line WLn-1, and input xn corresponds to word line WLn. Word line selection circuit 30 is a circuit that makes word lines WL0 to WLn a selected state or a non-selected state according to inputs x0 to xn. For example, when the input is 0 data, the word line is set to a non-selected state, and when the input is 1 data, the word line is set to a selected state. In neural network operations, inputs x0 to xn can each arbitrarily take values of 0 data or 1 data, so when there are multiple 1 data in inputs x0 to xn, word line selection circuit 30 selects multiple word lines at the same time.
[0070] The operation units PU0~PUn composed of storage units correspond to the combined weight coefficients w0~wn of the neuron 10, the combined weight coefficient w0 corresponds to the operation unit PU0, the combined weight coefficient w1 corresponds to the operation unit PU1, the combined weight coefficient wn-1 corresponds to the operation unit PUn-1, and the combined weight coefficient wn corresponds to the operation unit PUn.
[0071] The operation unit PU0 includes: a first storage unit, which is composed of a series connection of a resistance change element RPA0 as an example of a first semiconductor storage element and a unit transistor TPA0 as an example of a first unit transistor; a second storage unit, which is composed of a series connection of a resistance change element RPB0 as an example of a second semiconductor storage element and a unit transistor TPB0 as an example of a second unit transistor; a third storage unit, which is composed of a series connection of a resistance change element RNA0 as an example of a third semiconductor storage element and a unit transistor TNA0 as an example of a third unit transistor; and a fourth storage unit, which is composed of a series connection of a resistance change element RNB0 as an example of a fourth semiconductor storage element and a unit transistor TNB0 as an example of a fourth unit transistor. That is, one operation unit is composed of four storage units.
[0072] The first semiconductor storage element and the second semiconductor storage element are used to store a positive combined weight coefficient among the combined weight coefficients, and the positive combined weight coefficient corresponds to the total current value obtained by adding the current value of the current flowing through the first semiconductor storage element and the current value of the current flowing through the second semiconductor storage element. On the other hand, the third semiconductor storage element and the fourth semiconductor storage element are used to store a negative combined weight coefficient among the combined weight coefficients, and the negative combined weight coefficient corresponds to the total current value obtained by adding the current value of the current flowing through the third semiconductor storage element and the current value of the current flowing through the fourth semiconductor storage element.
[0073] The operation unit PU0 is connected to the word line WL0 as an example of the first word line, the bit line BL0 as an example of the first data line, the bit line BL1 as an example of the third data line, the bit line BL2 as an example of the fifth data line, the bit line BL3 as an example of the seventh data line, the source line SL0 as an example of the second data line, the source line SL1 as an example of the fourth data line, the source line SL2 as an example of the sixth data line, and the source line SL3 as an example of the eighth data line. The word line WL0 is connected to the gate terminals of the unit transistors TPA0, TPB1, TNA0, and TNB0, the bit line BL0 is connected to the resistance change element RPA0, the bit line BL1 is connected to the resistance change element RPB0, the source line SL0 is connected to the source terminal of the unit transistor TPA0, the source line SL1 is connected to the source terminal of the unit transistor TPB0, the bit line BL2 is connected to the resistance change element RNA0, the bit line BL3 is connected to the resistance change element RNB0, the source line SL2 is connected to the source terminal of the unit transistor TNA0, and the source line SL3 is connected to the source terminal of the unit transistor TNB0.
[0074] The input x0 is input by the word line WL0 of the operation unit PU0, and is combined with the weight coefficient w0 as a resistance value (in other words, conductance) stored in the four resistance change elements RPA0, RPB0, RNA0, and RNB0 of the operation unit PU0. The structures of the operation units PU1, PUn-1, and PUn are also the same as the structure of the operation unit PU0, so the detailed description is omitted. That is, the inputs x0~xn are respectively input by the word lines WL0~WLn connected to the operation units PU0~PUn, and are combined with the weight coefficients w0~wn as resistance values (in other words, conductance) stored in the resistance change elements RPA0~RPAn, RPB0~RPBn, RNA0~RNAn, and RNB0~RNBn of the operation units PU0~PUn.
[0075] The bit lines BL0 and BL1 are connected to the determination circuit 50 via the column selector transistors YT0 and YT1, respectively. The bit lines BL2 and BL3 are connected to the determination circuit 50 via the column selector transistors YT2 and YT3. The gate terminals of the column selector transistors YT0, YT1, YT2, and YT3 are connected to the column selector control signal YG, and when the column selector control signal YG is activated, the bit lines BL0, BL1, BL2, and BL3 are connected to the determination circuit 50.
[0076] The source lines SL0, SL1, SL2, and SL3 are connected to the ground voltage via the discharge transistors DT0, DT1, DT2, and DT3, respectively. The gate terminals of the discharge transistors DT0, DT1, DT2, and DT3 are connected to the discharge control signal DIS. When the discharge control signal DIS is activated, the source lines SL0, SL1, SL2, and SL3 are set to the ground voltage.
[0077] When performing a neural network operation, the column selector control signal YG and the discharge control signal DIS are activated to connect the bit lines BL0, BL1, BL2, and BL3 to the determination circuit 50 and connect the source lines SL0, SL1, SL2, and SL3 to the ground voltage.
[0078] The determination circuit 50 detects the total of the current values flowing through the bit lines BL0 and BL1 connected via the column selector transistors YT0, YT1, YT2, and YT3 (the value obtained by the total is also referred to as a "first total current value"), and the total of the current values flowing through the bit lines BL2 and BL3 (the value obtained by the total is also referred to as a "third total current value"), and compares the detected first total current value and the third total current value to output an output y. The output y can take either a value of 0 data or 1 data.
[0079] In more detail, the determination circuit 50 outputs an output y of data 0 when the first total current value is smaller than the third total current value, and outputs an output y of data 1 when the first total current value is larger than the third total current value. That is, the determination circuit 50 is a circuit that determines the magnitude relationship between the first total current value and the third total current value and outputs the output y.
[0080] In addition, instead of determining the magnitude relationship between the first total current value and the third total current value, the determination circuit 50 may detect the total of the current values flowing through the source line SL0 and the source line SL1 (the value obtained by the total will also be referred to as the "second total current value"), and the total of the current values flowing through the source line SL2 and the source line SL3 (the value obtained by the total will also be referred to as the "fourth total current value"), compare the detected second total current value and the fourth total current value, and output the output y.
[0081] This is because the current flowing through the bit line BL0 (strictly speaking, the column enable transistor YT0) is equal to the current flowing through the source line SL0 (strictly speaking, the discharge transistor DT0), the current flowing through the bit line BL1 (strictly speaking, the column enable transistor YT1) is equal to the current flowing through the source line SL1 (strictly speaking, the discharge transistor DT1), the current flowing through the bit line BL2 (strictly speaking, the column enable transistor YT2) is equal to the current flowing through the source line SL2 (strictly speaking, the discharge transistor DT2), and the current flowing through the bit line BL3 (strictly speaking, the column enable transistor YT3) is equal to the current flowing through the source line SL3 (strictly speaking, the discharge transistor DT3).
[0082] That is, the determination circuit 50 may determine the magnitude relationship between the first total current value or the second total current value and the third total current value or the fourth total current value and output data of the first logic value or the second logic value.
[0083] Furthermore, when the neural network operation circuit has a conversion circuit such as a shunt resistor that converts the first to fourth total current values into a voltage, the determination circuit 50 may perform similar determination using the first to fourth voltage values corresponding to the first to fourth total current values.
[0084] As described above, in the present embodiment, the first semiconductor storage element and the second semiconductor storage element maintain a positive combined weight coefficient, so that the first total current value or the second total current value becomes a current value corresponding to the product-addition operation result of a plurality of input data whose corresponding combined weight coefficient is a positive value and the corresponding positive combined weight coefficient. On the other hand, the third semiconductor storage element and the fourth semiconductor storage element maintain a negative combined weight coefficient, so that the third total current value or the fourth total current value becomes a current value corresponding to the product-addition operation result of a plurality of input data whose corresponding combined weight coefficient is a negative value and the corresponding negative combined weight coefficient.
[0085] In addition, in each operation unit of the present embodiment, in order to simplify the description, an example is described in which a positive weight coefficient is composed of 2 storage units and a negative weight coefficient is composed of 2 storage units, but the positive weight coefficient and the negative weight coefficient can be composed of 1 storage unit to n storage units respectively, and the structure is not limited. That is, in each operation unit of the present disclosure, it is characterized in that at least one of the positive weight coefficient or the negative weight coefficient is composed of more than two storage units. Furthermore, each operation unit of the present disclosure does not necessarily need to have both a positive weight coefficient and a negative weight coefficient, and may also have a weight coefficient (that is, an unsigned weight coefficient) composed of at least two storage units.
[0086] The operating principle and operating method of the neural network operation circuit configured as above and the method of storing the combined weight coefficients in the variable resistance element are described in detail below.
[0087] <Operation Principle of Neural Network Operation Circuit>
[0088] Fig. 9 It is a diagram showing the operation of the calculation and operation unit that represents the operation principle of the neural network operation circuit according to the embodiment.
[0089] Fig. 9 (a) is a diagram showing a calculation that represents the operating principle of the neural network operation circuit of the embodiment. Fig. 9 As shown in formula (1) of (a), the operation performed by the neuron 10 is to perform an operation processing on the result of the multiplication and addition operation of the input xi and the combined weight coefficient wi using the activation function f as a step function. In the neural network operation disclosed in the present invention, Fig. 9 As shown in formula (2) of (a), it is characterized in that the combined weight coefficient wi is replaced by the current value Ii flowing through the resistance change element (in other words, the storage unit), and the input xi and the current value Ii flowing through the resistance change element are multiplied and added.
[0090] Here, the combined weight coefficient wi in the neural network operation takes both positive values (≥0) and negative values (<0). In the multiplication and addition operation, when the product of the input xi and the combined weight coefficient wi is positive, an addition operation is performed, and when it is negative, a subtraction operation is performed. However, since the current value Ii flowing through the variable resistance element can only take positive values, the addition operation when the product of the input xi and the combined weight coefficient wi is positive can be realized by the addition operation of the current value Ii, but the use of the positive current value Ii to perform the subtraction operation when the product of the input xi and the combined weight coefficient wi is negative needs to be studied.
[0091] Fig. 9 (b) is a diagram showing the operation of the operation unit PUi according to the embodiment. The structure of the operation unit PUi is Figure 1 (a) and Figure 1 (b) is described, and the detailed description is omitted. The neural network operation circuit disclosed in the present invention is characterized in that the combined weight coefficient wi is stored in the four resistance change elements RPA0, RPB0, RNA0, and RNB0, the resistance value set for the resistance change element RPA0 is set to Rpai, the resistance value set for the resistance change element RPB0 is set to Rpbi, the resistance value set for the resistance change element RNA0 is set to Rnai, the resistance value set for the resistance change element RNB0 is set to Rnbi, the voltage applied to the bit lines BL0, BL1, BL2, and BL3 is set to Vbl, the total current value flowing through the resistance change elements RPA0 and RPB0 is set to Ipi, and the total current value flowing through the resistance change elements RNA0 and RNB0 is set to Ini.
[0092] In the neural network operation circuit disclosed in the present invention, it is characterized in that the positive multiplication and addition operation result is added to the current flowing through the bit lines BL0 and BL1, and the negative multiplication and addition operation result is added to the current flowing through the bit lines BL2 and BL3, and the resistance values Rpai, Rpbi, Rnai, and Rnbi (in other words, the current values Ipi and Ini) of the resistance variable elements RPA0, RPB0, RNA0, and RNB0 are set in a manner that the current flows as described above. By setting the operation unit PUi as Figure 1 As shown in (b), by connecting the number of inputs x0~xn (corresponding to the combined weight coefficients w0~wn) in parallel to the bit lines BL0, BL1, BL2, and BL3, the positive multiplication and addition operation result of the neuron 10 can be obtained as the first total current value flowing through the bit lines BL0 and BL1, and the negative multiplication and addition operation result can be obtained as the third total current value flowing through the bit lines BL2 and BL3.
[0093] Fig. 9The equations (3), (4) and (5) of (a) represent the calculation of the above-mentioned operation. That is, by appropriately writing the resistance values Rpai, Rpbi, Rnai and Rnbi corresponding to the combined weight coefficient wi to the resistance variable elements RPA0, RPB0, RNA0 and RNB0 of the operation unit PUi, it is possible to obtain the current value corresponding to the positive multiplication-addition operation result on the bit lines BL0 and BL1, and the current value corresponding to the negative multiplication-addition operation result on the bit lines BL2 and BL3.
[0094] exist Fig. 9 In formula (5) of (a), the activation function f is a step function (when the input is a negative value (<0), the data output is 0, and when the input is a positive value (≥0), the data output is 1). Therefore, the current values flowing through the bit lines BL0, BL1, BL2, and BL3 are detected and determined. When the sum of the current values flowing through the bit lines BL0 and BL1 as the positive multiplication and addition operation result (i.e., the first total current value) is smaller than the sum of the current values flowing through the bit lines BL2 and BL3 as the negative multiplication and addition operation result (i.e., the third total current value), that is, when all the products are When the cumulative addition operation result is a negative value, data 0 is output; when the sum of the current values flowing through the bit lines BL0 and BL1 as the positive multiplication and addition operation result (i.e., the first total current value) is greater than the sum of the current values flowing through the bit lines BL2 and BL3 as the negative multiplication and addition operation result (the third total current value), that is, when all the multiplication and addition operation results are positive values, data 1 is output, thereby realizing the neural network operation of the neuron 10 using the operation unit PUi having the resistance change elements RPA0, RPB0, RNA0, and RNB0.
[0095] Next, regarding a method of storing the combined weight coefficients of the neural network operation circuit configured as above in the variable resistance element, three storage methods 1 to 3 will be described in detail according to their purposes.
[0096] First, use Fig.10 The following describes matters common to the three storage methods 1 to 3. Fig.10 It is a diagram showing the detailed operation of the calculation unit according to the embodiment.
[0097] Fig.10 (a) is a diagram showing the operation of the operation unit PUi. Fig.10 (a) and Fig. 9 The following is a description of the operation of multiplying and adding the input xi and the combined weight coefficient wi in the operation unit PUi.
[0098] Fig.10(b) is a diagram showing the state of the word line WLi of the input xi of the operation unit PUi of the implementation method. The input xi takes any value of 0 data or 1 data. When the input xi is 0 data, the word line WLi is in a non-selected state. When the input xi is 1 data, the word line WLi is in a selected state. The word line WLi is connected to the gate terminals of the unit transistors TPA0, TPB0, TNA0, and TNB0. When the word line WLi is in a non-selected state, the unit transistors TPA0, TPB0, TNA0, and TNB0 become inactive (cut-off state), regardless of the resistance values Rpai, Rpbi, Rnai, and Rnbi of the resistance change elements RPA0, RPB0, RNA0, and RNB0, and the current does not flow through the bit lines BL0, BL1, BL2, and BL3. On the other hand, when the word line WLi is in the selected state, the unit transistors TPA0, TPB0, TNA0, and TNB0 become activated (i.e., connected), and the current flows through the bit lines BL0, BL1, BL2, and BL3 based on the resistance values Rpai, Rpbi, Rnai, and Rnbi of the resistance change elements RPA0, RPB0, RNA0, and RNB0, respectively.
[0099] Fig.10 (c) is a diagram showing the current range of the resistance change elements RPA, RPB, RNA, and RNB of the operation unit PUi of the implementation method. The range of the current value flowing through the resistance change elements RPA, RPB, RNA, and RNB is set to be from the minimum value Imin to the maximum value Imax for explanation. Regularization is performed in a manner that the absolute value |wi| of the combined weight coefficient input to the neuron becomes a range of 0 to 1, and the current value written to the resistance change element is determined in a manner that becomes a current value (i.e., an analog value) proportional to the regularized combined weight coefficient |wi|.
[0100] <Method 1 for storing combined weight coefficients>
[0101] Fig.11 This is a diagram for explaining a method of writing a combination weight coefficient into the resistance variable element of the calculation unit according to the embodiment by the storage method 1. Fig.11 (a) is a diagram showing calculation of current values for writing the combined weight coefficients into the resistance variable elements RPA, RPB, RNA, and RNB of the calculation unit PUi by the storage method 1.
[0102] When the combined weight coefficient wi is a positive value (≥0) and less than one-half (<0.5), in storage method 1, the combined weight coefficient wi (≥0) is formed with a current value that is twice the current value Imax that can be written into one storage cell, so the product-addition operation result (≥0) of the input xi (0 data or 1 data) and the combined weight coefficient wi (≥0) is added as a current value to the bit line BL0 through which the current of the positive product-addition operation result flows. Therefore, the resistance change element RPA connected to the bit line BL0 is written with a resistance value Rpai of a current value Imin+(Imax-Imin)×|wi|×2 that is proportional to the absolute value |wi| of the combined weight coefficient. In addition, the resistance change elements RPB, RNA, and RNB connected to the bit lines BL1, BL2, and BL3 are written with resistance values Rpbi, Rnai, and Rnbi of a current value Imin (equivalent to a combined weight coefficient of 0).
[0103] Next, when the combined weight coefficient wi is a positive value (≥0) and is greater than one-half (≥0.5), in the neural network operation circuit of the present disclosure, the combined weight coefficient wi (≥0) is formed with a current value that is twice the current value Imax that can be written to a storage unit, so that the resistance value Rpai of the resistance change element RPA connected to the bit line BL0 is written with a current value of Imin+(Imax-Imin). Furthermore, the resistance value Rpbi of the resistance change element RPB connected to the bit line BL1 is written with a current value of Imin+(Imax-Imin)×|wi|×2-(Imax-Imin). In addition, the resistance values Rnai and Rnbi of the resistance change elements RNA and RNB connected to the bit lines BL2 and BL3 are written with a current value of Imin (equivalent to the combined weight coefficient 0).
[0104] On the other hand, when the combined weight coefficient wi is a negative value (<0) and greater than negative half (>-0.5), in the neural network operation circuit of the present disclosure, the combined weight coefficient wi (<0) is formed by a current value that is twice the current value Imax that can be written into one storage unit, so that the resistance variable element RNA connected to the bit line BL2 is written with a resistance value Rnai of a current value Imin+(Imax-Imin)×|wi|×2 proportional to the absolute value |wi| of the combined weight coefficient. In addition, the resistance variable elements RPA, RPB, and RNB connected to the bit lines BL0, BL1, and BL3 are written with resistance values Rpai, Rpbi, and Rnbi of a current value Imin (equivalent to a combined weight coefficient of 0).
[0105] Next, when the combined weight coefficient wi is a negative value (<0) and less than negative half (≤-0.5), in the neural network operation circuit of the present disclosure, the combined weight coefficient wi (<0) is formed by a current value that is twice the current value Imax that can be written into one storage unit, so that the resistance value Rnai of the resistance change element RNA connected to the bit line BL2 is written with a current value of Imin+(Imax-Imin). Furthermore, the resistance value Rnbi of the resistance change element RNB connected to the bit line BL3 is written with a current value of Imin+(Imax-Imin)×|wi|×2-(Imax-Imin). In addition, the resistance values Rpai and Rpbi of the resistance change elements RPA and RPB connected to the bit lines BL0 and BL1 are written with a current value of Imin (equivalent to the combined weight coefficient 0).
[0106] By setting the resistance value (current value) written to the resistance variable elements RPA, RPB, RNA, and RNB as described above, according to storage method 1, the difference current (Imax-Imin)×|wi|×2 of the total current value flowing through the bit lines BL0 and BL1 (equivalent to the positive multiplication and addition result) and the total current value flowing through the bit lines BL2 and BL3 (equivalent to the negative multiplication and addition result) is obtained as the current value corresponding to the multiplication and addition result of the input and the combined weight coefficient. The details of the method of normalizing the absolute value |wi| of the combined weight coefficient to the range of 0 to 1 are described later.
[0107] Fig.11 (b) is a diagram showing the operation of multiplication and addition of the input xi and the connection weight coefficient wi of the operation unit PUi to which the connection weight coefficient is written by the storage method 1.
[0108] When the input xi is 0 data, the multiplication-addition operation result xi×wi is 0 regardless of the value of the combined weight coefficient wi. Since the input xi is 0 data, the word line WLi becomes a non-selected state, and the cell transistors TPA0, TPB0, TNA0, and TNB0 become a non-activated state (disconnected state), so the current values Ipi and Ini flowing through the bit lines BL0, BL1, BL2, and BL3 become 0. That is, the multiplication-addition operation result xi×wi is 0, so no current flows through the bit lines BL0 and BL1 through which the current corresponding to the positive multiplication-addition operation result flows, and the bit lines BL2 and BL3 through which the current corresponding to the negative multiplication-addition operation result flows.
[0109] When the input xi is 1 data and the combined weight coefficient wi is a positive value (≥0), the product-addition operation result xi×wi is a positive value (≥0). Since the input xi is 1 data, the word line WLi becomes selected, and the unit transistors TPA0, TPB0, TNA0, and TNB0 become activated (connected). Therefore, based on the resistance values of the resistance variable elements RPA, RPB, RNA, and RNB, the bit lines BL0, BL1, BL2, and BL3 flow. Fig.11 The currents Ipi and Ini described in (a) of FIG. The difference current ((Imax-Imin)×|wi|)×2 between the current Ipi corresponding to the positive multiplication-addition result flowing through the bit lines BL0 and BL1 and the current Ini corresponding to the negative multiplication-addition result flowing through the bit lines BL2 and BL3 is a current corresponding to the multiplication-addition result xi×wi (≥0) of the input xi and the combined weight coefficient wi, and flows more through the bit lines BL0 and BL1 than through the bit lines BL2 and BL3.
[0110] On the other hand, when the input xi is 1 data and the combined weight coefficient wi is a negative value (<0), the product-addition operation result xi×wi is a negative value (<0). Since the input xi is 1 data, the word line WLi becomes selected, and the unit transistors TPA0, TPB0, TNA0, and TNB0 become activated (connected), so based on the resistance values of the resistance variable elements RPA, RPB, RNA, and RNB, the bit lines BL0, BL1, BL2, and BL3 flow. Fig.11 The currents Ipi and Ini described in (a) of FIG. The difference current ((Imax-Imin)×|wi|)×2 between the current Ipi corresponding to the positive multiplication-addition result flowing through the bit lines BL0 and BL1 and the current Ini corresponding to the negative multiplication-addition result flowing through the bit lines BL2 and BL3 is a current corresponding to the multiplication-addition result xi×wi (≤0) of the input xi and the combined weight coefficient wi, and flows more through the bit lines BL2 and BL3 than through the bit lines BL0 and BL1.
[0111] Thus, according to the storage method 1, the current equivalent to the result of the multiplication and addition operation of the input xi and the combined weight coefficient wi flows through the bit lines BL0, BL1, BL2, and BL3, and in the case of a positive multiplication and addition operation result, more current flows through the bit lines BL0 and BL1 than through the bit lines BL2 and BL3, and in the case of a negative multiplication and addition operation result, more current flows through the bit lines BL2 and BL3 than through the bit lines BL0 and BL1. By connecting the operation unit PUi in parallel to the bit lines BL0, BL1, BL2, and BL3 by the number of inputs x0 to xn (combined weight coefficients w0 to wn), the multiplication and addition operation result of the neuron 10 can be obtained as the difference current between the current flowing through the bit lines BL0 and BL1 and the current flowing through the bit lines BL2 and BL3.
[0112] Here, a determination circuit connected to the bit lines BL0, BL1, BL2, and BL3 is used. When the total current value flowing through the bit lines BL0 and BL1 is less than the total current value flowing through the bit lines BL2 and BL3, that is, when the result of the multiplication and addition operation is a negative value, output data 0 is output. When the total current value flowing through the bit lines BL0 and BL1 is greater than the total current value flowing through the bit lines BL2 and BL3, that is, when the result of the multiplication and addition operation is a positive value, output data 1 is output. Thus, the determination circuit is equivalent to the operation of the activation function of the step function, and can realize the neural network operation that performs the multiplication and addition operation and the operation processing of the activation function.
[0113] According to storage method 1, compared with the existing technology in which each operation unit is composed of two storage units, the current value flowing through each operation unit can be doubled (that is, the dynamic range is expanded), and the high performance of the multiplication and addition operation in the neural network operation circuit can be achieved.
[0114] In addition, in storage method 1, in order to simplify the description, an operation unit consisting of two storage units constituting a positive weight coefficient and two storage units constituting a negative weight coefficient is used as an example for explanation, but the positive weight coefficient and the negative weight coefficient can be respectively constituted by 1 storage unit to n storage units, and the structure is not limited. In this case, the combined weight coefficient wi can be constituted by n times the current value. The neural network operation circuit disclosed in the present invention is characterized in that at least one of the positive weight coefficient or the negative weight coefficient is constituted by two or more storage units.
[0115] Fig.12 This is a diagram for explaining a method of writing a combination weight coefficient into the resistance variable element of the calculation unit according to the embodiment by the storage method 2. Fig.12(a) is a diagram showing the calculation of the current value for writing the combined weight coefficient into the resistance variable elements RPA, RPB, RNA, and RNB of the calculation unit PUi by the storage method 2. In storage method 2, since the combined weight coefficient wi (≥0) is composed of a current value that is half of the current value Imax that can be written to a storage unit, when the combined weight coefficient wi is a positive value (≥0), the product and addition result (≥0) of the input xi (0 data or 1 data) and the combined weight coefficient wi (≥0) is written to the resistance change element RPA connected to the bit line BL0 through which the current of the positive product and addition result flows, and a resistance value Rpai of half the current value proportional to the absolute value |wi| of the combined weight coefficient, i.e., Imin+(Imax-Imin)×|wi| / 2, is written. Similarly, in order to perform addition operation on the bit line BL1 as a current value, a resistance value Rpbi of half the current value proportional to the absolute value |wi| of the combined weight coefficient, i.e., Imin+(Imax-Imin)×|wi| / 2, is written to the resistance change element RPB connected to the bit line BL1. In addition, resistance values Rnai and Rnbi having a current value Imin (corresponding to a weight coefficient of 0) are written to the variable resistance elements RNA and RNB connected to the bit lines BL2 and BL3 .
[0116] On the other hand, when the combined weight coefficient wi is a negative value (<0), the product-addition operation result (<0) of the input xi (0 data or 1 data) and the combined weight coefficient wi (<0) is written with a resistance value Rnai of half the current value proportional to the absolute value |wi| of the combined weight coefficient, that is, Imin+(Imax-Imin)×|wi| / 2, to the resistance variable element RNA connected to the bit line BL2 through which the current of the negative product-addition operation result flows. Similarly, in order to perform addition operation on the bit line BL3 as a current value, the resistance variable element Rnbi of half the current value proportional to the absolute value |wi| of the combined weight coefficient, that is, Imin+(Imax-Imin)×|wi| / 2, is written to the resistance variable element RNB connected to the bit line BL3. In addition, the resistance values Rpai and Rpbi of the current value Imin (equivalent to the combined weight coefficient 0) are written to the resistance variable elements RPA and RPB connected to the bit lines BL0 and BL1.
[0117] By setting the resistance value (current value) written to the resistance variable elements RPA, RPB, RNA, and RNB as described above, according to storage method 2, the difference current (Imax-Imin)×|wi| of the sum of the current values flowing through the bit lines BL0 and BL1 (equivalent to the positive multiplication and addition result) and the sum of the current values flowing through the bit lines BL2 and BL3 (equivalent to the negative multiplication and addition result) is obtained as the current value equivalent to the multiplication and addition result of the input and the combined weight coefficient. The details of the method of normalizing the absolute value |wi| of the combined weight coefficient to the range of 0 to 1 will be described later.
[0118] Fig.12 (b) is a diagram showing the multiplication and addition operation of the input xi and the combination weight coefficient wi of the operation unit PUi in which the combination weight coefficient is written by the storage method 2.
[0119] When the input xi is 0 data, Fig.11 is the same as (b), so the detailed description is omitted here.
[0120] When the input xi is 1 data and the combined weight coefficient wi is a positive value (≥0), the product-addition operation result xi×wi is a positive value (≥0). Since the input xi is 1 data, the word line WLi becomes selected, and the unit transistors TPA0, TPB0, TNA0, and TNB0 become activated (connected). Therefore, based on the resistance values of the resistance variable elements RPA, RPB, RNA, and RNB, the bit lines BL0, BL1, BL2, and BL3 flow. Fig.12 The currents Ipi and Ini described in (a) of FIG. The difference current ((Imax-Imin)×|wi|) between the current Ipi corresponding to the positive multiplication-addition result flowing through the bit lines BL0 and BL1 and the current Ini corresponding to the negative multiplication-addition result flowing through the bit lines BL2 and BL3 is a current corresponding to the multiplication-addition result xi×wi (≥0) of the input xi and the combined weight coefficient wi, and flows more through the bit lines BL0 and BL1 than through the bit lines BL2 and BL3.
[0121] On the other hand, when the input xi is 1 data and the combined weight coefficient wi is a negative value (<0), the product-addition operation result xi×wi is a negative value (<0). Since the input xi is 1 data, the word line WLi becomes selected, and the unit transistors TPA0, TPB0, TNA0, and TNB0 become activated (connected), so based on the resistance values of the resistance variable elements RPA, RPB, RNA, and RNB, the bit lines BL0, BL1, BL2, and BL3 flow. Fig.12The currents Ipi and Ini described in (a) of FIG. The difference current ((Imax-Imin)×|wi|) between the current Ipi corresponding to the positive multiplication-addition result in the bit lines BL0 and BL1 and the current Ini corresponding to the negative multiplication-addition result in the bit lines BL2 and BL3 flows more in the bit lines BL2 and BL3 than in the bit lines BL0 and BL1 as a current corresponding to the multiplication-addition result xi×wi (≤0) of the input xi and the combined weight coefficient wi.
[0122] Thus, according to the storage method 2, the current equivalent to the result of the multiplication and addition operation of the input xi and the combined weight coefficient wi flows through the bit lines BL0, BL1, BL2, and BL3. In the case of a positive multiplication and addition operation result, more current flows through the bit lines BL0 and BL1 than through the bit lines BL2 and BL3, and in the case of a negative multiplication and addition operation result, more current flows through the bit lines BL2 and BL3 than through the bit lines BL0 and BL1. By connecting the operation unit PUi in parallel with the bit lines BL0, BL1, BL2, and BL3 by the number of inputs x0 to xn (combined weight coefficients w0 to wn), the result of the multiplication and addition operation of the neuron 10 can be obtained as the difference current between the current flowing through the bit lines BL0 and BL1 and the current flowing through the bit lines BL2 and BL3.
[0123] Here, a determination circuit connected to the bit lines BL0, BL1, BL2, and BL3 is used. When the total current value flowing through the bit lines BL0 and BL1 is less than the total current value flowing through the bit lines BL2 and BL3, that is, when the result of the multiplication and addition operation is a negative value, output data 0 is output; when the total current value flowing through the bit lines BL0 and BL1 is greater than the total current value flowing through the bit lines BL2 and BL3, that is, when the result of the multiplication and addition operation is a positive value, output data 1 is output. Thus, the determination circuit is equivalent to the operation of the activation function of the step function, and can realize the neural network operation that performs the multiplication and addition operation and the operation processing of the activation function.
[0124] According to storage method 2, compared with the prior art in which each operation unit is composed of two storage units, the current value flowing through each operation unit can be reduced to 1 / 2, and the performance of the multiplication and addition operation in the neural network operation circuit can be improved.
[0125] In addition, in storage method 2, in order to simplify the description, an operation unit consisting of two storage units constituting a positive weight coefficient and two storage units constituting a negative weight coefficient is used as an example for explanation, but the positive weight coefficient and the negative weight coefficient can be respectively constituted by 1 storage unit to n storage units, and the structure is not limited. In this case, the combined weight coefficient wi can be constituted by a current value of 1 / n. The neural network operation circuit disclosed in the present invention is characterized in that at least one of the positive weight coefficient or the negative weight coefficient is constituted by two or more storage units.
[0126] <Method 3 for storing combined weight coefficients>
[0127] Fig.13 This is a diagram for explaining a method of writing a combination weight coefficient into the resistance variable element of the calculation unit according to the embodiment by the storage method 3. Fig.13 (a) is a diagram showing calculation of current values for writing the combined weight coefficients into the resistance variable elements RPA, RPB, RNA, and RNB of the calculation unit PUi by the storage method 3.
[0128] When the combination weight coefficient wi is a positive value (≥0) and less than one half (<0.5), in order to add the product-addition operation result (≥0) of the input xi (0 data or 1 data) and the combination weight coefficient wi (≥0) as a current value to the bit line BL0 through which the current of the positive product-addition operation result flows, the resistance change element RPA connected to the bit line BL0 is written with a resistance value Rpai of a current value Imin+(Imax-Imin)×|wi| that is proportional to the absolute value of the combination weight coefficient |wi|.
[0129] Here, in the storage method 3, the writing algorithm is changed according to the size of the combined weight coefficient wi, so when the combined weight coefficient wi is a positive value (≥0) and is greater than one-half (≥0.5), in order to add the positive product-addition operation result as a current value to the bit line BL1, the resistance value Rpbi of the current value Imin+(Imax-Imin)×|wi| proportional to the absolute value |wi| of the combined weight coefficient is written to the resistance variable element RPB connected to the bit line BL1. In addition, the resistance values Rnai and Rnbi of the current value Imin (equivalent to the combined weight coefficient 0) are written to the resistance variable elements RNA and RNB connected to the bit lines BL2 and BL3.
[0130] On the other hand, when the binding weight coefficient wi is a negative value (<0) and greater than negative half (>-0.5), in order to add the product-addition operation result (<0) of the input xi (0 data or 1 data) and the binding weight coefficient wi (<0) as a current value to the bit line BL2 through which the current of the negative product-addition operation result flows, the resistance value Rnai of the resistance change element RNA connected to the bit line BL2 is written through which the current value Imin+(Imax-Imin)×|wi| that is proportional to the absolute value of the binding weight coefficient |wi| flows.
[0131] Here, in the storage method 3, the writing algorithm is changed according to the size of the combined weight coefficient wi, so when the combined weight coefficient wi is a negative value (<0) and less than negative half (≤-0.5), in order to add the positive product-addition operation result to the bit line BL3 as a current value, the resistance value Rnbi of the current value Imin+(Imax-Imin)×|wi| proportional to the absolute value |wi| of the combined weight coefficient is written to the resistance variable element RNB connected to the bit line BL3. In addition, the resistance values Rpai and Rpbi of the current value Imin (equivalent to the combined weight coefficient 0) are written to the resistance variable elements RPA and RPB connected to the bit lines BL0 and BL1.
[0132] By setting the resistance value (current value) written to the resistance variable elements RPA, RPB, RNA, and RNB as described above, according to storage method 3, the difference current (Imax-Imin)×|wi| of the sum of the current values flowing through the bit lines BL0 and BL1 (equivalent to the positive multiplication and addition result) and the sum of the current values flowing through the bit lines BL2 and BL3 (equivalent to the negative multiplication and addition result) is obtained as the current value equivalent to the multiplication and addition result of the input and the combined weight coefficient. The details of the method of normalizing the absolute value |wi| of the combined weight coefficient to the range of 0 to 1 will be described later.
[0133] Fig.13 (b) is a diagram showing the operation of multiplication and addition of the input xi of the operation unit PUi to which the combination weight coefficient is written by the storage method 3 and the combination weight coefficient wi.
[0134] When the input xi is 0 data, Fig.11 is the same as (b), so the detailed description is omitted here.
[0135] When the input xi is 1 data and the combined weight coefficient wi is a positive value (≥0), the product-addition operation result xi×wi is a positive value (≥0). Since the input xi is 1 data, the word line WLi becomes selected, and the unit transistors TPA0, TPB0, TNA0, and TNB0 become activated (connected). Therefore, based on the resistance values of the resistance variable elements RPA, RPB, RNA, and RNB, the bit lines BL0, BL1, BL2, and BL3 flow. Fig.13 The currents Ipi and Ini described in (a) of FIG. The difference current ((Imax-Imin)×|wi|) between the current Ipi corresponding to the positive multiplication-addition result flowing through the bit lines BL0 and BL1 and the current Ini corresponding to the negative multiplication-addition result flowing through the bit lines BL2 and BL3 is a current corresponding to the multiplication-addition result xi×wi (≥0) of the input xi and the combined weight coefficient wi, and flows more through the bit lines BL0 and BL1 than through the bit lines BL2 and BL3.
[0136] On the other hand, when the input xi is 1 data and the combined weight coefficient wi is a negative value (<0), the product-addition operation result xi×wi is a negative value (<0). Since the input xi is 1 data, the word line WLi becomes selected, and the unit transistors TPA0, TPB0, TNA0, and TNB0 become activated (connected), so based on the resistance values of the resistance variable elements RPA, RPB, RNA, and RNB, the bit lines BL0, BL1, BL2, and BL3 flow. Fig.13 The currents Ipi and Ini described in (a) of FIG. The difference current ((Imax-Imin)×|wi|) between the current Ipi corresponding to the positive multiplication-addition result in the bit lines BL0 and BL1 and the current Ini corresponding to the negative multiplication-addition result in the bit lines BL2 and BL3 flows more in the bit lines BL2 and BL3 than in the bit lines BL0 and BL1 as a current corresponding to the multiplication-addition result xi×wi (≤0) of the input xi and the combined weight coefficient wi.
[0137] Thus, according to the storage method 3, the current equivalent to the result of the multiplication and addition operation of the input xi and the combined weight coefficient wi flows through the bit lines BL0, BL1, BL2, and BL3. In the case of a positive multiplication and addition operation result, more current flows through the bit lines BL0 and BL1 than through the bit lines BL2 and BL3, and in the case of a negative multiplication and addition operation result, more current flows through the bit lines BL2 and BL3 than through the bit lines BL0 and BL1. By connecting the operation unit PUi in parallel with the bit lines BL0, BL1, BL2, and BL3 by the number of inputs x0 to xn (combined weight coefficients w0 to wn), the result of the multiplication and addition operation of the neuron 10 can be obtained as the difference current between the current flowing through the bit lines BL0 and BL1 and the current flowing through the bit lines BL2 and BL3.
[0138] Here, a determination circuit connected to the bit lines BL0, BL1, BL2, and BL3 is used. When the total current value flowing through the bit lines BL0 and BL1 is less than the total current value flowing through the bit lines BL2 and BL3, that is, when the result of the multiplication and addition operation is a negative value, output data 0 is output; when the total current value flowing through the bit lines BL0 and BL1 is greater than the total current value flowing through the bit lines BL2 and BL3, that is, when the result of the multiplication and addition operation is a positive value, output data 1 is output. The determination circuit is equivalent to the operation of the activation function of the step function, and can realize the neural network operation that performs the multiplication and addition operation and the operation processing of the activation function.
[0139] According to storage method 3, compared with the prior art in which each operation unit is composed of two storage units, the semiconductor storage element to which the combination weight coefficient is written is made different depending on the value of the combination weight coefficient, thereby changing the writing algorithm and improving the reliability of the semiconductor storage element.
[0140] In addition, in storage method 3, in order to simplify the description, an operation unit consisting of two storage units constituting a positive weight coefficient and two storage units constituting a negative weight coefficient is used as an example for explanation, but the positive weight coefficient and the negative weight coefficient can be respectively constituted by 1 storage unit to n storage units, and the structure is not limited. In this case, the combined weight coefficient wi can be written by n kinds of rewriting algorithms. The neural network operation circuit disclosed in the present invention is characterized in that at least one of the positive weight coefficient or the negative weight coefficient is constituted by two or more storage units.
[0141] In the above, the operating principle of the neural network operation circuit of the present disclosure is explained with respect to the three storage methods of the combined weight coefficient. The specific current values when the combined weight coefficient is stored in the three storage methods will be explained below.
[0142] First, use Fig.14 Specific matters common to the three storage methods 1 to 3 are described. Fig.14 It is a diagram for explaining the structure of a neural network operation circuit of a specific example. Fig.14 (a) is a diagram showing a neuron 10 constituting a neural network operation circuit of a specific example. Fig.14 (b) means Fig.14 FIG. 1 is a diagram showing a specific example of the combined weight coefficient of the neuron 10 shown in (a). Fig.14 As shown in (a), neuron 10 has combined weight coefficients w0~w3 corresponding to the four inputs x0~x3, and the operation performed by neuron 10 is as follows Fig.14 The activation function f of neuron 10 is a step function.
[0143] like Fig.14 As shown in (b), the combination weight coefficients of the neuron 10 are w0=+0.3, w1=-0.6, w2=-1.2, and w3=+1.5.
[0144] Fig.14 (c) is a diagram showing the detailed structure of a neural network operation circuit of a specific example. The neural network operation circuit of this specific example is a 4-input, 1-output neuron, having 4 operation units PU0~PU3 storing combined weight coefficients w0~w3, and 4 word lines WL0~WL3 corresponding to inputs x0~x3, a bit line BL0 connected to resistance change elements RPA0, RPA1, RPA2, RPA3 and unit transistors TPA0, TPA1, TPA2, TPA3, a source line SL0, and resistance change elements RPB0, RPB1, RPB2, RPB3. The bit line BL1 and source line SL1 connected to the unit transistors TPB0, TPB1, TPB2, and TPB3, the bit line BL2 and source line SL2 connected to the resistance change elements RNA0, RNA1, RNA2, RNA3 and the unit transistors TNA0, TNA1, TNA2, and TNA3, the bit line BL3 and source line SL3 connected to the resistance change elements RNB0, RNB1, RNB2, and RNB3 and the unit transistors TNB0, TNB1, TNB2, and TNB3.
[0145] When performing a neural network operation, the word lines WL0 to WL3 are set to a selected state or a non-selected state according to the inputs x0 to x3, and the unit transistors TPA0 to TPA3, TPB0 to TPB3, TNA0 to TNA3, and TNB0 to TNB3 of the operation units PU0 to PU3 are set to a selected state or a non-selected state. The bit lines BL0, BL1, BL2, and BL3 are supplied with a bit line voltage from the determination circuit 50 via the column selectors YT0, YT1, YT2, and YT3, and the source lines SL0, SL1, SL2, and SL3 are connected to the ground voltage via the discharge transistors DT0, DT1, DT2, and DT3. As a result, a current corresponding to a positive multiplication-addition operation result flows through the bit lines BL0 and BL1, and a current corresponding to a negative multiplication-addition operation result flows through the bit lines BL2 and BL3. The determination circuit 50 outputs the output y by detecting and determining the magnitude relationship between the sum of the currents flowing through the bit lines BL0 and BL1 and the sum of the currents flowing through the bit lines BL2 and BL3. That is, when the multiplication and addition operation result of the neuron 10 is a negative value (<0), 0 data is output, and when it is a positive value (≥0), 1 data is output. The determination circuit 50 outputs the operation result of the activation function f (step function) that uses the multiplication and addition operation result as input.
[0146] <Specific Example of Current Value Storage Method 1>
[0147] Fig.15 is a diagram showing a specific example of the current value of storage method 1. More specifically, Fig.15 (a) and Fig.15 (b) are diagrams showing the current ranges of the resistance change elements RPA, RPB, RNA, and RNB of the operation units PU0 to PU3 when the combined weight coefficient is written by storage method 1, and the current values written to the resistance change elements RPA, RPB, RNA, and RNB. Fig.15 As shown in (a), in storage method 1, the range of the current value flowing through each storage unit of the resistance change elements RPA, RPB, RNA, and RNB is set to 0μA to 50μA. In addition, the sum of the current values flowing through the resistance change elements RPA and RPB and the sum of the current values flowing through the resistance change elements RNA and RNB, that is, the minimum current value Imin is 0μA, and the maximum current value Imax is 100μA, and a current range (dynamic range) of 100μA is used.
[0148] like Fig.15As shown in the "normalized value" in (b), the combination weight coefficients w0 to w3 are first normalized so that they are in the range of 0 to 1. In this embodiment, the combination weight coefficients w0 to w3 have the largest absolute value w3 = +1.5, and the normalized value of the combination weight coefficient is set to w3 = +1.0. Through this normalization, the normalized values of the remaining combination weight coefficients are w0 = +0.2, w1 = -0.4, and w2 = -0.8.
[0149] Next, if Fig.15 As shown in (a) of FIG. 1 , the current values written into the resistance variable elements RPA, RPB, RNA, and RNB of the arithmetic units PU0 to PU3 are determined using the normalized combined weight coefficients. Fig.15 (b) represents the calculation results of the current values written into the resistance change elements RPA, RPB, RNA, and RNB. Since the normalized value of the combined weight coefficient w0 is +0.2, that is, a positive value and less than +0.5, the current value written into the resistance change element RPA is 20μA, the current value written into the resistance change element RPB is 0μA, the current value written into the resistance change element RNA is 0μA, and the current value written into the resistance change element RNB is 0μA. Since the normalized value of the combined weight coefficient w1 is -0.4, that is, a negative value and greater than -0.5, the current value written into the resistance change element RPA is 0μA, the current value written into the resistance change element RPB is 0μA, the current value written into the resistance change element RNA is 40μA, and the current value written into the resistance change element RNB is 0μA. The normalized value of the combined weight coefficient w2 is -0.8, i.e., a negative value and less than -0.5, so the current value written to the resistance change element RPA is 0μA, the current value written to the resistance change element RPB is 0μA, the current value written to the resistance change element RNA is 50μA, and the current value written to the resistance change element RNB is 30μA. The normalized value of the combined weight coefficient w3 is +1.0, i.e., a positive value and greater than +0.5, so the current value written to the resistance change element RPA is 50μA, the current value written to the resistance change element RPB is 50μA, the current value written to the resistance change element RNA is 0μA, and the current value written to the resistance change element RNB is 0μA. In this way, by writing resistance values corresponding to the above-mentioned current values to the resistance change elements RPA, RPB, RNA, and RNB of the operation units PU0 to PU3, neural network operations can be performed.
[0150] In this way, by configuring the arithmetic unit using the 4-bit variable resistance element, the dynamic range of 50 μA in the 2-bit variable resistance element can be used up to 100 μA.
[0151] In addition, in the specific example of storage method 1, in order to simplify the description, an operation unit consisting of two storage units constituting a positive weight coefficient and two storage units constituting a negative weight coefficient is used as an example for description, but the positive weight coefficient and the negative weight coefficient can be respectively constituted by 1 storage unit to n storage units, and the structure is not limited. The neural network operation circuit disclosed in the present invention is characterized in that at least one of the positive weight coefficient or the negative weight coefficient is constituted by two or more storage units.
[0152] <Specific Example of Current Value Storage Method 2>
[0153] Fig.16 2 is a diagram showing a specific example of the current value of the storage method 2. More specifically, Fig.16 (a) and Fig.16 (b) are diagrams showing the current ranges of the resistance change elements RPA, RPB, RNA, and RNB of the operation units PU0 to PU3 when the combined weight coefficient is written by storage method 2, and the current values written to the resistance change elements RPA, RPB, RNA, and RNB. Fig.16 As shown in (a), in storage method 2, the range of the current value flowing through each storage unit of the resistance change elements RPA, RPB, RNA, and RNB is set to 0μA to 25μA. This is half of the current value that can be written to each storage unit. In addition, the sum of the current values flowing through the resistance change elements RPA and RPB, the sum of the current values flowing through the resistance change elements RNA and RNB, that is, the minimum current value Imin is 0μA, the maximum current value Imax is 50μA, and a current range (dynamic range) of 50μA is used.
[0154] like Fig.16 As shown in the "normalized value" in (b), the combination weight coefficients w0 to w3 are first normalized so that they are in the range of 0 to 1. In this embodiment, the combination weight coefficients w0 to w3 have the largest absolute value w3 = +1.5, and the normalized value of the combination weight coefficient is set to w3 = +1.0. Through this normalization, the normalized values of the remaining combination weight coefficients are w0 = +0.2, w1 = -0.4, and w2 = -0.8.
[0155] Next, if Fig.16 As shown in (a) of FIG. 1 , the current values written into the resistance variable elements RPA, RPB, RNA, and RNB of the arithmetic units PU0 to PU3 are determined using the normalized combined weight coefficients. Fig.16(b) represents the calculation result of the current value written into the resistance change elements RPA, RPB, RNA, and RNB. Since the normalized value of the combined weight coefficient w0 is +0.2, that is, a positive value, the current value written into the resistance change element RPA is 5μA, the current value written into the resistance change element RPB is 5μA, the current value written into the resistance change element RNA is 0μA, and the current value written into the resistance change element RNB is 0μA. Since the normalized value of the combined weight coefficient w1 is -0.4, that is, a negative value, the current value written into the resistance change element RPA is 0μA, the current value written into the resistance change element RPB is 0μA, the current value written into the resistance change element RNA is 10μA, and the current value written into the resistance change element RNB is 10μA. Since the normalized value of the combined weight coefficient w2 is -0.8, that is, a negative value, the current value written into the resistance change element RPA is 0μA, the current value written into the resistance change element RPB is 0μA, the current value written into the resistance change element RNA is 20μA, and the current value written into the resistance change element RNB is 20μA. Since the normalized value of the combined weight coefficient w3 is +1.0, i.e., a positive value, the current value written into the variable resistance element RPA is 25μA, the current value written into the variable resistance element RPB is 25μA, the current value written into the variable resistance element RNA is 0μA, and the current value written into the variable resistance element RNB is 0μA. In this way, by writing resistance values corresponding to the above current values into the variable resistance elements RPA, RPB, RNA, and RNB of the operation units PU0 to PU3, neural network operations can be performed.
[0156] Fig.17 This is a graph comparing the prior art and the present embodiment with respect to the current value (vertical axis) obtained as a result of the multiplication-accumulation operation relative to the ideal value (horizontal axis) of the multiplication-accumulation operation result. In the conventional neural network operation circuit, the operation unit is composed of two bits of a resistance variable element, so multiple analog voltage values equivalent to multiple inputs are applied to multiple non-volatile memory elements, and the analog current values flowing through the multiple non-volatile memory elements are summed up, and the multiplication-accumulation operation result with a positive value and the multiplication-accumulation operation result with a negative value are respectively summed up in one bit line to obtain the multiplication-accumulation operation result. Therefore, the summed analog current is saturated due to the influence of parasitic resistance and control circuit, and the multiplication-accumulation operation cannot be accurately performed.
[0157] On the other hand, in the neural network operation circuit of the embodiment, the operation unit is composed of 4 bits of resistance variable elements, so multiple analog voltage values corresponding to multiple inputs are applied to multiple non-volatile memory elements, and the analog current values flowing through the multiple non-volatile memory elements are summed up, and the multiplication and addition operation results of the positive analog current values and the negative analog current values are divided into two bit lines and summed up to obtain as the multiplication and addition operation results. Therefore, the summed analog current is less likely to be affected by parasitic resistance and control circuits, and saturation is alleviated, thereby accurately performing multiplication and addition operations.
[0158] In addition, in the specific example of storage method 2, in order to simplify the description, an operation unit consisting of two storage units constituting a positive weight coefficient and two storage units constituting a negative weight coefficient is used as an example for description, but the positive weight coefficient and the negative weight coefficient can be respectively constituted by 1 storage unit to n storage units, and the structure is not limited. The neural network operation circuit disclosed in the present invention is characterized in that at least one of the positive weight coefficient or the negative weight coefficient is constituted by two or more storage units.
[0159] <Specific Example of Current Value Storage Method 3>
[0160] Fig.18 3 is a diagram showing a specific example of the current value storage method 3. More specifically, Fig.18 (a) and Fig.18 (b) are diagrams showing the current ranges of the resistance change elements RPA, RPB, RNA, and RNB of the operation units PU0 to PU3 when the combined weight coefficient is written by storage method 3, and the current values written to the resistance change elements RPA, RPB, RNA, and RNB. Fig.18 As shown in (a), in storage method 3, the range of the current value flowing through each storage unit of the resistance change elements RPA, RPB, RNA, and RNB is set to 0μA to 50μA. In addition, the sum of the current values flowing through the resistance change elements RPA and RPB and the sum of the current values flowing through the resistance change elements RNA and RNB, that is, the minimum current value Imin is 0μA, and the maximum current value Imax is 50μA, and a current range (dynamic range) of 50μA is used.
[0161] like Fig.18 As shown in the "normalized value" in (b), the combination weight coefficients w0 to w3 are first normalized so that they are in the range of 0 to 1. In this embodiment, the combination weight coefficients w0 to w3 have the largest absolute value w3 = +1.5, and the normalized value of the combination weight coefficient is set to w3 = +1.0. Through this normalization, the normalized values of the remaining combination weight coefficients are w0 = +0.2, w1 = -0.4, and w2 = -0.8.
[0162] Then, if Fig.18 As shown in (a) of FIG. 1 , the current values written into the resistance variable elements RPA, RPB, RNA, and RNB of the arithmetic units PU0 to PU3 are determined using the normalized combined weight coefficients. Fig.18 (b) represents the calculation result of the current value written into the resistance change elements RPA, RPB, RNA, and RNB. The normalized value of the combined weight coefficient w0 is +0.2, that is, a positive value, and the write current value is less than 25μA. Therefore, the current value written into the resistance change element RPA is 10μA, the current value written into the resistance change element RPB is 0μA, the current value written into the resistance change element RNA is 0μA, and the current value written into the resistance change element RNB is 0μA. The normalized value of the combined weight coefficient w1 is -0.4, that is, a negative value, and the write current value is less than 25μA. Therefore, the current value written into the resistance change element RPA is 0μA, the current value written into the resistance change element RPB is 0μA, the current value written into the resistance change element RNA is 20μA, and the current value written into the resistance change element RNB is 0μA. The normalized value of the combined weight coefficient w2 is -0.8, i.e., a negative value, and the write current value is 25μA or more. Therefore, the current value written into the resistance change element RPA is 0μA, the current value written into the resistance change element RPB is 0μA, the current value written into the resistance change element RNA is 0μA, and the current value written into the resistance change element RNB is 40μA. The normalized value of the combined weight coefficient w3 is +1.0, i.e., a positive value, and the write current value is 25μA or more. Therefore, the current value written into the resistance change element RPA is 0μA, the current value written into the resistance change element RPB is 50μA, the current value written into the resistance change element RNA is 0μA, and the current value written into the resistance change element RNB is 0μA. In this way, by writing resistance values corresponding to the above-mentioned current values into the resistance change elements RPA, RPB, RNA, and RNB of the operation units PU0 to PU3, neural network operations can be performed.
[0163] By using the 4-bit variable resistance element to form the arithmetic unit, in the storage method 3, a write algorithm corresponding to the set current value can be used. In particular, in the variable resistance non-volatile memory, when a filament that serves as a current path is made for the variable resistance element in the inspection process, the size can be set to a size corresponding to the current value for which the size of the filament is set, thereby improving the reliability of the variable resistance element. Even when the current value set in the arithmetic unit is arbitrarily rewritten, the rewriting can be limited to the same current band, which is effective in improving the reliability of the variable resistance element.
[0164] In addition, in the specific example of storage method 3, in order to simplify the description, an operation unit consisting of two storage units constituting a positive weight coefficient and two storage units constituting a negative weight coefficient is used as an example for description, but the positive weight coefficient and the negative weight coefficient can be respectively constituted by 1 storage unit to n storage units, and the structure is not limited. The neural network operation circuit disclosed in the present invention is characterized in that at least one of the positive weight coefficient or the negative weight coefficient is constituted by two or more storage units.
[0165] <Neural Network Operation Circuit of Modified Example>
[0166] Fig.19 It is a diagram showing a detailed structure of a neural network operation circuit according to a variation of the embodiment.
[0167] Fig.19 (a) is a diagram showing a neuron 10 used in a neural network operation of a neural network operation circuit according to a modified example of the embodiment, and Figure 1 The n+1 inputs x0~xn are input to the neuron 10 with the combined weight coefficients w0~wn respectively. The inputs x0~xn can take any value of 0 data or 1 data, and the combined weight coefficients w0~wn can take multiple levels (simulated) of values. The product and accumulation operation results of the inputs x0~xn and the combined weight coefficients w0~wn are performed. Figure 5 The operation of the activation function f as a step function shown is output to the output y.
[0168] Fig.19 (b) means to proceed Fig.19 (a) is a diagram of a detailed circuit structure of the operation processing of the neuron 10. In the above embodiments, the operation unit has been described as a structure of 1 word line and 4 bit lines, but in this modification, Fig.19 As shown in (b), it can also be composed of 2 word lines and 2 bit lines.
[0169] Fig.19 The memory cell array of (b) includes a plurality of word lines WLA0 to WLAn, a plurality of word lines WLB0 to WLBn, a plurality of bit lines BL0 and BL1, and a plurality of source lines SL0 and SL1.
[0170] Word lines WLA0~WLAn and word lines WLB0~WLBn correspond to inputs x0~xn of neuron 10, input x0 corresponds to word line WLA0 and word line WLB0, input x1 corresponds to word lines WLA1 and WLB1, input xn-1 corresponds to word line WLA n-1 and word line WLBn-1, and input xn corresponds to word line WLAn and WLBn.
[0171] The word line selection circuit 30 is a circuit that sets the word lines WLA0 to WLAn and the word lines WLB0 to WLBn to a selected state or a non-selected state according to the inputs x0 to xn. At this time, the word lines WLA0 and WLB0, the word lines WLA1 and WLB1, the word lines WLAn-1 and WLBn-1, and the word lines WLAn and WLBn are controlled in the same way. When the input is 0 data, the word line is set to a non-selected state, and when the input is 1 data, the word line is set to a selected state. In the neural network operation, the inputs x0 to xn can arbitrarily take the values of 0 data or 1 data, respectively. Therefore, when there are multiple 1 data in the inputs x0 to xn, the word line selection circuit 30 selects multiple word lines at the same time.
[0172] The operation units PU0~PUn composed of storage units correspond to the combination weight coefficients w0~wn of the neuron 10 respectively, that is, the combination weight coefficient w0 corresponds to the operation unit PU0, the combination weight coefficient w1 corresponds to the operation unit PU1, the combination weight coefficient wn-1 corresponds to the operation unit PUn-1, and the combination weight coefficient wn corresponds to the operation unit PUn.
[0173] The operation unit PU0 includes: a first storage unit, which is composed of a series connection of a resistance change element RPA0 as an example of a first semiconductor storage element and a unit transistor TPA0 as an example of a first unit transistor; a second storage unit, which is composed of a series connection of a resistance change element RPB0 as an example of a second semiconductor storage element and a unit transistor TPB0 as an example of a second unit transistor; a third storage unit, which is composed of a series connection of a resistance change element RNA0 as an example of a third semiconductor storage element and a unit transistor TNA0 as an example of a third unit transistor; and a fourth storage unit, which is composed of a series connection of a resistance change element RNB0 as an example of a fourth semiconductor storage element and a unit transistor TNB0 as an example of a fourth unit transistor. That is, one operation unit is composed of four storage units.
[0174] The first semiconductor storage element and the second semiconductor storage element are used to store a positive combined weight coefficient among the combined weight coefficients, and the positive combined weight coefficient corresponds to the total current value obtained by adding the current value of the current flowing through the first semiconductor storage element and the current value of the current flowing through the second semiconductor storage element. On the other hand, the third semiconductor storage element and the fourth semiconductor storage element are used to store a negative combined weight coefficient among the combined weight coefficients, and the negative combined weight coefficient corresponds to the total current value obtained by adding the current value of the current flowing through the third semiconductor storage element and the current value of the current flowing through the fourth semiconductor storage element.
[0175] The operation unit PU0 is connected to a word line WLA0 as an example of a second word line, a word line WLB0 as an example of a third word line, a bit line BL0 as an example of a ninth data line, a bit line BL1 as an example of an eleventh data line, a source line SL0 as an example of a tenth data line, and a source line SL1 as an example of a twelfth data line. The word line WLA0 is connected to the gate terminals of the unit transistors TPA0 and TNA0, the word line WLB0 is connected to the gate terminals of the unit transistors TPB0 and TNB0, the bit line BL0 is connected to the resistance change elements RPA0 and RPB0, the bit line BL1 is connected to the resistance change elements RNA0 and RNB0, the source line SL0 is connected to the source terminals of the unit transistors TPA0 and TPB0, and the source line SL1 is connected to the source terminals of the unit transistors TNA0 and TNB0. The input x0 is input from the word lines WLA0 and WLB0 of the operation unit PU0 and is combined with the weight coefficient w0 to be stored as a resistance value (conductance) in the four variable resistance elements RPA0, RPB0, RNA0, and RNB0 of the operation unit PU0.
[0176] The structures of the operation units PU1, PUn-1, and PUn are the same as those of the operation unit PU0, so detailed descriptions are omitted. That is, the inputs x0 to xn are respectively input by the word lines WLA0 to WLAn and the word lines WLB0 to WLBn connected to the operation units PU0 to PUn, and are combined with the weight coefficients w0 to wn and stored as resistance values (conductance) in the resistance variable elements RPA0 to RPAn, RPB0 to RPBn, RNA0 to RNAn, and RNB0 to RNBn of the operation units PU0 to PUn.
[0177] The bit lines BL0 and BL1 are connected via column selector transistors YT0 and YT1, and are connected to the determination circuit 50. The gate terminals of the column selector transistors YT0 and YT1 are connected to the column selector control signal YG, and when the column selector control signal YG is activated, the bit lines BL0 and BL1 are connected to the determination circuit 50. The source lines SL0 and SL1 are connected to the ground voltage via the discharge transistors DT0 and DT1, respectively. The gate terminals of the discharge transistors DT0 and DT1 are connected to the discharge control signal DIS, and when the discharge control signal DIS is activated, the source lines SL0 and SL1 are set to the ground voltage. When performing a neural network operation, by activating the column selector control signal YG and the discharge control signal DIS, the bit lines BL0 and BL1 are connected to the determination circuit 50, and the source lines SL0 and SL1 are connected to the ground voltage.
[0178] The determination circuit 50 detects the current value of the current flowing through the bit line BL0 connected via the column selector transistors YT0 and YT1 (hereinafter also referred to as the "first current value") and the current value of the current flowing through the bit line BL1 (hereinafter also referred to as the "third current value"), compares the detected first current value and the third current value, and outputs the output y. The output y can take any value of 0 data or 1 data.
[0179] In more detail, the determination circuit 50 outputs an output y of data 0 when the first current value is smaller than the third current value, and outputs an output y of data 1 when the first current value is larger than the third current value. That is, the determination circuit 50 is a circuit that determines the magnitude relationship between the first current value and the third current value and outputs the output y.
[0180] In addition, instead of determining the magnitude relationship between the first current value and the third current value, the determination circuit 50 may detect the current value of the current flowing through the source line SL0 (hereinafter, also referred to as the "second current value") and the current value of the current flowing through the source line SL1 (hereinafter, also referred to as the "fourth current value"), compare the detected second current value and the fourth current value, and output the output y. This is because the current flowing through the bit line BL0 (strictly speaking, the column selector transistor YT0) is equal to the current flowing through the source line SL0 (strictly speaking, the discharge transistor DT0), and the current flowing through the bit line BL1 (strictly speaking, the column selector transistor YT1) is equal to the current flowing through the source line SL1 (strictly speaking, the discharge transistor DT1).
[0181] That is, the determination circuit 50 can determine the magnitude relationship between the first current value or the second current value and the third current value or the fourth current value and output data of the first logic value or the second logic value.
[0182] Furthermore, when the neural network operation circuit has a conversion circuit such as a shunt resistor that converts the first to fourth current values into voltages, the determination circuit 50 may perform similar determination using the first to fourth voltage values corresponding to the first to fourth current values.
[0183] In addition, in each operation unit of this variant, in order to simplify the description, an example is described in which a positive weight coefficient is composed of two storage units and a negative weight coefficient is composed of two storage units, but the positive weight coefficient and the negative weight coefficient can be composed of one storage unit to n storage units respectively, and the structure is not limited. In each operation unit of the present disclosure, it is characterized in that at least one of the positive weight coefficient or the negative weight coefficient is composed of more than two storage units. Moreover, in this variant, each operation unit of the present disclosure does not necessarily need to have both a positive weight coefficient and a negative weight coefficient, and may also have only one weight coefficient (i.e., an unsigned weight coefficient) composed of at least two storage units.
[0184] Conclusion
[0185] As described above, the neural network operation circuit of the present disclosure uses the current value flowing through the n-bit storage unit to form a positive weight coefficient or a negative weight coefficient or both, and performs the multiplication and accumulation operation of the neural network circuit. Therefore, according to storage method 1, compared with the existing multiplication and accumulation operation of the neural network circuit in which the positive weight coefficient and the negative weight coefficient are respectively formed by the current value flowing through the 1-bit storage unit, it is possible to achieve n times the dynamics, and the multiplication and accumulation operation of the neural network circuit can be improved in performance. In addition, according to storage method 2, by dividing 1 weight coefficient into n bits, the current value flowing through each bit line can be reduced to one-n, and the multiplication and accumulation operation of the neural network circuit can be improved in performance. Furthermore, according to storage method 3, by setting the range of current values to be written to the n-bit storage unit, the write algorithm can be changed according to each written current value, and the reliability of the non-volatile semiconductor storage element can be improved.
[0186] That is, the neural network operation circuit of the present embodiment maintains a plurality of combined weight coefficients corresponding to a plurality of input data that can selectively take a first logic value and a second logic value, and outputs output data of a first logic value or a second logic value according to a result of a multiplication and addition operation of the plurality of input data and the corresponding combined weight coefficients, wherein the neural network operation circuit has, for each of the plurality of combined weight coefficients, a semiconductor storage element of at least 2 bits of a first semiconductor storage element and a second semiconductor storage element for storing the combined weight coefficient, and the plurality of combined weight coefficients correspond to a total current value obtained by summing the current value of the current flowing through the first semiconductor storage element and the current value of the current flowing through the second semiconductor storage element.
[0187] Thus, in the prior art, one combined weight coefficient corresponds to the current value of the current flowing through one semiconductor storage element, while in the present embodiment, one combined weight coefficient corresponds to the total current value of at least two currents flowing through the semiconductor storage elements. Therefore, at least two semiconductor storage elements are used to express one combined weight coefficient, so the degree of freedom in the storage method of the combined weight coefficients of at least two semiconductor storage elements is increased, achieving at least one of improved performance of neural network calculation and improved reliability of the semiconductor storage element storing the combined weight coefficient.
[0188] Specifically, in the storage method 1, the first semiconductor storage element and the second semiconductor storage element maintain values satisfying the following conditions (1) and (2) as the combined weight coefficients, (1) the total current value is a current value proportional to the value of the combined weight coefficient, and (2) the maximum value that the total current value can take is greater than any current value that can flow through each of the first semiconductor storage element and the second semiconductor storage element. Thus, compared with the prior art, the current value flowing through an operation unit corresponding to one combined weight coefficient can be made at least twice (that is, the dynamic range is expanded), and the performance of the multiplication and accumulation operation in the neural network operation circuit can be improved.
[0189] In addition, in the storage method 2, the first semiconductor storage element and the second semiconductor storage element maintain values satisfying the following conditions (3) and (4) as the combined weight coefficient, (3) the total current value is a current value proportional to the value of the combined weight coefficient, and (4) the current value flowing through the first semiconductor storage element and the current value flowing through the second semiconductor storage element are equal. Thus, compared with the prior art, while maintaining the same combined weight coefficient, the current flowing through one semiconductor storage element can be reduced to less than 1 / 2, thereby achieving high performance of the multiplication and accumulation operation in the neural network operation circuit.
[0190] In addition, in the storage method 3, the first semiconductor storage element and the second semiconductor storage element maintain values satisfying the following conditions (5) and (6) as the combined weight coefficient, (5) when the combined weight coefficient is less than a fixed value, the current value flowing through the first semiconductor storage element is a current value proportional to the value of the combined weight coefficient, (6) when the combined weight coefficient is greater than a fixed value, the current value flowing through the second semiconductor storage element is a current value proportional to the value of the combined weight coefficient. Thus, compared with the prior art, the semiconductor storage element to which the combined weight coefficient is written is different depending on the value of the combined weight coefficient, thereby changing the write algorithm and improving the reliability of the semiconductor storage element.
[0191] More specifically, the neural network operation circuit of the present embodiment maintains a plurality of combined weight coefficients corresponding to a plurality of input data that can selectively take a first logic value and a second logic value, and outputs output data of a first logic value or a second logic value according to a product and accumulation operation result of the plurality of input data and the corresponding combined weight coefficients. The neural network operation circuit has: a plurality of word lines; a first data line, a second data line, a third data line, and a fourth data line; a plurality of operation units, each corresponding to the plurality of combined weight coefficients, each consisting of a first semiconductor storage element and a first unit transistor connected in series, and a second semiconductor storage element and a second unit transistor connected in series, one end of the first semiconductor storage element is connected to the first data line, one end of the first unit transistor is connected to the second data line, and the first unit transistor is connected to the second data line. A gate of the body transistor is connected to a first word line among a plurality of word lines, one end of the second semiconductor storage element is connected to a third data line, one end of the second unit transistor is connected to a fourth data line, and a gate of the second unit transistor is connected to the first word line; a word line selection circuit causes the plurality of word lines to be in a selected state or a non-selected state; and a determination circuit outputs data of a first logic value or a second logic value based on a first total current value obtained by summing the current values of the currents flowing through the first data line and the third data line, or a second total current value obtained by summing the current values of the currents flowing through the second data line and the fourth data line, the first semiconductor storage element and the second semiconductor storage element constituting each of the plurality of operation units maintain corresponding combined weight coefficients, and the word line selection circuit causes the plurality of word lines to be in a selected state or a non-selected state according to a plurality of input data.
[0192] Thus, each combination weight coefficient is expressed by two or more semiconductor memory elements arranged in the direction in which the bit lines are arranged.
[0193] Here, the neural network operation circuit involved in this embodiment further has a fifth data line, a sixth data line, a seventh data line and an eighth data line, and each of the multiple operation units further has a series connection of a third semiconductor storage element and a third unit transistor, and a series connection of a fourth semiconductor storage element and a fourth unit transistor, one end of the third semiconductor storage element is connected to the fifth data line, one end of the third unit transistor is connected to the sixth data line, and the gate of the third unit transistor is connected to the first word line, one end of the fourth semiconductor storage element is connected to the seventh data line, one end of the fourth unit transistor is connected to the eighth data line, and the gate of the fourth unit transistor is connected to the first word line. The determination circuit determines the magnitude relationship between the first total current value or the second total current value and the third total current value obtained by summing the current values of the currents flowing through the fifth data line and the seventh data line or the fourth total current value obtained by summing the current values of the currents flowing through the sixth data line and the eighth data line, and outputs data of the first logic value or the second logic value. The third semiconductor storage element and the fourth semiconductor storage element constituting each of the multiple operation units can maintain the corresponding combined weight coefficient.
[0194] At this time, the word line selection circuit sets the corresponding word line to a non-selected state when the input data is a first logic value, and sets the corresponding word line to a selected state when the input data is a second logic value.
[0195] Thus, the positive combination weight coefficients held by the first semiconductor storage element and the second semiconductor storage element can make the first total current value or the second total current value a current value corresponding to the product and addition result of a plurality of input data whose corresponding combination weight coefficients are positive and the corresponding positive combination weight coefficients, and the negative combination weight coefficients held by the third semiconductor storage element and the fourth semiconductor storage element can make the third total current value or the fourth total current value a current value corresponding to the product and addition result of a plurality of input data whose corresponding combination weight coefficients are negative and the corresponding negative combination weight coefficients, the positive combination weight coefficients are represented by at least two semiconductor storage elements arranged in the arrangement direction of the bit lines, and the negative combination weight coefficients are represented by at least two semiconductor storage elements arranged in the arrangement direction of the bit lines.
[0196] In addition, the determination circuit outputs a first logic value when the first total current value or the second total current value is less than the third total current value or the fourth total current value, respectively, and outputs a second logic value when the first total current value or the second total current value is greater than the third total current value or the fourth total current value, respectively. Thus, the determination circuit implements a step function that determines the output of the neuron according to the sign of the result of the multiplication and addition operation.
[0197] In addition, the neural network operation circuit of this variant maintains a plurality of combined weight coefficients corresponding to a plurality of input data that can selectively take a first logic value and a second logic value, and outputs output data of a first logic value or a second logic value according to a product and accumulation operation result of the plurality of input data and the corresponding combined weight coefficients. The neural network operation circuit has: a plurality of word lines; a ninth data line and a tenth data line; a plurality of operation units, each corresponding to a plurality of combined weight coefficients, the plurality of operation units being respectively composed of a series connection of a first semiconductor storage element and a first unit transistor, and a series connection of a second semiconductor storage element and a second unit transistor, one end of the first semiconductor storage element being connected to the ninth data line, and one end of the first unit transistor being connected to the tenth data line. The gate of the first unit transistor is connected to the second word line among the multiple word lines, one end of the second semiconductor storage element is connected to the ninth data line, one end of the second unit transistor is connected to the tenth data line, and the gate of the second unit transistor is connected to the third word line among the multiple word lines; a word line selection circuit makes the multiple word lines become a selected state or a non-selected state; and a judgment circuit outputs data of a first logic value or a second logic value based on a first current value of a current flowing through the ninth data line or a second current value of a current flowing through the tenth data line, the first semiconductor storage element and the second semiconductor storage element constituting each of the multiple operation units maintain corresponding combination weight coefficients, and the word line selection circuit makes the multiple word lines become a selected state or a non-selected state according to multiple input data.
[0198] Thus, each combination weight coefficient is expressed by two or more semiconductor memory elements arranged in the arrangement direction of the word lines.
[0199] Here, the neural network operation circuit also has an eleventh data line and a twelfth data line, and each of the multiple operation units also has a series connection of a third semiconductor storage element and a third unit transistor, and a series connection of a fourth semiconductor storage element and a fourth unit transistor, one end of the third semiconductor storage element is connected to the eleventh data line, one end of the third unit transistor is connected to the twelfth data line, the gate of the third unit transistor is connected to the second word line, one end of the fourth semiconductor storage element is connected to the eleventh data line, one end of the fourth unit transistor is connected to the twelfth data line, and the gate of the fourth unit transistor is connected to the third word line. The determination circuit determines the magnitude relationship between the first current value or the second current value and the third current value of the current flowing through the eleventh data line or the fourth current value of the current flowing through the twelfth data line, and outputs data of the first logic value or the second logic value. The third semiconductor storage element and the fourth semiconductor storage element constituting each of the multiple operation units can maintain a corresponding combination weight coefficient. The word line selection circuit sets the corresponding word line to a non-selected state when the input data is a first logic value, and sets the corresponding word line to a selected state when the input data is a second logic value. The corresponding word lines are set as a second word line and a third word line.
[0200] Thus, the positive combination weight coefficients held by the first semiconductor storage element and the second semiconductor storage element can make the first current value or the second current value a current value corresponding to the product and addition result of a plurality of input data whose corresponding combination weight coefficients are positive and the corresponding positive combination weight coefficients, and the negative combination weight coefficients held by the third semiconductor storage element and the fourth semiconductor storage element can make the third current value or the fourth current value a current value corresponding to the product and addition result of a plurality of input data whose corresponding combination weight coefficients are negative and the corresponding negative combination weight coefficients, the positive combination weight coefficients are represented by at least two semiconductor storage elements arranged in the arrangement direction of the word line, and the negative combination weight coefficients are represented by at least two semiconductor storage elements arranged in the arrangement direction of the word line.
[0201] In addition, the determination circuit outputs a first logic value when the first current value or the second current value is less than the third current value or the fourth current value, respectively, and outputs a second logic value when the first current value or the second current value is greater than the third current value or the fourth current value, respectively. Thus, the determination circuit implements a step function that determines the neuron output according to the sign of the product-addition operation result.
[0202] The above describes the implementation methods and variations of the neural network operation circuit of the present invention, but the neural network operation circuit of the present invention is not limited to the above-mentioned examples. Methods obtained by adding various changes to the implementation methods or variations within the scope of the main purpose of the present invention, or other methods achieved by combining parts of the implementation methods and variations are also effective.
[0203] For example, the semiconductor memory element constituting the neural network operation circuit of the above-mentioned embodiment is an example of a resistance variable non-volatile memory (ReRAM), but the semiconductor memory element disclosed in the present invention can also be applied to non-volatile semiconductor memory elements other than resistance variable memories such as magnetoresistive non-volatile memory (MRAM), phase change non-volatile memory (PRAM), and ferroelectric non-volatile memory (FeRAM), and can also be applied to volatile memory elements such as DRAM or SRAM. That is, at least one of the first semiconductor memory element and the second semiconductor memory element can be a resistance variable non-volatile memory element formed by a resistance variable element, a magnetoresistive non-volatile memory element formed by a magnetoresistive element, a phase change non-volatile memory element formed by a phase change element, and a ferroelectric non-volatile memory element formed by a ferroelectric element. Thus, the combined weight coefficient is expressed by the non-volatile memory element, and is continuously maintained even when not receiving power supply.
[0204] In addition, in the neural network operation circuit of the above-mentioned embodiment, each combination weight coefficient is composed of a positive combination weight coefficient composed of 2 storage units and a negative combination weight coefficient composed of 2 storage units, but it can also be an unsigned combination weight coefficient composed of more than 2 storage units, or the positive combination weight coefficient and the negative combination weight coefficient can be composed of more than 3 storage units respectively, or only one of the positive combination weight coefficient and the negative combination weight coefficient can be composed of more than 2 storage units.
[0205] Industrial Applicability
[0206] The neural network operation circuit disclosed in the present invention can improve the operation performance and reliability of the neural network operation circuit that uses semiconductor memory elements to perform multiplication and addition operations. Therefore, it is useful for the mass production of semiconductor integrated circuits equipped with neural network operation circuits and electronic devices equipped with them.
[0207] Description of symbols
[0208] 1 Input Layer
[0209] 2 Hidden Layers
[0210] 3 Output Layer
[0211] 10 Neurons
[0212] 11 Combining weights
[0213] 20 memory cell array
[0214] 30 Word line selection circuit
[0215] 40 column gate
[0216] 50 Decision circuit
[0217] 60 Write Circuit
[0218] 70 Control circuit
[0219] 80 Semiconductor substrate
[0220] 81a, 81b diffusion area
[0221] 82 oxide film
[0222] 83 gate electrode (word line)
[0223] 84a, 84b, 86, 88, 92 through holes
[0224] 85a, 85b first wiring layer
[0225] 87 Second wiring layer
[0226] 89 Lower electrode
[0227] 90 resistance variable layer
[0228] 91 Upper electrode
[0229] 93 Third wiring layer
[0230] x0~xn input
[0231] w0~wn combined weight coefficient
[0232] bBias coefficient
[0233] f activation function
[0234] y output
[0235] PU0~PUn computing units
[0236] MC storage unit
[0237] TPA0~TPAn, TPB0~TPBn, TNA0~TNAn, TNB0~TNBn unit transistors
[0238] RPA0~RPAn、RPB0~RPBn、RNA0~RNAn、RNB0~RNBn resistance variable elements
[0239] YT0, YT1, YT2, YT3 column gate transistors
[0240] DT0, DT1, DT2, DT3 discharge transistors
[0241] WL0~WLn, WLA0~WLAn, WLB0~WLBn word lines
[0242] BL0~BLm bit lines
[0243] SL0~SLm source lines
[0244] YG Column gate control signal
[0245] DIS discharge control signal
[0246] Vbl bit line voltage
[0247] Resistance values of Rpai, Rpbi, Rnai, and Rnbi resistance variable elements
[0248] Ipi, Ini are the current values flowing through the resistance variable element
Claims
1. A neural network operation circuit, which maintains a plurality of combined weight coefficients corresponding to a plurality of input data that can selectively take a first logic value and a second logic value, and outputs output data of a first logic value or a second logic value according to a product and accumulation operation result of the plurality of input data and the corresponding combined weight coefficients, wherein: The neural network operation circuit includes, for each of the plurality of combined weight coefficients, a first semiconductor storage element and a second semiconductor storage element for storing the combined weight coefficient, and a semiconductor storage element of at least 2 bits. Each of the plurality of combined weight coefficients corresponds to a total current value obtained by summing a current value of a current flowing through the first semiconductor memory element and a current value of a current flowing through the second semiconductor memory element.
2. The neural network operation circuit according to claim 1, wherein: The first semiconductor storage element and the second semiconductor storage element hold values satisfying the following conditions (1) and (2) as the combination weight coefficients, (1) the total current value is a current value proportional to the value of the combined weight coefficient, (2) The maximum value that the total current value can take is larger than any current value that can flow through each of the first semiconductor memory element and the second semiconductor memory element.
3. The neural network operation circuit according to claim 1, wherein: The first semiconductor storage element and the second semiconductor storage element hold values satisfying the following conditions (3) and (4) as the combination weight coefficients, (3) the total current value is a current value proportional to the value of the combined weight coefficient, (4) The current value flowing through the first semiconductor memory element and the current value flowing through the second semiconductor memory element become equal to each other.
4. The neural network operation circuit according to claim 1, wherein: The first semiconductor storage element and the second semiconductor storage element hold values satisfying the following conditions (5) and (6) as the combination weight coefficients, (5) when the combined weight coefficient is smaller than a fixed value, the current value flowing through the first semiconductor memory element is a current value proportional to the value of the combined weight coefficient, (6) When the combination weight coefficient is larger than the fixed value, the value of the current flowing through the second semiconductor memory element is a current value proportional to the value of the combination weight coefficient.
5. A neural network operation circuit, which maintains a plurality of combined weight coefficients corresponding to a plurality of input data that can selectively take a first logic value and a second logic value, and outputs output data of a first logic value or a second logic value according to a product and accumulation operation result of the plurality of input data and the corresponding combined weight coefficients, wherein the neural network operation circuit has: multiple word lines; a first data line, a second data line, a third data line, and a fourth data line; a plurality of operation units, each corresponding to the plurality of combined weight coefficients, each of the plurality of operation units being composed of a first semiconductor storage element and a first unit transistor connected in series, and a second semiconductor storage element and a second unit transistor connected in series, one end of the first semiconductor storage element being connected to the first data line, one end of the first unit transistor being connected to the second data line, a gate of the first unit transistor being connected to a first word line among the plurality of word lines, one end of the second semiconductor storage element being connected to the third data line, one end of the second unit transistor being connected to the fourth data line, and a gate of the second unit transistor being connected to the first word line; A word line selection circuit that puts the plurality of word lines into a selected state or a non-selected state; as well as a determination circuit that outputs data of a first logic value or a second logic value based on a first total current value obtained by summing the current values of the currents flowing through the first data line and the third data line, or a second total current value obtained by summing the current values of the currents flowing through the second data line and the fourth data line, The first semiconductor storage element and the second semiconductor storage element constituting each of the plurality of operation units hold the corresponding combination weight coefficient. The word line selection circuit causes the plurality of word lines to be in a selected state or a non-selected state according to the plurality of input data.
6. The neural network operation circuit according to claim 5, wherein: The neural network operation circuit further comprises a fifth data line, a sixth data line, a seventh data line and an eighth data line. Each of the plurality of operation units further includes a series connection of a third semiconductor storage element and a third unit transistor, and a series connection of a fourth semiconductor storage element and a fourth unit transistor, one end of the third semiconductor storage element is connected to the fifth data line, one end of the third unit transistor is connected to the sixth data line, a gate of the third unit transistor is connected to the first word line, one end of the fourth semiconductor storage element is connected to the seventh data line, one end of the fourth unit transistor is connected to the eighth data line, and a gate of the fourth unit transistor is connected to the first word line, The determination circuit determines the magnitude relationship between the first total current value or the second total current value and a third total current value obtained by summing the current values of the currents flowing through the fifth data line and the seventh data line or a fourth total current value obtained by summing the current values of the currents flowing through the sixth data line and the eighth data line, and outputs data of a first logic value or a second logic value. The third semiconductor storage element and the fourth semiconductor storage element constituting each of the plurality of operation units hold the corresponding combination weight coefficient.
7. The neural network operation circuit according to claim 5 or 6, wherein: The word line selection circuit sets the corresponding word line to a non-selected state when the input data is a first logic value, and sets the corresponding word line to a selected state when the input data is a second logic value.
8. The neural network operation circuit according to claim 6, wherein: The first semiconductor storage element and the second semiconductor storage element maintain a positive combination weight coefficient, and the positive combination weight coefficient is a combination weight coefficient that makes the first total current value or the second total current value become a current value corresponding to the product and addition result of a plurality of input data with a corresponding positive combination weight coefficient and the corresponding positive combination weight coefficient, The third semiconductor storage element and the fourth semiconductor storage element maintain a negative value of the combined weight coefficient, and the negative value of the combined weight coefficient is a combined weight coefficient that makes the third total current value or the fourth total current value become a current value corresponding to the product and addition result of multiple input data with corresponding negative values of the combined weight coefficient and the corresponding negative value of the combined weight coefficient.
9. The neural network operation circuit according to claim 6, wherein: The determination circuit outputs a first logic value when the first total current value or the second total current value is respectively smaller than the third total current value or the fourth total current value, and outputs a second logic value when the first total current value or the second total current value is respectively larger than the third total current value or the fourth total current value.
10. A neural network operation circuit, which maintains a plurality of combined weight coefficients corresponding to a plurality of input data that can selectively take a first logic value and a second logic value, and outputs output data of a first logic value or a second logic value according to a product and accumulation operation result of the plurality of input data and the corresponding combined weight coefficients, wherein the neural network operation circuit has: multiple word lines; a ninth data line and a tenth data line; a plurality of operation units, each corresponding to the plurality of combined weight coefficients, each of the plurality of operation units being composed of a first semiconductor storage element and a first unit transistor connected in series, and a second semiconductor storage element and a second unit transistor connected in series, one end of the first semiconductor storage element being connected to the ninth data line, one end of the first unit transistor being connected to the tenth data line, a gate of the first unit transistor being connected to a second word line among the plurality of word lines, one end of the second semiconductor storage element being connected to the ninth data line, one end of the second unit transistor being connected to the tenth data line, and a gate of the second unit transistor being connected to a third word line among the plurality of word lines; A word line selection circuit that puts the plurality of word lines into a selected state or a non-selected state; as well as a determination circuit that outputs data of a first logic value or a second logic value based on a first current value of a current flowing through the ninth data line or a second current value of a current flowing through the tenth data line, The first semiconductor storage element and the second semiconductor storage element constituting each of the plurality of operation units hold the corresponding combination weight coefficient. The word line selection circuit causes the plurality of word lines to be in a selected state or a non-selected state according to the plurality of input data.
11. The neural network operation circuit according to claim 10, wherein: The neural network operation circuit further has an eleventh data line and a twelfth data line. Each of the plurality of operation units further includes a third semiconductor storage element and a third unit transistor connected in series, and a fourth semiconductor storage element and a fourth unit transistor connected in series, one end of the third semiconductor storage element is connected to the eleventh data line, one end of the third unit transistor is connected to the twelfth data line, a gate of the third unit transistor is connected to the second word line, one end of the fourth semiconductor storage element is connected to the eleventh data line, one end of the fourth unit transistor is connected to the twelfth data line, and a gate of the fourth unit transistor is connected to the third word line, The determination circuit determines the magnitude relationship between the first current value or the second current value and the third current value of the current flowing through the eleventh data line or the fourth current value of the current flowing through the twelfth data line, and outputs data of a first logic value or a second logic value. The third semiconductor storage element and the fourth semiconductor storage element constituting each of the plurality of operation units hold the corresponding combination weight coefficient.
12. The neural network operation circuit according to claim 10 or 11, wherein: The word line selection circuit sets the corresponding word line to a non-selected state when the input data is a first logic value, and sets the corresponding word line to a selected state when the input data is a second logic value. The corresponding word line sets the second word line and the third word line as a group.
13. The neural network operation circuit according to claim 11, wherein: The first semiconductor storage element and the second semiconductor storage element maintain a positive combination weight coefficient, and the positive combination weight coefficient is a combination weight coefficient that makes the first current value or the second current value become a current value corresponding to the product and addition result of a plurality of input data with a corresponding positive combination weight coefficient and the corresponding positive combination weight coefficient, The third semiconductor storage element and the fourth semiconductor storage element maintain a negative value of the combined weight coefficient, and the negative value of the combined weight coefficient is a combined weight coefficient that makes the third current value or the fourth current value become a current value corresponding to the product and addition result of multiple input data with corresponding negative values of the combined weight coefficient and the corresponding negative value of the combined weight coefficient.
14. The neural network operation circuit according to claim 11, wherein: The determination circuit outputs a first logic value when the first current value or the second current value is respectively smaller than the third current value or the fourth current value, and outputs a second logic value when the first current value or the second current value is respectively larger than the third current value or the fourth current value.
15. The neural network operation circuit according to any one of claims 1 to 14, wherein: At least one of the first semiconductor memory element and the second semiconductor memory element is any one of a resistance variable non-volatile memory element formed by a resistance variable element, a magnetoresistive non-volatile memory element formed by a magnetoresistive element, a phase change non-volatile memory element formed by a phase change element, and a ferroelectric non-volatile memory element formed by a ferroelectric element.
