Compute-in-memory architecture-based full analog circuit system for handwritten numeral recognition

By designing a fully analog circuit system, the performance limitations brought by the von Neumann architecture are eliminated, and neural network hardware with high integration, low energy consumption and ultra-low latency is realized, solving the performance bottleneck of the existing system and providing a non-stop solution. Von Neumann hardware solutions bring new possibilities to deep neural networks and edge computing.

WO2024212232A1PCT designated stage expired Publication Date: 2024-10-17ZHEJIANG UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/088451
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-04-14
Publication Date
2024-10-17

AI Technical Summary

Technical Problem

The existing neural network hardware circuit system based on the integrated storage and computing architecture relies on the combination of digital and analog circuits, resulting in low integration, slow response speed, and high power consumption. It is difficult to improve system performance and suffers from the traditional von Neumann architecture. 'Storage Wall' and 'Power Wall' limits.

Method used

A fully analog circuit system with an integrated storage and calculation architecture is designed, including an input drive circuit, a resistor array, a current-to-voltage conversion circuit, a subtraction circuit and an activation function circuit. The analog circuit is used to realize handwritten digit recognition, eliminate the assistance of digital modules, and improve operating speed and reduced energy consumption.

Benefits of technology

It achieves accurate identification with ultra-low latency, increases the operating speed to 0.01 milliseconds, reduces energy consumption to 0.5W, and is highly integrated. It can be fully integrated on a circuit board, solving the performance limitations of traditional systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023088451_17102024_PF_FP_ABST
    Figure CN2023088451_17102024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present invention is a compute-in-memory architecture-based full analog circuit system for handwritten numeral recognition, comprising a first analog circuit and a second analog circuit. The first analog circuit consists of the following circuit modules: an input driving circuit, a first resistor array having m columns and 2n rows, a first current-voltage conversion circuit, a first subtraction circuit and a first activation function circuit; and the second analog circuit consists of the following circuit modules: a second resistor array having n columns and 20 rows, a second current-voltage conversion circuit, a second subtraction circuit, a second activation function circuit and a voltage comparison circuit. The system can eliminate the problem of data transportation caused by a traditional von Neumann architecture, and achieve ultra-low-delay accurate recognition without the assistance of any digital module. The system has a very wide application prospect in the field of novel neural network hardware system researching, and is expected to provide a feasible non-von Neumann hardware solution for a deep neural network and edge computing.
Need to check novelty before this filing date? Find Prior Art

Description

A fully analog circuit system for handwritten digit recognition based on a storage-computing integrated architecture Technical Field

[0001] The present invention relates to the technical fields of electronic information, integrated circuits and artificial neural networks, and in particular to a fully analog circuit system for handwritten digit recognition based on a storage and computing integrated architecture. Background Art

[0002] With the rapid development of computers and information technology, demands for information transmission speed and storage capacity, as well as the integration of electronic devices and circuits, are becoming increasingly stringent. Artificial neural networks, as widely used nonlinear networks, have become highly mature and achieved tremendous success, sparking a disruptive intelligent revolution worldwide. However, most current artificial neural networks run on traditional computers, which are designed based on the von Neumann architecture, with separate computing and storage units. This creates two major issues that severely limit neural network performance: the "memory wall" and the "power wall." The "memory wall" refers to the speed mismatch between the CPU and memory. The CPU's computational speed is much faster than the memory's read and write speed. While CPU speed increases with advancements, memory speed increases more rapidly. This results in the CPU wasting significant time waiting for memory reads and writes, limiting the performance of the entire computing system. The "power wall" refers to the data transmission involved in the CPU's instruction execution process: the CPU needs to read data from memory and write the computational results back to memory. Data transmission consumes a significant amount of energy. As CPU frequencies increase, the amount of data transmitted increases, leading to higher power consumption and thus limiting the performance of the entire computing system.

[0003] Currently, new neural network hardware circuit systems based on a storage-computing integrated architecture are based on a combination of digital and analog circuits. These solutions suffer from low integration, slow response speeds, and high power consumption, making it difficult to further improve system performance. Therefore, research and development of a new generation of fully analog neural network systems based on a storage-computing integrated architecture is urgent.

[0004] Summary of the Invention

[0005] The purpose of this invention is to propose a fully analog circuit system for handwritten digit recognition based on an integrated storage and computing architecture. This system, implemented entirely with analog circuits based on this integrated storage and computing architecture, eliminates the "memory wall" and "power wall" issues that severely limit neural network performance, both of which are inherent in the traditional von Neumann architecture. Furthermore, without the assistance of any digital modules, it enables ultra-low latency recognition of handwritten digits by neural network hardware systems. Existing solutions based on a combination of digital and analog circuits have an operating speed of approximately 1 millisecond, consume approximately 4W of energy, and have low integration, making them difficult to fully integrate on a single circuit board. The system proposed in this invention operates at a speed of approximately 0.01 milliseconds, consumes approximately 0.5W of energy, and has a high level of integration, allowing it to be fully integrated on a single circuit board. Therefore, compared to existing solutions, this invention offers advantages such as faster operation, lower energy consumption, and higher integration. This invention has broad application prospects in the research field of novel neural network hardware systems based on an integrated storage and computing architecture, and is expected to provide a viable non-von Neumann hardware solution for deep neural networks and edge computing, bringing hope to the future of technological revolution.

[0006] The purpose of the present invention is achieved through the following technical means:

[0007] A fully analog circuit system for handwritten digit recognition based on a storage-computation integrated architecture, as shown in FIG1 , includes a first analog circuit and a second analog circuit. The first analog circuit is composed of the following circuit modules: an input drive circuit, a first resistor array with m columns and 2n rows, a first current-voltage conversion circuit, a first subtraction circuit, and a first activation function circuit.

[0008] The second analog circuit is composed of the following circuit modules: a second resistor array with a scale of n columns and 20 rows, a second current-voltage conversion circuit, a second subtraction circuit, a second activation function circuit, and a voltage comparison circuit;

[0009] The input of the fully analog circuit system is m analog voltages, generated by an external microcontroller with a touch capacitive screen. The input drive circuit inputs the m analog voltages into a first resistor array with a size of m columns and 2n rows. The conductance of the first resistor array with m columns and 2n rows is multiplied by the input analog voltage to obtain a corresponding current value on each resistor. All current values ​​on each row are accumulated and output at the end of the row. The first current-voltage conversion circuit converts the current value outputted in each row into a voltage value and amplifies it to obtain 2n voltage values, which are recorded as V1, V2, ..., V 2n The first subtraction circuit performs subtraction difference processing on the first n voltage values ​​and the last n voltage values ​​of the 2n voltage values ​​to generate n analog voltages V1', V2'...V n ', V i '=Vi-V i+n, i is 1--n; the first activation function circuit performs nonlinear activation on the n-channel analog voltage and maps it to the voltage range of 0V-1V to generate n-channel voltage;

[0010] The conductance of the second resistor array with a scale of n columns and 20 rows is multiplied by the n voltages generated by the first activation function circuit, and a corresponding current value is obtained on each resistor. All current values ​​on each row are accumulated and output at the end of the row; the second current-voltage conversion circuit converts the current value output from each row into a voltage value and amplifies it to obtain 20 voltage values, which are recorded as U1, U2...U 20 The second subtraction circuit performs subtraction difference processing on the first 10 voltage values ​​and the last 10 voltage values ​​of the 20 voltage values ​​to generate 10 analog voltages, U1', U2'...U 20 ', U i '=U i -U i+10 , i is 1--10; the second activation function circuit performs nonlinear activation on the 10-channel analog voltage, maps it to the voltage range of 0V-1V to generate 10-channel voltage; the voltage comparison circuit compares the 10-channel voltage output by the second activation function circuit with the reference voltage 0.5V respectively, and each voltage greater than 0.5V outputs a high level to the corresponding digital tube. The number of the digital tubes is 10, corresponding to the 10-channel voltage and the ten digits 0-9, thereby lighting up the corresponding digits and completing the handwritten digit recognition function.

[0011] Furthermore, the input drive circuit in the circuit module is composed of a non-inverting MOSFET driver chip, which converts m 3.3V voltage signals generated by an external microcontroller with a touch capacitive screen into 5V voltage signals, and increases the driving load capacity of each voltage to 100mA.

[0012] Furthermore, the current-voltage conversion circuit includes a sampling resistor and an integrated operational amplifier. The sampling resistor has a resistance of 1Ω and converts current into voltage. The integrated operational amplifier is used to construct a common-mode amplifier to amplify the voltage obtained by the sampling resistor.

[0013] Furthermore, the subtraction circuit in the circuit module includes an integrated operational amplifier for converting V1, V2...V 2n These 2n voltage values ​​are amplified.

[0014] Furthermore, the first activation function circuit and the second activation function circuit are respectively composed of a cascade of three-stage amplification circuits, the first amplification circuit is composed of a biased in-phase operational amplifier, and the second and third amplification circuits are composed of inverting operational amplifiers; the activation function is a Sigmoid function, and the Sigmoid function is simplified to y=0.2x+0.5, where x and y are the independent variable and dependent variable respectively, and the input voltage signal of the activation function circuit is divided into the following three segments: (-∞,-2.5V), [-2.5V,2.5V], (2.5V,+∞), and the first amplification circuit maps the three segments of the signal to 0-5V in parallel; the second and third amplification circuits perform linear transformation in sequence, and finally map 0-5V to 0-1V to realize the Sigmoid function function.

[0015] Furthermore, the voltage comparison circuit includes an integrated operational amplifier, and the voltage comparison circuit is a single-threshold voltage comparison circuit. When the voltage value input to the voltage comparison circuit is greater than 0.5V, the output is a high level.

[0016] Furthermore, the high level is 1V.

[0017] The beneficial effects of the present invention are as follows: Compared with traditional neural network hardware systems, the present invention is entirely implemented by analog circuits based on a storage-computing integrated architecture, which can eliminate the data handling problems caused by the traditional von Neumann architecture and achieve ultra-low latency and accurate recognition without the assistance of any digital modules. The present invention has very broad application prospects in the research field of new neural network hardware systems based on a storage-computing integrated architecture, and is expected to provide a viable non-von Neumann hardware solution for deep neural networks and edge computing. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] FIG1 is a schematic diagram of the circuit principle of the present invention;

[0019] FIG2 is a circuit diagram of an input drive circuit according to an embodiment of the present invention;

[0020] 3 is a circuit diagram of a first current-voltage conversion circuit and a second current-voltage conversion circuit according to an embodiment of the present invention;

[0021] 4 is a circuit diagram of a first subtraction circuit and a second subtraction circuit according to an example of the present invention;

[0022] 5 is a circuit diagram of a first activation function circuit and a second activation function circuit according to an embodiment of the present invention;

[0023] FIG6 is a circuit diagram of a voltage comparison circuit according to an embodiment of the present invention. DETAILED DESCRIPTION

[0024] The following examples are used to illustrate the present invention and are not intended to limit the scope of the present invention.

[0025] The present invention provides a fully analog circuit system for handwritten digit recognition based on a storage and computing integrated architecture. The circuit principle diagram of the system is shown in Figure 1. It includes a first analog circuit and a second analog circuit. The first analog circuit is composed of the following circuit modules: an input drive circuit, a first resistor array with a scale of 49 columns and 20 rows, a first current-voltage conversion circuit, a first subtraction circuit, and a first activation function circuit;

[0026] The second analog circuit is composed of the following circuit modules: a second resistor array with a scale of 10 columns and 20 rows, a second current-voltage conversion circuit, a second subtraction circuit, a second activation function circuit, and a voltage comparison circuit.

[0027] The input of the fully analog circuit system is 49 analog voltages, generated by an external microcontroller with a touch capacitive screen (the microcontroller used in this embodiment is an STM32F103ZET6 single-chip microcomputer, and the single-chip microcomputer is connected to a 4.3-inch capacitive touch screen as an input device for handwritten digits, which collects handwritten digits and converts them into 49 analog voltages). The input drive circuit enhances the load capacity of the 49 analog voltages to obtain 49 drive voltages. The input drive circuit is composed of a non-inverting MOSFET driver chip, which converts the 49 3.3V voltages generated by the external microcontroller with a touch capacitive screen into 5V voltages and increases the drive load capacity of each voltage to 100mA. This can be implemented using the dual-channel high-speed power MOSFET driver chip TC4427, which has advantages such as high output current and a wide power supply voltage. Its circuit schematic is shown in Figure 3.

[0028] The input drive circuit inputs the drive voltage into the first resistor array of 49 columns and 20 rows. The conductance of the first resistor array of 49 columns and 20 rows is multiplied by the input drive voltage, and a corresponding current value is obtained on each resistor. All current values ​​on each row are accumulated and output at the end of the row. The first current-voltage conversion circuit converts the current value output from each row into a voltage value and amplifies it to obtain 20 voltage values, which are recorded as V1, V2...V 20The current-to-voltage conversion circuit is implemented by a sampling resistor and an integrated operational amplifier. The sampling resistor has a resistance of 1Ω and converts the current accumulated in each row of the resistor array into a voltage. The integrated operational amplifier is used to construct a common-mode amplifier to amplify the voltage obtained by the sampling resistor with an amplification factor of 40 times. This circuit can be implemented using TI's OPA4317 series integrated operational amplifier, which has the characteristics of low offset, rail-to-rail output, high speed, and low noise. The circuit schematic is shown in Figure 5. The first subtraction circuit performs subtraction and differential processing on the first 10 voltage values ​​and the last 10 voltage values ​​of the 20 voltage values ​​to generate 10 analog voltages V1', V2'...V 10 ', V i '=V i -V i+10 , i ranges from 1 to 10. The subtraction circuit can be implemented using TI's OPA2227 series integrated operational amplifier, which features dual power supply, a wide supply voltage range, high precision, and low noise. The circuit schematic is shown in Figure 6. The first activation function circuit nonlinearly activates the 10 analog voltages, mapping them to a voltage range of 0V-1V to generate 10 voltages.

[0029] The activation function circuit consists of three cascaded amplifier circuits, implementing the Sigmoid function. The first amplifier circuit consists of a biased, non-inverting operational amplifier, while the second and third amplifier circuits are inverting operational amplifiers. The Sigmoid function is simplified to y = 0.2x + 0.5. The analog circuit input voltage signal is divided into three segments: (-∞, -2.5V), [-2.5V, 2.5V], and (2.5V, +∞). The first amplifier circuit maps these three segments in parallel to a 0-5V range. The second and third amplifier circuits sequentially perform linear transformations, ultimately mapping the 0-5V range to a 0-1V range. The first amplifier circuit is composed of a single-5V power supply, rail-to-rail output integrated operational amplifier with a 2.5V bias voltage and a 1x gain. This can be implemented using TI's OPA4350 series integrated operational amplifier, which features single-supply power, rail-to-rail output, high speed, and low noise. The second amplifier circuit consists of an integrated operational amplifier powered by a ±5V dual power supply, with an amplification factor of 0.2. This amplifier can be implemented using TI's OPA2227 series integrated operational amplifiers, which feature dual power supply, a wide supply voltage range, high precision, and low noise. The third amplifier circuit consists of an integrated operational amplifier powered by a ±5V dual power supply, with an amplification factor of 1. This amplifier can be implemented using TI's OPA2227 series integrated operational amplifiers. The circuit schematic is shown in Figure 7.

[0030] The conductance of the second resistor array with a scale of 10 columns and 20 rows is multiplied by the 10 voltages generated by the first activation function circuit, and a corresponding current value is obtained on each resistor. All current values ​​on each row are accumulated and output at the end of the row; the second current-voltage conversion circuit converts the current value output from each row into a voltage value and amplifies it by 50 times to obtain 20 voltage values, which are recorded as U1, U2...U 20 The second subtraction circuit performs subtraction difference processing on the first 10 voltage values ​​and the last 10 voltage values ​​of the 20 voltage values ​​to generate 10 analog voltages, U1', U2'...U 20 ', U i '=U i -U i+10 , i ranges from 1 to 10; the second activation function circuit performs nonlinear activation on the 10 analog voltages, mapping them to a voltage range of 0V-1V to generate 10 voltages; the voltage comparison circuit compares the 10 voltages output by the second activation function circuit with a reference voltage of 0.5V. Each voltage greater than 0.5V outputs a high level to the corresponding digital tube. There are 10 digital tubes, one corresponding to each of the 10 voltages and the ten digits 0-9, lighting up the corresponding digit, completing the handwritten digit recognition function. The voltage comparison circuit can be implemented using TI's OPA4317 series integrated operational amplifier, which features low offset, rail-to-rail output, high speed, and low noise. The circuit schematic is shown in Figure 9.

[0031] As can be seen from the above embodiments, the present invention realizes the recognition of handwritten digits. The system is completely implemented by analog circuits based on a storage-computing integrated architecture, which can eliminate the data handling problems brought by the traditional von Neumann architecture and does not require the assistance of any digital modules. It can achieve ultra-low latency and accurate handwritten digit recognition. This system has very broad application prospects in the research field of new neural network hardware systems based on a storage-computing integrated architecture, and is expected to provide a feasible non-von Neumann hardware solution for deep neural networks and edge computing.

[0032] The examples described above provide a detailed description of the technical solutions and beneficial effects of the present invention. It should be noted that a person skilled in the art can make several improvements and substitutions without departing from the technical principles of the present invention, and these improvements and substitutions should also be considered within the scope of protection of the present invention.

Claims

1. A fully analog circuit system for handwritten digit recognition based on a storage-computing integrated architecture, characterized in that: including a first analog circuit and a second analog circuit; The first analog circuit is composed of the following circuit modules: an input drive circuit, a first resistor array with a scale of m columns and 2n rows, a first current-to-voltage conversion circuit, a first subtraction circuit, and a first activation function circuit; The second analog circuit is composed of the following circuit modules: a second resistor array with a scale of n columns and 20 rows, a second current-voltage conversion circuit, a second subtraction circuit, a second activation function circuit, and a voltage comparison circuit; The input of the full analog circuit system is m analog voltages, which are generated by an external microcontroller with a touch capacitive screen. The input drive circuit enhances the load capacity of the m analog voltages to obtain m drive voltages. The input drive circuit inputs the drive voltages into a first resistor array with a scale of m columns and 2n rows. The conductance of the first resistor array with m columns and 2n rows is multiplied by the input drive voltage, and a corresponding current value is obtained on each resistor. All current values ​​on each row are accumulated and output at the end of the row. The first current-voltage conversion circuit converts the current value outputted in each row into a voltage value, and performs amplification processing to obtain 2n voltage values, which are recorded as V1, V2, ..., V 2n The first subtraction circuit performs subtraction difference processing on the first n voltage values ​​and the last n voltage values ​​of the 2n voltage values ​​to generate n analog voltages V1', V2'...V n ',V i '=V i -V i+n , i is 1--n; the first activation function circuit performs nonlinear activation on the n-channel analog voltage and maps it to the voltage range of 0V-1V to generate n-channel voltage; The conductance of the second resistor array with a scale of n columns and 20 rows is multiplied by the n-way voltage generated by the first activation function circuit, and a corresponding current value is obtained on each resistor. All current values ​​on each row are accumulated and output at the end of the row; the second current-voltage conversion circuit converts the current value output from each row into a voltage value, and amplifies it to obtain 20 voltage values, which are recorded as U1, U2...U 20 The second subtraction circuit performs subtraction difference processing on the first 10 voltage values ​​and the last 10 voltage values ​​of the 20 voltage values ​​to generate 10 analog voltages, U1', U2'...U 20 ',U i '=U i -U i+10 , i is 1--10; the second activation function circuit performs nonlinear activation on the 10 analog voltages, maps them to the voltage range of 0V-1V to generate 10 voltages; the voltage comparison circuit compares the 10 voltages output by the second activation function circuit with the reference voltage 0.5V respectively, and each voltage greater than 0.5V outputs a high level to the corresponding digital tube, and the number of the digital tubes is 10 Each of them corresponds to 10 voltages and the ten numbers 0-9, thereby lighting up the corresponding numbers of the voltages and completing the handwritten number recognition function.

2. The fully analog circuit system for handwritten digit recognition based on a storage-computing integrated architecture according to claim 1 is characterized in that: The input drive circuit in the circuit module is composed of a non-inverting MOSFET driver chip, which converts m 3.3V voltage signals generated by an external microcontroller with a touch capacitor screen into 5V voltage signals, and increases the driving load capacity of each voltage to 100mA.

3. The fully analog circuit system for handwritten digit recognition based on a storage-computing integrated architecture according to claim 1 is characterized in that: The current-to-voltage conversion circuit includes a sampling resistor and an integrated operational amplifier. The sampling resistor has a resistance of 1Ω and converts current into voltage. The integrated operational amplifier is used to construct a common-mode amplifier to amplify the voltage obtained by the sampling resistor.

4. The fully analog circuit system for handwritten digit recognition based on a storage-computing integrated architecture according to claim 1 is characterized in that: The subtraction circuit in the circuit module includes an integrated operational amplifier for converting V1, V2, ... 2n These 2n voltage values ​​are amplified.

5. The fully analog circuit system for handwritten digit recognition based on a storage-computing integrated architecture according to claim 1 is characterized in that: The first activation function circuit and the second activation function circuit are respectively composed of three-stage amplifier circuits in cascade, the first amplifier circuit is composed of a biased in-phase operational amplifier, and the second and third amplifier circuits are composed of inverting operational amplifiers; the activation function is a Sigmoid function, and the Sigmoid function is simplified to y=0.2x+0.5, wherein x and y are the independent variable and the dependent variable respectively, and the input voltage signal of the activation function circuit is divided into the following three sections: (-∞,-2.5V), [-2.5V,2.5V], (2.5V,+∞), and the first amplifier circuit maps the three sections of the signal to 0-5V in parallel; the second and third amplifier circuits perform linear transformation in sequence, and finally map 0-5V to 0-1V, thereby realizing the Sigmoid function function.

6. The fully analog circuit system for handwritten digit recognition based on a storage-computing integrated architecture according to claim 1 is characterized in that: The voltage comparison circuit comprises an integrated operational amplifier. The voltage comparison circuit is a single-threshold voltage comparison circuit. When the voltage value input to the voltage comparison circuit is greater than 0.5V, the voltage comparison circuit outputs a high level.

7. The fully analog circuit system for handwritten digit recognition based on a storage-computing integrated architecture according to claim 6 is characterized in that: The high level is 1V.

Citation Information

Patent Citations

  • Storage and calculation integrated intelligent chip, control method and controller

    CN113517009A

  • Neural network activation function simulation circuit and design method thereof

    CN115564019A

  • Neural network circuit

    US20190392289A1

  • Analog neural network systems

    US20200380350A1

  • Circuit for calculating weight adjustments of an artificial neural network, and a module implementing a long short-term artificial neural network

    US20210097379A1