Commit graph

155 commits

Author SHA1 Message Date
Martin Braun
7d69dcdcc3 Remove proto-RFNoC files
This commit removes all files and parts of files that are used by
proto-RFNoC only.

uhd: Fix include CMakeLists.txt, add missing files
2019-11-26 12:16:25 -08:00
Brent Stapleton
23f4f8cf4e rfnoc: Add multi_usrp_rfnoc, modify multi_usrp
This adds a separate version of multi_usrp for RFNoC devices. It is
compatible with RFNoC devices only, and prefers C++ APIs over property
tree usage. The factory of multi_usrp is modified such that it picks the
correct version, users of multi_usrp don't care about this change.

This also introduces some API changes:
- Removing redundant GPIO functions. Now all GPIO control, setting, and
  readback is done with uint32_t's.
- Adding getter/setter for GPIO source. This was done to simplify the
  other GPIO settings, as the source for each pin is not always a
  binary. The CTRL mode, for example, can either be ATR or GPIO.
  However, the source can be controlled by various radios or "PS" or
  some other source.
- Removing the mask from the RFNoC radio controllers' set_gpio_attr().
- Adding state caching to gpio_atr_3000, and a getter for it. Whenever
  an attribute is set, that value is cached, and can now be retreieved.
- Remove low-level register API. Since UHD 3.10, there is no USRP that
  implements that API.
Modifying the filter API in the following ways:
- Splitting filter API getter/setter/list into separate RX and TX
  functions
- Adding channel numbers as an argument
- The filter name will no longer be a property tree path, but rather a
  filter name. For RFNoC devices, this will take the form
  `BLOCK_ID:FILTER_NAME`. For non-RFNoC devices, this will just be the
  filter name (e.g. `HB_1`)
- Removing search mask from listing function. Users can do their own
  searching

Co-Authored-By: Martin Braun <martin.braun@ettus.com>
2019-11-26 11:49:42 -08:00
Martin Braun
8aaf42a280 utils: soft_register: Remove 16-bit mode
This mode is never used, and makes it more cumbersome to maintain this
code.
2019-11-26 11:49:09 -08:00
Martin Braun
2ed94af772 uhd: Remove deprecated objects and methods
This removes the following symbols:
- otw_type_t
- clock_config_t
- Any functions that use those symbols
- Non-standard args from examples (e.g., --total-time is deprecated in
  favour of --duration)
2019-11-26 11:49:08 -08:00
Brent Stapleton
6b26ddcfc3 multi_usrp: Fix typo in get_user_settings_iface() 2019-08-19 18:25:06 -07:00
Michael West
1256821f3e X300: Add recovery for duplicate IP addresses in EEPROM
- Limit initialization to ZPU communication if recover_mb_eeprom=1 is
set in device args.
2018-10-25 09:57:16 -07:00
Martin Braun
b66f3701a7 multi_usrp: Add sync_source API
The sync_source API is an atomic setter for all sync-related settings.
If supported by the underlying USRP, it can be faster to call
set_sync_source() rather than sequentially calling set_clock_source()
and set_time_source().
If the underlying device does not support the sync_source API, it will
fall back to the set_clock_source() and set_time_source() APIs, making
this change backward-compatiple.
2018-10-11 17:54:23 -07:00
Andrew Lynch
72a21ba84c multi_usrp: move definition of constants
ALL_MBOARDS and ALL_CHANS will be exported on GCC and MSVC
2018-10-04 06:15:04 +02:00
Martin Braun
d0e8f4effa multi_usrp: Add get_user_settings_iface() API call
For USRPs that support user settings (e.g., B2xx, N230), this will
return an object that will allow peeking and poking user-defined
settings registers.
Mock code example:

    auto usrp = multi_usrp::make(...);
    auto user_settings_iface = usrp->get_user_settings_iface();
    user_settings_iface->poke32(0, 23);
2018-08-16 11:40:48 -07:00
Brent Stapleton
34f99a7734 fixup! uhd: Warn when tuning with auto DSP frequency and an external LO
Check for ALL_LOS in the property tree before checking if its set to
external. This warning is only applicable to the TwinRX, so its fine to
only look for the ALL_LOS property.
2018-07-18 16:21:08 -07:00
Martin Braun
de4545ed4f multi_usrp: Fix get_usrp_tx_info() for MPMD devices 2018-07-17 10:44:18 -07:00
Derek Kozel
b39358f490 uhd: Expose DC Offset range via multi_usrp interface 2018-07-11 10:12:03 -07:00
Derek Kozel
8262797545 uhd: Warn when tuning with auto DSP frequency and an external LO
In LO sharing cases this can result in frequency errors between
channels.
2018-07-10 11:35:19 -07:00
Martin Braun
3964021e97 multi_usrp: Check for existence of mboard sensor names
get_mboard_sensor_names() would crash if a USRP didn't actually have at
least one sensors defined.
2018-05-17 17:25:43 -07:00
Michael West
02638afb18 UHD: Fix get_usrp_?x_info 2018-05-15 11:44:16 -07:00
Martin Braun
38a7fa64f4 lib: Remove some unnecessary use of boost::posix_time
Replace by std::chrono.
2018-05-14 17:24:19 -07:00
Trung N Tran
bcad3f377c multi_usrp: Update get_usrp_?x_info()
In MPM devices, daughterboard EEPROMs now use eeprom_map_t instead of
dboard_eeprom_t.  The eeprom also is under rfnoc path.
This change will allow ?x_info() to reach that rfnoc path and pull
information from the new eeprom_map_t.
2018-05-01 08:55:08 -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
Martin Braun
1d0c25ef7d multi_usrp: Add API call to query the clock rate range 2018-04-03 17:03:14 -07:00
Martin Braun
a29f7da507 multi_usrp: Refactor gpio_attr methods
- Fix indentation issues
- Fix inconsistent formatting
- Fix typos in user-facing messages
- Fix inconsistent exception messages
- Apply coding guideline formatting rules
- Remove some code duplication
2018-03-30 12:44:25 -07:00
Trung N Tran
4844f66dcc fixup! usrp: Add set_gpio_attr overload that use string
set_gpio_attr did not return after completion. This leads to wrong error
reporting.
2018-03-14 16:42:44 -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
Martin Braun
594030c1af uhd: Move some gpio_defs constants definitions out of headers
Reviewed-by: Trung Tran <trung.tran@ettus.com>
2018-02-27 09:52:19 -08:00
Trung N Tran
21cc92016c usrp: Add set_gpio_attr overload that use string
1/ multi_usrp.hpp; multi_usrp.cpp: added new functions
       - set_gpio_attr() that allow user to set certain attribute by string
         value.
       - get_gpio_string_attr() return string type value of certain attribute.
 2/ gpio_defs.hpp; gpio_atr_3000.cpp : added new definition of SRC attribute.
 This commit enable user to use multi_usrp api to set_gpio_attr using string
value. This is helpful; because the attribute can represent more than two state
as of old API. This enable user to set SRC (source) that drive each GPIO bank's
pin. Source can be either processing unit(PS) or radio frontend logic from FPGA
logic.
2018-02-21 16:59:46 -08: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
58257d749d multi_usrp: Fix compiler warnings
Also elevated a UHD_LOG_ERROR() to an exception.
2018-01-16 18:27:12 -08:00
Trung N Tran
5e265ad175 usrp: add multiusrp api for gain profile. 2018-01-12 16:26:03 -08:00
Martin Braun
4f948e2c8b Move all license headers to SPDX format. 2017-12-22 10:45:51 -08:00
Martin Braun
77adcffe06 multi_usrp: Expose APIs for TX LO controls
Reviewed-By: Ashish Chaudhari <ashish@ettus.com>
Reviewed-By: Derek Kozel <derek.kozel@ettus.com>
2017-12-06 10:59:28 -08:00
Martin Braun
47cdd6319c uhd: Replaced many lexical_cast with appropriate C++11 equivalents 2017-06-29 13:40:07 -07:00
Martin Braun
3e7403db5d multi_usrp: Added more checks for properties that may not exist 2017-05-15 13:55:47 -07:00
Martin Braun
2790b51f30 Merge branch 'maint' 2017-04-13 15:33:03 -07:00
Derek Kozel
b59d5407dc UHD: Fix get_normalized_tx_gain in multi_usrp 2017-04-09 15:35:45 -07:00
Martin Braun
af75b87e51 logging: Demoted a number of DEBUG messages to TRACE 2017-04-05 23:18:08 -07:00
Ashish Chaudhari
15d9c6850c multi_usrp: Removed ordering req. from prop_tree path access
- Path getters for mboard, rx_dsp and tx_dsp concat the numeric
  channel to the tree path instead of indexing a list. This allows
  for easier multi threaded tree construction because values
  can be placed in the tree in a random order.
2017-04-05 17:16:31 -07: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
37b3b32c07 rfnoc: legacy_compat gets its own set_{rx,tx}_rate() calls
This avoids double-calling subscribers, and will fix the case where a
rate change in a multi-channel scenario will break because the graph
resolution is done before all rates are set.
2016-12-09 11:24:29 -08:00
Martin Braun
0d42e86098 rfnoc: legacy_compat gets its own set_{rx,tx}_rate() calls
This avoids double-calling subscribers, and will fix the case where a
rate change in a multi-channel scenario will break because the graph
resolution is done before all rates are set.
2016-11-29 08:48:51 -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
90a2ce4432 UHD: Fixed the max link warning for the case where there are multiple motherboards 2016-10-05 14:36:17 -07:00
Martin Braun
33b6951524 multi_usrp: Fixed compiler warning on read_register 2016-08-11 11:18:00 -07:00
Martin Braun
3bf4b000f7 Merging RFNoC support for X310 2016-08-09 12:42:52 -07:00
Derek Kozel
560e664199 Improve LO APIs for daughterboards without configurable LOs 2016-08-09 10:21:41 -07:00
Derek Kozel
1137dc4726 Coerces dsp frequency to 0 if any channel uses an external LO 2016-08-09 10:19:30 -07:00
Derek Kozel
b4412c79c0 multi_usrp: Added LO control API 2016-07-19 09:28:03 -07:00
Ashish Chaudhari
e4c9656ac2 usrp3: Added new GPIO ATR 3000 core
- Refactored GPIO ATR definitions
- Added new 3000 core with a more efficient API
- Added a separate db_gpio_atr core to control the ATR bus
- Ported b2xx, e3xx and x3xx to the new core
- Minor cleanup
2015-09-29 15:53:43 -07:00
Martin Braun
0975f65da5 b200, multi_usrp: More consistent messages regarding auto MCR 2015-09-17 16:45:41 -07:00
Nicholas Corgan
7e476226e6 multi_usrp: comment out for-now unused function to remove warning 2015-08-14 12:30:53 -07:00
Martin Braun
60394a7092 multi_usrp: Disabled tuning message 2015-08-12 18:08:53 -07:00