aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/x300
Commit message (Collapse)AuthorAgeFilesLines
* radio: Improve log messages for non-implemented correctionsMartin Braun2021-09-081-2/+4
| | | | | This modifies some log messages or exception strings when using auto-correction APIs that are not supported by the underlying device.
* x300: Fix MAX_RATE_1GIGE valueMartin Braun2021-09-071-1/+1
| | | | It held the same value as MAX_RATE_10GIGE due to a typo.
* X300: Initialize struct variable before using itMartin Anderseck2021-08-201-1/+1
| | | | | | | In x300_eth_mgr.cpp the variable init is created but not initialized. Only some of the variables within the struct are then set before init is assigned to a different variable. Initialize the variable to prevent unexpected values.
* host: Add static_assert to prevent meta_range_t(0,0)Lane Kolbly2021-07-141-2/+2
| | | | | | | meta_range_t(0,0) actually calls the iterator-based constructor for meta_range_t, which is almost certainly not the intended constructor for that call syntax. Therefore, we add a static_assert to prevent such usage, and fix all failing instances.
* x3xx: Fix x3xx fpga image namemattprost2021-06-251-1/+1
|
* uhd: Remove all occurences of boost::math::*round()Martin Braun2021-06-242-7/+6
| | | | | | | Its behaviour is almost identical to std::lround, which we use instead. The only downside of std::lround is that it always returns a long, which we don't always need. We thus add some casts for those cases to make the compiler happy.
* x3xx: Improve image loaderMartin Braun2021-06-221-27/+44
| | | | | | | - When specifying a file path, no longer infer the FPGA type for the logging from the image that is currently loaded. - Use sanitize product names for ni-2974 everywhere were appropriate - Remove some usages of boost::format that weren't doing anything useful
* uhd: Add support for the USRP X410Lars Amsel2021-06-101-1/+3
| | | | | | | | | | | | | | | | 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>
* multi_usrp, x300: Relax LO set API strictnessAaron Rossetto2021-05-191-4/+8
| | | | | | | | | | | This PR relaxes the set_{rx|tx}_lo_{source|sources|export_enabled}() functions to allow them to be called with 'internal'/ALL_LOS or false/ALL_LOS on devices which do not support changing their LO source or exporting. This makes the get and set functions for those LOs settings more symmetrical in that the values returned from the get function can be successfully passed to the set function. Prior to this change, calling the set functions would throw an error indicating that the device does not support manual configuration of the LO.
* rfnoc: Add option to disable flow control on rx streamingmattprost2021-04-293-30/+69
| | | | | | | | | | | Disabling this feature will allow the USRP to send a continuous stream of Rx data to a host machine without throttling due to lack of flow control credits. This is unnecessary overhead on lossless transports such as pcie or aurora. Usage: add 'enable_fc=false' to stream_args.args Signed-off-by: mattprost <matt.prost@ni.com>
* X300: Reduce phase noise for 184.32 MHz MCRmichael-west2021-04-161-2/+5
| | | | | | | Reverts charge pump current changes for 10 MHz reference / 184.32 MHz master clock rate case that caused additional phase noise. Signed-off-by: michael-west <michael.west@ettus.com>
* uhd: Fix radio_control-related method constnessMartin Braun2021-03-171-2/+1
| | | | | | | | | | | | | | | | | The const-ness of some radio_control differed between base class and implementation. This fixes the consistency, but also makes sure these methods follow the rules for when to make methods 'const'. The following rules apply: - Methods that query static capabilities are const. Here, we made get_tx_lo_sources() const (the RX version was already const). - Getters that may have to interact with the device (e.g., peek a register) are not const, because the act of peeking is usually also non-const. Here, we changed get_rx_lo_export_enabled() to non-const. - All base classes are fixed such that the derived classes and the base classes have the same const-ness. Clang was warning about differences. This can cause very tricky bugs, where the radio_control_impl version can get called instead of the intended child class.
* host: Update code base using clang-tidyMartin Braun2021-03-173-102/+114
| | | | | | | | | | | | The checks from the new clang-tidy file are applied to the source tree using: $ find . -name "*.cpp" | sort -u | xargs \ --max-procs 8 --max-args 1 clang-tidy --format-style=file \ --fix -p /path/to/compile_commands.json Note: This is the same procedure as 107a49c0, but applied to all the new code since then.
* lib: Use const-ref in for loops instead of const-copyMartin Braun2021-03-041-1/+1
| | | | | | This is potentially a performance issue, even though it doesn't have a big impact in this context. Clang will warn about it, and this fixes the compiler warning.
* lib: Fix warnings related to unnecessary lambda capturesMartin Braun2021-03-041-1/+1
|
* lib: Remove unused constantsMartin Braun2021-03-042-2/+1
| | | | | The constants were either commented out, when their value is still useful to the reader, or removed if not.
* host: Update code base using clang-tidyMartin Braun2021-03-0413-114/+122
| | | | | | | | | The checks from the new clang-tidy file are applied to the source tree using: $ find . -name "*.cpp" | sort -u | xargs \ --max-procs 8 --max-args 1 clang-tidy --format-style=file \ --fix -p /path/to/compile_commands.json
* mpmd: Skip find if "resource" key is specifiedmichael-west2021-02-111-4/+2
| | | | | | | | | | | MPM devices were being discovered when trying to locate PCIe connected devices. Adding filter to exclude them if the "resource" key is specified in the device address arguments. Replaces "lib: disable non pcie types in find with resource" to reduce impact to older devices and remove API change. Signed-off-by: michael-west <michael.west@ettus.com>
* lib: disable non pcie types in find with resourceSteven Koo2020-10-051-2/+4
| | | | | | | mpmd find doesn't respect the "resource" arg hint and can be detected when "resource" is set. This results in incorrect device selection when using PCIe. This change adds detection for "resource" as a prefix in the device hints for mpmd and the other devices.
* x300,mpmd: Increase recv frames for dpdk streamingSteven Koo2020-09-031-0/+7
| | | | | | | | With the default 32 frames, high rate DPDK streaming would overrun or drop samples. This defaults num_recv_frames to 512 for DPDK, which has shown to resolve these issues. Signed-off-by: Steven Koo <steven.koo@ni.com>
* X300: Adjusting 10GbE frame sizes for HW limitsmichael-west2020-08-171-2/+2
| | | | | | | Lowering X300 10GbE default frame sizes to max size supported by hardware. Signed-off-by: michael-west <michael.west@ettus.com>
* rfnoc: Resolves streamer/link segfaults on pythonSteven Koo2020-08-111-11/+15
| | | | | | | | | This commit resolves a segfault that occurs during teardown. Since teardown isn't detereministic in python, there were cases where the graph would destruct before the streamers or links got chance to cleanup. This would result in a segfault. This change gives the lambda a shared pointer to the object the callback method is calling on, so that it won't destruct before being called.
* X300: Update frame sizes for 10GbEmichael-west2020-08-071-7/+5
| | | | | | | | | Setting default frame sizes for 10 GbE to match an Ethernet MTU of 9000, which is recommended in the UHD manual for the X300. The MTU detection code is left untouched, so it will automatically adjust if the MTU is lower than 9000. Signed-off-by: michael-west <michael.west@ettus.com>
* X300: fix for incorrect PCIe buffer size valuesMatthew Crymble2020-08-041-1/+1
| | | | added extra args to get PCIe buffer sizes from factory method
* x300: change default dboard clock rate from 50 to 100 MHzmattprost2020-08-042-5/+64
| | | | | | | | | | | | | | This sets the reference clock for X300 daughterboards (other than UBX) to 100 MHz by default to improve RF performance. Note: The UBX daughterboard requires a clock rate of no more than the max pfd frequency (50 or 25 MHz depending on the hardware rev) in order to maintain phase synchronization. If a UBX daughterboard is present on the X300, the clock rate for all daughterboards will be set to the pfd frequency by default. This is because of the limitation on X300 that requires the daughterboards to use the same clock rate. Signed-off-by: mattprost <matt.prost@ni.com>
* RFNoC: Add xport disconnect callbacksmichael-west2020-08-041-7/+20
| | | | | | | | | | | | Transports were not disconnecting their links from the I/O service upon destruction, leaving behind inaccessible send and recv links used by nothing. This led to I/O errors after creating several transports. Added callbacks to transports to automatically disconnect their links from the I/O service when the transport is destroyed. Updated all callers to supply a disconnect callback. Signed-off-by: michael-west <michael.west@ettus.com>
* x300: Update maximum bitstream sizeWade Fife2020-07-281-1/+1
| | | | | | Add 2 bytes to account for Vivado update number, in addition to major, minor, and AR. For example the current Vivado version string might be 2019.1.1_AR73068 whereas the previous string was 2018.3_AR71898.
* utils: Expose CHDR Types in Public APIrobot-rover2020-07-131-1/+1
| | | | | | | | | | This commit exposes uhdlib/rfnoc/chdr_types.hpp in the public includes. Additionally, it takes some types from uhdlib/rfnoc/rfnoc_common.hpp and exposes them publicly in uhd/rfnoc/rfnoc_types.hpp. Finally, one constant is moved from uhdlib/rfnoc/rfnoc_common.hpp to uhd/rfnoc/constants.hpp Signed-off-by: robot-rover <sam.obrien@ni.com>
* X300: Fix get_time_source()michael-west2020-06-101-0/+2
| | | | | | Store time source in set_time_source() call. Signed-off-by: michael-west <michael.west@ettus.com>
* x300: Enable power reference APIMartin Braun2020-06-101-2/+63
| | | | | | | | | This enables the power calbration API for X300 and X310. The uhd_power_cal.py script will be able to create calibration files for X300 series USRPs. The multi_usrp calls *_power_reference will be functional, assuming there is calibration data available for the given system.
* TwinRX: Remove decimation from frontendMichael West2020-05-121-4/+1
| | | | | | | | | | | | | | The decimation in the rx_frontend_gen3 was added to reduce the bandwidth between the Radio and the DDC due to the limitation in bandwidth over the crossbar for dynamically connected blocks. The default FPGA image for the X300 now has a static connection between the Radio and DDC, so this is no longer necessary. This change allows the TwinRX receive channels to be time aligned with channels from other daughterboards so they can be used in the same streamer. Signed-off-by: Michael West <michael.west@ettus.com>
* fixup! x300: lf/basic antenna API implementationMartin Braun2020-03-261-2/+2
|
* x300: lf/basic antenna API implementationmattprost2020-03-231-36/+83
| | | | | | | | | | | | | | | | This results in a change of operation for LF/Basic Boards on X300/X310 devices. The RX streaming mode will now be specified by the antenna rather than the subdev: (AB or BA for complex streaming, and A or B for real-mode streaming, with AB being the default antenna value). For real-mode streaming, data is collected as complex data with zeroed-out values in the quadrature domain. The subdevs for these boards have been changed to 0 and 1 for the RX channels, and 0 for the TX channel, in order to align with subdev specs of other RFNoC devices. Note: the old streaming mode paradigm is still in place for the N210.
* uhd: Apply clang-format against all .cpp and .hpp files in host/Martin Braun2020-03-0310-78/+73
| | | | | Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against.
* x300: add front-panel GPIO source controleklai2020-02-184-43/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a ZPU register to control the FP GPIO source. These are 2bits per GPIO pin, totalling 24 bits. 0 corresponds to RF-A, 1 corresponds to RF-B. The following Python code will control the upper 6 bits of the front-panel GPIO from the B-side radio on an X300: >>> import uhd >>> U = uhd.usrp.MultiUSRP("type=x300") >>> U.get_gpio_src_banks() ['FP0'] >>> U.get_gpio_src("FP0") ['RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA'] >>> U.set_gpio_src("FP0", ['RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFB', 'RFB', 'RFB', 'RFB', 'RFB', 'RFB']) >>> U.get_gpio_src("FP0") ['RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFA', 'RFB', 'RFB', 'RFB', 'RFB', 'RFB', 'RFB'] >>> # Make all GPIOs outputs: >>> U.set_gpio_attr("FP0A", "DDR", 0xFFF) >>> U.set_gpio_attr("FP0B", "DDR", 0xFFF) >>> # Control all GPIOs from software (not ATR): >>> U.set_gpio_attr("FP0A", "CTRL", 0x000) >>> U.set_gpio_attr("FP0B", "CTRL", 0x000) >>> # Bottom 3 pins go high from radio A >>> U.set_gpio_attr("FP0A", "OUT", 0x007) >>> # Top 3 pins go high from radio B >>> U.set_gpio_attr("FP0B", "OUT", 0xE00) Amends the gpio.cpp example to allow switching the source. Co-authored-by: Brent Stapleton <brent.stapleton@ettus.com>
* x300: Remove early x300_device_args usageAlex Williams2020-01-221-7/+6
| | | | | | | | Args were being parsed in x300_eth_manager::find(), before UHD could ascertain the args were intended for an X300 device (and not some other device). This caused unwarranted error messages to print in some cases. The changes here fix this and prevent the premature parsing and error messages.
* cmake: Find DPDK via pkg-config, if availableAlex Williams2020-01-221-0/+1
| | | | | | 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.
* uhd: Correct rx/tx EEPROM typoToni Jones2020-01-071-5/+5
| | | | Correct a typo differentiating RX and TX EEPROM paths.
* usrp: Change default number of data frames for X300Ciro Nishiguchi2019-12-201-16/+20
| | | | | | Change the default number of frames so that it works well when using offload threads, including DPDK. This matches the default number of frames in mpmd.
* transport,usrp: Make available packet-based flow controlAlex Williams2019-12-203-27/+33
| | | | | | | | DPDK provides a fixed number of fixed-size buffers for the receive window, so it needs packet-based flow control to avoid dropping packets. This change enables counting by packets. Co-authored-by: Ciro Nishiguchi <ciro.nishiguchi@ni.com>
* x300,mpmd: Enable DPDKMartin Braun2019-12-205-104/+79
| | | | | | | | | | | | | | x300: - Remove obsolete variables from x300_eth_mgr and X300 motherboard components - Added some documentation / comments - Use constrained device args in more places - Enables the use of use_dpdk=1 - Switches between regular (kernel-based) and DPDK UDP mpmd: - Merge link_if_ctrl for udp and dpdk_udp - Update cmake options
* x300: pcie manager updatesVirendra Kakade2019-11-262-129/+93
| | | | Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
* rfnoc: Merge I/O service device args with stream argsCiro Nishiguchi2019-11-261-2/+4
| | | | | This makes it possible for users to put I/O service-related args in either the device args or stream args.
* uhd: Introduce I/O service managerAaron Rossetto2019-11-263-70/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | - 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>
* uhd: Replace usage of boost smart pointers with C++11 counterpartsMartin Braun2019-11-267-15/+15
| | | | | | | | | | | | | | | | | | | 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.
* rfnoc: Unify endianness of transportsAlex Williams2019-11-263-3/+3
| | | | | Ethernet now uses the same serialization of the RFNoC stream as all the other transports.
* Remove proto-RFNoC filesMartin Braun2019-11-264-1914/+91
| | | | | | | 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-2618-939/+3665
| | | | | | | 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>
* rfnoc: Add mb_controller base class and X300/MPMD implementationsMartin Braun2019-11-263-0/+118
|
* x3x0: DPDK initialization fixmattprost2019-11-251-1/+1
| | | | | Pass original args into the x300_get_udp_factory() function. This exposes the fact that this is a DPDK connection.