Commit graph

46 commits

Author SHA1 Message Date
mattprost
d80d56114a twinrx: Bypass adf535x feedback divider
Bypass the LO1 feedback divider if it is not required. Some TwinRX units
have seen issues when tuning to frequencies between 3.5GHz and 5.1GHz
while following that data path.

Signed-off-by: mattprost <matt.prost@ni.com>
2020-09-03 15:02:05 -05:00
mattprost
fc3f91e0cf twinrx: update synthesizer register values for improved rf performance
Updated Register values for ADF5356:
R2) Expand Frac2 to a 28-bit value for ADF5356
R6) Use negative bleed current for improved spurious performance
R7) Set Fractional-N Lock Detect Precision to 12.0 ns because of bleed
currents
R8) Use magic number for reserved bits
R9) Fix VCO Band Division calculation for ADF5356
RD) Expand Frac2 to a 28-bit value for ADF5356

Signed-off-by: mattprost <matt.prost@ni.com>
2020-08-11 16:07:16 -05:00
Martin Braun
2d7676e8cf lib: Add power cal manager
This is a utility class that can be used by USRP or daughterboard
drivers to tie power calibration into their respective drivers.
2020-05-19 13:24:59 -05:00
Lane Kolbly
5802a362f8 uhd: Replace include guards with pragma once
Pragma once is the more modern version of include guards, eliminating
any potential problems with mistyping include guards. Let's use those.
2020-04-08 15:16:06 -05:00
Martin Braun
a1f9619469 uhd: cal: Use usrp::cal::database instead of CSV files
Now that we have cal::iq_cal and cal::database, there's no need to
manually wrangle CSV files for calibration data. This commit replaces
all CSV operations with cal::database calls and uses cal::iq_cal as
a container.

CSV files can still be read, but are considered deprecated.
2020-04-02 11:55:17 -05: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
883e658360 ad9361: Fix formatting
- Apply clang-format
- Remove unnecessary boost::format
2020-02-10 10:19:26 -06:00
Martin Braun
0cf54ce073 mpm/mpmd: Expose APIs to drive GPIO sources
The N310 has a feature that allows the front panel GPIOs to be driven by
various sources: The PS, or any of the radio channels. The MPM-based
APIs did not expose any way to change that.

Changes:
- Add MPM APIs to PeripheralManagerBase and n3xx classes
- Improve comments and explanations
- Add host-side hooks into these new APIs in mpmd_mb_controller
- Implement these APIs for N3xx

The N3xx devices will have the option to set the GPIO source to "PS", or
to one of "RF0", "RF1", "RF2", "RF3" (if there are four channels; the
N300 and N320 can only go up to RF1).

Note: The N310 radio does not have separate FP-GPIO banks for channels
0 and 1, which needs to be fixed in a separate commit.
2020-01-23 11:37:51 -08:00
Brent Stapleton
708840002e uhd: fixing MSVC warnings
Small changes to remove various compiler warnings found in MSVC
- Adding uhd::narrow_cast to verious spots
- wavetable.hpp: all floats literals in the wavetable.
- paths_test: unnecessary character escape
- replay example: remove unreferenced noc_id
- adfXXXX: Fixing qualifiers to match between parent and derived
  classes
- rpc, block_id: Removing unused name in try...catch
2020-01-09 09:18:25 -08:00
Ciro Nishiguchi
d7e5a630ed usrp: Add I/O service manager for DPDK 2019-12-20 16:32:22 -08:00
Ciro Nishiguchi
837b89e2ec rfnoc: Rename thread affinity args
Rename thread affinity args such that they do not end with an integer.
Arg names ending with an integer are interpreted as being targeted at a
specific motherboard index in device_addr methods.
2019-11-26 12:21:33 -08:00
Ciro Nishiguchi
7b95cbd7fd rfnoc: Merge I/O service device args with stream args
This makes it possible for users to put I/O service-related args in
either the device args or stream args.
2019-11-26 12:21:32 -08:00
Aaron Rossetto
0bd233e642 uhd: Introduce I/O service manager
- Implement I/O service detach link methods
- The I/O service manager instantiates new I/O services or connects
  links to existing I/O services based on options provided by the user
  in stream_args.
- Add a streamer ID parameter to methods to create transports so that
  the I/O service manager can group transports appropriately when using
  offload threads.
- Change X300 and MPMD to use I/O service manager to connect links to
  I/O services.
- There is now a single I/O service manager per rfnoc_graph (and it is
  also stored in the graph)
- The I/O service manager now also knows the device args for the
  rfnoc_graph it was created with, and can make decisions based upon
  those (e.g, use a specific I/O service for DPDK, share cores between
  streamers, etc.)
- The I/O Service Manager does not get any decision logic with this
  commit, though
- The MB ifaces for mpmd and x300 now access this global I/O service
  manager
- Add configuration of link parameters with overrides

Co-Authored-By: Martin Braun <martin.braun@ettus.com>
Co-Authored-By: Aaron Rossetto <aaron.rossetto@ni.com>
2019-11-26 12:21:32 -08:00
Martin Braun
fcc2e9c602 uhd: Replace boost::function with std::function
This is mostly a search-and-replace operation, with few exceptions:
- boost::function has a clear() method. In C++11, this is achieved by
  assigning nullptr to the std::function object.
- The empty() method is replaced by std::function's bool() operator
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
c256b9df65 x300/mpmd: Port all RFNoC devices to the new RFNoC framework
Co-Authored-By: Alex Williams <alex.williams@ni.com>
Co-Authored-By: Sugandha Gupta <sugandha.gupta@ettus.com>
Co-Authored-By: Brent Stapleton <brent.stapleton@ettus.com>
Co-Authored-By: Ciro Nishiguchi <ciro.nishiguchi@ni.com>
2019-11-26 12:16:25 -08:00
Martin Braun
600640ddf1 lib: adf535x: Add trace logs for synth configuration 2019-11-26 11:49:12 -08:00
Martin Braun
4bbbedbb7e lib: Replace uhd::get_system_time() with steady_clock
Benchmarks show that using C++ chrono features beats
uhd::get_system_time(), and the latter is simply not appropriate unless
a uhd::time_spec_t is required.
2019-11-26 11:49:12 -08:00
Mark Meserve
153713a56e max287x: improve logging
- Split tuning log into 3 lines
- Remove duplicated MAX287X
2019-06-12 16:22:04 -07:00
Mark Meserve
bd2c992cda adf435x: run clang-format 2019-05-07 16:30:36 -07:00
Mark Meserve
b1954e6fbe adf435x: add low spur tuning mode
- adds a new mode to the adf435x driver which provides general spur performance
  improvements
2019-05-07 16:30:36 -07:00
Mark Meserve
47c2ba9054 adf535x: add charge pump control 2019-05-02 14:36:21 -07:00
Mark Meserve
5645c3117a adf435x: add charge pump with double parameter 2019-05-02 14:36:21 -07:00
Mark Meserve
b2dd1655de adf435x: enhance logging messages 2019-05-02 14:36:21 -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
Martin Braun
4047f692d4 include: max287x: Fix conversion warning 2019-02-28 10:24:52 -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
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
Brent Stapleton
8bd7498ed9 uhd: skip formatting misc arrays, maps, etc.
Various data structures are nicely formatted to be human-readable.
clang-format makes these structures harder to read, so we can skip
formatting these sections.
2019-01-16 11:40:23 -08:00
Michael West
348ae82ccc TwinRX: Fix tuning
- Set SPI clock back to 3 MHz
- Fix returned frequency for ADF5355 (rev A and B boards)
2019-01-02 15:51:09 -08:00
michael-west
535b21c402 TwinRX: Enable phase resync on ADF535x 2018-12-10 19:14:18 -08:00
michael-west
d82d21246d TwinRX: Tuning improvements
- Added delay for VTUNE calibration as per ADF5355 and ADF5356 data sheets
- Increased SPI clock to 10 MHz
- Removed write to register 10 during tuning of ADF5356 to match ADF5355 code and reduce tune time
2018-12-10 19:14:18 -08:00
Mark Meserve
1d5553317c twinrx: revise adf5356 frac2 register calculation
- If FRAC2 isn't exactly FRAC1 at certain frequencies, drifting spurs can
  be seen in the spectrum
2018-10-17 18:08:26 -07:00
Mark Meserve
f7d3cf84a5 lmx2592: add spur dodging 2018-10-17 15:15:12 -07:00
Martin Braun
57079accbb b100: Move fifo_ctrl_excelsior to b100 subdir
This device is the only one using it, and no one will ever use it going
forward.
2018-07-31 10:11:22 -07:00
Brent Stapleton
300a5e3f6e mpm: initial commit of E320 code
Co-authored-by: Sugandha Gupta <sugandha.gupta@ettus.com>
2018-07-18 15:37:27 -07:00
Martin Braun
4bbde64c70 fixup! e300: merge files from rfnoc-devel 2018-07-06 12:10:53 -07:00
Trung N Tran
ba5722f613 e300: merge files from rfnoc-devel
This disables the ability to do "network mode" on the E310.
2018-06-29 14:20:44 -07:00
Sugandha Gupta
67b5827fae ad9361: Add API to set 1R1T/2R2T timing modes
LVDS interface can support both timing modes 1R1T/2R2T
The API sets the required bit in catalina registers.
2018-06-15 16:37:03 -05:00
Derek Kozel
3615873fee uhd: Added LMX2592 driver 2018-05-03 11:30:34 -07:00
Martin Braun
0303f1ed55 lib: Purge all references to boost::this_thread::sleep()
Replace with std::this_thread::sleep_for().
2018-04-30 17:10:26 -07:00
Vidush
2ef60a1b66 ad9361: Fix bandwidth warnings and ranges
Allows full bandwidth range to user.

Reviewed-by: Michael West <michael.west@ettus.com>
Reviewed-by: Martin Braun <martin.braun@ettus.com>
2018-04-27 11:23:59 -07:00
Martin Braun
fb1b7b7868 ad936x: De-boostify ad936x_manager, minor cleanup
- Remove all use of boost::bind and boost::function
- Demote some log messages to DEBUG
- Change some formatting to match coding guidelines
- B2xx/E310: Match changes in loopback function
2018-04-26 13:14:47 -07:00
Martin Braun
d4eaee390d lib: move atomic.hpp and system_time.hpp to uhdlib 2018-04-06 18:39:11 -07: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