From 0812a90d21f9e450923f6dca2ea1eef8a387aad3 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Wed, 19 Jan 2022 13:13:54 +0100 Subject: [PATCH] Removed unused attribute and fix end-of-burst in NR UE SA PHY --- srsue/hdr/phy/nr/sf_worker.h | 1 - srsue/hdr/phy/nr/sync_sa.h | 2 +- srsue/src/phy/nr/sf_worker.cc | 1 - srsue/src/phy/sync_sa.cc | 10 +++------- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/srsue/hdr/phy/nr/sf_worker.h b/srsue/hdr/phy/nr/sf_worker.h index b26e4fede..d33fdb7c7 100644 --- a/srsue/hdr/phy/nr/sf_worker.h +++ b/srsue/hdr/phy/nr/sf_worker.h @@ -66,7 +66,6 @@ private: state& phy_state; srslog::basic_logger& logger; srsran::rf_timestamp_t tx_time = {}; - uint32_t tti_rx = 0; cf_t* prach_ptr = nullptr; float prach_power = 0; srsran::phy_common_interface::worker_context_t context = {}; diff --git a/srsue/hdr/phy/nr/sync_sa.h b/srsue/hdr/phy/nr/sync_sa.h index a6303791b..7a27b43bd 100644 --- a/srsue/hdr/phy/nr/sync_sa.h +++ b/srsue/hdr/phy/nr/sync_sa.h @@ -97,7 +97,7 @@ private: uint32_t tti = 0; srsran::tti_semaphore tti_semaphore; srsran::rf_timestamp_t last_rx_time; - bool is_pending_tx_end = false; + std::atomic is_pending_tx_end = {false}; uint32_t cell_search_nof_trials = 0; const static uint32_t cell_search_max_trials = 100; uint32_t sfn_sync_nof_trials = 0; diff --git a/srsue/src/phy/nr/sf_worker.cc b/srsue/src/phy/nr/sf_worker.cc index d1887e81c..9855dde0e 100644 --- a/srsue/src/phy/nr/sf_worker.cc +++ b/srsue/src/phy/nr/sf_worker.cc @@ -65,7 +65,6 @@ uint32_t sf_worker::get_buffer_len() void sf_worker::set_context(const srsran::phy_common_interface::worker_context_t& w_ctx) { - tti_rx = w_ctx.sf_idx; logger.set_context(w_ctx.sf_idx); for (auto& w : cc_workers) { w->set_tti(w_ctx.sf_idx); diff --git a/srsue/src/phy/sync_sa.cc b/srsue/src/phy/sync_sa.cc index ce0677719..ae658db65 100644 --- a/srsue/src/phy/sync_sa.cc +++ b/srsue/src/phy/sync_sa.cc @@ -131,9 +131,6 @@ cell_search::ret_t sync_sa::cell_search_run(const cell_search::cfg_t& cfg) return cs_ret; } - // Zero receive buffer - srsran_vec_zero(rx_buffer, slot_sz); - logger.info("Cell Search: Running Cell search state"); cell_search_nof_trials = 0; phy_state.run_cell_search(); @@ -280,6 +277,7 @@ void sync_sa::run_state_cell_camping() rf_buffer.set(0, nr_worker->get_buffer(0, 0)); if (not slot_synchronizer.run_camping(rf_buffer, last_rx_time)) { logger.error("SYNC: detected out-of-sync... skipping slot ..."); + is_pending_tx_end = true; nr_worker->release(); return; } @@ -345,11 +343,9 @@ void sync_sa::worker_end(const srsran::phy_common_interface::worker_context_t& w is_pending_tx_end = false; } else { if (!radio->get_is_start_of_burst()) { - // TODO - /* - zeros_multi.set_nof_samples(buffer.get_nof_samples()); + srsran::rf_buffer_t zeros_multi; + zeros_multi.set_nof_samples(tx_buffer.get_nof_samples()); radio->tx(zeros_multi, tx_time); - */ } } } else {