From 80092fd888375b63bc118243602fbfefe3f18852 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Tue, 6 Jun 2017 23:30:55 +0200 Subject: [PATCH 01/13] added pdu tstamp --- srsue/hdr/mac/demux.h | 2 +- srsue/src/mac/demux.cc | 4 ++-- srsue/src/mac/dl_harq.cc | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/srsue/hdr/mac/demux.h b/srsue/hdr/mac/demux.h index f537d7377..773181220 100644 --- a/srsue/hdr/mac/demux.h +++ b/srsue/hdr/mac/demux.h @@ -48,7 +48,7 @@ public: uint8_t* request_buffer(uint32_t pid, uint32_t len); void deallocate(uint8_t* payload_buffer_ptr); - void push_pdu(uint32_t pid, uint8_t *buff, uint32_t nof_bytes); + void push_pdu(uint32_t pid, uint8_t *buff, uint32_t nof_bytes, uint32_t tstamp); void push_pdu_temp_crnti(uint8_t *buff, uint32_t nof_bytes); void set_uecrid_callback(bool (*callback)(void*, uint64_t), void *arg); diff --git a/srsue/src/mac/demux.cc b/srsue/src/mac/demux.cc index e0f743217..c7c73a14b 100644 --- a/srsue/src/mac/demux.cc +++ b/srsue/src/mac/demux.cc @@ -117,10 +117,10 @@ void demux::push_pdu_temp_crnti(uint8_t *buff, uint32_t nof_bytes) * This function enqueues the packet and returns quicly because ACK * deadline is important here. */ -void demux::push_pdu(uint32_t pid, uint8_t *buff, uint32_t nof_bytes) +void demux::push_pdu(uint32_t pid, uint8_t *buff, uint32_t nof_bytes, uint32_t tstamp) { if (pid < NOF_HARQ_PID) { - return pdus.push(buff, nof_bytes); + return pdus.push(buff, nof_bytes, tstamp); } else if (pid == NOF_HARQ_PID) { /* Demultiplexing of MAC PDU associated with SI-RNTI. The PDU passes through * the MAC in transparent mode. diff --git a/srsue/src/mac/dl_harq.cc b/srsue/src/mac/dl_harq.cc index ffe1fb8eb..685224786 100644 --- a/srsue/src/mac/dl_harq.cc +++ b/srsue/src/mac/dl_harq.cc @@ -300,7 +300,7 @@ void dl_harq_entity::dl_harq_process::tb_decoded(bool ack_) harq_entity->pcap->write_dl_sirnti(payload_buffer_ptr, cur_grant.n_bytes, ack, cur_grant.tti); } Debug("Delivering PDU=%d bytes to Dissassemble and Demux unit (BCCH)\n", cur_grant.n_bytes); - harq_entity->demux_unit->push_pdu(pid, payload_buffer_ptr, cur_grant.n_bytes); + harq_entity->demux_unit->push_pdu(pid, payload_buffer_ptr, cur_grant.n_bytes, cur_grant.tti); } else { if (harq_entity->pcap) { harq_entity->pcap->write_dl_crnti(payload_buffer_ptr, cur_grant.n_bytes, cur_grant.rnti, ack, cur_grant.tti); @@ -311,10 +311,10 @@ void dl_harq_entity::dl_harq_process::tb_decoded(bool ack_) harq_entity->demux_unit->push_pdu_temp_crnti(payload_buffer_ptr, cur_grant.n_bytes); } else { Debug("Delivering PDU=%d bytes to Dissassemble and Demux unit\n", cur_grant.n_bytes); - harq_entity->demux_unit->push_pdu(pid, payload_buffer_ptr, cur_grant.n_bytes); - - // Compute average number of retransmissions per packet - harq_entity->average_retx = SRSLTE_VEC_CMA((float) n_retx, harq_entity->average_retx, harq_entity->nof_pkts++); + harq_entity->demux_unit->push_pdu(pid, payload_buffer_ptr, cur_grant.n_bytes, cur_grant.tti); + + // Compute average number of retransmissions per packet + harq_entity->average_retx = SRSLTE_VEC_CMA((float) n_retx, harq_entity->average_retx, harq_entity->nof_pkts++); } } } From b7ad261abe6d35abbffada748be8f21c72d8987f Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Wed, 7 Jun 2017 10:54:42 +0200 Subject: [PATCH 02/13] removed unused libraries in ue binary --- srsue/src/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/srsue/src/CMakeLists.txt b/srsue/src/CMakeLists.txt index 8f9d15d56..ef31e90fe 100644 --- a/srsue/src/CMakeLists.txt +++ b/srsue/src/CMakeLists.txt @@ -34,8 +34,6 @@ target_link_libraries(srsue srsue_mac srslte_phy srslte_upper srslte_radio - ${SRSLTE_LIBRARIES} - ${LIBLTE_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) From fc6a38cad1814b3dce8dc866f70d7fd8c32af887 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Wed, 7 Jun 2017 10:57:20 +0200 Subject: [PATCH 03/13] removed more unused libraries in ue binary --- srsenb/src/phy/CMakeLists.txt | 2 +- srsenb/src/upper/CMakeLists.txt | 2 +- srsue/test/mac/CMakeLists.txt | 2 +- srsue/test/phy/CMakeLists.txt | 4 ++-- srsue/test/upper/CMakeLists.txt | 2 -- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/srsenb/src/phy/CMakeLists.txt b/srsenb/src/phy/CMakeLists.txt index c0582cd51..beae7143a 100644 --- a/srsenb/src/phy/CMakeLists.txt +++ b/srsenb/src/phy/CMakeLists.txt @@ -1,6 +1,6 @@ file(GLOB SOURCES "*.cc") add_library(srsenb_phy SHARED ${SOURCES}) -target_link_libraries(srsenb_phy ${SRSLTE_LIBRARIES} ) +target_link_libraries(srsenb_phy) if(ENABLE_GUI AND SRSGUI_FOUND) target_link_libraries(srsenb_phy ${SRSGUI_LIBRARIES}) diff --git a/srsenb/src/upper/CMakeLists.txt b/srsenb/src/upper/CMakeLists.txt index 5f9007c50..aed9b0283 100644 --- a/srsenb/src/upper/CMakeLists.txt +++ b/srsenb/src/upper/CMakeLists.txt @@ -1,3 +1,3 @@ file(GLOB SOURCES "*.cc") add_library(srsenb_upper SHARED ${SOURCES}) -target_link_libraries(srsenb_upper ${SRSLTE_LIBRARIES}) +target_link_libraries(srsenb_upper) diff --git a/srsue/test/mac/CMakeLists.txt b/srsue/test/mac/CMakeLists.txt index 0f41eeca9..03407ce07 100644 --- a/srsue/test/mac/CMakeLists.txt +++ b/srsue/test/mac/CMakeLists.txt @@ -19,5 +19,5 @@ # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-switch") add_executable(mac_test mac_test.cc) -target_link_libraries(mac_test srsue_mac srsue_phy srslte_common srslte_phy srslte_radio srslte_asn1 ${SRSLTE_LIBRARIES} ${LIBLTE_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) +target_link_libraries(mac_test srsue_mac srsue_phy srslte_common srslte_phy srslte_radio srslte_asn1 ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) diff --git a/srsue/test/phy/CMakeLists.txt b/srsue/test/phy/CMakeLists.txt index 6432b2ca3..bb463efb0 100644 --- a/srsue/test/phy/CMakeLists.txt +++ b/srsue/test/phy/CMakeLists.txt @@ -19,7 +19,7 @@ # add_executable(ue_itf_test_sib1 ue_itf_test_sib1.cc) -target_link_libraries(ue_itf_test_sib1 srsue_phy srslte_common srslte_phy srslte_radio ${SRSLTE_LIBRARIES} ${LIBLTE_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) +target_link_libraries(ue_itf_test_sib1 srsue_phy srslte_common srslte_phy srslte_radio ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) add_executable(ue_itf_test_prach ue_itf_test_prach.cc) -target_link_libraries(ue_itf_test_prach srsue_phy srslte_common srslte_phy srslte_radio ${SRSLTE_LIBRARIES} ${LIBLTE_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) +target_link_libraries(ue_itf_test_prach srsue_phy srslte_common srslte_phy srslte_radio ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) diff --git a/srsue/test/upper/CMakeLists.txt b/srsue/test/upper/CMakeLists.txt index ab10ad4cc..324ae4913 100644 --- a/srsue/test/upper/CMakeLists.txt +++ b/srsue/test/upper/CMakeLists.txt @@ -26,8 +26,6 @@ target_link_libraries(ip_test srsue_mac srslte_phy srslte_radio srslte_upper - ${SRSLTE_LIBRARIES} - ${LIBLTE_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) From 460adc4a1840e5bd2e5ebd0029f1ee76540e6634 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Wed, 7 Jun 2017 11:16:44 +0200 Subject: [PATCH 04/13] fixed segfault in usrp_capture_sync --- lib/examples/usrp_capture_sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/examples/usrp_capture_sync.c b/lib/examples/usrp_capture_sync.c index 6938ee878..6d2ec18dc 100644 --- a/lib/examples/usrp_capture_sync.c +++ b/lib/examples/usrp_capture_sync.c @@ -100,7 +100,7 @@ void parse_args(int argc, char **argv) { int srslte_rf_recv_wrapper(void *h, cf_t *data[SRSLTE_MAX_PORTS], uint32_t nsamples, srslte_timestamp_t *t) { DEBUG(" ---- Receive %d samples ---- \n", nsamples); - return srslte_rf_recv(h, data[2], nsamples, 1); + return srslte_rf_recv(h, data[0], nsamples, 1); } int main(int argc, char **argv) { From 0f4bdf612ce6f2962bd56be0439dce7abe9fdd4d Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Wed, 7 Jun 2017 12:03:54 +0200 Subject: [PATCH 05/13] moved FFT reqs to srslte/phy --- CMakeLists.txt | 12 ------------ lib/src/phy/CMakeLists.txt | 13 +++++++++++++ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ec1476fb..f440416c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,18 +86,6 @@ else(POLARSSL_FOUND) endif (MBEDTLS_FOUND) endif(POLARSSL_FOUND) -find_package(MKL) -if(MKL_FOUND) - include_directories(${MKL_INCLUDE_DIRS}) - link_directories(${MKL_LIBRARY_DIRS}) -else(MKL_FOUND) - find_package(FFTW3F REQUIRED) - if(FFTW3F_FOUND) - include_directories(${FFTW3F_INCLUDE_DIRS}) - link_directories(${FFTW3F_LIBRARY_DIRS}) - endif(FFTW3F_FOUND) -endif(MKL_FOUND) - find_package(UHD) if(UHD_FOUND) include_directories(${UHD_INCLUDE_DIRS}) diff --git a/lib/src/phy/CMakeLists.txt b/lib/src/phy/CMakeLists.txt index 8310fcd2e..47f72d2dc 100644 --- a/lib/src/phy/CMakeLists.txt +++ b/lib/src/phy/CMakeLists.txt @@ -63,6 +63,19 @@ if(NOT DisableMEX) add_library(srslte_phy_static STATIC ${srslte_srcs}) endif(NOT DisableMEX) +find_package(MKL) +if(MKL_FOUND) + include_directories(${MKL_INCLUDE_DIRS}) + link_directories(${MKL_LIBRARY_DIRS}) +else(MKL_FOUND) + find_package(FFTW3F REQUIRED) + if(FFTW3F_FOUND) + include_directories(${FFTW3F_INCLUDE_DIRS}) + link_directories(${FFTW3F_LIBRARY_DIRS}) + endif(FFTW3F_FOUND) +endif(MKL_FOUND) + + if(MKL_FOUND) if(STATIC_MKL) target_link_libraries(srslte_phy ${MKL_STATIC_LIBRARIES}) From 3e5a3d0d82668875f4ede50f9edee3ed8626a20b Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 7 Jun 2017 12:39:00 +0200 Subject: [PATCH 06/13] add Cmake option to turn on default LTE sampling rates --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f440416c8..2c0b7f5bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,6 +63,7 @@ option(ENABLE_GUI "Enable GUI" ON) option(ENABLE_SRSUE "Build srsUE application" ON) option(ENABLE_SRSENB "Build srsENB application" ON) option(ENABLE_BLADERF "Enable BladeRF" ON) +option(USE_LTE_RATES "Use standard LTE sampling rates" OFF) set(GCC_ARCH native CACHE STRING "GCC compile for specific architecture.") @@ -220,6 +221,11 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3") endif(${CMAKE_BUILD_TYPE} STREQUAL "Debug") + if (USE_LTE_RATES) + message(STATUS "Using standard LTE sampling rates") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFORCE_STANDARD_RATE") + endif (USE_LTE_RATES) + 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") From 0940fd35d9e4eaeb98270541a2249a5a42cce7be Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Wed, 7 Jun 2017 12:57:48 +0200 Subject: [PATCH 07/13] added include dirs for mbedtls --- lib/src/common/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/src/common/CMakeLists.txt b/lib/src/common/CMakeLists.txt index e460900a1..6f022b417 100644 --- a/lib/src/common/CMakeLists.txt +++ b/lib/src/common/CMakeLists.txt @@ -21,6 +21,7 @@ file(GLOB CXX_SOURCES "*.cc") file(GLOB C_SOURCES "*.c") add_library(srslte_common SHARED ${C_SOURCES} ${CXX_SOURCES}) +target_include_directories(srslte_common PUBLIC ${SEC_INCLUDE_DIRS}) target_link_libraries(srslte_common ${SEC_LIBRARIES}) install(TARGETS srslte_common DESTINATION ${LIBRARY_DIR}) SRSLTE_SET_PIC(srslte_common) From c55532c286c9ed61670deca17565fdaff9dbefb3 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 7 Jun 2017 14:31:32 +0200 Subject: [PATCH 08/13] fix bug when reading/syncing from file using too large offset --- lib/src/phy/ue/ue_sync.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/src/phy/ue/ue_sync.c b/lib/src/phy/ue/ue_sync.c index 3d13c6176..b5b2be3d0 100644 --- a/lib/src/phy/ue/ue_sync.c +++ b/lib/src/phy/ue/ue_sync.c @@ -78,8 +78,17 @@ int srslte_ue_sync_init_file(srslte_ue_sync_t *q, uint32_t nof_prb, char *file_n } INFO("Offseting input file by %d samples and %.1f kHz\n", offset_time, offset_freq/1000); - - srslte_filesource_read(&q->file_source, dummy_offset_buffer, offset_time); + + if (offset_time) { + cf_t *file_offset_buffer = srslte_vec_malloc(offset_time * sizeof(cf_t)); + if (!file_offset_buffer) { + perror("malloc"); + goto clean_exit; + } + srslte_filesource_read(&q->file_source, file_offset_buffer, offset_time); + free(file_offset_buffer); + } + srslte_ue_sync_reset(q); ret = SRSLTE_SUCCESS; From c0a103473bf63b32abb3f131f469776e72be04ce Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Thu, 8 Jun 2017 10:34:57 +0200 Subject: [PATCH 09/13] Cleaned BSR log --- srsue/src/mac/proc_bsr.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/srsue/src/mac/proc_bsr.cc b/srsue/src/mac/proc_bsr.cc index db2e12c15..7c8b99f27 100644 --- a/srsue/src/mac/proc_bsr.cc +++ b/srsue/src/mac/proc_bsr.cc @@ -336,8 +336,9 @@ bool bsr_proc::generate_padding_bsr(uint32_t nof_padding_bytes, bsr_t *bsr) } generate_bsr(bsr, nof_padding_bytes); ret = true; - Info("BSR: Including BSR type %s, format %s, nof_padding_bytes=%d\n", - bsr_type_tostring(triggered_bsr_type), bsr_format_tostring(bsr->format), nof_padding_bytes); + Info("BSR: Type %s, Format %s, Value=%d,%d,%d,%d\n", + bsr_type_tostring(triggered_bsr_type), bsr_format_tostring(bsr->format), + bsr->buff_size[0], bsr->buff_size[1], bsr->buff_size[2], bsr->buff_size[3]); if (timers_db->get(mac::BSR_TIMER_PERIODIC)->get_timeout() && bsr->format != TRUNC_BSR) { timers_db->get(mac::BSR_TIMER_PERIODIC)->reset(); From f120a5a5b08ced26a04cce36707dd1afc65cef3a Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Thu, 8 Jun 2017 10:56:34 +0200 Subject: [PATCH 10/13] removed unncessary printf --- lib/src/phy/phch/pdcch.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/src/phy/phch/pdcch.c b/lib/src/phy/phch/pdcch.c index 6ff788cec..cfdb19621 100644 --- a/lib/src/phy/phch/pdcch.c +++ b/lib/src/phy/phch/pdcch.c @@ -473,13 +473,6 @@ int srslte_pdcch_extract_llr_multi(srslte_pdcch_t *q, cf_t *sf_symbols[SRSLTE_MA /* descramble */ srslte_scrambling_f_offset(&q->seq[nsubframe], q->llr, 0, e_bits); - float mean = 0; - for (int i=0;illr[i]); - } - mean /= e_bits; - printf("power %f\n",mean); - ret = SRSLTE_SUCCESS; } return ret; From 4a1b67a6711f34695306d575a3d9733b86fd61e6 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Thu, 8 Jun 2017 11:29:08 +0200 Subject: [PATCH 11/13] cleaned BSR logs --- srsue/src/mac/proc_bsr.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/srsue/src/mac/proc_bsr.cc b/srsue/src/mac/proc_bsr.cc index 7c8b99f27..d93b7f0f4 100644 --- a/srsue/src/mac/proc_bsr.cc +++ b/srsue/src/mac/proc_bsr.cc @@ -82,7 +82,7 @@ void bsr_proc::timer_expired(uint32_t timer_id) { if (triggered_bsr_type == NONE) { // Check condition 4 in Sec 5.4.5 triggered_bsr_type = PERIODIC; - Info("BSR: Triggering Periodic BSR\n"); + Debug("BSR: Triggering Periodic BSR\n"); } break; case mac::BSR_TIMER_RETX: @@ -90,7 +90,7 @@ void bsr_proc::timer_expired(uint32_t timer_id) { int periodic = liblte_rrc_periodic_bsr_timer_num[mac_cfg->main.ulsch_cnfg.periodic_bsr_timer]; if (periodic >= 0) { triggered_bsr_type = REGULAR; - Info("BSR: Triggering BSR reTX\n"); + Debug("BSR: Triggering BSR reTX\n"); sr_is_sent = false; } break; @@ -121,7 +121,7 @@ bool bsr_proc::check_highest_channel() { if (nbytes > last_pending_data[pending_data_lcid]) { if (triggered_bsr_type != REGULAR) { - Info("BSR: Triggered REGULAR BSR for Max Priority LCID=%d\n", pending_data_lcid); + Debug("BSR: Triggered REGULAR BSR for Max Priority LCID=%d\n", pending_data_lcid); } triggered_bsr_type = REGULAR; return true; @@ -158,7 +158,7 @@ bool bsr_proc::check_single_channel() { // If there is new data available for this logical channel if (nbytes > last_pending_data[pending_data_lcid]) { triggered_bsr_type = REGULAR; - Info("BSR: Triggered REGULAR BSR for single LCID=%d\n", pending_data_lcid); + Debug("BSR: Triggered REGULAR BSR for single LCID=%d\n", pending_data_lcid); return true; } } @@ -370,7 +370,7 @@ bool bsr_proc::need_to_send_sr(uint32_t tti) { if (srslte_tti_interval(tti,next_tx_tti)>0 && srslte_tti_interval(tti,next_tx_tti) < 10240-4) { reset_sr = false; sr_is_sent = true; - Info("BSR: Need to send sr: sr_is_sent=true, reset_sr=false, tti=%d, next_tx_tti=%d\n", tti, next_tx_tti); + Debug("BSR: Need to send sr: sr_is_sent=true, reset_sr=false, tti=%d, next_tx_tti=%d\n", tti, next_tx_tti); return true; } else { Debug("BSR: Not sending SR because tti=%d, next_tx_tti=%d\n", tti, next_tx_tti); From 2b8b36c371f52b66a520f40c2370eb3cda14edf8 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 7 Jun 2017 15:03:14 +0200 Subject: [PATCH 12/13] fix debug_name handling in buffer_pool - possible bug discovered by coverity --- lib/include/srslte/common/buffer_pool.h | 5 +++-- lib/include/srslte/common/common.h | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/include/srslte/common/buffer_pool.h b/lib/include/srslte/common/buffer_pool.h index 182c287e3..eec35b79a 100644 --- a/lib/include/srslte/common/buffer_pool.h +++ b/lib/include/srslte/common/buffer_pool.h @@ -76,7 +76,7 @@ public: { printf("%d buffers in queue\n", (int) used.size()); for (uint32_t i=0;idebug_name?used[i]->debug_name:"Undefined"); + printf("%s\n", strlen(used[i]->debug_name)?used[i]->debug_name:"Undefined"); } } @@ -97,7 +97,8 @@ public: } #ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED if (debug_name) { - strncpy(b->debug_name, debug_name, 128); + strncpy(b->debug_name, debug_name, SRSLTE_BUFFER_POOL_LOG_NAME_LEN); + b->debug_name[SRSLTE_BUFFER_POOL_LOG_NAME_LEN-1] = 0; } #endif diff --git a/lib/include/srslte/common/common.h b/lib/include/srslte/common/common.h index d1f2f770f..5f13ab214 100644 --- a/lib/include/srslte/common/common.h +++ b/lib/include/srslte/common/common.h @@ -54,6 +54,7 @@ #ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED #define pool_allocate (pool->allocate(__FUNCTION__)) +#define SRSLTE_BUFFER_POOL_LOG_NAME_LEN 128 #else #define pool_allocate (pool->allocate()) #endif @@ -121,7 +122,7 @@ public: uint8_t buffer[SRSLTE_MAX_BUFFER_SIZE_BYTES]; uint8_t *msg; #ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED - char debug_name[128]; + char debug_name[SRSLTE_BUFFER_POOL_LOG_NAME_LEN]; #endif byte_buffer_t():N_bytes(0) @@ -129,6 +130,9 @@ public: timestamp_is_set = false; msg = &buffer[SRSLTE_BUFFER_HEADER_OFFSET]; next = NULL; +#ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED + debug_name[0] = 0; +#endif } byte_buffer_t(const byte_buffer_t& buf) { From ac7f11e5b8cfb37f615a49b7a9be5ee99e48b79f Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 7 Jun 2017 15:50:16 +0200 Subject: [PATCH 13/13] disabling SIMD code in vector lib in debug mode --- lib/src/phy/utils/vector.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/src/phy/utils/vector.c b/lib/src/phy/utils/vector.c index d1961011e..26be1b2b4 100644 --- a/lib/src/phy/utils/vector.c +++ b/lib/src/phy/utils/vector.c @@ -39,6 +39,13 @@ #include "volk/volk.h" #endif +#ifdef DEBUG_MODE +#warning FIXME: Disabling SSE/AVX vector code +#undef LV_HAVE_SSE +#undef LV_HAVE_AVX +#endif + + int srslte_vec_acc_ii(int *x, uint32_t len) { int i; int z=0; @@ -295,21 +302,17 @@ void srslte_vec_lut_fuf(float *x, uint32_t *lut, float *y, uint32_t len) { } void srslte_vec_lut_sss(short *x, unsigned short *lut, short *y, uint32_t len) { -#ifdef DEBUG_MODE -#warning FIXME: Disabling SSE/AVX in srslte_vec_lut_sss -#else -#ifdef LV_HAVE_SSE +#ifndef LV_HAVE_SSE for (int i=0;i