Memory storage device and operation method thereof for implementing inner product operation

10891222 ยท 2021-01-12

Assignee

Inventors

Cpc classification

International classification

Abstract

A memory storage device includes: a memory array for generating a cell current dependent to an input and transconductance of memory cells of the memory array; a reference array for generating a reference current; an ADC for performing analog-digital-conversion on the cell current based on the reference current to generate a digital output; and a memory controller for generating an output based on the input and the digital output of the ADC. The output of the memory controller indicates an inner product of the input and a weight, the weight including a positive weight and a negative weight. The positive weight is implemented by the transconductance of the memory cells of the memory array. The negative weight is implemented by transconductance of reference cells of the reference array or implemented by a shifting number of a shifter in the memory controller.

Claims

1. A memory storage device for implementing inner product operations, the memory storage device including: a memory array, for receiving an input and generating a cell current, wherein the cell current is dependent to the input and a plurality of transconductance of a plurality of memory cells of the memory array; a memory controller for performing accumulation of the input to obtain an input-accumulated value; a reference array coupled to the memory controller, the reference array receiving the input-accumulated value from the memory controller for generating a current being dependent to the input and a plurality of transconductance of a plurality of reference cells of the reference array; and an analog-to-digital converter (ADC) coupled to the memory array and the reference array, the ADC performing analog-digital-conversion on the cell current from the memory array based on the current from the reference array to generate an output, wherein the output of the ADC indicates an inner product of the input and a weight, the weight including a positive weight and a negative weight, the positive weight being implemented by the transconductance of the memory cells of the memory array, and the negative weight being implemented by the transconductance of the reference cells of the reference array.

2. The memory storage device according to claim 1, wherein the memory controller includes: an adder and a buffer, the adder receiving the input and an output of the adder being input to the buffer, an output of the buffer being fed back to the adder, the output of the buffer being the input-accumulated value.

3. The memory storage device according to claim 1, wherein the transconductance of the reference cells of the reference array is constant.

4. The memory storage device according to claim 1, wherein a first part of the current generated by the reference array is independent of the input; and a second part of the current generated by the reference array is being dependent to the input and the plurality of transconductance of the plurality of reference cells of the reference array.

5. An operation method for a memory storage device, the memory storage device including a memory array, a reference array, an analog-to-digital converter (ADC) and a memory controller, the operation method including: receiving an input by the memory array to generate a cell current, wherein the cell current is dependent to the input and a plurality of transconductance of a plurality of memory cells of the memory array; performing, by the memory controller, accumulation of the input to obtain an input-accumulated value; receiving, by the reference array, the input-accumulated value from the memory controller for generating a current being dependent to the input and a plurality of transconductance of a plurality of reference cells of the reference array; and performing, by the ADC, analog-digital-conversion on the cell current from the memory array based on the current from the reference array to generate an output, wherein the output of the ADC indicates an inner product of the input and a weight, the weight including a positive weight and a negative weight, the positive weight being implemented by the transconductance of the memory cells of the memory array, and the negative weight being implemented by the transconductance of the reference cells of the reference array.

6. The operation method according to claim 5, wherein the transconductance of the reference cells of the reference array is constant.

7. The operation method according to claim 5, wherein a first part of the current generated by the reference array is independent of the input; and a second part of the current generated by the reference array is being dependent to the input and the plurality of transconductance of the plurality of reference cells of the reference array.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) FIG. 1 (prior art) shows to implement the inner product operation by analog implementation.

(2) FIG. 2 (prior art) shows implementation of negative weight by a current subtractor.

(3) FIG. 3 shows a functional block diagram of a memory storage device according to a first embodiment of the application.

(4) FIG. 4 shows a functional block diagram of a memory storage device according to a second embodiment of the application.

(5) In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the disclosed embodiments. It will be apparent, however, that one or more embodiments may be practiced without these specific details. In other instances, well-known structures and devices are schematically shown in order to simplify the drawing.

DESCRIPTION OF THE EMBODIMENTS

(6) Technical terms of the disclosure are based on general definition in the technical field of the disclosure. If the disclosure describes or explains one or some terms, definition of the terms is based on the description or explanation of the disclosure. Each of the disclosed embodiments has one or more technical features. In possible implementation, one skilled person in the art would selectively implement part or all technical features of any embodiment of the disclosure or selectively combine part or all technical features of the embodiments of the disclosure.

(7) FIG. 3 shows a functional block diagram of a memory storage device according to a first embodiment of the application. As shown in FIG. 3, the memory storage device 300 includes a memory array 310, a reference array 320, an ADC (analog-to-digital converter) 330 and a memory controller 340. The memory controller 340 includes an adder 341, a buffer 343, a shifter 345 and a subtractor 347. The memory storage device 300 is for example but not limited by a non-volatile memory.

(8) In FIG. 3, the memory storage device 300 may implement the inner product operation Y=WX, wherein G=W and V=X. The relationship between the transconductance G and the weight W is expressed as G=W. That is, the transconductance G (which is a reciprocal of an equivalent resistance R) is times of the weight W, being a constant. G=G.sup.+G.sub.min.sup.. G.sup.+ is an equivalent transconductance of at least one memory cell of the memory array 310; and G.sub.min.sup. is a self-defined constant value. G.sub.min.sup. is corresponding to a self-defined negative weight (G.sub.min.sup./); and a logarithm of the negative weight to base 2 (log.sub.2(G.sub.min.sup./)) decides the shift of the shifter 345 of the memory controller 340. V=X refers to that input voltage V is times of the input X, being a constant.

(9) The output Y of the memory storage device 300 is expressed as below.
Y=WX=(1/)VG=(1/)V(G.sup.+G.sub.min.sup.)=(1/)VG.sup.+(1/)VG.sub.min.sup.=(1/)VG.sup.+W.sub.min.sup.X.

(10) wherein W.sub.min.sup.=(1/)*G.sub.min.sup. and W=W.sup.+W.sub.min.sup.. W.sup.+=(1/)*G.sup.+ and W.sub.min.sup.=(1/)*G.sub.min.sup.. W.sup.+, a positive weight, is corresponding to the transconductance of the memory cells of the memory array 310. W.sub.min.sup., a negative weight, is corresponding to the shift of the shifter 345, wherein the shift of the shifter 345 is corresponding to a logarithm of the negative weight W.sub.min.sup. to base 2 (log.sub.2(W.sub.min.sup.)).

(11) In the first embodiment of the application, the negative weight, which is self-defined, may be power of 2 (for example but not limited by, 1, 2, 4, 8). Thus, it is easy to combine into a negative weight by the shifter 345.

(12) The input X is input into the adder 341. The output of the adder 341 is input into the buffer 343 and the output of the buffer 343 is fed back to the adder 341. By so, through the accumulation operation of the adder 341 and the buffer 343, the output of the buffer 343 is X.

(13) The output X of the buffer 343 is input into the shifter 345 and thus the shifter 345 shifts X as W.sub.min.sup.X (which is also referred as a shifted input-accumulated value). The output W.sub.min.sup.X of the shifter 345 is input into the subtractor 347. If the self-defined negative weight is power of 2, then the operation of multiplying W.sub.min.sup. by X can be implemented by a shift of the shifter 345 (i.e. the shifting result of the shifter 345 on X is W.sub.min.sup.X.)

(14) Further, the input X may be input into the memory array 310. The memory array 310 outputs an output current (i.e. the cell current) VG+ wherein V=X. In other words, the cell current is corresponding to the input X and the transconductance values of the memory cells of the memory array 310. The reference array 320 outputs a reference current I_REF wherein in the first embodiment of the application, the reference current I_REF is independent of the input X.

(15) The ADC 330 is coupled to the memory array 310 and the reference array 320. The ADC 330 generates (1/ )VG.sup.+ based on the cell current VG.sup.+ and the reference current I_REF. In details, the ADC 330 may perform the functions of the sensing amplifier (SA) to output (1/)VG.sup.+ by comparing the cell current V G.sup.+ and the reference current I_REF. Or, the input voltage V and the transconductance G.sup.+ are analog values while the weight W and the input V are digital values. V G.sup.+ is also an analog value. The ADC 330 performs ADC to convert the analog value VG.sup.+ into the digital value (1/)VG.sup.+.

(16) The memory controller 340 is coupled to the ADC 330. The output (1/)VG.sup.+ of the ADC 330 is input into the subtractor 347 of the memory controller 340. The subtractor 347 subtracts (1/)VG.sup.+ and W.sub.min.sup.X to output the output Y (Y=(1/)VG.sup.+W.sub.min.sup.X). By so, the memory storage device 300 of the first embodiment of the application implements the inner product operation (a kind of AI operations).

(17) From the above description, in the first embodiment of the application, in implementing the negative weight, a digital subtractor having small circuit area is used, instead of using an analog subtractor having large circuit area. Thus, the first embodiment of the application has advantages in small circuit area and low power consumption.

(18) FIG. 4 shows a functional block diagram of a memory storage device according to a second embodiment of the application. As shown in FIG. 4, the memory storage device 400 includes a memory array 410, an input-dependent reference array 420, an ADC 430 and a memory controller 440. The memory controller 440 includes an adder 441 and a buffer 443. The memory storage device 400 is for example but not limited by, a non-volatile memory device. The input-dependent reference array 420 is coupled to the memory controller 440. The memory array 410 and the input-dependent reference array 420 are coupled to the ADC 430.

(19) In FIG. 4, the memory storage device 400 may implement the inner produce operation Y=WX.

(20) The output Y of the memory storage device 400 is expressed as below.

(21) Y = ( 1 / ) .Math. VG = ( 1 / ) .Math. V ( G + - G min - ) = ( 1 / ) { .Math. VG + - .Math. VG min - } = ( 1 / ) { .Math. VG + - G min - .Math. V } .

(22) The operations of the adder 441 and the buffer 443 are similar to those of the adder 341 and the buffer 343 in FIG. 3 and thus are omitted here.

(23) The output X of the buffer 443 is input to the input-dependent reference array 420. In the second embodiment of the application, the transconductance of the reference cells of the input-dependent reference array 420 is also constant or fixed, for implementing the negative weight. Further, the output current of the input-dependent reference array 420 may include two parts, one part being the reference current I_REF (which is independent of the input X) and the other part being VG.sub.min.sup. (which is dependent to the input X and the transconductance of the reference cells).

(24) Further, the input X may be input to the memory array 410 and thus the memory array 410 outputs an output current (i.e. the cell current) VG.sup., wherein V=X.

(25) The ADC 430 outputs (1/)VG based on VG.sup.+ and I_REF+VG.sub.min.sup.. In details, the ADC 430 may perform the sensing amplifier (SA) function to compare VG.sup.+ and I_REF+VG.sub.min.sup. to output (1/)VG. By so, the ADC 430 may generate the output Y=(1/){VG.sup.+G.sub.min.sup.V}.

(26) In the second embodiment of the application, in order to eliminate the subtractor, a part of the output current from the input-dependent reference array 420 is dependent to the input X. The reason is that, as for the output of the ADC 430, the ADC 430 compares VG.sup.+ and I_REF+VG.sub.min.sup. to output (1/)VG. However, in another case that the ADC 430 compares VG.sup.+VG.sub.min.sup. and I_REF to output another output Y (in this case, the memory storage device may need a subtractor to generate the term VG.sup.+VG.sub.min.sup.), wherein Y is equivalent to Y=(1/)VG (that is Y is equivalent to Y, but implementation of Y and Y are not the same). Thus, in the second embodiment of the application, by introducing the input-dependent reference array 420, the subtractor may be eliminated. Thus, the memory controller 440 and of course the memory storage device 400 have small circuit area. By this, the memory storage device 400 of the second embodiment of the application may implement the inner product operation (i.e. AI operations).

(27) From the above description, in the second embodiment of the application, in implementing the negative weight, an analog subtractor having large circuit area is eliminated. Thus, the second embodiment of the application has advantages in small circuit area and low power consumption.

(28) It will be apparent to those skilled in the art that various modifications and variations can be made to the disclosed embodiments. It is intended that the specification and examples be considered as exemplary only, with a true scope of the disclosure being indicated by the following claims and their equivalents.