# US 2025/0094126 A1 · In-memory computation circuit and method

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0094126 A1
- Document ID: US20250094126A1
- Status: Published application
- Kind: A1
- Application number: 18/968,682
- Filed: 2024-12-04
- Published: 2025-03-20
- Earliest claimed: 2020-07-14
- Assignees: Taiwan Semiconductor Manufacturing Company, Ltd.
- Applicants: Taiwan Semiconductor Manufacturing Company, Ltd.
- Inventors: Yu-Der CHIH; Hidehiro FUJIWARA; Yi-Chun SHIH; Po-Hao LEE; Yen-Huei CHEN; Chia-Fu LEE; Jonathan Tsung-Yung CHANG
- Web page: https://patentgrep.com/patent/US20250094126A1

## CPC

- G06F 7/501: Half or full adders, i.e. basic adder cells for one denomination
- G11C 7/1006: {Data managing, e.g. manipulating data before writing or reading out, data bus switches or control circuits therefor}
- G06F 7/5318: {with column wise addition of partial products, e.g. using Wallace tree, Dadda counters (G06F7/5324 takes precedence)}
- G06F 7/5443: {Sum of products (for applications thereof, see the relevant places, e.g. G06F17/10, H03H17/00)}
- G11C 7/1012: {Data reordering during input/output, e.g. crossbars, layers of multiplexers, shifting or rotating}
- G11C 7/1036: {using data shift registers}
- G11C 11/4074: Power supply or voltage generation circuits, e.g. bias voltage generators, substrate voltage generators, back-up power, power control circuits
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G11C: STATIC STORES (semiconductor memory devices H10B)

## Abstract

A memory circuit includes a column of memory cells configured to receive a set of kth bits of a number H of bits of each input data element of a plurality of input data elements, and each memory cell of the column of memory cells is configured to multiply the kth bit of a corresponding input data element of the plurality of data elements with a first weight data element stored in the memory cell, and to generate a corresponding first product data element. The memory circuit includes an adder tree configured to generate a summation data element based on each of the first product data elements.

## Claims

### Claim 1

A memory circuit comprising:
a column of memory cells configured to receive a set of kth bits of a number H of bits of each input data element of a plurality of input data elements,
wherein each memory cell of the column of memory cells is configured to multiply the kth bit of a corresponding input data element of the plurality of data elements with a first weight data element stored in the memory cell, and to generate a corresponding first product data element; and
an adder tree configured to generate a summation data element based on each of the first product data elements.

### Claim 2 (depends on 1)

The memory circuit of claim 1, wherein
the adder tree is configured to receive the first product data elements from the corresponding memory cells of the column of memory cells.

### Claim 3 (depends on 1)

The memory circuit of claim 1, wherein
each memory cell of the column of memory cells is further configured to:
multiply the kth bit of a corresponding additional input data element of the plurality of data elements with a second weight data element stored in the memory cell;
generate a corresponding second product data element; and
generate a sum data element by adding the first and second product data elements, and
the adder tree is configured to receive the sum data elements from the corresponding memory cells of the column of memory cells.

### Claim 4 (depends on 1)

The memory circuit of claim 1, further comprising:
a selection circuit configured to output the set of kth bits as one of a sequence of sets of kth bits of the number H of bits of each input data element of the plurality of input data elements,
wherein the sequence of sets of kth bits ranges from k=1 to k=H and corresponds to either a first order from a least significant bit (LSB) to a most significant bit (MSB) of each input data element of the plurality of input data elements or a second order from the MSB to the LSB of each input data element of the plurality of input data elements.

### Claim 5 (depends on 4)

The memory circuit of claim 4, wherein
each memory cell of the column of memory cells is configured to generate the corresponding first product data element as one of a sequence of first product data elements corresponding to the first or second order,
the adder tree is configured to generate the summation data element as one of a sequence of summation data elements corresponding to the first or second order, and
the memory circuit further comprises an accumulator configured to generate a partial sum from the sequence of summation data elements corresponding to the first or second order.

### Claim 6 (depends on 5)

The memory circuit of claim 5, further comprising:
a control circuit configured to generate one or more control signals,
wherein the accumulator comprises a data shifter configured to perform a shift operation in an MSB or LSB direction corresponding to the first or second order responsive to the one or more control signals.

### Claim 7 (depends on 6)

The memory circuit of claim 6, wherein
the selection circuit comprises:
a data register configured to store the plurality of input data elements; and
a plurality of multiplexers coupled to the data registers and configured to output the sequence of sets of kth bits of the number H of bits of each input data element of the plurality of input data elements in the first or second order responsive to the one or more control signals.

### Claim 8 (depends on 1)

The memory circuit of claim 1, wherein
each memory cell of the column of memory cells comprises a static random-access memory (SRAM) device configured to store the corresponding first weight data element.

### Claim 9 (depends on 1)

The memory circuit of claim 1, wherein
the column of memory cells is a first column of memory cells, and
the memory circuit further comprises:
a second column of memory cells; and
a multiplexer configured to couple each of the first and second columns of memory cells to the adder tree.

### Claim 10

A memory circuit comprising
a selection circuit configured to, for a plurality of input data elements comprising H bits each, sequentially output selected sets of kth bits to corresponding memory cells of each column of memory cells of a plurality of columns of memory cells, wherein each kth bit of each selected set of kth bits is output to a single memory cell of each column of memory cells of the plurality of columns of memory cells; and
a plurality of adder trees, each adder tree of the plurality of adder trees being coupled to a corresponding column of memory cells of the plurality of columns of memory cells,
wherein
each memory cell of each column of memory cells comprises a multiplier configured to generate a product data element based on the corresponding kth bit of the selected set of kth bits and a weight data element stored in the memory cell, and
each adder tree of the plurality of adder trees is configured to generate, for each sequentially output set of kth bits, a summation data element based on each of the product data elements of the corresponding column of memory cells.

### Claim 11 (depends on 10)

The memory circuit of claim 10, wherein
each adder tree of the plurality of adder trees comprises a plurality of layers of adders,
the first layer of adders of each plurality of layers of adders is coupled to the multipliers of the memory cells of the column of memory cells coupled to the corresponding adder tree, and
the last layer of adders of each plurality of layers of adders comprises a single adder configured to output the corresponding summation data element.

### Claim 12 (depends on 10)

The memory circuit of claim 10, wherein
the multiplier of each memory cell of each column of memory cells is a first multiplier configured to generate the product data element based on the corresponding kth bit of the selected set of kth bits and the weight data element being a first product data element based on a corresponding first kth bit of the selected set of kth bits and a first weight element stored in the memory cell,
each memory cell of each column of memory cells further comprises:
a second multiplier configured to generate a second product data element based on a corresponding second kth bit of the selected set of kth bits and a second weight element stored in the memory cell; and
a memory cell adder configured to generate a sum data element based on the first and second product data elements,
each adder tree of the plurality of adder trees comprises a plurality of layers of adders,
the first layer of adders of each plurality of layers of adders is coupled to the memory cell adders of the memory cells of the column of memory cells coupled to the corresponding adder tree, and
the last layer of adders of each plurality of layers of adders comprises a single adder configured to output the corresponding summation data element.

### Claim 13 (depends on 10)

The memory circuit of claim 10, further comprising:
a plurality of accumulators coupled to the plurality of adder trees, wherein
each accumulator of the plurality of accumulators is configured to generate a partial sum based on the summation data elements generated by a corresponding adder tree of the plurality of adder trees, and
a first accumulator of the plurality of accumulators is configured to generate the corresponding first partial sum further based on a second partial sum generated by a second accumulator of the plurality of accumulators.

### Claim 14 (depends on 10)

The memory circuit of claim 10, further comprising:
a plurality of accumulators coupled to the plurality of adder trees, wherein each accumulator of the plurality of accumulators is configured to generate a partial sum based on the summation data elements generated by a corresponding adder tree of the plurality of adder trees; and
a partial sum adder coupled to two or more accumulators of the plurality of accumulators and configured to generate a combined partial sum based on the two or more partial sums generated by the corresponding two or more accumulators of the plurality of accumulators.

### Claim 15 (depends on 10)

The memory circuit of claim 10, wherein the memory circuit is configured to:
cause the plurality of adder trees to generate the summation data elements based on a first power supply voltage level, and
cause the weight data elements to be stored in the corresponding memory cells of the column of memory cells based on a second power supply voltage level greater than the first power supply voltage level.

### Claim 16

A method of operating a memory circuit, the method comprising:
receiving, at a selection circuit, a plurality of input data elements, wherein each input data element of the plurality of input data elements includes H bits;
receiving, at a column of memory cells coupled to the selection circuit, a set of kth bits of the number H of bits of each input data element; and
using each memory cell of the column of memory cells to multiply the kth 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.

### Claim 17 (depends on 16)

The method of claim 16, wherein
the using each memory cell of the column of memory cells to multiply the kth bit of the corresponding input data element of the plurality of data elements with the first weight data element comprises using each memory cell of the column of memory cells to:
multiply 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, thereby generating a second product data element; and
add the first product data element to the second product data element to generate a sum data element.

### Claim 18 (depends on 16)

The method of claim 16, wherein
the receiving the plurality of input data elements at the selection circuit comprises outputting the set of kth bits from the selection circuit as one of a sequence of sets of kth bits of the number H of bits of each input data element of the plurality of input data elements,
the sequence of sets of kth bits ranges from k=1 to k=H and corresponds to either a first order from a least significant bit (LSB) to a most significant bit (MSB) of each input data element of the plurality of input data elements or a second order from the MSB to the LSB of each input data element of the plurality of input data elements, and
the using each memory cell of the column of memory cells to multiply the kth bit of the corresponding input data element of the plurality of data elements with the first weight data element stored in the memory cell comprises generating corresponding sequences of first product data elements by multiplying each kth bit of the corresponding input data element of the plurality of data elements with the first weight data element stored in the memory cell.

### Claim 19 (depends on 18)

The method of claim 18, further comprising:
using an adder tree to generate a sequence of summation data elements based on the sequences of first product data elements, and
using an accumulator to generate a partial sum from the sequence of summation data elements by performing a shift operation in an MSB or LSB direction corresponding to the first or second order.

### Claim 20 (depends on 16)

The method of claim 16, wherein
the using each memory cell of the column of memory cells to multiply the kth bit of the corresponding input data element of the plurality of data elements with the first weight data element comprises the first weight data element being stored in a static random-access memory (SRAM) device.
