A semiconductor memory device for compensating latency by stacking
reference data. The semiconductor memory device compensates the latency
and test errors between two signals by detecting the latency of the two
signals and stacking the reference data without using an extra signal.
Accordingly, a system can be simplified and power consumption can be
reduced when testing the semiconductor memory device, since the extra
circuit is unnecessary to synchronize a data sync signal with output
data.