aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/usrp2_impl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* uhd: Remove all occurences of boost::math::*round()Martin Braun2021-06-241-2/+1
| | | | | | | 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.
* usrp2: Use explicit template type for std::min<T>StefanBruens2021-06-221-1/+1
| | | | Signed-off-by: Aaron Rossetto <aaron.rossetto@ni.com>
* usrp2: Replace boost::math::iround/math::sign with std::lroundStefanBruens2021-06-221-5/+5
| | | | | | | | | Instead of multiplying zone with the sign repeatedly just make the zone a signed value. See #437, #438 Signed-off-by: Aaron Rossetto <aaron.rossetto@ni.com>
* usrp2: Apply minor cleanups to Boost usage in usrp2Martin Braun2021-06-181-9/+8
| | | | | | | - Inconsistent usage of asio:: or boost::asio:: (now uses the latter consistently) - Removed some usage of boost::format() where it really didn't add any value
* usrp2: Fix Boost headersMartin Braun2021-06-171-2/+2
| | | | | | | | | On Boost 1.76, this would otherwise fail with an error: [...] .../usrp2_impl.cpp:920:37: error: ‘boost::math’ has not been declared 920 | const int sign = boost::math::sign(new_freq); [...]
* mpmd: Skip find if "resource" key is specifiedmichael-west2021-02-111-4/+1
| | | | | | | | | | | 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>
* lib: disable non pcie types in find with resourceSteven Koo2020-10-051-1/+4
| | | | | | | 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.
* uhd: clang format device implSteven Koo2020-10-051-1/+1
|
* uhd: Apply clang-format against all .cpp and .hpp files in host/Martin Braun2020-03-031-506/+593
| | | | | Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against.
* uhd: Replace all occurrences of boost::bind with std::bindMartin Braun2019-11-261-46/+44
| | | | | | | | | | | | | | | | | | | | | 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.
* lib: Purge use of boost::assign, except for uhd::dictMartin Braun2018-05-021-4/+6
| | | | | | | Replaced with initialization lists. Note: uhd::dict does not work with initializer lists without making changes to said data structure. This commit has no functional changes, so keeping the boost::assigns for uhd::dict.
* usrp2: Re-add ability to modulate in the DACMartin Braun2018-03-281-7/+73
| | | | | | | | | | | This partially reverts b29e80cc. That commit fixed a bug with numerical overflows, but also removed the ability to tune using the DAC, effectively reducing the DSP tuning range. This commit allows to tune within +/- 200 MHz using a combination of both the DAC and the DSP tuning in the FPGA. Reviewed-by: Derek Kozek <derek.kozel@ettus.com>
* uhd: Move internal headers to uhdlib/Martin Braun2018-03-141-1/+1
| | | | | | | | | | | | | | | | 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>
* uhd: Update license headersMartin Braun2018-02-191-1/+1
| | | | | | | All copyright is now attributed to "Ettus Research, a National Instruments company". SPDX headers were also updated to latest version 3.0.
* Move all license headers to SPDX format.Martin Braun2017-12-221-12/+1
|
* UHD: Add eeprom info to dboard_basemichael-west2017-12-071-2/+2
|
* uhd: Changed mboard_eeprom_t interface, refactored MB EEPROM codeMartin Braun2017-09-291-5/+2
| | | | | | | | | | | | - uhd::usrp::mboard_eeprom_t is now simply a map. Its commit() method has no utility being a public API call, because the user never gets access to the appropriate I2C object (Minor API breakage) - The central mboard_eeprom.cpp file was broken up and put into many smaller compilation units in every device's implementation folder. - Renamed some of the constants (e.g. B000_* -> USRP1_*, N100_* -> N200_*) - Removed the N000_* EEPROM code, because, well, you know, there's no such device
* uhd: Replaced many lexical_cast with appropriate C++11 equivalentsMartin Braun2017-06-291-5/+4
|
* uhd: tasks now use std::threads under the hood, and can't be interruptedMartin Braun2017-06-281-1/+3
| | | | | USRP1 and USRP2 used tasks that relied on Boost thread interruption mechanisms. These were replaced with explicit atomics.
* logging: Demoted a number of DEBUG messages to TRACEMartin Braun2017-04-051-4/+4
|
* utils: introduce new logging API and remove msg APIAndrej Rode2017-02-201-15/+15
|
* uhd: replace BOOST_FOREACH with C++11 range-based for loopAndrej Rode2017-02-101-11/+10
| | | | | Note: This is the first commit that uses for-range, and range-based for-loops are now usable for UHD development.
* Remove all boost:: namespace prefix for uint32_t, int32_t etc. (fixed-width ↵Martin Braun2016-11-081-10/+10
| | | | | | | | 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).
* dboard: Added restricted dboard registration capabilityAshish Chaudhari2016-02-161-3/+2
| | | | | | - Moved dboard iface initialization to dboard_manager - Added a restricted register function. Restricted dboards don't expose their control iface in the property tree
* prop_tree: Multiple API enhancements to uhd::propertyAshish Chaudhari2016-02-111-44/+44
| | | | | | | | | - Added desired and coerced values and accessors to property - Added support to register desired subscribers - set APIs don't reallocate storage for a property value - Renamed callback method registration APIs - Registering 2 coercers or publishers for a property will throw - Registering a coercer and a publisher for the same property will throw
* UHD: Remove initialization of time to GPS time.michael-west2015-08-121-3/+0
|
* Added uhd::image_loader class and uhd_image_loader utilityNicholas Corgan2015-07-151-1/+1
| | | | | | * Single class for loading firmware/FPGA images onto devices instead of multiple utilities * Loading functions are registered for each device, corresponding to their --args="type=foo" name * Deprecation warnings added to all product-specific image loading utilities
* USRP2: Separate FPGA compat numbers for USRP2 and N200.michael-west2015-04-231-2/+23
|
* N2x0: Fixed missing usage of send_buff_sizeMartin Braun2015-03-031-2/+3
|
* uhd: fixing TX DSP tuning on gen2 devices, special changes for n2xxBen Hilburn2014-10-071-25/+2
| | | | This fixes RX DSP core 200 from tuning outside range and causing overflows.
* Merge branch 'maint'Martin Braun2014-09-231-2/+0
|\
| * usrp: don't print duplicate GPSDO detection messagesNicholas Corgan2014-09-231-2/+0
| |
* | Give user the option to ignore daughterboard's calibration file at runtimeNicholas Corgan2014-09-021-2/+7
| | | | | | | | | | * Add "ignore-cal-file" to the uhd::device_addr_t arguments * Added documentation for new feature
* | Merge branch 'maint'Martin Braun2014-08-181-5/+0
|\|
| * - Fixes for channel alignmentmichael-west2014-08-181-5/+0
| | | | | | | | | | | | | | | | | | | | - Added analog delay for radio clock - Added analog delay for DAC reference clocks - Removed resetting of clock control - Removed setting of reference clock and PPS to external sources during initialization - Fixes for set_time_unknown_pps - Removed wait for PPS edge after setting time from GPSDO - Changed set_time_unknonw_pps to time out based on system time rather than device VITA time
* | Merge branch 'maint'Martin Braun2014-07-311-1/+8
|\| | | | | | | | | Conflicts: host/utils/usrp_burn_mb_eeprom.cpp
| * Fix for BUG #492: UHD: set_time_unknown_pps() fails with GPSDO installedmichael-west2014-06-251-1/+8
| | | | | | | | - Added polling for PPS time change after setting time from GPSDO.
* | OctoClock firmware upgrade, added host driverNicholas Corgan2014-07-231-2/+3
|/ | | | | | | | | | * OctoClock can communicate with UHD over Ethernet * Can read NMEA strings from GPSDO and send to host * Added multi_usrp_clock class for clock devices * uhd::device can now filter to return only USRP devices or clock devices * New OctoClock bootloader can accept firmware download over Ethernet * Added octoclock_burn_eeprom,octoclock_firmware_burner utilities * Added test_clock_synch example to show clock API
* Merge remote-tracking branch 'origin/bug403'Ben Hilburn2014-04-101-2/+4
|\ | | | | | | | | Properly initializing time and clock source on N-Series to prevent small drift prior to lock.
| * Fix for BUG #403: Visible frequency drift on Finite Rx with N210 & SBXmichael-west2014-04-081-2/+4
| | | | | | | | - Added initialization of clock and time sources
* | uhd: Added max link rate info for usrp1, usrp2 and b100Martin Braun2014-04-101-0/+1
|/
* Merging USRP X300 and X310 support!!Ben Hilburn2014-02-041-4/+21
|
* usrp2: try/catch for first send of discovery routineJosh Blum2013-08-151-1/+12
| | | | | This send can fail with a network down/unreachable error. The try/catch allows for discovery to continue.
* lfrx: disable dc offset correction when using LFRXJosh Blum2012-09-281-0/+3
|
* n2x0: only check for the GPSDO once after power upJosh Blum2012-06-181-9/+38
| | | | | | We used to only check if the EEPROM was setup properly. But now we always check, but check only once after first power up, and disable the check if not found.
* gpsdo: added "gpsdo" clock and time source optionsJosh Blum2012-05-181-4/+7
| | | | When an on-board GPSDO is detected, "gpsdo" is added to the options.
* usrp: mboard eeprom map use string as keyJosh Blum2012-05-141-1/+1
|
* usrp2: print helpful message with burner commandJosh Blum2012-05-111-2/+3
|
* usrp2: add variable for wb/spi interfaceJosh Blum2012-04-201-12/+25
| | | | | This variable gets set based on the rev type so we can support the command fifo when present.
* Merge branch 'master' into nextJosh Blum2012-03-261-3/+17
|\