| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change version from a numeric to a string, in order to
differentiate between versions like "1.1" and "1.10".
|
|
|
|
|
| |
This adds two structs (mm32_iface and mm32_iface_timed) which are
a container for peek/poke interfaces.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this commit, the MTU property resolver in noc_block_base had an
issue: for every MTU edge property (both input and output on each port)
on the block, the property resolver listed every other MTU edge property
in its output sensitivity list, regardless of whether or not the output
edge properties would ever be affected by the current MTU forwarding
policy. This breaks an inherent (and up until now, unwritten) contract
between a property resolver and UHD that only properties that can be
affected by the resolver should be included in the output sensitivity
list. The result of breaking the contract leads to errors being thrown
when committing an RFNoC graph in certain multi-channel use cases.
This commit refactors the MTU property resolver to use the MTU
forwarding policy to determine the correct set of edge properties to
include in the output sensitivity list. The change also introduces a new
restriction--the MTU forwarding policy may only be set once per instance
of a noc_block_base. Typically, a subclass implementing an RFNoC block
will call `set_mtu_forwarding_policy()` in its constructor to set a
custom MTU forwarding policy (if desired) and leave it untouched for the
lifetime of the block.
|
|
|
|
| |
device3 was an object used in UHD-3 RFNoC. It is no longer required.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our APIs are not consistent when it comes to handling invalid settings.
Some setting (like antenna, LO name, ...) will trigger an exception when
invalid. Other settings (gain, frequency, clock rate) will get coerced
to a valid value.
This behaviour does make sense for the most part (it is more intuitive
that 81 dB gets coerced to 80 dB if that's the maximum, but coercing an
invalid antenna value like "RX1" has no clear alternative). And in any
case, this is the behaviour that UHD has always had.
In this commit, all Doxygen headers in multi_usrp are updated to exactly
describe their behaviour (coerce or throw).
|
|
|
|
|
|
| |
This adds uhd::rfnoc::radio_control::get_spc(). It can be overridden by
radio implementations, but radio_control_impl has a sensible default
implementation, return the value that is in the SPC radio register.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vcpkg can be used for the Windows C++ dependencies for uhd with this commit.
To use vcpkg on Windows:
1) Copy the custom triplets in host/cmake/vcpkg/ to the vcpkg/triplets/ folder.
2) Install boost and libusb for the custom triplet
"vcpkg install libusb:uhd-x64-windows-static-md boost:uhd-x64-windows-static-md"
3) Call CMake with vcpkg toolchain file flags:
-DVCPKG_TARGET_TRIPLET=uhd-x64-windows-static-md
-DCMAKE_TOOLCHAIN_FILE=%VCPKG_INSTALL_DIR%/scripts/buildsystems/vcpkg.cmake
-G "Visual Studio 16 2019" -A x64
Replace the -G with the installed version of Visual Studio and matching
architecture. Then build normally by running vcvarsall.bat and msbuild.
Signed-off-by: Steven Koo <steven.koo@ni.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The const-ness of some radio_control differed between base class and
implementation. This fixes the consistency, but also makes sure these
methods follow the rules for when to make methods 'const'.
The following rules apply:
- Methods that query static capabilities are const. Here, we made
get_tx_lo_sources() const (the RX version was already const).
- Getters that may have to interact with the device (e.g., peek
a register) are not const, because the act of peeking is usually also
non-const. Here, we changed get_rx_lo_export_enabled() to non-const.
- All base classes are fixed such that the derived classes and the base
classes have the same const-ness. Clang was warning about differences.
This can cause very tricky bugs, where the radio_control_impl version
can get called instead of the intended child class.
|
|
|
|
|
|
|
|
|
| |
The checks from the new clang-tidy file are applied to the source tree
using:
$ find . -name "*.cpp" | sort -u | xargs \
--max-procs 8 --max-args 1 clang-tidy --format-style=file \
--fix -p /path/to/compile_commands.json
|
|
|
|
|
|
|
|
|
|
|
| |
MPM devices were being discovered when trying to locate PCIe connected
devices. Adding filter to exclude them if the "resource" key is
specified in the device address arguments.
Replaces "lib: disable non pcie types in find with resource" to reduce
impact to older devices and remove API change.
Signed-off-by: michael-west <michael.west@ettus.com>
|
|
|
|
|
|
| |
The definitions of these functions were deleted in 23f4f8cf4ea72, and so
now we can remove the declarations from the header file to prevent any
confusion.
|
|
|
|
|
|
|
|
|
|
| |
Prior to Boost 1.66, boost::format() did not support the %b format
specifier, yet the minimum version of Boost required to build UHD is
Boost 1.58 (as specified in the CMakeLists.txt file).
Rather than force an upgrade of Boost on everyone, this commit replaces
the %b format specifiers with %c and provides 'Y' or 'N' values based on
the Booleans in the CHDR header being printed (EOV and EOB).
|
|
|
|
|
|
|
|
|
| |
Add a new image_loader argument delay_reload to provide a way to update
components but optionally delay the actual load.
Similarly add a new argument, just_reload, to enable uhd to reload
the fpga/dts components.
Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
|
| |
|
|
|
|
|
|
| |
- Add get_item_width() and get_nipc() methods to the Null/Source/Sink
block controller.
- Add missing enumerated types for get_count() method.
|
|
|
|
|
|
| |
These rf_control interfaces allow easier implementation of
radio controls as well as allowing easier sharing of code
for implementing e.g. gain_profile.
|
|
|
|
|
|
|
|
|
|
| |
This change reverts cb9329a681552e6ac6277d16e1627afcbb23e637.
The type checking is causing some conversion issues on clang/macos.
The type_index checking doesn't work correctly across shared
libraries and should not be relied on to verify type, since it can
vary from compiler to compiler.
Signed-off-by: Steven Koo <steven.koo@ni.com>
|
|
|
|
|
|
|
| |
See also:
https://clang.llvm.org/docs/AttributeReference.html#fallthrough
The attribute was missing a semicolon.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The default resolve callback behavior for a newly-instantiated `node_t`
object resolves all dirty properties associated with the node, then
marks the properties as clean. When the node is added to a graph, its
resolver callback is updated to use the graph property propagation
algorithm in `graph_t::resolve_all_properties()`, which is considerably
more sophisticated and relies on the graph topology to do its work.
When a connection between two nodes is broken via the
`graph::disconnect()` method, nodes which no longer have incoming or
outgoing edges (connections) are removed from the graph. Prior to this
change, the removed node's resolver callback was left pointing at the
graph property propagation algorithm. In certain use cases, this could
result in unexpected client-facing behavior. Consider, for example, this
code (incomplete and for illustrative purposes only) which creates a
streamer on one transmit chain of a multi-channel device, destroys that
streamer, then creates a stream on the other transmit chain. Attempting
to set the TX rate on the first chain after destroying the streamer does
not result in the expected rate change, despite the same code working
correctly before creating the streamer:
constexpr size_t CH0 = ..., CH1 = ...;
uhd::usrp::multi_usrp::sptr usrp = uhd::usrp::multi_usrp::make(...);
// Set a TX rate on both chains; this succeeds
usrp->set_tx_rate(initial_rate, CH0);
usrp->set_tx_rate(initial_rate, CH1);
assert(initial_rate == usrp->get_tx_rate(CH0));
assert(initial_rate == usrp->get_tx_rate(CH1));
// Create a TX streamer for channel 0
std::vector<size_t> chain0_chans{CH0};
stream_args_t sa;
sa.channels = chain0_chans;
sa.otw_format = ...;
sa.cpu_format = ...;
uhd::tx_streamer::sptr txs = usrp->get_tx_stream(sa);
// Destroy the first streamer (disconnecting the graph) and
// create a streamer for channel 1
txs.reset();
std::vector<size_t> chain1_chans{CH1};
sa.channels = chain1_chans;
txs = usrp->get_tx_stream(sa);
// Now try to set a new TX rate on both chains
usrp->set_tx_rate(updated_rate, CH0);
usrp->set_tx_rate(updated_rate, CH1);
assert(updated_rate == usrp->get_tx_rate(CH0)); // <--- FAILS
assert(updated_rate == usrp->get_tx_rate(CH1));
The reason this fails is because the second call to `set_tx_rate()` on
channel 0 internally sets the 'interp' (interpolation ratio) property on
the DUC node via the call to the DUC block controller's
`set_input_rate()` function. As the DUC node is no longer part of the
graph, having been removed from it when the first streamer instance was
destroyed, the graph property propagation algorithm doesn't 'see' the
node with the dirty property, and the 'interp' property resolver
callback is never invoked. As a result, the DUC's input rate property,
which depends on the interpolation ratio value, is never updated, and
thus calling the `get_tx_rate()` function to query the new rate of the
TX chain results in an unexpected value. In fact, in this particular
case, `set_tx_rate()` actually raises a warning that the TX rate
couldn't be set, and a message is printed to the console.
This commit remedies the situation by restoring the default resolve
callback behavior for a node when it is removed from the graph. This
allows the framework to be able to invoke the property resolver callback
on that node when a property is updated, the expected behavior of a
newly instantiated node.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
mpmd find doesn't respect the "resource" arg hint and can be detected
when "resource" is set. This results in incorrect device selection when
using PCIe. This change adds detection for "resource" as a prefix
in the device hints for mpmd and the other devices.
|
|
|
|
| |
This resolves an issue with building on older compilers.
|
| |
|
|
|
|
|
|
|
|
| |
This updates the IO signatures so that all devices and RFNoC blocks use
the same IO signature for the DRAM. This is needed because the IO
signatures must match between the RFNoC blocks and the devices. This
means that some devices have extra bits in the IO signature for the
address, but the extra bits will simply be ignored.
|
|
|
|
|
|
|
|
|
| |
The previously added APIs for getting/setting power reference levels was
missing an option to read back the currently available power levels
(minimum and maximum power levels).
This adds getters for TX and RX power ranges to multi_usrp and
radio_control. The power API is thus now more similar to the gain API,
which always had getters for gain ranges.
|
|
|
|
|
| |
Clang will generate an illegal instruction if a virtual destructor
isn't defined.
|
|
|
|
|
|
|
|
|
| |
This commit resolves a segfault that occurs during teardown. Since
teardown isn't detereministic in python, there were cases where the
graph would destruct before the streamers or links got chance to
cleanup. This would result in a segfault. This change gives the lambda
a shared pointer to the object the callback method is calling on, so
that it won't destruct before being called.
|
|
|
|
|
|
| |
M_PI may not exist if _USE_MATH_DEFINES isn't defined before the
first include of math.h or cmath on Windows. This changes avoids the
issue all together by defining our own PI.
|
|
|
|
|
| |
There is a gcc bug for template specialization that causes compile errors.
Reformatting the namespacing avoids the bug.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Added method to disconnect an edge
- Added method to remove a node
- Fixed algorithm to check edges during connect. Previous code was
checking some edges twice and allowing duplicate edges to be created
for existing edges.
Signed-off-by: michael-west <michael.west@ettus.com>
|
|
|
|
| |
Signed-off-by: mattprost <matt.prost@ni.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds an enhancement to node_t::set_properties() in which
the instance argument provided to the function (which normally applies
to all properties in the key/value list) can be overridden on a
per-property basis using a special syntax.
If the key consists of the property name followed by a colon (':') and
then a number, the number following the colon is used to determine which
instance of the property this set pertains to, and the value passed via
the instance parameter is ignored for that property. For example, in the
following call:
node->set_properties("dog=10,cat:2=5,bird:0=0.5", 1)
instance 1 of node's 'dog' property is set to 10, the 1 coming from the
instance parameter, instance 2 of the node's 'cat' property is set to 5
due to the override syntax provided in the string, and instance 0 of the
node's 'bird' property is set to 0.5 due to its override.
If the name/instance pair is malformed, e.g. 'value:=10' or
'value:foobar=10', a runtime error is thrown.
|
| |
|
|
|
|
|
| |
This is an advanced API call that allows direct underlying
access to the radio_control object for RFNoC devices.
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: mattprost <matt.prost@ni.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds pybind11 glue code for the userland chdr parsing code
introduced in the uhd::utils::chdr namespace. Additionally, it moves
some pybind11 adapter code to a common pybind_adaptors.hpp file which
originally existed in the cal_python.hpp file.
This commit also adds unit tests for the python bindings using a
captured wireshark trace which is located in rfnoc_packets_*.py and some
handwritten packets in hardcoded_packets.py
Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
|