Commit Graph

10170 Commits

Author SHA1 Message Date
michael-west
4a77791cf5 b200: Fix invalid RF switch positions
In some situations, the RF switches on the frontend would be placed in
undefined states.  This does not cause physical harm, but could distort
signals or introduce noise.  This fix ensures the RF switches are always
in a defined state.

Signed-off-by: michael-west <michael.west@ettus.com>
2023-05-10 21:39:39 -05:00
michael-west
8e54b58d89 octoclock: Fix uhd_usrp_probe error
Running the uhd_usrp_probe utility was resulting in an error due to type
mismatch between the utility and the data type in the property tree.
The data type has been made consistent for all utilities and underlying
implementation code as a mboard_eeprom_t.

This reverts "octoclock: Fix type of eeprom object in property_tree".

Signed-off-by: michael-west <michael.west@ettus.com>
2023-05-10 21:39:39 -05:00
Martin Braun
e2576cfed4 cmake: Fix auto-detection of Python install directory
This fixes an issue where on Ubuntu 22.04 (with Python 3.10), the
installation of the Python module would go to $PREFIX/local/lib even if
the rest goes to $PREFIX/lib. We achieve this by avoiding a) using
sysconfig.get_path() to get *both* the prefix and the library path, and
then also avoiding the `posix_local` install scheme.

Note: This same logic fails to work for MPM, so we don't touch that, but
simply force MPM to use the same path as UHD has. This means MPM is
unaffected when built by itself, but follows the UHD path when built as
part of UHD.

Hat-tip to Johannes Demel for pointing out this solution path.
2023-05-10 21:39:39 -05:00
mkoop
8be6b24ae3 extension: windows: Fixed linking extension example to uhd.lib
Symtom to observed
Example of how to use a (new) feature/behavior
2023-05-10 21:39:39 -05:00
Martin Braun
0d15d7670e lib: rfnoc: Fix logic in can_connect_device_to_device()
This fixes an issue in
link_stream_manager::can_connect_device_to_device() where the return
value is true for any valid connection, not just the connections that
are configurable for this link_stream_manager instance.

This bug has the effect of breaking some multi-usrp connection
scenarios.

Co-Authored-By: Virendra Kakade <virendra.kakade@ni.com>
2023-05-10 21:39:39 -05:00
Martin Braun
b8ac9654af utils: Fix usrp2_recovery.py for Python3
The script was using invalid string/binary string conversions with
Python3. Also, it was moved from optparse to argparse.
2023-05-10 21:39:39 -05:00
michael-west
b644723403 UBX: Add VCO band calibration and map access
The LO for the UBX can fail to lock in some cases where timed commands
are used to tune.  The LOs on the UBX use a map to select the VCO
band.  These changes give access to the maps for each LO and add a
calibration for the maps.  This allows users to develop a calibration
that suits their use case.

Signed-off-by: michael-west <michael.west@ettus.com>
2023-05-10 21:39:39 -05:00
Martin Braun
682a358b45 rfnoc: Fix disconnecting back-edges from graphs
This fixes a bug where calling rfnoc_graph::disconnect() fails when the
edge is not a forward edge, because the code would try and find an edge
to remove that was a forward edge, even if source/destination ports
would match.

Error was discovered during use of X410_X4_400 image. The prevented the
following use case:
- Stream data from host to Replay Block
- FDx Play and Record data via radio from/to replaz block
- Stream recorded data from replay block to host

The FDx use case requires one connection to be marked as back-edge (not
is_forward_edge). The X410_X4_400 fpga does not include DDC/DUC block
and the Radio and Replay blocks are directly connected to each other. To
enable streaming data back to the host the required back-edge connecting
needs to be disconnected.  Commit also adds 2 additional rfnoc units
tests modeling this use case w/o (X410_X4_400) and with (all 200MHz
images) DDC/DUC blocks.
2023-05-10 21:39:39 -05:00
Martin Braun
b1923d8d40 rfnoc: Make edge comparison more flexible
This allows to compare graph edges without also comparing their
properties. If an edge goes from node A, port X to node B, port Y, then
it might also carry properties (e.g., is it a back-edge) that may not be
relevant for the comparison. This is relevant when finding edges that
should be removed (e.g., in a disconnect() call).

The way this change is implemented it doesn't break existing code. There
is a new API call graph_edge_t::is_equal() which can take a new flag to
make comparisons more or less strict. The existing operator==() is
unchanged in behaviour.

Co-authored-by: Marian Koop <marian.koop@ni.com>
2023-05-10 21:39:39 -05:00
Matthew Crymble
a4b4efd07c ci: update to consume correct branch for docker build pipeline 2023-04-26 16:23:58 -05:00
Aki Tomita
106afff889 fpga: Additional comment cleanup 2023-03-03 12:11:12 -08:00
Aki Tomita
13c8d17272 fpga: Delete extra comment line 2023-03-03 12:11:12 -08:00
michael-west
f3e5fe5929 tools: Remove fpga directory from Debian build
Signed-off-by: michael-west <michael.west@ettus.com>
2023-03-03 12:11:12 -08:00
michael-west
d199d8cc3a tools: Update upload_debs.sh script
The previous version would create a symbolic link to the current UHD
directory and then create a tarball excluding all the files that would
cause issues for Debian, but it did not exclude those same files when
doing the debuild.  These changes create a separate directory and copy
the necessary files into it so that the tarball and debuild use exactly
the same set of files.  Also added exclusion of MSVC files.

Signed-off-by: michael-west <michael.west@ettus.com>
2023-03-03 12:11:12 -08:00
michael-west
5456d4432c debian: Fix copyright dates in changelog
Signed-off-by: michael-west <michael.west@ettus.com>
2023-03-03 12:11:12 -08:00
michael-west
9e1e3ca378 fpga: Reformat javascript in doc
The long lines were causing Debian lintian failures, so they have been
reformatted.  No functional changes.

Signed-off-by: michael-west <michael.west@ettus.com>
2023-03-03 12:11:12 -08:00
Wade Fife
909d1cff64 fpga: Add BUILD_BASE_DIR option to makefiles
Adds a BUILD_BASE_DIR makefile variable that allows you to specify the
base directory for FPGA build outputs. This allows you to put the
output from each run of make into a unique directory, or to run
multiple instances of make in parallel with each build's output being
put in a different directory. For example:

make X310_XG BUILD_BASE_DIR=/path/to/builds
2023-03-03 12:11:12 -08:00
Martin Braun
a7adda97bb rfnoc: Demote some de-init DEBUG messages
The following type of DEBUG log messages are demoted to TRACE:

[DEBUG] [0/DDC#1] deinit() called, but not implemented.
[DEBUG] [0/DDC#1] Invalidating register interface

These are harmless messages, and they aren't necessary to show users at
DEBUG level.
2023-03-03 12:11:12 -08:00
Martin Braun
73df2dc19b mpm: Fix test utilities
- Fix MockGpiod object: This class should mock the gpiod module, but it was
  missing the LINE_REQ_EV_FALLING_EDGE attribute.
- While we're at it, fix some pylint warnings.
2023-03-03 12:11:12 -08:00
Virendra Kakade
7534522f14 test: add delayed streaming start args
Add support for the "tx_delay" and "rx_delay" benchmark_rate
args to run_benchmark_rate.py to enable batch runs of benchmark_rate
using those arguments.

Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
2023-03-03 12:11:12 -08:00
Volkan Öz
a2579224ab MPM: fix GPS lock sensor method name
Method to get the lock status of the GPS sensor should be

    get_gps_lock_sensor

instead of

    get_gps_locked_sensor

Changing this conforms the x4xx with other USRPs and also
makes the call in get_gps_sensor_status executable at all.
2023-03-03 12:11:12 -08:00
Wade Fife
1c86b0bfa3 fpga: ci: Use repeat_fpga_build for pipeline builds 2023-03-03 12:11:12 -08:00
Wade Fife
aee92af7e8 fpga: tools: Add repeat_fpga_build.py
This script allows you to repeatedly run an FPGA build until it
successfully meets timing.
2023-03-03 12:11:12 -08:00
Wade Fife
0d6236ec41 fpga: Add BUILD_SEED variable
Adds a BUILD_SEED make variable that can be set to a 32-bit integer,
and adds an FPGA read-only register initialized by this variable.
Changing this variable will randomly affect the FPGA build results.
This can be useful when your build fails timing by a small amount,
allowing you to build again and get different results with the same
code.

For example, you could run the following to produce an FPGA build with
different timing results from the default build:

make X310_XG BUILD_SEED=123
2023-03-03 12:11:12 -08:00
Matthew Crymble
467ff92b24 ci: Remove Fedora 35 and add Fedora 37
Fedora 35 is EOL and Fedora 37 has been released
2023-03-03 12:11:12 -08:00
Wade Fife
92a2414460 examples: Fix play region in replay_capture.py 2023-03-03 12:11:12 -08:00
Martin Braun
b8d0138191 docs: Fix docstring for get_block_chain()
The source_chain parameter was incorrectly documented.
Shoutouts to Github user JerthG for pointing this out.
2023-03-03 12:11:12 -08:00
Adam Vander Pas
bfcabcd008 examples: rx_samples_to_file: multi_streamer option
Add 'multi_streamer' command line parameter to enable
using a additional thread for each channel used in the
example run.
2023-03-03 12:11:12 -08:00
Martin Braun
1a7b5ea4ca docs: Fix argument for uhd_image_loader in E3xx docs
Hat-tip to Github user michaeldbrandt for pointing this out.
2023-03-03 12:11:12 -08:00
Martin Braun
c4c77b74ad rfnoc: radio: Always prefer register-based time access
The radio blocks have a feature to read back the current time via a CHDR
register access, but in the case where we are restarting a stream after
an overrun, we are still query the MB controller for the time instead of
of using that register. This has two problems:
- The register access is much faster on MPM devices, where querying the
  MB controller requires an additional RPC call.
- On newer devices, there is no guarantee that timekeeper 0 is actually
  the one that is providing the time (but we make this assumption here).
  Reading from the radio's own time registers is always correct if the
  FPGA bitfile was configured correctly.
2023-03-03 12:11:12 -08:00
Martin Braun
7c5dc1b150 mpm: mpmutils: Add parse_multi_device_arg() function 2023-03-03 12:11:12 -08:00
Martin Braun
19298669d6 mpm: mpmutils: Fix Pylint warning 2023-03-03 12:11:12 -08:00
Matthew Crymble
1e6fc214f7 ci: increase build timeouts to 90 minutes
The UHD build and UHD installer build jobs would sometimes exceed
the default timeout of 60 minutes.
2023-03-03 12:11:12 -08:00
michael-west
5fac246bc1 UHD 4.4.0.0 Release
Signed-off-by: michael-west <michael.west@ettus.com>
2023-01-27 13:17:39 -08:00
michael-west
3cf9529ffb images: Fix checksum for X410 FPGA image
Signed-off-by: michael-west <michael.west@ettus.com>
2023-01-26 09:50:26 -08:00
michael-west
cea9b945bc Prepare branch for 4.4.0.0 release
- Updated version string
- Updated CHANGELOG
- Updated Debian-related files
- Updated images

Signed-off-by: michael-west <michael.west@ettus.com>
2023-01-23 23:13:06 -08:00
michael-west
92c09f7f76 fpga: Update copyright
Update copyright on recently changed files.

Signed-off-by: michael-west <michael.west@ettus.com>
2023-01-19 15:55:56 -08:00
michael-west
b2d4eaa8e5 FPGA: Fix overflows in DDC
Added proper clipping of halfband filter output to handle potential
overflow.

Signed-off-by: michael-west <michael.west@ettus.com>
2023-01-19 10:05:27 -06:00
michael-west
c27519624e FPGA: Restore FIR filter in rx_frontend_gen3
The FIR filter applied gain.  Removing it caused incorrect scaling and
signals where every other sample was zero.  Also parameterized heterodyne
frontend processing so it would not use resources in images not
requiring it.

Signed-off-by: michael-west <michael.west@ettus.com>
2023-01-19 10:05:27 -06:00
michael-west
e3ffef975d FPGA: Fix warnings in dds_freq_tune module
Added missing tuser connections.

Signed-off-by: michael-west <michael.west@ettus.com>
2023-01-19 10:05:27 -06:00
Virendra Kakade
1d0e9a2a38 tests: add x310 raw udp tests
Adds tests for X310 10GBE interface.

Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
2023-01-17 13:33:49 -06:00
David Raeman
51d4411ec1 e3xx: add support for power calibration api
This commit adds support for the UHD power calibration API on the E3xx
family of radios. It also updates the documentation to reflect this
support, and it adds support to the uhd_power_cal.py utility by adding a
"calibrator" subclass for E3xx radios.
2023-01-17 11:30:53 -08:00
Larissa Phillip
f6f1dec85a fpga: rfnoc: Add align_samples testbench 2023-01-12 21:42:13 -06:00
Sam James
3acf784e98 Fix build with GCC 13 (add missing <cstdint> include)
GCC 13 (as usual for new compiler releases) shuffles around some
internal includes and so <cstdint> is no longer transitively included.

Explicitly include <cstdint> for uint8_t.

```
/var/tmp/portage/net-wireless/uhd-4.3.0.0/work/uhd-4.3.0.0/host/include/uhd/rfnoc/defaults.hpp:43:14: error: 'uint32_t' does not name a type
   43 | static const uint32_t DEFAULT_NOC_ID  = 0xFFFFFFFF;
      |              ^~~~~~~~
/var/tmp/portage/net-wireless/uhd-4.3.0.0/work/uhd-4.3.0.0/host/include/uhd/rfnoc/defaults.hpp:1:1: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
  +++ |+#include <cstdint>
    1 | //
```

Signed-off-by: Sam James <sam@gentoo.org>
2023-01-12 17:52:12 -08:00
michael-west
6a3ab53a2c manifest: Update FPGA images
Update FPGA images for B2xx, E3xx, X3xx, N3xx, and X4xx

Signed-off-by: michael-west <michael.west@ettus.com>
2023-01-11 23:22:06 -08:00
Martin Braun
47be6326c6 docs: Update manual for X3x0 raw UDP streaming 2023-01-11 07:59:19 -08:00
Martin Braun
8c295d8d64 x300: Enable use of advanced transport adapters
This instantiates xport_adapter_ctrl objects in the x300_mb_iface, which
allows the X300 to support the get_chdr_xport_adapters() and
add_remote_ep_route() API calls. Effectively, this enables remote UDP
streaming for X300 devices, provided they have been updated to FPGA
compat number 7.3, which adds those features.

Co-authored-by: Virendra Kakade <virendra.kakade@ni.com>
Co-authored-by: Wade Fife <wade.fife@ni.com>
2023-01-10 14:19:00 -08:00
Martin Braun
e315f0dbc6 usrp: Add xport_adapter_ctrl core
This allows accessing the advanced transport adapter capabilities on
X300, where there is no MPM to aid accessing it. It is functionally
equivalent to xport_adapter_ctrl.py.
Includes unit tests.

Co-authored-by: Virendra Kakade <virendra.kakade@ni.com>
2023-01-10 14:19:00 -08:00
Martin Braun
6d843a2e78 x300: Respect X300_FW_COMMS_FLAGS_ARP_FAIL flag
In firmware version 6.1, this flag was introduced to indicate a failed
ARP lookup.
2023-01-10 14:19:00 -08:00
Martin Braun
89fb75288e x300: Update firmware for TA control
- Bump firmware compat to 6.1
- Remove crossbar counter logic (the FPGA does *not* support crossbar
  counters anymore, so we remove it from the firmware as well)
- Remove crossbar programming control (this is now provided by RFNoC
  management packets)
- Remove UDP framing control (this is also provided by RFNoC management
  packets)
- Remove Ethernet link/activity LED control (this has been handled by
  the FPGA directly for years now)
- Add functionality to program transport adapter. The TA is programmed
  directly on the settings bus, so for the most part, this is already
  possible from the firmware. The only exception is the 'virtual'
  register to program IP address and MAC at the same time. In the
  firmware, it will perform an ARP lookup of the MAC address, and then
  write the "normal" IPv4 address register in the TA, as well as the MAC
  address registers.
- Updated bootram.coe
2023-01-10 14:19:00 -08:00