* host: libbladeRF: add functions to get/set ADF4002 refclk frequency
* host: bladeRF-cli: add print/set adf_refclk
* host: python: add adf4002_refclk functions
This permits getting and setting the ADF4002 reference clock
frequency.
>>> import bladerf
>>> b = bladerf.BladeRF()
ad9361_init : AD936x Rev 2 successfully initialized
>>> b.adf4002_refclk
10000000
>>> b.adf4002_refclk = 9000000
>>> b.adf4002_refclk
9000000
>>> b.adf4002_refclk = 900000000
[ERROR @
"/home/rtucker/dev/privatebladeRF/host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c":4360]
bladerf_adf4002_set_refclk: bladerf_adf4002_calculate_ratio failed:
Provided parameter was out of the allowable range
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/home/rtucker/dev/privatebladeRF/host/libraries/libbladeRF_bindings/python/bladerf.py",
line 1581, in set_adf4002_refclk
_check_error(ret)
File
"/home/rtucker/dev/privatebladeRF/host/libraries/libbladeRF_bindings/python/bladerf.py",
line 998, in _check_error
raise globals()[errorval.name](err)
bladerf.RangeError: Provided parameter was out of the allowable range
>>> b.adf4002_refclk
9000000
>>> b.adf4002_refclk = 10000000
>>> b.adf4002_refclk
10000000
* host: libbladeRF: make ADF convenience functions static
bladerf_adf4002_set_refclk is much nicer (and safer) than calculating
the R/N ratio and then doing a bladerf_adf4002_configure.
* host: python: update cffi header block
* host: libbladeRF-bindings/python: general updates
This commit adds the following changes:
Overall:
* Adds an _import_header.py tool, which parses libbladeRF.h (or other
headers) into a convenient string ready for ffi.cdef
* Passes pycodestyle and pyflakes checks cleanly
bladerf.py:
* Various new class wrappers for enums, etc
* Subclassed exceptions (e.g. bladerf.UnsupportedError will be raised if
libbladeRF returns BLADERF_ERR_UNSUPPORTED)
* Added functions for bootloader firmware recovery
* More comments all around
* Use properties instead of getters/setters:
>>> b = bladerf.BladeRF()
>>> # OLD:
>>> b.get_devinfo()
>>> b.set_clock_select(ClockSelect.External)
>>> # NEW:
>>> b.devinfo
>>> b.clock_select = ClockSelect.External
* Added more functions, particularly for bladeRF 2
* Added a Channel class, for channel-specific properties:
>>> b = bladerf.BladeRF()
>>> ch = d.Channel(bladerf.CHANNEL_RX(0))
>>> ch.frequency = 2.45e9
bladerf-tool.py:
* General changes to use properties instead of get_/set_ functions
* Also updated to use subclassed exceptions from bladerf.py
* Dump a lot more info with the 'info' command
* Look for bootloader devices with the 'probe' command
* Added 'recover_fw' command, for firmware recovery
* Moved from single-channel paradigm to MIMO paradigm on 'rx', 'tx'
* host: python: implement more methods, various fixes
Implement loopback, rx_mux, ad9361_temperature, and adf4002_* functions
Fix set_clock_select type handling
Use 4-space indent in cffi block, for placating text editors
Add -v option to bladerf-tool.py info, to clean things up a bit
Some are missing, others are too noisy in practice. Uniformly return BLADERF_ERR_UNSUPPORTED.
* host: bladerf2: test for board support in bias_tee
* host: bladeRF2: be quieter on unsupported gain mode query
* host: bladerf2: check for compat on ina219 reads
* host: libbladeRF/bladerf2: fixup remaining board compat checks
Allow user to control which Si53304 clock input to select: onboard
VCTCXO or external UFL clock. The external clock must be present before
changing the active clock, otherwise the host connection to the bladeRF
will drop.
Intended for use by bladeRF-micro, which has a TPS2115A auto power
mux. The function will read the power status bit from the Nios GPIO and
set the human-readable enum corresponding to the active power source.
Changed from "output" to "inout" to accept inputs. In this mode, the
GPIO has two independent buses, one for input, one for output. In order
to maintain previous behavior, which allowed the Nios to read the
current values being output, we must explicitly feed back the output bus
to the input bus.
Add bladerf_p.vhd package, which handles nios_gpio packing and unpacking
between bits and record elements. This consolidates bit-to-function
mapping, making it easier to modify the mapping in the future.
This package also defines the FIFO record types and the nios_system
component for easier re-use.
Because we call bladerf*_initialize from within bladerf*_load_fpga, and
we then do things that do their own locking from within
bladerf*_initialize, problems ensue when loading FPGAs from bladeRF-cli.
This removes the lock from the greater load_fpga call, and moves it to
just around the dev->backend->load_fpga call.
The EVM coming out of the AD9361 is about 1% worse than it should be,
when doing a TX directly after initialization. However, by changing the
frequency and changing it back, the EVM returns to the expected level.
I suspect libad9361 is missing a calibration step somewhere in the
initialization, but we can work around this by doing two frequency
changes during initialization.
Delete empty SOPC directories created by Quartus during IP core
generation. These empty directories are created in the user's home
directory and can accumulate if left unchecked. Use `find' with
approprate filters to (hopefully) avoid deleting anything important!
Quartus supports different build flows. Adding support for that so that
a user can choose to simply generate the project files, run synthesis
only (e.g. to check syntax), or do the full place and route to generate
programming files.
The project revision option specified on the command line was not being
passed to the build Tcl file.
Changed handling of message suppression files. Filename should be the
same as the revision name. Instead of managing potentially several
identical or nearly identical .srf files, just manage the one and have
the build script rename it when copying it to the build directory.
Fixed references to the nios_system.qip file in bladerf-fsk_bridge.qip
and bladerf-qpsk_tx.qip.
- Add "board" as a required option in help text
- The description of the SignalTap force option was vague.
- Added check for null argument.
- Do not print full usage information for an invalid option.
Beginning in Quartus 14.0, the NiosII processor split into two versions:
Classic and Gen 2. Development of new features for the Classic ceased in
Quartus 14.0. Nuand upgraded to the Gen 2 core for the release of the
bladeRF micro. The Gen 2 core does not have an option for the
Small (NiosII/s) implementation, so the option was removed from the
build script.
Nuand may add a NiosII/s approximation of the NiosII/f in the
future. This will happen quicker if we get requests to do so. :)
In the event a library user needs to test for the existence of a gain
stage, the bladerf_get_gain_stage_range function may now be called with
a null range, and the return value can be checked to determine whether
it exists.
* host: libbladeRF: add bladerf_get_loopback_modes
Returns a pointer to an array of supported loopback modes.
* host: libbladeRF: add bladerf_is_loopback_mode_supported()
Tests if a given loopback mode is supported on a device