aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
Commit message (Collapse)AuthorAgeFilesLines
* uhd: cal: Add database classMartin Braun2020-03-263-0/+152
| | | | | | This class contains methods to store and retrieve data from the local calibration database. Note that in this case, the "database" is just a bunch of files on the local filesystem.
* uhd: paths: Add get_cal_data_path() API callMartin Braun2020-03-261-0/+3
| | | | This points to the location where cal data is stored.
* uhd: math: Add linear_interp()Martin Braun2020-03-181-6/+20
| | | | This lets you linearly interpolate between two points.
* utils: Add bool specialization to cast::from_str()Aaron Rossetto2020-03-181-0/+15
| | | | | | | This adds a specialization to `uhd::cast::from_str()` to handle `bool` as a target type and interpret strings like 'y', 'Y', 'n', 'No', 'True', 'False', etc. as Boolean values, as well as the traditional '0' and '1' (which also work).
* tests: Allow custom mock_reg_iface_t in mock blockAaron Rossetto2020-03-131-6/+6
| | | | | | Allow clients to pass a custom instance of a mock_reg_iface_t for use with mock_block_container. This is especially useful when a block test subclasses mock_reg_iface_t to implement specialized behaviors.
* multi_usrp: Provide valid return value for multi_usrp::get_device()Martin Braun2020-03-122-5/+21
| | | | | | | | | | | | For RFNoC devices, multi_usrp::get_device() no longer returns a device pointer, rather, it returns a nullptr. This is intentional because access to the underlying device is no longer allowed. However, legacy code can segfault (e.g. portions ofr gr-uhd). This patch returns a faux uhd::device class, which almost mimicks the original behaviour perfectly, by redirecting its class methods back to multi_usrp_rfnoc. The only exception is recv_async_msg(), which requires a TX streamer. This function will always return false now.
* uhd: Apply clang-format against all .cpp and .hpp files in host/Martin Braun2020-03-0338-137/+196
| | | | | Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against.
* rfnoc: actions: Cleanup rx_event_action_info ctorsteviez2020-02-181-4/+4
| | | | | Set error code member variable in rx_event_action_info constructor instead of relying on the caller to set it after object creation
* rfnoc: actions: Fix uninitialized timestampssteviez2020-02-181-2/+5
| | | | | | tx_event_action_info objects were being created with uninitialized timestamp members which led to uhd::tx_streamer::recv_async_msg() returning with invalid timestamps
* thread: Fix formatting in thread utilitiesMartin Braun2020-02-101-3/+3
| | | | | - Apply clang-format - Remove unnecessary boost::format
* lib: utils: Don't use hard-coded path constantsRyan Volz2020-02-071-0/+3
| | | | | | | | | | | | | This replaces the package path constant with a runtime library path lookup. The package path is taken to be the parent directory of the library directory. When boost >= 1.61 is not available, this maintains the current behavior of using CMake to set path contants. Runtime path determination is preferable for making a relocatable library so that it is not necessary to do string substitution on relocated binaries (as with, for example, building a conda package).
* rfnoc: registry: Fix Doxygen for register_block_direct()Martin Braun2020-02-071-0/+12
|
* rfnoc: Update blocks to use autogenerated noc_shellWade Fife2020-02-067-13/+66
|
* octoclock: Change type of EEPROM property to mboard_eeprom_tMartin Braun2020-02-041-1/+2
| | | | | | | | | Before, the type was octoclock_eeprom_t, which was incompatible with mboard_eeprom_t and would cause issues with uhd_usrp_probe. octoclock_eeprom_t is a superset of mboard_eeprom_t, and there is no necessity for exposing the additional features to the public. This harmonizes the Octoclock prop tree with the rest of UHD, and fixes an issue where the Octoclock won't allow uhd_usrp_probe on master branch.
* multi_usrp: Add get_tree() API callMartin Braun2020-02-041-0/+4
| | | | | | This allows access to the underlying property tree without having to refer to the device object. Useful for RFNoC objects, where the device object is not accessible.
* docs: fix typo in stream.hppMichael Dickens2020-01-291-1/+1
|
* rfnoc: Create mock factoryMartin Braun2020-01-291-0/+193
| | | | | | This is an API that allows creating mock block controllers, to write unit tests for block controllers. See rfnoc_blocks_test for an example how to use them.
* multi_usrp: Amend APIs for GPIO source controlMartin Braun2020-01-231-12/+38
| | | | | | | | | | | This adds a new API call to multi_usrp: get_gpio_src_banks(). This returns a list of GPIO banks who's source can be controlled through the motherboard controller. The remaining GPIO source methods' docstrings are improved, to explain the difference between GPIO banks for set_gpio_attr() and set_gpio_src(). The former controls the actual value on a GPIO bank, and the latter who drives it. These can be different banks.
* uhd: fixing MSVC warningsBrent Stapleton2020-01-091-1/+4
| | | | | | | | | | | 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
* rfnoc: fix typosBrent Stapleton2020-01-021-2/+2
| | | | Fixes: 967be2a4e82b ("uhd: mpm: apply clang-format to all files")
* utils: algorithm: Add missing include uhd/config.hppMartin Braun2019-12-051-0/+1
|
* docs: fixing doxygen errors reported during makesteviez2019-12-038-11/+16
|
* rfnoc: Fix RAM port direction in YAMLWade Fife2019-11-269-98/+98
|
* rfnoc: Update YAML to expose memory clock to blocksWade Fife2019-11-268-71/+71
|
* rfnoc: Replace DDC/DUC YAML variants with single versionWade Fife2019-11-264-144/+10
|
* rfnoc: Fix YAML block settingsWade Fife2019-11-2611-278/+199
|
* rfnoc: Add FIR block YAMLWade Fife2019-11-261-0/+61
|
* rfnoc_graph: Modify find_blocks() to sort return valueMartin Braun2019-11-261-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch, the elements of of the return value of find_blocks() are sorted lexicographically (specifically, using uhd::rfnoc::block_id_it::operator<()). The underlying block_container class stores the blocks in an unordered set, so the return value for find_blocks() was always sorted randomly. multi_usrp_rfnoc had to sort the return values every time find_blocks() was used to get a useful return value. Because find_blocks() had no contract for the order of returned blocks, this change simply sorts the return value before returning it. multi_usrp_rfnoc is modified to remove all the sorts that are now superfluous. A good way to see the change is to run uhd_usrp_probe, which will now contain content like this: | _____________________________________________________ | / | | RFNoC blocks on this device: | | | | * 0/DDC#0 | | * 0/DDC#1 | | * 0/DUC#0 | | * 0/DUC#1 | | * 0/DmaFIFO#0 | | * 0/Radio#0 | | * 0/Radio#1 Assuming the blocks don't change, the order of this list will always be the same following this patch. Note that the order is unrelated to the order on the control crossbar, which it never was.
* image builder: Add ability to pick up extra Makefile.srcs from YAMLSMartin Braun2019-11-262-0/+6
| | | | | | | | | | | | | | The blocks that are neither OOT, nor core blocks (like the DDC/DUC, etc.) require additional info to find their appropriate Makefile.srcs files. We don't include them in every build, to avoid building IP for the FFT, FIR, and other blocks when they're not needed. However, those blocks are in-tree, and don't follow the same directory structure as out-of-tree modules, either. We therefore allow the YAML files for those blocks (which are shipped with UHD) to contain a path hint to their appropriate Makefile.srcs. The image builder uses those paths to amend the `make` command appropriately.
* multi_usrp: Add set_rx_spp() callMartin Braun2019-11-261-0/+11
| | | | | | | | This API call is a more explicit way of setting the spp than passing in an spp value in the args of the stream args when creating streamers. For pre-RFNoC devices, this is done by injecting the spp arg back into the stream args. For RFNoC devices, the set_property() call on the radio is called.
* utils: image_builder: Support parameterized number of ports on blocksWade Fife2019-11-261-0/+68
|
* rfnoc: image_builder: Fix -I, allow devices/targets to bet set in YAMLMartin Braun2019-11-261-1/+2
| | | | | | | - The -I switch now allows pointing to an OOT - The image core file may now contain keys 'device' and 'default_target', which the image builder can use as default values. Command line switches --device and --target are still honoured.
* uhd: Replace all occurrences of boost::bind with std::bindMartin Braun2019-11-261-5/+4
| | | | | | | | | | | | | | | | | | | | | 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.
* rfnoc: Adding rfnoc_graph utilitiesBrent Stapleton2019-11-262-0/+69
| | | | | | | Adding graph_utils to keep rfnoc_graph utilities to contain helper function and commonly used algorithms for the rfnoc_graph. These functions aren't core to the rfnoc_graph's functionality, so we'll keep them out of its API.
* transport: Implement eov indications for Rx and Tx streamsAaron Rossetto2019-11-261-8/+48
|
* rfnoc: rename block clocks to ce_clkPaul Butler2019-11-265-15/+15
| | | | | | Renaming the CE clock in the RFNoC block YAML files so that the name is consistent across blocks. Corresponding `fpga` changes can be found in `rfnoc: rename block clocks to ce_clk`.
* uhd: Replace boost::function with std::functionMartin Braun2019-11-2611-31/+35
| | | | | | | 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 BOOST_FOREACH(v, c) with for(v : c)Martin Braun2019-11-264-29/+24
| | | | | Also removes all references to boost/foreach.hpp. BOOST_FOREACH is no longer necessary since all headers require C++11 anyway.
* uhd: Replace usage of boost smart pointers with C++11 counterpartsMartin Braun2019-11-2641-111/+107
| | | | | | | | | | | | | | | | | | | 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.
* uhd: Check property type at access; error if mismatchAaron Rossetto2019-11-262-3/+12
|
* rfnoc: Add DRAM support to E320Wade Fife2019-11-261-0/+3
|
* rfnoc: Port FFT controllerLars Amsel2019-11-263-0/+109
| | | | | | rfnoc used noc-script for FFT controller implementation. Because erfnoc does not support noc-script yet, the implementation is done as a rfnoc controller.
* rfnoc: Add DMA FIFO block controllerMartin Braun2019-11-265-0/+510
|
* Remove proto-RFNoC filesMartin Braun2019-11-2692-6387/+51
| | | | | | | 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-268-0/+238
| | | | | | | 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>
* rfnoc: Add radio_1x64Martin Braun2019-11-262-3/+25
|
* rfnoc: radio: Add API call to disable timestampsMartin Braun2019-11-261-0/+4
| | | | | By calling radio_control::enable_rx_timestamps(false, chan), the radio will not add timestamps to outgoing packets.
* rfnoc: Add multi_usrp_rfnoc, modify multi_usrpBrent Stapleton2019-11-262-140/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* rfnoc: Allow MB controllers to init after blocks have initializedMartin Braun2019-11-262-10/+76
| | | | | | | | | | | | | | | | | | | | | This allows mb_controller childs to implement an init() call which rfnoc_graph will call after the block initialization is complete. rfnoc: graph/mb_controller: Add synchronization routine This adds two new API calls: * rfnoc_graph::synchronize_devices() and * mb_controller::synchronize(). The purpose is to synchronize devices in time and/or phase, depending on device capabilities. mb_controller childs can override or extend the default implementation, which is to simply set time next PPS and verify (similar to the set_time_unknown_pps() call in multi_usrp). rfnoc: mb_controller: Add gpio_src API Adds new API calls (get_gpio_src, get_gpio_srcs, set_gpio_src, get_gpio_banks) to mb_controllers
* rfnoc: Use adapter_id_t for balancing load across linksAlex Williams2019-11-262-24/+19
| | | | | | | Since the mb_iface allocates local device IDs, also have it track the associated adapter IDs and provide a facility to retrieve them. Incorporate the adapter IDs in the user API to select the adapter for streamers.