# US 2025/0245286 A1 · In-memory matrix multiplication with binary complement inputs

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

- Number: US 2025/0245286 A1
- Document ID: US20250245286A1
- Status: Published application
- Kind: A1
- Application number: 18/428,850
- Filed: 2024-01-31
- Published: 2025-07-31
- Earliest claimed: 2024-01-31
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Manuel Le Gallo-Bourdeau; Abhairaj Singh; Abu Sebastian; Athanasios Vasilopoulos
- Web page: https://patentgrep.com/patent/US20250245286A1

## CPC

- G06F 17/16: Matrix or vector computation {, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization (matrix transposition G06F7/78)}
- G06F 7/5443: {Sum of products (for applications thereof, see the relevant places, e.g. G06F17/10, H03H17/00)}
- G06F 2207/3812: Devices capable of handling different types of numbers
- G06F 2207/481: Counters performing arithmetic operations
- G06F 2207/4814: Non-logic devices, e.g. operational amplifiers
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A matrix-vector multiplication device includes an input encoder that encodes an input vector into a binary complement format value and a binary true format value; a pulse generator that converts each encoded bit of the binary complement format value and each encoded bit of the binary true format value into a corresponding pulse signal; a crossbar array of weights, wherein each weight is encoded as a differential analog conductance of resistive memory devices, wherein the pulse generator simultaneously applies a pulse signal corresponding to a given encoded bit of the binary complement format value and a pulse signal corresponding to a given encoded bit of the binary true format value to corresponding resistive memory devices; an analog-to-digital converter that digitizes outputs of the crossbar array of weights to generate partial dot-product results; and a digital counter that computes a final dot-product result from the partial dot-product results.

## Claims

### Claim 1

A matrix-vector multiplication device comprising:
an input encoder that encodes an input vector into a binary complement format value and a binary true format value;
a pulse generator that converts each encoded bit of the binary complement format value and each encoded bit of the binary true format value into a corresponding pulse signal;
a crossbar array of weights, wherein each weight is encoded as a differential analog conductance of at least two resistive memory devices, wherein the pulse generator simultaneously applies at least one pulse signal corresponding to a given encoded bit of the binary complement format value to a corresponding resistive memory device of the at least two resistive memory devices and at least one pulse signal corresponding to a given encoded bit of the binary true format value to a corresponding resistive memory device of the at least two resistive memory devices;
an analog-to-digital converter that digitizes outputs of the crossbar array of weights to generate partial dot-product results; and
a digital COMP counter that computes a final dot-product result from the partial dot-product results.

### Claim 2 (depends on 1)

The matrix-vector multiplication device of claim 1, wherein each pulse signal produced by the pulse generator is applied as a voltage pulse to the crossbar array to compute a corresponding one of the partial dot-product results in an analog domain.

### Claim 3 (depends on 1)

The matrix-vector multiplication device of claim 1, wherein each of the partial dot-product results are digitized individually by the analog-to-digital converter.

### Claim 4 (depends on 1)

The matrix-vector multiplication device of claim 1, wherein outputs of the analog-to-digital converter are accumulated into the digital COMP counter via shift-and-add operations, whereby the outputs of the analog-to-digital converter corresponding to sign bits of the encoded input vector is scaled and subtracted from an accumulated value of the digital COMP counter.

### Claim 5 (depends on 1)

The matrix-vector multiplication device of claim 1, wherein each weight encoded as the differential analog conductance is stored via four bitcells, the weights including a target conductance GP, a conductance GM−GP, a conductance GN and a conductance GM−GN.

### Claim 6 (depends on 1)

The matrix-vector multiplication device of claim 1, wherein the digital COMP counter comprises a multiplication capability to apply a scaling factor α to a value stored in the digital COMP counter and an offset mismatch η is handled by the digital COMP counter by initializing the digital COMP counter with an initialization value defined by *ηPN (*η=η/α).

### Claim 7 (depends on 1)

The matrix-vector multiplication device of claim 1, wherein the digital COMP counter is configured to:
perform a right-shift operation and a truncation of the least significant bit during one or more first-type cycles;
abstain from performing the right-shift operation for one second-type cycle; and
perform a left-shift operation for one cycle and the truncation of the least significant bit during a third-type cycle.

### Claim 8 (depends on 7)

The matrix-vector multiplication device of claim 7, wherein the digital COMP counter is configured to subtract a final result of the shift operations from a counter value of the digital COMP counter after performance of the third-type cycle and wherein only a proper subset of bits of the digital COMP counter are configured to be transferred for further processing.

### Claim 9 (depends on 1)

The matrix-vector multiplication device of claim 1, wherein the digital COMP counter is configured to add a value of a least significant bit from the partial dot-product results in a first cycle, configured to add a value of two least significant bits from the partial dot-product results in a second cycle, and is configured to add a value of three least significant bits from the partial dot-product results in a third cycle, and wherein a bit-resolution of an operation of the analog-to-digital converter is increased by 1-bit after each cycle to account for an IN-bit significance.

### Claim 10

A matrix-vector multiplication device comprising:
an input encoder that encodes an input vector into a binary complement format value and a binary true format value;
a pulse generator that converts each of one or more sets of bits of the encoded binary complement format value and each of one or more sets of bits of the encoded binary true format value into a corresponding pulse signal;
a crossbar array of weights, wherein each weight is encoded as a differential analog conductance of at least two resistive memory devices, wherein the pulse generator simultaneously applies at least one pulse signal corresponding to a given set of the sets of bits of the encoded binary complement format value to a corresponding resistive memory device of the at least two resistive memory devices and at least one pulse signal corresponding to a given set of the sets of bits of the encoded binary true format value to a corresponding resistive memory device of the at least two resistive memory devices;
an analog-to-digital converter that digitizes outputs of the crossbar array of weights to generate partial dot-product results; and
a digital COMP counter that computes a final dot-product result from the partial dot-product results.

### Claim 11 (depends on 10)

The matrix-vector multiplication device of claim 10, wherein a count of pulses generated by the pulse generator for the encoded binary complement format value and a count of pulses generated by the pulse generator for the encoded binary true format value is a same count value.

### Claim 12 (depends on 10)

The matrix-vector multiplication device of claim 10, wherein each output of the analog-to-digital converter corresponding to one of the sets of bits is multiplied by a corresponding predetermined scaling factor and accumulated into the digital COMP counter.

### Claim 13 (depends on 10)

The matrix-vector multiplication device of claim 10, wherein the pulse generator converts a sign bit of the encoded binary complement format value and a sign bit of the encoded binary true format value into corresponding sign pulse signals.

### Claim 14 (depends on 13)

The matrix-vector multiplication device of claim 13, whereby the outputs of the analog-to-digital converter corresponding to the sign bit of the encoded binary complement format value and the sign bit of the encoded binary true format value are scaled and subtracted from an accumulated value of the digital COMP counter.

### Claim 15

A hardware description language (HDL) design structure encoded on a machine-readable data storage medium, the HDL design structure comprising elements that when processed in a computer-aided design system generates a machine-executable representation of a semiconductor structure, wherein the HDL design structure comprises:
an input encoder that encodes an input vector into a binary complement format value and a binary true format value;
a pulse generator that converts each encoded bit of the binary complement format value and each encoded bit of the binary true format value into a corresponding pulse signal;
a crossbar array of weights, wherein each weight is encoded as a differential analog conductance of at least two resistive memory devices, wherein the pulse generator simultaneously applies at least one pulse signal corresponding to a given encoded bit of the binary complement format value to a corresponding resistive memory device of the at least two resistive memory devices and at least one pulse signal corresponding to a given encoded bit of the binary true format value to a corresponding resistive memory device of the at least two resistive memory devices;
an analog-to-digital converter that digitizes outputs of the crossbar array of weights to generate partial dot-product results; and
a digital COMP counter that computes a final dot-product result from the partial dot-product results.

### Claim 16 (depends on 15)

The hardware description language (HDL) design structure of claim 15, wherein outputs of the analog-to-digital converter are accumulated into the digital COMP counter via shift-and-add operations, whereby the outputs of the analog-to-digital converter corresponding to sign bits of the encoded input vector is scaled and subtracted from an accumulated value of the digital COMP counter.

### Claim 17 (depends on 15)

The hardware description language (HDL) design structure of claim 15, wherein each weight encoded as the differential analog conductance is stored via four bitcells, the weights including a target conductance GP, a conductance GM−GP, a conductance GN and a conductance GM−GN.

### Claim 18 (depends on 15)

The hardware description language (HDL) design structure of claim 15, wherein the digital COMP counter comprises a multiplication capability to apply a scaling factor α to a value stored in the digital COMP counter and an offset mismatch f is handled by the digital COMP counter by initializing the digital COMP counter with an initialization value defined by *ηPN (*η=η/α).

### Claim 19 (depends on 15)

The hardware description language (HDL) design structure of claim 15, wherein the digital COMP counter is configured to:
perform a right-shift operation and a truncation of the least significant bit during one or more first-type cycles;
abstain from performing the right-shift operation for one second-type cycle; and
perform a left-shift operation for one cycle and the truncation of the least significant bit during a third-type cycle.

### Claim 20 (depends on 19)

The hardware description language (HDL) design structure of claim 19, wherein the digital COMP counter is configured to subtract a final result of the shift operations from a counter value of the digital COMP counter after performance of the third-type cycle and wherein only a proper subset of bits of the digital COMP counter are configured to be transferred for further processing.

### Claim 21 (depends on 15)

The hardware description language (HDL) design structure of claim 15, wherein the digital COMP counter is configured to add a value of a least significant bit from the partial dot-product results in a first cycle, configured to add a value of two least significant bits from the partial dot-product results in a second cycle, and is configured to add a value of three least significant bits from the partial dot-product results in a third cycle, and wherein a bit-resolution of an operation of the analog-to-digital converter is increased by 1-bit after each cycle to account for an IN-bit significance.

### Claim 22

A hardware description language (HDL) design structure encoded on a machine-readable data storage medium, the HDL design structure comprising elements that when processed in a computer-aided design system generates a machine-executable representation of a semiconductor structure, wherein the HDL design structure comprises:
an input encoder that encodes an input vector into a binary complement format value and a binary true format value;
a pulse generator that converts each of one or more sets of bits of the encoded binary complement format value and each of one or more sets of bits of the encoded binary true format value into a corresponding pulse signal;
a crossbar array of weights, wherein each weight is encoded as a differential analog conductance of at least two resistive memory devices, wherein the pulse generator simultaneously applies at least one pulse signal corresponding to a given set of the sets of bits of the encoded binary complement format value to a corresponding resistive memory device of the at least two resistive memory devices and at least one pulse signal corresponding to a given set of the sets of bits of the encoded binary true format value to a corresponding resistive memory device of the at least two resistive memory devices;
an analog-to-digital converter that digitizes outputs of the crossbar array of weights to generate partial dot-product results; and
a digital COMP counter that computes a final dot-product result from the partial dot-product results.

### Claim 23 (depends on 22)

The hardware description language (HDL) design structure of claim 22, wherein each output of the analog-to-digital converter corresponding to one of the sets of bits is multiplied by a corresponding predetermined scaling factor and accumulated into the digital COMP counter.

### Claim 24 (depends on 22)

The hardware description language (HDL) design structure of claim 22, wherein the pulse generator converts a sign bit of the encoded binary complement format value and a sign bit of the encoded binary true format value into corresponding sign pulse signals.

### Claim 25 (depends on 24)

The hardware description language (HDL) design structure of claim 24, whereby the outputs of the analog-to-digital converter corresponding to the sign bit of the encoded binary complement format value and the sign bit of the encoded binary true format value are scaled and subtracted from an accumulated value of the digital COMP counter.
