Commit Graph

951 Commits

Author SHA1 Message Date
Thomas Tsou 15d743efaf Transceiver52M: Disable filler table retransmissions by default
Burst selection at a particular time works in the following order
of priority.

1. Slot is disabled with channel combination set to NONE (default)
1. Burst exists in priority queue for the current time.
2. Filler table entry is used

This patch sets default behaviour to force all filler table entries
to zero and disallows filler table changes. This effectively means
that only bursts received from upper layers will be transmitted and
nothing will be automatically transmitted in the absence or delay
of incoming burts at a particular time.

New Command line option "Enable C0 filler table" allows reverting
to previous idle burst generation and retransmission behaviour on
TRX0. Retransmission cannot be enabled on non-C0 channels.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2014-01-26 21:52:46 -05:00
Thomas Tsou af506441b3 Transceiver52M: Add missing scaling vector resize
Downlink scaling factors, which are stored in a vector for multiple
channels, was not being sized correctly.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-18 01:36:58 -05:00
Thomas Tsou 4de70be9a6 Transceiver52M: Remove database configuration file requirement
We don't require any parameters stored in the configuration table,
so don't bother with the existence of the persistent database file.
This also removes an unnecessary step during initial setup since
relevant parameters can be configured from the command line.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-17 18:57:45 -05:00
Thomas Tsou fb827d04ba Transceiver52M: Ignore channel estimation if we are not equalizing
Equalization is currently disabled by default. As such, we don't need to
run channel estimates or even track the update state, which would
otherwise be allocating/decallocating the channel state vector at
regular intervals.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-16 16:16:36 -05:00
Thomas Tsou 2c79110969 Transceiver52M: UHD: Check running status before stopping stream
On startup errors we get a segfault if we stop and shutdown. This
is because we try to send a stop stream command to the device before
it has been created. Setup a check for running status before
attempting to stop the physical device.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-16 01:44:07 -05:00
Thomas Tsou 85b179d125 Transceiver52M: Create new osmo-trx executable
Create new main executable with full command line option parsing
of relevant parameters. Database configuration table still exists
(and must exist because of the global gConfig object), but can
be bypassed with command line options.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-16 01:44:07 -05:00
Thomas Tsou 2e622ff131 Transceiver52M: Output device and operating mode to stdout
Very useful user information at startup.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-16 01:43:46 -05:00
Thomas Tsou 3f32ab5afa Transceiver52M: Enable all warnings and resolve
Mainly basic signed vs unsigned comparisons and intializer ordering.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou 8c33679fa5 Transceiver52M: Add virtual destructor for radio device
Empty destructor removes compile warning.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou 477b77c558 Transceiver52M: Remove unused code
This includes unknown and unused variables, functions, and
non-relevant documentation.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou d3fccea05f Transceiver52M: Allow only channel zero to set TSC value
We support one TSC value per each transceiver object. Only channel
zero can set this value. Other channels can attempt to set the TSC
value, but will error if the TSC does not match the existing value.
In either case, non-zero channels do not manipulate the gloabl TSC
setting.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou cb269a32dd Transceiver52M: Use independent power scaling varables for each channel
Simply vectorize the existing power state variable.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou 1882099d15 Transceiver52M: Set const qualifier on appropriate radio vector methods
Pointer accessor and noise average methods for radio and noise vectors
respectively.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou a0179e37f8 Transceiver52M: Use independent noise vectors for each channel
Each ARFCN channel may be independently configureted and possibly on
separate hardware, so don't share a single vector for noise estimate
calculations. Allow a non-pointer based iterator so we can get away
with using the default copy constructor.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou ef25dba4e7 Transceiver52M: Ignore detected bursts at the noise floor
The transceiver has the ability to detect bursts below the noise floor,
but little hope in successful decoding, so don't even try. We still use
the detected burst to differentiate against noise vs actual data.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou 2d0c00bd3d Transceiver52M: Check time slot validity of incoming bursts
In errant cases, GSM core may send bursts with invalid slot values,
which is allowed by the GSM::Time object. If we find a burst like this
coming into the transceiver, then drop it immediately.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou e90a42becc Transceiver52M: Add dual channel diversity receiver option
This patch add support for dual channel diversity on the receive
path. This allows two antennas two shared antennas to be used for
each ARFCN handling channel in the receiver. This configuration
may improvde performance in multi-path fading environments,
however, noise andpotential interference levels are increased due
to the higher bandwidth used.

The receive path is oversampled by a factor of four for a rate
of 1.083333 Msps. If the receive paths are tuned within a
maximum channel spacing (currently set at 600 kHz), then both
ARFCN frequencies are processed by each channel of the receiver.
Otherwise, the frequency shifted diversity path is disabled and
standard non-diversity operation takes place.

Diversity processing is handled by selecting the path with the
higheset energy level and discarding the burst on the second
path. Selection occurs on a burst-by-burst basis.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou 30421a7e25 Transceiver52M: Refactor receive path outer burst handling
Separate the large pullRadioVector() call, which forms the central
portion of the receive path burst processing. Break out RACH, normal
burst, and demodulation into separate methods. This makes the burst
handling from the FIFO read to soft bit output somewhat more
manageable.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou 34bbef754f Transceiver52M: sigproc: Wrap internal phase on frequency shift
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>
2013-11-15 23:35:07 -05:00
Thomas Tsou 2c1f85a10c Transceiver52M: UHD: Add string descriptors to device-offset pairs
As we add more channel combintions including but not limited to
new devices, signal processing schemes, and diversity, we'll
need to handle more special cases. Add string descriptions for
just a bit more sanity.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou a2fe91a688 Transceiver52M: Add vectorized radio burst capability
This patch allows multiple signalVectors to be stored within
a single radioVector object. The motivation is to provide
a facility for diversity and/or MIMO burst handling. When
no channel value is specified, single channel bevhaviour
is maintained.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou e1ce92599a Transceiver52M: Rearrange socket port assignemnts
Style change for clarity only.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou b075dd2f73 Transceiver52M: Dynamically allocate correlation vectors
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>
2013-11-15 23:35:07 -05:00
Thomas Tsou 94edaaeee6 Transceiver52M: Allow separate in/out vectors for delay and decimation
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>
2013-11-15 23:35:07 -05:00
Thomas Tsou 0e0e1f4363 Transceiver52M: Setup sinc() call directly with table lookup
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>
2013-11-15 23:35:07 -05:00
Thomas Tsou d0f3ca3e94 Transceiver52M: Preallocate head room for burst correlation
Set a transceiver high level length value that specifies the largest
number of complex or real filter taps that we will encounter. This
allows preallocation of head room and prevents an extra allocation and
copy on every incoming receive burst.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou f8bc7c351f Transceiver52M: UHD: Continue on receive and send timeouts
With testing on current UHD releases, currently 003.005.xxx series,
timeout errors on both receive and transmit are recoverable on network
and USB based devices. Remove the fatal error conditions.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou a4cf48cf8b Transceiver52M: Set priority on downlink socket thread
Clock indications passed up to GSM core originate on the transciever
downlink side. Set priority to keep the flow of clock updates
consistent.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou 7940335586 Transceiver52M: Default to 1 sample-per-symbol low powered devices
This includes ARM Cortex A8 and A15 powered device such as Beagle
Board, Gumstix driven E100 USRP, and Arndale board. Set the reduced
SPS value automatically for the user.

For x86, if we don't support SSE3, then the architecture is
probably ancient and not with using. Drop the sampling down anyways
to at least make an attempt. Non floating point SIMD devices (e.g.
Raspberry Pi) also fall in this category

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou f79c4d06ff Transceiver52M: Precompute fractional delay filters
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>
2013-11-15 23:35:07 -05:00
Thomas Tsou 20eb6d64fd Transceiver52M: Separate signalVector into it's own file
Break out the signalVector object and clean up the interface in the
process.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou e0fa2bfd93 Transceiver52M: Remove extra copy in receive drive path
Currently the code allocations a signalVector and then copies
into a radioVector. This is unnecessary because the latter is
a derived class making the first allocation unnecessary.
Modify the radioVector constructor to allow direct use in the
case above.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou 6f4906e375 Transceiver52M: Dynamically allocate convolution input vectors
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>
2013-11-15 23:35:07 -05:00
Thomas Tsou 0a3dc4c210 Transceiver52M: Add NEON complex-complex multiply
Complex-complex block multiples are used for phase rotation of
bursts. Optimization targeted from perf profiling.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:34:59 -05:00
Thomas Tsou acc22fa3ff Transceiver52M: Use USRP1 type window for B2xx devices
B2xx is a USB based device so use the USRP1 based adaptive flow
control window for transmit bursts. This adds additional stability
primarily on ARM platforms.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:32:40 -05:00
Thomas Tsou 7553aa973f Transceiver52M: Set variable thread priority levels
The transceiver and underlying device drivers are threaded. use
the following priority levels.

0.50 - UHD driver internal threads
0.45 - Receive device drive thread
0.44 - Transmit device drive thread
0.43 - UHD asynchronous update thread (error reporting)
0.42 - Receive burst processing thread(s)

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:32:40 -05:00
Thomas Tsou 7e4e536b1b Transceiver52M: Add ARM NEON support
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>
2013-11-15 23:32:35 -05:00
Thomas Tsou 204a9f135a Transceiver52M: Add multi channel transceiver support
This patch primarily addresses devices with multiple RF front end
support. Currently device support is limited to UmTRX.

Vectorize transceiver variables to allow multiple asynchronous
threads on the upper layer with single downlink and uplink threads
driving the UHD I/O interface synchronously.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 14:45:20 -05:00
Thomas Tsou 0169b310de Transceiver52M: Remove unnecessary UHD clock setting call
There is no need to create this method. Just call the UHD interface
directly.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-08 11:33:31 -05:00
Thomas Tsou 66e2dd2543 Transceiver52M: Remove unused files and utilities
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>
2013-11-08 11:33:31 -05:00
Thomas Tsou f078273a8a Transceiver52M: Separate transceiver per-slot state information
Collect the slot information into an indpendent state object. This
will allow us to easily create multiple instances of internal state
variables without having to replicate the transceiver object itself.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-08 11:33:31 -05:00
Thomas Tsou d647ec5dc1 Transceiver52M: Delay socket allocation to heap
For multiple transceiver connections, it is inappropriate to
allocate all sockets in the transceiver constructor due to not
knowing how many connections are avaialble in advance and for
error checking purposes. Instead, store the base socket address
port combination and setup the sockets in the initialization
call.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-08 11:33:31 -05:00
Thomas Tsou c289d7a409 Transceiver52M: Remove transmit logging option
The current status and operability of this compile option is
unknown. Remove due to lack of use, demand, and maintenance.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-08 11:33:31 -05:00
Thomas Tsou 035bee5c32 build: Remove subversion references
We do not use subversion. We do not need to refer to subversion
reference numbers.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-08 11:18:46 -05:00
Thomas Tsou cf910dcdda Transceiver52M: Reset overrun and underrun indicators
Underruns are only explicitly set on the downlink side. Overruns
are logged but unused. In either case, reset indicators to false
to avoid sending false state information.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-07 23:07:49 -05:00
Thomas Tsou 69762fd7c6 Transceiver52M: Fix SSE preprocessor definition
Using non-SSE4.1 enabled architecture would cause undefined
reference to 'convert_si16_ps' call.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-07 22:57:21 -05:00
Thomas Tsou fffd987f22 build: Set UHD driver as default configuration
Currently the default configuration is to not build the full
transceiver, which is pointless. Set the UHD driver, which
includes either Ettus or Fairwaves variants, as the default.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-04 10:23:24 -08:00
Thomas Tsou 17bbb9b755 Transceiver52M: Separate architecture specific files
Move x86 specific files into their own directory as this
area is about to get crowded with the addition of ARM
support.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-04 09:15:55 -08:00
Thomas Tsou a1a3ab4bab Transceiver52M: Update RSSI calculation
Use the same measurement method for RSSI as the noise level. Previous
method was to use the peak correlation amplitude relative to the
expected value. This created two very different amplitude approaches
between the noise measurement and RSSI measurement, which would
throw off the upper layer MS power control loop.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18 13:10:18 -04:00
Thomas Tsou fa3a787ccb Transceiver52M: Update noise measurement calculation
Previous removal of the energy detector requirement broke
the noise level calculation loop. The previous adaptive
approach was finicky - noticably at high gain levels. Since
we no longer use the energy threshold for primary burst gating,
we can return to a simpler world.

In the new approach, we compute a running average of energy
levels and track them with a noise vector. A timeslot that
passes the correlator threshold is a valid burst. These are
not used in the noise calculation. Everything else is
considered noise and used to compute the noise level with
respect to full scale input level, which for almost all
supported devices is 2^15.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18 13:10:18 -04:00