Commit graph

3,807 commits

Author SHA1 Message Date
Ryan Thompson
89caa01c12 hdl: test: added variable length gpif support to fx3_model 2025-04-09 23:17:40 -07:00
Ryan Thompson
27fe2f48ea hdl: moved gpif buf size constants to fx3 gpif package
As we add changes to the FX3, it will be much easier to have a single
source of truth for the GPIF DMA sizes. This commit should not introduce
any changes to simulation or synthesis results.
2025-04-09 23:17:40 -07:00
Ryan Thompson
77d234c3bb hdl: leverage full sample depth of sample fifos
We were limiting ourselves to half of the fifo depth and subtracting
4 gpif buffers from that, which is 1/4 of the current fifo depth. No
sign of a full fifo during siso, mimo, meta, and non-meta streaming
tests at low sample rates. The fifo writes are appropriately held off.
2025-04-09 23:17:40 -07:00
Ryan Thompson
367df45e75 hdl: fixed fifo ingestion arithmetic on tx enable toggle
The channel shift would be left at 1 after the state moved to
COMPUTE_ENABLED_CHANNELS. Samples left would be reassigned to 1 in
COMPUTE_OFFSETS. Then channel offset would be assigned 2, an invalid
value.

This change only assigns samples left and channel shift if at the 0th
sample index, which allows for sample continuity.
2025-04-09 23:17:40 -07:00
Ryan Thompson
f230c9dc8d hdl: test: added gpif fifo stress test testbench
This copies the gpif 8b testbench, but with 7 blocks per TX iteration
and 2 subsequent iteration repeats. Run for 4ms to find channel shift
reset failure.
2025-04-09 23:17:40 -07:00
Ryan Thompson
465ea0a49e libbladeRF: test: added streaming test
The streaming test allows for cross testing between MIMO, SISO, TX, RX, meta,
and non-meta configurations.

Example: TX a CW at 50MSPS and at a frequency of (915MHz+50MHz/16) with meta enabled
./output/libbladeRF_test_streaming -te -s 50M

Example: TX and RX at 25MSPS and at a frequency of (915MHz+25MHz/16) without meta enabled
./output/libbladeRF_test_streaming -tr -s 25M
2025-04-09 23:17:40 -07:00
Ryan Thompson
ffd7f52a40 hdl: added git information to build output 2025-04-09 23:17:40 -07:00
Ryan Thompson
a8481c2af7 doc: added packet length warning for BLADERF_FORMAT_PACKET_META
A packet length of (n*256-4) DWORDs will cause the synchronous
buffer it's filled into to indefinitely persist.
2025-04-09 23:17:40 -07:00
Ryan Thompson
73e78639aa doc: fix API sections menu item with Doxygen 1.9.8
The API sections aren't stored as modules anymore. They're topics.
Error likely introduced at doxygen commit: 6d80fc7e5
2025-04-09 23:17:40 -07:00
Ryan Thompson
3cc8e3c54e hdl: fixed late exit from meta down count state
The expected two cycle passing between meta write and idle states is
independent of the number of streams. Specifically addresses an
off-by-one timestamp error with the bladeRF 1.0.
2025-04-09 23:17:40 -07:00
Ryan Thompson
65cdf88994 bladeRF-power: fixed ncurses dep
On macOS, sometimes the ${CURSES_LIBRARIES} variable provided by
 find_package(Curses) doesn't correctly include all the necessary linkage
 information, especially when using wide character support. By explicitly adding
 ncurses to the link libraries for Apple platforms, we ensure that the linker
 can find all the required symbols.
2025-04-09 23:17:33 -07:00
Ryan Thompson
179fe7c600 hdl: corrected bladeRF 1.0 FPGA version number 2025-01-06 13:36:48 -06:00
Semnodime
fe3304d759 hdl: fix readme typo
close #970
2024-08-13 14:56:15 -05:00
Asa Zernik
cbc3d30a27 libbladeRF: Return error code instead of asserting in version_check
Specifically, when there's a missing compat table entry. All callers
specify that they want to be forgiving of version mismatches, so this
seems in the spirit of the call tree.

Ran into this error when playing with a custom-loaded FPGA; if I had
flashed the FPGA instead of simply loading it, this could have bricked
the blade (or at least forced me into a very involved recovery process).
2024-08-13 11:43:21 +03:00
Ryan Thompson
26e91a550e libbladeRF: test: fix gain compare dev init 2024-08-10 18:20:33 -07:00
Ryan Thompson
e1a5c9260d libbladeRF: fix calibration load check for get_gain_calibration
Fixes #981
2024-08-10 18:16:51 -07:00
Ryan Thompson
d746811bd9 cmake: added Clang alternatives to compiler configurations 2024-08-10 18:16:51 -07:00
Ryan Thompson
f81b82aa8e libbladeRF: bump to version 2.5.1
Introduces bladeRF-power cli tool and gain calibration functionality.
2024-08-08 00:15:01 -05:00
Ryan Thompson
b98f385fb4 bladeRF-power: added sample rate assignment 2024-08-08 00:15:01 -05:00
Ryan Thompson
5f64e3f1c4 bladeRF-power: set test gain control to manual when TX 2024-08-07 15:35:55 -05:00
Ryan Thompson
94c08ebc9f bladeRF-power: added channel select 2024-08-07 15:35:55 -05:00
Ryan Thompson
68f396a102 bladeRF-power: added ascii text art for power measurements
█████╗    ███████╗       ██████╗     ██╗         ██████╗ ██████╗ ███╗   ███╗
           ██╔══██╗   ╚════██║       ╚════██╗   ███║         ██╔══██╗██╔══██╗████╗ ████║
███████╗   ╚██████║       ██╔╝        █████╔╝   ╚██║         ██║  ██║██████╔╝██╔████╔██║
            ╚═══██║      ██╔╝        ██╔═══╝     ██║         ██║  ██║██╔══██╗██║╚██╔╝██║
            █████╔╝     ██╔╝      ██╗███████╗    ██║         ██████╔╝██████╔╝██║ ╚═╝ ██║
            ╚════╝      ╚═╝       ╚═╝╚══════╝    ╚═╝         ╚═════╝ ╚═════╝ ╚═╝     ╚═╝
2024-08-07 15:35:55 -05:00
Ryan Thompson
818082947a bladeRF-power: cli: added stderr message viewer 2024-08-07 15:35:55 -05:00
Ryan Thompson
eff35dd799 bladeRF-power: cli: display warning if bladeRF-power window is too small
This actively checks if the window is too small and will provide a
warning when data is being hidden.
2024-08-07 15:35:55 -05:00
Ryan Thompson
d9be3348c3 bladeRF-power: cli: display calibration info when 'i' is pressed 2024-08-07 15:35:55 -05:00
Ryan Thompson
f370c2aef3 bladeRF-power: cli: rm module disable after stream
Closing the bladeRF after the module disable causes some usb interfaces
to fatally crash specifically for the TX interface.

discovery notes:
- Enable module and bladerf_close both call sync_deinit
- Mutex is destroyed in sync_deinit
2024-08-07 15:35:55 -05:00
Ryan Thompson
935ef43fb9 bladeRF-power: cli: added engineering notation suffix ingestion
This allows arguments to be specified with engineering notation.
E.g. bladeRF-power -f 4G
2024-08-07 15:35:55 -05:00
Ryan Thompson
8ec93c517c bladeRF-power: add FIR filter for power equalization across bandwidth
The FIR filter will equalize the noise figure across the bandwidth of
the bladeRF 2.0. After equalization, measurements of off-center CWs and
modulated waveforms are brought within +-1dB of error.
2024-08-07 15:35:55 -05:00
Ryan Thompson
b4e50ac1e4 bladeRF-power: added README.md and appended to utilities README.md 2024-08-07 15:35:55 -05:00
Ryan Thompson
3d350853b9 bladeRF-power: added install target 2024-08-07 15:35:55 -05:00
Ryan Thompson
64e709e885 bladeRF-power: init 2024-08-07 15:35:55 -05:00
Ryan Thompson
5e041d0ada libbladeRF: gain_calibration: added serial number to gain cal table
The gain calibration table will compare the serial number in the CSV
with the serial number of the opened device. A warning will be issued
if the serial numbers do not match.
2024-08-07 15:35:55 -05:00
Ryan Thompson
b185d4c60a libbladeRF: gain_calibration: added cal table valid entry check 2024-08-07 15:35:45 -05:00
Ryan Thompson
125d96f4b1 libbladeRF: gain_calibration: restore gain mode after cal load 2024-08-07 15:32:31 -05:00
Ryan Thompson
2ab7adc676 libbladeRF: gain_calibration: added header check for CSV conversions
This blocks RX gain calibrations from being applied to TX and
vice versa.
2024-08-07 15:31:54 -05:00
Ryan Thompson
3c25f57893 libbladeRF: gain_calibration: added bladerf_get_gain_target
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.
2024-08-07 15:31:54 -05:00
Ryan Thompson
3cef03a0ce libbladeRF: gain_calibration: reassign gain after loading calibration
This ensures the calibration is enabled once the calibration is loaded.
Since gain calibration relies on top level call to set the gain,
bladerf_set_gain(), we have to unlock the mutex and call said function.
2024-08-07 15:31:52 -05:00
Ryan Thompson
b5cfb5b036 libbladeRF: gain_calibration: added null check and gain cal loaded check 2024-08-07 15:19:06 -05:00
Ryan Thompson
eb78b981bd libbladeRF: gain_calibration: added free gain table function 2024-08-07 15:19:06 -05:00
Ryan Thompson
8031b84e59 libbladeRF: gain_calibration: store gain cal file within table 2024-08-07 15:19:06 -05:00
Ryan Thompson
a83272d452 libbladeRF: gain_calibration: added gain cal auto loading support
If the the file location is not specified, using a NULL file location,
then try loading the expected default file name from one of the
find_file locations.

The test renames the files to the default serial based file names and
stores them alongside the binary (one of the find_file locations).
2024-08-07 15:19:06 -05:00
Ryan Thompson
d2579486ce libbladeRF: gain_calibration: added table version check
Gain calibration tables will be denoted with the GAIN_CAL_VERSION macro
defined at the top of device_calibration.c.
2024-08-07 15:19:06 -05:00
Ryan Thompson
361646af41 libbladeRF: test: added gain calibration test to regression test 2024-08-07 15:19:06 -05:00
Ryan Thompson
dbf50d88d0 libbladeRF: gain_calibration: added RX test sweep 2024-08-07 15:19:06 -05:00
Ryan Thompson
b35052dfd7 libbladeRF: gain_calibration: CSV to bladeRF image binary
This changes the method of storing the binary data. Rather than a naive
CSV save, we package the binary in a bladeRF image format containing
metadata along with the power vs. frequency data.
2024-08-07 15:19:06 -05:00
Ryan Thompson
aab04e0a2b libbladeRF: image: print type with metadata
Ex:
Magic: bladeRF
Type: Raw Data
Version: 0.1.0
Timestamp: 655e530f
Serial: 
Address: 0
Length: 0
2024-08-07 15:19:06 -05:00
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