wiki:OsmoTRX

OsmoTRX

OsmoTRX is a software-defined radio transceiver that implements the Layer 1 physical layer of a BTS comprising the following 3GPP specifications:

  • TS 05.01 "Physical layer on the radio path"
  • TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
  • TS 05.04 "Modulation"
  • TS 05.10 "Radio subsystem synchronization"

OsmoTRX is based on the transceiver code from the OpenBTS project, but setup to operate independently with the purpose of using with non-OpenBTS software and projects, while still maintaining backwards compatibility with OpenBTS. Currently there are numerous features contained in OsmoTRX that extend the functionality of the OpenBTS transceiver. These features include enhanced support for various embedded platforms - notably ARM - and dual channel diversity support for the Fairwaves UmTRX.

Features

Intel SSE Support

  • SSE3
  • SSE4.1

On Intel processors, OsmoTRX makes heavy use of the Streaming SIMD Extensions (SSE) instruction set. Accelerated operations include pulse shape filtering, resampling, sequence correlation, and many other signal processing operations. SSE3 is the minimum requirement for accelerated use.

SSE3 is present in the majority of Intel processors since later versions of the Pentium 4 architecture and is also present on low power Atom processors. Support is automatically detected at build time. For additional performance information, please see the performance and benchmarks section.

ARM Support

  • NEON
  • NEON-VFPv4

OsmoTRX runs on a variety of ARM processors with and without NEON coprocessors. Like SSE on Intel processors, NEON provides acceleration with SIMD vectorized instructions.

Tested popular architectures include ARM11 (Raspberry Pi), Cortex-A8 (BeagleBoard), and Cortex-A15 (ArndaleBoard). Loosely speaking, these platforms are representative of low cost embedded devices, mid-level handsets, and high-end smartphones respectively. Similarly, in order, these platforms include no NEON coprocessor, standard NEON, and NEON-VFPv4. The latter NEON variation, VFPv4, provides additional fused-multiply-accumulate (FMA) instructions useful for many DSP operations.

NEON support must be enabled by the user at build time. For additional information, please see the configuration and performance and benchmarks sections.

Dual Channel (UmTRX and B210)

Two dual channel modes are available: standard dual channel mode and diversity. In standard dual channel mode, each RF path of the dual channel device supports a different ARFCN. Each path operates independently a nd operates similarly to two separate devices. GSM channel capacity in this mode is doubled. This option can be configured at run time from the command line.

Dual Channel Diversity (UmTRX, experimental)

Diversity mode is similar to the standard dual channel mode except each antenna supports both ARFCN channels. In this case, the receiver sample bandwidth is widened to handle both ARFCN's and subsequently converted and demultiplexed into separate sample streams. Each GSM receive path is fed dual signals, where antenna selection diversity is performed by taking the stronger signal on a burst-by-burst basis. This diversity setup improves uplink reception performance in multipath fading environments.

Limitations are increased CPU utilization and that ARFCN spacing is restricted (currently at 400 kHz) by the receiver sampling bandwidth. Setting the ARFCN spacing beyond the sampling limit will disable the diversity path and operate in standard dual channel mode. This options can be configured at run time from the command line.

Uplink Burst Detection

OsmoTRX utilizes an updated receive burst detection algorithm that provides greater sensitivity and reliability than the original OpenBTS approach, which relied on energy detection for the initial stage of burst acquisition.

The limitation of the previous approach was that it was slow to adapt to highly transient power levels and false burst detection in challenging situations such as receiver saturation, which may occur in close range lab testing. The other issue was that a high degree of level tuning was often necessary to operate reliably.

The current receiver code addressed those limitations for improved performance in a wider variety of environments.

Low Phase Error Modulator

The default GSM downlink signal is configured for low distortion using a linearized GMSK modulator. The implementation is based on a two pulse Laurent approximation of continuous phase modulated (CPM) signals. The baseband output signal measures with very low phase error and is capable of passing industry spectrum mask requirements. Please note that actual performance will depend strongly on the particular device in use.

Theoretical details can be found in the report on GMSK. Octave / Matlab code for pulse generation is also available.

This option can be enabled or disabled at run time from the command line.

Very Low Phase Error (Ettus Research N200)

http://tsou.cc/gsm/osmo-trx-phase75.gif

Spectrum Mask (Ettus Research N200)

http://tsou.cc/gsm/osmo-trx-spectrum75.gif

RF Hardware support

Multiple RF devices are currently supported. These include USRP family products from Ettus Research, and the UmTRX from Fairwaves.

FairwavesNotes
UmTRXDual channel

All Ettus Research devices are supported.

Ettus ResearchNotes
USRP1Requires legacy libusrp driver and clocking modification
USRP210 MHz external reference required
B100
B110
B200GPSDO or 10 MHz external reference recommended
B210Dual channel, 10 MHz external reference recommended
N200
N210
E100
E110

Embedded Platform Support

OsmoTRX has been tested on the multiple embedded platforms representing a wide range of device types. Low cost ARM devices are generally limited by memory and I/O as much CPU utilization.

Running a full or near full ARFCN configuration (7 simultaneous TCH channels with Combination V) may require running the GSM stack remotely, which can be configured at runtime on the command line. This limitation appears to be scheduling related more so than lack of CPU resources, and may be resolved at a later time.

PlatformSoCProcessorSIMD/FPUTesting Notes
ArndaleBoardSamsung Exynos 5250ARM Cortex-A15NEON-VFPv47 TCH
BeagleBoard-xMTexas Instruments OMAP3ARM Cortex-A8NEON7 TCH, remote OsmoBTS stack
Ettus E100Texas Instruments OMAP3ARM Cortex-A8NEON7 TCH, remote OsmoBTS stack
Raspberry PiBroadcom BCM2835ARM11VFP2 TCH, remote OsmoBTS stack
Shuttle PCNAIntel Atom D2550SSE3Dual channel, 15 TCH

All embedded plaforms were tested with low-phase error modulator disabled. Use of the more accurate modulator on embedded platforms has not been extensively tested.

Mailing List

For development purposes, OsmoTRX is discussed on both OpenBTS and OpenBSC mailing lists at openbts-discuss@lists.sourceforge.net and openbsc@lists.osmocom.org respectively.

Please direct questions and bug reports to the list appropriate for the GSM stack being used.

Subscription information is available at https://lists.sourceforge.net/lists/listinfo/openbts-discuss and http://lists.osmocom.org/mailman/listinfo/openbsc/.

GPRS support

OsmoTRX supports GPRS through OsmoBTS.

For GPRS support with OpenBTS, please use the transceiver supplied with OpenBTS.

Source code

The source code is available from git.osmocom.org (module osmo-trx).

Public read-only access is available via

$ git clone git://git.osmocom.org/osmo-trx

You can browse it via cgit: http://cgit.osmocom.org/cgit/osmo-trx/

Configuration and Build

The only package dependency is the Universal Hardware Driver (UHD), which is available from Ettus Research or Fairwaves depending on the device. Please note that the UHD implementation must match hardware (i.e. Ettus Research UHD for USRP devices and Fairwaves UHD with UmTRX). The one device that does not use the UHD driver is the USRP1, which is supported through the legacy libusrp driver provided in GNU Radio 3.4.2.

First, run autoreconf to remake the build system files.

$ autoreconf -i
...

Intel Platforms (All)

Intel SSE support is automatically detected on Intel x86 platforms. No user intervention is necessary. The general configuration defaults to the low phase error modulator. Atom users may wish to use the low-CPU utilization modulator, which can be later enabled from the command line at runtime.

$ ./configure
...
checking whether mmx is supported... yes
checking whether sse is supported... yes
checking whether sse2 is supported... yes
checking whether sse3 is supported... yes
checking whether ssse3 is supported... yes
checking whether sse4.1 is supported... yes
checking whether sse4.2 is supported... yes
...

ARM Platforms with NEON

Many popular ARM development boards fall under this category including BeagleBoard, PandaBoard, and Ettus E100 USRP. This option will disable the low phase error modulator, which can be re-enabled at runtime. NEON support must be manually enabled.

$ ./configure --with-neon

ARM Platforms with NEON-VFPv4

Currently very few development platforms support this instruction set, which is seen mainly in high end smartphones and tablets. Available development boards are ArndaleBoard and ODROID-XU. This option will disable the low phase error modulator, which can be re-enabled at runtime. NEON-VFPv4 support must be manually enabled.

$ ./configure --with-neon-vfpv4

ARM Platforms without NEON

This configuration mainly targets the Raspberry Pi. ARM platforms without NEON vector units are almost always very slow processors, and generally not very suitable for running OsmoTRX. Running OsmoTRX on a Raspberry Pi, however, is possible along with limited TCH (voice) channel support. Currently this configuration requires minor code changes.

Coming soon...

Build and Install

After configuration, installation is simple.

$ make
$ sudo make install

Running

OsmoTRX can be configured with a variety of options on the command line. In most cases, the default settings will suffice. Notable options include UHD device argument passing, which is often useful for using network based devices with firewalls, and external 10 MHz reference support.

$ osmo-trx -h
linux; GNU C++ version 4.8.1 20130603 (Red Hat 4.8.1-1); Boost_105300; UHD_003.005.004-140-gfb32ed16

Options:
  -h    This text
  -a    UHD device args
  -l    Logging level (EMERG, ALERT, CRT, ERR, WARNING, NOTICE, INFO, DEBUG)
  -i    IP address of GSM core
  -p    Base port number
  -d    Enable dual channel diversity receiver
  -x    Enable external 10 MHz reference
  -s    Samples-per-symbol (1 or 4)
  -c    Number of ARFCN channels (default=1)
  -f    Enable C0 filler table
  -o    Set baseband frequency offset (default=auto)
$ osmo-trx -a "addr=192.168.10.2"
linux; GNU C++ version 4.8.1 20130603 (Red Hat 4.8.1-1); Boost_105300; UHD_003.004.000-b14cde5

Config Settings
   Log Level............... INFO
   Device args............. addr=192.168.10.2
   TRX Base Port........... 5700
   TRX Address............. 127.0.0.1
   Channels................ 1
   Samples-per-Symbol...... 4
   External Reference...... Disabled
   Diversity............... Disabled

-- Opening a UmTRX device...
-- Current recv frame size: 1472 bytes
-- Current send frame size: 1472 bytes
-- Setting UmTRX 4 SPS
-- Transceiver active with 1 channel(s)

OsmoTRX with OpenBTS

OsmoTRX is fully compatible with OpenBTS for voice and SMS services. Due to differences in handing of GPRS, OsmoTRX does not support GPRS when used with OpenBTS, however, GPRS with the Osmocom stack is supported.

For use with OpenBTS, enable the filler table option "Enable C0 filler table", which enables OpenBTS style idle bursts and retransmissions.

$ osmo-trx -f

The OsmoTRX transceiver should be started before running OpenBTS. No symbolic link to './transceiver' should exist in the OpenBTS directory. This prevents OpenBTS from starting its own transceiver instance.

Benchmarks

A variety of performance benchmarks are available for various code optimizations. These include floating point - integer conversions, convolution, and convolutional decoding. Note that convolutional decoding does not take place in OsmoTRX, but one stop higher in the Layer 1 stack - either in OsmoBTS or OpenBTS core.

Repository

Currently the trx-bench repository holds the test files and contains the same NEON and SSE code as OsmoTRX. The test code may be merged into OsmoTRX at a later time, but, for now, it exists as a separate repository. NEON configure options are the same as OsmoTRX.

$ git clone https://github.com/ttsou/trx-bench.git

$ cd trx-bench
$ autoreconf -i
$ ./configure [--with-neon] [--with-neon-vfp4]
$ make
$ src/conv_test
$ src/convert_test
$ src/convolve_test

The convolutional decoding test includes command options including experimental support for benchmarking with multiple threads.

$ ./conv_test -h
Options:
  -h    This text
  -i    Number of iterations
  -j    Number of threads for benchmark (1 to 32)
  -b    Run benchmark tests
  -a    Run validity checks
  -e    Run bit-error-rate tests

Selected benchmark results are provided below. All tests are run on a single core only.

Intel Haswell (i7 4770K 3.5 GHz)

--- Floating point to integer conversions
-- Testing 40000 iterations of 3120 values
- Measuring conversion time
- Elapsed time base...                  0.065508 secs
- Validating SIMD conversion results... PASS
- Measuring conversion time
- Elapsed time SIMD ...                 0.011424 secs
- Speedup...                            5.734244
[+] Testing: GSM TCH/AFS 7.95 (recursive, flushed, punctured)
[.] Input length  : ret = 165  exp = 165 -> OK
[.] Output length : ret = 448  exp = 448 -> OK
[.] Pre computed vector checks:
[..] Encoding: OK
[..] Decoding base: 
[..] Decoding SIMD: 
[..] Code N 3
[..] Code K 7
OK
[.] Random vector checks:
[.] Testing baseline:
[..] Encoding / Decoding 10000 cycles:
[.] Elapsed time........................ 1.435066 secs
[.] Rate................................ 3.121808 Mbps
[.] Testing SIMD:
[..] Encoding / Decoding 10000 cycles:
[.] Elapsed time........................ 0.073524 secs
[.] Rate................................ 60.932485 Mbps
[.] Speedup............................. 19.518334

Intel Atom (D2500 1.86 GHz)

--- Floating point to integer conversions
-- Testing 40000 iterations of 3120 values
- Measuring conversion time
- Elapsed time base...                 1.147449 secs
- Validating SSE conversion results... PASS
- Measuring conversion time
- Elapsed time SSE ...                 0.347838 secs
- Quotient...                          3.298803
[+] Testing: GSM TCH/AFS 7.95 (recursive, flushed, punctured)
[.] Input length  : ret = 165  exp = 165 -> OK
[.] Output length : ret = 448  exp = 448 -> OK
[.] Pre computed vector checks:
[..] Encoding: OK
[..] Decoding base: 
[..] Decoding SIMD: 
[..] Code N 3
[..] Code K 7
OK
[.] Random vector checks:
[.] Testing baseline:
[..] Encoding / Decoding 10000 cycles:
[.] Elapsed time........................ 11.822688 secs
[.] Rate................................ 0.378932 Mbps
[.] Testing SIMD:
[..] Encoding / Decoding 10000 cycles:
[.] Elapsed time........................ 0.550423 secs
[.] Rate................................ 8.139195 Mbps
[.] Speedup............................. 21.479277

ArndaleBoard (ARM Cortex-A15 1.7 GHz)

Please note that the Viterbi implementations on ARM is largely C based with speedup generated primarily through algorithm changes. In comparison, vector optimization on Intel platforms with SSE is currently much more aggressive, which explains the disparity on decoding performance.

--- Floating point to integer conversions
-- Testing 40000 iterations of 3120 values
- Measuring conversion time
- Elapsed time base...                 0.384097 secs
- Validating SSE conversion results... PASS
- Measuring conversion time
- Elapsed time SSE ...                 0.100877 secs
- Quotient...                          3.807578
[+] Testing: GSM TCH/AFS 7.95 (recursive, flushed, punctured)
[.] Input length  : ret = 165  exp = 165 -> OK
[.] Output length : ret = 448  exp = 448 -> OK
[.] Pre computed vector checks:
[..] Encoding: OK
[..] Decoding base: 
[..] Decoding SIMD: 
[..] Code N 3
[..] Code K 7
OK
[.] Random vector checks:
[.] Testing baseline:
[..] Encoding / Decoding 10000 cycles:
[.] Elapsed time........................ 5.371288 secs
[.] Rate................................ 0.834064 Mbps
[.] Testing SIMD:
[..] Encoding / Decoding 10000 cycles:
[.] Elapsed time........................ 1.016621 secs
[.] Rate................................ 4.406755 Mbps
[.] Speedup............................. 5.283471

BeagleBoard-xM (ARM Cortex-A8 800 MHz)

--- Floating point to integer conversions
-- Testing 40000 iterations of 3120 values
- Measuring conversion time
- Elapsed time base...                  6.292542 secs
- Validating SIMD conversion results... PASS
- Measuring conversion time
- Elapsed time SIMD ...                 0.839081 secs
- Quotient...                           7.499326
[+] Testing: GSM TCH/AFS 7.95 (recursive, flushed, punctured)
[.] Input length  : ret = 165  exp = 165 -> OK
[.] Output length : ret = 448  exp = 448 -> OK
[.] Pre computed vector checks:
[..] Encoding: OK
[..] Decoding base: 
[..] Decoding SIMD: 
[..] Code N 3
[..] Code K 7
OK
[.] Random vector checks:
[.] Testing baseline:
[..] Encoding / Decoding 10000 cycles:
[.] Elapsed time........................ 21.963257 secs
[.] Rate................................ 0.203977 Mbps
[.] Testing SIMD:
[..] Encoding / Decoding 10000 cycles:
[.] Elapsed time........................ 3.083282 secs
[.] Rate................................ 1.452997 Mbps
[.] Speedup............................. 7.123337

Full Results

http://tsou.cc/gsm/haswell.txt

http://tsou.cc/gsm/shuttle.txt

http://tsou.cc/gsm/arndale.txt

http://tsou.cc/gsm/beagle.txt

Authors

OsmoTRX is currently developed and maintained by Thomas Tsou with generous support from Fairwaves, the Open Technology Institute, and Ettus Research. The code is derived from the OpenBTS project, which was originally developed by David Burgess and Harvind Samra at Range Networks.

Last modified 17 months ago Last modified on Feb 10, 2015, 12:12:48 PM

Attachments (2)

Download all attachments as: .zip