aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include/uhdlib/usrp/common
Commit message (Collapse)AuthorAgeFilesLines
* uhd: Remove all occurences of boost::math::*round()Martin Braun2021-06-241-2/+2
| | | | | | | Its behaviour is almost identical to std::lround, which we use instead. The only downside of std::lround is that it always returns a long, which we don't always need. We thus add some casts for those cases to make the compiler happy.
* uhd: Add callback for setting sync_sourcesGrant Meyerhoff2021-06-171-0/+4
|
* uhd: Add support for the USRP X410Lars Amsel2021-06-104-7/+273
| | | | | | | | | | | | | | | | Co-authored-by: Lars Amsel <lars.amsel@ni.com> Co-authored-by: Michael Auchter <michael.auchter@ni.com> Co-authored-by: Martin Braun <martin.braun@ettus.com> Co-authored-by: Paul Butler <paul.butler@ni.com> Co-authored-by: Cristina Fuentes <cristina.fuentes-curiel@ni.com> Co-authored-by: Humberto Jimenez <humberto.jimenez@ni.com> Co-authored-by: Virendra Kakade <virendra.kakade@ni.com> Co-authored-by: Lane Kolbly <lane.kolbly@ni.com> Co-authored-by: Max Köhler <max.koehler@ni.com> Co-authored-by: Andrew Lynch <andrew.lynch@ni.com> Co-authored-by: Grant Meyerhoff <grant.meyerhoff@ni.com> Co-authored-by: Ciro Nishiguchi <ciro.nishiguchi@ni.com> Co-authored-by: Thomas Vogel <thomas.vogel@ni.com>
* lib: rpc: Add virtual dtor to RPC iface base classMartin Braun2021-03-171-0/+2
| | | | This avoids more clang compiler warnings.
* host: Update code base using clang-tidyMartin Braun2021-03-171-1/+1
| | | | | | | | | | | | 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 Note: This is the same procedure as 107a49c0, but applied to all the new code since then.
* lib: Add some virtual dtorsMartin Braun2021-03-043-0/+5
| | | | | | | Classes where we call delete (implicitly or explicitly) with a virtual inheritance structure need to declare dtors as virtual. This reduces compiler warnings with clang. There are no known bugs (yet) due to this.
* host: Update code base using clang-tidyMartin Braun2021-03-044-74/+82
| | | | | | | | | 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
* TwinRX: Fix LO lock failuremichael-west2021-02-101-11/+2
| | | | | | | Always write register 6 in the ADF5356. Conditional write was causing the LO not to lock at some frequencies. Signed-off-by: michael-west <michael.west@ettus.com>
* ADF535x: Change freq_resolution to mod2michael-west2021-02-041-22/+24
| | | | | | | | | The freq_resolution parameter to the set_frequency() method was confusing. Changing it to the mod2 value clarifies the intention and makes the math to reduce the FRAC2 and MOD2 values much easier to read and maintain. Signed-off-by: michael-west <michael.west@ettus.com>
* TwinRX: Spur cleanupmichael-west2021-02-041-1/+16
| | | | | | | | | | - Reduce FRAC2 and MOD2 values on ADF5356 - Add write to register 10 and delay during retune on ADF5356 - Make negative bleed conditional on integer or fractional N mode for ADF5356 - Tune unused LOs out of band to remove interference Signed-off-by: michael-west <michael.west@ettus.com>
* Create C++ wrappers for MPM RPC callsLane Kolbly2021-01-112-5/+164
| | | | | | | | | This gives us type-safety, as well as allowing us to create unit tests for RFNoC radio_controls without having to create actual RPC servers and clients in the unit tests. This change also fixes a bug in mpmd_mb_controller::set_sync_source, where it was calling the wrong MPM function.
* twinrx: Bypass adf535x feedback dividermattprost2020-09-031-7/+13
| | | | | | | | 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>
* twinrx: update synthesizer register values for improved rf performancemattprost2020-08-111-11/+28
| | | | | | | | | | | | | 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>
* lib: Add power cal managerMartin Braun2020-05-191-0/+151
| | | | | This is a utility class that can be used by USRP or daughterboard drivers to tie power calibration into their respective drivers.
* uhd: Replace include guards with pragma onceLane Kolbly2020-04-0816-64/+16
| | | | | Pragma once is the more modern version of include guards, eliminating any potential problems with mistyping include guards. Let's use those.
* uhd: cal: Use usrp::cal::database instead of CSV filesMartin Braun2020-04-021-3/+44
| | | | | | | | | 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.
* uhd: Apply clang-format against all .cpp and .hpp files in host/Martin Braun2020-03-0315-633/+604
| | | | | Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against.
* ad9361: Fix formattingMartin Braun2020-02-101-6/+6
| | | | | - Apply clang-format - Remove unnecessary boost::format
* mpm/mpmd: Expose APIs to drive GPIO sourcesMartin Braun2020-01-231-0/+8
| | | | | | | | | | | | | | | | | | | 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.
* uhd: fixing MSVC warningsBrent Stapleton2020-01-092-12/+21
| | | | | | | | | | | 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
* usrp: Add I/O service manager for DPDKCiro Nishiguchi2019-12-201-0/+69
|
* rfnoc: Rename thread affinity argsCiro Nishiguchi2019-11-261-24/+21
| | | | | | 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.
* rfnoc: Merge I/O service device args with stream argsCiro Nishiguchi2019-11-262-3/+18
| | | | | This makes it possible for users to put I/O service-related args in either the device args or stream args.
* uhd: Introduce I/O service managerAaron Rossetto2019-11-262-0/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | - 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>
* uhd: Replace boost::function with std::functionMartin Braun2019-11-264-6/+6
| | | | | | | 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
* uhd: Replace usage of boost smart pointers with C++11 counterpartsMartin Braun2019-11-267-13/+13
| | | | | | | | | | | | | | | | | | | 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.
* x300/mpmd: Port all RFNoC devices to the new RFNoC frameworkMartin Braun2019-11-262-22/+119
| | | | | | | 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>
* lib: adf535x: Add trace logs for synth configurationMartin Braun2019-11-261-0/+18
|
* lib: Replace uhd::get_system_time() with steady_clockMartin Braun2019-11-261-6/+10
| | | | | | 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.
* max287x: improve loggingMark Meserve2019-06-121-7/+12
| | | | | - Split tuning log into 3 lines - Remove duplicated MAX287X
* adf435x: run clang-formatMark Meserve2019-05-071-146/+251
|
* adf435x: add low spur tuning modeMark Meserve2019-05-071-5/+56
| | | | | - adds a new mode to the adf435x driver which provides general spur performance improvements
* adf535x: add charge pump controlMark Meserve2019-05-021-3/+55
|
* adf435x: add charge pump with double parameterMark Meserve2019-05-021-0/+34
|
* adf435x: enhance logging messagesMark Meserve2019-05-021-10/+13
|
* uhd: mpm: update all license header w/ "-or-later"Brent Stapleton2019-03-081-1/+1
| | | | Updating all SPDX license identifiers to include "-or-later"
* include: max287x: Fix conversion warningMartin Braun2019-02-281-1/+1
|
* uhd: Replace all usage of boost::noncopyable with uhd::noncopyableMartin Braun2019-02-152-3/+3
| | | | | | 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.
* math: Replace boost::*::{lcm,gcd}() with portable versionsMartin Braun2019-01-182-6/+4
| | | | | | 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.
* formatting: preparing for uhd::math cleanupBrent Stapleton2019-01-182-370/+450
| | | | Formatting files that will be touched in upcoming changes to uhd::math
* uhd: skip formatting misc arrays, maps, etc.Brent Stapleton2019-01-161-0/+2
| | | | | | 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.
* TwinRX: Fix tuningMichael West2019-01-021-7/+4
| | | | | - Set SPI clock back to 3 MHz - Fix returned frequency for ADF5355 (rev A and B boards)
* TwinRX: Enable phase resync on ADF535xmichael-west2018-12-101-17/+9
|
* TwinRX: Tuning improvementsmichael-west2018-12-101-10/+8
| | | | | | - 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
* twinrx: revise adf5356 frac2 register calculationMark Meserve2018-10-171-1/+1
| | | | | - If FRAC2 isn't exactly FRAC1 at certain frequencies, drifting spurs can be seen in the spectrum
* lmx2592: add spur dodgingMark Meserve2018-10-171-1/+4
|
* b100: Move fifo_ctrl_excelsior to b100 subdirMartin Braun2018-07-311-51/+0
| | | | | This device is the only one using it, and no one will ever use it going forward.
* mpm: initial commit of E320 codeBrent Stapleton2018-07-181-0/+6
| | | | Co-authored-by: Sugandha Gupta <sugandha.gupta@ettus.com>
* fixup! e300: merge files from rfnoc-develMartin Braun2018-07-061-0/+3
|
* e300: merge files from rfnoc-develTrung N Tran2018-06-291-7/+0
| | | | This disables the ability to do "network mode" on the E310.