From f41c572aff4904a8700ddc562868b78d22894110 Mon Sep 17 00:00:00 2001 From: francescomani Date: Mon, 28 Apr 2025 18:09:59 +0200 Subject: [PATCH 1/2] fix for UE reception of PDCCH not starting from symbol 0 --- openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c | 3 +-- openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 9 ++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c index d405e86263..0e186a3bc3 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c @@ -826,8 +826,7 @@ void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, unsigned short coreset_start_subcarrier = first_carrier_offset+(BWPStart + coreset_start_rb)*12; #ifdef DEBUG_PDCCH - printf("PDCCH Channel Estimation : gNB_id %d ch_offset %d, OFDM size %d, Ncp=%d, slot=%d, symbol %d\n", - gNB_id, + printf("PDCCH Channel Estimation : ch_offset %d, OFDM size %d, Ncp=%d, slot=%d, symbol %d\n", ch_offset, ue->frame_parms.ofdm_symbol_size, ue->frame_parms.Ncp, diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 5345d010f4..e52b5bed2e 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -977,7 +977,9 @@ int pbch_pdcch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PDCCH, VCD_FUNCTION_IN); uint8_t nb_symb_pdcch = phy_pdcch_config->nb_search_space > 0 ? phy_pdcch_config->pdcch_config[0].coreset.duration : 0; - for (uint16_t l=0; lnb_search_space > 0 ? phy_pdcch_config->pdcch_config[0].coreset.StartSymbolIndex : 0; + int last_symb_pdcch = first_symb_pdcch + nb_symb_pdcch; + for (int l = first_symb_pdcch; l < last_symb_pdcch; l++) { nr_slot_fep(ue, fp, proc->nr_slot_rx, l, rxdataF, link_type_dl, 0, ue->common_vars.rxdata); } @@ -987,10 +989,8 @@ int pbch_pdcch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_ uint8_t dci_cnt = 0; for(int n_ss = 0; n_ssnb_search_space; n_ss++) { - for (uint16_t l=0; l Date: Mon, 28 Apr 2025 18:29:25 +0200 Subject: [PATCH 2/2] scheduling pdcch structure in SIB1 depends on the associated SSB, can't be precomputed start symbol may depend on the associated SSB index --- openair2/LAYER2/NR_MAC_gNB/config.c | 2 -- .../LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c | 25 ++++++++++++------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index e22ad1fcdb..aacae2bea1 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -810,8 +810,6 @@ static void config_sched_ctrlCommon(gNB_MAC_INST *nr_mac) fill_coresetZero(sched_ctrlCommon->coreset, &type0_PDCCH_CSS_config); nr_mac->cset0_bwp_start = type0_PDCCH_CSS_config.cset_start_rb; nr_mac->cset0_bwp_size = type0_PDCCH_CSS_config.num_rbs; - sched_ctrlCommon->sched_pdcch = - set_pdcch_structure(NULL, sched_ctrlCommon->search_space, sched_ctrlCommon->coreset, scc, NULL, &type0_PDCCH_CSS_config); } void nr_mac_config_scc(gNB_MAC_INST *nrmac, NR_ServingCellConfigCommon_t *scc, const nr_mac_config_t *config) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index 5213854a16..bb8aea43fe 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -344,6 +344,7 @@ static uint32_t get_tbs_bch(NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config, static uint32_t schedule_control_sib1(gNB_MAC_INST *gNB_mac, int CC_id, + NR_sched_pdcch_t *pdcch, NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config, int time_domain_allocation, NR_pdsch_dmrs_t *dmrs_parms, @@ -374,7 +375,7 @@ static uint32_t schedule_control_sib1(gNB_MAC_INST *gNB_mac, gNB_mac->sched_ctrlCommon->aggregation_level, nr_of_candidates, beam, - &gNB_mac->sched_ctrlCommon->sched_pdcch, + pdcch, gNB_mac->sched_ctrlCommon->coreset, 0); @@ -388,7 +389,7 @@ static uint32_t schedule_control_sib1(gNB_MAC_INST *gNB_mac, // Mark the corresponding RBs as used fill_pdcch_vrb_map(gNB_mac, CC_id, - &gNB_mac->sched_ctrlCommon->sched_pdcch, + pdcch, gNB_mac->sched_ctrlCommon->cce_index, gNB_mac->sched_ctrlCommon->aggregation_level, beam); @@ -615,20 +616,26 @@ void schedule_nr_sib1(module_id_t module_idP, default_table_type_t table_type = get_default_table_type(type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern); // assuming normal CP - NR_tda_info_t tda_info = get_info_from_tda_tables(table_type, time_domain_allocation, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, true); + NR_tda_info_t tda_info = get_info_from_tda_tables(table_type, time_domain_allocation, scc->dmrs_TypeA_Position, true); - AssertFatal((tda_info.startSymbolIndex + tda_info.nrOfSymbols) < 14, "SIB1 TDA %d would cause overlap with CSI-RS. Please select a different SIB1 TDA.\n", time_domain_allocation); + AssertFatal((tda_info.startSymbolIndex + tda_info.nrOfSymbols) < 14, + "SIB1 TDA %d would cause overlap with CSI-RS. Please select a different SIB1 TDA.\n", + time_domain_allocation); - NR_pdsch_dmrs_t dmrs_parms = get_dl_dmrs_params(scc, - NULL, - &tda_info, - 1); + NR_pdsch_dmrs_t dmrs_parms = get_dl_dmrs_params(scc, NULL, &tda_info, 1); + NR_sched_pdcch_t sched_pdcch = set_pdcch_structure(NULL, + gNB_mac->sched_ctrlCommon->search_space, + gNB_mac->sched_ctrlCommon->coreset, + scc, + NULL, + type0_PDCCH_CSS_config); NR_COMMON_channels_t *cc = &gNB_mac->common_channels[0]; // Configure sched_ctrlCommon for SIB1 uint32_t TBS = schedule_control_sib1(gNB_mac, CC_id, + &sched_pdcch, type0_PDCCH_CSS_config, time_domain_allocation, &dmrs_parms, @@ -641,7 +648,7 @@ void schedule_nr_sib1(module_id_t module_idP, int pdu_index = gNB_mac->pdu_index[0]++; nr_fill_nfapi_dl_SIB_pdu(gNB_mac, &gNB_mac->sched_ctrlCommon->sched_pdsch, - &gNB_mac->sched_ctrlCommon->sched_pdcch, + &sched_pdcch, gNB_mac->sched_ctrlCommon->search_space, gNB_mac->sched_ctrlCommon->coreset, gNB_mac->sched_ctrlCommon->aggregation_level,