Clean up some code and minor change

This commit is contained in:
Xavier Arteaga 2021-07-23 15:34:30 +02:00 committed by Xavier Arteaga
parent 085e247ece
commit c9183326ce
2 changed files with 7 additions and 17 deletions

View File

@ -574,11 +574,6 @@ void phy_common::worker_end(const worker_context_t& w_ctx, const bool& tx_enable
// Actual baseband transmission
radio_h->tx(tx_buffer, tx_time);
// Reset tx buffer
tx_enabled = false;
for (uint32_t ch = 0; ch < SRSRAN_MAX_CHANNELS; ch++) {
tx_buffer.set(ch, nullptr);
}
} else {
if (radio_h->is_continuous_tx()) {
if (is_pending_tx_end) {
@ -600,9 +595,15 @@ void phy_common::worker_end(const worker_context_t& w_ctx, const bool& tx_enable
}
}
// Notify that last SF worker finished
// Notify that last SF worker finished. Releases all the threads waiting.
last_worker();
// Reset tx buffer to prevent next SF uses previous data
tx_enabled = false;
for (uint32_t ch = 0; ch < SRSRAN_MAX_CHANNELS; ch++) {
tx_buffer.set(ch, nullptr);
}
// Allow next TTI to transmit
semaphore.release();
}

View File

@ -522,17 +522,6 @@ void sync::run_camping_in_sync_state(lte::sf_worker* lte_worker,
// Compute TX time: Any transmission happens in TTI+4 thus advance 4 ms the reception time
last_rx_time.add(FDD_HARQ_DELAY_DL_MS * 1e-3);
// Set LTE worker context
if (lte_worker != nullptr) {
srsran::phy_common_interface::worker_context_t context;
context.sf_idx = tti;
context.worker_ptr = lte_worker;
context.last = true;
context.tx_time.copy(last_rx_time);
lte_worker->set_context(context);
}
// Advance/reset prach subframe pointer
if (prach_ptr) {
prach_sf_cnt++;