Commit Graph

60 Commits

Author SHA1 Message Date
michael-west
b38c9d8372 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-10-08 09:17:56 -05:00
Martin Braun
9c94086bbc b200: Move the B200 radio control core into usrp/b200/
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.
2021-07-27 13:01:44 -05:00
Matthew Crymble
3a8d10999f b200: flush receive buffer after getting an overflow 2021-07-27 12:56:59 -05:00
Matthew Crymble
824530bbe8 b200: temporary change to remove stream restart after overflow 2021-07-27 12:56:52 -05:00
Martin Braun
cbcccba3d8 host: Update code base using clang-tidy
The checks from the new clang-tidy file were then 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
2021-03-04 08:32:57 -06:00
Martin Braun
876d4150aa uhd: Apply clang-format against all .cpp and .hpp files in host/
Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of
files that clang-format gets applied against.
2020-03-03 08:51:32 -06:00
Martin Braun
d3a16b7022 uhd: Replace all occurrences of boost::bind with std::bind
Note: Replacing everything with a lambda would be even better, but that
can't be easily scripted so we'll do this as a first step to reduce the
Boost footprint.

This also removes occurences of #include <boost/bind.hpp>, and makes
sure all usages of std::bind have an #include <functional>. clang-format
wasn't always applied to minimize the changeset in this commit, however,
it was applied to the blocks of #includes.

Due to conflicts with other Boost libraries, the placeholders _1, _2,
etc. could not be directly used, but had to be explicitly called out
(as std::placeholders::_1, etc.). This makes the use of std::bind even
uglier, which serves as another reminder that using std::bind (and even
more so, boost::bind) should be avoided.

nirio/rpc/rpc_client.cpp still contains a reference to boost::bind. It
was not possible to remove it by simply doing a search and replace, so
it will be removed in a separate commit.
2019-11-26 12:21:32 -08:00
Martin Braun
1fe98e8701 uhd: Replace usage of boost smart pointers with C++11 counterparts
This removes the following Boost constructs:
- boost::shared_ptr, boost::weak_ptr
- boost::enable_shared_from_this
- boost::static_pointer_cast, boost::dynamic_pointer_cast

The appropriate includes were also removed. All C++11 versions of these
require #include <memory>.
Note that the stdlib and Boost versions have the exact same syntax, they
only differ in the namespace (boost vs. std). The modifications were all
done using sed, with the exception of boost::scoped_ptr, which was
replaced by std::unique_ptr.

References to boost::smart_ptr were also removed.

boost::intrusive_ptr is not removed in this commit, since it does not
have a 1:1 mapping to a C++11 construct.
2019-11-26 12:21:32 -08:00
Martin Braun
5758533839 b200_cores: Replace usage of boost::mutex with std::mutex 2019-02-15 11:12:54 -08:00
Martin Braun
7fab6b807e math: Replace boost::*::{lcm,gcd}() with portable versions
Boost changed the lcm() and gcd() functions in Boost 1.67. This creates
portable UHD versions to be used instead. They use various Boost
versions under the hood conditionally.
2019-01-18 09:37:12 -08:00
Brent Stapleton
eb1f8f160b formatting: preparing for uhd::math cleanup
Formatting files that will be touched in upcoming changes to uhd::math
2019-01-18 09:37:12 -08:00
Martin Braun
6652eb4a03 uhd: Move internal headers to uhdlib/
To avoid the proliferation of additional include directories and
multiple ways of including project-local headers, we now default to
moving all headers that are used across UHD into the uhdlib/
subdirectory.

Some #include statements were also reordered as they were modified for
closer compliance with the coding guidelines.

Internal cpp source files should now include files like this:

    #include <uhdlib/rfnoc/ctrl_iface.hpp>

Reviewed-by: Ashish Chaudhari <ashish.chaudhari@ettus.com>
2018-03-14 15:17:44 -07:00
Martin Braun
ae5211d71d uhd: Update license headers
All copyright is now attributed to "Ettus Research, a National
Instruments company".

SPDX headers were also updated to latest version 3.0.
2018-02-19 16:54:52 -08:00
Martin Braun
4f948e2c8b Move all license headers to SPDX format. 2017-12-22 10:45:51 -08:00
Andrej Rode
21aad77c9c utils: introduce new logging API and remove msg API 2017-02-20 17:13:15 -08:00
Andrej Rode
26cc20847c uhd: replace BOOST_FOREACH with C++11 range-based for loop
Note: This is the first commit that uses for-range, and range-based
for-loops are now usable for UHD development.
2017-02-10 16:44:33 -08:00
Martin Braun
99c2730bc9 Remove all boost:: namespace prefix for uint32_t, int32_t etc. (fixed-width types)
- Also removes all references to boost/cstdint.hpp and replaces it with
  stdint.h (The 'correct' replacement would be <cstdint>, but not all of our
  compilers support that).
2016-11-08 08:02:22 -08:00
Paul David
799446ba9b B2xx: fixed a typo when checking arguments on a streamer 2016-09-27 10:55:29 -07:00
Martin Braun
b9a80a76aa Revert "B200: Adding separate B200 radio control code"
This reverts commit 5d360ab43e.
2016-08-23 16:53:07 -07:00
michael-west
5d360ab43e B200: Adding separate B200 radio control code 2016-07-22 11:31:41 -07:00
Martin Braun
ef57ffcbbf Merge branch 'maint'
Conflicts:
	host/lib/usrp/b200/b200_impl.cpp
2016-06-23 09:58:20 -07:00
Martin Braun
8d2262f6b3 b200: Update DSPs after changing tick rate
Reviewed-By: Andrew Lynch <andrew.lynch@ni.com>
Reviewed-By: Michael West <michael.west@ettus.com>
2016-06-22 18:00:26 -07:00
Martin Braun
4a33820cbb Merge branch 'maint'
Conflicts:
	fpga-src
	host/cmake/Modules/UHDVersion.cmake
	host/lib/usrp/b200/b200_impl.cpp
2016-04-22 12:57:39 -07:00
Martin Braun
d010b3e4d4 b200: Fixed setting of max rate
DSP rates are now being tracked as in whether or not they've been set.
We can disregard unset DSPs for the automatic clock rate calculation.

Reviewed-By: Derek Kozel <derek.kozel@ettus.com>
2016-04-22 11:14:54 -07:00
Martin Braun
e9bd85c60b Merge branch 'maint' 2016-02-08 11:00:05 -08:00
michael-west
5c97330f08 B200: Fix for increasing retune times 2016-02-05 09:52:45 -08:00
Ashish Chaudhari
f44f7f2ca7 Merge branch 'maint'
Conflicts:
	host/lib/usrp/b200/b200_impl.hpp
	host/lib/usrp/e300/e300_fpga_defs.hpp
	host/lib/usrp/x300/x300_fw_common.h
2015-12-15 15:17:36 -08:00
michael-west
ac1db2c460 B2xx: Added B205mini support.
- Add support to b200_impl
- New INF file
- Removed references to old 'B205' name
2015-12-10 16:14:46 -08:00
Ashish Chaudhari
07de40c04b usrp3: Added support for pre-FIFO TX flowcontrol
- tx_vita_core_3000 can now monitor for flow-control immediately
  before the radio or immediately before the radio external FIFO
- B200 does not have an external FIFO so it will use the default config
2015-09-16 17:21:52 -07:00
Nicholas Corgan
0ce526f302 Fixed minor warnings
* Unreferenced exceptions in try-catch statements
* Incorrect function documentation
* Unlabelled unused variables
2015-09-01 13:23:19 -07:00
michael-west
92539438c2 B2XX: Added B200mini support 2015-08-17 18:10:09 -07:00
Martin Braun
9813505968 ad9361/b200/e300: Refactored AD936x + perifs management
- Created AD936x manager class
- Moved functionality from B2x0 and E310 into manager
- Separated property tree + perifs initialization in both device classes
2015-07-29 16:50:34 -07:00
Martin Braun
9132fab609 b200: Modify initialization sequence to avoid warnings
This will set the actual default rate to an integer factor
of whatever the tick rate is, but leave the property tree
value at zero. This avoids warnings if the chosen tick rate
is not a multiple of the previous default rate, but also
returns a zero value for the rate when it has not been
initialized, allowing the user to probe if the value has not
yet been set.
2015-06-29 10:38:17 -07:00
Martin Braun
51bc00eed3 b200: Added another rate check for auto tick rate mode 2015-05-11 17:12:30 -07:00
Martin Braun
27b8dbc1aa b200: Removed stray messages 2015-05-11 16:52:05 -07:00
Martin Braun
a151a7b783 b200: Replaced float comparisons with uhd::math::fp* operations 2015-05-07 11:55:36 -07:00
Martin Braun
c3b384feb1 Merge branch 'maint' 2015-04-27 16:17:30 -07:00
Martin Braun
0e1bba1ae0 b200: Added convenience subdev override for consistent subdev experience 2015-04-27 16:17:01 -07:00
Martin Braun
47ddba6fcc b200: Throw error for unreachable sampling rates
When auto tick rate is used, and the sampling rate exceeds the
limits, throw an error instead of coercing to the default rate.
2015-04-24 19:25:44 -07:00
Michael Dickens
a9b6141d7c b200: Boost 1.58-related fixes in B200 IO code.
When returning an invalid payload in handle_async_task, Boost 1.58
does not allow NULL to be returned; instead, to be more compatible,
use the correct type initialized to (0, []).
2015-04-21 11:56:51 -07:00
Michael Dickens
eacd36d94d b200: Boost 1.58-related fixes in B200 IO code.
When returning an invalid payload in handle_async_task, Boost 1.58
does not allow NULL to be returned; instead, to be more compatible,
use the correct type initialized to (0, []).
2015-04-20 15:24:12 -07:00
Martin Braun
2f760ac0f8 Merge branch 'maint'
Conflicts:
	host/lib/usrp/b200/b200_io_impl.cpp
	host/lib/usrp/common/ad9361_driver/ad9361_device.cpp
	host/lib/usrp/common/ad9361_driver/ad9361_device.h
2015-04-14 14:05:19 -05:00
Martin Braun
7ad93dc81f b200: Added warning for high bandwidth usage 2015-04-14 13:55:38 -05:00
Martin Braun
1f41782b56 b200: Remove now obsolete check for recommended max clock rate 2015-04-10 10:58:13 -07:00
Martin Braun
3407376f8a Merge branch 'maint'
Conflicts:
	host/lib/usrp/b200/b200_impl.hpp
2014-11-21 00:06:20 +01:00
Julian Arnold
d43a68499e b200: serialized access to get_rx/tx_stream 2014-11-21 00:04:37 +01:00
Martin Braun
6714ac0af3 b200: Make the master clock rate auto-configurable
When no master_clock_rate is defined, the B200 driver will now
select a suitable clock rate automatically based on the selected
sampling rate.
The selected tick rate is a multiple of the LCM of tx and rx rates.

Auto-setting is done every time a streamer is generated or the sampling
rate is configured.
2014-11-20 23:28:37 +01:00
Ben Hilburn
f8753a3d7f Merge branch adding warning regarding MCR on the B2xx. 2014-03-27 17:41:13 -07:00
Martin Braun
fd1e2f8fc1 b200: Added channel mapping capabilities 2014-02-25 20:20:51 +01:00
Balint Seeber
383128e2c9 b200: throw exception when master clock rate (tick rate) is requested to be > max for certain # of channels (i.e. restrict to 30.72MHz for MIMO)
Also includes sscanf type fix in b200_impl and longer timeout for AD9361 read
2014-02-14 15:40:30 -08:00