Iterative hybrid matrix multiplier

Through the hybrid computing hardware accelerator, the combination of analog accumulation and digital multiplication is used to achieve fast, efficient, and low-power calculation of matrix multiplication, which solves the problems of slow calculation speed and high power consumption of matrix multiplication in the existing technology, and is suitable for real-time and Portable devices.

CN118696294APending Publication Date: 2024-09-24SYNTHARA AG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202280088696.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-01-25
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

Existing matrix multiplication computing hardware is slow and consumes high power when processing large matrices and high data rates, making it difficult to meet the needs of real-time processing and portable devices.

Method used

It uses a hybrid computing hardware accelerator, uses an analog accumulator and a digital binary single-bit multiplier, implements matrix multiplication through a single-bit multiply-accumulate circuit and an analog storage circuit, and uses the accumulation operation of charges in the capacitor to achieve high-speed and low-power multiplication-accumulation. .

Benefits of technology

A fast, efficient, low-power and miniaturized hardware accelerator for matrix multiplication is implemented, suitable for real-time processing and portable devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118696294A
    Figure CN118696294A
Patent Text Reader

Abstract

The invention relates to a mixed time sharing iterative multiplication accumulation circuit. The circuit comprises a product storage circuit; a multiplication circuit operable to receive a first input value, to receive a second input value, to generate a product of the first input value and the second input value, and to store the product in the product storage circuit; an accumulator storage circuit for storing the accumulated value; and an accumulation switch connecting the product storage circuit to the accumulator storage circuit, the accumulation switch being operable to electrically connect the product storage circuit and the accumulator storage circuit in parallel or to electrically disconnect the product storage circuit and the accumulator storage circuit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates generally to processing architectures, apparatus, and methods for matrix multiplication, and more particularly to hybrid multiply-accumulate circuits. Background Art

[0002] Matrix multiplication is an important operation in many mathematical computations. For example, linear algebra can employ matrix multiplication to solve linear equations such as differential equations. Such mathematical computations are used, for example, in pattern matching, artificial intelligence, analytic geometry, engineering, physics, natural sciences, computer science, computer animation, and economics.

[0003] Matrix multiplication is typically performed in a digital computer that executes a stored program. The program describes the operations to be performed and the hardware in the computer, e.g., digital multipliers and adders, performs the operations. In some computing systems, specially designed hardware can speed up the rate of computation. In some applications, real-time processing is necessary to provide useful output in a useful amount of time, especially for safety-critical tasks. Moreover, applications in portable devices have only limited available power. Despite such accelerated computing systems, problems with large matrices and high data rates may take longer to solve and use more power than desired. Therefore, there is a need for computational hardware accelerators that can perform matrix multiplication at higher rates and with less power. Summary of the invention

[0004] Embodiments of the present disclosure can provide a hybrid computing hardware accelerator, etc., for performing matrix multiplication using a multiplication-accumulation operation. The computing hardware accelerator of the present disclosure includes a digital binary single-bit multiplier with an analog accumulator. The data values ​​for the single-bit multiplier are stored in a digital memory, and the single-bit multiplication result is stored in a capacitor as an electric charge. The capacitor charge is combined to sum the values ​​(accumulate), thereby providing a multiplication-accumulation operation. By combining the capacitor charge, the summation operation is almost instantaneous, depending on the rate at which the charge in the conductor can flow, and no external power is required. Thus, embodiments of the present disclosure can provide a very high speed and low-power multiplication-accumulation circuit. Because the charge is recorded as Q in the electronic system, each single-bit multiplication-accumulation circuit is referred to as qmac in this article, and is a hybrid circuit using digital multiplication and analog accumulation.

[0005] According to an embodiment of the present disclosure, a hybrid multiplication-accumulation circuit includes an array of single-bit multiplication-accumulation circuits, each of which includes (i) a first storage element for storing a first single-bit value, (ii) a second storage element for storing a second single-bit value, (iii) a bit multiplication circuit for multiplying the first single-bit value by the second single-bit value to calculate a product, and (iv) an analog storage circuit, wherein the bit multiplication circuit is operable to deposit a charge representing the product in the analog storage circuit. The array of single-bit multiplication-accumulation circuits together is operable to combine the charges deposited in each analog storage circuit to provide an accumulated charge representing the sum of the products. The analog storage circuit can be a capacitor.

[0006] According to some embodiments, the hybrid multiplication-accumulation circuit includes a switch circuit connected to the bit multiplication circuit and the analog storage circuit, the switch circuit being operable in a first mode to transfer charge from the bit multiplication circuit to the analog storage circuit, and being operable in a second mode to isolate the bit multiplication circuit from the analog storage circuit and connect the analog storage circuits in the array together to provide accumulated charge. Some embodiments include a clear circuit connected to the analog storage circuit of the array, the clear circuit being operable to remove charge from the analog storage circuits in the array. In some embodiments, the bit multiplication circuit is a functional AND gate, or performs the function of an AND gate.

[0007] In some embodiments of the present disclosure, the hybrid multiply-accumulate circuit includes an analog-to-digital converter to convert the accumulated charge connected to the analog storage circuit in the array into a digital accumulated value. Some embodiments include a shift circuit or shift electrical connection to multiply the digital accumulated value by a power of two. Some embodiments include a digital adder that is operable to add the digital accumulated values ​​to produce a digital matrix value. The digital adder can be pipelined.

[0008] In some embodiments, an analog-to-digital converter that converts the output of the analog storage circuit 16 of the parallel-connected qmac 10 is not present, and the addition of the output of the mixed multiplication-accumulation circuit array is performed by an analog adder that is operable to add the accumulated charge to produce an analog matrix value. Some embodiments include a voltage multiplier connected to the analog storage circuits in the array to multiply the accumulated charge by a square. Such addition and multiplication can be performed by an operational amplifier configured as an adder, the input of the operational amplifier being connected to the analog storage circuit, which is operable to provide an analog matrix value. The operational amplifier input of the operational amplifier can be configured to multiply or divide the operational amplifier input by a square. Some embodiments include an analog-to-digital converter to convert the analog matrix values ​​to produce digital matrix values ​​so that the output of the operational amplifier is digitized.

[0009] In some embodiments, the bit multiplication circuit includes switches connected in series, for example, the series switch circuit includes a pair of MOS transistors, a first MOS transistor controlled by a positive control signal and a second MOS transistor controlled by an inverted (negative) version of the same control signal. One of the switches connected in series can be controlled by a weight value, and the other can be controlled by an input value representing a matrix multiplication of the weight value and the input value.

[0010] According to an embodiment of the present disclosure, a hybrid matrix multiplier includes: digital storage elements, each of which is operable to store digital values; a multiplication circuit for multiplying the stored digital values ​​to produce a product; and an analog storage circuit, which is operable to store the product. The voltage connection can provide power to operate the digital storage elements, the multiplication circuit, and the analog storage circuit. In some embodiments, the power connection provides power to operate the digital storage elements, the multiplication circuit, and the analog storage circuit, and has a voltage of no more than 1V (e.g., no more than 500mV, no more than 100mV, no more than 50mV, or no more than 10mV). The multiplication circuit may include a switch having a series connection of paired MOS transistors.

[0011] According to an embodiment of the present disclosure, a mixed time-sharing multiplication and accumulation circuit includes: a product storage circuit; a multiplication circuit, which is operable to receive a first input value, receive a second input value, generate a product of the first input value and the second input value, and store the product in the product storage circuit; an accumulator storage circuit, for storing the accumulated value; and an accumulation switch, which connects the product storage circuit to the accumulator storage circuit, and the accumulation switch is operable to electrically connect the product storage circuit and the accumulator storage circuit in parallel, or to electrically disconnect the product storage circuit from the accumulator storage circuit.

[0012] Some embodiments of a time-shared multiply-accumulate circuit include a first multiplexer operable to: select one of a plurality of first input values ​​input to the first multiplexer, and wherein the multiplication circuit is operable to receive the selected one of the plurality of first input values ​​from the first multiplexer; receive a second input value; and generate a product of the selected one of the plurality of first input values ​​and the second input value. Some embodiments include a second multiplexer operable to: select one of a plurality of second input values ​​input to the second multiplexer, and wherein the multiplication circuit is operable to receive the selected one of the second input values ​​from the second multiplexer; and generate a product of the selected one of the plurality of first input values ​​and the selected one of the second input values.

[0013] According to some embodiments of the present disclosure, the product storage circuit and the accumulator storage circuit are analog storage circuits storing electric charge. The product storage circuit and the accumulator storage circuit may be capacitors.

[0014] According to some embodiments of the present disclosure, the multiplication circuit is a single-bit multiplication circuit for multiplying two binary bits. The multiplication circuit may include a series switch circuit connected in series. The accumulation switch may be a series switch circuit connected in series with the series switch circuit of the multiplication circuit. The multiplication circuit may include a series switch circuit connected in series, and one or more of the series switch circuits of the multiplication circuit and the accumulation switch may be a differential switch.

[0015] According to some embodiments of the present disclosure, operating the accumulation switch to connect the product storage circuit and the accumulator storage circuit in parallel combines the accumulated value in the accumulator storage circuit with the product in the product storage circuit, thereby providing a combined value stored in the product storage circuit and the accumulator storage circuit.

[0016] Some embodiments of a hybrid time-sharing matrix multiplier include a control circuit that is operable to sequentially (i) provide a first input value and a second input value to the multiplier and switch an accumulation switch to store the product in a product storage circuit; and (ii) switch the accumulation switch to electrically connect the product storage circuit and the accumulator storage circuit in parallel, and combine the product in the product storage circuit with the accumulated value to provide a combined value stored in the product storage circuit and in the accumulator storage circuit.

[0017] According to an embodiment of the present disclosure, a hybrid matrix multiplier includes a plurality of time-shared multiplication-accumulation circuits and an adder for adding the accumulated values ​​of the plurality of time-shared multiplication-accumulation circuits. The accumulated values ​​may be analog values ​​and some embodiments may include an analog-to-digital converter for converting the accumulated values ​​into digital values, and the adder may be a digital adder. In some embodiments, the accumulated values ​​are analog values ​​and the adder is an analog adder.

[0018] According to an embodiment of the present disclosure, a hybrid method of matrix multiplication includes:

[0019] a) providing a multi-bit value having N bits;

[0020] b) providing a hybrid time-sharing iterative multiplication-accumulation circuit;

[0021] c) providing an input bit of a multi-bit value, providing a second input bit to a multiplier, and setting an accumulation switch to connect a product storage circuit to the time-shared multiply-accumulate circuit and to disconnect the product storage circuit from the accumulator storage circuit;

[0022] d) multiplying the input bit of the multi-bit value by the second input bit to form a bit product stored in a product storage circuit;

[0023] e) switching the accumulation switch to disconnect the product storage circuit from the time-shared multiply-accumulate circuit and connect the product storage circuit to the accumulator storage circuit and combine the product in the product storage circuit with the accumulated value to produce a combined value in the accumulator storage circuit; and

[0024] f) Repeating steps c)-e) N times until all bits of the multi-bit value are provided in bit order, thereby generating a product of the multi-bit value and the second input bit.

[0025] According to an embodiment of the present disclosure, a hybrid method of matrix multiplication includes:

[0026] a) providing a first multi-bit value having N bits and a second multi-bit value having M bits;

[0027] b) providing M time-sharing multiplication-accumulation circuits according to claim 1;

[0028] c) providing an input bit of a first multi-bit value and providing a different second input bit of a second multi-bit value to a multiplier of each of the M time-shared multiply-accumulate circuits, and setting an accumulation switch to connect a product storage circuit to the time-shared multiply-accumulate circuit and to disconnect the product storage circuit from the accumulator storage circuit of each of the M time-shared multiply-accumulate circuits;

[0029] d) multiplying the input bit of the multi-bit value by the second input bit to form a bit product stored in a product storage circuit through each of the M time-shared multiplication-accumulation circuits;

[0030] e) switching the accumulation switch to disconnect the product storage circuit from the time-shared multiplication-accumulation circuit and connect the product storage circuit to the accumulator storage circuit, and combining the product in the product storage circuit with the accumulated value to produce a combined value in the accumulator storage circuit of each of the M time-shared multiplication-accumulation circuits;

[0031] f) repeating steps c)-e) for each of the N bits of the first multi-bit value until all bits of the first multi-bit value are provided in bit order;

[0032] g) scaling the accumulated value of each of the M time-shared multiply-accumulate circuits; and

[0033] h) Adding the accumulated values ​​of each of the M scaled time-shared multiply-accumulate circuits to produce a product.

[0034] According to an embodiment of the present disclosure, a hybrid method of matrix multiplication includes:

[0035] a) providing a first multi-bit value having N bits and a second multi-bit value having M bits;

[0036] b) providing a time-sharing multiplication-accumulation circuit according to claim 1;

[0037] c) providing input bits of a first multi-bit value and providing second input bits of a second multi-bit value to the multiplier, and setting an accumulation switch to connect a product storage circuit to the time-shared multiply-accumulate circuit and to disconnect the product storage circuit from an accumulator storage circuit of the time-shared multiply-accumulate circuit;

[0038] d) multiplying input bits of the first multi-bit value by second input bits of the second multi-bit value to form a bit product that is stored in a product storage circuit;

[0039] e) switching the accumulation switch to disconnect the product storage circuit from the time-shared multiplication-accumulation circuit and connect the product storage circuit to the accumulator storage circuit, and combining the product in the product storage circuit with the accumulated value to produce a combined value in the accumulator storage circuit of each of the M time-shared multiplication-accumulation circuits;

[0040] f) repeating steps c)-e) for each of the N bits of the first multi-bit value until all bits of the first multi-bit value are provided in bit order;

[0041] g) scaling the accumulated value of the time-shared multiplication-accumulation circuit to produce a scaled value;

[0042] h) adding the scaled value to the multi-bit product; and

[0043] i) Repeat steps c)-h) to generate a multi-bit product.

[0044] According to an embodiment of the present disclosure, a hybrid matrix multiplier includes: a hybrid time-sharing iterative multiplication-accumulation circuit; a memory circuit for storing accumulated values; and a control circuit, wherein the control circuit is operable to:

[0045] a) repeatedly and sequentially (i) providing a first input value and providing a second input value to a multiplier, setting an accumulation switch to connect a product storage circuit to the multiplier and disconnect the product storage circuit from an accumulator storage circuit, and (ii) switching the accumulation switch to electrically disconnect the product storage circuit from the time-shared multiplication-accumulation circuit and electrically connect the product storage circuit to the accumulator storage circuit, thereby combining the product in the product storage circuit and the accumulated value, and providing a combined value stored in the accumulator storage circuit and the product storage circuit; and

[0046] b) Storing the accumulated value in a memory circuit.

[0047] Some embodiments of the present disclosure include: memory circuits, each memory circuit is used to store accumulated values; and an adder, which is used to add the accumulated values ​​in the memory circuits. The control circuit is operable to provide different first input values ​​and provide different second input values, and store the accumulated values ​​in each memory circuit.

[0048] According to some embodiments of the present disclosure, a time-sharing multiplication-accumulation circuit includes: a multiplication circuit, the multiplication circuit is operable to receive a first input value, receive a second input value, and generate a product of the first input value and the second input value; an accumulation digital storage circuit, the accumulation digital storage circuit is operable to store an accumulated digital value; and a digital bit accumulator, the digital bit accumulator is operable to receive the product, combine the product with the accumulated digital value stored in the accumulation digital storage circuit, and output the accumulated digital value. Combining the product with the accumulated digital value may include (i) storing a value in the accumulation digital storage circuit if the product is one and the accumulated digital value is zero; (ii) keeping the same accumulated digital value if the product is one and the accumulated digital value is non-zero, or (iii) scaling the accumulated digital value by two times if the product is zero. Some embodiments of the present disclosure include: a product storage circuit, the product storage circuit is operable to receive the product; and a one-bit analog-to-digital converter, the one-bit analog-to-digital converter is connected to the product storage circuit and to the digital bit accumulator. The product storage circuit is operable to provide the product to the one-bit analog-to-digital converter, and the one-bit analog-to-digital converter is operable to receive the product, convert the product to a digital bit product, and provide the digital bit product to the digital bit accumulator.

[0049] Embodiments of the present disclosure provide a fast, efficient, low power, and small hybrid hardware accelerator that performs matrix multiplication using multiply-accumulate operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The foregoing and other objects, aspects, features and advantages of the present disclosure will become more apparent and better understood by reference to the following description taken in conjunction with the accompanying drawings, in which:

[0051] Figure 1A and Figure 1B Matrix multiplication operations useful for understanding embodiments of the present disclosure are mathematically illustrated;

[0052] Figure 1C and Figure 1D illustrates a matrix multiplication operation through a simplified computer program useful for understanding embodiments of the present disclosure;

[0053] Figure 2 is a functional schematic diagram of a single-bit multiply-accumulate circuit according to an illustrative embodiment of the present disclosure;

[0054] Figure 3 According to an illustrative embodiment of the present disclosure Figure 2 A schematic diagram of a one-dimensional array of single-bit multiply-accumulate circuits shown in ;

[0055] Figure 4A A functional schematic diagram of a single-bit multiply-accumulate circuit with a switch circuit and a clear circuit according to an illustrative embodiment of the present disclosure;

[0056] Figure 4B According to an illustrative embodiment of the present disclosure Figure 4A Abstraction of functional schematics;

[0057] Figure 4C is used to operate the illustrative embodiment according to the present disclosure Figure 4A Timing diagram of a single-bit multiplication-accumulation circuit;

[0058] Figure 5 According to an illustrative embodiment of the present disclosure Figure 4A A schematic diagram of a one-dimensional array of single-bit multiply-accumulate circuits shown in ;

[0059] Figure 6 A multiplication operation with a multiply-accumulate value useful for understanding embodiments of the present disclosure is illustrated diagrammatically;

[0060] Figure 7 is a schematic diagram of a two-dimensional array of single-bit multiply-accumulate circuits with digital summation circuits according to an illustrative embodiment of the present disclosure;

[0061] Figure 8 is a schematic diagram of a two-dimensional array of single-bit multiply-accumulate circuits with analog summation circuits according to an illustrative embodiment of the present disclosure;

[0062] Figures 9 and 10 is a schematic diagram of an analog summing circuit according to an illustrative embodiment of the present disclosure;

[0063] Fig.11A is a schematic diagram of a vector-matrix hybrid multiplication-accumulation circuit, and Fig. 11B FIG. 1 illustrates an illustrative embodiment according to the present disclosure. Fig.11A Matrix values ​​in the vector-matrix hybrid multiplication-accumulation circuit;

[0064] Fig.12 The invention includes an illustrative embodiment according to the present disclosure. Figure 8 A schematic diagram of a vector-matrix hybrid multiplication-accumulation circuit of a two-dimensional array of single-bit multiplication-accumulation circuits of an analog summation circuit shown in FIG.

[0065] Fig.13is an abstract schematic diagram of cascade switches controlled with analog voltages, revealing low power single-bit multiplication according to an illustrative embodiment of the present disclosure;

[0066] Fig.14 is a schematic diagram of a switch controlled with a low power analog voltage according to an illustrative embodiment of the present disclosure;

[0067] Fig.15A is a schematic diagram of a time-shared iterative multiply-accumulate switch with an accumulation capacitor according to an illustrative embodiment of the present disclosure;

[0068] Fig. 15B is a schematic diagram of a time-shared iterative multiply-accumulate switch with a product storage capacitor and a digital accumulator according to an illustrative embodiment of the present disclosure;

[0069] Fig. 15C is a schematic diagram of a time-shared iterative multiply-accumulate switch with a digital accumulator according to an illustrative embodiment of the present disclosure;

[0070] Fig.16 is a schematic diagram of a time-shared iterative multiply-accumulate switch with a controller and an input multiplexer according to an illustrative embodiment of the present disclosure;

[0071] Fig.17 is a flow chart of a method according to an illustrative embodiment of the present disclosure;

[0072] Fig.18 is a schematic diagram of a plurality of time-shared multiply-accumulate switches with analog adders according to an illustrative embodiment of the present disclosure;

[0073] Fig.19 is a schematic diagram of a plurality of time-shared multiply-accumulate switches with a digital adder according to an illustrative embodiment of the present disclosure;

[0074] Fig. 20 is a schematic diagram of a time-shared iterative multiply-accumulate switch with a controller and two input multiplexers according to an illustrative embodiment of the present disclosure;

[0075] Fig.21 is a flow chart of a method according to an illustrative embodiment of the present disclosure;

[0076] Fig. 22 is a schematic diagram of a time-shared iterative single-bit multiply-accumulate switch and a digital shift-accumulator for multi-bit multiplication according to an illustrative embodiment of the present disclosure;

[0077] Fig.23 is a schematic diagram of a time-shared single-bit iterative multiply-accumulate switch and analog adder for multi-bit multiplication with analog storage according to an illustrative embodiment of the present disclosure;

[0078] Fig.24 is a schematic diagram of a time-shared single-bit multiply-accumulate switch and a digital adder for multi-bit multiplication with digital storage according to an illustrative embodiment of the present disclosure;

[0079] Fig.25 is a table illustrating a time-shared multiply-accumulate for a two-bit value according to an illustrative embodiment of the present disclosure; and

[0080] Fig.26A and Fig.26B is a table illustrating a time-shared multiply-accumulate for four-bit values ​​according to an illustrative embodiment of the present disclosure.

[0081] The features and advantages of the present disclosure will become more apparent from the detailed description set forth below when considered in conjunction with the accompanying drawings, in which like reference numerals identify corresponding elements throughout. In the accompanying drawings, like reference numerals generally indicate identical, functionally similar, and / or structurally similar elements. The figures are not necessarily drawn to scale. DETAILED DESCRIPTION

[0082] Certain embodiments of the present disclosure relate to a single-bit mixed multiply-accumulate circuit (each qmac), which includes: two digital single-bit binary storage elements, each storing a single-bit value; a multiplier to multiply the two single-bit values ​​to calculate the product; and an analog charge storage element, such as a capacitor, for storing the product as a charge (or voltage). A one-dimensional array of Qmacs can calculate and sum a one-dimensional array (vector) of single-bit products. A two-dimensional array of Qmacs can calculate the product of two multi-bit digital multiplicands. (The multiplicand is the value to be multiplied by another value to calculate the multiplied product). The size of the two-dimensional array of qmacs used to calculate multi-bit multiplicands can be N+M-1, where N is the number of bits of one of the two digital multiplicands and M is the number of bits of the other of the two digital multiplicands. Vector matrix multiplication and accumulation of two linear vectors (one-dimensional arrays of numbers) with M values ​​can be calculated and accumulated into a single value using M two-dimensional arrays.

[0083] like Figure 1A As shown in , calculate C = AxB, where A, B and C are matrices for matrix multiplication. If A is an mxn matrix and B is an nxp matrix, then C is an mxp matrix, where C ij =∑A ik B kj , for k = 1 to n, i = 1 to m, j = 1 to p. Thus, matrix multiplication is a series of (ixj) multiply-accumulate operations of size k, each of which provides a value of the matrix C. Figure 1BIt is illustrated that C=AxB, where p=1, so that C and B are linear (eg, one-dimensional or vector) matrices. Figure 1C is a simplified software program that illustrates Figure 1A The matrix calculation of the calculation, Figure 1D is a simplified software program that illustrates Figure 1D The "For k = 0 to (n-1)" loop is a multiplication-accumulation operation, requiring n multiplications and n additions.

[0084] According to the embodiments of the present disclosure, Figure 2 and Figure 3 As shown in , a mixed multiplication-accumulation operation can be performed by an array of qmac 10, wherein each qmac 10 includes: a first number; a single-bit binary storage element 12 for storing a first bit A; a second number; a single-bit binary storage element 12 for storing a second bit B; a bit multiplier 14 (bit multiplication circuit 14) for multiplying the multiplicands A and B to generate a product stored as a charge in a bit capacitor 16 (analog storage circuit 16). In some embodiments, the storage element 12 is an SRAM cell, a DRAM cell, a flip-flop (e.g., a D flip-flop), or a pair of inverters, whose inputs are connected to the outputs, such as Figure 2 In some embodiments, the bit multiplier 14 is an AND gate that provides a positive value (e.g., one) only when both A and B are positive (e.g., one), thereby providing multiplication. Figure 2 As shown in , it can be implemented as a transistor having a source connected to the storage element 12 for A and a gate connected to the storage element 12 for B (or vice versa), providing a charge Q stored in the bit capacitor 16 when the product of the multiplicands A and B is a value. If the value of A or B is the same for different qmacs 10, the storage element 12 for the constant can be shared by multiple qmacs 10 (for example, a single storage element 12 can provide input values ​​to multiple qmacs 10, as discussed below). Figure 7 Those skilled in the art of analog and digital circuit design will appreciate that Figure 2 and Figure 3 is a simplified design, more complex designs are included as embodiments of the present disclosure, such as discussed below Fig.13 and Fig.14, which can operate at very low voltages and powers. For example, the amount of current deposited on the bit capacitor 16 can be very small to reduce the power used by the QMAC 10 and increase the circuit speed. The bit capacitor 16 can be very small to reduce the area of ​​the bit capacitor 16 in the integrated circuit embodiment. Thus, in some embodiments, the bit multiplier 14 controls the current deposition charge on the bit capacitor 16 very accurately over time to maintain the accuracy and precision of the multiplication and accumulation operation. Thus, the bit multiplier 14 can be designed to control the amount of charge deposited on the bit capacitor 16 very accurately, for example, in response to carefully calibrated timing signals and voltages.

[0085] Figure 3 Four qmacs 10 are shown with bit capacitors 16 (analog storage circuits 16) connected in parallel to sum four products in a hybrid multiply-accumulate circuit 20. The four parallel qmacs 10 provide a multiply-accumulate operation for four single-bit A values ​​each multiplied by a single-bit B value. The single-bit B values ​​may be the same or different. Thus, Figure 3 A circuit for performing a multiply-accumulate operation on four single-bit binary values ​​is shown (e.g., where Figures 1A to 1D , k=4). Thus, the array of single-bit multiply-accumulate circuits 10 are operable together to combine the charge deposited in each analog storage circuit 16 to provide an accumulated charge representing the sum of the products of the qmac 10.

[0086] The total charge on the bit capacitors 16 connected in parallel provides an analog accumulated value output O that can be converted to a digital value with an analog-to-digital converter (ADC) 30 or used as an analog value for further calculations. The absolute value of the voltage or charge (output O) must be scaled by the number of capacitors n because parallel capacitors have a capacitance equal to the sum of the capacitances of the capacitors connected in parallel. Since the charge on a capacitor is equal to the voltage times the capacitance (Q=CV), if the capacitor increases by a fixed charge, the voltage will decrease accordingly. For example, if each capacitor stores a charge Q equivalent to a value, the sum of the values ​​will be four (in Figure 3 ), but the voltage will remain at unity because the four capacitors are electrically connected in parallel. Thus, the voltage output must be scaled by the number of capacitors (e.g., Figure 3 in the figure, four times).

[0087] The hybrid multiply-accumulate circuit may require less power than a digital equivalent circuit, for example, using a digital adder. The net current or charge leakage from the small bit capacitor 16 can be very small, and the analog storage circuit 16 and other analog operations can operate at very low voltages, for example, no more than 1V (e.g., no more than 500mV, no more than 100mV, no more than 50mV, or no more than 10mV), and lower than the voltage used for conventional digital logic (e.g., 5V, 3.6V, 3.3V, or 1.65V). Some embodiments of the present disclosure can operate at substantially 10mV.

[0088] Figure 2 and Figure 3 The circuit is a simplified representation of the QMAC 10 and its implementation in a multiply-accumulate array. As shown, precise control of charge deposition on the bit capacitor 16 helps maintain multiply-accumulate accuracy and precision. Figure 4A , a more complex circuit for the qmac 10 controls the electrical connections between the qmacs 10 in the array of qmacs 10 through a switch circuit 18 (also designated as S in the figure) connected to the output of the bit multiplier 14 and the bit capacitor 16. When the switch circuit 18 is turned on, a charge Q representing the product of bits A and B is deposited on the bit capacitor 16 through the left transistor of the switch circuit 18. When the switch circuit 18 is turned off, the left transistor is turned off, and the inverter including the center transistor in the switch circuit 18 applies a positive signal to the connecting switch including the right transistor of the switch circuit 18, connecting the bit capacitor 16 in parallel.

[0089] Figure 4A The switch circuit 18 is a simplified circuit and more complex circuits can be implemented to provide the switching function and are included in the present disclosure. Thus, in a first mode, the switch circuit 18 is turned on and the multiplication product of the bit multiplier 14 is applied separately and individually to transfer the charge to the bit capacitor 16 in each qmac 10. In a second mode, the switch circuit 18 is turned off, the bit capacitors 16 are connected in parallel, and the charge Q on the bit capacitor 16 in each qmac 10 is isolated from the bit multiplier 14 and summed to provide an accumulated value output O. The clear circuit 19 (also designated as C in the figure) connected across the bit capacitor 16 can remove the charge Q across the bit capacitor 16 and prepare the qmac 10 to perform the next multiplication with the new single-bit digital values ​​A and B. Figure 4B Shows Figure 4A An abstraction of a single-bit multiplication-accumulation circuit, wherein A and B are single-bit digital storage elements 12, M is a bit multiplier 14, S is a switch circuit 18, and C is a clear circuit 19.

[0090] Figure 4CA multiply-accumulate cycle for qmac 10 is illustrated. Load signals A and B are set to store corresponding values ​​in storage element 12, for example, provided by a computer or other state machine controller and multiplied by bit multiplier 14. At the same time, the clear signal is high and the switch signal is low to isolate and clear the bit capacitor 16. Once the bit capacitor 16 is cleared, the clear signal is set to a low level and the switch signal can be set to a high level to deposit a charge Q representing the product of A and B in the bit capacitor 16. Once the charge Q is loaded to the bit capacitor 16, the switch signal is set to a low level to isolate the bit multiplier 14 from the bit capacitor 16 and connect all the bit capacitors 16 in parallel, thereby summing the charge Q on the bit capacitor 16 to provide an accumulated value output O. The summed charge Q is equal to the output O, which, appropriately scaled, can be converted to a digital value with an analog-to-digital converter 30 or used as an analog value for further calculations. The entire operation can be completed in two cycles as the switch circuit 18 changes from the first mode to the second mode.

[0091] Figure 5 Illustration of the use Figure 4B An abstract representation of an array of qmacs 10 forming a hybrid multiply-accumulate circuit 20. In some embodiments, a single clear circuit 19 can be used to clear the charge of all bit capacitors 16 connected when the switch circuit 18 is turned off, but the switch circuit 18 connected between the bit capacitors 16 may interfere with the charge clearing of all bit capacitors 16. In some embodiments, a clear circuit 19 is provided for each qmac 10 and the clear circuits 19 are commonly controlled in the hybrid multiply-accumulate circuit 20, as are the switch circuits 18.

[0092] Figure 6 The full multiplication for two binary, multi-digit, multi-bit values ​​is illustrated. Figure 6 The case with a four-bit value is illustrated, but any number of bits can be used for the mixed multiply-accumulate circuit 20 with the number of qmacs 10 corresponding to the number of bits to be multiplied. The number of qmacs 10 in each mixed multiply-accumulate circuit 20 corresponds to the number of bits in A, and the number of mixed multiply-accumulate circuits 20 corresponds to the number of multiply-accumulate calculations to be completed at the same time. When the number of qmacs 10 is less than the number of bits in A or the number of multiply-accumulate calculations to be completed at the same time is less than the number of bits in B, partial calculations can be performed, and the products can be stored and combined under the control of an external computer or controller such as a state machine.

[0093] like Figure 6 As shown in the 4-bit example, each row of products shown is a one-bit value B multiplied by a multi-bit value A. Figure 6The products (multiplied values) of each column 21 (having the same magnitude or position) are summed in each mixed multiplication-accumulation circuit 20 to form a Figure 5 The accumulated results (summed output value O) shown in FIG. 21. Each column 21 of products may be calculated and summed using a different mixed multiply-accumulate circuit 20. The accumulated results (output values ​​O) of the mixed multiply-accumulate circuits 20 are then summed (added together) to provide the final value of the multi-bit multiplication.

[0094] The multiplication and accumulation of each column 21 product can be performed by a one-dimensional array of qmac 10. Figure 7 As shown in FIG. 1 , each column of qmac 10 forms a hybrid multiply-accumulate circuit 20 that shares a common B storage element 12. The array of Qmac 10 in each hybrid multiply-accumulate circuit 20 (corresponding to the B storage element 12 in this example) is shown in FIG. Figure 6 21 products as output value O. Each column 21 product is calculated using a separate hybrid multiplication-accumulation circuit 20. The output values ​​O of each hybrid multiplication-accumulation circuit 20 can be added together. Because each column 21 product has a different locality value (relative magnitude), the values ​​in each column 21 product must be scaled to multiply them by their locality value, for example, by one to six localities, thereby multiplying them by 2, 4, 8, 16, 32 or 64 before they are added. Multiple multiplication operations can be performed without reloading the bit values ​​(B storage elements 12) in which the bits do not change, for example, if the bit values ​​represent weights that are common to multiple input values.

[0095] The array of hybrid multiply-accumulate circuits 20 forming the hybrid multi-bit multiplier 22 provides extremely fast operation with far fewer cycles than conventional digital circuits. In addition, the addition step of summing the output value O (if done digitally) can be broken into multiple stages (e.g., adding pairs of values ​​at a time) and pipelined for faster operation, and the multiply-accumulate operations of different values ​​can be overlapped in time, for example, under the control of a computer or state machine controller.

[0096] In some embodiments of the present disclosure, the addition of the output value O from the hybrid multiply-accumulate circuit 20 is calculated digitally. In some embodiments, the addition of the output value O from the hybrid multiply-accumulate circuit 20 is calculated using analog circuits. Figure 7 As shown in , the output values ​​are converted using an analog-to-digital converter 30 to provide digital bit values ​​that are stored in a register or other memory, the digital bit values ​​being scaled, for example, by shifting them relative to each other (each shift corresponding to a power of two) and summing the scaled bit values ​​using a digital adder.

[0097] like Figure 8As shown in , the analog summation result of each mixed multiply-accumulate operation (column of qmac 10) is a voltage (or charge) which is multiplied by a quantity corresponding to the position of the analog sum (e.g., by a voltage multiplier VM) and the multiplied analog sums are added together, e.g., using an analog adder, and the final sum is converted to a digital value using an analog-to-digital converter 30. In such an embodiment, the entire calculation can be completed within two switching cycles (not including any clear or load cycles), providing very fast operation compared to conventional implementations. Figure 8 An embodiment having a separate storage element 12 for each qmac 10 is illustrated.

[0098] In some embodiments, analog voltage multiplication and summing may be accomplished using operational amplifier (op amp) 40 configured in a summing mode. Fig. 9 An inverting summing (adding) operational amplifier 40 is shown. The output Vo of the operational amplifier 40 is equal to each voltage V 1 To V N The sum of R' / R n where n is the specific column and N is the number of columns of the product to be added 21 (e.g., Figure 7 7 in the example). Each voltage corresponds to the output O of a column of qmac 10. For example, R1 may correspond to the lowest point value to be summed, so that R' / R 1 =1 / 64, R' / R 2 =1 / 32, R' / R 3 =1 / 16, R' / R 4 =1 / 8, R' / R 5 =1 / 4, R' / R 6 = 1 / 1, and R' / R 7 = 1. The inverting output of the operational amplifier 40 may be converted to a digital value using the analog-to-digital converter 30 and appropriately scaled.

[0099] Fig.10 A non-inverting summing (adding) operational amplifier 40 is shown. The output Vo of the operational amplifier 40 is equal to the voltage V 1 To V N Each multiplied by the ratio R' / R, where R 1 -R N The voltage values ​​V1-VN can be scaled using a voltage divider implemented with resistors. For example, connecting to V 1 The resistor can have a 63:1 ratio and be connected to V 2 The resistor can have a 31:1 ratio and be connected to V 3The resistors may have a ratio of 15:1, and so on, scaling the voltage to correspond to the location of the added value. The output of the operational amplifier 40 may be scaled by a ratio of (R+R') / R (eg, 64) and converted to a digital value using the analog-to-digital converter 30.

[0100] Figure 7 and Figure 8 The embodiment of analog summation can provide faster operation, while Figure 6 Embodiments of digital summation can provide higher precision. Embodiments of the present disclosure are not limited by the number of bits shown in the figure. For example, the mixed multiplication accumulator circuit 20 can have 64, 128, 256, 512, 1024, 2048, 4096, 8192 or 16384 qmac 10 or more, and an equal number of mixed multiplication accumulator circuits 20 can be used in the array to provide high-speed multiplication with many bits. Embodiments of the present disclosure can be provided to a conventional computer or graphics processor as a hardware accelerator. Data can be provided to the hardware accelerator in a pipelined manner, with two or more shift registers at the input and output. Any hardware implementation of the array of mixed multiplication accumulator circuits 20 must be resized to efficiently accommodate the size of the input vector. If the array of mixed multiplication accumulator circuits 20 is too large for the task, most of the circuit is not used (for example, the number of qmac 10 is too large). If the array of mixed multiplication accumulator circuits 20 is too small, the vector multiplication must be decomposed into smaller vectors; too many small vectors also lead to inefficiency.

[0101] like Figure 6 As shown in FIG. 1 , the two-dimensional multiplication array of the single-bit multiplication-accumulation circuit 10 can perform multi-bit multiplication (e.g., Figure 7 and Figure 8 ). The hybrid multi-bit multiplier 22 includes a plurality of arrays such as Figure 8 and Fig. 9 The arrays of those forming the hybrid matrix multiply-accumulate circuit 24 can calculate the entire vector multiplication. Each multi-bit multiplication for vector multiply-accumulate (e.g., Figure 1B ) can produce digital products (such as Figure 7 , or after analog-to-digital conversion of the analog and output value O), and the digital products can be digitally added using a digital adder. In some embodiments, each multi-bit multiplication for vector multiply-accumulate (e.g., as Figure 1B ) can produce digital products (such as Figure 8 The output value shown in FIG. 2 is 0), and the analog products can be added using similar circuits, as shown in FIG. Figure 6 As shown in . The simulated product P (such as Figure 8) can be deposited in a capacitor (e.g., similar to bit capacitor 16, but with a larger storage capacity for a larger charge) using a deposition circuit similar to bit multiplier 14. Fig.12 As shown in Figure 5 The switch and clear circuit 18 can deposit a charge Q on the capacitor and can sum the charges by connecting the capacitors in parallel and then converting the summed charge with the analog-to-digital converter 30, thereby providing the entire vector-matrix multiplication in one cycle. Fig.11A A hybrid matrix multiply-accumulate circuit 24 is shown, and Fig. 11B A hybrid multi-bit multiplier 22 is associated with the multiplicand in a vector multiply-accumulate calculation.

[0102] Embodiments of the present disclosure may provide a very low voltage multiply-accumulate circuit 10, for example, using voltages from 10 mV to 1 V. Such low voltages provide low power operation. A bit multiplier 14 using a conventional AND gate may require, for example, six relatively large transistors operating at relatively high voltages to implement a bit multiplication circuit that can adequately control the charge Q deposited on the analog storage circuit 16 (e.g., from 1.65-5 V). In contrast and as Fig.13 As shown in , the bit multiplier 14 of the present disclosure may include a series switch circuit 15 connected in series, which can operate at a relatively low voltage (e.g., not more than 1V and as low as 10mV) and low power and can fully control the charge Q deposited on the analog storage circuit 16 by, for example, only four relatively small transistors.

[0103] like Fig.13 As shown in FIG. 1 , a series of three series switch circuits 15 and an analog storage circuit 16 can realize a function similar to that of Figure 4A and Figure 4B qmac 10 of the circuit illustrated in FIG. Each series switch circuit 15 has two differential voltage inputs (V and V bar, where V bar is the inverted value of V), two voltage inputs In and In bar, where In bar is the inverted value of In) and an output O. Thus, Fig.13 and Fig.14 Each of the signals A, B and Switch in (discussed in more detail below) is a differential signal. The first series switch circuit 15 in the series has a reference voltage V REFP (For example, V REF , high or positive value, such as 10mV) and its inverting value V REFN (e.g., a low or negative value such as 0 mV) as two voltage inputs and a value A (e.g., a weight value) and its inverted value A bar as two input values. Fig.13As shown in the inset, if A is high (e.g., positive or 10 mV) and the A bar is therefore low (e.g., 0 mV), then the output O is V REF , as indicated by the non-dashed line connection. Fig.13 As shown in the inset, if A is low (e.g., negative or 0 mV) and the A bar is therefore high (e.g., 10 mV), then the output O is V REFN , as indicated by the non-dashed line. Thus, if A is positive, then O is positive, and if A is negative, then O is negative. The second series switch 15 in the series has an input value B and its inverse B bar, taking the value O from the first series switch 15 as V REFP Positive value, and V REFN As the inverted voltage value (e.g., 0V). Thus, if O is low (negative), the output P from the second series switch circuit 15 will be low (negative) regardless of what value B has. If O is high (positive) and if B is high (positive), the output O from the second series switch circuit 15 will be high (positive), and if B is low, the output P from the second series switch circuit 15 will be low (negative). Thus, the first two series switch circuits 15 perform the AND function with reduced circuits and power.

[0104] The third series switch circuit 15 can be used to implement the switch circuit 18, and has an input switch value and its inverse (corresponding to Figure 4A , Figure 4B The switch value of the second series switch 15 is taken as V REF value, and the common V SUM Thus, if the switch is high, the output O charges the analog storage circuit 16. If the switch is low, the charge Q on the analog storage circuit 16 is generally connected to any other analog storage circuit 16 in the array of qmac 10 (e.g., Figure 3 As shown in , as the analog qmac10 array output), a summation operation is provided.

[0105] Fig.14 Some embodiments of low voltage qmac 10 including three series connected series switch circuits 15 are illustrated. Each switch circuit 15 includes a pair of simple MOS (metal oxide semiconductor) transistors having separate differential inputs and a common output. One of the pair of simple MOS transistors is controlled by a positive control signal and the other is controlled by an inverted (negative) version of the same control signal, for example, the positive and negative outputs of any single bit storage element 12 (e.g., a D flip-flop or about Figure 2 The circuit functions as described above for the paired inverters shown and described. Fig.13Such a series of series switch circuits 15 may require fewer, simpler transistors that operate at much lower voltages (e.g., one percent or less, such as 0.624%, or 10 mV instead of 1.65 V), and therefore require much less power. The combined (summed) voltage across the analog storage circuit 16 may be:

[0106] V SUM =((n*V REFP )+(Nn)*V REFN )) / N.

[0107] Among them, V REFN =0V:

[0108] V SUM =(n*V REFP ) / N,

[0109] Where n is the number of capacitors and N is the number of qmac10s connected in a row. VSUM can then be scaled or converted as described above. ( Fig.14 Excluding clearing circuit 19. )

[0110] Thus, according to some embodiments of the present disclosure, a hybrid matrix multiplier includes: digital storage elements 12, each of which is operable to store a digital value; a multiplication circuit 14 for multiplying the stored digital values ​​to generate a product; an analog storage circuit 16, which is operable to store the product; and a power connection (e.g., V REFP and V REFN ) to provide power to operate the digital storage element 12, the multiplication circuit 14 and the analog storage circuit 16. The power connection may have a voltage of no greater than 1V, no greater than 500mV, no greater than 100mV, no greater than 50mv or no greater than 10mV. The bit multiplication circuit 14 may include a switch 15 connected in series.

[0111] In some embodiments, the hardware implementation of the hybrid matrix multiply-accumulate circuit 24, the hybrid multi-bit multiplier 22 or the hybrid multiply-accumulate circuit 20 does not fully match the desired calculation for a particular application. For such applications, the calculation can be divided into sub-problems that better match the available hardware, and the results are combined to provide the desired calculation. The sub-problems can be completed sequentially in time so that the hardware is time-shared or time-multiplexed. Some values ​​(e.g., bits for multiplicand B) can be stored in the storage element 12 for multiple hardware operations, thereby reducing the power and time used in the hardware.

[0112] Embodiments of the present disclosure enable vector multiply-accumulate computations to be performed at very high rates using very little energy. Rather than requiring n cycles of a program (e.g., Figure 1Cand Figure 1D ), each with multiple machine code cycles required to execute the program, with the entire computation being completed within a single cycle. Many large matrix operations, for example, in machine learning applications, have many zero values ​​in the matrix and require relatively low bit precision to iterate solutions to the matching problem. Thus, embodiments of the present disclosure provide efficient circuits for such applications.

[0113] In some embodiments of the present disclosure, multi-bit digital multiplication is performed in a single step, for example, using multiple single-bit multiplication-accumulation circuits 10 in a hybrid multiplication-accumulation circuit 20, such as Figure 2 and Figure 3 Two multi-bit digital values ​​can be multiplied in a single step using an array of mixed multiply-accumulate circuits 20, as shown in Figures 6 to 8 In such a hybrid multi-bit multiplier, the operating performance of the bit multiplication circuits 14 (e.g., including multiple series of series switching circuits 15) is carefully matched so that the charge stored by each bit multiplication circuit 14 is the same and the analog sum from the parallel-connected analog storage circuits 16 is correct, at least within the error range of any analog-to-digital converter 30.

[0114] In some embodiments of the present disclosure, rather than matching the operational performance of the bit multiplication circuit 14, a single bit multiplication circuit 14 is repeatedly used (e.g., iterated over time so that the single bit multiplication circuit 14 is shared over time) to accumulate bit products in the accumulator storage circuit 17 and circuit matching is not required. Although the repetition takes time, the single bit multiplication circuit 14 and the accumulator product circuit 17 can be very small (e.g., including three transistors (e.g., Fig.14 As shown)) and additional accumulator capacitors. Thus, many millions or even billions of such circuits can be constructed in an integrated circuit and provide very fast matrix multiplication with relatively less energy usage than existing digital multipliers.

[0115] Fig.15A A simple hybrid iterative single-bit multiply-accumulate circuit 11 (iqmac 11) is illustrated that includes a single-bit multiply-accumulate circuit 10 having a product storage circuit 16 (capacitor 16) electrically connected in parallel with an accumulator storage circuit 17 (e.g., capacitor 17 having the same capacitance as the product storage circuit 16 of the single-bit multiply-accumulate circuit 10) via a switch 18 serving as an accumulation switch 60. The accumulation switch 60 may be the same, substantially similar, or identical to the differential switch 18 of the single-bit multiply-accumulate circuit 10, such as Fig.16 As shown in more detail in FIG. Fig.16 Picture shows Fig.14The single-bit multiplication circuit 14 is added with an accumulator storage circuit 17 forming an iterative single-bit multiplication-accumulation circuit 11. Optionally, the output of the accumulator storage circuit 17 can be connected to an analog-to-digital converter 30 through an optional switch 18.

[0116] Fig.15A 1 shows the multiplication of two single-bit values ​​stored in two corresponding single-bit storage elements 12. When the switch 18 is set to the multiplication mode (first mode), the product P is stored in the product storage circuit 16 (capacitor 16), as described above with respect to Figure 2 and Fig.14 When switch 18 is set to the accumulation mode (second mode), any charge stored in product storage circuit 16 is shared (combined) with any charge stored in accumulator storage circuit 17, similar to Figure 3 , except that there are only two capacitors 16, 17 in the iterative single-bit multiply-accumulate circuit 11. Multiple bit products can be accumulated in the two capacitors by repeatedly providing bits in the storage element 12, setting the switch 18 in the multiplication mode, depositing a charge representing the bit product of the storage element 12 in the product storage circuit 16, and setting the switch 18 in the accumulation mode to combine the charges in the capacitor 16 and the capacitor 17.

[0117] Fig. 15B A simple hybrid iterative unit multiply-accumulate circuit 11 (iqmac 11) is illustrated that includes a single-bit multiply-accumulate circuit 10 that provides a bit product that is stored in a product storage circuit 16 (capacitor 16), the value of which is digitized (digitized to a one or zero digital bit product) by an analog-to-digital converter 30. In some embodiments and as shown Fig. 15CAs shown in , the voltage actually generated by the single-bit multiplication-accumulation circuit 10 is a digital voltage, in which case the product storage circuit 16 and the separate analog-to-digital converter 30 are not required. The digital bit accumulator 32 receives each digital bit product and combines it with the multi-bit accumulated digital value in the accumulated digital storage circuit 34 (e.g., a memory or register). Each combination includes scaling the accumulated digital value in the accumulated digital storage circuit 34. Combining the digital bit product with the accumulated digital value may include: if the digital bit product is one and the accumulated digital value is zero, then storing a value in the accumulated digital storage circuit; if the digital bit product is one and the accumulated digital value is non-zero, then keeping the same accumulated digital value; or if the product is zero, scaling the accumulated digital value by two, as further described below. The combination can be implemented with a simple digital circuit, for example, a state machine with a digital shift circuit 36 ​​(e.g., a divide-by-two circuit). Such a mixed iterative single-bit multiplication-accumulation circuit 11 does not require matching capacitors 16 and 17. In some embodiments, the size of a suitable state machine having digital shift circuit 36 ​​and accumulating digital storage circuit 34 can be relatively small, for example, Fig.16 and Fig.17 The capacitors 16 and 17 and Fig.16 In particular, in a case such as Fig. 15B and Fig. 15C In the embodiment, the multi-bit ADC 30 is not required, reducing the circuit size of the iqmac 11 and reducing the time and power required for operation.

[0118] like Fig.16 As shown in FIG. 1 , a single bit can be multiplied by applying a single bit B to one input of the bit multiplication circuit 14 and successively multiplying the bits of the multi-bit value A (in this example, A). 0 To A 3 ) is applied to the input of the bit multiplication circuit 14 to multiply a plurality of bits of the multi-bit value. Successive bit applications may be performed in a bit order from a low bit to a high bit by storing the multi-bit value in a register (memory) 56 and multiplexing successive bits in the register 56 successively and applying the multiplexed bits to the bit multiplication circuit 14 under the control of the control circuit 70, which may provide the bit selected value of the multiplexer 50 and the multi-bit value A in the register 56.

[0119] like Fig.17 As shown in FIG. 1 , a single bit B may be multiplied by a multi-bit value A (e.g., by setting their values ​​to zero, e.g., by performing a multi-bit operation as shown in FIG. 1 ) by first providing iqmac 11 in step 100 and then clearing product storage circuit 16 and accumulator storage circuit 17 in step 110. FIG. 4A to FIG. 4CThe control circuit 70 provides the single bit value B and the multi-bit value A in the register 56 to the storage element 12 in step 102 and sets the bit count value N to zero in step 115. Steps 102 and 110 may be performed in any order. Bit N of the multi-bit value A is selected by the multiplexer 50 in step 120 and the switch 18 is set to the multiplication (first) mode under the control of the control circuit 70 in step 125. The bit multiplier 14 multiplies bit N of the multi-bit value A by bit B and stores the product in the product storage circuit 16 in step 130. The switch 18 is then set to the accumulation (second) mode in step 135, connecting the storage circuits in parallel so that any charge in the product storage circuit 16 and the accumulator storage circuit 17 is combined and shared between the product and accumulator storage circuits 16, 17 in step 140. The bit count N is then tested in step 145 to find out whether all bits of the multi-bit value A have been multiplied by bit B. If not all bits of multi-bit value A have been multiplied by bit B, then N is incremented in step 150 (e.g., by control circuit 70). If all bits of multi-bit value A have been multiplied by bit B (test step 145), then the process is complete and a value corresponding to the product is stored in accumulator storage circuit 17. Analog-to-digital converter 30, optionally under the control of switch 18, converts the accumulated product to a digital value in step 155. For example, the output (V ACC ) itself can be switched, for example, using a series switch circuit 15 and applied to the modulus circuit 30. If all bits of A have not yet been multiplied with bit B, the bit count N is incremented and steps 120 to 145 are repeated until all bits of A have been multiplied. A new multiplication can then be performed.

[0120] In some embodiments, an iterative single-bit multiply-accumulate circuit 11 may be provided for simultaneously multiplying each bit of the second multi-bit value B with each bit in the second multi-bit value B. Each iterative single-bit multiply-accumulate circuit 11 then accumulates the bit corresponding to Figure 6 Thus, in this example, four iterative single-bit multiplication-accumulation circuits 11 each accumulate the sum corresponding to Figure 6 The value of the calculated row shown in the figure. Fig.18 The diagram shows the simulated summation of the accumulated products. Each accumulated product (corresponding to Figure 6 A row of ) is scaled (multiplied by the square corresponding to that row), for example, using a voltage multiplier, and then added, for example, as Figures 7 to 9 As shown in the figure. Fig.19 As shown in FIG. 1 , each accumulated product may be digitized using an analog-to-digital converter 30, scaled using a shifting circuit, and then digitally summed using a digital adder 54. The top row is scaled (multiplied) by 20=1 or shifted by zero, and the bottom row is scaled (multiplied) by 21 =2 or shift one position, the next row is scaled (multiplied) by 2 2 =4 or shifted by two bits, the last row is scaled (multiplied) by 2 3 =8 or shift by three bits.

[0121] According to some embodiments of the present disclosure, the multi-bit value B may be multiplied by the multi-bit value A by iteratively applying iqmac 11 to each bit of the multi-bit value B such that only one iterative single-bit multiply-accumulate circuit 11 is used to compute the entire product. Fig. 20 The diagram shows that the multiplexer 50 is used to replace the Fig.16 The control circuit 70 may store the multi-bit value B in the register 56 and select the bit M of the multi-bit value B using the multiplexer 50 and apply the selected bit to the iqmac 11. Each single-bit multiplication of the bit M of the multi-bit value B by the multi-bit value A is as described with respect to Fig.17 The process is performed iteratively as described in the flowchart of FIG. 1 (eg, in step 200 ).

[0122] like Fig.21 As shown in , the multi-bit value B can be multiplied by the multi-bit value A by first providing iqmac11 in step 100 and then setting the bit counter M to zero in step 105. The method of step 200 ( Fig.17 ) then proceeds to the selected bit M for the multi-bit value A and the multi-bit value B. If all bits of the multi-bit value B have not been multiplied by the multi-bit value A (determined in step 160), the accumulated bit products are stored in step 165, for example, in a capacitor if the value is a charge, or in a register if the value is digital (e.g., converted by analog-to-digital converter 30 in step 155), and the bit count value M is incremented in step 170. The product of each bit of the multi-bit value B multiplied by the multi-bit value A corresponds to Figure 6 Once all bits of multi-bit value B have been multiplied by multi-bit value A, the product of each bit of multi-bit value B and multi-bit value A may be calculated in step 175 as described with respect to Figure 7 and Figure 8 The products of the multi-bit values ​​b are summed as described (e.g., using analog or digital summation, taking appropriate care to scale each bit of the product of the multi-bit values ​​b before summing the results).

[0123] Fig. 22 A mixing circuit for iteratively multiplying two 8-bit digital values ​​using a single-bit multiply-accumulate circuit 11 is shown. Fig. 22 As shown in FIG. 1 , the control circuit 70 controls the switch 18 and the multiplexer 50 to cycle through the Fig.21 and Fig.21Each product of a bit of multi-bit value B and a bit of multi-bit value A is converted to a digital value by digital shift accumulator 52, scaled, and then accumulated (added to the existing value). Fig.23 As shown, the digital shift accumulator 52 may include: a demultiplexer 51, which is responsive to a control circuit 70 for shifting each bit of the digitized product (to scale the corresponding Figure 6 52); a multi-bit register or memory 13 for storing the accumulated products; and an adder 54 for adding the scaled products to the accumulated products and storing the sum in the register. The shift (scaling) may correspond to the bits of the multi-bit value B selected for multiplication with the multi-bit value A. After all bits of the multi-bit product have been multiplied with the multi-bit value A and the products have been accumulated, the accumulated value in the digital shift accumulator 52 contains the product of the multi-bit values ​​A and B.

[0124] Fig.24 Execution and Fig.23 The same function, except that the multiply-accumulate is performed using analog circuits. Fig.24 As shown in FIG. 1 , control circuit 70 controls switch 18 and multiplexer 50 to cycle through the bits of multi-bit value A and multi-bit value B, as shown in FIG. Fig. 20 and Fig.21 Each product of a bit of the multi-bit value B and the multi-bit value A is scaled (e.g., using a voltage multiplier) and then stored in a separate analog storage circuit 16 (e.g., a capacitor) selected by the analog demultiplexer 52. Once the bit corresponding to Figure 6 All accumulated products of the rows in are stored and can be accessed using something like Figures 2 to 5 The circuit sums in one step.

[0125] According to some embodiments of the present disclosure, array multiplication can be implemented using a hybrid iterative single-bit multiply-accumulate circuit, such as Fig. 22 As illustrated in FIG. 1 for each multi-bit product, all product values ​​are calculated at the same time, but each product value is calculated iteratively. According to an embodiment of the present disclosure, such an array multiplier can be fast and low power.

[0126] The iterative single-bit multiplier accumulator 11 sequentially calculates the product of the single-bit B and the bits of the multi-bit value A, stores the product of each bit pair in sequence in the product storage circuit 16, and accumulates the sequential products in the accumulator storage circuit 17. Since the multi-bit value is a binary value, the value of each consecutive bit product is twice the previous product. For example, the product of the single-bit value 1 and the multi-bit value 111 has three consecutive one bits. The value of the first bit is 1, the value of the second bit is 2, and the value of the third bit is 4, corresponding to the position of the bit in the number. Therefore, the sequential accumulation of the bit products must provide appropriate scaling of the bits corresponding to the position values ​​of the bits.

[0127] Each time the product storage circuit 16 is electrically connected in parallel with the accumulator storage circuit 17, the charge in the two circuits is balanced into a combined and shared charge. Fig.25 The charge combination and balance for each possible result of multiplying a single-bit value B by a two-bit value B is illustrated. If the value of B is zero, then all products are zero and any accumulated charge may be zero ( Fig.25 These numbers are written in binary notation.

[0128] The upper left column illustrates the process if B is 1 and A equals 00. Voltage C M is the charge stored in the product storage circuit 16, and the voltage C A is the accumulated charge relative to the charge corresponding to a product value stored in the accumulator storage circuit 17. In clear cycle 0, the product storage circuit 16 and the accumulator storage circuit 17 are cleared. In cycle one, the bit zero (zero) of A is multiplied by B (one) to produce a zero product, stored in the product storage circuit 16 and then accumulated in the accumulator storage circuit 17, both of which will store zero charge. In cycle two, the bit one (zero) of A is multiplied by B (one) to produce a zero product, stored in the product storage circuit 16 and then accumulated in the accumulator storage circuit 17, again as zero charge. In cycle three, the analog-to-digital converter 30 converts the accumulated charge (zero charge) in the accumulator storage circuit 17 to zero.

[0129] If B is 1 and A is equal to 01, the upper right column illustrates the process. In clear cycle 0, product storage circuit 16 and accumulator storage circuit 17 are cleared. In cycle one, bit zero (zero) of A is multiplied by B (one) in multiplication mode to produce a product, which is stored as a charge in product storage circuit 16. Because product storage circuit 16 is a capacitor with a capacitance equal to the capacitance of accumulator storage circuit 17, the parallel connection between them (enabled by switch 18 in accumulation mode) doubles the capacitance, thereby halving the charge of each capacitor and the voltage of the capacitor, so that accumulator storage circuit 17 stores a relative charge of one-half. In cycle two, bit one (zero) of A is multiplied by B (one) in multiplication mode to produce a zero product, stored in product storage circuit 16 and then accumulated in accumulator storage circuit 17 in accumulation mode. This combination combines the one-half charge in accumulator storage circuit 17 with the zero charge in product storage circuit 16, reducing the charge and voltage in each circuit by one-half, so that accumulator storage circuit 17 has one-quarter relative charge and voltage. In cycle three, the charge is scaled by a factor of four (equal to the number of values ​​that can be stored in a two-bit binary digital value), and analog-to-digital converter 30 converts the accumulated charge in accumulator storage circuit 17 to one (four times one-quarter), the product of which is B=1 and A=01 (one in decimal notation).

[0130] If B is 1 and A is equal to 10, the process is illustrated in the following column on the left. In clear cycle 0, product storage circuit 16 and accumulator storage circuit 17 are cleared. In cycle one, bit zero (zero) of A is multiplied by B (one) to produce a zero product, which is stored as a zero charge in product storage circuit 16. In cycle two, bit one (one) of A is multiplied by B (one) in multiplication mode to produce a one product, which is stored in product storage circuit 16 and then accumulated in accumulator storage circuit 17 in accumulation mode. This combination combines the zero charge in accumulator storage circuit 17 with the one charge in product storage circuit 16, so that accumulator storage circuit 17 has a relative charge and voltage of one-half. In cycle three, the charge is scaled by four times, and the analog-to-digital converter 30 converts the accumulated charge in accumulator storage circuit 17 to two (four times one-half), the product of which is B=1 and A=10 (two in decimal notation).

[0131] If B is 1 and A is equal to 11, the right column illustrates the process. In clear cycle 0, product storage circuit 16 and accumulator storage circuit 17 are cleared. In cycle one, bit zero (zero) of A is multiplied by B (one) in multiplication mode to produce a product, stored as a charge in product storage circuit 16, and then accumulated in accumulation mode as one-half charge and voltage in accumulator storage circuit 17. In cycle two, bit one (one) of A is multiplied by B (one) to produce a product, stored in product storage circuit 16 and then accumulated in accumulator storage circuit 17. This combination combines the one-half charge in accumulator storage circuit 17 with the one charge in product storage circuit 16, so that accumulator storage circuit 17 has a relative charge and voltage of three-quarters. In cycle three, the charge is scaled by a factor of four and the analog-to-digital converter 30 converts the accumulated charge in the accumulator storage circuit 17 to three (four times three quarters), the product of which is B=1 and A=11 (three in decimal notation).

[0132] Fig.26A and 26B The same process is illustrated for a four-bit binary value A. For the indicated cycle, the product voltage (charge) in product storage circuit 16 is shown to the left of each column pair corresponding to the value of A, and the accumulated voltage (charge) in accumulator storage circuit 17 is shown to the right of each column pair corresponding to the value of A. For A=0000, all products and accumulated charges are zero, resulting in a zero accumulated value.

[0133] For A=0001, the first product stored in product storage circuit 16 is one because B is one and bit zero of A is one. Since product one is shared equally between product storage circuit 16 and accumulator storage circuit 17, accumulator storage circuit 17 stores a relative value of one-half. Thereafter, the product is zero, and the charge in accumulator storage circuit 17 drops by half each time it is shared with the charge in product storage circuit 16, so that the charge is reduced to one-quarter in cycle two, one-eighth in cycle three, and one-sixteenth in cycle four. Since A has four bits, the accumulated charge is scaled by a factor of sixteen, producing a product equal to one-sixteenth or 0001 (decimal 1).

[0134] For A=0010, the first product is zero because bit zero of A is zero, making the value of the first accumulation zero. The second product (bit one of A) is one and the corresponding accumulated relative charge is one-half because the product charge is shared equally between product storage circuit 16 and accumulator storage circuit 17. Thereafter, the product is zero because the bits of A are zero and the charge in accumulator storage circuit 17 drops by half each time it is shared with the charge in product storage circuit 16, reducing the charge to one-quarter in cycle three and to one-eighth in cycle four. The accumulated charge is scaled by a factor of sixteen, producing a product equal to one-eighth or 0010 (decimal 2).

[0135] For A=0011, the first product is one and the first accumulated value is one-half because the charge is shared equally between product storage circuit 16 and accumulator storage circuit 17. The second product (bit one of A) is one and the corresponding accumulated relative charge is three-quarters because the charge one in product storage circuit 16 is shared equally with the charge one-half in accumulator storage circuit 17. Thereafter, the product is zero and the charge in accumulator storage circuit 17 drops by half each time it is shared with the charge in product storage circuit 16, reducing the charge to three-eighths in cycle three and to three-sixteenths in cycle four. The accumulated charge is scaled by a factor of sixteen, producing a product equal to three-sixteenths times sixteenths, or 0011 (decimal 3).

[0136] For A=0100, the first product is zero and the first accumulated value is zero. The second product is also zero because bit one of A is zero, so the second accumulated value is zero. The third product (bit two of A in loop three) is one, and the corresponding accumulated relative charge is one-half because the charge is shared equally between product storage circuit 16 storing one and accumulator storage circuit 17 storing zero. Thereafter, the product is zero, and the charge in accumulator storage circuit 17 drops by half each time it is shared with the charge in product storage circuit 16, reducing the charge to one-quarter in loop four. The accumulated charge is scaled by sixteen, producing a product equal to one-quarter times sixteen, or 0100 (decimal 4).

[0137] For A=0101, the first product is one and the first accumulated value is one-half because the charge is shared equally between product storage circuit 16 and accumulator storage circuit 17 for the relative value of one-half. The second product (cycle two) is zero because bit one of A is zero, so the accumulated value is the average of zero and one-half, which is equal to one-quarter. The third product (cycle three) is one because bit two of A is one, so the accumulated value is the average of one-quarter and one, which is equal to five-eighths. The fourth product (cycle four) is zero because bit three of A is zero, so the accumulated value is the average of zero and five-eighths, which is equal to five-sixteenths. After scaling by sixteenth times, a product equal to five-sixteenths times sixteenth times or 0101 (decimal 5) is produced.

[0138] For A=0110, the first product is zero and the first accumulated value is zero. The second product (loop two) is zero because bit one of A is zero, so the accumulated value is the average of zero and one, which is equal to one-half. The third product (loop three) is one because bit two of A is one, so the accumulated value is the average of one and one-half, which is equal to three-quarters. The fourth product (loop four) is zero because bit three of A is zero, so the accumulated value is the average of zero and three-quarters, which is equal to three-eighths. After scaling by sixteen times, a product equal to three-eighths times sixteen or 0110 (decimal 6) is produced.

[0139] For A=0111, the first product is one, and the first accumulated value is one-half. The second product (loop two) is one, because bit one of A is one, so the accumulated value is the average of one and one-half, which is equal to three-quarters. The third product (loop three) is one, because bit two of A is one, so the accumulated value is the average of one and three-quarters, which is equal to seven-eighths. The fourth product (loop four) is zero, because bit three of A is zero, so the accumulated value is zero and the average of seven-eighths, which is equal to seven-sixteenths. After scaling by sixteenth times, a product equal to seven-sixteenths times sixteenths or 0111 (decimal 7) is produced.

[0140] Fig.26B The result of the accumulation for the values ​​1000 to 1111 is shown. The accumulated product is Fig.26A is the same as shown in , except that the final bit product is one, so the accumulated values ​​of loop three are averaged with one to provide a final result, such as Fig.26B as shown in .

[0141] Figures 25 to 26B The iterative accumulation of charge for the bit multiplication of a single bit B by a multi-bit value A is revealed mathematically as Figures 16 to 19 By repeating this process for each bit of the multi-bit value B (as shown in Fig. 20 and Fig.21), two multi-bit values ​​can be calculated at high speed and low power.

[0142] The calculation can be summarized mathematically. Given a bit B and a multi-bit value A having N bits, where A(i) is bit i of the multi-bit value A, the first bit (least significant bit or LSB) is A(0), i=0, and the last bit (most significant bit or MSB) is A(N-1), the accumulated product is:

[0143]

[0144] In the following embodiment, where a multi-bit value B having M bits and the first bit (least significant bit) is B(0) and the last bit (most significant bit or MSB) is B(M-1), multiplied by a multi-bit value A having N bits and the first bit (least significant bit) is A(0), i=0, and the last bit (most significant bit or MSB) is A(N-1), the accumulated product of A x B is:

[0145]

[0146] If B(j) is equal to 0, the summation for i does not need to be completed, saving computational time and energy.

[0147] The embodiments of the present disclosure are not limited to the specific examples illustrated in the figures and described herein. It should be readily understood by those skilled in the art that various implementations of analog and digital circuits may be employed to implement the described operations and such implementations are included in the embodiments of the present disclosure.

[0148] Embodiments of the present disclosure may be used in neural networks, pattern matching computers, or machine learning computers, and provide efficient and timely processing with reduced power and hardware requirements. Such embodiments may include computing accelerators, such as neural network accelerators, pattern matching accelerators, machine learning accelerators, or artificial intelligence computing accelerators designed for static or dynamic processing workloads.

[0149] Although certain implementations of the embodiments have been described, it is now apparent to those skilled in the art that other implementations incorporating the concepts of the present disclosure may be used. Therefore, the present disclosure should not be limited to certain implementations, but should be limited only by the spirit and scope of the following claims.

[0150] Throughout the description, where devices and systems are described as having, including, or comprising specific elements, or where processes and methods are described as having, including, or comprising specific steps, it can be envisioned that, in addition, the devices and systems of the disclosed technology are essentially composed of or consist of the elements, and the processes and methods according to the disclosed technology are essentially composed of or consist of the processing steps.

[0151] It should be understood that the order or sequence of steps used to perform certain actions is immaterial as long as the disclosed technology remains operable. Moreover, two or more steps or actions may be performed simultaneously in some cases. The present disclosure has been described in detail with particular reference to certain embodiments thereof, but it should be understood that variations and modifications may be made within the spirit and scope of the following claims.

[0152] Reference numerals list

[0153] C Clear Circuit

[0154] M multiplier circuit / multiplier

[0155] O Output value

[0156] P Product

[0157] S switch / switching circuit

[0158] VM voltage multiplier

[0159] 10QMAC / single-bit multiplication and accumulation circuit

[0160] 11iqmac / iterative single-bit multiplication and accumulation circuit

[0161] 12 Single-bit storage element

[0162] 13 Multi-bit memory elements

[0163] 14-bit multiplier / bit multiplication circuit

[0164] 15,15A,15B series switch circuit

[0165] 16 Capacitors / Analog storage circuits / Product storage circuits

[0166] 17 Capacitor / Analog Storage Circuit / Accumulator Storage Circuit

[0167] 18 Switches / Switching Circuits

[0168] 19 Clear / Clear Circuit

[0169] 20 Mixed multiplication and accumulation circuit

[0170] 21 Product Column

[0171] 22 Hybrid Multi-bit Multiplier

[0172] 24 Hybrid Matrix Multiplication Accumulation Circuit

[0173] 30 Analog-to-digital converter

[0174] 32-bit digital accumulator

[0175] 34 Accumulated digital storage circuit

[0176] 36 State Machine and Digital Shift Circuit

[0177] 40 Operational amplifier / op amp

[0178] 50 Multiplexer

[0179] 51 Demultiplexer

[0180] 52 Digital shift accumulator

[0181] 54 Adder

[0182] 56 registers / memory

[0183] 60 Totalizer switch

[0184] 70 Control circuit

[0185] 100 provide qmac steps

[0186] 102 Provide A and B value steps

[0187] 105 Set the B bit count to M=0 step

[0188] 108 Select B bit M step

[0189] 110 Clear C M and C A step

[0190] 115 Set the A bit count to N=0 step

[0191] 120 Select A bit N step

[0192] 125 Set the switch to multiplication mode Steps

[0193] 130 Multiply the bits N and store the product step

[0194] 135 Set the switch to accumulation mode Steps

[0195] 140 Accumulation product steps

[0196] 145 Steps to test all multiplied A bits

[0197] 150 Set the A bit count N to N+1 step

[0198] 155 Analog-to-digital conversion steps

[0199] 160 Steps to test all multiplied B bits

[0200] 165Store bit product steps

[0201] 170 Set the B bit count M to M+1 step

[0202] 175 Steps for summing the bit product M

[0203] 200 Multiply multi-bit values ​​by single-bit steps

Claims

1. A time-sharing multiplication-accumulation circuit comprising: Product storage circuit; a multiplication circuit operable to receive a first input value, receive a second input value, generate a product of the first input value and the second input value, and store the product in the product storage circuit; An accumulator storage circuit, used for storing the accumulated value; as well as An accumulation switch connects the product storage circuit to the accumulator storage circuit, the accumulation switch being operable to electrically connect the product storage circuit in parallel with the accumulator storage circuit or to electrically disconnect the product storage circuit from the accumulator storage circuit.

2. The time-shared multiply-accumulate circuit of claim 1 , comprising a first multiplexer, the first multiplexer being operable to: select one of a plurality of first input values ​​input to the first multiplexer, and wherein, The multiplication circuit is operable to receive the selected one of the plurality of first input values ​​from the first multiplexer; receiving the second input value; and generating a product of the selected one of the plurality of first input values ​​and the second input value.

3. The time-shared multiply-accumulate circuit of claim 2, comprising a second multiplexer, the second multiplexer being operable to: select one of a plurality of second input values ​​input to the second multiplexer, and wherein, The multiplication circuit is operable to receive the selected one of the second input values ​​from the second multiplexer; The sum generates a product of the selected one of the plurality of first input values ​​and the selected one of the second input values.

4. A time-shared multiplication-accumulation circuit according to any one of the preceding claims, wherein: The product storage circuit and the accumulator storage circuit are analog storage circuits that store electric charge.

5. The time-sharing multiplication-accumulation circuit according to claim 4, wherein: The product storage circuit and the accumulator storage circuit are capacitors.

6. A time-shared multiplication-accumulation circuit according to any one of the preceding claims, wherein: The multiplication circuit is a single-bit multiplication circuit.

7. A time-shared multiplication-accumulation circuit according to any one of the preceding claims, wherein: The multiplication circuit includes series switch circuits connected in series.

8. The time-sharing multiplication-accumulation circuit according to claim 7, wherein: The accumulation switch is a series switch circuit connected in series with the series switch circuit of the multiplication circuit.

9. The time-sharing multiplication-accumulation circuit according to claim 7 or claim 8, wherein: The multiplication circuit includes series switch circuits connected in series, and wherein one or more of the series switch circuits of the multiplication circuit and the accumulation switch are differential switches.

10. A time-shared multiplication-accumulation circuit according to any one of the preceding claims, wherein: Operating the accumulation switch to connect the product storage circuit and the accumulator storage circuit in parallel combines the accumulated value in the accumulator storage circuit with the product in the product storage circuit to provide a combined value stored in the product storage circuit and in the accumulator storage circuit.

11. A time-shared multiplication-accumulation circuit according to any one of the above claims, comprising a control circuit, which is operable to sequentially (i) provide a first input value and a second input value to the multiplier and switch the accumulation switch so that the product is stored in the product storage circuit; and (ii) switch the accumulation switch so as to electrically connect the product storage circuit and the accumulator storage circuit in parallel, and combine the product in the product storage circuit with the accumulated value to provide a combined value stored in the product storage circuit and in the accumulator storage circuit.

12. A hybrid matrix multiplier, comprising: A time-shared multiply-accumulate circuit according to any one of the preceding claims; An adder is used to add the accumulated values ​​of the time-shared multiplication-accumulation circuit.

13. The hybrid matrix multiplier according to claim 12, wherein: The accumulated value is an analog value and includes an analog-to-digital converter for converting the accumulated value into a digital value, and wherein the adder is a digital adder.

14. The hybrid matrix multiplier according to claim 12, wherein: The accumulated value is an analog value, and wherein the adder is an analog adder.

15. A hybrid method for matrix multiplication, comprising: a) providing a multi-bit value having N bits; b) providing a time-shared iterative multiplication-accumulation circuit according to any one of claims 1 to 11; c) providing an input bit of the multi-bit value, providing a second input bit to the multiplier, and setting the accumulation switch to connect the product storage circuit to the time-shared multiply-accumulate circuit and disconnect the product storage circuit from the accumulator storage circuit; d) multiplying the input bits of the multi-bit value by the second input bits to form a bit product stored in the product storage circuit; e) switching the accumulation switch to disconnect the product storage circuit from the time-shared multiply-accumulate circuit and connect the product storage circuit to the accumulator storage circuit and combine the product in the product storage circuit with the accumulated value to produce a combined value in the accumulator storage circuit; as well as f) Repeating steps c)-e) N times until all bits of the multi-bit value are provided in bit order, thereby generating a product of the multi-bit value and the second input bit.

16. A hybrid method for matrix multiplication, comprising: a) providing a first multi-bit value having N bits and a second multi-bit value having M bits; b) providing M time-sharing multiplication-accumulation circuits according to any one of claims 1 to 11; c) providing an input bit of the first multi-bit value and providing a different second input bit of the second multi-bit value to the multiplier of each of the M time-shared multiply-accumulate circuits, and setting the accumulation switch to connect the product storage circuit to the time-shared multiply-accumulate circuit and disconnect the product storage circuit from the accumulator storage circuit of each of the M time-shared multiply-accumulate circuits; d) multiplying the input bits of the multi-bit value by the second input bits to form a bit product stored in the product storage circuit through each of the M time-shared multiply-accumulate circuits; e) switching the accumulation switch to disconnect the product storage circuit from the time-shared multiplication-accumulation circuit and connect the product storage circuit to the accumulator storage circuit, and combining the product in the product storage circuit with the accumulated value to produce a combined value in the accumulator storage circuit of each of the M time-shared multiplication-accumulation circuits; f) repeating steps c)-e) for each of said N bits of said first multi-bit value until all bits of said first multi-bit value are provided in bit order; g) scaling the accumulated value of each of the M time-shared multiplication-accumulation circuits; as well as h) adding the accumulated values ​​of each of the M scaled time-shared multiply-accumulate circuits to produce a product.

17. A hybrid method for matrix multiplication, comprising: a) providing a first multi-bit value having N bits and a second multi-bit value having M bits; b) providing a time-sharing multiplication-accumulation circuit according to any one of claims 1 to 11; c) providing an input bit of the first multi-bit value and providing a second input bit of the second multi-bit value to the multiplier, and setting the accumulation switch to connect the product storage circuit to the time-shared multiply-accumulate circuit and to disconnect the product storage circuit from the accumulator storage circuit of the time-shared multiply-accumulate circuit; d) multiplying the input bits of the first multi-bit value by the second input bits of the second multi-bit value to form a bit product stored in the product storage circuit; e) switching the accumulation switch to disconnect the product storage circuit from the time-shared multiplication-accumulation circuit and connect the product storage circuit to the accumulator storage circuit, and combining the product in the product storage circuit with the accumulated value to produce a combined value in the accumulator storage circuit of each of the M time-shared multiplication-accumulation circuits; f) repeating steps c)-e) for each of said N bits of said first multi-bit value until all bits of said first multi-bit value are provided in bit order; g) scaling the accumulated value of the time-shared multiply-accumulate circuit to produce a scaled value; h) adding the scaled value to the multi-bit product; as well as i) Repeat steps c)-h) to generate a multi-bit product.

18. A hybrid matrix multiplier, comprising: The time-sharing multiplication-accumulation circuit according to any one of claims 1 to 11; a memory circuit for storing the accumulated value; A control circuit operable to: c) repeatedly and sequentially (i) providing a first input value and providing a second input value to the multiplier, setting the accumulation switch to connect the product storage circuit to the multiplier and disconnect the product storage circuit from the accumulator storage circuit, and (ii) switching the accumulation switch to electrically disconnect the product storage circuit from the time-sharing multiply-accumulate circuit and electrically connect the product storage circuit to the accumulator storage circuit, thereby combining the product in the product storage circuit with the accumulated value, and providing a combined value stored in the accumulator storage circuit and the product storage circuit; and d) Storing the accumulated value in a memory circuit.

19. The hybrid matrix multiplier according to claim 18, comprising memory circuits, each memory circuit being configured to store an accumulated value; and an adder for adding the accumulated values ​​in the memory circuit, in, The control circuit is operable to provide different first input values ​​and to provide different second input values ​​and to store accumulated values ​​in each memory circuit.

20. A time-sharing multiplication-accumulation circuit, comprising: a multiplication circuit operable to receive a first input value, receive a second input value, and generate a product of the first input value and the second input value; an accumulated digital storage circuit operable to store accumulated digital values; as well as a digital bit accumulator operable to receive the product, combine the product with the accumulated digital value stored in the accumulation digital storage circuit, and output the accumulated digital value, Wherein, combining the product with the accumulated digital value comprises (i) storing a value in the accumulated digital storage circuit if the product is one and the accumulated digital value is zero; (ii) maintaining the same accumulated digital value if the product is one and the accumulated digital value is non-zero, or (iii) scaling the accumulated digital value by a factor of two if the product is zero.

21. The time-sharing multiplication-accumulation circuit according to claim 20, comprising: a product storage circuit operable to receive the product; and a one-bit analog-to-digital converter connected to the product storage circuit and to the digital bit accumulator; Wherein, the product storage circuit is operable to provide the product to the one-bit analog-to-digital converter, and the one-bit analog-to-digital converter is operable to receive the product, convert the product into a digital bit product, and provide the digital bit product to the digital bit accumulator.