|
| 1 | +--- |
| 2 | +description: Getting started with Ettus USRP X410 development. |
| 3 | +--- |
| 4 | + |
| 5 | +# Ettus USRP X410 Development |
| 6 | + |
| 7 | +The [Ettus USRP X410](https://www.ettus.com/all-products/usrp-x410/) is a high-performance software defined radio (SDR) based on the Xilinx Zynq Ultrascale+ ZU28DR RF System on Chip (RFSoC). |
| 8 | + |
| 9 | +This guide describes how to get started with FPGA and software development for the USRP X410 in ExCL. |
| 10 | + |
| 11 | +## Getting Started |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +To discover devices that are available on the network: |
| 16 | + |
| 17 | +```shell |
| 18 | +$ uhd_find_devices |
| 19 | +[INFO] [UHD] linux; GNU C++ version 11.3.0; Boost_107400; UHD_4.4.0.0-0ubuntu1~jammy1 |
| 20 | +-------------------------------------------------- |
| 21 | +-- UHD Device 0 |
| 22 | +-------------------------------------------------- |
| 23 | +Device Address: |
| 24 | + serial: 3268240 |
| 25 | + addr: 10.40.10.133 |
| 26 | + claimed: False |
| 27 | + fpga: X4_200 |
| 28 | + mgmt_addr: 10.40.10.133 |
| 29 | + product: x410 |
| 30 | + type: x4xx |
| 31 | + |
| 32 | + |
| 33 | +-------------------------------------------------- |
| 34 | +-- UHD Device 1 |
| 35 | +-------------------------------------------------- |
| 36 | +Device Address: |
| 37 | + serial: 326A292 |
| 38 | + addr: 10.40.10.134 |
| 39 | + claimed: False |
| 40 | + fpga: X4_200 |
| 41 | + mgmt_addr: 10.40.10.134 |
| 42 | + product: x410 |
| 43 | + type: x4xx |
| 44 | + |
| 45 | +``` |
| 46 | + |
| 47 | +To probe details of a particular device: |
| 48 | + |
| 49 | +```shell |
| 50 | +$ uhd_usrp_probe --args mgmt_addr=x410-0 |
| 51 | +$ uhd_usrp_probe --args mgmt_addr=x410-1 |
| 52 | +``` |
| 53 | + |
| 54 | +To log into the embedded Linux of a device: |
| 55 | + |
| 56 | +```shell |
| 57 | +$ ssh root@x410-0 |
| 58 | +$ ssh root@x410-1 |
| 59 | +``` |
| 60 | + |
| 61 | +To connect to the STM32 SCU: |
| 62 | + |
| 63 | +```shell |
| 64 | +screen /dev/serial/by-id/usb-Digilent_Digilent_USB_Device_251635263527-if02-port0 115200 |
| 65 | +``` |
| 66 | + |
| 67 | +To connect to the RFSoC APU: |
| 68 | + |
| 69 | +```shell |
| 70 | +sudo screen /dev/serial/by-id/usb-Digilent_Digilent_USB_Device_2516351DDCC0-if03-port0 115200 |
| 71 | +``` |
| 72 | + |
| 73 | +## Development |
| 74 | + |
| 75 | +### USRP Hardware Driver (UHD) |
| 76 | + |
| 77 | +- C++ API |
| 78 | +- Python API |
| 79 | + |
| 80 | +### OpenEmbedded Linux |
| 81 | + |
| 82 | +```shell |
| 83 | +git clone -b 2.6.3 https://github.com/siemens/kas.git |
| 84 | +git clone -b v4.6.0.0 https://github.com/EttusResearch/meta-ettus.git |
| 85 | +./kas/kas-container build meta-ettus/kas/x4xx.yml --runtime-args "-e MENDER_ARTIFACT_NAME=v4.6.0.0-excl" |
| 86 | +./kas/kas-container shell meta-ettus/kas/x4xx.yml -c "bitbake gnuradio-image -cpopulate_sdk" |
| 87 | +./meta-ettus/contrib/create_packages.sh x4xx v4.6.0.0-excl gnuradio-image build/tmp-glibc/deploy |
| 88 | +``` |
| 89 | + |
| 90 | +### Radio Frequency Network-on-Chip (RFNoC) |
| 91 | + |
| 92 | +Developing a standalone UHD C++ API application... |
| 93 | + |
| 94 | +- [RFNoC Specification](https://files.ettus.com/app_notes/RFNoC_Specification.pdf) |
| 95 | + |
| 96 | +### FPGA |
| 97 | + |
| 98 | +The pre-built FPGA images can be installed with `uhd_image_loader`: |
| 99 | + |
| 100 | +```shell |
| 101 | +uhd_image_loader --args type=x4xx,mgmt_addr=x410-0,fpga=X4_200 |
| 102 | +uhd_usrp_probe --args mgmt_addr=x410-0 |
| 103 | +``` |
| 104 | + |
| 105 | +Building FPGA images for the X410 requires an enterprise license and a specific version of Vivado. The arias machine in ExCL has been configured to support building X410 images. |
| 106 | + |
| 107 | +```shell |
| 108 | +ssh arias |
| 109 | +cd /noback/$USER |
| 110 | +git clone https://github.com/EttusResearch/uhd.git |
| 111 | +cd uhd |
| 112 | +git checkout -b $USER/develop v4.6.0.0 |
| 113 | +cd fpga/usrp3/top/x400/ |
| 114 | +source setupenv.sh --vivado-path=/tools/Xilinx/Vivado |
| 115 | +make help |
| 116 | +``` |
| 117 | + |
| 118 | +Images that use 100G Ethernet requires an additonal no cost license for [Xilinx 100G Ethernet IP](https://www.xilinx.com/products/intellectual-property/cmac_usplus.html). Until this is added to the ExCL license server you can download the license to `~/.Xilinx/Xilinx.lic` or similaer and append it to the `XILINXD_LICENSE_FILE` evironment variable using a colon: |
| 119 | + |
| 120 | +```shell |
| 121 | +export XILINXD_LICENSE_FILE=2100@license:$HOME/.Xilinx/Xilinx.lic |
| 122 | +``` |
| 123 | + |
| 124 | +The default image *X410_X4_200* requires greater then 16 GB of memory (~17 GB peak). Currently arias only has 16 GB of memory so only smaller images like the *X410_X1_100* can be built. |
| 125 | + |
| 126 | +```shell |
| 127 | +make X410_X1_100 |
| 128 | +``` |
| 129 | + |
| 130 | +Program the image as follows: |
| 131 | + |
| 132 | +```shell |
| 133 | +uhd_image_loader --args type=x4xx,mgmt_addr=x410-0 --fpga-path build/usrp_x410_fpga_X1_100.bit |
| 134 | +uhd_usrp_probe --args mgmt_addr=x410-0 |
| 135 | +``` |
| 136 | + |
| 137 | +### Maintanence Notes |
| 138 | + |
| 139 | +See "Getting Started" section for the USRP X4x0 series in the [USRP Hardware Driver and USRP Manual](https://files.ettus.com/manual/page_usrp_x4xx.html). |
| 140 | + |
| 141 | +- Install UHD on the host computer following the [Binary Installation](https://files.ettus.com/manual/page_install.html) instructions |
| 142 | +- Also install the python bindings for UHD: `sudo apt-get install python3-uhd` |
| 143 | + |
| 144 | +The versions of the [Module Peripheral Manager (MPM)](https://files.ettus.com/manual/page_mpm.html) running on the RFSoC APU, FPGA image, and UHD on the host must be compatible versions. |
| 145 | + |
| 146 | +```shell |
| 147 | +ssh root@x410-0 |
| 148 | +``` |
| 149 | + |
| 150 | +```shell |
| 151 | +export ftp_proxy=http://proxy.ftpn.ornl.gov:3128 |
| 152 | +export http_proxy=http://proxy.ftpn.ornl.gov:3128 |
| 153 | +export https_proxy=http://proxy.ftpn.ornl.gov:3128 |
| 154 | +``` |
| 155 | + |
| 156 | +```shell |
| 157 | +$ sed -i 's/^NTP=.*/NTP=ntp.ftpn.ornl.gov ntp2.ftpn.ornl.gov/' /etc/systemd/timesyncd.conf |
| 158 | +$ timedatectl set-ntp true |
| 159 | +$ systemctl restart systemd-timesyncd |
| 160 | +$ timedatectl set-timezone EST5EDT |
| 161 | +$ timedatectl status |
| 162 | +$ timedatectl show-timesync |
| 163 | +$ timedatectl timesync-status |
| 164 | +``` |
| 165 | + |
| 166 | +```shell |
| 167 | +usrp_update_fs -t v4.6.0.0 |
| 168 | +``` |
| 169 | + |
| 170 | +```shell |
| 171 | +ssh-keygen -f "$HOME/.ssh/known_hosts" -R "x410-0" |
| 172 | +ssh root@x410-0 |
| 173 | +mender commit |
| 174 | +``` |
| 175 | + |
| 176 | +The UHD driver will strongly suggest that the networking subsystem send and recv buffers are sized sufficiently. |
| 177 | + |
| 178 | +```shell |
| 179 | +[WARNING] [UDP] The recv buffer could not be resized sufficiently. |
| 180 | +Target sock buff size: 2500000 bytes. |
| 181 | +Actual sock buff size: 212992 bytes. |
| 182 | +See the transport application notes on buffer resizing. |
| 183 | +Please run: sudo sysctl -w net.core.rmem_max=2500000 |
| 184 | + |
| 185 | +[WARNING] [UDP] The send buffer could not be resized sufficiently. |
| 186 | +Target sock buff size: 2500000 bytes. |
| 187 | +Actual sock buff size: 212992 bytes. |
| 188 | +See the transport application notes on buffer resizing. |
| 189 | +Please run: sudo sysctl -w net.core.wmem_max=2500000 |
| 190 | +``` |
| 191 | + |
| 192 | +The UHD package installs a `/etc/sysctl.d/uhd-usrp2.conf` to adjust these settings on boot, but these values are for the older gigabet Ethernet devices and need to be increased. |
| 193 | + |
| 194 | +### References |
| 195 | + |
| 196 | +- [Product Page](https://www.ettus.com/all-products/usrp-x410/) |
| 197 | +- [Manual](https://files.ettus.com/manual/page_usrp_x4xx.html) |
0 commit comments