aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/cores
Commit message (Collapse)AuthorAgeFilesLines
* gpio_atr_3000: Fix return value for pin control registerMartin Braun2019-11-261-1/+3
| | | | | | | | | | | | | | | This fixes a bug where get_gpio_attr(bank, "CTRL") would return the inverted value of what was written. Reason is that the underlying register was an ATR disable register. The fix is to invert the cached values of the register. Now, the following Python code will work: >>> U = uhd.usrp.MultiUSRP("type=x300") >>> atr_enable = 0xF # Enable ATR on lower 4 pins, rest is GPIO >>> U.set_gpio_attr("FP0A", "CTRL", atr_enable) >>> U.get_gpio_attr("FP0A", "CTRL") == atr_enable True
* uhd: Remove all usages of boost::tuple and friendsMartin Braun2019-11-262-5/+6
| | | | | | | | | | | | | 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-266-23/+23
| | | | | | | | | | | | | | | | | | | | | 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-261-3/+3
| | | | | | | | | | | | | | | | | | | 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.
* rfnoc: Add DMA FIFO block controllerMartin Braun2019-11-261-354/+250
|
* rfnoc: Add multi_usrp_rfnoc, modify multi_usrpBrent Stapleton2019-11-261-12/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* gpio_atr_3000: Formatting changesBrent Stapleton2019-11-261-142/+196
| | | | | | | | Applying clang format for upcoming changes. clang-format -i --style=file host/lib/usrp/cores/gpio_atr_3000.cpp clang-format -i --style=file \ host/lib/include/uhdlib/usrp/cores/gpio_atr_3000.hpp
* cores: gpio_atr_3000: Add capability to configure register offsetMartin Braun2019-11-261-33/+45
| | | | | | The existing implementation assumes registers are spaced 4 bytes apart. In the current radio block design, all backward compatible registers are spaced 8 bytes apart. This adds a feature to configure that offset.
* tx_fe_200: make register offset controllableBrent Stapleton2019-11-261-9/+10
| | | | | | Following the changes in RX frontend controls, TX frontend register offsets are now arguments to the factory function. They default to 4, which is what the register offset was in the file before these changes.
* rx_fe_3000: Changing register address calcBrent Stapleton2019-11-261-18/+29
| | | | | | | | Changing how we calculate RX frontend register addresses to allow for different register offsets. The register addresses are now calculated in a manor similar to how gpio_atr_300_impl does register address calculations, which is to allow a reg_offset to be passes in at construction. The current default is reg_offset=4.
* lib: cores: Adapt spi_core_3000 for use with register_ifaceMartin Braun2019-11-261-49/+80
| | | | | Removes the requirement for a wb_iface, and also the requirement for regs to be 4 addresses apart.
* lib: utils: Add new signature to get_freq_and_freq_word()Martin Braun2019-11-261-0/+8
| | | | | The new signature uses tuple as the return value, instead of passing in output variables as references (C-style).
* rx_fe_3000: formatting for upcoming changesBrent Stapleton2019-08-251-84/+102
|
* cores: Use NSDMI consistently in ?x_dsp_core_3000.*Martin Braun2019-05-222-23/+16
| | | | | | There are edge cases where the lack of initialization of _current_freq could crash libuhd. To resolve this, we initialize all elements of those cores to sensible values using NSDMI.
* cores: Apply clang-format to ?x_dsp_core_3000.*Martin Braun2019-05-222-230/+268
|
* uhd: mpm: update all license header w/ "-or-later"Brent Stapleton2019-03-081-1/+1
| | | | Updating all SPDX license identifiers to include "-or-later"
* cmake: Update coding style to use lowercase commandsMartin Braun2018-11-141-2/+2
| | | | | | | | | | | | | | | | | Also updates our coding style file. Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code (with GNU compliant sed): cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done > convert.sed \ && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' \ '*CMakeLists.txt' | xargs -0 gsed -i -f convert.sed && rm convert.sed (Make sure the backslashes don't get mangled!)
* cores:rx_frontend_core_3000: fix real modeGwenhael Goavec-Merou2018-10-291-0/+2
|
* cores: Update rx_frontend_gen3.v controls for 1/4-rate mixerMartin Braun2018-09-251-7/+11
| | | | | | | This tracks the changes on rx_frontend_gen3.v, which was updated to use a quarter-rate downconverter instead of a generic CORDIC. The X3x0 FPGA compat number is incremented as the rx_frontend is part of the device architecture rather than an RFNoC block.
* fixup! DDC/DUC: switch CORDIC -> DDS for all relevant variable namesmichael-west2018-09-132-12/+12
|
* rfnoc: dma_fifo: Added a more robust flush mechanismAshish Chaudhari2018-08-031-35/+59
| | | | | | | | | - The flushing mechanism now looks similar to that in noc_shell - Make use of new flush bit in FIFO control register - Restrict using the clear bit only after flushing to ensure no partial packets are introduced in the stream. (clear immediately empties out FIFOs) - Changes are backwards compatible with older FPGAs
* uhd: Expose DC Offset range via multi_usrp interfaceDerek Kozel2018-07-113-0/+27
|
* *_dsp_core: Update frequency when updating ratesVidush2018-06-212-0/+16
| | | | | Since the frequency shifter is set to a relative rate, it needs to be updated when changing the sampling rate.
* lib: Purge all references to boost::this_thread::sleep()Martin Braun2018-04-306-14/+20
| | | | Replace with std::this_thread::sleep_for().
* cores: rx_vita_core_3000: Replace boost::this_thread::sleep()Martin Braun2018-04-171-2/+3
| | | | Use std::this_thread::sleep_for() instead.
* cores: Demote some log messages in time coreMartin Braun2018-03-301-2/+6
|
* DDC/DUC: switch CORDIC -> DDS for all relevant variable namesRyan Marlow2018-03-222-12/+12
| | | | - Bump compat number for DDC/DUC to 2.0
* uhd: Move internal headers to uhdlib/Martin Braun2018-03-1443-1158/+30
| | | | | | | | | | | | | | | | 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: Move some gpio_defs constants definitions out of headersMartin Braun2018-02-271-1/+2
| | | | Reviewed-by: Trung Tran <trung.tran@ettus.com>
* usrp: Add set_gpio_attr overload that use stringTrung N Tran2018-02-211-0/+5
| | | | | | | | | | | | | 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.
* uhd: Update license headersMartin Braun2018-02-1943-42/+85
| | | | | | | All copyright is now attributed to "Ettus Research, a National Instruments company". SPDX headers were also updated to latest version 3.0.
* rfnoc: dma_fifo: Minor: Cleaned up log printsAshish Chaudhari2018-01-081-1/+0
|
* Clean up build processMartin Braun2017-12-225-283/+21
| | | | | | - Removed stale files (i2c_core_100, spi_core_100) - Made more compilation condiational; disabling some devices will disable dependencies as well so they don't get compiled in by default.
* Move all license headers to SPDX format.Martin Braun2017-12-2247-564/+47
|
* dram_fifo, BIST: BUS_CLK_RATE is now a readback reg.Ryan Marlow2017-09-292-4/+15
|
* docs: Fixed doxygen warningssugandhagupta2017-06-291-4/+8
|
* Merge branch 'maint'Martin Braun2017-03-011-0/+4
|\
| * cores: unhide virtual overloaded functions in gpio_atr_3000Andrej Rode2017-02-201-0/+4
| |
* | utils: introduce new logging API and remove msg APIAndrej Rode2017-02-2013-34/+34
|/
* lib: remove statements after throwAndrej Rode2017-01-121-1/+0
|
* dma fifo: Removed superfluous attributeMartin Braun2016-11-281-2/+1
|
* Remove all boost:: namespace prefix for uint32_t, int32_t etc. (fixed-width ↵Martin Braun2016-11-0829-277/+277
| | | | | | | | 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).
* cores: Fixed typo in time_core_3000Martin Braun2016-08-121-2/+2
|
* Merging RFNoC support for X310Martin Braun2016-08-095-1/+263
|
* cores: GPIO core gets explicit DDR settingJonathon Pendlum2016-08-092-0/+7
|
* cores: Added shutdown option to SPI coreJonathon Pendlum2016-08-092-3/+23
|
* vita core: Fix the hard reset issue by flushing the flow control windowPaul David2016-04-181-0/+13
|
* Added option for writes to specify a SPI speedDerek Kozel2016-04-081-6/+20
|
* Merge branch 'maint'Martin Braun2016-04-071-2/+2
|\ | | | | | | | | Conflicts: host/lib/usrp/cores/gpio_core_200.cpp
| * gpio core: Fixed a mismatch in the address assignment for RX and full duplexPaul David2016-04-061-2/+2
| |