The 'diversity' option was an experimental 2 antenna receiver
implementation for UmTRX. The implementation has not been
maintained and current working status is unknown.
In addition to code rot, Coverity is triggering errors in the
associated code sections.
Removal of code cleans up many cases of special handling that
were necessary to accommodate the implementation.
Change-Id: I46752ccf5dbcffbec806081dec03e69a0fbdcdb7
Convert negative value check on unsigned value to zero check
to avoid potential divide-by-zero error condition.
Change-Id: Ib0d7d1bceb5fe66e69345db93a74e3e0773a2257
Fixes: Coverity CID 165059
Improper length values will cause the polyphase resampler
rotation to fail. Check return and return NULL on error.
Change-Id: I3ad22f9fd7a20754f589c04258dcca3770474a9b
Fixes: Coverity CID 165235
demodCommon() used to scale input vector in place which changed original data.
That's a bad practice and is not really necessary, so I've changed the code to
scale burst after it's copied to a new vector during a delay operation.
Change-Id: Ic45f71b634e48808356d68925bb9f5783e0bf0d3
vectorSlicer() converts soft-bits from -1..+1 to 0..1 while we want
to keep SoftVector in -1..+1 mode until the last minute, because at some
point we'll want to transmit -1..+1 to osmo-bts instead of converting it
from 0..1 back to -1..+1 on the osmo-bts side.
Plus it removes code duplication - we call it once instead of twice.
Change-Id: Idd6ddd7ac219afb0df055a692632678b66373764
This makes it similar to 8-PSK demod and also saves a bit of lines ofcode and
should give us a tiny improvement in performance.
Ideally we need to remove vector slicing at all, because in osmo-bts-trx
we convert back to +-1.0 again (actually to +-127, but it doesn't mater).
So we should rather transmit +-1.0 values to avoid double conversion.
Change-Id: If9ed6f0f80fbe88c994b2f9c3cae91d0d57f4442
Documentation in sigProcLib.h was noticeably out of sync with the actual
implementation - e.g. not all arguments were documented and arguments
which are already removed are still in the documentation. Also argument
names were different between declaration in .h and implementation in .cpp
which was confusing.
I've fixed this for detect*Burst() functions.
Change-Id: I4dfd07125d9a1e9a42a78b79faff539f003deb16
Invert the initial and trailing diffential bits in the 4 sps
GMSK modulator to fix power-time mask irregularity at start
and end of burst. GSM tail bits are always zero, so we can
safely use fixed bit values.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Agilent E4406A measurement of TSC synchronized RF envelope measurement.
showed failing power levels at the tail end of EDGE bursts. Regression
traced back to following commit.
Commit d2b070369d
"uhd: Correct timing alignment in 8-PSK and GMSK downlink bursts"
In the patch, the EDGE burst was delayed one symbol, but erroneously
truncated at the tail end causing the failing RF envelope measurement.
The missing tail symbol did not appear to affect end-to-end EGPRS tests.
This patch corrects the truncation.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Reduce the burst detection threshold to pass more bursts to upper
layers, but force stricter requirements on the computation itself.
For the latter, we now require at least 5 samples (rather than 2)
to compute a peak-to-average value.
End result is increased burst detection at low SNR conditions with
a small increase in false positive bursts when no signal is present.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Add new radio interface "radioInterfaceMulti" for multi-carrier
support.
Only USRP B200/B210 devices are supported because of sample
rate requirements (3.2 Msps).
Only 4 SPS operation Tx/RX is supported.
8-PSK is supported.
Other options may be added at a later time
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Two buffers, inner and outer, are used in the transceiver
implementation. The outer buffer interfaces with the device receive
interface to guarantee timestamp aligned and contiguously allocated
sample buffers. The inner buffer absorbs vector size differences between
GSM bursts (156 or 157 samples) and the resampler interface (typically
fixed multiples of 65).
Reimplement the inner buffer with a ring buffer that allows fixed size
segments on the outer (resampler) portion and variable lengths (GSM
side) on the inner side. Compared to the previous stack-like version,
this implementation removes unnecessary copying of buffer contents.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Slightly widen the search range to accommodate timing jitter
on certain classes of devices. The expanded range minimizes
the possibility of missing bursts that arrive too early or
too late due to timing error.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
EDGE 8-PSK soft slicer was receiving input from the output of the
downsampler. Equalization and derotation were missing causing the
soft symbol output to be invalid.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Delay the EDGE downlink bursts by one symbol in order to match GMSK
pulse shaping group delay. The difference in group delay arises from
the dual pulse filter combination of the GMSK Laurent represenation
whereas 8-PSK uses a single pulse linear filter.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Previously MAXDLY value was applied to Normal Bursts, which was nice
when working with sloppy test equipment like CMD57, but useless for
real world usage. At the same time documentation and de facto usage
of MAXDLY in OsmoBTS and OpenBTS assumed that it actually applies to
Access Bursts (RACH). So this patch changes osmo-rx behavior to apply
MAXDLY to RACH bursts and introduces a new command MAXDLYNB for the
old behavior.
Timing recovery and single tap channel compensation are identical
in both GMSK and EDGE receivers. This is the section ahead of and
including the optional 4-1 downsampler. GMSK and EDGE specific
sections operate at 1 SPS.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Setup generators for empty, random, and dummy bursts. This moves error
prone burst length handling out of the Transceiver and into the signal
processing core.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
At 4 samples per symbol, we don't need to maintain the 156/157 sample
slot structure to account for the GSM 156.25 sample burst length.
Set the 4 SPS Laurent modulator to ignore the guard interval setting
and always output 625 sample sized bursts. The EDGE 8-PSK modulator
already has this behavior.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Setup correlator and detection process similar to the GMSK
receiver chain. Require 4 SPS sampling on both Rx and Tx paths
as 1 SPS sampling adds too much distoration for 8-PSK recovery.
Core receiver operations still run at 1 SPS with the exception
of fractional delay filtering, which runs at the higher rate.
Perform linear equalization to handle the Gaussian pulse
induced ISI. The fixed impulse response used for equalizer tap
calculation consists of combined EDGE pulse shape filter and
effects of the downsampling filter. Note that the non-adaptive
equalizer corrects for modulation induced band limiting and
does not account for or compensate for fading channel effects.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
DFE equalizer is unused and has been experiencing code rot for
multiple years. The effect is a significant amount of baggage being
carried in the Transceiver and interfaces.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Samples per symbol used by the transceiver is not configurable through
the socket interface once running, so stop pretending like it could be.
Initialize all tables and midambles at start.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
As a side change - get rid of passing toa and amp arguments as pointers and use
references instead.
The commit doesn't change behaviour, but makes the code cleaner.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
There are two primary changes in this commit:
1) Return values of detect functions changed form bool to int to actually pass
the return value from the inner function and notify higher levels about clipping.
Previously the information was lost due to conversion to bool.
2) Clipping level is not the final verdict now. We still try to demod a burst
and mark it as clipped only if the level is above the clipping level AND we can't
demod it. The reasoning for this is that in real life we want to do as much as
possible to demod the burst, because we want to get as much from our dynamic
range as possible. So a little bit of clipping is fine and is expected. We just
don't want too much of it to break our demod.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
R&S CMD57 complains about the start phase of bursts, particularly it shows
-15 to -30 deg of error for the bit 0.5 position (start tail bit). This patch
makes it happy. ETSI TS 145 004 section 2.2 describes this: "Before the first
bit of the bursts as defined in 3GPP TS 45.002 enters the modulator,
the modulator has an internal state as if a modulating bit stream consisting
of consecutive ones (di = 1) had entered the differential encoder."
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Alert user of overdriven burst input indicated by a positive
threshold detector result. This indication serves as notification
that the receive RF gain level is too high for the configured
transceiver setup.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
The call into table lookup will loop on values outside of the
table range. With continuously increasing phase, this leads
to an eventual permanent hard spin. Wrap the phase value to
prevent that from happening.
Signed-off-by: Thomas Tsou <tom@tsou.cc>
Stack allocating the correlation output generates a call to the copy
constructor of an zero valued vector. We can avoid this extra copy
constructor with a pointer reference and dynamic allocation.
Signed-off-by: Thomas Tsou <tom@tsou.cc>
Allow non-in-place use of the delay setting. Internally, the delay call
creates a new vector and copies the contents back into the original.
Instead, provide the option to return the computed output vector
directly and remove an an extra copy in the process.
Signed-off-by: Thomas Tsou <tom@tsou.cc>
On Beagle Board the call into the sinc() function is generating a lot of
load on the peak interpolation. Simplify the sinc() function with a
dedicated table lookup. Eventually, this table may be removed in favour
of using a precomputed filterbank for fractional delay determination.
Signed-off-by: Thomas Tsou <tom@tsou.cc>
Preallocate and compute a bank of fractional sample delay filters.
The number of filters to allocate is specified by the DELAYFILTS
preprocessor definition with a default value of 64. The filters
themselves are sinc pulse generated with 20 taps and Blackman-harris
windowed .
Signed-off-by: Thomas Tsou <tom@tsou.cc>
This prevents the use of a copy constructor in the downlink
modulator and prevents a secondary memory allocation during
the convolution. Avoid both cases by dynamically allocating
with preloaded head room. The latter provides enough memory
before the first sample in the burst to cover the length
of the filter taps.
Signed-off-by: Thomas Tsou <tom@tsou.cc>
Complex-complex block multiples are used for phase rotation of
bursts. Optimization targeted from perf profiling.
Signed-off-by: Thomas Tsou <tom@tsou.cc>
Similar to the existing Intel SSE cases, add support for NEON vector
floating point SIMD processing. In this case, use ARM assembly
directly as the NEON intrinsics do not generate preferential code
output.
Currently support NEON vectorized convolution and floating point
integer conversions.
Signed-off-by: Thomas Tsou <tom@tsou.cc>
USRPping and sigProcLibTest are in an unmaintained state,
while the intended functionality remains unknown. Stored
filter taps are also unused and should also be removed.
Signed-off-by: Thomas Tsou <tom@tsou.cc>
This patch applies oversampling, when selected with 4 sps,
to the downlink only, while running the receiver with
minimal sampling at 1 sps. These split sample rates allow
us to run a highly accurate downlink signal with minimal
distortion, while keeping receive path channel filtering
on the FPGA.
Without this patch, we oversample the receive path and
require a steep receive filter to get similar adjacent
channel suppression as the FPGA halfband / CIC filter
combination, which comes with a high computational cost.
Signed-off-by: Thomas Tsou <tom@tsou.cc>