aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard
Commit message (Collapse)AuthorAgeFilesLines
...
* TwinRX: Spur cleanupmichael-west2021-02-042-10/+33
| | | | | | | | | | - 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>
* uhd: Split radio_control into rf_control interfacesLane Kolbly2021-01-114-56/+7
| | | | | | These rf_control interfaces allow easier implementation of radio controls as well as allowing easier sharing of code for implementing e.g. gain_profile.
* fixup! N310: Low band IF adjustmentsmichael-west2020-12-091-1/+1
|
* N310: Low band IF adjustmentsmichael-west2020-11-161-18/+10
| | | | | | | - Put ADF4351 at fixed integer-n mode IF freq - Set ADF4351 in low noise mode Signed-off-by: michael-west <michael.west@ettus.com>
* n310/n300: Allow gain coercionMartin Braun2020-10-091-2/+14
| | | | | | | | | | | | The N310 had a different behaviour from other devices, where setting a gain out of range would cause an assertion error. This is problematic for two reasons: 1) Assertion errors should not be triggered by public APIs (if we throw public APIs, we should give a clear error message), and 2) Setting gain and frequency has a coercing behaviour on all other devices. This changeset clips the gain before calling into the gain table lookup.
* E3xx: Add retry to loopback_self_testmichael-west2020-09-111-27/+46
| | | | | | | | | The loopback test sometimes fails. It was found that it would pass on a retry. The root cause of the failure is unknown at this time, but the retry allows the test to pass. This is intended as a temporary patch until the root cause of the failure can be identified. Signed-off-by: michael-west <michael.west@ettus.com>
* uhd: Disable optimizations for Mac for build speedSteven Koo2020-08-121-0/+9
| | | | | twinrx_gain_tables takes long time to build with optimizations on macOS / Clang. Turn them off for this platform.
* x300: change default dboard clock rate from 50 to 100 MHzmattprost2020-08-043-37/+89
| | | | | | | | | | | | | | This sets the reference clock for X300 daughterboards (other than UBX) to 100 MHz by default to improve RF performance. Note: The UBX daughterboard requires a clock rate of no more than the max pfd frequency (50 or 25 MHz depending on the hardware rev) in order to maintain phase synchronization. If a UBX daughterboard is present on the X300, the clock rate for all daughterboards will be set to the pfd frequency by default. This is because of the limitation on X300 that requires the daughterboards to use the same clock rate. Signed-off-by: mattprost <matt.prost@ni.com>
* e3xx: Remove superfluous commentsMartin Braun2020-07-081-11/+0
| | | | This removes some comment that include code that still gets executed.
* twinrx: Provide power cal IDMartin Braun2020-05-193-0/+19
| | | | | | | | | | | | | | | | | | Note that the TwinRX has a different behaviour if two or one channel are enabled. For that reason, TwinRX requires 8 different sets of calibration data: - For one vs. two channels - For channel 0 and channel 1 - For RX1 and RX2 Since every combination of these settings is possible, that results in 2^3 == 8 combinations. The choice of RX1 vs. RX2 is encoded in the calibration key. The choice of one vs. two channels is also encoded in the calibration key, and is derived using an expert node. Channel 0 and 1 are assumed symmetric, thus, the encoding for those happens in the calibration serial.
* basic/lf: Add IDs for calibration purposeMartin Braun2020-05-191-0/+4
| | | | | | | | This adds a property tree node "id" next to the "name" node. It is always either basicrx/lfrx/basixtx/lftx based on the daughterboard. The x300_radio_control uses this to help distinguish daughterboards for calibration's sake, where length strings, potentially with special characters, are too unwieldy.
* uhd: Fix infinite recursion in N3xx timed commandsCiro Nishiguchi2020-05-124-31/+0
| | | | | | The implementation of set_command_time was calling wb_iface set_time, which in turn makes a recursive call to set_command_time. This removes the erroneous recursive call.
* rh: Remove compiler warningMartin Braun2020-04-171-2/+4
| | | | | | | | | Adds UHD_UNUSED() to tag variables that is only used in a UHD_LOG_TRACE() macro. Note this would be also be possible by tagging the local functions {rx,tx}_band_to_log as unused, but g++ does not support that specific kind of attribute, at least in the current versions.
* x300: lf/basic antenna API implementationmattprost2020-03-232-74/+150
| | | | | | | | | | | | | | | | This results in a change of operation for LF/Basic Boards on X300/X310 devices. The RX streaming mode will now be specified by the antenna rather than the subdev: (AB or BA for complex streaming, and A or B for real-mode streaming, with AB being the default antenna value). For real-mode streaming, data is collected as complex data with zeroed-out values in the quadrature domain. The subdevs for these boards have been changed to 0 and 1 for the RX channels, and 0 for the TX channel, in order to align with subdev specs of other RFNoC devices. Note: the old streaming mode paradigm is still in place for the N210.
* uhd: Apply clang-format against all .cpp and .hpp files in host/Martin Braun2020-03-0354-5008/+6006
| | | | | Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against.
* uhd: fixing MSVC warningsBrent Stapleton2020-01-092-2/+9
| | | | | | | | | | | 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
* e31x: Fix filter bank and antenna switching for channel 0Sugandha Gupta2019-12-023-43/+60
| | | | | | The filter bank and antenna switches have different configuration for channel 0 and channel 1. This commit fixes the issue where channel 0 produces only noise due to incorrect switches.
* mg: Turn the set-lock into a recursive mutexMartin Braun2019-11-262-15/+15
| | | | | Individual API calls might have to call each other (e.g., like set_rate() will call set_rx_frequency()), which would cause a deadlock.
* mg: Always set MCR on both daughterboardsMartin Braun2019-11-263-12/+33
| | | | | | | | | | | | | | | | | The N310 cannot set the MCR for its daughterboards separately. This patch modifies the radio block controller such that any block controller, when requested to change the master clock rate, will first change Radio 0, and then Radio 1. This fixes the following issues: - In multi_usrp, calling set_master_clock_rate() will not necessarily call set_rate() on the radios in any particular order, which will break when calling Radio 1 first - In RFNoC apps, it wasn't possible to run off of slot B alone without this change. Note: When calling set_rate() on one radio, the other radio is in an invalid state until its set_rate() is also called.
* n310: Fix GPIO registersMartin Braun2019-11-261-3/+6
| | | | | This enables the use of the dboard and FP GPIOs. The problem was that the register offset of 8 was not encoded.
* mg/rh/rfnoc: Harmonize peripheral registersMartin Braun2019-11-263-18/+29
| | | | | - Move the SPI addresses out of radio_control_impl - Fix the GPIO address spaces for N310/N300
* e310: Fix issues in MPM and UHDMartin Braun2019-11-261-7/+3
| | | | | | | | | | | - Remove superfluous INFO logging - Improve formatting in many places - Improve Pylint score in various places - Add tear_down to DB object - Simplify custom EEPROM code for E310 - Fix time source selection code - Remove references to GPS_CTRL and GPS_STATUS (are E320 only) - Move clock source control out of MboardRegs object
* uhd: Remove all usages of boost::tuple and friendsMartin Braun2019-11-261-3/+3
| | | | | | | | | | | | | This replaces all of the following with standard C++ features: - boost::tuple - boost::make_tuple - boost::tuple::get - #include <boost/tuple/tuple.hpp> All usages were replaced with search-and-replace scripts (the usages of get could be automatically replaced with a vim macro, the rest was straightforward search-and-replace).
* uhd: Replace all occurrences of boost::bind with std::bindMartin Braun2019-11-2618-169/+177
| | | | | | | | | | | | | | | | | | | | | 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.
* uhd: Replace usage of boost smart pointers with C++11 counterpartsMartin Braun2019-11-2610-19/+21
| | | | | | | | | | | | | | | | | | | 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.
* Remove proto-RFNoC filesMartin Braun2019-11-2610-1269/+1
| | | | | | | This commit removes all files and parts of files that are used by proto-RFNoC only. uhd: Fix include CMakeLists.txt, add missing files
* x300/mpmd: Port all RFNoC devices to the new RFNoC frameworkMartin Braun2019-11-2639-5923/+5956
| | | | | | | 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>
* twinrx: Make gpio_iface a wb_iface (was: timed_wb_iface)Martin Braun2019-11-261-11/+2
| | | | | This completely eliminates the need for cmd_time_ctrl in the TwinRX codebase, reducing the number of dependencies on the X300 codebase.
* rfx: Fix calculation of prescaler and band selectMartin Braun2019-11-221-15/+22
| | | | | | | | | | | | | | The code was broken when converting from BOOST_FOREACH to a range-based for loop. Without this fix, the board initialization would crash with an error like this: [ERROR] [DBMGR] The daughterboard manager encountered a recoverable error in init. Loading the "unknown" daughterboard implementations to continue. The daughterboard cannot operate until this error is resolved. LookupError: KeyError: key "0" not found in dict(i, N14adf4360_regs_t17prescaler_value_tE)
* e31x: Remove spurious debug logsMartin Braun2019-11-211-7/+5
| | | | | This demotes INFO logs to TRACE that relate to the switch settings during tuning.
* rh: Add missing includes in rhodium_cpld_ctrl.hppMartin Braun2019-10-111-2/+4
|
* n320: updated rhodium dboard mcr initializationnitest2019-10-101-1/+2
| | | | | db0 is used as the master for driving the radio path and must be the dboard used to set the master clock rate.
* mg: Allow for timeout on retuneMartin Braun2019-08-223-1/+19
| | | | set_freq() calls now have a 15 seconds timeout.
* n310: add capability to control RF filter bypass and freq.band limitsThomas Vogel2019-07-246-39/+133
| | | | | | | | | | | | | | | | | | With the keywords "rx_gain_profile", "tx_gain_profile" and the new values "default_bypass_always_off" and "default_bypass_always_on" the customer can control whether the filter bypass shall be applied as defined in the gain-table or whether to switch the bypass to ON or OFF for all gains. With the keywords "rx_band_map" and "tx_band_map" the user can define custom frequency borders for the band mapping. These new keywords can be used in the uhd.con, e.g.: [type=n3xx] rx_gain_profile=default_bypass_always_off tx_gain_profile=default_bypass_always_on rx_band_map=431e6;601e6;1051e6;1601e6;2101e6;2701e6 tx_band_map=723.18e6;1623.18e6;3323.18e6
* sbx: Only update ATRs when lock state changesMartin Braun2019-07-171-5/+7
| | | | | | | The SBX tracks the LO lock state via on-board LEDs. However, querying the LO lock status spawns an update to the entire ATR registers. To reduce the number of register reads/writes, the LO lock status LED is now only updated if it changed.
* ubx: add temperature compensation modeMark Meserve2019-06-121-0/+41
| | | | | | | - This mode defaults to "disabled" (no change from current behavior) - Enabling this mode fixes some instances where the MAX287x would fail to lock when in integer-n mode - Enabling this mode increases the maximum lock time to up to 100ms
* twinrx: increase rev c lo1 charge pump default valueMark Meserve2019-05-281-1/+1
| | | | - This change improves spur performance for the Rev C TwinRX daughterboard
* cmake: Remove superfluous "E300/E320 enabled" messagesMartin Braun2019-05-161-2/+0
|
* twinrx: set lo2 to use new low spur tuning modeMark Meserve2019-05-072-6/+3
|
* twinrx: add lo charge pump propertiesMark Meserve2019-05-025-19/+116
|
* e310/e320: Move E310 to MPM architecture and refactorSugandha Gupta2019-05-0119-877/+1484
| | | | | | | | | | | | - 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>
* uhd: mpm: update all license header w/ "-or-later"Brent Stapleton2019-03-082-2/+2
| | | | Updating all SPDX license identifiers to include "-or-later"
* rh: Fix typo in setting up RX frontendAlex Williams2019-02-271-1/+1
| | | | | | The function for setting up the RX frontend was erroneously looking at previous TX settings to determine whether to submit a command. This fixes the issue.
* rh: revise correction data usageMark Meserve2019-02-213-11/+19
| | | | | | | | | | - UHD's calibration utilities use the LO frequency, so this is the frequency we should be using too. - Disables loaded corrections in lowband, as the utilities will not generate valid corrections at these frequencies. Manual corrections can still be added via the property tree. - Changed corrections logging to include frequency and less certainty of the correction file's existence.
* rh: reset rx iq balance on initMark Meserve2019-02-211-0/+1
| | | | | - Fixes a bug where a previous setting could carry over between sessions.
* uhd: Replace all usage of boost::noncopyable with uhd::noncopyableMartin Braun2019-02-151-2/+2
| | | | | | 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.
* rh: increase timeout of set_rate's rpc callMark Meserve2019-01-211-1/+4
|
* uhd: mpm: apply clang-format to all filesBrent Stapleton2019-01-1620-2574/+1926
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applying formatting changes to all .cpp and .hpp files in the following directories: ``` find host/examples/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/tests/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/dboard/neon/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/dboard/magnesium/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/device3/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/mpmd/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/x300/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/utils/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find mpm/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file ``` Also formatted host/include/, except Cpp03 was used as a the language standard instead of Cpp11. ``` sed -i 's/ Cpp11/ Cpp03/g' .clang-format find host/include/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file ``` Formatting style was designated by the .clang-format file.
* formatting: remove vim hints in headersBrent Stapleton2019-01-167-7/+0
| | | | | Remove trailing vim hints in header files. This functionality will be replaced by clang-format.
* uhd: skip formatting misc arrays, maps, etc.Brent Stapleton2019-01-164-1/+10
| | | | | | 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.