Commit 4323aa48 authored by WEI-TAI CHEN's avatar WEI-TAI CHEN

Amend L1 instant

parent bd88e8b4
......@@ -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);
......
......@@ -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);
}
......
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment