diff --git a/openair1/PHY/INIT/nr_init.c b/openair1/PHY/INIT/nr_init.c index d3af38efa1b6262605d37be7b69e4f978bbf8904..d6b02bb1fc7ba3ac5a29f90a17635d2dcbb5bc96 100644 --- a/openair1/PHY/INIT/nr_init.c +++ b/openair1/PHY/INIT/nr_init.c @@ -43,21 +43,21 @@ int l1_north_init_gNB() { int i,j; - if (RC.nb_L1_inst > 0 && RC.nb_L1_CC != NULL && RC.gNB != NULL) + if (RC.nb_nr_L1_inst > 0 && RC.nb_nr_L1_CC != NULL && RC.gNB != NULL) { - AssertFatal(RC.nb_L1_inst>0,"nb_L1_inst=%d\n",RC.nb_L1_inst); - AssertFatal(RC.nb_L1_CC!=NULL,"nb_L1_CC is null\n"); + 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.gNB!=NULL,"RC.gNB is null\n"); - LOG_I(PHY,"%s() RC.nb_L1_inst:%d\n", __FUNCTION__, RC.nb_L1_inst); + LOG_I(PHY,"%s() RC.nb_nr_L1_inst:%d\n", __FUNCTION__, RC.nb_nr_L1_inst); - for (i=0;i<RC.nb_L1_inst;i++) { + for (i=0;i<RC.nb_nr_L1_inst;i++) { AssertFatal(RC.gNB[i]!=NULL,"RC.gNB[%d] is null\n",i); - AssertFatal(RC.nb_L1_CC[i]>0,"RC.nb_L1_CC[%d]=%d\n",i,RC.nb_L1_CC[i]); + AssertFatal(RC.nb_nr_L1_CC[i]>0,"RC.nb_nr_L1_CC[%d]=%d\n",i,RC.nb_nr_L1_CC[i]); - LOG_I(PHY,"%s() RC.nb_L1_CC[%d]:%d\n", __FUNCTION__, i, RC.nb_L1_CC[i]); + LOG_I(PHY,"%s() RC.nb_nr_L1_CC[%d]:%d\n", __FUNCTION__, i, RC.nb_nr_L1_CC[i]); - for (j=0;j<RC.nb_L1_CC[i];j++) { + for (j=0;j<RC.nb_nr_L1_CC[i];j++) { AssertFatal(RC.gNB[i][j]!=NULL,"RC.gNB[%d][%d] is null\n",i,j); if ((RC.gNB[i][j]->if_inst = NR_IF_Module_init(i))<0) return(-1); @@ -71,7 +71,7 @@ int l1_north_init_gNB() { } else { - LOG_I(PHY,"%s() Not installing PHY callbacks - RC.nb_L1_inst:%d RC.nb_L1_CC:%p RC.gNB:%p\n", __FUNCTION__, RC.nb_L1_inst, RC.nb_L1_CC, RC.gNB); + LOG_I(PHY,"%s() Not installing PHY callbacks - RC.nb_nr_L1_inst:%d RC.nb_nr_L1_CC:%p RC.gNB:%p\n", __FUNCTION__, RC.nb_nr_L1_inst, RC.nb_nr_L1_CC, RC.gNB); } return(0); } diff --git a/openair1/PHY/INIT/nr_init_ru.c b/openair1/PHY/INIT/nr_init_ru.c index d11624557d49e26ac024ae9495bb23d2d735ede0..e3d3fff762f37b8ef82a0a49f3c60ec051c19c11 100644 --- a/openair1/PHY/INIT/nr_init_ru.c +++ b/openair1/PHY/INIT/nr_init_ru.c @@ -100,12 +100,12 @@ int nr_phy_init_RU(RU_t *ru) { LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n",i,ru->prach_rxsigF[i]); } - AssertFatal(RC.nb_L1_inst <= NUMBER_OF_eNB_MAX,"gNB instances %d > %d\n", - RC.nb_L1_inst,NUMBER_OF_eNB_MAX); + AssertFatal(RC.nb_nr_L1_inst <= NUMBER_OF_eNB_MAX,"gNB instances %d > %d\n", + RC.nb_nr_L1_inst,NUMBER_OF_gNB_MAX); - LOG_E(PHY,"[INIT] %s() RC.nb_L1_inst:%d \n", __FUNCTION__, RC.nb_L1_inst); + LOG_E(PHY,"[INIT] %s() RC.nb_nr_L1_inst:%d \n", __FUNCTION__, RC.nb_nr_L1_inst); - for (i=0; i<RC.nb_L1_inst; i++) { + for (i=0; i<RC.nb_nr_L1_inst; i++) { for (p=0;p<15;p++) { LOG_D(PHY,"[INIT] %s() nb_antenna_ports_eNB:%d \n", __FUNCTION__, ru->gNB_list[i]->gNB_config.rf_config.tx_antenna_ports.value); if (p<ru->gNB_list[i]->gNB_config.rf_config.tx_antenna_ports.value || p==5) { @@ -178,7 +178,7 @@ void nr_phy_free_RU(RU_t *ru) free_and_zero(ru->prach_rxsigF); /* ru->prach_rxsigF_br is not allocated -> don't free */ - for (i = 0; i < RC.nb_L1_inst; i++) { + for (i = 0; i < RC.nb_nr_L1_inst; i++) { for (p = 0; p < 15; p++) { if (p < ru->gNB_list[i]->gNB_config.rf_config.tx_antenna_ports.value || p == 5) { for (j=0; j<ru->nb_tx; j++) free_and_zero(ru->beam_weights[i][p][j]); diff --git a/openair1/PHY/INIT/nr_parms.c b/openair1/PHY/INIT/nr_parms.c index 89ce1f8ee36140bd2b0d68de20f714c840d84a38..d677276aa874f7924eff16441ec150e88a089892 100644 --- a/openair1/PHY/INIT/nr_parms.c +++ b/openair1/PHY/INIT/nr_parms.c @@ -30,7 +30,7 @@ int nr_init_frame_parms(nfapi_nr_config_request_t* config, NR_DL_FRAME_PARMS *frame_parms) { - int N_RB = config->rf_config.dl_carrierBandwidth.value; + int N_RB = config->rf_config.dl_channel_bandwidth.value; int Ncp = config->subframe_config.dl_prefix_type.value; int mu = config->subframe_config.numerology_index_mu.value; diff --git a/openair2/GNB_APP/gnb_app.c b/openair2/GNB_APP/gnb_app.c index e3dff6b029198efae43e2d4c12500f0c9daa2b69..a7bcda924fdc30ac7b7202b6daacccccc383a34e 100644 --- a/openair2/GNB_APP/gnb_app.c +++ b/openair2/GNB_APP/gnb_app.c @@ -143,9 +143,9 @@ void *gNB_app_task(void *args_p) RCconfig_nr_macrlc(); - LOG_I(PHY, "%s() RC.nb_L1_inst:%d\n", __FUNCTION__, RC.nb_L1_inst); + LOG_I(PHY, "%s() RC.nb_nr_L1_inst:%d\n", __FUNCTION__, RC.nb_nr_L1_inst); - if (RC.nb_L1_inst>0) AssertFatal(l1_north_init_gNB()==0,"could not initialize L1 north interface\n"); + if (RC.nb_nr_L1_inst>0) AssertFatal(l1_north_init_gNB()==0,"could not initialize L1 north interface\n"); AssertFatal (gnb_nb <= RC.nb_nr_inst, "Number of gNB is greater than gNB defined in configuration file (%d/%d)!", diff --git a/targets/RT/USER/nr-gnb.c b/targets/RT/USER/nr-gnb.c index 97d3afedbe5d1cda65e54047ba1c8cd0143213fc..7e49449d5f3979765525880b262fe76e615fd4eb 100644 --- a/targets/RT/USER/nr-gnb.c +++ b/targets/RT/USER/nr-gnb.c @@ -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_L1_inst:%d RC.nb_L1_CC[0]:%d\n",RC.nb_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_L1_CC[0]:%d\n",RC.nb_nr_L1_inst,RC.nb_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"); diff --git a/targets/RT/USER/nr-ru.c b/targets/RT/USER/nr-ru.c index c1b229fe28c90007f314c8d40cb8a511624dd875..6abfa178431c2eb11ae526cec3db8e947cf57b4d 100644 --- a/targets/RT/USER/nr-ru.c +++ b/targets/RT/USER/nr-ru.c @@ -2119,11 +2119,11 @@ void init_RU(char *rf_config_file) { // read in configuration file) printf("configuring RU from file\n"); RCconfig_RU(); - LOG_I(PHY,"number of L1 instances %d, number of RU %d, number of CPU cores %d\n",RC.nb_L1_inst,RC.nb_RU,get_nprocs()); + LOG_I(PHY,"number of L1 instances %d, number of RU %d, number of CPU cores %d\n",RC.nb_nr_L1_inst,RC.nb_RU,get_nprocs()); - if (RC.nb_CC != 0) - for (i=0;i<RC.nb_L1_inst;i++) - for (CC_id=0;CC_id<RC.nb_CC[i];CC_id++) RC.gNB[i][CC_id]->num_RU=0; + if (RC.nb_nr_CC != 0) + for (i=0;i<RC.nb_nr_L1_inst;i++) + for (CC_id=0;CC_id<RC.nb_nr_CC[i];CC_id++) RC.gNB[i][CC_id]->num_RU=0; LOG_D(PHY,"Process RUs RC.nb_RU:%d\n",RC.nb_RU); for (ru_id=0;ru_id<RC.nb_RU;ru_id++) { @@ -2236,7 +2236,7 @@ void RCconfig_RU(void) { printf("Creating RC.ru[%d]:%p\n", j, RC.ru[j]); RC.ru[j]->if_timing = synch_to_ext_device; - if (RC.nb_L1_inst >0) + if (RC.nb_nr_L1_inst >0) RC.ru[j]->num_gNB = RUParamList.paramarray[j][RU_ENB_LIST_IDX].numelt; else RC.ru[j]->num_gNB = 0; diff --git a/targets/RT/USER/nr-softmodem.c b/targets/RT/USER/nr-softmodem.c index 2ff8168f0fb81de3932ebf62016f8383f2e7f77b..e295d53b707aae85c28fba4857e02ba8596c30cb 100644 --- a/targets/RT/USER/nr-softmodem.c +++ b/targets/RT/USER/nr-softmodem.c @@ -731,14 +731,14 @@ void wait_gNBs(void) { while (waiting==1) { - printf("Waiting for gNB L1 instances to all get configured ... sleeping 50ms (nb_L1_inst %d)\n",RC.nb_L1_inst); + printf("Waiting for gNB L1 instances to all get configured ... sleeping 50ms (nb_nr_sL1_inst %d)\n",RC.nb_nr_L1_inst); usleep(50*1000); waiting=0; - for (i=0;i<RC.nb_L1_inst;i++) { + for (i=0;i<RC.nb_nr_L1_inst;i++) { - printf("RC.nb_L1_CC[%d]:%d\n", i, RC.nb_L1_CC[i]); + printf("RC.nb_nr_L1_CC[%d]:%d\n", i, RC.nb_L1_CC[i]); - for (j=0;j<RC.nb_L1_CC[i];j++) { + for (j=0;j<RC.nb_nr_L1_CC[i];j++) { if (RC.gNB[i][j]->configured==0) { waiting=1; break; @@ -1062,7 +1062,7 @@ int main( int argc, char **argv ) /* Start the agent. If it is turned off in the configuration, it won't start */ RCconfig_nr_flexran(); - for (i = 0; i < RC.nb_L1_inst; i++) { + for (i = 0; i < RC.nb_nr_L1_inst; i++) { flexran_agent_start(i); } @@ -1151,7 +1151,7 @@ int main( int argc, char **argv ) number_of_cards = 1; printf("RC.nb_nr_L1_inst:%d\n", RC.nb_nr_L1_inst); - if (RC.nb_L1_inst > 0) { + if (RC.nb_nr_L1_inst > 0) { printf("Initializing gNB threads single_thread_flag:%d wait_for_sync:%d\n", single_thread_flag,wait_for_sync); init_gNB(single_thread_flag,wait_for_sync); }