| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds a utility class for use with the Python RFNoC block
controller PyBind bindings which facilitates constructing instances of a
specific block controller type from its noc_block_base base class. This
allows Python code to create and configure specific block controller
instances by calling get_block on a uhd.rfnoc.RfnocGraph object with the
block ID of the block in question and then passing the result into the
constructor method of the block controller, e.g.:
graph = uhd.rfnoc.RfnocGraph("addr=...")
block = graph.get_block(uhd.rfnoc.BlockID("0/DDC#0"))
ddc = uhd.rfnoc.DdcBlockControl(block)
ddc.set_input_rate(10e6, 0)
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
The split stream RFNoC block is an RFNoC block that takes in a single
CHDR stream and duplicates it, creating a number of output streams for
each input stream. Consult the split_stream_block_control class header
file for more details on block configuration and behavior, including how
property and action forwarding is handled by the block.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds a new forwarding policy for properties and actions,
USE_MAP. This forwarding policy causes the node to consult a
user-provided map to determine how to forward the property or action.
The map's key is the source edge of the incoming property or action,
while the value is a list of destination edges to which the property
should be propagated or action should be forwarded. It allows clients to
construct sophisticated forwarding behaviors for specialized blocks,
such as a split stream block that needs to forward properties and
actions only to specific output edges based on the incoming edge.
|
|
|
|
|
|
| |
This commit fixes a bug in node_t::_has_port(), which was using the
wrong comparison operator to determine if the instance value in the
incoming res_source_info parameter is within a valid range.
|
|
|
|
|
|
|
| |
- min_power and max_power arguments were swapped. They were always
called correctly, so this is more of a documentation fix.
- Add a unit test for the case where power values are not regular, which
is the normal case with real data.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
This allows asking the radio for the keys it uses to read/write its
calibration data.
By querying radio_control::get_{rx,tx}_power_ref_keys(), the return
values can be used to access uhd::usrp::cal::database::read_cal_data().
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the possibility to read cal data from flash/EEPROM by adding
callbacks to the database. Unlike the RC and FILESYSTEM data, this is
very device-specific, but we can let devices register callbacks in the
database so that reading cal data from flash can use the same APIs as
from RC or filesystem.
Note that this also gives a convenient way to inject call data during
unit tests, if desired.
|
|
|
|
|
|
|
| |
This is a refactoring with no functional change. Instead of hard-coding
the lookup of RC and FILESYSTEM data, we loop over a structure holding
those. This will make it easier to add more types of data lookup in the
future.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The pwr_cal::get_gain() method previously held the incorrect assumption
that power values per frequency would be equidistant, i.e., be at the
same indices as the gain values. Due to the frequency-dependent nature
of the hardware, this is not a valid assumption (if that were the case,
frequency-dependent calibration would be unnecessary).
This changes get_gain() to not rely on that assumption. Note that it
requires doing some more rounding: The bilinear interpolation method
uses requires coordinates to be on a rectangular grid. This snaps the
power values onto a single coordinate.
|
|
|
|
|
| |
This is a utility class that can be used by USRP or daughterboard
drivers to tie power calibration into their respective drivers.
|
|
|
|
|
| |
This unnecessary reads causes timed commands on rhodium to block. It
also makes it behave differently based on whether logging is enabled.
|
|
|
|
|
| |
If a timed command is in the queue, writes use a large timeout.
Changing reads to do the same.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
Sets time increment based on tick rate and sample rate instead of
assuming one tick per sample. Defaults to legacy behavior.
Minor compat number bumped on DUC and DDC blocks.
Signed-off-by: Michael West <michael.west@ettus.com>
|
|
|
|
| |
This adds the has_* API calls to the Python API.
|
|
|
|
|
|
|
| |
This changes two things in all applicable files:
- Remove imports from __future__
- Change default shebangs from /usr/bin/env python to /usr/bin/env
python3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current code had an assertion
UHD_ASSERT_THROW(stream_cmd.num_samps <= 0x0fffffff);
which would check that num_samps in a stream command don't exceed the
counter depth in the FPGA. However, this is only relevant if the stream
command is not "continuous" or "stop".
num_samps could be unitialized, and randomly have a value larger than
the maximum, and the assertion could trigger even though the value in
num_samps is irrelevant.
The new assertion checks for the correct case, and has a more verbose
error message.
|
|
|
|
|
| |
This implementation of multi_usrp is only for non-RFNoC devices; the
section was thus dead code.
|
|
|
|
|
|
|
|
|
| |
Adds UHD_UNUSED() to tag variables that is only used in
a UHD_LOG_TRACE() macro.
Note this would be also be possible by tagging the local functions
{rx,tx}_band_to_log as unused, but g++ does not support that specific
kind of attribute, at least in the current versions.
|
|
|
|
|
| |
Adds UHD_UNUSED() to tag a variable that is only used in
a UHD_LOG_TRACE() macro.
|
|
|
|
|
|
| |
When the compile log level is higher than TRACE, the UHD_LOG_TRACE()
macros get removed, which can lead to unused variables. This modifies
UHD to avoid those warnings, with no functional changes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the following API calls:
- multi_usrp::has_{rx,tx}_power_reference()
- multi_usrp::set_{rx,tx}_power_reference()
- multi_usrp::get_{rx,tx}_power_reference()
- radio_control::has_{rx,tx}_power_reference()
- radio_control::set_{rx,tx}_power_reference()
- radio_control::get_{rx,tx}_power_reference()
It also adds a manual page explaining the philosophy of the API.
Note that this does not actually add this feature to any device
implementation. Calling the new API calls will thus result in
`uhd::not_implemented_error` exceptions being thrown. This commit is to
lock down the API and ABI.
|
|
|
|
|
|
|
| |
This is a cal container for all types of power cal (RX or TX) that rely
on a single, overall gain value.
Includes Python API.
|
|
|
|
|
|
| |
This allows to treat a std::map<KeyType<std::map<KeyType, ValueType>> as
a set of x-y coordinates, and bilinearly interpolate a z-value given
four x/y pairs.
|
|
|
|
|
|
|
|
|
|
|
| |
Starting with 1.0.22, libusb considers libusb_set_debug() deprecated.
This replaces said call with libusb_set_option(), conditionally on the
libusb version. This has no effect on the execution, but will remove
some compiler versions, and make this code more future-proof.
Note that Ubuntu 18.04 ships libusb 1.0.21, so this conditional code
needs to remain until that version is deprecated and libusb version is
bumped higher.
|
| |
|
|
|
|
|
|
|
| |
It was possible that output to cout would become interleaved inside of the
uhd log messages.
Signed-off-by: mattprost <matt.prost@ni.com>
|
|
|
|
|
| |
This removes -Wmaybe-uninitialized and -Wclass-memaccess from this file
when using gcc.
|
|
|
|
|
| |
At /mboards/0/usb_version, we can now read back an int. It's either 2 or
3, depending on what we're using.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using multi_usrp with an RFNoC device, the previous behaviour was
to throw an exception when calling recv_async_msg() so users would know
they're not supposed to call it (calling tx_stream::recv_async_msg is
preferred). However, this breaks too many existing applications.
Instead, we keep a weak pointer to the streamer, the same way that older
devices do, and query the async message from that. This means that
calling recv_async_msg() when there are multiple streamers can lead to
unexpected behaviour, but that's a general issue with
multi_usrp::recv_async_msg() and this way, the RFNoC devices now behave
like older devices do.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds (and calls) methods to manually pass radio block sample rate
to the input/output properties of the ddc/duc during creation of the
multi_usrp_rfnoc object. The ddc/duc require this information in order
to return valid, possible output/input sample rates in
get_rx_rates()/get_tx_rates().
Before, the ddc/duc wouldn't have this rate until the rfnoc_graph had
been connected and committed, which happens in
get_rx_stream()/get_tx_stream(). Thus, this fixes an issue where a user
was unable to query possible sample rates prior to specifying a sample
rate and creating a stream.
|
|
|
|
|
| |
This replaces incorrect code with the proper function calls to retrieve
the range of possible sample rates.
|
| |
|
|
|
|
|
| |
The current reset routines write a '1' twice for reset, instead of '0'
then '1' (resets get triggered on a rising edge).
|
|
|
|
|
|
|
| |
If a user specifies a multi-device query, such as "serial0=1234,serial1=4321",
we have to look up the preferences for each device. To minimize the
impact to non-x400 devices, I simply push the get_usrp_args call down
into mpmd_impl and mpmd_find.
|
| |
|
|
|
|
|
| |
Pragma once is the more modern version of include guards, eliminating
any potential problems with mistyping include guards. Let's use those.
|
|
|
|
|
|
|
|
|
| |
We have integer 32-bit serial numbers for MPM devices, for example
"1234abcd". For serial numbers which have less than eight digits,
e.g. "123abcd", a user may feel inclined to prefix this number with
a 0 when they are searching for devices, e.g. "0123abcd". This change
makes it so that specifying "0123abcd" will match a device with serial
number "123ABCD".
|