Commit e42e1d80 authored by francescomani's avatar francescomani

limiting the number of DCI candidates at UE according to available CCEs

parent 464a62dd
......@@ -4554,13 +4554,12 @@ void fill_searchSpaceZero(NR_SearchSpace_t *ss0,
ss0->monitoringSymbolsWithinSlot->buf[0] |= ((symbols>>i)&0x01)<<(7-i);
}
const uint16_t max_agg = (type0_PDCCH_CSS_config->num_symbols*type0_PDCCH_CSS_config->num_rbs)/6;
// max values are set according to TS38.213 Section 10.1 Table 10.1-1
ss0->nrofCandidates->aggregationLevel1 = NR_SearchSpace__nrofCandidates__aggregationLevel1_n0;
ss0->nrofCandidates->aggregationLevel2 = NR_SearchSpace__nrofCandidates__aggregationLevel2_n0;
ss0->nrofCandidates->aggregationLevel4 = (((max_agg>>2) > 4)? 4 : max_agg>>2);
ss0->nrofCandidates->aggregationLevel8 = (((max_agg>>3) > 2)? 2 : max_agg>>3);
ss0->nrofCandidates->aggregationLevel16 = (((max_agg>>4) > 1)? 1 : max_agg>>4);
ss0->nrofCandidates->aggregationLevel4 = 4;
ss0->nrofCandidates->aggregationLevel8 = 2;
ss0->nrofCandidates->aggregationLevel16 = 1;
ss0->searchSpaceType->present = NR_SearchSpace__searchSpaceType_PR_common;
}
......
......@@ -56,7 +56,6 @@ void fill_dci_search_candidates(const NR_SearchSpace_t *ss,
maxL);
if (number_of_candidates > 0) {
LOG_D(NR_MAC,"L %d, number of candidates %d, aggregation %d\n", maxL, number_of_candidates, aggregation);
rel15->number_of_candidates += number_of_candidates;
int N_cce_sym = 0; // nb of rbs of coreset per symbol
for (int f = 0; f < 6; f++) {
for (int t = 0; t < 8; t++) {
......@@ -64,9 +63,12 @@ void fill_dci_search_candidates(const NR_SearchSpace_t *ss,
}
}
int N_cces = N_cce_sym * rel15->coreset.duration;
for (int j = 0; j < number_of_candidates; i++, j++) {
// limit the number of candidates to the ones fitting current configuration
int max_candidates = min(N_cces / aggregation, number_of_candidates);
rel15->number_of_candidates += max_candidates;
for (int j = 0; j < max_candidates; i++, j++) {
int first_cce = aggregation * ((Y + ((j * N_cces) / (aggregation * number_of_candidates)) + 0) % (N_cces / aggregation));
LOG_D(NR_MAC,"Candidate %d of %d first_cce %d (L %d N_cces %d Y %d)\n", j, number_of_candidates, first_cce, aggregation, N_cces, Y);
LOG_D(NR_MAC,"Candidate %d of %d first_cce %d (L %d N_cces %d Y %d)\n", j, max_candidates, first_cce, aggregation, N_cces, Y);
rel15->CCE[i] = first_cce;
rel15->L[i] = aggregation;
}
......
......@@ -1165,8 +1165,8 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info)
continue;
fapi_nr_dci_indication_pdu_t *dci_index = dl_info->dci_ind->dci_list+i;
/* The check below filters out UL_DCIs (format 7) which are being processed as DL_DCIs. */
if (dci_index->dci_format == 7 && mac->ra.ra_state == RA_SUCCEEDED) {
/* The check below filters out UL_DCIs which are being processed as DL_DCIs. */
if (dci_index->dci_format != NR_DL_DCI_FORMAT_1_0 && dci_index->dci_format != NR_DL_DCI_FORMAT_1_1) {
LOG_D(NR_MAC, "We are filtering a UL_DCI to prevent it from being treated like a DL_DCI\n");
continue;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment