Semiconductor device and electronic device

The semiconductor device addresses temperature-induced transistor changes in brain-inspired integrated circuits by using metal oxide transistors in the subthreshold region, ensuring low power consumption and reduced circuit area while maintaining accurate product-sum operations.

JP7561767B2Active Publication Date: 2024-10-04SEMICON ENERGY LAB CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2021566376
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-12-27
Filing Date
2020-12-14
Publication Date
2024-10-04
Estimated Expiration
2040-12-14

AI Technical Summary

Technical Problem

Integrated circuits mimicking the human brain face challenges due to temperature changes affecting transistor characteristics, leading to incorrect calculations and increased power consumption and circuit area, especially in product-sum operations and digital multiplication and addition circuits.

Method used

A semiconductor device with a configuration including first and second circuits, cells, and transistors, utilizing metal oxide in channel regions, and employing subthreshold region operations to reduce current flow and maintain consistent performance despite temperature changes.

Benefits of technology

The solution enables low-power, reduced circuit area, and heat-resistant product-sum operations, maintaining accurate calculations by minimizing current fluctuations due to temperature variations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007561767000028
    Figure 0007561767000028
  • Figure 0007561767000029
    Figure 0007561767000029
  • Figure 0007561767000030
    Figure 0007561767000030
Patent Text Reader

Abstract

Provided is a semiconductor device with low power consumption, capable of performing calculation. The semiconductor device includes first to third circuits and first and second cells. The first cell has a first transistor and the second cell has a second transistor. The first and second transistors operate in a subthreshold region. The first cell is electrically connected to the first circuit, the first cell is electrically connected to the second and third circuits, and the second cell is electrically connected to the second and third circuits. The first cell sets a current flowing from the first circuit to the first transistor to a first current and the second cell sets a current flowing from the second circuit to the second transistor to a second current. At this time, an electric potential corresponding to the second current is inputted to the first cell. Next, by varying the electric potential of a second wiring by flowing a third current from a sensor included in the third circuit, the first cell outputs a fourth current corresponding to the amount of variation of the electric potential and the first current.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] One embodiment of the present invention relates to a semiconductor device and an electronic device.

[0002] Note that one embodiment of the present invention is not limited to the above technical field. The technical field of the invention disclosed in this specification relates to an object, a driving method, or a manufacturing method. Alternatively, one embodiment of the present invention relates to a process, a machine, a manufacture, or a composition of matter. Therefore, examples of the technical field of one embodiment of the present invention disclosed in this specification more specifically include a semiconductor device, a display device, a liquid crystal display device, a light-emitting device, a power storage device, an imaging device, a memory device, a signal processing device, a sensor, a processor, an electronic device, a system, a driving method thereof, a manufacturing method thereof, or an inspection method thereof. [Background technology]

[0003] Currently, the development of integrated circuits that mimic the mechanisms of the human brain is actively progressing. Such integrated circuits incorporate the mechanisms of the brain as electronic circuits, and have circuits that correspond to the "neurons" and "synapses" of the human brain. For this reason, such integrated circuits are sometimes called "neuromorphic," "brain-morphic," or "brain-inspired." Such integrated circuits have a non-von Neumann architecture, and are expected to perform parallel processing with extremely low power consumption, compared to the von Neumann architecture, which consumes more power as the processing speed increases.

[0004] An information processing model that mimics a neural network with "neurons" and "synapses" is called an artificial neural network (ANN). By using an artificial neural network, it is possible to make inferences with an accuracy comparable to or even exceeding that of humans. In a neural network, the main operation is the weighted sum of neuron outputs, that is, the product-sum operation.

[0005] Non-Patent Document 1 proposes a multiply-and-accumulate circuit using non-volatile memory elements. In this multiply-and-accumulate circuit, each memory element uses the operation in the subthreshold region of a transistor having silicon in the channel formation region to output a current corresponding to the multiplication of data corresponding to a multiplier stored in each memory element and input data corresponding to a multiplicand. In addition, data corresponding to the multiply-and-accumulate operation is obtained by summing the currents output by the memory elements of each column. Since this multiply-and-accumulate circuit has an internal memory element, it is possible to eliminate the need to read and write data from and to an external memory in multiplication and addition. Therefore, it is expected that the number of data transfers caused by reading and writing can be reduced, thereby reducing power consumption. [Prior art documents] [Non-patent literature]

[0006] [Non-Patent Document 1] X. Guo et al., “Fast,Energy-Efficient,Robust,and Reproducible Mixed-Signal Neuromorphic Classifier Based on Embedded NOR Flash Memory Technology”IEDM2017,pp.151-154. Summary of the Invention [Problem to be solved by the invention]

[0007] A transistor having silicon in a channel formation region is susceptible to changes in transistor characteristics, field effect mobility, etc., due to temperature changes. In particular, when a product-sum calculation circuit or the like is formed as an integrated circuit, the temperature of the integrated circuit increases due to heat generated when the circuit is operated, and the characteristics of the transistor included in the integrated circuit change, which may prevent the transistor from performing a correct calculation.

[0008] Furthermore, when a multiply-and-accumulate operation is performed by a digital circuit, a digital multiplier circuit multiplies the digital data (multiplier data) that is the multiplier by the digital data (multiplicand data) that is the multiplicand. Then, a digital adder circuit adds the digital data (product data) obtained by the multiplication, and obtains digital data (product-and-accumulate data) as the result of the multiply-and-accumulate operation. It is preferable that the digital multiplier circuit and the digital adder circuit have specifications that can handle multi-bit operations. However, in this case, it is necessary to increase the circuit scale of each of the digital multiplier circuit and the digital adder circuit, which may increase the circuit area and power consumption.

[0009] Furthermore, by combining a calculation circuit that performs neural network calculations with a sensor, it may be possible to make electronic devices recognize various information. For example, by combining an optical sensor (e.g., a photodiode) as a sensor with the calculation circuit, it is possible to perform pattern recognition such as face recognition and image recognition from image data obtained by the optical sensor.

[0010] An object of one embodiment of the present invention is to provide a semiconductor device capable of performing product-sum operations.An object of one embodiment of the present invention is to provide a semiconductor device with low power consumption.An object of one embodiment of the present invention is to provide a semiconductor device with a reduced circuit area.An object of one embodiment of the present invention is to provide a semiconductor device in which a decrease in operating capability due to heat is suppressed.

[0011] Another object of one embodiment of the present invention is to provide a novel semiconductor device or the like. Another object of one embodiment of the present invention is to provide an electronic device including the semiconductor device.

[0012] The problems of one embodiment of the present invention are not limited to the problems listed above. The problems listed above do not preclude the existence of other problems. The other problems are problems not mentioned in this section, which will be described below. Problems not mentioned in this section can be derived by a person skilled in the art from the description in the specification or drawings, and can be appropriately extracted from these descriptions. One embodiment of the present invention solves at least one of the problems listed above and other problems. One embodiment of the present invention does not need to solve all of the problems listed above and other problems. [Means for solving the problem]

[0013] (1) One embodiment of the present invention is a semiconductor device including a first circuit, a second circuit, a third circuit, a first cell, a second cell, a first wiring, and a second wiring. The first cell includes a first transistor, the second cell includes a second transistor, and the third circuit includes a sensor and a third transistor. The first cell is electrically connected to the first circuit through the first wiring, the first cell is electrically connected to the second wiring, the second cell is electrically connected to the second wiring, the sensor is electrically connected to a first terminal of the third transistor, and the second terminal of the third transistor is electrically connected to the second wiring. The first circuit has a function of passing a first current from the first circuit through the first wiring to the first cell, and the second circuit has a function of passing a second current to the second wiring. In addition, the sensor has a function of performing sensing to output a third current according to a result of the sensing, and the third circuit has a function of passing the third current to the second wiring when the third transistor is in an on state. In addition, the first cell has a function of setting the amount of current flowing between the first terminal and the second terminal of the first transistor to the amount of the first current by holding a potential corresponding to the first current at the gate of the first transistor, and the second cell has a function of setting the amount of current flowing between the first terminal and the second terminal of the second transistor to the amount of current flowing in the second wiring by holding a potential corresponding to the current flowing in the second wiring at the gate of the second transistor.

[0014] (2) In the above configuration (1), the second circuit may have a function of passing a second current from the second circuit to the second cell through the second wiring when the third transistor is in an off state, and of providing a first potential corresponding to the amount of the second current from the second circuit to each of the first cell and the second cell through the second wiring. The third circuit may have a function of changing the first potential provided to each of the first cell and the second cell to a second potential by turning on the third transistor and passing a third current from the third circuit to the second wiring. The first cell may have a function of changing the amount of the first current flowing between the first terminal and the second terminal of the first transistor to an amount of a fourth current corresponding to the difference between the first potential and the second potential when the third transistor is switched from an off state to an on state. It is noted that the amount of the first current and the amount of the fourth current are within the range of the current that flows when the first transistor operates in the subthreshold region, and the amount of the second current, the amount of the third current, and the sum of the amount of the second current and the amount of the third current are within the range of the current that flows when the second transistor operates in the subthreshold region.

[0015] (3) In the above configuration (1) or (2), the channel formation regions of the first transistor and the second transistor may each contain a metal oxide.

[0016] (4) One aspect of the present invention is a semiconductor device having a first circuit, a second circuit, a third circuit, a first cell, a second cell, a first wiring, and a second wiring. The first cell has a first transistor, a fourth transistor, and a first capacitance, the second cell has a second transistor, a fifth transistor, and a second capacitance, and the third circuit has a sensor and a third transistor. The first circuit is electrically connected to the first wiring, the second circuit is electrically connected to the second wiring, and the third circuit is electrically connected to the second wiring. A first terminal of the first transistor is electrically connected to a first terminal of the fourth transistor and the first wiring, a gate of the first transistor is electrically connected to a second terminal of the fourth transistor and a first terminal of the first capacitance, and a second terminal of the first capacitance is electrically connected to the second wiring. The first terminal of the second transistor is electrically connected to the first terminal of the fifth transistor and the second wiring, the gate of the second transistor is electrically connected to the second terminal of the fifth transistor and the first terminal of the second capacitance, and the second terminal of the second capacitance is electrically connected to the second wiring. The sensor is electrically connected to the first terminal of the third transistor, and the second terminal of the third transistor is electrically connected to the second wiring. The first circuit has a function of passing a first current from the first circuit through the first wiring to the first cell, and the second circuit has a function of passing a second current to the second wiring. The sensor has a function of performing sensing and outputting a third current according to the result of the sensing, and the third circuit has a function of passing the third current to the second wiring when the third transistor is in an on state. The first cell has a function of setting the amount of current flowing between the first terminal and the second terminal of the first transistor to the amount of the first current by holding a potential corresponding to the first current at the gate of the first transistor, and the second cell has a function of setting the amount of current flowing between the first terminal and the second terminal of the second transistor to the amount of current flowing in the second wiring by holding a potential corresponding to the current flowing in the second wiring at the gate of the second transistor.

[0017] (5) In the above configuration (4), the second circuit may have a function of passing a second current from the second circuit to the first terminal of the second transistor through the second wiring when the third transistor is in an off state, and of providing a first potential corresponding to the amount of the second current from the second circuit to the second terminal of the first capacitance and the second terminal of the second capacitance through the second wiring. The third circuit may have a function of changing the first potential provided to each of the second terminal of the first capacitance and the second terminal of the second capacitance to the second potential by turning the third transistor on and passing a third current from the third circuit to the second wiring. The first cell may have a function of changing the amount of the first current flowing between the first terminal and the second terminal of the first transistor to the amount of a fourth current corresponding to the difference between the first potential and the second potential when the third transistor is switched from an off state to an on state. It is noted that the amount of the first current and the amount of the fourth current are within the range of the current that flows when the first transistor operates in the subthreshold region, and the amount of the second current, the amount of the third current, and the sum of the amount of the second current and the amount of the third current are within the range of the current that flows when the second transistor operates in the subthreshold region.

[0018] (6) In the above configuration (4) or (5), the channel formation region of each of the first transistor, the second transistor, the fourth transistor, and the fifth transistor may contain a metal oxide.

[0019] (7) In any one of the configurations (1) to (6) above, the first circuit may include a sixth transistor and a seventh transistor. In particular, it is preferable that the seventh transistor has a first gate and a second gate, a first terminal of the sixth transistor is electrically connected to the first wiring, and a second terminal of the sixth transistor is electrically connected to the first terminal of the seventh transistor, the first gate of the seventh transistor, and the second gate of the seventh transistor.

[0020] (8) In the above configuration (7), the channel formation regions of the sixth transistor and the seventh transistor may contain a metal oxide.

[0021] (9) In addition, in any one of the above configurations (1) to (8), the sensor may have a photodiode.

[0022] (10) One embodiment of the present invention is an electronic device including the semiconductor device according to any one of (1) to (9) above and a housing. The electronic device can perform a product-sum operation with the semiconductor device.

[0023] In this specification and the like, a semiconductor device is a device that utilizes semiconductor characteristics, and refers to a circuit including a semiconductor element (transistor, diode, photodiode, etc.), a device having the same circuit, etc. Also, refers to any device that can function by utilizing semiconductor characteristics. For example, an integrated circuit, a chip including an integrated circuit, and an electronic component in which a chip is housed in a package are examples of a semiconductor device. Also, a memory device, a display device, a light-emitting device, a lighting device, an electronic device, etc. are themselves semiconductor devices and may have a semiconductor device.

[0024] In addition, when it is stated in this specification that X and Y are connected, the following cases are also disclosed in this specification: when X and Y are electrically connected, when X and Y are functionally connected, and when X and Y are directly connected. Therefore, it is not limited to a specific connection relationship, for example, a connection relationship shown in a figure or text, and it is also disclosed in a figure or text other than the connection relationship shown in the figure or text. X and Y are objects (for example, a device, an element, a circuit, a wiring, an electrode, a terminal, a conductive film, a layer, etc.).

[0025] As an example of a case where X and Y are electrically connected, one or more elements (e.g., a switch, a transistor, a capacitive element, an inductor, a resistive element, a diode, a display device, a light-emitting device, a load, etc.) that enable the electrical connection between X and Y can be connected between X and Y. The switch has a function of controlling on / off. In other words, the switch has a function of being in a conductive state (on state) or a non-conductive state (off state) and controls whether or not a current flows.

[0026] As an example of a case where X and Y are functionally connected, one or more circuits that enable the functional connection between X and Y (for example, logic circuits (inverters, NAND circuits, NOR circuits, etc.), signal conversion circuits (digital-analog conversion circuits, analog-digital conversion circuits, gamma correction circuits, etc.), potential level conversion circuits (power supply circuits (boosting circuits, step-down circuits, etc.), level shifter circuits that change the potential level of a signal, etc.), voltage sources, current sources, switching circuits, amplifier circuits (circuits that can increase the signal amplitude or current amount, operational amplifiers, differential amplifier circuits, source follower circuits, buffer circuits, etc.), signal generation circuits, memory circuits, control circuits, etc.) can be connected between X and Y. As an example, even if another circuit is sandwiched between X and Y, if a signal output from X is transmitted to Y, X and Y are considered to be functionally connected.

[0027] In addition, when it is explicitly stated that X and Y are electrically connected, this includes the case where X and Y are electrically connected (i.e., the case where X and Y are connected with another element or circuit between them) and the case where X and Y are directly connected (i.e., the case where X and Y are connected without having another element or circuit between them).

[0028] Also, for example, it can be expressed as "X, Y, and the source (or first terminal, etc.) and drain (or second terminal, etc.) of the transistor are electrically connected to each other, and are electrically connected in the order of X, the source (or first terminal, etc.) of the transistor, the drain (or second terminal, etc.) of the transistor, and Y." Or, it can be expressed as "The source (or first terminal, etc.) of the transistor is electrically connected to X, the drain (or second terminal, etc.) of the transistor is electrically connected to Y, and X, the source (or first terminal, etc.) of the transistor, the drain (or second terminal, etc.) of the transistor, and Y are electrically connected in this order." Or, it can be expressed as "X is electrically connected to Y via the source (or first terminal, etc.) and drain (or second terminal, etc.) of the transistor, and X, the source (or first terminal, etc.) of the transistor, the drain (or second terminal, etc.) of the transistor, and Y are provided in this connection order." By using expressions similar to these examples to specify the order of connections in a circuit configuration, the source (or first terminal, etc.) and drain (or second terminal, etc.) of a transistor can be distinguished and the technical scope can be determined. Note that these expressions are merely examples and are not limited to these expressions. Here, X and Y are objects (e.g., a device, an element, a circuit, a wiring, an electrode, a terminal, a conductive film, a layer, etc.).

[0029] In addition, even when components that are independent on a circuit diagram are shown as being electrically connected to each other, one component may have the functions of multiple components. For example, when a part of a wiring also functions as an electrode, one conductive film has both the functions of a wiring and an electrode. Therefore, the term "electrical connection" in this specification also includes such a case where one conductive film has the functions of multiple components.

[0030] In addition, in this specification, the term "resistance element" may be, for example, a circuit element or wiring having a resistance value higher than 0Ω. Therefore, in this specification, the term "resistance element" includes wiring having a resistance value, a transistor in which a current flows between the source and drain, a diode, a coil, and the like. Therefore, the term "resistance element" can be rephrased as "resistance", "load", "region having a resistance value", and the like, and conversely, the terms "resistance", "load", and "region having a resistance value" can be rephrased as "resistance element". The resistance value can be, for example, preferably 1 mΩ or more and 10 Ω or less, more preferably 5 mΩ or more and 5 Ω or less, and even more preferably 10 mΩ or more and 1 Ω or less. In addition, for example, 1 Ω or more and 1×10 9 It may be set to Ω or less.

[0031] In addition, in this specification, the term "capacitive element" may refer to, for example, a circuit element having a capacitance value higher than 0F, a region of a wiring having a capacitance value, a parasitic capacitance, a gate capacitance of a transistor, and the like. Therefore, in this specification, the term "capacitive element" refers not only to a circuit element including a pair of electrodes and a dielectric contained between the electrodes, but also to a parasitic capacitance appearing between wirings, a gate capacitance appearing between one of the source or drain of a transistor and the gate, and the like. In addition, the terms "capacitive element", "parasitic capacitance", "gate capacitance", and the like can be rephrased as "capacitance", and conversely, the term "capacitance" can be rephrased as "capacitive element", "parasitic capacitance", "gate capacitance", and the like. In addition, the term "pair of electrodes" in "capacitance" can be rephrased as "pair of conductors", "pair of conductive regions", "pair of regions", and the like. The value of the electrostatic capacitance can be, for example, 0.05 fF or more and 10 pF or less. In addition, it may be, for example, 1 pF or more and 10 μF or less.

[0032] In addition, in this specification, a transistor has three terminals called a gate, a source, and a drain. The gate is a control terminal that controls the conductive state of the transistor. The two terminals that function as a source or a drain are input / output terminals of the transistor. One of the two input / output terminals becomes a source and the other becomes a drain depending on the conductivity type (n-channel type, p-channel type) of the transistor and the level of the potential applied to the three terminals of the transistor. For this reason, in this specification, the terms source and drain can be used interchangeably. In addition, in this specification, when describing the connection relationship of a transistor, the terms "one of the source or drain" (or the first electrode or the first terminal) and "the other of the source or drain" (or the second electrode or the second terminal) are used. Note that, depending on the structure of the transistor, a backgate may be included in addition to the above-mentioned three terminals. In this case, in this specification, one of the gate or the backgate of the transistor may be referred to as the first gate, and the other of the gate or the backgate of the transistor may be referred to as the second gate. Furthermore, in the same transistor, the terms "gate" and "backgate" may be interchangeable. Furthermore, when a transistor has three or more gates, in this specification and the like, the respective gates may be referred to as a first gate, a second gate, a third gate, and so on.

[0033] In this specification and the like, a node can be referred to as a terminal, a wiring, an electrode, a conductive layer, a conductor, an impurity region, etc. depending on a circuit configuration, a device structure, etc. Also, a terminal, a wiring, etc. can be referred to as a node.

[0034] In addition, in this specification and the like, "voltage" and "potential" can be interchanged as appropriate. "Voltage" refers to a potential difference from a reference potential, and if the reference potential is the ground potential (earth potential), for example, "voltage" can be interchanged as "potential." Note that ground potential does not necessarily mean 0V. Furthermore, potential is relative, and as the reference potential changes, the potential applied to wiring, the potential applied to a circuit, etc., the potential output from a circuit, etc. also change.

[0035] In addition, in this specification and the like, the terms "high-level potential" and "low-level potential" do not mean specific potentials. For example, when two wirings are both described as "functioning as wirings that supply a high-level potential," the high-level potentials provided by both wirings do not have to be equal to each other. Similarly, when two wirings are both described as "functioning as wirings that supply a low-level potential," the low-level potentials provided by both wirings do not have to be equal to each other.

[0036] "Current" refers to the phenomenon of charge transfer (electrical conduction). For example, the statement "electrical conduction of a positively charged body is occurring" can be rephrased as "electrical conduction of a negatively charged body is occurring in the opposite direction." Therefore, in this specification, unless otherwise specified, "current" refers to the phenomenon of charge transfer (electrical conduction) accompanying the movement of carriers. The carriers referred to here include electrons, holes, anions, cations, complex ions, etc., and the carriers differ depending on the system through which the current flows (for example, semiconductors, metals, electrolytes, vacuum, etc.). In addition, the "direction of current" in wiring, etc. is the direction in which positive carriers move, and is described as a positive current amount. In other words, the direction in which negative carriers move is the opposite direction to the direction of current, and is expressed as a negative current amount. Therefore, in this specification, etc., unless otherwise specified regarding the positive and negative (or current direction) of the current, a statement such as "current flows from element A to element B" can be rephrased as "current flows from element B to element A" etc. Furthermore, statements such as "current is input to element A" can be rephrased as "current is output from element A" or the like.

[0037] In addition, in this specification, the ordinal numbers "first," "second," and "third" are used to avoid confusion of components. Therefore, they do not limit the number of components. Furthermore, they do not limit the order of the components. For example, a component referred to as "first" in one embodiment of this specification may be a component referred to as "second" in another embodiment or in the claims. Also, for example, a component referred to as "first" in one embodiment of this specification may be omitted in another embodiment or in the claims.

[0038] In addition, in this specification, the terms indicating the arrangement, such as "above" and "below", may be used for convenience in order to explain the positional relationship between the components with reference to the drawings. Furthermore, the positional relationship between the components changes as appropriate depending on the direction in which each component is depicted. Therefore, the terms are not limited to those described in the specification, and can be rephrased appropriately depending on the situation. For example, the expression "insulator located on the upper surface of a conductor" can be rephrased as "insulator located on the lower surface of a conductor" by rotating the orientation of the drawing shown by 180 degrees.

[0039] In addition, the terms "above" and "below" do not limit the positional relationship of components to being directly above or below and in direct contact with each other. For example, the expression "electrode B on insulating layer A" does not require that electrode B be formed in direct contact with insulating layer A, and does not exclude the inclusion of other components between insulating layer A and electrode B.

[0040] In addition, in this specification and the like, the terms "film" and "layer" can be interchanged depending on the situation. For example, the term "conductive layer" may be changed to the term "conductive film". Or, for example, the term "insulating film" may be changed to the term "insulating layer". Or, depending on the situation, it is possible to replace the terms "film" and "layer" with other terms without using them. For example, the terms "conductive layer" or "conductive film" may be changed to the term "conductor". Or, for example, the terms "insulating layer" and "insulating film" may be changed to the term "insulating body".

[0041] In addition, the terms "electrode", "wiring", "terminal" and the like in this specification do not limit the functions of these components. For example, "electrode" may be used as a part of "wiring", and vice versa. Furthermore, the terms "electrode" and "wiring" include cases where a plurality of "electrodes" or "wirings" are formed integrally. Furthermore, for example, "terminal" may be used as a part of "wiring", "electrode", and the like, and vice versa. Furthermore, the term "terminal" includes cases where a plurality of "electrodes", "wiring", "terminals", and the like are formed integrally. Therefore, for example, an "electrode" can be a part of a "wiring" or "terminal", and for example, a "terminal" can be a part of a "wiring" or "electrode". Furthermore, the terms "electrode", "wiring", "terminal" and the like may be replaced with terms such as "region" depending on the circumstances.

[0042] In addition, in this specification and the like, terms such as "wiring", "signal line", and "power line" can be interchanged with each other depending on the circumstances. For example, the term "wiring" may be changed to the term "signal line". For example, the term "wiring" may be changed to the term "power line". The opposite is also true, and terms such as "signal line" and "power line" may be changed to the term "wiring". The term "power line" may be changed to the term "signal line". The opposite is also true, and terms such as "signal line" may be changed to the term "power line". The term "potential" applied to the wiring may be changed to the term "signal" depending on the circumstances. The opposite is also true, and terms such as "signal" may be changed to the term "potential".

[0043] In this specification and the like, the impurity of a semiconductor refers to, for example, other than the main component constituting the semiconductor layer. For example, an element with a concentration of less than 0.1 atomic % is an impurity. When an impurity is contained, for example, the defect level density in the semiconductor may increase, the carrier mobility may decrease, the crystallinity may decrease, and so on. When the semiconductor is an oxide semiconductor, the impurity that changes the characteristics of the semiconductor may be, for example, a Group 1 element, a Group 2 element, a Group 13 element, a Group 14 element, a Group 15 element, a transition metal other than the main component, and in particular, for example, hydrogen (including water), lithium, sodium, silicon, boron, phosphorus, carbon, nitrogen, and the like. Specifically, when the semiconductor is a silicon layer, the impurity that changes the characteristics of the semiconductor may be, for example, a Group 1 element, a Group 2 element, a Group 13 element, a Group 15 element, oxygen, and the like, except for hydrogen.

[0044] In this specification and the like, a switch refers to a device that has a function of being in a conductive state (on state) or a non-conductive state (off state) and controlling whether or not a current flows. Alternatively, a switch refers to a device that has a function of selecting and switching a path through which a current flows. As an example, an electrical switch, a mechanical switch, or the like can be used. In other words, the switch is not limited to a specific one as long as it can control a current.

[0045] Examples of electrical switches include transistors (e.g., bipolar transistors, MOS transistors, etc.), diodes (e.g., PN diodes, PIN diodes, Schottky diodes, MIM (Metal Insulator Metal) diodes, MIS (Metal Insulator Semiconductor) diodes, diode-connected transistors, etc.), and logic circuits combining these. When a transistor is used as a switch, the "conductive state" of the transistor refers to a state in which the source electrode and drain electrode of the transistor can be considered to be electrically short-circuited. Also, the "non-conductive state" of the transistor refers to a state in which the source electrode and drain electrode of the transistor can be considered to be electrically cut off. When a transistor is operated simply as a switch, the polarity (conductivity type) of the transistor is not particularly limited.

[0046] An example of a mechanical switch is a switch that uses MEMS (microelectromechanical system) technology. The switch has an electrode that can be moved mechanically, and the movement of the electrode controls whether the switch is conductive or non-conductive.

[0047] In this specification, "parallel" refers to a state in which two straight lines are arranged at an angle of -10° or more and 10° or less. Therefore, it also includes the case of -5° or more and 5° or less. Furthermore, "substantially parallel" or "roughly parallel" refers to a state in which two straight lines are arranged at an angle of -30° or more and 30° or less. Furthermore, "perpendicular" refers to a state in which two straight lines are arranged at an angle of 80° or more and 100° or less. Therefore, it also includes the case of 85° or more and 95° or less. Furthermore, "substantially perpendicular" or "approximately perpendicular" refers to a state in which two straight lines are arranged at an angle of 60° or more and 120° or less. Effect of the Invention

[0048] According to one embodiment of the present invention, a semiconductor device capable of performing a product-sum operation can be provided. According to one embodiment of the present invention, a semiconductor device with low power consumption can be provided. According to one embodiment of the present invention, a semiconductor device with a reduced circuit area can be provided. According to one embodiment of the present invention, a semiconductor device in which a decrease in operating capability due to heat is suppressed can be provided.

[0049] According to one embodiment of the present invention, a novel semiconductor device or the like can be provided. According to one embodiment of the present invention, an electronic device including the semiconductor device can be provided.

[0050] The effects of one embodiment of the present invention are not limited to the effects listed above. The effects listed above do not preclude the existence of other effects. The other effects are effects not mentioned in this section, which will be described below. Effects not mentioned in this section can be derived by a person skilled in the art from the description in the specification or drawings, and can be appropriately extracted from these descriptions. One embodiment of the present invention has at least one of the effects listed above and other effects. Therefore, one embodiment of the present invention may not have the effects listed above in some cases. [Brief description of the drawings]

[0051] FIG. 1 is a block diagram showing an example of the configuration of a semiconductor device. 2A to 2C are block diagrams showing configuration examples of circuits included in the semiconductor device. 3A to 3D are circuit diagrams showing configuration examples of circuits included in a semiconductor device. 4A to 4C are circuit diagrams showing configuration examples of circuits included in a semiconductor device. FIG. 5 is a block diagram showing a configuration example of a semiconductor device. FIG. 6 is a timing chart showing an example of the operation of the semiconductor device. FIG. 7 is a block diagram showing a configuration example of a semiconductor device. 8A to 8C are block diagrams showing configuration examples of circuits included in a semiconductor device. FIG. 9 is a block diagram showing an example of the configuration of a circuit included in the semiconductor device. FIG. 10A is a circuit diagram showing a configuration example of a circuit included in a semiconductor device, and FIG. 10B is a block diagram showing a configuration example of a circuit included in the semiconductor device. 11A and 11B are block diagrams showing configuration examples of circuits included in a semiconductor device, and FIGS. 11C and 11D are circuit diagrams showing configuration examples of circuits included in a semiconductor device. FIG. 12 is a block diagram showing a configuration example of a semiconductor device. 13A and 13B are block diagrams showing configuration examples of circuits included in a semiconductor device. FIG. 14 is a block diagram showing an example of the configuration of a circuit included in a semiconductor device. FIG. 15 is a block diagram showing a configuration example of a circuit included in a semiconductor device. FIG. 16 is a block diagram showing a configuration example of a circuit included in a semiconductor device. FIG. 17 is a block diagram showing a configuration example of a circuit included in a semiconductor device. FIG. 18 is a block diagram showing a configuration example of a semiconductor device. 19A and 19B are circuit diagrams showing configuration examples of circuits included in a semiconductor device. 20A and 20B are block diagrams showing configuration examples of circuits included in a semiconductor device. 21A and 21B are timing charts showing an example of the operation of the semiconductor device. 22A and 22B are diagrams illustrating a hierarchical neural network. FIG. 23 is a block diagram showing a configuration example of a semiconductor device. FIG. 24 is a block diagram showing a configuration example of a semiconductor device. FIG. 25 is a schematic cross-sectional view showing a configuration example of a semiconductor device. FIG. 26 is a schematic cross-sectional view showing a configuration example of a semiconductor device. 27A to 27C are schematic cross-sectional views showing configuration examples of transistors. 28A and 28B are schematic cross-sectional views showing configuration examples of a transistor. FIG. 29 is a schematic cross-sectional view showing a configuration example of a semiconductor device. 30A and 30B are schematic cross-sectional views showing configuration examples of a transistor. FIG. 31 is a schematic cross-sectional view showing a configuration example of a semiconductor device. FIG. 32A is a top view showing a configuration example of a capacitive element, and FIGS. 32B and 32C are cross-sectional perspective views showing the configuration example of a capacitive element. 33A is a top view showing a configuration example of a capacitive element, FIG. 33B is a cross-sectional view showing the configuration example of a capacitor, and FIG. 33C is a cross-sectional perspective view showing the configuration example of a capacitive element. FIG. 34 is a schematic cross-sectional view showing a configuration example of a semiconductor device. FIG. 35A is a diagram for explaining the classification of IGZO crystal structures, FIG. 35B is a diagram for explaining the XRD spectrum of crystalline IGZO, and FIG. 35C is a diagram for explaining the ultrafine electron beam diffraction pattern of crystalline IGZO. FIG. 36A is a perspective view showing an example of a semiconductor wafer, FIG. 36B is a perspective view showing an example of a chip, and FIGS. 36C and 36D are perspective views showing examples of an electronic component. 37A to 37F are perspective views of a package and a module that house an imaging device. FIG. 38 is a perspective view illustrating an example of an electronic device. 39A to 39C are perspective views showing an example of an electronic device. 40A to 40C are schematic diagrams showing an example of an electronic device. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0052] In an artificial neural network (hereafter referred to as a neural network), the strength of synapses can be changed by providing existing information to the neural network. This process of providing existing information to a neural network and determining the strength of connections is sometimes called "learning."

[0053] In addition, by providing some information to a neural network that has undergone "learning" (with connection strengths determined), it is possible for the network to output new information based on the connection strengths. In this way, the process of outputting new information based on given information and connection strengths in a neural network is sometimes called "inference" or "cognition."

[0054] Examples of neural network models include the Hopfield type and hierarchical type. In particular, a neural network with a multi-layer structure is sometimes called a "deep neural network" (DNN), and machine learning using a deep neural network is sometimes called "deep learning."

[0055] In this specification and the like, a metal oxide is an oxide of a metal in a broad sense. Metal oxides are classified into oxide insulators, oxide conductors (including transparent oxide conductors), oxide semiconductors (also referred to as oxide semiconductors or simply OSs), and the like. For example, when a metal oxide is used in an active layer of a transistor, the metal oxide may be referred to as an oxide semiconductor. That is, when a metal oxide can constitute a channel formation region of a transistor having at least one of an amplifying function, a rectifying function, and a switching function, the metal oxide can be referred to as a metal oxide semiconductor. In addition, when an OS transistor is described, it can be rephrased as a transistor having a metal oxide or an oxide semiconductor.

[0056] In this specification and the like, nitrogen-containing metal oxides may also be collectively referred to as metal oxides. Nitrogen-containing metal oxides may also be referred to as metal oxynitrides.

[0057] In this specification and the like, the configurations shown in each embodiment can be appropriately combined with the configurations shown in other embodiments to form one aspect of the present invention. In addition, when multiple configuration examples are shown in one embodiment, the configuration examples can be appropriately combined with each other.

[0058] In addition, the content (or a part of the content) described in one embodiment may be applied, combined, or replaced with at least one of another content (or a part of the content) described in that embodiment and the content (or a part of the content) described in one or more other embodiments.

[0059] In addition, the contents described in the embodiments refer to the contents described in each embodiment (or example) using various figures, or the contents described using text in the specification.

[0060] Furthermore, a figure (or a part thereof) described in one embodiment can be combined with another part of that figure, with another figure (or a part thereof) described in that embodiment, and / or with at least one figure (or a part thereof) described in one or more other embodiments to form even more figures.

[0061] The embodiments described in this specification will be described with reference to the drawings. However, it is possible to implement the embodiments in many different ways, and it is easily understood by those skilled in the art that the form and details can be changed in various ways without departing from the spirit and scope of the invention. Therefore, the present invention is not interpreted as being limited to the description of the embodiments. In the configuration of the invention of the embodiments, the same reference numerals are used in common between different drawings for the same parts or parts having similar functions, and repeated explanations may be omitted. In addition, in perspective views and the like, the description of some components may be omitted in order to ensure the clarity of the drawings.

[0062] In this specification, when the same symbol is used for multiple elements, particularly when it is necessary to distinguish between them, an identification symbol such as “_1”, "[n]”, "[m,n]”, etc. may be added to the symbol.

[0063] In addition, in the drawings of this specification, the size, layer thickness, or area may be exaggerated for clarity. Therefore, it is not necessarily limited to the scale. Note that the drawings are schematic illustrations of ideal examples, and are not limited to the shapes or values ​​shown in the drawings. For example, it is possible to include variations in signals, voltages, or currents due to noise, or variations in signals, voltages, or currents due to timing deviations.

[0064] (Embodiment 1) In this embodiment, an example of a circuit capable of product-sum operation, which is a semiconductor device of one embodiment of the present invention, will be described.

[0065] <Arithmetic circuit configuration example 1> 1 shows an example of the configuration of an arithmetic circuit that performs a multiplication and addition operation on a first data, which is positive or "0", and a second data, which is positive or "0". The arithmetic circuit MAC1 shown in FIG. 1 is a circuit that performs a multiplication and addition operation on the first data, which corresponds to the potential held in each cell, and the input second data, and performs an activation function operation using the result of the multiplication and addition operation. Note that the first data and the second data can be, for example, analog data or multi-valued data (discrete data).

[0066] The arithmetic circuit MAC1 has a circuit WCS, a circuit XCS, a circuit WSD, a circuit SWS1, a circuit SWS2, a cell array CA, and conversion circuits ITRZ[1] through ITRZ[n] (where n is an integer of 1 or more).

[0067] The cell array CA has cells IM[1,1] to IM[m,n] (where m is an integer equal to or greater than 1) and cells IMref[1] to IMref[m]. Each of the cells IM[1,1] to IM[m,n] has a function of holding a potential corresponding to an amount of current corresponding to first data, and the cells IMref[1] to IMref[m] have a function of supplying the held potential and a potential corresponding to second data required for performing a product-sum operation to the wirings XCL[1] to XCL[m].

[0068] In addition, while the cell array CA in FIG. 1 has cells arranged in a matrix of m rows and n+1 columns, the cell array CA may have any configuration as long as the cells are arranged in a matrix of one or more rows and two or more columns.

[0069] Each of cells IM[1,1] to cell IM[m,n] has, as an example, a transistor F1, a transistor F2, and a capacitance C5, and each of cells IMref[1] to cell IMref[m] has, as an example, a transistor F1m, a transistor F2m, and a capacitance C5m.

[0070] In particular, the sizes (e.g., channel length, channel width, transistor configuration, etc.) of the transistors F1 included in each of the cells IM[1,1] to IM[m,n] are preferably equal to each other, and the sizes of the transistors F2 included in each of the cells IM[1,1] to IM[m,n] are preferably equal to each other. The sizes of the transistors F1m included in each of the cells IMref[1] to IMref[m] are preferably equal to each other, and the sizes of the transistors F2m included in each of the cells IMref[1] to IMref[m] are preferably equal to each other. The sizes of the transistors F1 and F1m are preferably equal to each other, and the sizes of the transistors F2 and F2m are preferably equal to each other.

[0071] By making the sizes of the transistors equal to each other, the electrical characteristics of each transistor can be made almost equal. Therefore, by making the sizes of the transistors F1 included in each of the cells IM[1,1] to IM[m,n] equal and making the sizes of the transistors F2 included in each of the cells IM[1,1] to IM[m,n] equal, each of the cells IM[1,1] to IM[m,n] can perform almost the same operation when the conditions are the same. The same conditions here refer to, for example, the potentials of the source, drain, gate, etc. of the transistor F1, the potentials of the source, drain, gate, etc. of the transistor F2, the voltages input to each of the cells IM[1,1] to IM[m,n], etc. Similarly, by making the sizes of the transistors F1m included in each of the cells IMref[1] to IMref[m] equal and making the sizes of the transistors F2m included in each of the cells IMref[1] to IMref[m] equal, for example, the cells IMref[1] to IMref[m] can perform almost the same operation when the conditions are the same. The same conditions here refer to, for example, the potentials of the source, drain, gate, etc. of transistor F1m, the potentials of the source, drain, gate, etc. of transistor F2m, and the voltages input to each of cells IMref[1] to IMref[m].

[0072] In addition, unless otherwise specified, the transistors F1 and F1m are considered to ultimately operate in a linear region when they are in an on state. That is, the gate voltage, source voltage, and drain voltage of each of the above-mentioned transistors are considered to include a case where they are appropriately biased to a voltage within a range in which they operate in a linear region. However, one embodiment of the present invention is not limited to this. For example, the transistors F1 and F1m may operate in a saturation region when they are in an on state, or may operate in both a linear region and a saturation region.

[0073] Furthermore, unless otherwise specified, the transistors F2 and F2m are assumed to operate in the subthreshold region (i.e., in the transistor F2 or the transistor F2m, the gate-source voltage is lower than the threshold voltage, and more preferably, the drain current increases exponentially with respect to the gate-source voltage). In other words, the gate voltage, source voltage, and drain voltage of each of the above-mentioned transistors are assumed to include a case where they are appropriately biased to a voltage within the range in which they operate in the subthreshold region. For this reason, the transistors F2 and F2m are assumed to operate such that an off-current flows between the source and drain.

[0074] Moreover, the transistor F1 and / or the transistor F1m is preferably an OS transistor, for example. In addition, the channel formation region of the transistor F1 and / or the transistor F1m is more preferably an oxide containing at least one of indium, gallium, and zinc. Instead of the oxide, an oxide containing at least one of indium, an element M (for example, the element M may be one or more elements selected from aluminum, gallium, yttrium, copper, vanadium, beryllium, boron, titanium, iron, nickel, germanium, zirconium, molybdenum, lanthanum, cerium, neodymium, hafnium, tantalum, tungsten, magnesium, etc.) and zinc may be used. It is more preferable that the transistor F1 and / or the transistor F1m has the structure of the transistor described in the fifth embodiment.

[0075] By using OS transistors as the transistors F1 and / or F1m, leakage current of the transistors F1 and / or F1m can be suppressed, and therefore the power consumption of the arithmetic circuit can be reduced. Specifically, when the transistors F1 and / or F1m are off, leakage current from the retention node to the write word line can be made very small, and therefore the number of refresh operations of the potential of the retention node can be reduced. Furthermore, by reducing the number of refresh operations, the power consumption of the arithmetic circuit can be reduced. Furthermore, by making the leakage current from the retention node to the wiring WCL or the wiring XCL very small, the cell can retain the potential of the retention node for a long time, and therefore the arithmetic circuit can have higher arithmetic accuracy.

[0076] In addition, by using an OS transistor for the transistor F2 and / or the transistor F2m, the transistors can operate in a wide current range in the subthreshold region, thereby reducing current consumption. In addition, by using an OS transistor for the transistor F2 and / or the transistor F2m, the transistors can be manufactured simultaneously with the transistors F1 and F1m, which may shorten the manufacturing process of the arithmetic circuit. In addition to the OS transistor, the transistor F2 and / or the transistor F2m can be a transistor containing silicon in the channel formation region (hereinafter referred to as a Si transistor). As the silicon, for example, amorphous silicon (sometimes referred to as hydrogenated amorphous silicon), microcrystalline silicon, polycrystalline silicon, single crystal silicon, or the like can be used.

[0077] However, when semiconductor devices and the like are highly integrated on a chip, the chip may generate heat due to the operation of the circuit. This heat causes the temperature of the transistor to rise, which may change the characteristics of the transistor, causing a change in field-effect mobility and a decrease in operating frequency. Since OS transistors have higher heat resistance than Si transistors, the field-effect mobility is less likely to change due to temperature changes, and the operating frequency is also less likely to decrease. Furthermore, even when the temperature increases, OS transistors tend to maintain the characteristic that the drain current increases exponentially with respect to the gate-source voltage. Therefore, by using OS transistors, it is easy to perform calculations, processing, and the like even in a high-temperature environment. Therefore, when configuring a semiconductor device that is resistant to heat generation due to operation, it is preferable to use OS transistors as the transistors.

[0078] In each of the cells IM[1,1] to IM[m,n], a first terminal of the transistor F1 is electrically connected to a gate of the transistor F2. A first terminal of the transistor F2 is electrically connected to a wiring VE. A first terminal of the capacitor C5 is electrically connected to the gate of the transistor F2.

[0079] In each of the cells IMref[1] to IMref[m], a first terminal of the transistor F1m is electrically connected to a gate of the transistor F2m. A first terminal of the transistor F2m is electrically connected to a wiring VE. A first terminal of the capacitor C5m is electrically connected to the gate of the transistor F2m.

[0080] In FIG. 1, the transistors F1, F2, F1m, and F2m are illustrated with back gates, and the connection configuration of the back gates is not illustrated, but the electrical connection destination of the back gates can be determined at the design stage. For example, in a transistor having a back gate, the gate and the back gate may be electrically connected to increase the on-current of the transistor. That is, for example, the gate and the back gate of the transistor F1 may be electrically connected, or the gate and the back gate of the transistor F1m may be electrically connected. Also, for example, in a transistor having a back gate, in order to change the threshold voltage of the transistor or to reduce the off-current of the transistor, a wiring for electrically connecting the back gate of the transistor to an external circuit or the like may be provided, and a potential may be applied to the back gate of the transistor by the external circuit or the like.

[0081] 1 have a backgate, the semiconductor device of one embodiment of the present invention is not limited thereto. For example, the transistors F1 and F2 shown in FIG 1 may have a structure not including a backgate, that is, may have a single-gate structure. Some of the transistors may have a backgate, and other transistors may have a structure not including a backgate.

[0082] 1 are n-channel transistors, the semiconductor device of one embodiment of the present invention is not limited to this. For example, the transistors F1 and F2 may be partially or entirely replaced with p-channel transistors.

[0083] The above-mentioned examples of changes in the structure and polarity of the transistors are not limited to the transistors F1 and F2. For example, the structures and polarities of the transistors F1m, F2m, the transistors F3[1] to F3[n] and the transistors F4[1] to F4[n] described later, and further the transistors described elsewhere in the specification or the transistors shown in other drawings may be changed in the same manner.

[0084] The wiring VE is a wiring for passing a current between the first terminal and the second terminal of each of the transistors F2 of the cells IM[1,1] to IM[m,n], and also functions as a wiring for passing a current between the first terminal and the second terminal of each of the transistors F2m of the cells IMref[1] to IMref[m], as shown in Fig. 1. As an example, the wiring VE functions as a wiring for supplying a constant voltage. The constant voltage can be, for example, a low-level potential, a ground potential, or the like.

[0085] In the cell IM[1,1], the second terminal of the transistor F1 is electrically connected to the wiring WCL[1], and the gate of the transistor F1 is electrically connected to the wiring WSL[1]. The second terminal of the transistor F2 is electrically connected to the wiring WCL[1], and the second terminal of the capacitor C5 is electrically connected to the wiring XCL[1]. In FIG. 1, the connection point of the first terminal of the transistor F1, the gate of the transistor F2, and the first terminal of the capacitor C5 in the cell IM[1,1] is the node NN[1,1].

[0086] In the cell IM[m,1], the second terminal of the transistor F1 is electrically connected to the wiring WCL[1], and the gate of the transistor F1 is electrically connected to the wiring WSL[m]. The second terminal of the transistor F2 is electrically connected to the wiring WCL[1], and the second terminal of the capacitor C5 is electrically connected to the wiring XCL[m]. In FIG. 1, the connection point of the first terminal of the transistor F1, the gate of the transistor F2, and the first terminal of the capacitor C5 in the cell IM[m,1] is the node NN[m,1].

[0087] In the cell IM[1,n], the second terminal of the transistor F1 is electrically connected to the wiring WCL[n], and the gate of the transistor F1 is electrically connected to the wiring WSL[1]. The second terminal of the transistor F2 is electrically connected to the wiring WCL[n], and the second terminal of the capacitor C5 is electrically connected to the wiring XCL[1]. In FIG. 1, the connection point of the first terminal of the transistor F1, the gate of the transistor F2, and the first terminal of the capacitor C5 in the cell IM[1,n] is the node NN[1,n].

[0088] In the cell IM[m,n], the second terminal of the transistor F1 is electrically connected to the wiring WCL[n], and the gate of the transistor F1 is electrically connected to the wiring WSL[m]. The second terminal of the transistor F2 is electrically connected to the wiring WCL[n], and the second terminal of the capacitor C5 is electrically connected to the wiring XCL[m]. In FIG. 1, the connection point of the first terminal of the transistor F1, the gate of the transistor F2, and the first terminal of the capacitor C5 in the cell IM[m,n] is the node NN[m,n].

[0089] In the cell IMref[1], the second terminal of the transistor F1m is electrically connected to the wiring XCL[1], and the gate of the transistor F1m is electrically connected to the wiring WSL[1]. The second terminal of the transistor F2m is electrically connected to the wiring XCL[1], and the second terminal of the capacitor C5m is electrically connected to the wiring XCL[1]. In FIG. 1, the connection point of the first terminal of the transistor F1m, the gate of the transistor F2m, and the first terminal of the capacitor C5m in the cell IMref[1] is the node NNref[1].

[0090] In the cell IMref[m], the second terminal of the transistor F1m is electrically connected to the wiring XCL[m], and the gate of the transistor F1m is electrically connected to the wiring WSL[m]. The second terminal of the transistor F2m is electrically connected to the wiring XCL[m], and the second terminal of the capacitor C5m is electrically connected to the wiring XCL[m]. In FIG. 1, the connection point of the first terminal of the transistor F1m, the gate of the transistor F2m, and the first terminal of the capacitor C5m in the cell IMref[m] is the node NNref[m].

[0091] Note that nodes NN[1,1] through NN[m,n] and nodes NNref[1] through NNref[m] function as holding nodes for the respective cells.

[0092] In the cells IM[1,1] to IM[m,n], for example, when the transistor F1 is in an on state, the transistor F2 is configured as a diode connection. When the constant voltage provided by the wiring VE is set as a ground potential (GND), the transistor F1 is in an on state, and a current of a current amount I flows from the wiring WCL to the second terminal of the transistor F2, the potential of the gate (node ​​NN) of the transistor F2 is determined according to the current amount I. Since the transistor F1 is in an on state, the potential of the second terminal of the transistor F2 is ideally equal to the gate (node ​​NN) of the transistor F2. Here, by turning the transistor F1 off, the potential of the gate (node ​​NN) of the transistor F2 is maintained. As a result, the transistor F2 can pass a current of a current amount I according to the ground potential of the first terminal of the transistor F2 and the potential of the gate (node ​​NN) of the transistor F2 between the source and drain of the transistor F2. In this specification and the like, such an operation is referred to as "setting (programming) the amount of current flowing between the source and drain of the transistor F2 of the cell IM to I" or the like.

[0093] The circuit SWS1 includes, for example, transistors F3[1] to F3[n]. A first terminal of the transistor F3[1] is electrically connected to the wiring WCL[1], a second terminal of the transistor F3[1] is electrically connected to the circuit WCS, and a gate of the transistor F3[1] is electrically connected to the wiring SWL1. A first terminal of the transistor F3[n] is electrically connected to the wiring WCL[n], a second terminal of the transistor F3[n] is electrically connected to the circuit WCS, and a gate of the transistor F3[n] is electrically connected to the wiring SWL1.

[0094] As each of the transistors F3[1] to F3[n], for example, a transistor applicable to the transistor F1 and / or the transistor F2 can be used. In particular, as each of the transistors F3[1] to F3[n], it is preferable to use an OS transistor.

[0095] The circuit SWS1 functions as a circuit that brings the circuit WCS into a conductive state or a non-conductive state between the circuit WCS and each of the wirings WCL[1] to WCL[n].

[0096] The circuit SWS2 includes, for example, transistors F4[1] to F4[n]. A first terminal of the transistor F4[1] is electrically connected to the wiring WCL[1], a second terminal of the transistor F4[1] is electrically connected to the input terminal of the conversion circuit ITRZ[1], and a gate of the transistor F4[1] is electrically connected to the wiring SWL2. A first terminal of the transistor F4[n] is electrically connected to the wiring WCL[n], a second terminal of the transistor F4[n] is electrically connected to the input terminal of the conversion circuit ITRZ[n], and a gate of the transistor F4[n] is electrically connected to the wiring SWL2.

[0097] As each of the transistors F4[1] to F4[n], for example, a transistor applicable to the transistor F1 and / or the transistor F2 can be used. In particular, as each of the transistors F4[1] to F4[n], it is preferable to use an OS transistor.

[0098] The circuit SWS2 has a function of bringing the wiring WCL[1] and the conversion circuit ITRZ[1] and the wiring WCL[n] and the conversion circuit ITRZ[n] into a conductive state or a non-conductive state. Although not shown in FIG. 1, the circuit SWS2 also has a function of bringing the wiring WCL and the conversion circuit ITRZ into a conductive state or a non-conductive state in any one of the second column to the n-1th column.

[0099] The circuit WCS has a function of supplying data to be stored in each cell of the cell array CA.

[0100] The circuit XCS is electrically connected to the wirings XCL[1] to XCL[m]. The circuit XCS has a function of supplying a current amount corresponding to reference data or a current amount corresponding to second data to each of the cells IMref[1] to IMref[m] included in the cell array CA.

[0101] The circuit WSD is electrically connected to the wirings WSL[1] to WSL[m]. When writing first data to the cells IM[1,1] to IM[m,n], the circuit WSD has a function of selecting a row of the cell array CA to which the first data is to be written by supplying a predetermined signal to the wirings WSL[1] to WSL[m]. In other words, the wirings WSL[1] to WSL[m] function as write word lines.

[0102] The circuit WSD is electrically connected to the wirings SWL1 and SWL2, for example. The circuit WSD has a function of bringing the circuit WCS and the cell array CA into a conductive state or a non-conductive state by supplying a predetermined signal to the wiring SWL1, and a function of bringing the conversion circuits ITRZ[1] to ITRZ[n] and the cell array CA into a conductive state or a non-conductive state by supplying a predetermined signal to the wiring SWL2.

[0103] Each of the conversion circuits ITRZ[1] to ITRZ[n] has an input terminal and an output terminal, for example. For example, the output terminal of the conversion circuit ITRZ[1] is electrically connected to the wiring OL[1], and the output terminal of the conversion circuit ITRZ[n] is electrically connected to the wiring OL[n].

[0104] Each of the conversion circuits ITRZ[1] to ITRZ[n] has a function of converting a current input to an input terminal into a voltage according to the amount of the current, and outputting the voltage from an output terminal. The voltage may be, for example, an analog voltage or a digital voltage. Each of the conversion circuits ITRZ[1] to ITRZ[n] may have a function-based arithmetic circuit. In this case, for example, the arithmetic circuit may use the converted voltage to perform a function calculation, and the result of the calculation may be output to the wiring OL[1] to wiring OL[n].

[0105] In particular, when performing calculations on a hierarchical neural network, the above-mentioned functions may be, for example, a sigmoid function, a tanh function, a softmax function, a ReLU function, a threshold function, or the like.

[0106] <<Circuit WCS, Circuit XCS>> Here, specific examples of the circuit WCS and the circuit XCS will be described.

[0107] First, the circuit WCS will be described. Fig. 2A is a block diagram showing an example of the circuit WCS. In Fig. 2A, the circuit SWS1, the transistor F3, the wiring SWL1, and the wiring WCL are also shown to show the electrical connection between the circuit WCS and the peripheral circuits.

[0108] The circuit WCS includes, for example, the same number of circuits WCSa as the number of wirings WCL, that is, the circuit WCS includes n circuits WCSa.

[0109] The circuit SWS1 also has transistors F3 equal to the number of wirings WCL, that is, the circuit SWS1 has n transistors F3.

[0110] Therefore, the transistor F3 shown in Fig. 2A can be any one of the transistors F3[1] to F3[n] included in the arithmetic circuit MAC1 in Fig. 1. Similarly, the wiring WCL can be any one of the wirings WCL[1] to WCL[n] included in the arithmetic circuit MAC1 in Fig. 1.

[0111] Therefore, the wirings WCL[1] to WCL[n] are electrically connected to separate circuits WCSa via separate transistors F3.

[0112] The circuit WCSa shown in FIG. 2A includes a switch SWW, as an example. A first terminal of the switch SWW is electrically connected to a second terminal of the transistor F3, and a second terminal of the switch SWW is electrically connected to a wiring VINIL1. The wiring VINIL1 functions as a wiring that applies an initialization potential to the wiring WCL, and the initialization potential can be a ground potential (GND), a low-level potential, a high-level potential, or the like. Note that the switch SWW is turned on only when the initialization potential is applied to the wiring WCL, and is turned off otherwise.

[0113] As the switch SWW, for example, an electrical switch such as an analog switch or a transistor can be applied. When a transistor is applied as the switch SWW, the transistor can have a structure similar to that of the transistors F1 and F2. In addition, a mechanical switch may be applied in addition to an electrical switch.

[0114] In addition, the circuit WCSa in FIG. 2A has, as an example, a plurality of current sources CS. Specifically, the circuit WCSa has K bits (2 K In this case, the circuit WCSa has a function of outputting the first data of the current amount of 2 K The circuit WCSa has one current source CS that outputs information corresponding to the value of the 1st bit as a current, two current sources CS that output information corresponding to the value of the 2nd bit as a current, and two current sources CS that output information corresponding to the value of the Kth bit as a current. K-1 We have 1 each.

[0115] In FIG. 2A, each current source CS has a terminal T1 and a terminal T2. The terminal T1 of each current source CS is electrically connected to the second terminal of the transistor F3 of the circuit SWS1. The terminal T2 of one current source CS is electrically connected to the wiring DW[1], and each of the terminals T2 of the two current sources CS is electrically connected to the wiring DW[2]. K-1 Each of the terminals T2 of the current sources CS is electrically connected to a wiring DW[K].

[0116] The multiple current sources CS in the circuit WCSa each have the same constant current I Wut from the terminal T1. In practice, during the manufacturing stage of the arithmetic circuit MAC1, errors may occur due to variations in the electrical characteristics of the transistors included in each current source CS. For this reason, the constant current I WutThe error is preferably within 10%, more preferably within 5%, and even more preferably within 1%. In this embodiment, the constant current I output from the terminal T1 of the multiple current sources CS included in the circuit WCSa Wut In the following description, it is assumed that there is no error.

[0117] The wirings DW[1] to DW[K] are electrically connected to a current source CS and a constant current I Wut Specifically, for example, when a high-level potential is applied to the wiring DW[1], the current source CS electrically connected to the wiring DW[1] outputs a constant current I Wut flows to the second terminal of the transistor F3, and when a low-level potential is applied to the wiring DW[1], the current source CS electrically connected to the wiring DW[1] has a current I Wut For example, when a high-level potential is applied to the wiring DW[2], the two current sources CS electrically connected to the wiring DW[2] output a total of 2I Wut When a constant current of 2I flows to the second terminal of the transistor F3 and a low-level potential is applied to the wiring DW[2], the current source CS electrically connected to the wiring DW[2] has a total current of 2I Wut For example, when a high-level potential is applied to the wiring DW[K], the constant current of the 2 K-1 The current sources CS are K-1 I Wut When a constant current of 100 V flows through the second terminal of the transistor F3 and a low-level potential is applied to the wiring DW[K], the current source CS electrically connected to the wiring DW[K] is K-1 I Wut The constant current is not output.

[0118] The amount of current passed by one current source CS electrically connected to the wiring DW[1] corresponds to the value of the first bit, the amount of current passed by two current sources CS electrically connected to the wiring DW[2] corresponds to the value of the second bit, and the amount of current passed by K current sources CS electrically connected to the wiring DW[K] corresponds to the value of the Kth bit. Now consider the circuit WCSa when K is 2. For example, when the value of the first bit is "1" and the value of the second bit is "0", a high-level potential is applied to the wiring DW[1] and a low-level potential is applied to the wiring DW[2]. At this time, a constant current I is supplied from the circuit WCSa to the second terminal of the transistor F3 in the circuit SWS1. Wut For example, when the value of the first bit is "0" and the value of the second bit is "1", a low-level potential is applied to the wire DW[1] and a high-level potential is applied to the wire DW[2]. At this time, a constant current of 2I flows from the circuit WCSa to the second terminal of the transistor F3 of the circuit SWS1. Wut In addition, for example, when the value of the first bit is "1" and the value of the second bit is "1", a high-level potential is applied to the wiring DW[1] and the wiring DW[2]. At this time, a constant current of 3I flows from the circuit WCSa to the second terminal of the transistor F3 of the circuit SWS1. Wut flows. For example, when the value of the first bit is “0” and the value of the second bit is “0”, a low-level potential is applied to the wiring DW[1] and the wiring DW[2]. At this time, no constant current flows from the circuit WCSa to the second terminal of the transistor F3 of the circuit SWS1.

[0119] 2A illustrates the circuit WCSa when K is an integer equal to or greater than 3, but when K is 1, the circuit WCSa in FIG. 2A may be configured without a current source CS electrically connected to the wirings DW[2] to DW[K]. When K is 2, the circuit WCSa in FIG. 2A may be configured without a current source CS electrically connected to the wirings DW[3] to DW[K].

[0120] Next, a specific example of the configuration of the current source CS will be described.

[0121] A current source CS1 shown in FIG. 3A is a circuit applicable to the current source CS included in the circuit WCSa in FIG. 2A, and the current source CS1 has a transistor Tr1 and a transistor Tr2.

[0122] A first terminal of the transistor Tr1 is electrically connected to the wiring VDDL, and a second terminal of the transistor Tr1 is electrically connected to the gate of the transistor Tr1, the back gate of the transistor Tr1, and a first terminal of the transistor Tr2. A second terminal of the transistor Tr2 is electrically connected to the terminal T1, and a gate of the transistor Tr2 is electrically connected to the terminal T2. The terminal T2 is also electrically connected to the wiring DW.

[0123] The wiring DW is any one of the wirings DW[1] to DW[n] in FIG. 2A.

[0124] The line VDDL functions as a line that supplies a constant voltage, which may be, for example, a high-level potential.

[0125] When the constant voltage applied by the wiring VDDL is set to a high-level potential, a high-level potential is input to the first terminal of the transistor Tr1. The potential of the second terminal of the transistor Tr1 is set to a potential lower than the high-level potential. At this time, the first terminal of the transistor Tr1 functions as a drain, and the second terminal of the transistor Tr1 functions as a source. Since the gate of the transistor Tr1 and the second terminal of the transistor Tr1 are electrically connected, the gate-source voltage of the transistor Tr1 is 0 V. Therefore, when the threshold voltage of the transistor Tr1 is within an appropriate range, a current (drain current) in the current range of the subthreshold region flows between the first terminal and the second terminal of the transistor Tr1. When the transistor Tr1 is an OS transistor, the amount of the current is, for example, 1.0×10 -8 A or less, and 1.0×10 -12 A or less is more preferable, and 1.0×10 -15It is more preferable that the current is equal to or less than I A. It is also more preferable that the current is within a range that increases exponentially with respect to the gate-source voltage. In other words, the transistor Tr1 functions as a current source for supplying a current within the current range when the transistor Tr1 operates in the subthreshold region. The current is the above-mentioned I Wut or I, as described below. Xut is equivalent to.

[0126] The transistor Tr2 functions as a switching element. When the potential of the first terminal of the transistor Tr2 is higher than the potential of the second terminal of the transistor Tr2, the first terminal of the transistor Tr2 functions as a drain, and the second terminal of the transistor Tr2 functions as a source. In addition, since the back gate of the transistor Tr2 and the second terminal of the transistor Tr2 are electrically connected, the back gate-source voltage is 0V. Therefore, when the threshold voltage of the transistor Tr2 is within an appropriate range, the transistor Tr2 is turned on by inputting a high level potential to the gate of the transistor Tr2, and the transistor Tr2 is turned off by inputting a low level potential to the gate of the transistor Tr2. Specifically, when the transistor Tr2 is turned on, a current in the current range of the subthreshold region described above flows from the second terminal of the transistor Tr1 to the terminal T1, and when the transistor Tr2 is turned off, the current does not flow from the second terminal of the transistor Tr1 to the terminal T1.

[0127] Note that the circuit applicable to the current source CS included in the circuit WCSa of FIG. 2A is not limited to the current source CS1 of FIG. 3A. For example, the current source CS1 is configured such that the back gate of the transistor Tr2 and the second terminal of the transistor Tr2 are electrically connected, but the back gate of the transistor Tr2 may be electrically connected to another wiring. Such a configuration example is shown in FIG. 3B. The current source CS2 shown in FIG. 3B is configured such that the back gate of the transistor Tr2 is electrically connected to the wiring VTHL. The current source CS2 can apply a predetermined potential to the wiring VTHL by the external circuit or the like by electrically connecting the wiring VTHL to an external circuit or the like, and can apply the predetermined potential to the back gate of the transistor Tr2. This can change the threshold voltage of the transistor Tr2. In particular, the off current of the transistor Tr2 can be reduced by increasing the threshold voltage of the transistor Tr2.

[0128] Also, for example, the current source CS1 is configured such that the back gate of the transistor Tr1 and the second terminal of the transistor Tr1 are electrically connected, but a configuration may be used in which a voltage is held between the back gate of the transistor Tr2 and the second terminal by a capacitance. Such a configuration example is shown in FIG. 3C. The current source CS3 shown in FIG. 3C has a transistor Tr3 and a capacitance C6 in addition to the transistors Tr1 and Tr2. The current source CS3 differs from the current source CS1 in that the second terminal of the transistor Tr1 and the back gate of the transistor Tr1 are electrically connected via the capacitance C6, and the back gate of the transistor Tr1 and the first terminal of the transistor Tr3 are electrically connected. Also, the current source CS3 is configured such that the second terminal of the transistor Tr3 is electrically connected to the wiring VTL, and the gate of the transistor Tr3 is electrically connected to the wiring VWL. The current source CS3 can provide a high-level potential to the wiring VWL to turn on the transistor Tr3, thereby bringing the wiring VTL and the back gate of the transistor Tr1 into a conductive state. At this time, a predetermined potential can be input to the back gate of the transistor Tr1 from the wiring VTL. Then, by applying a low-level potential to the wiring VWL to turn off the transistor Tr3, the capacitor C6 can hold the voltage between the second terminal of the transistor Tr1 and the back gate of the transistor Tr1. In other words, by determining the voltage applied to the back gate of the transistor Tr1 by the wiring VTL, the threshold voltage of the transistor Tr1 can be varied, and the threshold voltage of the transistor Tr1 can be fixed by the transistor Tr3 and the capacitor C6.

[0129] Also, for example, a circuit applicable to the current source CS included in the circuit WCSa in Fig. 2A may be the current source CS4 shown in Fig. 3D. The current source CS4 is configured such that the back gate of the transistor Tr2 in the current source CS3 in Fig. 3C is electrically connected to the wiring VTHL instead of the second terminal of the transistor Tr2. In other words, the current source CS4 can vary the threshold voltage of the transistor Tr2 by the potential provided by the wiring VTHL, similar to the current source CS2 in Fig. 3B.

[0130] In the current source CS4, when a large current flows between the first and second terminals of the transistor Tr1, it is necessary to increase the on-current of the transistor Tr2 in order to flow the current from the terminal T1 to the outside of the current source CS4. In this case, the current source CS4 applies a high-level potential to the line VTHL to lower the threshold voltage of the transistor Tr2 and increase the on-current of the transistor Tr2, thereby allowing the large current flowing between the first and second terminals of the transistor Tr1 to flow from the terminal T1 to the outside of the current source CS4.

[0131] 3A to 3D as the current source CS included in the circuit WCSa in Fig. 2A, the circuit WCSa can output a current corresponding to the K-bit first data. The amount of the current can be, for example, the amount of current flowing between the first terminal and the second terminal within a range in which the transistor F1 operates in the subthreshold region.

[0132] The circuit WCSa shown in Fig. 2B may be used as the circuit WCSa in Fig. 2A. The circuit WCSa in Fig. 2B has a configuration in which the current source CS in Fig. 3A is connected to each of the wirings DW[1] to DW[K]. In addition, when the channel width of the transistor Tr1[1] is w[1], the channel width of the transistor Tr1[2] is w[2], and the channel width of the transistor Tr1[K] is w[K], the ratio of the respective channel widths is w[1]:w[2]:w[K]=1:2:2. K-1Since the current flowing between the source and drain of a transistor operating in the subthreshold region is proportional to the channel width, the circuit WCSa shown in FIG. 2B can output a current corresponding to the K-bit first data, similar to the circuit WCSa in FIG. 2A.

[0133] Note that, for example, transistors that can be used as the transistors F1 and / or F2 can be used as the transistors Tr1 (including transistors Tr1[1] to Tr2[K]), Tr2 (including transistors Tr2[1] to Tr2[K]), and Tr3. In particular, OS transistors can be used as the transistors Tr1 (including transistors Tr1[1] to Tr2[K]), Tr2 (including transistors Tr2[1] to Tr2[K]), and Tr3.

[0134] Next, a specific example of the circuit XCS will be described.

[0135] Fig. 2C is a block diagram showing an example of the circuit XCS, in which wiring XCL is also shown to show electrical connection between the circuit XCS and peripheral circuits.

[0136] The circuit XCS includes, for example, the same number of circuits XCSa as the number of wirings XCL, that is, the circuit XCS includes m circuits XCSa.

[0137] Therefore, the wiring XCL shown in Fig. 2C can be any one of the wirings XCL[1] to XCL[m] included in the arithmetic circuit MAC1 in Fig. 1. Therefore, a separate circuit XCSa is electrically connected to each of the wirings XCL[1] to XCL[m].

[0138] The circuit XCSa shown in FIG. 2C includes, as an example, a switch SWX. A first terminal of the switch SWX is electrically connected to the wiring XCL, and a second terminal of the switch SWX is electrically connected to the wiring VINIL2. The wiring VINIL2 functions as a wiring that applies an initialization potential to the wiring XCL, and the initialization potential can be a ground potential (GND), a low-level potential, a high-level potential, or the like. The initialization potential applied by the wiring VINIL2 may be equal to the potential applied by the wiring VINIL1. Note that the switch SWX is turned on only when the initialization potential is applied to the wiring XCL, and is turned off otherwise.

[0139] The switch SWX may be, for example, a switch applicable to the switch SWW.

[0140] The circuit configuration of the circuit XCSa in FIG. 2C can be substantially the same as that of the circuit WCSa in FIG. 3A. Specifically, the circuit XCSa has a function of outputting the reference data as a current amount and a function of outputting L bits (2 L and a function of outputting second data of the second input signal (L is an integer of 1 or more) as a current amount. In this case, the circuit XCSa has a function of outputting second data of the second input signal (L is an integer of 1 or more) as a current amount. L The circuit XCSa has one current source CS that outputs information corresponding to the value of the 1st bit as a current, two current sources CS that output information corresponding to the value of the 2nd bit as a current, and two current sources CS that output information corresponding to the value of the Lth bit as a current. L-1 We have 1 each.

[0141] Incidentally, the reference data output as a current by the circuit XCSa may be, for example, information in which the value of the first bit is "1" and the values ​​of the second and subsequent bits are "0."

[0142] In FIG. 2C, the terminal T2 of one current source CS is electrically connected to the wiring DX[1], and each of the terminals T2 of the two current sources CS is electrically connected to the wiring DX[2]. L-1 Each of the terminals T2 of the current sources CS is electrically connected to the wiring DX[L].

[0143] The multiple current sources CS in the circuit XCSa are each set to the same constant current I Xut from the terminal T1. The wirings DX[1] to DX[L] are electrically connected to the current sources CS to I Xut That is, the circuit XCSa has a function of causing the amount of current corresponding to L-bit information transmitted from the wirings DX[1] to DX[L] to flow through the wiring XCL.

[0144] Specifically, consider the circuit XCSa when L is 2. For example, when the value of the first bit is "1" and the value of the second bit is "0", a high-level potential is applied to the wire DX[1] and a low-level potential is applied to the wire DX[2]. At this time, a constant current I Xut For example, when the value of the first bit is "0" and the value of the second bit is "1", a low level potential is applied to the wire DX[1] and a high level potential is applied to the wire DX[2]. At this time, a constant current of 2I flows from the circuit XCSa to the wire XCL. Xut For example, when the value of the first bit is "1" and the value of the second bit is "1", a high-level potential is applied to the wiring DX[1] and the wiring DX[2]. At this time, a constant current of 3I flows from the circuit XCSa to the wiring XCL. Xut flows. Furthermore, for example, when the value of the first bit is "0" and the value of the second bit is "0", a low-level potential is applied to the wiring DX[1] and the wiring DX[2]. At this time, no constant current flows from the circuit XCSa to the wiring XCL. Note that, in this specification and other places, this may be rephrased as a current of zero flowing from the circuit XCSa to the wiring XCL. Also, when the current of zero, I, is output from the circuit XCSa, Xut , 2I Xut , 3I Xut etc. can be the second data output by the circuit XCSa, and in particular, the amount of current I Xut can be the reference data output by the circuit XCSa.

[0145] In addition, when an error occurs due to the variation in the electrical characteristics of the transistors included in each current source CS of the circuit XCSa, the constant current I Xut The error is preferably within 10%, more preferably within 5%, and even more preferably within 1%. In this embodiment, the constant current I output from the terminal T1 of the multiple current sources CS included in the circuit XCSa Xut In the following description, it is assumed that there is no error.

[0146] As the current source CS of the circuit XCSa, any one of the current sources CS1 to CS4 in Fig. 3A to Fig. 3D can be used as the current source CS of the circuit WCSa. In this case, the wiring DW shown in Fig. 3A to Fig. 3D can be replaced with the wiring DX. This allows the circuit XCSa to pass a current in the current range of the subthreshold region to the wiring XCL as the reference data or the second data of L bits.

[0147] Also, the circuit XCSa in Fig. 2C can have a circuit configuration similar to that of the circuit WCSa shown in Fig. 2B. In this case, the circuit WCSa shown in Fig. 2B can be replaced with the circuit XCSa, the wiring DW[1] with the wiring DX[1], the wiring DW[2] with the wiring DX[2], the wiring DW[K] with the wiring DX[L], the switch SWW with the switch SWX, and the wiring VINIL1 with the wiring VINIL2.

[0148] <<Conversion circuit ITRZ[1] to conversion circuit ITRZ[n]>> Here, a specific example of a circuit that can be applied to the conversion circuits ITRZ[1] to ITRZ[n] included in the arithmetic circuit MAC1 in FIG. 1 will be described.

[0149] The conversion circuit ITRZ1 shown in Fig. 4A is an example of a circuit that can be applied to the conversion circuits ITRZ[1] to ITRZ[n] in Fig. 1. In Fig. 4A, a circuit SWS2, a wiring WCL, a wiring SWL2, and a transistor F4 are also illustrated to show electrical connections between the conversion circuit ITRZ1 and peripheral circuits. The wiring WCL is any one of the wirings WCL[1] to WCL[n] included in the arithmetic circuit MAC1 in Fig. 1, and the transistor F4 is any one of the transistors F4[1] to F4[n] included in the arithmetic circuit MAC1 in Fig. 1.

[0150] The conversion circuit ITRZ1 in FIG. 4A is electrically connected to the wiring WCL via a transistor F4. The conversion circuit ITRZ1 is also electrically connected to the wiring OL. The conversion circuit ITRZ1 has a function of converting the amount of current flowing from the conversion circuit ITRZ1 to the wiring WCL or the amount of current flowing from the wiring WCL to the conversion circuit ITRZ1 into an analog voltage and outputting the analog voltage to the wiring OL. In other words, the conversion circuit ITRZ1 has a current-voltage conversion circuit.

[0151] The conversion circuit ITRZ1 in FIG. 4A includes, as an example, a resistor R5 and an operational amplifier OP1.

[0152] The inverting input terminal of the operational amplifier OP1 is electrically connected to the first terminal of the resistor R5 and the second terminal of the transistor F4. The non-inverting input terminal of the operational amplifier OP1 is electrically connected to the wiring VRL. The output terminal of the operational amplifier OP1 is electrically connected to the second terminal of the resistor R5 and the wiring OL.

[0153] The wiring VRL functions as a wiring that applies a constant voltage, which may be, for example, a ground potential (GND) or a low-level potential.

[0154] By configuring the conversion circuit ITRZ1 as shown in Figure 4A, the conversion circuit ITRZ1 can convert the amount of current flowing from the wiring WCL via transistor F4 to the conversion circuit ITRZ1, or the amount of current flowing from the conversion circuit ITRZ1 via transistor F4 to the wiring WCL, into an analog voltage and output it to the wiring OL.

[0155] In particular, by setting the constant voltage provided by the line VRL to ground potential (GND), the inverting input terminal of the operational amplifier OP1 becomes a virtual ground, and the analog voltage output to the line OL can be a voltage based on the ground potential (GND).

[0156] In addition, the conversion circuit ITRZ1 in FIG. 4A is configured to output an analog voltage, but the circuit configuration that can be applied to the conversion circuits ITRZ[1] to ITRZ[n] in FIG. 1 is not limited to this. For example, the conversion circuit ITRZ1 may be configured to have an analog-to-digital conversion circuit ADC as shown in FIG. 4B. Specifically, the conversion circuit ITRZ2 in FIG. 4B is configured such that the input terminal of the analog-to-digital conversion circuit ADC is electrically connected to the output terminal of the operational amplifier OP1 and the second terminal of the resistor R5, and the output terminal of the analog-to-digital conversion circuit ADC is electrically connected to the wiring OL. With this configuration, the conversion circuit ITRZ2 in FIG. 4B can output a digital signal to the wiring OL.

[0157] In addition, in the conversion circuit ITRZ2, when the digital signal output to the wiring OL is 1 bit (2-value), the conversion circuit ITRZ2 may be replaced with a conversion circuit ITRZ3 shown in FIG. 4C. The conversion circuit ITRZ3 in FIG. 4C is configured by providing a comparator CMP1 to the conversion circuit ITRZ1 in FIG. 4A. Specifically, the conversion circuit ITRZ3 is configured such that a first input terminal of the comparator CMP1 is electrically connected to the output terminal of the operational amplifier OP1 and the second terminal of the resistor R5, a second input terminal of the comparator CMP1 is electrically connected to the wiring VRL2, and an output terminal of the comparator CMP1 is electrically connected to the wiring OL. The wiring VRL2 functions as a wiring that provides a potential to be compared with the potential of the first terminal of the comparator CMP1. With such a configuration, the conversion circuit ITRZ3 in FIG. 4C can output a low-level potential or a high-level potential (a binary digital signal) to the wiring OL depending on the magnitude between the voltage converted by the current-voltage conversion circuit from the amount of current flowing between the source and drain of transistor F4 and the voltage provided by the wiring VRL2.

[0158] In addition, the conversion circuits ITRZ[1] to ITRZ[n] that can be applied to the arithmetic circuit MAC1 in Fig. 1 are not limited to the conversion circuits ITRZ1 to ITRZ3. For example, when the arithmetic circuit MAC1 is used as an arithmetic operation of a hierarchical neural network, it is preferable that the conversion circuits ITRZ1 to ITRZ3 have a function-based arithmetic circuit. In addition, the function-based arithmetic circuit can be an arithmetic circuit of a sigmoid function, a tanh function, a softmax function, a ReLU function, a threshold function, or the like.

[0159] Note that one embodiment of the present invention is not limited to the circuit configuration of the arithmetic circuit MAC1 described in this embodiment. The circuit configuration of the arithmetic circuit MAC1 can be changed depending on the situation. For example, the arithmetic circuit MAC1 may be changed to a configuration in which the circuit SWS1 is not provided, as in the arithmetic circuit MAC1A illustrated in FIG. 5. In the case of the arithmetic circuit MAC1, the circuit SWS1 can stop the current flowing from the circuit WCS to the wirings WCL[1] to WCL[n], whereas in the case of the arithmetic circuit MAC1A, the circuit WCS can stop the current flowing from the circuit WCS to the wirings WCL[1] to WCL[n]. Specifically, for example, when the circuit WCSa in FIG. 2A is used as the circuit WCS included in the circuit WCS of the arithmetic circuit MAC1A and the current source CS1 in FIG. 3A is used as the current source CS, a low-level potential is input to each of the wirings DW[1] to DW[K] and the switch SWW is turned off. By operating the circuit WCSa in this way, the current flowing from the circuit WCS to the wirings WCL[1] to WCL[n] can be stopped. In this manner, by stopping the current flowing from the circuit WCS to the wirings WCL[1] to WCL[n], arithmetic operation can be performed using the arithmetic circuit MAC1A instead of the arithmetic circuit MAC1.

[0160] <Operation example 1 of the calculation circuit> Next, an example of the operation of the arithmetic circuit MAC1 will be described.

[0161] Fig. 6 shows a timing chart of an operation example of the arithmetic circuit MAC1. The timing chart in Fig. 6 shows the fluctuations in the potentials of the wiring SWL1, wiring SWL2, wiring WSL[i] (i is an integer between 1 and m-1), wiring WSL[i+1], wiring XCL[i], wiring XCL[i+1], node NN[i,j] (j is an integer between 1 and n-1), node NN[i+1,j], node NNref[i], and node NNref[i+1] between time T11 and time T23 and in their vicinity. Furthermore, the timing chart in Fig. 6 shows the amount of current I flowing between the first terminal and the second terminal of the transistor F2 included in the cell IM[i,j]. F2[i,j] and the amount of current I flowing between the first and second terminals of transistor F2m included in cell IMref[i] F2m [i] and the amount of current I flowing between the first and second terminals of transistor F2 included in cell IM[i+1,j] F2 [i+1,j] and the amount of current I flowing between the first and second terminals of transistor F2m included in cell IMref[i+1] F2m The respective variations of [i+1] and are also shown.

[0162] It is to be noted that the circuit WCS of the arithmetic circuit MAC1 is the circuit WCS of FIG. 2A, and the circuit XCS of the arithmetic circuit MAC1 is the circuit XCS of FIG. 2C.

[0163] In this operation example, the potential of the wiring VE is the ground potential GND. Also, before time T11, the potentials of the nodes NN[i,j], NN[i+1,j], NNref[i], and NNref[i+1] are set to the ground potential GND as an initial setting. Specifically, for example, the potential for initialization of the wiring VINIL1 in FIG. 2A is set to the ground potential GND, and the switch SWW, the transistor F3, and the transistors F1 included in the cells IM[i,j] and IM[i+1,j] are turned on, so that the potentials of the nodes NN[i,j] and NN[i+1,j] can be set to the ground potential GND. Also, for example, by setting the initialization potential of the wiring VINIL2 in Figure 2C to the ground potential GND and turning on the switch SWX and the transistors F1m included in the cells IMref[i,j] and IMref[i+1,j], the potentials of the nodes NNref[i,j] and NNref[i+1,j] can be set to the ground potential GND.

[0164] <<From time T11 to time T12>> Between time T11 and time T12, a high-level potential (denoted as High in FIG. 6) is applied to the wiring SWL1, and a low-level potential (denoted as Low in FIG. 6) is applied to the wiring SWL2. As a result, a high-level potential is applied to the gates of the transistors F3[1] to F3[n], turning on the transistors F3[1] to F3[n], and a low-level potential is applied to the gates of the transistors F4[1] to F4[n], turning off the transistors F4[1] to F4[n].

[0165] Also, between time T11 and time T12, a low-level potential is applied to the wiring WSL[i] and the wiring WSL[i+1]. As a result, a low-level potential is applied to the gate of the transistor F1 included in the cells IM[i,1] to IM[i,n] in the i-th row of the cell array CA and the gate of the transistor F1m included in the cell IMref[i], and the transistors F1 and F1m are turned off. Also, a low-level potential is applied to the gate of the transistor F1 included in the cells IM[i+1,1] to IM[i+1,n] in the i+1-th row of the cell array CA and the gate of the transistor F1m included in the cell IMref[i+1], and the transistors F1 and F1m are turned off.

[0166] Moreover, between time T11 and time T12, the ground potential GND is applied to the wiring XCL[i] and the wiring XCL[i+1]. Specifically, for example, when the wiring XCL shown in FIG. 2C is the wiring XCL[i] and the wiring XCL[i+1], the potential for initialization of the wiring VINIL2 is set to the ground potential GND and the switch SWX is turned on, so that the potentials of the wiring XCL[i] and the wiring XCL[i+1] can be set to the ground potential GND.

[0167] In addition, from time T11 to time T12, in each of the circuits WCSa in FIG. 2A electrically connected to the wirings WCL[1] to WCL[n] via separate transistors F3, the first data is not input to the wirings DW[1] to DW[K]. In this case, it is assumed that a low-level potential is input to each of the wirings DW[1] to DW[K] in the circuit WCSa in FIG. 2A. In addition, from time T11 to time T12, in each of the circuits XCSa in FIG. 2C electrically connected to the wirings XCL[1] to XCL[m], the second data is not input to the wirings DX[1] to DX[L]. In this case, it is assumed that a low-level potential is input to each of the wirings DX[1] to DX[L] in the circuit XCSa in FIG. 2C.

[0168] In addition, between time T11 and time T12, no current flows through the wiring WCL[j], the wiring XCL[i], and the wiring XCL[i+1]. F2 [i,j], I F2m [i], I F2 [i+1,j], I F2m [i+1] is 0.

[0169] <<From time T12 to time T13>> Between time T12 and time T13, a high-level potential is applied to the wiring WSL[i]. As a result, a high-level potential is applied to the gate of the transistor F1 included in the cells IM[i,1] to IM[i,n] in the i-th row of the cell array CA and the gate of the transistor F1m included in the cell IMref[i], and the transistors F1 and F1m are turned on. Also, between time T12 and time T13, a low-level potential is applied to the wirings WSL[1] to WSL[m] other than the wiring WSL[i], and the transistors F1 included in the cells IM[1,1] to IM[m,n] other than the i-th row of the cell array CA and the transistors F1m included in the cells IMref[1] to IMref[m] other than the i-th row are turned off.

[0170] Furthermore, the ground potential GND has been applied to the lines XCL[1] through XCL[m] since before time T12.

[0171] <<From time T13 to time T14>> Between time T13 and time T14, the circuit WCS transmits a current amount I 0 Specifically, when the wiring WCL shown in FIG. 2A is the wiring WCL[j], a signal corresponding to the first data is input to each of the wirings DW[1] to DW[K], so that a current I 0 [i,j] flows. In other words, the value of the K-bit signal input as the first data is α[i,j] (α[i,j] is set to 0 to 2). K -1 or less), then I 0 [i,j]=α[i,j]×I Wut It becomes.

[0172] Note that when α[i,j] is 0, I 0 Since [i,j]=0, strictly speaking, no current flows from the circuit WCSa to the cell array CA via the transistor F3[j]. 0 It may be written as "a current of [i,j] = 0 flows."

[0173] Between time T13 and time T14, the first terminal of the transistor F1 included in the cell IM[i,j] in the i-th row of the cell array CA is in a conductive state between the first terminal of the transistor F1 and the wiring WCL[j], and the first terminal of the transistor F1 included in the cells IM[1,j] to IM[m,j] other than the i-th row of the cell array CA is in a non-conductive state between the wiring WCL[j]. Therefore, a current amount I 0 A current of [i,j] flows.

[0174] Incidentally, when the transistor F1 included in the cell IM[i,j] is turned on, the transistor F2 included in the cell IM[i,j] is configured as a diode connection. Therefore, when a current flows from the wiring WCL[j] to the cell IM[i,j], the potentials of the gate of the transistor F2 and the second terminal of the transistor F2 become approximately equal. This potential is determined by the amount of current flowing from the wiring WCL[j] to the cell IM[i,j] and the potential of the first terminal of the transistor F2 (GND in this case). In this operation example, the amount of current I flows from the wiring WCL[j] to the cell IM[i,j]. 0 As a result of the current flowing through node NN[i,j], the potential of the gate of transistor F2 (node ​​NN[i,j]) becomes V g [i,j]. In other words, the gate-source voltage of transistor F2 is V g [i,j]-GND, and the current flowing between the first and second terminals of transistor F2 is I 0 [i,j] is set.

[0175] Here, the threshold voltage of the transistor F2 is V th When [i,j], the amount of current I when transistor F2 operates in the subthreshold region is 0 [i,j] can be written as follows:

[0176]

number

[0177] In addition, I a is V g [i,j] is V th [i,j] is the drain current, and J is a correction coefficient determined by temperature, device structure, etc.

[0178] In addition, between time T13 and time T14, the circuit XCS supplies the wire XCL[i] with a current amount I ref0Specifically, when the wiring XCL shown in FIG. 2C is the wiring XCL[i], a high-level potential is input to the wiring DX[1] and a low-level potential is input to each of the wirings DX[2] to DX[K], and a current I flows from the circuit XCSa to the wiring XCL[i]. ref0 In other words, I ref0 =I Xut It becomes.

[0179] Between time T13 and time T14, a state of conduction is established between the first terminal of the transistor F1m included in the cell IMref[i] and the wiring XCL[i], so that a current I ref0 A current of flows.

[0180] As with cell IM[i,j], when transistor F1m included in cell IMref[i] is turned on, transistor F2m included in cell IMref[i] is configured as a diode connection. Therefore, when a current flows from wiring XCL[i] to cell IMref[i], the potentials of the gate of transistor F2m and the second terminal of transistor F2m become approximately equal. This potential is determined by the amount of current flowing from wiring XCL[i] to cell IMref[i] and the potential of the first terminal of transistor F2m (GND in this case), etc. In this operation example, the amount of current I flows from wiring XCL[i] to cell IMref[i]. ref0 When a current of V flows, the gate of transistor F2 (node ​​NNref[i]) is V gm [i], and the potential of the wiring XCL[i] at this time is also V gm [i]. In other words, in transistor F2m, the gate-source voltage is V gm [i]-GND, and the current flowing between the first and second terminals of the transistor F2m is I ref0 is set.

[0181] Here, the threshold voltage of the transistor F2m is V thm [i], the amount of current I when transistor F2m operates in the subthreshold regionref0 can be written as the following formula. Note that the correction coefficient J is assumed to be the same as that of transistor F2 included in cell IM[i,j]. For example, the device structure and size (channel length, channel width) of the transistors are assumed to be the same. In addition, the correction coefficient J of each transistor varies due to manufacturing variations, but it is assumed that the variations are suppressed to a level that allows the discussion below to be carried out with sufficient accuracy for practical use.

[0182]

number

[0183] Here, the weighting coefficient w[i,j], which is the first data, is defined as follows.

[0184]

number

[0185] Therefore, equation (1.1) can be rewritten as follows:

[0186]

number

[0187] The current I output by the current source CS of the circuit WCSa in Figure 2A Wut and the current I output by the current source CS of the circuit XCSa in Figure 2C. Xut If and are equal, then w[i,j]=α[i,j]. That is, I Wut And, I Xut If and are equal, α[i,j] corresponds to the value of the first data, so I Wut And, I Xut Preferably, and are equal to each other.

[0188] <<From time T14 to time T15>> Between time T14 and time T15, a low-level potential is applied to the wiring WSL[i], so that a low-level potential is applied to the gates of the transistors F1 included in the cells IM[i,1] to IM[i,n] in the i-th row of the cell array CA and the gate of the transistor F1m included in the cell IMref[i], turning off the transistors F1 and F1m.

[0189] When the transistor F1 included in the cell IM[i,j] is turned off, the capacitance C5 is charged to V g [i,j]-V gm [i] is held. In addition, by turning off the transistor F1 included in the cell IMref[i], the capacitance C5m holds 0, which is the difference between the potential of the gate (node ​​NNref[i]) of the transistor F2m and the potential of the wiring XCL[i]. Note that the voltage held by the capacitance C5m may be a voltage other than 0 (here, for example, Δ) depending on the transistor characteristics of the transistors F1m and F2m during the operation from time T13 to time T14. In this case, the potential of the node NNref[i] may be considered as a potential obtained by adding Δ to the potential of the wiring XCL[i].

[0190] <<From time T15 to time T16>> 2C is the wiring XCL[i], the potential for initialization of the wiring VINIL2 is set to the ground potential GND, and the switch SWX is turned on, so that the potential of the wiring XCL[i] can be set to the ground potential GND.

[0191] As a result, the potentials of nodes NN[i,1] to NN[i,n] change due to capacitive coupling by capacitance C5 contained in each of cells IM[i,1] to IM[i,n] in the i-th row, and the potential of node NNref[i] changes due to capacitive coupling by capacitance C5m contained in cell IMref[i].

[0192] The change in potential of nodes NN[i,1] to NN[i,n] is calculated by multiplying the change in potential of line XCL[i] by a capacitive coupling coefficient determined by the configuration of each of cells IM[i,1] to IM[i,n] included in cell array CA. The capacitive coupling coefficient is calculated from the capacitance of capacitor C5, the gate capacitance of transistor F2, parasitic capacitance, etc. In each of cells IM[i,1] to IM[i,n], when the capacitive coupling coefficient of capacitor C5 is p, the potential of node NN[i,j] of cell IM[i,j] is calculated by multiplying the potential at a point in time between time T14 and time T15 by p(V gm [i]-GND) decreases.

[0193] Similarly, when the potential of the wiring XCL[i] changes, the potential of the node NNref[i] also changes due to the capacitive coupling of the capacitance C5m included in the cell IMref[i]. If the capacitive coupling coefficient of the capacitance C5m is p, like the capacitance C5, the potential of the node NNref[i] of the cell IMref[i] changes from the potential at the time point between time T14 and time T15 to p(V gm [i]-GND) decreases.

[0194] As a result, the potential of the node NN[i,j] of the cell IM[i,j] drops, so that the transistor F2 is turned off. Similarly, the potential of the node NNref[i] of the cell IMref[i] drops, so that the transistor F2m is also turned off. Therefore, between time T15 and time T16, F2 [i,j], I F2m[i] is 0. Note that, between time T14 and time T15 in the timing chart of Fig. 6, the potential of the node NN[i,j] is lower than the ground potential GND, but may be a potential equal to or higher than the ground potential GND if the transistor F2 is turned off. Also, the potential of the node NNref[i] is the ground potential GND (i.e., p=1), but may be a potential higher than the ground potential GND or a potential lower than the ground potential GND if the transistor F2m is turned off.

[0195] <<From time T16 to time T17>> Between time T16 and time T17, a high-level potential is applied to the wiring WSL[i+1]. As a result, a high-level potential is applied to the gate of the transistor F1 included in the cells IM[i+1,1] to IM[i+1,n] in the i+1th row of the cell array CA and the gate of the transistor F1m included in the cell IMref[i+1], and the transistors F1 and F1m are turned on. Also, between time T16 and time T17, a low-level potential is applied to the wirings WSL[1] to WSL[m] except for the wiring WSL[i+1], and the transistors F1 included in the cells IM[1,1] to IM[m,n] other than the i+1th row of the cell array CA and the transistors F1m included in the cells IMref[1] to IMref[m] other than the i+1th row are turned off.

[0196] Furthermore, the ground potential GND has been applied to the wirings XCL[1] through XCL[m] continuously since before time T16.

[0197] <<From time T17 to time T18>> Between time T17 and time T18, the circuit WCS transmits a current amount I 0Specifically, when the wiring WCL shown in FIG. 2A is the wiring WCL[j+1], a signal corresponding to the first data is input to each of the wirings DW[1] to DW[K], so that a current I 0 [i+1,j] flows. In other words, the value of the K-bit signal input as the first data is α[i+1,j] (α[i+1,j] is 0 to 2 K -1 or less), then I 0 [i,j]=α[i+1,j]×I Wut It becomes.

[0198] Note that when α[i+1,j] is 0, I 0 Since [i+1,j]=0, strictly speaking, no current flows from the circuit WCSa to the cell array CA via the transistor F3[j]. 0 As in the case of [i,j]=0, 0 It may be written as "a current of [i+1,j]=0 flows."

[0199] At this time, the first terminal of the transistor F1 included in the cell IM[i+1,j] in the i+1th row of the cell array CA is in a conductive state between the wiring WCL[j], and the first terminal of the transistor F1 included in the cells IM[1,j] to IM[m,j] other than the i+1th row of the cell array CA is in a non-conductive state between the wiring WCL[j]. Therefore, a current amount I 0 A current of [i+1,j] flows.

[0200] Incidentally, when the transistor F1 included in the cell IM[i+1,j] is turned on, the transistor F2 included in the cell IM[i+1,j] is configured as a diode connection. Therefore, when a current flows from the wiring WCL[j] to the cell IM[i+1,j], the potentials of the gate of the transistor F2 and the second terminal of the transistor F2 become approximately equal. This potential is determined by the amount of current flowing from the wiring WCL[j] to the cell IM[i+1,j] and the potential of the first terminal of the transistor F2 (GND in this case), etc. In this operation example, the amount of current I 0 As a result of the current flowing through node NN[i+1,j], the potential of the gate of transistor F2 (node ​​NN[i+1,j]) becomes V g [i+1,j]. In other words, the gate-source voltage of transistor F2 is V g [i+1,j]-GND, and the current flowing between the first and second terminals of transistor F2 is I 0 [i+1,j] is set.

[0201] Here, the threshold voltage of the transistor F2 is V th When [i+1,j], the current I when transistor F2 operates in the subthreshold region is 0 [i+1,j] can be written as follows: Note that the correction coefficient is J, which is the same as that of the transistor F2 included in the cell IM[i,j] and the transistor F2m included in the cell IMref[i].

[0202]

number

[0203] In addition, between time T17 and time T18, the circuit XCS supplies the wiring XCL[i+1] with a current amount I ref0Specifically, as in the period from time T13 to time T14, when the wiring XCL shown in FIG. 2C is the wiring XCL[i+1], a high-level potential is input to the wiring DX[1] and a low-level potential is input to each of the wirings DX[2] to DX[K], and a current I flows from the circuit XCSa to the wiring XCL[i+1]. ref0 =I Xut flows.

[0204] Between time T17 and time T18, a state of conduction is established between the first terminal of the transistor F1m included in the cell IMref[i+1] and the wiring XCL[i+1], so that a current amount I ref0 A current of flows.

[0205] As with cell IM[i+1,j], when transistor F1m included in cell IMref[i+1] is turned on, transistor F2m included in cell IMref[i+1,j] is configured as a diode connection. Therefore, when a current flows from wiring XCL[i+1] to cell IMref[i+1], the potentials of the gate of transistor F2m and the second terminal of transistor F2m become approximately equal. This potential is determined by the amount of current flowing from wiring XCL[i+1] to cell IMref[i+1] and the potential of the first terminal of transistor F2m (GND in this case), etc. In this operation example, a current amount I ref0 As a result of this current flowing, the gate of transistor F2 (node ​​NNref[i+1]) is V gm [i+1], and the potential of the wiring XCL[i+1] at this time is also V gm [i+1]. In other words, in transistor F2m, the gate-source voltage is V gm [i+1]-GND, and the current flowing between the first and second terminals of the transistor F2m is I ref0 is set.

[0206] Here, the threshold voltage of the transistor F2m is V thmWhen [i+1,j], the amount of current I when transistor F2m operates in the subthreshold region is ref0 can be written as follows: Note that the correction coefficient J is the same as the transistor F2 included in the cell IM[i+1,j].

[0207]

number

[0208] Here, the weighting coefficient w[i+1,j], which is the first data, is defined as follows.

[0209]

number

[0210] Therefore, equation (1.5) can be rewritten as follows:

[0211]

number

[0212] The current I output by the current source CS of the circuit WCSa in Figure 2A Wut and the current I output by the current source CS of the circuit XCSa in Figure 2C. Xut If and are equal, then w[i+1,j]=α[i+1,j]. That is, I Wut And, I Xut If and are equal, α[i+1,j] corresponds to the value of the first data, so I Wut And, I Xut Preferably, and are equal to each other.

[0213] <<From time T18 to time T19>> Between time T18 and time T19, a low-level potential is applied to the wiring WSL[i+1], so that a low-level potential is applied to the gates of the transistors F1 included in the cells IM[i+1,1] to IM[i+1,n] in the i+1th row of the cell array CA and the gate of the transistor F1m included in the cell IMref[i+1], turning off the transistors F1 and F1m.

[0214] When the transistor F1 included in the cell IM[i+1,j] is turned off, the capacitance C5 is charged to V g [i+1,j]-V gm [i+1] is held. In addition, by turning off the transistor F1 included in the cell IMref[i+1], the capacitance C5m holds 0, which is the difference between the potential of the gate of the transistor F2m (node ​​NNref[i+1]) and the potential of the wiring XCL[i+1]. Note that the voltage held by the capacitance C5m may be a voltage other than 0 (here, for example, Δ) depending on the transistor characteristics of the transistors F1m and F2m during the operation from time T18 to time T19. In this case, the potential of the node NNref[i+1] may be considered as a potential obtained by adding Δ to the potential of the wiring XCL[i+1].

[0215] <<From time T19 to time T20>> Between time T19 and time T20, the ground potential GND is applied to the line XCL[i+1]. Specifically, for example, when the line XCL shown in FIG. 2C is the line XCL[i+1], the potential for initialization of the line VINIL2 is set to the ground potential GND, and the switch SWX is turned on, so that the potential of the line XCL[i+1] can be set to the ground potential GND.

[0216] As a result, the potentials of nodes NN[i,1] to NN[i+1,n] change due to capacitive coupling by capacitance C5 contained in each of cells IM[i+1,1] to IM[i+1,n] in the i+1th row, and the potential of node NNref[i+1] changes due to capacitive coupling by capacitance C5m contained in cell IMref[i+1].

[0217] The change in the potential of the nodes NN[i+1,1] to NN[i+1,n] is calculated by multiplying the change in the potential of the wiring XCL[i+1] by a capacitive coupling coefficient determined by the configuration of each of the cells IM[i+1,1] to IM[i+1,n] included in the cell array CA. The capacitive coupling coefficient is calculated from the capacitance of the capacitor C5, the gate capacitance of the transistor F2, the parasitic capacitance, etc. When the capacitive coupling coefficient of the capacitor C5 in each of the cells IM[i+1,1] to IM[i+1,n] is set to p, which is the same as the capacitive coupling coefficient of the capacitor C5 in each of the cells IM[i,1] to IM[i,n], the potential of the node NN[i+1,j] of the cell IM[i+1,j] is changed from the potential at the time point between time T18 and time T19 by p(V gm [i+1]-GND) decreases.

[0218] Similarly, when the potential of the wiring XCL[i+1] changes, the potential of the node NNref[i+1] also changes due to the capacitive coupling of the capacitance C5m included in the cell IMref[i+1]. If the capacitive coupling coefficient of the capacitance C5m is p, like the capacitance C5, the potential of the node NNref[i+1] of the cell IMref[i+1] changes from the potential at the time point between time T18 and time T19 to p(V gm [i+1]-GND) decreases.

[0219] As a result, the potential of the node NN[i+1,j] of the cell IM[i+1,j] drops, so that the transistor F2 is turned off. Similarly, the potential of the node NNref[i+1] of the cell IMref[i+1] drops, so that the transistor F2m is also turned off. Therefore, between time T19 and time T20, F2[i+1,j], I F2m [i+1] are each 0. Note that, between time T19 and time T20 in the timing chart of Fig. 6, the potential of the node NN[i+1,j] is lower than the ground potential GND, but may be a potential equal to or higher than the ground potential GND if the transistor F2 is turned off. Also, the potential of the node NNref[i+1] is the ground potential GND (i.e., p=1), but may be a potential higher than the ground potential GND or a potential lower than the ground potential GND if the transistor F2m is turned off.

[0220] <<From time T20 to time T21>> Between time T20 and time T21, a low-level potential is applied to the wiring SWL1, so that a low-level potential is applied to each of the gates of the transistors F3[1] to F3[n], and each of the transistors F3[1] to F3[n] is turned off.

[0221] <<From time T21 to time T22>> A high-level potential is applied to the wiring SWL2 from time T21 to time T22. As a result, a high-level potential is applied to each of the gates of the transistors F4[1] to F4[n], and each of the transistors F4[1] to F4[n] is turned on.

[0222] <<From time T22 to time T23>> Between time T22 and time T23, the circuit XCS transmits the second data to the wiring XCL[i] as the current amount I ref0 x[i] times I ref0 Specifically, for example, when the wiring XCL shown in FIG. 2C is the wiring XCL[i], a high-level potential or a low-level potential is input to each of the wirings DX[1] to DX[K] according to the value of x[i], and a current of x[i]I flows from the circuit XCSa to the wiring XCL[i]. ref0 =x[i]I XutIn this operation example, x[i] corresponds to the value of the second data. At this time, the potential of the line XCL[i] changes from 0 to V gm [i] + ΔV[i].

[0223] When the potential of the wiring XCL[i] changes, the potentials of the nodes NN[i,1] to NN[i,n] also change due to capacitive coupling by the capacitance C5 included in each of the cells IM[i,1] to IM[i,n] in the i-th row of the cell array CA. Therefore, the potential of the node NN[i,j] of the cell IM[i,j] is V g [i,j]+pΔV[i].

[0224] Similarly, when the potential of the wiring XCL[i] changes, the potential of the node NNref[i] also changes due to the capacitive coupling of the capacitance C5m included in the cell IMref[i]. Therefore, the potential of the node NNref[i] of the cell IMref[i] is V gm [i]+pΔV[i].

[0225] As a result, the amount of current I flowing between the first terminal and the second terminal of the transistor F2 during the period from time T22 to time T23 is 1 [i,j], the amount of current I flowing between the first and second terminals of transistor F2m ref1 [i,j] can be written as follows:

[0226]

number

[0227]

number

[0228] From equations (1.9) and (1.10), x[i] can be expressed as the following equation.

[0229]

number

[0230] Therefore, equation (1.9) can be rewritten as

[0231]

number

[0232] In other words, the amount of current flowing between the first terminal and the second terminal of the transistor F2 included in the cell IM[i,j] is proportional to the product of the first data w[i,j] and the second data x[i].

[0233] In addition, during the period from time T22 to time T23, the circuit XCS transmits the current amount I ref0 x[i+1] is x[i+1] times I ref0 Specifically, for example, when the wiring XCL shown in FIG. 2C is the wiring XCL[i+1], a high-level potential or a low-level potential is input to each of the wirings DX[1] to DX[K] according to the value of x[i+1], and a current of x[i+1]I flows from the circuit XCSa to the wiring XCL[i+1]. ref0 =x[i+1]I Xut In this operation example, x[i+1] corresponds to the value of the second data. At this time, the potential of the line XCL[i+1] changes from 0 to V gm [i+1] + ΔV[i+1].

[0234] When the potential of the wiring XCL[i+1] changes, the potentials of the nodes NN[i+1,1] to NN[i+1,n] also change due to the capacitive coupling of the capacitor C5 included in each of the cells IM[i+1,1] to IM[i+1,n] in the i+1th row of the cell array CA. Therefore, the potential of the node NN[i+1,j] of the cell IM[i+1,j] is V g [i+1,j]+pΔV[i+1].

[0235] Similarly, when the potential of the wiring XCL[i+1] changes, the potential of the node NNref[i+1] also changes due to the capacitive coupling of the capacitance C5m included in the cell IMref[i+1]. Therefore, the potential of the node NNref[i+1] of the cell IMref[i+1] is V gm [i+1]+pΔV[i+1].

[0236] As a result, the amount of current I flowing between the first terminal and the second terminal of the transistor F2 during the period from time T22 to time T23 is 1 [i+1,j], the amount of current I flowing between the first and second terminals of transistor F2m ref1 [i+1,j] can be written as follows:

[0237]

number

[0238]

number

[0239] From equations (1.13) and (1.14), x[i+1] can be expressed by the following equation.

[0240]

number

[0241] Therefore, equation (1.13) can be rewritten as

[0242]

number

[0243] In other words, the amount of current flowing between the first terminal and the second terminal of transistor F2 included in cell IM[i+1,j] is proportional to the product of the first data w[i+1,j] and the second data x[i+1].

[0244] Here, consider the total amount of current flowing from the conversion circuit ITRZ[j] to the cells IM[i,j] and IM[i+1,j] via the transistor F4[j] and the wiring WCL[j]. Let I S [j], then I S [j] can be expressed by the following equation using equations (1.12) and (1.16).

[0245]

number

[0246] Therefore, the amount of current output from the conversion circuit ITRZ[j] is proportional to the sum of the products of the first data, the weighting coefficients w[i,j] and w[i+1,j], and the second data, the neuron signal values ​​x[i] and x[i+1].

[0247] In the above operation example, the sum of the currents flowing through the cells IM[i,j] and IM[i+1,j] is treated, but the sum of the currents flowing through the cells IM[1,j] to IM[m,j] may also be treated as a plurality of cells. In this case, formula (1.17) can be rewritten as the following formula.

[0248]

number

[0249] Therefore, even in the case of an arithmetic circuit MAC1 having three or more rows and two or more columns of cell arrays CA, it is possible to perform a product-sum operation as described above. In this case, the arithmetic circuit MAC1 selects one of the multiple columns as a current amount I ref0 , and xI ref0 In other words, by increasing the number of columns in the memory cell array, a semiconductor device that realizes high-speed product-sum calculation can be provided.

[0250] The above-mentioned operation example of the arithmetic circuit MAC1 is suitable for calculating the sum of products of the positive first data and the positive second data. An operation example for calculating the sum of products of the positive or negative first data and the positive second data, and an operation example for calculating the sum of products of the positive or negative first data and the positive or negative second data will be described in the second embodiment.

[0251] In addition, in this embodiment, the case where the transistor included in the arithmetic circuit MAC1 is an OS transistor or a Si transistor has been described, but one embodiment of the present invention is not limited thereto. The transistor included in the arithmetic circuit MAC1 may be, for example, a transistor having an active layer made of Ge or the like, a transistor having an active layer made of a compound semiconductor such as ZnSe, CdS, GaAs, InP, GaN, or SiGe, a transistor having an active layer made of a carbon nanotube, or a transistor having an active layer made of an organic semiconductor.

[0252] Note that this embodiment mode can be appropriately combined with other embodiment modes described in this specification.

[0253] (Embodiment 2) In the first embodiment, an arithmetic circuit that performs a multiplication and addition operation between first data that is positive or "0" and second data that is positive or "0" and an example of its operation have been described. In the present embodiment, however, an arithmetic circuit that can perform a multiplication and addition operation between first data that is positive, negative, or "0" and second data that is positive or "0" and a multiplication and addition operation between first data that is positive, negative, or "0" and second data that is positive, negative, or "0" will be described.

[0254] <Arithmetic circuit configuration example 1> Fig. 7 shows an example of the configuration of an arithmetic circuit that performs a multiply-and-accumulate operation between first data that is positive, negative, or "0" and second data that is positive or "0". The arithmetic circuit MAC2 shown in Fig. 7 has a configuration obtained by modifying the arithmetic circuit MAC1 in Fig. 1. Therefore, in the explanation of the arithmetic circuit MAC2, the parts that overlap with the explanation of the arithmetic circuit MAC1 will be omitted.

[0255] The cell array CA shown in Fig. 7 has m cells IMref arranged in one column, and circuits CES arranged in a matrix of m x n. In Fig. 7, cells IMref[1], IMref[m], CES[1,j], and CES[m,j] are illustrated. The CES[1,j] has cells IM[1,j] and IMr[1,j], and the CES[m,j] has cells IM[m,j] and IMr[m,j]. In this specification, when describing the circuits CES[1,j] to CES[m,j], IM[1,j], IMr[1,j], IM[m,j], IMr[m,j], and IMr[m,j], the [m,n] attached to each reference numeral may be omitted.

[0256] The cells IM can have the same configuration as the cells IM[1,1] to IM[m,n] included in the cell array CA of the arithmetic circuit MAC1 in FIG.

[0257] Moreover, the cell IMr can have the same configuration as the cell IM. The cell IMr in FIG. 7 is illustrated as having the same configuration as the cell IM as an example. In addition, in order to distinguish the transistors, capacitances, etc. included in the cell IM and the cell IMr from each other, the reference characters indicating the transistors and capacitances included in the cell IMr are marked with "r".

[0258] Specifically, the cell IMr has a transistor F1r, a transistor F2r, and a capacitance C5r. The transistor F1r corresponds to the transistor F1 of the cell IM, the transistor F2r corresponds to the transistor F2 of the cell IM, and the capacitance C5r corresponds to the capacitance C5 of the cell IM. Therefore, for the electrical connection configurations of the transistor F1r, the transistor F2r, and the capacitance C5r, refer to the description of the cells IM[1,1] to IM[m,n] in the first embodiment.

[0259] In the cell IMr, the connection point between the first terminal of the transistor F1r, the gate of the transistor F2r, and the first terminal of the capacitor C5r is defined as a node NNr.

[0260] In the circuit CES[1,j], the second terminal of the capacitor C5 is electrically connected to the wiring XCL[1], the gate of the transistor F1 is electrically connected to the wiring WSL[1], the second terminal of the transistor F1 and the second terminal of the transistor F2 are electrically connected to the wiring WCL[j], the second terminal of the capacitor C5r is electrically connected to the wiring XCL[1], the gate of the transistor F1r is electrically connected to the wiring WSL[1], and the second terminal of the transistor F1r and the second terminal of the transistor F2r are electrically connected to the wiring WCLr[j].

[0261] Similarly, in the circuit CES[m,j], the second terminal of the capacitor C5 is electrically connected to the wiring XCL[m], the gate of the transistor F1 is electrically connected to the wiring WSL[m], the second terminal of the transistor F1 and the second terminal of the transistor F2 are electrically connected to the wiring WCL[j], the second terminal of the capacitor C5r is electrically connected to the wiring XCL[m], the gate of the transistor F1r is electrically connected to the wiring WSL[m], and the second terminal of the transistor F1r and the second terminal of the transistor F2r are electrically connected to the wiring WCLr[j].

[0262] Each of the wirings WCL[j] and WCLr[j] functions, for example, as a wiring that passes a current from the circuit WCS to the cells IM and IMr included in the circuit CES, similar to the wirings WCL[1] to WCL[n] described in embodiment 1. Also, for example, each of the wirings WCL[j] and WCLr[j] functions as a wiring that passes a current from the conversion circuit ITRZD[j] to the cells IM and IMr included in the circuit CES.

[0263] 7, the circuit SWS1 includes a transistor F3[j] and a transistor F3r[j]. A first terminal of the transistor F3[j] is electrically connected to the wiring WCL[j], a second terminal of the transistor F3[j] is electrically connected to the circuit WCS, and a gate of the transistor F3[j] is electrically connected to the wiring SWL1. A first terminal of the transistor F3r[j] is electrically connected to the wiring WCLr[j], a second terminal of the transistor F3r[j] is electrically connected to the circuit WCS, and a gate of the transistor F3r[j] is electrically connected to the wiring SWL1.

[0264] 7, the circuit SWS2 includes a transistor F4[j] and a transistor F4r[j]. A first terminal of the transistor F4[j] is electrically connected to the wiring WCL[j], a second terminal of the transistor F4[j] is electrically connected to the conversion circuit ITRZD[j], and a gate of the transistor F4[j] is electrically connected to the wiring SWL2. A first terminal of the transistor F4r[j] is electrically connected to the wiring WCLr[j], a second terminal of the transistor F4r[j] is electrically connected to the conversion circuit ITRZD[j], and a gate of the transistor F4r[j] is electrically connected to the wiring SWL2.

[0265] The conversion circuit ITRZD[j] is a circuit equivalent to the conversion circuits ITRZ[1] to ITRZ[n] in the arithmetic circuit MAC1, and has the function of generating a voltage corresponding to the difference between the amount of current flowing from the conversion circuit ITRZD[j] to the wiring WCL[j] and the amount of current flowing from the conversion circuit ITRZD[j] to the wiring WCLr[j], for example, and outputting the voltage to the wiring OL[j].

[0266] A specific configuration example of the conversion circuit ITRZD[j] is shown in FIG. 8A. The conversion circuit ITRZD1 shown in FIG. 8A is an example of a circuit that can be applied to the conversion circuit ITRZD[j] in FIG. 7. In addition, in FIG. 8A, in order to show the electrical connection with the peripheral circuits of the conversion circuit ITRZD1, the circuit SWS2, the wiring WCL, the wiring WCLr, the wiring SWL2, the transistor F4, the transistor F4r, the wiring OL, etc. are also illustrated. In addition, the wiring WCL and the wiring WCLr can be, for example, the wiring WCL[j] and the wiring WCLr[j] included in the arithmetic circuit MAC2 in FIG. 7, and the transistor F4 and the transistor F4r can be, for example, the transistor F4[j] and the transistor F4r[j] included in the arithmetic circuit MAC2 in FIG. 7.

[0267] The conversion circuit ITRZD1 of FIG. 8A is electrically connected to the wiring WCL via a transistor F4. The conversion circuit ITRZD1 is also electrically connected to the wiring WCLr via a transistor F4r. The conversion circuit ITRZD1 is also electrically connected to the wiring OL. The conversion circuit ITRZD1 has a function of converting the amount of current flowing from the conversion circuit ITRZD1 to the wiring WCL or the amount of current flowing from the wiring WCL to the conversion circuit ITRZD1 into a first voltage, a function of converting the amount of current flowing from the conversion circuit ITRZD1 to the wiring WCLr or the amount of current flowing from the wiring WCLr to the conversion circuit ITRZD1 into a second voltage, and a function of outputting an analog voltage according to the difference between the first voltage and the second voltage to the wiring OL.

[0268] The conversion circuit ITRZD1 in FIG. 8A includes, for example, a resistor RP, a resistor RM, an operational amplifier OPP, an operational amplifier OPM, and an operational amplifier OP2.

[0269] An inverting input terminal of the operational amplifier OPP is electrically connected to a first terminal of the resistor RP and a second terminal of the transistor F4. A non-inverting input terminal of the operational amplifier OPP is electrically connected to a wiring VRPL. An output terminal of the operational amplifier OPP is electrically connected to a second terminal of the resistor RP and a non-inverting input terminal of the operational amplifier OP2. An inverting input terminal of the operational amplifier OPM is electrically connected to a first terminal of the resistor RM and a second terminal of the transistor F4r. A non-inverting input terminal of the operational amplifier OPM is electrically connected to a wiring VRML. An output terminal of the operational amplifier OPM is electrically connected to a second terminal of the resistor RM and an inverting input terminal of the operational amplifier OP2. An output terminal of the operational amplifier OP2 is electrically connected to a wiring OL.

[0270] The wiring VRPL functions as a wiring that provides a constant voltage. The constant voltage can be, for example, a ground potential (GND) or a low-level potential. The wiring VRML functions as a wiring that provides a constant voltage. The constant voltage can be, for example, a ground potential (GND) or a low-level potential. The constant voltages provided by the wiring VRPL and the wiring VRML may be equal to each other or different from each other. In particular, by setting the constant voltages provided by the wiring VRPL and the wiring VRML to the ground potential (GND), the inverting input terminal of the operational amplifier OPP and the inverting input terminal of the operational amplifier OPM can each be virtually grounded.

[0271] 8A, the conversion circuit ITRZD1 can convert the amount of current flowing from the wiring WCL to the conversion circuit ITRZD1 via the transistor F4, or the amount of current flowing from the conversion circuit ITRZD1 to the wiring WCL via the transistor F4, into a first voltage. Also, the amount of current flowing from the wiring WCLr to the conversion circuit ITRZD1 via the transistor F4r, or the amount of current flowing from the conversion circuit ITRZD1 to the wiring WCLr via the transistor F4r, into a second voltage. Then, an analog voltage according to the difference between the first voltage and the second voltage can be output to the wiring OL.

[0272] In addition, the conversion circuit ITRZD1 in FIG. 8A is configured to output an analog voltage, but the circuit configuration that can be applied to the conversion circuit ITRZD[j] in FIG. 7 is not limited to this. For example, the conversion circuit ITRZD1 may be configured to have an analog-digital conversion circuit ADC as shown in FIG. 8B, similar to FIG. 4B. Specifically, the conversion circuit ITRZD2 in FIG. 8B is configured such that the input terminal of the analog-digital conversion circuit ADC is electrically connected to the output terminal of the operational amplifier OP2, and the output terminal of the analog-digital conversion circuit ADC is electrically connected to the wiring OL. With this configuration, the conversion circuit ITRZD2 in FIG. 8B can output a digital signal to the wiring OL. Note that the conversion circuit ITRZD2 in FIG. 8B is configured to output multiple bits from the wiring OL, but may be configured to output one bit (binary).

[0273] In addition, in the conversion circuit ITRZD2, when the digital signal output to the wiring OL is 1 bit (2-value), the conversion circuit ITRZD2 may be replaced with a conversion circuit ITRZD3 shown in FIG. 8C. The conversion circuit ITRZD3 in FIG. 8C is configured by providing a comparator CMP2 to the conversion circuit ITRZD1 in FIG. 8A, as in FIG. 4C. Specifically, the conversion circuit ITRZD3 is configured such that a first input terminal of the comparator CMP2 is electrically connected to the output terminal of the operational amplifier OP2, a second input terminal of the comparator CMP2 is electrically connected to a wiring VRL3, and an output terminal of the comparator CMP2 is electrically connected to a wiring OL. The wiring VRL3 functions as a wiring that provides a potential to be compared with the potential of the first terminal of the comparator CMP2. With such a configuration, the conversion circuit ITRZD3 of Figure 8C can output a low-level potential or a high-level potential (a binary digital signal) to the wiring OL depending on the magnitude of the difference between a first voltage converted from the amount of current flowing between the source and drain of transistor F4 and a second voltage converted from the amount of current flowing between the source and drain of transistor F4r, and the voltage provided by the wiring VRL3.

[0274] <<Example of first data retention>> Next, an example of storing first data in the circuit CES for performing a product-sum operation between first data that is positive, negative, or "0" and second data that is positive or "0" in the arithmetic circuit MAC2 of FIG. 7 will be described.

[0275] Since the circuit CES has the cell IM and the cell IMr, the circuit CES can use two circuits, the cell IM and the cell IMr, to hold the first data. That is, the circuit CES can set two current amounts and hold potentials corresponding to the respective current amounts in the cell IM and the cell IMr. Therefore, the first data can be expressed by the current amount set in the cell IM and the current amount set in the cell IMr.

[0276] Here, the positive first data, the negative first data, or the first data of "0" held in the circuit CES is defined as follows.

[0277] When the circuit CES[1,j] holds the positive first data, the cell IM[1,j] is set so that a current amount corresponding to the absolute value of the positive first data flows between the first terminal and the second terminal of the transistor F2 of the cell IM[1,j], for example. Specifically, a potential corresponding to the current amount is held in the gate (node ​​NN[1,j]) of the transistor F2. On the other hand, the cell IMr[1,j] is set so that no current flows between the first terminal and the second terminal of the transistor F2r of the cell IMr[1,j], for example. Specifically, the gate (node ​​NNr[1,j]) of the transistor F2r may hold a potential provided by the wiring VE, a potential for initialization provided by the wiring VINIL1 of the circuit WCSa of FIG. 2A, or the like.

[0278] Also, when the circuit CES[1,j] holds negative first data, the cell IMr[1,j] is set, for example, so that a current amount corresponding to the absolute value of the negative first data flows through the transistor F2r of the cell IMr[1,j]. Specifically, a potential corresponding to the current amount is held in the gate (node ​​NNr[1,j]) of the transistor F2r. On the other hand, the cell IM[1,j] is set, for example, so that no current flows through the transistor F2 of the cell IM[1,j]. Specifically, the gate (node ​​NN[1,j]) of the transistor F2 may hold a potential provided by the wiring VE, a potential for initialization provided by the wiring VINIL1 of the circuit WCSa of FIG. 2A, or the like.

[0279] Furthermore, when the first data "0" is held in the circuit CES[1,j], for example, the transistor F2 of the cell IM[1,j] and the transistor F2r of the cell IMr[1,j] are set so that no current flows through each of them. Specifically, the gate of the transistor F2 (node ​​NN[1,j]) and the gate of the transistor F2r (node ​​NNr[1,j]) may hold a potential provided by the wiring VE, an initialization potential provided by the wiring VINIL1 of the circuit WCSa in FIG. 2A, or the like.

[0280] In addition, when the other circuits CES hold positive first data or negative first data, similarly to the above-mentioned circuit CES[1,j], it is set so that an amount of current according to the first data flows between the cell IM and the wiring WCL or between the cell IMR and the wiring WCLr, and no current flows between the cell IM and the wiring WCL or between the cell IMR and the wiring WCLr. In addition, when the other circuits CES hold first data of "0", similarly to the above-mentioned circuit CES[1,j], it is set so that no current flows between the cell IM and the wiring WCL and between the cell IMR and the wiring WCLr.

[0281] As an example, when the first data "+3", "+2", "+1", "0", "-1", "-2", and "-3" are stored in the circuit CES, by setting the amount of current flowing from the wiring WCL to the cell IM and the amount of current flowing from the wiring WCLr to the cell IMr as described above, each of the first data "+3", "+2", "+1", "0", "-1", "-2", and "-3" can be defined, for example, as shown in the following table.

[0282] [Table 1]

[0283] Here, in the arithmetic circuit MAC2 of FIG. 7, a case is considered in which the first data is held in each of the circuits CES[1,j] to CES[m,j] and the second data is input to each of the wirings XCL[1] to XCL[m]. At this time, a low-level potential is applied to the wiring SWL1 to turn off the transistors F3[j] and F3r[j], and a high-level potential is applied to the wiring SWL2 to turn on the transistors F4[j] and F4r[j]. As a result, the conversion circuit ITRZD[j] and the wiring WCL[j] are brought into a conductive state, so that a current may flow from the conversion circuit ITRZD[j] to the wiring WCL[j]. Also, the conversion circuit ITRZD[j] and the wiring WCLr[j] are brought into a conductive state, so that a current may flow from the conversion circuit ITRZD[j] to the wiring WCLr[j]. The sum of the currents flowing from the conversion circuit ITRZD[j] to the wiring WCL[j] is I S [j], and the total current flowing from the conversion circuit ITRZD[j] to the wiring WCLr[j] is I Sr [j], taking into consideration the operation example of the arithmetic circuit MAC1 described in the first embodiment, I S [j] and I Sr [j] can be expressed by the following formula:

[0284]

number

[0285] In addition, w[i,j] shown in formula (2.1) is the value of the first data to be written to cell IM[i,j], and w r [i,j] is the value of the first data to be written to the cell IMr[i,j]. r When either [i,j] is not "0", w[i,j] or w r By setting the other of [i,j] to a value of "0", the first data held in the circuit CES[i,j] can comply with the definition shown in Table 1, for example.

[0286] The conversion circuit ITRZD[j] is, for example, a sum of the currents flowing through the wiring WCL I S [j] is converted into the first voltage, and the total amount of current flowing through the wiring WCLr is calculated as I Sr The conversion circuit ITRZD[j] converts the first voltage to a second voltage. The conversion circuit ITRZD[j] can then output a voltage corresponding to the difference between the first voltage and the second voltage to the wiring OL.

[0287] 8A to 8C are configured to output a voltage to the wiring OL, but one embodiment of the present invention is not limited to this. For example, the conversion circuit ITRZD[j] included in the arithmetic circuit MAC2 in FIG. 7 may be configured to output a current.

[0288] The conversion circuit ITRZD4 shown in FIG. 9 is a circuit that can be applied to the conversion circuit ITRZD[j] included in the arithmetic circuit MAC2 in FIG. 7, and has a circuit configuration that outputs the results of the product-sum operation and the activation function operation as a current amount.

[0289] 9 also illustrates the circuit SWS2, wiring WCL, wiring WCLr, wiring OL, transistor F4, and transistor F4r in order to show electrical connection with the peripheral circuits of the conversion circuit ITRZD4. In addition, the wiring WCL and the wiring WCLr can be, for example, the wiring WCL[j] and the wiring WCLr[j] included in the arithmetic circuit MAC2 in FIG. 7, and the transistor F4 and the transistor F4r can be, for example, the transistor F4[j] and the transistor F4r[j] included in the arithmetic circuit MAC2 in FIG. 7.

[0290] The conversion circuit ITRZD4 in FIG. 9 is electrically connected to the wiring WCL through a transistor F4. The conversion circuit ITRZD4 is also electrically connected to the wiring WCLr through a transistor F4r. The conversion circuit ITRZD4 is also electrically connected to the wiring OL. The conversion circuit ITRZD4 has a function of acquiring a differential current between either the amount of current flowing from the conversion circuit ITRZD4 to the wiring WCL or the amount of current flowing from the wiring WCL to the conversion circuit ITRZD4, and either the amount of current flowing from the conversion circuit ITRZD4 to the wiring WCLr or the amount of current flowing from the wiring WCLr to the conversion circuit ITRZD4. The conversion circuit ITRZD4 also has a function of flowing the differential current between the conversion circuit ITRZD4 and the wiring OL.

[0291] The conversion circuit ITRZD4 in FIG. 9 includes, as an example, a transistor F5, a current source CI, a current source CIr, and a current mirror circuit CM1.

[0292] The second terminal of the transistor F4 is electrically connected to the first terminal of the current mirror circuit CM1 and the output terminal of the current source CI, and the second terminal of the transistor F4r is electrically connected to the second terminal of the current mirror circuit CM1, the output terminal of the current source CIr, and the first terminal of the transistor F5. The input terminal of the current source CI is electrically connected to the wiring VHE, and the input terminal of the current source CIr is electrically connected to the wiring VHE. The third terminal of the current mirror circuit CM1 is electrically connected to the wiring VSE, and the fourth terminal of the current mirror circuit CM1 is electrically connected to the wiring VSE.

[0293] A second terminal of the transistor F5 is electrically connected to the wiring OL, and a gate of the transistor F5 is electrically connected to the wiring OEL.

[0294] As an example, the current mirror circuit CM1 has the function of flowing an amount of current corresponding to the potential of the first terminal of the current mirror circuit CM1 between the first terminal and the third terminal of the current mirror circuit CM1 and between the second terminal and the fourth terminal of the current mirror circuit CM1.

[0295] The wiring VHE functions as, for example, a wiring that applies a constant voltage. Specifically, the constant voltage may be, for example, a high-level potential.

[0296] The wiring VSE functions as, for example, a wiring that applies a constant voltage. Specifically, the constant voltage may be, for example, a low-level potential, a ground potential, or the like.

[0297] The wiring OEL functions as, for example, a wiring for transmitting a signal for switching the transistor F5 to an on state or an off state. Specifically, for example, a high-level potential or a low-level potential may be input to the wiring OEL.

[0298] The current source CI has a function of supplying a constant current between the input terminal and the output terminal of the current source CI. The current source CIr has a function of supplying a constant current between the input terminal and the output terminal of the current source CIr. In the conversion circuit ITRZD4 of FIG. 9, it is preferable that the magnitude of the current supplied by the current source CI is equal to the magnitude of the current supplied by the current source CIr.

[0299] Here, an example of the operation of the conversion circuit ITRZD4 in FIG. 9 will be described.

[0300] First, the amount of current flowing from the conversion circuit ITRZD4 to the wiring WCL via the transistor F4 is I SThe amount of current flowing from the conversion circuit ITRZD4 to the wiring WCLr via the transistor F4r is I Sr In addition, the amount of current flowing from each of the current sources CI and CIr is I 0 Let us assume that.

[0301] I S is the sum of the currents flowing through the cells IM[1,j] to IM[m,j] located in the j-th column in the arithmetic circuit MAC2 in FIG. Sr is the sum of the amounts of currents flowing through the cells IMr[1,j] to IMr[m,j] located in the j-th column in the arithmetic circuit MAC2 in FIG.

[0302] When a high-level potential is input to the wiring SWL2, the transistors F4 and F4r are turned on. Therefore, the amount of current flowing from the first terminal to the third terminal of the current mirror circuit CM1 is I 0 -I S In addition, the current mirror circuit CM1 transfers I 0 -I S A current of flows.

[0303] Next, a high-level potential is input to the wiring OEL, and the transistor F5 is turned on. At this time, the amount of current flowing through the wiring OL is I out Then, I out =I 0 -(I 0 -I S )-I Sr =I S -I Sr It becomes.

[0304] Here, in the arithmetic circuit MAC2 of FIG. 7, for the storage of first data in the circuit CES for performing a product-sum operation between first data that is positive, negative, or “0” and second data that is positive or “0”, the above example of storing first data shall be referred to.

[0305] That is, when the circuit CES[i,j] holds positive first data, the cell IM[i,j] is set so that a current amount according to the absolute value of the positive first data flows between the first terminal and the second terminal of the transistor F2 of the cell IM[i,j], and the cell IMr[i,j] is set so that no current flows between the first terminal and the second terminal of the transistor F2r of the cell IMr[i,j]. When the circuit CES[i,j] holds negative first data, the cell IM[i,j] is set so that no current flows between the first terminal and the second terminal of the transistor F2 of the cell IM[i,j], and the cell IMr[i,j] is set so that a current amount according to the absolute value of the negative first data flows between the first terminal and the second terminal of the transistor F2r of the cell IMr[i,j]. In addition, when the first data of "0" is held in the circuit CES[i,j], the cell IM[i,j] is set so that no current flows between the first terminal and the second terminal of the transistor F2 of the cell IM[i,j], and the cell IMr[i,j] is set so that no current flows between the first terminal and the second terminal of the transistor F2r of the cell IMr[i,j].

[0306] Here, when second data is input to each of wirings XCL[1] to XCL[m] of the arithmetic circuit MAC2 in Figure 7, the amount of current flowing between the first terminal and the second terminal of the transistor F2 of the cell IM[i,j] and the amount of current flowing between the first terminal and the second terminal of the transistor F2r of the cell IMr[i,j] are proportional to the second data.

[0307] I S is the sum of the currents flowing through cells IM[1,j] to IM[m,j] located in the jth column. S is the sum of the currents flowing through the cells IM included in the circuits CES[1,j] to CES[m,j] in which the positive first data is held, and can be expressed in the same manner as in equation (2.1), for example. S corresponds to the result of multiplying and adding the absolute value of the positive first data and the second data. Sr is the sum of the currents flowing through the cells IMr[1,j] to IMr[m,j] located in the jth column. Sris the sum of the currents flowing through the cells IMr included in the circuits CES[1,j] to CES[m,j] in which the negative first data is held, and can be expressed in the same manner as in equation (2.2), for example. Sr corresponds to the result of a multiply-and-accumulate operation between the absolute value of the negative first data and the second data.

[0308] Therefore, the current I out =I S -I Sr corresponds to the difference between the result of the multiplication and accumulation operation between the absolute value of the positive first data and the second data and the result of the multiplication and accumulation operation between the absolute value of the negative first data and the second data. That is, I out =I S -I Sr corresponds to the result of a multiplication and accumulation operation between the negative, "0", or positive first data held in the circuits CES[1,j] to CES[m,j] and the second data input to each of the wirings XCL[1] to XCL[m].

[0309] When the sum of the currents flowing through the cells IM[1,j] to IM[m,j] is greater than the sum of the currents flowing through the cells IMr[1,j] to IMr[m,j], that is, when I S I Sr When it is greater than out On the other hand, when the sum of the currents flowing through the cells IM[1,j] to IM[m,j] is smaller than the sum of the currents flowing through the cells IMr[1,j] to IMr[m,j], that is, when I S I Sr When I is smaller than I, there are cases where no current flows from the wiring OL to the conversion circuit ITRZD4. S I Sr When it is smaller than I out can be set to approximately 0. For this reason, the conversion circuit ITRZD4 can be regarded as acting as, for example, a ReLU function.

[0310] The ReLU function can be used, for example, as an activation function of a neural network. In the computation of the neural network, it is necessary to calculate the sum of products of the values ​​of the signals of the neurons in the previous layer (which can be, for example, the second data) and the corresponding weighting coefficients (which can be, for example, the first data). It is also necessary to calculate the value of the activation function according to the result of the sum of products. Therefore, when the activation function of the neural network is the ReLU function, the computation of the neural network can be performed by using the computation circuit MAC2 including the conversion circuit ITRZD4.

[0311] The hierarchical neural network will be described later in the fourth embodiment.

[0312] Next, an example of a specific circuit configuration of the conversion circuit ITRZD4 in FIG. 9 will be described.

[0313] The conversion circuit ITRZD4 shown in Fig. 10A is an example of the conversion circuit ITRZD4 in Fig. 9. Specifically, Fig. 10A shows an example of the configuration of each of the current mirror circuit CM1, the current source CI, and the current source CIr.

[0314] 10A, the current mirror circuit CM1 includes, for example, a transistor F6 and a transistor F6r, the current source CI includes, for example, a transistor F7, and the current source CIr includes, for example, a transistor F7r. Note that the transistors F6, F6r, F7, and F7r are n-channel transistors.

[0315] For example, a first terminal of the current mirror circuit CM1 is electrically connected to a first terminal of the transistor F6, a gate of the transistor F6, and a gate of the transistor F6r, a third terminal of the current mirror circuit CM1 is electrically connected to a second terminal of the transistor F6, a second terminal of the current mirror circuit CM1 is electrically connected to a first terminal of the transistor F6r, and a fourth terminal of the current mirror circuit CM1 is electrically connected to a second terminal of the transistor F6r.

[0316] Also, for example, the output terminal of the current source CI is electrically connected to the first terminal of the transistor F7 and the gate of the transistor F7, and the input terminal of the current source CI is electrically connected to the second terminal of the transistor F7.

[0317] Also, for example, the output terminal of the current source CIr is electrically connected to the first terminal of the transistor F7r and the gate of the transistor F7r, and the input terminal of the current source CIr is electrically connected to the second terminal of the transistor F7r.

[0318] The gate and the first terminal of each of the transistors F7 and F7r are electrically connected, and the second terminal and the wiring VHE are electrically connected. Therefore, the gate-source voltage of each of the transistors F7 and F7r is 0V, and when the threshold voltages of each of the transistors F7 and F7r are within an appropriate range, a constant current flows between the first terminal and the second terminal of each of the transistors F7 and F7r. In other words, each of the transistors F7 and F7r functions as a current source.

[0319] In addition, the configuration of the current source CI and the current source CIr included in the conversion circuit ITRZD4 of Fig. 9 is not limited to the current source CI and the current source CIr shown in Fig. 10A. The configuration of each of the current source CI and the current source CIr included in the conversion circuit ITRZD4 may be changed according to the situation.

[0320] For example, each of the current source CI and the current source CIr included in the conversion circuit ITRZD4 in FIG. 9 may be the current source CI (current source CIr) shown in FIG. 10B.

[0321] 10B includes, as an example, a plurality of current sources CSA, each of which includes a transistor F7, a transistor F7s, a terminal U1, a terminal U2, and a terminal U3.

[0322] As an example, the current source CSA has a current I between terminals U2 and U1. CSA The current source CI (current source CIr) has a function of supplying, for example, 2 P -When there is one current source CSA (P is an integer equal to or greater than 1), the current source CI (current source CIr) outputs a current of s × I CSA (s is 0 to 2 P -1 or less).

[0323] In practice, during the manufacturing stage of the current source CI (current source CIr), errors may occur due to variations in the electrical characteristics of the transistors included in each current source CSA. Therefore, the constant current I CSA The error is preferably within 10%, more preferably within 5%, and even more preferably within 1%. In this embodiment, the constant current I output from the terminal U1 of the multiple current sources CSA included in the current source CI (current source CIr) is CSA In the following description, it is assumed that there is no error.

[0324] In one of the multiple current sources CSA, a first terminal of a transistor F7s is electrically connected to the terminal U1, and a gate of the transistor F7s is electrically connected to the terminal U3. A first terminal of the transistor F7 is electrically connected to the gate of the transistor F7 and to a second terminal of the transistor F7s. A second terminal of the transistor F7 is electrically connected to the terminal U2.

[0325] The terminal U1 of each of the multiple current sources CSA is electrically connected to the output terminal of the current source CI (current source CIr). Also, the terminal U2 of each of the multiple current sources CSA is electrically connected to the input terminal of the current source CI (current source CIr). In other words, there is electrical continuity between the terminal U2 of each of the multiple current sources CSA and the wiring VHE.

[0326] In addition, the terminal U3 of one current source CSA is electrically connected to the wiring CL[1], and each of the terminals U3 of the two current sources CSA is electrically connected to the wiring CL[2]. P-1 Each of the terminals U3 of the current sources CS is electrically connected to a wiring CL[P].

[0327] The lines CL[1] to CL[P] are electrically connected to a current source CSA and a constant current I CSA Specifically, for example, when a high-level potential is applied to the line CL[1], the current source CSA electrically connected to the line CL[1] outputs a constant current I CSA flows through terminal U1, and a low-level potential is applied to line CL[1]. The current source CSA electrically connected to line CL[1] has a current I CSA For example, when a high-level potential is applied to the wiring CL[2], the two current sources CSA electrically connected to the wiring CL[2] output a total of 2I CSA is applied to the terminal U1 as a constant current, and when a low-level potential is applied to the wiring CL[2], the current source CSA electrically connected to the wiring CL[2] has a total current of 2I CSA For example, when a high-level potential is applied to the wiring CL[P], the constant current of the P-1 The current sources CSA are P-1 I CSA is applied to the terminal U1 as a constant current, and a low-level potential is applied to the wiring CL[P]. The current source CSA electrically connected to the wiring CL[P] is P-1 I CSAThe constant current is not output.

[0328] Therefore, the current source CI (current source CIr) can flow a current to the output terminal of the current source CI (current source CIr) by applying a high-level potential to one or more wirings selected from the wirings CL[1] to CL[P]. The amount of the current can be determined by a combination of one or more wirings selected from the wirings CL[1] to CL[P] that input a high-level potential. For example, when a high-level potential is applied to the wirings CL[1] and CL[2] and a low-level potential is applied to the wirings CL[3] to CL[P], the current source CI (current source CIr) flows a total of 3I CSA A current of can be passed.

[0329] As described above, by using the current source CI (current source CIr) in FIG. 10B, it is possible to change the amount of current that the current source CI (current source CIr) supplies to the output terminal depending on the situation.

[0330] Moreover, by applying the conversion circuit ITRZD4 of FIG. 10A as the conversion circuit ITRZD4 of FIG. 9, all the transistors included in the conversion circuit ITRZD4 can be OS transistors. Furthermore, since the cell array CA, circuit WCS, circuit XCS, etc. of the arithmetic circuit MAC2 can be composed of only OS transistors, the conversion circuit ITRZD4 can be fabricated simultaneously with the cell array CA, circuit WCS, circuit XCS, etc. Therefore, the fabrication process of the arithmetic circuit MAC2 can be shortened in some cases. This also applies to the case where the current source CI (current source CIr) of FIG. 10B is applied to the current source CI and current source CIr of the conversion circuit ITRZD4 of FIG. 10A.

[0331] For example, since the current sources CI and CIr included in the conversion circuit ITRZD4 in FIG. 9 need to supply the same current, each of the current sources CI and CIr may be replaced with a current mirror circuit.

[0332] The conversion circuit ITRZD4 shown in Fig. 11A has a configuration in which the current source CI and the current source CIr included in the conversion circuit ITRZD4 in Fig. 9 are replaced with a current mirror circuit CM2. The current mirror circuit CM2 includes, as an example, a transistor F8 and a transistor F8r. The transistors F8 and F8r are p-channel transistors.

[0333] The first terminal of the transistor F8 is electrically connected to the gate of the transistor F8, the gate of the transistor F8r, the second terminal of the transistor F4, and the first terminal of the current mirror circuit CM1. The second terminal of the transistor F8 is electrically connected to the wiring VHE. The first terminal of the transistor F8r is electrically connected to the second terminal of the transistor F4r and the second terminal of the current mirror circuit CM1. The second terminal of the transistor F8r is electrically connected to the wiring VHE.

[0334] As in the conversion circuit ITRZD4 of FIG. 11A, by replacing the current source CI and the current source CIr included in the conversion circuit ITRZD4 of FIG. 9 with a current mirror circuit CM2, it is possible to make approximately equal amounts of current flow to the connection point between the second terminal of transistor F4 and the first terminal of the current mirror circuit CM1, and to the connection point between the second terminal of transistor F4r, the second terminal of the current mirror circuit CM1, and the first terminal of transistor F5.

[0335] In addition, in Fig. 11A, the current mirror circuit CM2 is illustrated as being configured with a transistor F8 and a transistor F8r, but the circuit configuration of the current mirror circuit CM2 is not limited to this. For example, the current mirror circuit CM2 may be configured with transistors included in the current mirror circuit CM2 cascode-connected, as in Fig. 11C described later. In this way, the circuit configuration of the current mirror circuit CM2 in Fig. 11A may be changed depending on the situation.

[0336] 11A may be configured without the current mirror circuit CM1, as in the configuration of the conversion circuit ITRZD4 shown in FIG. 11B. The conversion circuit ITRZD4 shown in FIG. 11B can make the amount of current flowing from the first terminal of the current mirror circuit CM2 to the second terminal of the transistor F4 and the amount of current flowing from the second terminal of the current mirror circuit CM2 to the connection point between the second terminal of the transistor F4r and the first terminal of the transistor F5 approximately equal to each other. Therefore, I S I Sr When the current I flows through the wiring OL in FIG. out is the same as the conversion circuit ITRZD4 in Figure 9. S -I Sr It can be said that:

[0337] The conversion circuit ITRZD4 in Fig. 11B does not include a current mirror circuit CM1, and therefore the circuit area can be reduced compared to the conversion circuit ITRZD4 in Fig. 11A. Also, since there is no steady current flowing from the current mirror circuit CM2 to the current mirror circuit CM1, the conversion circuit ITRZD4 in Fig. 11B can consume less power than the conversion circuit ITRZD4 in Fig. 11A.

[0338] In addition, in Fig. 11B, the transistor F8 and the transistor F8r are not shown, and the current mirror circuit CM2 is shown as a block diagram. Therefore, the configuration of the current mirror circuit CM2 in Fig. 11B can be determined according to the situation, similar to the current mirror circuit CM2 in Fig. 11A.

[0339] For example, the current mirror circuit CM2 included in the conversion circuit ITRZD4 in Fig. 11B may be the current mirror circuit CM2 shown in Fig. 11C. The current mirror circuit CM2 shown in Fig. 11C is configured by further providing p-channel transistors F8s and F8sr to the current mirror circuit CM2 shown in Fig. 11B, with the transistors F8 and F8s cascode-connected, and the transistors F8r and F8sr cascode-connected. As shown in Fig. 11C, by cascode-connecting the transistors included in the current mirror circuit, the operation of the current mirror circuit can be made more stable.

[0340] Furthermore, the current mirror circuit CM1 included in the conversion circuit ITRZD4 of Fig. 9 is not limited to the current mirror circuit CM1 shown in Fig. 10A. The configuration of the current mirror circuit CM1 included in the conversion circuit ITRZD4 of Fig. 10A may be changed depending on the situation.

[0341] For example, the current mirror circuit CM1 included in the conversion circuit ITRZD4 in Fig. 9 may be the current mirror circuit CM1 shown in Fig. 11D. The current mirror circuit CM1 shown in Fig. 11D is configured by further providing n-channel transistors F6s and F6sr to the current mirror circuit CM1 shown in Fig. 10A, with the transistors F6 and F6s cascode-connected, and the transistors F6r and F6sr cascode-connected. As shown in Fig. 11D, by cascode-connecting the transistors included in the current mirror circuit, the operation of the current mirror circuit can be made more stable.

[0342] <Arithmetic circuit configuration example 2> Fig. 12 shows an example of the configuration of an arithmetic circuit that performs a multiply-and-accumulate operation between first data that is positive, negative, or "0" and second data that is positive, negative, or "0". The arithmetic circuit MAC3 shown in Fig. 12 has a configuration obtained by modifying the arithmetic circuit MAC2 in Fig. 7. Therefore, in the explanation of the arithmetic circuit MAC3, the parts that overlap with the explanation of the arithmetic circuits MAC1 and MAC2 will be omitted.

[0343] The cell array CA shown in Fig. 12 has m circuits CESref arranged in one column, and circuits CES arranged in an m x n matrix. Note that Fig. 12 illustrates only the circuit CESref[i] and the circuit CES[i,j].

[0344] The circuit CES[i,j] has a cell IM[i,j], a cell IMr[i,j], a cell IMs[i,j], and a cell IMsr[i,j]. In addition, in this specification, when describing the circuit CES[i,j], the cell IM[i,j], the cell IMr[i,j], the cell IMs[i,j], the cell IMsr[i,j], and the like, the [i,j] and the like attached to each reference numeral may be omitted.

[0345] The cell IMs and the cell IMsr can have the same configuration as the cell IM. As an example, the cell IMs and the cell IMsr in FIG. 12 are illustrated as having the same configuration as the cell IM. In addition, in order to distinguish the transistors, capacitances, etc. included in the cell IM, the cell IMs, and the cell IMsr from each other, the reference characters indicating the transistors and capacitances included in the cell IMs are marked with "s", and the reference characters indicating the transistors and capacitances included in the cell IMsr are marked with "sr".

[0346] Specifically, the cell IMs has a transistor F1s, a transistor F2s, and a capacitance C5s. The transistor F1s corresponds to the transistor F1 of the cell IM, the transistor F2s corresponds to the transistor F2 of the cell IM, and the capacitance C5s corresponds to the capacitance C5 of the cell IM. Therefore, for the electrical connection configurations of the transistor F1s, the transistor F2s, and the capacitance C5s, refer to the description of the cells IM[1,1] to IM[m,n] in the first embodiment.

[0347] Moreover, the cell IMsr has a transistor F1sr, a transistor F2sr, and a capacitance C5sr. The transistor F1sr corresponds to the transistor F1 of the cell IM, the transistor F2sr corresponds to the transistor F2 of the cell IM, and the capacitance C5sr corresponds to the capacitance C5 of the cell IM. Therefore, as with the cell IMs, the electrical connection configurations of the transistor F1sr, the transistor F2sr, and the capacitance C5sr refer to the description of the cells IM[1,1] to IM[m,n] in the first embodiment.

[0348] In addition, in cell IMs, the connection point between the first terminal of transistor F1s, the gate of transistor F2s, and the first terminal of capacitance C5s is node NNs, and in cell IMsr, the connection point between the first terminal of transistor F1sr, the gate of transistor F2sr, and the first terminal of capacitance C5sr is node NNsr.

[0349] In the circuit CES[i,j], the second terminal of the capacitor C5 is electrically connected to the wiring XCL[i], the gate of the transistor F1 is electrically connected to the wiring WSL[i], the second terminal of the transistor F1 and the second terminal of the transistor F2 are electrically connected to the wiring WCL[j], the second terminal of the capacitor C5r is electrically connected to the wiring XCL[i], the gate of the transistor F1r is electrically connected to the wiring WSL[i], and the second terminal of the transistor F1r and the second terminal of the transistor F2r are electrically connected to the wiring WCLr[j].

[0350] The second terminal of the capacitor C5s is electrically connected to the wiring XCLs[i], the gate of the transistor F1s is electrically connected to the wiring WSLs[i], the second terminal of the transistor F1s and the second terminal of the transistor F2s are electrically connected to the wiring WCL[j]. The second terminal of the capacitor C5sr is electrically connected to the wiring XCLs[i], the gate of the transistor F1sr is electrically connected to the wiring WSLs[i], and the second terminal of the transistor F1sr and the second terminal of the transistor F2sr are electrically connected to the wiring WCLr[j].

[0351] 12 includes a cell IMref[i] and a cell IMrefs[i]. In this specification and the like, when describing the circuit CESref[i], the cell IMref[i], the cell IMrefs[i], and the like, the [i] and the like attached to each reference numeral may be omitted.

[0352] The cell IMrefs can have the same configuration as the cell IMref. The cell IMrefs in FIG. 12 is illustrated as having the same configuration as the cell IMref as an example. In addition, in order to distinguish the transistors, capacitances, etc. included in the cell IMref and the cell IMrefs from each other, the reference characters indicating the transistors and capacitances included in the cell IMrefs are marked with "s."

[0353] Specifically, the cell IMrefs has a transistor F1ms, a transistor F2ms, and a capacitance C5ms. The transistor F1ms corresponds to the transistor F1m of the cell IMref, the transistor F2ms corresponds to the transistor F2m of the cell IMref, and the capacitance C5ms corresponds to the capacitance C5m of the cell IMref. Therefore, for the electrical connection configurations of the transistor F1ms, the transistor F2ms, and the capacitance C5ms, refer to the description of the cells IMref[1] to IMref[m] in the first embodiment.

[0354] In addition, in the cell IMrefs, the connection point between the first terminal of the transistor F1ms, the gate of the transistor F2ms, and the first terminal of the capacitor C5ms is defined as a node NNrefs.

[0355] In the circuit CESref[i], the second terminal of the capacitance C5m is electrically connected to the wiring XCL[i], the gate of the transistor F1m is electrically connected to the wiring WSL[i], the second terminal of the transistor F1m and the second terminal of the transistor F2m are electrically connected to the wiring XCL[i], the second terminal of the capacitance C5ms is electrically connected to the wiring XCLs[i], the gate of the transistor F1ms is electrically connected to the wiring WSLs[i], and the second terminal of the transistor F1ms and the second terminal of the transistor F2ms are electrically connected to the wiring XCLs[i].

[0356] Similar to the wirings XCL[1] to XCL[n] described in embodiment 1, each of the wirings XCL[i] and XCLs[i] functions, for example, as a wiring that passes current from the circuit XCS to the cells IM, IMr, IMs, and IMsr included in the circuit CES, and also, for example, as a wiring that passes current from the circuit XCS to the cells IMref[i] and IMrefs[i] included in the circuit CESref.

[0357] Like the wirings WSL[1] to WSL[m] described in embodiment 1, each of the wirings WSL[i] and WSLs[i] functions, for example, as a wiring that transmits a selection signal for writing first data from the circuit WSD to the cells IM, IMr, IMs, and IMsr included in the circuit CES, and also functions, for example, as a wiring that transmits a selection signal for writing reference data from the circuit WSD to the cells IMref and IMrefs included in the circuit CESref.

[0358] The conversion circuit ITRZD[j] included in the arithmetic circuit MAC3 in Fig. 12 can be a circuit that can be applied to the conversion circuit ITRZD[j] included in the arithmetic circuit MAC2 in Fig. 7. In other words, the conversion circuits ITRZD1 to ITRZD3 shown in Figs. 8A to 8C, for example, can be applied to the conversion circuit ITRZD[j] included in the arithmetic circuit MAC3.

[0359] Next, an example of storing first data in the circuit CES and an example of inputting second data to the circuit CES in order to perform a product-sum operation between first data that is positive, negative, or "0" and second data that is positive, negative, or "0" in the arithmetic circuit MAC3 of FIG. 12 will be described.

[0360] Since the circuit CES has the cell IM, the cell IMr, the cell IMs, and the cell IMsr, the circuit CES can use four circuits, the cell IM, the cell IMr, the cell IMs, and the cell IMsr, to hold the first data. That is, the circuit CES can set four current amounts and hold potentials corresponding to the respective current amounts in the cell IM, the cell IMr, the cell IMs, and the cell IMsr. Therefore, the first data can be expressed by the current amount set in the cell IM, the current amount set in the cell IMr, the current amount set in the cell IMs, and the current amount set in the cell IMsr.

[0361] Here, the positive first data, the negative first data, or the first data of "0" held in the circuit CES is defined as follows.

[0362] When the circuit CES[i,j] holds positive first data, the cell IM[i,j] is set, for example, so that a current amount according to the absolute value of the positive first data flows through the transistor F2 of the cell IM[i,j], and the transistor F2sr of the cell IMsr[i,j] is set, for example, so that a current amount according to the absolute value of the positive first data flows through the transistor F2sr of the cell IMsr[i,j]. Specifically, a potential according to the current amount is held in the gate of the transistor F2 (node ​​NN[i,j]) and the gate of the transistor F2sr (node ​​NNsr[i,j]). The cell IMr[i,j] is set, for example, so that no current flows through the transistor F2r of the cell IMr[i,j], and the cell IMs[i,j] is set, for example, so that no current flows through the transistor F2s of the cell IMs[i,j]. Specifically, the gate of transistor F2r (node ​​NNr[i,j]) and the gate of transistor F2s (node ​​NNs[i,j]) may hold a potential provided by the wiring VE, such as an initialization potential provided by the wiring VINIL1 of the circuit WCSa in Figures 2A and 2B.

[0363] When the circuit CES[i,j] holds negative first data, the cell IMr[i,j] is set, for example, so that a current amount according to the absolute value of the negative first data flows through the transistor F2r of the cell IMr[1,j], and the transistor F2s of the cell IMs[i,j] is set, for example, so that a current amount according to the absolute value of the negative first data flows through the transistor F2r of the cell IMs[i,j]. Specifically, a potential according to the current amount is held at the gate (node ​​NNr[i,j]) of the transistor F2r and the gate (node ​​NNs[i,j]) of the transistor F2s. The cell IM[i,j] is set, for example, so that no current flows through the transistor F2 of the cell IMs[i,j], and the cell IMsr[i,j] is set, for example, so that no current flows through the transistor F2sr of the cell IMsr[i,j]. Specifically, the gate of transistor F2 (node ​​NN[i,j]) and the gate of transistor F2sr (node ​​NNsr[i,j]) may hold a potential provided by the wiring VE, such as an initialization potential provided by the wiring VINIL1 of the circuit WCSa in Figures 2A and 2B.

[0364] Furthermore, when the first data of "0" is held in the circuit CES[i,j], for example, the transistor F2 of the cell IM[i,j], the transistor F2r of the cell IMr[i,j], the transistor F2s of the cell IMs[i,j], and the transistor F2sr of the cell IMsr[i,j] are set so that no current flows through each of them. Specifically, the gate of the transistor F2 (node ​​NN[i,j]), the gate of the transistor F2r (node ​​NNr[i,j]), the gate of the transistor F2s (node ​​NNs[i,j]), and the gate of the transistor F2sr (node ​​NNsr[i,j]) may hold a potential provided by the wiring VE, for example, a potential for initialization provided by the wiring VINIL1 of the circuit WCSa in FIGS. 2A and 2B.

[0365] In addition, as for the other circuits CES, when holding positive first data or negative first data, similarly to the above-mentioned circuit CES[i,j], it is sufficient to set so that an amount of current according to the first data flows between the cell IM and the wiring WCL and between the cell IMsr and the wiring WCLr, or between the cell IMs and the wiring WCL, and so that no current flows in the other of the two. Also, when holding the first data of "0" in the other circuits CES, similarly to the above-mentioned circuit CES[i,j], it is sufficient to set so that no current flows between the cell IM and the wiring WCL, between the cell IMs and the wiring WCLr, between the cell IMs and the wiring WCL, and between the cell IMsr and the wiring WCLsr.

[0366] As an example, when the first data is stored in the circuit CES in the cases of "+3", "+2", "+1", "0", "-1", "-2", and "-3", by setting the amount of current flowing from the wiring WCL to the cell IM, setting the amount of current flowing from the wiring WCLr to the cell IMs, setting the amount of current flowing from the wiring WCLr to the cell IMsr, and setting the amount of current flowing from the wiring WCLr to the cell IMsr as described above, each of the first data "+3", "+2", "+1", "0", "-1", "-2", and "-3" can be defined, for example, as shown in the following table.

[0367] [Table 2]

[0368] On the other hand, the circuit CES is electrically connected to the wiring XCL and the wiring XCLs as wirings for inputting the second data. Therefore, two signals can be input to the circuit CES as the second data. That is, the second data can be represented by a signal input to the wiring XCL and a signal input to the wiring XCLs, and input to the circuit CES. Here, the positive second data, negative second data, or second data of "0" input to the circuit CES is defined as follows.

[0369] When positive second data is input to the circuit CES[i,j], the cell IMref[i] is set, for example, so that a current amount corresponding to the absolute value of the positive second data flows through the transistor F2m of the cell IMref[i]. Specifically, a potential corresponding to the current amount is held in the gate (node ​​NNref[i]) of the transistor F2m. On the other hand, the cell IMrefs[i] is set, for example, so that no current flows through the transistor F2ms of the cell IMrefs[i]. Specifically, the gate (node ​​NNrefs[i]) of the transistor F2ms may hold a potential provided by the wiring VE, a potential for initialization provided by the wiring VINIL2 of the circuit XCSa in FIG. 2C, or the like.

[0370] Moreover, when negative second data is input to the circuit CES[i,j], the cell IMrefs[i] is set, for example, so that a current amount according to the absolute value of the negative second data flows through the transistor F2ms of the cell IMrefs[i]. Specifically, a potential according to the current amount is held in the gate (node ​​NNrefs[i]) of the transistor F2ms. Meanwhile, the cell IMref[i] is set, for example, so that no current flows through the transistor F2m of the cell IMref[i]. Specifically, the gate (node ​​NNref[i]) of the transistor F2m may hold a potential provided by the wiring VE, a potential for initialization provided by the wiring VINIL2 of the circuit XCSa in FIG. 2C, or the like.

[0371] Furthermore, when the second data of "0" is input to the circuit CES[i,j], for example, the transistor F2m of the cell IMref[i] and the transistor F2ms of the cell IMrefs[1] are set so that no current flows through them. Specifically, the gate of the transistor F2m (node ​​NNref[i]) and the gate of the transistor F2ms (node ​​NNrefs[i]) may hold a potential provided by the wiring VE, an initialization potential provided by the wiring VINIL2 of the circuit XCSa in FIG. 2C, or the like.

[0372] When positive second data or negative second data is input to another circuit CES, similar to the above-mentioned circuit CESref[i], a current amount according to the second data may be set to flow between the cell IMref and the wiring XCL or between the cell IMrefs and the wiring XCLs, and no current may be set to flow between the cell IMref and the wiring XCL or between the cell IMrefs and the wiring XCLs. When second data of "0" is input to another circuit CES, similar to the above-mentioned circuit CESref[i], a current may be set to flow between the cell IMref and the wiring XCL and between the cell IMrefs and the wiring XCLs.

[0373] As an example, when the second data "+3", "+2", "+1", "0", "-1", "-2", and "-3" are input to the circuit CES, by setting the amount of current flowing from the wiring XCL to the cell IMref and the amount of current flowing from the wiring XCLs to the cell IMrefs as described above, each of the second data "+3", "+2", "+1", "0", "-1", "-2", and "-3" can be defined, for example, as shown in the following table.

[0374] [Table 3]

[0375] Here, when the first data held in the circuit CES is any one of “+3”, “+2”, “+1”, “0”, “-1”, “-2”, or “-3”, and the second data input to the circuit CES is any one of “+1”, “0”, or “-1”, consider the amount of current flowing from the wiring WCL to cells IM and IMs of the circuit CES, and the amount of current flowing from the wiring WCLr to cells IMr and IMsr of the circuit CES.

[0376] For example, when the second data input to the circuit CES is "+1", a potential corresponding to the absolute value of the second data "+1" is input from the wiring XCL to the second terminals of the capacitances C5 and C5r of the circuit CES, and a potential corresponding to the ground potential (GND) is input from the wiring XCLs to the second terminals of the capacitances C5s and C5sr of the circuit CES. Also, when the first data held in the circuit CES is "+3", a potential corresponding to the absolute value of the first data "+3" is held in each of the nodes NN and NNsr, and a ground potential (GND) is held in each of the nodes NNr and NNs. At this time, from the formula (1.12) or (1.16), 3I ref0In addition, no current flows between the first terminal and the second terminal of each of the transistors F2r, F2s, and F2sr. That is, a current of 3I flows from the wiring WCL to the cell IM. ref0 flows, no current flows from the wiring WCL to the cell IMs, no current flows from the wiring WCLr to the cell IMsr, and no current flows from the wiring WCLr to the cell IMsr.

[0377] Also, for example, the second data input to the circuit CES is "+1", and the first data held in the circuit CES is "-3". Therefore, a potential corresponding to the absolute value of the first data "-3" is held in each of the nodes NNr and NNs, and a ground potential (GND) is held in each of the nodes NN and NNsr. At this time, a current of 3I is applied between the first terminal and the second terminal of the transistor F2r of the circuit CES according to the formula (1.12) or (1.16). ref0 In addition, no current flows between the first terminal and the second terminal of each of the transistors F2, F2s, and F2sr. That is, a current of 3I flows from the wiring WCLr to the cell IMr. ref0 flows, no current flows from the wiring WCL to the cell IM, no current flows from the wiring WCL to the cell IMs, and no current flows from the wiring WCLr to the cell IMsr.

[0378] For example, when the second data input to the circuit CES is "-1", a potential corresponding to the absolute value of the second data "-1" is input from the wiring XCLs to the second terminals of the capacitances C5s and C5sr of the circuit CES, and a potential corresponding to the ground potential (GND) is input from the wiring XCL to the second terminals of the capacitances C5 and C5r of the circuit CES. When the first data held in the circuit CES is "+3", a potential corresponding to the absolute value of the first data "+3" is held in each of the nodes NN and NNsr, and a ground potential (GND) is held in each of the nodes NNr and NNs. At this time, a current of 3I is calculated between the first terminal and the second terminal of the transistor F2sr of the circuit CES from the equation (1.12) or (1.16).ref0 In addition, no current flows between the first terminal and the second terminal of each of the transistors F2, F2r, and F2s. That is, a current of 3I flows from the wiring WCLr to the cell IMsr. ref0 flows, no current flows from the wiring WCL to the cell IM, no current flows from the wiring WCLr to the cell IMr, and no current flows from the wiring WCL to the cell IMs.

[0379] Also, for example, the second data input to the circuit CES is "-1", and the first data held in the circuit CES is "-3". Therefore, a potential corresponding to the absolute value of the first data "-3" is held in each of the nodes NNr and NNs, and a ground potential (GND) is held in each of the nodes NN and NNsr. At this time, a current of 3I is applied between the first terminal and the second terminal of the transistor F2s of the circuit CES according to equation (1.12) or equation (1.16). ref0 In addition, no current flows between the first terminal and the second terminal of each of the transistors F2, F2r, and F2sr. That is, a current of 3I flows from the wiring WCL to the cell IMs. ref0 flows, no current flows from the wiring WCL to the cell IM, no current flows from the wiring WCLr to the cell IMr, and no current flows from the wiring WCLr to the cell IMsr.

[0380] Furthermore, for example, when the second data input to the circuit CES is "0", the ground potential (GND) is input from the wiring XCL to the second terminals of the capacitances C5 and C5r of the circuit CES, and the ground potential (GND) is input from the wiring XCLs to the second terminals of the capacitances C5s and C5sr of the circuit CES. At this time, no current flows between the first terminal and the second terminal of each of the transistors F2, F2r, F2s, and F2sr, regardless of the value of the first data held in the circuit CES.

[0381] Also, for example, when the first data held in the circuit CES is "0", the node NN, the node NNr, the node NNs, and the node NNsr are held at the ground potential (GND). In this case, no matter what value the second data input to the circuit CES has, no current flows between the first terminal and the second terminal of each of the transistors F2, F2r, F2s, and F2sr.

[0382] The above describes the cases where the first data is “+3”, “-3”, and “0”, and the second data is “+1”, “-1”, and “0”. However, if we consider other cases in a similar manner, the amount of current flowing through the wiring WCL and wiring WCLr can be summarized as shown in the following table.

[0383] [Table 4]

[0384] As described above, by using the arithmetic circuit MAC2, it is possible to perform a multiply-and-accumulate operation between the first data, which is positive, negative, or "0", and the second data, which is positive or "0". Also, by using the arithmetic circuit MAC3, it is possible to perform a multiply-and-accumulate operation between the first data, which is positive, negative, or "0", and the second data, which is positive, negative, or "0".

[0385] Note that one embodiment of the present invention is not limited to the circuit configurations of the arithmetic circuits MAC2 and MAC3 described in this embodiment. The circuit configurations of the arithmetic circuits MAC2 and MAC3 can be changed depending on the situation. For example, the capacitances C5, C5r, C5s, C5sr, C5m, and C5ms included in the arithmetic circuit MAC3 can be gate capacitances of transistors (not shown). In addition, in the arithmetic circuit MAC3, when the parasitic capacitances between the nodes NN, NNr, NNs, NNsr, NNref, and NNrefs and the surrounding wirings are large, the capacitances C5, C5r, C5s, C5sr, C5m, and C5ms are not necessarily provided.

[0386] Note that this embodiment mode can be appropriately combined with other embodiment modes described in this specification.

[0387] (Embodiment 3) In this embodiment, a configuration will be described in which any one of the arithmetic circuit MAC1, arithmetic circuit MAC1A, arithmetic circuit MAC2, and arithmetic circuit MAC3 described in the above embodiments is combined with a sensor.

[0388] <Example of the configuration of an arithmetic circuit to which the current generated by the sensor is input> Fig. 13A shows a configuration example in which an arithmetic circuit MAC1 and a circuit SCA having a sensor are combined. Note that Fig. 13A shows only the cell array CA of the arithmetic circuit MAC1.

[0389] The circuit SCA includes, for example, sensors SNC[1] to SNC[m]. In Fig. 13A, for example, the sensors SNC[1] to SNC[m] are arranged in a matrix.

[0390] The sensors SNC[1] to SNC[m] have a function of converting sensed information into an amount of current and outputting the amount of current. The sensors SNC[1] to SNC[m] may be, for example, an optical sensor using a photodiode, a pressure sensor, a gyro sensor, an acceleration sensor, an auditory sensor, a temperature sensor, or a humidity sensor. In particular, by applying an optical sensor to the sensors SNC[1] to SNC[m], the circuit SCA can be part of an image sensor.

[0391] The sensors SNC[1] to SNC[m] are preferably provided in an area close to the outside world to sense information about the outside world. For this reason, the circuit SCA is preferably provided above the arithmetic circuit MAC1, more specifically, above the cell array CA, as shown in FIG. 13A.

[0392] Moreover, the sensor SNC[i] (where i is an integer between 1 and m) is electrically connected to the wiring XCL[i]. That is, the sensor SNC[1] is electrically connected to the wiring XCL[1], and the sensor SNC[m] is electrically connected to the wiring XCL[m].

[0393] Therefore, when information is sensed in each of the sensors SNC[1] to SNC[m], the sensors SNC[1] to SNC[m] pass an amount of current corresponding to the information through the wirings XCL[1] to XCL[m], respectively.

[0394] Note that the circuit SCA is preferably configured so that the sensors SNC[1] to SNC[m] perform sensing sequentially and currents can flow sequentially through the wirings XCL[1] to XCL[m]. In this case, for example, the circuit SCA may be configured to include signal lines for selecting the sensors SNC[1] to SNC[m], and the sensors SNC[1] to SNC[m] may be operated sequentially by sequentially transmitting signals to the signal lines.

[0395] Specifically, for example, as shown in FIG. 13B, in the circuit configuration of FIG. 13A, a circuit VINI may be provided in the wirings XCL[1] to XCL[m]. The circuit VINI includes switches SW[1] to SW[m]. The first terminals of the switches SW[1] to SW[m] are electrically connected to the wirings XCL[1] to XCL[m], and the second terminals of the switches SW[1] to SW[m] are electrically connected to the wiring VINIL3. The wiring VINIL3 functions as a wiring that applies a constant potential such as a low-level potential or a ground potential. In particular, the constant potential is preferably a potential lower than the potential applied by the wiring VE. Here, it is considered that the switches SW[1] to SW[m] are sequentially turned off so that one of the switches SW[1] to SW[m] is turned off and the remaining switches SW are turned on. When the sensors SNC[1] to SNC[m] perform sensing simultaneously, the sensors SNC[1] to SNC[m] pass current through the wirings XCL[1] to XCL[m], respectively. At this time, the wiring XCL electrically connected to the switch SW that is in the on state among the switches SW[1] to SW[m] is in a conductive state with the wiring VINIL3, so that the current flows through the wiring VINIL3. As a result, the potential of the wiring XCL electrically connected to the switch SW that is in the on state becomes approximately equal to the constant potential provided by the wiring VINIL3. On the other hand, the potential of the wiring XCL electrically connected to the switch SW that is in the off state among the switches SW[1] to SW[m] is determined according to the amount of the current.

[0396] Also, for example, if the sensors SNC[1] to SNC[m] are optical sensors configured with photodiodes or the like, a filter may be prepared that allows light to be irradiated only to one of the sensors SNC[1] to SNC[m]. In this case, since there are m sensors SNC, there are m types of filters. In addition, if a filter that does not irradiate light to any of the sensors SNC[1] to SNC[m] is prepared, there will be m+1 types of filters. When light is irradiated to the circuit SCA, the filters can be switched sequentially to allow the sensors SNC[1] to SNC[m] to perform sensing sequentially.

[0397] Furthermore, for example, when the sensors SNC[1] to SNC[m] are optical sensors constituted by photodiodes or the like, the arithmetic circuit MAC1, the arithmetic circuit MAC1A, the arithmetic circuit MAC2, or the arithmetic circuit MAC3 may be configured to individually irradiate the sensors SNC[1] to SNC[m] with light. By configuring to individually irradiate the sensors SNC[1] to SNC[m] with light in sequence, the sensors SNC[1] to SNC[m] can sequentially perform sensing.

[0398] Here, as an example, an operation example of the arithmetic circuit when the circuit SCA and the circuit VINI in FIG. 13B are provided in the arithmetic circuit MAC1 will be described.

[0399] For the operation example, refer to the timing chart in Fig. 6. Therefore, among the explanations of the operation example of the arithmetic circuit MAC1 provided with the circuit SCA and the circuit VINI in Fig. 13B, the contents that overlap with the explanation of the operation example 1 of the arithmetic circuit in the first embodiment will be omitted.

[0400] The constant potential provided by the wiring VINIL3 is set to the ground potential.

[0401] From time T13 to time T15 in the timing chart of FIG. 6, the amount of current I ref0 I ref0 For example, V can be the amount of reference current output by the sensor SNC[i] in FIG. 13B when sensing. In addition, in the circuit VINI, by turning off the switch SW[i], the potential of the wiring XCL[i] becomes, for example, V gm [i] shall be the case.

[0402] 6, the sensors SNC[1] to SNC[m] other than the sensor SNC[i] may or may not perform sensing. At this time, by turning on all of the switches SW[1] to SW[m] other than the switch SW[i], the potentials of the wirings XCL[1] to XCL[m] other than the wiring XCL[i] are set to, for example, the ground potential.

[0403] From time T17 to time T19 in the timing chart of FIG. 6, a current I flows from the sensor SNC[i+1] of the circuit SCA to the wiring XCL[i+1]. ref0 I ref0 For example, V can be the amount of current output by the sensor SNC[i+1] in FIG. 13B when sensing. In addition, in the circuit VINI, by turning off the switch SW[i+1], the potential of the wiring XCL[i+1] can be, for example, V gm Let it be [i+1].

[0404] 6, the sensors SNC[1] to SNC[m] other than the sensor SNC[i+1] may or may not perform sensing. At this time, the switches SW[1] to SW[m] other than the switch SW[i+1] are turned on, so that the potentials of the wirings XCL[1] to XCL[m] other than the wiring XCL[i+1] are set to, for example, the ground potential.

[0405] From time T22 to time T23 in the timing chart of FIG. 6, I ref0 x[i] times I ref0 The current x[i]I flows. ref0 For example, V can be a current output by the sensor SNC[i] in FIG. 13B when sensing. In addition, in the circuit VINI, by turning off the switch SW[i], the potential of the wiring XCL[i] becomes, for example, V gm [i] + ΔV[i].

[0406] In addition, from time T22 to time T23 in the timing chart of FIG. 6, I ref0 x[i+1] is x[i+1] times I ref0 The current x[i+1]I flows. ref0 For example, V can be a current output by the sensor SNC[i+1] in FIG. 13B when sensing. In addition, in the circuit VINI, by turning off the switch SW[i+1], the potential of the wiring XCL[i+1] can be, for example, V gm [i+1] + ΔV[i+1].

[0407] Thereafter, as in the explanation of the timing chart of FIG. 6, the amount of current flowing between the conversion circuit ITRZ[j] and the wiring WCL[j] is the amount of current I flowing between the first terminal and the second terminal of the transistor F2 of the cell IM[i,j]. 1 [i,j] and the current I flowing between the first and second terminals of transistor F2 in cell IM[i+1,j] 1[i+1,j] and the sum (corresponding to equation (1.17)). Therefore, the amount of current output from the conversion circuit ITRZ[j] to the wiring WCL[j] is the sum of the first data, which are the weight coefficients w[i,j] and w[i+1,j], and the second data, which are the neuron signal values ​​x[i] and x[i+1], that is, the amount of current proportional to x[i]w[i,j]+x[i+1]w[i+1,j].

[0408] The arithmetic circuit MAC1 to which the circuit SCA is applied can perform calculations from the first layer (input layer) to the second layer (middle layer) of a hierarchical neural network, for example. That is, the information (values) obtained by sensing from the sensors SNC[1] to SNC[m] correspond to signals transmitted from the neurons of the first layer to the neurons of the second layer. In addition, by storing weighting coefficients between the neurons of the first layer and the neurons of the second layer in the cells IM[1,j] to IM[m,j], the arithmetic circuit MAC1 can calculate the sum of products of the information (values) and the weighting coefficients.

[0409] The hierarchical neural network will be described in detail in the fourth embodiment.

[0410] Fig. 14 illustrates a circuit SCA to which, for example, photodiodes PD[1] to PD[m] are applied as sensors SNC[1] to SNC[m] in Fig. 13A. In other words, the circuit SCA in Fig. 14 is assumed to be an image sensor as an example.

[0411] When using an optical sensor in this manner, it is desirable that the intensity of the light irradiated onto the optical sensor be within the range of intensity irradiated in the environment in which the optical sensor is used.

[0412] <Example of configuration of an arithmetic circuit with a sensor> 13A and 13B, the sensors SNC[1] to SNC[m] may be replaced with a circuit configuration including an element that converts sensed information into a current amount and outputs the current amount, such as a photodiode, and a peripheral circuit of the element. Specifically, for example, in the configuration of the semiconductor device in FIG. 13A, the sensors SNC[1] to SNC[m] in FIG. 13A may be replaced with circuits SPR[1] to SPR[m] as shown in FIG. 15.

[0413] Each of the circuits SPR[1] to SPR[m] has a sensor SNC having a function of sensing certain information and a function of converting the information into an amount of current and outputting the amount of current. Each of the circuits SPR[1] to SPR[m] may include not only the sensor SNC but also circuits, elements, etc. having other functions. Examples of the other functions include a switching function for switching between a conductive state and a non-conductive state between the sensor SNC and the wiring XCL, and a function for cutting off the power supply to temporarily stop the sensor SNC.

[0414] 15 also illustrates, as an example, a circuit CIR electrically connected to each of the wirings XCL[1] to XCL[m]. The circuit CIR can be, for example, a circuit that supplies current to the wirings XCL[1] to XCL[m] or a circuit that supplies a potential to the wirings XCL[1] to XCL[m], which is separate from the circuits SPR[1] to SPR[m].

[0415] In addition, in the semiconductor device in FIG. 15, the cell array CA and the circuit CIR are illustrated as being included in the same layer, but the configuration of the semiconductor device according to one embodiment of the present invention is not limited thereto. For example, as illustrated in FIG. 16, the circuit CIR may be provided so as to be located below the cell array CA. For example, as illustrated in FIG. 17, the circuit CIR may be provided so as to be included in the same layer as the circuit SCA. That is, the circuit SCA and the circuit CIR may be formed on the same substrate. Although not illustrated, for example, the circuit CIR may be provided so as to be located above the cell array CA and below the circuit SNC. For example, the circuit CIR may be provided in a plurality of layers. Specifically, for example, a part of the circuit CIR may be provided in the same layer as the circuit SCA, and the remaining part of the circuit CIR may be provided below the cell array CA.

[0416] Here, as an example, a configuration of an arithmetic circuit will be described in which each of the circuits SPR[1] to SPR[m] has a switching function for switching between a conductive state and a non-conductive state between the sensor SNC and the wiring XCL.

[0417] The arithmetic circuit MAC4 shown in Fig. 18 is a configuration example that combines the configuration of the arithmetic circuit MAC1 in Fig. 1 or the configuration of the arithmetic circuit MAC2 in Fig. 7 with the circuit SCA shown in Fig. 15. By configuring the arithmetic circuit MAC4 in Fig. 18, it is possible to increase the degree of freedom of the current input from the wirings XCL[1] to XCL[m] to the cell array CA. By increasing the degree of freedom of the current, for example, it is possible to set a current according to the reference data or the second data described in the first embodiment according to the situation.

[0418] Note that the arithmetic circuit MAC4 shown in FIG. 18 includes a circuit LGC and a circuit LS as an example.

[0419] The circuit LGC is electrically connected to the circuit LS by wirings LXS[1] to LXS[m]. The circuit LS is electrically connected to the circuit XCS by wirings DXS[1] to DXS[m].

[0420] The circuit XCS has a function of supplying a current amount corresponding to the reference data or a current amount corresponding to the second data to each of the wirings XCL[1] to XCL[m] as described in Embodiment 1. As an example, the circuit XCS can have the configuration of the circuit XCS illustrated in FIG.

[0421] In particular, when the circuit XCS shown in FIG. 2C is used as the circuit XCS, the amount of current flowing through one of the wirings XCL[1] to XCL[m] is determined according to the combination of potentials input to the wirings DX[1] to DX[L] of the circuit XCSa electrically connected to the wiring. Here, in FIG. 18, the wiring DXS[1] is the wirings DX[1] to DX[L] of the circuit XCSa electrically connected to the wiring XCL[1], and the wiring DXS[m] is the wirings DX[1] to DX[L] of the circuit XCSa electrically connected to the wiring XCL[m]. In other words, one of the wirings DXS[1] to DXS[m] can be a bus wiring that transmits a digital signal.

[0422] For example, the circuit LS has a function of level-shifting an input potential to a desired potential. Specifically, the circuit LS level-shifts a potential input from the wiring LXS[1] to a desired potential and outputs the level-shifted potential to the wiring DXS[1]. Therefore, the number of wirings for the wiring LXS[1] can be the same as the number of wirings DXS[1]. Similarly, the circuit LS level-shifts a potential input from the wiring LXS[m] to a desired potential and outputs the level-shifted potential to the wiring DXS[m]. Therefore, the number of wirings for the wiring LXS[m] can be the same as the number of wirings DXS[m]. Furthermore, one of the wirings LXS[1] to LXS[m] can be a bus wiring for transmitting a digital signal.

[0423] For example, the circuit LGC has a function of sequentially holding data DT input to the circuit LGC and outputting the data DT to the wirings LXS[1] to LXS[m] in parallel at the same time or sequentially at a desired timing. The data DT here can be, for example, reference data or second data input to the wirings XCL[1] to XCL[m]. That is, the circuit LGC holds the reference data or second data received from outside the circuit LGC and outputs the reference data or second data to each of the wirings LXS[1] to LXS[m] at a predetermined timing in order to flow a current amount according to the reference data or a current amount according to the second data to the wirings XCL[1] to XCL[m] of the arithmetic circuit MAC4. Note that a specific circuit configuration example of the circuit LGC will be described later.

[0424] In addition, if there is no need to level-shift the voltage output from the circuit LGC, the circuit LS is not provided in the arithmetic circuit MAC4 shown in Figure 18, and each of the wirings LXS[1] to LXS[m] can be electrically connected to each of the wirings DXS[1] to DXS[m].

[0425] Next, a description will be given of the configuration of the circuit SCA shown in Fig. 18. Each of the circuits SPR[1] to SPR[m] included in the circuit SCA has, for example, a transistor F9 and a sensor SNC.

[0426] In the circuit SPR[1] electrically connected to the wiring XCL[1], a first terminal of the transistor F9 is electrically connected to the wiring XCL[1], a second terminal of the transistor F9 is electrically connected to a first terminal of the sensor SNC, a gate of the transistor F9 is electrically connected to the wiring VTXL, a back gate of the transistor F9 is electrically connected to the wiring VBGL, and a second terminal of the sensor SNC is electrically connected to the wiring VANL.

[0427] In the circuit SPR[m] electrically connected to the wiring XCL[m], a first terminal of the transistor F9 is electrically connected to the wiring XCL[m], a second terminal of the transistor F9 is electrically connected to a first terminal of the sensor SNC, a gate of the transistor F9 is electrically connected to the wiring VTXL, a back gate of the transistor F9 is electrically connected to the wiring VBGL, and a second terminal of the sensor SNC is electrically connected to the wiring VANL.

[0428] As described above, the sensor SNC has a function of sensing information and a function of converting the information into an amount of current and outputting the amount of current.

[0429] 18 illustrates that the transistor F9 has a back gate, but one embodiment of the present invention is not limited thereto, and for example, the transistor F9 may have a single-gate structure. The transistor F9 may be, for example, an OS transistor or a Si transistor. In particular, by using an OS transistor as the transistor F9, the off-state current of the transistor F9 can be made extremely small. Therefore, by turning off the transistor F9, the current generated in the sensor SNC flowing through the wiring XCL can be made extremely small.

[0430] For example, the wiring VTXL functions as a wiring for switching the transistor F9 between an on state and an off state. Therefore, a high-level potential or a low-level potential is supplied to the wiring VTXL.

[0431] For example, the wiring VANL functions as a wiring that provides a power supply voltage to be supplied to the sensor SNC. Note that the power supply voltage may be, for example, a high-level potential, a low-level potential, a ground potential, etc., depending on the configuration of the sensor SNC.

[0432] The line VBGL functions as, for example, a line that applies a constant voltage, which may be, for example, a high-level potential, a low-level potential, or a ground potential.

[0433] By applying a desired voltage to the wiring VBGL, the threshold voltage of the transistor F9 included in each of the circuits SPR[1] to SPR[m] can be adjusted. For example, the threshold voltage of the transistor F9 can be lowered by applying a high-level potential to the wiring VBGL, and the threshold voltage of the transistor F9 can be increased by applying a low-level potential to the wiring VBGL.

[0434] The sensors SNC included in each of the circuits SPR[1] to SPR[m] have a function of converting sensed information into a current amount and outputting the current amount, similar to the sensors SNC[1] to SNC[m] in Fig. 13A and Fig. 13B. In addition, the sensor SNC may be, for example, an optical sensor using a photodiode, a pressure sensor, a gyro sensor, an acceleration sensor, an auditory sensor, a temperature sensor, a humidity sensor, or the like, as described above.

[0435] As an example, here, the sensor SNC includes an optical sensor using a photodiode. The circuit SPR[i] in FIG. 19A includes a photodiode PDm in the sensor SNC, and the input terminal (sometimes called an anode) of the photodiode PDm is electrically connected to the wiring VANL, and the output terminal (sometimes called a cathode) of the photodiode PDm is electrically connected to the second terminal of the transistor F9. At this time, the constant voltage provided by the wiring VANL is a low level potential, a ground potential, a negative potential, or the like. Therefore, when light is irradiated onto the photodiode PDm, a current flows from the output terminal of the photodiode PDm to the wiring VANL via the input terminal.

[0436] One of the modes of inputting a current from the wiring XCL[i] to the cell array CA in the circuit SCA of Fig. 19A is, for example, a mode in which the transistor F9 is turned off. By turning off the transistor F9, the current generated in the photodiode PDm does not flow to the wiring XCL[i]. Therefore, the current flowing from the wiring XCL[i] to the cell array CA can be a current corresponding to the reference data or the second data generated by the circuit XCS.

[0437] 19A, one of the modes of inputting a current from the line XCL[i] to the cell array CA is a mode in which the transistor F9 is turned on. By turning on the transistor F9, the current flowing from the line XCL[i] to the cell array CA can be set to the difference current between the desired current generated by the circuit XCS and the current generated by the photodiode PDm.

[0438] Incidentally, as a circuit configuration of the arithmetic circuit MAC4, the input terminal and the output terminal of the photodiode PDm in FIG. 19A may be interchanged. Specifically, as shown in FIG. 19B, the circuit SPR[i] is configured such that the input terminal of the photodiode PDm is electrically connected to the second terminal of the transistor F9, and the output terminal of the photodiode PDm is electrically connected to the wiring VANL. At this time, the constant voltage provided by the wiring VANL is a high-level potential or the like. Therefore, when the photodiode PDm is irradiated with light, a current flows from the output terminal of the photodiode PDm to the input terminal. Therefore, when the photodiode PDm is irradiated with light, a current flows from the wiring VANL to the input terminal via the output terminal of the photodiode PDm.

[0439] One of the modes of inputting a current from the wiring XCL[i] to the cell array CA in the circuit SCA of Fig. 19B is, for example, a mode in which the transistor F9 is turned off. By operating in this mode, the current generated in the photodiode PDm can be prevented from flowing to the wiring XCL[i], similar to turning off the transistor F9 in the circuit SCA of Fig. 19A, and the current flowing from the wiring XCL[i] to the cell array CA can be a current corresponding to the reference data or the second data generated by the circuit XCS.

[0440] 19B, one of the modes of inputting a current from the wiring XCL[i] to the cell array CA is, for example, a mode in which the transistor F9 is turned on. By operating in this mode and turning on the transistor F9, the current flowing from the wiring XCL[i] to the cell array CA can be the sum of the desired current generated by the circuit XCS and the current generated by the photodiode PDm.

[0441] At this time, the amount of current flowing from the circuit XCS to the wiring XCL[i] is set to zero, in other words, no current is supplied from the circuit XCS to the wiring SCL[i], so that the current flowing from the wiring XCL[i] to the cell array CA can be limited to only the current generated in the photodiode PDm.

[0442] As described above, by configuring the arithmetic circuit MAC4 of FIG. 18, the degree of freedom of the current input to the cell array CA from the wirings XCL[1] to XCL[m] can be increased, and the current corresponding to the reference data or the second data described in embodiment 1 can be set according to the situation.

[0443] For example, when inputting reference data or second data to the cell array CA of the arithmetic circuit MAC4, if the current generated by the sensor SNC is not used, the transistor F9 included in each of the circuits SPR[1] to SPR[m] can be turned off, and a current corresponding to the reference data or the second data can be generated by the circuit XCS and passed through the wirings XCL[1] to XCL[m].

[0444] Also, for example, when the reference data or the second data is input to the cell array CA of the arithmetic circuit MAC4, if the current generated by the sensor SNC is used, the transistor F9 included in each of the circuits SPR[1] to SPR[m] is turned on to cause the current generated by the sensor SNC to flow to the wirings XCL[1] to XCL[m]. Note that, depending on the circumstances, the amount of current flowing from the circuit XCS to the wirings XCL[1] to XCL[m] may be a desired amount or may be zero.

[0445] 6 in the arithmetic circuit MAC4, for example, between time T13 and time T14 and between time T17 and time T19, the transistor F9 included in the circuits SPR[1] to SPR[m] is turned off to allow a current corresponding to the reference data to flow from the circuit XCS to the wirings XCL[1] to XCL[m]. Also, for example, between time T22 and time T23, the amount of current flowing from the circuit XCS to the wirings XCL[1] to XCL[m] is set to 0, the transistor F9 included in the circuits SPR[1] to SPR[m] is turned on to allow a current generated by the sensor SNC to flow to the wirings XCL[1] to XCL[m].

[0446] Also, for example, when the reference data or the second data is input to the cell array CA of the arithmetic circuit MAC4, the sum (or difference) of the current generated by the circuit XCS and the current generated by the sensor SNC may be passed through the wirings XCL[1] to XCL[m] as the reference data or the second data. Here, when the sensor SNC is configured to include the photodiode PDm shown in FIG. 19(A) and FIG. 19(B), the current flowing from the circuit SCA to the wirings XCL[1] to XCL[m] corresponds to the data captured by the photodiode PDm. At this time, by generating correction data for the captured data as a current flowing from the circuit XCS to the wirings XCL[1] to XCL[m], a current corresponding to the corrected captured data can be passed from the wirings XCL[1] to XCL[m] to the cell array CA of the arithmetic circuit MAC4. For example, the correction may be a color correction that adds intensity to a specific color.

[0447] [Example of circuit LGC configuration] Next, a specific example of the circuit configuration of the circuit LGC will be described. When one of the wirings LXS[1] to LXS[m] is a bus wiring for transmitting a digital signal, it is preferable that the data DT (reference data and the second data) input to the circuit LGC is input as a digital signal. By treating the data DT as a digital signal, the circuit LGC can be configured as a logic circuit.

[0448] When the circuit LGC is configured as a logic circuit, the circuit LGC may have a circuit configuration as shown in Fig. 20A, for example. The circuit LGC shown in Fig. 20A includes a shift register SR, latch circuits LTA[1] to LTA[m], latch circuits LTB[1] to LTB[m], and switches SW[1] to SW[m].

[0449] The shift register SR is electrically connected to the wirings SPL, SCL, and the wirings SEL[1] to SEL[m].

[0450] The control terminals (sometimes called clock input terminals, enable signal input terminals, etc.) of the latch circuits LTA[1] to LTA[m] are electrically connected to the wirings SEL[1] to SEL[m], and the control terminals of the latch circuits LTB[1] to LTB[m] are electrically connected to the wirings LAT. The input terminals D of the latch circuits LTA[1] to LTA[m] are electrically connected to the wirings DAT, and the output terminals Q of the latch circuits LTA[1] to LTA[m] are electrically connected to the wirings DL[1] to DL[m]. The input terminals D of the latch circuits LTB[1] to LTB[m] are electrically connected to the wirings DL[1] to DL[m], and the output terminals Q of the latch circuits LTB[1] to LTB[m] are electrically connected to the first terminals of the switches SW[1] to SW[m]. The second terminals of the switches SW[1] to SW[m] are electrically connected to the wirings LXS[1] to LXS[m], respectively, and the control terminals of the switches SW[1] to SW[m] are electrically connected to the wirings SWL[1] to SWL[m], respectively.

[0451] For example, electrical switches such as analog switches and transistors can be used as the switches SW[1] to SW[m]. For example, mechanical switches can be used as the switches SW[1] to SW[m]. When transistors are used as the switches SW[1] to SW[m], the transistors can be OS transistors or Si transistors.

[0452] In addition, each of the switches SW[1] to SW[m] shown in FIG. 20A is turned on when a high-level potential is input to the control terminal, and is turned off when a low-level potential is input to the control terminal.

[0453] For example, the wirings SWL[1] to SWL[m] function as wirings for switching between a conductive state and a non-conductive state of the switches SW[1] to SW[m].

[0454] The wiring SPL functions, for example, as a wiring that transmits a start pulse signal to the shift register SR.

[0455] Moreover, the line SCL functions as, for example, a line that transmits a clock signal to the shift register SR.

[0456] Moreover, the wiring DAT functions, for example, as a wiring for transmitting data DT to the circuit LGC.

[0457] Each of the wirings SEL[1] to SEL[m], the wirings DL[1] to DL[m], and the wiring DAT can be a wiring for transmitting a digital signal. Therefore, each of the wirings SEL[1] to SEL[m], the wirings DL[1] to DL[m], and the wiring DAT can be a bus wiring. Also, the wiring SWL can be a bus wiring.

[0458] For example, the shift register SR has a function of sequentially outputting a high-level potential to the wirings SEL[1] to SEL[m] in accordance with a change in potential input to the wirings SPL and SCL. Note that the shift register SR cannot output a high-level potential to two or more of the wirings SEL[1] to SEL[m], and when any one of the wirings SEL[1] to SEL[m] outputs a high-level potential, the remaining wirings SEL[1] to SEL[m] output a low-level potential.

[0459] For example, when a high-level potential is input to the wiring SPL as a start pulse signal, and the potential rises from a low-level potential to a high-level potential by the clock signal from the wiring SCL, the wiring SEL[1] outputs a high-level potential. Then, when a low-level potential is input to the wiring SPL and the potential rises again from a low-level potential to a high-level potential by the clock signal from the wiring SCL, the wiring SEL[1] outputs a low-level potential, and the wiring SEL[2] outputs a high-level potential. Then, when a low-level potential is input to the wiring SPL and, for example, the clock signal from the wiring SCL rises a third time, the wiring SEL[1] and the wiring SEL[2] output a low-level potential, and the wiring SEL[3] outputs a high-level potential.

[0460] In this way, each time a potential rise occurs in the clock signal from the wiring SCL, the shift register SR can sequentially output a high-level potential to one of the wirings SEL[1] to SEL[m] and output a low-level potential to the other wirings.

[0461] Each of the latch circuits LTA[1] through LTA[m] and the latch circuits LTB[1] through LTB[m] has a function of becoming enabled when a high-level potential is input to the control terminal, holding the data input to the input terminal D, and outputting the data to the output terminal Q. Note that each of the latch circuits LTA[1] through LTA[m] and the latch circuits LTB[1] through LTB[m] becomes disabled when a low-level potential is input to the control terminal, and does not hold the data input to the input terminal D, nor does it output the data to the output terminal Q.

[0462] Here, an example of the operation of the circuit LGC will be described.

[0463] 21A is a timing chart showing an operation example of the circuit LGC. The timing chart shows changes in potentials in the wirings SPL, SCL, SEL[1], SEL[2], SEL[m-1], SEL[m], SWL[1] to SWL[m], and LAT, and also shows data input to the wirings DAT, LXS[1], LXS[2], LXS[m-1], and LXS[m]. Note that in the wirings SPL, SCL, SEL[1], SEL[2], SEL[m-1], SEL[m], SWL, and LAT, high-level potentials are indicated as High, and low-level potentials are indicated as Low.

[0464] 21A shows an example of an operation in which the circuit LGC simultaneously outputs data DT to each of the wirings LXS[1] to LXS[m] during and around the period from time T31 to time T40. This example of the operation is performed, for example, during the period from time T21 to time T23 in the timing chart of FIG.

[0465] Also, at a time before time T31, a low-level potential is input to the wiring LAT, and a low-level potential is input to each of the wirings SWL[1] to SWL[m]. Also, it is assumed that the shift register SR outputs a low-level potential to each of the wirings SEL[1] to SEL[m].

[0466] Between time T31 and time T32, a high-level potential is input to the line SPL as a start pulse signal. A pulse voltage is input to the line SCL as a clock signal. The shift register SR receives the rising edge of the pulse voltage of the clock signal, thereby acquiring the high-level potential, which is the start pulse signal input to the line SPL.

[0467] Between time T32 and time T33, data DT[1] is input to the line DAT. A second pulse voltage is input to the line SCL as a clock signal. The shift register SR outputs a high-level potential to the line SEL[1] when the rising edge of the second pulse voltage of the clock signal is input.

[0468] At this time, the latch circuit LTA[1] is enabled, so it holds the data DT[1] input to its input terminal D and outputs the data DT[1] to its output terminal Q. The data DT[1] is input to the input terminal D of the latch circuit LTB[1]. At this time, a low-level potential is input to the control terminal of the latch circuit LTB[1], so the latch circuit LTB[1] does not hold the data DT[1] input to the input terminal D of the latch circuit LTB[1], and does not output the data DT[1] input to the output terminal Q of the latch circuit LTB[1].

[0469] Between time T33 and time T34, data DT[2] is input to the line DAT. A third pulse voltage is input to the line SCL as a clock signal. When the rising edge of the third pulse voltage of the clock signal is input, the shift register SR outputs a low-level potential to the line SEL[1] and a high-level potential to the line SEL[2].

[0470] At this time, the latch circuit LTA[1] is disabled and does not hold the data DT[2] input to the input terminal D of the latch circuit LTA[1]. The latch circuit LTA[1] continues to hold the data DT[1] from before time T33 and outputs the data DT[1] from the output terminal Q.

[0471] Furthermore, the latch circuit LTA[2] is enabled, so it holds the data DT[2] input to its input terminal D and outputs the data DT[2] to its output terminal Q. The data DT[2] is input to the input terminal D of the latch circuit LTB[2]. At this time, because a low-level potential is input to the control terminal of the latch circuit LTB[2], the latch circuit LTB[2] does not hold the data DT[2] input to the input terminal D of the latch circuit LTB[2], and does not output the data DT[2] input to the output terminal Q of the latch circuit LTB[2].

[0472] Between time T34 and time T35, data DT[3] to DT[m-2] are sequentially input to the wiring DAT, and high-level potentials are sequentially input to the wirings SEL[3] to SEL[m-2] by the shift register SR. As a result, data DT[3] to DT[m-2] are held in the latches LTA[3] to LTA[m-2], respectively. In addition, data DT[3] to DT[m-2] are output from the output terminals Q of the latches LTA[3] to LTA[m-2], respectively.

[0473] Between time T35 and time T36, data DT[m-1] is input to the line DAT. Also, the m-th pulse voltage is input to the line SCL as a clock signal. When the rising edge of the m-th pulse voltage of the clock signal is input, the shift register SR outputs a low-level potential to the line SEL[m-2] and a high-level potential to the line SEL[m-1].

[0474] At this time, the latch circuit LTA[m-2] is disabled and does not hold the data DT[m-1] input to the input terminal D of the latch circuit LTA[m-2]. The latch circuit LTA[m-2] continues to hold the data DT[m-2] from before time T35 and outputs the data DT[m-2] from the output terminal Q.

[0475] Furthermore, since the latch circuit LTA[m-1] is enabled, it holds the data DT[m-1] input to the input terminal D and outputs the data DT[m-1] to the output terminal Q. The data DT[m-1] is input to the input terminal D of the latch circuit LTB[m-1]. At this time, since a low-level potential is input to the control terminal of the latch circuit LTB[m-1], the latch circuit LTB[m-1] does not hold the data DT[m-1] input to the input terminal D of the latch circuit LTB[m-1], and does not output the data DT[m-1] input to the output terminal Q of the latch circuit LTB[m-1].

[0476] Between time T36 and time T37, data DT[m] is input to the line DAT. Also, the (m+1)th pulse voltage is input to the line SCL as a clock signal. When the rising edge of the (m+1)th pulse voltage of the clock signal is input, the shift register SR outputs a low-level potential to the line SEL[m-1] and a high-level potential to the line SEL[m].

[0477] At this time, the latch circuit LTA[m-1] is disabled and does not hold the data DT[m] input to the input terminal D of the latch circuit LTA[m-1]. The latch circuit LTA[m-1] continues to hold the data DT[m-1] from before time 36 and outputs the data DT[m-1] from the output terminal Q.

[0478] Furthermore, since the latch circuit LTA[m] is enabled, it holds the data DT[m] input to its input terminal D and outputs the data DT[m] to its output terminal Q. The data DT[m] is input to the input terminal D of the latch circuit LTB[m]. At this time, since a low-level potential is input to the control terminal of the latch circuit LTB[m], the latch circuit LTB[m] does not hold the data DT[m] input to the input terminal D of the latch circuit LTB[m], and does not output the data DT[m] input to the output terminal Q of the latch circuit LTB[m].

[0479] Between time T38 and time T39, a high-level potential is input to the line LAT. As a result, a high-level potential is input to each control terminal of the latch circuits LTB[1] to LTB[m], and each of the latch circuits LTB[1] to LTB[m] is enabled. As a result, the latch circuits LTB[1] to LTB[m] hold the data DT[1] to DT[m] input to their respective input terminals D, and output the data DT[1] to DT[m] from their respective output terminals Q.

[0480] Between time T39 and time T40, a high-level potential is input to the wirings SWL[1] to SWL[m]. This turns on the switches SW[1] to SW[m], and electrical continuity is established between the output terminals Q of the latch circuits LTB[1] to LTB[m] and the wirings LXS[1] to LXS[m]. This allows the circuit LGC to simultaneously output data DT[1] to DT[m] from the wirings LXS[1] to LXS[m], respectively.

[0481] The circuit LGC performs the operation of the timing chart shown in Fig. 21A, and can output the data DT[1] to DT[m] sequentially input to the circuit LGC in parallel to the wirings LXS[1] to LXS[m] at the same time. This allows a desired current to be simultaneously supplied to the wirings XCL[1] to XCL[m] of the arithmetic circuit MAC4 during the period from time T21 to time T23 in the timing chart of Fig. 6.

[0482] In the timing chart of Fig. 21A, an operation example in which the circuit LGC outputs the data DT to each of the wirings LXS[1] to LXS[m] at the same time is shown, but the circuit LGC may output the data DT to each of the wirings LXS[1] to LXS[m] sequentially. The timing chart of Fig. 21B shows an operation example in which the circuit LGC outputs the data DT to each of the wirings LXS[1] to LXS[m] sequentially. Note that the operation before time T39 in the timing chart of Fig. 21B is assumed to be the operation example performed from before time T31 to time T39 in the timing chart of Fig. 21A.

[0483] 21B shows changes in the potentials of the wirings SWL[1], SWL[2], SWL[m-1], and SWL[m], and also shows data input to the wirings LXS[1], LXS[2], LXS[m-1], and LXS[m]. Note that in the wirings SWL[1], SWL[2], SWL[m-1], and SWL[m], high-level potentials are indicated as "High" and low-level potentials are indicated as "Low."

[0484] Between time T39 and time T40, a high-level potential is input to the line SWL[1], which turns on the switch SW[1] and establishes a conductive state between the output terminal Q of the latch circuit LTB[1] and the line LXS[1], so that the data DT[1] output from the output terminal Q of the latch circuit LTB is transmitted to the line LXS[1].

[0485] Between time T40 and time T41, a low-level potential is input to the line SWL[1], and a high-level potential is input to the line SWL[2]. This causes the switch SW[1] to be in an off state, and the switch SW[2] to be in an on state. Since the output terminal Q of the latch circuit LTB[1] and the line LXS[1] are in a non-conductive state, the data DT[1] output from the output terminal Q of the latch circuit LTB is not transmitted to the line LXS[1]. In addition, since the output terminal Q of the latch circuit LTB[2] and the line LXS[2] are in a conductive state, the data DT[2] output from the output terminal Q of the latch circuit LTB is transmitted to the line LXS[2].

[0486] Between time T41 and time T42, high-level potentials are sequentially input to the wirings SWL[3] to SWL[m-2], and the switches SW[3] to SW[m-2] are sequentially turned on. As a result, the data DT[3] to DT[m-2] output to the output terminals Q of the latch circuits LTB[3] to LTB[m-2] are sequentially output from the wirings LXS[3] to LXS[m-2], respectively.

[0487] Between time T42 and time T43, a low-level potential is input to the line SWL[m-2], and a high-level potential is input to the line SWL[m-1]. This causes the switch SW[m-2] to be turned off, and the switch SW[m-1] to be turned on. Since the output terminal Q of the latch circuit LTB[m-2] and the line LXS[m-2] are not connected, the data DT[m-2] output from the output terminal Q of the latch circuit LTB is not transmitted to the line LXS[m-2]. Also, since the output terminal Q of the latch circuit LTB[m-1] and the line LXS[m-1] are connected, the data DT[m-1] output from the output terminal Q of the latch circuit LTB is transmitted to the line LXS[m-1].

[0488] Between time T43 and time T44, a low-level potential is input to the line SWL[m-1], and a high-level potential is input to the line SWL[m]. This causes the switch SW[m-1] to be in an off state, and the switch SW[m] to be in an on state. Since the output terminal Q of the latch circuit LTB[m-1] and the line LXS[m-1] are in a non-conductive state, the data DT[m-1] output from the output terminal Q of the latch circuit LTB is not transmitted to the line LXS[m-1]. Also, since the output terminal Q of the latch circuit LTB[m] and the line LXS[m] are in a conductive state, the data DT[m] output from the output terminal Q of the latch circuit LTB is transmitted to the line LXS[m].

[0489] The circuit LGC performs operations up to time T39 in the timing chart shown in FIG. 21A, and then performs operations in the timing chart shown in FIG. 21B, thereby enabling the circuit LGC to sequentially output data DT[1] to data DT[m] sequentially input to the circuit LGC to wirings LXS[1] to LXS[m].

[0490] In the operation example of the timing chart shown in FIG. 21B, an example is shown in which each of the switches SWL[1] to SWL[m] is sequentially turned on to sequentially output the data DT[1] to DT[m] to the wirings LXS[1] to LXS[m]. However, the operation may be such that a switch to be turned on is selected from the switches SWL[1] to SWL[m], and the data DT is output to the wiring selected from the wirings LXS[1] to LXS[m].

[0491] According to the above-described operation example, for example, between time T13 and time T15 or between time T17 and time T19 in the timing chart of FIG. 6, a desired current can be supplied to any one of the wirings XCL[1] to XCL[m] of the arithmetic circuit MAC.

[0492] 18 included in the semiconductor device of one embodiment of the present invention may be a circuit LGC shown in FIG. 20A that has a modified circuit configuration depending on the situation. For example, the circuit LGC shown in FIG. 20A may have a configuration in which a buffer circuit is provided between each of the switches SW[1] to SW[m] and the wirings LXS[1] to LXS[m] shown in FIG. 20A. The circuit LGC shown in FIG. 20B has a configuration in which a buffer circuit BF[1] to BF[m] are provided between each of the switches SW[1] to SW[m] and the wirings LXS[1] to LXS[m]. As shown in FIG. 20B, by providing the buffer circuits BF[1] to BF[m] in the circuit LGC, the electric signal (electric potential) output from the circuit LGC to the wirings LXS[1] to LXS[m] can be stabilized.

[0493] By using the arithmetic circuit MAC4 shown in FIG. 18, the current generated by the circuit XCS and / or the current generated by the sensor SNC can be input to the cell array CA as the reference data or the current corresponding to the second data.

[0494] Note that this embodiment mode can be appropriately combined with other embodiment modes described in this specification.

[0495] (Embodiment 4) In this embodiment mode, a hierarchical neural network will be described. Note that the operation of the hierarchical neural network can be performed by using the semiconductor device described in the above embodiment mode.

[0496] <Hierarchical neural network> As an example, a hierarchical neural network has one input layer, one or more intermediate layers (hidden layers), and one output layer, and is composed of a total of three or more layers. The hierarchical neural network 100 shown in FIG. 22A shows an example, and the neural network 100 has a first layer to an Rth layer (where R can be an integer of 4 or more). In particular, the first layer corresponds to the input layer, the Rth layer corresponds to the output layer, and the other layers correspond to intermediate layers. Note that FIG. 22A illustrates the (k-1)th layer and the kth layer (where k is an integer of 3 or more and R-1 or less) as intermediate layers, and does not illustrate the other intermediate layers.

[0497] Each layer of the neural network 100 has one or more neurons. In FIG. 22A, the first layer has neurons N 1 (1) Neuron N p (1) (where p is an integer equal to or greater than 1), and the (k-1)th layer has neurons N 1 (k-1) Neuron N m (k-1) (where m is an integer equal to or greater than 1), and the kth layer has neurons N 1 (k) Neuron N n (k) (where n is an integer equal to or greater than 1), and the Rth layer has neurons N 1 (R) Neuron N q (R) (where q is an integer equal to or greater than 1).

[0498] In addition, in FIG. 22A, neuron N 1 (1) , neuron N p (1) , neuron N 1 (k-1) , neuron N m (k-1) , neuron N 1 (k) , neuron N n (k) , neuron N1 (R) , neuron N q (R) In addition, the (k-1)th layer neuron N i (k-1) (where i is an integer between 1 and m), and the kth layer neuron N j (k) (where j is an integer between 1 and n) are also shown, and other neurons are omitted from the illustration.

[0499] Next, we will explain the transmission of signals from neurons in the previous layer to neurons in the next layer, and the signals input and output to and from each neuron. j (k) Focus on.

[0500] FIG. 22B shows the kth layer of neurons N j (k) and neuron N j (k) The input signal to neuron N j (k) 4 shows a signal output from the

[0501] Specifically, the (k-1)th layer neuron N 1 (k-1) Neuron N m (k-1) The output signals of each 1 (k-1) ~z m (k-1) But neuron N j (k) The output is directed to neuron N j (k) is z 1 (k-1) ~z m (k-1) Depending on z j (k) Generate z j (k) is output as an output signal to each neuron in the (k+1)th layer (not shown).

[0502] The degree of signal transmission of a signal input from a neuron in the previous layer to a neuron in the next layer is determined by the connection strength (hereinafter referred to as a weighting coefficient) of the synapse that connects those neurons. In the neural network 100, the signal output from a neuron in the previous layer is multiplied by the corresponding weighting coefficient before being input to a neuron in the next layer. If i is an integer between 1 and m, then the (k-1)th layer neuron N i (k-1) and the kth layer neuron N j (k) The weight coefficient of the synapse between i (k-1) j (k) Then, the kth layer neuron N j (k) The signal input to can be expressed by equation (4.1).

[0503]

number

[0504] In other words, the (k-1)th layer neuron N 1 (k-1) Neuron N m (k-1) From each of these, the k-th layer neuron N j (k) When a signal is transmitted to z 1 (k-1) ~z m (k-1) The weighting coefficients (w 1 (k-1) j (k) Or even w m (k-1) j (k) ) is multiplied by the k-th layer neuron N j (k) For w 1 (k-1) j (k) z 1 (k-1) Or even w m(k-1) j (k) z m (k-1) At this time, the kth layer neuron N j (k) The sum of the signals input to j (k) becomes equation (4.2).

[0505]

number

[0506] In addition, the weighting factor w 1 (k-1) j (k) Or even w m (k-1) j (k) and the neuron's signal z 1 (k-1) ~z m (k-1) The result of the multiplication and accumulation of and can be biased. When the bias is b, equation (4.2) can be rewritten as the following equation.

[0507]

number

[0508] Neuron N j (k) u j (k) Depending on j (k) where neuron N j (k) Output signal z from j (k) is defined as follows:

[0509]

number

[0510] The function f(uj (k) ) is an activation function in a hierarchical neural network, and can be a step function, a linear ramp function, a sigmoid function, etc. The activation function can be the same for all neurons or different. In addition, the activation functions of neurons can be the same or different for each layer.

[0511] Incidentally, the signal, weighting coefficient w, or bias b output by the neuron of each layer may be an analog value or a digital value. The digital value may be, for example, a binary value or a ternary value. It may also be a value with a larger number of bits. For example, in the case of an analog value, a linear ramp function, a sigmoid function, or the like may be used as an activation function. In the case of a binary digital value, for example, a step function with an output of -1 or 1 may be used. Or, a step function with an output of 0 or 1 may be used. Furthermore, the signal output by the neuron of each layer may be three or more values. In this case, the activation function may be three values, for example, a step function with an output of -1, 0, or 1, or a step function with an output of 0, 1, or 2 may be used. Furthermore, for example, a step function with an output of -2, -1, 0, 1, or 2 may be used as an activation function that outputs five values. By using digital values ​​for at least one of the signals, weighting coefficients w, or biases b output by the neurons in each layer, it is possible to reduce the circuit size, reduce power consumption, and increase the calculation speed, etc. Also, by using analog values ​​for at least one of the signals, weighting coefficients w, or biases b output by the neurons in each layer, it is possible to improve the accuracy of calculations.

[0512] In neural network 100, when an input signal is input to the first layer (input layer), each layer from the first layer (input layer) to the last layer (output layer) generates an output signal based on the signal input from the previous layer using formula (4.1), formula (4.2) (or formula (4.3)), and formula (4.4), and outputs the output signal to the next layer. The signal output from the last layer (output layer) corresponds to the result of calculation by neural network 100.

[0513] When the arithmetic circuit MAC1 described in the first embodiment is applied as the hidden layer described above, the weight coefficient w s[k-1] (k-1) s[k] (k) (s[k-1] is an integer between 1 and m, and s[k] is an integer between 1 and n) is used as the first data, and the current amount corresponding to the first data is stored in each cell IM of the same column, and the neuron N in the (k-1) layer is s[k-1] (k-1) Output signal z from s[k-1] (k-1) The amount of current I input to the conversion circuit ITRZ is calculated by passing a current amount according to the second data from the circuit XCS to the wiring XCL of each row. S In addition, the sum of products of the first data and the second data can be calculated by using the sum of products to calculate the value of the activation function, and the activation function value is used as a signal to activate the k-th layer neuron N s[k] (k) Output signal z s[k] (k) It can be said that:

[0514] In addition, when the arithmetic circuit MAC1 described in the first embodiment is applied to the output layer described above, the weight coefficient w s[R-1] (R-1) s[R] (R) (s[R-1] is an integer equal to or greater than 1, and s[R] is an integer equal to or greater than 1 and equal to or less than q) is used as the first data, and the current amount corresponding to the first data is stored in each cell IM in the same column, so that the neuron N in the (R-1) layer s[R-1] (R-1) Output signal z from s[R-1](R-1) The amount of current I input to the conversion circuit ITRZ is calculated by passing a current amount according to the second data from the circuit XCS to the wiring XCL of each row. S In addition, the sum of products of the first data and the second data can be calculated by using the sum of products to calculate the value of the activation function, and the value of the activation function is used as a signal to activate the neuron N s[R] (R) Output signal z s[R] (R) It can be said that:

[0515] The input layer described in this embodiment may function as a buffer circuit that outputs an input signal to the second layer.

[0516] In addition, when the arithmetic circuit MAC2 in which the conversion circuit ITRZD[j] is the conversion circuit ITRZD4 in FIG. 9 described in the second embodiment is applied as the hidden layer described above, the weight coefficient w s[k-1] (k-1) s[k] (k) The amount of current corresponding to the first data is stored in the cells IM and IMr of each circuit CES in the same column, and the neuron N s[k-1] (k-1) Output signal z from s[k-1] (k-1) The amount of current I input to the conversion circuit ITRZD4 is calculated by passing a current amount according to the second data from the circuit XCS to the wiring XCL of each row. S , and I Sr In other words, the activation function value corresponding to the sum of the products of the first data and the second data is calculated using the calculated value as a signal to the neuron N s[k] (k) Output signal z s[k] (k) In addition, since the conversion circuit ITRZD4 is configured to output a current amount corresponding to the value, for example, a neuron N s[k] (k) Output signal z s[k] (k)can be expressed as a current. In other words, when the arithmetic circuit MAC2 is applied as the hidden layer of the (k+1)th layer, the neuron N s[k] (k) Output signal z s[k] (k) can be a current output from the conversion circuit ITRZD4 of the arithmetic circuit MAC2 in the k-th hidden layer, without being generated by the circuit XCS.

[0517] Specifically, the above-mentioned hierarchical neural network calculation can be performed by using the calculation circuit shown in FIG. 23. The calculation circuit in FIG. 23 has, as an example, a calculation circuit MAC2-1 having the same configuration as the calculation circuit MAC2 in FIG. 7, and a calculation circuit MAC2-2 having a configuration in which the circuit XCS is not provided in the calculation circuit MAC2 in FIG. 7. Note that, in the cell array CA of the calculation circuit MAC2-1, m×n circuits CES are arranged in a matrix, and in the cell array CA of the calculation circuit MAC2-2, n×t circuits CES (t is an integer of 1 or more) are arranged in a matrix. Also, the wirings OL[1] to OL[n] of the calculation circuit MAC2-1 are electrically connected to the wirings XCL[1] to XCL[n] of the calculation circuit MAC2-2, respectively.

[0518] For example, in the arithmetic circuit MAC2-1 of FIG. 23, the weight coefficient between the neuron in the (k-1)th layer and the neuron in the kth layer is stored as the first data in the circuits CES[1,1] to CES[m,n] of the cell array CA, and the neuron N s[k-1] (k-1) Output signal z from s[k-1] (k-1) The amount of current corresponding to the second data is passed from the circuit XCS to the wiring XCL of each row, so that the neuron N in the kth layer is output from each of the wirings OL[1] to OL[n]. 1 (k) Neuron N n (k) Output signal z 1 (k) ~z n (k)The output signal z 1 (k) ~z n (k) Each of the values ​​can be expressed as the amount of current output from the conversion circuits ITRZD4[1] to ITRZD4[n].

[0519] Here, in the arithmetic circuit MAC2-2 of FIG. 23, the weight coefficient between the neuron in the kth layer and the neuron in the (k+1)th layer is held as the first data in the circuits CES[1,1] to CES[n,t] of the cell array CA, and the amount of current flowing through the wiring XCL of each row, that is, the amount of current flowing through the neuron N in the kth layer is held as the first data in the circuits CES[1,1] to CES[n,t] of the cell array CA. 1 (k) Neuron N n (k) Output signal z 1 (k) ~z n (k) By using this as the second data, the wiring OL[s[k+1]] (where s[k+1] is an integer between 1 and t) is connected to the neuron N s[k+1] (k+1) Output signal z s[k+1] (k+1) can be output.

[0520] Incidentally, as described in the second embodiment, by applying any one of the conversion circuits ITRZD4 in FIG. 9, FIG. 10A, and FIG. 11A to FIG. 11D to the conversion circuit ITRZD4[1] to the conversion circuit ITRZD4[n] of the arithmetic circuit MAC2-1 in FIG. 23, the conversion circuit ITRZD4[1] to the conversion circuit ITRZD4[n] act as a ReLU function. Therefore, for example, when the result of the product-sum operation in the circuits CES[1,j] to CES[m,j] is "negative", the amount of current flowing from the conversion circuit ITRZD4 to the wiring OL[j] is ideally preferably 0. However, in reality, there are cases where a minute current flows from the conversion circuit ITRZD4 to the wiring OL[j], or a minute current flows from the wiring OL[j] to the conversion circuit ITRZD4.

[0521] For this reason, a configuration example of an arithmetic circuit MAC2-2 for appropriately performing calculations on the next layer and beyond of a hierarchical neural network is shown in Fig. 24. The arithmetic circuit MAC2-2 shown in Fig. 24 has a configuration in which the circuits CES arranged in the cell array CA in the arithmetic circuit MAC2 in Fig. 7 are changed from an m x n matrix to an n x t matrix, and the circuit XCS is not provided. In addition, since the circuits CES of the cell array CA of the arithmetic circuit MAC2-2 are arranged in an n x t matrix, the values ​​in parentheses such as [ ] attached to the symbols of the wiring, circuits, etc. shown in Fig. 24 have also been changed.

[0522] Furthermore, in the arithmetic circuit MAC2-2 of Figure 24, as an example, an example of a circuit configuration is shown in which the arithmetic circuit MAC2-2 is provided with wiring TM[1], wiring TM[n], wiring TH[1,h] (h is an integer greater than or equal to 1 and less than or equal to t), wiring TH[n,h], wiring THr[1,h], and wiring THr[n,h]. In the arithmetic circuit MAC2-2 of FIG. 24, wiring TM[1] is electrically connected to the backgate of transistor F2m of cell IMref[1], wiring TM[n] is electrically connected to the backgate of transistor F2m of cell IMref[n], wiring TH[1,h] is electrically connected to the backgate of transistor F2 of cell IM[1,h], wiring THr[1,h] is electrically connected to the backgate of transistor F2r of cell IMr[1,h], wiring TH[n,h] is electrically connected to the backgate of transistor F2 of cell IM[n,h], and wiring THr[n,h] is electrically connected to the backgate of transistor F2r of cell IMr[n,h].

[0523] By applying a low-level potential to each of the wirings TM[1], TM[n], TH[1,h], TH[n,h], THr[1,h], and THr[n,h], the threshold voltage of the transistor having the back gate electrically connected to each wiring can be increased. This makes it possible to prevent a small amount of current flowing through the wiring OL of the arithmetic circuit MAC2-1 from flowing through the cell IMref of the arithmetic circuit MAC2-2 to the wiring VE. In other words, the output characteristics of the conversion circuits ITRZD4[1] to ITRZD4[n] can be made closer to the ReLU function. Therefore, the next layer of the hierarchical neural network can be appropriately calculated.

[0524] Also, for example, the configuration of the arithmetic circuit MAC2-2 in Fig. 24 may be applied to the arithmetic circuit MAC2-1 in Fig. 23. By adopting such a configuration, the threshold voltages of the transistors F2, F2r, and F2m included in the arithmetic circuit MAC2-1 can be varied in the same way as in the arithmetic circuit MAC2-2.

[0525] In addition, while FIG. 24 illustrates wiring TM[1], wiring TM[n], wiring TH[1,h], wiring TH[n,h], wiring THr[1,h], and wiring THr[n,h], the arithmetic circuit MAC2-2 in FIG. 24 may be configured, for example, by combining wiring TM[1], wiring TH[1,h], and wiring THr[1,h] into a single wiring, and by combining wiring TM[n], wiring TH[n,h], and wiring THr[n,h] into a single wiring.

[0526] As described above, by configuring the arithmetic circuit shown in FIG. 23, the value (amount of current) of the neuron output signal output from the arithmetic circuit MAC2-1 can be input directly to the arithmetic circuit MAC2-2, so that the arithmetic operation of the hierarchical neural network can be performed continuously from the first layer, for example. In addition, since it is not necessary to temporarily store the output signals output from the wiring OL[1] to wiring OL[n] of the arithmetic circuit MAC2-1 by an external circuit or the like, it is not necessary to separately provide a storage device required for temporary storage. In other words, by configuring the arithmetic circuit shown in FIG. 23, the circuit area can be reduced, and the power required for data transmission for temporary storage can be reduced.

[0527] Note that this embodiment mode can be appropriately combined with other embodiment modes described in this specification.

[0528] (Embodiment 5) In this embodiment, a structural example of the semiconductor device described in the above embodiment and a structural example of a transistor that can be applied to the semiconductor device described in the above embodiment will be described.

[0529] <Example of semiconductor device configuration> Fig. 25 shows, as an example, a configuration in which a photoelectric conversion element is applied as a photodiode to the sensor SNC in the arithmetic circuit MAC4 described in the third embodiment. Specifically, the semiconductor device shown in Fig. 25 includes a transistor 300, a transistor 500, a capacitor 600, and a photoelectric conversion element 700. Fig. 27A is a cross-sectional view of the transistor 500 in the channel length direction, Fig. 27B is a cross-sectional view of the transistor 500 in the channel width direction, and Fig. 27C is a cross-sectional view of the transistor 300 in the channel width direction.

[0530] The transistor 500 is a transistor having a metal oxide in a channel formation region (OS transistor). The transistor 500 has a characteristic of having a small off-state current and a field-effect mobility that does not change even at high temperatures. By applying the transistor 500 to a semiconductor device, such as a transistor included in the arithmetic circuit MAC1, the arithmetic circuit MAC1A, the arithmetic circuit MAC2, the arithmetic circuit MAC3, or the arithmetic circuit MAC4 described in the above embodiment, a semiconductor device whose operation capability is not degraded even at high temperatures can be realized. In particular, by utilizing the characteristic of having a small off-state current and applying the transistor 500 to the transistor F1 or F1m, a potential written to the cell IM or the cell IMref can be held for a long time.

[0531] The transistor 500 is provided, for example, above the transistor 300, and the capacitor 600 is provided, for example, above the transistor 300 and the transistor 500. The photoelectric conversion element 700 is provided, for example, above the capacitor 600. Note that the capacitor 600 can be a capacitor included in the arithmetic circuit MAC1, the arithmetic circuit MAC1A, the arithmetic circuit MAC2, the arithmetic circuit MAC3, or the like described in the above embodiment. Note that depending on the circuit configuration, the capacitor 600 shown in FIG. 25 is not necessarily provided.

[0532] The transistor 300 is provided over a substrate 311 and includes a conductor 316, an insulator 315, a semiconductor region 313 formed of a part of the substrate 311, and a low-resistance region 314a and a low-resistance region 314b functioning as a source region or a drain region. Note that the transistor 300 can be applied to, for example, a transistor included in the arithmetic circuit MAC1, the arithmetic circuit MAC1A, the arithmetic circuit MAC2, the arithmetic circuit MAC3, or the like described in the above embodiment. Specifically, for example, the transistor can be a transistor included in an operational amplifier OP1 included in the conversion circuits ITRZ1 to ITRZ3 in FIGS. 4A to 4C. Note that Figure 25 shows a configuration in which the gate of the transistor 300 is electrically connected to one of the source or drain of the transistor 500 via one of a pair of electrodes of the capacitor 600; however, depending on the configuration of the arithmetic circuit MAC1, arithmetic circuit MAC1A, arithmetic circuit MAC2, arithmetic circuit MAC3, etc., one of the source or drain of the transistor 300 may be electrically connected to one of the source or drain of the transistor 500 via one of a pair of electrodes of the capacitor 600, or one of the source or drain of the transistor 300 may be electrically connected to the gate of the transistor 500 via one of a pair of electrodes of the capacitor 600, or each terminal of the transistor 300 may not be electrically connected to each terminal of the transistor 500 or each terminal of the capacitor 600.

[0533] Moreover, as the substrate 311, it is preferable to use a semiconductor substrate (for example, a single crystal substrate or a silicon substrate).

[0534] 27C, the upper surface and the side surface in the channel width direction of the semiconductor region 313 of the transistor 300 are covered with a conductor 316 via an insulator 315. By forming the transistor 300 as a fin type in this manner, the effective channel width is increased, thereby improving the on-characteristics of the transistor 300. In addition, the contribution of the electric field of the gate electrode can be increased, thereby improving the off-characteristics of the transistor 300.

[0535] The transistor 300 may be either a p-channel type or an n-channel type.

[0536] The region where the channel of the semiconductor region 313 is formed, the region nearby, the low resistance region 314a which becomes the source region or the drain region, and the low resistance region 314b preferably contain a semiconductor such as a silicon-based semiconductor, and preferably contain single crystal silicon. Alternatively, they may be formed of a material having Ge (germanium), SiGe (silicon germanium), GaAs (gallium arsenide), GaAlAs (gallium aluminum arsenide), GaN (gallium nitride), or the like. A configuration using silicon in which the effective mass is controlled by applying stress to the crystal lattice and changing the lattice spacing may be used. Alternatively, the transistor 300 may be a HEMT (High Electron Mobility Transistor) by using GaAs and GaAlAs, or the like.

[0537] The low resistance region 314a and the low resistance region 314b contain, in addition to the semiconductor material applied to the semiconductor region 313, an element that imparts n-type conductivity, such as arsenic or phosphorus, or an element that imparts p-type conductivity, such as boron.

[0538] The conductor 316 functioning as the gate electrode can be made of a conductive material such as a semiconductor material, such as silicon, containing an element that imparts n-type conductivity, such as arsenic or phosphorus, or an element that imparts p-type conductivity, such as boron, a metal material, an alloy material, or a metal oxide material.

[0539] Since the work function is determined by the material of the conductor, the threshold voltage of the transistor can be adjusted by selecting the material of the conductor. Specifically, it is preferable to use materials such as titanium nitride and tantalum nitride for the conductor. Furthermore, in order to achieve both electrical conductivity and embeddability, it is preferable to use metal materials such as tungsten and aluminum as the conductor in a laminated state, and in particular, it is preferable to use tungsten in terms of heat resistance.

[0540] 25 is just an example and is not limited to the structure, and an appropriate transistor may be used depending on the circuit configuration, driving method, and the like. For example, when the semiconductor device is a unipolar circuit including only OS transistors, the structure of the transistor 300 may be similar to that of a transistor 500 including an oxide semiconductor, as shown in FIG 26. Details of the transistor 500 will be described later.

[0541] An insulator 320, an insulator 322, an insulator 324, and an insulator 326 are stacked in this order over the transistor 300.

[0542] As the insulators 320, 322, 324, and 326, for example, silicon oxide, silicon oxynitride, silicon nitride oxide, silicon nitride, aluminum oxide, aluminum oxynitride, aluminum nitride oxide, aluminum nitride, or the like can be used.

[0543] In this specification, silicon oxynitride refers to a material having a higher oxygen content than nitrogen, silicon nitride oxide refers to a material having a higher nitrogen content than oxygen, aluminum oxynitride refers to a material having a higher oxygen content than nitrogen, and aluminum nitride oxide refers to a material having a higher nitrogen content than oxygen.

[0544] The insulator 322 may function as a planarizing film that planarizes steps caused by the transistor 300 provided thereunder. For example, the top surface of the insulator 322 may be planarized by a planarization process using a chemical mechanical polishing (CMP) method or the like to improve the planarity.

[0545] The insulator 324 is preferably a film having a barrier property that prevents hydrogen, impurities, and the like from diffusing from the substrate 311 or the transistor 300 to a region where the transistor 500 is provided.

[0546] As an example of a film having a barrier property against hydrogen, for example, silicon nitride formed by a CVD method can be used. Here, when hydrogen diffuses into a semiconductor element having an oxide semiconductor such as the transistor 500, the characteristics of the semiconductor element may deteriorate. Therefore, it is preferable to use a film that suppresses the diffusion of hydrogen between the transistor 500 and the transistor 300. Specifically, the film that suppresses the diffusion of hydrogen is a film that releases a small amount of hydrogen.

[0547] The amount of desorption of hydrogen can be analyzed, for example, by using thermal desorption spectrometry (TDS). For example, the amount of desorption of hydrogen from the insulator 324 is calculated as 10×10 per area of ​​the insulator 324 when the surface temperature of the film is in the range of 50° C. to 500° C. in the TDS analysis. 15 atoms / cm 2 Less than or equal to 5×10 15 atoms / cm 2 The following is acceptable.

[0548] The insulator 326 preferably has a lower dielectric constant than the insulator 324. For example, the relative dielectric constant of the insulator 326 is preferably less than 4, and more preferably less than 3. For example, the relative dielectric constant of the insulator 326 is preferably 0.7 times or less, and more preferably 0.6 times or less, the relative dielectric constant of the insulator 324. By using a material with a low dielectric constant as the interlayer film, the parasitic capacitance generated between wirings can be reduced.

[0549] A conductor 328, a conductor 330, and the like that connect to the capacitor 600 or the transistor 500 are embedded in the insulator 320, the insulator 322, the insulator 324, and the insulator 326. The conductor 328 and the conductor 330 function as a plug or a wiring. In addition, a plurality of conductors that function as a plug or a wiring may be collectively given the same reference symbol. In this specification and the like, a wiring and a plug connected to the wiring may be integrated. That is, there are cases where a part of a conductor functions as a wiring and a case where a part of a conductor functions as a plug.

[0550] As the material for each plug and wiring (conductor 328, conductor 330, etc.), a conductive material such as a metal material, an alloy material, a metal nitride material, or a metal oxide material can be used in a single layer or a laminated layer. It is preferable to use a high melting point material such as tungsten or molybdenum that has both heat resistance and conductivity, and it is preferable to use tungsten. Alternatively, it is preferable to form the wiring from a low resistance conductive material such as aluminum or copper. By using a low resistance conductive material, it is possible to reduce the wiring resistance.

[0551] A wiring layer may be provided over the insulator 326 and the conductor 330. For example, in FIG. 25 , an insulator 350, an insulator 352, and an insulator 354 are stacked in this order. A conductor 356 is formed in the insulator 350, the insulator 352, and the insulator 354. The conductor 356 functions as a plug or a wiring connected to the transistor 300. Note that the conductor 356 can be provided using a material similar to that of the conductor 328 and the conductor 330.

[0552] Note that, for example, the insulator 350 is preferably an insulator having a barrier property against hydrogen, similar to the insulator 324. The conductor 356 preferably includes a conductor having a barrier property against hydrogen. In particular, a conductor having a barrier property against hydrogen is formed in an opening of the insulator 350 having a barrier property against hydrogen. With this structure, the transistor 300 and the transistor 500 can be separated by a barrier layer, and diffusion of hydrogen from the transistor 300 to the transistor 500 can be suppressed.

[0553] Note that, for example, tantalum nitride or the like may be used as the conductor having a barrier property against hydrogen. By stacking tantalum nitride and tungsten having high conductivity, it is possible to suppress diffusion of hydrogen from the transistor 300 while maintaining the conductivity of the wiring. In this case, a structure in which the tantalum nitride layer having a barrier property against hydrogen is in contact with the insulator 350 having a barrier property against hydrogen is preferable.

[0554] A wiring layer may be provided over the insulator 354 and the conductor 356. For example, in FIG. 25, an insulator 360, an insulator 362, and an insulator 364 are stacked in this order. A conductor 366 is formed in the insulator 360, the insulator 362, and the insulator 364. The conductor 366 functions as a plug or a wiring. The conductor 366 can be provided using a material similar to that of the conductor 328 and the conductor 330.

[0555] Note that, for example, the insulator 360 is preferably an insulator having a barrier property against hydrogen, similar to the insulator 324. The conductor 366 preferably includes a conductor having a barrier property against hydrogen. In particular, a conductor having a barrier property against hydrogen is formed in an opening of the insulator 360 having a barrier property against hydrogen. With this structure, the transistor 300 and the transistor 500 can be separated by a barrier layer, and diffusion of hydrogen from the transistor 300 to the transistor 500 can be suppressed.

[0556] Moreover, a wiring layer (not shown) may be provided over the insulator 364 and the conductor 366.

[0557] Although the above describes the wiring layer including the conductor 356 and the wiring layer including the conductor 366, the semiconductor device according to this embodiment is not limited to this. There may be one or less wiring layers similar to the wiring layer including the conductor 356, or there may be three or more wiring layers similar to the wiring layer including the conductor 356. Furthermore, there may be two or more wiring layers similar to the wiring layer including the conductor 366.

[0558] An insulator 510, an insulator 512, an insulator 514, and an insulator 516 are stacked in this order over the insulator 364. Any of the insulator 510, the insulator 512, the insulator 514, and the insulator 516 is preferably made of a substance that has a barrier property against oxygen, hydrogen, and the like.

[0559] For example, the insulator 510 and the insulator 514 are preferably formed using a film having a barrier property that prevents hydrogen, impurities, and the like from diffusing from the substrate 311 or a region where the transistor 300 is provided to a region where the transistor 500 is provided. Therefore, a material similar to that of the insulator 324 can be used.

[0560] As an example of a film having a barrier property against hydrogen, silicon nitride formed by a CVD method can be used. Here, when hydrogen diffuses into a semiconductor element having an oxide semiconductor such as the transistor 500, the characteristics of the semiconductor element may deteriorate. Therefore, it is preferable to use a film that suppresses the diffusion of hydrogen between the transistor 500 and the transistor 300. Specifically, the film that suppresses the diffusion of hydrogen is a film that releases a small amount of hydrogen.

[0561] As a film having a barrier property against hydrogen, for example, the insulator 510 and the insulator 514 are preferably made of a metal oxide such as aluminum oxide, hafnium oxide, or tantalum oxide.

[0562] In particular, aluminum oxide has a high blocking effect of preventing the film from permeating both oxygen and impurities such as hydrogen and moisture, which are factors that cause fluctuations in the electrical characteristics of a transistor. Therefore, aluminum oxide can prevent impurities such as hydrogen and moisture from entering the transistor 500 during and after the transistor manufacturing process. In addition, aluminum oxide can suppress the release of oxygen from the oxide that constitutes the transistor 500. Therefore, aluminum oxide is suitable for use as a protective film for the transistor 500.

[0563] For example, the insulator 512 and the insulator 516 can be formed using a material similar to that of the insulator 320. By using a material with a relatively low dielectric constant for these insulators, parasitic capacitance between wirings can be reduced. For example, the insulator 512 and the insulator 516 can be formed using a silicon oxide film, a silicon oxynitride film, or the like.

[0564] A conductor 518, a conductor constituting the transistor 500 (for example, the conductor 503), and the like are embedded in the insulator 510, the insulator 512, the insulator 514, and the insulator 516. Note that the conductor 518 functions as a plug or a wiring connected to the capacitor 600 or the transistor 300. The conductor 518 can be formed using a material similar to that of the conductor 328 and the conductor 330.

[0565] In particular, the insulator 510 and the conductor 518 in the region in contact with the insulator 514 are preferably conductors having barrier properties against oxygen, hydrogen, and water. With this structure, the transistors 300 and 500 can be separated by a layer having barrier properties against oxygen, hydrogen, and water, and diffusion of hydrogen from the transistor 300 to the transistor 500 can be suppressed.

[0566] Above the insulator 516 is a transistor 500 .

[0567] As shown in Figures 27A and 27B, a transistor 500 has a conductor 503 arranged so as to be embedded in an insulator 514 and an insulator 516, an insulator 520 arranged on the insulator 516 and the conductor 503, an insulator 522 arranged on the insulator 520, an insulator 524 arranged on the insulator 522, an oxide 530a arranged on the insulator 524, an oxide 530b arranged on the oxide 530a, conductors 542a and 542b arranged apart from each other on the oxide 530b, an insulator 580 arranged on the conductors 542a and 542b and having an opening formed therein overlapping between the conductors 542a and 542b, an oxide 530c arranged on the bottom and side surfaces of the opening, an insulator 550 arranged on the formation surface of the oxide 530c, and a conductor 560 arranged on the formation surface of the insulator 550. In this specification, conductor 542a and conductor 542b are collectively referred to as conductor 542.

[0568] 27A and 27B, it is preferable that an insulator 544 is disposed between the oxide 530a, the oxide 530b, the conductor 542a, and the conductor 542b and the insulator 580. It is preferable that the conductor 560 has a conductor 560a provided inside the insulator 550 and a conductor 560b provided so as to be embedded inside the conductor 560a, as shown in FIGS. 27A and 27B. It is preferable that an insulator 574 is disposed on the insulator 580, the conductor 560, and the insulator 550, as shown in FIGS. 27A and 27B.

[0569] In the following, oxide 530a, oxide 530b, and oxide 530c may be collectively referred to as oxide 530.

[0570] Note that in the transistor 500, a three-layer structure of the oxide 530a, the oxide 530b, and the oxide 530c is illustrated in a region where a channel is formed and in the vicinity thereof; however, one embodiment of the present invention is not limited thereto. For example, a single layer of the oxide 530b, a two-layer structure of the oxide 530b and the oxide 530a, a two-layer structure of the oxide 530b and the oxide 530c, or a stacked structure of four or more layers may be provided. In addition, in the transistor 500, the conductor 560 is illustrated as having a two-layer structure; however, one embodiment of the present invention is not limited thereto. For example, the conductor 560 may have a single-layer structure or a stacked structure of three or more layers. The transistor 500 illustrated in FIGS. 25, 27A, and 27B is merely an example, and the present invention is not limited thereto. An appropriate transistor may be used depending on the circuit configuration, the driving method, and the like.

[0571] Here, the conductor 560 functions as a gate electrode of the transistor, and the conductors 542a and 542b function as a source electrode and a drain electrode, respectively. As described above, the conductor 560 is formed so as to be embedded in the opening of the insulator 580 and in the region sandwiched between the conductors 542a and 542b. The arrangement of the conductors 560, 542a, and 542b is selected in a self-aligned manner with respect to the opening of the insulator 580. That is, in the transistor 500, the gate electrode can be arranged in a self-aligned manner between the source electrode and the drain electrode. Therefore, the conductor 560 can be formed without providing a margin for alignment, so that the area occupied by the transistor 500 can be reduced. This allows the semiconductor device to be miniaturized and highly integrated.

[0572] Furthermore, since the conductor 560 is formed in a self-aligned manner in the region between the conductor 542a and the conductor 542b, the conductor 560 does not have a region overlapping with the conductor 542a or the conductor 542b. This makes it possible to reduce the parasitic capacitance formed between the conductor 560 and the conductor 542a and between the conductor 560 and the conductor 542b. As a result, the switching speed of the transistor 500 can be improved, and high frequency characteristics can be achieved.

[0573] The conductor 560 may function as a first gate (also referred to as a top gate) electrode. The conductor 503 may function as a second gate (also referred to as a bottom gate) electrode. In this case, the threshold voltage of the transistor 500 can be controlled by changing the potential applied to the conductor 503 independently of the potential applied to the conductor 560. In particular, by applying a negative potential to the conductor 503, the threshold voltage of the transistor 500 can be increased and the off-current can be reduced. Therefore, the drain current when the potential applied to the conductor 560 is 0 V can be made smaller by applying a negative potential to the conductor 503 than by not applying a negative potential.

[0574] The conductor 503 is disposed so as to overlap the oxide 530 and the conductor 560. In this manner, when a potential is applied to the conductor 560 and the conductor 503, an electric field generated from the conductor 560 and an electric field generated from the conductor 503 are connected, and a channel formation region formed in the oxide 530 can be covered. In this specification and the like, a transistor structure in which a channel formation region is electrically surrounded by the electric fields of the first gate electrode and the second gate electrode is referred to as a surrounded channel (S-channel) structure.

[0575] The conductor 503 has a structure similar to that of the conductor 518, and the conductor 503a is formed in contact with the inner walls of the openings of the insulator 514 and the insulator 516, and the conductor 503b is formed further inward. Note that although the transistor 500 has a structure in which the conductor 503a and the conductor 503b are stacked, one embodiment of the present invention is not limited to this. For example, the conductor 503 may have a single layer structure or a stacked structure of three or more layers.

[0576] Here, the conductor 503a is preferably made of a conductive material having a function of suppressing the diffusion of impurities such as hydrogen atoms, hydrogen molecules, water molecules, and copper atoms (through which the above impurities are difficult to permeate). Alternatively, it is preferable to use a conductive material having a function of suppressing the diffusion of oxygen (for example, at least one of oxygen atoms, oxygen molecules, etc.) (through which the above oxygen is difficult to permeate). Note that in this specification, the function of suppressing the diffusion of impurities or oxygen refers to the function of suppressing the diffusion of any one or all of the above impurities and / or oxygen.

[0577] For example, the conductor 503a has a function of suppressing the diffusion of oxygen, so that the conductor 503b can be prevented from being oxidized and the conductivity from decreasing.

[0578] In addition, when the conductor 503 also functions as a wiring, it is preferable that the conductor 503b is made of a highly conductive material mainly composed of tungsten, copper, or aluminum. In addition, when the conductivity of the wiring can be maintained high, the conductor 503a is not necessarily provided. Although the conductor 503b is illustrated as a single layer, it may have a laminated structure, for example, a laminate of titanium or titanium nitride and the above-mentioned conductive material.

[0579] The insulators 520, 522, and 524 function as a second gate insulating film.

[0580] Here, the insulator 524 in contact with the oxide 530 preferably contains more oxygen than the oxygen required for the stoichiometric composition. That is, an excess oxygen region is preferably formed in the insulator 524. By providing such an insulator containing excess oxygen in contact with the oxide 530, oxygen vacancies in the oxide 530 can be reduced and the reliability of the transistor 500 can be improved.

[0581] Specifically, it is preferable to use an oxide material from which some oxygen is released by heating as an insulator having an excess oxygen region. An oxide material from which oxygen is released by heating is an oxide material from which the amount of released oxygen converted into oxygen atoms is 1.0×10 18 atoms / cm 3 More than 1.0×10 19 atoms / cm 3 More preferably, 2.0×10 19 atoms / cm 3 or more than 3.0 x 10 20 atoms / cm 3 The oxide film is one having the above-mentioned properties. The surface temperature of the film during the TDS analysis is preferably in the range of 100° C. or higher and 700° C. or lower, or 100° C. or higher and 400° C. or lower.

[0582] In addition, the oxide 530 may be brought into contact with the insulator having the excess oxygen region and subjected to one or more of heat treatment, microwave treatment, and RF treatment. By carrying out such treatment, water or hydrogen in the oxide 530 can be removed. For example, a reaction occurs in the oxide 530 that breaks the bond of VoH, in other words, "V O H→V O The reaction "+H" occurs, and hydrogen is dehydrogenated. Some of the hydrogen generated at this time combines with oxygen to form H 2 The hydrogen may be removed as O from the oxide 530 or from an insulator near the oxide 530. In addition, some of the hydrogen may be diffused or captured (also called gettered) in the conductor 542a and the conductor 542b.

[0583] Moreover, the microwave treatment is preferably carried out using, for example, an apparatus having a power source for generating high-density plasma, or an apparatus having a power source for applying RF to the substrate side. For example, high-density oxygen radicals can be generated by using a gas containing oxygen and high-density plasma, and by applying RF to the substrate side, the oxygen radicals generated by the high-density plasma can be efficiently introduced into the oxide 530 or an insulator in the vicinity of the oxide 530. The microwave treatment may be carried out under a pressure of 133 Pa or more, preferably 200 Pa or more, and more preferably 400 Pa or more. For example, oxygen and argon are used as gases to be introduced into the apparatus for carrying out the microwave treatment, and the oxygen flow ratio (O 2 / (O 2 +Ar)) is set to 50% or less, preferably 10% or more and 30% or less.

[0584] In addition, in a manufacturing process of the transistor 500, it is preferable to perform heat treatment while the surface of the oxide 530 is exposed. The heat treatment may be performed, for example, at a temperature of 100° C. or higher and 450° C. or lower, more preferably 350° C. or higher and 400° C. or lower. Note that the heat treatment is performed in an atmosphere of nitrogen gas or an inert gas, or an atmosphere containing an oxidizing gas at 10 ppm or higher, 1% or higher, or 10% or higher. For example, the heat treatment is preferably performed in an oxygen atmosphere. In this way, oxygen is supplied to the oxide 530 to reduce oxygen deficiencies (V O ) can be reduced. The heat treatment may be performed under reduced pressure. Alternatively, the heat treatment may be performed in an atmosphere containing 10 ppm or more, 1% or more, or 10% or more of an oxidizing gas in order to compensate for the desorbed oxygen after the heat treatment in a nitrogen gas or inert gas atmosphere. Alternatively, the heat treatment may be performed in an atmosphere containing 10 ppm or more, 1% or more, or 10% or more of an oxidizing gas in order to compensate for the desorbed oxygen. Alternatively, the heat treatment may be performed in an atmosphere containing 10 ppm or more, 1% or more, or 10% or more of an oxidizing gas in succession to a heat treatment in a nitrogen gas or inert gas atmosphere.

[0585] In addition, by subjecting the oxide 530 to an oxygen supplying treatment, the oxygen vacancies in the oxide 530 are repaired by the supplied oxygen. In other words, O Furthermore, the reaction of the hydrogen remaining in the oxide 530 with the supplied oxygen can be promoted to convert the hydrogen into H 2 O. This causes the hydrogen remaining in the oxide 530 to recombine with the oxygen vacancies and form V. O The formation of H can be suppressed.

[0586] Furthermore, when the insulator 524 has an excess oxygen region, it is preferable that the insulator 522 has a function of suppressing the diffusion of oxygen (eg, oxygen atoms, oxygen molecules, etc.) (the oxygen is less likely to permeate).

[0587] The insulator 522 preferably has a function of suppressing diffusion of oxygen and impurities, so that oxygen contained in the oxide 530 does not diffuse toward the insulator 520. Furthermore, reaction of the conductor 503 with oxygen contained in the insulator 524, the oxide 530, and the like can be suppressed.

[0588] The insulator 522 may be, for example, aluminum oxide, hafnium oxide, an oxide containing aluminum and hafnium (hafnium aluminate), tantalum oxide, zirconium oxide, lead zirconate titanate (PZT), strontium titanate (SrTiO 3 ), or (Ba,Sr)TiO 3 It is preferable to use an insulator containing a so-called high-k material such as (BST) in a single layer or a multilayer structure. As transistors become smaller and more highly integrated, problems such as leakage current may occur due to the thinning of the gate insulating film. By using a high-k material as the insulator that functions as the gate insulating film, it is possible to reduce the gate potential during transistor operation while maintaining the physical film thickness.

[0589] In particular, it is preferable to use an insulator containing an oxide of one or both of aluminum and hafnium, which are insulating materials having a function of suppressing the diffusion of impurities and oxygen (the oxygen is unlikely to permeate through them). As an insulator containing an oxide of one or both of aluminum and hafnium, it is preferable to use aluminum oxide, hafnium oxide, an oxide containing aluminum and hafnium (hafnium aluminate), or the like. When the insulator 522 is formed using such a material, the insulator 522 functions as a layer that suppresses release of oxygen from the oxide 530 and the intrusion of impurities such as hydrogen into the oxide 530 from the periphery of the transistor 500.

[0590] Alternatively, for example, aluminum oxide, bismuth oxide, germanium oxide, niobium oxide, silicon oxide, titanium oxide, tungsten oxide, yttrium oxide, or zirconium oxide may be added to these insulators. Alternatively, these insulators may be nitrided. Silicon oxide, silicon oxynitride, or silicon nitride may be stacked on the above insulators.

[0591] In addition, it is preferable that the insulator 520 is thermally stable. For example, silicon oxide and silicon oxynitride are preferable because they are thermally stable. In addition, by combining a high-k insulator with silicon oxide or silicon oxynitride, it is possible to obtain the insulator 520 having a thermally stable laminated structure with a high relative dielectric constant.

[0592] 27A and 27B, the insulator 520, the insulator 522, and the insulator 524 are illustrated as the second gate insulating film having a three-layer stack structure, but the second gate insulating film may have a single layer, a two-layer, or a four or more layer stack structure. In this case, the second gate insulating film is not limited to a stack structure made of the same material, and may be a stack structure made of different materials.

[0593] In the transistor 500, it is preferable to use a metal oxide functioning as an oxide semiconductor for the oxide 530 including the channel formation region. For example, a metal oxide such as In-M-Zn oxide (wherein the element M is one or more selected from aluminum, gallium, yttrium, copper, vanadium, beryllium, boron, titanium, iron, nickel, germanium, zirconium, molybdenum, lanthanum, cerium, neodymium, hafnium, tantalum, tungsten, magnesium, etc.) may be used as the oxide 530. In particular, it is preferable that the In-M-Zn oxide applicable to the oxide 530 is CAAC-OS (C-Axis Aligned Crystalline Oxide Semiconductor) or CAC-OS (Cloud-Aligned Composite Oxide Semiconductor). In addition, In-Ga oxide, In-Zn oxide, In oxide, etc. may be used as the oxide 530.

[0594] In addition, it is preferable to use a metal oxide with a low carrier concentration for the transistor 500. In order to reduce the carrier concentration of the metal oxide, the impurity concentration in the metal oxide may be reduced to reduce the defect state density. In this specification and the like, a low impurity concentration and a low defect state density are referred to as high purity intrinsic or substantially high purity intrinsic. Note that examples of impurities in the metal oxide include hydrogen, nitrogen, alkali metals, alkaline earth metals, iron, nickel, silicon, and the like.

[0595] In particular, hydrogen contained in the metal oxide reacts with oxygen that bonds with the metal atom to form water, which may cause oxygen vacancies in the metal oxide. In addition, when hydrogen enters an oxygen vacancy in the oxide 530, the oxygen vacancy and hydrogen combine to form V O May form H. V O H functions as a donor and may generate electrons as carriers. In addition, some of the hydrogen may bond with oxygen that bonds with metal atoms to generate electrons as carriers. Therefore, a transistor using a metal oxide containing a large amount of hydrogen is likely to have normally-on characteristics. In addition, hydrogen in a metal oxide is easily mobile due to stress such as heat or an electric field, so if a metal oxide contains a large amount of hydrogen, the reliability of the transistor may be deteriorated. In one embodiment of the present invention, V in the oxide 530 O It is preferable to reduce H as much as possible and make it high-purity intrinsic or substantially...

Claims

1. a first circuit, a second circuit, a third circuit, a first cell, a second cell, a first wiring, and a second wiring; the first cell includes a first transistor, a fourth transistor, and a first capacitance; the second cell includes a second transistor, a fifth transistor, and a second capacitance; the third circuit includes a sensor and a third transistor; the first circuit is electrically connected to the first wiring, the second circuit is electrically connected to the second wiring, the third circuit is electrically connected to the second wiring, a first terminal of the first transistor is electrically connected to a first terminal of the fourth transistor and to the first wiring; a gate of the first transistor is electrically connected to a second terminal of the fourth transistor and a first terminal of the first capacitor; a second terminal of the first capacitor electrically connected to the second wiring; a first terminal of the second transistor is electrically connected to a first terminal of the fifth transistor and to the second wiring; a gate of the second transistor is electrically connected to a second terminal of the fifth transistor and a first terminal of the second capacitor; a second terminal of the second capacitor electrically connected to the second wiring; the sensor is electrically connected to a first terminal of the third transistor; a second terminal of the third transistor is electrically connected to the second wiring; the first circuit has a function of causing a first current to flow from the first circuit through the first wiring to the first cell; the second circuit has a function of causing a second current to flow through the second wiring; The sensor has a function of performing sensing and outputting a third current according to a result of the sensing, the third circuit has a function of causing the third current to flow through the second wiring when the third transistor is in an on state; the first cell has a function of setting an amount of a current flowing between a first terminal and a second terminal of the first transistor to an amount of the first current by holding a potential corresponding to the first current at a gate of the first transistor; the second cell has a function of setting an amount of current flowing between a first terminal and a second terminal of the second transistor to an amount of current flowing through the second wiring by holding a potential corresponding to a current flowing through the second wiring at a gate of the second transistor; Semiconductor device.

2. In claim 1, the second circuit has a function of causing the second current to flow from the second circuit through the second wiring to a first terminal of the second transistor when the third transistor is in an off state, and applying a first potential according to an amount of the second current to each of the second terminal of the first capacitance and the second terminal of the second capacitance from the second circuit through the second wiring; the third circuit has a function of changing the first potential applied to each of the second terminal of the first capacitance and the second terminal of the second capacitance to a second potential by turning on the third transistor and causing the third current to flow from the third circuit to the second wiring; the first cell has a function of changing an amount of the first current flowing between a first terminal and a second terminal of the first transistor to an amount of a fourth current corresponding to a difference between the first potential and the second potential when the third transistor is switched from an off state to an on state; the amount of the first current and the amount of the fourth current are in a range of a current that flows when the first transistor operates in a subthreshold region, the amount of the second current, the amount of the third current, and the sum of the amount of the second current and the amount of the third current are within a range of a current that flows when the second transistor operates in a subthreshold region; Semiconductor device.

3. In claim 1 or claim 2, each of the first transistor, the second transistor, the fourth transistor, and the fifth transistor has a metal oxide in a channel formation region; Semiconductor device.

4. In any one of claims 1 to 3, the first circuit includes a sixth transistor and a seventh transistor; the seventh transistor has a first gate and a second gate; a first terminal of the sixth transistor is electrically connected to the first wiring; a second terminal of the sixth transistor is electrically connected to a first terminal of the seventh transistor, the first gate of the seventh transistor, and the second gate of the seventh transistor. Semiconductor device.

5. In claim 4, each of the sixth transistor and the seventh transistor has a metal oxide in a channel formation region; Semiconductor device.

6. In any one of claims 1 to 5, The sensor includes a photodiode. Semiconductor device.

7. A semiconductor device according to any one of claims 1 to 6, and a housing, A multiply-and-accumulate operation is performed by the semiconductor device. electronic equipment.

Citation Information

Patent Citations

  • Electronic device

    JP2016219011A

  • Semiconductor device, electronic component, electronic equipment, and driving method of semiconductor device

    JP2019046374A

  • Semiconductor device, electronic device, and video image distribution system

    JP2019053670A