aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* host: x4xx: gpio: Properly unmap FPGA GPIO valuesLane Kolbly2022-01-242-39/+44
| | | | | | The FPGA GPIO registers don't exactly match the pin numbering on the front panel and in the docs. This commit changes the algorithm so that the API presented to the user matches the front panel.
* ci: Generate installed binaries for downstream useSteven Koo2022-01-242-1/+15
| | | | | | | | | | CMake doesn't allow source path to change once set. This is problematic because downstream pipeline jobs could use the artifacts to test but have no way to install. Instead setup to install to uhdBuildDir-installed. Downstream jobs then then directly reference uhd from there. Signed-off-by: Steven Koo <steven.koo@ni.com>
* rfnoc: Ignore errors in ctrlport response packets if ACKs not wantedAaron Rossetto2022-01-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 0caed5529, a change was made to ctrlpoint_endpoint's behavior such that if a client does not care about checking for ACKs on poke or poll operations, the code calls `wait_for_ack()` with a flag indicating that it should not wait for the ACK, but find and remove the corresponding response from the response queue. This prevents the queue from potentially growing endlessly with response packets that the client doesn't even care about. However, this introduced a subtle, undesired behavioral change. When `wait_for_ack()` finds the corresponding response for a request, it also checks the status field of the response to report any errors flagged by the hardware such as invalid command, routing error, etc. Prior to the change mentioned above, since `wait_for_ack()` was never called when the client doesn't want ACKs, the client would never be never notified of any errors associated with the request. However, with the aforementioned change in placd, when `wait_for_ack()` is called to find and remove the unwanted response packet corresponding to the request, errors **are** checked and reported up the user. The behavior change was unearthed by the X410 ZBX CPLD initialization code, which writes an initial value of 0 to all ZBX CPLD registers--even read-only registers. A control request to write a read-only register results in a response with CMDERR in its status field, as it should. However, since the ZBX CPLD register initialization is performed with a `poke32()` operation which by default doesn't wait for ACKs, this was never a problem until the change to drain the response queue inadvertently caused the error to surface. The result is that creating a USRP session or RFNoC graph session to an X410 device is seen to occasionally fail with a 'RuntimeError: RuntimeError: Failure to create rfnoc_graph' message printed to the console. This commit preserves the desired queue-draining behavior, but ignores any error status on the response when it is found and removed from the queue, thus restoring the behavior pre-0caed5529.
* host: fix build with DPDK v21.11 LTSLuca Boccassi2022-01-206-49/+100
| | | | | | | | | | | | | Some APIs were changed with the latest DPDK LTS release, add some ifdefs to fix the build. Fixes https://github.com/EttusResearch/uhd/issues/547 Updated CMake file to reflect updated DPDK version. Fixed mbuf size to take ethernet headers into account. Updated documentation. Co-authored-by: Martin Anderseck <martin.anderseck@ni.com>
* host: Implement nameless_gain_mixinLane Kolbly2022-01-207-83/+151
|
* ci: Add displayNames to parametersSteven Koo2022-01-202-0/+14
| | | | Signed-off-by: Steven Koo <steven.koo@ni.com>
* ci: Add embedded builds to uhd mono pipelineSteven Koo2022-01-203-0/+144
| | | | | | | | This commit adds in meta-ettus build support into mono pipline. This uses the job implementation in from meta-ettus for the existing pipelines. Signed-off-by: Steven Koo <steven.koo@ni.com>
* fixup! cmake: Replace distutils.sysconfig with sysconfigSteven Koo2022-01-203-34/+20
| | | | | | | | The original commit incorrectly fails the build uhd in the meta-ettus context. This uses prefix instead to get the base path. Signed-off-by: Steven Koo <steven.koo@ni.com>
* lib: set dynamic_lookup and flat_namespaceSteven Koo2022-01-191-3/+4
| | | | | | This resolves some linking issues across binaries. Signed-off-by: Steven Koo <steven.koo@ni.com>
* tests: disable x4xx_radio_block_test on macOSSteven Koo2022-01-192-26/+32
| | | | | | | | 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>
* lib: Make simple_claimer atomicMartin Braun2022-01-141-38/+19
| | | | | | | | | | | | | | | This fixes multiple issues: - The simple_claimer was not truly atomic, it tested and set the locked-flag on separate lines - It used a Boost yield statement, although we're not running Boost threads - It used the deprecated UHD_INLINE macro We also remove spin_wait_with_timeout(), which was only used in claim_with_wait() because it's not worth putting into its own function. This is no API change on simple_claimer, but it may result in different performance of this spinlock.
* docs: Improve page on RFNoC block propertiesMartin Braun2022-01-141-13/+19
| | | | | | - Fix some minor formatting - Add emphases where appropriate - Minor clarifications
* deps: rpclib: Replace distutils.dir_util with shutilAaron Rossetto2022-01-141-2/+1
| | | | | This commit replaces the use of distutils.dir_util.copy_tree() with the equivalent function shutil.copytree().
* python: Use setup from setuptoolsAaron Rossetto2022-01-142-5/+2
| | | | | This commit replaces the use of setup() from distutils.core with setup() from setuptools.
* cmake: Replace distutils.sysconfig with sysconfigAaron Rossetto2022-01-143-12/+21
| | | | | | | | | | | | | | | | | | | | This commit replaces uses of distutils.sysconfig's get_python_lib() function with sysconfig's near-equivalent get_path() function to get the directory for site-specific, platform-specific files. Unfortunately, get_path() does not have a way to easily modify or strip the prefix applied to the path like get_python_lib() does, so the code must manually modify the path to get the same effect: - First, the platlib path is retrieved from the get_path() call. - Next, the default base that is used to form the pathlib path is queried via the get_config_var('base') call. - Next, the portion of the platlib path that matches the default base is stripped, and any leading path separator remaining is stripped. This fundamentally replicates the behavior of get_python_lib() with an empty prefix (i.e., the prefix positional parameter is specified as ''). - If a different prefix is desired, then the os.path.join() function is used to combine the new prefix with the stripped pathlib path, ensuring that the platform-specific path separator is used in crafting the path.
* cmake: Replace distutils with CMake for version checksAaron Rossetto2022-01-145-45/+145
| | | | | | | This commit replaces the use of distutils.version.LooseVersion() with CMake's version comparison operator, which implements relational version string checking in the same manner (i.e., comparing numeric components of a version string numerically).
* mpm: Demote WARNING on minor compat mismatch to DEBUGMartin Braun2022-01-141-1/+2
| | | | | | | | | | When the minor FPGA compat number on the device is ahead of what MPM expects, we no longer print a warning. That's because by definition, the FPGA is still compatible with the software in this case. If UHD or MPM require a certain minor compat number to enable a feature, the appropriate behaviour would be to print a warning only for that case.
* SPI: Add SPI exampleMartin Anderseck2022-01-142-0/+136
| | | | Add example to demonstrate and test SPI functionality.
* ci: Separate pipeline builds for different osmattprost2022-01-143-16/+70
| | | | | | This allows parameterizing pipeline runs to only build for certain os. Signed-off-by: mattprost <matt.prost@ni.com>
* SPI: Implement SPI engine for x410Martin Anderseck2022-01-1312-15/+491
| | | | | Add SPI Core host implementation for x410 and a discoverable feature to make it accessible.
* fpga: tools: Fix adding directories for HDL sourceWade Fife2022-01-131-1/+1
|
* fpga: hls: Add version to generated HLS IPWade Fife2022-01-131-2/+2
| | | | | | | | | This change causes HLS IP to be exported with a version of 1.0.0 instead of a date code. Due to a bug in Vivado, date codes after 0x7FFFFFFF (anything in 2022 or beyond) cause an error. Setting an explicit revision avoids this issue. See Xilinx AR 76960 for details.
* rfnoc: Always clear response queue in ctrlport_endpointMartin Braun2022-01-131-16/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the behaviour of ctrlport_endpoint (the register interface for block controllers) to always check for an ACK after doing a poke or poll of any kind. Previously, the behaviour was to only check for an ACK if the policy was set that way, or if the user requested the ACK to be received. The problem with the former approach was that if many pokes were performed without ever requesting an ACK or a poll, the response queue would fill up without ever getting emptied, eventually draining the available heap space. Note that this is not a memory leak in the usual sense, as the response queue was correctly holding on to the response packets. With this change, ctrlport_endpoint::wait_for_ack() now receives a require_ack parameter. If it is false, the behaviour of wait_for_ack() is changed as follows: - If the response queue is empty, immediately return with an empty response payload object. - Otherwise, continue reading elements out of the response queue until it is either depleted (in which case the previous rule kicks in), or we find the ACK corresponding to the command previously sent out. Note that this replicates the corresponding behaviour in UHD 3 (see ctrl_iface_impl::wait_for_ack()).
* fixup! uhd: Allow pass raw IQ data array to tone generatorLars Amsel2022-01-131-1/+1
|
* fpga: x400: Fix rfnoc_image_core.vh pathWade Fife2022-01-121-1/+1
| | | | | | Previously, when running rfnoc_image_builder, the rfnoc_image_core.vh file in the main x400 directory was being used instead of the one generated by rfnoc_image_builder.
* uhd: Fix non-standard function name macrosMartin Braun2022-01-127-14/+24
| | | | | | | | | | | | | | | | | Throughout UHD, we are using a random mix of __FUNCTION__, __func__, __PRETTY_FUNCTION__, and BOOST_CURRENT_FUNCTION. Note that the first two macros are non-standard (although many compilers understand them), and the last requires Boost. __func__ is available since C++11, but is not the best choice because the C++ standard doesn't require it to be of any specific value. We thus define UHD_FUNCTION and UHD_PRETTY_FUNCTION as portable macros. The former simply contains the undecorated function name, the latter the expanded function with full signature. As it happens, our currently supported compilers didn't have any issues using non-standard macros, so the main fix here is the removal of the Boost macros and the harmonization of the other macros.
* x300: Fix LED configuration for TwinRXMartin Braun2022-01-111-13/+53
| | | | | | | | | | | | | | The problem was that TwinRX has a special LED configuration (unlike most other daughterboards): Since it has two channels, it is possible to stream RX from both SMA ports. In that case, we would light up both LEDs in green (which was not happening, only one LED would light up, depending on which antenna was set last). This fixes the problem and turns on both LEDs when both channels are used, and both SMA ports are selected. Note that the reason for this issue was an incorrect porting of this code from UHD 3. There, we had separate LED ATR objects per channel.
* x300: clang-formatMartin Braun2022-01-1110-61/+65
|
* host: Make get_mb_controller publicLane Kolbly2022-01-111-13/+13
|
* host: tests: Make x4xx unit test support GPIOLane Kolbly2022-01-111-1/+1
|
* uhd: update git://github.com references to httpsSteven Koo2022-01-114-14/+14
| | | | | | | GitHub is removing support for using git://. Switch to https. https://github.blog/2021-09-01-improving-git-protocol-security-github/ Signed-off-by: Steven Koo <steven.koo@ni.com>
* e3xx: Fix frequency queryingMartin Braun2022-01-101-2/+11
| | | | | | | The E3xx devices have one LO per TX/RX, respectively. That means when changing the frequency on channel 0, the frequency on channel 1 also gets changed. The code didn't track this change properly: When setting channel 1, channel 0's frequency didn't match.
* RFNoC: Fix DSP frequency accuracymichael-west2022-01-104-12/+26
| | | | | | | | | | The host code was calculating and programming a 32-bit value for the DSP frequency, but the DDS modules in the FPGA only use the upper 24-bits. This led to inaccurate frequency values being returned. This change corrects the resolution of the value on the host side so an accurate value is returned. Signed-off-by: michael-west <michael.west@ettus.com>
* examples: support multiple streamers in benchmark_rateAndrew Lynch2022-01-101-43/+103
|
* rfnoc: Add atomic item size property for RFNoC blocksLars Amsel2022-01-1011-10/+232
| | | | | | | | | | | | | | | An RFNoC block (like the radio) might require a minimal number of items in each clock cycle, e.g. the radio has to process SPC (samples per cycle). Because data in RFNoC is transmitted and processed in packets, we have to make sure the items inside these packets are a multiple of the items processed in each cycle. This commit adds an atomic item size properties which is set by the radio and adapted by the streamers. The streamers adapt the SPP property of the radio block controller depending on the MTU value. This might lead to an SPP value which does not align with the SPC value of the radio block, hence we add a property resolver for the atomic item size.
* MPM: X410: Set correct tuning wordLars Amsel2022-01-101-1/+7
| | | | | | The comment behind the tuning word is correct but 0x200 does not give a voltage of 1.65V but 2.5V, because the full range of the DAC is 5V not 3.3V).
* rfnoc: transport: Check if streamers are connected in send() and recv()Martin Braun2022-01-102-2/+40
| | | | | | | | | | | | | | | | This adds a check in send() and recv() whether or not the streamer is actually connected. If not, an exception is thrown with the message: [rx_stream] Attempting to call recv() before all channels are connected! or [tx_stream] Attempting to call send() before all channels are connected! The check is a single boolean flag check, but it does add a branch in our hot code. Since this event is unlikely, and only happens in badly configured apps, we will get some help from the CPUs branch prediction to reduce the additional cost of this check.
* uhd: Allow pass raw IQ data array to tone generatorLars Amsel2022-01-101-4/+15
| | | | | | | | Instead of calculating a tone from its parameter it is also useful to pass an precalculated signal to be played. This change modifies the __init__ to take an iq_data as parameter for the internal buffer and moves the generation of the tone from rate, frequency and amplitude into a class method. The streamer parameter was deleted (never used).
* fpga: e320: Connect CTRL_IN pins to FPGAMartin Braun2022-01-102-1/+12
| | | | | | | | These pins control hardware-controlled fast-lock for tuning or cycle-accurate gain control. This commit does nothing to these pins other than expose them into the design and assign them to zero. This does not change the current behaviour (the motherboard has pull-downs on these pins, so they're low by default).
* fpga: e320: Remove copy/paste from N310 codeMartin Braun2022-01-101-9/+0
|
* mpm: x410: Fix docstrings related to GPS sensorsMartin Braun2022-01-102-2/+2
| | | | No code changes, only comment changes.
* mpm: e320/e31x: Fix lo-lock sensorsMartin Braun2022-01-102-16/+39
| | | | | | | | | | | | | The LO-locked sensors on these devices were getting routed to the MPM API call get_lo_lock_sensor(), which takes a 'which' argument (rx or tx). However, UHD wants to pass a 'chan' argument (0 or 1). The way the code was structured, it would always return 'False' (LO not locked) when the argument was neither 'rx' or 'tx'. The solution is to add get_rx_lo_lock_sensor() and get_tx_lo_lock_sensor(), which generate the appropriate 'which' argument, but discard the 'chan' argument (there is only one LO per Tx and Rx, respectively).
* e31x/e320: Amend LO-locked sensor namesMartin Braun2022-01-103-20/+37
| | | | | | | | | In UHD 3, we had two sensors names for LO lock on these devices: lo_lock, and lo_locked. The latter is the more standard, and is checked in examples like rx_samples_to_file. In UHD 4, the latter was removed without comment. This adds the sensor back again and also updates the documentation accordingly.
* host: multi_usrp: Merge set_tx_subdev_spec and set_rx_subdev_specLane Kolbly2022-01-101-99/+67
| | | | | This change simply refactors these methods so that the core of the algorithm is no longer duplicated between them.
* rfnoc: ddc/duc: Improve variable name for _set_freq()Martin Braun2022-01-072-4/+4
| | | | | | | | As Github user johnwstanford points out, the DUC calls the argument 'input_rate', which is wrong (and was copy/pasted from the DDC code). By calling it dds_rate in both cases, we avoid such confusion. This commit only renames a variable. No changes whatsoever.
* lib: SSPH: Fix comment for convert_to_in_buff()Martin Braun2022-01-071-2/+1
| | | | | | | As Github user dylan-baros points out, the comment is copy/pasted from the SRPH. Only comment changes here.
* rfnoc: radio: Fix comment in radio_control_implMartin Braun2022-01-071-1/+1
| | | | | As Github user johnwstanford kindly points out, the comment was incorrect.
* cmake: Set debug to -Og for Clang buildsSteven Koo2022-01-061-0/+1
| | | | | | This fails to link otherwise on macOS Signed-off-by: Steven Koo <steven.koo@ni.com>
* ci: refactor dockerOSName to buildOSNameSteven Koo2022-01-063-16/+16
| | | | | | dockerOSName is misleading because it could be in a bare metal context Signed-off-by: Steven Koo <steven.koo@ni.com>
* ci: build on macOSSteven Koo2022-01-065-7/+69
| | | | | | This adds macOS build support using homebrew Signed-off-by: Steven Koo <steven.koo@ni.com>