From e10816bfa24bc13f35bd1b6f388c241507ef77c9 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Fri, 2 Jun 2017 12:39:38 +0200 Subject: [PATCH 1/4] removed unsupported options from conf --- srsue/ue.conf.example | 4 ---- 1 file changed, 4 deletions(-) diff --git a/srsue/ue.conf.example b/srsue/ue.conf.example index 065538710..69e4c3852 100644 --- a/srsue/ue.conf.example +++ b/srsue/ue.conf.example @@ -134,11 +134,7 @@ enable = false #ue_category = 4 #prach_gain = 30 #cqi_max = 15 -#cqi_offset = 0 #cqi_fixed = 10 -#cqi_random_ms = 0 -#cqi_period_ms = 0 -#cqi_period_duty = 0.5 #snr_ema_coeff = 0.1 #snr_estim_alg = refs #pdsch_max_its = 4 From 3473aa11571115fca2f14fc6b7eb74c3aa2d79e6 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Fri, 2 Jun 2017 13:32:26 +0200 Subject: [PATCH 2/4] fixed default enb config files --- srsenb/enb.conf.example | 9 ++++++--- srsenb/rr.conf.example | 6 +++--- srsenb/sib.conf.example | 16 +++++----------- srsue/ue.conf.example | 6 +++--- 4 files changed, 17 insertions(+), 20 deletions(-) diff --git a/srsenb/enb.conf.example b/srsenb/enb.conf.example index 104d9f0bf..d00a58ecb 100644 --- a/srsenb/enb.conf.example +++ b/srsenb/enb.conf.example @@ -57,7 +57,7 @@ drb_config = drb.conf ##################################################################### [rf] dl_earfcn = 3400 -tx_gain = 60 +tx_gain = 70 rx_gain = 50 #device_name = auto @@ -121,8 +121,8 @@ enable = false #pdsch_mcs = -1 #pdsch_max_mcs = -1 #pusch_mcs = -1 -#pusch_max_mcs = -1 -#nof_ctrl_symbols = 3 +pusch_max_mcs = 16 +nof_ctrl_symbols = 2 ##################################################################### # Expert configuration options @@ -134,6 +134,8 @@ enable = false # tx_amplitude: Transmit amplitude factor (set 0-1 to reduce PAPR) # link_failure_nof_err: Number of PUSCH failures after which a radio-link failure is triggered. # a link failure is when SNR<0 and CRC=KO +# max_prach_offset_us: Maximum allowed RACH offset (in us) +# ##################################################################### [expert] #pdsch_max_its = 4 @@ -142,6 +144,7 @@ enable = false #tx_amplitude = 0.8 #link_failure_nof_err = 10 #rrc_inactivity_timer = 5000 +#max_prach_offset_us = 30 ##################################################################### # Manual RF calibration diff --git a/srsenb/rr.conf.example b/srsenb/rr.conf.example index ca32a62da..fc1598ac2 100644 --- a/srsenb/rr.conf.example +++ b/srsenb/rr.conf.example @@ -8,7 +8,7 @@ mac_cnfg = }; ulsch_cnfg = { - max_harq_tx = 5; + max_harq_tx = 4; periodic_bsr_timer = 20; // in ms retx_bsr_timer = 320; // in ms }; @@ -21,7 +21,7 @@ phy_cnfg = phich_cnfg = { duration = "Normal"; - resources = "1/6"; + resources = "1"; }; pusch_cnfg_ded = @@ -34,7 +34,7 @@ phy_cnfg = // PUCCH-SR resources are scheduled on time-frequeny domain first, then multiplexed in the same resource. sched_request_cnfg = { - dsr_trans_max = 4; + dsr_trans_max = 16; period = 40; // in ms subframe = [0]; // vector of subframe indices allowed for SR transmissions nof_prb = 2; // number of PRBs on each extreme used for SR (total prb is twice this number) diff --git a/srsenb/sib.conf.example b/srsenb/sib.conf.example index ed6ccd2ca..f10cc0158 100644 --- a/srsenb/sib.conf.example +++ b/srsenb/sib.conf.example @@ -22,19 +22,13 @@ sib2 = { rach_cnfg = { - num_ra_preambles = 4 + num_ra_preambles = 52 preamble_init_rx_target_pwr = -108; pwr_ramping_step = 6; // in dB preamble_trans_max = 7; - ra_resp_win_size = 8; // in ms + ra_resp_win_size = 10; // in ms mac_con_res_timer = 64; // in ms - max_harq_msg3_tx = 1; - preambles_group_a_cnfg = - { - size_of_ra = 4; - msg_size = 56; - msg_pwr_offset_group_b = -1; - }; + max_harq_msg3_tx = 4; }; bcch_cnfg = { @@ -51,8 +45,8 @@ sib2 = prach_cnfg_info = { high_speed_flag = false; - prach_config_index = 53; - prach_freq_offset = 11; + prach_config_index = 3; + prach_freq_offset = 0; zero_correlation_zone_config = 11; }; }; diff --git a/srsue/ue.conf.example b/srsue/ue.conf.example index 69e4c3852..90d974859 100644 --- a/srsue/ue.conf.example +++ b/srsue/ue.conf.example @@ -21,9 +21,9 @@ # Default "auto". B210 USRP: 400 us, bladeRF: 0 us. ##################################################################### [rf] -dl_freq = 2680000000 -ul_freq = 2560000000 -tx_gain = 60 +dl_freq = 2685000000 +ul_freq = 2565000000 +tx_gain = 70 rx_gain = 50 #nof_rx_ant = 1 From 840a9573e8d0d783df46062d96ad9f3d7f8dd819 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Fri, 2 Jun 2017 13:34:55 +0200 Subject: [PATCH 3/4] set unaligned mode in avx kernel --- lib/src/phy/utils/vector_simd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/phy/utils/vector_simd.c b/lib/src/phy/utils/vector_simd.c index d6b60c2b1..92b0e4c2b 100644 --- a/lib/src/phy/utils/vector_simd.c +++ b/lib/src/phy/utils/vector_simd.c @@ -305,12 +305,12 @@ void srslte_vec_prod_sss_avx(short *x, short *y, short *z, uint32_t len) __m256i xVal, yVal, zVal; for(;number < points; number++){ - xVal = _mm256_load_si256(xPtr); + xVal = _mm256_loadu_si256(xPtr); yVal = _mm256_loadu_si256(yPtr); zVal = _mm256_mullo_epi16(xVal, yVal); - _mm256_store_si256(zPtr, zVal); + _mm256_storeu_si256(zPtr, zVal); xPtr ++; yPtr ++; From bed2aec2a40ddf7701b51e8f28062c45664794ff Mon Sep 17 00:00:00 2001 From: Paul Sutton Date: Fri, 2 Jun 2017 14:37:46 +0100 Subject: [PATCH 4/4] Updating compiler flags --- CMakeLists.txt | 86 ++++++++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 42 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index de6363bd7..c13c7c852 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -222,42 +222,54 @@ macro(ADD_CXX_COMPILER_FLAG_IF_AVAILABLE flag have) endif(${have}) endmacro(ADD_CXX_COMPILER_FLAG_IF_AVAILABLE) -if(CMAKE_COMPILER_IS_GNUCXX) - #Any additional flags for CXX -endif(CMAKE_COMPILER_IS_GNUCXX) - - -if(CMAKE_COMPILER_IS_GNUCC) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-comment -Wno-write-strings -Wno-format-extra-args -Winline -Wno-unused-result -Wno-format -std=c99 -D_GNU_SOURCE -g") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-comment -Wno-reorder -Wno-unused-but-set-variable -Wno-unused-variable") +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 -std=c++03") if(${CMAKE_BUILD_TYPE} STREQUAL "Debug") - find_package(SSE) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -DDEBUG_MODE") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -std=c++03") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -DDEBUG_MODE") + else(${CMAKE_BUILD_TYPE} STREQUAL "Debug") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3") + endif(${CMAKE_BUILD_TYPE} STREQUAL "Debug") + + 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") + else (HAVE_AVX2) if(HAVE_AVX) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -mfpmath=sse -mavx -DLV_HAVE_AVX -DLV_HAVE_SSE") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpmath=sse -mavx -DLV_HAVE_AVX -DLV_HAVE_SSE") elseif(HAVE_SSE) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -mfpmath=sse -msse4.1 -DLV_HAVE_SSE") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -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") + + +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 -Wno-format-extra-args -Winline -Wno-unused-result -Wno-format -std=c99 -D_GNU_SOURCE") + + if(${CMAKE_BUILD_TYPE} STREQUAL "Debug") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -DDEBUG_MODE") else(${CMAKE_BUILD_TYPE} STREQUAL "Debug") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -std=c++03") - find_package(SSE) - if (HAVE_AVX2) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -mfpmath=sse -mavx2 -Ofast -funroll-loops -DLV_HAVE_AVX -DLV_HAVE_SSE") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mfpmath=sse -mavx2 -DLV_HAVE_AVX -DLV_HAVE_SSE") - else (HAVE_AVX2) - if(HAVE_AVX) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -mfpmath=sse -mavx -Ofast -funroll-loops -DLV_HAVE_AVX -DLV_HAVE_SSE") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mfpmath=sse -mavx -DLV_HAVE_AVX -DLV_HAVE_SSE") - elseif(HAVE_SSE) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -mfpmath=sse -msse4.1 -Ofast -funroll-loops -DLV_HAVE_SSE") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mfpmath=sse -msse4.1 -DLV_HAVE_SSE") - endif(HAVE_AVX) - endif (HAVE_AVX2) - endif(${CMAKE_BUILD_TYPE} STREQUAL "Debug") + + 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") + else (HAVE_AVX2) + if(HAVE_AVX) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -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") + endif(HAVE_AVX) + endif (HAVE_AVX2) + + if(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug") + if(HAVE_SSE) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Ofast -funroll-loops") + 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") @@ -268,26 +280,16 @@ if(CMAKE_COMPILER_IS_GNUCC) 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 - -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) +endif(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang") 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") +message(STATUS "CMAKE_C_FLAGS is ${CMAKE_C_FLAGS}") +message(STATUS "CMAKE_CXX_FLAGS is ${CMAKE_CXX_FLAGS}") + ######################################################################## # Create uninstall targets ########################################################################