Moving forward, MATLAB and Simulink support will be offered via
libbladeRF bindings maintained in this repository. These MATLAB bindings
are implemented as a thin object-oriented interface that utilizes
loadlibrary() and calllib().
Simulink support is achieved through a MATLAB System block
implementation that uses bladeRF.m. Users are welcome to adapt the
provided bladeRF_Simulink.m implementation to their particular needs.
This provides a non-blocking variant of bladerf_submit_stream_buffer(),
which provides API users with more control over how they might want
to handle asynchronous buffer submission.
This API functionality has been exposed to allow users to implement
schemes similar to that used to address Issue #438.
This fixes issue #438, in which the bladerf_sync_tx() implementation
was limited by the number of transfers, and not taking advantage
of the available TX buffers (beyond N=<num_transfers>).
This is addressed by allowing the bladerf_sync_tx() context to defer
buffer submission to the sync TX callback handler when it is unable to
submit filled buffers.
Once assigned the responsibility of submitting deferred (filled)
buffers, the sync TX callback will continue to do so until
no filled buffers are available. At this point, the callback
relinquishes its submission duty back to the bladerf_sync_tx() context.
This is one step towards addressing issue #438; we must first
know that we are unable to submit a buffer so that we can defer
its submission to a later callback.
This will be returned by API functions when an operation would need
to block to complete, but the caller has requested non-blocking
operation. In this situation, the caller may need to wait and
resubmit the request at a later time.
Adding the ability to set the SMB frequency when in MIMO master mode.
Also fix a bug where attaching the xb200 and setting MIMO master
would turn off the other clock not allowing an xb200 enabled device
to ever be a master clock supplier.
Being able to set the master frequency is useful when you want to
lock test equipment to the bladeRF oscillator.
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.
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.
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.
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.
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.
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.
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.
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.
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.