Commit graph

2928 commits

Author SHA1 Message Date
Cristina Fuentes
2e64cb1b28 multi_usrp: Add get_mb_controller() API call 2020-09-24 15:16:45 -05:00
michael-west
01e9f2855b E3xx: Add retry to loopback_self_test
The loopback test sometimes fails.  It was found that it would pass on a
retry.  The root cause of the failure is unknown at this time, but the
retry allows the test to pass.  This is intended as a temporary patch
until the root cause of the failure can be identified.

Signed-off-by: michael-west <michael.west@ettus.com>
2020-09-11 23:39:58 -07:00
michael-west
ab9f4eab72 lib: Remove recursive locks in apply_corrections
There were locks in the apply_tx/rx_fe_corrections() methods that were
acquired before calling methods that re-acquired the locks.  The mutexes
were not recursive, so it caused applications to lock up.  The locks
are unnecessary in the top level methods, so they are being removed.

Signed-off-by: michael-west <michael.west@ettus.com>
2020-09-04 08:48:25 -07:00
Steven Koo
6d414a4f22 x300,mpmd: Increase recv frames for dpdk streaming
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>
2020-09-03 11:44:06 -05:00
Martin Braun
b9f9ca2d0f uhd: Add APIs for getting the available power range
The previously added APIs for getting/setting power reference levels was
missing an option to read back the currently available power levels
(minimum and maximum power levels).
This adds getters for TX and RX power ranges to multi_usrp and
radio_control. The power API is thus now more similar to the gain API,
which always had getters for gain ranges.
2020-08-17 16:22:35 -05:00
michael-west
3472938173 X300: Adjusting 10GbE frame sizes for HW limits
Lowering X300 10GbE default frame sizes to max size supported by
hardware.

Signed-off-by: michael-west <michael.west@ettus.com>
2020-08-17 15:07:34 -05:00
Aaron Rossetto
5333d0d932 multi_usrp: Use multi_usrp::sptrs in graph disconnect lambdas 2020-08-17 15:07:14 -05:00
Steven Koo
a518c5c771 uhd: Disable optimizations for Mac for build speed
twinrx_gain_tables takes long time to build with optimizations on
macOS / Clang. Turn them off for this platform.
2020-08-12 07:13:04 -05:00
Steven Koo
be5bee81c4 rfnoc: Resolves streamer/link segfaults on python
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.
2020-08-11 16:07:40 -05:00
michael-west
7b3bf4bdc0 X300: Update frame sizes for 10GbE
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>
2020-08-07 08:47:48 -05:00
Martin Braun
c969ccb039 mpmd: Clean out link_if_mgr
The link_if_mgr used to be a factory for Liberio, UDP, and DPDK. Now,
Liberio is gone and DPDK is handled by UDP. This makes the class
superfluous.

Instead of removing the class, we comment on this, and remove any DPDK
references from the file.
2020-08-07 07:25:08 -05:00
Steven Koo
e0443c37df mpmd: Assume mgmt interface can route CHDR packets
The e31x devices don't advertise CHDR interface availability when the
low power FPGA is loaded. Since the e3xx and n3xx all route CHDR
packets with Virtual NIC forwarding, it's safe to assume that if we can
communicate with the mgmt_addr, we can communicate via CHDR too.
We can then correctly set the reachability for the e31x from this
assumption.
2020-08-04 15:47:17 -05:00
Matthew Crymble
c13ba0d21f X300: fix for incorrect PCIe buffer size values
added extra args to get PCIe buffer sizes from factory method
2020-08-04 15:46:54 -05:00
mattprost
d1799df5a4 x300: change default dboard clock rate from 50 to 100 MHz
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>
2020-08-04 15:46:02 -05:00
michael-west
6647dacff1 MPMD: Fix typo
Fix typo in warning message when DPDK is specified at run time but not
enabled at compile time.

Signed-off-by: michael-west <michael.west@ettus.com>
2020-08-04 15:41:07 -05:00
michael-west
57c39779f1 multi_usrp: Fix connect/disconnect of RFNoC chains
- Added helper methods to connect and disconnect TX and RX chains.
- Directly create streamer objects and register local disconnect
methods to make sure chains are disconnected and the streamer is
removed from the graph when streamers are destroyed.

Signed-off-by: michael-west <michael.west@ettus.com>
2020-08-04 15:41:07 -05:00
michael-west
d7c64eb4b1 RFNoC: Add xport disconnect callbacks
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>
2020-08-04 15:41:07 -05:00
Steven Koo
25a0e462dd mpm: Default virtual NIC CHDR IP selection
This change adds detection for setting the correct internal
fpga CHDR IP address when using embedded mode.
2020-07-30 11:39:00 -05:00
Wade Fife
848cd56a2a x300: Update maximum bitstream size
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.
2020-07-28 16:17:11 -05:00
Aaron Rossetto
ad707ab22d mpm, mpmd: Bump MPM compat number 2020-07-24 15:24:14 -05:00
RobertWalstab
1d3866bef4 uhd: remove liberio 2020-07-20 16:01:03 -05:00
RobertWalstab
46f61951e8 mpmd: remove liberio 2020-07-20 16:01:03 -05:00
Steven Koo
ecd8eec17e filter API: Fix multi_usrp tx calls
Adding the fix to use fs_path instead of tx_rf_fe_root. This was done
to the rx methods and should have been done for the tx ones as well.
2020-07-17 13:09:38 -05:00
Martin Braun
e4291f1ddc multi_usrp: Add get_radio_control() API call
This is an advanced API call that allows direct underlying
access to the radio_control object for RFNoC devices.
2020-07-16 15:17:26 -05:00
Alex Williams
419d7dafa5 mpm,mpmd: Add iface type and mtu info for UDP links
This changes MTU handling for the "internal" UDP type. Because MPM
echo packets will not be returned for internal NICs, use the iface's
programmed MTU instead.
2020-07-16 10:00:12 -05:00
robot-rover
22837edfe2 utils: Expose CHDR Types in Public API
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>
2020-07-13 15:21:52 -05:00
Samuel O'Brien
b0cb065111 rfnoc: Rename chdr_packet to chdr_packet_writer
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>
2020-07-13 15:21:52 -05:00
Brian Padalino
966e3637b4 ad9361: Fix mask for product ID check
The product ID check should be masked with 0xF8 and checked to be 0x08.
With a device off and weak pull-ups, the readback would always read
0xFF, passing the ID check when it obviously wasn't there. Extending
the mask to be 0xF8 shows that both 0's and 1's are read back from the
device.
2020-07-09 09:51:32 -07:00
Martin Braun
f2f8ca056e cores: Remove shutdown function from spi_core_3000
This effectively reverts 0433e74. The set_shutdown() and get_shutdown()
API calls do not have a counterpart in simple_spi_core.v, which is
typically the HDL endpoint for this core driver, and thus could write to
a non-existent register. They are also never used in UHD, nor are they
part of the spi_iface interface.
2020-07-08 12:50:47 -07:00
Martin Braun
f9ad947cdc e3xx: Remove superfluous comments
This removes some comment that include code that still gets executed.
2020-07-08 12:47:47 -07:00
Andrew Lynch
5c1771cc68 CHDR: support multiple CHDR widths
Support management payloads on busses over 64 bits
Automatically set CHDR width for mpmd_link_if_ctrl_udp
2020-06-26 14:34:13 -05:00
Steve Czabaniuk
a9e91b0169 mpmd: Increase default long timeout to 30 seconds
Note: timeouts were occurring on n310 due to an increase in
daughterboard re-initialization time.
2020-06-22 15:48:58 -05:00
Steve Czabaniuk
1d71d453de multi_usrp: Assert that edge_lists are non-empty before accessing
The edge_list for a given rx/tx chain should never be empty so this
explicitly performs that check, which prevents a potential bad access.
2020-06-22 14:32:42 -05:00
Martin Braun
470e11a1f8 filter API: Fix Python bindings and multi_usrp calls
This fixes the following issues:
- The Python bindings did not declare parents for the various filter
  object classes properly. This meant that set_?x_filter wouldn't work,
  because the user would pass a specific type (e.g., analog_filter_lp),
  but the class would not recognize it as a filter_info_base.
- In multi_usrp.cpp, filter names are also property tree paths to make
  them unique. However, the setters and getters for filters would then
  prepend the FE path again, thus breaking those calls.
2020-06-10 12:46:33 -05:00
michael-west
985e691092 multi_usrp: Various multi_usrp_rfnoc fixes
- Fix serial and PID info in get_usrp_xx_info methods
- Make defaults match multi_usrp base class
- Make support of ALL_MBOARDS and ALL_CHANS consistent across all set
methods
- Make set/clear_time_commands honor the mboard argument
- Fix get_rx_lo_sources() to use rx_chain.block_chan
- Fix typos in get_tx_freq_range that were calling rx functions instead
of tx

Signed-off-by: michael-west <michael.west@ettus.com>
2020-06-10 12:45:50 -05:00
michael-west
595709a2b0 X300: Fix get_time_source()
Store time source in set_time_source() call.

Signed-off-by: michael-west <michael.west@ettus.com>
2020-06-10 12:45:50 -05:00
michael-west
39afddf42c MPMD: Fix RPC call to get GPIO source
Signed-off-by: michael-west <michael.west@ettus.com>
2020-06-10 12:45:50 -05:00
Martin Braun
02ff2f2654 x300: Enable power reference API
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.
2020-06-10 12:44:10 -05:00
Martin Braun
ae426043df b200: Enable power calibration API
This lets the B200 transmit and/or receive at given reference power
levels. Requirement is that the devices have been separately calibrated
with an external calibration device.
2020-06-03 15:14:01 -05:00
Martin Braun
d4e62f0d9d multi_usrp: Fix get_tx_freq() for RFNoC devices
get_tx_freq(), unlike get_rx_freq(), would not factor in the DSP
frequency. Before, this would happen:

    >>> U = uhd.usrp.MultiUSRP("type=x300")
    >>> tr = uhd.types.TuneRequest(1e9, 10e6)
    >>> res = U.set_tx_freq(tr)
    >>> res.clipped_rf_freq
    1000000000.0
    >>> U.get_tx_freq()
    1010000000.0

In other words, the TuneResult object was correct, but the return value
of get_tx_freq() was not. This fixes the issue.
2020-05-29 07:15:17 -05:00
Martin Braun
4cd86bbf2a multi_usrp: Amend get_usrp_{rx,tx}_info() to include cal keys
This adds two more keys to the dictionary return from
get_usrp_{rx,tx}_info() which can be used to query the calibration key
and serial.
2020-05-20 15:19:55 -05:00
Martin Braun
8aeb34d769 fixup! lib: Add power cal manager
- The tracking mode was not set to power when calling set_power()
- The data consistency check had an inverted logic, thus always printing
  a warning
2020-05-20 15:18:51 -05:00
Martin Braun
eb4bedf313 twinrx: Provide power cal ID
Note that the TwinRX has a different behaviour if two or one channel are
enabled. For that reason, TwinRX requires 8 different sets of
calibration data:
- For one vs. two channels
- For channel 0 and channel 1
- For RX1 and RX2

Since every combination of these settings is possible, that results in
2^3 == 8 combinations.

The choice of RX1 vs. RX2 is encoded in the calibration key. The choice
of one vs. two channels is also encoded in the calibration key, and is
derived using an expert node.
Channel 0 and 1 are assumed symmetric, thus, the encoding for those
happens in the calibration serial.
2020-05-19 13:30:36 -05:00
Martin Braun
307e6c5eab basic/lf: Add IDs for calibration purpose
This adds a property tree node "id" next to the "name" node. It is
always either basicrx/lfrx/basixtx/lftx based on the daughterboard. The
x300_radio_control uses this to help distinguish daughterboards for
calibration's sake, where length strings, potentially with special
characters, are too unwieldy.
2020-05-19 13:30:36 -05:00
Martin Braun
2d7676e8cf lib: Add power cal manager
This is a utility class that can be used by USRP or daughterboard
drivers to tie power calibration into their respective drivers.
2020-05-19 13:24:59 -05:00
Ciro Nishiguchi
231393123e rh: Remove unnecessary register read during set frequency
This unnecessary reads causes timed commands on rhodium to block. It
also makes it behave differently based on whether logging is enabled.
2020-05-15 16:21:51 -05:00
Ciro Nishiguchi
3ab92a83c8 uhd: Fix infinite recursion in N3xx timed commands
The implementation of set_command_time was calling wb_iface set_time,
which in turn makes a recursive call to set_command_time. This removes
the erroneous recursive call.
2020-05-12 12:04:39 -05:00
Michael West
1cdfe30725 multi_usrp_rfnoc: Misc fixes
- Change get_master_clock_rate() to return tick rate instead of sample
rate
- Make warning of incompatible rates conditional so it does not display
for first channel

Signed-off-by: Michael West <michael.west@ettus.com>
2020-05-12 12:03:31 -05:00
Michael West
d0c162bc7a TwinRX: Remove decimation from frontend
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>
2020-05-12 12:03:31 -05:00
Martin Braun
91378ee07f uhd: Add reference power level API to multi_usrp and radio_control
This adds the has_* API calls to the Python API.
2020-05-11 16:00:05 -05:00