| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
It held the same value as MAX_RATE_10GIGE due to a typo.
|
| |
|
|
|
|
|
|
|
|
| |
The test_recv_get_release test should be checking received packets had
the same content as they did on send(), but was instead assigning to the
received buffer.
Shoutouts to GitHub user johnwstanford for pointing out the issue.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
The previous commit fixed a bug in the DUC, where get_frequency_range()
reported incorrect values. The DDC did not have this bug, but we port
the updates to the unit tests and the documentation from the DUC to the
DDC for consistency's sake.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The tuning range of the DUC depends on the output sample rate (which is
larger), but it was using the input sample rate. This was causing a bug
where for Tx, the DSP tuning range was limited when using multi_usrp API,
and thus would not allow to DSP-tune beyond the current sampling rate.
In this patch, we also re-use the existing calculation of the sampling
rate, and harmonize that code between duc_block_control and
ddc_block_control.
Consider the following Python REPL code:
>>> import uhd
>>> U = uhd.usrp.MultiUSRP('type=x300')
>>> U.set_rx_rate(10e6)
>>> U.set_tx_rate(10e6)
>>> # Creating a streaming is required, or the input rate will not be
>>> # set:
>>> S = U.get_tx_stream(uhd.usrp.StreamArgs("fc32", "sc16"))
>>> treq = uhd.types.TuneRequest(1e9)
>>> treq.rf_freq = 1e9
>>> treq.dsp_freq = 50e6
>>> treq.dsp_freq_policy = uhd.types.TuneRequestPolicy.manual
>>> treq.rf_freq_policy = uhd.types.TuneRequestPolicy.manual
>>> tres = U.set_rx_freq(treq, 0)
>>> print(str(tres))
Tune Result:
Target RF Freq: 1000.000000 (MHz)
Actual RF Freq: 1000.000000 (MHz)
Target DSP Freq: 50.000000 (MHz)
Actual DSP Freq: 5.000000 (MHz)
>>> # Note the last two lines: The *target* DSP freq was already clipped
>>> # to 5 MHz. These lines show 50.0 MHz when this patch is applied.
This bugfix is accompanied some related changes:
- The unit test is amended to verify the behaviour
- The API documentation is amended with details on its behaviour
|
|
|
|
|
| |
This commit adds `get_src_epid()` and `get_port_num()` method bindings
to the Python bindings for `noc_block_base`.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Some archs require linking against libatomic, others don't. We add some
CMake code that checks for libatomic.so requirement if:
- We are not on MSVC, AND
- Compiling std::atomics code would cause a linker error.
We then check for the existence of libatomic.so, and fail if we can't
find it.
|
|
|
|
|
| |
UHD requires Boost 1.65, so checks for Boost 1.61 will always be
satisfied.
|
|
|
|
| |
Closes: https://github.com/EttusResearch/uhd/issues/478
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
In x300_eth_mgr.cpp the variable init is created but not initialized.
Only some of the variables within the struct are then set before init
is assigned to a different variable. Initialize the variable to
prevent unexpected values.
|
|
|
|
|
| |
Remove warning about potential data loss in VS due to typecast by
marking it as intended.
|
|
|
|
|
| |
Initialize _hshake_args_server to safely use this struct and its
contents in line 70.
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
| |
Fix implicit typecasts that could potentially lose data. Doing this to
show that these typecasts are done on purpose (and to resolve warnings
from VS).
|
|
|
|
|
|
| |
Fix the "Enum.3: Prefer class enums over "plain" enums" warning for the
node_type enum and update the calls to the enumerators as proposed by
the C++ Core Guidelines.
|
|
|
|
|
|
|
|
|
|
| |
cmake has newer variables to identify specific Visual Studio version.
This change updates to use those. This also changes how images
files are globbed to be relative paths, which is useful if build files
are moved from machine to machine. This case is possible in Azure
Pipeline's CI.
Signed-off-by: Steven Koo <steven.koo@ni.com>
|
|
|
|
|
|
|
| |
Fixed issue where variable tmp_file going out of scope could have
leaked the storage it points to. Replaced the declaration of tmp_file
by using a unique pointer with custom deleter that takes care of
closing the tmpfile when it is not needed anymore.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The calibration utilities attempt to bump the transmit thread priority to
realtime to prevent underruns. However, on platforms that use pthread,
`pthread_setschedparam()` typically requires elevated privileges. When
called without those privileges, the code path throws an exception that
is left unhandled, thus terminating the process with an unhelpful error
message.
This commit changes the thread priority function call to use a safe
version which catches any exceptions thrown by `pthread_setschedparam()`
and prints a much more instructive error message without terminating the
process. This gives the user a fighting chance to correct the issue and
successfully use the calibration utilities.
|
|
|
|
|
|
|
|
|
| |
In days of yore, before we had evolved RFNoC to the UHD 4.0 state, only
one radio on N310 was able to drive the front-panel GPIOs. With the
introduction of the UHD 4.0 GPIO API, we have fine-grained control for
every pin who may drive it. This makes this constant obsolete, and we
remove it to avoid confusion. Besides, these two `constexpr` values
where being used nowhere.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By changing the type for accesses to noc_block_base calls in the Python
from sptr& to a simple reference (&), we fix the "holder type" issues
that crop up when trying to use radio_control from multi_usrp, which
returns access to the block as a reference rather than a `sptr`.
The error message seen without this fix always contains this string:
Unable to cast from non-held to held instance (T& to Holder<T>)
(The exact message depends on the API call made).
|
|
|
|
|
|
|
|
|
| |
`std::abs` is only a templated function, when dealing with complex
numbers. For real values, it is an overload. There is no
documented standard way to use `std::abs<double>()` for real-valued
arguments. We therefore remove all usages of `std::abs<>()` and
replace them with `std::abs()` where they were taking a real-valued
argument.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recently, we released UHD v4.1.0.1, which addressed some bugs that found
their way into the UHD v4.1.0.0 release. While the changes that
addressed those bugs were made in the master branch, they were
cherry-picked into the UHD-4.1 branch, and the v4.1.0.1 release was made
from that branch. However, the version, manifest, and changelogs were
updated only in the UHD-4.1 branch, not in master. The effect of that is
that the current master (a.k.a. the absolute latest, perhaps unstable,
use-at-your-own-risk code) branch's version, manifest, and changelogs
still reflect the v4.1.0.0 release. Furthermore, the UHD documentation
refers to the manifest file in the master branch as the way to get (at
least) the most recent filesystem and FPGA artifacts. Not updating the
manifest in master renders that documentation inaccurate.
This commit updates those details in master to reflect the latest
v4.1.0.1 release artifacts, and updates the version of master to
4.2.0-git.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This serves two purposes:
- This file no longer goes into the compiled DLL if B200 is disabled
- Discourage use of this file for new devices, making it clear that this
architecture is no longer used
The file itself is left untouched, only the class is renamed from
radio_ctrl_core_3000 to b200_radio_ctrl_core.
Note: In UHD 3, this file was also used by N230.
|
|
|
|
|
|
| |
In 26cc208, we accidentally added an `auto` into a loop, making the loop
variable's scope local. However, this variable lives outside this for
loop.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In current implementation it is not possible to find all blocks of
a device by calling find_blocks("0/"). The same is true for the
block count. This is caused by the valid block id regex which
requires a block name. This regex is used to validate the block
name as well as to match block ids in search.
This fix looses the requirement for the block name to allow
searches by device number and block count and also extends the
is_valid_block_id method to require the block name match to be
non empty (which restores the previous behaviour at this point).
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
We allow underscore in RFNoC's block names but the regular
expressions only allowed the underscore in the block name RE. This
fix adds the underscore to the block id RE as well as adapts the
unit tests accordingly.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
The Boost version is identical to the std:: version (which is available
since C++11) and thus is no longer needed.
Because of implicit includes, this breaks compilation in other parts.
Appropriate includes were added there also.
|
| |
|
|
|
|
|
|
| |
RFNoC 4.0 does not restrict the number of blocks. The constant
is not used anywhere in the code and can therefore be removed
savely.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
| |
|