Commit graph

1,708 commits

Author SHA1 Message Date
Adam Greig
2cc2609d80 Fix SMB max freq at 200MHz 2015-09-09 17:58:41 -04:00
Adam Greig
f7f26d5bb7 Add support for setting SMB clock output to arbitrary frequency 2015-09-09 17:58:41 -04:00
Jon Szymaniak
d6da0f75a8 libbladeRF_test: Fixed capitalization typo in header file name 2015-09-08 13:15:55 -04:00
Jon Szymaniak
3ef92a7464 libbladeRF: Updated version compat table for FX3 FW v1.8.1 2015-09-08 12:50:17 -04:00
Jon Szymaniak
6be819225e fx3_firmware: Updated version to 1.8.1 firmware_v1.8.1 2015-09-08 11:33:34 -04:00
Jon Szymaniak
aa2472a59f fx3_firmware: Addressed build warnings 2015-09-08 11:32:06 -04:00
Jon Szymaniak
c74d172351 fx3_firmware: Updated toolchain.mk.sample for FX3 SDK v1.3.3 2015-09-08 11:31:58 -04:00
Jon Szymaniak
4be58b1b07 bladeRF-cli: Fixed duplicate code blocks (CID 1321689) 2015-09-01 17:21:33 -04:00
Jon Szymaniak
94fed3d0cd libbladeRF: Fixed an invalid mask value 2015-09-01 15:59:08 -04:00
Jon Szymaniak
12ebcb3c13 bladeRF-cli: Show values after 'set' and made whitespace more consistent 2015-09-01 15:47:56 -04:00
Jon Szymaniak
e3758691d0 bladeRF-cli: Updated 'print/set [xb_gpio | xb_gpio_dir]' for pin-based access 2015-09-01 14:51:50 -04:00
Jon Szymaniak
1d0a6cc0c7 libbladeRF: Added support for attaching XB100
It appears that the voltage across the LEDs is always large
enough to keep them ON despite the output voltage.

A potential workaround for this rev of the XB100 is to use the
directionality of the LED IO pins to turn the LED on/off.
2015-09-01 13:24:33 -04:00
Jon Szymaniak
82191d8dee libbladeRF: Added masked XB GPIO write routines and XB GPIO macro definitions 2015-09-01 13:11:35 -04:00
Jon Szymaniak
a7c9d64d4f libbladeRF: Updated FPGA version compat table for v0.4.1 2015-09-01 11:37:03 -04:00
Jon Szymaniak
d5a514d92a nios: Fixed bug XB GPIO (dir) masked writes fpga_v0.4.1 2015-09-01 11:37:03 -04:00
Jon Szymaniak
859377326b nios, lms, libbladeRF: Utilize FPGA support for atomic NINT/NFRAC write fpga_v0.4.0
Both the host and NIOS II FPGA retuning modes now make use of
FPGA v0.4.0's atomic write of the LMS6002D NINT and NFRAC PLL registers.

This helps avoid changing the PLL multiple times when attempting to
configure it.
2015-08-27 15:54:25 -04:00
bglod
612f323fa3 lms: Added support for multi-write of TX and RX NINT/NFRAC registers.
Achieved by adding extra address bit (now 8 bits) to Avalon-MM
interface. The MSB indicates a multi-write instruction. For TX, the
addresses are 0x90-0x93. For RX, the addresses are 0xA0-0xA3. The
individual writes are queued up until a write to the final address is
detected (0x93 or 0xA3), then all four PLL configuration registers are
written to the LMS chip in one contiguous chip select burst.

Testbench updated to be self-checking.
2015-08-27 15:54:25 -04:00
Jon Szymaniak
43269aac57 bladeRF-cli: Check file write access before kicking off table generation 2015-08-25 15:49:03 -04:00
Jon Szymaniak
ed805993b5 bladeRF-cli: Added return code for insufficient permissions
This should help clarify the cause of file-related errors in
cases where folks are trying to rx into a location where they
do not have write permissions.
2015-08-25 14:52:55 -04:00
Jon Szymaniak
20b7196e2d libbladeRF: Return BLADERF_ERR_PERMISSION in file operations 2015-08-25 14:40:51 -04:00
Jon Szymaniak
a8f5f71a97 libbladeRF: Added INFO message regarding insufficient permissions
This is intended to help folks recognize that they've forgotten
to update their udev rules.
2015-08-25 14:19:39 -04:00
Jon Szymaniak
2afcc6a895 libbladeRF: Added error code to denote insufficient permissions 2015-08-25 14:13:40 -04:00
Jon Szymaniak
2636bb377f libbladeRF: Restored default of FPGA tuning mode per v0.3.5 fix 2015-08-25 13:28:05 -04:00
Jon Szymaniak
0d67e4e689 libbladeRF: Updated compatibility table for FPGA v0.3.5 2015-08-25 13:28:05 -04:00
Jon Szymaniak
eea547def0 nios: Updated FPGA version to reflect tuning fixes fpga_v0.3.5 2015-08-25 13:28:05 -04:00
Jon Szymaniak
d0f8af8d8e lms: Adjusted debug/warning level for tuning events 2015-08-25 13:28:05 -04:00
Jon Szymaniak
91b5c474da lms: Further relaxed VCO4 upper limit
We were still seeing some boards that wind up a bit too near the
upper edge of the VCO4 range. This change resolves this on the boards
we've tested.
2015-08-25 13:28:05 -04:00
Jon Szymaniak
faa499a80f libbladeRF_test: Keep track of previous frequency for error reporting 2015-08-25 13:28:05 -04:00
Jon Szymaniak
df4a48fffd lms: Removed disabled code 2015-08-25 13:28:05 -04:00
Jon Szymaniak
a29bf54e78 lms: Account for long VTUNE transitions during HIGH<->LOW change
The cause of tuning failures in "FPGA tuning" mode is caused by
long VTUNE settling times when switching between the search for
VTUNE HIGH and VTUNE LOW.

We now try to force VTUNE to the opposite value and poll for the
expected change instead of simply delaying and hoping VTUNE
has settled before we sample it. If we don't hit the expected VTUNE
value, we'll attempt to walk VTUNE into that region.
2015-08-25 13:28:05 -04:00
Jon Szymaniak
9fea12caaf libbladeRF: Added frequency tuning debug message 2015-08-25 13:28:05 -04:00
Jon Szymaniak
238d8b23be hdl: Added build option to select NIOS II core implementation 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
d919a173be lms: Adjusted upper limit of VCO4 range
With the addition of a warning to the lms.c code, we've been seeing
some codes hit a max VCOCAP value before hitting a VCO limit, indicating
that we're too close to the edge of a band.
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
a6aea0905c bladeRF-cli: Updated help text items
Updated 'print' to note that all parameters are now printed when
no arguments are provided.

Adjusted print and set widths to yield the same formatting in the
bladeRF-cli help output. (Closes #422)

Added help text entries for xb_* commands. (Closes #423)
2015-08-23 03:34:43 -04:00
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