aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests
Commit message (Collapse)AuthorAgeFilesLines
* rfnoc: Enable users to query connections in the graphAlex Williams2019-11-261-0/+8
| | | | Implement uhd::rfnoc::rfnoc_graph::enumerate_*_connections()
* rfnoc: Add clock selection to blocksMartin Braun2019-11-261-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | During registration, blocks must now specify which clock they are using for the timebase (i.e., for timed commands) and for the ctrlport (this is used to determine the length of sleeps and polls). For example, the X300 provides bus_clk and radio_clk; typically, the former is used for the control port, and the latter for the timebase clock. Another virtual clock is called "__graph__", and it means the clock is derived from property propagation via the graph. The actual clocks are provided by the mb_iface. It has two new API calls: get_timebase_clock() and get_ctrlport_clock(), which take an argument as to which clock exactly is requested. On block initialization, those clock_iface objects are copied into the block controller. The get_tick_rate() API call for blocks now exclusively checks the timebase clock_iface, and will no longer cache the current tick rate in a separate _tick_rate member variable. Block controllers can't manually modify the clock_iface, unless they also have access to the mb_controller (like the radio block), and that mb_controller has provided said access. This commit also adds the clock selection API changes to the DDC block, the Null block, and the default block.
* rfnoc: Add shutdown feature to blocksMartin Braun2019-11-262-0/+7
| | | | | | | | On destruction, the rfnoc_graph will call shutdown() on all blocks. This allows a safe de-initialization of blocks independent of the lifetime of the noc_block_base::sptr. Also adds the shutdown feature to null_block_control.
* rfnoc: Add null block controllerMartin Braun2019-11-262-0/+88
|
* rfnoc: noc_block_base: Pass args into block on constructionMartin Braun2019-11-261-0/+2
| | | | | These args come from the framework, e.g., because the UHD session was launched with them.
* rfnoc: graph: Add commit/release APIMartin Braun2019-11-263-7/+14
|
* rfnoc: Add mb_controller APIMartin Braun2019-11-262-0/+156
| | | | | | | | | The mb_controller is an interface to hardware-specific functions of the motherboard. The API works in two ways: - The user can request access to it, and thus interact directly with the motherboard - RFNoC blocks can request access to it, if they need to interact with the motherboard themselves.
* rfnoc: Add radio block controllerMartin Braun2019-11-261-0/+1
|
* rfnoc: Added src port, EPID getters to register_iface, 64-bit callsAshish Chaudhari2019-11-261-2/+11
| | | | - Add peek64() and poke64() convenience calls
* rfnoc: noc_block_base: Handle the tick_rate property internallyMartin Braun2019-11-261-0/+1
| | | | | | | | | | | All noc_block_base derivatives are now plugged into the tick rate system. Connected nodes can only have one tick rate among them. This implies there is also only ever one tick rate per block. set_tick_rate() is a protected API call which can be called by blocks such as radio blocks to actually set a tick rate. Other blocks would only ever read the tick rate, which is handled by the get_tick_rate() API call.
* rfnoc: node: Fix resolution of properties with circular dependenciesMartin Braun2019-11-261-0/+60
| | | | | | | When a node has multiple properties that depend on each other (and possible have circular dependencies), the previous version of property propagation would not correctly resolve properties that got flagged dirty during the execution of other resolvers.
* rfnoc: Moved chdr types/packet class out of chdr dirAshish Chaudhari2019-11-262-6/+6
| | | | | | - Moved chdr_packet and chdr_types from rfnoc/chdr to rfnoc and updated all references - Moved non-CHDR definitions to rfnoc_common.hpp
* transport: Implement a single-threaded I/O serviceAlex Williams2019-11-263-0/+563
| | | | | | | | | | | | | | | | | | | | The inline_io_service connects transports to links without any worker threads. Send operations go directly to the link, and recv will perform the I/O as part of the get_recv_buffer() call. The inline_io_service also supports muxed links natively. The receive mux is entirely inline. There is no separate thread for the inline_io_service, and that continues here. A queue is created for each client of the mux, and packets are processed as they come in. If a packet is to go up to a different client, the packet is queued up for later. When that client attempts to recv(), the queue is checked first, and the attempts to receive from the link happen ONLY if no packet was found. Also add mock transport to test I/O service APIs. Tests I/O service construction and some basic packet transmision. One case will also uses a single link that is shared between the send and recv transports. That link is muxed between two compatible but different transports.
* tests: add mock transport implementation and testCiro Nishiguchi2019-11-263-0/+419
| | | | Add test for transports using mock transports
* rfnoc: Add DDC block controllerMartin Braun2019-11-262-0/+76
|
* rfnoc: Use RTTI "serialization" for stream commandsMartin Braun2019-11-262-38/+38
| | | | | | | | A small modification to rfnoc::action_info makes it polymorphic, and instead of serializing data structures into a string, this allows creating custom action objects and identifying them via RTTI. The stream command action object is a good example for how to use this, so all the usages of stream command action objects were converted to this scheme.
* rfnoc: Support for new backend iface plus fixesAshish Chaudhari2019-11-261-21/+25
| | | | | | - Add support for new backend iface with max_async_msgs and mtu moved to after the noc ID - Fixed offsets for block info registers
* rfnoc: Change Block-ID format to 0/FFT#1Martin Braun2019-11-262-39/+40
| | | | | | | Previously, it was 0/FFT_1. The counter was separated by an underscore. Now, we separate by a # symbol to allow for underscores in block names. This means 'FIR_Filter' is now a valid blockname.
* rfnoc: adding client_zeroBrent Stapleton2019-11-263-0/+353
| | | | | | | | | | - Adding client_zero class, which gathers information about our device form the global registers on port 0 of the RFNoC backend registers. - adding unit tests to exercise client_zero - mock_reg_iface class: adding fake register_iface so we can run unit tests in software only Co-authored-by: Martin Braun <martin.braun@ettus.com>
* cmake: tests: Move RFNoC tests to UHD_ADD_NONAPI_TEST() macroMartin Braun2019-11-261-42/+19
| | | | This is a continuation of a76ce96c.
* rfnoc: Add action APIMartin Braun2019-11-263-2/+214
| | | | | | | | - Added action_info class - Allow to send actions from node to node - Allow to post actions into nodes - Allow to set default forwarding policies - Added unit tests
* rfnoc: Refactored CHDR packet interfacesAshish Chaudhari2019-11-262-68/+209
| | | | | | | - Moved packet interface code from public to private include - Split packet interface into two files: payload paring and packet iface - Added support for all CHDR packet types - Added more test cases to unit test
* rfnoc: Add property propagation, Boost.Graph storageMartin Braun2019-11-265-12/+886
| | | | | | | | | | | | - Adds a detail::graph_t class, which handles the propagation - Adds methods to node_t to aid with propagation - Adds unit tests - Adds dynamic property forwarding: Nodes are now able to forward properties they don't know about by providing a forwarding policy. A good example is the FIFO block which simply forwards most properties verbatim. - node: Temporarily disabling consistency check at init
* rfnoc: Add properties, nodes, and accessorsMartin Braun2019-11-263-0/+262
| | | | | | | | | | | | | | Adds the following classes: - uhd::rfnoc::node_t, the base class for RFNoC nodes - uhd::rfnoc::node_accessor_t, a class to access private properties - uhd::rfnoc::res_source_info, a struct that identifies where properties come from - uhd::rfnoc::property_t, and property_base_t (its parent) - uhd::rfnoc::prop_accessor_t, a class to access properties Add always dirty property (dirtifier). Also adds unit tests for properties.
* rfnoc: add new data_chdr packetization.Trung Tran2019-11-262-0/+96
|
* lib: Simplify implementation of uhd::get_system_time() to use <chrono>Martin Braun2019-11-262-1/+7
| | | | | | | uhd::get_system_time() is currently only used in USRP1 code, and it turns out that our "optimized", platform-dependent implementation still is a little slower than straight-up chrono. We therefore remove all the special cases, and replace them with a single, standard solution.
* convert: Add CHDR convertersMartin Braun2019-11-261-31/+102
| | | | | | | | The difference between the _chdr converters and the _item32_ converters is that the former do not require item32 boundaries, they do not require endianness swapping, and they don't use IQ swapping either. This is possible because the FPGA will do byte-swapping.
* utils: cast: Add from_str() typecastMartin Braun2019-11-261-0/+8
| | | | | This is the inverse to std::to_string(), and we can overload it with UHD-internal types.
* uhd: Remove deprecated objects and methodsMartin Braun2019-11-261-1/+0
| | | | | | | | | 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)
* devtese: Change default Python interpreter to 3Martin Braun2019-11-0812-12/+12
| | | | | | | | | | | Usually, devtest is run via make (or ninja), and will use the correct Python interpreter. When running directly on the command line, it is important to pick the right Python interpreter so it will work with the Python API. Here, we change the default interpreter from Python 2 to 3, because that's the more common version, and will be the only option for upcoming UHD 4.0 anyway.
* uhd: dict: Add typecast operator to std::map<>Martin Braun2019-11-041-0/+4
| | | | | | | This will now allow calls like this: uhd::dict<k, v> d = /* ... */; auto m = static_cast<std::map<k, v>>(d);
* e3xx: corrected frontend name in devtesterickshepherdNI2019-10-281-1/+1
|
* lib: utils: Add is_a_tty()Martin Braun2019-10-072-0/+33
| | | | | | | This is a portable version of POSIX's isatty(). Windows has its own version, called _isatty(). UHD thus gains its own, portable version. The underscores aren't beautiful, but they're necessary so we can distinguish the POSIX version from the UHD version.
* Revert "uhd: Check property type at access; error if mismatch"Martin Braun2019-09-301-19/+1
| | | | | | | This reverts commit 94592641f0647563bc4d2163805d5284a6796273. The commit itself was OK, but it changed the requirements such that UHD could only be compiled with C++11.
* rfnoc: Read cmd FIFO size from blocks & configure ctrl_ifaceMartin Braun2019-09-041-1/+3
| | | | | | | | | | This requires noc_shell compat number 6.0. It will allow sending as many command packets, but no more, than there is space. Updated FPGA images for devices: - X310/X300 - N300/N310/N320 - E310/E320
* uhd: Check property type at access; error if mismatchAaron Rossetto2019-09-041-1/+19
|
* utils: log: Fix includes for UHD_HEX()Martin Braun2019-06-121-0/+1
| | | | Using UHD_HEX() requires <iomanip>, which is now part of log.hpp.
* tests: Fix mock_ctrl_iface for 32-bit MSVCMartin Braun2019-05-231-2/+2
| | | | | Widening and narrowing of bitwidths causes errors on this platform without explicit casts.
* cmake: tests: Add macro for non-API based unit testsMartin Braun2019-05-221-49/+59
| | | | | | All unit tests which require extra sources (i.e., can't just interact with the UHD API) have been manually added to the CMakeLists.txt in a clumsy fashion. This macro cleans that up a little.
* devtest: Add new test for tx_waveformsMartin Braun2019-05-226-0/+121
| | | | This will run tx_waveforms with a few settings.
* log: Fix ANSI colour codesMartin Braun2019-05-071-0/+1
| | | | | | The colour codes used for console logging were incorrectly defined. Some colours would simply not rendered this way (e.g., red), others had the boldness flag wrong.
* prop_tree: add pop() functionBrent Stapleton2019-05-021-0/+8
| | | | | Adding pop function to property tree, which will remove and return a property from the property tree. This also includes unit tests.
* prop_tree: formatting property tree filesBrent Stapleton2019-05-021-0/+1
| | | | | | | | | | | | - Ran clang-format - Fixed typos - Updated copyright headers clang-format -i --style=file \ host/include/uhd/property_tree.hpp \ host/include/uhd/property_tree.ipp clang-format -i --style=file \ host/lib/property_tree.cpp host/tests/property_test.cpp
* tests: Make the Python interpreter for devtests a parameterMartin Braun2019-04-252-6/+8
| | | | | When running 'make test_***', it now also defaults to RUNTIME_PYTHON_EXECUTABLE.
* uhdlib: Add dpdk_zero_copy.hppAlex Williams2019-04-101-1/+1
| | | | | dpdk_zero_copy.hpp was referenced in multiple places using relative paths. Let's throw it in uhdlib for easy access.
* utils: Add scope_exit objectMartin Braun2019-04-012-0/+46
| | | | | | | This is a utility for RAII-style operations. An object that will run code when a scope is left. Also includes unit tests.
* uhd: Remove cal containersMartin Braun2019-03-202-196/+0
| | | | | They are currently unused, and may need reimplementation. For the time being, they can go out of the codebase.
* uhd: mpm: update all license header w/ "-or-later"Brent Stapleton2019-03-082-2/+2
| | | | Updating all SPDX license identifiers to include "-or-later"
* types: sid: Remove duplicate operator=()Martin Braun2019-02-281-0/+3
| | | | | This fixes a warning about multiple operators. Doesn't change any functionality.
* cmake: fix variable usageMichael Dickens2019-01-301-2/+1
|