Semiconductor Device

A stacked semiconductor device configuration with metal oxide and silicon transistors addresses the challenges of miniaturization, power consumption, and heat generation by using OS transistors for efficient data storage and processing, particularly in AI technology accelerators.

JP7581209B2Active Publication Date: 2024-11-12SEMICON ENERGY LAB CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2021538510
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-05-19
Filing Date
2020-07-27
Publication Date
2024-11-12
Estimated Expiration
2040-07-27

AI Technical Summary

Technical Problem

The challenge of miniaturizing semiconductor devices is exacerbated by the increased number of transistors required for storing ternary data in SRAM and the high power consumption due to data transfers, particularly in accelerators with memory cells configured for binary or ternary data switching, leading to heat generation issues.

Method used

The use of a stacked configuration of semiconductor devices with metal oxide and silicon transistors, including a memory circuit with OS transistors for non-volatile memory and a CPU core with a flip-flop backup circuit, enables efficient data storage and processing, reducing the number of transistors and data transfers while minimizing power consumption and heat generation.

Benefits of technology

This configuration allows for the miniaturization of semiconductor devices, reduces power consumption, and suppresses heat generation, while enabling parallel processing with low power consumption, particularly suitable for AI technology accelerators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007581209000010
    Figure 0007581209000010
  • Figure 0007581209000011
    Figure 0007581209000011
  • Figure 0007581209000012
    Figure 0007581209000012
Patent Text Reader

Abstract

The present invention provides a semiconductor device with a novel structure. The present invention has a CPU and an accelerator. The accelerator has a first memory circuit and a computation circuit. The first memory circuit has a first transistor. The first transistor has a semiconductor layer containing a metal oxide in a channel formation region. The computation circuit has a second transistor. The second transistor has a semiconductor layer containing silicon in a channel formation region. The first transistor and the seond transistor are provided so as to be stacked. The CPU has a CPU core having a flip-flop provided with a backup circuit. The backup circuit has a third transistor. The third transistor has a semiconductor layer having a metal oxide in a channel formation region.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This specification describes semiconductor devices and the like.

[0002] Note that one embodiment of the present invention is not limited to the above technical field. Examples of the technical field of one embodiment of the present invention disclosed in this specification and the like include a semiconductor device, an imaging device, a display device, a light-emitting device, a power storage device, a memory device, a display system, an electronic device, a lighting device, an input device, an input / output device, a driving method thereof, or a manufacturing method thereof. [Background technology]

[0003] Electronic devices having semiconductor devices including a CPU (Central Processing Unit) and the like are in widespread use. In order to process a large amount of data at high speed in such electronic devices, there has been active technological development to improve the performance of the semiconductor devices. One technology that achieves high performance is, for example, the so-called SoC (System on Chip) in which an accelerator such as a GPU (Graphics Processing Unit) is tightly coupled with a CPU. In a semiconductor device with high performance due to the SoC, heat generation and increased power consumption become problems.

[0004] In AI (Artificial Intelligence) technology, the amount of calculations and the number of parameters are enormous, so the amount of calculations increases. Since the increase in the amount of calculations causes an increase in heat generation and power consumption, architectures for reducing the amount of calculations have been actively proposed. Representative architectures include Binary Neural Network (BNN) and Ternary Neural Network (TNN), which are particularly effective for reducing circuit size and power consumption (see, for example, Patent Document 1). For example, in BNN, data originally expressed with 32-bit or 16-bit precision is compressed into two values, "+1" or "-1", so the amount of calculations and the number of parameters can be significantly reduced. For example, in TNN, data originally expressed with 32-bit or 16-bit precision is compressed into three values, "+1", "0", or "-1", so the amount of calculations and the number of parameters can be significantly reduced. Since BNN and TNN are effective for reducing circuit size and power consumption, they are considered to be compatible with applications that require low power consumption in limited hardware resources such as embedded chips. [Prior art documents] [Patent documents]

[0005] [Patent Document 1] International Publication No. 2019 / 078924 Summary of the Invention [Problem to be solved by the invention]

[0006] Ternary data is used for the calculation of the TNN. When ternary data is stored in an SRAM (Static RAM), the number of transistors in a memory cell increases. This may make it difficult to miniaturize the semiconductor device. In addition, in an accelerator included in a semiconductor device, the data stored in the memory may be switched between binary and ternary data. In this case, in a configuration in which memory cells are prepared according to the data, the number of transistors in the memory cell increases. This may make it difficult to miniaturize the semiconductor device. In addition, the power consumption of a semiconductor device is dominated by the number of data transfers in the CPU. Therefore, in order to reduce the power consumption or suppress heat generation of a semiconductor device, it is important to suppress an increase in the number of data transfers.

[0007] An object of one embodiment of the present invention is to miniaturize a semiconductor device.An object of one embodiment of the present invention is to reduce the power consumption of a semiconductor device.An object of one embodiment of the present invention is to suppress heat generation from a semiconductor device.An object of one embodiment of the present invention is to reduce the number of data transfers between a CPU and a semiconductor device functioning as a memory.An object of one embodiment of the present invention is to provide a semiconductor device having a novel structure.

[0008] Note that one embodiment of the present invention does not necessarily have to solve all of the above problems, but only needs to solve at least one of the problems. Furthermore, the description of the above problems does not preclude the existence of other problems. Problems other than these will become apparent from the description in the specification, claims, drawings, etc., and other problems can be extracted from the description in the specification, claims, drawings, etc. [Means for solving the problem]

[0009] One embodiment of the present invention is a semiconductor device including a CPU and an accelerator. The accelerator includes a first memory circuit and an arithmetic circuit. The first memory circuit includes a first transistor. The first transistor has a semiconductor layer having a metal oxide in a channel formation region. The arithmetic circuit includes a second transistor. The second transistor has a semiconductor layer having silicon in a channel formation region. The first transistor and the second transistor are stacked.

[0010] One embodiment of the present invention is a semiconductor device including a CPU and an accelerator, the accelerator including a first memory circuit, a driver circuit, and an arithmetic circuit, the first memory circuit including a first transistor, the first transistor including a semiconductor layer having a metal oxide in a channel formation region, the driver circuit including a write circuit and a read circuit, the write circuit having a function of switching data to be written to the first memory circuit to a binary or ternary voltage value and outputting the data in response to a switch signal, a write control signal, and a data signal, the read circuit having a function of switching and reading out binary or ternary data corresponding to a voltage level held in the first memory circuit in response to a first reference voltage and a second reference voltage, the driver circuit and the arithmetic circuit including a second transistor, the second transistor including a semiconductor layer having silicon in a channel formation region, and the first transistor and the second transistor being stacked.

[0011] One embodiment of the present invention is a semiconductor device including a CPU and an accelerator. The accelerator includes a first memory circuit and an arithmetic circuit. The first memory circuit includes a first transistor. The first transistor has a semiconductor layer having a metal oxide in a channel formation region. The arithmetic circuit includes a second transistor. The second transistor has a semiconductor layer having silicon in a channel formation region. The CPU includes a CPU core including a flip-flop provided with a backup circuit. The backup circuit includes a third transistor. The third transistor has a semiconductor layer having a metal oxide in a channel formation region. The first transistor and the second transistor are stacked.

[0012] One embodiment of the present invention is a semiconductor device including a CPU and an accelerator. The accelerator includes a first memory circuit, a driver circuit, and an arithmetic circuit. The first memory circuit includes a first transistor. The first transistor has a semiconductor layer having a metal oxide in a channel formation region. The driver circuit includes a write circuit and a read circuit. The write circuit has a function of switching data to be written to the first memory circuit to a binary or ternary voltage value and outputting the data in response to a switch signal, a write control signal, and a data signal. The read circuit has a function of switching and reading out binary or ternary data corresponding to a voltage level held in the first memory circuit in response to a first reference voltage and a second reference voltage. The arithmetic circuit includes a second transistor. The second transistor has a semiconductor layer having silicon in a channel formation region. The CPU includes a CPU core having a flip-flop provided with a backup circuit. The backup circuit includes a third transistor. The third transistor has a semiconductor layer having a metal oxide in a channel formation region. The first transistor and the second transistor are stacked.

[0013] In one embodiment of the present invention, the backup circuit is preferably a semiconductor device having a function of holding data held in a flip-flop in a state in which the supply of power supply voltage is stopped while the CPU is not operating.

[0014] In one embodiment of the present invention, the semiconductor device is preferably a circuit that performs a product-sum operation as the arithmetic circuit.

[0015] In one embodiment of the present invention, the metal oxide preferably contains In, Ga, and Zn.

[0016] In one aspect of the present invention, the semiconductor device is preferably such that the first transistor is electrically connected to a read bit line, and the read bit line is electrically connected to an arithmetic circuit via a wiring provided approximately perpendicular to a substrate surface on which the second transistor is provided.

[0017] Other aspects of the present invention will be described in the following embodiment and in the drawings. Effect of the Invention

[0018] One embodiment of the present invention can reduce the size of a semiconductor device. Another embodiment of the present invention can reduce the power consumption of a semiconductor device. Another embodiment of the present invention can suppress heat generation from a semiconductor device. Another embodiment of the present invention can reduce the number of data transfers between a CPU and a semiconductor device functioning as a memory. Another embodiment of the present invention can provide a semiconductor device with a novel structure.

[0019] The description of multiple effects does not preclude the existence of other effects. In addition, one embodiment of the present invention does not necessarily have all of the exemplified effects. In addition, problems, effects, and novel features other than those described above regarding one embodiment of the present invention will become apparent from the description and drawings in this specification. [Brief description of the drawings]

[0020] 1A and 1B are diagrams illustrating a configuration example of a semiconductor device. 2A and 2B are diagrams illustrating a configuration example of a semiconductor device. 3A and 3B are diagrams illustrating a configuration example of a semiconductor device. FIG. 4 is a diagram illustrating a configuration example of a semiconductor device. 5A and 5B are diagrams illustrating a configuration example of a semiconductor device. 6A and 6B are diagrams illustrating a configuration example of a semiconductor device. 7A and 7B are diagrams illustrating a configuration example of a semiconductor device. 8A and 8B are diagrams illustrating a configuration example of a semiconductor device. FIG. 9 is a diagram illustrating a configuration example of a semiconductor device. 10A, 10B, and 10C are diagrams illustrating the relationship between the processing performance and power consumption of a semiconductor device. 11A and 11B are diagrams illustrating a configuration example of a semiconductor device. 12A and 12B are diagrams illustrating a configuration example of a semiconductor device. FIG. 13 is a diagram illustrating a configuration example of a semiconductor device. 14A and 14B are diagrams illustrating a configuration example of a semiconductor device. 15A and 15B are diagrams illustrating a configuration example of a semiconductor device. FIG. 16 is a diagram illustrating a configuration example of a semiconductor device. FIG. 17 is a diagram illustrating a configuration example of a semiconductor device. 18A and 18B are diagrams illustrating a configuration example of a semiconductor device. 19A and 19B are diagrams illustrating a configuration example of a semiconductor device. 20A and 20B are diagrams illustrating a configuration example of a semiconductor device. FIG. 21 is a diagram illustrating a configuration example of a semiconductor device. 22A and 22B are diagrams illustrating a configuration example of a semiconductor device. FIG. 23 is a diagram illustrating a configuration example of a semiconductor device. FIG. 24 is a diagram illustrating a configuration example of a semiconductor device. 25A and 25B are diagrams illustrating a configuration example of a semiconductor device. 26A and 26B are diagrams illustrating a configuration example of a semiconductor device. 27A and 27B are diagrams illustrating a configuration example of a semiconductor device. 28A and 28B are diagrams illustrating a configuration example of a semiconductor device. FIG. 29 is a diagram illustrating a configuration example of a semiconductor device. FIG. 30 is a diagram illustrating an example of the configuration of a CPU. 31A and 31B are diagrams for explaining an example of the configuration of a CPU. FIG. 32 is a diagram illustrating an example of the configuration of a CPU. FIG. 33 is a diagram for explaining a configuration example of an integrated circuit. 34A and 34B are diagrams for explaining a configuration example of an integrated circuit. 35A and 35B are diagrams for explaining an application example of an integrated circuit. 36A and 36B are diagrams for explaining an application example of an integrated circuit. 37A, 37B and 37C are diagrams for explaining an application example of an integrated circuit. FIG. 38 is a diagram for explaining an application example of an integrated circuit. Fig. 39A is a photograph showing the external appearance of the semiconductor device, and Fig. 39B is a TEM photograph showing the cross section of the semiconductor device. FIG. 40 is a block diagram illustrating a system configuration of a semiconductor device. Fig. 41A is a circuit diagram of a memory cell, Fig. 41B is a timing chart showing an example of the operation of the memory cell, and Fig. 41C is a block diagram showing the configuration of a computing unit. 42A and 42B are block diagrams illustrating a configuration of a semiconductor device. 43A and 43B are conceptual diagrams illustrating the transition of power consumption occurring during the operation period of a semiconductor device. 44A and 44B are circuit diagrams of an information retention circuit. Fig. 45A is a diagram showing operational waveforms after the execution of a simulation, and Fig. 45B is a diagram showing a neural network model assumed in the simulation. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0021] The following describes an embodiment of the present invention. However, one embodiment of the present invention is not limited to the following description, and it will be easily understood by those skilled in the art that the embodiment and details can be modified in various ways without departing from the spirit and scope of the present invention. Therefore, one embodiment of the present invention should not be interpreted as being limited to the description of the embodiment shown below.

[0022] 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. For example, a component referred to as "first" in one embodiment of this specification may be omitted in another embodiment or in the claims.

[0023] In the drawings, the same elements or elements having similar functions, elements made of the same material, or elements formed at the same time may be given the same reference numerals, and repeated description thereof may be omitted.

[0024] In this specification, for example, the power supply potential VDD may be abbreviated to potential VDD, VDD, etc. This also applies to other components (for example, signals, voltages, circuits, elements, electrodes, wiring, etc.).

[0025] Furthermore, when the same reference symbol is used for multiple elements, particularly when it is necessary to distinguish between them, identification symbols such as “_1”, “_2”, "[n]”, "[m,n]”, etc. may be added to the reference symbol. For example, the second wiring GL is written as wiring GL[2].

[0026] (Embodiment 1) The structure, operation, and the like of a semiconductor device according to one embodiment of the present invention will be described.

[0027] In this specification and the like, a semiconductor device refers to any device that can function by utilizing semiconductor characteristics. Semiconductor elements such as transistors, semiconductor circuits, arithmetic devices, and memory devices are all embodiments of semiconductor devices. Display devices (such as liquid crystal display devices and light-emitting display devices), projection devices, lighting devices, electro-optical devices, power storage devices, memory devices, semiconductor circuits, imaging devices, electronic devices, and the like may be considered to include semiconductor devices.

[0028] 1A and 1B are diagrams illustrating a semiconductor device 100 according to one embodiment of the present invention. The semiconductor device 100 includes a CPU 10, an accelerator 20, and a bus 30. The accelerator 20 includes an arithmetic processing unit 21 and a memory unit 22. The arithmetic processing unit 21 includes an arithmetic circuit 23. The memory unit 22 includes a memory circuit 24. The memory unit 22 may be referred to as a device memory or a shared memory. The memory circuit 24 includes a transistor 25 including a semiconductor layer 29 having a channel formation region. The arithmetic circuit 23 and the memory circuit 24 are electrically connected to each other via a wiring 31.

[0029] The CPU 10 has a function of performing general-purpose processing such as executing an operating system, controlling data, and executing various calculations and programs. The CPU 10 has one or more CPU cores. Each CPU core has a data retention circuit that can retain data even if the supply of power supply voltage is stopped. The supply of power supply voltage can be controlled by electrically disconnecting it from a power supply domain using a power switch or the like. The power supply voltage may be called a drive voltage. For example, a memory having a transistor (OS transistor) having an oxide semiconductor in a channel formation region is suitable as the data retention circuit. The oxide semiconductor is also called a metal oxide. The configuration of a CPU core including a data retention circuit having an OS transistor will be described in the fifth embodiment.

[0030] The accelerator 20 has a function of executing a program (also called a kernel or a kernel program) called from a host program. The accelerator 20 can perform, for example, parallel processing of matrix operations in graphic processing, parallel processing of product-sum operations in neural networks, and parallel processing of floating-point operations in scientific and technological calculations.

[0031] The memory unit 22 has a function of storing data to be processed by the accelerator 20. Specifically, the memory unit 22 can store data to be input to or output from the arithmetic processing unit 21, such as weight data used in parallel processing of product-sum operations of a neural network.

[0032] The memory circuit 24 is electrically connected to the arithmetic circuit 23 included in the arithmetic processing unit 21 via wiring 31, and has a function of holding a binary or ternary digital value. In the memory circuit 24, a semiconductor layer 29 included in the transistor 25 is an oxide semiconductor. That is, the transistor 25 is an OS transistor. The memory circuit 24 is preferably a memory including an OS transistor (hereinafter also referred to as an OS memory).

[0033] Since the band gap of metal oxide is 2.5 eV or more, OS transistors have extremely small off-state current. For example, when the voltage between the source and drain is 3.5 V and the temperature is at room temperature (25 °C), the off-state current per 1 μm of channel width is 1 × 10 -20 Less than A, 1×10 -22 Less than A or 1×10 -24 A or less. That is, the on / off current ratio of the drain current can be set to 20 to 150 digits. Therefore, the amount of charge leaked from the retention node through the OS transistor is extremely small. Therefore, the OS memory can function as a non-volatile memory circuit, which enables power gating of the accelerator.

[0034] High-density integrated semiconductor devices may generate heat due to the operation of the circuits. This heat increases the temperature of the transistor, which may change the characteristics of the transistor, causing a change in field-effect mobility and a decrease in operating frequency. OS transistors have higher heat resistance than Si transistors, so that the field-effect mobility is less likely to change due to temperature changes and the operating frequency is less likely to decrease. Furthermore, OS transistors tend to maintain the characteristic that the drain current increases exponentially with respect to the gate-source voltage, even when the temperature rises. Therefore, the use of OS transistors allows stable operation in high temperature environments.

[0035] Metal oxides applicable to OS transistors include Zn oxide, Zn-Sn oxide, Ga-Sn oxide, In-Ga oxide, In-Zn oxide, and In-M-Zn oxide (M is Ti, Ga, Y, Zr, La, Ce, Nd, Sn, or Hf). In particular, metal oxides using Ga as M are preferably used for OS transistors because they can be made into transistors with excellent electrical characteristics such as field effect mobility by adjusting the ratio of elements. In addition, the oxide containing indium and zinc may contain one or more elements selected from aluminum, gallium, yttrium, copper, vanadium, beryllium, boron, silicon, titanium, iron, nickel, germanium, zirconium, molybdenum, lanthanum, cerium, neodymium, hafnium, tantalum, tungsten, magnesium, and the like.

[0036] In order to improve the reliability and electrical characteristics of the OS transistor, the metal oxide applied to the semiconductor layer is preferably a metal oxide having a crystalline part, such as CAAC-OS, CAC-OS, or nc-OS. CAAC-OS is an abbreviation for c-axis-aligned crystalline oxide semiconductor. CAC-OS is an abbreviation for cloud-aligned composite oxide semiconductor. nc-OS is an abbreviation for nanocrystalline oxide semiconductor.

[0037] CAAC-OS has a c-axis orientation and a distorted crystal structure in which multiple nanocrystals are connected in the ab-plane direction. The distortion refers to a location where the lattice orientation changes between a region with a uniform lattice arrangement and a region with a different uniform lattice arrangement in the region where multiple nanocrystals are connected.

[0038] CAC-OS has the function of flowing electrons (or holes) that act as carriers, and the function of not flowing electrons that act as carriers. By separating the function of flowing electrons from the function of not flowing electrons, it is possible to maximize both functions. In other words, by using CAC-OS in the channel formation region of an OS transistor, it is possible to achieve both a high on-current and an extremely low off-current.

[0039] Metal oxides have a large band gap, electrons are less likely to be excited, and the effective mass of holes is large, so that OS transistors are less likely to experience avalanche breakdown and the like compared to general Si transistors. Therefore, for example, hot carrier degradation caused by avalanche breakdown can be suppressed. Suppressing hot carrier degradation allows OS transistors to be driven at a high drain voltage.

[0040] OS transistors are accumulation-type transistors that use electrons as majority carriers. Therefore, they are less susceptible to drain-induced barrier lowering (DIBL), which is one of the short-channel effects, compared to inversion-type transistors (typically, Si transistors) that have a pn junction. In other words, OS transistors have higher resistance to short-channel effects than Si transistors.

[0041] Because OS transistors have high resistance to short channel effects, their channel length can be reduced without degrading their reliability, and so their use can increase the degree of circuit integration. As the channel length is reduced, the drain electric field becomes stronger, but as mentioned above, OS transistors are less susceptible to avalanche breakdown than Si transistors.

[0042] In addition, because OS transistors have high resistance to short channel effects, it is possible to make the gate insulating film thicker than that of Si transistors. For example, even in a minute transistor with a channel length and width of 50 nm or less, it may be possible to provide a thick gate insulating film of about 10 nm. By making the gate insulating film thicker, the parasitic capacitance can be reduced, thereby improving the operating speed of the circuit. Furthermore, by making the gate insulating film thicker, the leakage current through the gate insulating film is reduced, which leads to a reduction in static current consumption.

[0043] As described above, the accelerator 20 can retain data even when the supply of power supply voltage is stopped by having the memory circuit 24, which is an OS memory. This enables power gating of the accelerator 20, and allows a significant reduction in power consumption.

[0044] The memory circuit 24, which is made up of OS transistors, can be stacked with the arithmetic circuit 23, which can be made up of Si CMOS. This allows the arrangement without increasing the circuit area. The memory circuit 24 and the arithmetic circuit 23 are electrically connected to each other via wiring 31 that is provided so as to extend in a direction substantially perpendicular to the surface of the substrate on which the arithmetic circuit 23 is provided. Note that "substantially perpendicular" refers to a state in which they are arranged at an angle of 85 degrees or more and 95 degrees or less.

[0045] The memory circuit 24 may have a NOSRAM circuit configuration. "NOSRAM (registered trademark)" is an abbreviation for "Nonvolatile Oxide Semiconductor RAM." NOSRAM refers to a memory in which the memory cell is a two-transistor type (2T) or three-transistor type (3T) gain cell, and the access transistor is an OS transistor. The current that flows between the source and drain in the off state, that is, the leakage current, is extremely small. NOSRAM can be used as a nonvolatile memory by retaining a charge according to data in the memory circuit using the characteristic of extremely small leakage current. In particular, NOSRAM can read the retained data without destroying it (nondestructive read), so it is suitable for parallel processing of product-sum operations of neural networks, which repeats a large amount of data read operations only.

[0046] The arithmetic processing unit 21 has a function of performing arithmetic processing using digital values. Digital values ​​are not easily affected by noise. Therefore, the accelerator 20 is suitable for performing arithmetic processing that requires highly accurate arithmetic results. The arithmetic processing unit 21 is preferably configured with a Si CMOS, that is, a transistor having silicon in a channel formation region (Si transistor). With this configuration, it can be stacked with an OS transistor.

[0047] The arithmetic circuit 23 has a function of performing any one of processes such as integer arithmetic, single-precision floating-point arithmetic, and double-precision floating-point arithmetic using the digital value data held in each of the memory circuits 24 of the memory unit 22. The arithmetic circuit 23 has a function of repeatedly executing the same process such as a multiply-add operation.

[0048] The arithmetic circuit 23 is configured to be provided for each read bit line of the memory circuit 24, that is, for each column (column) (column-parallel calculation). This configuration allows data for one row (maximum all bit lines) of the memory circuit 24 to be arithmetically processed in parallel. Compared with the multiply-and-accumulate operation using the CPU 10, column-parallel calculation is not limited by the data bus size (32 bits, etc.) between the CPU and the memory, so that the degree of parallelism of the operation can be significantly increased in column-parallel calculation, and the efficiency of calculations related to massive calculation processing such as learning (deep learning) of deep neural networks, which is an AI technology, and scientific and technological calculations that perform floating-point calculations can be improved. In addition, since the calculation of data output from the memory circuit 24 can be completed and read out, the power generated by memory access (data transfer between the CPU and memory and calculations by the CPU) can be reduced, and the increase in heat generation and power consumption can be suppressed. Furthermore, by shortening the physical distance between the arithmetic circuit 23 and the memory circuit 24, for example, by shortening the wiring distance by stacking, the parasitic capacitance generated in the signal line can be reduced, and therefore low power consumption is possible.

[0049] The bus 30 electrically connects the CPU 10 and the accelerator 20. That is, the CPU 10 and the accelerator 20 can transmit data via the bus 30.

[0050] One embodiment of the present invention can reduce the size of a semiconductor device that functions as an accelerator for AI technology or the like, which has a huge amount of calculations and a large number of parameters. Alternatively, one embodiment of the present invention can reduce the power consumption of a semiconductor device that functions as an accelerator for AI technology or the like, which has a huge amount of calculations and a large number of parameters. Alternatively, one embodiment of the present invention can suppress heat generation in a semiconductor device that functions as an accelerator for AI technology or the like, which has a huge amount of calculations and a large number of parameters. Alternatively, one embodiment of the present invention can reduce the number of data transfers between a CPU and a semiconductor device that functions as a memory in a semiconductor device that functions as an accelerator for AI technology or the like, which has a huge amount of calculations and a large number of parameters. In other words, a semiconductor device that functions as an accelerator for AI technology or the like, which has a huge amount of calculations and a large number of parameters, has a non-von Neumann architecture, and can perform parallel processing with extremely low power consumption compared to a von Neumann architecture in which power consumption increases as the processing speed increases.

[0051] Fig. 2A is a diagram for explaining an example of a circuit configuration applicable to the memory section 22 of the semiconductor device 100 of the present invention. Fig. 2A illustrates write word lines WWL_1 to WWL_M, read word lines RWL_1 to RWL_M, write bit lines WBL_1 to WBL_N, and read bit lines RBL_1 to RBL_N arranged in a matrix of M rows and N columns (M and N are natural numbers of 2 or more). Also illustrated is a memory circuit 24 connected to each word line and bit line.

[0052] 2B is a diagram illustrating an example of a circuit configuration applicable to the memory circuit 24. The memory circuit 24 includes a transistor 25, a transistor 26, a transistor 27, and a capacitor 28 (also referred to as a capacitor).

[0053] One of the source or drain of the transistor 25 is connected to the write bit line WBL. The gate of the transistor 25 is connected to the write word line WWL. The other of the source or drain of the transistor 25 is connected to one electrode of the capacitance element 28 and the gate of the transistor 26. One of the source or drain of the transistor 26 and the other electrode of the capacitance element 28 are connected to a wiring that provides a fixed potential, such as a ground potential. The other of the source or drain of the transistor 26 is connected to one of the source or drain of the transistor 27. The gate of the transistor 27 is connected to the read word line RWL. The other of the source or drain of the transistor 27 is connected to the read bit line RBL. As described above, the read bit line RBL is connected to the arithmetic circuit 23 via the wiring 31 or the like that is provided extending in a direction approximately perpendicular to the substrate surface on which the arithmetic circuit 23 is provided.

[0054] The circuit configuration of the memory circuit 24 shown in FIG. 2B corresponds to a NOSRAM of a three-transistor type (3T) gain cell. Transistors 25 to 27 are OS transistors. In the off state, the current flowing between the source and drain of an OS transistor, that is, the leakage current, is extremely small. NOSRAM can be used as a non-volatile memory by using the characteristic of extremely small leakage current to hold charges corresponding to data in the memory circuit.

[0055] 3A is a diagram for explaining a circuit configuration example applicable to the arithmetic processing unit 21 of the semiconductor device 100 of the present invention. The arithmetic processing unit 21 has N arithmetic circuits 23_1 to 23_N. Each of the N arithmetic circuits 23_1 to 23_N receives a signal from any one of N read bit lines RBL_1 to RBL_N, and outputs output signals Q_1 to Q_N. The signals from the read bit lines RBL_1 to RBL_N may be amplified by a sense amplifier or the like and read out. The output signals Q_1 to Q_N correspond to data obtained by performing a product-sum operation using data held in the memory circuit 24.

[0056] Fig. 3B is a diagram for explaining a circuit configuration example of the arithmetic circuit 23 applicable to the arithmetic circuits 23_1 to 23_N. Fig. 4 is a circuit for executing arithmetic processing based on the architecture of a binary neural network (BNN). The arithmetic circuit 23 has a read circuit 41 to which a signal of a read bit line RBL is applied, a bit product-sum calculator 42, an accumulator 43, a latch circuit 44, and an encoding circuit 45 that outputs an output signal Q.

[0057] FIG. 4 shows a detailed configuration example of the arithmetic circuit 23 shown in FIG. 3B. FIG. 4 shows an example of a configuration in which a multiplication and addition operation is performed on 8-bit signals (W[0] to W[7], A[0] to A[7]) and a 1-bit output signal Q and an 11-bit output signal (accout[10:0]) are output. In FIG. 3B, since one row is selected per clock for memory access, M (=1 bit×M rows) products and their sums are executed in M ​​clocks. In the arithmetic circuit of FIG. 4, the same M products and their sums can be executed in 8 parallel×1 bit×M / 8 rows, so M / 8 clocks are required. Therefore, the configuration of FIG. 4 can shorten the calculation time by executing the multiplication and addition operation in parallel, thereby improving the calculation efficiency.

[0058] 4, the bit-wise sum-of-products calculator 42 has an accumulator to which an 8-bit signal (W[0] through W[7], A[0] through A[7]) is input, and an adder to which the value obtained by the accumulator is input. As shown in FIG. 4, the products of 1-bit signals calculated in eight parallel operations are illustrated as WA0 through WA7, their sums as WA10, WA32, WA54, and WA76, and their further sums as WA3210 and WA7654.

[0059] 4, the accumulator 43 functioning as an adder outputs the sum of the signal of the bit sum-of-products calculator 42 and the output signal of the latch circuit 44 to the latch circuit 44. The accumulator 43 switches the signal to be input to the adder according to the control signal TxD_EN. When the control signal TxD_EN is 0 (TxD_EN=0), the accumulator 43 outputs the sum of the signal of the bit sum-of-products calculator 42 and the output signal of the latch circuit 44 to the latch circuit 44. When the control signal TxD_EN is 1 (TxD_EN=1), the accumulator 43 outputs the sum of the signal of the logic circuit 47 (11-bit selector) and the output signal of the latch circuit 44 to the latch circuit 44.

[0060] In FIG. 4, the logic circuit 47, which is composed of AND circuits, adds data for batch normalization after completing the multiplication and accumulation of signals A[0] to A[7] and signals W[0] to W[7]. Specifically, the logic circuit 47 adds signal W[7] while switching with a switching signal (th select[10:0]). Note that data for batch normalization may be configured to be simultaneously read and selected from signals W[0] to W[6] other than signal W[7]. Batch normalization is an operation for adjusting the distribution of output data of each layer in a neural network so that it is constant. For example, image data often used for calculations in a neural network may differ from the distribution of predicted data (input data) because the distribution of data used for learning is prone to variation. Batch normalization can improve the accuracy of learning in a neural network by normalizing the distribution of input data to the intermediate layer of the neural network to a Gaussian distribution with a mean of 0 and a variance of 1. In a Binary Neural Network (BNN), the output results of each layer are binarized by activation, so by suppressing the bias in data distribution relative to a threshold value, it becomes possible to properly activate, i.e., separate information.

[0061] The latch circuit 44 holds the output signal (accout[10:0]) of the accumulator 43. The binary data to be passed to the next layer (NN layer) in the neural network by batch normalization becomes the most significant bit of the product-sum operation result held by the latch circuit 44. In the output signal (accout[10:0]), the most significant bit signal (accout10) represents the sign of the latch data calculated in two's complement, and in order to pass the positive data as 1 and the negative data as 0 to the next NN layer, it is inverted by the inverter circuit 46 functioning as a coding circuit and output as the output signal Q. Since Q is the output of the intermediate layer, it is temporarily held in a buffer memory (also called an input buffer) in the accelerator 20 and then used for the operation of the next layer.

[0062] FIG. 5A illustrates a hierarchical neural network based on the architecture of a binary neural network (BNN). FIG. 5A illustrates a fully connected neural network consisting of a neuron 50, one input layer (I1), three intermediate layers (M1 to M3), and one output layer (O1). If the number of neurons in the input layer I1 is 786, the number of neurons in the intermediate layers M1 to M3 is 256, and the number of neurons in the output layer O1 is 10, the number of connections in each layer (layer 51, layer 52, layer 53, and layer 54) is (784×256)+(256×256)+(256×256)+(256×10), which is a total of 334336. In other words, the weight parameters required for neural network calculations are about 330K bits in total, so that the memory capacity can be sufficiently implemented even in a small-scale system.

[0063] Next, FIG. 5B shows a detailed block diagram of a semiconductor device 100 capable of performing the neural network calculations shown in FIG. 5A.

[0064] FIG. 5B illustrates an example configuration of peripheral circuits for driving each component illustrated in FIG. 1A and FIG. 1B, in addition to the arithmetic processing unit 21, arithmetic circuit 23, memory unit 22, memory circuit 24, and wiring 31 described in FIG. 1A and FIG. 1B.

[0065] 5B shows a controller 61, a row decoder 62, a word line driver 63, a column decoder 64, a write driver 65, a precharge circuit 66, a sense amplifier 67, a selector 68, an input buffer 71 and an arithmetic control circuit 72. In FIG.

[0066] Fig. 6A is a diagram in which blocks for controlling the memory unit 22 are extracted from each configuration shown in Fig. 5B. Fig. 6A extracts and illustrates a controller 61, a row decoder 62, a word line driver 63, a column decoder 64, a write driver 65, a precharge circuit 66, a sense amplifier 67, and a selector 68.

[0067] The controller 61 processes an external input signal to generate control signals for the row decoder 62 and the column decoder 64. The external input signal is a control signal for controlling the memory unit 22, such as a write enable signal or a read enable signal. The controller 61 also inputs and outputs data to be written to the memory unit 22 or data to be read from the memory unit 22, between the controller 61 and the CPU 10 via a bus.

[0068] The row decoder 62 generates a signal for driving the word line driver 63. The word line driver 63 generates a signal to be provided to the write word line WWL and the read word line RWL. The column decoder 64 generates a signal for driving the sense amplifier 67 and the write driver 65. The sense amplifier 67 amplifies the potential of the read bit line RBL. The write driver generates a signal for controlling the read bit line RBL and the write bit line WBL. The precharge circuit 66 has a function of precharging the read bit line RBL and the like. A signal read from the memory circuit 24 of the memory unit 22 can be input to the arithmetic circuit 23 and can also be output via the selector 68. The selector 68 can sequentially read data corresponding to the bus width and output the necessary data to the CPU 10, etc. via the controller 61.

[0069] FIG. 6B is a diagram illustrating blocks that control the arithmetic processing unit 21 extracted from each configuration shown in FIG. 5B.

[0070] The controller 61 processes an input signal from the outside and generates a control signal for the calculation control circuit 72. The controller 61 also generates various signals for controlling the calculation circuit 23 of the calculation processing unit 21. The controller 61 also inputs and outputs data related to the calculation result via the input buffer 71. By using the input buffer 71, parallel calculation of the number of bits equal to or greater than the data bus width of the CPU becomes possible. In addition, the number of times a huge number of weight parameters are transferred between the CPU 10 can be reduced, thereby achieving low power consumption.

[0071] One embodiment of the present invention can reduce the size of a semiconductor device that functions as an accelerator for AI technology or the like, which has a huge amount of calculations and a large number of parameters. Alternatively, one embodiment of the present invention can reduce the power consumption of a semiconductor device that functions as an accelerator for AI technology or the like, which has a huge amount of calculations and a large number of parameters. Alternatively, one embodiment of the present invention can suppress heat generation in a semiconductor device that functions as an accelerator for AI technology or the like, which has a huge amount of calculations and a large number of parameters. Alternatively, one embodiment of the present invention can reduce the number of data transfers between a CPU and a semiconductor device that functions as a memory in a semiconductor device that functions as an accelerator for AI technology or the like, which has a huge amount of calculations and a large number of parameters. In other words, a semiconductor device that functions as an accelerator for AI technology or the like, which has a huge amount of calculations and a large number of parameters, has a non-von Neumann architecture, and can perform parallel processing with extremely low power consumption compared to a von Neumann architecture in which power consumption increases as the processing speed increases.

[0072] (Embodiment 2) A structure, an operation, and the like of a semiconductor device according to one embodiment of the present invention will be described. Note that in this embodiment, repeated description of components having the same reference characters as those in the above embodiment may be omitted.

[0073] 7A and 7B are diagrams for explaining a semiconductor device 100A according to an embodiment of the present invention. In the semiconductor device 100A in FIG. 7A and FIG. 7B, a CPU 10, an accelerator 20, and a bus 30 are illustrated as an example. The CPU 10 has a CPU core 11 and a backup circuit 12. The accelerator 20 has an arithmetic processing unit 21 and a memory unit 22. The arithmetic processing unit 21 has a drive circuit 15 and an arithmetic circuit 23. The drive circuit 15 is a circuit for driving the memory unit 22. The memory unit 22 has a memory circuit 24. The memory unit 22 may be called a device memory or a shared memory. The memory circuit 24 has a transistor 25 having a semiconductor layer 29 having a channel formation region. The drive circuit 15 and the memory circuit 24 are electrically connected via a wiring 31.

[0074] The memory circuit 24 is electrically connected to the arithmetic circuit 23 of the arithmetic processing unit 21 via wiring 31 and the drive circuit 15. The memory circuit 24 has a function of holding binary or ternary data as analog voltage values. This configuration allows the arithmetic processing unit 21 to efficiently perform arithmetic processing based on architectures such as Binary Neural Network (BNN) and Ternary Neural Network (TNN).

[0075] The drive circuit 15 has a write circuit for writing data to the memory unit 22 and a read circuit for reading data from the memory unit 22. The write circuit has a function of switching data to be written to the memory circuit 24 in the memory unit 22 to a binary or ternary voltage value and outputting it in response to various signals such as a switching signal for switching between writing binary or ternary data signals, a write control signal, and a data signal. The write circuit is composed of a logic circuit to which multiple signals are input. The read circuit has a function of switching a voltage value held in the memory circuit 24 in the memory unit 22 to a binary or ternary data signal and reading it out using multiple reference voltages. The read circuit has a function of a sense amplifier.

[0076] The memory circuit 24, which is made up of OS transistors, and the drive circuit 15 are electrically connected via a wiring 31 that is provided so as to extend in a direction substantially perpendicular to the surface of the substrate on which the drive circuit 15 and the arithmetic circuit 23 are provided. Note that "substantially perpendicular" refers to a state in which they are arranged at an angle of 85 degrees or more and 95 degrees or less. Note that when the bit lines connected to the memory circuit 24 are write bit lines and read bit lines, it is preferable that they are connected via separate wiring. For example, the write bit line is connected to the write circuit via a wiring (first wiring) that is provided substantially perpendicular to the surface of the substrate on which the drive circuit 15 and the arithmetic circuit 23 are provided. Also, for example, the read bit line is connected to the read circuit via a wiring (second wiring) that is provided substantially perpendicular to the surface of the substrate on which the drive circuit 15 and the arithmetic circuit 23 are provided.

[0077] 8A illustrates the configuration of the semiconductor device 100A described in FIG. 7A and FIG. 7B, as well as the OS memory 300 connected to the bus 30, and the main memory 400 configured with a DRAM or the like. Also, in FIG. 8A, data D CPU In FIG. 8A, data between the OS memory 300 and the accelerator 20 is represented as data D ACC is illustrated as:

[0078] As described above, in the configuration of one aspect of the present invention, the accelerator 20 can be configured to hold a binary or ternary analog voltage value as data, and to output the calculation result obtained by the calculation circuit to the CPU 10. Therefore, the data D from the OS memory 300 for calculation processing can be ACC In addition, since the amount of calculation processing by the CPU 10 can be reduced, the data D between the OS memory 300 and the CPU 10 can be reduced. CPU That is, in the configuration according to one aspect of the present invention, it is possible to reduce the number of accesses via the bus 30 and the amount of data to be transferred.

[0079] The backup circuit 12 in the CPU 10 and the memory unit 22 in the accelerator 20 can be stacked with the CPU core 11 and the arithmetic processing unit 21, which can be configured with Si CMOS. Therefore, they can be arranged without increasing the circuit area.

[0080] Moreover, DOSRAM or NOSRAM is preferable as a memory circuit applicable to the OS memory 300. DOSRAM (registered trademark) is an abbreviation of "Dynamic Oxide Semiconductor Random Access Memory (RAM)" and refers to a RAM having a 1T (transistor) 1C (capacitor) type memory cell. Like NOSRAM, DOSRAM is a memory that utilizes the low off-current of OS transistors.

[0081] DOSRAM is a DRAM formed using OS transistors, and is a memory that temporarily stores information sent from the outside. DOSRAM has memory cells including OS transistors and a read circuit section including Si transistors (transistors having silicon in the channel formation region). The memory cells and read circuit section can be provided in different stacked layers, so DOSRAM can reduce the overall circuit area. Also, DOSRAM can divide the memory cell array into smaller sections and arrange them efficiently.

[0082] 8B, the OS memory 300 is formed by stacking layers having OS transistors to form the OS memory 300N, which is a highly integrated DOSRAM, so that the storage capacity per unit area can be increased. In this case, it is also possible to omit the main memory 400 provided separately from the semiconductor device 100A.

[0083] By configuring a part of the circuits of the CPU 10 and the accelerator 20 of the semiconductor device 100A, including the OS memory 300N, with OS transistors, it is possible to integrate the circuits into a single integrated circuit. Fig. 9 shows a schematic diagram of the semiconductor device 100A that functions as an SoC in which the CPU 10, the accelerator 20, and the OS memory 300N are tightly coupled.

[0084] As shown in Fig. 9, in a CPU 10, a backup circuit 12 may be provided in a layer having OS transistors above a CPU core 11. Also, as shown in Fig. 9, in an accelerator 20, a memory unit 22 may be provided in a layer having OS transistors above an arithmetic processing unit 21. Also, as shown in Fig. 9, an OS memory 300N may be arranged in a stack similar to the memory unit 22. In addition, a control circuit 500 having Si transistors, a logic circuit 600 having OS transistors, etc. may be provided. Note that the logic circuit 600 is preferably a simple logic circuit such as a changeover switch that can be replaced by an OS transistor.

[0085] As shown in Fig. 9, in the case of an SoC in which circuits such as a CPU 10, an accelerator 20, and a memory 300N are tightly coupled, there is a problem of heat generation, but OS transistors are preferable because the amount of change in electrical characteristics due to heat is smaller than that of Si transistors. In addition, by integrating circuits in a three-dimensional direction as shown in Fig. 9, parasitic capacitance can be reduced compared to a stacked structure using a through silicon via (TSV) or the like. The power consumption required for charging and discharging each wiring can be reduced. As a result, the efficiency of calculation processing can be improved.

[0086] Fig. 10A is a diagram for explaining the relationship between processing performance (OPS: Operations Per Second) and power consumption (W). In Fig. 10A, the vertical axis represents processing performance, and the horizontal axis represents power consumption. In Fig. 10A, 0.1 TOPS / W (Tera Operations Per Second / W), 1 TOPS / W, 10 TOPS / W, and 100 TOPS / W are indicated by dashed lines as indices of computing efficiency.

[0087] 10A , a region 710 includes a conventional general-purpose AI accelerator (von Neumann type), and a region 712 includes a semiconductor device of one embodiment of the present invention. Note that the region 710 includes, for example, a central processing unit (CPU), a graphics processing unit (GPU), a field-programmable gate array (FPGA), and the like.

[0088] 10A, by applying the semiconductor device of one embodiment of the present invention, power consumption can be reduced by about two orders of magnitude and processing performance can be improved significantly (for example, 1000 times or more) as compared to a conventional general-purpose AI accelerator (von Neumann type). Note that by applying the semiconductor device of one embodiment of the present invention, computing efficiency of 100 TOPS / W or more can be expected.

[0089] Here, specific examples of a conventional configuration and a configuration to which a semiconductor device of one embodiment of the present invention is applied will be described with reference to Fig. 10B and Fig. 10C. Fig. 10B illustrates an image of power consumption in image recognition by a semiconductor device having a conventional configuration, and Fig. 10C illustrates an image of power consumption in image recognition by a semiconductor device using the configuration of one embodiment of the present invention.

[0090] In Figures 10B and 10C, the vertical axis represents power and the horizontal axis represents time. In Figure 10B, power 714 represents leakage power, power 716 represents CPU power, and power 718 represents memory power. In Figure 10C, power 714 represents leakage power, power 720 represents CPU power, and power 722 represents accelerator power. Power 722 includes power used in the arithmetic circuit and memory circuit.

[0091] 10B and 10C, arrows a, b, and c respectively represent signals in image recognition. It is assumed that when the signals of arrows a, b, and c are input, arithmetic processing such as image recognition is started in the semiconductor device.

[0092] As shown in FIG. 10B, in the case of a semiconductor device having a conventional configuration, a constant leakage power (power 714) occurs over time. On the other hand, as shown in FIG. 10C, in the case of a configuration in which a semiconductor device according to one embodiment of the present invention is applied, leakage power (power 714) occurs while CPU power (power 720) and accelerator power (power 722) are being used. However, during a period in which CPU power (power 720) and accelerator power (power 722) are not being used, normally-off drive (period t1 shown in FIG. 10C) in which leakage power (power 714) does not occur can be achieved. This makes it possible to significantly reduce power consumption. In other words, a semiconductor device with extremely low power consumption can be provided.

[0093] Fig. 11A is a diagram for explaining an example of a circuit configuration applicable to the memory section 22 of the semiconductor device 100A of the present invention. Fig. 11A illustrates write word lines WWL_1 to WWL_M, read word lines RWL_1 to RWL_M, write bit lines WBL_1 to WBL_N, and read bit lines RBL_1 to RBL_N arranged in a matrix direction of M rows and N columns (M and N are natural numbers of 2 or more). Also illustrated is a memory circuit 24 connected to each word line and bit line.

[0094] 11B is a diagram illustrating an example of a circuit configuration applicable to the memory circuit 24. The memory circuit 24 includes a transistor 25, a transistor 26, a transistor 27, and a capacitor 28 (also referred to as a capacitor).

[0095] One of the source or drain of the transistor 25 is connected to the write bit line WBL. The gate of the transistor 25 is connected to the write word line WWL. The other of the source or drain of the transistor 25 is connected to one electrode of the capacitance element 28 and the gate of the transistor 26. One of the source or drain of the transistor 26 and the other electrode of the capacitance element 28 are connected to a wiring that provides a fixed potential, for example, a ground potential. The other of the source or drain of the transistor 26 is connected to one of the source or drain of the transistor 27. The gate of the transistor 27 is connected to the read word line RWL. The other of the source or drain of the transistor 27 is connected to the read bit line RBL. As described above, the write bit line WBL and the read bit line RBL are connected to the drive circuit 15 via wiring or the like that is provided so as to extend in a direction approximately perpendicular to the substrate surface on which the arithmetic circuit 23 is provided. The drive circuit 15 receives a data signal S, which is a binary or ternary analog voltage value. OUT The drive circuit 15 is also given a voltage on the read bit line RBL corresponding to the data read from the memory circuit 24, and outputs data signals DO0, DO1 corresponding to that voltage.

[0096] The circuit configuration of the memory circuit 24 shown in FIG. 11B corresponds to a NOSRAM of a three-transistor type (3T) gain cell. Transistors 25 to 27 are OS transistors. In an OS transistor, the current flowing between the source and drain in an off state, that is, the leakage current, is extremely small. NOSRAM can be used as a non-volatile memory by using the characteristic of extremely small leakage current to hold charges corresponding to data in the memory circuit. Each transistor may have a backgate. By having a backgate, the transistor characteristics can be improved.

[0097] 12A is a diagram for explaining an example of a circuit configuration applicable to the arithmetic processing unit 21 of the semiconductor device 100A of the present invention. The arithmetic processing unit 21 has a driving circuit 15 and an arithmetic circuit 23. The driving circuit 15 has N driving circuits 15_1 to 15_N. The arithmetic circuit 23 has N arithmetic circuits 23_1 to 23_N. The N driving circuits 15_1 to 15_N each receive a signal from one of the N read bit lines RBL_1 to RBL_N, and output data signals DO0_1 to DO0_N and / or data signals DO1_1 to DO1_N. The data signals DO0_1 to DO0_N and / or data signals DO1_1 to DO1_N are input to the arithmetic circuits 23_1 to 23_N, and output signals Y_1 to Y_N. The output signals Y_1 to Y_N correspond to data obtained by performing a product-sum operation using the data held in the memory circuit 24.

[0098] Fig. 12B is a diagram for explaining a circuit configuration example of the arithmetic circuit 23 applicable to the arithmetic circuits 23_1 to 23_N. Fig. 13 is a circuit for executing arithmetic processing based on the architecture of a binary neural network (BNN) or a ternary neural network (TNN). The arithmetic circuit 23 has a read circuit 41 to which a data signal DO0 and / or a data signal DO1 is input, a bit product-sum calculator 42, an accumulator 43, a latch circuit 44, and an encoding circuit 45 that outputs an output signal Y.

[0099] FIG. 13 shows a detailed configuration example of the arithmetic circuit 23 shown in FIG. 12B. FIG. 13 shows an example of a configuration in which a multiplication and addition operation is performed on 8-bit signals (W[0] to W[7], A[0] to A[7]) and an output signal Y and an 11-bit output signal (accout[10:0]) are output. In FIG. 12B, since one row is selected per clock for memory access, M (=1 bit×M rows) products and their sums are executed in M ​​clocks. In the arithmetic circuit of FIG. 13, the same M products and their sums can be executed in 8 parallel×1 bit×M / 8 rows, so M / 8 clocks are required. Therefore, the configuration of FIG. 13 can shorten the calculation time by executing the multiplication and addition operation in parallel, thereby improving the calculation efficiency.

[0100] 13, the bit-product-sum calculator 42 has an accumulator to which an 8-bit signal (W[0] through W[7], A[0] through A[7]) is input, and an adder to which the value obtained by the accumulator is input. As shown in FIG 13, the products of 1-bit signals calculated in eight parallel operations are illustrated as WA0 through WA7, their sums as WA10, WA32, WA54, and WA76, and their further sums as WA3210 and WA7654.

[0101] 13, the accumulator 43 functioning as an adder outputs the sum of the signal of the bit sum-of-products calculator 42 and the output signal of the latch circuit 44 to the latch circuit 44. The accumulator 43 switches the signal to be input to the adder according to the control signal TxD_EN. When the control signal TxD_EN is 0 (TxD_EN=0), the accumulator 43 outputs the sum of the signal of the bit sum-of-products calculator 42 and the output signal of the latch circuit 44 to the latch circuit 44. When the control signal TxD_EN is 1 (TxD_EN=1), the accumulator 43 outputs the sum of the signal of the logic circuit 47 (11-bit selector) and the output signal of the latch circuit 44 to the latch circuit 44.

[0102] In FIG. 13, after completing the multiplication and accumulation operation of signals A[0] to A[7] and signals W[0] to W[7], logic circuit 47, which is composed of AND circuits, adds data for batch normalization, specifically signal W[7], while switching with a switching signal (th select[10:0]). Note that data for batch normalization may be configured to simultaneously read and select signals W[0] to W[6] other than signal W[7], for example. Batch normalization is an operation for adjusting the distribution of output data of each layer in a neural network so that it is constant. For example, image data often used for calculations in a neural network may differ from the distribution of predicted data (input data) because the distribution of data used for learning is prone to variation. Batch normalization can improve the accuracy of learning in a neural network by normalizing the distribution of input data to the intermediate layer of the neural network to a Gaussian distribution with a mean of 0 and a variance of 1. In a Binary Neural Network (BNN), the output results of each layer are binarized by activation, so by suppressing the bias in data distribution relative to a threshold value, it becomes possible to properly activate, i.e., separate information.

[0103] The latch circuit 44 holds the output signal (accout[10:0]) of the accumulator 43. The binary data to be passed to the next layer (NN layer) in the neural network by batch normalization becomes the most significant bit of the product-sum operation result held by the latch circuit 44. In the output signal (accout[10:0]), the most significant bit signal (accout10) represents the sign of the latch data calculated in two's complement, and in order to pass the positive data as 1 and the negative data as 0 to the next NN layer, it is inverted by the inverter circuit 46 functioning as an encoding circuit and output as the output signal Y. Since Y is the output of the intermediate layer, it is temporarily held in the buffer memory (also called the input buffer) in the accelerator 20 and then used for the operation of the next layer.

[0104] FIG. 14A illustrates a hierarchical neural network based on the architecture of a binary neural network (BNN) or a ternary neural network (TNN). FIG. 14A illustrates a fully connected neural network with a neuron 50, one input layer (I1), three intermediate layers (M1 to M3), and one output layer (O1). If the number of neurons in the input layer I1 is 786, the number of neurons in the intermediate layers M1 to M3 is 256, and the number of neurons in the output layer O1 is 10, then in the binary neural network (BNN), for example, the number of connections in each layer (layer 51, layer 52, layer 53, and layer 54) is (784×256)+(256×256)+(256×256)+(256×10), which is a total of 334336. In other words, the weight parameters required for neural network calculations are about 330K bits in total, so that the memory capacity can be sufficiently implemented even in a small-scale system.

[0105] Next, FIG. 14B shows a detailed block diagram of a semiconductor device 100A capable of performing the neural network calculations shown in FIG. 14A.

[0106] FIG. 14B illustrates an example configuration of peripheral circuits for driving each component illustrated in FIG. 7A and FIG. 7B, in addition to the arithmetic processing unit 21, arithmetic circuit 23, memory unit 22, memory circuit 24, and wiring 31 described in FIG. 7A and FIG. 7B.

[0107] FIG. 14B illustrates a controller 61, a row decoder 62, a word line driver 63, a column decoder 64, a write driver 65, a precharge circuit 66, a sense amplifier 67, a selector 68, an input buffer 71, and an arithmetic control circuit 72.

[0108] 15A is a diagram in which blocks for controlling the memory unit 22 are extracted from each configuration shown in FIG. 14B. In FIG. 15A, the controller 61, row decoder 62, word line driver 63, column decoder 64, write driver 65, precharge circuit 66, sense amplifier 67, and selector 68 are extracted and illustrated. The drive circuit 15 shown in FIG. 7A and FIG. 7B corresponds to the blocks of the write driver 65, precharge circuit 66, and sense amplifier 67. The drive circuit 15 may include the word line driver 63 and the column decoder 64.

[0109] The controller 61 processes an external input signal to generate control signals for the row decoder 62 and the column decoder 64. The external input signal is a control signal for controlling the memory unit 22, such as a write enable signal or a read enable signal. The controller 61 also inputs and outputs data to be written to the memory unit 22 or data to be read from the memory unit 22, between the controller 61 and the CPU 10 via a bus.

[0110] The row decoder 62 generates a signal for driving the word line driver 63. The word line driver 63 generates a signal to be provided to the write word line WWL and the read word line RWL. The column decoder 64 generates a signal for driving the sense amplifier 67 and the write driver 65. The precharge circuit 66 has a function of precharging the read bit line RBL and the like. A signal read from the memory circuit 24 of the memory unit 22 can be input to the arithmetic circuit 23 and can also be output via the selector 68. The selector 68 can sequentially read data corresponding to the bus width and output the required data to the CPU 10, etc. via the controller 61.

[0111] FIG. 15B is a diagram in which blocks for controlling the arithmetic processing unit 21 are extracted from each configuration shown in FIG. 14B.

[0112] The controller 61 processes an input signal from the outside and generates a control signal for the calculation control circuit 72. The controller 61 also generates various signals for controlling the calculation circuit 23 of the calculation processing unit 21. The controller 61 also inputs and outputs data related to the calculation result via the input buffer 71. By using this buffer memory, parallel calculation of the number of bits greater than the data bus width of the CPU is possible. In addition, the number of times a huge number of weight parameters are transferred between the CPU 10 can be reduced, thereby reducing power consumption.

[0113] 16, a configuration example of a write driver 65 for writing a data signal converted into a binary or ternary analog voltage value to a memory circuit will be described. The write driver 65 has an inverter circuit 601, a NAND circuit 602, a NAND circuit 603, an inverter circuit 604, a transistor 605, a transistor 606, and an inverter circuit 607. The transistors constituting the write driver 65 are Si transistors. The transistors 605 and 606 are preferably p-channel transistors as shown in FIG.

[0114] As shown in Fig. 16, a potential VDD (>GND) or a potential VDD / 2 (>GND) is applied to one of the sources or drains of the transistors 605 and 606. A data signal DI1, which is input data, is applied to the inverter circuit 601. In addition to the output signal of the inverter circuit 601, a data signal DI0, a write control signal WE for controlling the writing of data, and a switching signal B / T for switching the writing of a binary or ternary data signal are input to the NAND circuit 602. The data signal DI0 and the write control signal WE are input to the NAND circuit 603. The inverter circuit 607 outputs a data signal S, which corresponds to a voltage value according to binary or ternary data. OUT Output.

[0115] The truth table for each signal shown in FIG.

[0116] [Table 1]

[0117] In other words, when writing binary data to a memory circuit, the data signal S OUT is switched to the voltage VDD or the voltage GND in response to the data signal DI0. When writing ternary data to the memory circuit, the data signal S OUT is switched to one of three values, voltage VDD, voltage VDD / 2, or voltage GND, in response to data signals DI0 and DI1. The switched voltage can be written to the memory circuit via the write bit line WBL.

[0118] 17, a configuration example including a sense amplifier 67 that outputs a data signal corresponding to a binary or ternary analog voltage value to the arithmetic circuit 23 will be described. In FIG. 17, a comparison circuit 611 and a comparison circuit 612 that generate data signals DO0 and DO1, which are output data, from the potential of the read bit line RBL corresponding to the input signal function as the sense amplifier 67. The potential of the read bit line RBL and a reference voltage Vref1 are applied to the comparison circuit 611. The potential of the read bit line RBL and a reference voltage Vref2 are applied to the comparison circuit 612. The reference voltage Vref2 is higher than the reference voltage Vref1 and lower than VDD. The reference voltage Vref1 is higher than GND and lower than VDD / 2.

[0119] In the case of binary data, data signals DO0 and BO are obtained as binary output data output via the buffer circuit 613. The data signal DO0 has the same logical value as the data signal BO. The truth table of each of the data signals DO0 and BO is as shown in Table 2.

[0120] [Table 2]

[0121] In the case of ternary output data, a data signal Y is obtained and output via the arithmetic circuit 23. The truth table for each of the data signals DO0, DO1, and Y is as shown in Table 3.

[0122] [Table 3]

[0123] The data signal Y is generated as a product-sum signal Y (=A*X) by performing a product-sum operation on the weight data A and the data signals DO0 and DO1(X).

[0124] As described above, one embodiment of the present invention can provide a miniaturized semiconductor device including an accelerator and a CPU. Alternatively, one embodiment of the present invention can provide a semiconductor device including an accelerator and a CPU with reduced power consumption. Alternatively, one embodiment of the present invention can provide a semiconductor device including an accelerator and a CPU with reduced heat generation. Alternatively, one embodiment of the present invention can provide a semiconductor device in which the number of data transfers in the CPU is reduced. Alternatively, a semiconductor device having a novel structure can be provided. In other words, the semiconductor device of one embodiment of the present invention has a non-von Neumann architecture and can perform parallel processing with extremely low power consumption as compared with a von Neumann architecture in which power consumption increases as the processing speed increases.

[0125] (Embodiment 3) A structure, an operation, and the like of a semiconductor device according to one embodiment of the present invention will be described. Note that in this embodiment, repeated description of components having the same reference characters as those in the above embodiment may be omitted.

[0126] 18A and 18B are diagrams illustrating a semiconductor device 100B according to one embodiment of the present invention. The semiconductor device 100B includes a CPU 10, an accelerator 20, and a bus 30. The accelerator 20 includes an arithmetic processing unit 21 and a memory unit 22. The arithmetic processing unit 21 includes an arithmetic circuit 23. The memory unit 22 includes a memory circuit 24. The memory unit 22 may be referred to as a device memory or a shared memory. The memory circuit 24 includes a transistor 25 including a semiconductor layer 29 having a channel formation region. The arithmetic circuit 23 and the memory circuit 24 are electrically connected to each other via a wiring 31.

[0127] The memory unit 22 has a function of storing and generating data to be processed by the accelerator 20. Specifically, the memory unit 22 has a function of storing weight data (also called a first data signal) used for parallel processing of product-sum operations of a neural network. The memory unit 22 also has a function of generating output data (a third data signal) according to a result of multiplication with input data (also called a second data signal). The memory unit 22 has a function of inputting the generated output data to the arithmetic processing unit 21.

[0128] The memory circuit 24 is electrically connected to the arithmetic circuit 23 in the arithmetic processing unit 21 via wiring 31, and has a function of holding weight data expressed by two values, that is, a 1-bit digital signal. The memory circuit also has a function of generating a signal obtained by exclusive OR corresponding to the multiplication result of the weight data and input data. Note that in the memory circuit 24, the semiconductor layer 29 of the transistor 25 is an oxide semiconductor. That is, the transistor 25 is an OS transistor. The memory circuit 24 is preferably a memory having an OS transistor (hereinafter also referred to as an OS memory).

[0129] Fig. 19A is a diagram for explaining an example of a circuit configuration applicable to the memory section 22 of the semiconductor device 100B of the present invention. Fig. 19A illustrates write word lines WWL_1 to WWL_M, read word lines RWL_11 to RWL_MN, read inverted word lines RWLB_11 to RWLB_MN, write bit lines WBL_1 to WBL_N, write inverted bit lines WBLB_1 to WBLB_N, and read bit lines RBL_1 to RBL_N, which are arranged in a matrix of M rows and N columns (M and N are natural numbers of 2 or more). Also illustrated are a plurality of memory circuits 24 connected to each word line and bit line.

[0130] 19B is a diagram for explaining an example of a circuit configuration applicable to the memory circuit 24. The memory circuit 24 has transistors 31A and 31B, transistors 32A and 32B, transistors 33A and 33B, and capacitive elements 34A and 34B (also called capacitors). As shown in FIG. 19B, each element is connected to each wiring of a write word line WWL, a read word line RWL, a read inverted word line RWLB, a write bit line WBL, a write inverted bit line WBLB, and a read bit line RBL.

[0131] One electrode of each of the capacitance elements 34A and 34B and one of the sources or drains of each of the transistors 32A and 32B are connected to a wiring that provides a fixed potential, such as a ground potential. As described above, the read bit line RBL is connected to the arithmetic circuit 23 via the wiring 31 or the like that is provided extending in a direction substantially perpendicular to the surface of the substrate on which the arithmetic circuit 23 is provided.

[0132] The circuit configuration of the memory circuit 24 shown in FIG. 19B is a three-transistor type (3T) gain cell NOSRAM, which is made up of transistors 31A, 32A, and 33A, as well as transistors 31B, 32B, and 33B. The transistors 31A, 31B, transistors 32A, 32B, and transistors 33A, 33B are OS transistors. In the off state, the current flowing between the source and drain, that is, the leakage current, of the OS transistor is extremely small. The NOSRAM can be used as a non-volatile memory by retaining a charge corresponding to data in the memory circuit using the characteristic of extremely small leakage current. In FIG. 19B, the charges provided to the nodes SN1 and SN2 can be retained by turning off the transistors 31A and 31B. Each transistor may have a back gate electrode.

[0133] The truth table of the memory circuit 24 in FIG. 19B is as shown in Table 4. In Table 3, H-level and L-level voltages are represented by logic "1" and "0." "RWL" and "RWLB" correspond to logic according to the voltages of the read word line RWL and the read inverted word line RWLB given as input data. "SN1" and "SN2" correspond to logic according to the voltages given as weight data from the write bit line WBL and the write inverted bit line WBLB to nodes SN1 and SN2. "RBL" corresponds to logic according to the voltage of the read bit line RBL generated as output data.

[0134] [Table 4]

[0135] In the circuit configuration of Fig. 19B, the data of the truth table shown in Table 4 can be obtained. Therefore, for example, an output signal (output data Y = W x A) based on the exclusive OR of the read word line RWL (input data A) and node SN2 (weight data W) shown in Table 5 can be obtained. Note that, as shown in Table 5, logic "1" and "0" are data expressed by two values, "+1" or "-1", used in a Binary Neural Network (BNN).

[0136] [Table 5]

[0137] The operation when reading data to the read bit line RBL will be described with reference to Fig. 20A. First, in a standby period T01, the read word line RWL and the read inverted word line RWLB are set to H level, and the read bit line RBL is set to an intermediate potential. Next, in a precharge period T02, the read word line RWL and the read inverted word line RWLB are set to H level, and the read bit line RBL is set to H level and electrically floating (floating). Next, in a read period T03, the read word line RWL and the read inverted word line RWLB are set to logic "1" or "0" according to the input data, and the logic of the read bit line RBL changes to "1" or "0", thereby generating output data.

[0138] The memory unit 22 capable of holding weight data and generating a signal based on the exclusive OR with input data can be configured as shown in FIG. 11 or W MN By storing the weight data in the memory unit 35 and providing the input data to the exclusive OR unit 36 ​​(ExOR) via the read word lines RWL_11 to RWL_MN and the read inverted word lines RWLB_11 to RWLB_MN, output data based on the exclusive OR of the weight data and the input data can be input to the read bit lines RBL_1 to RBL_N.

[0139] The memory circuit 24 in Fig. 19B can be modified to have the circuit configuration in Fig. 21. The memory circuit 24A in Fig. 21 corresponds to a configuration in which the connections of the gates of the transistors 32A and 32B to which the nodes SN1 and SN2 are connected are changed. In the circuit configuration in Fig. 21, the data of the truth table shown in Table 6 can be obtained.

[0140] [Table 6]

[0141] Similarly, the memory circuit 24B in FIG. 22A corresponds to a configuration in which the transistors connected to the node SN1 are changed from transistors of the same polarity to transistors 32_P and 32_N that are a combination of p-channel and n-channel types. Si transistors or the like can be used for the transistors 32_P and 32_N. With this configuration, the transistors and wiring connected to the node SN2 in FIG. 19B can be omitted. With the circuit configuration in FIG. 22A, the data of the truth table shown in Table 7 can be obtained.

[0142] [Table 7]

[0143] Similarly, the memory circuit 24C in Fig. 22B corresponds to a configuration in which the transistors of the same polarity connected to the nodes SN1 and SN2 in Fig. 19B are changed to transistors 32_P and 32_N of different polarities, and further transistors 37 and 38 and a capacitor 39 are added. With this configuration, the transistor and wiring connected to the node SN2 can be omitted. The truth table of the circuit configuration in Fig. 22B is the same as Table 7.

[0144] 23 is a schematic diagram illustrating a memory section 22 having a plurality of memory circuits 24 and an arithmetic circuit 23 in a semiconductor device 100B of the present invention. As described above, each of the memory circuits 24 in the memory section 22 includes a storage section 35 and a multiplication section 40. k(k is a natural number equal to or greater than 2) is stored in the memory unit 35, and input data A1 to A2 are input via the read word line RWL and the read inverted word line RWLB. k The output signal (Y k =A k ×W k ) is provided to the arithmetic circuit 23. Each transistor in the memory portion 22 is preferably an OS transistor, which can be stacked with the arithmetic circuit 23.

[0145] 23 includes an accumulator 49 and an encoding circuit 45. The arithmetic circuit 23 can generate a signal Q that has been subjected to a product-sum operation by adding together the multiplied output signals.

[0146] FIG. 24 shows a detailed configuration example of the arithmetic circuit 23 shown in FIG. 23. FIG. 24 shows an example of a configuration in which 8-bit signals (WA[0] to WA[7]) are added together, and a 1-bit output signal Q and an 11-bit output signal (accout[10:0]) are output. The configuration example in FIG. 24 shows a configuration in which a multiply-and-accumulate operation and a sum operation for batch normalization are switched between each other. In FIG. 24, since one row is selected per clock for memory access, M (=1 bit×M rows) products and their sums are executed in M ​​clocks. In the arithmetic circuit in FIG. 24, the same M products and their sums can be executed in 8 parallel×1 bit×M / 8 rows, so M / 8 clocks are required. Therefore, the configuration in FIG. 24 can shorten the operation time by executing the multiply-and-accumulate operation in parallel, thereby improving the operation efficiency.

[0147] 24, the bit adder 42A has an adder to which an 8-bit signal (WA[0] to WA[7]) is input. As shown in FIG 24, the sums of 1-bit signals are illustrated as WA10, WA32, WA54, and WA76, and further the sums thereof are illustrated as WA3210 and WA7654.

[0148] 24, an accumulator 49 functioning as an adder outputs the sum of the signal of the bit adder 42A and the output signal of the latch circuit 44 to the latch circuit 44. Note that in FIG. 24, a selector 48 is provided for switching the signal input to the accumulator 49 according to a control signal TxD_EN. When the control signal TxD_EN is 0 (TxD_EN=0), the sum of the signal of the bit adder 42A and the output signal of the latch circuit 44 is output to the latch circuit 44. When the control signal TxD_EN is 1 (TxD_EN=1), the sum of the signal of the logic circuit 47 (11 bit selector) and the output signal of the latch circuit 44 is output to the latch circuit 44. The selector 48 allows switching between a product-sum operation and a sum operation for batch normalization.

[0149] In FIG. 24, after completing the product-sum operation of the signals WA0 to WA7, the logic circuit 47, which is composed of AND circuits, adds the data for batch normalization, specifically, the signal RBL_th[10:0], while switching with the switching signal (th select[10:0]). The signal RBL_th[10:0] corresponds to the weight data held in the memory circuit 24. The batch normalization is an operation for adjusting the distribution of the output data of each layer in the neural network so that it is constant. For example, image data often used for calculations in the neural network may differ from the distribution of the predicted data (input data) because the distribution of the data used for learning is prone to variation. The batch normalization can improve the accuracy of learning in the neural network by normalizing the distribution of the input data to the intermediate layer of the neural network to a Gaussian distribution with a mean of 0 and a variance of 1. In a Binary Neural Network (BNN), the output results of each layer are binarized by activation, so by suppressing the bias in data distribution relative to a threshold value, it becomes possible to properly activate, i.e., separate information.

[0150] The latch circuit 44 holds the output signal (accout[10:0]) of the accumulator 49. The latch circuit 44 is reset by the signal CLRn. The binary data to be passed to the next layer (NN layer) in the neural network by batch normalization becomes the most significant bit of the product-sum operation result held by the latch circuit 44. In the output signal (accout[10:0]), the most significant bit signal (accout10) represents the sign of the latch data calculated in two's complement, and in order to pass the positive data as 1 and the negative data as 0 to the next NN layer, it is inverted by the inverter circuit 46 functioning as an encoding circuit and output as the output signal Q. Since Q is the output of the intermediate layer, it is temporarily held in the buffer memory (also called the input buffer) in the accelerator 20 and then used for the operation of the next layer.

[0151] FIG. 25A illustrates a hierarchical neural network based on the architecture of a Binary Neural Network (BNN). FIG. 25A illustrates a fully connected neural network consisting of a neuron 50, one input layer (I1), three intermediate layers (M1 to M3), and one output layer (O1). If the number of neurons in the input layer I1 is 786, the number of neurons in the intermediate layers M1 to M3 is 256, and the number of neurons in the output layer O1 is 10, the number of connections in each layer (layer 51, layer 52, layer 53, and layer 54) is (784×256)+(256×256)+(256×256)+(256×10), which is a total of 334336. In other words, the weight parameters required for neural network calculation are about 330K bits in total, so that the memory capacity can be sufficiently implemented even in a small-scale system.

[0152] Next, FIG. 25B shows a detailed block diagram of a semiconductor device 100B capable of performing the neural network calculations shown in FIG. 25A.

[0153] FIG. 25B illustrates an example configuration of peripheral circuits for driving each component illustrated in FIG. 18A and FIG. 18B, in addition to the arithmetic processing unit 21, arithmetic circuit 23, memory unit 22, memory circuit 24, and wiring 31 described in FIG. 18A and FIG. 18B.

[0154] FIG. 25B illustrates a controller 61, a row decoder 62, a word line driver 63, a column decoder 64, a write driver 65, a precharge circuit 66, a sense amplifier 67, a selector 68, an input buffer 71, and an arithmetic control circuit 72.

[0155] Fig. 26A is a diagram in which blocks for controlling the memory unit 22 are extracted from each configuration shown in Fig. 25B. In Fig. 26A, a controller 61, a row decoder 62, a word line driver 63, a column decoder 64, a write driver 65, a precharge circuit 66, a sense amplifier 67, and a selector 68 are extracted and illustrated.

[0156] The controller 61 processes an external input signal to generate control signals for the row decoder 62 and the column decoder 64. The external input signal is a control signal for controlling the memory unit 22, such as a write enable signal or a read enable signal. The controller 61 also inputs and outputs data to be written to the memory unit 22 or data to be read from the memory unit 22, between the controller 61 and the CPU 10 via a bus.

[0157] The row decoder 62 generates a signal for driving the word line driver 63. The word line driver 63 generates a signal to be provided to the write word line WWL and the read word line RWL. The column decoder 64 generates a signal for driving the sense amplifier 67 and the write driver 65. The sense amplifier 67 amplifies the potential of the read bit line RBL. The write driver generates a signal for controlling the read bit line RBL and the write bit line WBL. The precharge circuit 66 has a function of precharging the read bit line RBL and the like. A signal read from the memory circuit 24 of the memory unit 22 can be input to the arithmetic circuit 23 and can also be output via the selector 68. The selector 68 can sequentially read data corresponding to the bus width and output the necessary data to the CPU 10, etc. via the controller 61.

[0158] FIG. 26B is a diagram in which blocks for controlling the arithmetic processing unit 21 are extracted from each configuration shown in FIG. 25B.

[0159] The controller 61 processes an input signal from the outside and generates a control signal for the calculation control circuit 72. The controller 61 also generates various signals for controlling the calculation circuit 23 of the calculation processing unit 21. The controller 61 also inputs and outputs data related to the calculation result via the input buffer 71. By using this buffer memory, parallel calculation of the number of bits greater than the data bus width of the CPU is possible. In addition, the number of times a huge number of weight parameters are transferred between the CPU 10 can be reduced, thereby reducing power consumption.

[0160] The memory circuit 24 described above can be modified to a circuit configuration in which a transistor or other components are added. For example, the memory circuit 24D in FIG. 27A applicable to the memory circuit 24 corresponds to a configuration in which a transistor 81 and a capacitance element 82 are added to the configuration shown in FIG. 19B. Also, a node SO is shown in FIG. 27A. The circuit configuration shown in FIG. 27A can be modified to the configuration of the memory circuit 24E in FIG. 27B as a modification corresponding to FIG. 21.

[0161] The transistor 81 is preferably an OS transistor. By using the OS transistor as the transistor 81, a charge corresponding to the output data can be held in the capacitance element 82, i.e., the node SO, by utilizing the characteristics of an extremely small leakage current. The output data held in the node SO can be output to the read bit line RBL in response to a control signal SW connected to the gate of the transistor 81.

[0162] FIG. 28A is a schematic diagram for explaining the operation when the memory circuit 24D having the configuration of FIG. 27A is applied to the memory section 22. In the memory circuit 24D shown in FIG. 28A, in addition to the storage section 35 and the exclusive OR section 36 described in FIG. 20B, the node SO shown in FIG. 27A and the control signal SW for controlling the transistor functioning as a switch are illustrated. The memory circuit 24D in the first row is connected to any one of the read word lines RWL_11 to RWL_1N and any one of the read inverted word lines RWLB_11 to RWLB_1N. The memory circuit 24D in the Mth row is connected to any one of the read word lines RWL_M1 to RWL_MN and any one of the read inverted word lines RWLB_M1 to RWLB_MN. Figure 28A also illustrates a control signal PRE that controls a switch connected to a wiring to which a precharge voltage is applied for precharging the read bit lines RBL_1 to RBL_N, a node PA of the read bit lines RBL_1 to RBL_N, and a control signal OUT that controls a switch between the read bit lines RBL_1 to RBL_N and the arithmetic circuit 23A.

[0163] By causing the charge held at the node SO of each row to be simultaneously shared by the read bit lines RBL_1 to RBL_N using the control signal SW, the read bit lines RBL_1 to RBL_N can be set to a potential corresponding to the sum of the output data of the memory circuits 24D of each row. In other words, the read bit lines RBL_1 to RBL_N can be set to an analog voltage corresponding to the addition of the charges corresponding to the multiplication in the memory circuit 24D. Therefore, in the arithmetic circuit 23A, an analog-to-digital conversion circuit can be used instead of the adder described in FIG. 23.

[0164] An operation for reading data to the read bit line RBL will be described with reference to Fig. 28B. Note that the description will be given assuming that each switch is on at H level and off at L level.

[0165] First, in a standby period T11, the read word line RWL and the read inverted word line RWLB are set to H level, the control signal SW and the control signal PRE are set to L level, and the nodes SO and PA are set to an intermediate potential. Next, in a precharge period T12, the read word line RWL and the read inverted word line RWLB are set to H level, the control signal SW and the control signal PRE are set to H level, and the nodes SO and PA are set to H level, making them electrically floating (floating). Next, in a multiplication period T13, the read word line RWL and the read inverted word line RWLB are set to logic "1" or "0" according to the input data, so that the logic of the node SO changes to "1" or "0". In the period T13, the control signal SW is set to L level, and the control signal PRE and the node PA are set to H level. Next, in an addition period T14, the read word line RWL and the read inverted word line RWLB are set to H level, the control signal PRE is set to L level, and the control signal SW is set to H level. Charge sharing is performed between the node SO and the node PA, and the potential of the node PA can be an analog potential obtained by adding up the charges of the node SO in the multiple memory circuits obtained by multiplication. The analog potential can be read out to the arithmetic circuit 23A by the control signal OUT.

[0166] One embodiment of the present invention can reduce the size of a semiconductor device that functions as an accelerator for AI technology or the like, which has a huge amount of calculations and a large number of parameters. Alternatively, one embodiment of the present invention can reduce the power consumption of a semiconductor device that functions as an accelerator for AI technology or the like, which has a huge amount of calculations and a large number of parameters. Alternatively, one embodiment of the present invention can suppress heat generation in a semiconductor device that functions as an accelerator for AI technology or the like, which has a huge amount of calculations and a large number of parameters. Alternatively, one embodiment of the present invention can reduce the number of data transfers between a CPU and a semiconductor device that functions as a memory in a semiconductor device that functions as an accelerator for AI technology or the like, which has a huge amount of calculations and a large number of parameters. In other words, a semiconductor device that functions as an accelerator for AI technology or the like, which has a huge amount of calculations and a large number of parameters, has a non-von Neumann architecture, and can perform parallel processing with extremely low power consumption compared to a von Neumann architecture in which power consumption increases as the processing speed increases.

[0167] (Embodiment 4) In this embodiment, an example of an operation in the case where part of the calculations of the program executed by the CPU 10 described in the above embodiment is executed by the accelerator 20 will be described.

[0168] FIG. 29 is a diagram for explaining an example of an operation when part of the calculations of a program executed by a CPU is executed by an accelerator.

[0169] The host program is executed by the CPU (step S1).

[0170] When the CPU confirms an instruction to reserve a data area required for performing a calculation using the accelerator in the memory section (step S2), the CPU reserves the data area in the memory section (step S3).

[0171] Next, the CPU transmits input data from the main memory to the memory unit (step S4). The memory unit receives the input data and stores the input data in the area secured in step S2 (step S5).

[0172] When the CPU confirms an instruction to start the kernel program (step S6), the accelerator starts executing the kernel program (step S7).

[0173] Immediately after the accelerator starts executing the kernel program, the CPU may be switched from a state in which it performs calculations to a PG state (step S8). In this case, the CPU is switched from the PG state to a state in which it performs calculations immediately before the accelerator finishes executing the kernel program (step S9). By keeping the CPU in the PG state during the period from step S8 to step S9, it is possible to suppress power consumption and heat generation in the semiconductor device as a whole.

[0174] When the accelerator finishes the execution of the kernel program, the output data is stored in the memory unit (step S10).

[0175] After the execution of the kernel program is completed, if the CPU confirms an instruction to transmit output data stored in the memory unit to the main memory (step S11), the output data is transmitted to the main memory and stored in the main memory (step S12).

[0176] When the CPU confirms an instruction to release the data area secured on the memory unit (step S13), the area secured on the memory unit is released (step S14).

[0177] By repeating the above operations from step S1 to step S14, it is possible to suppress the power consumption and heat generation of the CPU and accelerator, while allowing the accelerator to execute part of the calculations of the program executed by the CPU.

[0178] This embodiment mode can be appropriately combined with the descriptions of other embodiment modes.

[0179] (Embodiment 5) In this embodiment, an example of a CPU having a CPU core capable of power gating will be described.

[0180] 30 shows an example of the configuration of the CPU 10. The CPU 10 has a CPU core (CPU Core) 200, an L1 (level 1) cache memory device (L1 Cache) 202, an L2 cache memory device (L2 Cache) 203, a bus interface unit (Bus I / F) 205, power switches 210 to 212, and a level shifter (LS) 214. The CPU core 200 has a flip-flop 220.

[0181] The CPU core 200 , the L1 cache memory device 202 , and the L2 cache memory device 203 are interconnected via a bus interface unit 205 .

[0182] The PMU 193 generates a clock signal GCLK1 and various PG (power gating) control signals in response to interrupt signals (Interrupts) input from the outside and signals such as a signal SLEEP1 issued by the CPU 10. The clock signal GCLK1 and the PG control signals are input to the CPU 10. The PG control signals control the power switches 210 to 212 and the flip-flop 220.

[0183] Power switches 210 and 211 respectively control the supply of voltages VDDD and VDD1 to a virtual power line V_VDD (hereinafter referred to as a V_VDD line). A power switch 212 controls the supply of a voltage VDDH to a level shifter (LS) 214. A voltage VSSS is input to the CPU 10 and PMU 193 without passing through a power switch. A voltage VDDD is input to the PMU 193 without passing through a power switch.

[0184] The voltages VDDD and VDD1 are drive voltages for the CMOS circuits. The voltage VDD1 is lower than the voltage VDDD and is the drive voltage in the sleep state. The voltage VDDH is a drive voltage for the OS transistors and is higher than the voltage VDDD.

[0185] Each of the L1 cache memory device 202, the L2 cache memory device 203, and the bus interface unit 205 has at least one power domain that can be power-gated. The power domain that can be power-gated is provided with one or more power switches. These power switches are controlled by a PG control signal.

[0186] The flip-flop 220 is used as a register. A backup circuit is provided in the flip-flop 220. The flip-flop 220 will be described below.

[0187] 31 shows an example of the circuit configuration of the flip-flop 220. The flip-flop 220 includes a scan flip-flop 221 and a backup circuit 222.

[0188] The scan flip-flop 221 has nodes D1, Q1, SD, SE, RT, CK, and a clock buffer circuit 221A.

[0189] Node D1 is a data input node, node Q1 is a data output node, and node SD is an input node for scan test data. Node SE is an input node for signal SCE. Node CK is an input node for clock signal GCLK1. Clock signal GCLK1 is input to clock buffer circuit 221A. Analog switches of scan flip-flop 221 are connected to nodes CK1 and CKB1 of clock buffer circuit 221A. Node RT is an input node for a reset signal.

[0190] A signal SCE is a scan enable signal, and is generated by the PMU 193. The PMU 193 generates signals BK and RC (not shown). A level shifter 214 level-shifts the signals BK and RC to generate signals BKH and RCH. The signals BK and RC are a backup signal and a recovery signal.

[0191] The circuit configuration of the scan flip-flop 221 is not limited to that shown in Fig. 31. Flip-flops available in a standard circuit library can be applied.

[0192] The backup circuit 222 includes nodes SD_IN and SN11, transistors M11 to M13, and a capacitive element C11.

[0193] The node SD_IN is an input node for scan test data, and is connected to the node Q1 of the scan flip-flop 221. The node SN11 is a storage node of the backup circuit 222. The capacitive element C11 is a storage capacitor for storing the voltage of the node SN11.

[0194] The transistor M11 controls the conduction state between the node Q1 and the node SN11. The transistor M12 controls the conduction state between the node SN11 and the node SD. The transistor M13 controls the conduction state between the node SD_IN and the node SD. The on / off of the transistors M11 and M13 is controlled by a signal BKH, and the on / off of the transistor M12 is controlled by a signal RCH.

[0195] The transistors M11 to M13 are OS transistors, similar to the transistors 25 to 27 included in the above-described memory circuit 24. The transistors M11 to M13 are illustrated as having back gates. The back gates of the transistors M11 to M13 are connected to a power supply line that supplies a voltage VBG1.

[0196] At least the transistors M11 and M12 are preferably OS transistors. OS transistors have an extremely small off-state current, which can suppress a voltage drop at the node SN11 and consume almost no power to retain data, so that the backup circuit 222 has nonvolatile characteristics. Since data is rewritten by charging and discharging the capacitive element C11, the backup circuit 222 is theoretically capable of writing and reading data without any restrictions on the number of times it can be rewritten, and can write and read data with low energy.

[0197] It is highly preferable that all the transistors in the backup circuit 222 are OS transistors. As shown in Fig. 31B, the backup circuit 222 can be stacked on a scan flip-flop 221 that is configured with a silicon CMOS circuit.

[0198] Since the backup circuit 222 has a very small number of elements compared to the scan flip-flop 221, there is no need to change the circuit configuration and layout of the scan flip-flop 221 in order to stack the backup circuit 222. In other words, the backup circuit 222 is a highly versatile backup circuit. In addition, since the backup circuit 222 can be provided in the region in which the scan flip-flop 221 is formed, the area overhead of the flip-flop 220 can be reduced to zero even if the backup circuit 222 is incorporated. Therefore, by providing the backup circuit 222 in the flip-flop 220, power gating of the CPU core 200 becomes possible. Since little energy is required for power gating, the CPU core 200 can be power gated with high efficiency.

[0199] By providing the backup circuit 222, a parasitic capacitance due to the transistor M11 is added to the node Q1, but since it is small compared to the parasitic capacitance due to the logic circuit connected to the node Q1, it does not affect the operation of the scan flip-flop 221. In other words, even if the backup circuit 222 is provided, the performance of the flip-flop 220 does not substantially deteriorate.

[0200] For example, a clock gating state, a power gating state, or a pause state can be set as the low power consumption state of the CPU core 200. The PMU 193 selects the low power consumption mode of the CPU core 200 based on an interrupt signal, a signal SLEEP1, etc. For example, when transitioning from a normal operation state to a clock gating state, the PMU 193 stops generating the clock signal GCLK1.

[0201] For example, when transitioning from a normal operation state to a hibernation state, the PMU 193 performs voltage and / or frequency scaling. For example, when performing voltage scaling, the PMU 193 turns off the power switch 210 and turns on the power switch 211 to input the voltage VDD1 to the CPU core 200. The voltage VDD1 is a voltage that does not cause data to be lost in the scan flip-flop 221. When performing frequency scaling, the PMU 193 reduces the frequency of the clock signal GCLK1.

[0202] When the CPU core 200 is transitioned from a normal operation state to a power gating state, an operation is performed to back up the data of the scan flip-flop 221 in the backup circuit 222. When the CPU core 200 is returned from the power gating state to the normal operation state, a recovery operation is performed to write the data of the backup circuit 222 back to the scan flip-flop 221.

[0203] Fig. 32 shows an example of a power gating sequence of the CPU core 200. In Fig. 32, t1 to t7 represent time. Signals PSE0 to PSE2 are control signals for the power switches 210 to 212, and are generated by the PMU 193. When the signal PSE0 is "H" / "L", the power switch 210 is on / off. The same is true for the signals PSE1 and PSE2.

[0204] Before time t1, the state is normal operation. The power switch 210 is on, and the voltage VDDD is input to the CPU core 200. The scan flip-flop 221 performs normal operation. At this time, since the level shifter 214 does not need to operate, the power switch 212 is off, and the signals SCE, BK, and RC are "L". Since the node SE is "L", the scan flip-flop 221 stores the data of the node D1. Note that in the example of FIG. 32, at time t1, the node SN11 of the backup circuit 222 is "L".

[0205] The operation during backup will be described. At time t1, the PMU 193 stops the clock signal GCLK1 and sets the signals PSE2 and BK to “H.” The level shifter 214 becomes active and outputs the signal BKH at “H” to the backup circuit 222.

[0206] The transistor M11 of the backup circuit 222 turns on, and the data of the node Q1 of the scan flip-flop 221 is written to the node SN11 of the backup circuit 222. If the node Q1 of the scan flip-flop 221 is "L", the node SN11 remains "L", and if the node Q1 is "H", the node SN11 becomes "H".

[0207] The PMU 193 sets signals PSE2 and BK to "L" at time t2, and sets signal PSE0 to "L" at time t3. At time t3, the state of the CPU core 200 transitions to a power gating state. Note that signal PSE0 may also fall at the same timing as signal BK falls.

[0208] The operation during power gating will be described. When the signal PSE0 goes to "L", the voltage of the V_VDD line drops, and the data at the node Q1 is lost. The node SN11 continues to hold the data at the node Q1 at time t3.

[0209] The operation during recovery will be explained below. At time t4, the PMU 193 changes the signal PSE0 to "H", transitioning from the power gating state to the recovery state. Charging of the V_VDD line begins, and when the voltage of the V_VDD line reaches VDDD (time t5), the PMU 193 changes the signals PSE2, RC, and SCE to "H".

[0210] The transistor M12 turns on, and the charge of the capacitive element C11 is distributed to the nodes SN11 and SD. If the node SN11 is "H", the voltage of the node SD rises. Since the node SE is "H", the data of the node SD is written to the input side latch circuit of the scan flip-flop 221. When the clock signal GCLK1 is input to the node CK at time t6, the data of the input side latch circuit is written to the node Q1. In other words, the data of the node SN11 is written to the node Q1.

[0211] At time t7, the PMU 193 sets the signals PSE2, SCE, and RC to "L," and the recovery operation ends.

[0212] The backup circuit 222 using OS transistors has low dynamic and static power consumption and is therefore very suitable for normally-off computing. Even if the flip-flop 220 is installed, the performance degradation of the CPU core 200 and the increase in dynamic power consumption are hardly caused.

[0213] The CPU core 200 may have multiple power domains that can be power-gated. The multiple power domains are provided with one or more power switches for controlling the input of voltage. The CPU core 200 may also have one or more power domains in which power gating is not performed. For example, a power gating control circuit for controlling the flip-flop 220 and the power switches 210 to 212 may be provided in the power domain in which power gating is not performed.

[0214] The application of the flip-flop 220 is not limited to the CPU 10. In a computing device, the flip-flop 220 can be applied to a register provided in a power domain capable of power gating.

[0215] This embodiment mode can be appropriately combined with the descriptions of other embodiment modes.

[0216] (Embodiment 6) In this embodiment, the configuration of an integrated circuit including the configuration of the semiconductor device 100 described in the above embodiment will be described with reference to FIGS.

[0217] FIG. 33 is an example of a block diagram for explaining an example of the configuration of an integrated circuit including the configuration of the semiconductor device 100. As shown in FIG.

[0218] The integrated circuit 390 shown in FIG. 33 has a CPU 10, an accelerator 20, an on-chip memory 131, a DMAC (Direct Memory Access Controller) 141, a power supply circuit 160, a power management unit (PMU) 142, a security circuit 147, a memory controller 143, a DDR SDRAM (Double Data Rate Synchronous Dynamic Random Access Memory) controller 144, a USB (Universal Serial Bus) interface circuit 145, a display interface circuit 146, a bridge circuit 150, an interrupt control circuit 151, an interface circuit 152, a battery control circuit 153, and an ADC (Analog-to-digital converter) / DAC (Digital-to-analog converter) interface circuit 154.

[0219] The CPU 10 includes, for example, a CPU core 111, an instruction cache 112, a data cache 113, and a bus interface circuit 114. The accelerator 20 includes a memory circuit 121, an arithmetic circuit 122, and a control circuit 123.

[0220] The CPU core 111 has multiple CPU cores. The instruction cache 112 may be a circuit configuration that temporarily stores instructions to be executed by the CPU core 111. The data cache 113 may be a circuit configuration that temporarily stores data to be processed by the CPU core 111 or data obtained by the processing. The bus interface circuit 114 may be a circuit configuration that can transmit and receive signals such as data and addresses to and from a bus that connects the CPU 10 to other circuits in the semiconductor device.

[0221] The memory circuit 121 corresponds to the memory circuit 24 described in the first embodiment. The memory circuit 121 may have a circuit configuration for storing data to be processed by the accelerator 20. The arithmetic circuit 122 corresponds to the arithmetic circuit 23 described in the first embodiment. The arithmetic circuit 122 may have a circuit configuration for performing arithmetic processing of data held in the memory circuit 121. The control circuit 123 may have a circuit configuration for controlling each circuit in the accelerator 20, as shown in FIG. 5B.

[0222] The high-speed bus 140A is a bus for transmitting and receiving various signals at high speed between the CPU 10, the accelerator 20, the on-chip memory 131, the DMAC 141, the power management unit 142, the security circuit 147, the memory controller 143, the DDR SDRAM controller 144, the USB interface circuit 145, and the display interface circuit 146. As an example, an AMBA (Advanced Microcontroller Bus Architecture)-AHB (Advanced High-performance Bus) can be used as the bus.

[0223] The on-chip memory 131 has a circuit configuration for storing data or programs to be input / output to / from the circuitry included in the integrated circuit 390, such as the CPU 10 or the accelerator 20.

[0224] The DMAC 141 is a direct memory access controller. By including the DMAC 141, peripheral devices other than the CPU 10 can access the on-chip memory 131 without going through the CPU 10.

[0225] The power management unit 142 has a circuit configuration for controlling power gating of circuits such as a CPU core included in the integrated circuit 390.

[0226] The security circuit 147 has a circuit configuration for enhancing the confidentiality of signals, such as by encrypting signals before transmitting and receiving signals between the integrated circuit 390 and an external circuit.

[0227] The memory controller 143 has circuitry for writing or reading a program to be executed by the CPU 10 or the accelerator 20 from a program memory external to the integrated circuit 390 .

[0228] The DDR SDRAM controller 144 includes circuitry for reading and writing data to and from a main memory, such as a DRAM, external to the integrated circuit 390 .

[0229] The USB interface circuit 145 has a circuit configuration for transmitting and receiving data to and from a circuit external to the integrated circuit 390 via a USB terminal.

[0230] The display interface circuit 146 comprises circuitry for sending and receiving data to and from a display device external to the integrated circuit 390 .

[0231] The power supply circuit 160 is a circuit for generating a voltage used in the integrated circuit 390. For example, it is a circuit for generating a negative voltage to be applied to the back gate of an OS transistor in order to stabilize the electrical characteristics.

[0232] The low-speed bus 140B is a bus for transmitting and receiving various signals at low speed between the interrupt control circuit 151, the interface circuit 152, the battery control circuit 153, and the ADC / DAC interface circuit 154. As an example, an AMBA-APB (Advanced Peripheral Bus) can be used as the bus. Various signals are transmitted and received between the high-speed bus 140A and the low-speed bus 140B via a bridge circuit 150.

[0233] The interrupt control circuit 151 has a circuit configuration for carrying out interrupt processing in response to a request received from a peripheral device.

[0234] The interface circuit 152 has a circuit configuration for operating interfaces such as a universal asynchronous receiver / transmitter (UART), an inter-integrated circuit (I2C), or a serial peripheral interface (SPI).

[0235] The battery control circuit 153 has circuitry for transmitting and receiving data relating to charging and discharging of the battery external to the integrated circuit 390 .

[0236] The ADC / DAC interface circuit 154 has a circuit configuration for transmitting and receiving data to and from a device that outputs an analog signal, such as a MEMS (Micro Electro Mechanical Systems) device, located outside the integrated circuit 390 .

[0237] 34A and 34B are diagrams showing an example of the layout of circuit blocks when implemented as an SoC. As in the integrated circuit 390 shown in FIG. 34A, each configuration shown in the block diagram of FIG. 33 can be arranged in separate regions on a chip.

[0238] 33 can be configured with a memory circuit configured with OS transistors, such as NOSRAM. That is, the on-chip memory 131 and the memory circuit 121 have the same circuit configuration. Therefore, when fabricated into an SoC, the on-chip memory 131 and the memory circuit 121 can be integrated and arranged in the same area, as in the integrated circuit 390E illustrated in FIG. 34B.

[0239] According to the above-described embodiment of the present invention, a novel semiconductor device and electronic device can be provided. According to another embodiment of the present invention, a semiconductor device and electronic device with low power consumption can be provided. According to another embodiment of the present invention, a semiconductor device and electronic device in which heat generation can be suppressed can be provided.

[0240] This embodiment mode can be appropriately combined with the descriptions of other embodiment modes.

[0241] (Embodiment 7) In this embodiment mode, an electronic device, a mobile object, and a computing system to which the integrated circuit 390 described in the above embodiment mode can be applied will be described with reference to FIGS.

[0242] Fig. 35A shows an external view of an automobile as an example of a moving body. Fig. 35B shows a simplified diagram of data exchange within the automobile. The automobile 590 has a plurality of cameras 591 and the like. The automobile 590 also includes various sensors (not shown) such as an infrared radar, a millimeter wave radar, and a laser radar.

[0243] In an automobile 590, the above-mentioned integrated circuit 390 can be used for a camera 591, etc. In the automobile 590, a plurality of images obtained by a camera 591 in a plurality of imaging directions 592 are processed by the integrated circuit 390 described in the above embodiment, and the plurality of images are collectively analyzed by a host controller 594, etc. via a bus 593, etc., so that the automobile 590 can determine the surrounding traffic conditions, such as the presence or absence of guardrails or pedestrians, and perform automatic driving. The automobile 590 can also be used in a system that performs road guidance, hazard prediction, etc.

[0244] In the integrated circuit 390, the obtained image data can be subjected to arithmetic processing such as a neural network, thereby enabling processes such as increasing the image resolution, reducing image noise, facial recognition (for crime prevention purposes, etc.), object recognition (for autonomous driving purposes, etc.), image compression, image correction (wide dynamic range), image restoration for lensless image sensors, positioning, character recognition, and reducing reflected glare.

[0245] Although an automobile is described above as an example of a moving object, the moving object is not limited to an automobile. For example, the moving object may be a train, a monorail, a ship, or an aircraft (helicopter, unmanned aerial vehicle (drone), airplane, or rocket). A semiconductor device according to one embodiment of the present invention may be applied to these moving objects to provide them with a system using artificial intelligence.

[0246] Fig. 36A is an external view showing an example of a portable electronic device. Fig. 36B is a simplified diagram showing data exchange within the portable electronic device. Portable electronic device 595 has a printed wiring board 596, a speaker 597, a camera 598, a microphone 599, and the like.

[0247] In portable electronic device 595, the integrated circuit 390 can be provided on printed circuit board 596. Portable electronic device 595 can improve user convenience by processing and analyzing a plurality of pieces of data obtained by speaker 597, camera 598, microphone 599, etc., using integrated circuit 390 described in the above embodiment. Also, the portable electronic device can be used in a system that performs voice guidance, image search, etc.

[0248] In the integrated circuit 390, the obtained image data can be subjected to arithmetic processing such as a neural network, thereby enabling processes such as increasing the image resolution, reducing image noise, facial recognition (for crime prevention purposes, etc.), object recognition (for autonomous driving purposes, etc.), image compression, image correction (wide dynamic range), image restoration for lensless image sensors, positioning, character recognition, and reducing reflected glare.

[0249] A portable game machine 1100 shown in FIG. 37A includes a housing 1101, a housing 1102, a housing 1103, a display unit 1104, a connection unit 1105, operation keys 1107, and the like. The housings 1101, 1102, and 1103 are removable. By attaching the connection unit 1105 provided in the housing 1101 to the housing 1108, a video output to the display unit 1104 can be output to another video device. On the other hand, by attaching the housings 1102 and 1103 to the housing 1109, the housings 1102 and 1103 are integrated to function as an operation unit. The integrated circuit 390 described in the above embodiment can be incorporated in a chip provided on a substrate of the housings 1102 and 1103.

[0250] 37B shows a stick-type electronic device 1120 of a USB connection type. The electronic device 1120 has a housing 1121, a cap 1122, a USB connector 1123, and a board 1124. The board 1124 is housed in the housing 1121. For example, a memory chip 1125 and a controller chip 1126 are attached to the board 1124. The integrated circuit 390 shown in the previous embodiment can be incorporated in the controller chip 1126 of the board 1124, etc.

[0251] 37C shows a humanoid robot 1130. The robot 1130 has sensors 2101 to 2106 and a control circuit 2110. For example, the integrated circuit 390 shown in the previous embodiment can be incorporated into the control circuit 2110.

[0252] The integrated circuit 390 described in the above embodiment can be used in a server that communicates with the electronic device instead of being built into the electronic device. In this case, the electronic device and the server constitute a computing system. Figure 38 shows an example of the configuration of a system 3000.

[0253] The system 3000 is configured with an electronic device 3001 and a server 3002. Communication between the electronic device 3001 and the server 3002 can be performed via an Internet line 3003.

[0254] Server 3002 has a plurality of racks 3004. A plurality of boards 3005 are provided in the plurality of racks, and integrated circuits 390 described in the above embodiment can be mounted on the boards 3005. This forms a neural network in server 3002. Server 3002 can perform neural network calculations using data input from electronic device 3001 via internet line 3003. Results of calculations by server 3002 can be transmitted to electronic device 3001 via internet line 3003 as necessary. This can reduce the calculation load on electronic device 3001.

[0255] This embodiment mode can be appropriately combined with the descriptions of other embodiment modes.

[0256] (Additional Notes Regarding the Description of the Present Specification, etc.) The above embodiment and each configuration in the embodiment will be described below with additional notes.

[0257] The configurations shown in each embodiment can be combined with the configurations shown in other embodiments or examples to form one aspect of the present invention. In addition, when multiple configuration examples are shown in one embodiment, the configuration examples can be combined as appropriate.

[0258] In addition, the content (or a part of the content) described in one embodiment can be applied to, combined with, or replaced by another content (or a part of the content) described in that embodiment, and / or the content (or a part of the content) described in one or more other embodiments.

[0259] The contents described in the embodiments refer to contents described in each embodiment using various figures or contents described using text in the specification.

[0260] In addition, a figure (or a part of it) described in one embodiment can be combined with another part of that figure, with another figure (or a part of it) described in that embodiment, and / or with a figure (or a part of it) described in one or more other embodiments to form even more figures.

[0261] In addition, in the present specification and the like, in the block diagrams, the components are classified by function and shown as mutually independent blocks. However, in actual circuits and the like, it is difficult to separate the components by function, and there may be cases where one circuit is involved in multiple functions, or where one function is involved across multiple circuits. Therefore, the blocks in the block diagrams are not limited to the components described in the specification, and may be rephrased appropriately according to the situation.

[0262] In addition, in the drawings, the size, layer thickness, or region are shown at an arbitrary size for convenience of explanation. Therefore, they are not necessarily limited to the scale. Note that the drawings are shown diagrammatically for clarity, 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.

[0263] In addition, the positional relationship of components shown in the drawings is relative. Therefore, when describing components with reference to the drawings, terms such as "above" and "below" that indicate the positional relationship may be used for convenience. The positional relationship of components is not limited to the contents described in this specification, and can be rephrased appropriately depending on the situation.

[0264] In this specification and the like, when describing the connection relationship of a transistor, the terms "one of the source or drain" (or first electrode, or first terminal) and "the other of the source or drain" (or second electrode, or second terminal) are used. This is because the source and drain of a transistor vary depending on the structure or operating conditions of the transistor. Note that the source and drain of a transistor can be appropriately referred to as source (drain) terminal, source (drain) electrode, or the like depending on the situation.

[0265] In addition, the terms "electrode" and "wiring" used in this specification and the like do not limit the functionality of these components. For example, an "electrode" may be used as part of a "wiring", and vice versa. Furthermore, the terms "electrode" and "wiring" include cases where multiple "electrodes" or "wirings" are formed integrally.

[0266] In addition, in this specification and the like, voltage and potential can be interchanged as appropriate. Voltage is a potential difference from a reference potential, and if the reference potential is a ground voltage (earth voltage), for example, voltage can be interchanged with potential. Ground potential does not necessarily mean 0V. Note that potential is relative, and the potential applied to wiring, etc. may be changed depending on the reference potential.

[0267] 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.

[0268] In this specification, A and B are connected means that A and B are electrically connected. Here, A and B are electrically connected means a connection in which an electrical signal between A and B can be transmitted when an object (an element such as a switch, a transistor element, or a diode, or a circuit including the element and wiring) exists between A and B. Note that when A and B are electrically connected, this includes a case in which A and B are directly connected. Here, A and B are directly connected means a connection in which an electrical signal between A and B can be transmitted through wiring (or electrodes) between A and B without passing through the object. In other words, a direct connection means a connection that can be regarded as the same circuit diagram when expressed as an equivalent circuit.

[0269] In this specification, a switch refers to a device that has a function of controlling whether a current flows or not by being in a conductive state (on state) or a non-conductive state (off state), or a device that has a function of selecting and switching a path for a current to flow.

[0270] In this specification, the channel length refers to, for example, in a top view of a transistor, a region where a semiconductor (or a portion in the semiconductor through which current flows when the transistor is on) and a gate overlap, or a distance between the source and drain in a region where a channel is formed.

[0271] In this specification, the channel width refers to, for example, the length of the region where a semiconductor (or the portion in the semiconductor through which current flows when the transistor is on) and a gate electrode overlap, or the length of the portion where a source and a drain face each other in a region in which a channel is formed.

[0272] In this specification and the like, the terms "film" and "layer" can be interchanged depending on the circumstances. For example, the term "conductive layer" can be changed to the term "conductive film". Or, for example, the term "insulating film" can be changed to the term "insulating layer". EXAMPLES

[0273] As an example of a semiconductor device according to one embodiment of the present invention, a binary AI processor was fabricated using a transistor using In-Ga-Zn oxide (also referred to as an "IGZO-FET") and a Si transistor (also referred to as an "Si-FET") in a semiconductor layer in which a channel is formed. In this example, the configuration of the fabricated binary AI processor and the results of a simulation of its operation are described. The fabricated binary AI processor is a semiconductor device capable of Noff computing, as described below.

[0274] In recent years, technologies such as IoT (Internet of Things) and AI have been attracting attention. Devices used in the IoT field (IoT devices) are required to consume less power, while at the same time, high computing performance is required for AI processing.

[0275] Power gating (PG) technology is known to cut off the power supply to circuits in standby mode in order to reduce power consumption. Normally-off (Noff) computing, which combines PG technology with memory, has also been proposed as a technology to reduce power consumption in IoT devices.

[0276] In Noff computing, the system as a whole continues to operate, but for circuits that are temporarily no longer in operation, the data of the circuit is evacuated to memory, and then the power supply to the circuit is cut off. Non-volatile memories such as ReRAM (resistive random access memory), MRAM (magnetic random access memory), and PCM (phase change memory) are being considered as memories to be used in Noff computing.

[0277] The OS memory consumes less energy when writing data than the ReRAM, MRAM, and PCM, and is therefore suitable as a memory for use in Noff computing. Note that the OS transistor can also be used in the ReRAM, MRAM, and PCM.

[0278] The fabricated Binary AI Processor Chip (hereinafter referred to as "BAP900") includes a processing element (PE) formed using a 130-nm Si CMOS process and an OS memory formed on the PE using a 60-nm IGZO process.

[0279] In addition, the BAP900 uses an OS memory using IGZO-FET as a memory (W-MEM) that stores the weight parameters of the AI ​​Accelerator, and has a configuration in which the read line of the memory is directly connected to the arithmetic unit.

[0280] FIG. 39A shows a photograph of the appearance of the fabricated BAP900. FIG. 39B shows a cross-sectional TEM photograph of an enlarged portion of the BAP900. The BAP900 has layers M1 to M8. The layers M1 to M8 are layers that include conductors such as wiring or electrodes. FIG. 39B shows that an IGZO-FET and a capacitor with a MIM (Metal-Insulator-Metal) structure (MIM-Capacitor) are provided above the Si-FET. Table 8 shows the main specifications of the BAP900.

[0281] [Table 8]

[0282] The BAP900 includes circuit units 901 to 905. The circuit unit 901 includes a 32-bit ARM Cortex-M0 CPU and its peripheral circuits (Peripherals). The circuit unit 902 includes an AI Accelerator Control Logic. The circuit unit 903 includes a 32KB W-MEM formed by an IGZO process provided on the PE array (IGZO-based W-MEM (32KB) on PE Array). The circuit unit 904 includes a 16KB Scratchpad memory. The circuit unit 905 includes Power Switches.

[0283] 40 is a block diagram illustrating a detailed system configuration of the BAP 900. The BAP 900 includes a Cortex-M0 subsystem, an AI Accelerator subsystem, and peripheral circuits (Low-BW (Band Width) Peripherals) having an operating frequency lower than that of the Cortex-M0 subsystem.

[0284] The Cortex-M0 subsystem includes a 32-bit ARM Cortex-M0 CPU, a power management unit (PMU), two GPIOs (General purpose input / output), a SYSCTL, a built-in IGZO scratch memory with a storage capacity of 16KByte, UARTs (Universal Asynchronous Receiver / Transmitter), and an external memory interface (Ext-MEM IF), each of which is connected via a 32-bit AHB bus line (32b AHB).

[0285] The AI ​​Accelerator subsystem includes an AI Accelerator Control Logic, a PE Array, and a W-MEM with a memory capacity of 32 Kbytes provided on the PE array. The PE array includes 128 PEs.

[0286] The Low-BW Peripherals include power switches, SPI (Serial Peripheral Interface), timers, watch dogs, and UARTs. The power switches, SPI, timers, watch dogs, and UARTs are connected via a 32-bit APB bus line (32b APB). The power switches have the function of controlling the power supply to the Cortex-M0 subsystem.

[0287] The BAP900 also has an OSC node, a GPIO node, a VDDs node, a Sensor node, an RTC node, a USB node, and an Ext-MEM node. Signals are input and output through these nodes. For example, a clock signal (Clock) is input from the outside through the OSC node. Note that "M" in FIG. 40 indicates Master, and "S" indicates Slave.

[0288] There are two power domains: VDDs, a power supply that is always supplied from the outside via the VDDs node, and PGVDDs, a power supply that can be PGed. The PMU has the function of controlling the power supply according to the operating mode. When operating in standby mode, the PMU reduces power consumption by PGing circuits that can be PGed. By using the AI ​​Accelerator subsystem when performing AI processing (multiply-and-accumulate processing), AI processing can be performed faster and more efficiently than by the CPU.

[0289] Because BAP900 is capable of PG, power consumption of the entire system can be reduced during periods when AI processing is not being performed. On the other hand, when a signal input occurs from the sensor node, the original system state can be instantly restored and AI processing can be performed immediately.

[0290] FIG. 41A shows a circuit diagram of a memory cell 910 included in the W-MEM. The memory cell 910 is a memory cell including three IGZO-FETs and one capacitor. The capacitor has a MIM (Metal-Insulator-Metal) structure. The power supply voltage of the memory cell 910 is 3.3V. The memory cell 910 is a memory that holds charge at node SN, so data is not lost even when the power is cut off.

[0291] One memory cell 910 holds one bit of weight information W. The weight information W is written to a node SN via a wiring WBL. The weight information W written to a node SN is read out via a wiring RBL. By using eight memory cells, it is possible to hold eight bits of weight information W (also referred to as "W[7:0]") consisting of weight information W[0] to weight information W[7].

[0292] Fig. 41B is a timing chart showing an example of the operation of the memory cell shown in Fig. 41A. Fig. 41B shows potential changes of the wires WBL, WWL, RBL, and RWL in a write mode (Write), a standby mode (Sleep), and a read mode (Read). 1.7V or 0V is supplied to the wire WBL. 3.3V or 0V is supplied to the wire WWL. 1.0V or 0V is supplied to the wire RBL. 1.2V or 0V is supplied to the wire RWL. Fig. 41B also shows potential changes when data0 is supplied to the node SN, and potential changes when data1 is supplied.

[0293] FIG. 41C is a block diagram showing the configuration of the PE 920. The PE 920 is fabricated using Si logic cells with a power supply voltage of 1.2 V. The PE 920 includes a sense amplifier 921 (SA), a binary multiply-accumulate unit 924 (MAC) including a multiplier circuit 922 (Multiplier) and an adder circuit 923 (Adder tree), and an accumulator 925 (Accumulator). The accumulator 925 includes a 1-bit (1b) threshold adder for batch normalization and an 11-bit register (11-bit register).

[0294] Eight wirings RBL are connected in parallel to one PE920, and 8-bit weight information W[7:0] is input. The input weight information W[7:0] is either used for product-sum calculation processing after being amplified by a sense amplifier (SA), or is directly read out without being used for product-sum calculation processing. Which is performed is determined by the Processing / Read selector signal. When used for product-sum calculation processing, the weight W[7:0] is multiplied by the signal A[7:0] in the multiplication circuit and converted into a product signal M[7:0]. When directly read out, it is output as the signal readout[7:0].

[0295] The product signal M[7:0] is added in the adder tree circuit and converted into the sum-of-products signal MA. The MAC / BN selector signal determines whether the sum-of-products signal MA or the threshold signal TH is input to the accumulator. The accumulator has a function to output an 11-bit signal macout[10:0] and a function to output a sign bit signal via an inverter circuit.

[0296] 42A is a block diagram showing the configuration of the circuit unit 903 (IGZO-based W-MEM (32 KB) on PE Array). The circuit unit 903 includes one Global Logic circuit and four Subarray circuits (Subarray 0 to Subarray 3).

[0297] 42B is a block diagram showing the configuration of one subarray circuit. One subarray circuit includes circuit units 931 to 938. The circuit units 931 to 934 each function as a memory cell array (16kb array (128×128)) with a storage capacity of 16k bits including 128×128 memory cells 910. One memory cell array includes 128 wirings RBL (read bit lines). In addition, 128 memory cells are connected to one wiring RBL.

[0298] Each of the circuit unit 935 and the circuit unit 936 has 16 PEs 920 and a column driver (#16 of PE and Shared Column driver). The column driver of the circuit unit 935 drives the circuit unit 931 and the circuit unit 933. The column driver of the circuit unit 936 drives the circuit unit 932 and the circuit unit 934. The circuit unit 937 includes a row driver (Upper Row driver) that drives the circuit unit 931 and the circuit unit 932. The circuit unit 938 includes a row driver (Lower Row driver) that drives the circuit unit 933 and the circuit unit 934.

[0299] Therefore, 1024 wirings RBL are connected in parallel to the PE array in the entire circuit unit 903. Information read from the 1024 wirings RBL is calculated in parallel. In addition, by overlapping the row driver with the memory cell array, the energy required to read information and the chip area can be reduced.

[0300] Figure 43A shows a conceptual diagram of the transition of power consumption during the operation period of the fabricated BAP900 and the PG period (This work). As a comparative example, Figure 43B shows a conceptual diagram of the transition of power consumption during the operation period of conventional operation (without PG) (Conventional). In both Figures 43A and 43B, the vertical axis shows power consumption (Power) and the horizontal axis shows elapsed time (Time).

[0301] In conventional operation, when the power supply is stopped, information such as weight information and neural network structure is lost, so when restarting, this information must be read from ROM and written to RAM (ROM / RAM access). This makes it difficult to reduce the calculation processing time. In addition, not only the power consumption during memory access and the power consumption of the CPU increases in proportion to the calculation processing time, but also the static power consumption (Static).

[0302] The BAP900 we created starts up when the BAP900 start-up signal Rx (sensor raw data) is input from the sensor node, and raw data is transferred from the CPU to the AI ​​Accelerator subsystem. The raw data is processed in the AI ​​Accelerator subsystem, and the calculation results are output as a signal Tx (meaningful data). PG is then performed. Since parallel processing is performed in the AI ​​Accelerator subsystem, the calculation processing time is shorter (high ops) and power consumption is also lower than in conventional examples. This enables efficient calculation processing (high efficiency).

[0303] In addition, in the BAP900 we created, information required for recovery, such as weight information, is stored immediately before the start of PG. It is preferable to use OS memory to store such information. Figures 44A and 44B show an example of an information storage circuit used in the BAP900.

[0304] A data retention circuit 941 shown in FIG. 44A has a configuration in which a scan D flip-flop 941a (Scan DFF) fabricated by a Si process (Si-FET) is combined with an OS memory 941b including an IGZO-FET.

[0305] The scan D flip-flop 941a is electrically connected to the terminal CK, the terminal D, the terminal SE, and the terminal Q. The scan D flip-flop 941a is also electrically connected to the terminal Q via an IGZO-FET. The OS memory 941b is electrically connected to the terminal BK, the terminal RE, and the terminal Q.

[0306] 44B is a 1Tr1C scratch memory cell (IGZO-based scratchpad memory cell) composed of a Si-FET, an IGZO-FET, and a capacitor. The information retention circuit 942 is electrically connected to the wiring WWL, the wiring RWL, the wiring WBL, the wiring RBL, and the wiring SL.

[0307] Both the data holding circuit 941 and the data holding circuit 942 can hold, in the node SN, data required at the time of recovery.

[0308] The operation of the BAP900 was verified using circuit simulation software, which was SmartSpice by SILVACO.

[0309] In the simulation, the following operations were verified. First, the trained weight data was stored in W-MEM (Write trained W-MEM), and then the power supply was stopped (PG). Next, the power supply was restarted, and binary image data with a resolution of 28 × 28 was input via SPI (Input 28 × 28 binary image data from SPI), and an inference operation was performed (AI operation). After that, the inference result was output to SPI (Output inference result to SPI), and the power supply was stopped again.

[0310] FIG. 45A shows an example of an operation waveform after the simulation is performed. FIG. 45B shows a fully connected neural network model assumed in the simulation. In the neural network model assumed in the simulation, three hidden layers each having 128 neurons are set between an input layer having 784 neurons and an output layer having 10 neurons. In addition, in FIG. 45A and FIG. 45B, the fully connected input layer and the first hidden layer are shown as FC1, the fully connected first hidden layer and the second hidden layer are shown as FC2, the fully connected second hidden layer and the third hidden layer are shown as FC3, and the fully connected third hidden layer and the output layer are shown as FC4. It was confirmed by the simulation that the above-mentioned operation was performed without any problems.

[0311] Table 9 shows the computational efficiency and energy consumption estimated from the simulation.

[0312] [Table 9]

[0313] Simulations have revealed that the computing performance of the BAP900 using the AI ​​Accelerator subsystem is 0.82GOPS. Although not described in this embodiment, a separate simulation was conducted to compare the computing performance of the BAP900 without the AI ​​Accelerator subsystem, and found that the computing performance was approximately 215 times higher. The computing efficiency was also found to be 0.54TOPS / W.

[0314] IGZO-FETs are well suited to event-driven systems that require extremely low power consumption and fast recovery, and can be ideally used for AI applications in IoT devices and end devices. [Explanation of symbols]

[0315] 10: CPU, 20: accelerator, 21: arithmetic processing unit, 22: memory unit, 23: arithmetic circuit, 24: memory circuit, 29: semiconductor layer, 30: bus, 31: wiring, 100: semiconductor device

Claims

1. A CPU, an accelerator; the accelerator includes a first memory circuit, a drive circuit, and an arithmetic circuit; the first memory circuit includes a first transistor; the first transistor has a semiconductor layer having a metal oxide in a channel formation region; The drive circuit includes a write circuit and a read circuit, the write circuit has a function of switching data to be written into the first memory circuit between a binary voltage value or a ternary voltage value and outputting the data in response to a switching signal, a write control signal, and a data signal; the read circuit has a function of switching and reading binary or ternary data corresponding to a voltage level held in the first memory circuit in response to a first reference voltage and a second reference voltage; the drive circuit and the arithmetic circuit each have a second transistor; the second transistor has a semiconductor layer having silicon in a channel formation region; The semiconductor device, wherein the first transistor and the second transistor are stacked.

2. In claim 1, The CPU has a CPU core having a flip-flop provided with a backup circuit, The backup circuit has a function of retaining the data retained in the flip-flop in a state where the supply of a power supply voltage is stopped while the CPU is not operating.

3. In claim 1 or 2, The semiconductor device, wherein the arithmetic circuit is a circuit that performs a product-sum operation.

Citation Information

Patent Citations

  • Graphics processing unit, computer, electronic apparatus, and parallel computer

    JP2019036280A

  • Processor and electronic device

    JP2019046199A

  • Semiconductor device and electronic equipment

    JP2019047006A

  • Semiconductor device, and manufacturing method for semiconductor device

    WO2019038664A1

  • Building a binary neural network architecture

    WO2019078924A1