Commit graph

3,761 commits

Author SHA1 Message Date
Ryan Thompson
eb3d128a8d libbladeRF: image: bladerf_image_print_metadata added
Ex:
Magic: bladeRF
Version: 0.1.0
Timestamp: 655e530f
Serial: 
Address: 0
Length: 0
2024-08-07 15:19:06 -05:00
Ryan Thompson
986c3a3353 libbladeRF: gain_calibration: added gain calibration image type 2024-08-07 15:19:06 -05:00
Ryan Thompson
ce634ef649 libbladeRF: gain_calibration: CSV additional parameters supported
The CSV import supports the added parameters and cross test for gain
and channel combinations.
2024-08-07 15:19:06 -05:00
Ryan Thompson
00346bba68 libbladeRF: gain_calibration: new example gain calibration CSVs 2024-08-07 15:19:06 -05:00
Ryan Thompson
afae6bde20 libbladeRF: gain_calibration: free table entries on bladerf_close() 2024-08-07 15:19:06 -05:00
Ryan Thompson
cb9dc300b1 libbladeRF: gain_calibration: gain corr set by bladerf_set_gain() 2024-08-07 15:19:06 -05:00
Ryan Thompson
e94f3c7378 libbladeRF: gain_calibration: gain correction implementation
Initially administered through frequency assignment.
2024-08-07 15:19:06 -05:00
Ryan Thompson
9fb9b19f42 libbladeRF: gain_calibration: added bladerf_get_gain_calibration 2024-08-07 15:19:06 -05:00
Ryan Thompson
d83fd7777d libbladeRF: gain_calibration: check and round macros for gain cal fns 2024-08-07 15:19:06 -05:00
Ryan Thompson
228de95650 libbladeRF: gain_calibration: print function added 2024-08-07 15:19:06 -05:00
Ryan Thompson
9cd7ab7d38 libbladeRF: gain_calibration: normalize correction values
TX=0dBm and RX=-30dBm are measurement targets set by the calibration
setup. These values are not to be changed unless the test measurement
setup has changed.
2024-08-07 15:19:06 -05:00
Ryan Thompson
cdaaa3d915 libbladeRF: gain_calibration: set gain target on load, set_gain, and en 2024-08-07 15:19:06 -05:00
Ryan Thompson
50dd427e49 libbladeRF: gain_calibration: enable function added 2024-08-06 18:47:45 -05:00
Ryan Thompson
b51057d774 libbladeRF: gain_calibration: load gain implementation
+ Automatic csv to bin file conversion
+ Gain tables for each channel
2024-08-06 18:47:45 -05:00
Ryan Thompson
838c177eba libbladeRF: gain_calibration: load function initialized 2024-08-06 18:47:45 -05:00
Ryan Thompson
f41966dcf8 libbladeRF: gain_calibration: example sweeps added 2024-08-06 18:47:45 -05:00
Ryan Thompson
3583aaca8e libbladeRF: gain_calibration: init
Adds the gain calibration tables along with the prototype for
bladerf_load_gain_calibration(). Also copies the stored calibration
references to the output directory.
2024-08-06 18:47:45 -05:00
Ryan Thompson
f8b7de8539 libbladeRF: do not enforce flash byte alignment for placeholder image 2024-08-06 18:47:45 -05:00
Ryan Thompson
fcfd174ca8 libbladeRF: added CHECK_STATUS_GOTO macro for bladerf2 board 2024-08-06 18:47:44 -05:00
Ryan Thompson
1d3fabfe6b libbladeRF: added save_fastlock_profile() to rfic struct 2024-08-06 18:47:44 -05:00
Ryan Thompson
02196a2e9b libbladeRF: bladerf_sync_tx: null check for TX samples
"Invalid operation or parameter" was the bladeRF error code returned
when samples were unallocated. Now, a log error is triggered saying
"bladerf_sync_tx: samples is null" and the return value is a bladeRF
memory error.
2024-08-06 18:47:44 -05:00
Ryan Thompson
ca68dfdb82 libbladeRF: automatically set manual gain control if gain is set 2024-08-06 18:47:44 -05:00
Ryan Thompson
452af25b50 libbladeRF: examples: frequency range sweep 2024-08-06 18:47:44 -05:00
Ryan Thompson
11adedda2e libbladeRF: added CHECK_STATUS macro to bladeRF.c 2024-08-06 18:47:44 -05:00
Ryan Thompson
a91b51974d libbladeRF: added bladerf_print_quick_tune()
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.
2024-08-06 18:47:44 -05:00
Ryan Thompson
c5b03ae93f libbladeRF: added CHECK_NULL(...) to bladeRF.c 2024-08-06 18:47:44 -05:00
Ryan Thompson
afc636073e libbladeRF: test: gain_compare: C test added
This isolates the gain differentiation on init from the CLI or Gnuradio.
Refer to the instructions below.

Instructions:

cd bladeRF/host/libraries/libbladeRF_test/test_gain_compare/
python -m venv env
source ./env/bin/activate
pip3 install -r requirements.txt

cd bladeRF/host/build
make -j`nproc` && sudo make install
./output/libbladeRF_test_gain_compare

cd ../libraries/libbladeRF_test/test_gain_compare/
mv ~/code/bladeRF/host/build/dual_test.bin .

python3 view_binary.py -n 2
2024-08-06 17:31:31 -05:00
Ryan Thompson
09fcacc9bc libbladeRF: test: gain_compare: comparing RX power with MIMO and SISO configs
This provides a way to test MIMO and SISO power measurements through
the CLI. The power for both channels under SISO and MIMO should be
about the same.

Instructions
---------------
python -m venv env
source ./env/bin/activate
pip install -r requirements.txt

Ch1 & Ch2:
bladeRF-cli -s bladerf_script_ch12.sh
python view_binary.py -n 2

Ch1:
bladeRF-cli -s bladerf_script_ch1.sh
python view_binary.py -n 1

Ch2:
bladeRF-cli -s bladerf_script_ch2.sh
python view_binary.py -n 1
2024-08-06 17:31:31 -05:00
Ryan Thompson
a87ad2208b libbladeRF: test: null and status checks in test_common.h 2024-08-06 17:31:31 -05:00
Ryan Thompson
f28c665024 libbladeRF: test: fixed "unrecognized option '--gtest_list_tests'" on make 2024-08-06 17:31:31 -05:00
Ryan Thompson
87337ccec0 libbladeRF: test: test_hwloop target added
Builds the python virtual environment for python based bladeRF tests.
2024-08-06 17:31:31 -05:00
Ryan Thompson
8596272391 gitignore: python venvs, build dirs, and vscode 2024-08-06 17:31:31 -05:00
Ryan Thompson
acdb03af43 doc: added bladerf_alloc_image parameter descriptions 2024-08-06 17:31:31 -05:00
Ryan Thompson
50d26e2e53 libbladeRF: issue warning for USB 2.0 clock select assignments 2024-08-06 17:30:40 -05:00
Ryan Thompson
b7a6173edd libbladeRF: added log message for failed FPGA image read 2024-08-06 17:30:40 -05:00
Ryan Thompson
a34f6aaf1b test: added clock select test 2024-08-06 17:30:40 -05:00
Ryan Thompson
ffb55acd05 libbladeRF: added log_debug_8x32_pkt for nios r/w failures 2024-08-06 17:27:32 -05:00
Ryan Thompson
03ccc0028a hdl: nios: debug print on failed pkt_8x32 r/w 2024-08-06 17:27:32 -05:00
Ryan Thompson
effe3eb2df libbladeRF: added error log for failed nios_config_write 2024-08-06 17:27:32 -05:00
Ben Morse
ffe66c5dfa host: update Eclipse instructions for NIOS software development on modern Quartus 20.1 2024-08-02 15:25:59 -05:00
Ryan Thompson
9f2f09fb76 libbladeRF: corrected bladeRF 2.0 gain mode count retrieval
bladerf_get_gain_modes() now returns the number of available
bladeRF 2.0 gain modes when the modes argument is NULL.

Fixes#968
2024-08-02 15:25:59 -05:00
Ryan Thompson
044fb54d61 test: libbladeRF: added bladerf_get_gain_modes to gain test
The bladeRF 1.0 should pass at this commit. The bladeRF 2.0 should pass
on the subsequent commit.
2024-08-02 15:25:59 -05:00
Ryan Thompson
24babc361e hdl: add clock control blocks for system and fx3 plls
Resolves Nios and FX3 lockup when SI53304 clock select assignments are
made. The FX3 pclk and Nios system PLLs lose lock when the SI53304
transitions between clock sources and this prevents invalid cycles from
making it through.
2024-08-02 15:25:59 -05:00
Ryan Thompson
fd5dde022f hdl: nios: add response delay if new clock is selected 2024-08-02 15:25:59 -05:00
Ryan Thompson
fcb33420a0 hdl: fix first sample drop in fifo_writer
This fixes the first sample being dropped in both meta and non-meta modes.
fifo_write is now asserted through procedure and executes on HOLDOFF exit.

Regression test results:

$ make test_libbladeRF
[       OK ] libbladeRF.scheduled_retune (19450 ms)
[----------] 29 tests from libbladeRF (297804 ms total)
[==========] 29 tests from 1 test suite ran. (297804 ms total)
[  PASSED  ] 29 tests.

$ make test_hdl
[----------] 31 tests from hdl (1354828 ms total)
[----------] 32 tests from hdl/verify (2319711 ms total)
[==========] 63 tests from 2 test suites ran. (3674539 ms total)
[  PASSED  ] 63 tests.
2024-08-02 15:25:59 -05:00
Ryan Thompson
58727ab7a1 hdl: init meta_fifo_empty to 1
[==========] 32 tests from 1 test suite ran. (1785986 ms total)
[  PASSED  ] 20 tests.
[  FAILED  ] 12 tests, listed below:
[  FAILED  ] hdl/verify.fx3_gpif_iq_8bit_tb/16b01, where GetParam() = (false, false, true)
[  FAILED  ] hdl/verify.fx3_gpif_iq_8bit_tb/16b10, where GetParam() = (false, true, false)
[  FAILED  ] hdl/verify.fx3_gpif_iq_8bit_tb/16b11, where GetParam() = (false, true, true)
[  FAILED  ] hdl/verify.fx3_gpif_iq_8bit_tb/8b01, where GetParam() = (true, false, true)
[  FAILED  ] hdl/verify.fx3_gpif_iq_8bit_tb/8b10, where GetParam() = (true, true, false)
[  FAILED  ] hdl/verify.fx3_gpif_iq_8bit_tb/8b11, where GetParam() = (true, true, true)
[  FAILED  ] hdl/verify.rx_counter_8bit_tb/16b01, where GetParam() = (false, false, true)
[  FAILED  ] hdl/verify.rx_counter_8bit_tb/16b10, where GetParam() = (false, true, false)
[  FAILED  ] hdl/verify.rx_counter_8bit_tb/16b11, where GetParam() = (false, true, true)
[  FAILED  ] hdl/verify.rx_counter_8bit_tb/8b01, where GetParam() = (true, false, true)
[  FAILED  ] hdl/verify.rx_counter_8bit_tb/8b10, where GetParam() = (true, true, false)
[  FAILED  ] hdl/verify.rx_counter_8bit_tb/8b11, where GetParam() = (true, true, true)

12 FAILED TESTS
2024-08-02 15:25:59 -05:00
Robert Ghilduta
cefdb2887c hdl: fixup more timing issues 2024-08-02 15:25:59 -05:00
Robert Ghilduta
f24abc356a debian: update change 2024-07-12 04:09:00 -04:00
Ryan Thompson
b40cd829be revert "libbladeRF: reinitialize the RFIC on FPGA load"
This reverts commit 0fcb4cfe03.
2024-05-01 16:02:35 -05:00
Robert Ghilduta
2fbae2c38b libbladeRF_test: bump dependency versions 2024-04-15 00:21:31 -07:00