diff --git a/openair1/PHY/INIT/nr_init.c b/openair1/PHY/INIT/nr_init.c index d6b02bb1fc7ba3ac5a29f90a17635d2dcbb5bc96..01b8348a260d3a7918279652c570753c757d7bc9 100644 --- a/openair1/PHY/INIT/nr_init.c +++ b/openair1/PHY/INIT/nr_init.c @@ -45,8 +45,8 @@ int l1_north_init_gNB() { if (RC.nb_nr_L1_inst > 0 && RC.nb_nr_L1_CC != NULL && RC.gNB != NULL) { - AssertFatal(RC.nb_nr_L1_inst>0,"nb_L1_inst=%d\n",RC.nb_nr_L1_inst); - AssertFatal(RC.nb_nr_L1_CC!=NULL,"nb_L1_CC is null\n"); + AssertFatal(RC.nb_nr_L1_inst>0,"nb_nr_L1_inst=%d\n",RC.nb_nr_L1_inst); + AssertFatal(RC.nb_nr_L1_CC!=NULL,"nb_nr_L1_CC is null\n"); AssertFatal(RC.gNB!=NULL,"RC.gNB is null\n"); LOG_I(PHY,"%s() RC.nb_nr_L1_inst:%d\n", __FUNCTION__, RC.nb_nr_L1_inst); diff --git a/targets/RT/USER/nr-gnb.c b/targets/RT/USER/nr-gnb.c index 7e49449d5f3979765525880b262fe76e615fd4eb..a9e4e58f42cf570b3bf0a12cf86bac547e961aa4 100644 --- a/targets/RT/USER/nr-gnb.c +++ b/targets/RT/USER/nr-gnb.c @@ -577,9 +577,9 @@ void init_gNB_proc(int inst) { pthread_attr_t *attr0=NULL,*attr1=NULL; //*attr_prach=NULL; - LOG_I(PHY,"%s(inst:%d) RC.nb_CC[inst]:%d \n",__FUNCTION__,inst,RC.nb_CC[inst]); + LOG_I(PHY,"%s(inst:%d) RC.nb_nr_CC[inst]:%d \n",__FUNCTION__,inst,RC.nb_nr_CC[inst]); - for (CC_id=0; CC_id<RC.nb_CC[inst]; CC_id++) { + for (CC_id=0; CC_id<RC.nb_nr_CC[inst]; CC_id++) { gNB = RC.gNB[inst][CC_id]; #ifndef OCP_FRAMEWORK LOG_I(PHY,"Initializing gNB processes instance:%d CC_id %d \n",inst,CC_id); @@ -816,13 +816,13 @@ void init_eNB_afterRU(void) { int inst,CC_id,ru_id,i,aa; PHY_VARS_gNB *gNB; - LOG_I(PHY,"%s() RC.nb_inst:%d\n", __FUNCTION__, RC.nb_inst); + LOG_I(PHY,"%s() RC.nb_nr_inst:%d\n", __FUNCTION__, RC.nb_nr_inst); - for (inst=0;inst<RC.nb_inst;inst++) { - LOG_I(PHY,"RC.nb_CC[inst]:%d\n", RC.nb_CC[inst]); - for (CC_id=0;CC_id<RC.nb_CC[inst];CC_id++) { + for (inst=0;inst<RC.nb_nr_inst;inst++) { + LOG_I(PHY,"RC.nb_nr_CC[inst]:%d\n", RC.nb_nr_CC[inst]); + for (CC_id=0;CC_id<RC.nb_nr_CC[inst];CC_id++) { - LOG_I(PHY,"RC.nb_CC[inst:%d][CC_id:%d]:%p\n", inst, CC_id, RC.gNB[inst][CC_id]); + LOG_I(PHY,"RC.nb_nr_CC[inst:%d][CC_id:%d]:%p\n", inst, CC_id, RC.gNB[inst][CC_id]); gNB = RC.gNB[inst][CC_id]; phy_init_nr_gNB(gNB,0,0); @@ -907,7 +907,7 @@ void init_gNB(int single_thread_flag,int wait_for_sync) { int inst; PHY_VARS_gNB *gNB; - LOG_I(PHY,"[nr-softmodem.c] gNB structure about to allocated RC.nb_nr_L1_inst:%d RC.nb_L1_CC[0]:%d\n",RC.nb_nr_L1_inst,RC.nb_L1_CC[0]); + LOG_I(PHY,"[nr-softmodem.c] gNB structure about to allocated RC.nb_nr_L1_inst:%d RC.nb_nr_L1_CC[0]:%d\n",RC.nb_nr_L1_inst,RC.nb_nr_L1_CC[0]); if (RC.gNB == NULL) RC.gNB = (PHY_VARS_gNB***) malloc(RC.nb_nr_L1_inst*sizeof(PHY_VARS_gNB **)); LOG_I(PHY,"[lte-softmodem.c] gNB structure RC.gNB allocated\n"); @@ -929,7 +929,6 @@ void init_gNB(int single_thread_flag,int wait_for_sync) { AssertFatal((gNB->if_inst = NR_IF_Module_init(inst))!=NULL,"Cannot register interface"); gNB->if_inst->schedule_response = schedule_response; gNB->if_inst->PHY_config_req = nr_phy_config_request; - nr_phy_config_request(gNB); memset((void*)&gNB->UL_INFO,0,sizeof(gNB->UL_INFO)); memset((void*)&gNB->Sched_INFO,0,sizeof(gNB->Sched_INFO)); LOG_I(PHY,"Setting indication lists\n"); @@ -950,7 +949,7 @@ void init_gNB(int single_thread_flag,int wait_for_sync) { void stop_gNB(int nb_inst) { - for (int inst=0;inst<nb_inst;inst++) { + for (int inst=0;inst<nb_nr_inst;inst++) { LOG_I(PHY,"Killing gNB %d processing threads\n",inst); kill_gNB_proc(inst); } diff --git a/targets/RT/USER/nr-softmodem.c b/targets/RT/USER/nr-softmodem.c index e295d53b707aae85c28fba4857e02ba8596c30cb..040064c2ca105248648de44e0165f79afe37789b 100644 --- a/targets/RT/USER/nr-softmodem.c +++ b/targets/RT/USER/nr-softmodem.c @@ -736,7 +736,7 @@ void wait_gNBs(void) { waiting=0; for (i=0;i<RC.nb_nr_L1_inst;i++) { - printf("RC.nb_nr_L1_CC[%d]:%d\n", i, RC.nb_L1_CC[i]); + printf("RC.nb_nr_L1_CC[%d]:%d\n", i, RC.nb_nr_L1_CC[i]); for (j=0;j<RC.nb_nr_L1_CC[i];j++) { if (RC.gNB[i][j]->configured==0) {