Low power analog vector-matrix multiplier

10417460 ยท 2019-09-17

Assignee

Inventors

Cpc classification

International classification

Abstract

Methods and apparatuses enable a general-purpose low power analog vector-matrix multiplier. This Abstract is not intended to limit the scope of the claims.

Claims

1. An analog matrix multiplier, comprising: a plurality of successive approximation registers (SAR) operating in parallel, each successive approximation register (SAR) having an SAR digital output; a plurality of scaling and recombining circuits for scaling and recombining each SAR's digital output, each SAR digital output resulting from quantization of a bit-wise multiplication of a digital weight matrix with an input analog voltage vector, each scaling and recombining circuit connected in series to a successive approximation register (SAR) of the plurality of successive approximation registers (SAR); and a plurality of charge transfer circuits, each charge transfer circuit connected in series to a successive approximation register (SAR) of the plurality of successive approximation registers (SAR).

2. The analog matrix multiplier of claim 1, wherein a successive approximation register comprises: a plurality of successive approximation register (SAR) circuits connected in parallel; a comparator; and a state machine.

3. The analog matrix multiplier of claim 2, wherein a successive approximation register (SAR) circuit comprises: a first switch, a second switch, and a third switch, wherein the first switch and the second switch are complementary; and a successive approximation register (SAR) circuit capacitor.

4. The analog matrix multiplier of claim 3, wherein the third switch is open in a sampling operation of the analog matrix multiplier and closed in a quantization operation of the analog matrix multiplier.

5. The analog matrix multiplier of claim 3, wherein: when a bit-wise weight value is high, the first switch is closed and the second switch is open and vice versa; and when a bit-wise weight value is low, the first switch is open and the second switch is closed.

6. The analog matrix multiplier of claim 3, wherein the successive approximation register (SAR) further comprises a successive approximation register (SAR) local memory.

7. The analog matrix multiplier of claim 6, wherein the successive approximation register (SAR) local memory is configured to store bit-wise weight values.

8. The analog matrix multiplier of claim 2, wherein the comparator compares a reference voltage Vref to an output voltage of the plurality of SAR circuits.

9. The analog matrix multiplier of claim 2, wherein an output of the comparator is an input to the state machine.

10. The analog matrix multiplier of claim 2, wherein the successive approximation register (SAR) further comprises a reset switch that is closed in a sampling operation of the analog matrix multiplier and open in a quantization operation of the analog matrix multiplier.

11. The analog matrix multiplier of claim 1, wherein a scaling and recombining circuit comprises: a delay element; a sampling switch; an adder; and a divider.

12. The analog matrix multiplier of claim 1, wherein a charge transfer circuit comprises: an operational amplifier; and a charge transfer circuit capacitor.

13. The analog matrix multiplier of claim 12, wherein the charge transfer circuit transfers a charge from a first stage to a second stage.

14. The analog matrix multiplier of claim 1, wherein the bit-wise multiplication of a digital weight matrix with an input analog voltage vector is performed by the successive approximation registers (SAR) using only the successive approximation register (SAR) capacitors.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) The following Detailed Description, Figures, appended Additional Figures and appended Claims signify the nature and advantages of the innovations, embodiments and/or examples of the claimed inventions. All of the Figures signify innovations, embodiments, and/or examples of the claimed inventions for purposes of illustration only and do not limit the scope of the claimed inventions. Such Figures are not necessarily drawn to scale, and are part of the Disclosure.

(2) In the Figures, similar components or features may have the same, or similar, reference signs in the form of labels (such as alphanumeric symbols, e.g., reference numerals), and may signify similar or equivalent functionality. Further, various components of the same type may be distinguished by following the reference label by a dash and a second label that distinguishes among the similar components. If only the first reference label is used in the specification, the description is applicable to any one of the similar components having the same first reference label irrespective of the second reference label. A brief description of the Figures is below.

(3) FIG. 1 illustrates a top-level diagram of an exemplary analog vector-vector inner multiplier.

(4) FIG. 2 illustrates an exemplary implementation of an exemplary successive approximation register (SAR) for use with embodiments of the present disclosure.

(5) FIG. 3 illustrates a 2-bit implementation of an exemplary analog matrix multiplier, in accordance with embodiments of the present disclosure.

(6) FIG. 4 illustrates an exemplary orientation of switches according to bit-0 of the weight matrix in Equation (3) of an exemplary 2-bit analog matrix multiplier according to embodiments of the present disclosure.

(7) FIG. 5 illustrates an exemplary orientation of switches according to bit-1 of the weight matrix in Equation (3) of an exemplary 2-bit analog matrix multiplier according to embodiments of the present disclosure.

(8) FIG. 6 illustrates an exemplary orientation of switches according to bit-2 of the weight matrix in Equation (3) of an exemplary 2-bit analog matrix multiplier according to embodiments of the present disclosure.

(9) FIG. 7 illustrates an exemplary 3-bit implementation of an exemplary analog matrix multiplier according to embodiments of the present disclosure.

(10) In such various figures, reference signs may be omitted as is consistent with accepted engineering practice; however, one of ordinary skill in the art will understand that the illustrated components are readily understood when viewed in context of the illustration as a whole and the accompanying disclosure describing such various figures.

DETAILED DESCRIPTION

(11) The Figures and the following Detailed Description signify innovations, embodiments and/or examples by way of illustration only, with various features, structures or characteristics described together in a single embodiment to streamline the disclosure. Variations of any of the elements, processes, machines, systems, manufactures or compositions disclosed by such exemplary innovations, embodiments and/or examples will be readily recognized and may be used in commerce without departing from the principles of what is claimed. The Figures and Detailed Description may also signify, implicitly or explicitly, advantages and improvements of a subset of the exemplary embodiments described herein.

(12) In the Figures and Detailed Description, numerous specific details may be described to enable one or more of the exemplary innovations, embodiments and/or examples. In the interest of not obscuring the presentation of the exemplary innovations, embodiments and/or examples in the following Detailed Description, some processing steps or operations that are known in the art may be combined together for presentation and for illustration purposes and might not be described in detail. However, a person skilled in the art will recognize that these exemplary innovations, embodiments and/or examples may be used in commerce without these specific details or with equivalents thereof. In other instances, well-known processes and devices are not described in detail as not to unnecessarily obscure aspects of these exemplary innovations, embodiments and/or examples. In other instances, some processing steps or operations that are known in the art may not be described at all. Instead, the following description is focused on the distinctive features or elements of various exemplary innovations, embodiments and/or examples. Furthermore, while this description may refer to some components of the structure in the singular tense, more than one component may be depicted throughout the Figures and like components are labeled with like numerals.

(13) A general-purpose low power analog Vector-Matrix Multiplier (VMM) is presented. The vector-matrix multiplier computes N inner products of n-dimensional inputs with m-dimensional weights in parallel. A significant power efficiency is achieved by performing multiply-and-accumulate in analog domain and storing weight values locally so that power hungry data communication between memory and computational unit is eliminated
Y.sub.1N.sup.(n)=X.sub.1N.sup.(n).Math.W.sub.NN.sup.(m)(1)

(14) An analog implementation provides a natural medium to implement fully parallel computational arrays with high integration density and energy efficiency. By summing charges on each capacitor in a large capacitor bank, an analog vector-matrix multiplier can accomplish a massively parallel multiply-and-accumulate (MAC) with low latency.

(15) The analog vector-matrix multiplier is comprised of one Successive Approximation Register (SAR) Analog to Digital Converter (ADC) per input. The capacitor bank of each SAR is not binary weighted and is expanded to provide one connection per input. Inputs are provided as analog voltages and weights are implemented digitally in bit-serial fashion. SAR architecture provides a low power solution that inherently contains both a DAC and an ADC. The ADC quantizes the result of each MAC operation which can be stored locally while DAC converts the digital output back into analog domain, so it can be used as an input to the next stage. This process makes this architecture highly scalable and can be cascaded many times to implement a very large neural network. Carrying out quantization by a SAR ADC has an added advantage of dynamically lowering the resolution of the results for applications that require faster and more power efficient but less precise computations. An NN matrix multiplier can be constructed by an array of N analog vector-vector inner multiplier each with N inputs and a log 2(N) bit resolution SAR. The distributed nature of local storage of the results absolves the need for high bandwidth memory which significantly increases the power efficiency of the system. Moreover, storing the results digitally allows for reconfigurable digital post-processing and can be used to apply non-linearity.

(16) FIG. 1 illustrates a top-level diagram of an exemplary analog vector-vector inner multiplier 100. In FIG. 1, multiplier 100 computes N inner products 101 of n-bit inputs (X.sub.0 . . . X.sub.N-1) 102 with m-bit weights (W.sub.0 . . . W.sub.N-1) 103 in parallel. Multiplier 100 produces one k-bit output (Y) 104.

(17) FIG. 2 illustrates an exemplary implementation of an exemplary successive approximation register (SAR) 200 for use with embodiments of the present disclosure. An exemplary SAR comprises a plurality of (e.g., four (4) in FIG. 2) SAR circuits 201A-201D connected in parallel. Each of SAR circuits 201A-201D (shown in blown up 201 in FIG. 2) comprises three switches S.sub.1.sup.i 202, S.sub.2.sup.i 204 and S.sub.3.sup.i 203, and a capacitor 205 and successive approximation register (SAR) local memory 216 for storing weight values. Switches S.sub.1.sup.i 202 and S.sub.2.sup.i 204 are complementary and based on bit-wise weight value stored in successive approximation register (SAR) local memory 216, for the corresponding input 206 (e.g., one of Vin1-Vin4 206A-206D in FIG. 2). When bit-wise weight value is high, switch S.sub.1.sup.i 202 is closed and switch S.sub.2.sup.i 204 is open and vice versa. To be clear, when bit-wise weight value is low, switch S.sub.1.sup.i 202 is open and switch S.sub.2.sup.i 204 is closed. Switch S.sub.3.sup.i 203 is open in the sampling stage and closed in normal SAR quantization operation. The timing diagram 215 illustrates the orientation of the switches S.sub.1.sup.i, S.sub.2.sup.i and S.sub.3.sup.i with the exemplary 3-bit weight stored in successive approximation register (SAR) local memory 216 in sampling and quantization stages.

(18) In embodiments, SAR 200 further comprises a comparator 207 and a state machine 208. Comparator 207 compares a reference voltage Vref 210 to an output voltage 211 of the SAR circuits 201A-201D to provide an input for the state machine SM 208. State machine SM 208 provides an output b0 214 that is fed back to a SAR circuit 201C, an output b1 213 that is fed back to SAR circuits 201A and 201B, and an output Dout 212.

(19) In embodiments, SAR 200 further comprises a reset switch S.sub.rst 209 that is closed in the sampling stage and open in quantization stage.

(20) FIG. 3 illustrates a 2-bit implementation of an exemplary analog matrix multiplier 300 in accordance with embodiments of the present disclosure. In embodiments, analog matrix multiplier 300 comprises a plurality of SARs 200A-200D (e.g., four (4) in FIG. 3) as described with respect to and depicted in FIG. 2.

(21) In embodiments, analog matrix multiplier 300 further comprises a plurality of (e.g., four (4) in FIG. 3) scaling and recombining circuits 301A-301D. Each of scaling and recombining circuits 301A-301D (shown in blown up 301 in FIG. 3) comprises a delay element 304, a sampling switch 306, an adder 303 and a divider 305. Each of scaling and recombining circuits 301 scales and recombines the quantized digital outputs 212 of state machine 208 of bit-wise multiplication of a weight matrix with the input vector 206A-206D according to Equation (2) herein.

(22) In embodiments, analog matrix multiplier 300 further comprises a plurality of (e.g., four (4) in FIG. 3) charge transfer circuits 302A-302D. Each of charge transfer circuits 302A-302D (shown in blown up 302 in FIG. 3) comprises an operational amplifier 309 and a capacitor 308. They are used to transfer charge from one stage to another. That is, charge transfer circuit 302 transfers a received charge 311 to an output 310 (e.g., Vout1 310A-Vout4 310D).

(23) FIG. 4 illustrates an exemplary orientation of switches of an exemplary analog matrix multiplier 400 according to embodiments of the present disclosure. FIG. 4 illustrates an orientation of switches in a multiplication operation of input voltages 206A-206D by bit-0 of a weight matrix according to Equation (3). FIG. 4 illustrates an operation of switches in a multiplication operation using an exemplary implementation 300 illustrated in FIG. 3.

(24) In FIG. 4, the following switches are depicted as open: w.sup.0.sub.21, w.sup.0.sub.31, w.sup.0.sub.32, w.sup.0.sub.13, w.sup.0.sub.23, w.sup.0.sub.24, w.sup.0.sub.34.

(25) In FIG. 4, the following switches are depicted as closed: w.sup.0.sub.11, w.sup.0.sub.41, w.sup.0.sub.12, w.sup.0.sub.22, w.sup.0.sub.42, w.sup.0.sub.33, w.sup.0.sub.43, w.sup.0.sub.14, w.sup.0.sub.44.

(26) FIG. 5 illustrates an exemplary orientation of switches of an exemplary analog matrix multiplier 500 according to embodiments of the present disclosure. FIG. 5 illustrates an orientation of switches in a multiplication operation of input voltages 206A-206D by bit-1 of a weight matrix according to Equation (3). FIG. 5 illustrates an operation of switches in a multiplication operation using an exemplary implementation 300 illustrated in FIG. 3.

(27) In FIG. 5, the following switches are depicted as open: w.sup.1.sub.31, w.sup.1.sub.12, w.sup.1.sub.32, w.sup.1.sub.42, w.sup.1.sub.13, w.sup.1.sub.23, w.sup.1.sub.43.

(28) In FIG. 5, the following switches are depicted as closed: w.sup.1.sub.11, w.sup.1.sub.21, w.sup.1.sub.41, w.sup.1.sub.22, w.sup.1.sub.33, w.sup.1.sub.14, w.sup.1.sub.24, w.sup.1.sub.34, w.sup.1.sub.44.

(29) FIG. 6 illustrates an exemplary orientation of switches of an exemplary analog matrix multiplier 600 according to embodiments of the present disclosure. FIG. 6 illustrates an orientation of switches in a multiplication operation of input voltages 206A-206D by bit-2 of a weight matrix according to Equation (3). FIG. 6 illustrates an operation of switches in a multiplication operation using an exemplary implementation 300 illustrated in FIG. 3.

(30) In FIG. 6, the following switches are depicted as open: w.sup.2.sub.21, w.sup.2.sub.41, w.sup.2.sub.22, w.sup.2.sub.32, w.sup.2.sub.42, w.sup.2.sub.13, w.sup.2.sub.14.

(31) In FIG. 6, the following switches are depicted as closed: w.sup.2.sub.11, w.sup.2.sub.31, w.sup.2.sub.12, w.sup.2.sub.23, w.sup.2.sub.33, w.sup.2.sub.43, w.sup.2.sub.24, w.sup.2.sub.34, w.sup.2.sub.44.

(32) It will be appreciated that, for the sake of space saving in the Figures, scaling and recombining circuits 301 are not shown in the exemplary analog matrix multipliers in FIGS. 4-6, though they are present in the implementation as described herein.

(33) FIG. 7 illustrates an exemplary 3-bit implementation of an exemplary analog matrix multiplier 700 according to embodiments of the present disclosure. It will be appreciated that, for the sake of space saving in the Figure, scaling and recombining circuits 301 are not shown in the exemplary analog matrix multipliers in FIG. 7, though they are present in the implementation as described herein.

(34) It will be appreciated that weight and bit-wise weight are used herein interchangeably.

Exemplary Sampling and Quantization Operation

(35) In a sampling stage or operation of the exemplary analog vector matrix multiplier, each capacitor (e.g., 205 in FIG. 2) within each SAR (e.g., 200 in FIG. 2) samples one input voltage (e.g., 206A-206D in FIG. 2) or is reset depending on the binary value of the corresponding weight. The shared node of the capacitor bank (e.g., 211 in FIG. 2) in each SAR (e.g., 200 in FIG. 2) is tied to ground through reset switch S.sub.rst (e.g., 209 in FIG. 2) while S.sub.3.sup.i (e.g., 203 in FIG. 2) are open. After sampling is done, sampling switches S.sub.1.sup.i (e.g., 202 in FIG. 2) and S.sub.2.sup.i (e.g., 204 in FIG. 2) are open and the SAR (e.g., 200 in FIG. 2) starts the quantization process.

(36) In a quantization stage/operation/process of the exemplary analog vector matrix multiplier, the S.sub.3.sup.i switches (e.g., 203 in FIG. 2) are closed and S.sub.rst (e.g., 209 in FIG. 2) is open and the SAR's state machine (e.g., 208 in FIG. 2) sets the top plates of capacitors (e.g., 205 in FIG. 2) in the SAR circuits (e.g., 201A-201D in FIG. 2) according to the output of the comparator (e.g., 207 in FIG. 2). This process happens as many times as there are bits in each element of a weight matrix (bit-serially). The outputs are then binary weighted and combined in the digital domain according to the following equation:

(37) D out = .Math. i = 0 m - 1 2 - ( m - i ) D out i ( 2 )
where m is dimension of elements in the weight matrix and D.sub.out.sub.i is digital output (e.g., 212 in FIG. 2) of the SAR (e.g., 200 in FIG. 2) for the i-th bit of the corresponding weight. The weighting and combining operation is carried out by scaling and recombining circuits (e.g., 301A-301D in FIG. 3). Digital output D.sub.out (e.g., 307 in FIG. 3) is then applied to SAR circuits (200A-200D in FIG. 3) to inject charge on the shared node of the capacitor bank (e.g., 211 in FIG. 2). The charge transfer circuit (e.g., 302 in FIG. 3) is then used to re-generate the output analog voltages (e.g., 310A-310D in FIG. 3) to be used as input to the next stage.

Exemplary 2-Bit Implementation of an Exemplary Analog Matrix Multiplier

(38) In the example described herein, a sampling and quantization process in a 2-bit analog matrix multiplier with 3-bit weights is depicted to illustrate exemplary operation of the exemplary analog matrix multiplier according to embodiments of the present disclosure.

(39) In the present example, a four-input vector is multiplied by the following 44 weight matrix:

(40) W = [ 111 b 101 b 000 b 011 b 010 b 011 b 100 b 110 b 100 b 000 b 111 b 110 b 011 b 001 b 101 b 111 b ] ( 3 )

(41) In this example, N=4, n=2, and m=3 as they are used in Equation (1). Sampling starts with multiplying the inputs by the LSB of the weight matrix, as shown in FIG. 4. In FIG. 4, W.sub.ij.sup.n represents the n-th bit of the i-th row and j-th column of the weight matrix.

(42) After sampling, each SAR (e.g., 200A-200D) starts the quantization process as described above. Following complete the SAR quantization process, outputs stored in the state machine (e.g., 208) are as follows:
V.sub.out1=V.sub.in1+V.sub.in4(4)
V.sub.out2=V.sub.in1+V.sub.in2+V.sub.in4(5)
V.sub.out3=V.sub.in3+V.sub.in4(6)
V.sub.out4=V.sub.in1+V.sub.in4(7)

(43) Continuing in this example, the next step involves again sampling the input voltages onto SAR capacitors (e.g., 205) per bit-1 of the weight matrix. At the end of the SAR quantization process, the previous output values stored in the state machine (e.g., 208) are scaled and added to new quantized values as follows:

(44) V out 1 = V in 1 + V in 2 + V in 4 + 1 2 V in 1 + 1 2 V in 4 ( 8 ) V out 2 = V in 2 + 1 2 V in 1 + 1 2 V in 2 + 1 2 V in 4 ( 9 ) V out 3 = V in 3 + 1 2 V in 3 + 1 2 V in 4 ( 10 ) V out 4 = V in 1 + V in 2 + V in 3 + V in 4 + 1 2 V in 1 + 1 2 V in 4 ( 11 )

(45) Shown in FIG. 6, in the last step of the multiplication, input voltages are multiplied by the MSB of the weight matrix. The final output values are as follows:

(46) V out 1 = V in 1 + V in 3 + 1 2 V in 1 + 1 2 V in 2 + 1 2 V in 4 + 1 4 V in 1 + 1 4 V in 4 ( 12 ) V out 2 = V in 1 + 1 2 V in 2 + 1 4 V in 1 + 1 4 V in 2 + 1 4 V in 4 ( 13 ) V out 3 = V in 2 + V in 3 + V in 4 + 1 2 V in 3 + 1 4 V in 3 + 1 4 V in 4 ( 14 ) V out 4 = V in 2 + V in 3 + V in 4 + 1 2 V in 1 + 1 2 V in 2 + 1 2 V in 3 + 1 2 V in 4 + 1 4 V in 1 + 1 4 V in 4 ( 15 )

(47) The final output codes in each SAR (e.g., 307 in FIG. 3) are then inserted and charge transfer circuits (e.g., 302 in FIG. 3) are used to regenerate the analog voltages at the output (e.g., 310A-310D in FIG. 3) to be used as inputs to the next stage.

(48) The foregoing Detailed Description signifies in isolation the individual features, structures, functions, or characteristics described herein and any combination of two or more such features, structures, functions or characteristics, to the extent that such features, structures, functions or characteristics or combinations thereof are based on the present specification as a whole in light of the knowledge of a person skilled in the art, irrespective of whether such features, structures, functions or characteristics, or combinations thereof, solve any problems disclosed herein, and without limitation to the scope of the claims. When an embodiment of a claimed invention comprises a particular feature, structure, function or characteristic, it is within the knowledge of a person skilled in the art to use such feature, structure, function, or characteristic in connection with other embodiments whether or not explicitly described, for example, as a substitute for another feature, structure, function or characteristic.

(49) In view of the foregoing Detailed Description it will be evident to a person skilled in the art that many variations may be made within the scope of innovations, embodiments and/or examples, such as function and arrangement of elements, described herein without departing from the principles described herein. One or more elements of an embodiment may be substituted for one or more elements in another embodiment, as will be apparent to those skilled in the art. The embodiments described herein are chosen to signify the principles of the invention and its useful application, thereby enabling others skilled in the art to understand how various embodiments and variations are suited to the particular uses signified.

(50) The foregoing Detailed Description of innovations, embodiments, and/or examples of the claimed inventions has been provided for the purposes of illustration and description. It is not intended to be exhaustive nor to limit the claimed inventions to the precise forms described, but is to be accorded the widest scope consistent with the principles and features disclosed herein. Obviously, many variations will be recognized by a person skilled in this art. Without limitation, any and all equivalents described, signified or incorporated by reference in this patent application are specifically incorporated by reference into the description herein of the innovations, embodiments and/or examples. In addition, any and all variations described, signified or incorporated by reference herein with respect to any one embodiment are also to be considered taught with respect to all other embodiments. Any such variations include both currently known variations as well as future variations, for example any element used herein includes a future equivalent element that provides the same function, regardless of the structure of the future equivalent.

(51) It is intended that the scope of the claimed inventions be defined and judged by the following claims and equivalents. The following claims are hereby incorporated into the Detailed Description, with each claim standing on its own as a separate embodiment. Disclosed embodiments can be described with more features than are expressly recited in the claims.