The application discloses a finite field error correction encoding and decoding method and
system for an integrated storage and calculation
system, which is suitable for error correction tasks after sum and accumulation in analog in-memory calculation and error correction tasks of reading data from a general memory. The application uses non-binary q-order finite field operation to process input code words, uses a preprocessed generating matrix to obtain an encoding result belonging to the finite field and generate an error
correction code, and restores at an output end, so that the error rate of in-memory calculation results is reduced and the reliability is improved. Based on the encoding and decoding method, the application discloses a corresponding decoding circuit
system design, which is divided into a check node and a variable node, the connection between the check node and the variable node is defined by a check matrix, and
belief propagation based on a finite field is adopted. After multiple iterations of
belief propagation between the check node and the variable node, the error correction result converges and the final decoding result is obtained.