aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests: Add check for life on DPDK portAlex Williams2019-11-262-0/+62
|
* lib,tests: Remove old DPDK files from buildAlex Williams2019-11-261-19/+0
| | | | The DPDK files are left behind as a reference, for now.
* rfnoc: Make polling I/O service not block on flow controlCiro Nishiguchi2019-11-262-18/+31
| | | | | | Add a new method to io_service::send_io to check whether the destination is ready for data, to make it possible to poll send_io rather than block waiting for flow control credits.
* uhd: Replace all occurrences of boost::bind with std::bindMartin Braun2019-11-264-20/+21
| | | | | | | | | | | | | | | | | | | | | 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: Introduce I/O service managerAaron Rossetto2019-11-261-7/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | - Implement I/O service detach link methods - The I/O service manager instantiates new I/O services or connects links to existing I/O services based on options provided by the user in stream_args. - Add a streamer ID parameter to methods to create transports so that the I/O service manager can group transports appropriately when using offload threads. - Change X300 and MPMD to use I/O service manager to connect links to I/O services. - There is now a single I/O service manager per rfnoc_graph (and it is also stored in the graph) - The I/O service manager now also knows the device args for the rfnoc_graph it was created with, and can make decisions based upon those (e.g, use a specific I/O service for DPDK, share cores between streamers, etc.) - The I/O Service Manager does not get any decision logic with this commit, though - The MB ifaces for mpmd and x300 now access this global I/O service manager - Add configuration of link parameters with overrides Co-Authored-By: Martin Braun <martin.braun@ettus.com> Co-Authored-By: Aaron Rossetto <aaron.rossetto@ni.com>
* transport: Implement eov indications for Rx and Tx streamsAaron Rossetto2019-11-263-0/+384
|
* tests: Change Python YAML moduleBrent Stapleton2019-11-261-1/+6
| | | | Use Python's `ruamel.yaml` module instead of `yaml`
* uhd: Replace boost::regex with std::regexMartin Braun2019-11-261-3/+0
| | | | | | | | boost::regex was a requirement until the minimum version of gcc was increased. Since it is at version 5.3 now, using Boost.Regex is no longer necessary. This change is a pure search-and-replace; Boost and std versions of regex are compatible and use the same syntax.
* uhd: Replace usage of boost smart pointers with C++11 counterpartsMartin Braun2019-11-268-38/+38
| | | | | | | | | | | | | | | | | | | 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.
* transport: Implement an I/O service that uses an offload threadCiro Nishiguchi2019-11-262-0/+284
| | | | | | | The offload_io_service executes another I/O service instance within an offload thread, and provides synchronization mechanisms to communicate with clients. Frame buffers are passed from the offload thread to the client and back via single-producer, single-consumer queues.
* uhd: Check property type at access; error if mismatchAaron Rossetto2019-11-261-1/+19
|
* Remove proto-RFNoC filesMartin Braun2019-11-2618-1982/+6
| | | | | | | This commit removes all files and parts of files that are used by proto-RFNoC only. uhd: Fix include CMakeLists.txt, add missing files
* x300/mpmd: Port all RFNoC devices to the new RFNoC frameworkMartin Braun2019-11-261-5/+13
| | | | | | | Co-Authored-By: Alex Williams <alex.williams@ni.com> Co-Authored-By: Sugandha Gupta <sugandha.gupta@ettus.com> Co-Authored-By: Brent Stapleton <brent.stapleton@ettus.com> Co-Authored-By: Ciro Nishiguchi <ciro.nishiguchi@ni.com>
* tests: Add benchmark of streamer and chdr xportsCiro Nishiguchi2019-11-262-7/+534
|
* tests: Make packet handler benchmark include flow controlCiro Nishiguchi2019-11-262-229/+228
| | | | | Add mock flow control to the packet handler benchmark to make it a better comparison to streamer_benchmark.
* rfnoc: client_zero can track num SEPs and num ctrl EPs separatelyMartin Braun2019-11-261-0/+1
|
* transport: Add modeling of physical adaptersAlex Williams2019-11-261-0/+10
| | | | | | | Now link instances must have the ability to report the corresponding physical adapter that is used for the local side of the link. This information can be used to help identify when multiple links share the same adapter.
* rfnoc: node: Add set_properties()Martin Braun2019-11-261-0/+5
| | | | | node_t::set_properties() is a convenience function that lets you set multiple properties at once from a device_addr_t.
* rfnoc: property: Add option to set properties from stringsMartin Braun2019-11-261-0/+27
|
* rfnoc: tx_streamer: add support for async messagesCiro Nishiguchi2019-11-261-0/+6
| | | | | | Add an async message queue that aggregates errors from multiple sources. Errors can come from the strs packets originating from the stream endpoint or from the radio block through control packets to the host.
* rfnoc: graph: Optimize property propagation algorithmMartin Braun2019-11-261-3/+2
| | | | | | | | | | | | | | | | | | | | | This introduces the concept of a resolution context, because the property propagation algorithm needs to behave differently when called during an initialization step (e.g. when the graph is committed), or when the user changes a property on one of the nodes after it was committed. The algorithm is modified as follows: - When called during an initialization step, then all nodes get resolved at least once. If nodes added new properties, then all nodes get touched again until the max number of iterations is reached. - When called because a node modified one of its properties, then that node is always resolved first. From there, all other nodes are resolved in topological order. However, the algorithm immediately terminates as soon as there are no more dirty nodes. - When called because a node modified one of its properties, but the graph is currently not in a committed state, then that node will do a local property resolution.
* utils: remove thread priority elevationCiro Nishiguchi2019-11-261-2/+0
| | | | | | | | Remove UHD call to elevate thread priority to realtime from utils, and add warning in documentation of set_thread_priority function. 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.
* rfnoc: tests: Let block unit tests use regular factoryMartin Braun2019-11-262-49/+53
| | | | | | | Up until now, these unit tests were bypassing the factory, and directly linking against the relevant block factories. This can cause linker issues, but it also doesn't test code paths. This change makes the unit tests look more like the actual usage.
* rfnoc: ctrlport: Separately validate and handle async messagesMartin Braun2019-11-261-0/+5
| | | | | | | | | | | This introduces the concept of an async message validator, an optional callback for functions to check if an async message has a valid payload. After validation, the async message is ack'd. Then, the async message handler is executed. This makes sure that an async message is ack'd as soon as possible, rather than after the async message handling, which can itself have all sorts of communication going on to the device.
* rfnoc: Add DUC block controllerMartin Braun2019-11-263-3/+170
|
* rfnoc: Add MTU trackingMartin Braun2019-11-261-1/+20
| | | | | | | | | | | | | | | | | MTUs are now tracked through the framework for all childs of noc_block_base. Every edge gets an 'mtu' property. MTU can be set and get either through the prop API, or through new API calls (get_mtu(), set_mtu()). It is also possible to create custom properties that depend on the MTU by asking for a reference to the MTU property, and then adding that to the input list of a property resolver. The radio_control_impl includes a change in this commit where it sets the spp based on the MTU. Blocks can also set an MTU forwarding policy. The DDC block includes a change in this commit that sets a forwarding policy of ONE_TO_ONE, meaning that the MTU on an input edge is forwarded to the corresponding output edge (but not the other edges, as with the tick rate).
* rfnoc: actions: Allow sending actions to selfMartin Braun2019-11-261-2/+5
| | | | | | | | Sending actions to self is useful because calling post_action() from within an action handler will not actually trigger the action. Instead, it will defer delivery of the action. Allowing sending actions to self will allow to add another action, in deterministic order, and the execution of another action handler.
* rfnoc: actions: Add dictionary to all actionsMartin Braun2019-11-261-0/+6
| | | | | | This can be used to set arbitrary key/value pairs on the action object. Easier to use than serialization, but doesn't require custom types, either.
* rfnoc: Introduce device-specific blocksLars Amsel2019-11-261-3/+3
| | | | | | | | | | | | | - Add device ID constants (e.g., E310 == 0xE310, X300 == 0xA300). These are stored in the device FPGA, and can be used for decisions later - Blocks can be specific to a device. For example, x300_radio_control can only work on an X300 series device. - Because blocks can be device-specific, all radio blocks can now share a common Noc-ID (0x12AD1000). - The registry and factory functions are modified to acommodate for this. - The motherboard access is now also factored into the same registry macro.
* rfnoc: DDC: Fix property propagationMartin Braun2019-11-263-9/+135
| | | | | | | | | - Combine scaling and samp_rate resolvers - Prioritize decim when user has set it for DDC: When samp_rate_in changes, either the samp_rate_out or the decim values may change to accommodate it. If decim has been set by the user (which can be determined by the valid flag), prefer changing samp_rate_out over decim.
* rfnoc: add rx and tx transports, and amend rfnoc_graphCiro Nishiguchi2019-11-265-0/+1193
| | | | | | | | | | | | | | | | | | | | | | | transports: Transports build on I/O service and implements flow control and sequence number checking. The rx streamer subclass extends the streamer implementation to connect it to the rfnoc graph. It receives configuration values from property propagation and configures the streamer accordingly. It also implements the issue_stream_cmd rx_streamer API method. Add implementation of rx streamer creation and method to connect it to an rfnoc block. rfnoc_graph: Cache more connection info, clarify contract Summary of changes: - rfnoc_graph stores more information about static connections at the beginning. Some search algorithms are replaced by simpler lookups. - The contract for connect() was clarified. It is required to call connect, even for static connections.
* 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>