Post Go back to editing

JESD-204B multiple board synchronization issue

Thread Summary

The user is experiencing inter-board synchronization issues with JESD-204B ADC boards using AD6676 converters and Xilinx Zynq FPGA with axi_jesd204_rx IPcore. The final answer suggests that SYNC is only asserted after JESD reset, not on SYSREF, and recommends either resetting the IPcore before sending new SYSREF pulses or updating the core to enable the ENABLE_FRAME_ALIGN_ERR_RESET feature to handle misalignment. The user confirms that the HDL version is 1.02.a, and that the SYSREF status register (0x108) indicates SYSREF detection but no alignment errors.
AI Generated Content

We're experiencing an issue trying to synchronize multiple JESD-204B ADC boards. Each board has several JESD-204B converters (AD6676) connected to a Xilinx Zynq FPGA with axi_jesd204_rx IPcore.

There's a clock distribution network that feeds each board with phase-synchronized clock references and sysref. Then, each board has its own clock generator/distributor with JESD204B support which is used to clock the converters and send sysref to the FPGA and the converters. 

Our boards start from an internal clock reference. They boot independently, configure the clocks and bring up the converters, sending a sysref clock pulse to the FPGA which starts the receiver's state machine. This all happens before Linux boots, so that the JESD interface is up and running and the drivers probe correctly.

Then, once everything is up, the master clock board boots, configures and aligns its clocks, and notifies the ADC boards which setup their clock generators to take the reference clock from the master clock board and accept alignment pulses. An alignment pulse is sent from the master board and all the clocks get phase aligned among all boards (we verified).

Then we set the clock distributors to distribute sysref to the converter/FPGA, we arm the converters to accept sysref and we finally send two sysref pulses from the master board, which arrive synchronously to the rest of the boards.

The intra-board alignment (among converters connected to the same FPGA) is always perfect. We check by sending a pulsed RF signal and doing a synchronous capture (we have also a capture trigger signal distributed synchronously to all boards for capture synchronization). The "rising" and "falling" edges of the digitized pulsed signal start misaligned but the sysref synchronization pulses bring them together 100% of the times.

Inter-board (between different boards with different FPGAs) things are different, however, and we almost never get a perfect synchronization. There's a delay between the "rising" and "falling" edges of the digitized signal (i.e.  several clock cycles of sampling point delay) which remains constant between power-ups but changes every time we restart the boards and synchronize them. Sometimes the delay is 0 and all boards get synced, but this is normally not the case. 

So, to recap:

Step 1: Board startup + clock config + clock alignment => synchronous (triggered) capture of a pulsed RF signal =>digitized signal edges all over the place (as expected)

Step 2: Arm ADCs to accept sysref + send sysref pulses => ADCs accept sysref pulses => ADCs within a board get perfectly synchronized, but boards are not synchronized between them.

We have tested and it looks like  axi_jesd204_rx is ignoring sysref. We are sure that sysref gets there and it gets there synchronously, but it doesn't seem to do anything.

To our understanding, receiving a Sysref pulse outside the LMFC window should align LMFC's and trigger a link resynchronization (i.e. SYNC goes low and the converters send alignment sequence and such). However, sending sysrefs to the FPGA never triggers a link resynhronization event (SYNC remains high), so it's like it's ignored. SYSREF status register  (0x108) always reads 0x01. The only way to resynchronize the link is to reset the ipcore, but then it brings itself back immediately and still reports having captured a SYSREF, even when we haven't sent any sysref pulse.

Any clue on what might be happening? Do we need to clear register 0x108 to "arm" the ipcore to accept a new sysref (like we do with AD6676)?

  • Hello,

    what version of hdl are you using ? 

    If you are using 2019_r2 or newer, before going into a further analysis I would try enabling the ENABLE_FRAME_ALIGN_ERR_RESET parameter from the link receive peripheral. 

    https://github.com/analogdevicesinc/hdl/blob/hdl_2019_r2/library/jesd204/jesd204_rx/jesd204_rx.v#L55

    Once this enabled, if misalignment is detected between the local  LMFC of the receiver and the start of frame / multiframe markers from the data stream it will restart the link (pull SYNC high)

    Laszlo

  • Hi,

    HDL version is from 2018. EDIT: specifically it's 1.02.a  We have checked outputting LMFC clock and checking with an oscilloscope.

    LMFC clock stops whenever we reset the JESD receiver (and it remains off, even when the link goes up again). Next time we send a SYSREF pulse the LMFC clocks of all boards start running again, locked in phase.


    We checked register 0x108:

    0x0108 SYSREF_STATUS SYSREF status
    [31:2] Reserved RO 0x00
    [1] SYSREF_ALIGNMENT_ERROR RW1C-V 0x0 Indicates that an external SYSREF event has been observed that was unaligned to a previously observed event.
    [0] SYSREF_DETECTED

    Bit 0 SYSREF_DETECTED works as expected. We clear it wrting a 1 and it remains at 0 until we send a SYSREF. It does detect the SYSREF.

    Bit 1 is never set to 1, meaning it never detects unaligned SYSREFs

    Again, we use a two-pulse sysref signal, synchronous to the clocks with optimized timing, but sent on-demand by the software, so it may arrive at any time, so we expect that 99,9% of the times it would arrive outside the LMFC window and be detected as misalignment event. We intend to send this sysref signal only once per power-on cycle, or if we detect desynchronization.

    So, to recap:

    1 - Reset JESD receiver, unreset JESD receiver, clear 0x108 bit 1 ==> no output on LMFC clock, 0x108 bit 0 and bit 1 are low

    2- Send SYSREF pulses ==> LMFC clocks start running, phase aligned. 0x108 bit 0 goes high, bit 1 remains low.

    Clearing 0x108 or not clearing it seems to have no effect.

    Each board ends with all its converters synchronized, but boards have a delay among them. This delay is different every synchronization cycle, but remains fixed between synchronization cycles (i.e it doesn't drift or anything)

    SYNC is never asserted on SYSREF, it's only asserted after JESD reset. We think we can't achieve deterministic synchronization unless SYNC is asserted after SYSREF, or at least with some warranty that it is released with the same LMFC on each board every time.

  • SYNC is never asserted on SYSREF, it's only asserted after JESD reset.

    That is expected in the current implementation. 

    In sublclass 1, the link receive peripheral as you mentioned asserts SYNC after reset.

    SYNC will stay asserted until  the correct CGS sequence is received for each lane and SYSREF is captured. 

    the SYNC will de-assert (goes high) on the next LMFC edge the previous condition holds.  

    In the version you are using, once the link is up, on consecutive SYSREF pulses if misalignment is detected compared to the original SYSREF pulse, it will be reported, but the SYNC will not assert.    

    So, in "Step 2" after you enabled the master clock/sync and before sending the new SYSREF pulses you should reset/re-enable the link receive peripheral IP from both boards so the link re-establishes relative to the new SYSREF.  

    or. 

    you update the core to have the "ENABLE_FRAME_ALIGN_ERR_RESET "  feature and if that is enabled the core should assert SYNC on its own without a reset. 

    Laszlo

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.