diff --git a/openair1/PHY/INIT/nr_init.c b/openair1/PHY/INIT/nr_init.c index 33d3fcbd28..0cfda8481e 100644 --- a/openair1/PHY/INIT/nr_init.c +++ b/openair1/PHY/INIT/nr_init.c @@ -506,6 +506,8 @@ void init_nr_transport(PHY_VARS_gNB *gNB) { LOG_I(PHY, "Initialise nr transport\n"); uint16_t grid_size = cfg->carrier_config.dl_grid_size[fp->numerology_index].value; + memset(gNB->num_pdsch_rnti, 0, sizeof(uint16_t)*80); + for (i=0; i pdcch_pdu[i].frame=-1; diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c index 7702d770ee..ba0bf6b4bf 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c @@ -291,7 +291,7 @@ void nr_fill_dlsch(PHY_VARS_gNB *gNB, NR_DL_gNB_HARQ_t **harq = dlsch->harq_processes; /// DLSCH struct memcpy((void*)&harq[dlsch->harq_ids[frame%2][slot]]->pdsch_pdu, (void*)pdsch_pdu, sizeof(nfapi_nr_dl_tti_pdsch_pdu)); - gNB->num_pdsch_rnti++; + gNB->num_pdsch_rnti[slot]++; AssertFatal(sdu!=NULL,"sdu is null\n"); harq[dlsch->harq_ids[frame%2][slot]]->pdu = sdu; diff --git a/openair1/PHY/defs_gNB.h b/openair1/PHY/defs_gNB.h index 5bf873978f..5605a85287 100644 --- a/openair1/PHY/defs_gNB.h +++ b/openair1/PHY/defs_gNB.h @@ -691,7 +691,7 @@ typedef struct PHY_VARS_gNB_s { // nfapi_nr_ul_dci_request_pdus_t *ul_dci_pdu; nfapi_nr_dl_tti_ssb_pdu ssb_pdu; - int num_pdsch_rnti; + uint16_t num_pdsch_rnti[80]; NR_gNB_PBCH pbch; nr_cce_t cce_list[MAX_DCI_CORESET][NR_MAX_PDCCH_AGG_LEVEL]; NR_gNB_COMMON common_vars; diff --git a/openair1/SCHED_NR/fapi_nr_l1.c b/openair1/SCHED_NR/fapi_nr_l1.c index 48c0229e80..996cad9d1d 100644 --- a/openair1/SCHED_NR/fapi_nr_l1.c +++ b/openair1/SCHED_NR/fapi_nr_l1.c @@ -154,7 +154,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){ number_ul_dci_pdu,number_ul_tti_pdu); int pdcch_received=0; - gNB->num_pdsch_rnti=0; + gNB->num_pdsch_rnti[slot]=0; for (int i=0; idlsch[i][0]->rnti=0; gNB->dlsch[i][0]->harq_mask=0; diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index 6430e933fd..6371017248 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -191,23 +191,23 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, if (ul_pdcch_pdu_id >= 0) gNB->ul_pdcch_pdu[ul_pdcch_pdu_id].frame = -1; } - for (int i=0; inum_pdsch_rnti; i++) { + for (int i=0; inum_pdsch_rnti[slot]; i++) { VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,1); - LOG_D(PHY, "PDSCH generation started (%d)\n", gNB->num_pdsch_rnti); + LOG_D(PHY, "PDSCH generation started (%d) in frame %d.%d\n", gNB->num_pdsch_rnti[slot],frame,slot); nr_generate_pdsch(gNB->dlsch[i][0], - gNB->nr_gold_pdsch_dmrs[slot], - gNB->common_vars.txdataF, - AMP, frame, slot, fp, 0, - &gNB->dlsch_encoding_stats, - &gNB->dlsch_scrambling_stats, - &gNB->dlsch_modulation_stats, - &gNB->tinput, - &gNB->tprep, - &gNB->tparity, - &gNB->toutput, - &gNB->dlsch_rate_matching_stats, - &gNB->dlsch_interleaving_stats, - &gNB->dlsch_segmentation_stats); + gNB->nr_gold_pdsch_dmrs[slot], + gNB->common_vars.txdataF, + AMP, frame, slot, fp, 0, + &gNB->dlsch_encoding_stats, + &gNB->dlsch_scrambling_stats, + &gNB->dlsch_modulation_stats, + &gNB->tinput, + &gNB->tprep, + &gNB->tparity, + &gNB->toutput, + &gNB->dlsch_rate_matching_stats, + &gNB->dlsch_interleaving_stats, + &gNB->dlsch_segmentation_stats); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,0); }