Analog storage quantizer circuit performing multi-cycle accumulation
By designing a multi-period accumulation analog memory quantizer circuit in analog in-memory computing, using analog temporary quantization and successive approximation register-type analog-digital converters, the error problem introduced by traditional analog-to-digital converters is solved, and high precision and Low-power analog domain computing improves the overall energy efficiency of the system.
Patent Information
- Application Number
- CN202411179810.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-11-22
AI Technical Summary
In traditional analog domain in-memory computing, the conversion error introduced by analog-to-digital converters (ADCs) leads to inaccurate calculations and high power consumption, making it difficult to meet the needs of high precision and low power consumption.
Design a multi-period accumulation analog memory quantizer circuit. Through the analog temporary quantization circuit and successive approximation register-type analog digital converter, it is divided into analog storage stage, successive approximation register-type analog digital converter stage and reset stage, and realizes multiple Periodic accumulation operation reduces the activation frequency of the ADC, reduces the accumulation of conversion errors, and realizes full accuracy calculation through a binary weight capacitor array.
It improves the accuracy and energy efficiency of analog domain computing, significantly reduces power consumption, and improves the computing power and energy consumption ratio of the overall system.
Smart Images

Figure CN119003449A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of integrated circuit design, and in particular to an analog storage quantizer circuit for performing multi-cycle accumulation. Background Art
[0002] In modern information processing and artificial intelligence applications, improving data processing speed and energy efficiency has become a key challenge. With the explosive growth of data volume, traditional computing architectures have gradually exposed problems such as high power consumption and limited bandwidth. Especially in scenarios such as large-scale neural network reasoning and edge computing, frequent data movement and high demand for computing resources make it difficult for traditional architectures to meet the growing performance requirements. In order to solve this problem, compute-in-memory (CIM) technology has gradually attracted attention. CIM integrates computing functions directly into memory, reducing the frequency and energy consumption of data movement and greatly improving computing efficiency. At present, in-memory computing can be divided into analog domain, digital domain, and time domain computing according to the computing method.
[0003] In analog domain CIM, analog domain computing converts input data and stored weights from the digital domain into analog quantities such as voltage and current for calculation, and then quantizes the results back to the digital domain after the calculation. However, with the improvement of in-memory computing accuracy, the signal margin of analog signals is further compressed due to the upper limit of the circuit's operating voltage, which places extremely high demands on the accuracy of analog-to-digital conversion. Although high-precision analog-to-digital converters (ADCs) and digital-to-analog converters (DACs) can meet this requirement, they usually bring huge delays and power consumption overheads, reducing the system's computing power-to-energy ratio. Therefore, designing an efficient in-memory computing ADC circuit is crucial to improving the overall system performance.
[0004] Traditional analog domain multiply-accumulate (MAC) operations require converting data from analog to digital in each cycle and then accumulating the digital values. This approach results in higher power consumption, additional partial sum accumulator (PSUM) storage overhead, and error accumulation problems. ADCs inherently introduce conversion errors, resulting in inaccurate PSUMs. If the final result relies on these PSUMs generated by the ADC, the errors will accumulate, potentially leading to significant inaccuracies. Although traditional successive approximation register analog-to-digital converters (SAR ADCs) excel in accuracy and speed, they still face challenges in power consumption and integration in in-memory computing architectures. In order to achieve energy-efficient operations, ADC circuit design must fully consider the characteristics of the memory and the computing requirements, and achieve low-power, high-accuracy conversion and processing of data by optimizing the circuit structure. Summary of the invention
[0005] The present invention provides an analog storage quantizer (ASQC) circuit for performing multi-cycle accumulation, which realizes multi-cycle accumulation operation in the analog domain, reduces the activation frequency of ADC in the analog domain in-memory calculation, reduces the accumulation of conversion errors introduced by the ADC, thereby improving the calculation accuracy of the analog domain, significantly reducing power consumption, and improving overall energy efficiency.
[0006] An embodiment of the present invention provides an analog storage quantizer circuit for performing multi-cycle accumulation, which is composed of three parts: an analog temporary quantization circuit, a counter, and a successive approximation register type analog-to-digital converter. The quantization process of the analog storage quantizer is divided into three stages: an analog storage stage, a successive approximation register type analog-to-digital converter stage, and a reset stage, wherein the analog storage stage is used to implement multi-cycle accumulation operations.
[0007] Optionally, in one embodiment of the present invention, the analog temporary storage quantization circuit uses C even , C odd , C dummy Three capacitors realize coarse-grained quantization with an output ratio of 1:32, C even , C odd , C dummy The three capacitors are composed of three branches connected in parallel. Each branch consists of a capacitor and a MOS tube for capacitor discharge. Switch SW0 and switch SW1 control C even and C odd The on-off of two capacitive circuit branches, capacitor C even and capacitor C odd Only one can be used at a time. Switch SW1 and switch SW3 control the counter branch. When the switch is closed and the trigger voltage value is reached, the capacitor C even and capacitor C odd The switching between the two phases is performed, and the counter value is increased by one at the same time; the above process is repeated multiple times in multiple cycles until the analog input of the analog storage stage is completed; after the analog input of the analog storage stage is completed, when there is still a charge value remaining in the capacitor, the remaining charge value is transferred to the next working stage of the analog storage quantizer and used as an initial value to be sent to the successive approximation register type analog-to-digital converter to realize the fine-grained quantization of the remaining charge value.
[0008] Optionally, in one embodiment of the present invention, in the successive approximation register type analog-to-digital converter stage, the successive approximation register type analog-to-digital converter uses a binary weighted capacitor array as a digital-to-analog converter, samples the input signal and compares it with the output of the digital-to-analog converter, the output of the comparator controls the direction of the binary search, the capacitance value of the binary weighted capacitor array is arranged in an exponential growth of 2 with C as the minimum unit, and the maximum capacitance value is 32C. In order to complete the full-precision calculation, a virtual capacitor C is used. dummyStoring the extra charge extends the capacitance range to achieve the 6-bit accuracy required for successive approximation register-based analog-to-digital converters.
[0009] Optionally, in one embodiment of the present invention, after the coarse-grained quantization in the analog storage stage and the fine-grained quantization in the successive approximation register analog-to-digital converter stage are completed, the coarse-grained quantization result Q generated by the counter is c [5:0] multiplied by the output ratio 32 and the fine-grained quantization result Q read out by the successive approximation register analog-to-digital converter sar [5:0] are added to obtain the full-precision digital output result. In the reset stage, all capacitors are discharged until the charge storage is 0, and the successive approximation register type analog-to-digital converter and counter are reset to 0.
[0010] Optionally, in one embodiment of the present invention, the counter is formed by cascading D flip-flops, and the D flip-flops of the previous stage in the counter As the clock input of the next-stage D flip-flop, and using a true single-phase clock D flip-flop, the CD and CDN input signals control the D flip-flop to achieve the clearing function in the reset phase.
[0011] The analog storage quantizer circuit for performing multi-cycle accumulation of the embodiment of the present invention realizes the quantization of the multi-cycle accumulation result in the analog domain, reduces the activation frequency of the ADC in the analog domain in-memory calculation, effectively reduces the accumulation of conversion errors introduced by the ADC, and makes the signal processing in the analog domain more accurate. At the same time, the analog temporary storage quantization circuit is used to preliminarily perform coarse-grained quantization of the analog operation results, and the remaining values are continuously sent to the SAR ADC for fine-grained quantization, which reduces the scale of the ADC, significantly reduces power consumption, and improves overall energy efficiency.
[0012] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0014] Figure 1 A schematic diagram of the circuit structure of an analog storage quantizer for performing multi-cycle accumulation according to an embodiment of the present invention;
[0015] Figure 2 Schematic diagram of the structure of a low power consumption counter circuit according to an embodiment of the present invention;
[0016] Figure 3 Schematic diagram of operating waveforms of an analog storage quantizer circuit performing multi-cycle accumulation according to an embodiment of the present invention. DETAILED DESCRIPTION
[0017] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0018] like Figure 1 , Figure 2 and Figure 3 As shown, the analog storage quantizer circuit that performs multi-cycle accumulation consists of three parts: an analog temporary quantization circuit, a counter, and a successive approximation register analog-to-digital converter (SAR ADC). The quantization process of the analog storage quantizer is divided into three stages: an analog storage stage (AS), a successive approximation register analog-to-digital converter stage, and a reset stage, wherein the analog storage stage is used to implement multi-cycle accumulation operations.
[0019] In an embodiment of the present invention, the multi-cycle accumulation operation of the analog temporary quantization circuit AS stage is adapted to the calculation process of the analog calculation unit. The analog calculation unit is composed of 128 dual PMOS current generators repeatedly arranged in columns. The dual current generator includes a PMOS tube P1 and a PMOS tube P2. The source of P1 is connected to VDD, the drain is connected to the source of P2, and the gate is controlled by the local weight on the local bit line LBL. The drain of P2 is the analog calculation unit output CL, and the gate is controlled by the input on the global bit line GBL.
[0020] In an embodiment of the present invention, Figure 3 As shown, the analog temporary quantization circuit uses C in the AS stage even , C odd , C dummy The three capacitors realize the coarse-grained quantization with an output ratio of 1:32. Each branch consists of a capacitor and a MOS tube for capacitor discharge, which is used to control the discharge of the capacitor. The two switches SW0 and SW1 in the circuit control C even , C odd The two capacitor circuit branches are turned on and off. At any given time node, only one of the two capacitors can be enabled. Switches SW1 and SW3 control the counter branch. When the switch is closed and the trigger voltage value is reached, C even , C odd The two capacitors are switched and the counter value is incremented by one. Specifically, in the first cycle of the AS phase, C even and C dummy The two capacitors receive accumulated charge from the analog computing unit until the trigger voltage value is reached. Once triggered, C even It will switch to C odd , and for Ceven Discharge to clear C even The charge value in the counter is incremented by one through an AND gate. odd and C dummy The two capacitors continue to receive charge until the trigger voltage value is reached again, completing C odd To C even The capacitor switching process can be repeated multiple times in one cycle until the analog input of the AS stage is completed and the charge input stops. After the ASQC circuit performs all MAC operations in the AS stage, the counter will generate a rough digital value. After the analog input of this stage is completed, there may still be a charge value remaining in the capacitor. The remaining charge value is transferred to the next working stage of ASQC and used as the initial value to be sent to the SAR ADC to realize the fine-grained quantification of the remaining charge value. In the next cycle, the counter continues to count from the previous cycle value. The AS stage implements multi-cycle accumulation operation by continuing the cycle of the above process until the analog input is fully processed and converted into a rough result representation.
[0021] In an embodiment of the present invention, in the successive approximation register type analog-to-digital converter stage, the successive approximation register type analog-to-digital converter uses a binary weighted capacitor array as a digital-to-analog converter, samples the input signal and compares it with the output of the digital-to-analog converter, and the output of the comparator controls the direction of the binary search. The capacitance value of the binary weighted capacitor array is arranged in an exponential growth of 2 with C as the minimum unit, and the maximum capacitance value is 32C. In order to complete the full-precision calculation, a virtual capacitor C is used. dummy Storing the extra charge extends the capacitor range to achieve the 6-bit accuracy required for successive approximation register-based analog-to-digital converters.
[0022] Specifically, the conversion process of the SAR ADC is a basic binary search of all possible quantization processes until it converges to the final digital output. The resolution of the SAR ADC is 6 bits, and a 6-bit register controls the timing of the conversion. During its operation, the SAR ADC uses a binary weighted capacitor array as its digital-to-analog converter DAC to sample the input analog signal. The sampled analog signal is compared with the output signal of the DAC, and the output of the comparator is used to determine the direction of the binary search. The capacitance value of the binary weighted capacitor array is arranged in exponential growth of 2 with C as the smallest unit until the maximum capacitance value is 32C. In order to achieve full-precision calculation, the SAR ADC needs to achieve 6-bit accuracy. The SAR ADC circuit uses a virtual capacitor C dummy to store additional charge, doubling the capacitance range.
[0023] In an embodiment of the present invention, after the coarse-grained quantization in the analog storage stage and the fine-grained quantization in the successive approximation register analog-to-digital converter stage are completed, the coarse-grained quantization result Q generated by the counter is c [5:0] multiplied by the output ratio 32 and the fine-grained quantization result Q read out by the successive approximation register analog-to-digital converter sar [5:0] are added to obtain the full-precision digital output result. In the reset stage, all capacitors are discharged until the charge storage is 0, and the successive approximation register type analog-to-digital converter and counter are reset to 0.
[0024] Specifically, the AS stage completes the coarse-grained quantization, followed by the fine-grained quantization of the SAR ADC stage. The whole process is based on the coarse-grained quantization result Q generated by the counter. c [5:0], multiply it by the output scale factor 32, and then compare it with the fine-grained quantization result Q read out by the SAR ADC sar [5:0] are added to obtain the final full-precision digital output result. In the reset stage, all capacitors will be discharged, the charge will be released, and the SAR ADC and counter will be reset to 0 to prepare for the next stage of sampling and quantization.
[0025] In an embodiment of the present invention, Figure 2 As shown in the figure, the counter of the ASQC circuit is composed of a cascade of D flip-flops. As the clock input of the next-stage D flip-flop, and using a true single-phase clock D flip-flop, the CD and CDN input signals control the D flip-flop to achieve the clearing function in the reset phase.
[0026] Specifically, the flip-flop has two states, 0 and 1, and one flip-flop can represent a binary number. The inverted output of the previous D flip-flop in the counter is used as the clock input of the next D flip-flop, and a true single-phase clock (TSPC) D flip-flop is used to drive the entire circuit with a single clock signal. The CD and CDN input signals control the D flip-flop to achieve the clearing function in the reset phase.
[0027] According to the analog storage quantizer circuit for performing multi-cycle accumulation proposed in the embodiment of the present invention, by realizing the quantization of the multi-cycle accumulation result in the analog domain, the activation frequency of the ADC is reduced, the accumulation of conversion errors is effectively reduced, and the accuracy of analog domain signal processing is improved. The circuit first uses the analog temporary storage quantization circuit to perform coarse-grained quantization on the analog operation result, and then sends the remaining value to the SAR ADC for fine-grained quantization. This process not only reduces the scale of the ADC, but also significantly reduces power consumption and improves the overall energy efficiency of the system.
[0028] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0029] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "N" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
Claims
1. An analog storage quantizer circuit for performing multi-cycle accumulation, characterized in that: It consists of three parts: an analog temporary quantization circuit, a counter, and a successive approximation register analog-to-digital converter. The quantization process of the analog storage quantizer is divided into three stages: the analog storage stage, the successive approximation register analog-to-digital converter stage, and the reset stage. The analog storage stage is used to realize multi-cycle accumulation operations.
2. The analog storage quantizer circuit for performing multi-cycle accumulation according to claim 1, characterized in that: The analog temporary storage quantization circuit uses C even , C odd , C dummy Three capacitors realize coarse-grained quantization with an output ratio of 1:32, C even , C odd , C dummy The three capacitors are composed of three branches connected in parallel. Each branch consists of a capacitor and a MOS tube for capacitor discharge. Switch SW0 and switch SW1 control C even and C odd The on-off of two capacitive circuit branches, capacitor C even and capacitor C odd Only one can be used at a time. Switch SW1 and switch SW3 control the counter branch. When the switch is closed and the trigger voltage value is reached, the capacitor C even and capacitor C odd The switching between the capacitors is repeated multiple times in multiple cycles until the analog input of the analog storage stage is completed. After the analog input is completed in the analog storage stage, if there is still charge value remaining in the capacitor, the remaining charge value is transferred to the next working stage of the analog storage quantizer and used as the initial value to be sent to the successive approximation register type analog-to-digital converter to realize fine-grained quantization of the remaining charge value.
3. The analog storage quantizer circuit for performing multi-cycle accumulation according to claim 1, characterized in that: In the successive approximation register type analog-to-digital converter stage, the successive approximation register type analog-to-digital converter uses a binary weighted capacitor array as a digital-to-analog converter, samples the input signal and compares it with the output of the digital-to-analog converter, and the output of the comparator controls the direction of the binary search. The capacitance value of the binary weighted capacitor array is arranged in an exponential growth of 2 with C as the smallest unit, and the maximum capacitance value is 32C. In order to complete the full-precision calculation, a virtual capacitor C is used. dummy Storing the extra charge extends the capacitance range to achieve the 6-bit accuracy required for successive approximation register-based analog-to-digital converters.
4. The analog storage quantizer circuit for performing multi-cycle accumulation according to claim 1, characterized in that: After the coarse-grained quantization in the analog storage stage and the fine-grained quantization in the successive approximation register analog-to-digital converter stage are completed, the coarse-grained quantization result Q generated by the counter is converted into c [5:0] multiplied by the output ratio 32 and the fine-grained quantization result Q read out by the successive approximation register analog-to-digital converter sar [5:0] are added to obtain the full-precision digital output result. In the reset stage, all capacitors are discharged until the charge storage is 0, and the successive approximation register type analog-to-digital converter and counter are reset to 0.
5. The analog storage quantizer circuit for performing multi-cycle accumulation according to claim 1, characterized in that: The counter is formed by cascading D flip-flops. As the clock input of the next-stage D flip-flop, and using a true single-phase clock D flip-flop, the CD and CDN input signals control the D flip-flop to achieve the clearing function in the reset phase.
