Post Go back to editing

Data Offload bypass mode and ddr mode usage issues

Thread Summary

The user is trying to use the bypass mode of the Data Offload IP with the AD9172 DAC on a ZCU102 board but encounters issues generating signals correctly. The final answer suggests using the PS DDR memory instead of PL DDR for higher bandwidth, and explains that bypass mode is suitable when the DMA-memory bandwidth exceeds the device-FPGA bandwidth. The user has already reduced the lane rate and DAC data width, but still faces limitations with the offload buffer size, aiming to increase the number of samples for longer continuous signal generation.
AI Generated Content
Category: Hardware
Product Number: AD9172

Hi,

I am currently using a ZCU102 together with the AD9172 evaluation board(dac_fmc_ebz). I am trying to use the bypass mode of the Data Offload IP, but I am not able to generate signals correctly in hardware.

I have been looking for documentation and usage examples, but I could not find much practical information. I reviewed the following documentation:
https://analogdevicesinc.github.io/hdl/library/data_offload/index.html

Could you please help clarify how the bypass mode is intended to be used and what its practical limitations are?

According to the documentation:

BYPASS mode: simple streaming FIFO in case of clock rate or data width differences between source and sink interfaces (data rate MUST match in order to work); the BYPASS mode is used when an initially high rate path is downgraded to lower rates.

However, it is not clear to me:

  • What exactly is meant by “higher rate” and “lower rate” in this context?

  • Are these rates related to the DAC sample rate, DMA throughput, AXI clock rate, or JESD lane rate?

  • Are there any measured or experimental results that indicate when bypass mode is safe to use versus when it is not?

In addition, I also tried to use the DDR option of Data Offload, but I was not able to make it work reliably in bypass mode. You can find the error message below : 

set dac_offload_type 1 // ddr
set dac_offload_size [expr 256*1048576]
custom_string: JESD:M=2 L=8 S=2 NP=16 LINKS=1 DEVICE_CODE=5 DAC_DEVICE=AD9172 DAC_MODE=10 DAC_OFFLOAD:TYPE=1 SIZE=268435456
custom_hex: 4453454a323d4d3a383d4c20323d53203d504e204c203631534b4e494420313d434956454f435f45353d4544434144205645445f3d45434931394441442032374d5f43413d45444f442030314f5f43414f4c4646543a44413d45505949532031323d455a3334383636353435
Wrote  : <C:\GitHub\hdl-main-data-offload\hdl-main\projects\dac_fmc_ebz\zcu102\ADIDACDEVICEAD9172_ADIDACMODE10\dac_fmc_ebz_zcu102.srcs\sources_1\bd\system\system.bd>
WARNING: [BD 41-2670] Found an incomplete address path from address space '/dac_data_offload/storage_unit/MAXI_0' to master interface '/dac_data_offload/storage_unit/MAXI_0'. Please either complete or remove this path to resolve.
WARNING: [BD 41-1629] Slave segment </sys_ps8/SAXIGP0/HPC0_DDR_HIGH> is excluded from all addressing paths.
WARNING: [BD 41-3281] Instance '/dac_dma' is connected on both sides by SmartConnects and cannot automatically configure itself to match the endpoints. Please manually configure its AXI interfaces as required for the design.
WARNING: [BD 41-3281] Instance '/sys_ps8' is connected on both sides by SmartConnects and cannot automatically configure itself to match the endpoints. Please manually configure its AXI interfaces as required for the design.
ERROR: [BD 41-758] The following clock pins are not connected to a valid clock source:
/dac_data_offload/storage_unit/m_axi_aclk

ERROR: [Common 17-39] 'validate_bd_design' failed due to earlier errors.

Any guidance, example designs, or best-practice recommendations for using Data Offload in bypass mode and DDR mode with AD9172 would be greatly appreciated.

Thank you for your support.

Best regards,

  • Hi ! We are currently looking into your issue. Thanks for understanding!

  • Hi  , Thanks a lot, I am looking forward to hearing from you. DDR4 usage in data offload with AD9172_fmc_ebz and zcu102 is crucial for us.

  • Hi,

    In a typical reference design, there are 2 attributes you should consider: the bandwidth between the DMA and the memory, respectively the bandwidth between the device and the FPGA. If the bandwidth DMA-memory is less than the bandwidth device-FPGA, then the Data Offload is needed to accommodate this mismatch.

    Sometimes in our designs, the user might choose to do a dynamic reconfiguration. This can be done by either lowering the data rate on the device-FPGA side, or choosing to capture a fraction of the available channels (for instance 1/2 channels). This path transitioned from a higher rate to a lower rate, as described in the documentation, resulting in a higher data rate on the DMA-memory path than the device-FPGA path. When this happens, the Data Offload can enter in its bypass setting, in order to just forward the data stream from one domain to the other. So, to conclude, you should use the bypass feature when the actual data rate DMA-mem > actual data rate device-FPGA.

    As for the second part of your question, why did you choose to use the external DDR4 storage for the data offload instead of the PS DDR storage? In our reference designs, we typically use the PS DDR memory for the data offload storage for the zcu102 carrier.

  • Hi  , first let me explain what I’m trying to achieve.

    On the software side, I’m trying to load as many samples as possible and generate the longest continuous output from the AD9172. I’m currently using the axi_dac_load_custom_data function, and at the moment I can load 131,072 samples of 32-bit data per sample (16-bit I + 16-bit Q).

    The limitation I’m hitting is on the ZCU102, where the maximum offload buffer I can use is:

    set dac_offload_size [expr 256*2048] → 512 kB

    So effectively I only have 512 kB (~4 Mbit) available for the DAC offload path. With 32-bit IQ samples, that capacity corresponds to about 131,072 samples, which matches what I observe.

    When I try to exceed this size, I stop getting valid output on the spectrum analyzer. This gives me roughly 50 µs of waveform duration, because I’m running the AD9172 in Mode 10.

    I understand that the ZCU102 has 4 GB PS DDR and 512 MB PL DDR. In theory, if we could use the full PS DDR, we could store up to 32 Gbit of waveform data; and with PL DDR, up to 4 Gbit. However, since we are constrained by the offload buffer size, we are effectively limited to only 512 kB, which prevents us from generating longer waveforms.

    For reference, the bit-rate / duration calculations and the reasoning behind the achievable waveform length are discussed in this thread:
    https://ez.analog.com/fpga/f/q-a/597844/util_dacfifo-bypass-mode-speed

    Unfortunately, 50 µs is not sufficient for our application. If we could bypass the current dac_offload limitation and stream data from PS DDR, we could theoretically generate a waveform around 8,192 × 50 µs long. If PS DDR is not feasible, but we could use PL DDR as the storage backing for the offload path, we could still reach around 1,024 × 50 µs.

    In short, our main goal is to increase the number of samples we can store and replay, so we can generate a much longer continuous signal. If there is an alternative approach (for example, another architecture to stream data, a different buffering method, or a recommended HDL/software path), we are completely open to it.

    Thank you very much for your support. If anything is unclear or if you need more details about our setup, I’d be happy to provide them.

  • Hi,

    Why did you choose the operation Mode 10 for AD9172? I'm asking because one way to solve this would be to reduce the lane rate, therefore lowering the device_clk frequency from 368.64MHz to a value below 300MHz. You'd also have to reduce the DAC_DATA_WIDTH from 256 to 128 (in order to achieve a lower data rate on the DAC-FPGA side than the DMA-memory side).

    Then, you increase the DMA-memory bandwidth by increasing the HP Port clock to 333 MHz @128b, the maximum value for zcu102. Here is a solution for this: https://github.com/analogdevicesinc/hdl/blob/42dc6a4feb9046115de19b85bde1f2fa849a0116/projects/daq3/zcu102/system_bd.tcl#L56

    Finally, you set the data offload in bypass mode.

    Please let me know if this scenario works in your case.

    Regards,

    Ionut

  • Hi  ,

    We prefer to use Mode 10 because our entire setup is built around it. I have successfully done what you have described. Here is only changes I have done in main.c of ad9172 :

    struct hmc7044_chan_spec chan_spec[4] = {
                {.disable = 0, .num = 2, .divider = 1, .driver_mode = 1},       /* DAC_CLK */
                {.disable = 0, .num = 3, .divider = 512*4, .driver_mode = 1},     /* DAC_SYSREF */
                {.disable = 0, .num = 12, .divider = 8, .driver_mode = 2},      /* FPGA_CLK */
                {.disable = 0, .num = 13, .divider = 512*4, .driver_mode = 2},    /* FPGA_SYSREF */
            };
    struct hmc7044_init_param hmc7044_param = {
            .spi_init = &hmc7044_spi_param,
            .clkin_freq = {122880000, 0, 0, 0},
            .vcxo_freq = 122880000,
            .pll2_freq = 2400000000,
            .pll1_loop_bw = 200,
            .sysref_timer_div = 1024,
            .jesd204_max_sysref_frequency_hz = 2000000,
            .pulse_gen_mode = 0,
            .in_buf_mode = {0x15, 0, 0, 0, 0x15},
            .gpi_ctrl = {0x00, 0x00, 0x00, 0x00},
            .gpo_ctrl = {0x1f, 0x2b, 0x00, 0x00},
            .num_channels = 4,
            .channels = chan_spec,
            .export_no_os_clk = true,
        };
    struct jesd204_tx_init tx_jesd_init = {
            .name = "tx_jesd",
            .base = TX_JESD_BASEADDR,
            .octets_per_frame = 1,
            .frames_per_multiframe = 32,
            .converters_per_device = 2,
            .converter_resolution = 16,
            .bits_per_sample = 16,
            .high_density = true,
            .control_bits_per_sample = 0,
            .subclass = 1,
            .device_clk_khz = 300000,   /* 300 MHz */
            .lane_clk_khz = 12000000,   /* 12 GHz */
        };

        struct adxcvr_init tx_adxcvr_init = {
            .name = "tx_adxcvr",
            .base = TX_XCVR_BASEADDR,
            .sys_clk_sel = ADXCVR_SYS_CLK_QPLL0,
            .out_clk_sel = ADXCVR_REFCLK,
            .lpm_enable = 1,
            .lane_rate_khz = 12000000,
            .ref_rate_khz = 300000,     /* FPGA_CLK, output 12 of HMC 7044 */
            .export_no_os_clk = true,
        };

    struct ad9172_init_param ad9172_param = {
            .spi_init = &ad9172_spi_param, /* no_os_spi_init_param */
            .gpio_reset = {
                .number = 54 + 0,
                .platform_ops = &xil_gpio_ops,
                .extra = &xilinx_gpio_init_param},
            .gpio_txen0 = {.number = 54 + 22, .platform_ops = &xil_gpio_ops, .extra = &xilinx_gpio_init_param},
            .gpio_txen1 = {.number = 54 + 23, .platform_ops = &xil_gpio_ops, .extra = &xilinx_gpio_init_param},
            .dac_rate_khz = 2400000,      /* or sample rate */
            .dac_clkin_Hz = 2400000000, /* DAC_CLK, output 2 of HMC 7044 */
            .jesd_link_mode = 10,
            .jesd_subclass = 1,
            .dac_interpolation = 1,
            .channel_interpolation = 1,
            .clock_output_config = 1,
            .scrambling = 1,
            .sysref_mode = 2, /* SYSREF_CONTINUOUS */
            .pll_bypass = true,
            .syncoutb_type = SIGNAL_LVDS,
            .sysref_coupling = COUPLING_AC,
            .nco_main_carrier_freq_khz = 0,
            .nco_channel_carrier_freq_khz = 0,
            .nco_channel_amp = 0,
            .nco_main_amp = 0,
            .nco_channel_enable = AD917X_CH_NONE,
            .main_nco_f_enable = 0,
            .pll_en = 0,
            .logic_lanes_mapping = 0,
            .use_jesd_fsm = false,
        };

    Do they correct? 


    Best regards,

  • Hello,

    We haven't used the PL DDR on the ZCU102 as an option for Data offload because the HP ports on the PS8 support a higher bandwidth than the PL DDR. HP port works at 332MHz/128 bits (42.5Gbps). The PL ddr theoretical maximum bandwidth is 16*2666MTPS (~42.65Gbps), but depending on how it's used performance may vary between 30-75% of maximum, if I remember correctly. 

    In the past we could capture continuously data from 4 JESD204B lanes at 10Gbps. We captured over 1GB of data. We haven't tried on the TX side, but most likely this can be supported. In this case, you can take out the Data offload from the design.

    If you need more data than that, you would need to generate it in PL, similarly with how we generate the DDS that is part of our IP cores.

    Regards,

    Adrian

  • Hi  ! Do you have any updates? Did you manage to solve your issues? 

Before You Switch


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