Neural network circuit
By using memristors and various converters connected in a lattice shape in neural network circuits, combined with bias application and offset correction technology, the problem of high bias current consumption in the existing technology is solved, and power consumption and The reduction in circuit size improves computing efficiency and signal processing speed.
Patent Information
- Application Number
- CN201910317516.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-07-06
- Filing Date
- 2019-04-19
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2039-04-19
AI Technical Summary
Existing neural network circuits have problems with large power consumption and circuit scale in tasks such as image recognition. Especially when processing sparse input data, bias current consumption is high, which affects computing efficiency and signal processing speed.
Using memristors connected in a lattice shape, combined with a D/A converter, drive amplifier, I/V conversion amplifier and A/D converter, the voltage input is controlled to reduce bias through a bias application amplifier and an offset corrector. The normal term of the current is set, and the circuit structure is optimized to reduce the circuit scale through the successive approximation A/D converter and the built-in D/A converter.
It effectively reduces the power consumption and circuit scale of the neural network circuit while maintaining the calculation accuracy and signal processing speed. Through intermittent bias setting and offset correction, the energization term of the bias current is shortened and the current consumption efficiency is improved.
Smart Images

Figure CN110401450B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to a neural network circuit including a memory section including memristors as memory elements connected in a lattice shape. Background Art
[0002] A neural network circuit includes an element having two terminals as synapses, which is nonvolatile and capable of changing a conductance value, and is called a memristor. Research on the configuration of a memristor has been proposed. In the neural network circuit, memristors are arranged in a lattice shape, voltage is applied to the memristors, and current is generated, for example, as described in Non-Patent Document 1. Figure 2 or Fig.14 As shown in . The composite current is converted into a voltage by an I / V conversion amplifier. After the waveform of the voltage is shaped by an activation function, the voltage is output as a voltage value. The memristor operates as a synapse, and the I / V conversion amplifier operates as a neuron. Thus, a neural network circuit is configured. The I / V conversion amplifier performs a product-sum calculation on the conductance value of the memristor and the applied voltage by analog calculation.
[0003] In the actual circuit, when Fig.14 When each of the inputs Vi1 to Vi3 shown in has a value of -1 to +1, Vi4=-1 is constantly applied as a bias for the threshold value.
[0004] Fig.26 An example of a ten-layer CNN (Convolutional Neural Network) is shown. Fig.26 An example of calculating the input current ratio of each input terminal in the first layer when image recognition is performed by CNN is shown. The input is provided by 28 terminals Vi1 to Vi28 to which -Vb to +Vb are applied, and the output is provided by 96 terminals Vo1 to Vo96. The input bias is calculated in a state where Vi28=-Vb is satisfied and Vi28 is constantly applied.
[0005] Since the input data is sparse, the bias current is one or more digits larger than each of the actual input currents. Fig.16 In the example, the bias current represents a ratio less than 40% of the sum of the input currents.
[0006] As another configuration of a neural network, memristors are arranged in a lattice shape, analog voltage is applied by a D / A converter, and current is generated, for example, as described in Non-Patent Document 2. Figure 2As shown in . The composite current is converted into voltage by a transimpedance amplifier and converted into digital data by an A / D converter. After calculation by the activation function, signal processing such as pooling is performed. The output data is transmitted to the D / A converter in the signal processing layer, and the signal processing is performed in multiple layers. The product-sum calculation is performed in a crossbar configured by a memristor.
[0007] Furthermore, the inventors of the present disclosure found the following.
[0008] Fig.26 An example of the configuration of a ten-layer CNN and a convolutional neural network for image recognition based on Non-Patent Document 2 is shown. Fig.26 The necessary channel numbers for the input DAC and output ADC of each signal processing layer are shown. In the convolution of the first layer, the convolution layer includes 28 input channels and 96 output channels. In the second layer, the convolution layer includes 865 input channels and 96 output channels. The 865 input channels are 96×9+1 channels obtained by adding 1 bias channel to 9 data of 96 output channels in the first layer.
[0009] Assume that a combination of a cross switch of 96 input channels / 96 output channels and a cross switch of 1 input channel / 96 output channels is adopted as a basic configuration in the second layer. The product-sum calculation of 96 input channels / 96 output channels is performed 9 times, and the product-sum calculation of 1 input channel / 96 output channels is performed once. The same calculation results of a cross switch with 865 input channels / 96 output channels are provided. In addition to a bias DAC, the number of output DACs can be matched with the number of input ADCs. However, when a configuration such as an IC is provided, it may be necessary to further reduce the DAC and ADC in terms of power consumption and area.
[0010] Non-patent document 1: "A heterogeneous computing system with memristor-basedneuromorphic accelerators", High PERFORMANCE Extreme Computing Conference, 2014IEEE
[0011] Non-patent document 2: “Low Power Convolutional Neural Networks on a Chip”, Circuits and Systems (ISCAS), 2016 IEEE
[0012] Non-patent document 3: "Advancing Memristive Analog Neuromorphic Networks: Increasing Complexity, and Coping with Imperfect Hardware Components" arXiv: 1611.04465. Summary of the invention
[0013] An object of the present disclosure is to provide a neural network circuit capable of reducing power consumption based on application of a bias voltage.
[0014] In addition, another object of the present disclosure is to provide a neural network circuit capable of reducing the circuit scale while maintaining calculation accuracy and signal processing speed.
[0015] According to one aspect of the present disclosure, a neural network circuit includes: a storage unit, which may include memristors connected in a lattice shape, each of the memristors being a variable resistance element; a plurality of D / A converters, which may receive data to apply a signal voltage and a reference voltage to a plurality of voltage input terminals of the storage unit; and a plurality of drive amplifiers, which may be connected between the plurality of D / A converters and the plurality of voltage input terminals; a plurality of I / V conversion amplifiers, which may be connected to a current output terminal of the storage unit; and may convert a current flowing in the current output terminal into a voltage to output the voltage as a signal voltage; a plurality of A / D converters, which may perform A / D conversion on the signal voltage converted by the plurality of I / V conversion amplifiers; and a plurality of offset correctors, which may be arranged in the output side of the plurality of A / D converters, and may correct an offset voltage generated in the I / V conversion amplifier. One of the voltage input terminals is a bias terminal for applying a bias voltage. At least one of the driver amplifiers that may be connected to the bias terminal is a bias applying amplifier that may apply a reference voltage and a bias voltage having an opposite polarity according to a voltage received from a corresponding D / A converter.
[0016] The offset corrector may include: a first latch circuit that can receive the output data of the A / D converter; a second latch circuit that can receive the output data of the A / D converter; a subtractor that can subtract the latch data of the first latch circuit from the latch data of the second latch circuit; and a controller that can control the D / A converter, the first latch circuit, and the second latch circuit. When performing a bias setting operation, the controller may control the bias application amplifier to output a bias voltage with an opposite polarity, control each of the D / A converters so that the driving amplifier instead of the bias application amplifier outputs the reference voltage, and also cause the first latch circuit to latch the output data of the A / D converter. When performing a normal operation, the controller may control the bias application amplifier to output the reference voltage, control each of the D / A converters so that the driving amplifier instead of the bias application amplifier outputs a signal voltage, and also cause the second latch circuit to latch the output data of the A / D converter. The controller may output the subtraction result of the subtractor as signal data.
[0017] Since the bias current flows in the storage section only at the time of the bias setting operation, the normal term of the bias current can be shortened and the current consumption can be reduced. The offset voltage can be corrected while shortening the normal term.
[0018] In addition, according to another aspect of the present disclosure, a neural network circuit includes: at least one storage unit in a storage unit, which may include memristors connected in a lattice shape, each of the memristors being a variable resistance element; a plurality of D / A converters, which may receive data to apply a signal voltage to a plurality of voltage input terminals of the storage unit; and a plurality of drive amplifiers, which may be connected between the plurality of D / A converters and the plurality of voltage input terminals; a plurality of I / V conversion amplifiers, which may be connected to a current output terminal of the storage unit; and convert a current flowing in the current output terminal into a voltage to output the voltage; and a plurality of computing units, which may include a plurality of A / D converters, and the plurality of A / D converters may perform A / D conversion on the signal voltage converted by the plurality of I / V conversion amplifiers.
[0019] The A / D converter may have a successive approximation converter, and the successive approximation converter may include a resistor string type D / A converter as a built-in D / A converter. The built-in D / A converter may be switched so that a signal voltage of a calculation result performed by the storage section is applied to a plurality of drive amplifiers arranged corresponding to the storage section of the calculation unit in the next layer.
[0020] With a configuration employing a built-in D / A converter, the circuit scale can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description made with reference to the accompanying drawings. In the accompanying drawings:
[0022] Figure 1 It is shown in Figure 2 A diagram of the configuration shown in ;
[0023] Figure 2 is a functional block diagram showing an analog product-sum calculation circuit of a neural network circuit;
[0024] Figure 3 is a diagram showing a buffer circuit arranged on the input side of a D / A converter;
[0025] Figure 4 is a functional block diagram showing the internal configuration of a subtractor;
[0026] Figure 5 is a diagram showing an example of an activation function;
[0027] Figure 6 is a diagram showing a configuration of an activation function calculator;
[0028] Figure 7 is a functional block diagram showing the configuration of an offset correction controller;
[0029] Figure 8 is a timing diagram showing the operation of the offset correction controller;
[0030] Fig. 9 is a flow chart showing the circuit operation of offset correction;
[0031] Fig.10 is a functional block diagram showing the configuration of an offset correction controller according to a second embodiment;
[0032] Fig.11 is a timing diagram showing the operation of the temperature sensor;
[0033] Fig.12 is a functional block diagram showing an analog product-sum calculation circuit configuring a neural network circuit according to a third embodiment;
[0034] Fig.13 is a flow chart showing the circuit operation of offset correction;
[0035] Fig.14 It is the same as that of non-patent document 1 Figure 2 The corresponding figure;
[0036] Fig.15It is shown that by adopting Fig.14 A diagram showing an example configuration of a 10-layer CNN configured with the circuit shown in ;
[0037] Fig.16 Shows that when Fig.15 An example of calculating the input current ratio of each input terminal in the first layer when a CNN performs image recognition;
[0038] Fig.17 is a functional block diagram showing an analog product-sum calculation circuit of a neural network circuit according to a fifth embodiment;
[0039] Fig.18 is a view explaining each operation mode among the operation modes of the A / D converter;
[0040] Fig.19 is a functional block diagram showing a state in which a plurality of analog product-sum calculation circuits are connected in series;
[0041] Fig. 20 is a diagram showing a configuration of a crossbar switch circuit;
[0042] Fig.21 It is the same as that of non-patent document 3 Figure 1 (d) The corresponding graph;
[0043] Fig. 22 is a functional block diagram showing an analog product-sum calculation circuit including a plurality of crossbar switches according to a sixth embodiment;
[0044] Fig.23 is a functional block diagram showing an analog product-sum calculation circuit according to a seventh embodiment;
[0045] Fig.24 is a diagram showing a differential amplifier and an A / D converter on the output side of a plurality of crossbar switch circuits;
[0046] Fig.25 is a functional block diagram schematically showing an analog product-sum calculation circuit including a plurality of crossbar switches; and
[0047] Fig.26 This is a diagram showing a configuration example of a 10-layer CNN configured by adopting the circuit shown in Non-Patent Document 2. DETAILED DESCRIPTION
[0048] Hereinafter, various embodiments will be described with reference to the accompanying drawings.
[0049] (First embodiment)
[0050] A first embodiment will be described. Figure 2The analog product-sum calculation circuit 1 of the neural network circuit shown in the figure causes the D / A converter 2 to perform voltage conversion on the input data Data_in. The converted voltage is applied to the memristor cross switch circuit 4 via the driver amplifier 3. The driver amplifier 3 corresponds to the driver amplifier. The memristor cross switch circuit 4 includes a memristor as a storage element. In the configuration of the memristor cross switch circuit 4, a plurality of storage elements are arranged in a lattice shape. The memristor cross switch circuit 4 corresponds to the storage unit.
[0051] The cross switch circuit 4 outputs a current according to the conductance value set in each storage element. The current is converted into a voltage by the sense amplifier 7. The voltage converted by the sense amplifier 7 is A / D converted by the A / D converter 8 to be output as digital data. The sense amplifier 7 corresponds to an I / V conversion amplifier. The data is input to the activation function calculator 10 via the subtractor 9. In the activation function calculator 10, for example, Figure 5 The ramp function f(x) of the following expression shown in can be applied to the input data as an activation function of the neural network circuit.
[0052] f(x)=max(0,x)...(1)
[0053] The ramp function f(x) has a positive polarity. The output data Data_out is input to the analog product-sum calculation circuit 1 of the next stage.
[0054] The offset correction controller 11 corrects the offset contained in the output data of the A / D converter 8 by controlling the D / A converter 2 and the subtractor 9. The offset corrector 30 includes the subtractor 9 and the offset correction controller 11. More D / A converters 2, driving amplifiers 3, sense amplifiers 7, A / D converters 8, etc. may be placed. Figure 1 More details are shown in Figure 2 The input and output parts of the memristor crossbar switch circuit 4 shown in FIG.
[0055] Figure 3 The buffer circuit 12 in the data input section of the D / A converter 2 is shown. When the input data DI is n bits, the OR gate 13 is arranged corresponding to the most significant bit DI[n-1], and the AND gates 14[n-2] to 14[0] are arranged corresponding to the other lower bits DI[n-2] to DI[0]. The corresponding input data DI is supplied to one of the input terminals of the logic gate 13 and the logic gate 14. The enable signal EN output by the offset correction controller 11 is supplied to the other input terminal. The enable signal EN is applied to the OR gate 13 via the NOT gate 15.
[0056] When the enable signal EN=0 is satisfied, in the input data of the D / A converter 2, the MSB DI[n-1] is "1", and all other lower bits DI[n-2] to DI[0] are "0". Figure 1 As shown in FIG, the enable signal EN input to the D / A converter 2 (B) is the control signal Bias_DAC_select output from the offset correction controller 11. The other D / A converters 2 (1) and 2 (2) and so on are controlled by the control signal Data_DAC_select.
[0057] With respect to the D / A converters 2 ( 1 ) and 2 ( 2 ), a conversion voltage is outputted with respect to the control signal as follows.
[0058] Data_DAC_select Output Voltage
[0059] 0 (initial operation) Reference voltage Vref
[0060] 1 (Normal Operation) Signal voltage relative to input data
[0061] For D / A converter 2 (B) Bias_DAC_select, a conversion voltage is output with respect to a control signal as follows.
[0062] Bias_DAC_select Output voltage
[0063] 0 (normal operation) Reference voltage Vref
[0064] 1 (initial operation) Bias voltage of opposite polarity +Vb
[0065] The “initial operation” and the “normal operation” will be described later.
[0066] As in Figure 4 As shown in , the subtractor 9 includes a first latch circuit 16 (1), a second latch circuit 16 (2), a latch control circuit 17, and a subtractor 18. Input data DI is input to the latch circuit 16, and the latch control circuit 17 inputs a latch signal. The latch control circuit 17 includes OR gates 19 (1) and 19 (2) and a NOT gate 20. The latch signal; LE is input to one of the input terminals of the OR gates 19 (1) and 19 (2), and the selection signal Latch_select; SEL is input to the other input terminal. The selection signal SEL is input to the OR gate 19 (1) via the NOT gate 20.
[0067] As in Figure 6As shown in , the activation function calculator 10 includes n AND gates 21[n-1] to 21[0]. The data D[n-1] to D[0] output from the subtractor 9 is provided to one of the input terminals of the AND gate 21, and the data D[n-1] is commonly provided to the other input terminal of the input terminal.
[0068] As in Figure 7 As shown in , the offset correction controller 11 includes a counter 22. The clock signal Clock is input to the input terminal of the counter 22. The setting value data Data_set of the count value is input to the counter 22. The counter 22 counts the count value to set the output signal Q to a high level within one clock period. The counter 22 sets the inverted signal QN of the output signal Q to a low level within one clock period. Incidentally, the high level of the present disclosure may mean a predetermined high state, and the low level may mean a predetermined low state.
[0069] The output terminal QN of the counter 22 outputs the control signal Data_DAC_select and the control signal Latch_select. The output terminal Q of the counter 22 outputs the control signal Bias_DAC_select.
[0070] Figure 8 2 is a timing chart showing the operation of the offset correction controller 11. The offset correction controller 11 sets the execution frequency of the initial state by the count value of the counter 22. In the initial state, the offset voltage Voff and the bias voltage +Vbias having the opposite polarity are retrieved. The execution frequency is set so as to allow the influence of the temperature drift of the offset voltage Voff of the sense amplifier 7 or the conductance in the memristor as an error of the calculation result.
[0071] This example shows a case where the data value Data_set set in the counter 22 is "4". Bias_DAC_select is set to a high level for every four counts of the clock signal Clock. The control signals Data_DAC_select and Latch_select are inversions of the control signal Bias_DAC_select.
[0072] The D / A converters 2(1) and 2(2) are in "initial operation" every 4 clock cycles, and are otherwise in "normal operation". The D / A converter 2(B) is in "initial operation" every 4 clock cycles in synchronization with the D / A converters 2(1) and 2(2), and is otherwise in "normal operation".
[0073] The operation of the embodiment will be described. Fig. 9 Shown according to Figure 8In step S1, when the bias side operation mode of the offset correction controller 11 is in the "initial operation" (S2), the D / A converters 2(1) and 2(2) output the reference voltage Vref, and the D / A converter 2(B) outputs the bias voltage +Vb of the opposite polarity (S3). The "initial operation" corresponds to the bias setting operation.
[0074] Assume that the voltage range in which the voltage can be applied to both ends of the memristor is included within ±Vb, and the reference voltage Vref applied to the sense amplifier 7 is, for example, 0 V. "Initial operation" refers to a state in which no potential difference is generated between both ends of the memristor. The voltage is defined as follows:
[0075] Vin1=Vin2=0V, VinB=+Vb.
[0076] When the offset voltage Voff is generated in the sense amplifier 7, the output voltage Vout is obtained by adding the output voltage +Vbias when the bias voltage +Vb having the opposite polarity is applied to the offset voltage Voff. The output voltage Vout is defined as follows:
[0077] Vout=Voff+Vbias.
[0078] Since Latch_select=0 is satisfied, the latch circuit 16 ( 2 ) of the subtractor 9 latches data corresponding to the output voltage (Voff+Vbias) of the sense amplifier 7 ( S4 ).
[0079] On the other hand, in step S1, when the bias side operation mode of the offset correction controller 11 is in "normal operation" (S5), the D / A converters 2 (1) and 2 (2) output the signal voltages Vin1 and Vin2, respectively. The D / A converter 2 (B) outputs the reference voltage Vref (S6). The output of the sense amplifier 7 corresponds to the voltage (Vout+Voff) obtained by adding the offset voltage Voff to the output voltage Vout according to the signal voltage Vin. Since Latch_select=1 is satisfied, the latch circuit 16 (1) latches the data corresponding to the output voltage (Vout+Voff) of the sense amplifier 7 (S7).
[0080] The subtractor 18 of the subtractor 9 subtracts the data of the latch circuits 16(2) and 16(10) (S8). The subtraction result can be described as follows:
[0081] (Vout+Voff)-(Voff+Vbias)=Vout-Vbias.
[0082] Therefore, the obtained data corresponds to a voltage obtained by adding the output voltage -Vbias when the bias voltage -Vbias having a positive polarity is applied to the output voltage Vout of the sense amplifier 7. The offset voltage Voff is canceled.
[0083] In the configuration, the signal voltage Vin and the reference voltage Vref are applied to a plurality of voltage input terminals of a cross switch circuit 4 including a memristor as a storage element via a D / A converter 2 and a driving amplifier 3. The current flowing in the current output terminal of the memristor cross switch circuit 4 is converted into a voltage by a sense amplifier 7. The A / D converter 8 performs A / D conversion on the voltage (in other words, the A / D converter 8 performs A / D conversion). The offset corrector 30 is arranged in the output side of the A / D converter 8, and corrects the offset voltage Voff generated in the sense amplifier 7.
[0084] The driving amplifier 3 (B) connected to the bias terminal of the memristor crossbar switch circuit 4 applies a reference voltage Vref and a bias voltage +Vb having an opposite polarity according to the voltage input from the D / A converter 2 (B).
[0085] In the initial operation, the offset correction controller 11 controls each of the D / A converters 2 to output the reference voltage Vref to the driver amplifiers 3(1) and 3(2), while causing the driver amplifier 3(B) to output a bias voltage having an opposite polarity. The offset correction controller 11 causes the first latch circuit 16(1) to latch the A / D converted data.
[0086] In the normal operation, the offset correction controller 11 controls each of the D / A converters 2 to output the signal voltage Vin to the driver amplifiers 3(1) and 3(2), while causing the driver amplifier 3(B) to output the reference voltage Vref. Then, the offset correction controller 11 causes the second latch circuit 16(2) to latch the A / D converted data. The subtractor 18 outputs the subtraction result of the latch data of the second latch circuit 16(2) and the first latch circuit 16(1) as the signal data DOUT.
[0087] In the configuration, the bias current flows in the memristor cross switch circuit 4 only in the initial operation. Therefore, the energization term of the bias current can be shortened and the current consumption can be reduced. The correction of the offset voltage Voff can be performed while shortening the energization term. Since the offset correction controller 11 intermittently performs the initial operation, the energization term of the bias current is further shortened.
[0088] Specifically, the offset correction controller 11 performs the initial operation whenever the clock count value of the clock signal of the counter 22 reaches a predetermined value "4". When the count value reaches the predetermined value, the counter 22 changes the output signal Q to a high level within one clock period. The offset correction controller 11 controls the D / A converter 2 (B) by outputting a control signal Bias_DAC_select from the output terminal Q of the counter 22. The offset correction controller 11 controls the D / A converters 2 (1) and 2 (2) by outputting a control signal Data_DAC_select from the output terminal QN of the counter 22. The offset correction controller 11 controls the latch timing of the latch circuits 16 (1) and 16 (20) by outputting a control signal Latch_select from the output terminal QN of the counter 22. Therefore, the power-on item of the bias current can be set to one clock period every four clock periods.
[0089] The D / A converter 2 includes a buffer circuit 12 having a control terminal for controlling the value of input data. The buffer circuit 12 inputs data to the corresponding drive amplifier 3 so as to output a reference voltage Vref with respect to a binary level change of an enable signal EN supplied to the control terminal. Thus, it is possible to easily switch between the initial operation and the normal operation.
[0090] (Second embodiment)
[0091] Hereinafter, a second embodiment of the present disclosure will be described. In the second embodiment, parts similar to or corresponding to those of the first embodiment will be represented by the same reference numerals or symbols, and explanations thereof will be omitted. Differences from the first embodiment will be described. The second embodiment adopts Fig.10 The offset correction controller 31 shown in FIG. 1 is an offset correction controller 31 instead of the offset correction controller 11 . The offset correction controller 31 includes a temperature sensor 33 and a D flip-flop 32 instead of the counter 22 .
[0092] The temperature sensor 33 includes a reset terminal and an output terminal for outputting a signal DT. For example, the temperature sensor 33 detects the temperature of the periphery of the memristor crossbar switch circuit 4. The output terminal of the temperature sensor 33 is connected to the input terminal D of the D flip-flop 32. The reset terminal is connected to the output terminal QN of the D flip-flop 32. The offset corrector 40 includes an offset correction controller 31.
[0093] As in Fig.11As shown in , when a change equal to or greater than the set value is generated, the temperature sensor 33 sets the signal DT to a high level, regardless of whether the detected temperature rises or falls. The D flip-flop 32 is synchronized with the clock signal Clock to retrieve the data value "1", and sets the output terminal Q to a high level. Thus, the initial operation on the bias side is performed. When the output terminal Q is set to a high level, the output terminal QN is set to a low level. The temperature sensor 33 is reset. Since the signal DT is changed to a low level, the output terminal QN is set to a high level in the next Clock. The reset of the temperature sensor 33 is released.
[0094] In the second embodiment, when the change level of the temperature detected by the temperature sensor 33 exceeds a predetermined level, the offset correction controller 31 performs an initial setting operation on the bias side. Specifically, the temperature sensor 33 includes a reset terminal that changes the output signal DT to a high level and changes the output signal DT to a low level when the change level of the temperature exceeds a predetermined level. For example, the predetermined level may correspond to a predetermined range.
[0095] The output terminal of the temperature sensor 33 is connected to the input terminal D of the D flip-flop 32. The reset terminal is connected to the output terminal QN. Each of the control signals Bias_DAC_select, Data_DAC_select, and Latch_select is output by a similar configuration to the offset correction controller 11 in the first embodiment. In the configuration, the initial setting operation on the bias side is performed only when the change level of the temperature exceeds a predetermined level. Therefore, the power-on term can be shortened by exciting the bias current at a necessary timing.
[0096] (Third Embodiment)
[0097] exist Fig.12 In the analog product-sum calculation circuit 41 of the third embodiment shown in FIG. 1 , the sense amplifiers 7(1) and 7(2) of the first embodiment are described as sense amplifiers 7(1p) and 7(1n), respectively. The output terminals of the sense amplifiers 7(1p) and 7(1n) are connected to each input terminal of the differential amplifier 42. The output terminal of the differential amplifier 42 inputs the output voltage Vout1 to the A / D converter 8(1). The analog product-sum calculation circuit 41 has a differential configuration.
[0098] The operation of the third embodiment will be described. It is assumed that the characteristics of the memristor operate nonlinearly when a reverse bias having a large amplitude is applied. In the assumed case, the calculation error can be reduced by setting the input signal voltage and the bias voltage as a unipolar voltage input in a differential configuration. Similar to the first embodiment, in the analog product-sum calculation circuit 41, a bias voltage +Vb having a polarity similar to the opposite polarity of the input signal is applied. Calculation of offset correction is performed.
[0099] When a bias voltage is applied in normal operation, the conductance of the memristor is set to G1B≥G2B. The third embodiment adopts differential output. Therefore, when the conductance is previously set to G1B≤G2B, the polarity of the output voltage can be reversed (S0). Fig.13 As shown in , in step S11, instead of step S3, a bias voltage +Vb having a polarity similar to that of the input signal is output to the D / A converter 2. The calculation is performed similarly to the first embodiment.
[0100] In the third embodiment, similar to the first embodiment, the problem of temperature variation of the offset of the sense amplifier 7 or the conductance of the memristor can be solved while reducing the energized term of the bias current.
[0101] (Fourth embodiment)
[0102] The data value set in the counter 22 may not be limited to “4.” The activation function may be a function other than a ramp function.
[0103] According to one aspect of the present disclosure, a neural network circuit includes: a storage unit, which may include memristors connected in a lattice shape, each of the memristors being a variable resistance element; a plurality of D / A converters, which may receive data to apply a signal voltage and a reference voltage to a plurality of voltage input terminals of the storage unit; a plurality of drive amplifiers, which may be connected between the plurality of D / A converters and the plurality of voltage input terminals; a plurality of I / V conversion amplifiers, which may be connected to a current output terminal of the storage unit and may convert a current flowing in the current output terminal into a voltage to output the voltage as a signal voltage; a plurality of A / D converters, which may perform A / D conversion on the signal voltage converted by the plurality of I / V conversion amplifiers; and a plurality of offset correctors, which may be arranged in the output side of the plurality of A / D converters and may correct an offset voltage generated in the I / V conversion amplifier. One of the voltage input terminals is a bias terminal for applying a bias voltage. At least one of the driver amplifiers that may be connected to the bias terminal may be a bias applying amplifier that may apply a reference voltage and a bias voltage having an opposite polarity according to a voltage received from a corresponding D / A converter.
[0104] The offset corrector may include: a first latch circuit that can receive output data of an A / D converter; a second latch circuit that can receive the output data of the A / D converter; a subtractor that can subtract the latch data of the first latch circuit from the latch data of the second latch circuit; and a controller that can control the D / A converter, the first latch circuit, and the second latch circuit. When performing a bias setting operation, the controller may control the bias application amplifier to output a bias voltage with opposite polarity, control each of the D / A converters to make a driving amplifier other than the bias application amplifier output a reference voltage, and also make the first latch circuit latch the output data of the A / D converter. When performing a normal operation, the controller may control the bias application amplifier to output a reference voltage, control each of the D / A converters to make a driving amplifier other than the bias application amplifier output a signal voltage, and also make the second latch circuit latch the output data of the A / D converter. The controller may output the subtraction result of the subtractor as signal data.
[0105] For example, when the bias voltage with the opposite polarity can be set to +Vb, the data latched in the first latch circuit in the bias setting operation can correspond to the voltage (Voff+Vbias) obtained by adding the output voltage Vbias when the bias with the opposite polarity is applied to the offset voltage Voff generated in the I / V conversion amplifier. The data latched in the second latch circuit in the normal operation can correspond to the voltage (Vout+Voff) obtained by adding the offset voltage Voff with respect to the signal voltage Vin that can be input to the I / V conversion amplifier to the output voltage Vout of the amplifier.
[0106] The subtraction result of the subtractor can be described as follows:
[0107] (Vout+Voff)–(Voff+Vbias)=Vout-Vbias.
[0108] The offset voltage can be canceled, and the subtraction result also corresponds to a voltage to which the bias voltage -Vb can be added. Since the bias current flows in the storage unit only during the bias setting operation, the normal term of the bias current can be shortened and the current consumption can be reduced. The offset voltage can be corrected while shortening the normal term.
[0109] According to another aspect of the present disclosure, similarly, a neural network circuit may have a configuration of a storage unit, a D / A converter, a driving amplifier, and an I / V conversion amplifier. It may be different in a differential configuration. In a differential configuration, the differential amplifier may perform a differential calculation on the outputs of two I / V conversion amplifiers forming a pair. In the storage unit, the conductance value of the differential pair of memristors may be changed in advance to reverse the polarity of the bias voltage.
[0110] That is, the conductance value of the differential pair of the memristor may be changed in advance to invert the polarity of the bias voltage, which may be added to the memristor. The operation may correspond to an operation of causing a bias application amplifier to output a bias voltage having a reverse polarity at the time of a bias setting operation. When the output side of the storage section may have a differential configuration, current consumption may be similarly reduced.
[0111] In the neural network circuit, since the controller intermittently performs the bias setting operation, the current consumption can be further reduced.
[0112] (Fifth Embodiment)
[0113] A fifth embodiment will be described. Fig. 20 1 shows an analog product-sum calculation circuit 1001 of a neural network circuit. The analog product-sum calculation circuit 1001 causes a D / A converter 1002 to perform voltage conversion on input data Data_in. The converted voltage is applied to a memristor crossbar switch circuit 1004 via a driver amplifier 1003. The memristor crossbar switch circuit 1004 includes a memristor G as a storage element. 1011 To G 1042 In the configuration of the memristor crossbar switch circuit 1004, a plurality of storage elements are arranged in a lattice shape. The memristor crossbar switch circuit 1004 corresponds to a storage section.
[0114] The cross switch circuit 1004 outputs a current relative to the conductance value set in each of the storage elements. The current is converted into a voltage by the sense amplifier 1005. The sense amplifier 1005 corresponds to an I / V conversion amplifier. In the embodiment, the analog product-sum calculation circuit 1001 has a differential configuration. Each of the output terminals of the sense amplifiers 1005 (1) and 1005 (2) is connected to each of the input terminals of the differential amplifier 1006 (1). The A / D converter 1007 (1) performs A / D conversion on the output voltage of the differential amplifier 1006 (1) to output as digital data. The A / D converter can be referred to as an ADC, and the D / A converter can be referred to as a DAC.
[0115] Fig.211 is a graph corresponding to the graph of non-patent document 3 ("Advancing Memrisitive Analog Neuromorphic Networks: Increasing Complexity, and Coping with Imperfect Hardware Components" arXiv:1611.04465). As shown in the IV curve of the memristor, when the polarity of the applied read voltage is always applied in a similar direction, the accuracy of the resistance value is provided. Therefore, it may be necessary to express the polarity by using the difference between the conductances of the two memristors. The output voltage V of the differential amplifier 1006 (1) is diff1 The computational paradigm can be described as follows:
[0116] V diff1 = k{V in1 (G 1011 -G 1021 )+V in2 (G 1012 -G 1022 )}.
[0117] The value k is the gain.
[0118] Memristor-based G 1011 With G 1021 The magnitude relationship between the conductance and the memristor's 1012 With G 1022 The magnitude relationship of the conductance between the two, the output polarity can be reversed relative to the input of similar polarity. However, in the differential configuration, the number of amplifiers increases. In the neural network circuit, the analog product-sum calculation circuit 1001 corresponds to one calculation unit. By using multiple calculation units to perform multiple CNN calculations, as in Fig.26 Therefore, difficulties may arise with respect to power consumption and the area of analog circuits including the DAC and the ADC.
[0119] The embodiment adopts the following configuration.
[0120] As in Fig.19 As shown in , the A / D converter 1007 corresponds to a successive approximation ADC.
[0121] A D / A converter built in a successive approximation ADC is also used to input data to the memristor crossbar switch circuit 1004 through the analog product-sum calculation circuit 1001 in the next layer.
[0122] The built-in D / A converter is also used for offset correction of the differential amplifier, and a configuration employing the built-in D / A converter is built in a successive approximation ADC. The details of the configuration will be described.
[0123] As in Fig.17 As shown in , the successive approximation type A / D converter 1007 includes a comparator 1011, a logic section 1012, a built-in DAC section 1013, and a driver amplifier 1014. The comparator 1011 includes a tracking / holding circuit 1015 and a comparator 1016. The output voltage of the differential amplifier 1006 is input to the tracking / holding circuit 1015. The tracking / holding circuit 1015 outputs the output voltage to the non-inverting input terminal of the comparator 1016 unless the level of the output voltage is maintained at a predetermined timing.
[0124] The inverting input terminal of the comparator 1016 receives the reference voltage Vref via the switch SW1001, and is connected to the output terminal of the driver amplifier 1014 via the switch SW1002. The non-inverting input terminal and the inverting input terminal of the differential amplifier 1006 (1) are connected to the output terminals of the sense amplifiers 1005 (1) and 1005 (2) via the switches SW1020 and SW1022, respectively. The inverting input terminal is connected to the output terminal of the differential amplifier 1006 (1) via the switch SW1021 and the resistor element. The non-inverting input terminal is connected to the output terminal of the driver amplifier 1014 via the switch SW1023 and the resistor element.
[0125] The logic unit 1012 includes a SAR logic unit 1017, an N-bit register 1018, an offset register 1019, a latch adder 1020, a ReLU calculator 1021, and a latch / pooling calculator 1022. The SAR logic unit 1017 of the logic unit 1012 performs control corresponding to the successive approximation ADC. The N-bit register 1018 stores N-bit data of the result obtained by the A / D conversion by the SAR logic unit 1017. The offset register 1019 stores the offset voltage data of the differential amplifier 1006, which is A / D converted by the A / D converter 1007.
[0126] The latch adder 1020 latches the data stored in the N-bit register 1018 to perform addition. The ReLU calculator 1021 calculates the data input from the latch adder 1020. In the calculation, for example, a ramp function f(x) of the following expression is applied as an activation function of the neural network circuit.
[0127] f(x)=max(0,x)...(1).
[0128] The latch / pooling calculator 1022 latches the data input from the ReLU calculator 1021 to perform pooling calculation.
[0129] The output terminals of the N-bit register 1018, the offset register 1019, and the latch / pooling calculator 1022 are connected to the input terminals of the built-in DAC unit 1013 via switches SW1010, SW1011, and SW1012, respectively. The built-in DAC unit 1013 includes a resistor string unit 1023 and a decoder 1024. The resistor string unit 1023 includes a series resistor circuit, and each of the reference voltages is applied for D / A conversion. The decoder 1024 decodes and switches the data input from the logic unit 1012 so as to appropriately apply the reference voltage generated by the resistor string unit 1023. The voltage of the D / A conversion result output from the decoder 1024 is input to the driver amplifier 1014.
[0130] The built-in DAC section 1013(2) of the A / D converter 1007(2) commonly uses the resistor string section 1023 of the built-in DAC section 1013(1). The same applies to the A / D converter 1007(3) and thereafter (not shown).
[0131] The operation of the embodiment will be described. Fig.18 As shown in , the A / D converter 1007 performs three operation modes including an offset correction mode, a signal reading mode, and a DAC output mode.
[0132] <Deskew Correction Mode>
[0133] In the offset correction mode, the A / D converter 1007 corrects the offset voltage generated on the input side of the differential amplifier 1006. In a state where the output of the cross switch circuit 1004 is a no-signal state, the switches SW1020 to SW1023 are turned on to operate the differential amplifier 1006. The track / hold circuit 1015 is set in a tracking state, and the output voltage of the differential amplifier 1006 is input to the non-inverting input terminal of the comparator 1016.
[0134] The switch SW1001 is turned on and the switch SW1002 is turned off to input the reference voltage Vref to the inverting input portion of the comparator 1016. The switch SW1010 is turned on, and the switches SW1011 and SW1012 are turned off to allow the driver amplifier 1014 to operate as an offset buffer for the differential amplifier 1006. The SAR logic section 1017 provides the operation of the successive approximation ADC, and the offset voltage of the differential amplifier 1006 is A / D converted. The offset register 1019 stores the converted data.
[0135] <Signal Reading Mode>
[0136] In the signal reading mode, the A / D converter 1007 performs the operation of a successive approximation type ADC. The switches SW1020 to SW1023 are turned on to operate the differential amplifier 1006. The switch SW1001 is turned off and the switch SW1002 is turned on to input the output voltage of the drive amplifier 1014 to the inverting input terminal of the comparator 1016. The output voltage of the drive amplifier 1014 corresponds to the DAC output. The offset voltage corresponds to the data stored in the offset register 1019. The switch SW1010 is turned off, the switch SW1011 is turned on, and the switch SW1012 is turned off to input the offset voltage to the inverting input terminal of the differential amplifier 1006. Thus, the offset correction is performed.
[0137] The track / hold circuit 1015 is set to the track state to read the output voltage of the differential amplifier 1006. After the track / hold circuit 1015 is switched to the hold state, the switch SW1010 is turned on and the switch SW1011 is turned off to perform the operation of the successive approximation type ADC. When it is sufficient to perform one read of the crossbar switch circuit 1004, the ReLU calculator 1021 calculates the data and stores the calculation result.
[0138] <DAC Output Mode>
[0139] In the DAC output mode, the A / D converter 1007 inputs the calculation result to the analog product-sum calculation circuit 1001 in the next layer. The switches SW1020 to SW1023 are turned on to operate the differential amplifier 1006. The switch SW1001 is turned on and the switch SW1002 is turned off to disconnect the drive amplifier 1014 from the comparator 1016. The switches SW1010 and SW1011 are turned off, and the switch SW1012 is turned on to write the data after the pooling process in the crossbar switch circuit 1004 of the analog product-sum calculation circuit 1001 in the next layer. In the analog product-sum calculation circuit 1001 of the next layer, the reference voltage is output when the offset correction of the drive amplifier 1003 is performed.
[0140] In an embodiment, the neural network circuit includes a plurality of computing units. The computing unit includes a cross switch circuit 1004. In the cross switch circuit 1004, memristors are connected in a lattice shape, and each of the memristors is a variable resistance element with bipolar characteristics. In addition, the computing unit includes: a plurality of D / A converters 1002, which receive data to apply a signal voltage to a plurality of voltage input terminals of the cross switch circuit 1004; a plurality of drive amplifiers 1003, which receive the output voltage of the D / A converter 1002 to apply the signal voltage to the plurality of voltage input terminals; a plurality of sense amplifiers 1005, which convert the current flowing in the current output terminal of the cross switch circuit 1004 into a voltage for output; and a plurality of A / D converters 1007, which perform A / D conversion on the signal voltage converted by the sense amplifier 1005.
[0141] The A / D converter 1007 includes a successive approximation type having a resistor string type DAC section 13. The DAC section 13 can be switched so that the signal voltage of the calculation result of the cross switch circuit 1004 is applied to the plurality of driver amplifiers 1003 placed relative to the cross switch circuit 1004 in the next layer. In the configuration, the DAC section 1013 built in the A / D converter 1007 in the previous layer can be adopted as a D / A converter to input data to the calculation unit in the next layer. The circuit scale for the configuration can be reduced.
[0142] The neural network circuit includes a differential amplifier 1006 that performs differential calculation of outputs from two sense amplifiers 1005 forming a pair. An A / D converter 1007 performs A / D conversion on the output voltage of the differential amplifier 1006. By switching switches SW1001 and SW1002, a reference voltage Vref can be applied to the differential amplifier 1006. In a state where a signal voltage is not applied to a voltage input terminal of a cross switch circuit 1004, an offset voltage output from the differential amplifier 1006 is A / D converted. An offset register 1019 stores the converted data. In the configuration, offset correction of the differential amplifier 1006 can be performed based on the voltage data stored in the offset register 1019.
[0143] (Sixth Embodiment)
[0144] Hereinafter, parts similar to those of the fifth embodiment will be denoted by the same reference numerals, and explanation thereof will be omitted. Differences from the fifth embodiment will be described. Fig. 22As schematically shown in FIG. 1 , the analog product-sum calculation circuit 1031 of the sixth embodiment includes, for example, nine cross switch circuits 1004 between a common D / A converter 1002 and a common A / D converter 1007. The output terminal of the D / A converter 1002 is connected to the voltage input terminals of all the voltage input terminals of the cross switch circuit 1004. The input terminal of the A / D converter 1007 is connected to all the current output terminals of the cross switch circuit 1004.
[0145] The analog product-sum calculation circuit 1031 combines the output results of the plurality of crossbar switch circuits 1004. Then, the analog product-sum calculation circuit 1031 selects one crossbar switch circuit among the plurality of crossbar switch circuits 1004. When the selected crossbar switch circuit 1004 is in the first stage, the independent D / A converter 1002 inputs a voltage signal. When the selected crossbar switch circuit 1004 is in the second layer, the built-in DAC section 1013 of the A / D converter 1007 inputs a voltage signal.
[0146] The A / D converter 1007 performs A / D conversion on the output signal corresponding to the calculation result of the cross switch circuit 1004. The converted output signal is stored in the N-bit register 1018. Next, the cross switch circuit 1004 is switched to another one, and the signal is similarly input. The latch adder 1020 adds the output data. The above process is repeated multiple times. After the process, the ReLU calculator 1021 and the latch / pooling calculator 1022 perform the calculation, and the final calculation result is stored.
[0147] In the sixth embodiment, the analog product-sum calculation circuit 1031 includes a plurality of cross switch circuits 1004. One of the cross switch circuits 1004 is selected. The D / A converter 1002 or the built-in DAC section 1013 on the input side applies a signal voltage. The A / D converter 1007 performs A / D conversion on the output signal voltage. The latch adder 1020 of the A / D converter 1007 accumulates the calculation results of each cross switch circuit 1004. In the configuration, even in the case where the neural network circuit performs large-scale calculations by adopting a plurality of cross switch circuits 1004 of the present disclosure, the circuit area can be greatly reduced.
[0148] (Seventh Embodiment)
[0149] The seventh embodiment shows another configuration for performing large-scale calculations such as the sixth embodiment. In the sixth embodiment, the product-sum calculation results of each crossbar switch circuit in the crossbar switch circuit 1004 are added to the digital area after A / D conversion. There may be difficulties in extending the signal processing time by this repeated calculation.
[0150] The seventh embodiment additionally includes a decoder 1024(a) added to the built-in DAC section 1013, and a driver amplifier 1014(a) connected to the decoder 1024(a), as in Fig.23 As shown in . The number of output terminals of the built-in DAC unit 1013 can be increased. Fig.25 In the example, the number of output terminals of the D / A converter 1002(1) is tripled, and voltage is applied in parallel to the crossbar switch circuits 1004(1), 1004(2), and 1004(3).
[0151] As in Fig.24 As shown in , the output terminal of each sense amplifier 1005 is connected to the input side of the differential amplifier 1006 via a resistor element. Therefore, the differential amplifier 1006 also functions as an analog adding circuit. Vout1 in the figure corresponds to, for example Fig.25 The output signal of the crossbar switch circuit 1004 (1a) in FIG. Fig.25 The output signal of the cross switch circuit 1004 (1a) in FIG. 1004 is added to the input side of the differential amplifier 1006. The A / D converter 1007 (1) performs A / D conversion on the addition result. Thus, an analog product-sum calculation circuit 1041 is provided.
[0152] Similar to the fifth and sixth embodiments, the output data of the A / D converters 1007(1), 1007(2), and 1007(3) are D / A converted by the built-in DAC section 1013. The converted data is input to the crossbar switch circuit 1004 of the analog product-sum calculation circuit 1041 in the next layer. The calculation result data in the analog product-sum calculation circuit 1041 in the final layer is added to the digital area.
[0153] In the seventh embodiment, the analog product-sum calculation circuit 1041 includes a plurality of cross switch circuits 1004, performs addition of output signals from the plurality of cross switch circuits 1004, causes the differential amplifier 1006 to function as an analog adding circuit, and inputs the addition result to the A / D converter 1007 to perform A / D conversion. In the analog product-sum calculation circuit 1041 of the final layer, the data A / D-converted by the A / D converter 1007 is added to the digital area. Due to the combination of analog signal addition and digital signal addition, a calculation unit with a large scale can be provided while optimizing the calculation processing time.
[0154] (Eighth Embodiment)
[0155] The activation function may be a function other than a ramp function.
[0156] According to another aspect of the present disclosure, a neural network circuit includes: at least one storage unit in a storage unit, which may include memristors connected in a lattice shape, each of the memristors being a variable resistance element; a plurality of D / A converters, which may receive data to apply a signal voltage to a plurality of voltage input terminals of the storage unit; a plurality of drive amplifiers, which may be connected between the plurality of D / A converters and the plurality of voltage input terminals; a plurality of I / V conversion amplifiers, which may be connected to a current output terminal of the storage unit and convert a current flowing in the current output terminal into a voltage to output the voltage; and a plurality of computing units, which may include a plurality of A / D converters, which may perform A / D conversion on the signal voltage converted by the plurality of I / V conversion amplifiers.
[0157] The A / D converter may have a successive approximation converter, and the successive approximation converter may include a resistor string type D / A converter as a built-in D / A converter. The built-in D / A converter may be switched so that a signal voltage of a calculation result performed by the storage unit is applied to a plurality of drive amplifiers arranged corresponding to the storage unit of the calculation unit in the next layer. In the configuration, the built-in D / A converter in the successive approximation A / D converter built in the previous layer may be adopted as a D / A converter for inputting data to a calculation unit between consecutive calculation units in the next layer. For the configuration adopting the built-in D / A converter, the circuit scale can be reduced.
[0158] In addition, according to another aspect of the present disclosure, the neural network circuit may further include: a differential amplifier that can perform differential calculation on the outputs of two I / V conversion amplifiers forming a pair; and an offset register that can store data that can be A / D converted by an A / D converter. The A / D converter can perform A / D conversion on the output voltage of the differential amplifier. The output terminal of the built-in D / A converter can be switched to apply a reference voltage to the differential amplifier. The differential amplifier can output an offset voltage in a state where a signal voltage is not applied to the voltage input terminal of the storage unit. The A / D converter can perform A / D conversion on the offset voltage. In the configuration, offset correction of the differential amplifier can be performed based on the voltage data stored in the offset register.
[0159] The neural network circuit may include a plurality of layers. Each of the plurality of layers may include the storage unit, the computing unit, and the like.
[0160] Although the present disclosure has been carried out according to the embodiments, it should be understood that the present disclosure is not limited to such embodiments and structures. The present disclosure encompasses various modified examples and equivalent arrangements. In addition, various combinations and configurations and other combinations and configurations including one or more than one or less than one element may be included within the scope and spirit of the present disclosure.
Claims
1. A neural network circuit, include: A storage unit (4) comprising memristors connected in a lattice shape, each of the memristors being a variable resistance element; a plurality of D / A converters (2) configured to receive data to apply a signal voltage and a reference voltage to a plurality of voltage input terminals of the storage unit; a plurality of driver amplifiers (3) connected between the plurality of D / A converters and the plurality of voltage input terminals; A plurality of I / V conversion amplifiers (7) having connected to a current output terminal of the storage unit, and configured to convert the current flowing in the current output terminal into a voltage to output the voltage as a signal voltage; a plurality of A / D converters (8) configured to perform A / D conversion on the signal voltages converted by the plurality of I / V conversion amplifiers; as well as A plurality of offset correctors (30, 40) is arranged in the output side of the plurality of A / D converters, and configured to correct an offset voltage generated in the I / V conversion amplifier, in: One of the voltage input terminals is a bias terminal for applying a bias voltage; At least one of the driver amplifiers connected to the bias terminal is a bias applying amplifier (3(B)) configured to apply the reference voltage and the bias voltage having opposite polarity according to a voltage received from a corresponding D / A converter; The offset corrector comprises: a first latch circuit (16(1)) configured to receive output data of the A / D converter, a second latch circuit (16(2)) configured to receive the output data of the A / D converter, a subtractor (18) configured to subtract the latched data of the first latch circuit from the latched data of the second latch circuit, and a controller (11, 31) configured to control the D / A converter, the first latch circuit and the second latch circuit; When performing a bias setting operation, the controller is configured to: control the bias application amplifier to output the bias voltage having the opposite polarity, control each of the D / A converters so that the driving amplifier instead of the bias application amplifier outputs the reference voltage, and also cause the first latch circuit to latch the output data of the A / D converter; when performing a normal operation, the controller is configured to: control the bias application amplifier to output the reference voltage, control each of the D / A converters so that the driving amplifier instead of the bias application amplifier outputs the signal voltage, and also cause the second latch circuit to latch the output data of the A / D converter; and The controller is configured to output a subtraction result of the subtractor as signal data.
2. The neural network circuit according to claim 1, in: The controller is configured to intermittently perform the bias setting operation.
3. The neural network circuit according to claim 2, in: The controller includes a clock counter (22) configured to count a clock signal; and The controller is configured to perform the bias setting operation every time a count value of the clock counter reaches a predetermined value.
4. The neural network circuit according to claim 3, in: When the count value reaches the predetermined value, the clock counter changes the output signal to a valid level within one clock period; The controller is configured to control the D / A converter corresponding to the bias applying amplifier based on the output signal of the clock counter; and The controller is configured to control latch timing of the first latch circuit and latch timing of the second latch circuit while controlling the D / A converter corresponding to the driving amplifier by inverting the output signal.
5. The neural network circuit according to claim 4, further comprising: include: a buffer circuit (12) comprising a control terminal configured to control an input data value, in: The buffer circuit is configured to input data according to a change in a binary level supplied to the control terminal to cause a corresponding amplifier to output the reference voltage.
6. The neural network circuit according to claim 3, in: The controller includes a temperature sensor (33); and The controller is configured to perform the bias setting operation when a level of change in the temperature detected by the temperature sensor exceeds a predetermined level.
7. The neural network circuit according to claim 6, in: The temperature sensor includes a reset terminal configured to: change an output signal to a valid level when the change level of the temperature exceeds the predetermined level, and change the output signal to an invalid level after changing the output signal to the valid level; The controller includes a D flip-flop (32), the D flip-flop including a clock terminal configured to receive the clock signal; The output terminal of the temperature sensor is connected to the input terminal of the D flip-flop; The reset terminal is connected to the inverting output terminal of the D flip-flop; The controller is configured to control the D / A converter corresponding to the bias applying amplifier through an output signal of the D flip-flop; and The controller is configured to control latch timing of the first latch circuit and latch timing of the second latch circuit while controlling the D / A converter corresponding to the driving amplifier by inverting the output signal of the temperature sensor.
8. A neural network circuit, include: A storage unit (4) comprising memristors connected in a lattice shape, each of the memristors being a variable resistance element; a plurality of D / A converters (2) configured to receive data to apply a signal voltage and a reference voltage to a plurality of voltage input terminals of the storage unit; a plurality of driver amplifiers (3) connected between the plurality of D / A converters and the plurality of voltage input terminals; A plurality of I / V conversion amplifiers (7) having connected to a current output terminal of the storage unit, and configured to convert the current flowing in the current output terminal into a voltage to output the voltage; a differential amplifier (42) configured to perform a differential calculation on outputs of two I / V conversion amplifiers forming a pair to generate an output voltage; a plurality of A / D converters (8) configured to perform A / D conversion on the output voltage of the differential amplifier; as well as A plurality of offset correctors (30) having is arranged in the output side of the plurality of A / D converters, and configured to correct an offset voltage generated in the I / V conversion amplifier, in: One of the voltage input terminals is a bias terminal configured to apply a bias voltage; At least one of the driver amplifiers connected to the bias terminal is a bias applying amplifier (3(B)) configured to apply the bias voltage and the reference voltage according to a voltage received from a corresponding D / A converter; The conductance value of the differential pair of the memristors to which the bias voltage is applied in the storage unit is replaced in advance so that the polarity of the bias voltage is reversed; The offset corrector comprises: a first latch circuit (16(1)) configured to receive output data of the A / D converter, a second latch circuit (16(2)) configured to receive the output data of the A / D converter, a subtractor (18) configured to subtract the latched data of the first latch circuit from the latched data of the second latch circuit, and a controller (11) configured to control the D / A converter, the first latch circuit, and the second latch circuit; and When performing a bias setting operation, the controller is configured to: control the bias application amplifier to output the bias voltage, and control each of the D / A converters to make the driving amplifier instead of the bias application amplifier output the reference voltage, and make the first latch circuit latch the output data of the A / D converter; When performing normal operation, the controller is configured to: control the bias application amplifier to output the reference voltage, and control each of the D / A converters to make the driving amplifier rather than the bias application amplifier output the signal voltage, and make the second latch circuit latch the output data of the A / D converter, and output the subtraction result of the subtractor as signal data.
9. The neural network circuit according to claim 8, in: The controller is configured to intermittently perform the bias setting operation.
10. The neural network circuit according to claim 9, in: The controller includes a clock counter (22) configured to count a clock signal; and The controller is configured to perform the bias setting operation every time a count value of the clock counter reaches a predetermined value.
11. The neural network circuit according to claim 10, in: When the count value reaches the predetermined value, the clock counter changes the output signal to a valid level within one clock period; The controller is configured to control the D / A converter corresponding to the bias applying amplifier based on the output signal of the clock counter; and The controller is configured to control latch timing of the first latch circuit and latch timing of the second latch circuit while controlling the D / A converter corresponding to the driving amplifier by inverting the output signal.
12. The neural network circuit according to claim 11, further comprising: include: a buffer circuit (12) comprising a control terminal configured to control an input data value, in: The buffer circuit is configured to input data according to a change in a binary level supplied to the control terminal to cause a corresponding amplifier to output the reference voltage.
13. The neural network circuit according to claim 10, in: The controller includes a temperature sensor (33); and The controller is configured to perform the bias setting operation when a level of change in the temperature detected by the temperature sensor exceeds a predetermined level.
14. The neural network circuit according to claim 13, in: The temperature sensor includes a reset terminal configured to: change an output signal to a valid level when the change level of the temperature exceeds the predetermined level, and change the output signal to an invalid level after changing the output signal to the valid level; The controller includes a D flip-flop (32), the D flip-flop including a clock terminal configured to receive the clock signal; The output terminal of the temperature sensor is connected to the input terminal of the D flip-flop; The reset terminal is connected to the inverting output terminal of the D flip-flop; The controller is configured to control the D / A converter corresponding to the bias applying amplifier through an output signal of the D flip-flop; and The controller is configured to control latch timing of the first latch circuit and latch timing of the second latch circuit while controlling the D / A converter corresponding to the driving amplifier by inverting the output signal of the temperature sensor.
15. A neural network circuit, include: at least one of the memory sections (1004) comprising memristors connected in a lattice shape, each of the memristors being a variable resistance element; a plurality of D / A converters (1002, 1013) receiving data to apply signal voltages to a plurality of voltage input terminals of the storage unit; a plurality of driver amplifiers (1003) connected between the plurality of D / A converters and the plurality of voltage input terminals; A plurality of I / V conversion amplifiers (1005) are provided, wherein connected to a current output terminal of the storage unit, and configured to convert the current flowing in the current output terminal into a voltage to output the voltage; as well as a plurality of computing units (1001, 1031, 1041), comprising a plurality of A / D converters, the plurality of A / D converters being configured to perform A / D conversion on the signal voltages converted by the plurality of I / V conversion amplifiers, in: The A / D converter has a successive approximation converter, and the successive approximation converter includes a resistor string type D / A converter (1013) as a built-in D / A converter; and The built-in D / A converter is configured to perform switching so as to apply the signal voltage of the calculation result performed by the storage section to the plurality of drive amplifiers arranged corresponding to the storage section of the calculation unit in a next layer.
16. The neural network circuit according to claim 15, further comprising: include: a differential amplifier (1006) configured to perform a differential calculation on the outputs of the two I / V conversion amplifiers (1005) forming a pair; as well as an offset register (1019) configured to store data A / D converted by the A / D converter, in: The A / D converter is configured to perform A / D conversion on the output voltage of the differential amplifier; The built-in D / A converter includes an output terminal configured to switch to apply a reference voltage to the differential amplifier; and The offset register stores data obtained by A / D conversion of an offset voltage output by the differential amplifier in a state where the signal voltage is not applied to the voltage input terminal of the storage section, the A / D conversion of the offset voltage being performed by the A / D converter.
17. The neural network circuit according to claim 15, in: The computing unit (1031) includes the plurality of storage units; and The computing unit is configured to: selecting one of the storage units, causing the D / A converter located in the input side to apply the signal voltage to the selected storage section, and causing the A / D converter to perform A / D conversion on the signal voltage to be output; And the calculation result of the calculation unit is accumulated in the output side of the A / D converter.
18. The neural network circuit according to claim 15 or claim 16, in: The computing unit (1041) includes the plurality of storage units; The calculation unit includes an adder (1020) including an analog circuit between the plurality of storage sections and the plurality of D / A converters; and The A / D converter is configured to perform A / D conversion on the addition result of the adder.
19. The neural network circuit according to claim 18, in: The calculation results of the calculation unit are accumulated in an output side of the A / D converter.
