Data transfer from PC to Arria 10 GX and ADRV9371-W/PCBZ

Hello,

My current setup comprises an Arria 10 GX development board connecting to ADRV9371-W/PCBZ via FMC connector.

I have completed setting up the Quartus project for no-OS on the a10gx by following this guide https://wiki.analog.com/resources/eval/user-guides/mykonos/no-os-setup#intelaltera_platform

The project was compiled without issue, and the headless application ran fine.

Now, I am looking into a best way to send data from a PC to ADRV9371-W/PCBZ for transmitting out of the SMA ports.

Based on what I have seen in the Platform Designer, I probably can use the Ethernet port RJ-45 on the a10gx to communicate with the PC. I am looking for a sample code to transfer data utilizing this connection. 

Any suggestion on how to accomplish this would be greatly appreciate.

Thanks

Nick

Parents
  • 0
    •  Analog Employees 
    on Oct 6, 2020 6:24 PM 3 months ago

    There is no sample code to use Ethernet as No-OS is not meant for this purpose. Its meant for an optimized design not for those starting out.

    If you are just starting out with the ADRV9371 we recommend starting with the Linux-based SD cards which give you Ethernet and a full OS environment on the board: https://wiki.analog.com/resources/tools-software/linux-software/embedded_arm_images?s[]=fmc&s[]=sd

    You will also be able to connect to tools like MATLAB, IIO-Scope, our Python support, ...

    -Travis

  • Hi Travis,

    If I build a Nios2 Linux image from this page to run on my Arria 10 GX development board

    https://wiki.analog.com/resources/tools-software/linux-drivers/platforms/nios2

    Would I be able to utilize the Ethernet port and tools that you mentioned above ?

    Thanks

  • Hi aardelean,

    I used the script method in the link above. I thought it did all that's needed.

    How do I configure it ?

    Thanks

    Nick

  • 0
    •  Analog Employees 
    on Oct 11, 2020 7:13 PM 3 months ago in reply to Nickbiz

    Hi Nick,

    I'll try to do a test too. I might be able to do it tomorrow.

    Dragos

  • 0
    •  Analog Employees 
    on Oct 12, 2020 6:40 PM 3 months ago in reply to DragosB

    Nick,

    Can you try the attached zImage? I've manually built the buildroot and the kernel using their master branches. It seems to properly boot on my side:

        Linux version 4.19.0-gd4c87f5d8e3f (dragos@debian) (gcc version 7.3.1 20180222 (Sourcery CodeBench Lite 2018.05-5)) #92 Mon Oct 12 20:18:57 EEST 2020
        On node 0 totalpages: 65536
          Normal zone: 512 pages used for memmap
          Normal zone: 0 pages reserved
          Normal zone: 65536 pages, LIFO batch:15
        pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
        pcpu-alloc: [0] 0
        Built 1 zonelists, mobility grouping on.  Total pages: 65024
        Kernel command line: debug console=ttyJ0,115200
        Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
        Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
        Sorting __ex_table...
        Memory: 248216K/262144K available (3796K kernel code, 468K rwdata, 4364K rodata, 2872K init, 108K bss, 13928K reserved, 0K cma-reserved)
        NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
        clocksource: nios2-clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604467 ns
        Calibrating delay loop (skipped), value calculated using timer frequency.. 200.00 BogoMIPS (lpj=400000)
        pid_max: default: 32768 minimum: 301
        Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
        Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
        devtmpfs: initialized
        random: get_random_u32 called from bucket_table_alloc.isra.6+0x98/0x1e4 with crng_init=0
        clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
        futex hash table entries: 256 (order: -1, 3072 bytes)
        NET: Registered protocol family 16
        jesd204: found 0 devices and 0 topologies
        clocksource: Switched to clocksource nios2-clksrc
        NET: Registered protocol family 2
        tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
        TCP established hash table entries: 2048 (order: 1, 8192 bytes)
        TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
        TCP: Hash tables configured (established 2048 bind 2048)
        UDP hash table entries: 256 (order: 0, 4096 bytes)
        UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
        NET: Registered protocol family 1
        RPC: Registered named UNIX socket transport module.
        RPC: Registered udp transport module.
        RPC: Registered tcp transport module.
        RPC: Registered tcp NFSv4.1 backchannel transport module.
        random: fast init done
        workingset: timestamp_bits=30 max_order=16 bucket_order=0
        jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
        Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
        io scheduler noop registered
        io scheduler deadline registered
        io scheduler cfq registered (default)
        io scheduler mq-deadline registered
        io scheduler kyber registered
        101814f0.serial: ttyJ0 at MMIO 0x101814f0 (irq = 2, base_baud = 0) is a Altera JTAG UART
        console [ttyJ0] enabled
        loop: module loaded
        spi_altera 10181400.spi: base (ptrval), irq 8
        libphy: Fixed MDIO Bus: probed
        libphy: altera_tse: probed
        altera_tse 10181000.ethernet (unnamed net_device) (uninitialized): MDIO bus altera_tse-0: created
        altera_tse 10181000.ethernet: Altera TSE MAC version 18.0 at 0x10181000 irq 1/3
        ad9371 spi0.1: ad9371_probe : enter
        altera-a10-fpll 10045000.altera-a10-fpll: FPLL PLL calibration OK (1400 us)
        altera-a10-fpll 10035000.altera-a10-fpll: FPLL PLL calibration OK (1400 us)
        altera-a10-fpll 10025000.altera-a10-fpll: FPLL PLL calibration OK (1400 us)
        altera_adxcvr 10024000.axi-ad9371-tx-xcvr: ATX PLL calibration OK (20 ms)
        altera_adxcvr 10024000.axi-ad9371-tx-xcvr: Lane 0 TX termination and VOD calibration OK (500 us)
        altera_adxcvr 10024000.axi-ad9371-tx-xcvr: Lane 1 TX termination and VOD calibration OK (500 us)
        altera_adxcvr 10024000.axi-ad9371-tx-xcvr: Lane 2 TX termination and VOD calibration OK (500 us)
        altera_adxcvr 10024000.axi-ad9371-tx-xcvr: Lane 3 TX termination and VOD calibration OK (500 us)
        altera_adxcvr 10024000.axi-ad9371-tx-xcvr: Altera ADXCVR (16.01.a) probed
        altera_adxcvr 10034000.axi-ad9371-rx-xcvr: Lane 0 CDR/CMU PLL & RX offset calibration OK (400 us)
        altera_adxcvr 10034000.axi-ad9371-rx-xcvr: Lane 1 CDR/CMU PLL & RX offset calibration OK (500 us)
        altera_adxcvr 10034000.axi-ad9371-rx-xcvr: Altera ADXCVR (16.01.a) probed
        altera_adxcvr 10044000.axi-ad9371-rx-os-xcvr: Lane 0 CDR/CMU PLL & RX offset calibration OK (600 us)
        altera_adxcvr 10044000.axi-ad9371-rx-os-xcvr: Lane 1 CDR/CMU PLL & RX offset calibration OK (500 us)
        altera_adxcvr 10044000.axi-ad9371-rx-os-xcvr: Altera ADXCVR (16.01.a) probed
        NET: Registered protocol family 17
        altera_adxcvr 10024000.axi-ad9371-tx-xcvr: Setting link rate to 122880000 (lane rate: 4915200)
        altera_adxcvr 10034000.axi-ad9371-rx-xcvr: Setting link rate to 122880000 (lane rate: 4915200)
        altera_adxcvr 10044000.axi-ad9371-rx-os-xcvr: Setting link rate to 122880000 (lane rate: 4915200)
        ad9371 spi0.1: ad9371_probe : enter
        ad9371 spi0.1: ad9371_probe : enter
        random: crng init done
        ad9371 spi0.1: framerStatus (0x20)
        ad9371 spi0.1: AD9371 Rev 4, Firmware 5.2.2 API version: 1.5.2.3566 successfully initialized
        Freeing unused kernel memory: 2872K
        This architecture does not have kernel memory protection.
        Run /init as init process
        Starting syslogd: OK
        Starting klogd: OK
        Initializing random number generator... done.
        Starting network: udhcpc: started, v1.29.3
        altera_tse 10181000.ethernet eth0: device MAC address b2:94:3d:6e:11:8f
        altera_tse 10181000.ethernet eth0: TSE revision 1200
        altera_tse 10181000.ethernet eth0: PCS PHY ID: 0x00000000
        altera_tse 10181000.ethernet eth0: SGMII PCS block initialised OK
        udhcpc: sending discover
        altera_tse 10181000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
        udhcpc: sending discover
        udhcpc: sending select for 10.48.65.111
        udhcpc: lease of 10.48.65.111 obtained, lease time 21600
        deleting routers
        adding dns 10.32.51.110
        adding dns 10.64.53.110
        Starting dropbear sshd: OK
        Starting IIO Server Daemon

        Welcome to Buildroot
        buildroot login:

    Thanks,
    Dragos

    zImage_master.zip

  • Hi Dragos,

    Thanks a lot !! It works on mine as well. 

    Could you please show me how to build it ?

    Thanks

    Nick

  • +1
    •  Analog Employees 
    on Oct 12, 2020 8:51 PM 3 months ago in reply to Nickbiz

    username: root
    password: analog

    Buildroot:
       export CROSS_COMPILE=nios2-linux-gnu-
       make nios2_adi_rootfs_defconfig
       make
    Copy the generated rootfs.cpio.gz to linux/arch/nios2/boot/

    Linux Kernel:
       copy linux/arch/nios2/boot/dts/a10gx_adrv9371.dts to arch/nios2/boot/devicetree.dts
       export CROSS_COMPILE=nios2-linux-gnu-
       make ARCH=nios2 adi_nios2_defconfig
       make zImage

    Dragos

Reply
  • +1
    •  Analog Employees 
    on Oct 12, 2020 8:51 PM 3 months ago in reply to Nickbiz

    username: root
    password: analog

    Buildroot:
       export CROSS_COMPILE=nios2-linux-gnu-
       make nios2_adi_rootfs_defconfig
       make
    Copy the generated rootfs.cpio.gz to linux/arch/nios2/boot/

    Linux Kernel:
       copy linux/arch/nios2/boot/dts/a10gx_adrv9371.dts to arch/nios2/boot/devicetree.dts
       export CROSS_COMPILE=nios2-linux-gnu-
       make ARCH=nios2 adi_nios2_defconfig
       make zImage

    Dragos

Children