aboutsummaryrefslogtreecommitdiffstats
path: root/host/examples
Commit message (Collapse)AuthorAgeFilesLines
* examples: gpio: Add --list-banks optionMartin Braun2019-11-261-0/+9
| | | | | | | The gpio example can now list all available banks before running tests. Use like this: gpio --args $args --list-banks
* examples: benchmark_rate: Add --rx_spp and --tx_sppMartin Braun2019-11-261-5/+23
| | | | These command line arguments control the spp values used for streaming.
* examples: Add example out-of-tree module for RFNoC modulesSugandha Gupta2019-11-2624-0/+1811
| | | | | | | | This subdirectory is its own, self-contained project. It is supposed to work against the UHD version it is shipped with. Co-Authored-By: Martin Braun <martin.braun@ettus.com> Co-Authored-By: Wade Fife <wade.fife@ni.com>
* uhd: Replace all occurrences of boost::bind with std::bindMartin Braun2019-11-265-7/+11
| | | | | | | | | | | | | | | | | | | | | 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.
* examples: updating radio loopbackBrent Stapleton2019-11-262-113/+155
| | | | Modified to run with the new RFNoC API.
* examples: benchmark_rate: Remove usage of boost::posix_timeMartin Braun2019-11-261-18/+25
| | | | | Replace with std::chrono functions instead, in our effort to reduce Boost footprint.
* examples: Add Rx/Tx stream args parameters to benchmark_rateAaron Rossetto2019-11-261-0/+5
|
* uhd: Replace boost::function with std::functionMartin Braun2019-11-261-1/+1
| | | | | | | 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-262-3/+2
| | | | | 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-264-12/+12
| | | | | | | | | | | | | | | | | | | 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-264-14/+5
| | | | | | | This commit removes all files and parts of files that are used by proto-RFNoC only. uhd: Fix include CMakeLists.txt, add missing files
* rfnoc: examples: Porting examples to new RFNoCBrent Stapleton2019-11-263-206/+203
| | | | | | | | | | | | | rfnoc_nullsource_ce_rx, rfnoc_rx_to_file: These examples are modified so they can be run with the new RFNoC API. test_messages: Fixes failures in the time test when it is executed immediately after an underrun test. The DUC considers time specs on a per burst basis, so when the underrun test leaves a burst unfinished, a time spec on the next burst is ignored.
* uhd: Remove deprecated objects and methodsMartin Braun2019-11-263-19/+1
| | | | | | | | | 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)
* cmake: Bump dependency versions for UHD 4.0.0.0Martin Braun2019-11-261-2/+2
| | | | | | | | | | | | - Boost >= 1.58 - CMake >= 3.5.1 - gcc >= 5.4.0 - Clang >= 3.8, AppleClang >= 600 - Python >= 3.5 (Py2k no longer supported) - Numpy >= 1.11 - C++14 for lib, include may now use C++11 constructs. - Because there is no more code requiring C++03 syntax, we remove the include-specific clang-format file
* Examples: wrap up ref setting with option checknatetemple2019-11-247-10/+24
|
* Examples: Set refs in RFNoC examplesnatetemple2019-11-242-4/+24
|
* Examples: tx_bursts add subdev, ref, lo-offset, bw optionsnatetemple2019-11-221-8/+41
|
* examples: test_pps_input: Also test for ref_locked on E31xMartin Braun2019-11-211-9/+26
| | | | | | | | | The E31x will always have a valid PPS, because it is generated internally. The external PPS however is used to drive the ppsloop, which means the ref_locked sensor can be a substitute for the PPS, but only on in this case. This commit also removes some superfluous includes from this example.
* examples: remove thread priority elevationCiro Nishiguchi2019-10-2226-62/+0
| | | | | | | Remove UHD call to elevate thread priority to realtime. Setting all threads to the same realtime priority can cause the threads to not share access to the network interface fairly, which adversely affects operation of the worker threads in UHD.
* cmake: Use new UHDBoost.cmake in init_usrp and toolsMichael Dickens2019-10-151-38/+22
| | | | | | | Modifies the CMake for the following utilities: - init_usrp (example) - kitchen_sink - nirio_programmer
* examples: Add mode to remove latency of RX samples in latency_testAlex Williams2019-10-071-3/+16
| | | | | | | | The timestamp from the streamer corresponds to the first sample, but a better indicator of transport latency will use the time of the last RX sample. Otherwise, nsamps will reduce the timing budget to send the TX samples. Include this mode to allow latency_test to have a version where there is largely no dependence amongst the variables.
* examples: Add replay example to CMakeMartin Braun2019-09-202-2/+3
|
* examples: bmark_rate: fixup INIT_DELAYBrent Stapleton2019-09-041-3/+6
| | | Fixing accounting for INIT_DELAY in the stream duration
* python: Fixup bmark_rate printed statisticsBrent Stapleton2019-08-211-3/+3
| | | | | | | | - When printing statistics, the number of TX and RX timeouts were mixed up. - Fixing main() docstring Fixes e735a63ff9e ("python: Adding Python API benchmark rate")
* uhd: mpm: update all license header w/ "-or-later"Brent Stapleton2019-03-083-3/+3
| | | | Updating all SPDX license identifiers to include "-or-later"
* examples: tx_samples_c: Fix memory leakMoritz Fischer2019-02-151-2/+5
| | | | | | | | | Fix memory leak: 'buff' was never freed. While we're at it replace the kludgy malloc(n*y*sizeof(float)) by calloc(sizeof(float), n*y). Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
* examples: benchmark_rate: Remove dead store to is_lockedMoritz Fischer2019-02-151-1/+0
| | | | | | | Remove dead store to is_locked. The variable isn't read before being overwritten, so the extra store is useless. Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
* examples: Fix boundary condition in ascii_art_dft plottingMartin Braun2019-01-211-1/+1
| | | | | | There was a corner case where the data could be such that the FFT plot symbol selection would cause an out-of-bounds access on the symbols table, and abort the example with an uncaught exception.
* uhd: mpm: apply clang-format to all filesBrent Stapleton2019-01-1630-3081/+3517
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* ascii_art_dft: move example within include guardBrent Stapleton2019-01-161-2/+1
| | | | | Moving the example `main` within the include guards for the file. This is mostly to help clang-format's include guard detection.
* examples: utils: skip formatting program optionsBrent Stapleton2019-01-1627-0/+54
| | | | | | Turning off clang formatting around the program option declarations. clang-format makes them looks bad an unreadable because it thinks the options are function calls or something.
* examples: Improved error message in tx_waveformsDerek Kozel2019-01-141-2/+6
| | | | Non-CONST type waveforms require a non-zero wave freq
* Examples: Add lo-offset to tx_waveformsnatetemple2019-01-101-2/+6
|
* Examples: update lo-offset naming in tx from filenatetemple2019-01-101-4/+7
| | | | Update tx_samples_from_file lo-offset naming convention
* Examples: Add LO Offset to rx_samples_to_filenatetemple2019-01-101-2/+6
|
* examples: change boost to std for time commandsmguyler-ni2019-01-081-40/+58
| | | | | | - examples affected: rfnoc_rx_to_file - fixes UHD build error with Boost 1.67: boost::posix_time::seconds no longer supports double argument as of version 1.67
* examples: optimize tx_waveforms memory allocationsBrent Stapleton2019-01-031-5/+10
| | | | | | | Move filling the TX buffer outside the critical path. Now, we pre-fill the TX buffer before entering the send loop (and before setting the TX stream time), and fill the TX buffer after calling send() (for the next iteration).
* examples: formatting in tx_waveformsBrent Stapleton2019-01-031-2/+8
| | | | | - Format `if` statements to multiple lines - Add quick comment on the exit checks
* examples: optimize benchmark_rate start timeBrent Stapleton2019-01-031-3/+3
| | | | | | | | Move the setting of the streaming start times back as late as possible. Currently, there are memory allocations in between setting the time_spec in the TX metadata and actually starting streaming. This will lessen the need for an INIT_DELAY and decrease the probability of late packets.
* uhd: Add benchmark_streamer support for multi-channel streamerCiro Nishiguchi2018-12-171-275/+478
| | | | | | | | Add support for benchmarking multi-channel streamers. This also simplifies the way the test parameters are specified to avoid confusion due to the additional dimension. For rx, multi-channel streamer configurations require split_stream noc blocks so that timestamps of packets in the same streamer align. Add support for loopback FIFOs.
* examples: Add keyboard controls to rx_ascii_art_dftRakesh Peter2018-12-171-3/+116
| | | | | | | | | - Add keyboard controls for sample rate, gain, analog bandwidth, frequency, as well as the display's dynamic range, reference level, and frame rate. - The current values for these properties, as well as the keys to control them, are displayed in a small window at the top of the display. This control window can be toggled by pressing 'c'
* examples: rfnoc_radio_loopback: Clean up exampleMartin Braun2018-12-031-15/+11
| | | | | | | | | | - Remove unnecessary Boostisms - Remove unecessary thread priority (this example doesn't actually do anything that requires high thread priority) - Used auto in some places to increase readability - Fixed some compiler warnings No functional changes.
* rfnoc: Add halt to replay APIWade Fife2018-11-271-1/+5
| | | | | The HALT feature allows a command that takes a long time to run to be stopped while it is in progress.
* RFNoC: Fix replay example port argsWade Fife2018-11-271-3/+3
|
* uhd: fix rx antenna not being applied in txrx exampleMark Meserve2018-11-161-2/+3
|
* cmake: Update coding style to use lowercase commandsMartin Braun2018-11-144-65/+65
| | | | | | | | | | | | | | | | | 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!)
* uhd: Changes to traffic counter register namesCiro Nishiguchi2018-10-311-66/+54
| | | | | | This makes the noc traffic counter register actually reflect the registers in the FPGA. The FPGA register names were changed prior to merging to master, and the ready count registers were removed.
* uhd: Add dual measurements to benchmark_streamerCiro Nishiguchi2018-10-181-113/+314
| | | | | Add options to run benchmark_streamer with multiple streamers running concurrently on separate threads.
* utils: fix bmark_rate MIMO synchronizationBrent Stapleton2018-10-121-9/+10
| | | | | | | | | | Fix USRP2 MIMO synchronization in benchmark_rate. When synchronizing N2XXs connected with a MIMO cable, only the master's time needs to be set; the slave will be synchronized automatically. Currently, calling set_time_unknown_pps will attempt to synchronize the slave on the next PPS, which can cause problems since the MIMO cable doesn't propogate a PPS signal.
* uhd: Add benchmark_streamer exampleCiro Nishiguchi2018-10-112-0/+498
|