Post Go back to editing

ADC not working correctly with custom design parameters

Category: Software
Product Number: AD9081
Software Version: no-os

Hello,

ADC datas values are not correct. I use AD9081 4R4T and xzcu19eg custom design board.There is no problem with work default parameters of profile ZCU102. Our purpose is 3x1(coarsexfine) dec 3.8 GHz ADC NCO = 1350 MHz, and 6x1(coarsexfine) interpolation 7.6 GHz DAC NCO = -1350 MHz.

Below i shared my configuration. I used no-os main and hdl 2023_2 design. I also shared ila result from FPGA.

/***************************************************************************//**
 *   @file   app_config.h
 *   @brief  AD9081 profile & configuration.
 *   @author DBogdan (dragos.bogdan@analog.com)
 *   @author Ramona Nechita (ramona.nechita@analog.com)
********************************************************************************
 * Copyright 2025(c) Analog Devices, Inc.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice,
 *    this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 *    this list of conditions and the following disclaimer in the documentation
 *    and/or other materials provided with the distribution.
 *
 * 3. Neither the name of Analog Devices, Inc. nor the names of its
 *    contributors may be used to endorse or promote products derived from this
 *    software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. ?AS IS? AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
 * EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/
#ifndef APP_CONFIG_H_
#define APP_CONFIG_H_

#define MULTIDEVICE_INSTANCE_COUNT	1

#define ADXCVR_REF_CLK_KHZ	475000
#define ADXCVR_RX_DEV_CLK_KHZ	237500
#define ADXCVR_TX_DEV_CLK_KHZ	237500
#define ADXCVR_RX_LANE_CLK_KHZ	15675000
#define ADXCVR_TX_LANE_CLK_KHZ	15675000
#define AD9081_DAC_FREQUENCY	7600000000
#define AD9081_ADC_FREQUENCY	3800000000
#define AD9081_ADC_NYQUIST_ZONE	{0, 0, 0, 0}

/* TX path */

#define AD9081_TX_JESD_MODE		24
#define AD9081_TX_JESD_SUBCLASS		1
#define AD9081_TX_JESD_VERSION		2
#define AD9081_TX_JESD_M		8
#define AD9081_TX_JESD_F		3
#define AD9081_TX_JESD_K		256
#define AD9081_TX_JESD_N		12
#define AD9081_TX_JESD_NP		12
#define AD9081_TX_JESD_CS		0
#define AD9081_TX_JESD_L		8
#define AD9081_TX_JESD_S		2
#define AD9081_TX_JESD_HD		1
#define AD9081_TX_LOGICAL_LANE_MAPPING	{0, 2, 7, 7, 1, 7, 7, 3}

#define AD9081_JRX_TPL_PHASE_ADJUST 0x0c

#define AD9081_TX_MAIN_INTERPOLATION	6
#define AD9081_TX_CHAN_INTERPOLATION	1
#define AD9081_TX_MAIN_NCO_SHIFT	{-1350000000, -1350000000, -1350000000, -1350000000}
#define AD9081_TX_CHAN_NCO_SHIFT	{0, 0, 0, 0, 0, 0, 0, 0}
#define AD9081_TX_CHAN_GAIN		{1024, 1024, 1024, 1024, 0, 0, 0, 0}

#define AD9081_TX_FSC	{0, 0, 0, 0}
#define AD9081_TX_DAC_CHAN_CROSSBAR	{0x1, 0x2, 0x4, 0x8}
#define AD9081_TX_DAC_1X_NON1X_CROSSBAR	{0x1, 0x2, 0x4, 0x8}

/* RX path */

#define AD9081_RX_JESD_MODE		26
#define AD9081_RX_JESD_SUBCLASS		1
#define AD9081_RX_JESD_VERSION		2
#define AD9081_RX_JESD_M		8
#define AD9081_RX_JESD_F		3
#define AD9081_RX_JESD_K		256
#define AD9081_RX_JESD_N		12
#define AD9081_RX_JESD_NP		12
#define AD9081_RX_JESD_CS		0
#define AD9081_RX_JESD_L		8
#define AD9081_RX_JESD_S		2
#define AD9081_RX_JESD_HD		1
#define AD9081_RX_LOGICAL_LANE_MAPPING	{2, 0, 7, 7, 7, 7, 3, 1}
//#define AD9081_RX_LOGICAL_LANE_MAPPING	{2, 0, 7, 6, 5, 4, 3, 1}
//#define AD9081_RX_LINK_CONVERTER_SELECT	{0, 1, 2, 3, 8, 9, 10, 11, 4, 5, 6, 7, 12, 13, 14, 15}
#define AD9081_RX_LINK_CONVERTER_SELECT	{0, 1, 2, 3, 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0}

#define AD9081_RX_MAIN_DECIMATION	{3, 3, 3, 3}
#define AD9081_RX_CHAN_DECIMATION	{1, 1, 0, 0, 1, 1, 0, 0}
#define AD9081_RX_MAIN_ENABLE		{1, 1, 1, 1}
#define AD9081_RX_CHAN_ENABLE		{1, 1, 0, 0, 1, 1, 0, 0}
#define AD9081_RX_MAIN_NCO_SHIFT	{1350000000, 1350000000, 1350000000, 1350000000}
#define AD9081_RX_CHAN_NCO_SHIFT	{0, 0, 0, 0, 0, 0, 0, 0}

#endif

There is no problem with clocks, links etc. ADC I and Q data came with low amplitude and same for all channels. Our input is -7 dBm signal tone CW signal.(between 850 MHz - 1850 MHz). I shared olsa ila results (input signal is 1360 MHz ad -7 dBm)

Results are output of rx_mxfe_tpl_core slices (Jesd204 Transport Layer for ADCs Slices.)

I also tried ZIF mode but nothing change.

  • Hi caca123,

    Thank you for the query. I am wondering whether you confirmed these new JESD parameters on ZCU102-ADI reference Design with corresponding HDL? It'd be appreciated if you could share your HDL build parameters.

    And it appears that your app_config.h is from the main branch instead of 2023_R2 branch. Could you confirm and try with 2023_R2 branch in that case? Your clock settings and JESD parameters looks right except the HD should be 0 for both of TX and RX. Not sure this could cause an issue, but could you try with HD=0?

    -YH

  • Thank you for your response. I tried default ZCU102 system on my custom board and it worked very well. Then i switched the parameters what i wanted. I tried HD=0 but nothing change. I think i have a problem with clocks. I have also ila on rx_data  output of "ADI JESD204 Receive inside of axi_mxfe_rx_jesd block ". The output width is 768 bit. I gave the signal on ADC0 and I saw the data from 0 to 191.(I and Q) 0-95 datas amplitude is wrong but 96-191 bit datas amplitude is correct. The correct data is in the rx_data[96:191] but "adc_tpl_core output " is always amplitude low.(adc_data0 and adc_data1) but i expect at least adc_data1 is same as rx_data[95:191].

    I have one question below:

    In hdl design receive periphal has two clock that core clk/clk and device clk(receive periphal IPs). Also tpl_core clk (link_clk off adc_tpl_core IP) is connected to device clk of receive IP.

    In my configuration device clk = 15675 / 66 = 237.5 MHz.

    core clk/clk = also 237.5 MHz.

    but data witdh is 8 and tpl data witd is 12. So that reason should i change to core clk/clk to 356.25 MHz or 158.3 MHz?

    my hdl parameters:

    make JESD_MODE=64B66B \
    RX_LANE_RATE=15.675 \
    TX_LANE_RATE=15.675 \
    RX_JESD_M=8 \
    RX_JESD_L=8 \
    RX_JESD_S=2 \
    RX_JESD_NP=12 \
    TX_JESD_M=8 \
    TX_JESD_L=8 \
    TX_JESD_S=2 \
    TX_JESD_NP=12

    pl_clk0 = 100 MHz

    pl_clk1 = 250 MHz

    pl_clk2 = 500 MHz

    I will also try on 2023_R2 for no-OS.

  • I was wondering whether you confirmed new JESD parameters on ZCU102. Let me try and review your questions and will get back to you.

    -YH

  • Sorry for misunderstanding, i worked on xczu19eg custom board with ZCU102 config parameters and design.(ı did not try on ZCU102) There is no problem with default configuration and default design, it worked perfectly on xczu19eg custom board. I also changed below lines:

    for qpll0 enable on rx side:

    #ifdef RX_XCVR_BASEADDR
        struct adxcvr_init rx_adxcvr_init = {
            .name = "rx_adxcvr",
            .base = RX_XCVR_BASEADDR,
            .sys_clk_sel = ADXCVR_SYS_CLK_QPLL0,
            .out_clk_sel = ADXCVR_PROGDIV_CLK,
            .lpm_enable = 0,
            .lane_rate_khz = rx_lane_clk_khz,
            .ref_rate_khz = reference_clk_khz,
            .export_no_os_clk = true
        };
    #endif

    for adjust pll2_freq:

        struct hmc7044_init_param hmc7044_param = {
            .spi_init = &clkchip_spi_init_param,
            /*
            * There are different versions of the AD9081-FMCA-EBZ & AD9082-FMCA-EBZ:
            * VCXO = 122.880 MHz, XO = 122.880MHz (AD9081-FMC-EBZ & AD9082-FMC-EBZ)
            * VCXO = 100.000 MHz, XO = 100.000MHz (AD9081-FMC-EBZ-A2 & AD9082-FMC-EBZ-A2)
            * To determine the version, read the frequency printed on the VCXO.
            */
            //.clkin_freq = {122880000, 30720000, 0, 0},
            //.vcxo_freq = 122880000,
            .clkin_freq = {100000000, 10000000, 0, 0},
            .vcxo_freq = 100000000,
            .pfd1_limit = 0,
            .pll1_cp_current = 0,
            //.pll2_freq = 3000000000,
            .pll2_freq = 2850000000,
            .pll1_loop_bw = 200,
            .sysref_timer_div = 1024,
            .in_buf_mode = {0x07, 0x07, 0x00, 0x00, 0x15},
            .gpi_ctrl = {0x00, 0x00, 0x00, 0x00},
            .gpo_ctrl = {0x37, 0x33, 0x00, 0x00},
            .num_channels = sizeof(chan_spec) /
            sizeof(struct hmc7044_chan_spec),
            .pll1_ref_prio_ctrl = 0xe4,
            .pll1_ref_autorevert_en = false,
            .sync_pin_mode = 0x1,
            .high_performance_mode_clock_dist_en = false,
            .pulse_gen_mode = 0x0,
            .channels = chan_spec
        };

    for adjust sysref:

        struct hmc7044_chan_spec chan_spec[] = {
            {
                .num = 0,        // CORE_CLK_RX
                .divider = 12,        // 250 MHz
                .driver_mode = 2,    // LVDS
            }, {
                .num = 2,        // DEV_REFCLK
                .divider = 12,        // 250 MHz
                .driver_mode = 2,    // LVDS
            }, {
                .num = 3,        // DEV_SYSREF
                .divider = 4608,    // 1.953125 MHz
                .driver_mode = 2,    // LVDS
                .is_sysref = true,
            }, {
                .num = 6,        // CORE_CLK_TX
                .divider = 12,        // 250 MHz
                .driver_mode = 2,    // LVDS
            }, {
                .num = 8,        // CORE_CLK_RX
                .divider = 6,        // 500 MHz
                .driver_mode = 2,    // LVDS
            }, {
                .num = 10,        // CORE_CLK_RX_ALT
                .divider = 12,        // 250 MHz
                .driver_mode = 2,    // LVDS
            }, {
                .num = 12,        // FPGA_REFCLK
                .divider = 6,        // 500 MHz
                .driver_mode = 2,    // LVDS
            }, {
                .num = 13,        // FPGA_SYSREF
                .divider = 4608,    // 1.953125 MHz
                .driver_mode = 2,    // LVDS
                .is_sysref = true,
            }
        };

  • Thank you for sharing the details. I believe you intend to use JESD204C but your HDL is built with JESD204B settings. Could you confirm? I am trying to build HDL and linux/no-os software and will let you know if I find anything.

  • Sorry about error in my post. Your HDL is built with 204C settings. My bad.

  • I have overlooked the gearbox effects with NP=12/F=3 settings. So your device clock should be 158.33 MHz (pll2/18) and the FPGA reference clock shoudl be 475 MHz (pll2/6), as you suggested.

    I was having a difficulty in building your HDL settings with ZCU102 due to timing violation error, but I am able to build M=2/L=2 while keeping all other parameters same way. The linux driver seems to work but I need further confirmation. And then I'll look into NO-OS within next couple of days. Please let us know if you got any update until then.

    -YH

  • I tried also with no-os 2023 repo the results are same. By the way my DMA Bits Per Sample is 12 so i adjust register slice to.