Commit Graph

10378 Commits

Author SHA1 Message Date
Martin Braun
781c1d50ee ci: Update CLA Assistant to v2.3.0 2023-07-13 10:25:19 -05:00
Martin Anderseck
69b9592438 docs: Update X4xx manual wrt. self-cal
The way how self-cal gets triggered and what can be done with it has
changed during the development of X440. This reflects these changes
and explains them.
2023-07-13 07:33:08 -05:00
Martin Anderseck
6604d20c3c SelfCal: Remove self-cal from boot and fpga update
This removes the ADC self-cal during X4xx bootup and when a new FPGA
bitfile was loaded because we now do this when the clocking
configuration was changed. This improves RF performance for X410 and
is required for the flexible sample rates of X440.
2023-07-13 07:33:08 -05:00
Martin Anderseck
bacfc70360 SelfCal: Enable parameters in self-cal executable
While the self-cal that is executed within a UHD session already had the
user-configurable parameters, this was not yet the case for this
stand-alone utility. This commit adds this.
2023-07-13 07:33:08 -05:00
David Raeman
ba6b8f867b cmake: Fix linking DPDK when installed at non-standard location
With DPDK 21.11 installed at a non-standard path, the UHD build process failed
to find its shared libraries (librte_*.so) while linking libuhd.so. The
-l flags were passed to the linker as bare filenames, but the -L flag was not
passed to specify the library search path (although that information was
provided to cmake by pkg-config). This patch uses the full path to DPDK
libraries at link time instead of bare filenames, which fixes this case.
2023-07-12 10:14:13 -07:00
Martin Braun
40dfa1655d lib: tests: Mark mock pop_host_tasks() as override
This avoids compiler warnings on recent compilers.
2023-07-12 09:43:23 -07:00
Martin Braun
4afc1d4ae2 lib: Add default virtual dtor to filter_node
This removes a compiler warning in recent clang.
2023-07-12 09:43:23 -07:00
Martin Braun
97c1eb9452 lib: fbx: Remove unused lambda captures
This produce warnings in more recent compilers.
2023-07-12 09:43:23 -07:00
Martin Braun
79247929b1 lib: max287x: Remove unused class attributes
These throw warnings in recent clang compilers.
2023-07-12 09:43:23 -07:00
Martin Braun
c0afac81bc docs: b200: Improve docs (auto MCR, GPIOs)
- Mention J400 and the ability to do GPIO on there
- Provide some examples on auto-MCR and its effects
- Add comments that changing MCR has ill effects on time synchronization
2023-07-12 09:41:28 -07:00
Martin Braun
efce8fcff9 fixup! mpm: Add LogRuntimeError class 2023-07-11 13:49:34 -05:00
Saarthak Mohan
cc36b4e35d examples: Add power controls to rx_ascii_art_dft.cpp 2023-07-11 11:46:08 -05:00
Grant Meyerhoff
8ebb33f723 ci: add step for x440 embedded runs 2023-07-11 11:45:39 -05:00
Martin Braun
659d7179ae ci: Disable PR runs for draft PRs 2023-07-10 15:08:35 -05:00
Phil Crump
1a6b554c0e host: Add cstdint include to fix gcc-13 compile.
In GCC 13 release some C++ Standard Library headers no longer
include other headers that were being used internally.
This means some headers that were implicit, now need to be included
in C++ programs explicitly.
This includes <cstdint>, and therefore compile of uhd host with
 gcc-13 is broken without explicitly including this header.
2023-07-10 12:39:37 -05:00
Mark Eid
367adaa35e fpga: x400: Fix PRC divider register map 2023-07-10 10:45:09 -06:00
Grant Meyerhoff
9c4f2f2319 devtest: remove benchmark_rate test for x440
The benchmark_rate test for x440 would require more than the 1GbE connection at the minimum rate

Since devtests cannot require special cabling, skip this devtest on x440
2023-07-10 09:53:30 -05:00
Martin Anderseck
55fd43cc27 SelfCal: Add startup_tile() for cal_mode selection
To follow Xilinx' recommendations for self-cal usage this adds
startup_tile() to the cal_mode selection and we query if the cal_mode
was set properly. Since we do this, on the host side we allow the full
first Nyquist zone to be used for self-cal.
2023-07-07 12:35:55 -07:00
Martin Anderseck
b4c24091ed SelfCal: Expose config parameters
Exposes the following ADC self-cal parameters on X4xx devices to be used
in the argument string:
-cal_freq
-cal_dac_mux_i
-cal_dac_mux_q
-cal_tone_duration
-cal_ch_list
-cal_delay
2023-07-07 12:35:55 -07:00
Martin Braun
51c1a74eee examples: Amend tx_waveforms.py to use DramTransmitter
When calling tx_waveforms.py with the --dram option, it will internally
use DramTransmitter and first upload the signal before transmitting it
from DRAM.
2023-07-07 12:35:55 -07:00
Martin Braun
73fd6f8c0d python: Add 'const' to get_continuous_tone(); improve sanity-checks
- 'const' is now a valid waveform
- Fixes an issue with generating ramps and handling floating-point
  inputs
2023-07-07 12:35:55 -07:00
Martin Braun
c42cd3617c python: multi_usrp: Remove spurious print 2023-07-07 12:35:55 -07:00
Martin Braun
55379ae7fe mpm: x440: Move clock info logging out of policy
The logging of the final clock settings object is moved into
X4xxClockManager so that no intermediate clock objects are logged.
2023-07-07 12:35:55 -07:00
Javier Valenzuela
ff722cb9c8 mpm: x4xx: add intermediate clocking setting
- Move the configuration of SPLL and MMCM into its own method
- In set_master_clock_rate(), call this with intermediate clock settings
  if we decide that going direct from one clock setting to another would
  cause harm/failures

Co-authored-by: Martin Braun <martin.braun@ettus.com>
2023-07-07 12:35:55 -07:00
Martin Braun
8acae88919 mpm: x4xx: Explicitly pass MCR values to set_sync_source()
Before this commit, set_sync_source() would require the master clock
rate to be set after reclocking, but would pull it out of the
X4xxClockManager object (using the _master_clock_rates attribute). Now,
the new master clock rate is passed to set_sync_source() via the args
argument.

Note that it is still possible (for backward compat) to not provide
a new MCR, in which case the assumption is that the current MCR still
remains valid.
2023-07-07 12:35:55 -07:00
Martin Braun
b6ef88e534 mpm: x4xx: Add master_clock_rates argument to _set_ref_clock_freq()
This avoids unnecessary statefulness of this function and fixes an issue
where during init(), external reference clock frequencies would be
validated against the wrong master clock rates.
2023-07-07 12:35:55 -07:00
Martin Braun
eaba13f86b mpm: x4xx: Add intermediate clock settings to clock policy
This allows the clock policy to determine intermediate clock settings
when going from one MCR setting to another. This can avoid MMCM lock
issues.
2023-07-07 12:35:55 -07:00
Martin Braun
8c108418c9 python: Add DramTransmitter class
This class is a utility to more easily using an available replay block as
a transmitter.
2023-07-07 12:35:55 -07:00
Martin Braun
5100c6e01f mpm: x4xx: Add rfdc rate as a sensor to X4xx dboards
This enables querying the converter rate through the sensor API:

```python
>>> U = uhd.usrp.MultiUSRP("type=x4xx")
>>> print(U.get_tx_sensor('rfdc_rate').to_real())
3000000000.0
```
2023-07-07 12:35:55 -07:00
Javier Valenzuela
987f545d94 mpm: x4xx: filter MCR list 2023-07-07 12:35:55 -07:00
Martin Anderseck
b3b5e69b02 SelfCal: Trigger if clocking has changed
This change ensures that ADC selfcal is triggered during session start
if the clocking was reconfigured. So it saves time if several
consecutive sessions are opened with always the same settings.
It also makes the ADC self cal run if in an open session either
set_clock_source(), set_time_source() or set_sync_source() are called
and a clock reconfiguration was triggered by that.
2023-07-07 12:35:55 -07:00
Martin Braun
cd754412e7 mpm: x4xx: Remove internal_temp_sensor
This sensor is undefined and not connected. It probably got into the
codebase by accident or copy&paste.
2023-06-30 10:42:30 -05:00
Martin Braun
569572a58b tests: Fix Python warnings in parse_benchmark_rate.py
- Main fix: Append 'r' prefix to regex strings where necessary
- Fix some other linter issues that are considered poor practices
- Change line endings to unix
2023-06-29 10:55:36 -05:00
Martin Braun
e3b8e3b45c python: Fix subdev_spec_t wrapping
Subdev specs can now be iterated over in Python as in C++:

```python
specs = usrp.get_rx_subdev_spec(0)
for spec in specs:
    print(spec.to_string())
```

This would previously fail, because Pybind11 did not know that the
subdev spec was iterable.
2023-06-29 09:39:47 -05:00
Martin Braun
fc58ee343f python: Wrap direction_t 2023-06-29 09:39:47 -05:00
Martin Braun
def8f201a6 python: stream: Overload TxStreamer.recv_async_msg()
This allows TxStreamer.recv_async_msg() to return the metadata instead
of modifying it in-place. The old API is still available.

```python
md = tx_streamer.recv_async_msg(timeout) # Returns None or metadata
```
2023-06-29 09:39:33 -05:00
Martin Braun
33ab459cbd docs: Make X410 dboard a subpage of the X4xx page 2023-06-29 08:26:03 -05:00
Matthew Crymble
8af66cdbfb ci: update docker builds to run twice a week
This also removes uncessary schedule triggers for other branches. The triggers
for those branches are contained in the version of this file in those branches.
2023-06-28 10:50:38 -05:00
Martin Braun
2c057a37e9 python: signal: Add more waveforms to get_continuous_tone()
Still defaults to sine, can now also do square and ramp.
2023-06-28 10:45:39 -05:00
Martin Anderseck
7f62283fb4 MPM: Updated default MCR for X440
This changes the default master clock rate for X440 to 368.64 MHz which
results in a converter rate of 2.94912 GSps which is in line with what
X410 uses.
2023-06-27 15:35:39 -05:00
Martin Braun
d8aa3914df lib: rfnoc: Use device cache for rfnoc_graph::make()
The factory rfnoc_graph::make() did previously not make use of
rfnoc::detail::make_rfnoc_graph(), which it should have. The purpose of
make_rfnoc_graph() is to avoid creating the same rfnoc_graph twice, the
same way that uhd::device::make() avoids that.

For example, the following code would raise an exception:

```python
U1 = uhd.rfnoc.RfnocGraph("addr=192.168.10.2")
U2 = uhd.rfnoc.RfnocGraph("addr=192.168.10.2")
```

The reason is, it would try to create the same rfnoc_graph object twice,
but the underlying rfnoc_device would be shared between those graphs.

With this fix, UHD will identify the second call to rfnoc_graph::make()
as a duplicate, and return the same object from a cache of weak
pointers. This is the same mechanism that multi_usrp uses for the exact
same purpose. Note that multi_usrp, even with RFNoC devices, did not
suffer from this issue, because it always called directly into
make_rfnoc_graph().

As an advanced, and generally not recommended use case, this even allows
the following:

```python
U = uhd.usrp.MultiUSRP("addr=192.168.10.2")
G = uhd.rfnoc.RfnocGraph("addr=192.168.10.2")
```

This is in general not recommended, because it is possible to get the
MultiUSRP and RfnocGraph objects out of sync (in a normal MultiUSRP
operation, the multi_usrp object owns the rfnoc_graph object to avoid
just that). However, there are some possibly interesting corner cases
where having direct access to the underlying rfnoc_graph object can be
useful. One such case could be to create faux multi_usrp like object
using Python's introspection features.
2023-06-27 11:06:02 -05:00
Grant Meyerhoff
797d093ea5 devtest: add exemptions for x440 python API test 2023-06-27 11:05:37 -05:00
Saarthak Mohan
996e7ab304 UBX: Initialize UBX set_tx_freq freq_lo variables to 0.0 2023-06-26 19:22:59 -05:00
Martin Braun
49a297efe4 docs: Update X4x0 manual
- Add X440 front panel and full-module renderings
- Add X440 FPGA section
- Update X4x0/X440 sections
- Add converter rate info
2023-06-26 19:22:29 -05:00
Wade Fife
c0504afce6 fpga: x400: Add X440 to default make targets 2023-06-26 10:45:10 -05:00
Wade Fife
e3794ba5ed python: Add X440 to image builder 2023-06-26 10:45:10 -05:00
Martin Braun
589b316433 python: rfnoc: Add radio_control.get_{ticks,time}_now 2023-06-23 11:00:19 -05:00
Martin Braun
6da6b5d246 python: Wrap stream_cmd_t::stream_mode
This attribute of a stream command was previously not exposed in Python,
probably due to an accidental omission.
2023-06-23 11:00:19 -05:00
Saarthak Mohan
b59f91aada host/docs: Fix link to MSVC Redistributable Package 2023-06-22 15:43:41 -05:00
Martin Braun
63a13c786c mpm: x4xx: Optimize clock configuration at init
Changes:
- X410 Honors the force_reinit flag now (like N310). When given, it will
  force a reinit of all clocking settings.
- When master_clock_rate is not given, and nothing else changes, then
  clocking configuration will be skipped. This shaves approx. 3s of
  startup time and avoids issues that can occur during clocking
  configuration.
- If anything changes, incl. clock/time source, then full clock
  configuration is still done.
- Multi-tile sync is done in all cases, as that happens outside of init()
2023-06-22 07:14:34 -05:00