Transceiver52M: Reverse storage of convolution vectors

With convolution changes, we now assume that tap values for
filterting are stored in reverse. Along the same lines,
the tap values used during correlation are no longer stored
in reverse, however, they are still assumed to be conjugated.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
Transceiver52M: Replace resampler with SSE enabled implementation

Replace the polyphase filter and resampler with a separate
implementation using SSE enabled convolution. The USRP2 (including
derived devices N200, N210) are the only supported devices that
require sample rate conversion, so set the default resampling
parameters for the 100 MHz FPGA clock. This changes the previous
resampling ratios.

  270.833 kHz -> 400 kHz      (65 / 96)
  270.833 kHz -> 390.625 kHz  (52 / 75)

The new resampling factor uses a USRP resampling factor of 256
instead of 250. On the device, this allows two halfband filters to
be used rather than one. The end result is reduced distortial and
aliasing effecits from CIC filter rolloff.

B100 and USRP1 will no be supported at 400 ksps with these changes.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
Transceiver52M: Add SSE floating point / integer conversion

Convertions are performed in multiples of 4 or 8. All loads are
considered unaligned.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
Transceiver52M: Disable energy detector at 1 sample-per-symbol

The adaptive energy threshold gating suffers a near-far problem
at certain gain levels. This is due to exponential threshold
raising, but linear decreases. A large signal level followed by
a period low signal level causes (comparatively) weak signals to
go undetected. Additionally, the algorithm performs differently
at multiple RF gain levels.

This patch switches solely to correlation based gating for burst
detection. At one SPS, the main computational load with this
approach is sub-sample width peak interpolation, which we disable
for intial detection.

This option is only enabled for one SPS.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
Transceiver52M: Add 4 samples-per-symbol Laurent pulse shape

When 4 samples-per-symbol operation is selected, replace the
existing pulse approximation, which becomes inaccurate with
non-unit oversampling, with the primary pulse, C0, from the
Laurent linear pulse approximation.

Pierre Laurent, "Exact and Approximate Construction of Digital Phase
  Modulations by Superposition of Amplitude Modulated Pulses", IEEE
  Transactions of Communications, Vol. 34, No. 2, Feb 1986.

Octave pulse generation code for the first three pulses of the
linear approximation are included.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
Transceiver52M: Add UmTRX support

Requires Fairwaves UHD driver.

  https://github.com/chemeris/UHD-Fairwaves.git

Signed-off-by: Thomas Tsou <tom@tsou.cc>
Transceiver52M: Refactor RACH and normal burst detection

Both RACH and normal bursts are detected with the same approach of
midamble correlation combined with peak-to-average ratio. The
difference is the midamble placements and lengths. Thus, there is
no reason to have independent implementations.

This patch creates a common call burstDetect(), while leaving the
correlation window indexing in the original calls.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
Transceiver52M: Increase normal and RACH correlation thresholds

Because we can. New threshold values obtained by from bench testing
with generated noise and modulated PN sequences. Detection still
achievable near noise floor.

Signal source: Rohde & Schwarz SMIQ

Signed-off-by: Thomas Tsou <tom@tsou.cc>
Transceiver52M: Widen resampling filter width by about 25 percent

This patch only applies to use at 4 samples-per-symbol. By widening
the resampling filter we achieve slightly better total distortion
on USRP2 testing. At 4 samples-per-symbol this gives us roughly an
additional 0.5 degree RMS of improved phase error on Agilent E4406A
testing. This comes at a slight expense of amplitude error, but
given phase or ampltude accuracy, we'll take the phase.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
Transceiver52M: Check that sample rates are sane before using

If there is an error in the sample rate determination, noted
by a negative return sample rate value, error directly and
don't try to set the device rate.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
Transceiver52M: Add B200 support

Currently only supported at 4 samples-per-symbol.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
Transceiver52M: Update USRP timing offsets due to resampler change

Group delays change with the new sample rate and sample rate
conversion setup. Adjust accordingly for 1, 2, and 4 SPS.

Signed-off-by: Thomas Tsou <tom@tsou.cc>