Commit graph

1,672 commits

Author SHA1 Message Date
Jon Szymaniak
08f69c7822 bladeRF-cli: Cleaned up 'print' formatting
Various items supported by 'print' have been made a bit more
consistent in terms of spacing.

Units have been separated from numbers, as typically recommended by
NIST.

Some options have been added to the printset_table to specify how
to group items when printing all of them (and to skip items).
2015-08-23 03:03:57 -04:00
Martin Murray
aeb78b3984 bladeRF-cli: 'print' with no arguments now prints all available values
The print command invoked without arguments in bladeRF-cli
is modified to invoke all the print/set parameter
handlers in order. Old behavior was to display usage note.

The leading and trailing cosmetic newlines were moved from the
individual printset handlers to cmd_print() to allow for a concise
table.

Original usage information is still available via help command.
2015-08-23 02:41:34 -04:00
Jon Szymaniak
68c33907af bladeRF-cli: Created cli_err() variant without added newlines 2015-08-23 02:41:34 -04:00
Martin Murray
7274d263ad libbladeRF: Always set a default rx/tx filter for an XB-200
While we could read back the mux state via gpio to infer what filters were
previously set, we don't know if the user had selected them explicitly or
had been using the auto_1db or auto_3db filters. Since it's ambiguous, we
should instead apply a default so that users can expect consistent results.
2015-08-23 02:41:34 -04:00
Martin Murray
1dd24e1de0 libbladeRF: Fixed segfault in nios_legacy_expansion_gpio_write
An error log message was missing a printf format argument causing a
segfault on old FPGA images.
2015-08-23 02:41:34 -04:00
Martin Murray
0ce3aaa280 libbladeRF: Simplified xb200 filter configuration routines.
Handling of the XB-200 hard and auto filters is separated into two
paths to avoid the confusion introduced in the fix for #404.

xb200_set_filterbank is the internal API entry point for the external
bladerf_xb200_set_filterbank. If the configured filter is a hard
filter, then internal state is updated and set_filterbank_mux is
invoked to realize the hardware changes.

If the configured filter is an automatic filter, then internal state
is updated and xb200_auto_filter_selection() is called with the
currently tuned frequency for specificed module.

xb200_auto_filter_selection() then invokes set_filterbank_mux to
realize the hardware changes.
2015-08-23 02:41:34 -04:00
Martin Murray
aeacd6df8c libbladeRF: Added a debug message when changing xb-200 filter mux. 2015-08-23 02:41:34 -04:00
Brian Padalino
9f94bf1fee libbladeRF: Removing si5338 functions.
Functions were replaced/removed long ago and were not stripped
from the header file.
2015-08-20 18:33:01 -04:00
Brian Padalino
44f7b40ae8 quartus: Enable/Disable TalkBack.
Enable/Disable the TalkBack feature of Quartus based on SignalTap
insertion and if the user really wants to force the script to enable
and disable it at the end of building.

If TalkBack is disabled, and SignalTap is requested to be added to
the project, then the build will now fail instead of warn about
TalkBack not being enabled.
2015-08-20 15:01:05 -04:00
Brian Padalino
99ad59e0b6 hdl: Updating simulation for NIOS/top level.
Updating the simulation 'model' for the NIOS II component so the
entire top level can be simulated in ModelSim.

Also changing a generate from generating many processes to a single
process with a for-loop inside of it.
2015-08-20 13:41:15 -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
6919e9ef4c libbladeRF: Temporarily default to host tuning until #417 is resolved
Failures have been observed when using FPGA tuning to retune
between vastly different frequencies.  It appears that in cases
where significant VCOCAP changes take place, much longer delay between
VCOCAP updates and VTUNE reads are needed than currently utilized in the
NIOS II implementation.

Until this is resolved, host tuning is being set as the default mode,
which does not exhibit this failure because register access overhead
incurs more than ample delay.
2015-08-13 14:47:46 -04:00
Jon Szymaniak
022a966987 libbladeRF: Hold lock when resetting sync state items
Per CID 1288660 and CID 1288661, these cases were the only times
these were accessed without holding the buffer management lock.

Although there shouldn't be a race here, this change is introduced to
maintain consistency with other accesses of the sync i/f state info.
2015-08-12 16:22:16 -04:00
Jon Szymaniak
75e7793636 libbladeRF: Added bug catcher for CID 1308077
This addresses an item picked up by Coverity. Defects in bands[] or
frequency checks could potentially cause an out-of-bounds memory access.

A bounds check has been added to avoid an invalid access, should one of
the aforementioned defect ever creep in.
2015-08-12 15:50:00 -04:00
Jon Szymaniak
24f2cda363 bladeRF-cli: Fixed unchecked return value 2015-08-12 14:43:29 -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
f11427e661 libbladeRF: Fixed format specifier typos (Fixes #416) 2015-08-05 10:11:09 -04:00
Jon Szymaniak
c259e3d233 libbladeRF: Fixed order of add/data params to log_verbose(). Fixes #415. 2015-08-04 09:30:32 -04:00
Jon Szymaniak
c917d33dbc Updated top-level CHANGELOG and debian/changelog for 2015.07 release 2015.07 2015-07-25 16:47:45 -04:00
Jon Szymaniak
60714d7f61 libbladeRF: Updated version to v1.4.3 libbladeRF_v1.4.3 2015-07-25 16:09:25 -04:00
Jon Szymaniak
1e9432abe8 libbladeRF.h: Added explicit mention of UPDATE_TIMESTAMP flag 2015-07-25 15:30:19 -04:00
Jon Szymaniak
da8b05a116 libbladeRF/doc: Removed zero-padding mention
Removed this to avoid confusion, as it's no longer required
(as of libbladeRF v1.3.0).
2015-07-25 15:30:19 -04:00
Jon Szymaniak
2b7bb2a8f0 libbladeRF/doc: Clarified use of zero-sample in example 2015-07-25 15:30:19 -04:00
Jon Szymaniak
df4125634b libbladeRF.h: Removed description of burst zero-pad requirement.
libbladeRF now takes care of this for the API user, as of v1.3.0.
2015-07-25 15:30:19 -04:00
Jon Szymaniak
6ecca0b3a9 libbladeRF: End bursts with 3 zero-samples, not 2.
See "Figure 9: TX data interface" in the LMS6002D data sheet for the
register stages that drive this requirement.

Due to a extra clock cycle delay in bladeRF FPGA <= v0.3.3, we were
"getting away" with a 2-sample 0-pad. However, FPGA v0.3.4 removes the
extraneous delay, which requires us to end the burst properly, with 3
zero samples.
2015-07-25 15:30:19 -04:00
Jon Szymaniak
bf4ec73ab4 libbladeRF: Updated FPGA version compatibility table 2015-07-25 15:28:57 -04:00
Brian Padalino
68c617b70f fpga: Fixing latches, TX NOW accumulation and sample FIFOs. fpga_v0.3.4
Removed some warnings about latches.

Fixed a bug where multiple TX NOW bursts would accumulate samples
in the RX FIFO and was causing a slip in metadata headers versus
samples.

Modifying the sample FIFOs to have under/overflow checking to them.

Registering the FIFO reader output.
2015-07-25 14:14:23 -04:00
Jon Szymaniak
74a3977fb4 libbladeRF: Updated to version v1.4.2 libbladeRF_v1.4.2
Bumped patch version due to search path fix.
2015-07-22 12:14:07 -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
Josh Blum
0f9900336c cmake, debian: Override CMAKE_INSTALL_LIBDIR with dpkg-architecture value
It looks like GNUInstallDirs, which determines CMAKE_INSTALL_LIBDIR, was
not working on Ubuntu 12.04.

This change introduces the use of a CMAKE_INSTALL_LIBDIR override, and
uses this in debian/rules to specify the value extracted from
dpkg-architecture.
2015-07-21 12:11:50 -04:00
Jon Szymaniak
3b9e9bf546 bladeRF-cli: Updated version to 1.2.1 for fixes bladeRF-cli_v1.2.1 2015-07-16 11:23:48 -04:00
Jon Szymaniak
9053307128 libbladeRF: Bumped version to v1.4.1 for fixes and minor feature update libbladeRF_v1.4.1 2015-07-16 11:19:49 -04:00
Jon Szymaniak
ab441d15cb bladeRF-cli: Fixed errors and inconsistencies in interactive help text 2015-07-15 22:26:23 -04:00
Jon Szymaniak
093aed7288 fpga_common/lms: Fixed #405: Fail to exit loopback mode for f >= 1.5 GHz
This defect was introduced when changing the second parameter to
lms_select_band().
2015-07-15 18:45:19 -04:00
Jon Szymaniak
774e60b5d5 libbladeRF: Made some verbose log output clearer 2015-07-14 11:04:36 -04:00
Jon Szymaniak
9dad01f9fa libbladeRF: Fix #404, XB-200 filter bank selection regression in 41476cb
The fix for issue #394 introduced another defect via:

    /* Update state information regarding automatically selected filter.
     * Invalidate the entry if we're not performing automatic selection. */
    if (filter == BLADERF_XB200_AUTO_1DB || filter == BLADERF_XB200_AUTO_3DB) {
        dev->auto_filter[module] = filter;
    } else {
        dev->auto_filter[module] = -1;
    }

The problem is that xb200_auto_filter_selection() ends up calling this with
filter set to the desired filterbank. We should only apply this state update
when getting called from bladerf_xb200_set_filterbank(), and not when we're
updating the filter selection from xb200_auto_filter_selection().
2015-07-13 14:58:59 -04:00
Brian Padalino
067bd41944 hdl: Updating atsc_tx FPGA image.
New NIOS implementation was not ported over to the atsc_tx image
which was causing issues building.  Updated the top level to be
more in-line with the hosted image.
2015-07-10 15:30:20 -04:00
Jon Szymaniak
c2b3881a50 bladeRF-cli: Flush zero samples through the device at the end of a TX
When the file to TX does not have any sort of "padding" zero samples
at the end, there's a risk that we'll turn off the TX front-end
before the samples are actually transmitted.

As a "quick and dirty" solution, we just flush (num_buffers + 1)
buffers worth of 0+0j after completing the TX of the file.
2015-07-09 11:17:51 -04:00
Jon Szymaniak
cddfaf4f5f host/misc/matlab: Added load/save_grcomplex.m 2015-07-08 13:00:28 -04:00
Jon Szymaniak
c6fb26e203 host/misc/matlab: Corrected indexing
This worked, but wasn't technically correct.
2015-07-08 13:00:28 -04:00
Jon Szymaniak
962d7b2be9 libbladeRF: Support matching a subset of a serial number
Users no longer have to enter the entire serial number when using
bladerf_open() or bladerf_open_with_devinfo(). Instead, the
shortest unambiguous subset (starting at the first character) can
be used.

For example, for a bladeRF with serial f12ce1037830a1b27f3ceeba1f521413,
one could open it via the device string:
    "*:serial=f12c"

If the requested serial number subset is ambiguous, then libbladeRF
will open whichever matching device it encounters first.
2015-07-05 13:48:04 -04:00
Jon Szymaniak
63003562c9 Merge pull request #402 from rtucker/dev-jynik-vs-the-changelog-rebase 2015.06-rc1.1
Fixup debian/changelog

Pulling this in to fix the mess I made and then proceeding to don a dunce cap and go sit in the corner.
😞
2015-07-01 21:58:44 -04:00
Ryan Tucker
23c62d0d3d fixup debian/changelog
Bring 2015.02 entry back, run through dch to bump timestamp
and clean up formatting.

stray lines wander in
entire revisions gone
there's an app for this
2015-07-01 20:12:21 -04:00
Jon Szymaniak
0fe4e0266b debian/changelog: Fixed stray line 2015-06-30 22:12:50 -04:00
Jon Szymaniak
b6cf480fcd Updated top-level CHANGELOG and debian/ for 2015-06-RC1 release 2015.06-rc1 2015-06-30 19:56:40 -04:00
Jon Szymaniak
974e8ecfd9 bladeRF-cli: Updated version to v1.2.0 bladeRF-cli_v1.2.0 2015-06-30 18:58:12 -04:00
Jon Szymaniak
ab73e39006 libbladeRF: Updated version to v1.4.0 libbladeRF_v1.4.0 2015-06-30 18:58:12 -04:00
Jon Szymaniak
5517732a24 libbladeRF: Updated version compat table for FPGA v0.3.3 fpga_v0.3.3 2015-06-30 18:58:12 -04:00
bglod
cd9d7ec4cf hdl: Incremented FPGA_VERSION_PATCH 2015-06-30 18:58:12 -04:00