In one embodiment of the present invention, a method for adjusting a
signal includes applying at least one of a loss compensation for frequency-dependent
distortion and an offset compensation for DC-offset
distortion to a
signal before or after the
distortion occurs to generate an output
signal. The method also includes, using a
clock signal, sampling the output signal to generate a plurality of data values and
boundary values. The method further includes monitoring the sampled values for a first set of
data patterns. The method also includes detecting in the sampled values a data pattern in the first set of
data patterns. The method further includes adjusting at least one of the loss compensation and the offset compensation applied to the signal based on one or more of the sampled data values and
boundary values associated with the detected data pattern in the first set of
data patterns. The method further includes, after adjusting at least one of the loss compensation and the offset compensation, monitoring the sampled values for a second set of data patterns. The method also includes detecting in the sampled values a data pattern in the second set of data patterns. The method further includes adjusting at least one of the loss compensation and the offset compensation applied to the signal based on one or more of the sampled data values and
boundary values associated with the detected data pattern in the second set of data patterns.