aboutsummaryrefslogtreecommitdiffstats
path: root/host/examples
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* examples: add rfnoc_radio_loopbackTrung Tran2018-09-142-0/+214
| | | | This example will allow an RF->RF loopback using RFNoC devices.
* python: Fix duration of benchmark rateBrent Stapleton2018-09-121-1/+1
| | | | | | | | Duration of multichannel benchmark was 50 seconds longer than intended- a 50ms initialization delay was mistakenly multiplied by 1000. Fixes e735a63ff9e ("python: Adding Python API benchmark rate")
* Examples: Fix channel argument for rx_samples_to_fileMichael West2018-08-291-18/+18
|
* RFNoC: Add Replay API and exampleWade Fife2018-08-291-0/+367
|
* uhd: Remove usage of time_t (except when required)Martin Braun2018-08-203-7/+7
| | | | | | | | | | The C/C++ standards don't define what time_t is, only that it is arithmetic (and real for C11, and integral for C++). It should not be used in portable software and is only used as the return value for some libc calls. A common definition for time_t is int64_t, so we'll switch to that permanently in our own APIs. System APIs will of course stick with time_t.
* rfnoc: examples: Removed some legacy code patterns from RFNoC examplesMartin Braun2018-08-022-34/+45
| | | | | - Unnecessary use of Boost - Use of thread_priority.hpp
* UHD: Added RFNoC examplesMartin Braun2018-06-223-0/+830
|
* python: Adding Python API benchmark rateBrent Stapleton2018-06-202-0/+482
| | | | Python API version of the benchmark rate utility.
* python: Added curses frequency plot examplePaul David2018-06-202-0/+153
|
* python: Separating exposed Python data structuresPaul David2018-06-203-55/+38
| | | | | | | | | - Separating exposed Python data structures into logical sections - Exposes all of the multi_usrp API - Adds a layer of Python for documentation and adding helper methods - Adds improvements and fixes to the MultiUSRP object - Includes additional exposed data structures (like time_spec_t, etc.) - Add code to release the Python GIL during long C++ calls
* python: Initial commit of Python APIAndrej Rode2018-06-204-0/+137
| | | | | | | | | | Initial commit of the Python API using Boost.Python. Bind the MultiUSRP API for use in Python. Bindings intended to provide as complete coverage as possible. - Wrap most multi_usrp calls - Adding multi channel send/recv examples in examples/python - Adding setuptools support - Initial attempt at binding the UHD types and filters
* examples: Select subdev spec before setting channelsSugandha Gupta2018-06-121-4/+3
|
* examples: Remove use of boost::posix_time from rx_ascii_art_dftMartin Braun2018-05-091-3/+8
|
* examples: Avoid calculating dropped samples for negative offsetsMartin Braun2018-05-031-1/+10
| | | | | | | | | | | | There are cases when the first sample after an overrun has an earlier timestamp than the timestamp of the error package. In this case, benchmark_rate would incorrectly determine the number of dropped samples, causing it to display a very large number. This is not a fix of the negative offset issue, but will avoid displaying overly pessimistic numbers dropped samples. An error message is still displayed when this happens, which aids in debugging this situation.
* examples: Fix sleep duration in benchmark_rateMartin Braun2018-05-031-1/+1
| | | | | | The main thread sleeps while the receiver and transmitter threads are going on. This fixes the calculated time it takes in single-channel scenarios.
* examples: Add failure modes to benchmark_rateMartin Braun2018-05-031-20/+86
| | | | | | | | | | | When too many overruns, underruns, or dropped packets are detected, benchmark_rate will now return EXIT_FAILURE. This allows to use it for automated tests. The thresholds are set very high by default, but can be manually tuned by using new command line arguments: $ benchmark_rate --overrun-threshold 0 # Fail on any number of Os
* lib: Purge all references to boost::this_thread::sleep()Martin Braun2018-04-309-31/+41
| | | | Replace with std::this_thread::sleep_for().
* examples: De-boostify rx_samples_to_fileMartin Braun2018-04-181-47/+93
| | | | | Removes boost::bind and all Boost time types from this example. Re-enables compatibility with Boost 1.67.
* examples: Remove superfluous sleepMartin Braun2018-04-181-2/+0
|
* uhd: update settling time to double in txrx_loopback_to_file exampleDaniel Jepson2018-04-101-4/+4
|
* uhd: increase tx buffer fill time for txrx_loopback_to_file exampleDaniel Jepson2018-04-101-1/+1
| | | | | The previous 0.1s fill time occasionally prevented rx from starting on time when settling is set to the same 0.1s time. It was increased to 0.5s.
* uhd: fix subdevice selection order in txrx_loopback_to_file exampleDaniel Jepson2018-04-101-4/+4
|
* example: Refactor gpio.cppMartin Braun2018-03-301-12/+22
| | | | | | Minor changes: - Remove some Boost usage - Minor formatting changes
* examples: Update benchmark_rate (more stats, timestamps)Martin Braun2018-03-141-57/+111
| | | | | | | | - Messages are all timestamped, enables better understanding of the output log - Less usage of Boost - More stats (differentiate between RX and TX timeouts and sequence errors)
* uhd: Moved get_system_time outside of public APIMartin Braun2018-03-051-3/+6
| | | | | | | uhd::get_system_time() is an abstracted way of reading back a time, and is not UHD-specific. As such, there's no reason to keep it in the public part of the API where we're contractually obligated not to touch it. Instead, moving it to the internal API space.
* examples: Fix some minor compiler warningsMartin Braun2018-02-197-17/+38
| | | | All warnings reported by MSVC. Mostly related to narrowing conversions.
* uhd: Update license headersMartin Braun2018-02-1930-28/+58
| | | | | | | All copyright is now attributed to "Ettus Research, a National Instruments company". SPDX headers were also updated to latest version 3.0.