Project

General

Profile

OsmoTRX » History » Version 36

Anonymous, 02/19/2016 10:47 PM
Formatted git clone text so that cut and paste works, and prepended missing autoreconf step to build instructions.

1 34 ipse
[[PageOutline]]
2 1 ttsou
= OsmoTRX =
3
4
OsmoTRX is a software-defined radio transceiver that implements the Layer 1 physical layer of a BTS comprising the following 3GPP specifications:
5
 * TS 05.01 "Physical layer on the radio path"
6
 * TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
7
 * TS 05.04 "Modulation"
8
 * TS 05.10 "Radio subsystem synchronization"
9
10 29 ttsou
OsmoTRX is based on the OpenBTS transceiver, but setup to operate independently with the purpose of using with non-OpenBTS software and projects. 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. Most of these features will eventually be merged into mainline OpenBTS, but development will occur primarily on OsmoTRX.
11 6 ttsou
12
== Features ==
13
14 16 ttsou
'''Intel SSE Support'''
15 6 ttsou
* SSE3
16
* SSE4.1
17
18 20 ttsou
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.
19 1 ttsou
20 26 ttsou
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.
21 20 ttsou
22 29 ttsou
'''ARM Support'''
23 6 ttsou
* NEON
24 1 ttsou
* NEON-VFPv4
25 6 ttsou
26 20 ttsou
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.
27 1 ttsou
28 20 ttsou
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.
29
30 26 ttsou
NEON support must be enabled by the user at build time. For additional information, please see the configuration and performance and benchmarks sections.
31 20 ttsou
32 6 ttsou
'''Dual Channel (UmTRX only)'''
33 7 ttsou
34
Two dual channel modes are available: standard dual channel mode and diversity. In standard dual channel mode, each RF
35
path of the dual channel device - currently only UmTRX - supports a different ARFCN. Each path operates independently a
36 28 ttsou
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.
37 1 ttsou
38 8 ttsou
'''Dual Channel Diversity (UmTRX only)'''
39 1 ttsou
40 28 ttsou
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.
41 16 ttsou
42 28 ttsou
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.
43 20 ttsou
44 33 ttsou
'''Improved Receiver'''
45 30 ttsou
46
OsmoTRX utilizes a recently updated receive burst detection algorithm that provides greater sensitivity and reliability than the previous approach, which relied on energy detection for the initial stage of burst acquisition.
47
48
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.
49
50
The current receiver code removes those limitations. Noise and signal level measurements are also now handled in a more responsive manner.
51
52 16 ttsou
'''Low Phase Error Modulator'''
53
54 1 ttsou
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.
55
56
Theoretical details can be found in the report on [http://tsou.cc/gsm/report_gmsk.pdf GMSK]. Octave / Matlab code for [http://tsou.cc/gsm/laurent.m pulse generation] is also available.
57 28 ttsou
58
This option can be enabled or disabled at run time from the command line.
59 16 ttsou
60 20 ttsou
Very Low Phase Error (Ettus Research N200)
61 1 ttsou
62
[[Image(http://tsou.cc/gsm/osmo-trx-phase75.gif)]]
63
64 21 ttsou
Spectrum Mask (Ettus Research N200)
65 1 ttsou
66
[[Image(http://tsou.cc/gsm/osmo-trx-spectrum75.gif)]]
67
68 20 ttsou
== RF Hardware support ==
69 1 ttsou
70 20 ttsou
Multiple RF devices are currently supported. These include USRP family products from Ettus Research, and the UmTRX from Fairwaves.
71 1 ttsou
72 20 ttsou
||'''Fairwaves'''||'''Notes'''||
73
||UmTRX||Dual channel||
74
75
All Ettus Research devices are supported.
76
77
||'''Ettus Research'''||'''Notes'''||
78
||USRP1||Requires legacy libusrp driver and clocking modification||
79
||USRP2||10 MHz external reference required||
80 1 ttsou
||B100||
81
||B110||
82 20 ttsou
||B200||10 MHz external reference recommended||
83
||B210||* Dual channel, 10 MHz external reference recommended||
84 1 ttsou
||N200||
85
||N210||
86
||E100||
87
||E110||
88
89 20 ttsou
* Ettus B210 dual channel support with OsmoTRX is currently unavailable, but is expected to be added at a later time.
90
91 1 ttsou
== Embedded Platform Support ==
92
93 20 ttsou
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.
94 1 ttsou
95 20 ttsou
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.
96
97
||'''Platform'''||'''SoC'''||'''Processor'''||'''SIMD/FPU'''||'''Testing Notes'''
98
||!ArndaleBoard||Samsung Exynos 5250||ARM Cortex-A15||NEON-VFPv4||7 TCH||
99 21 ttsou
||!BeagleBoard-xM||Texas Instruments OMAP3||ARM Cortex-A8||NEON||7 TCH, remote OsmoBTS stack||
100
||Ettus E100||Texas Instruments OMAP3||ARM Cortex-A8||NEON||7 TCH, remote OsmoBTS stack||
101
||Raspberry Pi||Broadcom BCM2835||ARM11||VFP||2 TCH, remote OsmoBTS stack||
102 1 ttsou
||Shuttle PC||NA||Intel Atom D2550||SSE3||Dual channel, 15 TCH||
103 20 ttsou
104 25 ttsou
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.
105 19 ttsou
106
== Mailing List ==
107 18 ttsou
108 1 ttsou
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.
109
110 22 ttsou
Please direct questions and bug reports to the list appropriate for the GSM stack being used.
111 19 ttsou
112 16 ttsou
Subscription information is available at [https://lists.sourceforge.net/lists/listinfo/openbts-discuss] and [http://lists.osmocom.org/mailman/listinfo/openbsc/].
113 19 ttsou
114
== GPRS support ==
115 16 ttsou
116 1 ttsou
OsmoTRX supports GPRS through OsmoBTS.
117 16 ttsou
118 1 ttsou
For GPRS support with OpenBTS, please use the transceiver supplied with OpenBTS.
119
120
== Source code ==
121 16 ttsou
122 1 ttsou
The source code is available from git.osmocom.org (module osmo-trx).
123
124
Public read-only access is available via
125 36 ttsou
{{{
126
$ git clone git://git.osmocom.org/osmo-trx
127
}}}
128 1 ttsou
You can browse it via cgit: http://cgit.osmocom.org/cgit/osmo-trx/
129 18 ttsou
130
== Configuration and Build ==
131 19 ttsou
132 1 ttsou
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.
133 36 ttsou
134
First, run autoreconf to remake the build system files.
135
{{{
136
$ autoreconf -i
137
...
138
}}}
139 1 ttsou
140 18 ttsou
'''Intel Platforms (All)'''
141
142
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.
143
{{{
144
$ ./configure
145
...
146 1 ttsou
checking whether mmx is supported... yes
147 18 ttsou
checking whether sse is supported... yes
148
checking whether sse2 is supported... yes
149
checking whether sse3 is supported... yes
150
checking whether ssse3 is supported... yes
151
checking whether sse4.1 is supported... yes
152 1 ttsou
checking whether sse4.2 is supported... yes
153 19 ttsou
...
154 18 ttsou
}}}
155
156
'''ARM Platforms with NEON'''
157
158
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.
159
{{{
160 19 ttsou
$ ./configure --with-neon
161 18 ttsou
}}}
162
163
'''ARM Platforms with NEON-VFPv4'''
164
165
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.
166
{{{
167
$ ./configure --with-neon-vfpv4
168
}}}
169
170
'''ARM Platforms without NEON'''
171
172
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.
173 1 ttsou
174 24 ttsou
Coming soon...
175 18 ttsou
176 16 ttsou
'''Build and Install'''
177
178
After configuration, installation is simple.
179
180
{{{
181 18 ttsou
$ make
182 19 ttsou
$ sudo make install
183 16 ttsou
}}}
184
185
== Running ==
186
187
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.
188
189
{{{
190
$ osmo-trx -h
191
linux; GNU C++ version 4.8.1 20130603 (Red Hat 4.8.1-1); Boost_105300; UHD_003.005.004-140-gfb32ed16
192
193
Options:
194
  -h    This text
195
  -a    UHD device args
196
  -l    Logging level (EMERG, ALERT, CRT, ERR, WARNING, NOTICE, INFO, DEBUG)
197
  -i    IP address of GSM core
198
  -p    Base port number
199
  -d    Enable dual channel diversity receiver
200
  -x    Enable external 10 MHz reference
201
  -s    Samples-per-symbol (1 or 4)
202
  -c    Number of ARFCN channels (default=1)
203
}}}
204
205
{{{
206
$ osmo-trx -a "addr=192.168.10.2"
207
linux; GNU C++ version 4.8.1 20130603 (Red Hat 4.8.1-1); Boost_105300; UHD_003.004.000-b14cde5
208
209
Config Settings
210
   Log Level............... INFO
211
   Device args............. addr=192.168.10.2
212
   TRX Base Port........... 5700
213 1 ttsou
   TRX Address............. 127.0.0.1
214 16 ttsou
   Channels................ 1
215 1 ttsou
   Samples-per-Symbol...... 4
216
   External Reference...... Disabled
217 16 ttsou
   Diversity............... Disabled
218
219
-- Opening a UmTRX device...
220
-- Current recv frame size: 1472 bytes
221
-- Current send frame size: 1472 bytes
222
-- Setting UmTRX 4 SPS
223 19 ttsou
-- Transceiver active with 1 channel(s)
224 13 ttsou
}}}
225 19 ttsou
226
== Benchmarks ==
227 17 ttsou
228 13 ttsou
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.
229
230 35 ttsou
'''Repository'''
231 1 ttsou
232 35 ttsou
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.
233 1 ttsou
234 35 ttsou
{{{
235
$ git clone https://github.com/ttsou/trx-bench.git
236
237
$ cd trx-bench
238
$ autoreconf -i
239
$ ./configure [--with-neon] [--with-neon-vfp4]
240
$ make
241
$ src/conv_test
242
$ src/convert_test
243
$ src/convolve_test
244
}}}
245
246
The convolutional decoding test includes command options including experimental support for benchmarking with multiple threads.
247
248
{{{
249
$ ./conv_test -h
250
Options:
251
  -h    This text
252
  -i    Number of iterations
253
  -j    Number of threads for benchmark (1 to 32)
254
  -b    Run benchmark tests
255
  -a    Run validity checks
256
  -e    Run bit-error-rate tests
257
}}}
258
259
Selected benchmark results are provided below. All tests are run on a single core only.
260
261 13 ttsou
'''Intel Haswell (i7 4770K 3.5 GHz)'''
262
263
{{{
264 10 ttsou
--- Floating point to integer conversions
265
-- Testing 40000 iterations of 3120 values
266 1 ttsou
- Measuring conversion time
267
- Elapsed time base...                  0.065508 secs
268
- Validating SIMD conversion results... PASS
269
- Measuring conversion time
270
- Elapsed time SIMD ...                 0.011424 secs
271
- Speedup...                            5.734244
272
}}}
273
274
{{{
275
[+] Testing: GSM TCH/AFS 7.95 (recursive, flushed, punctured)
276
[.] Input length  : ret = 165  exp = 165 -> OK
277
[.] Output length : ret = 448  exp = 448 -> OK
278 3 ttsou
[.] Pre computed vector checks:
279
[..] Encoding: OK
280
[..] Decoding base: 
281
[..] Decoding SIMD: 
282
[..] Code N 3
283
[..] Code K 7
284
OK
285
[.] Random vector checks:
286
[.] Testing baseline:
287
[..] Encoding / Decoding 10000 cycles:
288
[.] Elapsed time........................ 1.435066 secs
289
[.] Rate................................ 3.121808 Mbps
290 1 ttsou
[.] Testing SIMD:
291
[..] Encoding / Decoding 10000 cycles:
292 17 ttsou
[.] Elapsed time........................ 0.073524 secs
293 1 ttsou
[.] Rate................................ 60.932485 Mbps
294
[.] Speedup............................. 19.518334
295
}}}
296
297 17 ttsou
'''Intel Atom (D2500 1.86 GHz)'''
298
{{{
299
--- Floating point to integer conversions
300
-- Testing 40000 iterations of 3120 values
301
- Measuring conversion time
302
- Elapsed time base...                 1.147449 secs
303
- Validating SSE conversion results... PASS
304
- Measuring conversion time
305
- Elapsed time SSE ...                 0.347838 secs
306
- Quotient...                          3.298803
307
}}}
308
309
{{{
310
[+] Testing: GSM TCH/AFS 7.95 (recursive, flushed, punctured)
311
[.] Input length  : ret = 165  exp = 165 -> OK
312
[.] Output length : ret = 448  exp = 448 -> OK
313
[.] Pre computed vector checks:
314
[..] Encoding: OK
315
[..] Decoding base: 
316
[..] Decoding SIMD: 
317
[..] Code N 3
318 1 ttsou
[..] Code K 7
319
OK
320
[.] Random vector checks:
321 17 ttsou
[.] Testing baseline:
322
[..] Encoding / Decoding 10000 cycles:
323
[.] Elapsed time........................ 11.822688 secs
324
[.] Rate................................ 0.378932 Mbps
325
[.] Testing SIMD:
326
[..] Encoding / Decoding 10000 cycles:
327
[.] Elapsed time........................ 0.550423 secs
328 19 ttsou
[.] Rate................................ 8.139195 Mbps
329
[.] Speedup............................. 21.479277
330
}}}
331 17 ttsou
332
'''!ArndaleBoard (ARM Cortex-A15 1.7 GHz)'''
333
334
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.
335
336
{{{
337
--- Floating point to integer conversions
338
-- Testing 40000 iterations of 3120 values
339
- Measuring conversion time
340
- Elapsed time base...                 0.384097 secs
341
- Validating SSE conversion results... PASS
342
- Measuring conversion time
343
- Elapsed time SSE ...                 0.100877 secs
344
- Quotient...                          3.807578
345
}}}
346
347
{{{
348
[+] Testing: GSM TCH/AFS 7.95 (recursive, flushed, punctured)
349
[.] Input length  : ret = 165  exp = 165 -> OK
350
[.] Output length : ret = 448  exp = 448 -> OK
351
[.] Pre computed vector checks:
352
[..] Encoding: OK
353
[..] Decoding base: 
354
[..] Decoding SIMD: 
355
[..] Code N 3
356
[..] Code K 7
357
OK
358
[.] Random vector checks:
359
[.] Testing baseline:
360
[..] Encoding / Decoding 10000 cycles:
361
[.] Elapsed time........................ 5.371288 secs
362
[.] Rate................................ 0.834064 Mbps
363
[.] Testing SIMD:
364
[..] Encoding / Decoding 10000 cycles:
365
[.] Elapsed time........................ 1.016621 secs
366
[.] Rate................................ 4.406755 Mbps
367
[.] Speedup............................. 5.283471
368
}}}
369
370 3 ttsou
'''!BeagleBoard-xM (ARM Cortex-A8 800 MHz)'''
371
{{{
372
--- Floating point to integer conversions
373
-- Testing 40000 iterations of 3120 values
374
- Measuring conversion time
375
- Elapsed time base...                  6.292542 secs
376
- Validating SIMD conversion results... PASS
377
- Measuring conversion time
378
- Elapsed time SIMD ...                 0.839081 secs
379 5 ttsou
- Quotient...                           7.499326
380 3 ttsou
}}}
381
382
{{{
383 4 ttsou
[+] Testing: GSM TCH/AFS 7.95 (recursive, flushed, punctured)
384 3 ttsou
[.] Input length  : ret = 165  exp = 165 -> OK
385
[.] Output length : ret = 448  exp = 448 -> OK
386
[.] Pre computed vector checks:
387 1 ttsou
[..] Encoding: OK
388
[..] Decoding base: 
389
[..] Decoding SIMD: 
390 31 ttsou
[..] Code N 3
391
[..] Code K 7
392
OK
393
[.] Random vector checks:
394
[.] Testing baseline:
395
[..] Encoding / Decoding 10000 cycles:
396
[.] Elapsed time........................ 21.963257 secs
397
[.] Rate................................ 0.203977 Mbps
398
[.] Testing SIMD:
399 1 ttsou
[..] Encoding / Decoding 10000 cycles:
400 32 ttsou
[.] Elapsed time........................ 3.083282 secs
401
[.] Rate................................ 1.452997 Mbps
402
[.] Speedup............................. 7.123337
403
}}}
404
405
406
'''Full Results'''
407
408
[http://tsou.cc/gsm/haswell.txt]
409
410
[http://tsou.cc/gsm/shuttle.txt]
411
412
[http://tsou.cc/gsm/arndale.txt]
413
414
[http://tsou.cc/gsm/beagle.txt]
415
416 31 ttsou
417 1 ttsou
== Authors ==
418
419 30 ttsou
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.
Add picture from clipboard (Maximum size: 48.8 MB)