Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7586441B2 - Multiply-and-accumulate unit - Google Patents
[go: Go Back, main page]

JP7586441B2 - Multiply-and-accumulate unit - Google Patents

Multiply-and-accumulate unit Download PDF

Info

Publication number
JP7586441B2
JP7586441B2 JP2022503180A JP2022503180A JP7586441B2 JP 7586441 B2 JP7586441 B2 JP 7586441B2 JP 2022503180 A JP2022503180 A JP 2022503180A JP 2022503180 A JP2022503180 A JP 2022503180A JP 7586441 B2 JP7586441 B2 JP 7586441B2
Authority
JP
Japan
Prior art keywords
digital
analog
multiply
output
conversion unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2022503180A
Other languages
Japanese (ja)
Other versions
JPWO2021171880A1 (en
Inventor
昭 松澤
正也 野原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TECH IDEA CO., LTD.
Original Assignee
TECH IDEA CO., LTD.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TECH IDEA CO., LTD. filed Critical TECH IDEA CO., LTD.
Publication of JPWO2021171880A1 publication Critical patent/JPWO2021171880A1/ja
Application granted granted Critical
Publication of JP7586441B2 publication Critical patent/JP7586441B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/05Digital input using the sampling of an analogue quantity at regular intervals of time, input from a/d converter or output to d/a converter
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06GANALOGUE COMPUTERS
    • G06G7/00Devices in which the computing operation is performed by varying electric or magnetic quantities
    • G06G7/48Analogue computers for specific processes, systems or devices, e.g. simulators
    • G06G7/60Analogue computers for specific processes, systems or devices, e.g. simulators for living beings, e.g. their nervous systems ; for problems in the medical field
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M1/00Analogue/digital conversion; Digital/analogue conversion
    • H03M1/66Digital/analogue converters
    • H03M1/68Digital/analogue converters with conversions of different sensitivity, i.e. one conversion relating to the more significant digital bits and another conversion to the less significant bits
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M1/00Analogue/digital conversion; Digital/analogue conversion
    • H03M1/66Digital/analogue converters
    • H03M1/74Simultaneous conversion
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M1/00Analogue/digital conversion; Digital/analogue conversion
    • H03M1/66Digital/analogue converters
    • H03M1/74Simultaneous conversion
    • H03M1/78Simultaneous conversion using ladder network

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Pure & Applied Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Mathematical Optimization (AREA)
  • Computational Mathematics (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Mathematical Analysis (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Neurology (AREA)
  • Neurosurgery (AREA)
  • Physiology (AREA)
  • Human Computer Interaction (AREA)
  • Analogue/Digital Conversion (AREA)
  • Complex Calculations (AREA)

Description

本発明は、積和演算器に関する。より詳しくは、デジタル・アナログ変換器(Digital to Analog Converter;DAC)と、アナログ・デジタル変換器(Analog to Digital Converter;ADC)を用いた積和演算器に関する。The present invention relates to a multiply-and-accumulate calculator. More specifically, the present invention relates to a multiply-and-accumulate calculator using a digital-to-analog converter (DAC) and an analog-to-digital converter (ADC).

デジタル演算は積和演算を基本とする。また、近年開発競争が激しいAIプロセッサではニューロ演算を行う。図15はAIプロセッサにおけるニューロ演算の概念図である。なお、ニューロ演算では多数のレイヤーを必要とするが、図15においては、基本となる入力層(Input layer)、隠れ層(Hidden Layer)及び出力層(Output layer)のみを示している。Digital calculations are based on product-sum calculations. Furthermore, AI processors, which have been the subject of fierce competition in recent years, use neurocalculation. Figure 15 is a conceptual diagram of neurocalculation in an AI processor. Note that neurocalculation requires multiple layers, but Figure 15 only shows the basic input layer, hidden layer, and output layer.

図15に示すように、ニューロ演算における各層間では積和演算が行われている。その一例として、入力層と隠れ層間の演算を示す。入力層のベクトルをX、結合係数行列をW(0)とすると、隠れ層のベクトルYは、下記数式1により表される。 As shown in Fig. 15, product-sum operations are performed between each layer in neuro-operation. As an example, the operation between the input layer and the hidden layer is shown below. If the input layer vector is X and the connection coefficient matrix is W (0) , the hidden layer vector Y is expressed by the following formula 1.

Figure 0007586441000001
Figure 0007586441000001

上記数式1において出力層の1つの要素yに着目した場合下記数式2で表され、積和演算処理を行っていることがわかる。

Figure 0007586441000002
When one element yj of the output layer in the above formula 1 is focused on, it is expressed by the following formula 2, and it can be seen that a product-sum operation process is performed.
Figure 0007586441000002

ニューロプロセッサでは、各レイヤーのノード数がNのとき、各レイヤーにおいてNの積和演算が必要となる。例えば、画素数が100×100の画像認識では、N=10、N=10となり、1レイヤーにつき1億回もの積和演算が必要となる。このため、ニューロプロセッサは、演算速度を上げると共に、演算の消費エネルギーを下げることが喫緊の課題となっている。 In a neuroprocessor, when the number of nodes in each layer is N, N2 product-sum operations are required in each layer. For example, in image recognition with 100 x 100 pixels, N = 104 , N2 = 108 , and 100 million product-sum operations are required per layer. For this reason, it is an urgent task for neuroprocessors to increase the operation speed while reducing the energy consumption of operations.

図16はデジタル回路を用いた従来の積和演算器の構成を示す図である。図16に示すように、従来の代表的なデジタル積和演算器では、入力Xはバスを通じて各フリップフロップ(F/F)に入力される。また、図16に示す積和演算器では、乗算器(MUL)が2次元的に配置されており、各乗算器には入力Xの各要素及び入力Wの各要素が入力され、乗算器において入力Xの各要素と入力Wの各要素の乗算が行われる。そして、乗算出力は、バスを通じて加算器(ADD)に順次入力され、累積加算が行われる。 Figure 16 is a diagram showing the configuration of a conventional multiply-accumulate calculator using digital circuits. As shown in Figure 16, in a typical conventional digital multiply-accumulate calculator, input X is input to each flip-flop (F/F) via a bus. Also, in the multiply-accumulate calculator shown in Figure 16, multipliers (MUL) are arranged two-dimensionally, and each element of input X and each element of input W are input to each multiplier, and each element of input X is multiplied by each element of input W in the multiplier. The multiplication outputs are then input sequentially to adders (ADD) via a bus, where cumulative addition is performed.

K. Uenishi, et al., “FPGA Implementation of a Scalable and Highly Parallel Architecture for Restricted Boltzmann Machines,” Circuits and Systems, 2016, 7, 2132-2141, Scientific Research Publishing.K. Uenishi, et al., “FPGA Implementation of a Scalable and Highly Parallel Architecture for Restricted Boltzmann Machines,” Circuits and Systems, 2016, 7, 2132-2141, Scientific Research Publishing.

しかしながら、前述した従来のデジタル積和演算器は、乗算器の演算速度と消費エネルギー、累積加算の演算速度と消費エネルギーに問題がある。特に、累積加算器は、乗算器の出力がバスを通じて順次累積加算器に送られるため、演算速度が遅く、消費エネルギーが大きいという課題がある。However, the conventional digital multiply-and-accumulate unit described above has problems with the operation speed and energy consumption of the multiplier, and the operation speed and energy consumption of the cumulative adder. In particular, the cumulative adder has issues with its slow operation speed and large energy consumption because the output of the multiplier is sent to the cumulative adder sequentially via a bus.

そこで、本発明は、演算速度が速く、かつ消費エネルギーが小さい積和演算器を提供することを目的とする。Therefore, the present invention aims to provide a multiply-and-accumulate calculator that has a high calculation speed and low energy consumption.

本発明者は、前述した課題を解決するため、鋭意実験検討を行った結果、以下に示す知見を得た。アナログ演算は物理現象を用いており、一瞬かつ低消費エネルギーで演算結果が得られる可能性がある。しかしながら、アナログ演算は、デジタル演算に比べて演算精度が不十分であることから、従来殆ど用いられていなかった。一方、ニューロプロセッサの積和演算では、殆どの用途において8ビット程度の精度で十分であるとされていることから、本発明者はアナログ演算の適用について検討を行った。 The inventors conducted extensive experimental studies to solve the above-mentioned problems, and as a result, have arrived at the following findings. Analog calculations use physical phenomena, and it is possible to obtain calculation results instantly and with low energy consumption. However, analog calculations have been rarely used in the past, as their calculation accuracy is insufficient compared to digital calculations. On the other hand, for multiply-and-accumulate calculations in neuroprocessors, an accuracy of around 8 bits is considered sufficient for most applications, and so the inventors have investigated the application of analog calculations.

その結果、抵抗型デジタル・アナログ変換器(RDAC)のような電圧出力のDACで入力Xに比例する電圧を発生させ、この電圧をアナログ入力として行列の各要素Wのデジタル値に対応した容量比を入出力端子間及び出力端子と接地間に設定する容量型DACを用いることで、その出力電圧Yが入力Xと行列の各要素Wの積になることを見出した。この構成を採用すれば、8ビット精度を実現する容量が4fF程度と極めて小さくなり、デジタル乗算器とは異なりキャリー伝搬が生じないため、高速かつ低消費エネルギーで動作させることができる。As a result, they found that by using a voltage output DAC such as a resistive digital-to-analog converter (RDAC) to generate a voltage proportional to the input X, and then using a capacitive DAC in which a capacitance ratio corresponding to the digital value of each matrix element W is set between the input/output terminals and between the output terminal and ground with this voltage as the analog input, the output voltage Y becomes the product of the input X and each matrix element W. By adopting this configuration, the capacitance required to achieve 8-bit accuracy is extremely small at around 4fF, and since carry propagation does not occur, unlike in a digital multiplier, it can be operated at high speed with low energy consumption.

更に、容量型DAC列の各出力端を共通に接続したノードの電圧は、電荷保存則により加算した値となるため、エネルギーを殆ど消費せずに一瞬で複数入力の加算が可能となる。具体的には、100並列の加算であれば一瞬で終了する。この電圧は、ADCでデジタル値に変換される。このように、本発明者は、入出力はデジタル値であるが、乗算及び加算演算はアナログで行うことにより、高速かつ低エネルギーで積和演算ができる方法も見出し、本発明に至った。 Furthermore, the voltage at the node where the output terminals of the capacitive DAC string are commonly connected is the sum of the voltages due to the law of conservation of charge, making it possible to add multiple inputs instantly with almost no energy consumption. Specifically, adding 100 inputs in parallel is completed in an instant. This voltage is converted to a digital value by the ADC. In this way, the inventor has discovered a method for performing multiply-and-add operations at high speed and with low energy by performing multiplication and addition operations in analog while the input and output are digital values, which led to the present invention.

即ち、本発明に係る積和演算器は、複数のデジタル・アナログ変換器で構成され、複数のデジタル値を各要素とするベクトル及び複数のデジタル値を各要素とする行列が入力され、前記ベクトルの各要素のデジタル値をアナログ電圧に変換する電圧出力デジタル・アナログ変換部と、複数のデジタル・アナログ変換器で構成され、前記電圧出力デジタル・アナログ変換器列の各出力電圧が入力され、前記行列の各要素のデジタル値に対応した容量比が入出力端子間及び出力端子と接地間に設定される容量型デジタル・アナログ変換部と、複数のアナログ・デジタル変換器で構成され、前記容量型デジタル・アナログ変換部の各出力端に共通に接続されたノードの電圧がアナログ入力され、デジタル値に変換されるアナログ・デジタル変換部と、を有し、前記アナログ・デジタル変換部の出力を出力ベクトルとするものである。
本発明の積和演算器において、前記複数のデジタル値を各要素とする行列は1次元ベクトルであり、前記電圧出力デジタル・アナログ変換部の各デジタル・アナログ変換器からの出力値を、第1のベクトルと前記1次元ベクトルとの内積としてもよい。
本発明の積和演算器は、前記容量型デジタル・アナログ変換部は差動信号を出力し、前記アナログ・デジタル変換部の各アナログ・デジタル変換器には、前記容量型デジタル・アナログ変換部の各出力端に共通に接続された一対のノードの差動電圧がアナログ入力され、デジタル値に変換してもよい。
その場合、前記アナログ・デジタル変換部の各アナログ・デジタル変換器は、前記一対のノードの差動電圧を一対の容量にサンプリングし、前記一対の容量の端子間を短絡することで同相信号を抽出し、前記一対のノードの差動電圧から差し引くことで同相成分をキャンセルすることができる。
又は、前記容量型デジタル・アナログ変換部は、出力に対して2進重み付け容量を用いて各要素のデジタル値に対応した容量比を入出力端子間及び出力端子と接地間に設定してもよい。
また、本発明の積和演算器は、前記電圧出力デジタル・アナログ変換部を構成する各デジタル・アナログ変換器に重み付け抵抗を用いてもよい。
その場合、前記電圧出力デジタル・アナログ変換部を構成する各デジタル・アナログ変換器は、例えば、上位数ビットはサーモメータコードを用いた等しい抵抗で構成し、残りの下位ビットは2進で重み付けされたR-2R梯子型の抵抗を用いることができる。
又は、前記電圧出力デジタル・アナログ変換部を構成する各デジタル・アナログ変換器は、最小ビットの抵抗の接地端への接続が開放可能となっていてもよい。
一方、本発明の積和演算器は、前記電圧出力デジタル・アナログ変換部及び前記容量型デジタル・アナログ変換部の入力データがメモリセルに保存されており、その論理状態をセンスするセンスアンプの出力から得ることもできる。
その場合、前記メモリセルへの入力データを差動形式とし、振幅が電源電圧よりも低い低振幅バスを用いて伝送し、前記センスアンプでより大きい振幅に変換されて前記メモリセルのビットラインを駆動してもよい。
前記メモリセルは例えばSRAMとすることができる。
又は、前記メモリセルが不揮発性でもよく、例えば不揮発性のメモリセルとしてMRAMを用いることもできる。
That is, the product-sum calculator according to the present invention comprises: a voltage output digital-to-analog conversion unit which is composed of a plurality of digital-to-analog converters and receives as input a vector having a plurality of digital values as elements and a matrix having a plurality of digital values as elements and converts the digital value of each element of the vector into an analog voltage; a capacitive digital-to-analog conversion unit which is composed of a plurality of digital-to-analog converters and receives as input each output voltage of the voltage output digital-to-analog converter string and sets a capacitance ratio between the input/output terminals and between the output terminal and ground corresponding to the digital value of each element of the matrix; and an analog-to-digital conversion unit which is composed of a plurality of analog-to-digital converters and receives as input an analog voltage of a node commonly connected to each output terminal of the capacitive digital-to-analog conversion units and converts it into a digital value, and the output of the analog-to-digital conversion unit is an output vector.
In the multiply-add calculator of the present invention, the matrix having the multiple digital values as elements may be a one-dimensional vector, and the output value from each digital-to-analog converter of the voltage output digital-to-analog conversion unit may be an inner product of a first vector and the one-dimensional vector.
In the product-sum calculator of the present invention, the capacitive digital-to-analog conversion unit outputs a differential signal, and each analog-to-digital converter of the analog-to-digital conversion unit receives an analog input of a differential voltage of a pair of nodes commonly connected to each output end of the capacitive digital-to-analog conversion unit, which is converted into a digital value.
In this case, each analog-to-digital converter in the analog-to-digital conversion section samples the differential voltage of the pair of nodes onto a pair of capacitors, extracts a common-mode signal by shorting the terminals between the pair of capacitors, and cancels the common-mode component by subtracting it from the differential voltage of the pair of nodes.
Alternatively, the capacitive digital-to-analog conversion section may set a capacitance ratio corresponding to the digital value of each element between the input/output terminals and between the output terminal and ground using a binary-weighted capacitance for the output.
Furthermore, the product-sum calculator of the present invention may use weighting resistors in each of the digital-to-analog converters constituting the voltage output digital-to-analog conversion section.
In this case, each digital-to-analog converter constituting the voltage output digital-to-analog conversion unit can be configured, for example, with equal resistances using a thermometer code for the most significant bits, and with binary-weighted R-2R ladder-type resistances for the remaining lower bits.
Alternatively, each digital-to-analog converter constituting the voltage output digital-to-analog conversion section may be configured so that the connection of the least significant bit resistor to the ground terminal can be opened.
Meanwhile, in the multiply-and-accumulate calculator of the present invention, input data to the voltage output digital-to-analog converter and the capacitive digital-to-analog converter are stored in memory cells, and the input data can be obtained from the output of a sense amplifier that senses the logic state.
In this case, input data to the memory cells may be in a differential format, transmitted using a low amplitude bus with an amplitude lower than the power supply voltage, and converted to a larger amplitude by the sense amplifier to drive the bit lines of the memory cells.
The memory cells may be, for example, SRAM.
Alternatively, the memory cells may be non-volatile, for example, MRAM may be used as the non-volatile memory cells.

本発明によれば、アナログ・デジタル変換部の複数のアナログ・デジタル変換器の出力値から出力ベクトルを得て、同時並列的に極めて多くの積和演算ができるため、これまでのデジタル演算器を用いた積和演算器に比べて、低エネルギーで動作し、高速動作が可能な積和演算器を実現することができる。 According to the present invention, an output vector can be obtained from the output values of multiple analog-digital converters in an analog-digital conversion section, and an extremely large number of product-sum operations can be performed simultaneously in parallel, thereby realizing a product-sum operator that operates with lower energy and at higher speeds than conventional product-sum operators that use digital operators.

本発明の第1の実施形態の積和演算器の構成を示す図である。FIG. 2 is a diagram illustrating a configuration of a multiply-add calculator according to the first embodiment of the present invention. Aは図1に示す電圧出力デジタル・アナログ変換部11に用いられる抵抗型DACの回路図であり、Bは電流型DACの回路図である。FIG. 1A is a circuit diagram of a resistance-type DAC used in the voltage output digital-to-analog conversion unit 11 shown in FIG. 1, and FIG. 図1に示す容量型デジタル・アナログ変換部12に用いられるCDACの回路図である。2 is a circuit diagram of a CDAC used in the capacitive digital-to-analog conversion unit 12 shown in FIG. 1 . A及びBはCDACを用いた積和演算の原理を示す回路及びその動作を示す図であり、Aはリセットモードを示し、Bは実行モードを示す。1A and 1B are diagrams showing a circuit illustrating the principle of a product-sum operation using a CDAC and its operation, where A shows a reset mode and B shows an execution mode. 差動構成のCDACの回路図である。FIG. 1 is a circuit diagram of a differential CDAC. 図1に示すアナログ・デジタル変換部13に用いられる逐次比較型ADCの回路図である。2 is a circuit diagram of a successive approximation type ADC used in the analog-to-digital conversion unit 13 shown in FIG. 1 . 図1に示す積和演算器の動作を示すタイミングチャートである。2 is a timing chart showing an operation of the product-sum calculator shown in FIG. 1 . 本発明の第1の実施形態の第1変形例の積和演算器に用いられる逐次比較型ADCの回路図である。FIG. 11 is a circuit diagram of a successive approximation type ADC used in a product-sum calculator according to a first modified example of the first embodiment of the present invention. A~Cは図8に示すSAR ADCのコモンモード電圧の除去方法を示す動作回路図である。9A to 9C are operational circuit diagrams showing a method for removing a common-mode voltage in the SAR ADC shown in FIG. 8. 本発明の第1の実施形態の第2変形例の積和演算器に用いられる抵抗型DACの回路図である。FIG. 11 is a circuit diagram of a resistive DAC used in a product-sum calculator according to a second modified example of the first embodiment of the present invention. 本発明の第1の実施形態の積和演算器において応答速度と消費電力を算出するための等価回路である。2 is an equivalent circuit for calculating the response speed and power consumption in the product-sum calculator according to the first embodiment of the present invention. 本発明の第2の実施形態の積和演算器に用いられるDACへのデータ入力回路を示す図である。FIG. 13 is a diagram showing a data input circuit to a DAC used in a multiply-accumulate calculator according to a second embodiment of the present invention. A及びBは図12に示すメモリセルの回路図であり、Cはセンスアップの回路図である。12. A and B are circuit diagrams of the memory cell shown in FIG. 12, and C is a circuit diagram of the sense amplifier. 図12に示すメモリセルへの入力バスの電圧を示す図である。FIG. 13 is a diagram showing the voltage of the input bus to the memory cell shown in FIG. 12. AIプロセッサにおけるニューロ演算の概念図である。FIG. 1 is a conceptual diagram of neuro-computation in an AI processor. デジタル回路を用いた従来の積和演算器の構成を示す図である。FIG. 1 is a diagram showing a configuration of a conventional multiply-accumulate calculator using a digital circuit.

以下、本発明を実施するための形態について、添付の図面を参照して詳細に説明する。なお、本発明は、以下に説明する実施形態に限定されるものではない。Hereinafter, the embodiment of the present invention will be described in detail with reference to the attached drawings. Note that the present invention is not limited to the embodiment described below.

(第1の実施形態)
先ず、本発明の第1の実施形態に係る積和演算器について説明する。本実施形態の積和演算器は、2つの入力デジタル値列を入力とし、一方の入力は電圧出力デジタル・アナログ変換器(DAC)を用いて電圧列に変換し、他方の入力は容量型デジタル・アナログ変換器(CDAC)に入力する。そして、この積和演算器では、電圧をアナログ入力とするCDACにより乗算を行い、複数のCDACの出力を共通に接続することで同時加算を行い、このノードの電圧を、アナログ・デジタル変換器(ADC)においてアナログ・デジタル変換することでデジタル出力値を得る。
(First embodiment)
First, a multiply-accumulate calculator according to a first embodiment of the present invention will be described. The multiply-accumulate calculator of this embodiment receives two input digital value strings as inputs, one of which is converted to a voltage string using a voltage output digital-to-analog converter (DAC), and the other input is input to a capacitive digital-to-analog converter (CDAC). In this multiply-accumulate calculator, multiplication is performed by a CDAC that uses a voltage as an analog input, and simultaneous addition is performed by connecting the outputs of multiple CDACs in common, and the voltage of this node is analog-to-digital converted in an analog-to-digital converter (ADC) to obtain a digital output value.

図1は本実施形態の積和演算器の構成を示す図である。図1に示すように、本実施形態の積和演算器1には、複数のDACを備える電圧出力デジタル・アナログ変換部11と、複数のCDACを備える容量型デジタル・アナログ変換部12と、複数のADCを備えるアナログ・デジタル変換部13が設けられている。本実施形態の積和演算器1では、複数のデジタル値を各要素とするベクトルXは、それぞれバスを通じて電圧出力デジタル・アナログ変換部11の各DACに入力される。また、行列Wの各要素のデジタル値は、容量型デジタル・アナログ変換部12において2次元に配置された各CDACに入力される。 Figure 1 is a diagram showing the configuration of a multiply-and-accumulate calculator of this embodiment. As shown in Figure 1, the multiply-and-accumulate calculator 1 of this embodiment is provided with a voltage output digital-to-analog conversion unit 11 having multiple DACs, a capacitive digital-to-analog conversion unit 12 having multiple CDACs, and an analog-to-digital conversion unit 13 having multiple ADCs. In the multiply-and-accumulate calculator 1 of this embodiment, a vector X having multiple digital values as each element is input to each DAC of the voltage output digital-to-analog conversion unit 11 via a bus. In addition, the digital values of each element of the matrix W are input to each CDAC arranged two-dimensionally in the capacitive digital-to-analog conversion unit 12.

図2Aは図1に示す電圧出力デジタル・アナログ変換部11に用いられる抵抗型DACの回路図であり、図2Bは電流型DACの回路図である。電圧出力デジタル・アナログ変換部11は、例えば図2Aに示すR-2R抵抗型DACや、図2Bに示すような電流型DACを用いることで実現することができる。インバータの電源電圧をVDD、各インバータの反転入力データをD(Dは0又は1)としたとき、R-2R抵抗型DACの出力電圧Vは下記数式3により表される。 Fig. 2A is a circuit diagram of a resistive DAC used in the voltage output digital-analog conversion unit 11 shown in Fig. 1, and Fig. 2B is a circuit diagram of a current type DAC. The voltage output digital-analog conversion unit 11 can be realized by using, for example, an R-2R resistive DAC as shown in Fig. 2A or a current type DAC as shown in Fig. 2B. When the power supply voltage of the inverter is V DD and the inverted input data of each inverter is D (D is 0 or 1), the output voltage V 0 of the R-2R resistive DAC is expressed by the following formula 3.

Figure 0007586441000003
Figure 0007586441000003

図2Aには分解能4ビットの例を示しているが、この抵抗型DACは、インバータと2種類の抵抗R,2Rしか用いないことから、非常にコンパクトに電圧出力のデジタル・アナログ変換器を実現できる。一方、図2Bに示す電流型DACを用いても電圧出力のデジタル・アナログ変換器を実現できる。この場合、電流源を用い、入力データに応じた電流を負荷抵抗Rに流すことで、電圧出力のデジタル・アナログ変換器を実現できる。 Fig. 2A shows an example of a 4-bit resolution, and because this resistance-type DAC uses only an inverter and two types of resistors R and 2R, it can realize a very compact voltage output digital-to-analog converter. On the other hand, a voltage output digital-to-analog converter can also be realized using a current-type DAC shown in Fig. 2B. In this case, a voltage output digital-to-analog converter can be realized by using a current source to pass a current corresponding to the input data through load resistors R L.

図3は図1に示す容量型デジタル・アナログ変換部12に用いられるCDACの回路図である。容量型デジタル・アナログ変換部12は、例えば図3に示すCDACを用いることができる。このCDACは、入力データDに応じて接地又は入力電圧を選択するスイッチSと、出力端に2進で重み付けされた容量が接続されている。入力電圧をVinとしたとき、出力電圧Voutは、下記数式4により求められる。 Fig. 3 is a circuit diagram of a CDAC used in the capacitive digital-analog conversion unit 12 shown in Fig. 1. The capacitive digital-analog conversion unit 12 can use, for example, the CDAC shown in Fig. 3. This CDAC is connected to a switch S that selects ground or an input voltage according to input data D, and a binary-weighted capacitance at the output terminal. When the input voltage is Vin , the output voltage Vout can be calculated by the following formula 4.

Figure 0007586441000004
Figure 0007586441000004

そして、抵抗型DACの入力ビットをXとし、CDACの入力ビットをWとすると、上記数式3及び上記数式4より、出力電圧Voutは下記数式5で表される。これは、入力値Xと入力値Wの乗算が行われることを示している。 If the input bit of the resistive DAC is Xi and the input bit of the CDAC is Wi , then the output voltage Vout is expressed by the following equation 5 based on the above equations 3 and 4. This indicates that the input value X and the input value W are multiplied.

Figure 0007586441000005
Figure 0007586441000005

次に、アナログ・デジタル変換部13への入力となるCDACの共通接続線における信号の加算性について説明する。図4A,BはCDACを用いた積和演算の原理を示す回路の動作を示す図である。図4A,Bに示すCDACは、1で規格化された入力値Wに比例する容量値WCと、1から入力値Wを引いた容量値(1-W)Cの2つの容量を有し、これらは並列に接続されている。この2つの容量は、それぞれ一方の端子が出力線に共通に接続され、他方の端子は入力電圧又は接地を選択するスイッチS,Sに接続されている。 Next, the additivity of signals in the common connection line of the CDAC, which is the input to the analog-digital conversion unit 13, will be described. Figures 4A and 4B are diagrams showing the operation of a circuit showing the principle of product-sum calculation using a CDAC. The CDAC shown in Figures 4A and 4B has two capacitances, a capacitance value WC proportional to an input value W normalized to 1, and a capacitance value (1-W)C obtained by subtracting the input value W from 1, which are connected in parallel. One terminal of each of these two capacitances is commonly connected to an output line, and the other terminal is connected to switches S a and S b that select an input voltage or ground.

このCDACには、図4Aに示す「リセット」と、図4Bに示す「実行」の2つの動作モードがある。図4Aに示すように、リセットモードでは、全てのスイッチS,Sが接地を選択し、出力線はスイッチSによって接地に接続される。このため、各容量の電荷はゼロにリセットされる。一方、図4Bに示すように、実行モードでは、スイッチSはそのまま接地状態を維持し、スイッチSは入力電圧VDDXを選択する。この時の出力線の電圧をVOSとすると、電荷保存則より下記数式6が成り立つ。 This CDAC has two operation modes: "reset" shown in Fig. 4A and "run" shown in Fig. 4B. As shown in Fig. 4A, in the reset mode, all the switches S a and S b select the ground, and the output line is connected to the ground by the switch S 0. Therefore, the charge of each capacitance is reset to zero. On the other hand, as shown in Fig. 4B, in the run mode, the switch S b remains in the ground state, and the switch S a selects the input voltage V DD X. If the voltage of the output line at this time is V OS , the following formula 6 holds according to the law of conservation of charge.

Figure 0007586441000006
Figure 0007586441000006

上記数式6から電圧Vosを求めると、下記数式7となり、n個のCDACの出力が同時加算されたものとなる。 When the voltage V os is calculated from the above formula 6, the following formula 7 is obtained, and the outputs of n CDACs are added simultaneously.

Figure 0007586441000007
Figure 0007586441000007

また、出力電圧は、自動的に規格化され、0からVDDの間の電圧を取る。 The output voltage is automatically normalized to a voltage between 0 and VDD .

以上のように、電荷保存則という物理現象を用いることで、瞬時に多数の加算が実現できる。しかもCDACを差動構成にすることで、容易に正負の両極性の値を取り扱うことができる。図5は差動構成のCDACの回路図である。図5に示すように、差動構成のCDACの入力信号は、wを下記数式8で表される値を取る両極性の入力信号とし、ηをバイアス値として、これまで用いてきた規格化されたCDACの入力信号Wと下記数式9に示す関係が成立する。As described above, by using the physical phenomenon of conservation of charge, multiple additions can be performed instantaneously. Moreover, by configuring the CDAC differentially, it is possible to easily handle values of both positive and negative polarities. Figure 5 is a circuit diagram of a differential CDAC. As shown in Figure 5, the input signal of the differential CDAC is a bipolar input signal with w taking the value expressed by the following formula 8, and η is a bias value, and the relationship shown in the following formula 9 is established with the input signal W of the standardized CDAC used up to now.

Figure 0007586441000008
Figure 0007586441000008

Figure 0007586441000009
Figure 0007586441000009

バイアス値ηは、0.5のときに最も広い値を取ることができる。差動構成なので、それぞれのCDACに入力される値W,Wは、下記数式10で表される。 The bias value η can take the widest range when it is 0.5. Because of the differential configuration, the values W a and W b input to each CDAC are expressed by the following formula 10.

Figure 0007586441000010
Figure 0007586441000010

このとき、一対の信号線の出力電圧Vos_pは、上記数式7から、下記数式11となる。 At this time, the output voltage V os_p of the pair of signal lines is expressed by the following Equation 11 from Equation 7 above.

Figure 0007586441000011
Figure 0007586441000011

同様に、出力電圧Vos_nは、下記数式12となる。 Similarly, the output voltage Vos_n is given by the following formula 12.

Figure 0007586441000012
Figure 0007586441000012

従って、差動出力Vos_d=Vos_p-Vos_nは、下記数式13となり、バイアス値ηに依存しない正負の両極性信号が得られる。 Therefore, the differential output V os — d =V os — p -V os — n is given by the following formula 13, and a bipolar signal of both positive and negative polarities that is not dependent on the bias value η is obtained.

Figure 0007586441000013
Figure 0007586441000013

差動出力は、電圧Vos_p及び電圧Vos_nをそれぞれアナログ・デジタル変換し、その変換出力値をデジタル減算器で減算してもよいが、差動ADCを用いると、変換出力値自体が差動成分のみを変換したものになるのでより合理的である。 The differential output may be obtained by subjecting the voltages V os_p and V os_n to analog-to-digital conversion and then subtracting the converted output values using a digital subtractor; however, it is more reasonable to use a differential ADC, since the converted output value itself is a conversion of only the differential component.

アナログ・デジタル変換部13には、様々な変換方式のADCを使用することができるが、特にCDACを用いた逐次比較型ADC(Successive Approximation Register ADC;SAR ADC)がコンパクトで消費エネルギーが少なく実用的である。図6はアナログ・デジタル変換部13に用いられるSAR ADCの回路図である。図6に示すSAR ADCでは、スイッチSが閉じられ、スイッチSが入力信号Vinを選択し、スイッチS~Sが入力信号を選択しているとき、比較器の入力端に接続されているCDACの出力端の電荷Qは、Vを比較器のバイアス電圧として、下記数式14で表される。 ADCs of various conversion methods can be used for the analog-digital conversion unit 13, but a successive approximation register ADC (SAR ADC) using a CDAC is particularly compact, consumes less energy, and is practical. Fig. 6 is a circuit diagram of a SAR ADC used for the analog-digital conversion unit 13. In the SAR ADC shown in Fig. 6, when switch S0 is closed, switch S1 selects the input signal Vin , and switches S1 to S5 select the input signal, the charge Qs at the output end of the CDAC connected to the input end of the comparator is expressed by the following formula 14, where Vb is the bias voltage of the comparator.

Figure 0007586441000014
Figure 0007586441000014

一方、スイッチSを開放し、スイッチSが参照電圧Vrefを選択し、スイッチS~S4を制御して、比較器の入力端の電圧をV、αを0から1の任意の値として、αを参照電圧に接続されている容量、残りの1-αを接地に接続されている容量とするとき、電荷保存則よりCDACの出力端の電荷Qは、下記数式15で表される。 On the other hand, when the switch S0 is opened, the switch S1 to S4 selects the reference voltage Vref , and the switches S1 to S4 are controlled to set the voltage at the input end of the comparator to Vx , α to an arbitrary value between 0 and 1, α to be the capacitance connected to the reference voltage, and the remaining 1-α to be the capacitance connected to ground, according to the law of conservation of charge, the charge Qs at the output end of the CDAC is expressed by the following equation 15.

Figure 0007586441000015
Figure 0007586441000015

ここで、比較器の入力電圧V-Vは、下記数式16で表される。 Here, the input voltage V x −V b of the comparator is expressed by the following formula 16.

Figure 0007586441000016
Figure 0007586441000016

つまり、このSAR ADCスイッチでは、スイッチS~S4を制御してαを求め、比較器の入力電圧が0に近づくよう動作させれば、アナログ・デジタル変換が可能になる。 That is, in this SAR ADC switch, if the switches S 1 to S 4 are controlled to obtain α and the input voltage of the comparator is operated so as to approach 0, analog-to-digital conversion becomes possible.

図7は本実施形態の積和演算器の動作を示すタイミングチャートである。図7に示すように、本実施形態の積和演算器では、クロックCLKに同期し、入力信号Dinで示したDACの2つの入力データ値Xと入力データ値Wが入力される。容量型デジタル・アナログ変換部12の各出力端を共通に接続したノードは、短時間の間において接地電位になり、CDACの各容量の電荷はリセットされる。 7 is a timing chart showing the operation of the multiply-and-accumulate calculator of this embodiment. As shown in FIG. 7, in the multiply-and-accumulate calculator of this embodiment, two input data values X and W of the DAC shown by the input signal D in are input in synchronization with the clock CLK. The node commonly connecting the output terminals of the capacitive digital-to-analog conversion unit 12 becomes the ground potential for a short period of time, and the charge of each capacitance of the CDAC is reset.

ノードが解放され、CDACに入力データを与えると、ノードに入力データ値Xと入力データ値Wの内積の和に相当する電圧が出現する。ADCは、このノード電圧をサンプリングし、次にアナログ・デジタル変換動作を行う。出力Doutは、基本的に入力信号Dinに対して2クロック遅れて出力される。 When the node is released and input data is given to the CDAC, a voltage appears at the node that corresponds to the sum of the inner product of the input data value X and the input data value W. The ADC samples this node voltage and then performs an analog-to-digital conversion operation. The output D out is basically output with a delay of two clocks from the input signal D in .

以上詳述したように、本実施形態の積和演算器は、電圧出力デジタル・アナログ変換部と、容量型デジタル・アナログ変換部と、アナログ・デジタル変換部を有し、アナログ・デジタル変換部の出力値を出力ベクトルとしているので、複数のADCの出力値から出力ベクトルを得ることができ、同時並列的に極めて多くの積和演算ができるため、演算の高速化を図れると共に消費電力を低減することができる。その結果、これまでのデジタル演算器を用いた積和演算器に比べて、低エネルギーで動作し、高速動作が可能な積和演算器を実現することができる。本発明者の試算の結果、本実施形態の積和演算器は、8ビットの積和演算において、通常のデジタル積和演算に比べて約1/300程度の低消費エネルギーでの動作が可能であった。As described above in detail, the multiply-and-accumulate calculator of this embodiment has a voltage output digital-to-analog conversion unit, a capacitive digital-to-analog conversion unit, and an analog-to-digital conversion unit, and the output value of the analog-to-digital conversion unit is used as an output vector, so that an output vector can be obtained from the output values of multiple ADCs, and an extremely large number of multiply-and-accumulate operations can be performed simultaneously in parallel, thereby speeding up the operation and reducing power consumption. As a result, a multiply-and-accumulate calculator that operates with low energy and can operate at high speed compared to conventional multiply-and-accumulate calculators using digital calculators can be realized. As a result of the inventor's calculations, the multiply-and-accumulate calculator of this embodiment was able to operate with low energy consumption of about 1/300 compared to normal digital multiply-and-accumulate operations in 8-bit multiply-and-accumulate operations.

(第1の実施形態の第1変形例)
次に、本実施形態の第1の実施形態の積和演算器の性能を向上させるためのいくつかの改善点を述べる。図8は、本発明の第1の実施形態の第1変形例に係る積和演算器に用いられるSAR ADCの回路図である。図6に示すSAR ADCはシングル入力であるので、差動入力には図8に示すSAR ADCの方が適している。図8に示すSAR ADCは、信号に依存したコモン電圧の除去が可能であり、図8において破線で囲んでいる部分が、図6のSAR ADCに対して新規に追加した回路である。
(First Modification of the First Embodiment)
Next, some improvements for improving the performance of the multiply-accumulate calculator of the first embodiment of this invention will be described. Fig. 8 is a circuit diagram of a SAR ADC used in the multiply-accumulate calculator according to the first modification of the first embodiment of the present invention. Since the SAR ADC shown in Fig. 6 is a single input, the SAR ADC shown in Fig. 8 is more suitable for differential input. The SAR ADC shown in Fig. 8 is capable of removing a common voltage that depends on a signal, and the portion surrounded by a dashed line in Fig. 8 is a circuit newly added to the SAR ADC in Fig. 6.

次に、本変形例の動作について説明する。図9A~Cは図8に示すSAR ADCのコモンモード電圧の除去方法を示す動作回路図である。本変形例の積和演算器では、先ず、図9Aに示すように、スイッチSを短絡し、スイッチSは入力信号Vos_p,Vos_nを選択し、新規に追加した容量Cc_p,Cc_nのスイッチSbiasは接地を、スイッチScomは入力信号Vos_p,Vos_nをそれぞれ選択する。 Next, the operation of this modified example will be described. Figures 9A to 9C are operational circuit diagrams showing a method of removing the common mode voltage of the SAR ADC shown in Figure 8. In the multiply-accumulate calculator of this modified example, first, as shown in Figure 9A, switch S0 is shorted, switch Ss selects input signals V os_p and V os_n , and switches S bias of newly added capacitances C c_p and C c_n are grounded, and switch S com selects input signals V os_p and V os_n , respectively.

この状態では、比較器の入力端の電荷Qx_p,Qx_nは、入力信号として上記数式11及び数式12を用いて、下記数式17で表される。 In this state, the charges Q x — p and Q x — n at the input terminals of the comparators are expressed by the following formula 17 using the above formulas 11 and 12 as input signals.

Figure 0007586441000017
Figure 0007586441000017

また、破線で囲んだコモン電圧の除去のためのキャンセル容量Cc_p,Cc_nの容量値はそれぞれCに等しいので、キャンセル容量Cc_p,Cc_nの電荷Qc_p,Qc_nは下記数式18で表される。 Furthermore, the capacitance values of the cancellation capacitances C c_p and C c_n for removing the common voltage enclosed by the dashed line are equal to Cu , and therefore the charges Q c_p and Q c_n of the cancellation capacitances C c_p and C c_n are expressed by the following formula 18.

Figure 0007586441000018
Figure 0007586441000018

次に、図9Bに示すように、スイッチScomを制御して容量Cc_p,Cc_nを短絡すると、上記数式18から、それぞれの電荷は下記数式19で表される。 Next, as shown in FIG. 9B, when the switch S com is controlled to short-circuit the capacitors C c_p and C c_n , from Equation 18 above, each charge is expressed by Equation 19 below.

Figure 0007586441000019
Figure 0007586441000019

次に、図9Cに示すように、スイッチSを開き、スイッチScomは比較器の入力端を選択し、スイッチSbiasは電圧VDDを選択する。比較器の入力端の電荷Qx p,Qx nは、上記数式17及び数式18から数式20で表され、同相成分が除去される。 9C, the switch S0 is opened, the switch Scom selects the input terminal of the comparator, and the switch Sbias selects the voltage V DD . The charges Qxp and Qxn at the input terminal of the comparator are expressed by Equation 20 from Equation 17 and Equation 18 above, and the common-mode component is removed.

Figure 0007586441000020
Figure 0007586441000020

また、比較器の入力端のVx_p,Vx_nは、下記数式21を満たす。 Moreover, V x_p and V x_n of the input terminals of the comparator satisfy the following formula 21.

Figure 0007586441000021
Figure 0007586441000021

これより、Vx_p,Vx_nは、下記数式22となり、電圧の中点が(VDD/2)の理想的な動作を実現できる。 As a result, V x — p and V x — n are given by the following formula 22, and an ideal operation in which the midpoint of the voltage is (V DD /2) can be realized.

Figure 0007586441000022
Figure 0007586441000022

また、差動電圧Vx_p-Vx_nは下記数式23となり、バイアス成分がキャンセルされるため、理想的なアナログ・デジタル変換を実現できる。 Furthermore, the differential voltage V x — p −V x — n is given by the following formula 23, and the bias component is cancelled out, making it possible to realize ideal analog-to-digital conversion.

Figure 0007586441000023
Figure 0007586441000023

(第1の実施形態の第2変形例)
次に、本発明の第1の実施形態の第2変形例について説明する。図10は本変形例の積和演算器に用いられる抵抗型DACの回路図である。図2に示す重み付け抵抗を用いたDACの代わりに、図10に示す上位数ビットをサーモメータコードを用いた等しい抵抗で構成し、残りの下位ビットを2進で重み付けされたR-2R梯子型の抵抗とした抵抗型DACを用いることで、出力抵抗が一定の条件において消費電力を低減することが可能である。
(Second Modification of the First Embodiment)
Next, a second modification of the first embodiment of the present invention will be described. Fig. 10 is a circuit diagram of a resistive DAC used in the product-sum calculator of this modification. Instead of the DAC using weighted resistors shown in Fig. 2, a resistive DAC in which the upper few bits shown in Fig. 10 are configured with equal resistors using a thermometer code and the remaining lower bits are binary-weighted R-2R ladder-type resistors is used, making it possible to reduce power consumption under conditions where the output resistance is constant.

出力抵抗をRとし、サーモメータコードを用いた等しい抵抗で構成した上位ビット数をMとしたとき、この抵抗型DACに流れる平均電流Iaveは、下記数式24で表すことができる。 When the output resistance is R 0 and the number of upper bits configured with equal resistance using a thermometer code is M, the average current I ave flowing through this resistive DAC can be expressed by the following equation 24.

Figure 0007586441000024
Figure 0007586441000024

つまり、M=1のサーモメータコードを用いた等しい抵抗を用いない場合に対し、上位4ビット程度に対しサーモメータコードを用いた等しい抵抗を用いた場合は平均電流を33%程度に低減することができる。従って、本変形例の積和演算器は、動作速度を低下させずに消費電力を低減することができる。また、全てのビットが”1”のときはスイッチSを設け、最小ビットの抵抗の接地端への接続を開放可能にすることで、回路を流れる電流をゼロにすることができるため、更なる低消費電力化に有効である。In other words, when equal resistance using a thermometer code of M=1 is used for the upper 4 bits, the average current can be reduced to about 33% compared to when equal resistance is not used. Therefore, the multiply-accumulate calculator of this modified example can reduce power consumption without reducing the operating speed. In addition, by providing a switch S when all bits are "1" and opening the connection to the ground terminal of the resistor of the least bit, the current flowing through the circuit can be set to zero, which is effective in further reducing power consumption.

〔第1の実施形態及びその変形例で予想される性能〕
次に、前述した積和演算器の性能について説明する。本実施形態の積和演算器は、抵抗型DACとCDACの時間応答と消費電力より消費電力あたりの演算量を求めることができる。先ず初めに、容量値を決定する。CDACの分解能Nにおける量子化ノイズと、容量で規定される熱雑音の関係から、下記数式25が成立する。なお、下記数式25におけるCは容量、VDDはフルスケール電圧、kはボルツマン係数、Tは絶対温度である。
[Expected performance of the first embodiment and its modifications]
Next, the performance of the multiply-and-accumulate calculator described above will be described. The multiply-and-accumulate calculator of this embodiment can calculate the amount of calculation per unit of power consumption from the time response and power consumption of the resistive DAC and CDAC. First, the capacitance value is determined. The following formula 25 is established from the relationship between the quantization noise at the resolution N of the CDAC and the thermal noise defined by the capacitance. In the following formula 25, C is the capacitance, V DD is the full-scale voltage, k is the Boltzmann coefficient, and T is the absolute temperature.

Figure 0007586441000025
Figure 0007586441000025

上記数式25から、容量Cを求めると下記数式26となる。 From the above formula 25, the capacitance C can be calculated as the following formula 26.

Figure 0007586441000026
Figure 0007586441000026

ニューロコンピューティングにおいては、分解能Nは8ビット程度で十分と言われているので、N=8、絶対温度Tを300°K、フルスケール電圧VDDを1.0Vとすると、容量Cは3.45fFとなる。 In neurocomputing, it is said that a resolution N of about 8 bits is sufficient, so if N=8, the absolute temperature T is 300° K, and the full-scale voltage V DD is 1.0 V, then the capacitance C is 3.45 fF.

図11は応答速度と消費電力を算出するための等価回路である。図11に示すように、出力抵抗をRとするとき、応答時定数τは、差動構成によりCDACが2個必要なことと、出力抵抗から見た容量が容量Cを2分割した直列容量であることを考慮すると、下記数式27で表される。 Fig. 11 shows an equivalent circuit for calculating the response speed and power consumption. As shown in Fig. 11, when the output resistance is R 0 , the response time constant τ is expressed by the following formula 27, taking into consideration that two CDACs are required due to the differential configuration and that the capacitance seen from the output resistance is a series capacitance obtained by dividing the capacitance C by two.

Figure 0007586441000027
Figure 0007586441000027

8ビット精度の演算には5τの時間が必要であることを考慮し、上記数式24で表される電流が消費されることから、演算に必要なエネルギーEは、上記数式24におけるMを4以上とし、下記数式28から求められる。具体的には、VDD=1.0Vでは1×10-15(J)、VDD=0.5Vでは0.25×10-15(J)となる。 Considering that a time of 5τ is required for an 8-bit precision operation, and since the current expressed by the above formula 24 is consumed, the energy E D required for the operation can be calculated from the following formula 28, with M in the above formula 24 set to 4 or more. Specifically, when V DD =1.0V, it is 1×10 −15 (J), and when V DD =0.5V, it is 0.25×10 −15 (J).

Figure 0007586441000028
Figure 0007586441000028

演算器の電力効率を表す指標として、TOPS/Wが使用される。演算が乗算と加算の2つの演算を行うことを考慮すると、下記数式29から、VDD=1.0Vでは2000TOPS/W、VDD=0.5Vでは8000TOPS/Wとなる。 TOPS/W is used as an index representing the power efficiency of a computing unit. Considering that the operation involves two operations, multiplication and addition, from the following formula 29, the power efficiency is 2000 TOPS/W when V DD =1.0 V, and 8000 TOPS/W when V DD =0.5 V.

Figure 0007586441000029
Figure 0007586441000029

現行のデジタル方式の8ビット精度の演算器の電力効率は25TOPS/W程度であるので、理論上300倍程度の電力効率が得られる可能性がある。従って、本発明の積和演算器は、従来のデジタル方式の積和演算器に比べて極めて高い電力効率が得られることから、ニューロプロセッサの消費電力を大幅に低減することができる。The power efficiency of current digital 8-bit precision arithmetic units is about 25 TOPs/W, so theoretically it is possible to obtain a power efficiency of about 300 times. Therefore, the multiply-accumulate unit of the present invention has a much higher power efficiency than conventional digital multiply-accumulate units, and can significantly reduce the power consumption of the neuroprocessor.

(第2の実施形態)
次に、本発明の第2の実施形態に係る積和演算器について説明する。本実施形態の積和演算器は、前述した第1の実施形態の積和演算器に対して、電圧型DAC及びCDACに対するデータ入力方法を改良したものである。通常積和演算器に対する入力データはバスを介して行われる。しかしながら、バスは負荷容量が大いためデータ伝送時に消費エネルギーが著しく増大する。また、配線遅延時間が長いため動作速度が遅くなる。このためデータ入力方法を工夫しないと、本発明の積和演算器の持つ低エネルギー性と高速性を活かしきることが困難となる。
Second Embodiment
Next, a multiply-accumulate calculator according to a second embodiment of the present invention will be described. The multiply-accumulate calculator of this embodiment is an improvement over the multiply-accumulate calculator of the first embodiment described above in terms of the data input method for the voltage-type DAC and CDAC. Normally, data is input to the multiply-accumulate calculator via a bus. However, the bus has a large load capacity, so the energy consumption during data transmission increases significantly. In addition, the operation speed is slowed down due to the long wiring delay time. For this reason, unless the data input method is devised, it is difficult to fully utilize the low energy and high speed characteristics of the multiply-accumulate calculator of the present invention.

そこで、本実施形態の積和演算器は、電圧型DAC及びCDACに対するデータはバスを介さずにメモリから直接入力する。図12は本実施形態の積和演算器に用いられるDACへのデータ入力回路を示す図である。図12に示すデータ入力回路を設けることで、DACに対して低エネルギーかつ高速なデータ入力が可能となる。Therefore, in the multiply-and-accumulate calculator of this embodiment, data for the voltage-type DAC and CDAC is input directly from the memory without going through a bus. Figure 12 is a diagram showing a data input circuit to the DAC used in the multiply-and-accumulate calculator of this embodiment. Providing the data input circuit shown in Figure 12 enables low-energy and high-speed data input to the DAC.

図13A,Bは図12に示すメモリセルの回路図であり、図13Cはセンスアップの回路図である。図13AはSRAMメモリセルである。SRAMメモリセルは、ロジックプロセスで作製できるため、集積が容易である。図13Bは不揮発性メモリセルである。不揮発性メモリセルは、抵抗値を変化させたものが多く、磁性薄膜を用いたMRAMや相変化を用いたReRAMが代表であるが、他のメモリも使用可能である。メモリを不揮発にすることで、データの頻繁な移動が生ぜず、極めて低エネルギーで動作させることができる。またニューロコンピューティングにおいては、結合係数Wは学習において得られ、その後は値が変化しないため、不揮発性メモリが適している。 Figures 13A and 13B are circuit diagrams of the memory cell shown in Figure 12, and Figure 13C is a circuit diagram of a sense amplifier. Figure 13A is an SRAM memory cell. SRAM memory cells can be manufactured using logic processes, making them easy to integrate. Figure 13B is a non-volatile memory cell. Many non-volatile memory cells have a change in resistance value, and representative examples include MRAM using a magnetic thin film and ReRAM using a phase change, but other memories can also be used. Making the memory non-volatile prevents frequent data transfer and allows it to operate with extremely low energy. In addition, in neurocomputing, the coupling coefficient W is obtained during learning, and the value does not change thereafter, so non-volatile memory is suitable.

図13Cはセンスアンプ回路である。センスアンプは、正帰還動作により僅かな入力電位差をフルスイング電圧まで増幅する。このことにより、メモリセルからのビット線の僅かな電位差をフルスイング電圧まで増幅してDACに入力することができる。図12に示すように、メモリセルへのデータ入力はバスを介して行われる。このため、メモリセルへのデータ入力は消費エネルギーが著しく増大するとともに配線遅延により遅延時間が長いため、動作速度が遅くなる。 Figure 13C shows a sense amplifier circuit. The sense amplifier amplifies the slight input potential difference to the full swing voltage by positive feedback operation. This allows the slight potential difference on the bit line from the memory cell to be amplified to the full swing voltage and input to the DAC. As shown in Figure 12, data input to the memory cell is performed via a bus. For this reason, data input to the memory cell consumes significantly more energy and has a long delay time due to wiring delays, slowing down the operating speed.

図14はメモリセルへの入力バスの電圧を示す図である。本実施形態の積和演算器では、バスは図12に示すように差動構成を用い、図14に示すように0.1V程度の低振幅とし、センスアンプでフルスイング電圧まで増幅するようにする。このような構成にすることで、バスの消費エネルギーを1/10程度まで低減できる他、データ伝送速度を数倍に向上させることができる。 Figure 14 is a diagram showing the voltage of the input bus to the memory cell. In the multiply-and-accumulate calculator of this embodiment, the bus uses a differential configuration as shown in Figure 12, has a low amplitude of about 0.1 V as shown in Figure 14, and is amplified to the full swing voltage by the sense amplifier. By using such a configuration, the energy consumption of the bus can be reduced to about 1/10, and the data transmission speed can be improved by several times.

本実施形態の積和演算器は、電圧出力デジタル・アナログ変換部及び容量型デジタル・アナログ変換部の入力データはメモリセルに保存され、その論理状態をセンスするセンスアンプの出力から得られるとともに、メモリへの入力データを差動形式にし、振幅が電源電圧よりも低い低振幅バスを用いて伝送され,センスアンプでより大きい振幅に変換されてメモリセルのビットラインを駆動するので、DACへのデジタル入力が低エネルギーかつ高速に行うことができるため低エネルギーで動作し,動作速度が高速な積和演算器を実現することができる。 In the multiply-and-accumulate calculator of this embodiment, input data to the voltage output digital-analog conversion unit and the capacitive digital-analog conversion unit is stored in memory cells and is obtained from the output of a sense amplifier that senses the logical state of the memory cells. Input data to the memory is in differential format and transmitted using a low amplitude bus whose amplitude is lower than the power supply voltage, and is converted to a larger amplitude by the sense amplifier to drive the bit lines of the memory cells. This allows digital input to the DAC to be performed at high speed with low energy, thereby realizing a multiply-and-accumulate calculator that operates with low energy and has a high operating speed.

1 積和演算器
11 電圧出力デジタル・アナログ変換部
12 容量型デジタル・アナログ変換部
13 アナログ・デジタル変換部
1 Product-accumulator 11 Voltage output digital-to-analog conversion unit 12 Capacitive digital-to-analog conversion unit 13 Analog-to-digital conversion unit

Claims (12)

複数のデジタル・アナログ変換器で構成され、複数のデジタル値を各要素とするベクトル及び複数のデジタル値を各要素とする行列が入力され、前記ベクトルの各要素のデジタル値をアナログ電圧に変換する電圧出力デジタル・アナログ変換部と、
複数のデジタル・アナログ変換器で構成され、前記電圧出力デジタル・アナログ変換器列の各出力電圧が入力され、前記行列の各要素のデジタル値に対応した容量比が入出力端子間及び出力端子と接地間に設定される容量型デジタル・アナログ変換部と、
複数のアナログ・デジタル変換器で構成され、前記容量型デジタル・アナログ変換部の各出力端に共通に接続されたノードの電圧がアナログ入力され、デジタル値に変換されるアナログ・デジタル変換部と、
を有し、
前記容量型デジタル・アナログ変換部は差動信号を出力し、
前記アナログ・デジタル変換部の各アナログ・デジタル変換器には、前記容量型デジタル・アナログ変換部の各出力端に共通に接続された一対のノードの差動電圧がアナログ入力され、デジタル値に変換され、
前記アナログ・デジタル変換部の出力を出力ベクトルとする積和演算器。
a voltage output digital-to-analog conversion unit that is composed of a plurality of digital-to-analog converters, receives a vector having a plurality of digital values as elements and a matrix having a plurality of digital values as elements, and converts the digital values of each element of the vector into an analog voltage;
a capacitive digital-analog conversion unit which is composed of a plurality of digital-analog converters, to which each output voltage of the voltage output digital-analog converter row is input, and a capacitance ratio corresponding to the digital value of each element of the matrix is set between input/output terminals and between an output terminal and ground;
an analog-to-digital conversion unit which is composed of a plurality of analog-to-digital converters and receives an analog voltage of a node commonly connected to each output terminal of the capacitive digital-to-analog conversion unit and converts it into a digital value;
having
the capacitive digital-to-analog converter outputs a differential signal;
a differential voltage of a pair of nodes commonly connected to each output end of the capacitive digital-analog conversion unit is input to each analog-to-digital converter of the analog-to-digital conversion unit, and is converted into a digital value;
A multiply-and-accumulate calculator that uses the output of the analog-to-digital converter as an output vector.
前記複数のデジタル値を各要素とする行列は1次元ベクトルであり、
前記電圧出力デジタル・アナログ変換部の各デジタル・アナログ変換器から第1のベクトルと前記1次元ベクトルとの内積が出力される請求項1に記載の積和演算器。
the matrix having the plurality of digital values as elements is a one-dimensional vector,
2. The multiply-add calculator according to claim 1, wherein each digital-to-analog converter of the voltage output digital-to-analog conversion unit outputs an inner product of a first vector and the one-dimensional vector.
前記アナログ・デジタル変換部の各アナログ・デジタル変換器は、前記一対のノードの差動電圧を一対の容量にサンプリングし、前記一対の容量の端子間を短絡することで同相信号を抽出し、前記一対のノードの差動電圧から差し引くことで同相成分をキャンセルする請求項に記載の積和演算器。 2. The multiply-accumulate calculator according to claim 1, wherein each analog-to-digital converter of the analog-to- digital conversion unit samples the differential voltage of the pair of nodes onto a pair of capacitances, extracts a common-mode signal by shorting terminals of the pair of capacitances, and cancels the common-mode component by subtracting it from the differential voltage of the pair of nodes. 前記容量型デジタル・アナログ変換部は、出力に対して2進重み付け容量を用いて各要素のデジタル値に対応した容量比を入出力端子間及び出力端子と接地間に設定する請求項1に記載の積和演算器。 The multiply-and-accumulate calculator according to claim 1, wherein the capacitive digital-to-analog conversion unit uses binary-weighted capacitance for the output to set a capacitance ratio corresponding to the digital value of each element between the input/output terminals and between the output terminal and ground. 前記電圧出力デジタル・アナログ変換部を構成する各デジタル・アナログ変換器に重み付け抵抗が用いられている請求項1に記載の積和演算器。 The multiply-and-accumulate calculator according to claim 1, in which weighted resistors are used in each digital-to-analog converter that constitutes the voltage output digital-to-analog conversion unit. 前記電圧出力デジタル・アナログ変換部を構成する各デジタル・アナログ変換器は、上位数ビットはサーモメータコードを用いた等しい抵抗で構成され、残りの下位ビットには2進で重み付けされたR-2R梯子型の抵抗が用いられている請求項に記載の積和演算器。 The multiply-add calculator according to claim 5, wherein each of the digital-to-analog converters constituting the voltage output digital-to-analog conversion unit has several upper bits configured with equal resistances using a thermometer code, and the remaining lower bits are configured with binary-weighted R-2R ladder-type resistances. 前記電圧出力デジタル・アナログ変換部を構成する各デジタル・アナログ変換器は、最小ビットの抵抗の接地端への接続が開放可能となっている請求項に記載の積和演算器。 6. The multiply-accumulate calculator according to claim 5 , wherein each of the digital-to-analog converters constituting the voltage output digital-to-analog conversion unit is configured so that a connection to the ground terminal of a resistor of a least significant bit can be opened. 前記電圧出力デジタル・アナログ変換部及び前記容量型デジタル・アナログ変換部の入力データは、メモリセルに保存されており、その論理状態をセンスするセンスアンプの出力から得られる請求項1に記載の積和演算器。 The multiply-and-accumulate calculator according to claim 1, wherein the input data of the voltage output digital-to-analog conversion unit and the capacitive digital-to-analog conversion unit is stored in memory cells and is obtained from the output of a sense amplifier that senses the logic state of the memory cells. 前記メモリセルへの入力データは差動形式であり、振幅が電源電圧よりも低い低振幅バスを用いて伝送され、前記センスアンプでより大きい振幅に変換されて前記メモリセルのビットラインを駆動する請求項に記載の積和演算器。 9. The multiply-add calculator according to claim 8, wherein input data to the memory cells is in differential format, transmitted using a low-amplitude bus whose amplitude is lower than a power supply voltage, and converted to a larger amplitude by the sense amplifier to drive the bit lines of the memory cells . 前記メモリセルはSRAMである請求項に記載の積和演算器。 9. The multiply-accumulate calculator according to claim 8, wherein the memory cells are SRAMs. 前記メモリセルは不揮発性である請求項に記載の積和演算器。 9. The multiply-accumulate calculator according to claim 8 , wherein the memory cells are non-volatile. 前記不揮発性のメモリセルはMRAMである請求項11に記載の積和演算器。 12. The multiply-accumulate calculator according to claim 11, wherein the non-volatile memory cell is an MRAM.
JP2022503180A 2020-02-26 2021-01-27 Multiply-and-accumulate unit Active JP7586441B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2020031047 2020-02-26
JP2020031047 2020-02-26
PCT/JP2021/002791 WO2021171880A1 (en) 2020-02-26 2021-01-27 Product-sum calculator

Publications (2)

Publication Number Publication Date
JPWO2021171880A1 JPWO2021171880A1 (en) 2021-09-02
JP7586441B2 true JP7586441B2 (en) 2024-11-19

Family

ID=77490443

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022503180A Active JP7586441B2 (en) 2020-02-26 2021-01-27 Multiply-and-accumulate unit

Country Status (2)

Country Link
JP (1) JP7586441B2 (en)
WO (1) WO2021171880A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20240096766A (en) * 2021-11-10 2024-06-26 신타라 아게 Hybrid Matrix Multiplier
JPWO2024143223A1 (en) * 2022-12-26 2024-07-04

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019152451A1 (en) 2018-01-31 2019-08-08 Amazon Technologies, Inc. Improving performance of neural network arrays

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60178584A (en) * 1984-02-23 1985-09-12 Dainippon Screen Mfg Co Ltd Averaging means of product and sum of digital input and digital output
JPH09259205A (en) * 1996-03-19 1997-10-03 Yozan:Kk Product-sum operation circuit
US5949362A (en) * 1997-08-22 1999-09-07 Harris Corporation Digital-to-analog converter including current cell matrix with enhanced linearity and associated methods
JP5310222B2 (en) * 2009-04-20 2013-10-09 富士通株式会社 Charge distribution type digital-to-analog converter and successive approximation type analog-to-digital converter having the same
JP2018129046A (en) * 2017-02-08 2018-08-16 株式会社半導体エネルギー研究所 AI system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019152451A1 (en) 2018-01-31 2019-08-08 Amazon Technologies, Inc. Improving performance of neural network arrays

Also Published As

Publication number Publication date
WO2021171880A1 (en) 2021-09-02
JPWO2021171880A1 (en) 2021-09-02

Similar Documents

Publication Publication Date Title
US11640196B2 (en) Unit element for performing multiply-accumulate operations
US20210365241A1 (en) Multiplication and accumulation circuit based on radix-4 booth code and differential weight
Bankman et al. An 8-bit, 16 input, 3.2 pJ/op switched-capacitor dot product circuit in 28-nm FDSOI CMOS
US11893078B2 (en) Analog dot product multiplier
JP7586441B2 (en) Multiply-and-accumulate unit
JP6036311B2 (en) Analog-digital conversion circuit and analog-digital conversion method
Osipov et al. Two advanced energy-back SAR ADC architectures with 99.21 and 99.37% reduction in switching energy
CN107528594A (en) Charge type streamline gradual approaching A/D converter and its control method
CN111711453B (en) Successive approximation type analog-to-digital converter
CN108306644B (en) Front-end circuit based on 10-bit ultra-low power consumption successive approximation type analog-to-digital converter
Yu et al. A 4-bit mixed-signal MAC array with swing enhancement and local kernel memory
Wang et al. Enhancing AI acceleration: A calibration-free, PVT-robust analog compute-in-memory macro with activation functions
Sharma et al. Comparative analysis of d/a converter architectures for sar adc
JP4242973B2 (en) Successive comparison type AD converter and microcomputer incorporating the same
Lei et al. Analysis on capacitor mismatch and parasitic capacitors effect of improved segmented-capacitor array in SAR ADC
Moser et al. An open-source 1.44-MS/s 703-μW 12-bit non-binary SAR-ADC using 448-aF capacitors in 130-nm CMOS
Pilipko et al. An algorithm for the search of a low capacitor count DAC switching scheme for SAR ADCs
Bellavin et al. Study of Bubble Errors Conversion in a Modified ROM Encoder
JP3173473B2 (en) Multiplication type digital / analog conversion circuit
JP2024542400A (en) Hybrid Matrix Multiplier
Ling et al. Design of binary weighted DAC for asynchronous ADC with improved slew rate and with calibrated size of capacitors
WO2019113772A1 (en) Method for analog-digital conversion and analog-digital converter
Chinthala High throughput circuit design of flash type analog to digital converter
Yue et al. A 92.1% area-efficient charge sharing switching scheme with near zero reset energy for SAR ADCs
Numan Integrated Circuit Blocks for In-Memory Computing

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20221005

AA64 Notification of invalidation of claim of internal priority (with term)

Free format text: JAPANESE INTERMEDIATE CODE: A241764

Effective date: 20221018

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20221025

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20240110

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20240820

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20241011

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20241029

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20241029

R150 Certificate of patent or registration of utility model

Ref document number: 7586441

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150