# US 2025/0147724 A1 · Binary floating-point in-memory multiplication device

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

- Number: US 2025/0147724 A1
- Document ID: US20250147724A1
- Status: Published application
- Kind: A1
- Application number: 18/500,608
- Filed: 2023-11-02
- Published: 2025-05-08
- Earliest claimed: 2023-11-02
- Assignees: Flashsilicon Incorporation
- Applicants: FlashSilicon Incorporation
- Inventors: LEE WANG
- Web page: https://patentgrep.com/patent/US20250147724A1

## CPC

- G06F 7/4876: {Multiplying}
- G06F 5/012: {in floating-point computations}
- G06F 7/483: Computations with numbers represented by a non-linear combination of denominational numbers, e.g. rational numbers, logarithmic number system or floating-point numbers {(G06F7/4806, G06F7/4824, G06F7/49, G06F7/491, G06F7/544 take precedence)}
- G06F 7/485: Adding; Subtracting {(G06F7/4833, G06F7/4836 take precedence)}
- G06F 7/5443: {Sum of products (for applications thereof, see the relevant places, e.g. G06F17/10, H03H17/00)}
- H03K 19/21: EXCLUSIVE-OR circuits, i.e. giving output if input signal exists at only one input; COINCIDENCE circuits, i.e. giving output only if all input signals are identical
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H03K: PULSE TECHNIQUE (measuring pulse characteristics G01R; modulating sinusoidal oscillations with pulses H03C; transmission of digital information H04L; discriminator circuits detecting phase difference between two signals by counting or integrating cycles of oscillation H03D3/04; automatic control, starting, synchronisation or stabilisation of generators of electronic oscillations or pulses where the type of generator is irrelevant or unspecified H03L; coding, decoding or code conversion, in general H03M)

## Abstract

A floating-point in-memory multiplication device achieving one-step floating-point multiplication operation is disclosed. The device performs multiplication on a multiplicand and a multiplier and generates a first product. Each of the multiplicand, the multiplier and the first product is a binary floating-point number in IEEE 754 format and contains a sign bit, a q-bit exponent and a (p−1)-bit significand. The device comprises a XOR gate device, a decoder circuit, an adder circuit, a binary in-memory multiplier circuit and an encoder circuit. The XOR gate device receives the sign bits of the multiplicand and the multiplier to generate a sign bit of the first product. The adder circuit adds up the q-bit exponents of the multiplicand and the multiplier to generate a (q+1)-bit temporary exponent. The binary in-memory multiplier circuit performs multiplication on a first and a second p-bit significands to generate a 2p-bit second product.

## Claims

### Claim 1

A floating-point in-memory multiplication device for performing multiplication on a multiplicand and a multiplier and generating a first product, wherein each of the multiplicand, the multiplier and the first product is a binary floating-point number in IEEE 754 format and consists of a sign bit, a q-bit exponent and a (p−1)-bit significand, the device comprising:
a XOR gate device for receiving sign bits of the multiplicand and the multiplier to generate a sign bit of the first product;
a decoder circuit for generating a first prefix bit according to a q-bit exponent of the multiplicand and generating a second prefix bit according to a q-bit exponent of the multiplier, wherein the first prefix bit and the (p−1)-bit significand of the multiplicand form a first p-bit significand, and the second prefix bit and the (p−1)-bit significand of the multiplier form a second p-bit significand;
an exponent adder circuit for adding up the q-bit exponents of the multiplicand and the multiplier to generate a (q+1)-bit temporary exponent;
a binary in-memory multiplier circuit for performing multiplication on the first and the second p-bit significands to generate a 2p-bit second product; and
an encoder circuit for identifying and transforming a target bit position among the most significant p bits of the 2p-bit second product into a shift distance z, calculating a q-bit exponent of the first product according to the (q+1)-bit temporary exponent and a value of (2−2q-1−z), and shifting the 2p-bit second product to the left by z bit positions to generate a (p−1)-bit significand of the first product;
wherein the target bit position contains a nonzero value and is closest to a most significant bit position of the 2p-bit second product, where 0<=z<=(p−1) and (p+q)>=8.

### Claim 2 (depends on 1)

The device according to claim 1, wherein the decoder circuit comprises:
a first OR gate device for receiving binary bits of the q-bit exponent of the multiplicand to generate the first prefix bit; and
a second OR gate device for receiving binary bits of the q-bit exponent of the multiplier to generate the second prefix bit.

### Claim 3 (depends on 1)

The device according to claim 1, wherein the exponent adder circuit is implemented by a carry-chained adder circuit comprising a number (q−1) of full adders and a half adder.

### Claim 4 (depends on 1)

The device according to claim 1, wherein the encoder circuit comprises:
a detection circuit having p output terminals for identifying the target bit position relative to the most significant bit position of the 2p−bit second product to generate an activated bit and (p−1) de-activated bits at the p output terminals;
a first ROM array for receiving the activated bit and (p−1) de-activated bits to output the shift distance z in binary format;
a calculation circuit for adding the (q+1)-bit temporary exponent and a value of 2 to produce a (q+1)-bit sum, and for subtracting a value of (2q-1+z) from the (q+1)-bit sum to obtain the q-bit exponent of the first product; and
a barrel shifter for shifting the 2p-bit second product to the left by the z bit positions to generate the (p−1)-bit significand of the first product.

### Claim 5 (depends on 4)

The device according to claim 4, wherein the first ROM array comprises:
multiple ROM cells arranged in rows and columns configuration and storing multiple predefined binary codes in advance;
a number p of word lines respectively connected to the p output terminals of the detection circuit; and
a number t of bit lines coupled to the calculation circuit and the barrel shifter;
wherein when one of the number p of word lines is enabled by the activated bit, a corresponding row of ROM cells are turned on to output the shift distance z in t-bit binary format at the number t of bit lines, where t=roundup (log2p).

### Claim 6 (depends on 4)

The device according to claim 4, wherein the detection circuit
a number (p−2) of logic blocks connected in series, wherein the number (p−2) of logic blocks operate in a logic block order starting from a first logic block (1) and proceeding successively to each next logic block until a last logic block (p−2) is reached, wherein the first logic block (1) is enabled by an inversion of a most significant bit (MSB) of the 2p-bit second product and checks a (2p−2)th bit of the 2p-bit second product to produce a control bit and provide a first datum for an output terminal (p−2) of the p output terminals, wherein a logic block (i) of the number (p−2) of logic blocks is enabled by a control bit from a preceding logic block (i−1) and checks a (2p−1−i)th bit of the 2p-bit second product to produce a control bit and provide a second datum for an output terminal (p−1−i) of the p output terminals, where 2<=|<=(p−2); and
a logic component enabled by a control bit from the last logic block (p−2) and checking a pth bit of the 2p-bit second product to provide a third datum for an output terminal (0) of the p output terminals;
wherein the MSB of the 2p-bit second product is provided for an output terminal (p−1) of the p output terminals, and data provided at the p output terminals form the activated bit and the (p−1) de-activated bits.

### Claim 7 (depends on 6)

The device according to claim 6, wherein each of the number (p−2) of logic blocks comprises:
a first AND gate device having a first noninverted input, a second noninverted input and a first output, wherein the first output is coupled to the first ROM array; and
a second AND gate device having a third noninverted input, an inverted input and a second output;
wherein the second noninverted input and the inverted input for the logic block (i) receive a ((2p−1−i)th) bit of the 2p-bit second product, and the first and third noninverted inputs for the logic block (i) are coupled to the second output of the preceding logic block (i−1).

### Claim 8 (depends on 6)

The device according to claim 6, wherein the logic component is implemented by a third AND gate device.

### Claim 9 (depends on 4)

The device according to claim 4, wherein the barrel shifter comprises 2p input terminals, 2p output terminals and t multiplexing stages connected in cascaded, wherein the 2p input terminals receive the 2p-bit second product and correspond to the 2p output terminals, wherein the t multiplexing stages are configured to shift the 2p-bit second product to the left by the z bit positions to produce a 2p-bit shifted product at the 2p output terminals, and wherein a pth bit to a (2p−2)th bit of the 2p-bit shifted product at a number (p−1) of output terminals of the 2p output terminals are outputted as the (p−1)-bit significand of the first product, where t=roundup (log2p).

### Claim 10 (depends on 1)

The device according to claim 1, wherein the binary in-memory multiplier circuit comprises:
k2 in-memory multiplier units arranged in a parallel configuration, each of the k2 in-memory multiplier units comprising a second ROM array and a third ROM array and comparing a number 22n of 2n-bit operand symbols hardwired in the second ROM array with a first n-bit digit and a second n-bit digit respectively selected from the first and the second p-bit significands to output one of a number 22n of 2n-bit response symbols hardwired in the third ROM array as a 2n-bit product code, wherein all the 2n-bit product codes outputted from the k2 in-memory multiplier units form 2n-bit first coefficients of k first polynomials in base 2n and the 2n-bit first coefficients of each first polynomial in base 2n are associated with multiplication of the first p-bit significand with a corresponding digit of the second p-bit significand, wherein each of the first and the second p-bit significands has k digits in base 2n and k=p/n;
k binary adder circuits arranged in a parallel configuration for converting the 2n-bit first coefficients of the k first polynomials in base 2n into n-bit second coefficients of k second polynomials in base 2n in parallel; and
a number (k−1) of polynomial adder circuits arranged in sequential order and sequentially adding the n-bit second coefficients of the k second polynomials in base 2n in ascending degrees such that like terms of the k second polynomials in base 2n are lined up and added to generate n-bit third coefficients of a third polynomial in base 2n, wherein the third coefficients form the 2p-bit second product, and k and n are integers greater than 0.

### Claim 11 (depends on 10)

The device according to claim 10, wherein each of the k binary adder circuit comprises (k−1) n-bit adders and n half adders in a carry-chained configuration.

### Claim 12 (depends on 10)

The device according to claim 10, wherein each of the number (k−1) of polynomial adder circuits comprises a (k×n)-bit adder and n half adders in a carry-chained configuration.

### Claim 13 (depends on 10)

The device according to claim 10, wherein the number 22n of 2n-bit operand symbols and the number 22n of 2n-bit response symbols define an n-bit by n-bit multiplication table.

### Claim 14

An operating method of a floating-point in-memory multiplication device that performs multiplication on a multiplicand and a multiplier to generate a first product, the floating-point in-memory multiplication device comprising a binary in-memory multiplier circuit and an encoder circuit, wherein each of the multiplicand, the multiplier and the first product is a binary floating-point number in IEEE 754 format and consists of a sign bit, a q-bit exponent and a (p−1)-bit significand, the method comprising the steps of:
performing a XOR operation over sign bits of the multiplicand and the multiplier to obtain a sign bit of the first product;
respectively obtaining a first prefix bit and a second prefix bit according to the q-bit exponent of the multiplicand and the q-bit exponent of the multiplier such that the first prefix bit and the (p−1)-bit significand of the multiplicand form a first p-bit significand, and the second prefix bit and the (p−1)-bit significand of the multiplier form a second p-bit significand;
adding up the q-bit exponent of the multiplicand and the q-bit exponent of the multiplier to obtain a (q+1)-bit temporary exponent;
performing multiplication on the first and the second p-bit significands by the binary in-memory multiplier circuit to obtain a 2p-bit second product;
identifying and transforming a target bit position among the most significant p bits of the 2p-bit second product into a shift distance x by the encoder circuit, wherein the target bit position contains a nonzero value and is closest to a most significant bit position of the 2p-bit second product;
calculating a q-bit exponent of the first product by the encoder circuit according to the (q+1)-bit temporary exponent and a value of (2−2q-1−z); and
shifting the 2p-bit second product to the left by z bit positions by the encoder circuit to obtain a (p−1)-bit significand of the first product;
wherein 0<=z<=(p−1) and (p+q)>=8.

### Claim 15 (depends on 14)

The method according to claim 14, wherein the step of obtaining the first prefix bit and the second prefix bit comprises:
performing an OR operation over binary bits of the q-bit exponent of the multiplicand to obtain the first prefix bit; and
performing an OR operation over binary bits of the q-bit exponent of the multiplier to obtain the second prefix bit.

### Claim 16 (depends on 14)

The method according to claim 14, wherein the step of identifying and transforming comprises:
identifying the target bit position relative to the most significant bit position of the 2p-bit second product by a number (p−2) of logic blocks and a logic component connected in series to obtain an activated bit and (p−1) de-activated bits;
applying the activated bit and (p−1) de-activated bits to a number p of word lines of a first ROM array; and
when one of the number p of word lines is enabled by the activated signal, turning on a corresponding row of ROM cells so as to output the shift distance z in binary format by a number t of bit lines of the first ROM array, where t=roundup (log2p);
wherein the encoder circuit comprises the number (p−2) of logic blocks, the logic component and the first ROM array; and
wherein the first ROM array comprises multiple ROM cells that are arranged in rows and columns configuration and store predefined binary codes in advance.

### Claim 17 (depends on 14)

The method according to claim 14, wherein the step of shifting
receiving the 2p-bit second product by 2p input terminals of a barrel shifter comprising 2p output terminals and t multiplexing stages connected in cascaded;
shifting the 2p-bit second product to the left by the z bit positions by the t multiplexing stages to produce a 2p-bit shifted product at the 2p output terminals; and
outputting a pth bit to a (2p−2)th bit of the 2p-bit shifted product at a number (p−1) of output terminals of the 2p output terminals as the (p−1)-bit significand of the first product;
wherein the 2p input terminals correspond to the 2p output terminals; and
wherein the encoder circuit comprises the barrel shifter, where t=roundup (log2p).

### Claim 18 (depends on 14)

The method according to claim 14, wherein the step of calculating comprises:
adding the (q+1)-bit temporary exponent and a value of 2 to obtain a (q+1)-bit sum; and
subtracting a value of (2q-1+z) from the (q+1)-bit sum to obtain the q-bit exponent of the first product.

### Claim 19 (depends on 14)

The method according to claim 14, wherein the step of performing multiplication comprises:
parallelly comparing a number 22n of 2n-bit operand symbols hardwired in a second ROM array with a first n-bit digit and a second n-bit digit respectively selected from the first and the second p-bit significands to output one of a number 22n of 2n-bit response symbols hardwired in a third ROM array as a 2n-bit product code by each of k2 in-memory multiplier units in a parallel configuration so that a number k2 of 2n-bit product codes are outputted in parallel from the k2 in-memory multiplier units, wherein the number k2 of 2n-bit product codes serve as 2n-bit first coefficients of a number k of first polynomials in base 2n and the 2n-bit first coefficients of each first polynomial in base 2n are associated with multiplication of the first p-bit significand with a corresponding digit of the second p-bit significand, wherein each of the first and the second p-bit significands has k digits in base 2n and k=p/n;
converting the 2n-bit first coefficients of the k first polynomials in base 2n into n-bit second coefficients of k second polynomials in base 2n in parallel by each of k binary adder circuits arranged in a parallel configuration; and
sequentially adding the n-bit second coefficients of the k second polynomials in base 2n in ascending degrees by a number (k−1) of polynomial adder circuits arranged in sequential order such that like terms of the k second polynomials in base 2n are lined up and added to generate n-bit third coefficients of a third polynomial in base 2n;
wherein the binary in-memory multiplier circuit comprising the k2 in-memory multiplier units, the k binary adder circuits, and the number (k−1) of polynomial adder circuits;
wherein each of the k2 in-memory multiplier units comprises the second ROM array and the third ROM array; and
wherein the n-bit third coefficients form the 2p-bit second product, and k and n are integers greater than 0.

### Claim 20 (depends on 19)

The method according to claim 19, wherein the number 22n of 2n-bit operand symbols and the number 22n of 2n-bit response symbols define an n-bit by n-bit multiplication table.
