The FIR filter applied gain. Removing it caused incorrect scaling and
signals where every other sample was zero. Also parameterized heterodyne
frontend processing so it would not use resources in images not
requiring it.
Signed-off-by: michael-west <michael.west@ettus.com>
This commit adds support for the UHD power calibration API on the E3xx
family of radios. It also updates the documentation to reflect this
support, and it adds support to the uhd_power_cal.py utility by adding a
"calibrator" subclass for E3xx radios.
GCC 13 (as usual for new compiler releases) shuffles around some
internal includes and so <cstdint> is no longer transitively included.
Explicitly include <cstdint> for uint8_t.
```
/var/tmp/portage/net-wireless/uhd-4.3.0.0/work/uhd-4.3.0.0/host/include/uhd/rfnoc/defaults.hpp:43:14: error: 'uint32_t' does not name a type
43 | static const uint32_t DEFAULT_NOC_ID = 0xFFFFFFFF;
| ^~~~~~~~
/var/tmp/portage/net-wireless/uhd-4.3.0.0/work/uhd-4.3.0.0/host/include/uhd/rfnoc/defaults.hpp:1:1: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
+++ |+#include <cstdint>
1 | //
```
Signed-off-by: Sam James <sam@gentoo.org>
This instantiates xport_adapter_ctrl objects in the x300_mb_iface, which
allows the X300 to support the get_chdr_xport_adapters() and
add_remote_ep_route() API calls. Effectively, this enables remote UDP
streaming for X300 devices, provided they have been updated to FPGA
compat number 7.3, which adds those features.
Co-authored-by: Virendra Kakade <virendra.kakade@ni.com>
Co-authored-by: Wade Fife <wade.fife@ni.com>
This allows accessing the advanced transport adapter capabilities on
X300, where there is no MPM to aid accessing it. It is functionally
equivalent to xport_adapter_ctrl.py.
Includes unit tests.
Co-authored-by: Virendra Kakade <virendra.kakade@ni.com>
- Bump firmware compat to 6.1
- Remove crossbar counter logic (the FPGA does *not* support crossbar
counters anymore, so we remove it from the firmware as well)
- Remove crossbar programming control (this is now provided by RFNoC
management packets)
- Remove UDP framing control (this is also provided by RFNoC management
packets)
- Remove Ethernet link/activity LED control (this has been handled by
the FPGA directly for years now)
- Add functionality to program transport adapter. The TA is programmed
directly on the settings bus, so for the most part, this is already
possible from the firmware. The only exception is the 'virtual'
register to program IP address and MAC at the same time. In the
firmware, it will perform an ARP lookup of the MAC address, and then
write the "normal" IPv4 address register in the TA, as well as the MAC
address registers.
- Updated bootram.coe
This fixes recognition of $error and $fatal statements in the output of
XSim when running run_testbenches.py. XSim apparently prints a "shift
in" character (0x15) as part of its error statements, so the regular
expression was not matching.
topo_node_t and topo_edge_t explicitly defined a default copy
constructor, but not a default copy assignment operator. Because that
violates the rule of three, requiring an implicit assignment operator
is considered deprecated since C++11, but only newer compilers are
starting to complain about it by emitting warnings.
These tests are designed to validate timed commands operating correctly
at various offsets. This is to support the multiple-samples-per-cycle
logic in the FPGA which enables multi-spc streaming on certain devices.
The tests cover devices with digital code shared in the RFNoC framework,
even if they do not strictly support multi-spc streaming.
Co-authored-by: Grant Meyerhoff <grant.meyerhoff@ni.com>
Co-authored-by: Wade Fife <wade.fife@ettus.com>
Signed-off-by: mattprost <matt.prost@ni.com>
This pulls in the FPGA changes that maintain timed sample alignment for
multi-sample-per-cycle streaming on X410 as well as other UHD-4.3 FPGA
changes.
Signed-off-by: mattprost <matt.prost@ni.com>
This adds additional asserts in peek32() to verify the returned packet
is valid. This is not a failure that was ever observed, but on the off
chance the ACK value is incorrectly returned, peek32() could segfault or
return corrupt data. Now, it would throw an assertion exception.
With gcc 12, this will fix some compiler warnings.
This adds time alignment to the radio, so that the first transmitted or
received sample gets shifted into the position corresponding to its
timestamp. The applies only to configurations in which SPC > 1.
For example, if the radio time is incrementing by 4 samples per cycle
(SPC = 4) starting at time 0, and a packet is supposed to be
transmitted at time 201, then the data must be left-shifted by one
sample (201 % 4 = 1), so that the first sample of the packet correctly
aligns with the radio sample corresponding to time 201. Things get more
complicated if the radio time is not a multiple of the SPC (i.e., the
radio time started at time 1, 2, or 3 instead of 0).
This module supports timed sample alignment by shifting radio words
with multiple samples per cycle to put the first sample into the
correct position for the required timestamp.
We currently do not set the calibration mode during ADC self
calbration. The default mode is selected in Vivado configuration.
Nevertheless we have seen issues where not setting the mode
lead to poor results in ADC self calibration.
This commit enable the RPC to call the set_calibration_mode
which was already implemented in our RFDC lib.
The current ADC self cal routine is written around the ZBX
daughterboard, which makes a lot of assumptions about abilities
and constants that only applies to ZBX but may not hold true
for future boards.
This commit move ZBX specific code of the self cal into the
ZBX daughterboard class. It also removes constants dedicated to
ZBX from the adc_self_cal_params_t struct.
Run 'dd' utility for 1 second to quickly benchmark the
write speed of the file location. A warning is then displayed
to the user if the rate/channel count/data type selection is
likely to cause overflows.
This modifies the command line parameters of rx_samples_to_file to
allow setting multiple RF channels to recieve from.
Data recieved from each channel is saved in a different file using
ch0_<filename> prefixes.
The scaling factor correction in the RX and TX streamers was inverted.
According to our manual (host/docs/properties.dox):
"""
A scaling value of 0.99 means that a signal that used to be fullscale
(max. amplitude of 1.0) will only have a maximum amplitude of 0.99. For
example, the DDC and DUC blocks use this property to signal how much
they have affected the amplitude. The TX and RX streamer objects can
then apply the inverse of this scaling factor to correct for the scaling
before returning the signal to the user.
"""
We are supposed to be applying the inverse, but we were applying the
scaling factor directly (not the inverse).
The 1/4-rate downconverter naively negated the input signals (y = -x)
which doesn't work when the signal is at full scale. In particular,
signals that are at full negative scale get converted to zeros (even
though 2's complement would be to return the same number, although that
would also be incorrect).
This fix changes it such that the smallest negative value gets converted
to the largest positive value.
This is not a mathematical correction inversion, but a minor amplitude
distortion. However, since we're already at full scale, and thus
probably clipping, this is preferable to the incorrect resolution of the
regular inversion. Put differently, there is no better value in this
case.
Mention that disabling the GPSDO can reduce phase noise when using an
external clock with E320. The language was copied from a similar note
in the N320 docs.
Edit: The original documentation by draeman-synoptic was modified to add
more clarity around how using `enable_gps` in UHD runtime args will
override the value of `enable_gps` in the device's MPM configuration.
Co-authored-by: mattprost <matt.prost@ni.com>
Signed-off-by: mattprost <matt.prost@ni.com>
Currently the E320's integrated GPSDO can be disabled using the
"enable_gps" argment at MPM initialization time (e.g. when the radio
powers on and launches the MPM daemon). However, there is no way for
a UHD application to disable the GPSDO at connection time.
This patch allows the existing "enable_gps" arg to be accepted when
initiating an MPM session from UHD, such that an application can pass
the arg "enable_gps=0" at connection time to disable the GPSDO. The
default power state of the GPSDO is restored when the session ends.
Edit: On top of the original commit by draeman-synoptic, the MPM minor
compat number was also increased to denote new non-breaking feature
support.
Co-authored-by: mattprost <matt.prost@ni.com>
Signed-off-by: mattprost <matt.prost@ni.com>