From 9487d27ef9fbf913685232323393449de6a0ef8b Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Thu, 22 Oct 2020 09:53:59 +0200 Subject: [PATCH] Renamed NR constants and comments --- .../srslte/phy/ch_estimation/dmrs_pdsch.h | 2 +- lib/include/srslte/phy/common/phy_common_nr.h | 6 +++--- lib/include/srslte/phy/phch/pdcch_nr.h | 12 ++++++------ lib/include/srslte/phy/ue/ue_dl_nr_data.h | 2 +- lib/src/phy/ch_estimation/test/dmrs_pdcch_test.c | 12 ++++++------ lib/src/phy/phch/pdcch_nr.c | 16 ++++++++-------- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/lib/include/srslte/phy/ch_estimation/dmrs_pdsch.h b/lib/include/srslte/phy/ch_estimation/dmrs_pdsch.h index 747a37b1d..7316ba26d 100644 --- a/lib/include/srslte/phy/ch_estimation/dmrs_pdsch.h +++ b/lib/include/srslte/phy/ch_estimation/dmrs_pdsch.h @@ -135,7 +135,7 @@ SRSLTE_API int srslte_dmrs_pdsch_put_sf(srslte_dmrs_pdsch_t* q, /** * @brief Estimates the channel for PDSCH from the DMRS * - * @attention Current implementation is thought for type1 PDSCH DMRS (1 pilot every 2 RE) + * @attention Current implementation supports only type1 PDSCH DMRS (1 pilot every 2 RE) * * @param q DMRS-PDSCH object * @param slot_cfg Slot configuration diff --git a/lib/include/srslte/phy/common/phy_common_nr.h b/lib/include/srslte/phy/common/phy_common_nr.h index ec7742914..74ba1c40f 100644 --- a/lib/include/srslte/phy/common/phy_common_nr.h +++ b/lib/include/srslte/phy/common/phy_common_nr.h @@ -78,12 +78,12 @@ extern "C" { /** * @brief defines the maximum number of Aggregation levels: 1, 2, 4, 8 and 16 */ -#define SRSLTE_SEARCH_SPACE_NOF_AGGREGATION_LEVELS 5 +#define SRSLTE_SEARCH_SPACE_NOF_AGGREGATION_LEVELS_NR 5 /** * @brief defines the maximum number of candidates for a given Aggregation level */ -#define SRSLTE_SEARCH_SPACE_MAX_NOF_CANDIDATES 8 +#define SRSLTE_SEARCH_SPACE_MAX_NOF_CANDIDATES_NR 8 /** * @brief Maximum number of PDSCH time domain resource allocations. This is defined by TS 38.331 v15.10.0 @@ -188,7 +188,7 @@ typedef struct SRSLTE_API { uint32_t id; uint32_t duration; // in slots srslte_search_space_type_t type; - uint32_t nof_candidates[SRSLTE_SEARCH_SPACE_NOF_AGGREGATION_LEVELS]; + uint32_t nof_candidates[SRSLTE_SEARCH_SPACE_NOF_AGGREGATION_LEVELS_NR]; } srslte_search_space_t; /** diff --git a/lib/include/srslte/phy/phch/pdcch_nr.h b/lib/include/srslte/phy/phch/pdcch_nr.h index 9d4751c80..6e3a5af2a 100644 --- a/lib/include/srslte/phy/phch/pdcch_nr.h +++ b/lib/include/srslte/phy/phch/pdcch_nr.h @@ -47,11 +47,11 @@ * @param slot_idx Slot index within the radio frame * @param locations is the destination array with the possible candidate locations n_cce */ -int srslte_pdcch_nr_locations_ncce(const srslte_coreset_t* coreset, - const srslte_search_space_t* search_space, - uint16_t rnti, - uint32_t aggregation_level, - uint32_t slot_idx, - uint32_t locations[SRSLTE_SEARCH_SPACE_MAX_NOF_CANDIDATES]); +int srslte_pdcch_nr_locations_coreset(const srslte_coreset_t* coreset, + const srslte_search_space_t* search_space, + uint16_t rnti, + uint32_t aggregation_level, + uint32_t slot_idx, + uint32_t locations[SRSLTE_SEARCH_SPACE_MAX_NOF_CANDIDATES_NR]); #endif // SRSLTE_PDCCH_NR_H diff --git a/lib/include/srslte/phy/ue/ue_dl_nr_data.h b/lib/include/srslte/phy/ue/ue_dl_nr_data.h index be82e89ae..63104b6cf 100644 --- a/lib/include/srslte/phy/ue/ue_dl_nr_data.h +++ b/lib/include/srslte/phy/ue/ue_dl_nr_data.h @@ -22,7 +22,7 @@ /****************************************************************************** * @file ue_dl_nr.h * - * Description: UE downlink object for NR data. + * Description: NR UE downlink physical layer procedures for data * * This module is a frontend to all the downlink data channel processing modules. * diff --git a/lib/src/phy/ch_estimation/test/dmrs_pdcch_test.c b/lib/src/phy/ch_estimation/test/dmrs_pdcch_test.c index 866abb981..0fc0ac9c3 100644 --- a/lib/src/phy/ch_estimation/test/dmrs_pdcch_test.c +++ b/lib/src/phy/ch_estimation/test/dmrs_pdcch_test.c @@ -68,9 +68,9 @@ static void parse_args(int argc, char** argv) static int run_test(srslte_dmrs_pdcch_estimator_t* estimator, srslte_pdcch_cfg_nr_t* cfg, cf_t* sf_symbols, cf_t* h) { for (uint32_t slot_idx = 0; slot_idx < SRSLTE_NSLOTS_PER_FRAME_NR(cfg->carrier.numerology); slot_idx++) { - uint32_t locations[SRSLTE_SEARCH_SPACE_MAX_NOF_CANDIDATES] = {}; + uint32_t locations[SRSLTE_SEARCH_SPACE_MAX_NOF_CANDIDATES_NR] = {}; - int nof_locations = srslte_pdcch_nr_locations_ncce( + int nof_locations = srslte_pdcch_nr_locations_coreset( &cfg->coreset, &cfg->search_space, cfg->rnti, cfg->aggregation_level, slot_idx, locations); TESTASSERT(nof_locations == cfg->search_space.nof_candidates[cfg->aggregation_level]); @@ -145,14 +145,14 @@ int main(int argc, char** argv) cfg.search_space.type <= srslte_search_space_type_ue; cfg.search_space.type++) { - for (uint32_t i = 0; i < SRSLTE_SEARCH_SPACE_NOF_AGGREGATION_LEVELS; i++) { - uint32_t L = 1 << i; + for (uint32_t i = 0; i < SRSLTE_SEARCH_SPACE_NOF_AGGREGATION_LEVELS_NR; i++) { + uint32_t L = 1U << i; uint32_t nof_reg = cfg.coreset.duration * nof_freq_resources * 6; uint32_t nof_cce = nof_reg / 6; - cfg.search_space.nof_candidates[i] = SRSLTE_MIN(nof_cce / L, SRSLTE_SEARCH_SPACE_MAX_NOF_CANDIDATES); + cfg.search_space.nof_candidates[i] = SRSLTE_MIN(nof_cce / L, SRSLTE_SEARCH_SPACE_MAX_NOF_CANDIDATES_NR); } - for (cfg.aggregation_level = 0; cfg.aggregation_level < SRSLTE_SEARCH_SPACE_NOF_AGGREGATION_LEVELS; + for (cfg.aggregation_level = 0; cfg.aggregation_level < SRSLTE_SEARCH_SPACE_NOF_AGGREGATION_LEVELS_NR; cfg.aggregation_level++) { srslte_dmrs_pdcch_estimator_init(&estimator, &cfg.carrier, &cfg.coreset); diff --git a/lib/src/phy/phch/pdcch_nr.c b/lib/src/phy/phch/pdcch_nr.c index 17b399bbc..df62bc5d8 100644 --- a/lib/src/phy/phch/pdcch_nr.c +++ b/lib/src/phy/phch/pdcch_nr.c @@ -50,7 +50,7 @@ static int srslte_pdcch_nr_get_ncce(const srslte_coreset_t* coreset, uint32_t slot_idx, uint32_t candidate) { - if (aggregation_level >= SRSLTE_SEARCH_SPACE_NOF_AGGREGATION_LEVELS) { + if (aggregation_level >= SRSLTE_SEARCH_SPACE_NOF_AGGREGATION_LEVELS_NR) { ERROR("Invalid aggregation level %d;\n", aggregation_level); return SRSLTE_ERROR; } @@ -83,12 +83,12 @@ static int srslte_pdcch_nr_get_ncce(const srslte_coreset_t* coreset, return (int)(L * ((Y_p_n + (m * N_cce) / (L * M) + n_ci) % (N_cce / L))); } -int srslte_pdcch_nr_locations_ncce(const srslte_coreset_t* coreset, - const srslte_search_space_t* search_space, - uint16_t rnti, - uint32_t aggregation_level, - uint32_t slot_idx, - uint32_t locations[SRSLTE_SEARCH_SPACE_MAX_NOF_CANDIDATES]) +int srslte_pdcch_nr_locations_coreset(const srslte_coreset_t* coreset, + const srslte_search_space_t* search_space, + uint16_t rnti, + uint32_t aggregation_level, + uint32_t slot_idx, + uint32_t locations[SRSLTE_SEARCH_SPACE_MAX_NOF_CANDIDATES_NR]) { if (coreset == NULL || search_space == NULL) { return SRSLTE_ERROR_INVALID_INPUTS; @@ -96,7 +96,7 @@ int srslte_pdcch_nr_locations_ncce(const srslte_coreset_t* coreset, uint32_t nof_candidates = search_space->nof_candidates[aggregation_level]; - nof_candidates = SRSLTE_MIN(nof_candidates, SRSLTE_SEARCH_SPACE_MAX_NOF_CANDIDATES); + nof_candidates = SRSLTE_MIN(nof_candidates, SRSLTE_SEARCH_SPACE_MAX_NOF_CANDIDATES_NR); for (uint32_t candidate = 0; candidate < nof_candidates; candidate++) { int ret = srslte_pdcch_nr_get_ncce(coreset, search_space, rnti, aggregation_level, slot_idx, candidate);