In an ECC circuit of an ECC circuit-containing semiconductor memory device, an
error correcting code/syndrome generating circuit and a data correcting circuit
are disposed. In portions of the ECC circuit connected to buses, a data bus input
control circuit for controlling input of a data from a data bus; an error correcting
code bus input control circuit for controlling input of an error correcting code
from an error correcting code bus; and an error correcting code bus output control
circuit for controlling output of an error correcting code to the error correcting
code bus are disposed. A portion corresponding to an error correcting code generator
of a conventional technique is included in the ECC circuit, so that the ECC circuit
can function both as an error correcting code generator and a decoder. As a result,
the entire device can be made compact.