diff --git a/common/utils/LOG/log.c b/common/utils/LOG/log.c index 389ce6aede..d2ef196e55 100644 --- a/common/utils/LOG/log.c +++ b/common/utils/LOG/log.c @@ -497,7 +497,8 @@ int logInit (void) register_log_component("GNB_APP","log",GNB_APP); register_log_component("NR_RRC","log",NR_RRC); register_log_component("NR_MAC","log",NR_MAC); - register_log_component("NR_DCI", "log", NR_DCI); + register_log_component("NR_MAC_DCI", "log", NR_MAC_DCI); + register_log_component("NR_PHY_DCI", "log", NR_PHY_DCI); register_log_component("NR_PHY","log",NR_PHY); register_log_component("NGAP","",NGAP); register_log_component("ITTI","log",ITTI); diff --git a/common/utils/LOG/log.h b/common/utils/LOG/log.h index 4b43ff45d1..56a15ef09c 100644 --- a/common/utils/LOG/log.h +++ b/common/utils/LOG/log.h @@ -169,8 +169,6 @@ extern "C" { #define SET_LOG_DUMP(B) g_log->dump_mask = (g_log->dump_mask | B) #define CLEAR_LOG_DUMP(B) g_log->dump_mask = (g_log->dump_mask & (~B)) - - typedef enum { MIN_LOG_COMPONENTS = 0, PHY = MIN_LOG_COMPONENTS, @@ -219,7 +217,8 @@ typedef enum { GNB_APP, NR_RRC, NR_MAC, - NR_DCI, + NR_MAC_DCI, + NR_PHY_DCI, NR_PHY, LOADER, ASN1, @@ -252,7 +251,7 @@ typedef struct { log_vprint_func_t vprint; log_print_func_t print; /* SR: make the log buffer component relative */ - char log_buffer[MAX_LOG_TOTAL]; + // char log_buffer[MAX_LOG_TOTAL]; } log_component_t; diff --git a/common/utils/T/T_messages.txt b/common/utils/T/T_messages.txt index 2dd86fb9b4..de221a0d73 100644 --- a/common/utils/T/T_messages.txt +++ b/common/utils/T/T_messages.txt @@ -361,27 +361,48 @@ ID = LEGACY_NR_MAC_TRACE GROUP = ALL:LEGACY_NR_MAC:LEGACY_GROUP_TRACE:LEGACY FORMAT = string,log -ID = LEGACY_NR_DCI_INFO - DESC = NR_MAC legacy logs - info level - GROUP = ALL:LEGACY_NR_MAC:LEGACY_GROUP_INFO:LEGACY +ID = LEGACY_NR_PHY_DCI_INFO + DESC = NR_PHY_DCI legacy logs - info level + GROUP = ALL:LEGACY_NR_PHY_DCI:LEGACY_GROUP_INFO:LEGACY FORMAT = string,log -ID = LEGACY_NR_DCI_ERROR - DESC = NR_MAC legacy logs - error level - GROUP = ALL:LEGACY_NR_MAC:LEGACY_GROUP_ERROR:LEGACY +ID = LEGACY_NR_PHY_DCI_ERROR + DESC = NR_PHY_DCI legacy logs - error level + GROUP = ALL:LEGACY_NR_PHY_DCI:LEGACY_GROUP_ERROR:LEGACY FORMAT = string,log -ID = LEGACY_NR_DCI_WARNING - DESC = NR_MAC legacy logs - warning level - GROUP = ALL:LEGACY_NR_MAC:LEGACY_GROUP_WARNING:LEGACY +ID = LEGACY_NR_PHY_DCI_WARNING + DESC = NR_PHY_DCI legacy logs - warning level + GROUP = ALL:LEGACY_NR_PHY_DCI:LEGACY_GROUP_WARNING:LEGACY FORMAT = string,log -ID = LEGACY_NR_DCI_DEBUG - DESC = NR_MAC legacy logs - debug level - GROUP = ALL:LEGACY_NR_MAC:LEGACY_GROUP_DEBUG:LEGACY +ID = LEGACY_NR_PHY_DCI_DEBUG + DESC = NR_PHY_DCI legacy logs - debug level + GROUP = ALL:LEGACY_NR_PHY_DCI:LEGACY_GROUP_DEBUG:LEGACY FORMAT = string,log -ID = LEGACY_NR_DCI_TRACE - DESC = NR_MAC legacy logs - trace level - GROUP = ALL:LEGACY_NR_MAC:LEGACY_GROUP_TRACE:LEGACY +ID = LEGACY_NR_PHY_DCI_TRACE + DESC = NR_PHY_DCI legacy logs - trace level + GROUP = ALL:LEGACY_NR_PHY_DCI:LEGACY_GROUP_TRACE:LEGACY FORMAT = string,log +ID = LEGACY_NR_MAC_DCI_INFO + DESC = NR_MAC_DCI legacy logs - info level + GROUP = ALL:LEGACY_NR_MAC_DCI:LEGACY_GROUP_INFO:LEGACY + FORMAT = string,log +ID = LEGACY_NR_MAC_DCI_ERROR + DESC = NR_MAC_DCI legacy logs - error level + GROUP = ALL:LEGACY_NR_MAC_DCI:LEGACY_GROUP_ERROR:LEGACY + FORMAT = string,log +ID = LEGACY_NR_MAC_DCI_WARNING + DESC = NR_MAC_DCI legacy logs - warning level + GROUP = ALL:LEGACY_NR_MAC_DCI:LEGACY_GROUP_WARNING:LEGACY + FORMAT = string,log +ID = LEGACY_NR_MAC_DCI_DEBUG + DESC = NR_MAC_DCI legacy logs - debug level + GROUP = ALL:LEGACY_NR_MAC_DCI:LEGACY_GROUP_DEBUG:LEGACY + FORMAT = string,log +ID = LEGACY_NR_MAC_DCI_TRACE + DESC = NR_MAC_DCI legacy logs - trace level + GROUP = ALL:LEGACY_NR_MAC_DCI:LEGACY_GROUP_TRACE:LEGACY + FORMAT = string,log + ID = LEGACY_PHY_INFO DESC = PHY legacy logs - info level GROUP = ALL:LEGACY_PHY:LEGACY_GROUP_INFO:LEGACY diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci.c b/openair1/PHY/NR_TRANSPORT/nr_dci.c index 6f1a112669..678a407f9b 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dci.c @@ -50,7 +50,7 @@ void nr_pdcch_scrambling(uint32_t *in, uint32_t x1 = 0, x2 = 0, s = 0; reset = 1; x2 = (scrambling_RNTI<<16) + Nid; - LOG_D(PHY,"PDCCH Scrambling x2 %x : scrambling_RNTI %x \n", x2, scrambling_RNTI); + LOG_D(NR_PHY_DCI, "PDCCH Scrambling x2 %x : scrambling_RNTI %x \n", x2, scrambling_RNTI); for (int i=0; iStartSymbolIndex; cset_nsymb = pdcch_pdu_rel15->DurationSymbols; dci_idx = 0; - LOG_D(PHY, "pdcch: Coreset rb_offset %d, nb_rb %d BWP Start %d\n",rb_offset,n_rb,pdcch_pdu_rel15->BWPStart); - LOG_D(PHY, "pdcch: Coreset starting subcarrier %d on symbol %d (%d symbols)\n", cset_start_sc, cset_start_symb, cset_nsymb); + LOG_D(NR_PHY_DCI, "pdcch: Coreset rb_offset %d, nb_rb %d BWP Start %d\n", rb_offset, n_rb, pdcch_pdu_rel15->BWPStart); + LOG_D(NR_PHY_DCI, + "pdcch: Coreset starting subcarrier %d on symbol %d (%d symbols)\n", + cset_start_sc, + cset_start_symb, + cset_nsymb); // DMRS length is per OFDM symbol uint32_t dmrs_length = (n_rb+pdcch_pdu_rel15->BWPStart)*6; //2(QPSK)*3(per RB)*6(REG per CCE) uint32_t encoded_length = dci_pdu->AggregationLevel*108; //2(QPSK)*9(per RB)*6(REG per CCE) if (dci_pdu->RNTI != 0xFFFF) - LOG_D(PHY, "DL_DCI : rb_offset %d, nb_rb %d, DMRS length per symbol %d\t DCI encoded length %d (precoder_granularity %d, reg_mapping %d), Scrambling_Id %d, ScramblingRNTI %x, PayloadSizeBits %d\n", - rb_offset, n_rb,dmrs_length, encoded_length,pdcch_pdu_rel15->precoderGranularity,pdcch_pdu_rel15->CceRegMappingType, - dci_pdu->ScramblingId,dci_pdu->ScramblingRNTI,dci_pdu->PayloadSizeBits); + LOG_D(NR_PHY_DCI, + "DL_DCI : rb_offset %d, nb_rb %d, DMRS length per symbol %d\t DCI encoded length %d (precoder_granularity %d, " + "reg_mapping %d), Scrambling_Id %d, ScramblingRNTI %x, PayloadSizeBits %d\n", + rb_offset, + n_rb, + dmrs_length, + encoded_length, + pdcch_pdu_rel15->precoderGranularity, + pdcch_pdu_rel15->CceRegMappingType, + dci_pdu->ScramblingId, + dci_pdu->ScramblingRNTI, + dci_pdu->PayloadSizeBits); dmrs_length += rb_offset*6; // To accommodate more DMRS symbols in case of rb offset /// DMRS QPSK modulation @@ -182,7 +195,7 @@ void nr_generate_dci(PHY_VARS_gNB *gNB, // allocating rbs per symbol for (int reg_count = 0; reg_count < num_regs; reg_count++) { k = cset_start_sc + reg_list[d][reg_count] * NR_NB_SC_PER_RB; - LOG_D(PHY, "REG %d k %d\n", reg_list[d][reg_count], k); + LOG_D(NR_PHY_DCI, "REG %d k %d\n", reg_list[d][reg_count], k); if (k >= frame_parms->ofdm_symbol_size) k -= frame_parms->ofdm_symbol_size; @@ -202,7 +215,7 @@ void nr_generate_dci(PHY_VARS_gNB *gNB, ((int16_t *)txdataF)[((l * frame_parms->ofdm_symbol_size + k) << 1) + 1] = (amp * mod_dmrs[l][(dmrs_idx << 1) + 1]) >> 15; #ifdef DEBUG_PDCCH_DMRS - LOG_I(PHY, + LOG_I(NR_PHY_DCI, "PDCCH DMRS %d: l %d position %d => (%d,%d)\n", dmrs_idx, l, @@ -218,7 +231,7 @@ void nr_generate_dci(PHY_VARS_gNB *gNB, ((int16_t *)txdataF)[(l * frame_parms->ofdm_symbol_size + k) << 1] = (amp * mod_dci[dci_idx << 1]) >> 15; ((int16_t *)txdataF)[((l * frame_parms->ofdm_symbol_size + k) << 1) + 1] = (amp * mod_dci[(dci_idx << 1) + 1]) >> 15; #ifdef DEBUG_DCI - LOG_I(PHY, + LOG_I(NR_PHY_DCI, "PDCCH: l %d position %d => (%d,%d)\n", l, k, @@ -237,7 +250,7 @@ void nr_generate_dci(PHY_VARS_gNB *gNB, } // reg_count } // symbol_idx - LOG_D(PHY, + LOG_D(NR_PHY_DCI, "DCI: payloadSize = %d | payload = %llx\n", dci_pdu->PayloadSizeBits, *(unsigned long long *)dci_pdu->Payload); diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c b/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c index 2558861e78..538b54ac0b 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c @@ -73,21 +73,30 @@ void nr_fill_reg_list(int reg_list[MAX_DCI_CORESET][NR_MAX_PDCCH_AGG_LEVEL * NR_ } if (pdcch_pdu_rel15->dci_pdu[d].RNTI != 0xFFFF) - LOG_D(PHY, "CCE list generation for candidate %d: bundle size %d ilv size %d CceIndex %d\n", d, bsize, R, pdcch_pdu_rel15->dci_pdu[d].CceIndex); + LOG_D(NR_PHY_DCI, + "CCE list generation for candidate %d: bundle size %d ilv size %d CceIndex %d\n", + d, + bsize, + R, + pdcch_pdu_rel15->dci_pdu[d].CceIndex); int list_idx = 0; for (uint8_t cce_idx=0; cce_idxdci_pdu[d].CceIndex + cce_idx; - LOG_D(PHY, "cce_idx %d\n", cce); + LOG_D(NR_PHY_DCI, "cce_idx %d\n", cce); for (uint8_t bundle_idx=0; bundle_idx \t llr[%d]=(%d,%d) \n", c_id, symbol_idx, @@ -224,14 +224,13 @@ static void nr_pdcch_llr(NR_DL_FRAME_PARMS *frame_parms, c16_t *pdcch_llrp = &pdcch_llr[symbol * coreset_nbr_rb * 9]; if (!pdcch_llrp) { - LOG_E(PHY,"pdcch_qpsk_llr: llr is null, symbol %d\n", symbol); + LOG_E(NR_PHY_DCI, "pdcch_qpsk_llr: llr is null, symbol %d\n", symbol); return; } LOG_DDD("llr logs: pdcch qpsk llr for symbol %d (pos %d), llr offset %ld\n",symbol,(symbol*frame_parms->N_RB_DL*12),pdcch_llrp-pdcch_llr); - //for (i = 0; i < (frame_parms->N_RB_DL * ((symbol == 0) ? 16 : 24)); i++) { - for (int i = 0; i < (coreset_nbr_rb * ((symbol == 0) ? 9 : 9)); i++) { + for (int i = 0; i < coreset_nbr_rb * 9; i++) { // We clip the signal c16_t res; res.r = min(rxF->r, 31); @@ -565,10 +564,13 @@ void nr_rx_pdcch(PHY_VARS_NR_UE *ue, memset(llr, 0, sizeof(llr)); - LOG_D(PHY,"pdcch coreset: freq %x, n_rb %d, rb_offset %d\n", - rel15->coreset.frequency_domain_resource[0],n_rb,rb_offset); + LOG_D(NR_PHY_DCI, + "pdcch coreset: freq %x, n_rb %d, rb_offset %d\n", + rel15->coreset.frequency_domain_resource[0], + n_rb, + rb_offset); for (int s=rel15->coreset.StartSymbolIndex; s<(rel15->coreset.StartSymbolIndex+rel15->coreset.duration); s++) { - LOG_D(PHY,"in nr_pdcch_extract_rbs_single(rxdataF -> rxdataF_ext || dl_ch_estimates -> dl_ch_estimates_ext)\n"); + LOG_D(NR_PHY_DCI, "in nr_pdcch_extract_rbs_single(rxdataF -> rxdataF_ext || dl_ch_estimates -> dl_ch_estimates_ext)\n"); nr_pdcch_extract_rbs_single(ue->frame_parms.samples_per_slot_wCP, rxdataF, @@ -583,8 +585,11 @@ void nr_rx_pdcch(PHY_VARS_NR_UE *ue, n_rb, rel15->BWPStart); - LOG_D(PHY,"we enter nr_pdcch_channel_level(avgP=%d) => compute channel level based on ofdm symbol 0, pdcch_vars[eNB_id]->dl_ch_estimates_ext\n",*avgP); - LOG_D(PHY,"in nr_pdcch_channel_level(dl_ch_estimates_ext -> dl_ch_estimates_ext)\n"); + LOG_D(NR_PHY_DCI, + "we enter nr_pdcch_channel_level(avgP=%d) => compute channel level based on ofdm symbol 0, " + "pdcch_vars[eNB_id]->dl_ch_estimates_ext\n", + *avgP); + LOG_D(NR_PHY_DCI, "in nr_pdcch_channel_level(dl_ch_estimates_ext -> dl_ch_estimates_ext)\n"); // compute channel level based on ofdm symbol 0 nr_pdcch_channel_level(rx_size, pdcch_dl_ch_estimates_ext, @@ -600,13 +605,13 @@ void nr_rx_pdcch(PHY_VARS_NR_UE *ue, log2_maxh = (log2_approx(avgs) / 2) + 5; //+frame_parms->nb_antennas_rx; #ifdef UE_DEBUG_TRACE - LOG_D(PHY, "slot %d: pdcch log2_maxh = %d (%d,%d)\n", proc->nr_slot_rx, log2_maxh, avgP[0], avgs); + LOG_D(NR_PHY_DCI, "slot %d: pdcch log2_maxh = %d (%d,%d)\n", proc->nr_slot_rx, log2_maxh, avgP[0], avgs); #endif #if T_TRACER T(T_UE_PHY_PDCCH_ENERGY, T_INT(0), T_INT(0), T_INT(proc->frame_rx % 1024), T_INT(proc->nr_slot_rx), T_INT(avgP[0]), T_INT(avgP[1]), T_INT(avgP[2]), T_INT(avgP[3])); #endif - LOG_D(PHY,"we enter nr_pdcch_channel_compensation(log2_maxh=%d)\n",log2_maxh); - LOG_D(PHY,"in nr_pdcch_channel_compensation(rxdataF_ext x dl_ch_estimates_ext -> rxdataF_comp)\n"); + LOG_D(NR_PHY_DCI, "we enter nr_pdcch_channel_compensation(log2_maxh=%d)\n", log2_maxh); + LOG_D(NR_PHY_DCI, "in nr_pdcch_channel_compensation(rxdataF_ext x dl_ch_estimates_ext -> rxdataF_comp)\n"); // compute LLRs for ofdm symbol 0 only nr_pdcch_channel_compensation(rx_size, rxdataF_ext, pdcch_dl_ch_estimates_ext, @@ -620,12 +625,12 @@ void nr_rx_pdcch(PHY_VARS_NR_UE *ue, UEscopeCopy(ue, pdcchRxdataF_comp, rxdataF_comp, sizeof(struct complex16), frame_parms->nb_antennas_rx, rx_size, 0); if (frame_parms->nb_antennas_rx > 1) { - LOG_D(PHY,"we enter nr_pdcch_detection_mrc(frame_parms->nb_antennas_rx=%d)\n", frame_parms->nb_antennas_rx); + LOG_D(NR_PHY_DCI, "we enter nr_pdcch_detection_mrc(frame_parms->nb_antennas_rx=%d)\n", frame_parms->nb_antennas_rx); nr_pdcch_detection_mrc(frame_parms, rx_size, rxdataF_comp,s); } - LOG_D(PHY,"we enter nr_pdcch_llr(for symbol %d), pdcch_vars[eNB_id]->rxdataF_comp ---> pdcch_vars[eNB_id]->llr \n",s); - LOG_D(PHY,"in nr_pdcch_llr(rxdataF_comp -> llr)\n"); + LOG_D(NR_PHY_DCI, "we enter nr_pdcch_llr(for symbol %d), pdcch_vars[eNB_id]->rxdataF_comp ---> pdcch_vars[eNB_id]->llr \n", s); + LOG_D(NR_PHY_DCI, "in nr_pdcch_llr(rxdataF_comp -> llr)\n"); nr_pdcch_llr(frame_parms, rx_size, rxdataF_comp, @@ -669,7 +674,7 @@ static void nr_pdcch_unscrambling(c16_t *e_rx, n_id = pdcch_DMRS_scrambling_id; x2 = ((rnti << 16) + n_id) % (1U << 31); // this is c_init in 38.211 v15.1.0 Section 7.3.2.3 - LOG_D(PHY,"PDCCH Unscrambling x2 %x : scrambling_RNTI %x\n", x2, rnti); + LOG_D(NR_PHY_DCI, "PDCCH Unscrambling x2 %x : scrambling_RNTI %x\n", x2, rnti); int16_t *ptr = &e_rx[0].r; for (i = 0; i < length; i++) { if ((i & 0x1f) == 0) { @@ -745,8 +750,17 @@ void nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue, int dci_length = rel15->dci_length_options[k]; uint64_t dci_estimation[2]= {0}; - LOG_D(PHY, "(%i.%i) Trying DCI candidate %d of %d number of candidates, CCE %d (%d), L %d, length %d, format %s\n", - proc->frame_rx, proc->nr_slot_rx, j, rel15->number_of_candidates, CCEind, e_rx_cand_idx, L, dci_length, nr_dci_format_string[rel15->dci_format_options[k]]); + LOG_D(NR_PHY_DCI, + "(%i.%i) Trying DCI candidate %d of %d number of candidates, CCE %d (%d), L %d, length %d, format %s\n", + proc->frame_rx, + proc->nr_slot_rx, + j, + rel15->number_of_candidates, + CCEind, + e_rx_cand_idx, + L, + dci_length, + nr_dci_format_string[rel15->dci_format_options[k]]); int16_t tmp_e[16 * 108]; nr_pdcch_unscrambling(&pdcch_e_rx[e_rx_cand_idx], rel15->coreset.scrambling_rnti, L*108, rel15->coreset.pdcch_dmrs_scrambling_id, tmp_e); @@ -757,7 +771,7 @@ void nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue, NR_POLAR_DCI_MESSAGE_TYPE, dci_length, L); rnti_t n_rnti = rel15->rnti; - LOG_D(PHY, + LOG_D(NR_PHY_DCI, "(%i.%i) dci indication (rnti %x,dci format %s,n_CCE %d,payloadSize %d,payload %lx, is rnti: %d )\n", proc->frame_rx, proc->nr_slot_rx, @@ -771,7 +785,12 @@ void nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue, uint16_t mb = nr_dci_false_detection(dci_estimation,tmp_e,L*108,n_rnti, NR_POLAR_DCI_MESSAGE_TYPE, dci_length, L); ue->dci_thres = (ue->dci_thres + mb) / 2; if (mb > (ue->dci_thres+30)) { - LOG_W(PHY,"DCI false positive. Dropping DCI index %d. Mismatched bits: %d/%d. Current DCI threshold: %d\n",j,mb,L*108,ue->dci_thres); + LOG_W(NR_PHY_DCI, + "DCI false positive. Dropping DCI index %d. Mismatched bits: %d/%d. Current DCI threshold: %d\n", + j, + mb, + L * 108, + ue->dci_thres); continue; } else { AssertFatal(dci_ind->number_of_dcis < sizeofArray(dci_ind->dci_list), "Fix allocation\n"); @@ -793,7 +812,13 @@ void nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue, break; // If DCI is found, no need to check for remaining DCI lengths } } else { - LOG_D(PHY,"(%i.%i) Decoded crc %x does not match rnti %x for DCI format %d\n", proc->frame_rx, proc->nr_slot_rx, crc, n_rnti, rel15->dci_format_options[k]); + LOG_D(NR_PHY_DCI, + "(%i.%i) Decoded crc %x does not match rnti %x for DCI format %d\n", + proc->frame_rx, + proc->nr_slot_rx, + crc, + n_rnti, + rel15->dci_format_options[k]); } } e_rx_cand_idx += 9 * L * 6; // e_rx index for next candidate (L CCEs, 6 REGs per CCE and 9 REs per REG ) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c index 5eb895c52e..65e8dd3fc4 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c @@ -44,7 +44,7 @@ void fill_dci_search_candidates(const NR_SearchSpace_t *ss, fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15, const uint32_t Y) { - LOG_D(NR_MAC,"Filling search candidates for DCI\n"); + LOG_D(NR_MAC_DCI, "Filling search candidates for DCI\n"); int i = 0; for (int maxL = 16; maxL > 0; maxL >>= 1) { @@ -55,7 +55,7 @@ void fill_dci_search_candidates(const NR_SearchSpace_t *ss, maxL); if (max_number_of_candidates == 0) continue; - LOG_D(NR_MAC,"L %d, max number of candidates %d, aggregation %d\n", maxL, max_number_of_candidates, aggregation); + LOG_D(NR_MAC_DCI, "L %d, max number of candidates %d, aggregation %d\n", maxL, max_number_of_candidates, aggregation); 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++) { @@ -67,13 +67,20 @@ void fill_dci_search_candidates(const NR_SearchSpace_t *ss, continue; for (int j = 0; j < max_number_of_candidates; j++) { int first_cce = aggregation * ((Y + ((j * N_cces) / (aggregation * max_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, max_number_of_candidates, first_cce, aggregation, N_cces, Y); + LOG_D(NR_MAC_DCI, + "Candidate %d of %d first_cce %d (L %d N_cces %d Y %d)\n", + j, + max_number_of_candidates, + first_cce, + aggregation, + N_cces, + Y); // to avoid storing more than one candidate with the same aggregation and starting CCE (duplicated candidate) bool duplicated = false; for (int k = 0; k < i; k++) { if (rel15->CCE[k] == first_cce && rel15->L[k] == aggregation) { duplicated = true; - LOG_D(NR_MAC, "Candidate %d of %d is duplicated\n", j, max_number_of_candidates); + LOG_D(NR_MAC_DCI, "Candidate %d of %d is duplicated\n", j, max_number_of_candidates); } } if (!duplicated) { @@ -296,7 +303,9 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, #ifdef DEBUG_DCI for (int i = 0; i < rel15->num_dci_options; i++) { - LOG_D(MAC, "[DCI_CONFIG] Configure DCI PDU: rnti_type %d BWPSize %d BWPStart %d rel15->SubcarrierSpacing %d rel15->dci_format %d rel15->dci_length %d sps %d monitoringSymbolsWithinSlot %d \n", + LOG_D(NR_MAC_DCI, + "[DCI_CONFIG] Configure DCI PDU: rnti_type %d BWPSize %d BWPStart %d rel15->SubcarrierSpacing %d rel15->dci_format %d " + "rel15->dci_length %d sps %d monitoringSymbolsWithinSlot %d \n", rnti_type, rel15->BWPSize, rel15->BWPStart, @@ -490,7 +499,7 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl fill_coresetZero(mac->coreset0, &mac->type0_PDCCH_CSS_config); fill_searchSpaceZero(mac->search_space_zero, slots_per_frame, &mac->type0_PDCCH_CSS_config); if (is_ss_monitor_occasion(frame, slot, slots_per_frame, mac->search_space_zero)) { - LOG_D(NR_MAC, "Monitoring DCI for SIB1 in frame %d slot %d\n", frame, slot); + LOG_D(NR_MAC_DCI, "Monitoring DCI for SIB1 in frame %d slot %d\n", frame, slot); config_dci_pdu(mac, dl_config, TYPE_SI_RNTI_, slot, mac->search_space_zero); } } @@ -501,7 +510,7 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl const NR_SearchSpace_t *ss = pdcch_config->otherSI_SS ? pdcch_config->otherSI_SS : mac->search_space_zero; // TODO configure SI-window if (monitior_dci_for_other_SI(mac, ss, slots_per_frame, frame, slot)) { - LOG_D(NR_MAC, "Monitoring DCI for other SIs in frame %d slot %d\n", frame, slot); + LOG_D(NR_MAC_DCI, "Monitoring DCI for other SIs in frame %d slot %d\n", frame, slot); config_dci_pdu(mac, dl_config, TYPE_SI_RNTI_, slot, ss); } } diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 4e33ad7aba..c169e03ae4 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -2896,9 +2896,9 @@ void nr_ue_send_sdu(NR_UE_MAC_INST_t *mac, nr_downlink_indication_t *dl_info, in } // #define EXTRACT_DCI_ITEM(val,size) val= readBits(dci_pdu, &pos, size); -#define EXTRACT_DCI_ITEM(val, size) \ +#define EXTRACT_DCI_ITEM(val, size) \ val = readBits(dci_pdu, &pos, size); \ - LOG_D(NR_DCI, " " #val ": %d\n", val); + LOG_D(NR_MAC_DCI, " " #val ": %d\n", val); // Fixme: Intel Endianess only procedure static inline int readBits(const uint8_t *dci, int *start, int length) @@ -2945,7 +2945,7 @@ static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, switch(rnti_type) { case TYPE_RA_RNTI_: - LOG_D(NR_DCI, "Received dci 1_0 RA rnti\n"); + LOG_D(NR_MAC_DCI, "Received dci 1_0 RA rnti\n"); // Freq domain assignment EXTRACT_DCI_ITEM(dci_pdu_rel15->frequency_domain_assignment.val, (int)ceil(log2((N_RB * (N_RB + 1)) >> 1))); // Time domain assignment @@ -2959,13 +2959,13 @@ static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, break; case TYPE_C_RNTI_: - LOG_D(NR_DCI, "Received dci 1_0 C rnti\n"); + LOG_D(NR_MAC_DCI, "Received dci 1_0 C rnti\n"); // Identifier for DCI formats EXTRACT_DCI_ITEM(dci_pdu_rel15->format_indicator, 1); // switch to DCI_0_0 if (dci_pdu_rel15->format_indicator == 0) { dci_pdu_rel15 = &mac->def_dci_pdu_rel15[slot][NR_UL_DCI_FORMAT_0_0]; - LOG_D(NR_DCI, "received dci 1_0 c_ rnti, switching to dci 0_0\n"); + LOG_D(NR_MAC_DCI, "received dci 1_0 c_ rnti, switching to dci 0_0\n"); return 2 + nr_extract_dci_info(mac, NR_UL_DCI_FORMAT_0_0, dci_size, rnti, ss_type, dci_pdu, dci_pdu_rel15, slot); } @@ -3013,7 +3013,7 @@ static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, break; case TYPE_P_RNTI_: - LOG_D(NR_DCI, "Received dci 1_0 P rnti\n"); + LOG_D(NR_MAC_DCI, "Received dci 1_0 P rnti\n"); /* // Short Messages Indicator  E2 bits for (int i=0; i<2; i++) @@ -3042,7 +3042,7 @@ static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, break; case TYPE_SI_RNTI_: - LOG_D(NR_DCI, "Received dci 1_0 SI rnti\n"); + LOG_D(NR_MAC_DCI, "Received dci 1_0 SI rnti\n"); // Freq domain assignment 0-16 bit EXTRACT_DCI_ITEM(dci_pdu_rel15->frequency_domain_assignment.val, (int)ceil(log2((N_RB * (N_RB + 1)) >> 1))); // Time domain assignment 4 bit @@ -3058,7 +3058,7 @@ static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, break; case TYPE_TC_RNTI_: - LOG_D(NR_DCI, "Received dci 1_0 TC rnti\n"); + LOG_D(NR_MAC_DCI, "Received dci 1_0 TC rnti\n"); // indicating a DL DCI format 1bit EXTRACT_DCI_ITEM(dci_pdu_rel15->format_indicator, 1); @@ -3066,7 +3066,7 @@ static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, // switch to DCI_0_0 if (dci_pdu_rel15->format_indicator == 0) { dci_pdu_rel15 = &mac->def_dci_pdu_rel15[slot][NR_UL_DCI_FORMAT_0_0]; - LOG_D(NR_DCI, "received dci 1_0 tc_ rnti, switching to dci 0_0\n"); + LOG_D(NR_MAC_DCI, "received dci 1_0 tc_ rnti, switching to dci 0_0\n"); return 2 + nr_extract_dci_info(mac, NR_UL_DCI_FORMAT_0_0, dci_size, rnti, ss_type, dci_pdu, dci_pdu_rel15, slot); } @@ -3094,7 +3094,7 @@ static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, EXTRACT_DCI_ITEM(dci_pdu_rel15->pdsch_to_harq_feedback_timing_indicator.val, 3); break; default: - LOG_W(NR_DCI, "Received dci 1_0 unknown rnti type: %d\n", rnti_type); + LOG_W(NR_MAC_DCI, "Received dci 1_0 unknown rnti type: %d\n", rnti_type); } break; @@ -3102,7 +3102,7 @@ static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, switch(rnti_type) { case TYPE_C_RNTI_: - LOG_D(NR_DCI, "Received dci 0_0 C rnti\n"); + LOG_D(NR_MAC_DCI, "Received dci 0_0 C rnti\n"); // Identifier for DCI formats EXTRACT_DCI_ITEM(dci_pdu_rel15->format_indicator, 1); if (dci_pdu_rel15->format_indicator == 1) @@ -3130,13 +3130,13 @@ static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, break; case TYPE_TC_RNTI_: - LOG_D(NR_DCI, "Received dci 1_0 TC rnti\n"); + LOG_D(NR_MAC_DCI, "Received dci 1_0 TC rnti\n"); // Identifier for DCI formats EXTRACT_DCI_ITEM(dci_pdu_rel15->format_indicator, 1); //switch to DCI_1_0 if (dci_pdu_rel15->format_indicator == 1) { dci_pdu_rel15 = &mac->def_dci_pdu_rel15[slot][NR_DL_DCI_FORMAT_1_0]; - LOG_D(NR_DCI, "received dci 0_0 tc_ rnti, switching to dci 0_0\n"); + LOG_D(NR_MAC_DCI, "received dci 0_0 tc_ rnti, switching to dci 0_0\n"); return 2 + nr_extract_dci_info(mac, NR_DL_DCI_FORMAT_1_0, dci_size, rnti, ss_type, dci_pdu, dci_pdu_rel15, slot); } @@ -3158,7 +3158,7 @@ static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, break; default: - LOG_W(NR_DCI, "Received dci 0_0 unknown rnti type: %d\n", rnti_type); + LOG_W(NR_MAC_DCI, "Received dci 0_0 unknown rnti type: %d\n", rnti_type); } break; @@ -3167,12 +3167,12 @@ static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, switch(rnti_type) { case TYPE_C_RNTI_: - LOG_D(NR_DCI, "Received dci 1_1 C rnti\n"); + LOG_D(NR_MAC_DCI, "Received dci 1_1 C rnti\n"); // Identifier for DCI formats EXTRACT_DCI_ITEM(dci_pdu_rel15->format_indicator, 1); if (dci_pdu_rel15->format_indicator == 0) { - LOG_W(NR_DCI, "Received dci 1_1 C rnti and format indicator 0, discarding\n"); + LOG_W(NR_MAC_DCI, "Received dci 1_1 C rnti and format indicator 0, discarding\n"); return 1; // discard dci, format indicator not corresponding to dci_format } // Carrier indicator @@ -3232,7 +3232,7 @@ static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, EXTRACT_DCI_ITEM(dci_pdu_rel15->dmrs_sequence_initialization.val, 1); break; default: - LOG_W(NR_DCI, "Received dci 1_1 unknown rnti type: %d\n", rnti_type); + LOG_W(NR_MAC_DCI, "Received dci 1_1 unknown rnti type: %d\n", rnti_type); } break; @@ -3240,11 +3240,11 @@ static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, switch(rnti_type) { case TYPE_C_RNTI_: - LOG_D(NR_DCI, "Received dci 0_1 C rnti\n"); + LOG_D(NR_MAC_DCI, "Received dci 0_1 C rnti\n"); //Identifier for DCI formats EXTRACT_DCI_ITEM(dci_pdu_rel15->format_indicator, 1); if (dci_pdu_rel15->format_indicator == 1) { - LOG_W(NR_DCI, "Received dci 0_1 C rnti and format indicator 1, discarding\n"); + LOG_W(NR_MAC_DCI, "Received dci 0_1 C rnti and format indicator 1, discarding\n"); return 1; // discard dci, format indicator not corresponding to dci_format } // Carrier indicator @@ -3305,12 +3305,12 @@ static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, */ break; default: - LOG_W(NR_DCI, "Received dci 0_1 unknown rnti type: %d\n", rnti_type); + LOG_W(NR_MAC_DCI, "Received dci 0_1 unknown rnti type: %d\n", rnti_type); } break; default: // other DCI formats - LOG_W(NR_DCI, "Received dci unknown format type: %d\n", dci_format); + LOG_W(NR_MAC_DCI, "Received dci unknown format type: %d\n", dci_format); break; }