Multi-Lane LVDS ADC Interface: Per-Lane Deskew with IDELAY

When some LVDS lanes are right and others wrong at the same clock phase, the fix is a delay per lane: coarse phase, per-lane scan, a pattern with transitions, and a careful handshake.

A multi-lane LVDS ADC interface can deliver full frames and still fail its checksum on every one, because some lanes are sampled on a bit transition while others are fine. The cause is skew between lanes. A clock phase adjustment moves every lane together and cannot fix it; a separate input delay on each lane can. This note walks through the receiver we use for this on AMD UltraScale+ devices: an input delay and a deserialiser per lane, a scan that finds each lane’s eye, and the handshake with firmware that decides whether the scan can work at all. In the simulated example, the best common clock phase leaves 3 of 8 lanes on a transition; per-lane delays open all eight with at least 540 ps of window.

The symptom: some lanes right, some wrong

The typical case is a radar or data-acquisition ADC that sends each channel on its own LVDS lane, 12 bits per sample, most significant bit first, with a forwarded bit clock and a frame signal that marks word boundaries. A common first bring-up result: the DMA fills every frame, but the frame checksum fails every time. Reading raw samples out of memory shows the pattern below.

The bad lanes do not show random numbers; they show the right waveform with codes that jump by one or two bits. That points to the sampling point, not the word boundary. A word-alignment error shifts every sample the same way and looks like a scaled or scrambled signal; a lane on a transition sometimes picks up the neighbouring bit and sometimes not. And because some lanes are clean at the same clock setting, the clock as a whole is not the problem. The lanes arrive at different times.

Why one clock phase cannot fix it

At 500 Mb/s with double-data-rate sampling on a 250 MHz forwarded clock, one bit lasts 2 ns. Jitter and the rise and fall times take a part of that; what is left is the open eye in which a sample is safe, about 1.1 ns in this example. Skew between lanes comes from the source package, the PCB routing, connectors and the FPGA’s own input paths, and a few hundred picoseconds to a nanosecond across a wide bus is not unusual.

Many sources can shift their output clock against the data, in this example in steps of a third of a bit, 0.67 ns. That moves every lane’s sampling point together. Trying all three steps, the best one leaves 5 lanes open and 3 on a transition. No setting suits all of them, because the problem is the difference between lanes.

Coarse phase plus a delay on every lane

On UltraScale and UltraScale+ devices each input pin has its own delay element, IDELAYE3, with 512 taps that firmware can load at run time. The total range is about 1.3 ns, a few picoseconds per tap; the exact figures depend on the device and mode and are in UG571 and the device data sheet. That range is less than one 2 ns bit, so the delay alone cannot reach every possible offset. The two adjustments together can: the source-side clock phase puts all lanes in roughly the right place, and the per-lane delay centres each one in its own eye.

The scan runs on all lanes at once. For each tap value, every lane compares a batch of received blocks against what a stable eye would give; a tap passes if no block disagrees. Each lane then takes the centre of its longest passing run. Run the scan once per coarse phase and keep the phase whose narrowest lane window is widest: here step 3 of 3, with every lane open by at least 216 taps, about 540 ps. Some runs reach tap 0 or the last tap: there the eye edge lies outside the delay range, so the midpoint is not the true eye centre. The sampling point is still at least half the run away from any edge the scan saw, which is the margin that counts; a lane whose run is clipped and short is a reason to try the next coarse step.

Receiver structure, lane by lane
  • Input: IBUFDS with internal differential termination on each data lane, the frame lane and any data-valid lane.
  • Delay: IDELAYE3 in variable-load mode, so firmware can write a tap value per lane. In COUNT mode it needs no IDELAYCTRL or reference clock but the tap size is not compensated for voltage and temperature; TIME mode uses IDELAYCTRL to hold calibrated delays. With COUNT mode, plan to re-run the scan after warm-up and on temperature change.
  • Deserialiser: ISERDESE3 in 1:8 mode, clocked from the forwarded bit clock through a clock-capable pin and BUFGCE_DIV dividers: the bit clock and a quarter-rate parallel clock.
  • Word assembly: 12-bit samples arrive in 8-bit blocks, so the pattern repeats every lcm(12, 8)/8 = 3 blocks. The frame lane gives the word boundary; a bit-slip or barrel shift aligns it after the delays are set.
  • Clock crossing: an asynchronous FIFO from the parallel clock into the system clock, with the clocks declared asynchronous in the constraints.

Keep the output of this block identical to whatever receiver it replaces: same word format, same valid and frame flags. Then DMA, memory layout and firmware do not change, and a build switch can still select the old receiver for comparison.

The training pattern decides whether the scan works

A tap only fails if the lane has transitions near the sampling point. If the training word has few of them, for example a constant code whose serial form is mostly ones or mostly zeros, the scan sees a stable value at every tap and reports a perfect window that means nothing. Before trusting a scan, check what the pattern looks like on each lane:

  • Prefer a pattern with a transition in most bit positions: alternating ones and zeros, a checkerboard word, a PRBS or a ramp, whichever the source offers on the interface you are using.
  • Confirm the test mode reaches the LVDS output you are capturing. Some sources apply test patterns per interface type or per data-path stage; read the mode back and look at the raw bits once.
  • Compare only while the data-valid signal is high. Gaps between bursts are not errors, and a lane with no valid data for the whole tap period should count as a fail, not a pass.
  • Reject windows that are suspiciously wide, close to a full bit period or to the full delay range on every lane. Real eyes are narrower than that.

If the source offers no usable pattern on this interface, the scan can use live data instead. One way is a second, monitor sampler per lane delayed by a fixed offset from the main one: where the two disagree, the monitor is on a transition. AMD’s application note XAPP1017 describes this for 7-series devices using both outputs of a differential input buffer; check what your device and I/O standard allow. Another is to scan with a ramp or a known tone at the analog input and check each lane’s words for continuity.

The handshake with firmware

The delay logic is the easy part; the order of the steps around it is where bench time goes.

  • The source must be streaming during the scan. If the radar or ADC is idle, the valid signal stays low and every tap times out. Start a frame, or the synchronisation signal on a multi-chip system, before starting the scan.
  • Reset the receive path afterwards. The scan frame has no DMA behind it. Whatever it left in the FIFOs will shift the next real frame unless the path is reset.
  • If any lane fails, put every lane back to tap 0. A failed lane with a meaningless tap can drag the frame or valid lane off as well. Then try the next coarse phase, or fall back to coarse-only operation and report it.
  • Use a timeout. A scan of 128 tap steps takes far less than a frame; a few hundred milliseconds of nothing means the stream is not running.
  • Keep watching. A per-frame checksum or parity word is the cheapest monitor there is. On an error, reset and re-scan; on repeated errors, log the lane and the window widths.

Verifying it

In simulation, build a testbench with the real number of lanes, per-lane skew across most of a bit period and random jitter, and check that each lane’s chosen centre moves with its skew and that the reassembled words match on every channel. On the board, after calibration, switch the source to a ramp and check that every sample on every lane is one more than the last; then check again across temperature. Once the interface is clean, the processing behind it can be checked stage by stage as in bit-exact verification of an FPGA radar processing chain.

We design and debug this kind of interface as part of radar and data-acquisition board work, including custom FPGA receiver IP; see DSP IP and embedded software development or send the details below.

Engineering service · DSP IP & Embedded Software DevelopmentNeed this built into your product?Custom radar modules, antennas and enclosures, from prototype to volume. Send your requirements and we reply with options and a quote.Request a quote →See the service

FAQ

Why not just use the vendor’s high-speed SelectIO wizard?

It is a good starting point and handles the primitives and clocking. You still need the per-lane scan, the pass criterion that fits your source’s pattern, and the firmware handshake, which the wizard does not know about.

COUNT or TIME mode for the delays?

COUNT mode is simpler: no IDELAYCTRL, no reference clock, taps loaded directly. Its tap size moves with voltage and temperature, so re-scan when conditions change. TIME mode keeps delays calibrated across conditions at the cost of the controller and reference clock. For a scan-and-centre approach either works.

How wide should the window be before I trust it?

As a rough guide, a passing window of at least a quarter of the bit period on every lane leaves room for drift. Set the minimum in taps from your own tap size and check how the window width changes with temperature on the bench.

Does MIPI CSI-2 have the same problem?

Much less. D-PHY aligns bytes on the start-of-transmission sync sequence, specifies tight lane-to-clock skew, and from version 1.2 adds a deskew calibration burst for rates above 1.5 Gb/s, so per-lane tuning is rarely needed. Plain LVDS has no such protocol, which is why the receiver has to find each eye itself.

Sources and method

  • AMD, UltraScale Architecture SelectIO Resources User Guide (UG571): IDELAYE3, ISERDESE3, COUNT and TIME modes.
  • AMD, LVDS Source Synchronous DDR Deserialization, application note XAPP1017: dynamic eye monitoring with a second sampler (7 series).
  • TIA/EIA-644-A, Electrical Characteristics of Low Voltage Differential Signaling (LVDS) Interface Circuits.

Method: the figures come from a timing model of eight lanes at 500 Mb/s with skews drawn uniformly between 0 and 1.2 ns, an open eye of 1.12 ns, 25 ps RMS Gaussian jitter, a coarse clock phase in steps of a third of a bit and a 512-tap delay of 2.5 ps per tap. A tap passes when 64 eight-bit blocks show no error, with the error probability set by the distance from the sampling point to the eye edges. The tap size is a nominal figure for the illustration; real devices differ and COUNT-mode taps drift with voltage and temperature.