Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
initial merge effort low hanging fruit
Browse files Browse the repository at this point in the history
  • Loading branch information
jgiovatto committed Feb 21, 2019
1 parent 16ed732 commit a1bcbf2
Show file tree
Hide file tree
Showing 130 changed files with 73,463 additions and 9,648 deletions.
111 changes: 111 additions & 0 deletions .clang-format
@@ -0,0 +1,111 @@
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true #Changed
AlignConsecutiveDeclarations: true #Changed
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline #Changed
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true #Changed
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: true #Changed
AfterControlStatement: false
AfterEnum: false
AfterFunction: true #Changed
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom #Changed
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: AfterColon #Changed
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 120 #Changed
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true #Changed
ConstructorInitializerIndentWidth: 2 #Changed
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: true #Changed
IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left #Changed
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp03 #Changed
TabWidth: 8
UseTab: Never
...

15 changes: 15 additions & 0 deletions .travis.yml
@@ -0,0 +1,15 @@
dist: xenial
sudo: required

before_script:
- sudo apt-get -qq update
- sudo apt-get install -qq build-essential cmake libfftw3-dev libmbedtls-dev libpcsclite-dev libboost-program-options-dev libconfig++-dev libsctp-dev

language: cpp
script:
- mkdir build
- cd build
- cmake -DRF_FOUND=True ..
- make
- make test
- sudo make install
8 changes: 8 additions & 0 deletions CHANGELOG
@@ -1,6 +1,14 @@
Change Log for Releases
==============================

## 18.12
* Add new RRC ASN1 message pack/unpack library
* Refactor EPC and add encryption support
* Add IPv6 support to srsUE
* Fixed compilation issue for ARM and AVX512
* Add clang-format file
* Many bug-fixes and improved stability and performance in all parts

## 18.09
* Improved Turbo Decoder performance
* Configurable SGi interface name and M1U params
Expand Down
58 changes: 30 additions & 28 deletions CMakeLists.txt
Expand Up @@ -77,6 +77,7 @@ option(BUILD_STATIC "Attempt to statically link external deps" OFF)
option(RPATH "Enable RPATH" OFF)
option(ENABLE_ASAN "Enable gcc/clang address sanitizer" OFF)
option(ENABLE_MSAN "Enable clang memory sanitizer" OFF)
option(ENABLE_TIDY "Enable clang tidy" OFF)

option(USE_LTE_RATES "Use standard LTE sampling rates" OFF)

Expand Down Expand Up @@ -247,7 +248,6 @@ if(ENABLE_PHY_ADAPTER)
else(protobuf_FOUND)
message(FATAL_ERROR "Unable to find protobuf package required to build srsLTE with PHY_ADAPTER")
endif(protobuf_FOUND)

endif(ENABLE_PHY_ADAPTER)

########################################################################
Expand Down Expand Up @@ -288,24 +288,24 @@ macro(ADD_CXX_COMPILER_FLAG_IF_AVAILABLE flag have)
endmacro(ADD_CXX_COMPILER_FLAG_IF_AVAILABLE)

if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=${GCC_ARCH} -Wall -Wno-comment -Wno-reorder -Wno-unused-but-set-variable -Wno-unused-variable -Wformat -Wmissing-field-initializers -Wtype-limits -std=c++03")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-comment -Wno-reorder -Wno-unused-but-set-variable -Wno-unused-variable -Wformat -Wmissing-field-initializers -Wtype-limits -std=c++03")

find_package(SSE)
if (HAVE_AVX2)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpmath=sse -mavx2 -DLV_HAVE_AVX2 -DLV_HAVE_AVX -DLV_HAVE_SSE")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=${GCC_ARCH} -mfpmath=sse -mavx2 -DLV_HAVE_AVX2 -DLV_HAVE_AVX -DLV_HAVE_SSE")
else (HAVE_AVX2)
if(HAVE_AVX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpmath=sse -mavx -DLV_HAVE_AVX -DLV_HAVE_SSE")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=${GCC_ARCH} -mfpmath=sse -mavx -DLV_HAVE_AVX -DLV_HAVE_SSE")
elseif(HAVE_SSE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpmath=sse -msse4.1 -DLV_HAVE_SSE")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=${GCC_ARCH} -mfpmath=sse -msse4.1 -DLV_HAVE_SSE")
endif(HAVE_AVX)
endif (HAVE_AVX2)
endif(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")

ADD_CXX_COMPILER_FLAG_IF_AVAILABLE("-Werror=incompatible-pointer-types" HAVE_ERROR_INCOMPATIBLE)

if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=${GCC_ARCH} -Wall -Wno-comment -Wno-write-strings -Winline -Wno-unused-result -Wformat -Wmissing-field-initializers -Wtype-limits -std=c99 -D_GNU_SOURCE")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-comment -Wno-write-strings -Winline -Wno-unused-result -Wformat -Wmissing-field-initializers -Wtype-limits -std=c99 -D_GNU_SOURCE")

if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ggdb -O0 -DDEBUG_MODE -DBUILD_TYPE_DEBUG")
Expand All @@ -327,12 +327,12 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")

find_package(SSE)
if (HAVE_AVX2)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpmath=sse -mavx2 -DLV_HAVE_AVX2 -DLV_HAVE_AVX -DLV_HAVE_SSE")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=${GCC_ARCH} -mfpmath=sse -mavx2 -DLV_HAVE_AVX2 -DLV_HAVE_AVX -DLV_HAVE_SSE")
else (HAVE_AVX2)
if(HAVE_AVX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpmath=sse -mavx -DLV_HAVE_AVX -DLV_HAVE_SSE")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=${GCC_ARCH} -mfpmath=sse -mavx -DLV_HAVE_AVX -DLV_HAVE_SSE")
elseif(HAVE_SSE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpmath=sse -msse4.1 -DLV_HAVE_SSE")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=${GCC_ARCH} -mfpmath=sse -msse4.1 -DLV_HAVE_SSE")
endif(HAVE_AVX)
endif (HAVE_AVX2)

Expand All @@ -341,8 +341,8 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
endif (HAVE_FMA)

if (HAVE_AVX512)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx512f -mavx512cd -DLV_HAVE_AVX512")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx512f -mavx512cd -DLV_HAVE_AVX512")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=${GCC_ARCH} -mavx512f -mavx512cd -mavx512bw -mavx512dq -DLV_HAVE_AVX512")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=${GCC_ARCH} -mavx512f -mavx512cd -mavx512bw -mavx512dq -DLV_HAVE_AVX512")
endif(HAVE_AVX512)

if(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug")
Expand All @@ -351,13 +351,14 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
endif(HAVE_SSE)
endif(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug")

if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon -march=native -DIS_ARM -DHAVE_NEON")
message(STATUS "have ARM")
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DIS_ARM -DHAVE_NEON -mfloat-abi=hard -mfpu=neon")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DIS_ARM -mfloat-abi=hard -mfpu=neon")
message(STATUS "Detected ARM processor")
set(HAVE_NEON "True")
else(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
else(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch")
set(HAVE_NEON "False")
endif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
endif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch")
set(CMAKE_REQUIRED_FLAGS ${CMAKE_C_FLAGS})

if(NOT HAVE_SSE AND NOT HAVE_NEON AND NOT DISABLE_SIMD)
Expand Down Expand Up @@ -409,18 +410,19 @@ message(STATUS "CMAKE_CXX_FLAGS is ${CMAKE_CXX_FLAGS}")
########################################################################
# clang-tidy check
########################################################################
find_program(
CLANG_TIDY_BIN
NAMES "clang-tidy"
DOC "Path to clang-tidy executable"
)
if(NOT CLANG_TIDY_BIN)
message(STATUS "clang-tidy not found.")
else()
message(STATUS "clang-tidy found: ${CLANG_TIDY_BIN}")
set(DO_CLANG_TIDY "${CLANG_TIDY_BIN}" "-checks=*,-clang-analyzer-alpha.*,-modernize-*,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-bounds-constant-array-index")
endif()

if(ENABLE_TIDY)
find_program(
CLANG_TIDY_BIN
NAMES "clang-tidy"
DOC "Path to clang-tidy executable"
)
if(NOT CLANG_TIDY_BIN)
message(STATUS "clang-tidy not found.")
else()
message(STATUS "clang-tidy found: ${CLANG_TIDY_BIN}")
set(DO_CLANG_TIDY "${CLANG_TIDY_BIN}" "-checks=*,-clang-analyzer-alpha.*,-modernize-*,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-bounds-constant-array-index")
endif()
endif(ENABLE_TIDY)

########################################################################
# Create uninstall targets
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/FindSSE.cmake
Expand Up @@ -142,7 +142,7 @@ if (ENABLE_SSE)
# Check compiler for AVX intrinsics
#
if (CMAKE_COMPILER_IS_GNUCC OR (CMAKE_C_COMPILER_ID MATCHES "Clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
set(CMAKE_REQUIRED_FLAGS "-mavx512f")
set(CMAKE_REQUIRED_FLAGS "-mavx512f -mavx512cd -mavx512bw -mavx512dq -DLV_HAVE_AVX512")
check_c_source_runs("
#include <immintrin.h>
int main()
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/SRSLTEVersion.cmake
Expand Up @@ -19,6 +19,6 @@
#

SET(SRSLTE_VERSION_MAJOR 18)
SET(SRSLTE_VERSION_MINOR 9)
SET(SRSLTE_VERSION_MINOR 12)
SET(SRSLTE_VERSION_PATCH 0)
SET(SRSLTE_VERSION_STRING "${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR}.${SRSLTE_VERSION_PATCH}")
30 changes: 27 additions & 3 deletions cmake/modules/SRSLTE_install_configs.sh.in
Expand Up @@ -3,8 +3,29 @@
# Auto-updated by CMake with actual install path
SRSLTE_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_DIR}"

# Default folder where configs go
dest_folder="$HOME/.srs"
# check if install mode has been provided
if ([ ! $1 ])
then
echo "Please call script with either user or service as first parameter."
echo ""
echo "E.g. ./srslte_install_configs.sh user"
echo " .. to install all config files to $HOME/.config/srslte"
echo ""
echo "E.g. ./srslte_install_configs.sh service"
echo " .. to install all config files to /etc/srslte"
exit
fi

if [ "$1" == "user" ]
then
dest_folder="$HOME/.config/srslte"
elif [ "$1" == "service" ]
then
dest_folder="/etc/srslte"
else
echo "Please call script with either user or service as first parameter."
exit
fi

install_file(){
source_path="$SRSLTE_INSTALL_DIR/$1"
Expand Down Expand Up @@ -39,7 +60,10 @@ echo "Installing srsLTE configuration files:"
# Make sure the target directory exists
if [ ! -d "$dest_folder" ]; then
echo " - Creating srsLTE config folder $dest_folder"
mkdir $dest_folder
mkdir -p $dest_folder
if [ $? -ne 0 ]; then
exit
fi
fi


Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
@@ -1,3 +1,9 @@
srslte (18.12-0ubuntu1) bionic; urgency=medium

* Update to srsLTE 18.12

-- Andre Puschmann <andre@softwareradiosystems.com> Mon, 21 Jan 2019 13:50:00 +0200

srslte (18.09-0ubuntu1) bionic; urgency=medium

* Update to srsLTE 18.09
Expand Down
5 changes: 3 additions & 2 deletions debian/control
Expand Up @@ -13,8 +13,9 @@ Build-Depends:
libconfig++-dev,
libsctp-dev,
libuhd-dev,
uhd-host
Standards-Version: 4.1.1
uhd-host,
txt2man
Standards-Version: 4.2.1
Homepage: http://www.softwareradiosystems.com
Vcs-Git: https://github.com/srsLTE/srsLTE.git
Vcs-Browser: https://github.com/srsLTE/srsLTE/
Expand Down
5 changes: 5 additions & 0 deletions debian/man/genmanpages.sh
@@ -0,0 +1,5 @@
#!/bin/bash

txt2man -d "${CHANGELOG_DATE}" -t SRSENB -s 8 srsenb.txt > srsenb.8
txt2man -d "${CHANGELOG_DATE}" -t SRSEPC -s 8 srsepc.txt > srsepc.8
txt2man -d "${CHANGELOG_DATE}" -t SRSUE -s 8 srsue.txt > srsue.8
26 changes: 26 additions & 0 deletions debian/man/srsenb.txt
@@ -0,0 +1,26 @@
NAME
srsENB - A complete SDR LTE eNodeB application

SYNOPSIS
srsenb [options] <config_file>

DESCRIPTION

srsENB provides the Evolved Node B (eNodeB or eNB) part in the LTE network.

Features:

- Round Robin MAC scheduler with FAPI-like C++ API
- SR support
- Periodic and Aperiodic CQI feedback support
- Standard S1AP and GTP-U interfaces to the Core Network
- 150 Mbps DL in 20 MHz MIMO TM3/TM4 with commercial UEs
- 75 Mbps DL in SISO configuration with commercial UEs
- 50 Mbps UL in 20 MHz with commercial UEs

An example configuration file is available in /usr/share/srslte/enb.conf.example

OPTIONS

-h/--help Produce help message
-v/--version Print version information and exit

0 comments on commit a1bcbf2

Please sign in to comment.