Commit graph

981 commits

Author SHA1 Message Date
Aaron Rossetto
93d8c6f83b uhd: Add thread affinity utility functions 2019-11-26 11:49:10 -08:00
Martin Braun
e250da5003 utils: cast: Add from_str() typecast
This is the inverse to std::to_string(), and we can overload it with
UHD-internal types.
2019-11-26 11:49:10 -08:00
Martin Braun
e9fa920ad8 soft_register: Replace boost::unordered_map with std version
This is the only occurrence of boost::unordered_map in UHD.
2019-11-26 11:49:10 -08:00
Martin Braun
8aaf42a280 utils: soft_register: Remove 16-bit mode
This mode is never used, and makes it more cumbersome to maintain this
code.
2019-11-26 11:49:09 -08:00
Martin Braun
15bdf9b64b utils: dirty_tracked: Remove custom copy constructor
The custom copy ctor for dirty_tracked was using the = operator, which
wouldn't necessarily copy the dirty flag. By removing it (and thus using
the default copy ctor), the copied dirty_tracked object now has the same
value *and* dirty flag as the original.
2019-11-26 11:49:09 -08:00
Ashish Chaudhari
64dd48776c utils: Added set_thread_name for std::thread 2019-11-26 11:49:08 -08:00
Martin Braun
96a19dc03f nirio_fifo: Replace boost::atomic with std::atomic
This is the only occurrence of boost::atomic in UHD.
2019-11-26 11:49:08 -08:00
Martin Braun
6f6429c45b uhd: types: Extend stream_cmd_t::num_samps to 64 bits
Newer devices may be able to provide more then 32 bits worth of samples.
2019-11-26 11:49:08 -08:00
Martin Braun
3df500cb19 uhd: Add new exceptions for RFNoC-specific errors
Add the following exception types:
- rfnoc_error
- op_failed
- op_seqerr
- op_timeout
- op_timeerr
- access_error
  - It is meant to be used when access violations have taken place,
    i.e., when a resource is being accessed without appropriate
    permissions.
- resolve_error
  - This is a derivative of rfnoc_error, and will be used when a
    property resolution fails unexpectedly.
- routing_error
  - For use when the framework has path setup issues or general
    routing-related errors
2019-11-26 11:49:08 -08:00
Martin Braun
2ed94af772 uhd: Remove deprecated objects and methods
This removes the following symbols:
- otw_type_t
- clock_config_t
- Any functions that use those symbols
- Non-standard args from examples (e.g., --total-time is deprecated in
  favour of --duration)
2019-11-26 11:49:08 -08:00
Martin Braun
d94140a412 uhd: Remove support for N230
Note: N230 is still supported on the 3.15 LTS branch
2019-11-26 11:49:08 -08:00
Martin Braun
9b0702c546 cmake: Bump dependency versions for UHD 4.0.0.0
- Boost >= 1.58
- CMake >= 3.5.1
- gcc >= 5.4.0
- Clang >= 3.8, AppleClang >= 600
- Python >= 3.5 (Py2k no longer supported)
- Numpy >= 1.11
- C++14 for lib, include may now use C++11 constructs.
  - Because there is no more code requiring C++03 syntax, we remove the
    include-specific clang-format file
2019-11-26 11:49:08 -08:00
Martin Braun
0014f5ba29 uhd: dict: Add typecast operator to std::map<>
This will now allow calls like this:

uhd::dict<k, v> d = /* ... */;
auto m = static_cast<std::map<k, v>>(d);
2019-11-04 09:57:49 -08:00
michael-west
1004eef88e cmake: Add UHD_COMPONENT variable
Added cmake variable to set the component (currently UHD or MPM).
so the banner printed by the log_resource would reference the correct
component.  Added accessor function and appropriate calls in log.cpp.

Signed-off-by: michael-west <michael.west@ettus.com>
2019-10-15 15:21:52 -07:00
Martin Braun
d8b75ca532 Revert "uhd: Check property type at access; error if mismatch"
This reverts commit 94592641f0.

The commit itself was OK, but it changed the requirements such that UHD
could only be compiled with C++11.
2019-09-30 16:35:51 +02:00
Martin Braun
c350eb5a6c uhd: include: Add <string> to headers where it was missing 2019-09-09 08:36:19 -07:00
Martin Braun
46c0e95a86 rfnoc: Read cmd FIFO size from blocks & configure ctrl_iface
This requires noc_shell compat number 6.0. It will allow sending as many
command packets, but no more, than there is space.

Updated FPGA images for devices:
- X310/X300
- N300/N310/N320
- E310/E320
2019-09-04 20:28:04 -07:00
Aaron Rossetto
94592641f0 uhd: Check property type at access; error if mismatch 2019-09-04 19:06:08 -07:00
Martin Braun
dd1606607e docs: Improve language on threading for recv() and send() 2019-08-22 15:33:56 -07:00
Martin Braun
0fccb00d6b boost: Replaced units::demangle with core::demangle where appropriate
Boost moved this around in version 1.58.
2019-08-22 08:17:11 -07:00
Martin Braun
bbb869ca80 uhd: Add UHD_FALLTHROUGH attribute
This provides a platform-independent attribute to allow fallthroughs in
switch statements. Example:

switch (foo) {
    case BAR:
        do_something();
	UHD_FALLTHROUGH
    case BAZ:
        do_another_thing();
}

The usage of UHD_FALLTHROUGH will avoid a compiler warning if indeed the
fallthrough was intentional. The associated warning
(-Wimplicit-fallthrough) is only available on gcc and Clang.
2019-08-16 11:29:49 -07:00
Martin Braun
141eb0fb52 uhd: rfnoc: docs: Fix Doxygen warning due to undoc'd parameter 2019-08-13 15:24:02 -07:00
Martin Braun
7e1b567d53 rfnoc: Add update_graph() API call
Blocks that change scaling, tick rate, or sampling rate can now notify
the graph to update streamers. Before, this was handled only by
mult_usrp, and only for DDC and DUC blocks.
2019-07-15 10:12:33 -07:00
Martin Braun
ff80b05824 utils: log: Fix includes for UHD_HEX()
Using UHD_HEX() requires <iomanip>, which is now part of log.hpp.
2019-06-12 10:52:02 -07:00
Alex Williams
b4c3ddac75 rfnoc: Consolidate double-documented param in block_ctrl_base 2019-06-07 10:35:00 -07:00
Alex Williams
99afbd3855 types: Add explicit copy-constructor for sid_t
Removes warnings due to -Wdeprecated-copy
2019-06-07 10:35:00 -07:00
Andrew Lynch
27f027c54f utils: add support for directly updating components from image_loader 2019-05-02 08:44:40 -07:00
Brent Stapleton
01fd6d52ce prop_tree: add pop() function
Adding pop function to property tree, which will remove and return a
property from the property tree. This also includes unit tests.
2019-05-02 08:39:54 -07:00
Brent Stapleton
d44277d7ac prop_tree: formatting property tree files
- Ran clang-format
- Fixed typos
- Updated copyright headers

clang-format -i --style=file \
    host/include/uhd/property_tree.hpp \
    host/include/uhd/property_tree.ipp
clang-format -i --style=file \
    host/lib/property_tree.cpp host/tests/property_test.cpp
2019-05-02 08:39:54 -07:00
Nicholas Corgan
918e4ff20c C: Add uhd_get_abi_string, uhd_get_version_string
Clients that include the UHD C headers have access to
the version and ABI #defines, but this is not available
to clients that dynamically load the library. This
commit adds publicly exported functions to provide this
information.
2019-05-02 08:36:44 -07:00
Sugandha Gupta
fe3fa1dd31 device3: Constraint send/recv_frame_size based on down/upstream MTU
We need to properly contraint the send/recv_frame_size based on the
minimum MTU of all the down/upstream blocks. This fixes the issue with
E310 tx/rx streaming as it has smaller MTU sizes than the other usrps.
2019-05-01 15:17:23 -07:00
Sugandha Gupta
178b35569b e310/e320: Move E310 to MPM architecture and refactor
- Turns the E310 into an MPM device (like N3xx, E320)
- Factor out common code between E320 and E310, maximize sharing between
  the two devices
- Remove all pre-MPM E310 code that is no longer needed
- Modify MPM to remove all existing overlays before applying new ones
  (this is necessary to enable idle image mode for E310)

Co-authored-by: Virendra Kakade <virendra.kakade@ni.com>
Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
2019-05-01 15:17:23 -07:00
Martin Braun
32869d2f34 include: Remove BOOST_VERSION hacks for 1.58
This removes all version hacks that were required for Boost versions
1.53 through 1.58 (since we now require 1.58).
2019-04-24 11:55:05 -07:00
Martin Braun
beb1f3c207 utils: Add scope_exit object
This is a utility for RAII-style operations. An object that will run
code when a scope is left.

Also includes unit tests.
2019-04-01 23:39:35 -05:00
Martin Braun
b47ec15122 utils: Change UHD_INLINE to inline in dirty_tracked.hpp
This avoids having to include config.hpp. Also, the UHD_INLINE should be
avoided in favour of either inline, or UHD_FORCE_INLINE.
2019-03-25 18:40:00 -07:00
Martin Braun
90652b9066 clang-format: Break after templates
Before, code would get formatted thus:

template <typename T> class X {}

Now, it gets formatted as such:

template <typename T>
class X {}
2019-03-21 09:50:09 -07:00
Martin Braun
864d4002db uhd: Remove cal containers
They are currently unused, and may need reimplementation. For the time
being, they can go out of the codebase.
2019-03-20 14:02:08 -07:00
Brent Stapleton
431deb855b uhd: mpm: update all license header w/ "-or-later"
Updating all SPDX license identifiers to include "-or-later"
2019-03-08 00:43:07 +01:00
Michael West
ccf95088fd Revert "RFNoC: Fix flush in source_block_ctrl_base"
This reverts commit 655b9b0f8e.

Signed-off-by: Michael West <michael.west@ettus.com>
2019-03-05 18:34:21 +01:00
Martin Braun
7193670fb3 types: sid: Remove duplicate operator=()
This fixes a warning about multiple operators. Doesn't change any
functionality.
2019-02-28 10:24:52 -08:00
Martin Braun
d2cbbeb472 nirio: Demote rpc client start/stop log messages to DEBUG 2019-02-18 20:59:22 -08:00
Trung Tran
ecd7408884 node_ctrl_base: add check valid num_input_ports
A node is not a block, it doesn't use any block definition to
populate the number of input and output ports. This is equivalent to it
have undefined number of input and output ports.
The _find_child_node function relies on node input and output port size.
When port size is not defined we should not follow the active channel;
instead, we need to greedily to find all child node.
Without this change graph_search_test will fail.

Signed-off-by: Trung Tran<trung.tran@ettus.com>
2019-02-18 16:36:08 -08:00
Michael West
7d71823feb RFNoC: Fix flush in source_block_ctrl_base
The configure_flow_control_out function was set to dump any packets
onto the crossbar, which could cause issues on the crossbar and in
downstream blocks.  Replacing wil a call to the _flush() function in
the block_ctrl_base parent class, which drops the packets so they do
not get put onto the crossbar.

Signed-off-by: Michael West <michael.west@ettus.com>
2019-02-18 11:04:13 -08:00
Michael West
c24901bdcb RFNoC: Disable FC ACK packets for lossless links
FC ACK packets are unnecessary on lossless links and degrade overall
performance.  This change disables those packets on all lossless links.

Signed-off-by: Michael West <michael.west@ettus.com>
2019-02-18 11:04:13 -08:00
Martin Braun
52138314a4 uhd: Replace all usage of boost::noncopyable with uhd::noncopyable
This fixes the build errors that occur due to switching locations of
noncopyable.hpp within Boost, and also allows us to remove
boost::noncopyable in one fell swoop.
2019-02-15 11:12:54 -08:00
Martin Braun
ed97ce3242 uhd: utils: Add noncopyable class
This is a replacement for boost::noncopyable. It has two
implementations with identical APIs, selectable by a macro. One
"implementation" is a renaming of the Boost version. The other is
simply implemented using C++11 features.

The motivation is that the location for boost::noncopyable has changed
over the range of Boost versions, thus, using boost::noncopyable is
difficult to maintain for a broad range of Boost versions.
2019-02-15 11:12:54 -08:00
michael-west
4e9353d739 E3xx: Increase spp limit for E3xx radio
Increase frame size from 364 to 508 samples.  Reduces overhead.  For
some reason yet to be understood, sizes over 508 do not work.

Signed-off-by: michael-west <michael.west@ettus.com>
2019-01-31 13:55:21 -08:00
michael-west
324c6d37da fixup! RFNoC: More graph traversal fixes 2019-01-31 13:47:31 -08:00
michael-west
13663f459d RFNoC: More graph traversal fixes
- Store number of input and ouptput ports from block definition.
- Use number of input and ouptut ports for graph traversal rather
  than number of connected blocks.
- Fixes DAC synchronization failure errors when using only one TX
  channel on X300.

Signed-off-by: michael-west <michael.west@ettus.com>
2019-01-31 13:47:31 -08:00
michael-west
0c354fc02f RFNoC: Update FIFO XML definition
Added explicit use of default block controller to remove warnings.

Signed-off-by: michael-west <michael.west@ettus.com>
2019-01-29 09:19:36 -08:00