| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This is necessary when compiling with -Werror=format-security as Debian
package builds do.
Thanks to mait for the fix!
|
|
|
|
|
|
|
| |
C++ syntax cleanup. g++ 11 is now more picky about syntax, and flags
errors rather than ignores use of template-id for a destructor.
Thanks to mait for these fixes!
|
|
|
|
| |
Thanks to Mait for pointing these out!
|
|
|
|
|
|
| |
This adds a section on GPIO bank names to multi_usrp.hpp, and clarifies
the difference between the multi_usrp and RFNoC APIs regarding GPIO
control.
|
| |
|
|
|
|
|
|
| |
This commit makes minor changes to create_imgs_package.py to make it
Python 3-compatible, harmonizing it with the rest of the Python scripts
in UHD which have already been updated for Python 3.
|
|
|
|
|
|
|
|
|
| |
In multiple places in the UHD code, we were doing the same calculation
for a wrapped frequency (wrap it into the first Nyquist zone). This math
was using boost::math, too. Instead of editing every instance, we create
a new function, uhd::math::wrap_frequency(), and replace all of its
separate implementations with this function. The new function also no
longer relies on boost::math::sign.
|
|
|
|
|
| |
We've been having issues with moving locations of Boost headers for this
function, and it's simple enough to implement ourselves.
|
|
|
|
| |
Replaced by std::numeric_limits<>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a very mechanical task that could almost have been done with
sed. Boost versions of mutexes and locks were removed, and replaced with
std:: versions. The replacement tables are as follows:
== Mutexes ==
- boost::mutex -> std::mutex
- boost::recursive_mutex -> std::recursive_mutex
Mutexes behave identically between Boost and std:: and have the same
API.
== Locks ==
C++11 has only two types of lock that we use/need in UHD:
- std::lock_guard: Identical to boost::lock_guard
- std::unique_lock: Identical to boost::unique_lock
Boost also has boost::mutex::scoped_lock, which is a typedef for
boost::unique_lock<>. However, we often have used scoped_lock where we
meant to use lock_guard<>. The name is a bit misleading, "scoped lock"
sounding a bit like an RAII mechanism. Therefore, some previous
boost::mutex::scoped_lock are now std::lock_guard<>.
std::unique_lock is required when doing more than RAII locking (i.e.,
unlocking, relocking, usage with condition variables, etc.).
== Condition Variables ==
Condition variables were out of the scope of this lock/mutex change, but
in UHD, we inconsistently use boost::condition vs.
boost::condition_variable. The former is a templated version of the
latter, and thus works fine with std::mutex'es. Therefore, some
boost::condition_variable where changed to boost::condition.
All locks and mutexes use `#include <mutex>`. The corresponding Boost
includes were removed. In some cases, this exposed issues with implicit
Boost includes elsewhere. The missing explicit includes were added.
|
|
|
|
|
|
| |
current implementation uses version strings for comparisons. This led
version 3.10 to be smaller than 3.6 which is obviously wrong. Use
LooseVersion to have correct version comparison.
|
|
|
|
|
|
|
|
| |
In mpm arguments are handled as key=value pairs. Therefore setting
rfic_digital_loopback to 0 should disable the digital data loopback
inside the RFIC on N310. This fixes this behavior by correctly casting
from string to boolean but keeps the full re-init sequence when using
the rfic_digital_loopback flag.
|
|
|
|
| |
Thanks for github user johnwstanford for pointing those out.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So, the Python garbage collector is a bit pernicious, in that it happens
behind the scenes in a way which is difficult to predict. The rfdc_ctrl
class expects that its "lifetime" will be a single live/die cycle of the
FPGA (i.e. that when a new FPGA is loaded, it will be destructed).
However, by default the Python GC will keep the X4xxRfdcCtrl class alive
for an arbitrary amount of time, meaning that it's possible that
multiple (C++) rfdc_ctrl classes can be alive at a single time.
When the GC reaps all of these classes, libmetal segfaults when we call
metal_finish several times in a row. This change works around that
issue, if not the overall GC issue, by explicitly deleting the rfdc_ctrl
object.
|
|
|
|
|
|
|
| |
the USRP power meter will only receive from a single channel which
is configured by the argument parameter. The streamer receive
data will therefor alwalys have a single channel. So do not index
with chan when passing the streamer to uhd.dsp.signals.get_usrp_power.
|
| |
|
|
|
|
|
|
|
| |
- Like with RX, this now allows passing in stream time and existing
streamer
- There was no EOB being sent at the end (now there is)
- Fixed some linter issues
|
|
|
|
|
|
|
|
|
| |
- This function didn't set the time properly for multi-chan rx
- There was no way to set a start time manually
- It relied on garbage collection and correct destruction of streamers
when being called multiple times. Addressed this by adding an option
to pass in an existing streamer object.
- Linter wasn't too happy with this function.
|
|
|
|
|
|
|
|
|
|
|
| |
The USB managed buffer implementation created a context every time one
was generated.
The additional load is not very high, because the global session is a
singleton, and simply returns the same context again with only a few
branches. Also, managed buffers persist for the entire session.
However, the context is never used in the managed buffer.
This code is thus confusing for the reader of this code, and we remove
the extraneous, unused context variable.
|
|
|
|
|
|
|
|
|
|
| |
As GitHub user marcosino points out, we're running the AD9361 in
overclocked mode. This is because the driver was written with no longer
valid recommendations.
We add a comment and some debug messages to clarify this. Should there
be RF impairments (signal integrity or other) because of overclocking,
users would be able to check DEBUG log statements to correlate with
overclocked configurations.
|
| |
|
|
|
|
|
|
| |
This commit makes some of the CMake formatting consistent. CMake
patches were not, in fact, required to fix bugs, but we keep the
formatting improvements nevertheless.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we were doing this:
```cpp
extern "C" {
}
```
This is not how glib.h is supposed to be included, according to their
documentation. It turns out that it happened to work for a long time,
and lots of projects include glib.h that way, and the glib devs are
trying to accommodate for those cases. How nice of them!
However, on Fedora 34, we have a version of glib which does not have
a workaround patch, so we include glib.h the it should be.
The second issue was that a build script required the existence of
a `python` executable, which is not always available. A `python3`
executable can be assumed, since that's a dependency for UHD, too.
|
|
|
|
|
|
|
|
|
|
| |
This fixes a subtle bug, where a variable to cache the timestamp of an
error gets bound to the metadata instead of creating a copy thereof.
Without this fix, the calculation of dropped samples would always be 0,
because the difference in timestamps would incorrectly be always zero.
This fix will now make a copy of the timestamp.
Shoutout to GitHub user bhorsfield for finding this issue.
|
| |
|
|
|
|
|
|
|
| |
At this point, this test chokes an RX streamer to force an overrun. It
then confirms that the overrun message is returned to the call site, and
that the streamer returns to continuous streaming after the overrun
handling.
|
| |
|
|
|
|
|
|
|
|
|
| |
The variable max_size_bytes has a different name in the source than in
the header and is not self-explanatory in both. Therefore when comparing
against it in the assertion in line 142 one could assume that a number
of bytes needs to be compared with a byte value. Change variable to
`buff_size` in source and header file to avoid confusion and add
documentation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous behaviour of UHD for setting gain was:
1. Set "Mask Clr Atten Update". This will avoid "Immediately Update TPC
Atten" to be cleared.
2. Then, assert "Immediately Update TPC Atten".
3. Poke the LSBs of the attenuation value.
4. Poke the MSB of the attenuation value.
This order of operations has the downside of causing large Tx power
spikes when setting the attenuation, because you need both registers to
properly set the attenuation, but we are updating the gain immediately,
even between the two attenuation register's update.
Moreover, the upstream Linux driver for AD9361 by ADI also does not
do this. We therefore change the procedure to match the kernel driver
behaviour, which is:
0. [During initialization: Clear "Mask Clr Atten Update"
1. Poke the attenuation registers
2. Then, assert "Immediately Update TPC Atten".
This avoids Tx power spikes. It also reduces the Tx-gain procedure to
3 pokes instead of 4.
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Fixes a bug where the RX stream command set set independent of the
device time. Now, we read back get_time_now() to calculate the command
time.
- When using multiple RX USRPs, sync their times. Before, they were left
untouched, causing possible timing mismatches.
- Increase the initial timeout value. The previous value had only been
tested with N2x0.
- Replace the boost::thread_group with a std::thread.
- Remove some boost::format where it didn't add value.
|
|
|
|
|
| |
This reverts part of 09d94529e, which should not have touched these
particular CMake files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So, both the set_tx_antenna_switches and set_rx_antenna_switches functions
configure the TX0_ANT_11 register (which controls the final switch before
the TX/RX port, switching it between the three TX paths and the RX path).
The RX antenna configuration code will, if the RX antenna is set to TX/RX,
configure that switch to the TX/RX->RX path when the ATR is set to RX.
However, the TX antenna config code will always configure that switch to
the "bypass" path, for both the 0X and RX ATR modes, regardless of whether
the RX side actually needs that path.
Ergo, this change makes set_tx_antenna_switches only configure that
switch when it is configuring the XX or TX modes.
|
|
|
|
|
| |
- Clarify features that only work on B100 and N2x0 (_external_)
- De-emphasize MIMO-cable sync
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds uhd_rc as a link target to static builds of libuhd. This fixes
build errors like this:
```
uhd/lib/cal/database.cpp:12:10: fatal error: cmrc/cmrc.hpp: No such file
or directory
#include <cmrc/cmrc.hpp>
```
This also adds uhd_rc as to $libuhd_libs instead of just listing it
separately, and target objects from uhd_rc to $libuhd_sources.
|
|
|
|
|
| |
Error message was not adapted when support for 11.52 MHz and 23.04 MHz
references was added. Fixing this.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See the CMake 3.8 documentation on these two variables:
https://cmake.org/cmake/help/v3.8/variable/PROJECT-NAME_SOURCE_DIR.html
https://cmake.org/cmake/help/v3.8/variable/CMAKE_SOURCE_DIR.html
Under normal circumstances, these two are identical. For sub-projects
(i.e., when building UHD as part of something else that is also a CMake
project), only the former is useful. There is no discernible downside of
using UHD_SOURCE_DIR over CMAKE_SOURCE_DIR.
This was changed using sed:
$ sed -i "s/CMAKE_SOURCE_DIR/UHD_SOURCE_DIR/g" \
`ag -l CMAKE_SOURCE_DIR **/{CMakeLists.txt,*.cmake}`
$ sed -i "s/CMAKE_BINARY_DIR/UHD_BINARY_DIR/g" \
`ag -l CMAKE_BINARY_DIR **/{CMakeLists.txt,*.cmake}`
At the same time, we also replace the CMake variable UHD_HOST_ROOT (used
in MPM) with UHD_SOURCE_DIR. There's no reason to have two variables
with the same meaning and different names, but more importantly, this
means that UHD_SOURCE_DIR is defined even in those cases where MPM calls
into CMake files from UHD without any additional patches.
Shoutout to GitHub user marcobergamin for bringing this up.
|
|
|
|
|
| |
Updates the language in setupenv.sh --help to better reflect that there
are many locations where Vivado is searched.
|
|
|
|
|
|
|
| |
Adds a --vivado-path option to rfnoc_image_builder that, if present,
gets passed to setupenv.sh for the target device. This can be used to
specify the location of Vivado if it is not installed in one of the
default search locations.
|
|
|
|
|
| |
This allows UHD clients to determine, for example, whether the currently
loaded filesystem is up-to-date.
|
|
|
|
|
| |
Fix function definition set_rx_iq_balance so that Python can reach the
overloaded C++ function. There was a copy & paste error in there.
|
|
|
|
|
| |
This modifies some log messages or exception strings when using
auto-correction APIs that are not supported by the underlying device.
|
|
|
|
|
|
|
|
| |
N320 doesn't have an automatic RX IQ balance correction, so that API is
removed.
The auto-DC offset correction was calling into the manual DC offset
correction code, which means auto-DC offset correction was never enabled
for N320.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is more of an expressive change than a functional change; Python
seems to add this path to the PYTHONPATH anyway, at least for some
systems. We neverless make this change because:
- It's more explicit/expressive. When tests are run, the PYTHONPATH env
variable is printed, and it now contains this path where it should be,
right at the front. People reading the ctest/python.unittest output
now get told explicitly which path we mean.
- This guarantees that this path is added, even if Python/unittest
should behave differently on other systems or versions.
To clarify: When running unit tests, we want to run the Python code from
build/python, not the installed version. The latter may not yet exist,
and if it does, it's not the version we are editing.
|
|
|
|
|
| |
Adds example showing how to `include an in-tree Verilog header
file in the rfnoc_block_gain example.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a Verilog definition named `UHD_FPGA_DIR that corresponds to
the location of the UHD "fpga" directory. This allows you to include
files in your out-of-tree modules relative to the FPGA directory. For
example, you could include the library header file rfnoc_chdr_utils.vh
using the following:
`include `"`UHD_FPGA_DIR/usrp3/lib/rfnoc/core/rfnoc_chdr_utils.vh`"
Some simulators may not support `" outside of the context of a `define,
in which case you can do the following:
`define RFNOC_CHDR_UTILS_PATH \
`"`UHD_FPGA_DIR/usrp3/lib/rfnoc/core/rfnoc_chdr_utils.vh`"
`include `RFNOC_CHDR_UTILS_PATH
|