Commit Graph

46 Commits

Author SHA1 Message Date
Pau Espin b148d05542 configure.ac: Specify default language as C++
This is useful if we add more AC_CHECK_HEADER or similar configure tests including
C++ header files or required C++ features, since otherwise gcc is used
by default and test fail.

Change-Id: Iee757c78b72290c5d2a4c31339800a4e72b6be23
2018-09-04 18:00:57 +00:00
Pau Espin 288d8af070 configure.ac: Add --enable-werror option
Change-Id: Ib2782aecd400398bf36427f255c2a427ef781e06
2018-08-30 17:30:15 +02:00
Pau Espin 70d0344b31 configure.ac: Fix typo in with-lms help string
Change-Id: I7777d027fffa50dddf3f0a3c0bf2173aa8497be3
2018-08-17 17:17:05 +02:00
Pau Espin c7756e73b7 debian: Add cfg file examples for osmo-trx-{lms,uhd}
Sort cfg files according to their osmo-trx binary.
Install them during make install.
Add the installed cfg files to related debian packages.

Change-Id: I905cdac30b441e4df0a3f5c0924d1637b9f67b90
2018-06-19 11:31:45 +02:00
Pau Espin 1f50fedb5f build: Add support for LimeSuite device backend
Change-Id: I239e1b37263a62b374d84974c9347e3654072e87
2018-06-13 21:45:32 +00:00
Pau Espin d0ac926b56 Bump version: 0.3.0-dirty → 0.4.0
Change-Id: Ifc469bce89d52012e1f876c847b4535360a602ad
2018-05-03 16:23:30 +02:00
Pau Espin f3d7f443a0 Build one osmo-trx binary for each device support enabled
Same way as we do in osmo-bts. After this commit, osmo-trx no longer
exists. Instead, osmo-trx-uhd and osmo-trx-usrp1 are generated based on
configure flags enabled.

A new flag --with(out)-uhd has been added to enable/disable build of
osmo-trx with UHD backend. It is left enabled by default to keep
compatibility with older build scripts. Binary with USRP1 backend must
still be manually enabled with --with-usrp1 flag.

Change-Id: Iea8c0d7434762713a53440d29bf3ebd84accb262
2018-04-24 19:17:22 +02:00
Pau Espin a4316ee4c5 Change configure define USRP1 to DEVICE_USRP1
Similar as we do for ARCH_*, it's easier to find those are related to
device support features.

Change-Id: Iba238bff689b8f944af76120402c0fa2e29a70de
2018-04-24 18:46:48 +02:00
Pau Espin 2128a308eb Move device specific files to device subdir
Change-Id: Ib42fef14bf4c7b779f44d99711a35c18b32a4c21
2018-04-24 18:46:48 +02:00
Pau Espin 43fedb656b Move arch specific fiels to arch subdir
Take the chance to update some includes using files available in that
subdir to have them ina more uniform way.

Change-Id: Ibda3c54fd4dc3f6b845cc373f1a1e6b758c1ea82
2018-04-24 15:22:59 +02:00
Pau Espin 53bdb7f82a configure.ac: Add --enable-sanitize option
Change-Id: I1b5154a47bb2f66103ac254a0f422e8a80b2d3e0
2018-04-16 15:17:48 +00:00
Martin Hauke 20259cb307 configure.ac: Fix typo
Unbreak git-version-gen when used with .tarball-version

Change-Id: Id836c6822daf1f6835a8c869624b4b40dde47f3a
2018-04-08 19:53:37 +02:00
Pau Espin 8fbbd656c7 Build Transceiver52M/common as an .la lib
Stop picking files from that directory on different places as it causes
dependency issues during make distclean/maintainer-clean.

Fixes: OS#3029

Change-Id: I81bb4251d18fce978d27849b621b20f541caab0b
2018-03-08 14:53:13 +01:00
Pau Espin 5ea1817dc2 Add initial support for logging, vty, ctrl
Up to this point, the logging system, vty and ctrl are initialized and
can be used fine, though they don't have a lot of use yet.

Depends on libosmocore Change-Id Ib79cdb62d45d8c78445c7b064e58eb7e9faeccf9

Related: OS#2184

Change-Id: I08982c37b4f873966304b3cfb38a10ee86eb3dad
2018-02-27 07:10:50 +00:00
Pau Espin 8b843e5bed Depend on libosmocore
Change-Id: If345c89293fcd7d1ad4f17214eea339951f25a5d
2018-02-22 20:04:47 +01:00
Pau Espin c92dad32dd configure.ac: Check for pkg-config
Change-Id: I1a851181a99f2f35ea4ff1b38c7afe27a04e5f18
2018-02-20 20:32:27 +01:00
Alexander Huemer 6fafd33b13 Unbreak `./configure --with-usrp1` build
Change-Id: I49b385594271ae64a48d4d39ee9fe26d7c95bd30
2018-01-20 23:24:20 +01:00
Pau Espin c2ba427b52 tests: Migrate convtest util to autotest infrastructure
Change-Id: Ie682abf7e83de436d0f37f9f6e0664cb2f4d0c9e
2018-01-11 18:45:12 +01:00
Pau Espin 2ac788b2c3 Set up GNU Autotest infrastructure
Test files are moved from CommonLibs/ to tests/CommonLibs/.
Some tests are disabled in autotest because they generate timedate
related output which cannot exactly match against expected output.

Change-Id: I3d6ba625968be09297642d18090c496490e9b8fc
2018-01-10 11:17:32 +01:00
Pau Espin caf2abc58f Remove Configuration module and libsqlite dependency
Change-Id: I823aea91367d586507bbf352f1b6f25bdd635baa
2018-01-09 15:26:50 +01:00
Pau Espin 82f83ced73 cosmetic: Remove trailing whitespace
Change-Id: I64c8dbad3fc42bcb8dd4ac9b16bbd9c59a0cf5d5
2018-01-09 15:26:49 +01:00
Harald Welte db9c1b54cb Import git-version-gen and update AC_INIT()
In AC_INIT(), it still stated openbts.  Let's clean this up and use
the same method of version generation that we use in all other osmocom
projects, too.

Change-Id: Ie7ae0585955aebdc3950b1dd8bff0d1fff3be212
2017-10-28 17:51:54 +02:00
Max 099a44abfb Use release helper from libosmocore
See
https://osmocom.org/projects/cellular-infrastructure/wiki/Make_a_new_release
for details.

Change-Id: Ieb843923d8f534654413be695f2b5f0c87b75520
Related: OS#1861
2017-08-28 12:26:54 +02:00
Tom Tsou 8ca237b5c2 build: Require and check for gcc C++11 support
It is now 2017. We can and should be able to use C++11 features now.

Change-Id: I96477e4125390b17b43a3705bb1daf98fa01c9bb
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2017-06-09 11:19:20 -07:00
Vadim Yanitskiy ee57357682 buildenv: check for __builtin_cpu_supports call support
The '__builtin_cpu_supports' is a GCC's built-in function which
returns a positive integer if the run-time CPU supports specified
SIMD feature and returns 0 otherwise.

This change adds a new check, whether compiler supports this call.
See /gcc/X86-Built-in-Functions.html at gcc.gnu.org for reference.

Change-Id: I797f638573e8c3aae39c28abb157ce2ac419f3f7
2017-06-08 18:32:29 +00:00
Philipp Maier e8ae9fcf38 buildenv: Split up SSE3 and SSE4.1 code
Currently we find SSE3 and SSE4.1 code mixed togehter along with
generic code in one file. This introduces the risk that the
compiler exidantly mixes SSE4.1 instructions into an SSE3, or
even worse into a generic code path.

This commit splits the SSE3 and SSE4.1 code into separate files
and compiles them with the matching target options.

Change-Id: I846e190e92f1258cd412d1b2d79b539e204e04b3
2017-05-19 17:21:45 +00:00
Tom Tsou 72bf762b42 uhd: Add support for UHD-3.11 logging control
The logging API changes in UHD-3.11, which causes build failure if
not properly handled.

Change-Id: I223ebb9fae3f4061e0cb37c05263c1b569e8f628
2017-03-07 14:25:05 -08:00
Max 2dee3e996e Fix building against sqlite3
* Explicitly check for sqlite3 at configure stage, remove old include
  dir, fix header inclusion.
* Use configure results for linking instead of hardcoded linker option
  for sqlite.
* Add dependency on -dev package for .deb

Change-Id: I6d7f697d67651f02ceb77fc4da4317b64fa47f9e
Fixes: OS#1928
2017-01-26 17:06:06 +01:00
Max 1f1cebb2e5 Remove embedded sqlite3
Previous patch switches to using system-wide sqlite3 so it's safe to
remove local copy now.

Change-Id: Ie8e751cc62132fe1f7748ccd78c5d48469027329
2017-01-24 15:15:30 +01:00
Tom Tsou 80cb08071b Revert "uhd: Set minimum supported version to 3.9.0"
This reverts commit 93ca09ea61.

Ettus Research recommends the use of 3.9 series of UHD releases,
but requiring this version has lead to issues with broken OBS and
packaged binaries by Debian, Ubuntu, and other distributions.

Change-Id: Ie6b175ac6d46d091937380c79fdd0125b16ec75f
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2017-01-19 13:48:15 -08:00
Tom Tsou 93ca09ea61 uhd: Set minimum supported version to 3.9.0
Versions of UHD prior to 3.9.0 are no longer supported.

Rather then backport and ifdef UHD version specific API and
behavioral changes, set minimum support to the current LTS
release, which is 3.9.0.

Change-Id: Id7d15b52cd4e45f1d856a6ef3a84832a28f2dd04
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-10-25 18:48:52 +00:00
Neels Hofmeyr 24575a6530 configure.ac: check for boost/config.hpp header 2016-07-05 15:43:19 -07:00
Tom Tsou 35222296fe mcbts: Add multi-ARFCN channelizing filters
Introduce polyphase channelizer (Rx) and synthesis (Tx) filterbanks,
which serve as the signal processing backend for multi-carrier GSM.

Fast Fourier Transform (FFT) is used internally. FFTW is added as
a new build dependency.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-01 03:07:27 -07:00
Tom Tsou d4d3daa12e uhd: Use internal UHD tick conversions
UHD handles built in tick and floating point timestamp conversion
since version 003.005.004. This removes the need for separate UHD
timespec to tick conversion.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2015-08-21 19:29:38 -07:00
Tom Tsou c312905f43 uhd: Add version 3.9.0 support
New functionality includes B200-mini device support and updated
timing values to match FPGA changes.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2015-08-21 19:20:32 -07:00
Tom Tsou 6613331459 build: Provide option for disabling SSE autodetection
Setup '--with-sse' option to check system capabilities by default, but
allow disabling by the user. Selective SSE build options can be
controlled by the user by defining specific HAVE_SSE options.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2015-05-18 16:35:44 -07:00
Tom Tsou 2cc2ddda41 build: Add 'subdir-objects' to AM_INIT_AUTOMAKE
This will shutup automake and make it stop complaining about the
following subdirectory warnings.

"warning: source file 'common/fft.c' is in a
subdirectory, but option 'subdir-objects' is disabled"

Signed-off-by: Tom Tsou <tom@tsou.cc>
2015-05-18 16:35:13 -07: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 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 010fff783b Transceiver52M: Move reference select from compile time to database
Enabling the external reference on UHD devices through the configure
time switch is awkward. Use a database variable "TRX.Reference" with
'0' or '1' value for internal and external references respectively.
Use internal reference is no entry is defined.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18 13:10:18 -04:00
Thomas Tsou c064124429 Transceiver52M: Remove support for ancient libusrp versions
Current functionality with these old versions is questionable.
There is no reason to use any version of GNU Radio / libusrp older
than 3.3. Version 3.4.2 is the only recommended version for USRP1
users.

Non-USRP1 users must use UHD driver from Ettus Research.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18 13:10:17 -04:00
Thomas Tsou 3eaae80c90 Transceiver52M: Replace convolve and related calls with SSE implementation
This large patch replaced the convolve() call with an SSE vector
enabled version. The lower C and SSE intrinsic based code operates
on fixed and aligned vectors for the filter taps. The storage format
of interleaved I/Q for both complex and real vectors is maintained.

SSE filter tap values must:

  1. Start 16-byte aligned
  2. Number with a multiple of 4 between 4 and 20 for real taps
  3. Number with a multiple of 4 for complex taps

Non-compliant values will fall back to non-SSE usage. Fixed length
iterators mean that head and tail cases may require reallocation of
the input vector, which is automatically handled by the upper C++
interface.

Other calls are affected by these changes and adjusted or rewritten
accordingly. The underlying algorithms, however, are unchanged.

  generateGSMPulse()
  analyzeTrafficBurst()
  detectRACHBurst()

Intel SSE configuration is automatically detected and configured at
build time with Autoconf macros.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18 13:10:17 -04:00
Thomas Tsou cb69f08410 Transceiver52M: Set resampling option automatically based on device
Remove the built time resampling selection and link both options.
Move the normal push/pullBuffer() calls back to the base class and
overload them in the inherited resampling class.

USRP2/N2xx devices are the only devices that require resampling so
return that resampling is necessary on the device open(), which is
the point at which the device type will be known.

The GSM transceiver only operates at a whole number multiple of
the GSM rate and doesn't care about the actual device rate and
if resampling is used. Therefore GSM specific portion of the
transceiver should only need to submit the samples-per-symbol
value to the device interface.

Then, the device should be able to determine the appropriate
sample rate (400 ksps or 270.833 ksps) and if resampling is
appropriate.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18 13:03:41 -04:00
Thomas Tsou b4cb4e23c0 Transceiver52M: Update to UHD streamer interface
This patch is long overdue and can now be merged after better understanding
of timestamp stability issues. UHD tick / timespec conversions were
generally used with the streamer interface, though these calls are actually
independent change sets. The combination would lead to internal rounding
errors and a timing drift most notably on B100 running at GSM symbol
rate multiples. There are no known issues, however, with the streamer code
itself.

The aforementioned issue was discovered in test code only, which was never
merged to mainline.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18 13:03:41 -04:00
Alexander Chemeris 040b305789 Checking in build system for the Transceiver. 2013-06-16 14:29:54 +04:00