aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* tests: Remove packet_handler_benchmarkMartin Braun2022-06-101-5/+0
| | | | | | This was a test written in the early stages of re-writing UHD for the 4.0 release. It tests things that are no longer in use for UHD 4, thus, the test can go as well.
* host: Implement nameless_gain_mixinLane Kolbly2022-01-201-0/+1
|
* tests: disable x4xx_radio_block_test on macOSSteven Koo2022-01-191-26/+31
| | | | | | | | This commit disables x4xx_radio_block_test on macOS because the platform has stricter casting and symbol export rules, which causes this test to fail. Signed-off-by: Steven Koo <steven.koo@ni.com>
* SPI: Implement SPI engine for x410Martin Anderseck2022-01-131-0/+1
| | | | | Add SPI Core host implementation for x410 and a discoverable feature to make it accessible.
* host: rf_control: Add internal antenna API abstraction.Lane Kolbly2022-01-051-0/+1
|
* cmake: tests: Conditionally compile tests for X400Martin Braun2021-12-081-30/+32
| | | | | When using ENABLE_X400=OFF, we should also disable the corresponding tests, or we get linker errors.
* host: x4xx: Implement GPIO APILane Kolbly2021-11-031-0/+2
| | | | | | | | | | | | This implements the GPIO API for X410 through get_gpio_attr and set_gpio_attr. In ATR mode, which channel's ATR state is chosen by the set_gpio_src call, setting e.g. DB0_RF0 for channel 0 or DB0_RF1 for channel 1. In manual mode, all 24 bits (for both ports) are set in a single register write. Although the front panel of the device has two ports, labelled GPIO0 and GPIO1, this API exposes them as though they were a single 24-bit GPIO port.
* cmake: Replace CMAKE_{SOURCE,BINARY}_DIR with UHD_*_DIRMartin Braun2021-09-101-70/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | See the CMake 3.8 documentation on these two variables: https://cmake.org/cmake/help/v3.8/variable/PROJECT-NAME_SOURCE_DIR.html https://cmake.org/cmake/help/v3.8/variable/CMAKE_SOURCE_DIR.html Under normal circumstances, these two are identical. For sub-projects (i.e., when building UHD as part of something else that is also a CMake project), only the former is useful. There is no discernible downside of using UHD_SOURCE_DIR over CMAKE_SOURCE_DIR. This was changed using sed: $ sed -i "s/CMAKE_SOURCE_DIR/UHD_SOURCE_DIR/g" \ `ag -l CMAKE_SOURCE_DIR **/{CMakeLists.txt,*.cmake}` $ sed -i "s/CMAKE_BINARY_DIR/UHD_BINARY_DIR/g" \ `ag -l CMAKE_BINARY_DIR **/{CMakeLists.txt,*.cmake}` At the same time, we also replace the CMake variable UHD_HOST_ROOT (used in MPM) with UHD_SOURCE_DIR. There's no reason to have two variables with the same meaning and different names, but more importantly, this means that UHD_SOURCE_DIR is defined even in those cases where MPM calls into CMake files from UHD without any additional patches. Shoutout to GitHub user marcobergamin for bringing this up.
* 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