diff --git a/openair1/PHY/NR_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_TRANSPORT/nr_pbch.c index 2bc1f373424a9087c7042bd04c6e442b949180dc..767ed0b3e4a6ac09a88382cb3550912ff1415312 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_pbch.c @@ -247,13 +247,13 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch, for (int i=0; i<NR_PBCH_PDU_BITS; i++) pbch->pbch_a |= ((pbch_pdu[2-(i>>3)]>>(7-(i&7)))&1)<<i; -#ifdef DEBUG_PBCH_ENCODING + //#ifdef DEBUG_PBCH_ENCODING for (int i=0; i<3; i++) printf("pbch_pdu[%d]: 0x%02x\n", i, pbch_pdu[i]); printf("PBCH payload = 0x%08x\n",pbch->pbch_a); -#endif + //#endif // Extra byte generation for (int i=0; i<4; i++) diff --git a/openair1/PHY/defs_gNB.h b/openair1/PHY/defs_gNB.h index 3d49914c365941905a0042ec04e8a2b981a3f7ec..7b64002a887c8fbe86383db91b0b143cc4990483 100644 --- a/openair1/PHY/defs_gNB.h +++ b/openair1/PHY/defs_gNB.h @@ -625,7 +625,7 @@ typedef struct PHY_VARS_gNB_s { nfapi_nr_dl_tti_pdcch_pdu *pdcch_pdu; nfapi_nr_ul_dci_request_pdus_t *ul_dci_pdu; - nfapi_nr_dl_tti_ssb_pdu *ssb_pdu; + nfapi_nr_dl_tti_ssb_pdu ssb_pdu; int num_pdsch_rnti; NR_gNB_PBCH pbch; diff --git a/openair1/SCHED_NR/fapi_nr_l1.c b/openair1/SCHED_NR/fapi_nr_l1.c index 5580de403a5abcf0a2f2726d0d0b03aa69aac80e..af657e2d33705081bce7e3c38186b62dbbc15baa 100644 --- a/openair1/SCHED_NR/fapi_nr_l1.c +++ b/openair1/SCHED_NR/fapi_nr_l1.c @@ -45,7 +45,7 @@ void handle_nr_nfapi_ssb_pdu(PHY_VARS_gNB *gNB,int frame,int slot, dl_tti_pdu->ssb_pdu.ssb_pdu_rel15.bchPayloadFlag); LOG_I(PHY,"%d.%d : pbch_pdu: %x\n",frame,slot,dl_tti_pdu->ssb_pdu.ssb_pdu_rel15.bchPayload); - gNB->ssb_pdu = &dl_tti_pdu->ssb_pdu; + memcpy((void*)&gNB->ssb_pdu,&dl_tti_pdu->ssb_pdu,sizeof(dl_tti_pdu->ssb_pdu)); } /*void handle_nr_nfapi_pdsch_pdu(PHY_VARS_gNB *gNB,int frame,int subframe,gNB_L1_rxtx_proc_t *proc, @@ -151,7 +151,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){ if (UL_tti_req != NULL) number_ul_pdu = UL_tti_req->n_pdus; - LOG_D(PHY,"NFAPI: Sched_INFO:SFN/SLOT:%04d%d DL_req:SFN/SLO:%04d%d:dl_pdu:%d tx_req:SFN/SLOT:%04d%d:pdus:%d \n", + LOG_I(PHY,"NFAPI: Sched_INFO:SFN/SLOT:%04d%d DL_req:SFN/SLO:%04d%d:dl_pdu:%d tx_req:SFN/SLOT:%04d%d:pdus:%d;\n", frame,slot, DL_req->SFN,DL_req->Slot,number_dl_pdu, TX_req->SFN,TX_req->Slot,TX_req->Number_of_PDUs); diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index 0cdbeb703922d3df419eb14133f0812b2e4ab469..bd2c059a3852db71454cba23b4a621e76e2843fb 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -119,7 +119,7 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int slot) { ssb_index = i + 2*rel_slot; // computing the ssb_index if ((fp->L_ssb >> ssb_index) & 0x01) { // generating the ssb only if the bit of L_ssb at current ssb index is 1 - gNB->ssb_pdu->ssb_pdu_rel15.SsbBlockIndex = ssb_index; + gNB->ssb_pdu.ssb_pdu_rel15.SsbBlockIndex = ssb_index; int ssb_start_symbol_abs = nr_get_ssb_start_symbol(fp, ssb_index); // computing the starting symbol for current ssb ssb_start_symbol = ssb_start_symbol_abs % 14; // start symbol wrt slot @@ -136,7 +136,7 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int slot) { nr_generate_pbch_dmrs(gNB->nr_gold_pbch_dmrs[0][ssb_index],txdataF[0], AMP, ssb_start_symbol, cfg, fp); nr_generate_pbch(&gNB->pbch, - gNB->ssb_pdu, + &gNB->ssb_pdu, gNB->nr_pbch_interleaver, txdataF[0], AMP, @@ -177,7 +177,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_COMMON_TX,1); if (nfapi_mode == 0 || nfapi_mode == 1) { - if ((!(frame%ssb_frame_periodicity)) && (gNB->ssb_pdu)) // generate SSB only for given frames according to SSB periodicity + if ((!(frame%ssb_frame_periodicity))) // generate SSB only for given frames according to SSB periodicity nr_common_signal_procedures(gNB,frame, slot); } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_COMMON_TX,0);