| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are simply shorthands, but make the code a little more readable
with respect to intent. It allows to replace
const double power_db = 10 * std::log10(power_lin);
with
const double power_db = lin_to_dB(power_lin);
which expresses the intent a little more clearly and concisely.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you run
tx_waveforms --power -20 [other args]
it will try to set the out power to -20 dBm. The signal amplitude is
factored in, so changing --ampl will not change the actual TX power
unless it causes clipping, or becomes too low.
If the USRP does not support setting a power, the program will terminate
early. If it does support setting a power, but can't reach the requested
power, it will coerce, and print the actual, available power.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This reverts commit 49ca8112c2777fcc4b81eff72ce59fb40fa0024d.
|
|
|
|
|
|
| |
The usrp_burn_mb_eeprom previously updated the EEPROM at the end of the
script, regardless of whether any values were actually specified for
write. This skips the EEPROM write for read only usage.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing implementation would create a real signal for any type of
signal (CONST, RAMP, SQUARE, and SINE), and then create the complex
signal by simply delaying the Q value by a 90 degree phase. This had
surprising results for all waveforms:
- CONST waveforms would have a baseband value of ampl + j ampl, thus
increasing the output power by 3 dB vs. what one would expect when
setting an amplitude. It is now ampl + j * 0, and the power is
ampl**2. This now makes the power consistent with SINE, which it was
not, even though a const signal is a sine signal with a frequency of
zero.
- SQUARE waveforms would phase-delay the Q part, thus resulting in three
power output levels (when both phases are zero, when both phases are
ampl, and when one of them is zero and other is ampl). However, the
square signal is useful for watching it in the scope, and there, it
helps if the power is predictably either high or low within the
selected frequency. The Q value is now always zero.
- RAMP waveforms had the same issue and were also resolved by setting
Q to zero.
- SINE signals were fine, although the implementation used sin + j cos
to calculate a complex sine, not cos + j sin according to Euler's
formula.
To make this wavetable more useful with absolute power settings, the
changes mentioned above were implemented. The dBFs power of CONST and
SINE can now be calculated by using ampl**2, SQUARE by using
(ampl**2)/2, and RAMP by solving the integral over a ramp from -1 to 1.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
This separates the rfnoc block tests into files for each specific block.
This was done to improve the readability of these files and declutter
the tests directory.
Signed-off-by: mattprost <matt.prost@ni.com>
|
|
|
|
|
|
| |
Add some additional documentation to the Configuration Devices and
Streamers and Transport Notes pages regarding stream arguments and
their use.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
A test to check the address was using a & instead of a %, resulting in
a -Wtautological-compare.
|
|
|
|
|
|
|
| |
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".
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
On systems which have spaces in the environment variables, such as
$PATH, attempting to run the generated test scripts will throw an error
about a bad variable name. Adding quotes around the values prevents
this error.
|
| |
|
|
|
|
|
|
|
|
| |
- Moves linear_interp from cal to utils
- Moves the interp_mode enum class to interpolation.hpp
- Adds three interpolation methods for maps: at_interpolate_1d(),
at_nearest(), at_lin_interp()
- Adds unit tests
|
| |
|
|
|
|
|
| |
There were spurious boost includes left in here after applying 7ad64600f
and a1f96194.
|
|
|
|
| |
CMAKE_CXX_FLAGS will now respect $CXX_FLAGS.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Up until now, we completely ignore the XDG specification.
This commit does the following to change that:
- It uses XDG_DATA_HOME and XDG_CONFIG_HOME for cal and config data,
respectively.
- If config data is in ~/.uhd/uhd.conf, that is still accepted, but if
it conflicts with $XDG_CONFIG_HOME/uhd.conf, it is ignored and a
warning is displayed
- The default location for cal data is thus ${HOME}/.local/share/uhd/cal
on Unix, and %LOCALAPPDATA%\uhd\cal on Windows. This is a change in
location!
- The UHD_CONFIG_DIR environment variable was confusingly named and is
now removed. It provided an alternative location than the home
directory. The same purpose is now much better served by XDG_DATA_HOME
and XDG_CONFIG_HOME.
The specification can be found here:
specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
|
|
|
|
|
|
|
| |
Allows RFNoC blocks to perform register peeks and pokes on blocks with
multiple channels without having to worry about handling register address
translation every time.
Signed-off-by: mattprost <matt.prost@ni.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This utility class implements the register access methods of reg_iface
but adds built-in address translation features for consecutive instances of
an RFNoC block. The register peek and poke methods accept an extra 'instance'
parameter which is used to calculate the absolute address for the register
access. This can be used for accessing registers for the different channels
of a multi-channel block (i.e. Radio, DDC, DUC, etc).
Signed-off-by: mattprost <matt.prost@ni.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The utilities uhd_cal_rx_iq_balance, uhd_cal_tx_iq_balance, and
uhd_cal_tx_dc_offset now add the flags to ignore cal files. Otherwise,
the utility would load existing cal data before generating new cal data.
Note that this is not a huge problem, because the cal coefficients get
overwritten during the cal process, but is unnecessary disk I/O.
This commit also happens to remove all boost::format uses within
usrp_cal_utils.hpp.
|
|
|
|
|
|
|
|
|
| |
This will convert cal data files based on CSV to the new binary format.
In most cases, running
./convert_cal_data.py
is sufficient.
|
|
|
|
|
|
|
|
|
| |
Now that we have cal::iq_cal and cal::database, there's no need to
manually wrangle CSV files for calibration data. This commit replaces
all CSV operations with cal::database calls and uses cal::iq_cal as
a container.
CSV files can still be read, but are considered deprecated.
|
|
|
|
|
|
|
|
| |
This class can be used to store calibration coefficients for the X300
DC offset and IQ imbalance calibration.
Note: This also modifies Doxyfile.in to not document files generated by
flatc.
|
|
|
|
|
|
|
| |
This adds uhd::usrp::cal::container, which serves as a base class for
calibration data.
It also provides the interp_mode enum class which can be useful for
future calibration classes.
|
|
|
|
|
|
|
|
| |
Most of the API calls that default an arg to ALL_CHANS or ALL_MBOARDS
were in fact broken. This adds a macro to efficiently mux out API calls
that take such wildcard arguments so we don't have to repeat the same
loop all over the place, even for those API calls that already correctly
implemented wildcards (for consistency).
|
|
|
|
|
|
| |
Add output of frontend info for RFNoC devices.
Signed-off-by: Michael West <michael.west@ettus.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On the new RFNoC with UHD 4.0 architecture, Basic/LF dboards use
a new operating paradigm. The streaming mode (real mode or
complex) is determined by setting the antennas (to A/B or AB/BA
respectively). Basic/LF RX dboards also support 2 frontends (0 and
1), and Basic/LF TX dboards support 1 frontend (0). This new
behavior only applies to applicable RFNoC devices (currently
X300/X310).
All pre-RFNoC devices (i.e. USRP2/N200 and earlier) maintain legacy
behavior. RFNoC with UHD 3.xx branches also maintains old behavior.
Signed-off-by: mattprost <matt.prost@ni.com>
|