Commit Graph

9465 Commits

Author SHA1 Message Date
mattprost
380864d31f utils: Get signal above noise floor when finding optimal gain
Ensure that the signal is at least visible above the noise floor before
attempting to identify gain compression. Another option that was
considered involved starting from the top of the gain range and working
down to avoid this issue, however, that option could expose the device
to unsafe amounts of incoming signal power.

Signed-off-by: mattprost <matt.prost@ni.com>
2021-11-08 15:47:49 -06:00
Steven Koo
5f874fcb47 ci: enable batch CI
Signed-off-by: Steven Koo <steven.koo@ni.com>
2021-11-08 15:47:49 -06:00
Steven Koo
e6829b3b24 ci: Split CI and PR pipelines for mono pipeline
Signed-off-by: Steven Koo <steven.koo@ni.com>
2021-11-08 15:46:08 -06:00
Sam O'Brien
b867363f82 docs: Fix typo in ZBX Block Diagram
This commit changes the ZBX block diagram which is also visible at:

  https://files.ettus.com/manual/page_zbx.html

The old version of this file had a typo where two paths in the RF
section of the RX chain were both labeled "RF 3". The coresponding path
in the TX chain was labeled "RF 4".

Rather than change the RX label to "RF 4", this commit changes both
labels to "RF 0", since that is how they are referred to in the tuning
tables in the UHD source (see zbx_constants.hpp). This naming convention
makes more sense anyways, because this path bypasses the filter bank in
the RF section.

Signed-off-by: Sam O'Brien <sam.obrien@ni.com>
2021-11-08 15:42:19 -06:00
Martin Braun
ebecf944e9 lib: Add various missing includes 2021-11-08 15:42:19 -06:00
Martin Braun
fe77c4d5c5 ci: Enable custom CXX flags, enable -Werror
- Add a new boolean to make and ninja builds (uhdAllowWarnings). It
  defaults to false.
- When asserted, we set build flags for make and ninja to

    -Werror -Wno-error=maybe-uninitialized

- Add a new parameter to make and ninja builds (uhdCxxFlags). It is
  currently unused
2021-11-08 15:42:19 -06:00
Martin Braun
38db29121a ci: Let make keep building upon failure
This is useful to get a full list of compile errors instead of just the
first few. Particularly useful since we enabled -Werror.
2021-11-08 15:42:19 -06:00
Martin Braun
f94db1821b ci: Add clang as a compiler to all Fedora and Ubuntu containers 2021-11-08 15:42:19 -06:00
Mihai Turdean
85b1fc1502 docs: fix typo 2021-11-08 15:42:19 -06:00
Wade Fife
a93636b3b6 fpga: ci: Add testbench pipeline 2021-11-08 15:42:19 -06:00
Aaron Rossetto
25d617cad7 uhd: Prepare branch for 4.1.0.4 release
uhd: Update version in UHDVersion.cmake
images: Update manifest
uhd: Update changelog
debian: Update changelog
2021-09-29 09:25:58 -05:00
Aaron Rossetto
01575510f1 uhd: Prepare branch for 4.1.0.3 release
images: Update manifest
uhd: Update changelog
debian: Update changelog
2021-09-20 11:59:38 -05:00
Lane Kolbly
a9b96dc00a uhd: zbx: Prevent TX antenna config from disrupting RX
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.
2021-09-20 11:54:06 -05:00
Aaron Rossetto
8ce6e64ffc uhd: Prepare branch for 4.1.0.2 release
images: Update manifest
uhd: Update changelog
debian: Update changelog
2021-09-10 13:28:44 -05:00
Steven Koo
a8989f1cd5 ci: Add gnuradio gr-ettus to oe builds
gnuradio and gr-ettus is downstream of uhd so we need to
rebuild it when we build uhd

Signed-off-by: Steven Koo <steven.koo@ni.com>
2021-09-07 09:58:54 -05:00
Steven Koo
d095a7df0b ci: Update template to use checkout_meta_ettus
Signed-off-by: Steven Koo <steven.koo@ni.com>
2021-09-07 09:56:42 -05:00
michael-west
3794e112ba B200: Fix overflow handling
- Use FPGA images with fixed sc12 converter.
- Properly flush channels and restart streaming in the case of an overrun.

Signed-off-by: michael-west <michael.west@ettus.com>
2021-09-03 16:28:38 -07:00
Aaron Rossetto
325e8e9657 fixup! tests: Add recv(0) case to rx_streamer_test 2021-09-02 16:06:54 -05:00
Grant Meyerhoff
ea1e483d88 x4xx_bist: use get_mpm_client in gpio bist 2021-09-02 16:06:26 -05:00
Grant Meyerhoff
33aa9795cc mpmd: Add discoverable feature for trig i/o mode 2021-09-02 16:06:20 -05:00
Aaron Rossetto
bf8cc01194 uhd: transport: Avoid exceptions in disconnect_receiver()
inline_io_service::disconnect_receiver() uses the recv_link_if parameter
as a key into the _recv_tbl map. In some error cases, notably when an
underlying link timeout occurs when setting up a transport, that key may
not exist in the table. Attempting to index the table by that
non-existent key causes an std::out_of_range exception to be thrown.
However, in the aforementioned error case, disconnect_receiver() is
called as part of a destructor of an object that is in one of the stack
frames being unwound as the timeout exception is in flight. Throwing an
exception while one is in flight ultimately causes the C++ runtime to
terminate the process. (Generally, throwing an exception in a
destructor, unless caught within the destructor, is considered a bad
practice for this very reason.)

This PR modifies disconnect_receiver() to check for the existence of the
entry in the map and bypass the access if it is not present, thus
preventing the exception from being thrown in this function which is
invoked from another object's destructor.
2021-09-02 16:06:11 -05:00
Aaron Rossetto
ec1707de5c tests: Add recv(0) case to rx_streamer_test 2021-09-02 16:05:58 -05:00
Aaron Rossetto
c2079c9fb3 uhd: streamer: Restore original recv(0) semantics
A recv() of zero samples on an RX stream should return immediately
(i.e., without respect to the timeout and regardless of the availability
of samples), surfacing any stream error conditions via metadata. This
convention was broken in a2f10ee9, causing a recv() of zero samples to
wait for the entire timeout period and then return ERROR_CODE_TIMEOUT if
no samples are available. This commit restores the desired semantics.
2021-09-02 16:05:53 -05:00
michael-west
533f2ddef2 sim: Update chdr_16sc_to_sc12 testbench
Modified to send 2 packets back to back at each packet size to test
output during sequential input packets.  Also fixed whitespace.

Signed-off-by: michael-west <michael.west@ettus.com>
2021-09-02 16:05:28 -05:00
michael-west
afc32d3848 fpga: Re-order error and data packets
Added delay to error packets so overrun error is back in-band.  Avoids
dropping good data packets in the case of an overrun.

Signed-off-by: michael-west <michael.west@ettus.com>
2021-09-02 16:05:22 -05:00
michael-west
053c6fefb0 fpga: Fix sc16 to sc12 converter
Re-wrote converter to remove clock cycle delay on i_tready when handling
residual output and fixed improper handling of tlast during residual
data processing.  Resolves some USB overflow issues when using sc12 data
type on B200 devices.

Signed-off-by: michael-west <michael.west@ettus.com>
2021-09-02 16:05:15 -05:00
Steven Koo
ceac1bdddb ci: rebuild docker images weekly
Signed-off-by: Steven Koo <steven.koo@ni.com>
2021-08-26 14:26:38 -05:00
Aaron Rossetto
61428cb6d2 uhd: Prepare branch for 4.1.0.2-rc3 release
images: Update manifest
2021-08-25 15:44:46 -05:00
Andrew Lynch
2b38b4e848 mpm: x4xx: update mboard_max_rev 2021-08-25 15:36:42 -05:00
Aaron Rossetto
96032d06ba uhd: Prepare branch for 4.1.0.2-rc2 release
images: Update manifest
2021-08-06 09:22:08 -05:00
Lane Kolbly
d984609e06 host: Add static_assert to prevent meta_range_t(0,0)
meta_range_t(0,0) actually calls the iterator-based constructor for
meta_range_t, which is almost certainly not the intended constructor
for that call syntax. Therefore, we add a static_assert to prevent
such usage, and fix all failing instances.
2021-08-06 09:04:49 -05:00
Aaron Rossetto
a86d7211b3 uhd: Prepare branch for 4.1.0.2-rc1 release
images: Update manifest
cmake: Increase patch version number
2021-08-03 13:39:29 -05:00
Aaron Rossetto
f633b497ff uhd: Prepare branch for 4.1.0.1 release
images: Update manifest
uhd: Update changelog
debian: Update changelog
cmake: Increase patch version number
2021-07-13 10:10:44 -05:00
Humberto Jimenez
f3c9fda5b1 docs: usrp_x4xx: improve filesystem update instructions 2021-07-13 07:12:02 -05:00
Andrew Lynch
5a03a66823 mpm: Skip DTS compatibility check if DTS is not being updated. 2021-07-09 09:34:54 +02:00
Martin Braun
80196960e0 docs: x4xx: Update information on CPLD updating 2021-07-09 09:10:55 +02:00
Martin Braun
f23383a22c mpm: zbx: Fix revision compat check
The revision compat check for ZBX hardware is broken. It requires the
rev_compat register to read 1. However, that is the value for RevA,
which we are deliberately *not* supporting.

Supported revisions are B and C, which have a rev_compat value of 2. We
therefore change the check to support revision 2, but not 1. In the
future, we would support revisions 2 and up if there are more revs to
ZBX. Valid rev_compat values are tracked in a whitelist (which we need
to update as we produce more revisions).

This patch fixes an issue where MPM wouldn't start when ZBX revisions
B or C are plugged in.
2021-07-08 12:45:32 +02:00
Martin Braun
656de4ecc1 mpm: Update usrp_update_fs to support X410
With this patch, we can, for example, run

    usrp_update_fs -t master

to download the currently most up-to-date filesystem and apply to the
device.
2021-07-08 12:45:32 +02:00
Humberto Jimenez
ee5cf768bb mpm: max10_cpld_flash_ctrl: improve programming log 2021-07-08 12:45:32 +02:00
Michael Dickens
e36f692b1c core: remove boost::math in favor of std cmath
YA Boost removal!!!

Justification
---
const int if_freq_sign = boost::math::sign(fe_conn.get_if_freq());
_dsp_freq_offset = if_freq * (-if_freq_sign);
// boost::math::sign : 1 if x > 0, -1 if x < 0, and 0 if x is zero.
// ==> if if_freq_sign > 0 then * by -1 else +1 (effectively)

// std::signbit : true if arg is negative, false otherwise
// ==> need 'not' of input argument to invert for same result as prior algorithm
double fe_if_freq = fe_conn.get_if_freq();
if (!std::signbit(fe_if_freq)) {
  if_freq *= -1.0;
}
---
The above should result in the same algorithm except possibly
if fe_if_freq is exactly 0.0 in which case the results might be
off by the sign (+0.0 versus -0.0).
2021-07-08 12:45:32 +02:00
Michael Dickens
cd1fcafc92 cmake: remove redundant include 2021-07-08 12:45:32 +02:00
Michael Dickens
832c974a82 cmake: correctly set and unset any CMAKE_REQUIRED variables 2021-07-08 12:45:32 +02:00
Michael Dickens
7e1f90101f cmake: fix finding PkgConfig to work robustly (without CMake warnings) 2021-07-08 12:45:32 +02:00
Michael Dickens
b3e692fcaf tests: add missing header, required by some compilers
Ref: https://github.com/EttusResearch/uhd/issues/451
2021-07-08 12:45:32 +02:00
Martin Braun
5eed0a0f65 ci: Add CLA assistant 2021-07-08 12:45:32 +02:00
Martin Braun
3bc9ab83d1 ci: Change base branch to UHD-4.1 2021-07-08 12:45:32 +02:00
Aaron Rossetto
d21735d543 uhd: Prepare branch for 4.1.0.0 release
uhd: Update CHANGELOG
debian: Update changelog
images: change filesystem version to v4.1

Signed-off-by: Aaron Rossetto <aaron.rossetto@ni.com>
Signed-off-by: Steven Koo <steven.koo@ni.com>
2021-06-30 11:54:42 -05:00
Martin Braun
6ce7ec8d5c examples: Fix icores example to match current RFNoC specs
The YAML file was using float-versions, not string versions.
2021-06-28 13:46:08 -05:00
Aaron Rossetto
78e24a4b3b examples: Update example CMakeLists.txt for minimum version bumps 2021-06-28 13:44:25 -05:00
Aaron Rossetto
ccb9f60fe5 uhd: Update minimum version of dependencies
The minimum version of the following dependencies have been updated for
UHD 4.1:

  * GCC: 5.4.0 --> 6.3.0
  * Clang: 3.8.0 --> 6.0.0
  * Apple Clang: 600 --> 800
  * Python: 3.5 --> 3.6
  * Boost: 1.58 --> 1.65
2021-06-28 13:44:25 -05:00