Commit graph

47 commits

Author SHA1 Message Date
Jon Szymaniak
faa499a80f libbladeRF_test: Keep track of previous frequency for error reporting 2015-08-25 13:28:05 -04:00
Jon Szymaniak
0f5abb4647 libbladeRF_test: Added additional iterations to frequency tuning test 2015-08-25 13:28:05 -04:00
Jon Szymaniak
8157806256 libbladeRF_test: Fixed Windows build issue introduced in baee9616 2015-08-23 23:08:32 -04:00
Jon Szymaniak
1722451524 libbladeRF_test: Fixed unmatched parenthesis
This fixes #420 libbladeRF_test: Build broken for big endian hosts
2015-08-17 08:44:59 -04:00
Jon Szymaniak
baee9616d3 libbladeRF_test: Ensure sufficiently large buffer is used in "rx_gaps"
The buffer length used for calls to bladerf_sync_rx() is now determined
by the test case length, rather than the (unrelated) sync i/f buffer length.

This allows for the use of different sync i/f buffer lengths to be used
via -B.
2015-08-12 12:53:08 -04:00
Jon Szymaniak
42f2d2789f libbladeRF_test: Fixed NULL dereference when test name is unspecified 2015-08-12 11:59:33 -04:00
Jon Szymaniak
60fe9c65e3 libbladeRF: Prepend installation prefix to file search paths
When searching for FPGA bitstreams or other files, we should be
searching locations relative to the installation prefix.

In an effort to avoid breaking existing packaging scripts, the
previously used paths "/usr/share/Nuand/bladeRF" and
"/etc/Nuand/bladeRF" have been kept in the search list, but at a lower
priority than the items with the installation prefix.
2015-07-22 12:06:05 -04:00
Jon Szymaniak
bf9f8a62a4 host: Moved device config helpers to host/common
People may find these useful when developing their own tools or
contributions to the bladeRF codebase.
2015-06-21 23:07:40 -04:00
Jon Szymaniak
8d5f58dfa9 libbladeRF: Fixed MSVC build issues for test_scheduled_retune 2015-06-18 20:20:58 -04:00
Jon Szymaniak
0ea11dc05a libbladeRF_test: Added missing "goto out;" in error path 2015-06-18 18:34:29 -04:00
Jon Szymaniak
c1bd658f52 libbladeRF_test: Fixed retune bugs in scheduled retune test 2015-06-18 18:34:29 -04:00
Jon Szymaniak
81c186ea68 libbladeRF_test: Use wait_for_timestamp, increased iterations 2015-06-18 18:34:29 -04:00
Jon Szymaniak
0789ae9772 libbladeRF_test: Moved wait_for_timestamps() to test_common.c
This will be needed by the scheduled retune test.
2015-06-18 18:34:29 -04:00
Brian Padalino
32c8979ea5 hdl: Timestamp changes to make things work.
Make the time tamer interruption mechanism sensitive to the reset
status of the underlying timestamps.
2015-06-18 18:34:29 -04:00
Jon Szymaniak
e72d989e37 libbladeRF_test: Added both RX/TX to scheduled retune test 2015-06-18 18:34:29 -04:00
Jon Szymaniak
9897d2552e libbladeRF_test: Handle scheduled retune queue filling 2015-06-18 18:34:29 -04:00
Jon Szymaniak
f2e9aa1693 libbladeRF_test: Added scheduled retune test 2015-06-18 18:34:29 -04:00
Jon Szymaniak
1580e2c322 libbladeRF_test: Pthreads deps needed in Windows for Posix time fns 2015-06-18 18:34:29 -04:00
Jon Szymaniak
1ad5ea1678 libbladeRF_test: Added quick retune test 2015-06-18 18:34:29 -04:00
Jon Szymaniak
1a0253b6c7 libbladeRF-test: Added quick retune to tune timing test 2015-06-18 18:34:29 -04:00
Jon Szymaniak
d9aebf01e6 libbladeRF_test: Added test to time retuning 2015-06-18 18:34:28 -04:00
Jon Szymaniak
8b7a8a3f64 libbladeRF_test: Moved random frequency routine to common test file 2015-06-18 18:34:28 -04:00
Jon Szymaniak
d50fd8dd42 libbladeRF_test: Moved average duration function to common test file 2015-06-18 18:34:28 -04:00
Jon Szymaniak
48ab7480c4 libbladeRF: Added timestamp test option to print timestamps 2015-05-14 12:30:49 -04:00
Jon Szymaniak
ef4f19b5a2 libbladeRF_test: Build test with -lrt for older libc versions 2015-05-08 10:21:59 -04:00
Jon Szymaniak
1dc8ee6298 libbladeRF_test: Added program to time FPGA peripheral accesses
This is intended to help identify any significant performance
improvements or regressions as we look to pull in some NIOS II
changes.
2015-05-06 11:55:01 -04:00
Jon Szymaniak
fd4c464fb1 libbladeRF-test: Fixed help text for gain settings 2015-04-18 13:11:54 -04:00
Jon Szymaniak
730acd80b0 libbladeRF-test: Gains are signed ints, so use str2int()
This is required for the txvga1 gain, which is [-35, -4].

str2int() is used for other gains as well, just for consistency
with their types.
2015-04-18 12:24:56 -04:00
Jon Szymaniak
88d1f9a136 libbladeRF_test: Reduced TX gains in tx_gmsk_bursts timestamp test
With the existing settings, I had run into some "Input Overload"
errors on a VSA while using the tx_gmsk_bursts timestamp test.

The gains in use were rather hot; they've been reduced.
2015-03-17 16:16:43 -04:00
Jon Szymaniak
59c0033e62 libbladeRF_test: Added TX_UPDATE_TIMESTAMP mode to gmsk burst test
This allows us to exercise this flag's functionality and check results
on a VSA that provides GSM decoding.
2015-03-17 16:16:43 -04:00
Jon Szymaniak
718756e3e9 libbladeRF_test: Added stream parameter args to timestamp test 2015-03-17 16:16:43 -04:00
Jon Szymaniak
da6d62ace5 libbladeRF_test: Added test to exercise zero-padding within TX burst 2015-03-17 16:16:43 -04:00
Jon Szymaniak
899e1d3820 libbladeRF_test: Moved loopback test items to a separate file
These items will be shared with another upcoming test
2015-03-17 16:16:43 -04:00
Jon Szymaniak
fdd843c361 libbladeRF_test: Fixed i686-w64-mingw32 warnings
Addressed the following warnings though use of casts to larger stdint.h types
and inttypes.h format specifiers:

test_timestamps.c: In function ‘counter_data_is_valid’:
test_timestamps.c:99:21: warning: unknown conversion type character ‘l’ in format [-Wformat=]
                     (unsigned long long) i, ctr, val);
                     ^
test_timestamps.c:99:21: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘long long unsigned int’ [-Wformat=]
test_timestamps.c:99:21: warning: too many arguments for format [-Wformat-extra-args]

test_tx_onoff.c:124:9: warning: unknown conversion type character ‘l’ in format [-Wformat=]
         printf("Sending burst @ %llu\n", (unsigned long long) meta.timestamp);
         ^
test_tx_onoff.c:124:9: warning: too many arguments for format [-Wformat-extra-args]
2015-02-17 13:22:23 -05:00
Jon Szymaniak
88db6addf4 libbladeRF_test: Added simple device open test
This is intended to help quickly check the USB device reset operation
added in the previous changeset.
2015-01-12 13:52:53 -05:00
Jon Szymaniak
41bcf7b12c host: Centralized duplicated code
Moved function to get string description to conversions.c.

There's a similar function within libbladeRF's backend.c, but that
is intended to be used in the device information string; this is
intended to be a bit more humand-readable.
2014-12-18 17:58:21 -05:00
Jon Szymaniak
9a05e4b789 libbladeRF: Added API support for bootloader probe and recovery
API functionality to probe for FX3 bootloader devices and download
firmware to detected devices has been introduced.

This is based upon the boot image format/procedure documented in
Cypress's AN76405: "EZ-USB (R) FX3 (TM) Boot Options"
    http://www.cypress.com/?docID=49862
2014-12-18 17:38:06 -05:00
Jon Szymaniak
253c9ec81b libbladeRF: Added FX3 firmware read and validation routines
This changeset introduces functionality for reading and validating an FX3
firmware file, as well as for accessing the firmware data in a
per-section manner.

The validation currently consists of testing the checksum, checking
size fields for bogus values, detecting a truncated file, and
ensuring that RAM addresses are in the SYSMEM or I-TCM regions of
the FX3's address space, assuming the default linker script is used
(which the bladeRF firmware does use).

This is based upon the boot image format documented in Cypress's AN76405:
"EZ-USB (R) FX3 (TM) Boot Options" (http://www.cypress.com/?docID=49862)
2014-12-18 15:29:31 -05:00
Jon Szymaniak
134c118eab libbladeRF_test: Removed incorrect assert()
We expect the 32-bit counter to overflow. This assertion was
unnecessary and incorrect; check_data operates correctly when the
counter overflows.
2014-12-11 15:20:11 -05:00
Jon Szymaniak
246fdc2cca libbladeRF_test: Fixed Windows build issue introduced in d990841 2014-11-19 12:06:35 -05:00
Jon Szymaniak
1192286102 libbladeRF_test: Fixed option string for test_freq_hop 2014-11-19 11:53:46 -05:00
Jon Szymaniak
560798f93d libbladeRF_test: Fixed erroneous/missing assignments in test_common.c 2014-11-18 18:22:46 -05:00
Jon Szymaniak
e28cc03532 libbladeRF_test: Addressed uninitialized variable warning (Clang)
'status' would not be initialized if t->num_iterations < 0. This shouldn't
happen anyway, but it has been fixed to keep the static analysis reports
free of false positives.
2014-11-18 17:27:03 -05:00
Jon Szymaniak
d9908411e8 libbladeRF_test: Added frequency hopping test
This test is intended to help investigate reported issues involving
device lock-ups when changing frequency while samples are streaming.
2014-11-18 17:11:44 -05:00
Jon Szymaniak
7218273716 libbladeRF_test: Added common cmdline arg handling and device config
Most of the libbladeRF_test items contain their own command line
argument handling, yielding repeated code and inconsistent invocations.

This commit introduces common command-line argument handling and device
configuration for the most used device parameters.

Future patches will migrate the tests over to using this functionality.
New tests should use this immediately.
2014-11-18 17:09:11 -05:00
Jon Szymaniak
c6512aabcd libbladeRF: Added C/C++ build tests
These programs are just intended to ensure a simple C/C++ programs using
libbladeRF builds (without requiring anything from host/common).
2014-11-14 16:40:01 -05:00
Jon Szymaniak
69b327e65c libbladeRF: Moved tests out of libbladeRF/ directory
Because the libbladeRF tests were nested under the libbladeRF build,
they were being built with the include paths, library paths,
etc.  used when building libbladeRF.

This was masking build issues that libbladeRF users might experience,
such as MS Visual Studio 12 and earlier failing due to a lack of a
stdbool.h header. (We now include our stdbool.h, and have an option to
disable our C99 compat includes.)

Therefore, these tests have been moved in the build hierarchy to avoid
cross-pollination of the libbladeRF build environment and the tests'
build environment. This should better represent users building against
libbladeRF, and hopefully bring issues to light earlier.
2014-11-14 15:19:18 -05:00