libbladeRF ingests SC12 Q11 samples and expands them to SC16 Q11 before
filling the end buffer. The trade-off is CPU cycles for the 12b to 16b
conversion.
FX3 GPIF buffers set to 2048 samples and number of buffers reduced to
11 per dma channel. This substantially increases the theoretical USB
SuperSpeed throughput from roughly 228MB/s to 356MB/s.
$ make test_libbladeRF
[ OK ] libbladeRF.scheduled_retune (19755 ms)
[----------] 29 tests from libbladeRF (308802 ms total)
[----------] Global test environment tear-down
[==========] 29 tests from 1 test suite ran. (308802 ms total)
[ PASSED ] 29 tests.
The gain target is either set or calculated based on the gain mode. If
using manual gain control, the gain target from the gain table is
returned. If the AGC is enabled, the gain target is calculated based
on the current gain.
Adds the gain calibration tables along with the prototype for
bladerf_load_gain_calibration(). Also copies the stored calibration
references to the output directory.
Outputs the current quick retune parameters of a bladeRF
device to standard output. It is useful for debugging and verifying the
configuration of quick tune settings.
Introduces 8bit SC8_Q11 mode, and overclocking mode changes for bladeRF 2.0 micro.
This commits also fixes several bugs, including a locking bug in libbladeRF.
Help menus and abbreviation support expanded in bladeRF-cli.
This adds a bladerf_get_fpga_bytes() function, which returns the
expected length of the FPGA image.
This is a dynamic replacement for BLADERF_FLASH_BYTE_LEN_FPGA,
which has been removed.
In particular, this is used in spi_flash_write_fpga_bitstream() and
spi_flash_erase_fpga() to determine the number of blocks to erase
during FPGA flashing operations.
This fixes an issue where xA9 boards were not being adequately
erased before writing.
API change:
- bladerf_image_write(): new parameter: bladeRF device handle
Change is inspired by the pending removal of BLADERF_FLASH_EB_SIZE
macro. This macro really shouldn't be exposed to the world, nor
should it be constant as it may change depending on the flash
used on the board.
API new function:
- bladerf_erase_flash_bytes(): new function
Similar to the existing bladerf_erase_flash() function, but
handles the conversion from bytes to flash erase block pages
internally. This function is recommended for new designs because
the erase block size may change depending on the board. This
function also checks for proper alignment along erase block
boundaries.
General changes:
Although the macro still exists (for now), all uses of
BLADERF_FLASH_EB_SIZE have been replaced with equivalent
dev->flash_arch->ebsize_bytes because the value may change depending
on the flash used on the board.
New API functions:
- bladerf_read_flash_bytes()
This function is nearly identical to the existing
bladerf_read_flash() function, but takes the address and length in
units of bytes instead of flash pages. The function performs the
necessary conversions from bytes to pages internally based on the
specific flash architecture in use.
- bladerf_write_flash_bytes()
Same as above, for writes.
New code is advised to use these byte-unit functions instead of the
older page-unit functions because the page size may not be guaranteed to
be 256 bytes in future bladeRF platforms.
API changes:
- bladerf_alloc_image(): new parameter - bladeRF device handle
- bladerf_alloc_cal_image(): new parameter - bladeRF device handle
General changes:
Although the macro still exists (for now), all uses of the
BLADERF_FLASH_TOTAL_SIZE macro have been replaced with equivalent
dev->flash_arch->tsize_bytes because the value may change depending on
teh flash used on the board.
During this process, some function prototypes were modified so the
device handle could be passed in, thus allowing flash architecture
data to be extracted.
- calibration.c: dc_cal_tbl_image_load()
- image.c: is_valid_addr_len()
A few changes to the bladerf_quick_tune structure:
- rename 'profile' to 'rffe_profile' for clarity
- delete 'data[16]' not needed anymore and preserves ABI compatibility
- add 'nios_profile' for indexing the profile stored in the BBP
- add 'port' for storing the RFFE port settings
- add 'spdt' for storing the external RF switch settings
Improvements to bladerf2_get_quick_tune():
- Send rffe_fastlock_save packet to instruct Nios to save a copy of
the RFFE fast lock profile to itself. This means the fast lock
profile data (16 bytes) no longer needs to be transmitted to/from
the Nios and the host machine (retune speedup).
- Save the RFFE port setting to the quick tune structure so it may be
sent down to the Nios when scheduling a retune.
Saving the 16-bytes of fast lock profile data to the host is no longer
necessary because it is stored on the Nios itself. This has two
additional benefits: quicker retunes (the profile data does not need to
be shuffled across USB), and it preserves ABI compatibility because the
size of the bladerf_quick_tune struct does not increase compared to
previous versions of libbladeRF.
Update bladerf_quick_tune structure for bladeRF2 data. It now contains:
- profile (profile number, integer)
- data (profile data, 16 bytes)
Fill in the bladerf2_get_quick_tune() function. The bladeRF2's RFIC uses
the concept of fast lock profiles, of which there are 8 for TX and 8 for
RX. These profiles store the VCO information needed to quickly change
frequencies. To use more than 8 profiles, the profiles may be stored
off-chip, which is what we're doing here.
1. It is assumed the RFIC has been tuned to a particular frequency.
2. The profile is created using ad9361_fastlock_store().
3. The profile is read back and stored in host memory using
ad9361_fastlock_save().