Post Go back to editing

Ask about direct and indirect loopback on AD9081

Category: Hardware
Product Number: AD9081

I am trying to perform direct loopback and indirect loopback on AD9081 with ZCU102 and no-os driver. I have a few questions:

1. In direct loopback, since ADC output connect directly to DAC input, so we just need to make the AD9081_DAC_FREQUENCY and AD9081_ADC_FREQUENCY in app_config.h identical and call the adi_9081_device_direct_loopback_set() function in main(). Is that enough? Are there any other aspects that we need to take into consideration?

2. In indirect loopback, I want to bypass as much as possible to reduce the latency. But we need at least one DUC and DDC to match the data rate of the jesd link, is that true? Or we can bypass all of them? What are the other aspects and configurations that we also need to consider?

Any help would be appreciated.

Edit Notes

additional info
[edited by: rftoddler at 3:23 AM (GMT -4) on 30 Sep 2025]

Thread Notes

  • Hello,

    Could you provide us some details about the HDL release you are using and if you already did some changes to the reference design? Is there an issue that you encountered using it, or what do you want to debug using the direct and indirect loopback?

    For the No-OS related questions, I will move this thread to the Microcontroller no-OS Drivers .

    Kind regards,

    Stanca

  • Hello  ,

    I am using HDL release 2021_R2.

    I want to measure the latency of a signal that is sent to the ADC and looped back to the DAC for both direct and indirect modes. I currently don't have the signal generator and oscilloscope nearby, so I can't test to see if the code works or not. I am asking to determine the proper way of configuring those loopback modes.

  • Got it. May I suggest using a newer release? We usually recommend the latest one, since there could be bugfixes and updates since the older ones.

    As far as I know, on the Linux side there's no need to do any HDL changes and you can use both loopback modes presented here: AD9081 MxFE Linux Driver [Analog Devices Wiki].

    Regarding the No-OS, I don't have an answer yet, but someone from the software team is already looking into it. We'll keep you updated.

  • Hello,

    Regarding the direct mode, you are correct, you have to call the adi_9081_device_direct_loopback_set() somwhere in your application, but there is no need to set the ADC_FREQUENCY_HZ and DAC_FREQUENCY_HZ to be identical, the project should still work if you leave them as default. Also, make sure you set the NCO frequency the same on rx and tx side (default project on our main is already set this way)

    Regarding indirect mode, are you referring to the data paths? In this case you should have at least one running at the desired NCO frequency.

    If you have additional questions from the software perspective, feel free to let us know.

    Best Regards,
    Ramona

  • Thanks for your response  ,

    About the indirect mode:

    Yes, I am referring to the datapaths.

    1. Could you elaborate on "running at the desired NCO frequency"? Does that mean the mixer isn't bypassable? 

    2. If I assign value 1 to AD9081_TX_MAIN_INTERPOLATION, AD9081_TX_CHAN_INTERPOLATION, AD9081_RX_MAIN_DECIMATION, AD9081_RX_CHAN_DECIMATION, does it bypass the whole main and channelizer datapaths or just the DDC and DUC?

    About the direct mode:

    3. According to the ug-1578 page 222: "To enable the direct loopback mode, set the DIRECT_ LOOPBACK_MODE. The ADC and DAC clock rates must be equal and keep the ADCDIVN_DIVRATIO_SPI at the default setting of divide-by-1 because the output data of ADC0 or ADC1 is fed directly back into one of the DACs". If we don't set the frequency for DAC and ADC, how do we know which frequency they are running at?

    4. And since the ADC and DAC are directly connected in this mode, why do we bother NCO frequency?

  • Hello,

    For direct mode, I did not check the user guide and I was only speaking from memory when I mentioned that the adc and dac frequencies do not have to be the same. In this case, yes, you also have to set those 2 attributes as well in app_config.h.

    I intended to do a setup and test everything out to make sure. I did manage to test the direct mode, and everything works as expected, and NCO is bypassable. I did not get a chance to test the indirect mode as well, I think it also requires setting "rx_channel_nco_mixer_mode" to AD9081_ADC_NCO_ZIF (Zero Intermediate Frequency) https://github.com/analogdevicesinc/no-OS/blob/main/projects/ad9081/src/app.c#L188. I'll let you know once I also tested the indirect setup as well

  • Really helpful answers so far  .

    Did you measure the latency when testing the direct mode? If so, I would like to know the latency for reference on my side.

    Please ping me when all the tests are done.

  • Hello,

    Just as a heads up, we are still debugging some stuff, but we will return with an answer as soon we figure this out. Did you manage to do your initial setup? What FPGA do you intend to use? 
    Just as a broad suggestion I would recommend using a JESD204C profile as it makes things easier to configure.

    Did you reach to any conclusion so far?

  • Really appreciate the effort that you and your team put into this  .

    My team has decided to postpone the project related to this question, so no conclusion has been reached yet. However, the project will be resumed in the future, so I still need your answer for reference.

    I use the FPGA on ZCU102 board. And I will consider switching to JESD204C if it simplifies the tasks as you mentioned.