Patent ID: 11157360

Abstract:
A semiconductor device that conducts error detection and correction on multilevel data is provided. The semiconductor device includes a first gray code converter circuit, a second gray code converter circuit, a gray code inverter circuit, an ECC encoder circuit, an ECC decoder circuit, and a memory portion. When input data is retained in the semiconductor device, the first gray code converter circuit converts the input data to data in a gray code format, and the ECC encoder circuit generates inspection data in accordance with the data. The memory portion retains the input data and the inspection data. When the input data that has been retained is output from the semiconductor device, the second gray code converter circuit converts the input data read out from the memory portion into data in a gray code format, and the ECC decoder circuit conducts error detection and correction on the data and the inspection data read out from the memory portion. After that, the gray code inverter circuit converts the corrected data to have the same format as that of the input data.