Commit graph

4086 commits

Author SHA1 Message Date
Cristina Fuentes
2e64cb1b28 multi_usrp: Add get_mb_controller() API call 2020-09-24 15:16:45 -05:00
Lars Amsel
bc20747808 cal: sync log output between file system and resource data
To make the debug output of the database more readable
the has_cal_data lookup for RC data prints the file that
is looked up similar to the lookup for file system.
2020-09-22 14:35:41 -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
Aaron Rossetto
8aedc75abc python: Add peek/poke bindings to noc_block_base 2020-09-03 22:17:02 -05:00
Steven Koo
21bf14cb99 rfnoc: replay: Update packet size on mtu update
Replay block would previously fail output on low mtu links because it
was creating packets based on the default contruction mtu of 8192.
This change will update the packet size when mtu gets updated.
This also removes a warning for large packet sizes because the replay
block uses a maximum packet size property. The block should be
free to coerce down based on mtu limitations.

Signed-off-by: Steven Koo <steven.koo@ni.com>
2020-09-03 16:25:24 -05:00
mattprost
d80d56114a twinrx: Bypass adf535x feedback divider
Bypass the LO1 feedback divider if it is not required. Some TwinRX units
have seen issues when tuning to frequencies between 3.5GHz and 5.1GHz
while following that data path.

Signed-off-by: mattprost <matt.prost@ni.com>
2020-09-03 15:02:05 -05:00
Wade Fife
148a2c5ee6 rfnoc: Set null source/sink block initial state
This gives the source generator some valid initial values in the Null
Source/Sink RFNoC block.
2020-09-03 15:01:34 -05:00
Aaron Rossetto
eada49e4d5 dpdk: Improve link status detection
This change improves the DPDK link status detection algorithm in the
following ways:

- The status of the links are checked at an interval of 250 ms. If all
  links report as being up, the driver proceeds.
- If any of the DPDK links has not reported as being up by the end of
  the link status detection timeout (1000 ms by default), the algorithm
  throws a runtime error rather than proceeds with one or more down
  links.
- Users may override the default link status detection timeout by
  passing dpdk_link_timeout=N, where N is the desired timeout in
  milliseconds, either via device arguments or in the UHD configuration
  file.
2020-09-03 15:01:12 -05: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
ettus
5e7c0e61a8 rfnoc: replay: Add support for 32-bit memory address widths
Increases the supported memory sizes in software to 2^32 and beyond.

Signed-off-by: mattprost <matt.prost@ni.com>
2020-09-03 09:40:34 -05:00
Steven Koo
da1aeaeccc rfnoc: enable SEPs with connect_through_blocks
Calling on connect with SEPs in the path is not supported. This change
enables connect_through_blocks to find SEPs in the connection chain
and link the src and dest blocks directly.

Signed-off-by: Steven Koo <steven.koo@ni.com>
2020-08-28 12:28:08 -05:00
Aaron Rossetto
03e1b13d3d rfnoc: Exit disconnect() early if nodes not in node map 2020-08-28 12:10:35 -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
ettus
8ec7449d43 dpdk: clean up destruction order of dpdk context members
Clear the io service map and the dpdk port map in the dpdk context
destructor to force them to destruct before the dpdk context.

Signed-off-by: ettus <matt.prost@ni.com>
2020-08-14 15:10:34 -05:00
Steven Koo
c4216a079b rfnoc: Increase ctrlport_endpoint default timeout
The .1 second timeout fails on macOS. Expand this timeout to 1 second.
2020-08-12 07:13:04 -05:00
Steven Koo
552b17c0de uhd: Remove assignment to const var for mac build
These values are already correctly set upstream and should not be
modified since params is const.
2020-08-12 07:13:04 -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
Wade Fife
4f387c8ff0 fpga: lib: Change max FFT size to 1024
The max FFT size was 4096, but we don't currently have any devices that
can do that without modification. This is because, currently, the FFT
size must be the same as the packet size, and the largest packet
size supported by most devices is about 8000 bytes, or 2000
sc16 samples. Therefore, the largest FFT size supported without
modifying other code is 1024 samples.

This change frees up about 21% of the LUTs and 36% of the BRAM used by
axi_fft and makes the software block controller and the IP agree on the
maximum FFT size.
2020-08-11 16:20:51 -05:00
Steven Koo
f9ef6757b1 rfnoc: Don't error when streamer isn't found
This commit resolves an issue where the disconnect call would fail
if the streamer was created, but not connected. If disconnect gets
called on a streamer that isn't on the graph, ignore it.
2020-08-11 16:07:40 -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
mattprost
fc3f91e0cf twinrx: update synthesizer register values for improved rf performance
Updated Register values for ADF5356:
R2) Expand Frac2 to a 28-bit value for ADF5356
R6) Use negative bleed current for improved spurious performance
R7) Set Fractional-N Lock Detect Precision to 12.0 ns because of bleed
currents
R8) Use magic number for reserved bits
R9) Fix VCO Band Division calculation for ADF5356
RD) Expand Frac2 to a 28-bit value for ADF5356

Signed-off-by: mattprost <matt.prost@ni.com>
2020-08-11 16:07:16 -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
michael-west
8212691688 Python API: Add bindings for disconnect APIs
Add Python bindings for recently added rfnoc_graph::disconnect()
methods.

Signed-off-by: michael-west <michael.west@ettus.com>
2020-08-07 07:43:58 -05:00
michael-west
3a2a3610c2 RFNoC: Revert change in streamer initialization
Reverting inadvertent change in num_chans argument during
tx/rx_streamer_impl construction.

Signed-off-by: michael-west <michael.west@ettus.com>
2020-08-07 07:43:58 -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
6c213ecd09 rfnoc: Remove M_PI usage to fix Windows builds
M_PI may not exist if _USE_MATH_DEFINES isn't defined before the
first include of math.h or cmath on Windows. This changes avoids the
issue all together by defining our own PI.
2020-08-07 07:24:16 -05:00
Aaron Rossetto
cf614ae5e0 python: Add Keep One in N block controller bindings 2020-08-05 07:47:22 -05:00
Aaron Rossetto
72e4cc81d2 rfnoc: Add Keep One in N block support 2020-08-05 07:47:22 -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
f372140610 RFNoC: Demote MTU message in radio control
Change message from warning to debug when spp is greater than MTU.

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
f659c1af8f RFNoC: Added support for destruction of streamers
- Added rfnoc_graph method to disconnect a connection.
- Added rfnoc_graph method to disconnect a streamer.
- Added rfnoc_graph method to disconnect a port on a streamer.
- Added disconnect callback to rfnoc_rx_streamer and rfnoc_tx_streamer.
- Registered disconnect callback functions to streamers returned by
get_rx_streamer and get_tx_streamer methods.

Signed-off-by: michael-west <michael.west@ettus.com>
2020-08-04 15:41:07 -05:00
michael-west
5a00f4d786 RFNoC: Add disconnect methods to graph
- Added method to disconnect an edge
- Added method to remove a node
- Fixed algorithm to check edges during connect.  Previous code was
checking some edges twice and allowing duplicate edges to be created
for existing edges.

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
mattprost
6d4c07d09a python: Add replay RFNoC block controller bindings
Signed-off-by: mattprost <matt.prost@ni.com>
2020-08-04 15:40:30 -05:00
mattprost
ef16cea9bd rfnoc: Add RFNoC replay block
Signed-off-by: mattprost <matt.prost@ni.com>
2020-08-04 15:40:30 -05:00
Aaron Rossetto
7afc84de16 rfnoc: Fix compilation error when tracing enabled 2020-07-31 15:33:30 -05:00
Aaron Rossetto
fec41cd6a1 python: Add siggen RFNoC block controller bindings 2020-07-30 13:03:16 -05:00
Aaron Rossetto
19171e719c rfnoc: Add siggen RFNoC block controller support 2020-07-30 13:03:16 -05:00
Jesse Zhang
aca52b7002 python: Add Switchboard block python bindings 2020-07-30 12:51:11 -05:00
Jesse Zhang
152823d508 rfnoc: Add Switchboard block support 2020-07-30 12:51:11 -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