A memory analog-to-digital conversion circuit, circuit control method and memory
By designing the comparator analog-to-digital conversion circuit of the calculation column and the copy column in the in-memory computing system, and using the counter to output digital signals, the problems of high power consumption, large area and PVT sensitivity in the existing technology are solved, and low power consumption, Low area and anti-PVT interference effect.
Patent Information
- Application Number
- CN202311848411.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2043-12-28
AI Technical Summary
The analog-to-digital conversion circuit in the existing in-memory computing system requires multiple comparators and additional reference voltage generation circuits, which results in high power consumption, large area, and is sensitive to process variable (PVT) fluctuations, affecting output accuracy.
An in-memory analog-to-digital conversion circuit is designed. It uses calculation columns and copy columns to perform analog-to-digital conversion through comparators. It uses counters to output digital signals and does not require a reference voltage generation circuit. Only one comparator is used, which reduces power consumption. and area, and resist common mode errors through the differential mode input under the same PVT conditions.
It achieves the effects of low power consumption, low area and anti-PVT interference, improves the energy efficiency of the storage and calculation system, and reduces the area occupied by the comparator.
Smart Images

Figure CN117749184B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of integrated circuits, and in particular to an in-memory analog-to-digital conversion circuit, a circuit control method and a memory. Background Art
[0002] The in-memory computing readout circuit is an important part of the in-memory computing system. It converts the analog multiplication and addition results of the in-memory computing system into digital output, which determines the output bit width, accuracy and working speed of the in-memory computing system. The current storage computing readout circuit mostly uses ADC for analog-to-digital conversion. Since ADC requires more comparators or capacitor arrays, and also requires additional reference voltage generation circuits, it has the characteristics of large area and high power consumption. With the trend of continuous improvement in output accuracy, the area and power consumption of the readout system occupy an increasing proportion of the entire storage computing system, making it the bottleneck of power consumption and area of the storage computing system. At the same time, PVT fluctuations also affect the results of analog storage computing. Due to the different characteristics of ADC and computing array affected by PVT, there is also an error between the quantization result and the ideal situation. Summary of the invention
[0003] The object of the present invention is to provide an in-memory analog-to-digital conversion circuit, a circuit control method and a memory, which greatly reduce power consumption and area while achieving the effect of resisting PVT interference and improving energy efficiency.
[0004] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0005] According to one aspect of an embodiment of the present invention, there is provided an in-memory analog-to-digital conversion circuit, comprising: a calculation column, the calculation column being used to store neural network weight data; a copy column, the copy column being used to store pre-set data, the data in the copy column being used to be compared with the data in the calculation column; a comparator, the comparator being respectively connected to the bit line of the calculation column and the bit line of the copy column; controlling the copy column and the calculation column to be turned on, controlling the bit line voltage of the copy column to be reduced in sequence, comparing the bit line voltage of the calculation column with the bit line voltage of the copy column by the comparator, and when the output of the comparator is flipped, stopping reducing the bit line voltage of the copy column, and calculating the analog-to-digital conversion value of the calculation column according to the copy column.
[0006] In some embodiments, the in-memory analog-to-digital conversion circuit further includes a word line controller, the word lines of the calculation column and the word lines of the copy column are both connected to the word line controller, and the word line controller is used to control the opening and closing of the copy column and the calculation column.
[0007] In some embodiments, the in-memory analog-to-digital conversion circuit further includes multiple calculation columns and multiple comparators, wherein the first input terminals of the multiple comparators are all connected to the bit lines of the replica columns, and the second input terminal of each comparator is correspondingly connected to a bit line of a calculation column.
[0008] In some embodiments, the in-memory analog-to-digital conversion circuit further includes a counter, wherein the counter is respectively connected to the output ends of the plurality of comparators, and the counter is used to output continuous analog-to-digital converted digital signals.
[0009] In some embodiments, both the calculation column and the replication column use 6T SRAM storage cells.
[0010] In some embodiments, the 6T SRAM storage unit includes six storage modules, each of which includes a first NMOS tube, a second NMOS tube, a first inverter and a second inverter. The gates of the first NMOS tube and the second NMOS tube are both connected to the output of the word line controller as word lines, the first end of the first NMOS tube is connected to the input end of the first inverter and the output end of the second inverter, the second end of the first NMOS tube is connected to the second input end of the comparator, and the first end of the second NMOS tube is connected to the output end of the first inverter and the input end of the second inverter.
[0011] One aspect of an embodiment of the present invention provides a control method for an in-memory analog-to-digital conversion circuit, which is applied to the in-memory analog-to-digital conversion circuit as described above, and the control method includes: step 101, controlling the copy column and the calculation column to be turned on, and obtaining the output value of the comparator; step 102, controlling the bit line voltage of the copy column to decrease, the counter to count, and obtaining the output value of the comparator, when the output value of the comparator has not flipped, continuing to repeat step 102, and when the output value of the comparator has flipped, entering step 103; step 103, stopping reducing the bit line voltage of the copy column, and the counter outputs the analog-to-digital conversion value of the calculation column.
[0012] One aspect of an embodiment of the present invention provides a memory, wherein the memory includes the in-memory analog-to-digital conversion circuit as described above.
[0013] An in-memory analog-to-digital conversion circuit, circuit control method, and memory according to an embodiment of the present invention have at least the following beneficial effects: the traditional method of implementing the readout circuit of the storage and computing system is: inputting the analog voltage into a multi-bit ADC, comparing it with different reference voltages, and obtaining a binary code output result.
[0014] Compared with the traditional method, the present application has the characteristics of anti-PVT interference, low power consumption and small area.
[0015] Anti-PVT interference: The replica column and the calculation column work under the same PVT conditions. The two are equivalent to differential mode input, and the error caused by the change of PVT can be compared to common mode input. Therefore, this application can antagonize this "common mode" error and achieve the effect of anti-PVT interference.
[0016] Low power consumption: Traditional ADCs require additional reference voltage generation circuits, which consume a lot of energy, but this application does not require a reference voltage generation circuit. The counter required by this application does not have a DC path, and can use a gated clock to work only during calculation, further reducing power consumption.
[0017] Small area: When the output accuracy requirements are the same, such as outputting a 4-bit result, if a traditional flash ADC is used, 15 comparators are required, and if a SAR ADC is used, a large-area capacitor array is required. However, this design only requires one comparator, which greatly reduces the chip area occupied by the comparator.
[0018] It is to be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 is a schematic diagram of an in-memory analog-to-digital conversion circuit according to an embodiment;
[0021] Figure 2 1 is a waveform diagram of each signal according to an embodiment. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] The terms "first", "second", and "third" 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. Thus, a feature defined as "first", "second", and "third" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "plurality" means two or more.
[0024] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "connected", "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0025] The steps are only exemplary and do not necessarily include all contents and operations / steps, nor must they be performed in the order described. For example, some operations / steps can be decomposed, while some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0026] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of the present disclosure will be more comprehensive and complete and the concepts of the example embodiments will be fully conveyed to those skilled in the art. The accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0027] The technical solution of the embodiment of the present application is briefly described below:
[0028] In-memory computing systems generally store the weight data of the neural network in an SRAM array, and by inputting different excitation signals to the word line, the bit line is kept at a high level or causes discharge, thereby obtaining the multiplication result of the single-bit input and the weight. By connecting several such multiplication units in series on the same bit line, the average value of several single-bit multiplication results is obtained, which is usually expressed as an analog voltage quantity discharged from a high level to different degrees. The ideal analog voltage quantity satisfies the linear mapping of the calculation result to the analog voltage, and its mapping relationship can be written as the following expression:
[0029]
[0030] In the formula, the input IN and weight W are unknown single-bit digital quantities, and the unit drop in the bit line voltage ΔV BL It is obtained by discharging on the bit line. The analog voltage needs to be converted from analog to digital by the internal calculation readout circuit, and finally output in the form of digital binary code. In this application, the analog voltage of 0.2V to 1V on the bit line of the calculation column is converted into a 4-bit binary digital output through the analog-to-digital conversion process.
[0031] According to some embodiments, Figure 1 As shown, the present application provides an in-memory analog-to-digital conversion circuit, the in-memory analog-to-digital conversion circuit includes a calculation column, a copy column and a comparator COMP1:
[0032] The connection structure is as follows:
[0033] Two input terminals of the comparator COMP1 are respectively connected to the bit line of the calculation column and the bit line of the copy column.
[0034] Among them, the calculated column is used to store the neural network weight data; the copied column is used to store pre-set data, and the data in the copied column is used to compare with the data in the calculated column.
[0035] Based on the working principle of the above embodiment, when the stored data in the calculation column is read as a digital signal, the copy column and the calculation column are first controlled to be fully turned on, and the bit line voltage of the calculation column and the bit line voltage of the copy column are compared by the comparator COMP1. At this time, the bit line voltage of the copy column is greater than the bit line voltage of the calculation column, and the comparator COMP1 outputs a first output value. Then the bit line voltage of the copy column is controlled to decrease, and the output of the comparator COMP1 is obtained again after the decrease. When the output of the comparator COMP1 does not flip, the bit line voltage of the copy column is continued to be controlled to decrease in sequence, and the output of the comparator COMP1 is obtained after each decrease of the bit line voltage of the copy column. When the output of the comparator COMP1 flips, the bit line voltage of the copy column is stopped from being reduced. At this time, the bit line voltage of the copy column is just less than the bit line voltage of the calculation column, and the analog-to-digital conversion value of the calculation column can be calculated according to the bit line voltage of the copy column, and the digital signal stored in the calculation column is obtained.
[0036] The following is combined with the appendix of this manual Figure 1 , the preferred implementation modes of the present disclosure are further elaborated in detail.
[0037] According to some embodiments, Figure 1 As shown, the in-memory analog-to-digital conversion circuit also includes a word line controller, the word lines of the calculation column and the word lines of the copy column are both connected to the word line controller, and the word line controller is used to control the opening and closing of the copy column and the calculation column.
[0038] The word line controller controls the calculation column to be fully turned on through the word line of the calculation column, and after the word line controller controls the copy column to be fully turned on through the word line of the copy column, the bit line voltage of the copy column is controlled to decrease in sequence through the word line of the copy column.
[0039] According to some embodiments, Figure 1 As shown, the in-memory analog-to-digital conversion circuit also includes a plurality of calculation columns and a plurality of comparators COMP.
[0040] The connection structure is as follows:
[0041] The first input terminals of the plurality of comparators COMP are all connected to the bit lines of the replica column, and the second input terminal of each comparator COMP is correspondingly connected to a bit line of a calculation column.
[0042] The output terminal of each comparator COMP outputs the comparison result between the bit line voltage of the replica column and the bit line voltage of each calculation column.
[0043] According to some embodiments, Figure 1 As shown, the in-memory analog-to-digital conversion circuit further includes a counter, which is respectively connected to the output ends of the plurality of comparators COMP, and is used to output a continuous analog-to-digital converted digital signal Output.
[0044] The working principle based on the above embodiment is as follows: Figure 1 As shown, the counter is connected to the output terminals of multiple comparators COMP from left to right in sequence to continuously output the digital signals after analog-to-digital conversion of the data in multiple calculation columns. The calculation column is used to store the neural network weight data, and the counter outputs the digital signal of the neural network weight data.
[0045] According to some embodiments, Figure 1 As shown, the calculation column and the replication column both use 6T SRAM storage units. The calculation column and the replication column of the present application are not limited to using 6T SRAM storage units, and the 6T SRAM storage unit is only an example and is not limited.
[0046] Further, such as Figure 1 As shown, the 6T SRAM storage unit includes six storage modules, and each of the six storage modules includes a first NMOS transistor NM1, a second NMOS transistor NM2, a first inverter NOT1 and a second inverter NOT2.
[0047] The connection structure of each storage module is as follows:
[0048] The gates of the first NMOS tube NM1 and the second NMOS tube NM2 are both connected to the output of the word line controller as word lines, the first end of the first NMOS tube NM1 is connected to the input end of the first inverter NOT1 and the output end of the second inverter NOT2, the second end of the first NMOS tube NM1 is connected to the second input end of the comparator COMP1, and the first end of the second NMOS tube NM2 is connected to the output end of the first inverter NOT1 and the input end of the second inverter NOT2.
[0049] Among them, Figure 1 As shown, the second ends of all the first NMOS transistors NM1 in the 6T SRAM storage unit are connected to each other, and the second ends of all the second NMOS transistors NM2 in the 6T SRAM storage unit are connected to each other.
[0050] In some embodiments, Figure 2 As shown, CLK is the clock signal, WL_compute is the voltage waveform of all word lines of the calculation column, in VBL, the one with low voltage at the end is the bit line waveform of the copy column, and the one with high voltage at the end is the bit line voltage of the calculation column, WL_replicate is the word line waveform of the copy column, and CTR_OUT is the output waveform of the counter. First, a pulse is turned on on the word line WL of the calculation column, and the calculation column performs multiplication and accumulation operations. The calculation result is represented by the analog voltage on the bit line BL of the calculation column. Starting from the second cycle, the quantization process is carried out. First, the comparator is reset in the first half of the cycle, and the voltage of the bit line of the copy column decreases in the second half of the cycle under the action of the pulse of the copy column WL. After multiple decreases of the same amplitude, the comparator result output of a certain cycle is flipped. At this time, the counter stops counting, and the result of the multiplication and accumulation operation is converted into a digital output, such as Figure 2 The output for the case is 3.
[0051] The traditional way to implement the readout circuit of the storage and computing system is to input the analog voltage into a multi-bit ADC, compare it with different reference voltages, and obtain the output result of the binary code.
[0052] Compared with the traditional method, the present application has the characteristics of anti-PVT interference, low power consumption and small area.
[0053] Anti-PVT interference: The replica column and the calculation column work under the same PVT conditions. The two are equivalent to differential mode input, and the error caused by the change of PVT can be compared to common mode input. Therefore, this application can antagonize this "common mode" error and achieve the effect of anti-PVT interference.
[0054] Low power consumption: Traditional ADCs require additional reference voltage generation circuits, which consume a lot of energy, but this application does not require a reference voltage generation circuit. The counter required by this application does not have a DC path, and can use a gated clock to work only during calculation, further reducing power consumption.
[0055] Small area: When the output accuracy requirements are the same, such as outputting a 4-bit result, if a traditional flash ADC is used, 15 comparators are required, and if a SAR ADC is used, a large-area capacitor array is required. However, this design only requires one comparator, which greatly reduces the chip area occupied by the comparator.
[0056] According to some embodiments, the present application provides a control method for an in-memory analog-to-digital conversion circuit, which is applied to the in-memory analog-to-digital conversion circuit as described above, and the control method includes:
[0057] Step 101, controlling the copy column and the calculation column to be turned on through a word line controller, and obtaining the output value of the comparator COMP1;
[0058] Step 102, controlling the bit line voltage of the replica column to decrease, the counter counts, and obtains the output value of the comparator COMP1. When the output value of the comparator COMP1 is not flipped, step 102 is repeated. When the output value of the comparator COMP1 is flipped, step 103 is entered.
[0059] Step 103: Stop reducing the bit line voltage of the replica column, and the counter outputs the analog-to-digital conversion value of the calculation column.
[0060] Based on the above embodiment, the copy column and the calculation column are first controlled to be fully turned on, and the bit line voltage of the calculation column and the bit line voltage of the copy column are compared by the comparator COMP1. At this time, the bit line voltage of the copy column is greater than the bit line voltage of the calculation column, and the comparator COMP1 outputs a first output value. Then the bit line voltage of the copy column is controlled to decrease, and the output of the comparator COMP1 is obtained again after the decrease. When the output of the comparator COMP1 does not flip, the bit line voltage of the copy column is continued to be controlled to decrease in sequence, and the output of the comparator COMP1 is obtained after each decrease of the bit line voltage of the copy column. When the output of the comparator COMP1 flips, the bit line voltage of the copy column is stopped from being reduced. At this time, the bit line voltage of the copy column is just less than the bit line voltage of the calculation column, and the counter can calculate the analog-to-digital conversion value of the calculation column according to the number of times the bit line voltage of the copy column is reduced, and the digital signal stored in the calculation column is obtained.
[0061] According to some embodiments, the present application provides a memory, wherein the memory includes the in-memory analog-to-digital conversion circuit as described above.
[0062] In some embodiments of the present application, the in-memory analog-to-digital conversion circuit is integrated into the memory, and in other embodiments it may also be integrated into a microprocessor, which is not limited in the present application.
[0063] In the description of the above embodiments, specific features, structures, materials or characteristics may be combined in a suitable manner in any one or more embodiments or examples.
[0064] Although the present disclosure has been described with reference to several typical embodiments, it should be understood that the terms used are illustrative and exemplary, rather than restrictive. Since the present disclosure can be implemented in a variety of forms without departing from the spirit or essence of the present application, it should be understood that the above-mentioned embodiments are not limited to any of the foregoing details, but should be widely interpreted within the spirit and scope defined by the appended claims, so all changes and modifications falling within the scope of the claims or their equivalents should be covered by the appended claims.
Claims
1. An in-memory analog-to-digital conversion circuit, characterized in that: The in-memory analog-to-digital conversion circuit comprises: A calculation column, wherein the calculation column is used to store neural network weight data; A copy column, the copy column is used to store preset data, and the data in the copy column is used to compare with the data in the calculation column; A comparator, wherein the comparator is respectively connected to the bit line of the calculation column and the bit line of the copy column; Control the copy column and the calculation column to be turned on, control the bit line voltage of the copy column to be reduced in sequence, compare the bit line voltage of the calculation column with the bit line voltage of the copy column through the comparator, and when the output of the comparator is flipped, stop reducing the bit line voltage of the copy column, and calculate the analog-to-digital conversion value of the calculation column according to the copy column; The in-memory analog-to-digital conversion circuit further includes a word line controller, the word lines of the calculation column and the word lines of the copy column are both connected to the word line controller, and the word line controller is used to control the opening and closing of the copy column and the calculation column; The in-memory analog-to-digital conversion circuit also includes multiple calculation columns and multiple comparators, the first input ends of the multiple comparators are all connected to the bit lines of the replica columns, and the second input end of each comparator is correspondingly connected to a bit line of the calculation column.
2. The in-memory analog-to-digital conversion circuit according to claim 1, characterized in that: The in-memory analog-to-digital conversion circuit also includes a counter, which is respectively connected to the output ends of the multiple comparators, and is used to output continuous analog-to-digital converted digital signals.
3. The in-memory analog-to-digital conversion circuit according to claim 2, characterized in that: The calculation column and the replication column both use 6T SRAM storage cells.
4. The in-memory analog-to-digital conversion circuit according to claim 3, characterized in that: The 6T SRAM storage unit includes six storage modules, each of which includes a first NMOS tube, a second NMOS tube, a first inverter and a second inverter. The gates of the first NMOS tube and the second NMOS tube are connected to the output of the word line controller as word lines. The first end of the first NMOS tube is connected to the input end of the first inverter and the output end of the second inverter. The second end of the first NMOS tube is connected to the second input end of the comparator. The first end of the second NMOS tube is connected to the output end of the first inverter and the input end of the second inverter.
5. A control method for an in-memory analog-to-digital conversion circuit, applied to the in-memory analog-to-digital conversion circuit according to any one of claims 2 to 4, characterized in that: The control method comprises: Step 101, control the copy column and the calculation column to start, and obtain the output value of the comparator; Step 102, controlling the bit line voltage of the replica column to decrease, the counter counts, and obtains the output value of the comparator. When the output value of the comparator is not flipped, step 102 is repeated. When the output value of the comparator is flipped, step 103 is entered. Step 103, stop reducing the bit line voltage of the replica column, and the counter outputs the analog-to-digital conversion value of the calculation column.
6. A memory, characterized in that: The memory includes the in-memory analog-to-digital conversion circuit as described in any one of claims 1 to 4.
Citation Information
Patent Citations
System for custom recording
CA1341129C
SRAM (Static Random Access Memory) memory calculation circuit for quantizing bit line voltage difference through redundant rows
CN115472197A
