Memory with error correction function that is compatible with different data length and an error correction method
AssigneeXi'an Uniic Semiconductors Co., Ltd.
InventorNi Fu
Life of this patent
Estimating the term…
Abstract
The present invention relates to a memory with error correction function, comprising a data array, an ECC array, an ECC encoding module, an ECC decoding module, a first data selection module, a second data selection module and a data output module; wherein when data is being written, the first data selection module receives the data to be written, and determines whether to receive the data from the data array in response to a control signal that affects the length of the data; when data is being read, the second data selection module controls the length of the data output from the data output module in response to the control signal that affects the length of the data. The invention further relates to a method of correcting errors in a memory.
Claims12
A memory with error correction function, comprising:
- a data array, an ECC array, an ECC encoding module, an ECC decoding module, a first data selection module, a second data selection module and a data output module;
- wherein when writing data, the data array is configured to store a first data;
- the first data selection module is configured to receive the first data, and in response to a control signal that affects the length of the data to determine whether to further receive a second data from the data array;
- the ECC encoding module is configured to receive the data output from the first data selection module, and to encode the data according to the ECC algorithm preset therein so as to generate parity bits;
- and the ECC array is configured to store the generated parity bits;
- when reading data, the data array is configured to output the stored data;
- the ECC array is configured to output the stored parity bits;
- the ECC decoding module is configured to receive simultaneously the data output from the data array and the parity bits output from the ECC array, so as to detect and correct the data;
- the second data selection module is configured to generate a control signal for the data output module in response to the control signal that affects the length of the data;
- and the data output module is configured to receive the corrected data, and in response to the control signal for the data output module to control the length of the data output from the data output module.
A method of correcting errors in a memory, wherein the memory comprises:
- a data array, an ECC array, an ECC encoding module, an ECC decoding module, a first data selection module, a second data selection module and a data output module, the method of correcting errors in the memory comprising:
- when writing data, storing a first data in the data array;
- receiving the first data by the first data selection module, and determining whether to further receive the second data from the data array by the first data selection module in response to a control signal that affects the length of the data;
- receiving the data output from the first data selection module by the ECC encoding module, and encoding the data by the ECC encoding module according to the ECC algorithm preset therein so as to generate parity bits;
- and storing the generated parity bits in the ECC array;
- when reading data outputting the stored data from the data array;
- outputting the stored parity bits from the ECC array;
- receiving simultaneously the data output from the data array and the parity bits output from the ECC array by the ECC decoding module, so as to detect and correct the data;
- generating a control signal for the data output module by the second data selection module in response to the control signal that affects the length of the data;
- and receiving the corrected data by the data output module, and in response to the control signal for the data output module, controlling the length of the data output from the data output module.
Dependencies are inferred from the claim text.