Merge branch 'cmake_restructure' into test_merge

master
Paul Sutton 9 years ago
commit af85656096

@ -33,14 +33,14 @@ endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
CMAKE_MINIMUM_REQUIRED (VERSION 2.6)
PROJECT (SRSLTE)
LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules")
INCLUDE(SRSLTEVersion) #sets version information
INCLUDE(SRSLTEPackage) #setup cpack
INCLUDE(BuildMex)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules")
include(SRSLTEVersion) #sets version information
include(SRSLTEPackage) #setup cpack
include(BuildMex)
include(CTest)
set( CTEST_MEMORYCHECK_COMMAND valgrind )
CONFIGURE_FILE(
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake"
IMMEDIATE @ONLY)
@ -63,112 +63,112 @@ if (NOT EXISTS "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set(CMAKE_INSTALL_LIBDIR lib)
endif()
SET(RUNTIME_DIR bin)
SET(LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR})
SET(INCLUDE_DIR include)
SET(MEX_DIR mex)
SET(DOC_DIR "share/doc/${CPACK_PACKAGE_NAME}")
SET(DATA_DIR share/${CPACK_PACKAGE_NAME})
set(RUNTIME_DIR bin)
set(LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR})
set(INCLUDE_DIR include)
set(MEX_DIR mex)
set(DOC_DIR "share/doc/${CPACK_PACKAGE_NAME}")
set(DATA_DIR share/${CPACK_PACKAGE_NAME})
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Release)
MESSAGE(STATUS "Build type not specified: defaulting to Release.")
ENDIF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
message(STATUS "Build type not specified: defaulting to Release.")
endif(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
########################################################################
# Compiler specific setup
########################################################################
macro(ADD_CXX_COMPILER_FLAG_IF_AVAILABLE flag have)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG(${flag} ${have})
check_cxx_compiler_flag(${flag} ${have})
if(${have})
add_definitions(${flag})
endif(${have})
endmacro(ADD_CXX_COMPILER_FLAG_IF_AVAILABLE)
IF(CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_COMPILER_IS_GNUCXX)
#Any additional flags for CXX
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
endif(CMAKE_COMPILER_IS_GNUCXX)
IF(CMAKE_COMPILER_IS_GNUCC)
if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-write-strings -Wno-format-extra-args -Winline -Wno-unused-result -Wno-format -std=c99 -D_GNU_SOURCE -g")
IF(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0")
ELSE(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
FIND_PACKAGE(SSE)
IF(HAVE_AVX)
else(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
find_package(SSE)
if(HAVE_AVX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -mfpmath=sse -mavx -DLV_HAVE_AVX -DLV_HAVE_SSE")
ELSEIF(HAVE_SSE)
elseif(HAVE_SSE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -mfpmath=sse -msse4.1 -DLV_HAVE_SSE")
ENDIF(HAVE_AVX)
ENDIF(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
endif(HAVE_AVX)
endif(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
IF(NOT WIN32)
if(NOT WIN32)
ADD_CXX_COMPILER_FLAG_IF_AVAILABLE(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN)
ENDIF(NOT WIN32)
ENDIF(CMAKE_COMPILER_IS_GNUCC)
IF(MSVC)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/msvc) #missing headers
ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501) #minimum version required is windows xp
ADD_DEFINITIONS(-DNOMINMAX) #disables stupidity and enables std::min and std::max
ADD_DEFINITIONS( #stop all kinds of compatibility warnings
endif(NOT WIN32)
endif(CMAKE_COMPILER_IS_GNUCC)
if(MSVC)
include_directories(${PROJECT_SOURCE_DIR}/msvc) #missing headers
add_definitions(-D_WIN32_WINNT=0x0501) #minimum version required is windows xp
add_definitions(-DNOMINMAX) #disables stupidity and enables std::min and std::max
add_definitions( #stop all kinds of compatibility warnings
-D_SCL_SECURE_NO_WARNINGS
-D_CRT_SECURE_NO_WARNINGS
-D_CRT_SECURE_NO_DEPRECATE
-D_CRT_NONSTDC_NO_DEPRECATE
)
ADD_DEFINITIONS(/MP) #build with multiple processors
ENDIF(MSVC)
add_definitions(/MP) #build with multiple processors
endif(MSVC)
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# The following is needed for weak linking to work under OS X
SET(CMAKE_SHARED_LINKER_FLAGS "-undefined dynamic_lookup")
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_SHARED_LINKER_FLAGS "-undefined dynamic_lookup")
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
########################################################################
# Create uninstall targets
########################################################################
CONFIGURE_FILE(
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
ADD_CUSTOM_TARGET(uninstall
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
########################################################################
# Macro to add -fPIC property to static libs
########################################################################
MACRO(SRSLTE_SET_PIC)
IF( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
SET_TARGET_PROPERTIES(${ARGV} PROPERTIES COMPILE_FLAGS -fPIC)
ENDIF( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
ENDMACRO(SRSLTE_SET_PIC)
macro(SRSLTE_SET_PIC)
if( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
set_target_properties(${ARGV} PROPERTIES COMPILE_FLAGS -fPIC)
endif( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
endmacro(SRSLTE_SET_PIC)
########################################################################
# Print summary
########################################################################
MESSAGE(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}")
MESSAGE(STATUS "Building for version: ${VERSION}")
message(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}")
message(STATUS "Building for version: ${VERSION}")
########################################################################
# Add general includes and dependencies
########################################################################
INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/srslte/include/)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/srslte/include/)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/mex/include)
include_directories(${PROJECT_BINARY_DIR}/srslte/include/)
include_directories(${PROJECT_SOURCE_DIR}/srslte/include/)
include_directories(${PROJECT_SOURCE_DIR}/mex/include)
########################################################################
# Add the subdirectories
########################################################################
ADD_SUBDIRECTORY(srslte)
ADD_SUBDIRECTORY(mex)
add_subdirectory(srslte)
add_subdirectory(mex)

@ -53,13 +53,13 @@ MACRO(CHECK_FUNCTION_EXISTS_MATH FUNCTION VARIABLE)
IF(${VARIABLE})
SET(${VARIABLE} 1 CACHE INTERNAL "Have function ${FUNCTION}")
MESSAGE(STATUS "Looking for ${FUNCTION} - found")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the function ${FUNCTION} exists passed with the following output:\n"
"${OUTPUT}\n\n")
ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for ${FUNCTION} - not found")
SET(${VARIABLE} "" CACHE INTERNAL "Have function ${FUNCTION}")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the function ${FUNCTION} exists failed with the following output:\n"
"${OUTPUT}\n\n")
ENDIF(${VARIABLE})

@ -31,19 +31,19 @@ if(NOT DisableMEX)
########################################################################
# Add headers to cmake project (useful for IDEs)
########################################################################
SET(HEADERS_ALL "")
FILE(GLOB headers *)
set(HEADERS_ALL "")
file(GLOB headers *)
FOREACH (_header ${headers})
IF(IS_DIRECTORY ${_header})
FILE(GLOB_RECURSE tmp "${_header}/*.h")
LIST(APPEND HEADERS_ALL ${tmp})
ENDIF(IS_DIRECTORY ${_header})
if(IS_DIRECTORY ${_header})
file(GLOB_RECURSE tmp "${_header}/*.h")
list(APPEND HEADERS_ALL ${tmp})
endif(IS_DIRECTORY ${_header})
ENDFOREACH()
ADD_CUSTOM_TARGET (add_mex_headers SOURCES ${HEADERS_ALL})
add_custom_target (add_mex_headers SOURCES ${HEADERS_ALL})
########################################################################
# Add the subdirectories
########################################################################
ADD_SUBDIRECTORY(lib)
add_subdirectory(lib)
endif()

@ -29,31 +29,61 @@ INSTALL(DIRECTORY include/
########################################################################
# Add headers to cmake project (useful for IDEs)
########################################################################
SET(HEADERS_ALL "")
FILE(GLOB headers *)
set(HEADERS_ALL "")
file(GLOB headers *)
FOREACH (_header ${headers})
IF(IS_DIRECTORY ${_header})
FILE(GLOB_RECURSE tmp "${_header}/*.h")
LIST(APPEND HEADERS_ALL ${tmp})
ENDIF(IS_DIRECTORY ${_header})
if(IS_DIRECTORY ${_header})
file(GLOB_RECURSE tmp "${_header}/*.h")
list(APPEND HEADERS_ALL ${tmp})
endif(IS_DIRECTORY ${_header})
ENDFOREACH()
ADD_CUSTOM_TARGET (add_srslte_headers SOURCES ${HEADERS_ALL})
add_custom_target (add_srslte_headers SOURCES ${HEADERS_ALL})
########################################################################
# Find Dependencies
########################################################################
FIND_PACKAGE(UHD)
FIND_PACKAGE(bladeRF)
find_package(UHD)
find_package(bladeRF)
IF(BLADERF_FOUND OR UHD_FOUND)
if(UHD_FOUND)
include_directories(${UHD_INCLUDE_DIRS})
link_directories(${UHD_LIBRARY_DIRS})
endif(UHD_FOUND)
if(BLADERF_FOUND)
include_directories(${BLADERF_INCLUDE_DIRS})
link_directories(${BLADERF_LIBRARY_DIRS})
endif(BLADERF_FOUND)
if(BLADERF_FOUND OR UHD_FOUND)
set(RF_FOUND TRUE CACHE INTERNAL "RF frontend found")
ELSE(BLADERF_FOUND OR UHD_FOUND)
else(BLADERF_FOUND OR UHD_FOUND)
set(RF_FOUND FALSE CACHE INTERNAL "RF frontend found")
ENDIF(BLADERF_FOUND OR UHD_FOUND)
add_definitions(-DDISABLE_RF)
endif(BLADERF_FOUND OR UHD_FOUND)
include(CheckFunctionExistsMath)
if(${DISABLE_VOLK})
if(${DISABLE_VOLK} EQUAL 0)
find_package(Volk)
else(${DISABLE_VOLK} EQUAL 0)
message(STATUS "VOLK library disabled (DISABLE_VOLK=1)")
endif(${DISABLE_VOLK} EQUAL 0)
else(${DISABLE_VOLK})
find_package(Volk)
endif(${DISABLE_VOLK})
if(VOLK_FOUND)
include_directories(${VOLK_INCLUDE_DIRS})
link_directories(${VOLK_LIBRARY_DIRS})
message(STATUS " Compiling with VOLK SIMD library.")
else(VOLK_FOUND)
message(STATUS " VOLK SIMD library NOT found. Using generic implementation.")
endif(VOLK_FOUND)
########################################################################
# Add subdirectories
########################################################################
ADD_SUBDIRECTORY(lib)
ADD_SUBDIRECTORY(include)
ADD_SUBDIRECTORY(examples)
add_subdirectory(lib)
add_subdirectory(include)
add_subdirectory(examples)

@ -18,10 +18,6 @@
# and at http://www.gnu.org/licenses/.
#
IF(UHD_FOUND)
LINK_DIRECTORIES(${UHD_LIBRARY_DIRS})
ENDIF(UHD_FOUND)
#################################################################
# Applications
@ -40,28 +36,28 @@ target_link_libraries(pdsch_ue srslte pthread)
add_executable(pdsch_enodeb pdsch_enodeb.c)
target_link_libraries(pdsch_enodeb srslte pthread)
IF(RF_FOUND)
if(RF_FOUND)
target_link_libraries(pdsch_ue srslte_rf)
target_link_libraries(pdsch_enodeb srslte_rf)
ELSE(RF_FOUND)
else(RF_FOUND)
add_definitions(-DDISABLE_RF)
ENDIF(RF_FOUND)
endif(RF_FOUND)
FIND_PACKAGE(SRSGUI)
find_package(SRSGUI)
IF(SRSGUI_FOUND)
if(SRSGUI_FOUND)
include_directories(${SRSGUI_INCLUDE_DIRS})
target_link_libraries(pdsch_ue ${SRSGUI_LIBRARIES})
ELSE(SRSGUI_FOUND)
else(SRSGUI_FOUND)
add_definitions(-DDISABLE_GRAPHICS)
ENDIF(SRSGUI_FOUND)
endif(SRSGUI_FOUND)
#################################################################
# These examples need the UHD driver
#################################################################
IF(RF_FOUND)
if(RF_FOUND)
add_executable(cell_search cell_search.c)
target_link_libraries(cell_search srslte srslte_rf)
@ -78,11 +74,11 @@ IF(RF_FOUND)
add_executable(usrp_txrx usrp_txrx.c)
target_link_libraries(usrp_txrx srslte srslte_rf)
MESSAGE(STATUS " examples will be installed.")
message(STATUS " examples will be installed.")
ELSE(RF_FOUND)
MESSAGE(STATUS " examples will NOT BE INSTALLED.")
ENDIF(RF_FOUND)
else(RF_FOUND)
message(STATUS " examples will NOT BE INSTALLED.")
endif(RF_FOUND)
# Add subdirectories
add_subdirectory(tutorial_examples)

@ -653,8 +653,8 @@ int main(int argc, char **argv) {
start_of_burst=false;
#endif
}
nf++;
}
nf++;
sfn = (sfn + 1) % 1024;
}

@ -256,7 +256,7 @@ int srslte_rf_recv_wrapper(void *h, void *data, uint32_t nsamples, srslte_timest
return srslte_rf_recv(h, data, nsamples, 1);
}
double srslte_rf_set_rx_gain_th_wrapper(void *h, double f) {
double srslte_rf_set_rx_gain_th_wrapper_(void *h, double f) {
return srslte_rf_set_rx_gain_th((srslte_rf_t*) h, f);
}
@ -440,7 +440,7 @@ int main(int argc, char **argv) {
#ifndef DISABLE_RF
if (prog_args.rf_gain < 0) {
srslte_ue_sync_start_agc(&ue_sync, srslte_rf_set_rx_gain_th_wrapper, cell_detect_config.init_agc);
srslte_ue_sync_start_agc(&ue_sync, srslte_rf_set_rx_gain_th_wrapper_, cell_detect_config.init_agc);
}
#endif
#ifdef PRINT_CHANGE_SCHEDULIGN

@ -23,7 +23,7 @@
# EXAMPLES shown in WinnForum 2015 Tutorial
#################################################################
IF(SRSGUI_FOUND AND UHD_FOUND)
if(SRSGUI_FOUND AND UHD_FOUND)
add_executable(pss pss.c)
target_link_libraries(pss srslte ${SRSGUI_LIBRARIES} srslte_rf)
@ -31,5 +31,5 @@ IF(SRSGUI_FOUND AND UHD_FOUND)
add_executable(simple_tx simple_tx.c)
target_link_libraries(simple_tx srslte srslte_rf)
ENDIF(SRSGUI_FOUND AND UHD_FOUND)
endif(SRSGUI_FOUND AND UHD_FOUND)

@ -21,5 +21,5 @@
########################################################################
# Add subdirectories
########################################################################
ADD_SUBDIRECTORY(srslte)
add_subdirectory(srslte)

@ -18,7 +18,7 @@
# and at http://www.gnu.org/licenses/.
#
CONFIGURE_FILE(
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/version.h.in
${CMAKE_CURRENT_BINARY_DIR}/version.h
)

@ -18,115 +18,49 @@
# and at http://www.gnu.org/licenses/.
#
########################################################################
# Find Dependencies
########################################################################
include(CheckFunctionExistsMath)
FIND_PACKAGE(SRSGUI)
FIND_PACKAGE(FFTW3F REQUIRED) # TODO: distribute kissfft instead
IF(${DISABLE_VOLK})
IF(${DISABLE_VOLK} EQUAL 0)
FIND_PACKAGE(Volk)
ELSE(${DISABLE_VOLK} EQUAL 0)
MESSAGE(STATUS "VOLK library disabled (DISABLE_VOLK=1)")
ENDIF(${DISABLE_VOLK} EQUAL 0)
ELSE(${DISABLE_VOLK})
FIND_PACKAGE(Volk)
ENDIF(${DISABLE_VOLK})
IF(VOLK_FOUND)
INCLUDE_DIRECTORIES(${VOLK_INCLUDE_DIRS})
LINK_DIRECTORIES(${VOLK_LIBRARY_DIRS})
ENDIF(VOLK_FOUND)
IF(FFTW3F_FOUND)
INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS})
LINK_DIRECTORIES(${FFTW3F_LIBRARY_DIRS})
ENDIF(FFTW3F_FOUND)
IF(SRSGUI_FOUND)
INCLUDE_DIRECTORIES(${SRSGUI_INCLUDE_DIRS})
LINK_DIRECTORIES(${SRSGUI_LIBRARY_DIRS})
ENDIF(SRSGUI_FOUND)
########################################################################
# Recurse subdirectories and compile all source files into the same lib
########################################################################
FILE(GLOB modules *)
SET(SOURCES_ALL "")
FOREACH (_module ${modules})
IF(IS_DIRECTORY ${_module})
IF (NOT ${_module} MATCHES "rf")
FILE(GLOB_RECURSE tmp "${_module}/src/*.c")
LIST(APPEND SOURCES_ALL ${tmp})
ENDIF (NOT ${_module} MATCHES "rf")
ENDIF(IS_DIRECTORY ${_module})
ENDFOREACH()
ADD_LIBRARY(srslte SHARED ${SOURCES_ALL})
TARGET_LINK_LIBRARIES(srslte m ${FFTW3F_LIBRARIES})
SET_TARGET_PROPERTIES(srslte
PROPERTIES VERSION ${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR}
)
IF(RF_FOUND)
# Include common RF files
SET(SOURCES_RF "")
LIST(APPEND SOURCES_RF "rf/src/rf_imp.c" "rf/src/rf_utils.c")
IF (UHD_FOUND)
INCLUDE_DIRECTORIES(${UHD_INCLUDE_DIRS})
LINK_DIRECTORIES(${UHD_LIBRARY_DIRS})
add_definitions(-DENABLE_UHD)
LIST(APPEND SOURCES_RF "rf/src/rf_uhd_imp.c" "rf/src/uhd_c_api.cpp")
ENDIF (UHD_FOUND)
IF (BLADERF_FOUND)
INCLUDE_DIRECTORIES(${BLADERF_INCLUDE_DIRS})
add_definitions(-DENABLE_BLADERF)
LIST(APPEND SOURCES_RF "rf/src/rf_blade_imp.c")
ENDIF (BLADERF_FOUND)
ADD_LIBRARY(srslte_rf SHARED ${SOURCES_RF})
SET_TARGET_PROPERTIES(srslte_rf
PROPERTIES VERSION ${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR}
)
IF (UHD_FOUND)
TARGET_LINK_LIBRARIES(srslte_rf ${UHD_LIBRARIES})
ENDIF (UHD_FOUND)
IF (BLADERF_FOUND)
TARGET_LINK_LIBRARIES(srslte_rf ${BLADERF_LIBRARIES})
ENDIF (BLADERF_FOUND)
INSTALL(TARGETS srslte_rf DESTINATION ${LIBRARY_DIR})
SRSLTE_SET_PIC(srslte_rf)
ENDIF(RF_FOUND)
add_subdirectory(agc)
add_subdirectory(ch_estimation)
add_subdirectory(common)
add_subdirectory(fec)
add_subdirectory(mimo)
add_subdirectory(phch)
add_subdirectory(rf)
add_subdirectory(sync)
add_subdirectory(utils)
add_subdirectory(channel)
add_subdirectory(dft)
add_subdirectory(io)
add_subdirectory(modem)
add_subdirectory(resampling)
add_subdirectory(scrambling)
add_subdirectory(ue)
add_library(srslte SHARED version.c)
target_link_libraries(srslte srslte_agc
srslte_ch_estimation
srslte_common
srslte_fec
srslte_mimo
srslte_phch
srslte_sync
srslte_utils
srslte_channel
srslte_dft
srslte_io
srslte_modem
srslte_resampling
srslte_scrambling
srslte_ue
srslte_rf
pthread)
set_target_properties(srslte PROPERTIES
VERSION ${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR})
if(VOLK_FOUND)
set_target_properties(srslte PROPERTIES COMPILE_DEFINITIONS "${VOLK_DEFINITIONS}")
target_link_libraries(srslte ${VOLK_LIBRARIES})
endif(VOLK_FOUND)
INSTALL(TARGETS srslte DESTINATION ${LIBRARY_DIR})
SRSLTE_SET_PIC(srslte)
IF(VOLK_FOUND)
INCLUDE_DIRECTORIES(${VOLK_INCLUDE_DIRS})
SET_TARGET_PROPERTIES(srslte PROPERTIES COMPILE_DEFINITIONS "${VOLK_DEFINITIONS}")
TARGET_LINK_LIBRARIES(srslte ${VOLK_LIBRARIES})
MESSAGE(STATUS " Compiling with VOLK SIMD library.")
ELSE(VOLK_FOUND)
MESSAGE(STATUS " VOLK SIMD library NOT found. Using generic implementation.")
ENDIF(VOLK_FOUND)
########################################################################
# Recurse subdirectories and find all directories with a CMakeLists.txt file in it
########################################################################
FILE(GLOB_RECURSE cmakefiles CMakeLists.txt)
FOREACH (_file ${cmakefiles})
GET_FILENAME_COMPONENT(dir ${_file} PATH)
IF (NOT ${dir} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
ADD_SUBDIRECTORY(${dir})
ENDIF ()
ENDFOREACH()

@ -0,0 +1,22 @@
#
# Copyright 2013-2015 Software Radio Systems Limited
#
# This file is part of the srsLTE library.
#
# srsLTE is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# srsLTE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# A copy of the GNU Affero General Public License can be found in
# the LICENSE file in the top-level directory of this distribution
# and at http://www.gnu.org/licenses/.
#
file(GLOB SOURCES "*.c")
add_library(srslte_agc ${SOURCES})

@ -0,0 +1,27 @@
#
# Copyright 2013-2015 Software Radio Systems Limited
#
# This file is part of the srsLTE library.
#
# srsLTE is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# srsLTE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# A copy of the GNU Affero General Public License can be found in
# the LICENSE file in the top-level directory of this distribution
# and at http://www.gnu.org/licenses/.
#
file(GLOB SOURCES "*.c")
add_library(srslte_ch_estimation ${SOURCES})
target_link_libraries(srslte_ch_estimation srslte_common
srslte_resampling
srslte_utils
srslte_phch)
add_subdirectory(test)

@ -22,16 +22,16 @@
# Downlink Channel Estimation TEST
########################################################################
ADD_EXECUTABLE(chest_test_dl chest_test_dl.c)
TARGET_LINK_LIBRARIES(chest_test_dl srslte)
add_executable(chest_test_dl chest_test_dl.c)
target_link_libraries(chest_test_dl srslte)
ADD_TEST(chest_test_dl_cellid0 chest_test_dl -c 0)
ADD_TEST(chest_test_dl_cellid1 chest_test_dl -c 1)
ADD_TEST(chest_test_dl_cellid2 chest_test_dl -c 2)
add_test(chest_test_dl_cellid0 chest_test_dl -c 0)
add_test(chest_test_dl_cellid1 chest_test_dl -c 1)
add_test(chest_test_dl_cellid2 chest_test_dl -c 2)
ADD_TEST(chest_test_dl_cellid0 chest_test_dl -c 0 -r 50)
ADD_TEST(chest_test_dl_cellid1 chest_test_dl -c 1 -r 50)
ADD_TEST(chest_test_dl_cellid2 chest_test_dl -c 2 -r 50)
add_test(chest_test_dl_cellid0 chest_test_dl -c 0 -r 50)
add_test(chest_test_dl_cellid1 chest_test_dl -c 1 -r 50)
add_test(chest_test_dl_cellid2 chest_test_dl -c 2 -r 50)
########################################################################
# Downlink MEX libs
@ -44,8 +44,8 @@ BuildMex(MEXNAME chest SOURCES chest_test_dl_mex.c LIBRARIES srslte srslte_mex)
# Uplink Channel Estimation TEST
########################################################################
ADD_EXECUTABLE(refsignal_ul_test_all refsignal_ul_test.c)
TARGET_LINK_LIBRARIES(refsignal_ul_test_all srslte)
add_executable(refsignal_ul_test_all refsignal_ul_test.c)
target_link_libraries(refsignal_ul_test_all srslte)
BuildMex(MEXNAME refsignal_pusch SOURCES refsignal_pusch_mex.c LIBRARIES srslte srslte_mex)

@ -0,0 +1,22 @@
#
# Copyright 2013-2015 Software Radio Systems Limited
#
# This file is part of the srsLTE library.
#
# srsLTE is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# srsLTE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# A copy of the GNU Affero General Public License can be found in
# the LICENSE file in the top-level directory of this distribution
# and at http://www.gnu.org/licenses/.
#
file(GLOB SOURCES "*.c")
add_library(srslte_channel ${SOURCES})

@ -0,0 +1,22 @@
#
# Copyright 2013-2015 Software Radio Systems Limited
#
# This file is part of the srsLTE library.
#
# srsLTE is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# srsLTE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# A copy of the GNU Affero General Public License can be found in
# the LICENSE file in the top-level directory of this distribution
# and at http://www.gnu.org/licenses/.
#
file(GLOB SOURCES "*.c")
add_library(srslte_common ${SOURCES})

@ -0,0 +1,35 @@
#
# Copyright 2013-2015 Software Radio Systems Limited
#
# This file is part of the srsLTE library.
#
# srsLTE is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# srsLTE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# A copy of the GNU Affero General Public License can be found in
# the LICENSE file in the top-level directory of this distribution
# and at http://www.gnu.org/licenses/.
#
find_package(FFTW3F REQUIRED)
if(FFTW3F_FOUND)
include_directories(${FFTW3F_INCLUDE_DIRS})
link_directories(${FFTW3F_LIBRARY_DIRS})
endif(FFTW3F_FOUND)
set(SRCS dft_fftw.c dft_precoding.c ofdm.c)
add_library(srslte_dft ${SRCS})
target_link_libraries(srslte_dft srslte_utils
m
${FFTW3F_LIBRARIES})
add_subdirectory(test)

@ -22,12 +22,12 @@
# FFT TEST
########################################################################
ADD_EXECUTABLE(ofdm_test ofdm_test.c)
TARGET_LINK_LIBRARIES(ofdm_test srslte)
add_executable(ofdm_test ofdm_test.c)
target_link_libraries(ofdm_test srslte)
ADD_TEST(ofdm_normal ofdm_test)
ADD_TEST(ofdm_extended ofdm_test -e)
add_test(ofdm_normal ofdm_test)
add_test(ofdm_extended ofdm_test -e)
ADD_TEST(ofdm_normal_single ofdm_test -n 6)
ADD_TEST(ofdm_extended_single ofdm_test -e -n 6)
add_test(ofdm_normal_single ofdm_test -n 6)
add_test(ofdm_extended_single ofdm_test -e -n 6)

@ -0,0 +1,24 @@
#
# Copyright 2013-2015 Software Radio Systems Limited
#
# This file is part of the srsLTE library.
#
# srsLTE is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# srsLTE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# A copy of the GNU Affero General Public License can be found in
# the LICENSE file in the top-level directory of this distribution
# and at http://www.gnu.org/licenses/.
#
file(GLOB SOURCES "*.c")
add_library(srslte_fec ${SOURCES})
target_link_libraries(srslte_fec srslte_utils)
add_subdirectory(test)

@ -23,53 +23,53 @@
# RATEMATCHING TEST
########################################################################
ADD_EXECUTABLE(rm_conv_test rm_conv_test.c)
TARGET_LINK_LIBRARIES(rm_conv_test srslte)
add_executable(rm_conv_test rm_conv_test.c)
target_link_libraries(rm_conv_test srslte)
ADD_EXECUTABLE(rm_turbo_test rm_turbo_test.c)
TARGET_LINK_LIBRARIES(rm_turbo_test srslte)
add_executable(rm_turbo_test rm_turbo_test.c)
target_link_libraries(rm_turbo_test srslte)
ADD_TEST(rm_conv_test_1 rm_conv_test -t 480 -r 1920)
ADD_TEST(rm_conv_test_2 rm_conv_test -t 1920 -r 480)
add_test(rm_conv_test_1 rm_conv_test -t 480 -r 1920)
add_test(rm_conv_test_2 rm_conv_test -t 1920 -r 480)
ADD_TEST(rm_turbo_test_1 rm_turbo_test -e 1920)
ADD_TEST(rm_turbo_test_2 rm_turbo_test -e 8192)
add_test(rm_turbo_test_1 rm_turbo_test -e 1920)
add_test(rm_turbo_test_2 rm_turbo_test -e 8192)
BuildMex(MEXNAME rm_turbo_rx SOURCES rm_turbo_rx_mex.c LIBRARIES srslte srslte_mex)
########################################################################
# Turbo Coder TEST
########################################################################
ADD_EXECUTABLE(turbodecoder_test turbodecoder_test.c)
TARGET_LINK_LIBRARIES(turbodecoder_test srslte)
add_executable(turbodecoder_test turbodecoder_test.c)
target_link_libraries(turbodecoder_test srslte)
ADD_TEST(turbodecoder_test_504_1 turbodecoder_test -n 100 -s 1 -l 504 -e 1.0 -t)
ADD_TEST(turbodecoder_test_504_2 turbodecoder_test -n 100 -s 1 -l 504 -e 2.0 -t)
ADD_TEST(turbodecoder_test_6114_1_5 turbodecoder_test -n 100 -s 1 -l 6144 -e 1.5 -t)
ADD_TEST(turbodecoder_test_known turbodecoder_test -n 1 -s 1 -k -e 0.5)
add_test(turbodecoder_test_504_1 turbodecoder_test -n 100 -s 1 -l 504 -e 1.0 -t)
add_test(turbodecoder_test_504_2 turbodecoder_test -n 100 -s 1 -l 504 -e 2.0 -t)
add_test(turbodecoder_test_6114_1_5 turbodecoder_test -n 100 -s 1 -l 6144 -e 1.5 -t)
add_test(turbodecoder_test_known turbodecoder_test -n 1 -s 1 -k -e 0.5)
BuildMex(MEXNAME turbodecoder SOURCES turbodecoder_test_mex.c LIBRARIES srslte srslte_mex)
ADD_EXECUTABLE(turbocoder_test turbocoder_test.c)
TARGET_LINK_LIBRARIES(turbocoder_test srslte)
ADD_TEST(turbocoder_test_all turbocoder_test)
add_executable(turbocoder_test turbocoder_test.c)
target_link_libraries(turbocoder_test srslte)
add_test(turbocoder_test_all turbocoder_test)
########################################################################
# Viterbi TEST
########################################################################
ADD_EXECUTABLE(viterbi_test viterbi_test.c)
TARGET_LINK_LIBRARIES(viterbi_test srslte)
add_executable(viterbi_test viterbi_test.c)
target_link_libraries(viterbi_test srslte)
ADD_TEST(viterbi_40_0 viterbi_test -n 1000 -s 1 -l 40 -t -e 0.0)
ADD_TEST(viterbi_40_2 viterbi_test -n 1000 -s 1 -l 40 -t -e 2.0)
ADD_TEST(viterbi_40_3 viterbi_test -n 1000 -s 1 -l 40 -t -e 3.0)
ADD_TEST(viterbi_40_4 viterbi_test -n 1000 -s 1 -l 40 -t -e 4.5)
add_test(viterbi_40_0 viterbi_test -n 1000 -s 1 -l 40 -t -e 0.0)
add_test(viterbi_40_2 viterbi_test -n 1000 -s 1 -l 40 -t -e 2.0)
add_test(viterbi_40_3 viterbi_test -n 1000 -s 1 -l 40 -t -e 3.0)
add_test(viterbi_40_4 viterbi_test -n 1000 -s 1 -l 40 -t -e 4.5)
ADD_TEST(viterbi_1000_0 viterbi_test -n 100 -s 1 -l 1000 -t -e 0.0)
ADD_TEST(viterbi_1000_2 viterbi_test -n 100 -s 1 -l 1000 -t -e 2.0)
ADD_TEST(viterbi_1000_3 viterbi_test -n 100 -s 1 -l 1000 -t -e 3.0)
ADD_TEST(viterbi_1000_4 viterbi_test -n 100 -s 1 -l 1000 -t -e 4.5)
add_test(viterbi_1000_0 viterbi_test -n 100 -s 1 -l 1000 -t -e 0.0)
add_test(viterbi_1000_2 viterbi_test -n 100 -s 1 -l 1000 -t -e 2.0)
add_test(viterbi_1000_3 viterbi_test -n 100 -s 1 -l 1000 -t -e 3.0)
add_test(viterbi_1000_4 viterbi_test -n 100 -s 1 -l 1000 -t -e 4.5)
BuildMex(MEXNAME viterbi SOURCES viterbi_test_mex.c LIBRARIES srslte srslte_mex)
@ -77,12 +77,12 @@ BuildMex(MEXNAME viterbi SOURCES viterbi_test_mex.c LIBRARIES srslte srslte_mex)
# CRC TEST
########################################################################
ADD_EXECUTABLE(crc_test crc_test.c)
TARGET_LINK_LIBRARIES(crc_test srslte)
add_executable(crc_test crc_test.c)
target_link_libraries(crc_test srslte)
ADD_TEST(crc_24A crc_test -n 5001 -l 24 -p 0x1864CFB -s 1)
ADD_TEST(crc_24B crc_test -n 5001 -l 24 -p 0x1800063 -s 1)
ADD_TEST(crc_16 crc_test -n 5001 -l 16 -p 0x11021 -s 1)
ADD_TEST(crc_8 crc_test -n 5001 -l 8 -p 0x19B -s 1)
add_test(crc_24A crc_test -n 5001 -l 24 -p 0x1864CFB -s 1)
add_test(crc_24B crc_test -n 5001 -l 24 -p 0x1800063 -s 1)
add_test(crc_16 crc_test -n 5001 -l 16 -p 0x11021 -s 1)
add_test(crc_8 crc_test -n 5001 -l 8 -p 0x19B -s 1)

@ -0,0 +1,22 @@
#
# Copyright 2013-2015 Software Radio Systems Limited
#
# This file is part of the srsLTE library.
#
# srsLTE is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# srsLTE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# A copy of the GNU Affero General Public License can be found in
# the LICENSE file in the top-level directory of this distribution
# and at http://www.gnu.org/licenses/.
#
file(GLOB SOURCES "*.c")
add_library(srslte_io ${SOURCES})

@ -0,0 +1,23 @@
#
# Copyright 2013-2015 Software Radio Systems Limited
#
# This file is part of the srsLTE library.
#
# srsLTE is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# srsLTE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# A copy of the GNU Affero General Public License can be found in
# the LICENSE file in the top-level directory of this distribution
# and at http://www.gnu.org/licenses/.
#
file(GLOB SOURCES "*.c")
add_library(srslte_mimo ${SOURCES})
add_subdirectory(test)

@ -22,43 +22,43 @@
# LAYER MAPPING TEST
########################################################################
ADD_EXECUTABLE(layermap_test layermap_test.c)
TARGET_LINK_LIBRARIES(layermap_test srslte)
add_executable(layermap_test layermap_test.c)
target_link_libraries(layermap_test srslte)
ADD_TEST(layermap_single layermap_test -n 1000 -m single -c 1 -l 1)
add_test(layermap_single layermap_test -n 1000 -m single -c 1 -l 1)
ADD_TEST(layermap_diversity_2 layermap_test -n 1000 -m diversity -c 1 -l 2)
ADD_TEST(layermap_diversity_4 layermap_test -n 1000 -m diversity -c 1 -l 4)
add_test(layermap_diversity_2 layermap_test -n 1000 -m diversity -c 1 -l 2)
add_test(layermap_diversity_4 layermap_test -n 1000 -m diversity -c 1 -l 4)
ADD_TEST(layermap_multiplex_11 layermap_test -n 1000 -m multiplex -c 1 -l 1)
ADD_TEST(layermap_multiplex_12 layermap_test -n 1000 -m multiplex -c 1 -l 2)
ADD_TEST(layermap_multiplex_13 layermap_test -n 1002 -m multiplex -c 1 -l 3)
ADD_TEST(layermap_multiplex_14 layermap_test -n 1000 -m multiplex -c 1 -l 4)
ADD_TEST(layermap_multiplex_15 layermap_test -n 1000 -m multiplex -c 1 -l 5)
ADD_TEST(layermap_multiplex_16 layermap_test -n 1002 -m multiplex -c 1 -l 6)
ADD_TEST(layermap_multiplex_17 layermap_test -n 994 -m multiplex -c 1 -l 7)
ADD_TEST(layermap_multiplex_18 layermap_test -n 1000 -m multiplex -c 1 -l 8)
add_test(layermap_multiplex_11 layermap_test -n 1000 -m multiplex -c 1 -l 1)
add_test(layermap_multiplex_12 layermap_test -n 1000 -m multiplex -c 1 -l 2)
add_test(layermap_multiplex_13 layermap_test -n 1002 -m multiplex -c 1 -l 3)
add_test(layermap_multiplex_14 layermap_test -n 1000 -m multiplex -c 1 -l 4)
add_test(layermap_multiplex_15 layermap_test -n 1000 -m multiplex -c 1 -l 5)
add_test(layermap_multiplex_16 layermap_test -n 1002 -m multiplex -c 1 -l 6)
add_test(layermap_multiplex_17 layermap_test -n 994 -m multiplex -c 1 -l 7)
add_test(layermap_multiplex_18 layermap_test -n 1000 -m multiplex -c 1 -l 8)
ADD_TEST(layermap_multiplex_22 layermap_test -n 1000 -m multiplex -c 2 -l 2)
ADD_TEST(layermap_multiplex_23 layermap_test -n 1002 -m multiplex -c 2 -l 3)
ADD_TEST(layermap_multiplex_24 layermap_test -n 1000 -m multiplex -c 2 -l 4)
ADD_TEST(layermap_multiplex_25 layermap_test -n 1002 -m multiplex -c 2 -l 5)
ADD_TEST(layermap_multiplex_26 layermap_test -n 1002 -m multiplex -c 2 -l 6)
ADD_TEST(layermap_multiplex_27 layermap_test -n 1000 -m multiplex -c 2 -l 7)
ADD_TEST(layermap_multiplex_28 layermap_test -n 1000 -m multiplex -c 2 -l 8)
add_test(layermap_multiplex_22 layermap_test -n 1000 -m multiplex -c 2 -l 2)
add_test(layermap_multiplex_23 layermap_test -n 1002 -m multiplex -c 2 -l 3)
add_test(layermap_multiplex_24 layermap_test -n 1000 -m multiplex -c 2 -l 4)
add_test(layermap_multiplex_25 layermap_test -n 1002 -m multiplex -c 2 -l 5)
add_test(layermap_multiplex_26 layermap_test -n 1002 -m multiplex -c 2 -l 6)
add_test(layermap_multiplex_27 layermap_test -n 1000 -m multiplex -c 2 -l 7)
add_test(layermap_multiplex_28 layermap_test -n 1000 -m multiplex -c 2 -l 8)
########################################################################
# LAYER MAPPING TEST
########################################################################
ADD_EXECUTABLE(precoding_test precoding_test.c)
TARGET_LINK_LIBRARIES(precoding_test srslte)
add_executable(precoding_test precoding_test.c)
target_link_libraries(precoding_test srslte)
ADD_TEST(precoding_single precoding_test -n 1000 -m single)
ADD_TEST(precoding_diversity2 precoding_test -n 1000 -m diversity -l 2 -p 2)
ADD_TEST(precoding_diversity4 precoding_test -n 1024 -m diversity -l 4 -p 4)
add_test(precoding_single precoding_test -n 1000 -m single)
add_test(precoding_diversity2 precoding_test -n 1000 -m diversity -l 2 -p 2)
add_test(precoding_diversity4 precoding_test -n 1024 -m diversity -l 4 -p 4)
# MEX file for predecoding and layer demapping test

@ -0,0 +1,23 @@
#
# Copyright 2013-2015 Software Radio Systems Limited
#
# This file is part of the srsLTE library.
#
# srsLTE is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# srsLTE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# A copy of the GNU Affero General Public License can be found in
# the LICENSE file in the top-level directory of this distribution
# and at http://www.gnu.org/licenses/.
#
file(GLOB SOURCES "*.c")
add_library(srslte_modem ${SOURCES})
add_subdirectory(test)

@ -22,21 +22,21 @@
# MODEM TEST
########################################################################
ADD_EXECUTABLE(modem_test modem_test.c)
TARGET_LINK_LIBRARIES(modem_test srslte)
add_executable(modem_test modem_test.c)
target_link_libraries(modem_test srslte)
ADD_TEST(modem_bpsk modem_test -n 1024 -m 1)
ADD_TEST(modem_qpsk modem_test -n 1024 -m 2)
ADD_TEST(modem_qam16 modem_test -n 1024 -m 4)
ADD_TEST(modem_qam64 modem_test -n 1008 -m 6)
add_test(modem_bpsk modem_test -n 1024 -m 1)
add_test(modem_qpsk modem_test -n 1024 -m 2)
add_test(modem_qam16 modem_test -n 1024 -m 4)
add_test(modem_qam64 modem_test -n 1008 -m 6)
ADD_TEST(modem_bpsk_soft modem_test -n 1024 -m 1)
ADD_TEST(modem_qpsk_soft modem_test -n 1024 -m 2)
ADD_TEST(modem_qam16_soft modem_test -n 1024 -m 4)
ADD_TEST(modem_qam64_soft modem_test -n 1008 -m 6)
add_test(modem_bpsk_soft modem_test -n 1024 -m 1)
add_test(modem_qpsk_soft modem_test -n 1024 -m 2)
add_test(modem_qam16_soft modem_test -n 1024 -m 4)
add_test(modem_qam64_soft modem_test -n 1008 -m 6)
ADD_EXECUTABLE(soft_demod_test soft_demod_test.c)
TARGET_LINK_LIBRARIES(soft_demod_test srslte)
add_executable(soft_demod_test soft_demod_test.c)
target_link_libraries(soft_demod_test srslte)

@ -0,0 +1,29 @@
#
# Copyright 2013-2015 Software Radio Systems Limited
#
# This file is part of the srsLTE library.
#
# srsLTE is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# srsLTE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# A copy of the GNU Affero General Public License can be found in
# the LICENSE file in the top-level directory of this distribution
# and at http://www.gnu.org/licenses/.
#
file(GLOB SOURCES "*.c")
add_library(srslte_phch ${SOURCES})
target_link_libraries(srslte_phch srslte_common
srslte_mimo
srslte_fec
srslte_modem
srslte_scrambling
srslte_ch_estimation)
add_subdirectory(test)

@ -22,15 +22,15 @@
# PBCH TEST
########################################################################
ADD_EXECUTABLE(pbch_test pbch_test.c)
TARGET_LINK_LIBRARIES(pbch_test srslte)
ADD_TEST(pbch_test_6 pbch_test -p 1 -n 6 -c 100)
ADD_TEST(pbch_test_62 pbch_test -p 2 -n 6 -c 100)
ADD_TEST(pbch_test_64 pbch_test -p 4 -n 6 -c 100)
ADD_TEST(pbch_test_50 pbch_test -p 1 -n 50 -c 50)
ADD_TEST(pbch_test_502 pbch_test -p 2 -n 50 -c 50)
ADD_TEST(pbch_test_504 pbch_test -p 4 -n 50 -c 50)
add_executable(pbch_test pbch_test.c)
target_link_libraries(pbch_test srslte)
add_test(pbch_test_6 pbch_test -p 1 -n 6 -c 100)
add_test(pbch_test_62 pbch_test -p 2 -n 6 -c 100)
add_test(pbch_test_64 pbch_test -p 4 -n 6 -c 100)
add_test(pbch_test_50 pbch_test -p 1 -n 50 -c 50)
add_test(pbch_test_502 pbch_test -p 2 -n 50 -c 50)
add_test(pbch_test_504 pbch_test -p 4 -n 50 -c 50)
BuildMex(MEXNAME pbch SOURCES pbch_test_mex.c LIBRARIES srslte srslte_mex)
@ -39,15 +39,15 @@ BuildMex(MEXNAME pbch SOURCES pbch_test_mex.c LIBRARIES srslte srslte_mex)
# PCFICH TEST
########################################################################
ADD_EXECUTABLE(pcfich_test pcfich_test.c)
TARGET_LINK_LIBRARIES(pcfich_test srslte)
add_executable(pcfich_test pcfich_test.c)
target_link_libraries(pcfich_test srslte)
ADD_TEST(pcfich_test_6 pcfich_test -p 1 -n 6)
ADD_TEST(pcfich_test_62 pcfich_test -p 2 -n 6)
ADD_TEST(pcfich_test_64 pcfich_test -p 4 -n 6)
ADD_TEST(pcfich_test_10 pcfich_test -p 1 -n 10)
ADD_TEST(pcfich_test_102 pcfich_test -p 2 -n 10)
ADD_TEST(pcfich_test_104 pcfich_test -p 4 -n 10)
add_test(pcfich_test_6 pcfich_test -p 1 -n 6)
add_test(pcfich_test_62 pcfich_test -p 2 -n 6)
add_test(pcfich_test_64 pcfich_test -p 4 -n 6)
add_test(pcfich_test_10 pcfich_test -p 1 -n 10)
add_test(pcfich_test_102 pcfich_test -p 2 -n 10)
add_test(pcfich_test_104 pcfich_test -p 4 -n 10)
BuildMex(MEXNAME pcfich SOURCES pcfich_test_mex.c LIBRARIES srslte srslte_mex)
@ -55,33 +55,33 @@ BuildMex(MEXNAME pcfich SOURCES pcfich_test_mex.c LIBRARIES srslte srslte_mex)
# PHICH TEST
########################################################################
ADD_EXECUTABLE(phich_test phich_test.c)
TARGET_LINK_LIBRARIES(phich_test srslte)
add_executable(phich_test phich_test.c)
target_link_libraries(phich_test srslte)
ADD_TEST(phich_test_6 phich_test -p 1 -n 6)
ADD_TEST(phich_test_62 phich_test -p 2 -n 6)
ADD_TEST(phich_test_64 phich_test -p 4 -n 6 -g 1/6)
add_test(phich_test_6 phich_test -p 1 -n 6)
add_test(phich_test_62 phich_test -p 2 -n 6)
add_test(phich_test_64 phich_test -p 4 -n 6 -g 1/6)
ADD_TEST(phich_test_6e phich_test -p 1 -n 6 -e)
ADD_TEST(phich_test_62e phich_test -p 2 -n 6 -e -l)
ADD_TEST(phich_test_64e phich_test -p 4 -n 6 -e -l -g 2)
add_test(phich_test_6e phich_test -p 1 -n 6 -e)
add_test(phich_test_62e phich_test -p 2 -n 6 -e -l)
add_test(phich_test_64e phich_test -p 4 -n 6 -e -l -g 2)
ADD_TEST(phich_test_10 phich_test -p 1 -n 10 -e)
ADD_TEST(phich_test_102 phich_test -p 2 -n 10 -g 2)
ADD_TEST(phich_test_104 phich_test -p 4 -n 10 -e -l -g 1/2)
add_test(phich_test_10 phich_test -p 1 -n 10 -e)
add_test(phich_test_102 phich_test -p 2 -n 10 -g 2)
add_test(phich_test_104 phich_test -p 4 -n 10 -e -l -g 1/2)
########################################################################
# PDCCH TEST
########################################################################
ADD_EXECUTABLE(pdcch_test pdcch_test.c)
TARGET_LINK_LIBRARIES(pdcch_test srslte)
add_executable(pdcch_test pdcch_test.c)
target_link_libraries(pdcch_test srslte)
ADD_TEST(pdcch_test pdcch_test)
add_test(pdcch_test pdcch_test)
ADD_EXECUTABLE(dci_unpacking dci_unpacking.c)
TARGET_LINK_LIBRARIES(dci_unpacking srslte)
add_executable(dci_unpacking dci_unpacking.c)
target_link_libraries(dci_unpacking srslte)
BuildMex(MEXNAME pdcch SOURCES pdcch_test_mex.c LIBRARIES srslte srslte_mex)
@ -89,12 +89,12 @@ BuildMex(MEXNAME pdcch SOURCES pdcch_test_mex.c LIBRARIES srslte srslte_mex)
# PDSCH TEST
########################################################################
ADD_EXECUTABLE(pdsch_test pdsch_test.c)
TARGET_LINK_LIBRARIES(pdsch_test srslte)
add_executable(pdsch_test pdsch_test.c)
target_link_libraries(pdsch_test srslte)
ADD_TEST(pdsch_test_qpsk pdsch_test -m 10 -n 50 -r 1)
ADD_TEST(pdsch_test_qam16 pdsch_test -m 20 -n 100)
ADD_TEST(pdsch_test_qam64 pdsch_test -m 28 -n 100 -r 0)
add_test(pdsch_test_qpsk pdsch_test -m 10 -n 50 -r 1)
add_test(pdsch_test_qam16 pdsch_test -m 20 -n 100)
add_test(pdsch_test_qam64 pdsch_test -m 28 -n 100 -r 0)
BuildMex(MEXNAME pdsch SOURCES pdsch_test_mex.c LIBRARIES srslte srslte_mex)
BuildMex(MEXNAME dlsch_encode SOURCES dlsch_encode_test_mex.c LIBRARIES srslte srslte_mex)
@ -103,47 +103,47 @@ BuildMex(MEXNAME dlsch_encode SOURCES dlsch_encode_test_mex.c LIBRARIES srslte s
# FILE TEST
########################################################################
ADD_EXECUTABLE(pbch_file_test pbch_file_test.c)
TARGET_LINK_LIBRARIES(pbch_file_test srslte)
add_executable(pbch_file_test pbch_file_test.c)
target_link_libraries(pbch_file_test srslte)
ADD_EXECUTABLE(pcfich_file_test pcfich_file_test.c)
TARGET_LINK_LIBRARIES(pcfich_file_test srslte)
add_executable(pcfich_file_test pcfich_file_test.c)
target_link_libraries(pcfich_file_test srslte)
ADD_EXECUTABLE(phich_file_test phich_file_test.c)
TARGET_LINK_LIBRARIES(phich_file_test srslte)
add_executable(phich_file_test phich_file_test.c)
target_link_libraries(phich_file_test srslte)
ADD_EXECUTABLE(pdcch_file_test pdcch_file_test.c)
TARGET_LINK_LIBRARIES(pdcch_file_test srslte)
add_executable(pdcch_file_test pdcch_file_test.c)
target_link_libraries(pdcch_file_test srslte)
ADD_EXECUTABLE(pdsch_pdcch_file_test pdsch_pdcch_file_test.c)
TARGET_LINK_LIBRARIES(pdsch_pdcch_file_test srslte)
add_executable(pdsch_pdcch_file_test pdsch_pdcch_file_test.c)
target_link_libraries(pdsch_pdcch_file_test srslte)
ADD_TEST(pbch_file_test pbch_file_test -i ${CMAKE_CURRENT_SOURCE_DIR}/signal.1.92M.dat)
ADD_TEST(pcfich_file_test pcfich_file_test -c 150 -n 50 -p 2 -i ${CMAKE_CURRENT_SOURCE_DIR}/signal.10M.dat)
ADD_TEST(phich_file_test phich_file_test -c 150 -n 50 -p 2 -i ${CMAKE_CURRENT_SOURCE_DIR}/signal.10M.dat)
ADD_TEST(pdcch_file_test pdcch_file_test -c 1 -f 3 -n 6 -p 1 -i ${CMAKE_CURRENT_SOURCE_DIR}/signal.1.92M.amar.dat)
ADD_TEST(pdsch_pdcch_file_test pdsch_pdcch_file_test -c 1 -f 3 -n 6 -p 1 -i ${CMAKE_CURRENT_SOURCE_DIR}/signal.1.92M.amar.dat)
add_test(pbch_file_test pbch_file_test -i ${CMAKE_CURRENT_SOURCE_DIR}/signal.1.92M.dat)
add_test(pcfich_file_test pcfich_file_test -c 150 -n 50 -p 2 -i ${CMAKE_CURRENT_SOURCE_DIR}/signal.10M.dat)
add_test(phich_file_test phich_file_test -c 150 -n 50 -p 2 -i ${CMAKE_CURRENT_SOURCE_DIR}/signal.10M.dat)
add_test(pdcch_file_test pdcch_file_test -c 1 -f 3 -n 6 -p 1 -i ${CMAKE_CURRENT_SOURCE_DIR}/signal.1.92M.amar.dat)
add_test(pdsch_pdcch_file_test pdsch_pdcch_file_test -c 1 -f 3 -n 6 -p 1 -i ${CMAKE_CURRENT_SOURCE_DIR}/signal.1.92M.amar.dat)
########################################################################
# PUSCH TEST
########################################################################
ADD_EXECUTABLE(pusch_test pusch_test.c)
TARGET_LINK_LIBRARIES(pusch_test srslte)
add_executable(pusch_test pusch_test.c)
target_link_libraries(pusch_test srslte)
BuildMex(MEXNAME ulsch_encode SOURCES ulsch_encode_test_mex.c LIBRARIES srslte srslte_mex)
BuildMex(MEXNAME pusch_encode SOURCES pusch_encode_test_mex.c LIBRARIES srslte srslte_mex)
ADD_TEST(pusch_test pusch_test)
add_test(pusch_test pusch_test)
########################################################################
# PUCCH TEST
########################################################################
ADD_EXECUTABLE(pucch_test pucch_test.c)
TARGET_LINK_LIBRARIES(pucch_test srslte)
add_executable(pucch_test pucch_test.c)
target_link_libraries(pucch_test srslte)
ADD_TEST(pucch_test pucch_test)
add_test(pucch_test pucch_test)
BuildMex(MEXNAME pucch_encode SOURCES pucch_encode_test_mex.c LIBRARIES srslte srslte_mex)
@ -155,45 +155,45 @@ BuildMex(MEXNAME pucch_encode SOURCES pucch_encode_test_mex.c LIBRARIES srslte s
# PRACH TEST
########################################################################
ADD_EXECUTABLE(prach_test prach_test.c)
TARGET_LINK_LIBRARIES(prach_test srslte)
add_executable(prach_test prach_test.c)
target_link_libraries(prach_test srslte)
ADD_TEST(prach prach_test)
add_test(prach prach_test)
ADD_TEST(prach_256 prach_test -N 256)
ADD_TEST(prach_512 prach_test -N 512)
ADD_TEST(prach_1024 prach_test -N 1024)
ADD_TEST(prach_1536 prach_test -N 1536)
ADD_TEST(prach_2048 prach_test -N 2048)
add_test(prach_256 prach_test -N 256)
add_test(prach_512 prach_test -N 512)
add_test(prach_1024 prach_test -N 1024)
add_test(prach_1536 prach_test -N 1536)
add_test(prach_2048 prach_test -N 2048)
ADD_TEST(prach_f0 prach_test -f 0)
ADD_TEST(prach_f1 prach_test -f 1)
ADD_TEST(prach_f2 prach_test -f 2)
ADD_TEST(prach_f3 prach_test -f 3)
add_test(prach_f0 prach_test -f 0)
add_test(prach_f1 prach_test -f 1)
add_test(prach_f2 prach_test -f 2)
add_test(prach_f3 prach_test -f 3)
ADD_TEST(prach_rs1 prach_test -r 1)
ADD_TEST(prach_rs2 prach_test -r 2)
ADD_TEST(prach_rs3 prach_test -r 3)
add_test(prach_rs1 prach_test -r 1)
add_test(prach_rs2 prach_test -r 2)
add_test(prach_rs3 prach_test -r 3)
ADD_TEST(prach_zc0 prach_test -z 0)
ADD_TEST(prach_zc2 prach_test -z 2)
ADD_TEST(prach_zc3 prach_test -z 3)
add_test(prach_zc0 prach_test -z 0)
add_test(prach_zc2 prach_test -z 2)
add_test(prach_zc3 prach_test -z 3)
ADD_EXECUTABLE(prach_test_multi prach_test_multi.c)
TARGET_LINK_LIBRARIES(prach_test_multi srslte)
add_executable(prach_test_multi prach_test_multi.c)
target_link_libraries(prach_test_multi srslte)
ADD_TEST(prach_test_multi prach_test_multi)
add_test(prach_test_multi prach_test_multi)
ADD_TEST(prach_test_multi_n32 prach_test_multi -n 32)
ADD_TEST(prach_test_multi_n16 prach_test_multi -n 16)
ADD_TEST(prach_test_multi_n8 prach_test_multi -n 8)
ADD_TEST(prach_test_multi_n4 prach_test_multi -n 4)
add_test(prach_test_multi_n32 prach_test_multi -n 32)
add_test(prach_test_multi_n16 prach_test_multi -n 16)
add_test(prach_test_multi_n8 prach_test_multi -n 8)
add_test(prach_test_multi_n4 prach_test_multi -n 4)
BuildMex(MEXNAME prach SOURCES prach_test_mex.c LIBRARIES srslte srslte_mex)
IF(UHD_FOUND)
ADD_EXECUTABLE(prach_test_usrp prach_test_usrp.c)
TARGET_LINK_LIBRARIES(prach_test_usrp srslte_rf srslte)
ENDIF(UHD_FOUND)
if(UHD_FOUND)
add_executable(prach_test_usrp prach_test_usrp.c)
target_link_libraries(prach_test_usrp srslte_rf srslte pthread)
endif(UHD_FOUND)

@ -0,0 +1,23 @@
#
# Copyright 2013-2015 Software Radio Systems Limited
#
# This file is part of the srsLTE library.
#
# srsLTE is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# srsLTE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# A copy of the GNU Affero General Public License can be found in
# the LICENSE file in the top-level directory of this distribution
# and at http://www.gnu.org/licenses/.
#
file(GLOB SOURCES "*.c")
add_library(srslte_resampling ${SOURCES})
add_subdirectory(test)

@ -22,13 +22,13 @@
# RESAMPLING TEST
########################################################################
ADD_EXECUTABLE(resample_arb_test resample_arb_test.c)
TARGET_LINK_LIBRARIES(resample_arb_test srslte)
add_executable(resample_arb_test resample_arb_test.c)
target_link_libraries(resample_arb_test srslte)
ADD_EXECUTABLE(resample_arb_bench resample_arb_bench.c)
TARGET_LINK_LIBRARIES(resample_arb_bench srslte)
add_executable(resample_arb_bench resample_arb_bench.c)
target_link_libraries(resample_arb_bench srslte)
ADD_TEST(resample resample_arb_test)
add_test(resample resample_arb_test)

@ -0,0 +1,47 @@
#
# Copyright 2013-2015 Software Radio Systems Limited
#
# This file is part of the srsLTE library.
#
# srsLTE is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# srsLTE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# A copy of the GNU Affero General Public License can be found in
# the LICENSE file in the top-level directory of this distribution
# and at http://www.gnu.org/licenses/.
#
if(RF_FOUND)
# Include common RF files
set(SOURCES_RF "")
list(APPEND SOURCES_RF rf_imp.c rf_utils.c)
if (UHD_FOUND)
add_definitions(-DENABLE_UHD)
list(APPEND SOURCES_RF rf_uhd_imp.c uhd_c_api.cpp)
endif (UHD_FOUND)
if (BLADERF_FOUND)
add_definitions(-DENABLE_BLADERF)
list(APPEND SOURCES_RF rf_blade_imp.c)
endif (BLADERF_FOUND)
add_library(srslte_rf ${SOURCES_RF})
target_link_libraries(srslte_rf pthread)
if (UHD_FOUND)
target_link_libraries(srslte_rf ${UHD_LIBRARIES})
endif (UHD_FOUND)
if (BLADERF_FOUND)
target_link_libraries(srslte_rf ${BLADERF_LIBRARIES})
endif (BLADERF_FOUND)
endif(RF_FOUND)

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save