aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* utils: populate_images: download with python3bidavis2020-03-021-1/+1
|
* docs: n3xx/x3xx: Fix links to DPDK pagesteviez2020-02-272-2/+2
| | | | | | | The n3xx and x3xx device pages both link to the DPDK page. However, the link was setup as type "subpage" instead of "ref". The result was that both device pages thought they owned the DPDK page which caused non-intuitive behavior when clicking through links in the manual
* e320/e310: Fix get_gpio_srcs() MPM API callMartin Braun2020-02-262-2/+2
| | | | | The Python code contained a typo which would cause a call to get_gpio_srcs() to throw an exception.
* device: read in preferences file before discoveryAndrew Lynch2020-02-261-1/+3
|
* rfnoc: Reuse the graph objectAndrew Lynch2020-02-261-1/+20
| | | | | Keep a reference to the graph object so that when a new multi_usrp is opened to the same device, the same graph is also used.
* lib: move OSX specific code to where the values are initially setMichael Dickens2020-02-211-0/+11
|
* lib: tweak prototypes to not be constexpr to allow building on OSXMichael Dickens2020-02-211-5/+5
| | | | Make all arguments const, in line with how other static methods are declared.
* examples: Wrap get_gpio_src() with try/catch blocksteviez2020-02-191-7/+14
| | | | | Non-RFNoC devices do not support get_gpio_src() entrypoing so wrap call with a try/catch block
* rfnoc: Add management filter to generic xportWade Fife2020-02-194-101/+172
|
* radio: Update TB to use new block ctrl connectWade Fife2020-02-191-41/+17
| | | | | This eliminates the complicated semaphore from the testbench and brings the radio testbench in line with the other testbenches.
* utils: images downloader: Add support for UHD_IMAGES_URL, clean upMartin Braun2020-02-191-35/+29
| | | | | | - Remove Python2 compat hacks - Read the UHD_IMAGES_URL environment variable. If set, it overrides the default value for --base-url
* utils: images downloader: Handle missing content-length responseMartin Braun2020-02-191-7/+18
| | | | | | If the content-length header is not available, uhd_images_downloader will now ask the user if she wants to continue. Previously, the tool would throw an exception.
* rfnoc: actions: Cleanup rx_event_action_info ctorsteviez2020-02-183-13/+18
| | | | | 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-183-11/+18
| | | | | | 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
* utils: image_downloader: check write conditionssteviez2020-02-181-0/+13
| | | | | | | | | | Prior to downloading any images, check that the images destination: - Is a valid directory - Has valid permissions for images to be written Images are downloaded to a temporary location before being written to image destination, so these checks help avoid situation where images are downloaded but unable to be written
* x300: add front-panel GPIO source controleklai2020-02-188-54/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a ZPU register to control the FP GPIO source. These are 2bits per GPIO pin, totalling 24 bits. 0 corresponds to RF-A, 1 corresponds to RF-B. The following Python code will control the upper 6 bits of the front-panel GPIO from the B-side radio on an X300: >>> import uhd >>> U = uhd.usrp.MultiUSRP("type=x300") >>> U.get_gpio_src_banks() ['FP0'] >>> U.get_gpio_src("FP0") ['RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA'] >>> U.set_gpio_src("FP0", ['RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFB', 'RFB', 'RFB', 'RFB', 'RFB', 'RFB']) >>> U.get_gpio_src("FP0") ['RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFB', 'RFB', 'RFB', 'RFB', 'RFB', 'RFB'] >>> # Make all GPIOs outputs: >>> U.set_gpio_attr("FP0A", "DDR", 0xFFF) >>> U.set_gpio_attr("FP0B", "DDR", 0xFFF) >>> # Control all GPIOs from software (not ATR): >>> U.set_gpio_attr("FP0A", "CTRL", 0x000) >>> U.set_gpio_attr("FP0B", "CTRL", 0x000) >>> # Bottom 3 pins go high from radio A >>> U.set_gpio_attr("FP0A", "OUT", 0x007) >>> # Top 3 pins go high from radio B >>> U.set_gpio_attr("FP0B", "OUT", 0xE00) Amends the gpio.cpp example to allow switching the source. Co-authored-by: Brent Stapleton <brent.stapleton@ettus.com>
* mpm: cmake: added date_time as required boost componentJoerg Hofrichter2020-02-101-0/+1
| | | | | | | this fixes the error of a missing symbol _ZNK5boost9gregorian10greg_month15as_short_stringEv in /usr/lib/libusrp-periphs.so.4 when building with Boost 1.71
* mpm: catalina: Add thread.cpp from UHD to included filesMartin Braun2020-02-101-0/+13
| | | | | This avoids a linker error where set_thread_name and set_thread_priority cannot be found.
* ad9361: Fix formattingMartin Braun2020-02-102-19/+16
| | | | | - Apply clang-format - Remove unnecessary boost::format
* thread: Fix formatting in thread utilitiesMartin Braun2020-02-102-135/+147
| | | | | - Apply clang-format - Remove unnecessary boost::format
* MPM: add ability to run scripts to MPM shellLars Amsel2020-02-071-34/+83
| | | | | | | | | | | | | | | MPM shell now supports script execution. It utilizes the cmdqueue of Pythons cmd.Cmd class for this. The script to execute is a text file containing the commands one per line. The output decoration of MPM shell changed. Commands are decorated with ">" whereas responses use "<" at line start. Multiline responses are decorated in each line. Cleanup overwritten methods of cmd.Cmd to allow proper shutdow in interactive as well as in scripted mode. Improved pylint score.
* lib: utils: Don't use hard-coded path constantsRyan Volz2020-02-072-2/+27
| | | | | | | | | | | | | 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).
* python: Set python module suffix to conform with PEP 3149.Ryan Volz2020-02-071-1/+10
| | | | | | | | | This adds the python implementation, major and minor version numbers, and any additional flags (debug, pymalloc, wide unicode) to the extension module suffix as specified in PEP 3149. Hat tip to @isuruf: https://github.com/conda-forge/staged-recipes/pull/10076#discussion_r348721448
* python: Do not link against python lib for building an extension module.Ryan Volz2020-02-071-1/+10
| | | | | | | | | | | | This fixes a segmentation fault when trying to use the python module on OSX when built with conda (unsure why it doesn't arise otherwise). Instead of linking against the python library, it is proper to not link against the library and, for OSX builds, add linker options for "-undefined" and "dynamic_lookup". This is precisely what the CMake FindPython module does for linking against the Python::Module target. See https://blog.tim-smith.us/2015/09/python-extension-modules-os-x and https://bugs.python.org/issue36721
* python: Fix internal library name (incl. suffix) to match filename.Ryan Volz2020-02-071-7/+7
| | | | | | Instead of renaming the library file, this sets the suffix in CMake so that the filename turns out as desired and also linker references know the correct name.
* rfnoc: ddc: Make scaling optional, prefer to change decimMartin Braun2020-02-071-28/+53
| | | | | | | | | | | This combines two intertwined changes: - The scaling_in and scaling_out properties of the DDC now start off uninitialized. This is to avoid invalid loops of property resolution: When the block is first initialized in a graph context, the default values for scaling over-constrain the resolution problem. - The resolver for samp_rate_in used to prefer changing samp_rate_out, it now prefers to modify the decimation. This is necessary to allow calling set_output_rate() before the graph is committed.
* rfnoc: registry: Fix Doxygen for register_block_direct()Martin Braun2020-02-071-0/+12
|
* rfnoc: Update blocks to use autogenerated noc_shellWade Fife2020-02-0630-1838/+2473
|
* fixup! utils: blocktool: Fix blocktoolWade Fife2020-02-062-5/+5
|
* cmake/doxygen: Fix FPGA manual post-FPGA-mergeMartin Braun2020-02-063-39/+7
| | | | | | | While merging the FPGA code into the UHD codebase, the manual building process was not modified, resulting in either a link to the website instead of building the FPGA manual as part of the rest, or by using a residual submodule.
* fixup! lib: add option for output register in pps generatorHumberto Jimenez2020-02-051-1/+1
|
* rfnoc: Provide make_args_t dtor in rfnoc_blocks_testAaron Rossetto2020-02-041-0/+3
|
* examples: benchmark_rate clean print outmattprost2020-02-041-8/+12
| | | | | | Cleans up the print out for the benchmark rate example. Removes race condition that would cause send and receive initialization messages to interleave to stdout.
* octoclock: Change type of EEPROM property to mboard_eeprom_tMartin Braun2020-02-043-6/+10
| | | | | | | | | 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.
* octoclock: Avoid usage of uninitialized memoryMartin Braun2020-02-045-41/+48
| | | | | | | | The Octoclock host code would send uninitialized memory over the network, which would be flagged by tools such as Valgrind. This patch creates a factory function for OctoClock packets that initializes the memory to zero, defaults the proto version to the OctoClock default, and can provide a random sequence number if none is given.
* octoclock: Apply clang-formatMartin Braun2020-02-048-659/+753
|
* multi_usrp: Add get_tree() API callMartin Braun2020-02-043-0/+14
| | | | | | 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-297-69/+135
| | | | | | 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.
* log: Remove LOG statement from _get_log_level()Martin Braun2020-01-291-2/+1
| | | | | | _get_log_level() is an internal function that only gets called during setup, so the logger isn't ready yet. It thus now logs to stderr instead of the logger.
* utils: log: Name all threadsMartin Braun2020-01-291-5/+16
| | | | | | Logging creates two threads, one for regular logging, and one for fastpath logging. Now these threads are named using uhd::set_thread_name()
* thread: Remove log messages for set_thread_name() when not supportedMartin Braun2020-01-291-10/+14
| | | | | | | | | | | On systems like Windows, set_thread_name() is not supported, and would previously log an error message telling the user that it can't set the thread name. However, that prevents set_thread_name() to be called before the logger is being set up, and the logger would like to use this function. Since it is obvious to the user if threads can be named or not, the log message is considered redundant and is removed.
* fixup! mpm: e320/e310: Expose APIs to drive GPIO source via UHDMartin Braun2020-01-283-2/+3
|
* lib: add option for output register in pps generatorMax Köhler2020-01-281-2/+23
| | | | | | The pps_generator module receives a new parameter (PIPELINE) which can optionally add a register on the output. The default behaviour is unchanged.
* Merge FPGA repository back into UHD repositoryMartin Braun2020-01-283095-9/+2912925
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FPGA codebase was removed from the UHD repository in 2014 to reduce the size of the repository. However, over the last half-decade, the split between the repositories has proven more burdensome than it has been helpful. By merging the FPGA code back, it will be possible to create atomic commits that touch both FPGA and UHD codebases. Continuous integration testing is also simplified by merging the repositories, because it was previously difficult to automatically derive the correct UHD branch when testing a feature branch on the FPGA repository. This commit also updates the license files and paths therein. We are therefore merging the repositories again. Future development for FPGA code will happen in the same repository as the UHD host code and MPM code. == Original Codebase and Rebasing == The original FPGA repository will be hosted for the foreseeable future at its original local location: https://github.com/EttusResearch/fpga/ It can be used for bisecting, reference, and a more detailed history. The final commit from said repository to be merged here is 05003794e2da61cabf64dd278c45685a7abad7ec. This commit is tagged as v4.0.0.0-pre-uhd-merge. If you have changes in the FPGA repository that you want to rebase onto the UHD repository, simply run the following commands: - Create a directory to store patches (this should be an empty directory): mkdir ~/patches - Now make sure that your FPGA codebase is based on the same state as the code that was merged: cd src/fpga # Or wherever your FPGA code is stored git rebase v4.0.0.0-pre-uhd-merge Note: The rebase command may look slightly different depending on what exactly you're trying to rebase. - Create a patch set for your changes versus v4.0.0.0-pre-uhd-merge: git format-patch v4.0.0.0-pre-uhd-merge -o ~/patches Note: Make sure that only patches are stored in your output directory. It should otherwise be empty. Make sure that you picked the correct range of commits, and only commits you wanted to rebase were exported as patch files. - Go to the UHD repository and apply the patches: cd src/uhd # Or wherever your UHD repository is stored git am --directory fpga ~/patches/* rm -rf ~/patches # This is for cleanup == Contributors == The following people have contributed mainly to these files (this list is not complete): Co-authored-by: Alex Williams <alex.williams@ni.com> Co-authored-by: Andrej Rode <andrej.rode@ettus.com> Co-authored-by: Ashish Chaudhari <ashish@ettus.com> Co-authored-by: Ben Hilburn <ben.hilburn@ettus.com> Co-authored-by: Ciro Nishiguchi <ciro.nishiguchi@ni.com> Co-authored-by: Daniel Jepson <daniel.jepson@ni.com> Co-authored-by: Derek Kozel <derek.kozel@ettus.com> Co-authored-by: EJ Kreinar <ej@he360.com> Co-authored-by: Humberto Jimenez <humberto.jimenez@ni.com> Co-authored-by: Ian Buckley <ian.buckley@gmail.com> Co-authored-by: Jörg Hofrichter <joerg.hofrichter@ni.com> Co-authored-by: Jon Kiser <jon.kiser@ni.com> Co-authored-by: Josh Blum <josh@joshknows.com> Co-authored-by: Jonathon Pendlum <jonathan.pendlum@ettus.com> Co-authored-by: Martin Braun <martin.braun@ettus.com> Co-authored-by: Matt Ettus <matt@ettus.com> Co-authored-by: Michael West <michael.west@ettus.com> Co-authored-by: Moritz Fischer <moritz.fischer@ettus.com> Co-authored-by: Nick Foster <nick@ettus.com> Co-authored-by: Nicolas Cuervo <nicolas.cuervo@ettus.com> Co-authored-by: Paul Butler <paul.butler@ni.com> Co-authored-by: Paul David <paul.david@ettus.com> Co-authored-by: Ryan Marlow <ryan.marlow@ettus.com> Co-authored-by: Sugandha Gupta <sugandha.gupta@ettus.com> Co-authored-by: Sylvain Munaut <tnt@246tNt.com> Co-authored-by: Trung Tran <trung.tran@ettus.com> Co-authored-by: Vidush Vishwanath <vidush.vishwanath@ettus.com> Co-authored-by: Wade Fife <wade.fife@ettus.com>
* rfnoc_device: Remove spurious commentMartin Braun2020-01-231-2/+1
| | | | | This removes a comment that refers to Boost smart pointers, which were removed in UHD.
* docs: e3xx/n3xx: Add sections on FP-GPIOs and how to drive themMartin Braun2020-01-232-0/+109
| | | | This gives examples of how to use the set_gpio_src() API and friends.
* mpm: e320/e310: Expose APIs to drive GPIO source via UHDMartin Braun2020-01-235-80/+147
| | | | This enables the *gpio_src* APIs for the E320 and the E31x.
* multi_usrp: Amend APIs for GPIO source controlMartin Braun2020-01-233-13/+50
| | | | | | | | | | | 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.
* mpm/mpmd: Expose APIs to drive GPIO sourcesMartin Braun2020-01-237-37/+168
| | | | | | | | | | | | | | | | | | | The N310 has a feature that allows the front panel GPIOs to be driven by various sources: The PS, or any of the radio channels. The MPM-based APIs did not expose any way to change that. Changes: - Add MPM APIs to PeripheralManagerBase and n3xx classes - Improve comments and explanations - Add host-side hooks into these new APIs in mpmd_mb_controller - Implement these APIs for N3xx The N3xx devices will have the option to set the GPIO source to "PS", or to one of "RF0", "RF1", "RF2", "RF3" (if there are four channels; the N300 and N320 can only go up to RF1). Note: The N310 radio does not have separate FP-GPIO banks for channels 0 and 1, which needs to be fixed in a separate commit.