Memory circuit and operation method thereof
By designing the selection circuit, memory cell column and adder tree in the memory circuit, efficient execution of in-memory calculations at lower power and smaller area is achieved, which solves the problem of low data processing efficiency in the existing technology and is suitable for volume applications. Neural network and other applications.
Patent Information
- Application Number
- CN202110790436.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-13
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2041-07-13
AI Technical Summary
When existing memory circuits perform calculations at multiple operating layers, data transmission and processing efficiency is low, resulting in increased power consumption and area occupation. Especially in applications such as convolutional neural networks, it is difficult to efficiently perform multiplication and accumulation operations.
A memory circuit is designed, including a selection circuit, a memory cell column, and an adder tree. By receiving bit sets of multiple input data elements, the multiplier and adder tree are used to perform mathematical operations, generate partial sums, and proceed through the accumulator. Synchronous operations enable in-memory calculations, reducing power and area consumption.
The memory circuit can perform in-memory calculations in a smaller area and lower power level, improving data processing efficiency, especially in applications such as convolutional neural networks, improving the efficiency of multiplication and accumulation operations.
Smart Images

Figure CN113571109B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to memory circuits and methods of operating the same. Background Art
[0002] Memory arrays are often used to store and access data for various types of computations, such as logical or mathematical operations. To perform these operations, data bits are moved between the memory array and the circuits used to perform the computations. In some cases, the computations include multiple layers of operations, and the result of a first operation is used as input data in a second operation. Summary of the invention
[0003] According to one aspect of an embodiment of the present invention, there is provided a memory circuit, comprising:
[0004] A selection circuit configured to: receive a plurality of input data elements, each input data element of the plurality of input data elements comprising a number of bits equal to H, and output a selected set of k-th bits of the H bits of each input data element of the plurality of data elements;
[0005] a column of memory cells, each memory cell of the column of memory cells comprising: a first storage unit for storing a first weight data element; and a first multiplier configured to generate a first product data element based on the first weight data element and a corresponding first k-th bit of the selected set of k-th bits; and
[0006] An adder tree is configured to generate a summation data element based on each of the first product data elements.
[0007] According to another aspect of an embodiment of the present invention, a method for operating a memory circuit is provided, the method comprising: receiving a set of H bits of a plurality of input data elements at a column of memory cells, a set of k-th bits of each input data element; using each memory cell of the column of memory cells to multiply the k-th bit of a corresponding input data element of the plurality of data elements by a first weight data element stored in the memory cell, thereby generating a corresponding first product data element; and using an adder tree to generate a summation data element based on each of the first product data elements.
[0008] According to another aspect of an embodiment of the present invention, there is provided a memory circuit, comprising: a selection circuit configured to sequentially output a set of selected k-th bits to corresponding memory cells of each column of a plurality of memory cells for a plurality of input data elements each comprising H bits; a plurality of adder trees, each of the plurality of adder trees being coupled to a column of corresponding memory cells of the plurality of memory cells; and a plurality of accumulators, each of the plurality of accumulators being coupled to a corresponding adder tree of the plurality of adder trees.
[0009] wherein each memory cell of each column of memory cells comprises a multiplier configured to generate a product data element based on a corresponding k-th bit in a selected set of k-th bits and a weight data element stored in the memory cell, each adder tree in a plurality of adder trees is configured to generate a summation data element based on each of the product data elements of the corresponding column of memory cells for each sequentially outputted set of k-th bits, and each accumulator in a plurality of accumulators is configured to generate a partial sum based on the summation data element generated by a corresponding adder tree in the plurality of adder trees. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Various aspects of the present invention will be best understood from the following detailed description when read in conjunction with the accompanying drawings. It should be emphasized that, in accordance with standard practice in the industry, the various components are not drawn to scale and are for illustration purposes only. In fact, the dimensions of the various components may be arbitrarily increased or reduced for clarity of discussion.
[0011] Figure 1A and Figure 1B is a diagram of a memory circuit according to some embodiments.
[0012] Figure 2 is a diagram of a selection circuit according to some embodiments.
[0013] Figure 3A and Figure 3B is a diagram of a memory cell according to some embodiments.
[0014] Figure 4 is a diagram of an adder tree according to some embodiments.
[0015] Figure 5 is a diagram of an accumulator according to some embodiments.
[0016] Figure 6 is a diagram of a portion of a memory array according to some embodiments.
[0017] Fig. 7A and Figure 7B is a diagram of a portion of a memory circuit according to some embodiments.
[0018] Figure 8 is a graph of memory circuit operating voltages according to some embodiments.
[0019] Fig. 9 is a flow chart of a method of operating a memory circuit according to some embodiments.
[0020] Fig.10 is a flow chart of a method of operating a memory circuit according to some embodiments. DETAILED DESCRIPTION
[0021] The following disclosure provides many different embodiments or examples for realizing different features of the present invention. Specific embodiments or examples of components and arrangements are described below to simplify the present invention. Of course, these are only examples and are not intended to be limiting. For example, in the following description, forming a first component above or on a second component may include an embodiment in which the first component and the second component are directly contacted, and may also include an embodiment in which an additional component may be formed between the first component and the second component so that the first component and the second component may not be in direct contact. In addition, the present invention may repeat reference numbers and / or letters in various examples. This repetition is for the purpose of simplicity and clarity, and does not itself indicate the relationship between the various embodiments and / or configurations discussed.
[0022] Additionally, for ease of description, spacing relation terms such as "below," "beneath," "lower," "above," "upper," etc. may be used herein to describe the relationship of one element or component to another element or component as shown in the figures. The spacing relation terms are intended to encompass different orientations of the device in use or in the process of operation in addition to the orientation shown in the figures. The device may be otherwise oriented (rotated 90 degrees or at other orientations) and the spacing relation descriptors used herein may likewise be interpreted accordingly.
[0023] In various embodiments, a memory array of a memory circuit includes memory storage units and mathematical operation units, and is thereby configured to perform in-memory computations, thereby generating partial sums based on input data elements and stored weight data elements. Such a memory circuit is capable of generating partial sums using a smaller area and lower power levels than an approach in which the memory array does not include elements configured to perform in-memory computations. In various applications, such as convolutional neural network (CNN) applications, the memory circuit enables the stored array of weight data elements to be efficiently applied to multiplication and accumulation (MAC) operations of one or more groups of input data elements.
[0024] Figure 1A and Figure 1B 1 is a diagram of corresponding memory circuits 100A and 100B according to some embodiments. Each memory circuit 100A and 100B includes a selection circuit 110 coupled to an input data bus IDB and a corresponding memory array 120A or 120B, an input / output (I / O) circuit 130 and M accumulators 140 coupled to the corresponding memory array of the memory array 120A or 120B, and a control circuit 150 coupled to each of the selection circuit 110, the corresponding memory array 120A or 120B, the I / O circuit 130 and each accumulator 140 through a control signal bus CTRLB.
[0025] Each memory array 120A and 120B includes M columns C1-CM corresponding to the M accumulators 140. The memory array 120A includes N rows of memory cells BCX, each row including a single input terminal (not labeled) and a single output terminal (not labeled), each input terminal thus corresponding to one of the N rows of data of the memory array 120B. The memory array 120B includes N / 2 rows of memory cells BX2, each row including two input terminals (not labeled) and a single output terminal (not labeled), each input terminal thus corresponding to one of the N rows of data of the memory array 120B. As described below, each memory circuit 100A and 100B is thus configured to receive a plurality of N input data elements A1-AN on an input data bus IDB, each input data element A1-AN including a number of bits equal to H.
[0026] Table 1 depicts the data structure of input data elements A1 -AN, where each of the N input data elements A1 -AN includes H bits of data.
[0027] Table 1
[0028] Data Elements Bit 1 Bit 2 .. Position H A1 A11 A12 .. A1H A2 A21 A22 .. A2H : : : : : AN AN1 AN2 .. ANH
[0029] As described below, the memory circuits 100A and 100B are configured such that, in operation, each column C1-CM of each memory array 120A and 120B simultaneously receives the same numbered bit (kth bit) of each input data element A1-AN, i.e., the set of bits A1k-ANk from the selection circuit 110. Each column performs a mathematical operation based on the received set of bits A1k-ANk and the weight data element stored in the corresponding memory cell BCX or BX2, thereby generating a number M of summed data elements SD1-SDM corresponding to the column C1-CM.
[0030] The counter k cycles through each of the H bits (e.g., from 1 to H), so that the selection circuit 110 outputs a set of bits A1k-ANk in a sequentially selected manner, and each column repeats the mathematical operation on the set of bits A1k-ANk for each value of the selected counter k, thereby generating a sequence of H sum data elements SD1-SDM. The accumulator 140 is configured to generate corresponding partial sums PS1-PSM based on the sequence of sum data elements SD1-SDM, and output the partial sums PS1-PSM on corresponding output ports O1-OM.
[0031] exist Figure 1A In the illustrated embodiment, the memory array 120A includes memory cells BCX configured to receive one of a set of sequentially selected k-th bits of input data elements A1-AN, respectively, and Figure 1BIn the illustrated embodiment, the memory array 120B includes memory cells BX2, which are configured to receive two bits of adjacent data elements of a set of sequentially selected k-th bits of input data elements A1-AN, respectively. Each memory circuit 100A and 100B is thus configured to be able to perform some or all of the methods for performing memory calculations by them, for example, the following about Fig. 9 and Fig.10 One or both of methods 900 or 1000 discussed.
[0032] In various embodiments, memory circuit 100A or 100B is included in a neural network (e.g., CNN), a sensor (e.g., a magnetic, image, vibration, or gyroscope sensor), a radio frequency (RF) device, or other integrated circuit (IC) device.
[0033] For the purpose of illustration, each memory circuit 100A and 100B is simplified. In various embodiments, one or both of the memory circuits 100A or 100B include Figure 1A and Figure 1B Various elements other than those depicted in the drawings may be used, or otherwise arranged, to perform the operations discussed below.
[0034] Two or more circuit elements are considered to be coupled based on one or more direct signal connections and / or one or more indirect signal connections, which include one or more logic devices, such as inverters or logic gates between the two or more circuit elements. In some embodiments, signal communication between two or more coupled circuit elements can be modified by one or more logic devices, such as inverted or conditionally performed.
[0035] The selection circuit 110 is an electronic circuit including one or more data registers ( Figure 1A and Figure 1B ), and one or more multiplexers or similar circuits (not shown) coupled to one or more data registers and a control signal bus CTRLB Figure 1A and Figure 1B not shown).
[0036] A data register (also referred to as a buffer in some embodiments) is an electronic circuit configured to temporarily store some or all of one or more data elements, for example, the H bits of each input data element A1-AN. In various embodiments, the data register includes a single set of terminals configured to input and output data bits, or a separate set of terminals configured to input and output data bits.
[0037] A multiplexer is an electronic circuit comprising a first set of terminals configured to receive multiple signals (e.g., the H bit of one of the input data elements A1-AN), one or more switching devices (e.g., transistors) configured to receive one or more control signals (e.g., control signal CTRL), and at least one terminal configured to output a selected one of the received signals in response to the one or more control signals.
[0038] The selection circuit 110 is thus configured to store the H bits of each input data element A1-AN received on the input data bus IDB, and in response to one or more control signals CTRL received on the control signal bus CTRLB, output a set of selected k-th bits A1k-ANk to one of the corresponding memory arrays 120A or 120B. For each input data element A1-AN, the corresponding selected k-th bit A1k-ANk is the same k-th bit out of the total K bits. In some embodiments, the selection circuit 110 includes the following about Figure 2 The selection circuit 200 is discussed.
[0039] In some embodiments, the selection circuit 110 is configured to receive a number N of input data elements A1-AN ranging from 4 to 512. In some embodiments, the selection circuit 110 is configured to receive a number N of input data elements A1-AN ranging from 32 to 128.
[0040] In some embodiments, the selection circuit 110 is configured to receive a number H of bits of each input data element A1-AN ranging from 1 to 16. In some embodiments, the selection circuit 110 is configured to receive a number H of bits of each input data element A1-AN ranging from 4 to 8.
[0041] In various embodiments, one or more control signals CTRL are configured to cause the selection circuit 110 to sequentially output the set of k bits A1k-ANk from the least significant bit (LSB) to the most significant bit (MSB) or from the MSB to the LSB in operation. In various embodiments, one or more control signals CTRL are configured to cause the selection circuit 110 to sequentially output the entire set of H bits or a subset of the set of H bits. In some embodiments, each input data element A1-AN includes less than H bits, and the one or more control signals CTRL are configured to cause the selection circuit 110 to sequentially output the entirety or a subset of the number of received bits.
[0042] In various embodiments, the one or more control signals CTRL are configured to cause the selection circuit 110 to output the entirety or a subset of the corresponding selected set of k-th bits A1k-ANk for each value of the counter k. In some embodiments, the plurality of input data elements includes a number of data elements less than N, and the one or more control signals CTRL are configured to cause the selection circuit 110 to output the entirety or a subset of the corresponding set of k-th bits A1k-ANk for each value of the counter k.
[0043] Each memory array 120A and 120B is an electronic circuit including M columns C1-CM, each column C1-CM including an adder tree 122, as described below, and corresponding memory cells BCX or BX2 coupled to the adder tree 122. The memory cells BCX or BX2 of each column C1-CM are further coupled to the selection circuit 110, and are thus configured in operation such that each column C1-CM simultaneously receives a selected k-th bit set A1k-ANk output from the selection circuit 110 based on a counter k.
[0044] Because each memory cell BCX is configured to receive a bit of a single data element A1-AN, the memory array 120A includes a total of N rows R1-RN of memory cells BCX, such that each row R1-RN corresponds to a row of data of the memory array 120A. Because each memory cell BX2 is configured to receive bits of two data elements A1-AN, the memory array 120B includes a total of L rows R1-RL of memory cells BX2, the number L being equal to N / 2, such that each row R1-RL corresponds to two rows of data of the memory array 120B. Figure 1A and Figure 1B In the embodiment depicted in , each instance of memory cell BCX or BX2 includes a location indicator, such as 21, corresponding to the column and row in which the given instance is located.
[0045] In some embodiments, the memory array 120A or 120B includes a number M of columns C1-CM ranging from 2 to 512. In some embodiments, the memory array 120A or 120B includes a number M of columns C1-CM ranging from 16 to 128.
[0046] exist Figure 1A and Figure 1B In the illustrated embodiment, each memory array 120A and 120B includes a single array layer of rows R1-RN or R1-RL and columns C1-CM. In some embodiments, one or both of the memory arrays 120A or 120B include one or more array layers (not shown) in addition to Figure 1A and Figure 1B In addition to the rows and columns of the single layers depicted in , rows and columns other than these single layers are also included.
[0047] The memory cell BCX includes a multiplier ( Figure 1A and Figure 1B A storage element (not shown) is an electrical, electromechanical, electromagnetic or other device configured to store one or more data bits represented by a logical state. In some embodiments, the logical state corresponds to the voltage level of the charge stored in part or all of the storage element. In some embodiments, the logical state corresponds to a physical property of part or all of the storage element, such as resistance or magnetic orientation.
[0048] In some embodiments, the storage element includes one or more static random access memory (SRAM) cells. In various embodiments, the SRAM cell (e.g., a five-transistor (5T), six-transistor (6T), eight-transistor (8T), or nine-transistor (9T) SRAM cell) includes transistors ranging from two to twelve. In some embodiments, the SRAM cell includes a multi-rail SRAM cell. In some embodiments, the SRAM cell includes a length that is at least twice greater than the width.
[0049] In some embodiments, the storage element includes one or more dynamic random access memory (DRAM) cells, resistive random access memory (RRAM) cells, magnetoresistive random access memory (MRAM) cells, ferroelectric random access memory (FeRAM) cells, NOR flash memory cells, NAND flash memory cells, conductive bridging random access memory (CBRAM) cells, data registers, non-volatile memory (NVM) cells, 3DNVM cells, or other memory cell types capable of storing bit data.
[0050] In some embodiments, the storage element is configured to store a number of data bits ranging from 1 to 16. In some embodiments, the storage element is configured to store a number of data bits ranging from 4 to 8.
[0051] The storage element includes one or more I / O connections (not shown) through which the logic state is programmed in a write operation and accessed in a read operation, such as a multiplication operation.
[0052] A multiplier is an electronic circuit that includes one or more logic gates configured to perform a mathematical operation (e.g., multiplication) based on a received data bit (e.g., one of the selected k-th bits A1k-ANk) and a received data element (e.g., a multi-bit weight data element stored in a storage element) to generate a product data element equal to the product of the input data bit and the input data element. In some embodiments, the multiplier is configured to generate a product data element including a number of bits equal to the number of bits of the received data element. In various embodiments, the multiplier includes one or more AND gates or NOR gates or other circuits suitable for performing some or all of the multiplication operations.
[0053] Each memory cell BCX is configured to generate a product data element P11-PMN based on a bit in the selected k-th bit set A1k-ANk and a weight data element corresponding to the position of the given memory cell BCX within the memory array 120A by including a storage element coupled to the multiplier and configured to store a weight data element, and a multiplier coupled to the selection circuit 110 and configured to receive a bit in the selected k-th bit set A1k-ANk. In some embodiments, the memory cell BCX includes the following information about Figure 3A The memory cell 300A is discussed.
[0054] The memory unit BX2 includes a first storage element coupled to the first multiplier, a second storage element coupled to the second multiplier, and an adder ( Figure 1A and Figure 1B ). The first storage element and the multiplier are configured to generate a first product data element as discussed above with respect to the memory cell BCX, and the second storage element and the multiplier are configured to generate a second product data element as discussed above with respect to the memory cell BCX.
[0055] An adder is an electronic circuit comprising one or more logic gates configured to perform a mathematical operation (e.g., addition) based on received first and second data elements (e.g., first and second product data elements generated by first and second multipliers) to generate a summed data element equal to the sum of the received first and second data elements. In some embodiments, the adder is configured to generate a summed data element comprising a number of bits greater than the number of bits of each of the received first and second data elements by one. In various embodiments, the adder comprises one or more full adder gates, half adder gates, ripple carry adder circuits, carry save adder circuits, carry select adder circuits, carry lookahead adder circuits, or other circuits suitable for performing part or all of the addition operation.
[0056] Each memory cell BX2 is configured to generate a summed data element S11-SML based on a selected set of k-th bits A1k-ANk and first and second weight data elements corresponding to a position of a given memory cell BX2 within the memory array 120B by including a first multiplier configured to generate a first product data element based on a first bit of a selected set of k-th bits A1k-ANk and a first stored weight data element, a second multiplier configured to generate a second product data element based on a second bit of a selected set of k-th bits A1k-ANk, and an adder coupled to each of the first and second multipliers. In some embodiments, the memory cell BX2 includes the following information about Figure 3B The memory cell 300B is discussed.
[0057] The adder tree 122 is composed of multiple layers of adders ( Figure 1A and Figure 1B An electronic circuit (not shown) in which a first layer is configured to receive a plurality of data elements, such as product data elements P11-PMN or sum data elements S11-SML, and a last layer includes a single adder configured to generate a data element, such as sum data elements SD1-SDM, based on the received plurality of data elements. In some embodiments, each of one or more consecutive layers between the first layer and the last layer is configured to receive a first number of sum data elements generated by a previous layer and to generate a second number of sum data elements based on the first number of sum data elements. The second number is half of the first number. Thus, the total number of layers includes the first layer and the last layer and each consecutive layer (if any). In some embodiments, the adder tree 122 includes the following regarding Figure 4 Adder tree 400 is discussed.
[0058] The adder tree 122 is thus configured to receive a number of data elements having a number equal to two raised to a power equal to the total number of levels, such that the number of data elements is the binary exponent of the total number of levels. Figure 1A In the illustrated embodiment, the memory array 120A includes each instance of the adder tree 122, which includes a total number of levels such that the total number of levels to the power of two is equal to N product data elements, for example, P11-P1N. Figure 1B In the illustrated embodiment, the memory array 120B includes each instance of the adder tree 122 that includes a total number of levels such that the total number of levels raised to the power of two is equal to L summed data elements, eg, S11 - S1L.
[0059] In some embodiments, adder tree 122 includes a total number of layers ranging from 2 to 9. In some embodiments, adder tree 122 includes a total number of layers ranging from 4 to 7.
[0060] In some embodiments, each adder in each level of adder tree 122 is configured to generate a corresponding summed data element that includes a number of bits that is one greater than the number of bits of the summed data element of the previous level, or, in the case of the first level, to receive a data element of the plurality of data elements.
[0061] exist Figure 1A In some embodiments depicted in the adder tree 122, the adder tree 122 includes a first layer configured to receive product data elements P11-PMN, which include a first number of bits equal to the number of bits of the weight data elements stored in each memory cell BCX, and a last layer configured to generate sum data elements SD1-SDM, which include a second number of bits equal to the first number of bits plus a value equal to the total number of layers in the adder tree 122.
[0062] exist Figure 1B In some embodiments depicted in the adder tree 122, the adder tree 122 includes a first layer configured to receive summed data elements S11-SML, which include a first number of bits that is one greater than the number of bits of the weight data elements stored in each memory cell BX2, and a last layer configured to generate summed data elements SD1-SDM, the summed data elements SD1-SDM including a second number of bits equal to the first number of bits plus a value equal to the total number of layers in the adder tree 122.
[0063] The I / O circuit 130 is an electronic circuit coupled to the control signal bus CTRLB and one or more I / O connections of each storage element in each memory cell BCX of the memory array 120A or each memory cell BX2 of the memory array 120B through one or more word lines, one or more bit lines, and / or one or more data lines (not shown). The I / O circuit 130 is thereby configured to program each memory cell BCX or BX2 to one or more logic states in a write operation and cause one or more logic states to be stored in each memory cell BCX or BX2 to be accessed in a read operation in response to one or more control signals CTRL received on the control signal bus CTRLB.
[0064] The accumulator 140 is coupled to the control signal bus CTRLB and includes one or more adders, one or more data registers, and one or more shifters ( Figure 1A and Figure 1BThe electronic circuits (not shown) are coupled together in a feedback arrangement. One or more adders are coupled to the adder tree 122 and are configured thereby to receive one of the summed data elements SD1-SDM, each of which is one of a sequence of sequential H summed data elements SD1-SDM corresponding to the selected k-th bit set A1k-ANk output from the selection circuit 110 based on the counter k.
[0065] The one or more adders are further configured to receive the shifted data elements output from the one or more shifters and generate an internal summed data element based on the shifted data elements and one of the summed data elements SD1-SDM. The one or more data registers are configured to receive the internal summed data elements from the one or more adders, store the internal summed data elements, and output the stored internal summed data elements to the one or more shifters and one of the corresponding output ports O1-OM. The one or more shifters are configured to receive the stored internal data elements output from the one or more data registers and generate shifted data elements by shifting the stored internal data elements by one bit in the MSB direction or the LSB direction.
[0066] The accumulator 140 is thus configured to perform an accumulation operation in response to one or more control signals CTRL received on the control signal bus CTRLB, whereby the stored internal summation data element is incremented with each of the sequence of summation data elements SD1-SDM. The one or more control signals CTRL are based on and / or include counter k information, and are configured to coordinate the accumulation operation with the sequential selection of the k-th bit set A1k-ANk, so that the stored internal data elements are shifted and added to the received summation data elements SD1-SDM in synchronization with the timing and MSB / LSB direction of the sequential generation of the k-th bit set A1k-ANk.
[0067] In operation, an accumulation operation is performed based on a loop counter k on an H-bit span of the k-th bit set A1k-ANk and a span of corresponding H instances of the summed data elements SD1-SDM, resulting in the internal data elements being stored in one or more data registers to be output on the corresponding output ports O1-OM as a corresponding one of the partial sums PS1-PSM.
[0068] The control circuit 150 is an electronic circuit configured to control the operation of the memory circuit 100A or 100B by generating a control signal CTRL and outputting the control signal CTRL on a control signal bus CTRLB. In operation, according to the embodiments discussed above and below, the selection circuit 110, the memory array 120A or 120B, the I / O circuit 130, and the accumulator 140 receive the control signal CTRL from the control signal bus CTRLB. In some embodiments, the control circuit 150 is configured to generate the control signal CTRL including and / or based on one or more clock signals.
[0069] In various embodiments, control circuitry 150 includes a hardware processor 152 and a non-transitory computer-readable storage medium 154. Computer-readable storage medium 154 is encoded with (i.e., stores) computer program code (i.e., a set of executable instructions), among other things. Execution of the instructions by hardware processor 152 represents (at least in part) memory circuit operation means, which implements, for example, the following description of Fig. 9 Method 900 discussed below and / or with respect to Fig.10 Part or all of method 1000 (hereinafter, referred to as process and / or method) is discussed.
[0070] In various embodiments, the processor 152 is electrically coupled to the computer-readable storage medium 154 via an I / O interface and electrically coupled to a network (details not shown) via a bus. The network interface is connected to the network (not shown) so that the processor 152 and the computer-readable storage medium 154 can be connected to external elements via the network. The processor 152 is configured to execute computer program code encoded in the computer-readable storage medium 154 so that the control circuit 150 and the memory circuit 100A or 100B can be used to perform part or all of the process and / or method. In one or more embodiments, the processor 152 is a central processing unit (CPU), a multiprocessor, a distributed processing system, an application-specific integrated circuit (ASIC), and / or a suitable processing unit.
[0071] In one or more embodiments, the computer-readable storage medium 154 is an electronic, magnetic, optical, electromagnetic, infrared, and / or semiconductor system (or device or device). For example, the computer-readable storage medium 154 includes semiconductor or solid-state memory, magnetic tape, removable computer disk, RAM, SRAM, DRAM, read-only memory (ROM), hard disk, and / or optical disk. In one or more embodiments using optical disks, the computer-readable storage medium 154 includes a compact disk read-only memory (CD-ROM), a compact disk read / write (CD-R / W), and / or a digital video disk (DVD).
[0072] In one or more embodiments, the computer readable storage medium 154 stores computer program code configured to cause the control circuit 150 to generate control signals so that they can be used to perform part or all of the processes and / or methods. In one or more embodiments, the computer readable storage medium 154 also stores information that helps perform part or all of the processes and / or methods.
[0073] By the above configuration, each memory circuit 100A and 100B is capable of receiving input data elements A1-AN on the input data bus IDB, sequentially selecting the k-th bit set A1k-ANk using the selection circuit 110, receiving a sequence of the selected bit set A1k-ANk at each column C1-CM of the memory cell BCX or BX2, and performing a series of synchronized mathematical operations using the memory cell BCX or BX2 and the corresponding adder tree 122, whereby the partial sum PS1-PSM is output on the output port O1-OM. By including the memory array 120A or 120B, the corresponding memory circuit 100A or 100B is configured to perform in-memory calculations, thereby generating at least one partial sum PS1-PSM based on the input data elements A1-AN and the stored weight data elements. Compared with the method in which the memory array does not include an element configured to perform in-memory calculations, such a memory circuit is capable of generating partial sums using a smaller area and a lower power level.
[0074] Figure 2 2 is a diagram of a selection circuit 200 according to some embodiments. The selection circuit 200 (also referred to as a multiplexing circuit 200 in some embodiments) can be used as described above with respect to Figure 1A and Figure 1B The selection circuit 110 discussed. The selection circuit 200 includes a data register 200R coupled to an input data bus IDB, and a plurality of N multiplexers M1-MN coupled to the data register 200R and a control signal bus CTRLB.
[0075] The data register 200R includes a first set of terminals (not shown) coupled to the input data bus IDB and is thereby configured to receive bit data of each input data element A1-AN including H bits and temporarily store the bit data. In various embodiments, the data register 200R is configured to receive bit data in parallel or serially during operation. The data register 200R includes a second set of terminals (not shown) coupled to the multiplexers M1-MN and is thereby configured to receive each of the H bits of each input data element A1-AN (such as Figure 2 Shown are A11-A1H, A21-A2H, ...AN1-ANH) outputs to multiplexers M1-MN.
[0076] The multiplexers M1-MN correspond to the input data elements A1-AN such that each multiplexer M1-MN includes a set of terminals (not labeled) configured to receive the H bits of the corresponding data element A1-AN. Each multiplexer M1-MN includes a corresponding output terminal M10-MNO and is thereby configured to output the selected k-th bit A1k-ANk of the corresponding data element A1-AN on the corresponding output terminal O1-ON in response to one or more control signals CTRL received on the control signal bus CTRLB in operation. The multiplexers M1-MN and the one or more control signals CTRL are configured to simultaneously output the same k-th bit of each data element A1-AN in operation, thereby generating a k-th bit set A1k-ANk based on the counter k as described above.
[0077] The selection circuit 200 is thus configured to be able to perform the above-mentioned operations with respect to the selection circuit 110 and Figure 1A and Figure 1B Operations Discussed. By including the selection circuit 200 as the selection circuit 110, each of the memory circuits 100A and 100B can achieve the benefits discussed above.
[0078] Figure 3A and Figure 3B 300A and 300B according to some embodiments. Memory cell 300A, also referred to as bit cell 300A in some embodiments, may be used as described above with respect to Figure 1A Memory cell 300B, also referred to in some embodiments as bit cell 300B, may be used as described above with respect to one or more instances of memory cell BCX. Figure 1B One or more instances of memory cell BX2 are discussed.
[0079] For the purpose of illustration, each memory cell 300A and 300B is simplified. In various embodiments, one or both of the memory cells 300A or 300B include Figure 3A and Figure 3B In various embodiments, the memory cell 300A or 300B includes multiple electrical connections to one or more word lines, one or more bit lines, and / or one or more data lines (not shown), thereby electrically connecting to the I / O circuit 130, as described above with respect to Figure 1A and Figure 1B Discussion, by which the weight data elements WTmn and WTm(n+1) discussed below are stored and / or accessed.
[0080] Each of the memory cells 300A and 300B includes a storage unit SU1 coupled to a multiplier MUL1. The memory cell 300B further includes a storage unit SU2 coupled to a multiplier MUL2 and an adder ADD coupled to each of the multipliers MUL1 and MUL2.
[0081] Memory unit SU1 is configured to store weight data element WTmn, and memory unit SU2 is configured to store weight data element WTm(n+1). In some embodiments, indicator m corresponds to one of the number M of columns C1-CM, and indicator n corresponds to one of the number N of data rows of memory array 120A or 120B.
[0082] In various embodiments, each storage unit SU1 and SU2 is configured to store a corresponding weight data element WTmn or WTm(n+1) including a single bit or multiple bits. In some embodiments, one or both of the storage units SU1 or SU2 are configured to store a corresponding weight data element WTmn or WTm(n+1), which includes multiple bits ranging from 1 to 16. In some embodiments, one or both of the memory cells SU1 or SU2 are configured to store a corresponding weight data element WTmn or WTm(n+1), including a number of bits ranging from 4 to 8. In some embodiments, one or both of the storage units SU1 or SU2 are configured to store a corresponding weight data element WTmn or WTm(n+1), which includes a programmable number of bits.
[0083] Each multiplier MUL1 and MUL2 is configured to perform a multiplication operation including a number of bits equal to the number of bits of the corresponding storage unit SU1 or SU2 coupled to the given multiplier MUL1 or MUL2. The multiplier MUL1 is configured to receive the weight data element WTmn from the storage unit SU1 and the first of the k-th bits A1k-ANk, such as Figure 3A and Figure 3B The multiplication is shown as Ank, and the product is output as the product data element Pmn.
[0084] In some embodiments, for example, in those embodiments in which memory cell 300A is used as memory cell BCX, based on indicators m and n, product data element Pmn corresponds to the product data element Pmn described above with respect to Figure 1A The memory cell 300A is thus configured to be able to perform the above-mentioned operations with respect to the memory cells BCX and Figure 1A Actions discussed.
[0085] The multiplier MUL2 is configured to receive the weight data element WTm(n+1) from the storage unit SU2 and the second one of the k-th bits A1k-ANk, such as Figure 3BIt is represented as A(n+1)k, and the product is output as the product data element Pm(n+1).
[0086] The adder ADD is configured to receive each product data element Pmn and Pm(n+1) having the number of bits of the corresponding multiplier MUL1 or MUL2, perform an addition operation, and output the sum as a summed data element Sml having a number of bits greater than the number of bits of each product data element Pmn and Pm(n+1) by 1. In some embodiments, the indicator 1 corresponds to one of the L rows of memory cells BX2 of the memory array 120B.
[0087] In some embodiments, for example, those in which memory cell 300B is used as memory cell BX2, the summed data element Sml based on indicators m and l corresponds to the summed data element Sml described above with respect to Figure 1B The memory cell 300B is thus configured to be able to perform the above-mentioned operations with respect to the memory cells BX2 and Figure 1B The operation in question.
[0088] By including the memory cell 300A as one or more instances of the memory cell BCX or including the memory cell 300B as one or more instances of the memory cell BX2, the corresponding memory circuit 100A or 100B can achieve the above-mentioned benefits.
[0089] Figure 4 is a diagram of an adder tree 400 according to some embodiments. The adder tree 400 may be used as described above with respect to Figure 1A and Figure 1B The adder tree 122 in question. The adder tree 400 comprises adders ADD1-ADDu of level u.
[0090] The first layer of adders includes adder ADD1, which is configured to receive a number U (=2 u ), so that the first level includes a number U / 2 of adders ADD1. In some embodiments, for example, those embodiments in which adder tree 400 is used as adder tree 122 in columns C1-CM of memory array 120A, the summed data elements SUM11-SUM1U correspond to a plurality of product data element cells BCX output by the corresponding memory column, for example, product data elements P11-P1N output by column C1, as described above with respect to Figure 1AIn some embodiments, for example, those embodiments in which adder tree 400 is used as adder tree 122 in columns C1-CM of memory array 120B, summed data elements SUM11-SUM1U correspond to a plurality of summed data element cells BX2 output by the corresponding memory column, for example, summing data elements S11-S1L output by column C1, as described above with respect to Figure 1B discussed.
[0091] Each adder ADD1 is configured to perform an addition operation on a corresponding received pair of summed data elements (e.g., SUM11 and SUM12) of summed data elements SUM11-SUM1U and output the sum as a corresponding one of summed data elements SUM21-SUM2(U / 2). The adder ADD1 is configured to receive summed data elements SUM11-SUM1U including a first bit number, e.g., Figure 1A The product data element P11-PMN discussed above Figure 1B The sum data elements S11 -SML discussed include a second number of bits, and output sum data elements SUM21 -SUM2 (U / 2), the sum data elements SUM21 -SUM2 (U / 2) including a second number of bits that is one greater than the first number.
[0092] The second layer of adders includes adders ADD2 of the number U / 4. Each adder ADD2 is configured to perform an addition operation on a corresponding received pair of summed data elements (e.g., SUM21 and SUM22) of summed data elements SUM21-SUM2 (U / 2), and output the sum as a corresponding one of summed data elements SUM31-SUM3 (U / 4). The adder ADD2 is configured to receive summed data elements SUM21-SUM2 (U / 2) including a second bit quantity and output summed data elements SUM31-SUM3 (U / 4) including a third bit quantity that is one greater than the second bit quantity.
[0093] The last layer of adders includes a single adder ADDu, which is configured to perform an addition operation on the summed data element pair SUMu1 and SUMu2 received from the previous layer of adders and output the sum as a summed data element SDm. The adder ADDu is configured to receive the summed data elements SUMu1 and SUMu2 including a fourth bit quantity, and output a summed data element SDm including a fifth bit quantity greater than the fourth bit quantity and equal to the first bit quantity plus the value u. In some embodiments, for example, in those embodiments in which the adder tree 400 is used as the adder tree 122, the summed data element SDm corresponds to the summed data element SDm described above with respect to Figure 1A and Figure 1B One of the summed data elements SD1-SDM discussed.
[0094] In various embodiments, adder tree 400 includes one or more additional adder layers located at Figure 4 Between the second and last layers shown, each additional layer is configured to be consistent with the configuration of the first, second, and last layers discussed above, so that in operation, a summation data element SDm is generated based on the received summation data elements SUM11-SUM1U. In some embodiments, the adder tree 400 does not include a second layer of adders ADD2, and thus includes a total of u=2 layers, so that in operation, a summation data element SDm is generated based on a total of U=4 summation data elements SUM11-SUM1U.
[0095] In some embodiments, adder tree 400 thus includes a total number of layers ranging from 2 to 9. In some embodiments, adder tree 400 thus includes a total number of layers ranging from 4 to 7.
[0096] Adder tree 400 is thus configured to be able to perform the above description with respect to adder tree 122 and Figure 1A and Figure 1B Operations Discussed. By including adder tree 400 as adder tree 122, each of memory circuits 100A and 100B can achieve the benefits discussed above.
[0097] Figure 5 is a diagram of an accumulator 500 according to some embodiments. The accumulator 500, also referred to as a partial summation circuit 500 in some embodiments, may be used as described above with respect to Figure 1A and Figure 1B The accumulator 140 in question. The accumulator 500 comprises an adder ADDA coupled to each of the data register R1 and the shifter SH1. The shifter SH1 is also coupled to the data register R1, so that the adder ADDA, the data register R1 and the shifter SH1 are thereby coupled together in a feedback arrangement.
[0098] The adder ADDA is configured to receive the summed data element SDm in operation, as described above with respect to Figure 4 In some embodiments, for example, in those embodiments where accumulator 500 is used as accumulator 140, the summed data element SDm corresponds to the summed data element SDm described above with respect to Figure 1A and Figure 1B One of the summed data elements SD1-SDM discussed.
[0099] The adder ADDA is also configured to receive the shifted data element SDE output from the shifter SH1 in operation, and generate an internal sum data element IDE based on the shifted data element SDE and the sum data element SDm. The data register R1 is configured to receive the internal sum data element IDE from the adder ADDA, store the internal sum data element IDE, and output the stored internal sum data element IDE to the shifter SH1 and the output port Om. The shifter SH1 is configured to receive the stored internal data element IDE output from the data register R1, and generate a shifted data element SDE by shifting the stored internal data element IDE by one bit in the MSB direction or the LSB direction.
[0100] Therefore, the accumulator 500 is configured to respond to the control signal bus CTRLB ( Figure 5 The accumulation operation is performed on a plurality of instances of the summed data element SDm, thereby causing the internal data element IDE stored in the data register R1 to be output on the output port Om as a partial sum PSm of the plurality of instances of the summed data element SDm.
[0101] In some embodiments, for example, in those embodiments where accumulator 500 is used as accumulator 140, the partial sum PSm on output port Om is output to the corresponding Figure 1A and Figure 1B The portion on the corresponding output port O1-OM in question and one of the PS1-PSM outputs.
[0102] The accumulator 500 is thus configured to be able to perform the above-described Figure 1A and Figure 1B Operations Discussed. By including accumulator 500 as accumulator 140, each of memory circuits 100A and 100B is able to achieve the benefits discussed above.
[0103] Figure 6 is a diagram of a portion of a memory array 120A or 120B (120A / 120B) according to some embodiments. Figure 6 Includes multiple instances of memory cells BCX or BX2 (BCX / BX2) and instances of adder tree 122, each of which is described above with respect to Figure 1A and Figure 1B Discussion. Figure 6 In the illustrated embodiment, the memory array 120A / 120B further includes a multiplexer MA coupled between the memory cells BCX / BX2 and the adder tree 122. Figure 6.
[0104] The multiplexer MA is configured to selectively couple one or more memory cells BCX / BX2 to the adder tree 122 so that, in operation, in response to a control signal bus CTRLB ( Figure 6 1-1 ) receives one or more control signals CTRL, and outputs data elements (such as product data elements P11-PMN or the above related data elements) from memory cells BCX / BX2. Figure 1A and Figure 1B The discussed sum data elements S11-SML) are selectively propagated to the adder tree 122. In various embodiments, the memory cells BCX / BX2 are included in the same column C1-CM or in separate columns C1-CM, so that the adder tree 122 is shared between the two columns C1-CM.
[0105] Through the above configuration, the memory circuit 100A or 100B includes a memory array 120A / 120B including at least one adder tree 122 shared among a plurality of memory cells BCX / BX2. In such an embodiment, the memory circuit 100A or 100B is thereby able to generate a partial sum using a smaller area compared to a method in which the memory array does not include at least one adder tree shared among a plurality of memory cells.
[0106] Fig. 7A and Figure 7B is a diagram of a portion of a memory circuit 100A or 100B (100A / 100B) according to some embodiments. Fig. 7A and Figure 7B Non-limiting examples in which two or more parts and PS1-PSM are combined are depicted and simplified for illustrative purposes.
[0107] exist Fig. 7A In the illustrated embodiment, the memory circuit 100A / 100B includes two instances of a respective memory array 120A / 120B and an accumulator 140, each of which is described above with respect to Figure 1A and Figure 1B was discussed. Fig. 7A In the illustrated embodiment, output port O2 of the first instance of accumulator 140 is coupled to the second instance of accumulator 140, such that in operation, partial sum PS2 is received by the second instance of accumulator 140 and the included partial sum PS1 is output on output port O1. In some embodiments, for example, in response to one or more control signals CTRLCTRLB ( Fig. 7A or Figure 7B(not shown), the two instances of accumulator 140 are configured to selectively output partial sums PS1 and PS2 without including partial sum PS2 in partial sum PS1 during operation.
[0108] exist Figure 7B In the illustrated embodiment, the memory circuit 100A / 100B includes each of the columns C1-C4 (including a corresponding instance of the accumulator 140) which is configured to receive input data elements A1-AN on the input data bus IDB and output corresponding partial sums PS1-PS4 in operation, as described above with respect to Figure 1A and Figure 1B discussed. Figure 7B In the illustrated embodiment, the memory circuit 100A / 100B further includes an adder ADDSUM configured to receive each partial sum PS1-PS4 during operation and generate a combined partial sum OSUM based on each partial sum PS1-PS4. In some embodiments, the memory circuit 100A / 100B is configured to selectively output the partial sum PS1-PS4 but not the partial sum OSUM during operation, for example in response to one or more control signals CTRL received on the control signal bus CTRLB.
[0109] exist Fig. 7A and Figure 7B In each of the non-limiting examples depicted in FIG. 1 , in operation, the partial sum PS1 or OSUM output from the memory circuit 100A / 100B is based on each input data element A1-AN combined with memory cells BCX / BX2 in two or more of the columns C1-CM. The partial sum PS1 or OSUM is thereby generated based on the combined bits of the weight data elements stored in the memory cells BCX / BX2, such that the resolution or precision of the partial sum PS1 or OSUM is increased PS1-PSM compared to an embodiment in which the partial sum is based on the input data elements A1-AN combined with a single column of the columns C1-CM.
[0110] In some embodiments, memory cells BCX / BX2 include a weight data element comprising a total of four bits such that, in operation, Fig. 7A In the embodiment depicted in , the partial sum PS1 is output based on a total of eight weight data elements and is Figure 7B In the illustrated embodiment, the partial sum OSUM is output based on a total of sixteen bits of weight data elements.
[0111] Fig. 7A and Figure 7BThe embodiments depicted in are non-limiting examples provided for purposes of illustration. In various embodiments, the memory circuits 100A / 100B are further configured to generate one or more partial sums based on combining stored weight data elements, thereby increasing resolution compared to partial sums and embodiments not based on combining weight data elements.
[0112] Figure 8 is a diagram of a memory circuit operating voltage VDD according to some embodiments. Figure 8 In the illustrated embodiment, the operating voltage VDD is the power supply voltage of the power domain in which the memory circuit 100A or 100B operates, as described above with respect to Figure 1A and Figure 1B The operating voltage VDD includes three power supply voltage levels 0V, VDD1 and VDD2, wherein the power supply voltage level VDD1 is greater than the power supply voltage level VDD2. Figure 8 The voltage levels and timing relationships, such as relative durations and / or amplitudes and sequences depicted in are non-limiting examples provided for illustrative purposes.
[0113] The power supply voltage level 0V represents a power-off mode in which no memory circuit operations are performed. In some embodiments, the memory array 120A or 120B includes memory cells SU1 and SU2 (if present), including non-volatile memory cells, such that the weight data elements WTmn and / or WTm(n+1) are retained with a voltage level of 0V during one or more cycles of the operating voltage VDD.
[0114] The power supply voltage level VDD1 represents an I / O mode during which one or more weight elements WTmn and / or WTm(n+1) are accessed in one or more write operations and / or in one or more read operations.
[0115] The power supply voltage level VDD2 represents a computing mode during which one or more in-memory computing operations are performed, as described above with respect to Figure 1A and Figure 1B discussed and / or as discussed below with respect to methods 900 and 1000.
[0116] exist Figure 8 In the illustrated embodiment, by performing memory calculations at a power supply voltage level VDD2 lower than the power supply voltage level VDD1, power consumption is reduced compared to a method of performing memory calculations in a calculation mode having the same voltage level as the power supply voltage level of the input / output mode.
[0117] Fig. 9 900 is a flow chart of a method 900 of operating a memory circuit according to some embodiments. The method 900 may be used with a memory circuit, such as the one described above with respect to Figure 1A and Figure 1B The memory circuit 100A or 100B is discussed.
[0118] Fig. 9 The order of operations of method 900 is described in . Fig. 9 For illustration only; the operations of method 900 can be performed simultaneously or in different Fig. 9 In some embodiments, except Fig. 9 In addition to the operations described in Fig. 9 The operations of method 900 are performed before, between, during, and / or after the operations shown. In some embodiments, the operations of method 900 are a subset of a method of operating an IC (e.g., a sensor, an RF device, a processor, a logic or signal processing circuit, etc.). In various embodiments, one or more operations of method 900 are the following with respect to Fig.10 A subset of method 1000 is discussed.
[0119] Method 900 is a non-limiting example of a partial sum calculation, where an instance PSm of a partial sum PS1-PSM is calculated for a corresponding m-th column in columns C1-CM, as described above with respect to Figure 1A-Figure 5 discussed. Fig. 9 In the illustrated embodiment, counter k cycles through each of the H bits of each input data element A1-AN. At each value of counter k, a summed data element P corresponding to an instance of summed data element SD1-SDM is calculated. k , as the sum of the N products of the corresponding k-th bit and weight data element Wmn. The partial sum PSm is obtained by accumulating the data element P k Generated as described below.
[0120] At operation 910, a counter k is initialized to zero. In some embodiments, initializing the counter k includes using the Figure 1A-Figure 5 Control circuit 150 is discussed.
[0121] In some embodiments, initializing the counter k to zero includes setting the contents of one or more data registers to zero. In some embodiments, initializing the counter k to zero includes setting the internal data element IDE of the data register R1 to zero, as described above with respect to the accumulator 500 and Figure 5 discussed.
[0122] At operation 920, the counter k is incremented by 1, and a summed data element P is generated based on the value of the counter k. kGenerating the summed data element Pk includes summing the product data elements corresponding to each of the N rows of data in the memory array 120A or 120B over a range defined from n=1 to N. Each nth product data element is the kth bit Ank of the input data element An corresponding to the counters n and k, multiplied by a corresponding weight data element Wmn or Wm(n+1). The resulting product data elements over the range n=1 to N are summed to generate summed data elements P corresponding to instances of summed data elements SD1-SDM. k .
[0123] In some embodiments, the summation data element P is generated k The method includes using an adder tree 122 corresponding to the mth column of columns C1-CM to sum the product data elements Pmn output by memory cells BCX in the range of n=1 to n=N, as described above with respect to memory circuits 100A and Figure 1A-Figure 5 In some embodiments, generating the summed data element Pk includes using the memory cell BX2 to generate the summed data elements Sm1-Sml in the range of l=1 to l=L, and using the adder tree 122 corresponding to the mth in the columns C1-CM to sum the summed data elements Sm1-Sml output by the memory cell BX2, as described above with respect to the memory circuit 100B and Figure 1A-Figure 5 discussed.
[0124] At operation 930, a partial summation data element O is generated based on the value of the counter k. k Generate partial sum data element O k includes adding the partial summation data element O to the counter k when the counter k has the value 1. k Initialized to sum data element P k The first value of the counter k, and when the value of the counter k is not 1, the data element O k Shift the previous value of (Ok-1) and add the sum data element P k The current value of .
[0125] Shifting the previous value of the partial summation data element Ok corresponds to increasing or decreasing the previous value by a significant bit. In some embodiments, increasing the counter k from 1 to H corresponds to increasing the significant bit of the input data elements A1-AN, and shifting the partial summation data element Ok by a significant bit. k The previous value of the shifted partial sum data element Ok corresponds to increasing the previous value by one significant bit, i.e., multiplying the previous value by two. In some embodiments, increasing the counter k from 1 to H corresponds to decreasing the significant bit of the input data elements A1-AN, and shifting the previous value of the partial sum data element Ok corresponds to decreasing the previous value by one significant bit, i.e., dividing the previous value by two.
[0126] In some embodiments, generating the partial summation data element Ok includes setting the partial summation data elements PS1-PSM to the internal data element IDE in the data register R1 by storing the first instance of the corresponding summation data element SD1-SDM as the first instance of the corresponding summation data element SD1-SDM, shifting the internal data element IDE using the shifter SH1, and adding subsequent instances of the summation data elements SD1-SDM to the shifter data element SDE, as described above with respect to Figure 1A-Figure 5 discussed.
[0127] At operation 940 , the counter k is compared to the number H. If the counter k is less than the number H, the method 900 returns to operation 920 , and if the counter k is equal to the number H, the method 900 continues to operation 950 .
[0128] At operation 950, the partial sum data element PSm is set to the final value of the partial sum data element Ok corresponding to the counter k=H. In some embodiments, the number H=4, incrementing the counter k corresponds to increasing the valid bits of the input data elements A1-AN, and setting the partial sum data element PSm to the final value of the partial sum data element Ok is given by: PSm=
[0129]
[0130] Where counter k = 1 corresponds to LSB, the coefficient is 2 0 , counter k = 4 corresponds to the MSB, the coefficient is 2 3 .
[0131] In some embodiments, the partial sum data element PSm is set to the partial sum data element O. k The final value of comprises outputting the mth partial summation data element PS1-PSM on the corresponding mth output port O1-OM, as described above with respect to Figure 1A-Figure 5 discussed.
[0132] By performing some or all of the operations of method 900 using memory circuit 100A or 100B, partial sums are generated based on in-memory calculations, thereby achieving the benefits discussed above with respect to memory circuits 100A and 100B.
[0133] Fig.10 1 is a flow chart of a method 1000 of operating a memory circuit according to some embodiments. The method 1000 may be used with a memory circuit, such as the one described above with respect to Figure 1A and Figure 1B The memory circuit 100A or 100B is discussed.
[0134] The order of operations of method 1000 is Fig.10The description is for illustration only; the operation of method 1000 can be performed in different Fig.10 In some embodiments, Fig.10 The operations shown are performed before, between, during and / or after Fig.10 In some embodiments, the operations of method 1000 are a subset of methods of operating an IC, such as a sensor, an RF device, a processor, a logic or signal processing circuit, etc. In some embodiments, the operations of method 1000 are a subset of methods of operating a CNN or other neural network.
[0135] At operation 1010, in some embodiments, a first weight data element is stored in each memory cell of a column of memory cells. In some embodiments, storing the first weight data element in each memory cell of a column of memory cells includes storing weight data in a column of a plurality of memory cells. In various embodiments, storing the first weight data element in each memory cell of a column of memory cells includes storing weight data elements WTmn and / or WTm(n+1) in memory cells BCX or BX2 of columns C1-CM using I / O circuit 130, as described above with respect to Figure 1A-Figure 5 discussed.
[0136] In some embodiments, storing the first weight data element in each memory cell of the column of memory cells includes operating the memory circuit at a first power supply voltage level greater than a second power supply voltage level, performing some or all of operations 1020-1070 at the first power supply voltage level. In some embodiments, operating the memory circuit at the first power supply voltage level includes operating the memory circuit at power supply voltage level VDD1, and operating the memory circuit at the second power supply voltage level includes operating the memory circuit at power supply voltage level VDD2, as described above with respect to Figure 8 discussed.
[0137] At operation 1020, in some embodiments, a set of k-th bits of each of the H bits of the plurality of input data elements is simultaneously output from the selection circuit. In some embodiments, simultaneously outputting a set of k-th bits of each of the H bits of the plurality of input data elements includes outputting a set of k-th bits A1k-ANk of the input data elements A1-AN from the selection circuit 110, as described above with respect to Figure 1A-Figure 5 discussed.
[0138] In various embodiments, outputting H bits of multiple input data elements simultaneously outputs a portion of the k-th bit set of each input data element sequentially by incrementing from LSB to MSB or from MSB to LSB.
[0139] In some embodiments, simultaneously outputting the k-th set of bits of each input data element of the plurality of input data elements comprises receiving the plurality of input data elements at a selection circuit. In some embodiments, simultaneously outputting the k-th set of bits of each input data element of the plurality of input data elements comprises storing the plurality of input data elements in the selection circuit, for example, in one or more data registers. In some embodiments, simultaneously outputting the k-th set of bits of each input data element of the plurality of input data elements comprises using the above description of Figure 1A and Figure 1B The selection circuit 110 discussed above receives and stores the input data elements A1-AN. In some embodiments, simultaneously outputting the k-th bit set of each input data element of the plurality of input data elements comprises using the above description of Figure 2 The selection circuit 200 is discussed.
[0140] In some embodiments, simultaneously outputting the set of k-th bits of the H bits of each input data element of the plurality of input data elements includes generating and responding to one or more control signals, for example, one or more control signals CTRL are generated by the control circuit 150 as described above with respect to Figure 1A-Figure 5 discussed.
[0141] In some embodiments, simultaneously outputting H bits of a plurality of input data elements. The k-th bit set of each input data element includes performing the following steps with respect to Fig. 9 Some or all of method 900 is discussed.
[0142] At operation 1030, a k-th set of bits is received at a column of memory cells. In various embodiments, receiving a k-th set of bits at a column of memory cells includes receiving a k-th set of bits A1k-ANk at a column of memory cells BCX or BX2, as described above with respect to Figure 1A-Figure 5 discuss.
[0143] In some embodiments, receiving a set of k bits at a column of memory cells includes receiving a set of k bits at each of a plurality of columns. In some embodiments, receiving a set of k bits at a plurality of columns includes Figure 1A-Figure 5 At each of the columns C1 -CM in question a set A1k -ANk of k-th bits is received.
[0144] In some embodiments, receiving the set of k bits at the column of memory cells includes performing the following steps with respect to Fig. 9 Some or all of method 900 is discussed.
[0145] At operation 1040, each memory cell of the column of memory cells is used to multiply the k-th bit of the corresponding input data element with the first weight data element stored in the memory cell, thereby generating a corresponding first product data element. In various embodiments, using the memory cell to multiply the k-th bit of the corresponding input data element with the first weight data element stored in the memory cell includes using the memory cell BCX or BX2 to multiply the k-th bit A1k-ANk with the first weight data element, as described above with respect to Figure 1A-Figure 5 discussed.
[0146] In some embodiments, multiplying the kth bit of the corresponding input data element by the first weight data element stored in the memory cell to generate the corresponding first product data element includes multiplying the bit Ank by the weight data element WTmn to generate the product data element Pmn, as described above with respect to the memory cells 300A and 300B and Figure 3A and Figure 3B discussed.
[0147] In some embodiments, multiplying the kth bit of a corresponding input data element of a plurality of data elements with a first weight data element using each memory cell of a column of memory cells includes multiplying the kth bit of another corresponding input data element of the plurality of data elements with a second weight data element stored in the memory cell using each memory cell of a column of memory cells to generate a second product data element, and adding the first product data element to the second product data element to generate a summed data element.
[0148] In some embodiments, multiplying the kth bit of another corresponding input data element of the plurality of data elements by a second weight data element stored in the memory unit to generate a second product data element, and adding the first product data element and the second product data element to generate a sum data element includes multiplying the bit A(n+1)k by the weight data element WTm(n+1) to generate a product data element Pm(n+1), and adding the product data element Pmn to the score data element Pm(n+1) to generate a sum data element Sml, as described above with respect to the memory unit 300B and Figure 3B discussed.
[0149] In some embodiments, using a column of memory cells to multiply the kth bit of the corresponding input data element by the first weight data element stored in the memory cell includes using a column of multiple memory cells (e.g., Figure 1A-Figure 5 Columns C1-CM) in question, multiplying the k-th bit of the corresponding input data element by the corresponding first weight data element of the plurality of first weight data elements.
[0150] In some embodiments, using a column of memory cells to multiply the kth bit of a corresponding input data element by a first weight data element stored in the memory cell comprises generating and responding to one or more of the above related Figure 1A-Figure 5 The control circuit 150 discussed generates one or more control signals (eg, one or more control signals CTRL).
[0151] In some embodiments, using a column of memory cells to multiply the kth bit of a corresponding input data element by a first weight data element stored in the memory cell comprises performing the following steps with respect to Fig. 9 Some or all of method 900 is discussed.
[0152] At operation 1050, a summation data element is generated based on each of the first product data elements using the adder tree. In some embodiments, generating the summation data element based on each of the first product data elements using the adder tree includes generating summation data elements SD1-SDM based on product data elements Pmn and / or Pm(n+1) using adder tree 122, as described above with respect to Figure 1A-Figure 5 discuss.
[0153] In some embodiments, using an adder tree to generate the summed data element includes using Figure 4 Adder tree 400 is discussed.
[0154] In some embodiments, using an adder tree to generate a summed data element includes using multiple adder trees to generate multiple summed data elements, such as described above with respect to Figure 1A-Figure 5 The summed data elements SD1-SDM are discussed.
[0155] In some embodiments, using the adder tree to generate the summed data element includes receiving a first product data element at the adder tree. In some embodiments, receiving the first product data element at the adder tree includes receiving product data elements P11-PMN at the adder tree 122, as described above with respect to Figure 1A-Figure 5 discussed.
[0156] In some embodiments, generating the summed data element using the adder tree includes receiving the summed data element at the adder tree. In some embodiments, receiving the summed data element at the adder tree includes receiving at the adder tree 122 as described above with respect to Figure 1A-Figure 5 The summation data element in question is S11-SML.
[0157] In some embodiments, using an adder tree to generate a summed data element includes using a multiplexer to couple the adder tree to a selected memory cell, for example, using the multiplexer described above with respect to Figure 1A-Figure 5 The multiplexer MA is discussed.
[0158] In some embodiments, using an adder tree to generate a summation data element based on each first product data element includes generating and responding to one or more of the above Figure 1A-Figure 5 The control circuit 150 discussed generates one or more control signals (eg, one or more control signals CTRL).
[0159] In some embodiments, generating a summed data element based on each of the first product data elements using the adder tree includes performing the following steps with respect to Fig. 9 Some or all of method 900 is discussed.
[0160] At operation 1060, the accumulator is used to generate a partial sum based on the summed data elements. In some embodiments, using the accumulator to generate a partial sum based on the summed data elements includes using the accumulator 140 to generate partial sums PS1-PSM based on the corresponding summed data elements SD1-SDM, as described above with respect to Figure 1A-Figure 5 discussed.
[0161] In some embodiments, generating the partial sum using the accumulator includes adding the first summed data element to the second summed data element stored in the data register and shifted by the shifter. In some embodiments, adding the first summed data element to the second summed data element is synchronized with a selection circuit that sequentially outputs a k-th set of bits. In some embodiments, generating the partial sum using the accumulator includes generating the partial sum PSm using the accumulator 500, as described above with respect to Figure 5 discussed.
[0162] In some embodiments, using an accumulator to generate a partial sum based on a summed data element includes using a plurality of accumulators to generate a plurality of partial summed data elements, e.g., as described above with respect to Figure 1A-Figure 5 The partial summation data elements PS1-PSM are discussed.
[0163] In some embodiments, using multiple accumulators to generate multiple partial sums includes using a first accumulator to generate a first partial sum based on a second partial sum generated by a second accumulator, for example, using a first instance of an accumulator 140 to generate a partial sum PS1 based on a partial sum PS2, as described above with respect to Fig. 7A discussed.
[0164] In some embodiments, using multiple accumulators to generate multiple partial sums includes using an adder to generate a partial sum based on multiple partial sums generated by the multiple accumulators, for example, using an adder ADDSUM to generate a partial sum OSUM based on partial sums PS1-PS4, as described above with respect to Figure 7B discussed.
[0165] In some embodiments, using an accumulator to generate a partial sum based on summing data elements includes generating and responding to one or more of the above Figure 1A-Figure 5 The control circuit 150 discussed generates one or more control signals (eg, one or more control signals CTRL).
[0166] In some embodiments, using an accumulator to generate a partial sum based on summed data elements includes performing the following steps with respect to Fig. 9 Some or all of method 900 is discussed.
[0167] At operation 1070, in some embodiments, some or all of operations 1010-1060 are repeated. In some embodiments, repeating some or all of operations 1010-1060 includes synchronizing the execution of some or all of operations 1010-1060. In some embodiments, repeating some or all of operations 1010-1060 includes incrementing a counter, such as described above with respect to Figure 1A-Figure 9 In some embodiments, repeating some or all of operations 1010-1060 includes generating one or more control signals, for example, using control circuit 150 to generate one or more control signals CTRL, as described above with respect to Figure 1A-Figure 5 discussed.
[0168] In some embodiments, repeating some or all of operations 1010-1060 includes performing the above Fig. 9 Some or all of method 900 is discussed.
[0169] In some embodiments, repeating some or all of operations 1010-1060 includes using an accumulator to generate a partial sum based on the H sum data elements, for example, using accumulator 140 to generate the sum data elements SD1-SDM corresponding to the partial sums PS1-PSM based on the H instances, as described above with respect to Figure 1A-Figure 5 discussed.
[0170] In some embodiments, repeating some or all of operations 1010-1060 includes sequentially multiplying the k-th bit set output by the selection circuit with the corresponding first weight data element to generate a plurality of first product data elements, such as the above Figure 3A and Figure 3B Let us discuss the first product data element Pmn.
[0171] In some embodiments, repeating some or all of operations 1010-1060 includes sequentially multiplying the k-th bit set output by the selection circuit with the corresponding second weight data element to generate a plurality of second product data elements, such as the above Figure 3B The second product data element in question is Pm(n+1).
[0172] In some embodiments, repeating some or all of operations 1010 - 1060 includes generating H summation data elements based on the plurality of first product data elements using an adder tree, and in some embodiments, further based on the plurality of second product data elements.
[0173] In some embodiments, the plurality of input data elements are a first plurality of input data elements of a set of plurality of input data elements, and repeating some or all of operations 1010-1060 includes sequentially receiving each plurality of the set of plurality of input data elements, and performing some or all of operations 1010-1060 to generate one or more portions and elements based on each plurality of the set of plurality of input data elements and a single plurality of weight data.
[0174] The benefits discussed above with respect to memory circuits 100A and 100B are achieved by performing some or all of the operations of method 1000 to generate partial sums based on memory calculations. In embodiments where one or more partial sums are generated based on each of a plurality of input data elements of a set of a plurality of input data elements and a single plurality of weight data elements, power levels are further reduced compared to methods where a single plurality of weight data elements are not reused for multiple in-memory partial sum calculations.
[0175] In some embodiments, a memory circuit includes: a selection circuit configured to: receive a plurality of input data elements, each input data element of the plurality of input data elements including a number of bits equal to H, and output a selected set of the kth bit of the H bits of each input data element of the plurality of data elements; a column of memory cells, each memory cell of the column of memory cells including: a first storage unit for storing a first weight data element; and a first multiplier configured to generate a first product data element based on the first weight data element and a corresponding first kth bit of the selected set of kth bits; and an adder tree configured to generate a summation data element based on each of the first product data elements. In some embodiments, each weight data element is a multi-bit data element. In some embodiments, each memory cell of the column of memory cells further comprises: a second storage unit configured to store a second weight data element; a second multiplier configured to generate a second product data element based on the second weight data element and the corresponding second k-th bit of the selected set of k-th bits; and an adder configured to generate a sum data element from the first product data element and the second product data element, wherein the adder tree is configured to generate the sum data element based on each of the sum data elements. In some embodiments, the sum data element is one of H sum data elements, the selection circuit is configured to sequentially output the set of k-th bits from the first bit to the H-th bit, the adder tree is configured to generate each of the H sum data elements based on the set of k-th bits sequentially output, and the memory circuit further comprises an accumulator configured to generate a partial sum based on the H sum data elements. In some embodiments, the memory circuit further comprises a control circuit configured to generate one or more control signals received by the selection circuit and the accumulator, so that the memory circuit is configured to generate a partial sum synchronized with the selection circuit of the set of k-th bits sequentially output. In some embodiments, the column of memory cells is a column of multiple columns of memory cells, each column of memory cells is configured to receive a set of selected k-th bits of H bits of each multiple bits, the adder tree is one of multiple adder trees coupled to the corresponding column of the multiple columns of memory cells, the accumulator is one of multiple accumulators, coupled to a corresponding adder tree of multiple adder trees, and each of the multiple accumulators is configured to generate a corresponding partial sum based on H summed data elements generated by the corresponding adder tree of the multiple adder trees. In some embodiments, at least one accumulator of the multiple accumulators is configured to generate a corresponding partial sum based on a partial sum generated by another accumulator of the multiple accumulators. In some embodiments, each first memory cell includes a static random access memory (SRAM) device configured to store some or all of the first weight data elements.In some embodiments, the memory circuit further includes input / output (I / O) circuitry configured to store each first weight data element in a corresponding first memory cell.
[0176] In some embodiments, a method of operating a memory circuit includes: receiving a set of k-th bits of each input data element of a plurality of input data elements at a column of memory cells; using each memory cell of the column of memory cells to multiply the k-th bit of a corresponding input data element of the plurality of data elements with a first weight data element stored in the memory cell, thereby generating a corresponding first product data element; and using an adder tree to generate a summed data element based on each of the first product data elements. In some embodiments, using each memory cell of the column of memory cells to multiply the k-th bit of the corresponding input data element of the plurality of data elements with the first weight data element includes using each memory cell of the column of memory cells to: multiply the k-th bit of another corresponding input data element of the plurality of data elements with a second weight data element stored in the memory cell, thereby generating a second product data element; and adding the first product data element to the second product data element to generate a summed data element, wherein using the adder tree to generate the summed data element is based on each of the corresponding summed data elements. In some embodiments, the method also includes: using a selection circuit to sequentially output a set of k-th bits of H bits of each input data element of a plurality of input data elements; and using an accumulator to generate a partial sum based on the H sum data elements, wherein using each memory cell of a column of memory cells to multiply the k-th bit of a corresponding input data element of the plurality of data elements with a first weight data element includes sequentially multiplying each k-th bit with the first weight data element, thereby generating a plurality of first product data elements, and using an adder tree to generate a sum data element based on each of the first product data elements includes using the adder tree to generate H sum data elements based on the plurality of first product data elements. In some embodiments, receiving a set of k-th bits of each input data element of a plurality of input data elements includes receiving a set of k-th bits at each memory cell of a column of a plurality of memory cells, multiplying the k-th bit with a first weight data element using each memory cell of the column of memory cells includes multiplying the k-th bit with a corresponding first weight data element stored in the memory cell using each memory cell of the column of memory cells to generate a corresponding first product data element, generating a summed data element using an adder tree includes generating a plurality of summed data elements based on the first product data element using a plurality of adder trees, and generating partial sums using an accumulator includes generating a plurality of partial sums based on the corresponding H summed data elements using a plurality of accumulators. In some embodiments, generating the plurality of partial sums using a plurality of accumulators includes generating a first partial sum based on a second partial sum generated by a second accumulator using a first accumulator.In some embodiments, using an accumulator to generate a partial sum includes adding a first sum data element to a second sum data element stored in a data register and shifted by a shifter, and adding the first sum data element to the second sum data element is synchronized with a selection circuit sequentially outputting a set of k bits. In some embodiments, using a selection circuit to sequentially output a set of k bits of H bits of each input data element of a plurality of input data elements includes outputting a set of k bits from a least significant bit (LSB) to a most significant bit (MSB). In some embodiments, the method further includes: storing a first weight data element in each memory cell of a column of memory cells based on a first power supply voltage level, wherein multiplying the k bit with the first weight data element using each memory cell of the column of memory cells and generating each of the sum data elements using an adder tree is based on a second power supply voltage level lower than the first power supply voltage level.
[0177] In some embodiments, a memory circuit includes: a selection circuit configured to sequentially output a set of selected k-th bits to a corresponding memory cell of each column of a plurality of memory cells for a plurality of input data elements respectively including H bits; a plurality of adder trees, each of the plurality of adder trees being coupled to a corresponding column of the plurality of memory cells; and a plurality of accumulators, each of the plurality of accumulators being coupled to a corresponding adder tree of the plurality of adder trees, wherein each memory cell of each column of the memory cells includes a multiplier, the multiplier being configured to generate a product data element based on a corresponding k-th bit in the set of selected k-th bits and a weight data element stored in the memory cell, each of the plurality of adder trees being configured to generate a sum data element based on each of the product data elements of the corresponding column of the memory cells for each sequentially output set of k-th bits, and each of the plurality of accumulators being configured to generate a partial sum based on the sum data element generated by the corresponding adder tree of the plurality of adder trees. Each adder tree of the plurality of adder trees includes: a first adder configured to receive a first summed data element and a second summed data element and output the summed data element having a first number of bits; and a second adder and a third adder configured to output the first summed data element and the second summed data element based on product data elements of the corresponding column of memory cells, each of the first summed data element and the second summed data element having a second number of bits less than the first number of bits by one. In some embodiments, at least one adder tree of the plurality of adder trees is coupled to the corresponding column of memory cells of the plurality of columns of memory cells via a multiplexer.
[0178] The features of several embodiments are summarized above so that those skilled in the art can better understand the various aspects of the present disclosure. Those skilled in the art will appreciate that they can easily use the present disclosure as a basis for designing or modifying other processes and structures for realizing the same purpose of the embodiments introduced herein and / or realizing the same advantages thereof. Those skilled in the art will also appreciate that such equivalent structures do not deviate from the spirit and scope of the present invention, and they can make various changes, substitutions and changes in the present invention without deviating from the spirit and scope of the present invention.
Claims
1. A memory circuit, comprising: The selection circuit is configured as follows: receiving a plurality of input data elements, each input data element of the plurality of input data elements comprising a number of bits equal to H, and outputting a selected set of k-th bits of H bits of each input data element of the plurality of input data elements; A column of memory cells, each memory cell of the column of memory cells comprising: A first storage unit, used to store a first weight data element; a first multiplier configured to generate a first product data element based on the first weight data element and a corresponding first k-th bit of the selected set of k-th bits; a second storage unit configured to store a second weight data element; a second multiplier configured to generate a second product data element based on the second weight data element and a corresponding second k-th bit of the selected set of k-th bits; and an adder configured to generate a sum data element from the first product data element and the second product data element; and An adder tree is configured to generate a summed data element based on each of the sum data elements; wherein each memory cell is configured to simultaneously receive a corresponding k-th bit of the selected set of k-th bits from the selection circuit.
2. The memory circuit according to claim 1, wherein: Each weight data element is a multi-bit data element.
3. The memory circuit according to claim 1, wherein: The adder tree is an electronic circuit comprising multiple layers of adders.
4. The memory circuit according to claim 1, wherein The summed data element is one of the H summed data elements, The selection circuit is configured to output a set of k-th bits sequentially from the first bit to the H-th bit, The adder tree is configured to generate each of the H summed data elements based on a set of k-th bits output sequentially, and The memory circuit also includes an accumulator configured to generate a partial sum based on the H summed data elements.
5. The memory circuit of claim 4 , further comprising a control circuit configured to generate one or more control signals received by the selection circuit and the accumulator, whereby the memory circuit is configured to generate the partial sum synchronized with the selection circuit of the set of k-th bits output sequentially.
6. The memory circuit according to claim 4, wherein The column of memory cells is one of a plurality of columns of memory cells, each column of memory cells being configured to receive a selected k-th set of H bits of each plurality of bits, The adder tree is one of a plurality of adder trees coupled to corresponding columns of the plurality of columns of memory cells, The accumulator is one of the plurality of accumulators coupled to a corresponding adder tree of the plurality of adder trees, and Each accumulator of the plurality of accumulators is configured to generate a respective partial sum based on H summed data elements generated by a respective adder tree of the plurality of adder trees.
7. The memory circuit according to claim 6, wherein: At least one accumulator of the plurality of accumulators is configured to generate a respective partial sum based on a partial sum generated by another accumulator of the plurality of accumulators.
8. The memory circuit according to claim 1, wherein: Each first memory unit comprises a static random access memory device configured to store some or all of the first weight data elements.
9. The memory circuit of claim 1, further comprising an input / output circuit configured to store each first weight data element in a corresponding first storage unit.
10. A method of operating a memory circuit, the method comprising: receiving a set of k-th bits of each input data element of H number of bits of a plurality of input data elements at a column of memory cells, wherein each memory cell simultaneously receives a corresponding k-th bit of the set of k-th bits; multiplying, using each memory cell of the column of memory cells, a k-th bit of a corresponding input data element of the plurality of data elements by a first weight data element stored in the memory cell to generate a corresponding first product data element, Wherein, using each memory cell of the column of the memory cells to multiply the k-th bit of the corresponding input data element of the plurality of data elements by the first weight data element comprises using each memory cell of the column of the memory cells to: multiplying a k-th bit of another corresponding input data element of the plurality of data elements by a second weight data element stored in the memory unit to generate a second product data element; and adding the first product data element to the second product data element to generate a sum data element; and A summed data element is generated based on each of the corresponding sum data elements using an adder tree.
11. The method according to claim 10, wherein: The adder tree is an electronic circuit comprising multiple layers of adders.
12. The method according to claim 10, further comprising: sequentially outputting a set of k-th bits of H bits of each input data element of the plurality of input data elements using a selection circuit; and Use an accumulator to generate a partial sum based on the H summed data elements, in multiplying the k-th bit of the corresponding input data element of the plurality of data elements with the first weight data element using each memory cell of the column of memory cells comprises sequentially multiplying each k-th bit with the first weight data element to generate a plurality of first product data elements, and Using the adder tree to generate the summed data element based on each of the first product data elements includes using the adder tree to generate the H summed data elements based on the plurality of first product data elements.
13. The method according to claim 12, wherein: receiving the k-th set of bits of each input data element of the plurality of input data elements comprises receiving the k-th set of bits at each column of a plurality of columns of memory cells, multiplying the kth bit with the first weight data element using each memory cell of the column of the memory cells comprises multiplying the kth bit with a corresponding first weight data element stored in the memory cell using each memory cell of the column of each memory cell of the columns of the plurality of memory cells, thereby generating a corresponding first product data element, Generating the summed data element using the adder tree includes using a plurality of adder trees to generate a plurality of summed data elements based on the first product data element, and Generating the partial sum using the accumulator includes using a plurality of accumulators to generate a plurality of partial sums based on corresponding H summed data elements.
14. The method according to claim 13, wherein: Generating the plurality of partial sums using the plurality of accumulators includes generating a first partial sum using a first accumulator based on a second partial sum generated by a second accumulator.
15. The method according to claim 12, wherein: Generating the partial sum using the accumulator includes adding a first summed data element to a second summed data element stored in a data register and shifted by a shifter, and Adding the first summed data element to the second summed data element is synchronized with the selection circuit sequentially outputting the set of k-th bits.
16. The method according to claim 12, wherein: Sequentially outputting the set of k-th bits of the H bits of each input data element of the plurality of input data elements using the selection circuit includes outputting the set of k-th bits from a least significant bit to a most significant bit.
17. The method according to claim 10, further comprising: storing the first weight data element in each memory cell of the column of memory cells based on a first supply voltage level, wherein multiplying the kth bit with the first weight data element using each memory cell of the column of memory cells and generating each of the summed data elements using the adder tree is based on a second supply voltage level that is lower than the first supply voltage level.
18. A memory circuit comprising: a selection circuit configured to sequentially output a selected set of k-th bits to a corresponding memory cell of each column of a plurality of memory cells for a plurality of input data elements each comprising H bits; a plurality of adder trees, each adder tree of the plurality of adder trees coupled to a corresponding column of memory cells of the plurality of columns of memory cells; and a plurality of accumulators, each accumulator of the plurality of accumulators being coupled to a corresponding adder tree of the plurality of adder trees, in each memory cell of the column of each memory cell is configured to simultaneously receive a corresponding k-th bit of the selected set of k-th bits from the selection circuit, each memory cell of the column of each memory cell comprises a multiplier configured to generate a product data element based on a corresponding k-th bit of the selected set of k-th bits and a weight data element stored in the memory cell, Each adder tree of the plurality of adder trees is configured to generate, for each sequentially output set of k-th bits, a summed data element based on each of the product data elements of the corresponding column of the memory cells, Each of the plurality of adder trees includes a first adder, a second adder, and a third adder, the first adder being configured to receive a first sum data element and a second sum data element and output the sum data element having a first number of bits, the second adder and the third adder being configured to output the first sum data element and the second sum data element based on the product data element of the corresponding column of the memory cells, each of the first sum data element and the second sum data element having a second number of bits that is one less than the first number of bits, and Each accumulator of the plurality of accumulators is configured to generate a partial sum based on the summed data elements generated by a corresponding adder tree of the plurality of adder trees.
19. The memory circuit according to claim 18, wherein: Each weight data element is a multi-bit data element.
20. The memory circuit of claim 18, wherein: At least one adder tree of the plurality of adder trees is coupled to a corresponding column of memory cells of the plurality of columns of memory cells through a multiplexer.
Citation Information
Patent Citations
Digital bit-serial multi-multiply-and-accumulate compute in memory
US20190065151A1
