Resolve Issues with Generating and Loading Bitstreams
R2026bIssue
The targeting workflow uses AMD® Vivado® design software to generate custom bitstreams for NI™ USRP™ radios. Failures or errors you can encounter while generating and loading bitstreams include:
Errors related to your Vivado version or license
Compatibility issues between Vivado and your host OS version
Missing Linux® build tools (
gcc,patch) required by the RFNoC image builderErrors due to a support package root path that is too long
Build failures, timing failures, or out-of-memory errors
Routing errors of type
N2rt13HDRTExceptionEFailures during base FPGA IP compilation
If your bitstream build fails due to over-utilization of the available resources on the FPGA, or the bitstream build succeeds but fails to achieve timing closure, see Reduce Resource Utilization and Achieve Timing Closure.
Possible Solutions
Verify Vivado License
If your bitstream build fails to start and you encounter the error "Valid
license was not found", run the Vivado License Manager and verify that you have a valid license loaded.
Verify Vivado Installation
To build bitstreams using the targeting workflow, you must have Vivado development tools version 2021.1 and the AR76780 patch. To apply the patch,
follow the instructions in the README file included with the patch download.
Note
Verify that you have installed Vivado version 2021.1. Version 2021.1.1 is not supported.
If you encounter issues with your Vivado installation, follow these steps to verify the version and patch:
Add Missing Legacy Library
If MATLAB® becomes unresponsive after you use the hdlsetuptoolpath (HDL Coder) function to configure the Vivado tool path, you might be missing the libtinfo.so.5
library. Vivado depends on the legacy library libtinfo.so.5, which some
Linux distributions do not include by default, for example, Ubuntu® 24.04 and Debian® 13.
To confirm this library is missing, check the system's dynamic linker cache for
versions of the libtinfo library. In a terminal, enter this
command:
ldconfig -p | grep -E 'libtinfo\.so(\.5)?$'libtinfo.so.6, the cache does not
contain libtinfo.so.5. To resolve this issue, you
can create a symbolic link to the available library, libtinfo.so.6. The
steps depend on whether you have root privileges.Install Missing Build Tools
If the bitstream build fails with an error indicating that cc or
patch is not found, your Linux system is missing build tools required by the RFNoC image builder. Most
desktop Linux distributions include these tools by default, but minimal installations
might not.
To resolve this issue, on Debian-based distributions, including Ubuntu, install the gcc and patch
packages.
sudo apt install gcc patchIf your system does not provide a cc symlink after installing
gcc, set the CC environment variable before
starting MATLAB.
export CC=gccReduce Support Package Root Path Length
If your bitstream build terminates prematurely with the error "make[1]:
/bin/sh: Argument list too long", your support package root folder path is too
long. Use the matlabshared.supportpkg.setSupportPackageRoot
function to set a shorter support package root path. For example,
"/home/user/sp". This function requires administrative privileges on
the target folder and on matlabroot. After you change the root folder,
reinstall support packages in the new location.
Prevent Out-of-Memory Failures
If the memory resources available to Vivado are insufficient, the process fails with an out-of-memory (OOM) error. To check for any OOM events, enter this code in a new terminal:
# dmesg | grep -i -E 'killed process|oom'[195173.733148] Killed process 26149 (vivado) total-vm:11582276kB, anon-rss:8889460kB, file-rss:0kB, shmem-rss:0kB [195174.231579] oom_reaper: reaped process 26149 (vivado), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
To resolve this issue, close any other memory-intensive processes during the build. For details about how much memory is required to build bitstreams, see System Requirements.
Work Around Routing Error
If your bitstream build fails with the following routing error, make a nonfunctional change to your DUT or retry the build with a different build seed. For instructions, see Retry Build with Different Build Seed. This sporadic error can occur when building a bitstream with Vivado version 2021.1.
ERROR: [Route 35-9] Router encountered a fatal exception of type 'N2rt13HDRTExceptionE' - 'Trying to tool lock on already tool locked arc ERROR: [Common 17-39] 'route_design' failed due to earlier errors.
Retry Build with Different Build Seed
If you encounter build or timing failures and you cannot identify the cause, try
building the bitstream with a different seed. You can trigger a change in
build seed by making a nonfunctional change to your DUT, or you can set the
BUILD_SEED environment variable in MATLAB before you start the bitstream
build:
setenv('BUILD_SEED','101')
EXTRA_DEFS=" ... BUILD_SEED=101 ... "
Remove Prebuilt IP Directories
If the base FPGA IP compilation fails or is interrupted, the resulting files can remain in a locked or incomplete state, preventing later builds from completing. The workflow compiles the base FPGA IP the first time you build a bitstream for a given device type.
To resolve this issue, remove the prebuilt IP directories and retry the build.
ipDirs = dir(fullfile(getUHDInstallLocation,'glnxa64','fpga','usrp3','top','*','build-ip')); ipDirs = unique({ipDirs.folder}); for i = 1:numel(ipDirs) rmdir(ipDirs{i},'s'); end