Patent ID: 8806295

Claim:
A method for encoding data with an error correction code, the method comprising: receiving, by a memory controller, a first number of data symbols; receiving, by the memory controller, a second number of meta-data sub-symbols; generating, by the memory controller, a third number of check symbols using an error correction code (ECC), where the third number comprises a difference between a number of symbols in an ECC codeword and the first number; generating, by the memory controller, a mismatch vector from the check symbols and the meta-data sub-symbols, where a number of sub-symbols of the mismatch vector comprises the second number; generating, by the memory controller, an adjustment syndrome symbol by multiplying the mismatch vector by a matrix; generating, by the memory controller, adjusted check symbols responsive to the adjustment syndrome symbol, wherein a number of adjusted check symbols equals the third number; and generating, by the memory controller, a final codeword by concatenating the adjusted check symbols and the data symbols, wherein the final codeword comprises the number of symbols in the ECC codeword.