Post Go back to editing

Max streaming capability over UDP

Thread Summary

The user is trying to stream 32 Msps I/Q data over Gigabit Ethernet using Python and iio_readdev calls on a board with a small 2-core CPU subsystem. The current setup reaches a maximum throughput of 11.72 Msps, which is likely due to CPU limitations. To achieve higher throughput, a custom FPGA design with a UDP packetizer and an FPGA-attached Ethernet PHY is recommended.
AI Generated Content
Category: Software
Product Number: ADRV9361Z7035
Software Version: Raspbian, Kuiper GNU/Linux 11.2 (bullseye)

I am trying to build an IQ recording device that will stream samples continuously, with no gaps or dropouts over UDP using Python, the on-board linux environment, and/or iio_readdev calls.

My requirement is to stream 32Msps I/Q over Gigabit Ethernet. Instead of sending 16-bit I and 16-bit Q samples, I am reducing their size down to 8-bits each for a total required Ethernet throughput of 64MB/s

Hardware-wise, I should easily meet 64MB/s

I have tried vibe-coding with Claud the solution and have reached a roadblock of the code reaching 11.72Msps throughput.

Here is a snippet of the diagnostic of it running

Streaming to 192.168.1.100:5000 via eth1 (indefinitely - Ctrl+C to stop) ...
1.79s of RF captured | 5.02s wall clock | 11.70 Msps instantaneous | free buffers: 3
3.59s of RF captured | 10.02s wall clock | 11.74 Msps instantaneous | free buffers: 3
5.38s of RF captured | 15.02s wall clock | 11.74 Msps instantaneous | free buffers: 3
7.18s of RF captured | 20.03s wall clock | 11.73 Msps instantaneous | free buffers: 3
8.97s of RF captured | 25.03s wall clock | 11.73 Msps instantaneous | free buffers: 3
10.76s of RF captured | 30.04s wall clock | 11.72 Msps instantaneous | free buffers: 3
12.56s of RF captured | 35.05s wall clock | 11.72 Msps instantaneous | free buffers: 3
14.35s of RF captured | 40.06s wall clock | 11.72 Msps instantaneous | free buffers: 3

The vibe-coding ran many different diagnostic attempts and tests trying to identify the bottleneck either with the Ethernet stackup, the DMA, the ADC, and the processor. Claud says we have reached the theoretical max (11.72Msps) with all of the debugging and diagnostics we have run.

Is there anyone more familiar with this hardware board and it's built up ADC->buffers/DMA->Linux who could chime in and give some real-world architecture advice on how to get the most *LIVE* throughput out of this device over Ethernet?

Or could someone potentially answer if this 11.72 Msps is the theoretical max full streaming through all of the DMA and buffering this design goes through?

I need to have zero gaps in the data and basically need an ADC direct to Ethernet UDP stream.

Thread Notes

Parents
  • Hi  ,

    Which is the resource consumption on the CPU subsystem from your FPGA SoC? When you try to stream data at max. rate

  • reported from > top:

    while idle 1% CPU  1.5% memory accross some processes

    running the python UDP stream:

      PID USER      PR  NI    VIRT    RES    SHR S            %CPU        %MEM     TIME+ COMMAND

    1277   root       20    0 172824 52060     23104 R          100.0           5.1          0:37.01 python
    1282   root       20    0 147236 34188     12964 R          46.9             3.4          0:15.61 python

    %Cpu(s): 49.7 us, 24.6 sy, 0.0 ni, 25.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
    MiB Mem : 990.3 total, 480.7 free, 222.5 used, 287.0 buff/cache
    MiB Swap: 100.0 total, 100.0 free, 0.0 used. 674.6 avail Mem

  • I would also like to point out that I made a modified version of the UDP stream to sample at 11Msps (sub the theoretical max) and the processor time is able to follow the live streaming time. (meaning no gaps in the data)

  • Ok, yes, in this case of having an under 1 Gb transmission, the small sys_ps7 subsystem from the SoC should be able to perform a near line-rate reception and then transmission using RAM, even if there would be two mem-related operations made in this process, one . The best and simplified methodology for this data transmission over Ethernet would be to create the UDP/IPv4/Ethernet packets in HW and then transmit them using an attached 1Gb-capable Ethernet PHY, but this would be require the use of FPGA-attached PHYs (by Xilinx or ADI's CN0506 connected through the FMC connector).

  • Are you saying that I would need to modify the zynq hardware design and create a UDP packetizer?

    I was hoping to be able to accomplish something with the current hardware/softare ecosystem

  • Hi,

    We don't have specific measurements for this converter data transmission setup over 1Gb Ethernet (related to the max. rate that can be supported with this two DMA-based operations and various CPU subsystems configurations - for data capture and then data transmission over network). In this case, using a small 2 core-based CPU subsystem for this 2 mem-based operations seems to be insufficient to carry on a near line rate transmission even if one core is at only ~50%. Do you use jumbo frames setup? (using an MTU of 9000 for example). To implement both FPGA-based data reception and network transmission, another hardware setup would be needed in order to have both convertor and Ethernet PHY connected to the FPGA region.

    Best regards,

    Alin 

  • Hi  !

    Were all your questions answered, or is there anything else we can help with?

    Regards, Elena

  • Yes, it appears my question has been answered as far as max rate capability with the default Hardware/Software ecosystem you provide. 

    A custom hardware design would need to be implemented in the PL that packetizes data directly off of the ADC, which unfortunately will go beyond the scope of my quick approach.

Reply Children
No Data

Before You Switch


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