# US 12,113,550 B1 · Enhanced tearing save encoding

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

- Number: US 12,113,550 B1
- Document ID: US12113550B1
- Status: Granted
- Kind: B1
- Application number: 18/331,499
- Filed: 2023-06-08
- Granted: 2024-10-08
- Earliest claimed: 2023-06-08
- Assignees: NXP B.V.
- Applicants: NXP B.V.
- Inventors: Björn Fay
- Web page: https://patentgrep.com/patent/US12113550B1

## CPC

- H03M 13/19: Single error correction without using particular properties of the cyclic codes, e.g. Hamming codes, extended or generalised Hamming codes
- G06F 11/1012: {using codes or arrangements adapted for a specific type of error (G06F11/1048 takes precedence)}
- G06F 11/1076: {Parity data used in redundant arrays of independent storages, e.g. in RAID systems}
- H03M 13/09: Error detection only, e.g. using cyclic redundancy check [CRC] codes or single parity bit
- H03M: CODING; DECODING; CODE CONVERSION IN GENERAL (using fluidic means F15C4/00; optical analogue/digital converters G02F7/00; coding, decoding or code conversion, specially adapted for particular applications, see the relevant subclasses, e.g. G01D, G01R, G06F, G06T, G09G, G10L, G11B, G11C, H04B, H04L, H04M, H04N; ciphering or deciphering for cryptography or other purposes involving the need for secrecy G09C)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for encoding data to be stored in a memory, including: encoding the data to be stored in memory with an error correcting code (ECC) as first encoded data, wherein the ECC is configured to have a minimum Hamming distance of at least 4t+1 in order to correct up to t bit errors and detect up to 3t bit errors where t≥1; determining a Hamming weight of the first encoded data; encoding the determined Hamming weight, wherein for all higher Hamming weights the encoding should have at least 2t+1 bit-positions that change from 1 to 0 per Hamming weight; concatenating the first encoded data and the encoded Hamming weight as concatenated data; and storing the concatenated data in the memory.

## Claims

### Claim 1

A method for encoding data to be stored in a memory, comprising:
encoding the data to be stored in memory with an error correcting code (ECC) as first encoded data, wherein the ECC is configured to have a minimum Hamming distance of at least 4t+1 in order to correct up to t bit errors and detect up to 3t bit errors where t≥1;
determining a Hamming weight of the first encoded data;
encoding the determined Hamming weight, wherein for all higher Hamming weights the encoding should have at least 2t+1 bit-positions that change from 1 to 0 per Hamming weight;
concatenating the first encoded data and the encoded Hamming weight as concatenated data; and
storing the concatenated data in the memory.

### Claim 2 (depends on 1)

The method of claim 1, wherein the encoding of the determined Hamming weight comprises:
inverting the determined Hamming weight; and
concatenating 2t+1 copies of the inverted Hamming weight.

### Claim 3 (depends on 1)

The method of claim 1, wherein the encoding of the determined Hamming weight comprises
encoding the determined Hamming weight with an error correcting code (ECC) as first encoded Hamming weight, wherein the ECC is configured to have a minimum Hamming distance of at least 2t+1 where t is a same t as for the data encoding;
inverting the first encoded Hamming weight; and
concatenating the first encoded Hamming weight and the inverted first encoded Hamming weight.

### Claim 4 (depends on 1)

The method of claim 1, wherein when the Hamming weight is always even, a last significant bit of the Hamming weight is not used.

### Claim 5

A method for decoding data stored in a memory, comprising:
reading encoded data from the memory, wherein the encoded data includes a first encoded data, generated using an error correcting code (ECC), and the encoded Hamming weight, wherein for all higher Hamming weights the encoding should have at least 2t+1 bit-positions that change from 1 to 0 per Hamming weight, and wherein the ECC is configured to have a minimum Hamming distance of at least 4t+1 in order to correct up to t bit errors and detect up to 3t bit errors where t≥1;
correcting the first encoded data with the ECC as corrected encoded data, including error detection of up to at least 3t errors and correction of up to t errors;
decoding the corrected encoded data with the ECC as decoded data;
decoding the encoded Hamming weight, including error correction and possibly checking for decoding errors;
determining the Hamming weight of the corrected encoded data;
checking that the decoded Hamming weight and the determined Hamming weight are equal, that the data decoding did not detect more than t errors, and the Hamming weight decoding has not detected a decoding error; and
returning the decoded data if all checks have passed, otherwise returning an error.

### Claim 6 (depends on 5)

The method of claim 5, wherein
the encoded Hamming weight comprises 2t+1 inverted Hamming weights, and
the decoding of the encoded Hamming weight comprises
determining a bit-wise majority vote of the 2t+1 inverted Hamming weights, and
inverting the majority vote.

### Claim 7 (depends on 5)

The method of claim 5, wherein the decoding of the encoded Hamming weight comprises
trying all possible Hamming weights and checking if one would generate an encoding that has a Hamming distance of at most t to the encoded Hamming weight, and
returning the possible Hamming weight if it has passed the check, else returning an error.

### Claim 8 (depends on 5)

The method of claim 5, wherein
the encoded Hamming weight comprises a first encoded Hamming weight and an inverted second encoded Hamming weight, where the first and second encoded Hamming weights are each encoded with an error correcting code (ECC), wherein the ECC is configured to have a minimum Hamming distance of at least 2t+1; and
the decoding of the encoded Hamming weight comprises
decoding the first encoded Hamming weight with c1 corrections,
inverting the inverted second encoded Hamming weight,
decoding the second encoded Hamming weight with c2 corrections,
checking if both decoding operations result in the same Hamming weight and if c1+c2≤t bits were corrected, and
returning the first decoded Hamming weight if the check has been passed, else returning an error.

### Claim 9 (depends on 5)

The method of claim 5, wherein when the Hamming weight is always even, a last significant bit of the Hamming weight is not used.

### Claim 10

A device configured to encode data stored in a first memory, comprising:
a second memory;
a processor coupled to the second memory, wherein the processor is further configured to:
encode the data to be stored in memory with an error correcting code (ECC) as first encoded data, wherein the ECC is configured to have a minimum Hamming distance of at least 4t+1 in order to correct up to t bit errors and detect up to 3t bit errors where t≥1;
determine a Hamming weight of the first encoded data;
encode the determined Hamming weight, wherein for all higher Hamming weights the encoding should have at least 2t+1 bit-positions that change from 1 to 0 per Hamming weight;
concatenate the first encoded data and the encoded Hamming weight as concatenated data; and
store the concatenated data in the memory.

### Claim 11 (depends on 10)

The device of claim 10, wherein the encoding of the determined Hamming weight comprises:
inverting the determined Hamming weight; and
concatenating 2t+1 copies of the inverted Hamming weight.

### Claim 12 (depends on 10)

The device of claim 10, wherein the encoding of the determined Hamming weight comprises
encoding the determined Hamming weight with an error correcting code (ECC) as first encoded Hamming weight, wherein the ECC is configured to have a minimum Hamming distance of at least 2t+1 where t is a same t as for the data encoding;
inverting the first encoded Hamming weight; and
concatenating the first encoded Hamming weight and the inverted first encoded Hamming weight.

### Claim 13 (depends on 10)

The device of claim 10, wherein when the Hamming weight is always even, a last significant bit of the Hamming weight is not used.

### Claim 14

A device configured to decode data stored in a first memory, comprising:
a second memory;
a processor coupled to the second memory, wherein the processor is further configured to:
read encoded data from the memory, wherein the encoded data includes a first encoded data, generated using an error correcting code (ECC), and the encoded Hamming weight, wherein for all higher Hamming weights the encoding should have at least 2t+1 bit-positions that change from 1 to 0 per Hamming weight, and wherein the ECC is configured to have a minimum Hamming distance of at least 4t+1 in order to correct up to t bit errors and detect up to 3t bit errors where t≥1;
correct the first encoded data with the ECC as corrected encoded data, including error detection of up to at least 3t errors and correction of up to t errors;
decode the corrected encoded data with the ECC as decoded data;
decode the encoded Hamming weight, including error correction and possibly checking for decoding errors;
determine the Hamming weight of the corrected encoded data;
check that the decoded Hamming weight and the determined Hamming weight are equal, that the data decoding did not detect more than t errors, and the Hamming weight decoding has not detected a decoding error; and
return the decoded data if all checks have passed, otherwise returning an error.

### Claim 15 (depends on 14)

The device of claim 14, wherein
the encoded Hamming weight comprises 2t+1 inverted Hamming weights, and
the decoding of the encoded Hamming weight comprises
determining a bit-wise majority vote of the 2t+1 inverted Hamming weights, and
inverting the majority vote.

### Claim 16 (depends on 14)

The device of claim 14, wherein
the decoding of the encoded Hamming weight comprises
trying all possible Hamming weights and checking if one would generate an encoding that has a Hamming distance of at most t to the encoded Hamming weight, and
returning the possible Hamming weight if it has passed the check, else returning an error.

### Claim 17 (depends on 14)

The device of claim 14, wherein
the encoded Hamming weight comprises a first encoded Hamming weight and an inverted second encoded Hamming weight, where the first and second encoded Hamming weights are each encoded with an error correcting code (ECC), wherein the ECC is configured to have a minimum Hamming distance of at least 2t+1; and
the decoding of the encoded Hamming weight comprises
decoding the first encoded Hamming weight with c1 corrections,
inverting the inverted second encoded Hamming weight,
decoding the second encoded Hamming weight with c2 corrections,
checking if both decoding operations result in the same Hamming weight and if c1+c2≤t bits were corrected,
returning the first decoded Hamming weight if the check has been passed, else returning an error.

### Claim 18 (depends on 14)

The device of claim 14, wherein when the Hamming weight is always even, a last significant bit of the Hamming weight is not used.
