multi-arfcn, sigproc: add signal processing core

The core signal processing components consist of C based implemen-
tations of operations including convolution, FFT, and interleaving.

The majority of operations are complex vector based and setup in a
form suitable for SIMD optimization in a straightforward manner.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
multi-arfcn, trx: add header wrappers for radio interface

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
multi-arfcn, trx: add polyphase channelizer and synthesis filter

Polyphase channelizer allows for the use of 'M' independent
channels over a single physical device. In contrast to a
direct frequency translate and filter approach, the polyphase
implementation shifts processing from the high sampling rate
side and allows operation at the lower, more efficient
channel rate.

Multirate channelizer design consists of two stages. From the
perspective of the receive side, the first stage consists of
feeding the receive signal - sampled at 'M' times the channel
spacing - through a 'M' path polyphase filter. The output of
the filter consists of all channels aliased down to baseband.
Phase alignment is performed to separate the alised signals;
an FFT is used for efficient implementation.

In the second stage, the 'M' separated channels at the output
of the FFT are selectively downsampled from channel rate to
the GSM symbol rate. Another polyphase filterbank is used for
this purpose.

The transmit side "synthesis" filter combines 'M' channels
into a single output channel and is the inverse of the
aforementioned channelization process.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
multi-arfcn, trx: modify radio interface for multi-channel use

The radio interface needs to feed the device I/O buffers
synchronously in order to drive the channelizer. Asynchronous
channel access occurs opposite the radio interface through
a bank of thread-safe FIFO's or priority queue's on receive
and transmit sides respectively.

Setup 'M' channels and allow only a subset to be active at a
given time. When a channel is unused, there is no need to
feed the particular receive FIFO or pull data from the
channel priority queue.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
multi-arfcn, trx: modify single channel resampling for new sigproc

Use the SIMD optimized vector and signal processing calls. Also
plug into channel '0' of the multi-channel radio interface. We
also get additional speed by not allocating or shifting samples
memory during operation.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
multi-arfcn, trx: add multi-channel radio I/O backend

This implementation of the radio interface push and pull
operations runs a high rate sample stream through a
resampling channelizer to transparently present 'M'
channels to the radio interface. New channelizer and
synthesis filter classes are used for this task.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
multi-arfcn, uhd: output floating point directly from uhd

The transceiver core operates on floating point so we can
find some savings in performing the conversion within UHD.
The conversion is then done on the kernel-to-userspace
copy, which needs to occur anyways. We take on a slight
I/O penalty from the larger sample sizes, but this is
negated by other performance benefits.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
multi-arfcn, trx: remove float conversion from single channel case

With the radio device using floats, we can remove the conversion
and intermediate buffer in the push and pull calls.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
multi-arfcn, trx: split transceiver to handle multiple channels

This patch separates the 'Transceiver' into a multi-channel
I/O component and single channel component. The latter may
may have multiple instances. The receive FIFO is converted to
a thread-safe queue.

The 'TransceiverIO' continuously drives the receive and transmit
loops. In this process, bursts are driven into thread-safe FIFO's
and read from the priority queues. Filler bursts are inserted if
no transmit data is available.

Each 'Transceiver' instance attaches to the I/O object and creates
its own threads and sockets, which include blocking on the receive
FIFO for the attached channel. Each instance also handles its own
control loop and clock indications.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
multi-arfcn, core: setup gsm core for handle multi-carrier

A single Transceiver manager manages a list of pointers
to 'M' ARFCN managers. All accesses to an ARFCN manager,
or 'radio', require specification of the channel number
ranging from 0 to 'M-1'. Channel number is related to,
but may not correspond to ARFCN number in that the chan-
nel number depends on the particular channelizer setting.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
multi-arfcn, core: setup main for three carriers

Leave 'C0' unchanged and load all additional
carrier slots as traffic channels. Carriers are
assigned two channels (400 kHz) down and up from
the the primary channel.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
multi-arfcn, trx: add and modify transceiver main for new interfaces

Add a transceiver main() for multi-arfcn use and modify single
channel transceiver for use with updated interfaces.

Setup multiTRX with 3 channels for default case.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
multi-arfcn, build: setup build system for multi-channel use

Force multi-channel use because coexistence with single channel
settings has not been tested at this time.

Disable USRPping test application as it is not applicable and
broken with the current configuration.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
multi-arfcn, sigproc: add sse optimized convolution

Use SSE intrinsics for floating point complex-real
convolution in restricted instances of length 4, 8,
and 16 filters. Other values will utilize a generic
implementation.

Optimized implementations perform convolution with
quad-word multiply and add instructions while not
unloading filter coefficients from the XMM register
file while iterating.

SSE3 is required due to use of horizontal add
instructions.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
multi-arfcn, sigproc: set aligned memory allocation on 32-bit machines

Wel need 16-byte alingment for SSE aligned loads. GCC will guarantee
that on 64-bit architectures, but only 8-byte alignment on 32 machines.
In any case, use memalign to explicity request 16-byte alignment.

This primarily affects filter taps, which are assumed to be always
be read from index 0 of the allocated vector.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
multi-arfcn, trx: consolidate radio parameters in a single header

Create a new compiled parameters file that combines configurable
radio preprocessor definitions. These include the number of
channels, channel bandwidth, samples-per-symbol and filter
settings.

We also need different Tx / Rx timeslot correction offsets for
each configuration, which are the effect of different sample rates
and group delay values. These offsets are measured empirically.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
transceiver: fix build warning due to NULL use

GCC complains when a NULL value is returned through
an 'int' interface. Use '0' instead so that gcc will
shutup.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
multi-arfcn, trx: remove limitation on transceiver sample rate

There was a previous assumption that the transceiver would
operate at the GSM symbol rate and the channelizer would run
at a higher rate (generally 400 ksps). With two samples-per-
symbol in the transceiver, the channelizer needs to run at the
lower of the two rates. To handle both cases, we need to be
explicit when specifying filter and buffer construction in the
base class so that the lengths are setup correctly.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
multi-arfcn, trx: match variable names to existing coding style

Convert to camel case and m/w prefixing where appropriate in the
main transceiver files. This matches what appears to existing
conventions throughtout the existing code base.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
multi-arfcn, trx: fix macros that missed previous file renaming

Previous name changes were the following,

Downsampler -> Resampler
ChannelizerTx -> Synthesis

Signed-off-by: Thomas Tsou <ttsou@vt.edu>