Renamed NR constants and comments

master
Xavier Arteaga 4 years ago committed by Xavier Arteaga
parent e8f168b20c
commit 9487d27ef9

@ -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

@ -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;
/**

@ -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,
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]);
uint32_t locations[SRSLTE_SEARCH_SPACE_MAX_NOF_CANDIDATES_NR]);
#endif // SRSLTE_PDCCH_NR_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.
*

@ -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);

@ -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,
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])
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);

Loading…
Cancel
Save