Sub-cell, Mac array and Bit-width Reconfigurable Mixed-signal In-memory Computing Module

20220351761 · 2022-11-03

    Inventors

    Cpc classification

    International classification

    Abstract

    A mixed-signal in-memory computing sub-cell only requires 9 transistors for 1-bit multiplication. A computing cell is constructed from a plurality of such sub-cells that share a common computing capacitor and a common transistor. Also proposed is a MAC array for performing MAC operations, which includes a plurality of the computing cells each activating the sub-cells therein in a time-multiplexed manner. Also proposed is a differential version of the MAC array with improved computation error tolerance and an in-memory mixed-signal computing module for digitalizing parallel analog outputs of the MAC array and for performing other tasks in the digital domain. An ADC block in the computing module makes full use of capacitors in the MAC array, thus allowing the computing module to have a reduced area and suffer from less computation errors. Also proposed is a method of fully taking advantage of data sparsity to lower the ADC block's power consumption.

    Claims

    1. An in-memory mixed-signal computing sub-cell, configured for 1-bit multiplication, the in-memory mixed-signal computing sub-cell comprising a conventional six-transistor (6T) static random-access memory (SRAM) cell, a complementary transmission gate, a first NMOS transistor and a computing capacitor, wherein the conventional 6T SRAM cell consists of MOS transistors M.sub.1, M.sub.2, M.sub.3, M.sub.4, M.sub.5, M.sub.6, in which a complementary metal-oxide-semiconductor (CMOS) inverter consisting of the MOS transistors M.sub.1, M.sub.2 is cross-coupled to a CMOS inverter consisting of the MOS transistors M.sub.3, M.sub.4, the cross-coupled two CMOS inverters store a 1-bit filter parameter, and the MOS transistors M.sub.5, M.sub.6 serve as control switches for bit lines for reading and writing the filter parameter, the CMOS inverter consisting of the MOS transistors M.sub.1, M.sub.2 in the conventional 6T SRAM cell comprises an output connected to an input of a complementary transmission gate, the complementary transmission gate comprising an output connected to a drain of the first NMOS transistor, the first NMOS transistor has a source that is grounded, and a drain connected to a bottom plate of the computing capacitor, the complementary transmission gate comprises an NMOS transistor having a gate connected to an input signal, and a PMOS transistor having a gate connected to a complementary input signal at a same voltage level during computation as a signal input to a gate of the first NMOS transistor, a multiplication result of the input signal and the filter parameter is stored as a voltage on the bottom plate of the computing capacitor, and a plurality of said sub-cells are arranged to form a computing cell, the first NMOS transistor and the computing capacitor are shared among all the computing sub-cells in the computing cell.

    2. The in-memory mixed-signal computing sub-cell of claim 1, wherein the sub-cells in the computing cell are activated in a time-multiplexed manner where the complementary input signal at the gate of the PMOS transistor in the complementary transmission gate of the sub-cells that are active at a given time is at the same voltage level as the signal to which the gate of the first NMOS transistor is connected.

    3. A multiply-accumulate (MAC) array, configured for performing MAC operations and comprising the in-memory mixed-signal computing sub-cells of claim 2, wherein the MAC array comprises a plurality of computing cells, in each of which the outputs of the complementary transmission gates of all the sub-cells are connected to the bottom plate of the shared computing capacitor, wherein top plates of the computing capacitors in all the computing cells of each column are connected to a respective accumulation bus, and wherein a voltage on each accumulation bus corresponds to an accumulated sum of multiplication operation results of the respective column of the MAC array.

    4. The MAC array of claim 3, further comprising a plurality of differential computing cells each comprising a differential complementary transmission gate, a differential computing capacitor and a first PMOS transistor, wherein in each of the computing cells in the MAC array, the output of the CMOS inverter consisting of the MOS transistors M.sub.3, M.sub.4 in each conventional 6T SRAM cell is connected to an input of a respective differential complementary transmission gate, and all the differential complementary transmission gates connected to the respective CMOS inverters each consisting of the MOS transistors M.sub.3, M.sub.4 are connected at outputs thereof to a drain of a respective first PMOS transistor, the drain of the respective first PMOS transistor is connected to a bottom plate of a respective differential computing capacitor, the respective first PMOS transistor has a source connected to VDD, wherein differential multiplication results are stored as bottom plate voltages of the respective differential computing capacitors, and wherein top plates of the differential computing capacitors of the differential computing cells in each column are connected to a respective differential accumulation bus.

    5. The MAC array of claim 3, further comprising first CMOS inverters and differential computing capacitors, wherein in each of the computing cells in the MAC array, the outputs of all the complementary transmission gates are connected to an input of a respective one of the first CMOS inverters, and an output of the first CMOS inverter is connected to a bottom plate of a respective one of the differential computing capacitors, wherein differential multiplication results are stored as bottom plate voltages of the respective differential computing capacitors, and wherein top plates of the differential computing capacitors in each column are connected to a respective differential accumulation bus.

    6. A bit-width reconfigurable mixed-signal in-memory computing module, comprising: the MAC array of any claim 3, wherein column-wise accumulation results of multiplication results in the MAC array are represented as analog voltages; a filter/ifmap block, configured for providing filter parameters or activations from computation in a previous layer, which are written into and stored in the MAC array; an ifmap/filter block, configured for providing an input to the MAC array, which is subject to MAC operations with the filter parameters or the activations from computation in the previous layer; an analog-to-digital conversion (ADC) block, configured for converting the analog voltages from the MAC array to digital representations; and a digital processing block, configured for performing at least multi-bit fusion, biasing, scaling or nonlinearity on an output of the ADC block, and wherein outputting results in a form of partial sums or activations are directly usable as an input to the next network layer.

    7. The computing module of claim 6, wherein the ADC block is successive approximation register (SAR) ADCs of a binarily weighted capacitor array, each of the SAR ADCs comprising: a MAC digital-to-analog converter (DAC) consisting of the computing capacitors in a respective column of the MAC array; a SAR DAC, which is an array consisting of a plurality of binarily weighted capacitors and one redundant capacitor of a same capacitance as a least significant bit (LSB) capacitor therein; a comparator; a switching sequence; and SAR logic configured for controlling the switching sequence.

    8. The computing module of claim 7, wherein an output voltage of the MAC DAC is taken as an input to one end of the comparator, and an output voltage of the SAR DAC is taken as an input to the other end of the comparator.

    9. The computing module of claim 7, wherein an output voltage generated by the parallelly connected capacitors in the MAC DAC and in the SAR DAC is taken as an input to one end of the comparator, and a comparison voltage V.sub.ref is taken as an input to the other end of the comparator.

    10. The computing module of claim 8, wherein one half-LSB capacitor is added to both positive V.sub.+ and negative V.sub.− input ends of the comparator, and wherein an output voltage of the MAC DAC and the half-LSB capacitor connected in parallel with the MAC DAC is taken as an input to the one end of the comparator, and an output voltage of the SAR DAC and the half-LSB capacitor connected in parallel with the SAR DAC is taken as an input to the other end of the comparator.

    11. The computing module of claim 7, wherein the MAC DAC and a half-LSB capacitor are both connected to the switching sequence and reused as the SAR DAC, and an output voltage of the dual-use DAC is taken as an input to one end of the comparator, and wherein a comparison voltage V.sub.ref is taken as an input to the other end of the comparator.

    12. The computing module of claim 7, wherein the SAR ADC further comprises a differential MAC DAC consisting of differential capacitors in a respective column of the MAC array.

    13. The computing module of claim 12, wherein the MAC DAC and an additional LSB capacitor connected in parallel therewith are both connected to the switching sequence and reused as the SAR DAC, and an output voltage of the dual-use DAC is taken as an input to one end of the comparator, and wherein the differential MAC DAC and an additional differential LSB capacitor connected in parallel therewith are both connected to the switching sequence and reused as a differential SAR DAC, and an output voltage of the dual-use differential DAC is taken as an input to the other end of the comparator.

    14. The computing module of claim 9, wherein a bit-width of the SAR ADC is determined in real time by the sparsity of input data and stored data in the computing array and expressed as ceil(log.sub.2(min(X,W)+1)), where ceil is a ceiling function, min is a minimum function, X is the number of 1 within a 1-bit input vector, W is the number of 1 stored in one column of the computing array, and the real-time bit-width calculation expression is equivalently implemented by digital combinatorial logic in circuitry.

    Description

    BRIEF DESCRIPTION OF THE DRAWINGS

    [0033] FIG. 1 is a structural schematic of a sub-cell for 1-bit multiplication according to an embodiment of the present invention;

    [0034] FIG. 2 schematically illustrates a truth table for the 1-bit multiplication sub-cell according to an embodiment of the present invention;

    [0035] FIG. 3a is a schematic diagram illustrating an arrangement of sub-cells in a computing cell according to an embodiment of the present invention;

    [0036] FIG. 3b is a schematic illustration of a computing cell composed of a plurality of sub-cells according to an embodiment of the present invention;

    [0037] FIG. 3c schematically illustrates a truth table used during operation of the computing cell according to an embodiment of the present invention;

    [0038] FIG. 4a is a schematic illustration of a MAC array according to an embodiment of the present invention;

    [0039] FIG. 4b schematically illustrates bottom and top plate voltages of a computing capacitor according to an embodiment of the present invention;

    [0040] FIG. 5a is a schematic illustration of a 10T structure according to an embodiment of the present invention;

    [0041] FIG. 5b is a schematic illustration of an extended computing cell version according to an embodiment of the present invention;

    [0042] FIG. 6a is a structural schematic of an 8T structure according to an embodiment of the present invention;

    [0043] FIG. 6b is a schematic illustration of an extended computing cell version according to another embodiment of the present invention;

    [0044] FIG. 6c is a structural schematic of a differential MAC array architecture according to an embodiment of the present invention;

    [0045] FIG. 7 is a schematic diagram illustrating an in-memory computing module according to an embodiment of the present invention;

    [0046] FIG. 8 is a schematic illustration of an ADC block according to an embodiment of the present invention;

    [0047] FIG. 9 is a schematic illustration of an ADC block according to another embodiment of the present invention;

    [0048] FIG. 10 is a schematic illustration of an ADC block according to a further embodiment of the present invention;

    [0049] FIG. 11 is a schematic illustration of an ADC block according to a further embodiment of the present invention;

    [0050] FIG. 12 is a schematic illustration of a differential ADC block according to a further embodiment of the present invention; and

    [0051] FIG. 13 schematically illustrates architecture with lower power consumption in analog-to-digital conversion according to an embodiment of the present invention.

    DETAILED DESCRIPTION

    [0052] The objects, principles, features and advantages of the present invention will become more apparent from the following detailed description of embodiments thereof, which is to be read in connection with the accompanying drawings. It will be appreciated that the particular embodiments disclosed herein are illustrative and not intended to limit the present invention, as also explained somewhere else herein.

    [0053] It is particularly noted that, for the brevity of illustration, some connections or positional relationships that can be inferred from the text of this specification or the teachings disclosed herein are omitted in the figures, or not all positional changes are depicted. Such positional changes that are not clearly described or illustrated should not be considered as having not taken place. As collectively clarified here, this will not be explained separately in the following detailed description, for the sake of conciseness.

    [0054] As a common application scenario, bit-width reconfigurable mixed-signal computing modules provided in embodiments of the present invention can be used in visual and acoustic DNN architectures, in particular in object detection, acoustic feature extraction with low power consumption, etc.

    [0055] For example, in the case of feature extraction, a feature extractor convolves data to be processed with a filter consisting of weights and outputs feature maps. Depending on the filter selected, different features may be extracted. In this process, the convolution operation of the data to be processed with the filter is most power-consuming, necessitating the avoidance of power consumption in unconditional circuit driving or the like, in particular when the data to be processed is a sparse matrix.

    [0056] FIG. 1 is a structural schematic of a sub-cell for 1-bit multiplication according to an embodiment of the present invention, which includes a conventional 6T SRAM cell, a complementary transmission gate, a first NMOS transistor and a computing capacitor. The conventional 6T SRAM cell consists of MOS transistors M.sub.1, M.sub.2, M.sub.3, M.sub.4, M.sub.5, M.sub.6. A CMOS inverter consisting of the MOS transistors M.sub.1, M.sub.2 is cross-coupled to a CMOS inverter consisting of the MOS transistors M.sub.3, M.sub.4. The cross-coupled two CMOS inverters store a 1-bit filter parameter, and the MOS transistors M.sub.5, M.sub.6 act as control switches for bit lines for reading and writing the filter parameter.

    [0057] An output of the CMOS inverter consisting of the MOS transistors M.sub.1, M.sub.2 in the conventional 6T SRAM cell is connected to an input of the complementary transmission gate, and an output of the complementary transmission gate is connected to a drain of the first NMOS transistor.

    [0058] A source of the first NMOS transistor is grounded, and the drain thereof is connected to a bottom plate of the computing capacitor.

    [0059] During computation, in the complementary transmission gate of the sub-cell, a gate of an NMOS transistor is connected to an input signal and a gate of a PMOS transistor is at the same voltage level as a signal input to a gate of the first NMOS transistor.

    [0060] A multiplication result of the input signal and the filter parameter is stored as a voltage on the bottom plate of the computing capacitor, and a plurality of such computing sub-cells are arranged to form a computing cell in such a manner that the first NMOS transistor and the computing capacitor are shared among all the sub-cells in the computing cell.

    [0061] The input signals at the NMOS and PMOS gates of the complementary transmission gate are denoted at A and nA, and the signal at the gate of the first NMOS transistor are denoted at B. In particular, as shown in FIG. 1, in the sub-cell, the signals B and nA may be the same. In some possible embodiments, the signals B and nA may be at the same voltage level by connecting both to a common node. The conventional 6T SRAM stores the filter parameter W that is written therein following the conventional 6T SRAM write procedure, in which a word line WL is set to VDD and bit lines BL, nBL to 0 or 1 depending on the value to be written. For example, in order to write “0”, the word line WL is set at a high voltage level to VDD, and the MOS transistors M.sub.5 and M.sub.6 are both conducting. Moreover, the bit line BL is set to 0 and nBL to VDD. As a result, a voltage at W drops via M.sub.6, representing logic 0; and a voltage at nW rises via M.sub.5, representing logic 1.

    [0062] Optionally, the sub-cell may follow the procedure below to perform a 1-bit multiplication operation:

    [0063] 1. Reset a top plate voltage V.sub.top of the computing capacitor to V.sub.rst through a reset switch S.sub.rst on the accumulation bus.

    [0064] 2. Conduct the first NMOS transistor in the sub-cell by raising the signal B at its gate to VDD, thus resetting the bottom plate voltage V.sub.btm of the capacitor to 0, keep the input signals A and nA in the complementary transmission gate of the sub-cell at 0 and VDD, respectively, and disconnect S.sub.rst after V.sub.btm is reset to 0.

    [0065] 3. During computation, activate the input signals A and nA in the sub-cell according to the truth table of the 1-bit multiplication operation as shown in FIG. 2.

    [0066] 4. After the multiplication operation in the sub-cell is completed, either maintain the bottom plate voltage V.sub.btm of the computing capacitor at 0 or raise it to VDD, and output a result of the multiplication operation as the computing capacitor's bottom plate voltage V.sub.btm, expressed as VDD×w×A.

    [0067] It is to be understood that the sub-cell accomplishes the 1-bit multiplication operation (of the filter parameter w and the input signal A) with only 9 transistors, thus having a reduced sub-cell area and higher energy efficiency. It would be appreciated that the first NMOS transistor is included in the sub-cell for the purpose of control, and the 1-bit multiplication operation result of the input signal A and the filter parameter w stored in the SRAM cell is stored as the bottom plate voltage of the computing capacitor. For ease of description, the structure in which the SRAM cell is connected to the complementary transmission gate and contains 8 transistors is referred to as an 8T structure (or 8T sub-cell, as it contains eight transistors). This computing sub-cell is an extended version of the conventional 6T SRAM cell. This promises better economic benefits in practical applications by standardized sub-cell structure and allows enhanced sub-cell scalability. Further, instead of connecting the complementary transmission gate to the top plate of the computing capacitor as conventionally practiced, connecting it to the bottom plate of the computing capacitor can minimize computation errors, in particular those caused by clock feedthrough introduced with MOS transistor switches, charge injection occurring during on-to-off switching, nonlinear parasitic capacitance at the drains/sources of the transistors in the complementary transmission gate, leakage of the transistors themselves, etc.

    [0068] In order to further reduce the number of components in the sub-cell, in some embodiments, a plurality of the sub-cells may be arranged in a feasible shape such as 2×2, 4×2, etc., as shown in FIG. 3a, to form a computing cell. FIG. 3b shows such a computing cell composed of four sub-cells. In the figure, WL.sub.0 denotes a word line common to the sub-cells a and b; WL.sub.1, a word line common to the sub-cells c and d; BL.sub.0 and nBL.sub.0, bit lines common to the sub-cells a and c; BL.sub.1 and nBL.sub.1, bit lines common to the sub-cells b and d; B.sub.0, the gate signal; W.sub.0a-W.sub.0d and nW.sub.0a-nW.sub.0d, weight storage locations in the four sub-cells; and V.sub.btm0; the bottom plate voltage of the first computing cell. In such a computing cell, each sub-cell retains its own 8T (sub-cell) structure, and all the sub-cells share a common first NMOS transistor and a common computing capacitor. Specifically, in such a computing cell, the output of the complementary transmission gate in each sub-cell is connected to the drain of the common first NMOS transistor, which is in turn connected to the bottom plate of the common computing capacitor. That is, every such computing cell contains only one first NMOS transistor and one computing capacitor, which are shared by all the sub-cells contained in the computing cell to perform 1-bit multiplication operations. Intuitively, this arrangement reduces the numbers of necessary first NMOS transistors and computing capacitors. For example, in a computing cell composed of 2×2 sub-cells, the number of the first NMOS transistors is reduced by 3 and the number of the computing capacitors is reduced by 3. It can be understood that the more sub-cells share one first NMOS transistor and one computing capacitor, the closer the average number of transistors in each sub-cells is to 8.

    [0069] Moreover, as the area of a single capacitor is generally as large as several times that of a 6T SRAM cell, compared to each 1-bit multiplication sub-cell being separately equipped with an individual capacitor for storing a computation result, the arrangement with multiple 1-bit multiplication sub-cells sharing a single capacitor can greatly improve the storage capacity per unit area. That is, more filter parameters or weights can be stored per area, compared to the conventional techniques.

    [0070] Additionally, the sub-cells in the computing cell may be activated in a time-multiplexed manner. That is, when any sub-cell is activated, all the other sub-cells are deactivated. The activated sub-cell can perform a 1-bit multiplication operation in the way as described above according to the truth table in FIG. 3c. Specifically, in some embodiments, the signals at the gates of the NMOS and PMOS transistors in the complementary transmission gates in the sub-cells are denoted as A.sub.ij and nA.sub.ij, respectively, where i is the index of cells in a column and is a non-negative integer from 0 to n−1, and j is the index of sub-cells in each cell and j=a, b, c, d in the 2×2 sub-cells example. As can be appreciated, sharing of a computing capacitor and a first NMOS transistor among sub-cells means that the computing cell includes multiple sub-cells capable of multiplication and accumulation. It is noted that differing from separate individual sub-cells, when multiple sub-cells are arranged to form a single computing cell, the input signal B.sub.i at the first NMOS transistor's gate is controlled separately from the input signal nA.sub.ij at the PMOS gate of the complementary transmission gate in each sub-cell. In the case of time-multiplexing, although the complementary input signal nA.sub.ij in the activated sub-cell at a given time remains at the same voltage level as the signal B.sub.i, this is no longer realized by connection at a common node. It will be appreciated that sharing of a computing capacitor and a first NMOS transistor among sub-cells means that the computing cell includes multiple sub-cells capable of multiplication and accumulation. In contrast to the same number of separate sub-cells, the computing cell saves the use of n−1 computing capacitors and n−1 first NMOS transistors, making the number of transistors required for each sub-cell to perform a 1-bit multiplication operation closer to 8. Due to being fabricated by different processes, the area of the computing capacitor is typically several times that of a SRAM cell. By reducing the number of computing capacitors per unit area, the sharing arrangement can impart higher storage capacity to an array module made up of those computing cells.

    [0071] It will be appreciated that the above sharing arrangement is also applicable to any other sub-cell structure than the conventional 6T SRAM, which can equally perform the functions of storing and reading 1-bit filter parameters.

    [0072] In a second aspect, a multiply-accumulate (MAC) array for MAC operation is provided on the basis of the sub-cells according to the first aspect and possible implementations thereof. Referring to FIG. 4a, the MAC array includes a plurality of the computing cells, and in each column of computing cells, the top plates of the computing capacitors are connected to a respective accumulation bus.

    [0073] In contrast to an MAC array constructed from individual sub-cells, the computing cells with shared capacitors and transistors enable the MAC array to store more neural network parameters or computation results from the previous network layer. Specifically, the results of 1-bit multiplication operations in the computing cells are stored in the computing capacitors, and the 1-bit multiplication results from the computing cells of each column in the MAC array are accumulated by the respective accumulation bus to which the top plates of the computing capacitors are connected.

    [0074] For in-memory computing, reducing data movement between inside and outside of the computing chip is a direct way to reduce power consumption. It will be appreciated that this design allows the MAC array to contain more SRAM cells per unit area, which can store more filter parameters compared to conventional techniques. In each cell, after an in-memory computation is completed in one sub-cell, another in-memory computation can be immediately initiated with a filter parameter stored in another sub-cell of the same cell without waiting for the transfer of data from outside into the SRAM. This results in enhancements in throughput, and results in reductions in power consumption and area consumption. As the area of a computing capacitor is typically several times that of a conventional 6T SRAM cell, reducing the number of capacitors in each computing cell can improve the array's throughput and reduce its power consumption.

    [0075] Referring to FIG. 4b, in particular, as the top plates of the computing capacitors of each column are connected together through the respective accumulation bus, the voltage on the accumulation bus is V.sub.top. It is clarified that the plurality of computing cells are column-wise arranged so that each computing cell corresponds to one computing capacitor and contains a plurality of sub-cells according to the first aspect or embodiments thereof. In FIG. 4b, V.sub.btm0-V.sub.btm(N-1) denote the bottom plate voltages of the first through N-th computing cells.

    [0076] In some embodiments, the MAC array may follow “Procedure I” below to perform a MAC operation:

    [0077] 1. First write filter parameters (or activations from computation in the previous network layer) into the sub-cells following the 6T SRAM write procedure.

    [0078] 2. Reset the top plate voltage V.sub.top of the computing capacitors to V.sub.rst, which may be 0, through a reset switch S.sub.rst on the accumulation bus.

    [0079] 3. Reset the bottom plate voltages V.sub.btmi of the computing capacitors to 0 by raising the signal B.sub.i in every computing cell to VDD, keep the signals A.sub.ij and nA.sub.ij in every computing cell at 0 and VDD, respectively, and disconnect S.sub.rst.

    [0080] 4. During computation, activate the signals A.sub.ij and nA.sub.ij in a time-multiplexed manner. For example, when A.sub.0a and nA.sub.0a are activated, A.sub.0j and nA.sub.0j (j=b, c, d) are deactivated, i.e. kept at 0 and VDD, respectively. It is to be noted that, during computation, B.sub.0 in one computing cell is at the same voltage level as nA.sub.0j in the then activated sub-cell.

    [0081] 5. After the multiplication in each computing cell in a column is completed, either maintain the bottom plate voltages V.sub.btmi of the computing capacitors at 0, or raise them to VDD. Charge redistribution occurs in the computing capacitors in the column, similar to the charge distribution in capacitors of a successive approximation register (SAR) digital-to-analog converter (DAC), and when not considering non-idealities such as parasitic capacitance and so on, the analog output voltage V.sub.top of the computing capacitors in the column represents the accumulation result expressed in the equation below, as shown in FIG. 4b.

    [00001] V top = VDD N .Math. i = 0 N - 1 W ij A ij ( j = a , b , c , d )

    [0082] In other embodiments, the MAC array may follow “Procedure II” below to perform an operation:

    [0083] 1. Write filter parameters (or activations from computation in the previous network layer) into the sub-cell.

    [0084] 2. Reset the top plate voltage V.sub.top of the computing capacitors to V.sub.rst through a reset switch S.sub.rst on the accumulation bus. S.sub.rst keeps the connection between V.sub.top and V.sub.rst.

    [0085] 3. Reset the bottom plate voltages V.sub.btmi of the computing capacitors to 0 by raising the signal B.sub.i in every cell to VDD and keep the signals A.sub.ij and nA.sub.ij in every cell at 0 and VDD, respectively.

    [0086] 4. During computation, activate the signals A.sub.ij and nA.sub.ij in a similar time-multiplexed manner.

    [0087] 5. After the multiplication in each computing cell in a column is completed, either maintain the bottom plate voltages V.sub.btmi of the computing capacitors at 0, or raise them to VDD, and then disconnect S.sub.rst. With the bottom plate voltages V.sub.btmi being set to 0 or VDD, MOS switches in control means of the computing cells run a successive approximation algorithm for analog-to-digital conversion. As an example, if V.sub.btmi are all set to 0, the voltage V.sub.top can be expressed as:

    [00002] V top = V rst - VDD N .Math. i = 0 N - 1 W ij A ij ( j = a , b , c , d ) ,

    [0088] where W.sub.ij represents the filter parameter in the j-th sub-cell in the i-th computing cell.

    [0089] The MAC array may be in particular used in computation with multi-bit weights. In these cases, each column of computing cells performs a bit-wise MAC operation, and the multi-bit computation results can be obtained by performing shift-add operations on digital representations resulting from analog-to-digital conversion. For example, in the case of k-bit weights or filter parameters, each column may perform a bit-wise MAC operation, e.g., the first column for the least significant bit (LSB) (i.e., performing a MAC operation between the 0-th bit values and the input signals) and the k-th column for the most significant bit (MSB) (i.e., performing a MAC operation between the k-th bit values and the input signals). It will be appreciated that each column separately performs an MAC operation for one bit of multi-bit binary weights, and the MAC results of all the involved columns contain k elements, which are then subject to analog-to-digital conversion and shift-add operations in the digital domain.

    [0090] A differential version of the MAC array architecture may be used to reduce computation errors. In some embodiments, the MAC array further includes differential complementary transmission gates, differential computing capacitors and first PMOS transistors. In each computing cell of the MAC array, the output of the CMOS inverter consisting of the MOS transistors M.sub.3, M.sub.4 in each conventional 6T SRAM cell is connected to an input of a respective one of the differential complementary transmission gates, and all these differential complementary transmission gates connected to the respective CMOS inverters each consisting of the MOS transistors M.sub.3, M.sub.4 are connected at their outputs to a drain of a respective one of the first PMOS transistors. The drain of the respective first PMOS transistor is in turn connected to a bottom plate of a respective one of the differential computing capacitors, and a source thereof is connected to VDD. Differential multiplication results are stored as bottom plate voltages of the respective differential computing capacitors, and top plates of the differential computing capacitors of the differential computing cells in each column are connected to a respective differential accumulation bus. For ease of description, referring to FIG. 5a, the structure in which the 6T SRAM cell is connected to the differential complementary and complementary transmission gates is referred to as a 10T structure (or 10T sub-cell, as it contains ten transistors). Accordingly, the computing cells connected in the MAC array in FIG. 5b are referred to as first differential cells. These first differential cells can be considered as an extension of the above-described computing cells, and hence of the sub-cells constituting the computing cells. In this embodiment, in addition to the 10T structures, each first differential cell further includes some commonly shared transistors and capacitors, more specifically, a common first NMOS transistor, a common first PMOS transistor, a common differential computing capacitor and a common computing capacitor. Further, the sub-cells in each first differential cell may be activated in a similar time-multiplexed manner.

    [0091] In some other embodiments of the differential MAC array architecture, the MAC array may further include first CMOS inverters and differential computing capacitors. In each computing cell of the MAC array, the outputs of all the complementary transmission gates are connected to an input of a respective one of the first CMOS inverter, and an output of the respective first CMOS inverter is connected to a bottom plate of a respective one of the differential computing capacitors. Likewise, referring to FIG. 6a, for ease of description, the structure in which the 6T SRAM cell is connected to the complementary transmission gate is referred to as an 8T structure (or 8T sub-cell, as it contains eight transistors). Accordingly, the computing cells connected in the MAC array in FIG. 6b are referred to as second differential cells, in which differential multiplication results are stored as bottom plate voltages of the differential computing capacitors. As can be appreciated, in this embodiment, in addition to the 8T structures, each second differential cell further includes some commonly shared transistors and capacitors, more specifically, a common first NMOS transistor, a common first CMOS inverter, a common differential computing capacitor and a common computing capacitor. Further, the sub-cells in each second differential cell may be activated in a similar time-multiplexed manner.

    [0092] It is to be noted that both the first and second differential cells are extensions of the above-discussed computing cells, and their naming is intended only to facilitate description of the circuit structures. FIG. 6c is a schematic diagram of a differential MAC array architecture made up of the above-described first or second differential cells, in which in each column, the top plates of all the computing capacitors are connected to a respective accumulation bus, and the top plates of all the differential computing capacitors are connected to a respective differential accumulation bus. In FIG. 6c, V.sub.top_p_1, V.sub.top_p_2, V.sub.top_n_1 and V.sub.top_n_2 denote voltages resulting from computation in the differential computing cells.

    [0093] In a third aspect, there is provided a bit-width reconfigurable mixed-signal computing module. Referring to FIG. 7, it includes: the MAC array according to the second aspect or any possible implementation thereof, wherein column-wise accumulation results are represented in the form of analog voltages, i.e., the top plate voltages V.sub.top of the capacitors described in connection with the above embodiments; a filter/ifmap block for providing filter parameters (or computation results from the previous network layer in the case of a neural network, as will be appreciated) that are written into and stored in the MAC array; an ifmap/filter block for providing an input to the MAC array, more specifically, to the complementary transmission gates in the computing cells, which is subject to MAC operations with the filter parameters or the activations from the previous network layer; an ADC block for converting the analog voltages resulting from the MAC operations to their digital representations; and a digital processing block for performing at least multi-bit fusion, biasing, scaling or nonlinearity on the digital representations output from the ADC block and for outputting results in the form of partial sums or activations (feature maps) directly usable as an input to the next network layer.

    [0094] It will be appreciated that, the module described herein, when used in a neural network to perform MAC operations, may be typically able to pre-load the necessary filter parameters (weights) at once because it contains more memory elements (i.e., 6T SRAM cells) per unit area. After computation in one layer is completed, the output partial sums or final activations (feature maps) directly usable in computation in the next network layer can be immediately subject to MAC operations with the filter parameters (weights) pre-loaded and stored in the module, saving the time waiting for off-chip data movement and the power consumed therein as well. In addition, the high throughput of the module can improve on-chip storage capabilities. For example, apart from the filter parameters, the memory cells in the MAC array can also be used to store the output activations (feature maps) of the same network layer.

    [0095] It will be appreciated that, in addition to the sharing of transistors and computing capacitors within the computing cells and MAC array as described above in the first and second aspects, in fact, the computing cells also share some transistors and other devices involved in the analog-to-digital conversion and digital processing in other regions of the module than the MAC array.

    [0096] According to the present invention, the ADC block may be parallel capacitive SAR ADCs for converting the top plate voltages V.sub.top column-wise output from the computing cells to their digital representations. Each of the SAR ADCs may include a MAC DAC, a SAR DAC, a comparator, a switching sequence and SAR logic for controlling the switching sequence. Compared to SAR ADCs of other types such as resistive and hybrid resistive-capacitive, the parallel capacitive SAR ADCs allow more full utilization of the inventive structures, resulting in a reduced number of components and a reduced area. The MAC DAC is composed of the parallel capacitors in a respective column of computing cells in the MAC array. It will be appreciated that the output voltage of the MAC DAC is V.sub.top. The SAR DAC includes (B+1) parallel capacitors and B=log.sub.2 N, where N is the number of capacitors in the MAC DAC. The capacitors include B capacitors with capacitances binarily decreasing from an MSB one to an LSB one and a redundant capacitor of the same capacitance as the LSB capacitor. As an example, when the number of capacitors in the MAC DAC is N=8, then B=3, the capacitance of the MSB capacitor C.sub.B-1 is C, the capacitance of the second MSB capacitor C.sub.B-2 is C/2, and the capacitance of the LSB capacitor C.sub.0 is C/4. In this case, a reference voltage of the SAR DAC is allocated to the MSB to LSB capacitors respectively at ratios of 1/2, 1/4, 1/8, and the capacitance of the redundant capacitor C.sub.U is C/4. The B capacitors and the redundant capacitor are connected in parallel at one end, and the other ends of the B capacitors are connected to the switching sequence, with the other end of the redundant capacitor being always grounded. A free end of the switching sequence includes a VDD terminal and a ground terminal. The SAR logic controls the switching sequence.

    [0097] In one embodiment, as shown in FIG. 8, the output voltage V.sub.top of the MAC DAC is taken as a positive input V.sub.+ to the comparator, and an output V.sub.SAR of the SAR DAC is taken as a negative input V.sub.− to the comparator. The SAR logic controls the switching sequence to bring the negative input V.sub.− to approximate the positive input V.sub.+. The final SAR logic output is the digital representation of V.sub.+. In particular, the MAC array's activation sparsity may spare some capacitors in the SAR DAC from switching in order to obtain higher energy efficiency and analog-to-digital conversion speed. For example, if it is known that after a MAC operation, the portion of the MAC capacitors with the bottom plate voltages V.sub.btmi being VDD is less than 25%, i.e., among 1-bit multiplications in the respective column of computing cells in the MAC array, there are more 1×0, 0×0 and 0×1 cases, and the number of 1×1 cases is less than ¼ of the total case number, then S.sub.B-1 and S.sub.B-2 in the switching sequence that correspond to the first two MSBs capacitors of the SAR DAC, i.e., C.sub.B-1 and C.sub.B-2, may be switched to the ground terminal rather than unconditionally activating all the capacitors in the SAR DAC during digital-to-analog conversion. This can result in power savings. It is noted that the connection of the comparator's V.sub.+ and V.sub.− sides shown in the figure is for ease of illustration, and in fact, the two sides may be swapped.

    [0098] In another embodiment, referring to FIG. 9, the MAC DAC and the SAR DAC may be connected together, thus connecting all the capacitors in parallel. In this case, a generated total voltage is taken as the positive input V.sub.+ and V.sub.ref as the negative input V.sub.− to the comparator. The SAR logic controls the switching sequence to bring the positive input V.sub.+ to approximate V.sub.ref. It is noted that this embodiment is suitable for MAC operations that follow “Procedure I” as described above. If V.sub.rst=0 and no circuit non-idealities are considered, V.sub.ref that is connected to the comparator's negative input V.sub.− may be either 0 or VDD/2. For example, if V.sub.ref=0 and the capacitors in the SAR DAC are initially connected to VDD through the switches from S.sub.0 to S.sub.B-1, the SAR operation can bring V.sub.+ back to 0 while giving the digital representation. This provides V.sub.rst=0 as required by the step of resetting the top plate voltage V.sub.top of the capacitors to 0 through a reset switch S.sub.rst in “Procedure I”.

    [0099] In the two embodiments shown in FIGS. 8 and 9, the comparator can easily suffer from the metastability problem during analog-to-digital conversion when the positive and negative inputs V.sub.+ and V.sub.− of the comparator are infinitesimally close to each other. The metastability condition makes it impossible to differentiate the positive input V.sub.+ from the negative input V.sub.− of the comparator during a short period of time because the analog MAC result that is to be quantized is not continuous in amplitude but discrete, and the discrete amplitude levels are aligned with the SAR DAC's. In order to alleviate this problem, in another embodiment as shown in FIG. 10, to each of the MAC DAC on the positive input V.sub.+ side and the SAR DAC on the negative input V.sub.− side of the comparator, a half-LSB capacitor is added, which is connected in parallel with the other capacitors, in contrast to the architecture of FIG. 8. The other end of the half-LSB capacitor on the positive input V.sub.+ side is always grounded, and the other end of the half-LSB capacitor on the negative input V.sub.− side may be connected to the switching sequence. This creates a half-LSB difference between the discrete analog voltage levels between the MAC DAC and the SAR DAC, providing extra error tolerance. Each of the half-LSB capacitors may consist of two LSB capacitors in series for good matching.

    [0100] Another embodiment allows the reuse of the MAC DAC as the SAR DAC via bottom-plate sampling. As shown in FIG. 11, the positive input V.sub.+ side of the comparator is connected to the MAC DAC and a half-LSB capacitor, in which both the capacitors in the first to (N−1)-th cells of the MAC DAC and the half-LSB capacitor may be connected to either the VDD terminal or ground terminal of the switching sequence, and the capacitor in the N-th cell may be selectively connected to the ground terminal. The negative input V.sub.− side of the comparator is not connected to any capacitor but to the voltage V.sub.ref. In fact, the MAC DAC according to this embodiment also serves as the SAR DAC. It is noted that, according to this embodiment, “Procedure II” should be followed to perform MAC operations. Usually, V.sub.ref=V.sub.rst, and the comparator's positive input voltage V.sub.+ goes back to V.sub.rst after the SAR conversion is complete. This provides V.sub.rst as required by the step of resetting the top plate voltage V.sub.top of the capacitors to V.sub.rst through a reset switch S.sub.rst in “Procedure II”. In this way, both MAC operation and analog-to-digital conversion can be accomplished with a single capacitor array, avoiding mismatch and accuracy loss caused by the use of separate capacitor arrays for the MAC DAC for performing MAC operations and the SAR DAC for achieving analog-to-digital conversion and allowing the possibility of fully-differential SAR ADC.

    [0101] FIG. 12 shows a differential MAC architecture according to another embodiment based on the embodiment of FIG. 11, which solves the problem of common-mode dependent comparator input offset voltage. In FIG. 12, nS.sub.0-nS.sub.B-1 and S.sub.B-X-nS.sub.B-X denote switches in the switching sequence. The positive input V.sub.+ side of the comparator is connected to the MAC DAC and an additional LSB capacitor. During analog-to-digital conversion, both the capacitors in the first to (N−1)-th cells of the MAC DAC and the additional LSB capacitor may be connected to either the VDD terminal or ground terminal of the switching sequence, and the capacitor in the N-th cell may be selectively connected to the switching sequence's ground terminal. The comparator's negative input V.sub.− side is connected to both a differential MAC DAC and an additional differential LSB capacitor. During analog-to-digital conversion, both the capacitors in the first to (N−1)-th cells of the differential MAC DAC and the additional LSB capacitor may be connected to the switching sequence, and the capacitor in the N-th cell may be selectively connected to the switching sequence's ground terminal. The differential MAC DAC comprises a differential capacitor array in the MAC array. It is noted that the implementation of this differential MAC architecture requires the aforementioned differential version.

    [0102] In one embodiment, the SAR ADC for each column has a bit-width that is determined in real time by the sparsity of input data and values stored in the column. In this way, the number of capacitors in the binarily weighted capacitor array that need to be charged or discharged during analog-to-digital conversion may be greatly reduced on average, thus significantly reducing the power consumed during analog-to-digital conversion. In particular, as shown in FIG. 13, the real-time bit-width of the SAR ADC may be expressed as ceil(log.sub.2(min(X, W)+1)), where “ceil” is a ceiling function; “min” is a minimum function; X is the number of 1 within a 1-bit input vector, and X.sub.1-X.sub.m represent the first to m-th values of the 1-bit input vector, which may be obtained using an accumulator tree; W is the number of 1 stored in one column of the computing array, and W.sub.1-W.sub.m represent weights stored in the first to m-th cells in the column, which may be obtained via off-chip computation and provided to the SAR logic before data storage of the computing array. The “min”, “log.sub.2” and “ceil” functions in the expression can be replaced with simple digital combinatorial logic, while the same computation result can be still obtained.

    [0103] It is worth noting that the boundaries of the various blocks and modules included in the foregoing embodiments have been defined only based on their functional logic, and the present invention is not so limited, as alternate boundaries can be defined as long as the specified functions are appropriately performed. Also, specific names of the various functional components are intended to distinguish between these components rather than limit the scope of the present invention in any way.

    [0104] The foregoing description presents merely preferred embodiments of the present invention and is not intended to limit the scope of the present invention in any way. Any and all changes, equivalent substitutions, modifications and the like made within the spirit and principles of the present invention are intended to be embraced in the scope thereof.