A method and apparatus for measuring latency in a communication path is
provided. The technique includes driving a signal such as a square wave
on the communication path, such as a write path such that it travels
around the write-read path, and sensing a returned signal at one end of
the write-read path. A square wave signal corresponding to the square
wave driven on the write path is delayed by a predetermined phase thus
generating a delayed signal. The returned signal and the delayed signal
are mixed, producing a mixed signal. The mixed signal is integrated to
obtain an integrated output. The phase by which the delayed signal is
shifted is successively adjusted. Returned signals are mixed with such
delayed signals until the integrated output is equal to zero. The phase
shift amount that results in a nulled integrated output, less a quarter
cycle of the square wave, is equal to the round trip latency of the
write-read path.