From f3c036084210cf53805c7d3d9590d7e834eaa880 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Mon, 15 Mar 2021 10:26:20 +0100 Subject: [PATCH] Applied aesthetical changes --- lib/include/srslte/phy/common/phy_common_nr.h | 5 +++-- lib/include/srslte/phy/phch/ra_nr.h | 2 +- lib/include/srslte/phy/ue/ue_dl_nr.h | 2 +- lib/src/phy/ue/ue_dl_nr.c | 4 ++-- lib/src/radio/radio.cc | 8 +++++--- srsue/src/phy/nr/cc_worker.cc | 2 +- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lib/include/srslte/phy/common/phy_common_nr.h b/lib/include/srslte/phy/common/phy_common_nr.h index 260fe4ae3..c358adbeb 100644 --- a/lib/include/srslte/phy/common/phy_common_nr.h +++ b/lib/include/srslte/phy/common/phy_common_nr.h @@ -86,7 +86,8 @@ extern "C" { #define SRSLTE_PDCCH_MAX_RE ((SRSLTE_NRE - 3U) * (1U << (SRSLTE_SEARCH_SPACE_NOF_AGGREGATION_LEVELS_NR - 1U)) * 6U) /** - * @brief defines the maximum number of candidates for a given Aggregation level + * @brief defines the maximum number of candidates for a given search-space and aggregation level according to TS 38.331 + * SearchSpace sequence */ #define SRSLTE_SEARCH_SPACE_MAX_NOF_CANDIDATES_NR 8 @@ -94,7 +95,7 @@ extern "C" { * @brief defines the maximum number of monitored PDCCH candidates per slot and per serving cell according to TS 38.213 * Table 10.1-2 */ -#define SRSLTE_MAX_NOF_CANDIDATES_NR 44 +#define SRSLTE_MAX_NOF_CANDIDATES_SLOT_NR 44 /** * @brief defines the maximum number of resource elements per PRB diff --git a/lib/include/srslte/phy/phch/ra_nr.h b/lib/include/srslte/phy/phch/ra_nr.h index 1815e33da..ba272f4f1 100644 --- a/lib/include/srslte/phy/phch/ra_nr.h +++ b/lib/include/srslte/phy/phch/ra_nr.h @@ -122,7 +122,7 @@ SRSLTE_API int srslte_ra_ul_dci_to_grant_nr(const srslte_carrier_nr_t* carrie srslte_sch_grant_nr_t* pusch_grant); /** - * @brief Setups the Uplink Control Information configuration for a PUSCH transmission + * @brief Set up the Uplink Control Information configuration for a PUSCH transmission * * @remark Implement procedure described in TS 38.213 9.3 UCI reporting in physical uplink shared channel * diff --git a/lib/include/srslte/phy/ue/ue_dl_nr.h b/lib/include/srslte/phy/ue/ue_dl_nr.h index d7c26b281..f56a66a46 100644 --- a/lib/include/srslte/phy/ue/ue_dl_nr.h +++ b/lib/include/srslte/phy/ue/ue_dl_nr.h @@ -131,7 +131,7 @@ typedef struct SRSLTE_API { srslte_dmrs_pdcch_ce_t* pdcch_ce; /// Store Blind-search information from all possible candidate locations for debug purposes - srslte_ue_dl_nr_pdcch_info_t pdcch_info[SRSLTE_MAX_NOF_CANDIDATES_NR]; + srslte_ue_dl_nr_pdcch_info_t pdcch_info[SRSLTE_MAX_NOF_CANDIDATES_SLOT_NR]; uint32_t pdcch_info_count; /// Temporally stores Found DCI messages from all SS diff --git a/lib/src/phy/ue/ue_dl_nr.c b/lib/src/phy/ue/ue_dl_nr.c index 8807ea880..27d8964ce 100644 --- a/lib/src/phy/ue/ue_dl_nr.c +++ b/lib/src/phy/ue/ue_dl_nr.c @@ -212,11 +212,11 @@ static int ue_dl_nr_find_dci_ncce(srslte_ue_dl_nr_t* q, { // Select debug information srslte_ue_dl_nr_pdcch_info_t* pdcch_info = NULL; - if (q->pdcch_info_count < SRSLTE_MAX_NOF_CANDIDATES_NR) { + if (q->pdcch_info_count < SRSLTE_MAX_NOF_CANDIDATES_SLOT_NR) { pdcch_info = &q->pdcch_info[q->pdcch_info_count]; q->pdcch_info_count++; } else { - ERROR("The UE does not expect more than %d candidates in this serving cell", SRSLTE_MAX_NOF_CANDIDATES_NR); + ERROR("The UE does not expect more than %d candidates in this serving cell", SRSLTE_MAX_NOF_CANDIDATES_SLOT_NR); return SRSLTE_ERROR; } SRSLTE_MEM_ZERO(pdcch_info, srslte_ue_dl_nr_pdcch_info_t, 1); diff --git a/lib/src/radio/radio.cc b/lib/src/radio/radio.cc index bc58d699d..aef1a0ab9 100644 --- a/lib/src/radio/radio.cc +++ b/lib/src/radio/radio.cc @@ -281,11 +281,13 @@ bool radio::rx_now(rf_buffer_interface& buffer, rf_timestamp_interface& rxd_time bool ret = true; rf_buffer_t buffer_rx; - // Extract decimation ratio. As the decimator may take some time to set a new ratio, deactivate the decimation and + // Extract decimation ratio. As the decimation may take some time to set a new ratio, deactivate the decimation and // keep receiving samples to avoid stalling the RX stream - uint32_t ratio = (decimator_busy) ? 0 : SRSLTE_MAX(1, decimators[0].ratio); + uint32_t ratio = 1; // No decimation by default if (decimator_busy) { - rx_mutex.unlock(); + lock.unlock(); + } else if (decimators[0].ratio > 1) { + ratio = decimators[0].ratio; } // Calculate number of samples, considering the decimation ratio diff --git a/srsue/src/phy/nr/cc_worker.cc b/srsue/src/phy/nr/cc_worker.cc index 1c6550a31..b55c40445 100644 --- a/srsue/src/phy/nr/cc_worker.cc +++ b/srsue/src/phy/nr/cc_worker.cc @@ -269,7 +269,7 @@ bool cc_worker::work_dl() bool cc_worker::work_ul() { - // Check if it is a DL slot, if not skip + // Check if it is a UL slot, if not skip if (!srslte_tdd_nr_is_ul(&phy->cfg.tdd, 0, ul_slot_cfg.idx)) { // No NR signal shall be transmitted srslte_vec_cf_zero(tx_buffer[0], ue_ul.ifft.sf_sz);