aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* uhd: Add support for the USRP X410Lars Amsel2021-06-101-2/+56
| | | | | | | | | | | | | | | | Co-authored-by: Lars Amsel <lars.amsel@ni.com> Co-authored-by: Michael Auchter <michael.auchter@ni.com> Co-authored-by: Martin Braun <martin.braun@ettus.com> Co-authored-by: Paul Butler <paul.butler@ni.com> Co-authored-by: Cristina Fuentes <cristina.fuentes-curiel@ni.com> Co-authored-by: Humberto Jimenez <humberto.jimenez@ni.com> Co-authored-by: Virendra Kakade <virendra.kakade@ni.com> Co-authored-by: Lane Kolbly <lane.kolbly@ni.com> Co-authored-by: Max Köhler <max.koehler@ni.com> Co-authored-by: Andrew Lynch <andrew.lynch@ni.com> Co-authored-by: Grant Meyerhoff <grant.meyerhoff@ni.com> Co-authored-by: Ciro Nishiguchi <ciro.nishiguchi@ni.com> Co-authored-by: Thomas Vogel <thomas.vogel@ni.com>
* uhd: Split radio_control into rf_control interfacesLane Kolbly2021-01-111-0/+6
| | | | | | These rf_control interfaces allow easier implementation of radio controls as well as allowing easier sharing of code for implementing e.g. gain_profile.
* Create C++ wrappers for MPM RPC callsLane Kolbly2021-01-111-0/+1
| | | | | | | | | This gives us type-safety, as well as allowing us to create unit tests for RFNoC radio_controls without having to create actual RPC servers and clients in the unit tests. This change also fixes a bug in mpmd_mb_controller::set_sync_source, where it was calling the wrong MPM function.
* uhd_images_downloader: Add environment variable for http authLane Kolbly2020-10-151-0/+1
| | | | | | | | | This allows the image downloader to download files from restricted sources using HTTP basic auth, specifying the credentials in the UHD_IMAGES_USER and UHD_IMAGES_PASSWORD environment variables: ``` UHD_IMAGES_USER=lane UHD_IMAGES_PASSWORD=MyS3cretPassword uhd_images_downloader.py ```
* tests: Add unit test for Keep One in N block controllerAaron Rossetto2020-08-051-0/+4
|
* tests: Add Replay Block controller unit testmattprost2020-08-041-0/+5
| | | | Signed-off-by: mattprost <matt.prost@ni.com>
* tests: Add unit test for siggen RFNoC block controllerAaron Rossetto2020-07-301-0/+4
|
* rfnoc: Add Switchboard block unit testsJesse Zhang2020-07-301-0/+4
|
* rfnoc: Support instance overrides in set_properties()Aaron Rossetto2020-07-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | This commit adds an enhancement to node_t::set_properties() in which the instance argument provided to the function (which normally applies to all properties in the key/value list) can be overridden on a per-property basis using a special syntax. If the key consists of the property name followed by a colon (':') and then a number, the number following the colon is used to determine which instance of the property this set pertains to, and the value passed via the instance parameter is ignored for that property. For example, in the following call: node->set_properties("dog=10,cat:2=5,bird:0=0.5", 1) instance 1 of node's 'dog' property is set to 10, the 1 coming from the instance parameter, instance 2 of the node's 'cat' property is set to 5 due to the override syntax provided in the string, and instance 0 of the node's 'bird' property is set to 0.5 due to its override. If the name/instance pair is malformed, e.g. 'value:=10' or 'value:foobar=10', a runtime error is thrown.
* tests: Add unit test for Moving Average RFNoC blockmattprost2020-07-161-0/+4
| | | | Signed-off-by: mattprost <matt.prost@ni.com>
* python: Add bindings for C++ CHDR ParserSamuel O'Brien2020-07-161-0/+1
| | | | | | | | | | | | | This commit adds pybind11 glue code for the userland chdr parsing code introduced in the uhd::utils::chdr namespace. Additionally, it moves some pybind11 adapter code to a common pybind_adaptors.hpp file which originally existed in the cal_python.hpp file. This commit also adds unit tests for the python bindings using a captured wireshark trace which is located in rfnoc_packets_*.py and some handwritten packets in hardcoded_packets.py Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
* utils: Expose CHDR Parsing APISamuel O'Brien2020-07-131-2/+1
| | | | | | | | | | | | This commit introduces a new public api in uhd::utils which allows serializing and deserializing chdr packets. As far as testing, this commit adds the chdr_parse_test test. It uses a wireshark trace located in rfnoc_packets_*.cpp as well as hand coded packets from hardcoded_packets.cpp to test the serialization and deserialization process Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
* rfnoc: Rename chdr_packet to chdr_packet_writerSamuel O'Brien2020-07-131-2/+2
| | | | | | | | | It would be confusing to have two classes named chdr_packet. As it makes more sense to name the new public chdr parser class chdr_packet, the internal uhd::rfnoc::chdr::chdr_packet class is being renamed to chdr_packet_writer to better represent its functionality. Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
* rfnoc: Add unit test for Log Power RFNoC blockAaron Rossetto2020-06-291-0/+4
|
* rfnoc: Add unit test for Window RFNoC blockAaron Rossetto2020-06-291-0/+4
|
* uhd: Create discoverable feature registry implementationLane Kolbly2020-06-251-1/+6
| | | | | | Classes which want to implement discoverable_feature can simply inherit from this registry and get access to an ergonomic map-backed registry of features.
* uhd: Add discoverable_features APILane Kolbly2020-06-251-0/+1
| | | | | | | | The "discoverable features" API handles how clients access the myriad features we offer, without simply adding a million has_FOO and do_FOO methods to radio_control and multi_usrp. discoverable_features allows clients to query the existance of, enumerate, and ultimately they get (by enum or by type) an object which implements their wanted feature.
* test: Add verify-flatbuffer testLars Amsel2020-06-231-0/+1
| | | | | | This runs update_fbs.py --verify as a unit test, and fail accordingly. The test passes if git executable is not found or the schema files are not within a git repo, because both are not a dependency of UHD.
* tests: Add unit test for FFT RFNoC blockAaron Rossetto2020-06-181-0/+4
|
* tests: Add infrastructure to run Python unit testsMartin Braun2020-06-151-0/+17
| | | | | | | | | | | | | | | | - Add UHD_ADD_PYTEST() CMake macro - Add CMake code to tests/CMakeLists.txt to auto-run all registered Python unit tests - Add a token unit test (it replicates parts of ranges_test.cpp) The way Python-based unit tests are implemented in UHD is that they can import uhd, and then operate on the module as usual. Writing unit tests in Python instead of C++ can have multiple advantages: - If they test PyBind-wrapped C++ code, they can test both the binding and the underlying C++ code at once - Writing unit tests in Python may be more concise
* rfnoc: Add unit test for Add/Sub RFNoC blockAaron Rossetto2020-05-281-0/+4
|
* tests: Add unit test for Split Stream RFNoC blockAaron Rossetto2020-05-281-0/+4
| | | | This commit adds a unit test for the split stream RFNoC block.
* tests: Add unit tests for pwr_cal_mgrMartin Braun2020-05-201-0/+6
|
* tests: Added unit test for Vector IIR RFNoC blockAaron Rossetto2020-05-191-0/+4
|
* cal: Add pwr_cal containerMartin Braun2020-04-171-0/+1
| | | | | | | This is a cal container for all types of power cal (RX or TX) that rely on a single, overall gain value. Includes Python API.
* tests: Add Fosphor block controller unit testWade Fife2020-04-141-0/+4
|
* tests: migrated rfnoc block tests to dedicated subdirectorymattprost2020-04-131-7/+25
| | | | | | | | This separates the rfnoc block tests into files for each specific block. This was done to improve the readability of these files and declutter the tests directory. Signed-off-by: mattprost <matt.prost@ni.com>
* uhd: Add fuzzy serial number checkingLane Kolbly2020-04-081-0/+6
| | | | | | | | | We have integer 32-bit serial numbers for MPM devices, for example "1234abcd". For serial numbers which have less than eight digits, e.g. "123abcd", a user may feel inclined to prefix this number with a 0 when they are searching for devices, e.g. "0123abcd". This change makes it so that specifying "0123abcd" will match a device with serial number "123ABCD".
* tests: Add FIR filter block controller unit testAaron Rossetto2020-04-071-0/+6
|
* uhd: math: Add interpolation.hppMartin Braun2020-04-071-0/+1
| | | | | | | | - Moves linear_interp from cal to utils - Moves the interp_mode enum class to interpolation.hpp - Adds three interpolation methods for maps: at_interpolate_1d(), at_nearest(), at_lin_interp() - Adds unit tests
* rfnoc: Add multichannel register interfacemattprost2020-04-021-0/+1
| | | | | | | | | | | This utility class implements the register access methods of reg_iface but adds built-in address translation features for consecutive instances of an RFNoC block. The register peek and poke methods accept an extra 'instance' parameter which is used to calculate the absolute address for the register access. This can be used for accessing registers for the different channels of a multi-channel block (i.e. Radio, DDC, DUC, etc). Signed-off-by: mattprost <matt.prost@ni.com>
* uhd: cal: Add iq_cal calibration data container classMartin Braun2020-04-021-0/+1
| | | | | | | | This class can be used to store calibration coefficients for the X300 DC offset and IQ imbalance calibration. Note: This also modifies Doxyfile.in to not document files generated by flatc.
* uhd: cal: Add database classMartin Braun2020-03-261-0/+1
| | | | | | This class contains methods to store and retrieve data from the local calibration database. Note that in this case, the "database" is just a bunch of files on the local filesystem.
* rfnoc: Create mock factoryMartin Braun2020-01-291-1/+0
| | | | | | 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.
* cmake: Find DPDK via pkg-config, if availableAlex Williams2020-01-221-2/+2
| | | | | | Debian uses pkg-config without the libdpdk.so linker script. Use the pkg-config file to grab the installed libraries and determine what to link to.
* tests: Port polling-mode dpdk_test to new DPDK frameworkAlex Williams2019-12-201-0/+16
| | | | | | The mock_send_transport and mock_recv_transport are used, which ends up with two layers of flow control. More work may be needed here for comparisons with the old data.
* dpdk: Add new DPDK stack to integrate with I/O servicesAlex Williams2019-12-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | docs: Update DPDK docs with new parameters: Parameter names have had their hyphens changed to underscores, and the I/O CPU argument is now named after the lcores and reflects the naming used by DPDK. transport: Add new udp_dpdk_link, based atop the new APIs: This link is tightly coupled with the DPDK I/O service. The link class carries all the address information to communicate with the other host, and it can send packets directly through the DPDK NIC ports. However, for receiving packets, the I/O service must pull the packets from the DMA queue and attach them to the appropriate link object. The link object merely formats the frame_buff object underneath, which is embedded in the rte_mbuf container. For get_recv_buff, the link will pull buffers only from its internal queue (the one filled by the I/O service). transport: Add DPDK-specific I/O service: The I/O service is split into two parts, the user threads and the I/O worker threads. The user threads submit requests through various appropriate queues, and the I/O threads perform all the I/O on their behalf. This includes routing UDP packets to the correct receiver and getting the MAC address of a destination (by performing the ARP request and handling the ARP replies). The DPDK context stores I/O services. The context spawns all I/O services on init(), and I/O services can be fetched from the dpdk_ctx object by using a port ID. I/O service clients: The clients have two lockless ring buffers. One is to get a buffer from the I/O service; the other is to release a buffer back to the I/O service. Threads sleeping on buffer I/O are kept in a separate list from the service queue and are processed in the course of doing RX or TX. The list nodes are embedded in the dpdk_io_if, and the head of the list is on the dpdk_io_service. The I/O service will transfer the embedded wait_req to the list if it cannot acquire the mutex to complete the condition for waking. Co-authored-by: Martin Braun <martin.braun@ettus.com> Co-authored-by: Ciro Nishiguchi <ciro.nishiguchi@ni.com> Co-authored-by: Brent Stapleton <brent.stapleton@ettus.com>
* tests: Add script to execute batch of benchmark_rate runsCiro Nishiguchi2019-12-061-0/+1
| | | | | Script runs benchmark_rate repeatedly, parses results, and calculates average, min, and max of each value reported.
* tests: Add check for life on DPDK portAlex Williams2019-11-261-0/+21
|
* lib,tests: Remove old DPDK files from buildAlex Williams2019-11-261-19/+0
| | | | The DPDK files are left behind as a reference, for now.
* transport: Implement an I/O service that uses an offload threadCiro Nishiguchi2019-11-261-0/+6
| | | | | | | 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.
* Remove proto-RFNoC filesMartin Braun2019-11-261-55/+2
| | | | | | | This commit removes all files and parts of files that are used by proto-RFNoC only. uhd: Fix include CMakeLists.txt, add missing files
* tests: Add benchmark of streamer and chdr xportsCiro Nishiguchi2019-11-261-7/+27
|
* tests: Make packet handler benchmark include flow controlCiro Nishiguchi2019-11-261-5/+6
| | | | | Add mock flow control to the packet handler benchmark to make it a better comparison to streamer_benchmark.
* rfnoc: tests: Let block unit tests use regular factoryMartin Braun2019-11-261-11/+1
| | | | | | | 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: Add DUC block controllerMartin Braun2019-11-261-0/+1
|
* rfnoc: DDC: Fix property propagationMartin Braun2019-11-261-1/+9
| | | | | | | | | - 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-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | 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: Add shutdown feature to blocksMartin Braun2019-11-261-0/+1
| | | | | | | | 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-261-0/+1
|