Commit dd1b8b64 authored by francescomani's avatar francescomani

tentative fix for RC.gNB[inst] allocation

parent bc1942f9
...@@ -1037,7 +1037,11 @@ void init_gNB(int single_thread_flag,int wait_for_sync) { ...@@ -1037,7 +1037,11 @@ void init_gNB(int single_thread_flag,int wait_for_sync) {
for (inst=0; inst<RC.nb_nr_L1_inst; inst++) { for (inst=0; inst<RC.nb_nr_L1_inst; inst++) {
LOG_I(PHY,"[lte-softmodem.c] gNB structure RC.gNB[%d] allocated @ %p\n",inst,RC.gNB[inst]); if (RC.gNB[inst] == NULL) {
RC.gNB[inst] = (PHY_VARS_gNB *) malloc(sizeof(PHY_VARS_gNB));
memset((void*)RC.gNB[inst],0,sizeof(PHY_VARS_gNB));
}
LOG_I(PHY,"[nr-gnb.c] gNB structure RC.gNB[%d] allocated @ %p\n",inst,RC.gNB[inst]);
gNB = RC.gNB[inst]; gNB = RC.gNB[inst];
gNB->abstraction_flag = 0; gNB->abstraction_flag = 0;
gNB->single_thread_flag = single_thread_flag; gNB->single_thread_flag = single_thread_flag;
...@@ -1067,7 +1071,7 @@ void init_gNB(int single_thread_flag,int wait_for_sync) { ...@@ -1067,7 +1071,7 @@ void init_gNB(int single_thread_flag,int wait_for_sync) {
} }
LOG_I(PHY,"[nr-softmodem.c] gNB structure allocated\n"); LOG_I(PHY,"[nr-gnb.c] gNB structure allocated\n");
} }
......
...@@ -2342,7 +2342,7 @@ uint8_t get_L_ptrs(uint8_t mcs1, uint8_t mcs2, uint8_t mcs3, uint8_t I_mcs, uint ...@@ -2342,7 +2342,7 @@ uint8_t get_L_ptrs(uint8_t mcs1, uint8_t mcs2, uint8_t mcs3, uint8_t I_mcs, uint
mcs4 = 28; mcs4 = 28;
if (I_mcs < mcs1) { if (I_mcs < mcs1) {
LOG_I(PHY, "PUSH PT-RS is not present.\n"); LOG_D(PHY, "PUSH PT-RS is not present.\n");
return -1; return -1;
} else if (I_mcs >= mcs1 && I_mcs < mcs2) } else if (I_mcs >= mcs1 && I_mcs < mcs2)
return 2; return 2;
...@@ -2372,7 +2372,7 @@ uint8_t get_L_ptrs(uint8_t mcs1, uint8_t mcs2, uint8_t mcs3, uint8_t I_mcs, uint ...@@ -2372,7 +2372,7 @@ uint8_t get_L_ptrs(uint8_t mcs1, uint8_t mcs2, uint8_t mcs3, uint8_t I_mcs, uint
uint8_t get_K_ptrs(uint16_t nrb0, uint16_t nrb1, uint16_t N_RB) { uint8_t get_K_ptrs(uint16_t nrb0, uint16_t nrb1, uint16_t N_RB) {
if (N_RB < nrb0) { if (N_RB < nrb0) {
LOG_I(PHY,"PUSH PT-RS is not present.\n"); LOG_D(PHY,"PUSH PT-RS is not present.\n");
return -1; return -1;
} else if (N_RB >= nrb0 && N_RB < nrb1) } else if (N_RB >= nrb0 && N_RB < nrb1)
return 2; return 2;
......
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