Commit 1ff91db2 authored by Vaibhav Shrivastava's avatar Vaibhav Shrivastava Committed by jperaldi

Changes for Multiple CC

parent 096dac26
...@@ -205,33 +205,35 @@ extern uint16_t slot_ahead; ...@@ -205,33 +205,35 @@ extern uint16_t slot_ahead;
void oai_create_enb(void) { void oai_create_enb(void) {
int bodge_counter=0; int bodge_counter=0;
PHY_VARS_eNB *eNB = RC.eNB[0][0]; /* MultiCell: Function modify for Multiple CC */
NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] RC.eNB[0][0]. Mod_id:%d CC_id:%d nb_CC[0]:%d abstraction_flag:%d single_thread_flag:%d if_inst:%p\n", eNB->Mod_id, eNB->CC_id, RC.nb_CC[0], eNB->abstraction_flag, for (int CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
eNB->single_thread_flag, eNB->if_inst); PHY_VARS_eNB *eNB = RC.eNB[0][CC_id];
eNB->Mod_id = bodge_counter; NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] RC.eNB[0][0]. Mod_id:%d CC_id:%d nb_CC[0]:%d abstraction_flag:%d single_thread_flag:%d if_inst:%p\n", eNB->Mod_id, eNB->CC_id, RC.nb_CC[0], eNB->abstraction_flag,
eNB->CC_id = bodge_counter; eNB->single_thread_flag, eNB->if_inst);
eNB->abstraction_flag = 0; eNB->Mod_id = bodge_counter;
eNB->single_thread_flag = 0;//single_thread_flag; eNB->CC_id = CC_id;
RC.nb_CC[bodge_counter] = 1; eNB->abstraction_flag = 0;
eNB->single_thread_flag = 0;//single_thread_flag;
RC.nb_CC[CC_id] = 2;
if (eNB->if_inst==0) {
eNB->if_inst = IF_Module_init(CC_id);
}
// This will cause phy_config_request to be installed. That will result in RRC configuring the PHY
// that will result in eNB->configured being set to TRUE.
// See we need to wait for that to happen otherwise the NFAPI message exchanges won't contain the right parameter values
if (RC.eNB[0][CC_id]->if_inst==0 || RC.eNB[0][CC_id]->if_inst->PHY_config_req==0 || RC.eNB[0][CC_id]->if_inst->schedule_response==0) {
NFAPI_TRACE(NFAPI_TRACE_INFO, "RC.eNB[0][0]->if_inst->PHY_config_req is not installed - install it\n");
install_schedule_handlers(RC.eNB[0][CC_id]->if_inst);
}
if (eNB->if_inst==0) { do {
eNB->if_inst = IF_Module_init(bodge_counter); NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() Waiting for eNB to become configured (by RRC/PHY) - need to wait otherwise NFAPI messages won't contain correct values\n", __FUNCTION__);
} usleep(50000);
} while(eNB->configured != 1);
// This will cause phy_config_request to be installed. That will result in RRC configuring the PHY NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() eNB is now configured\n", __FUNCTION__);
// that will result in eNB->configured being set to TRUE.
// See we need to wait for that to happen otherwise the NFAPI message exchanges won't contain the right parameter values
if (RC.eNB[0][0]->if_inst==0 || RC.eNB[0][0]->if_inst->PHY_config_req==0 || RC.eNB[0][0]->if_inst->schedule_response==0) {
NFAPI_TRACE(NFAPI_TRACE_INFO, "RC.eNB[0][0]->if_inst->PHY_config_req is not installed - install it\n");
install_schedule_handlers(RC.eNB[0][0]->if_inst);
} }
do {
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() Waiting for eNB to become configured (by RRC/PHY) - need to wait otherwise NFAPI messages won't contain correct values\n", __FUNCTION__);
usleep(50000);
} while(eNB->configured != 1);
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() eNB is now configured\n", __FUNCTION__);
} }
void oai_enb_init(void) { void oai_enb_init(void) {
......
...@@ -720,8 +720,14 @@ void UL_indication(UL_IND_t *UL_info, void *proc) { ...@@ -720,8 +720,14 @@ void UL_indication(UL_IND_t *UL_info, void *proc) {
LOG_D(MAC,"current (%d,%d) frame count dl is %d\n",UL_info->frame,UL_info->subframe,frame_cnt); LOG_D(MAC,"current (%d,%d) frame count dl is %d\n",UL_info->frame,UL_info->subframe,frame_cnt);
} }
/* MultiCell: Condition Added for Multiple Cell */
if(ifi->CC_mask != 0) {
ifi->CC_mask = 0;
}
if (NFAPI_MODE != NFAPI_MODE_PNF) { if (NFAPI_MODE != NFAPI_MODE_PNF) {
if ((ifi->CC_mask==0)||(ifi->CC_mask==1)) { /* MultiCell: Condition modified for Multiple CC */
if ((ifi->CC_mask==0)||(ifi->CC_mask==1)||(ifi->CC_mask==2)) {
ifi->current_frame = UL_info->frame; ifi->current_frame = UL_info->frame;
ifi->current_subframe = UL_info->subframe; ifi->current_subframe = UL_info->subframe;
} else { } else {
...@@ -750,7 +756,8 @@ void UL_indication(UL_IND_t *UL_info, void *proc) { ...@@ -750,7 +756,8 @@ void UL_indication(UL_IND_t *UL_info, void *proc) {
handle_ulsch(UL_info); handle_ulsch(UL_info);
if (NFAPI_MODE != NFAPI_MODE_PNF) { if (NFAPI_MODE != NFAPI_MODE_PNF) {
if (ifi->CC_mask == ((1<<MAX_NUM_CCs)-3)) { /* MultiCell: Condition modified for Multiple CC */
if ((ifi->CC_mask == ((1<<MAX_NUM_CCs)-3)) || (ifi->CC_mask == ((1<<MAX_NUM_CCs)-2))) {
eNB_dlsch_ulsch_scheduler(module_id, eNB_dlsch_ulsch_scheduler(module_id,
(UL_info->frame+((UL_info->subframe>(9-sf_ahead))?1:0)) % 1024, (UL_info->frame+((UL_info->subframe>(9-sf_ahead))?1:0)) % 1024,
(UL_info->subframe+sf_ahead)%10); (UL_info->subframe+sf_ahead)%10);
......
...@@ -440,10 +440,11 @@ static void *L1_thread( void *param ) { ...@@ -440,10 +440,11 @@ static void *L1_thread( void *param ) {
PHY_VARS_eNB *eNB = RC.eNB[0][proc->CC_id]; PHY_VARS_eNB *eNB = RC.eNB[0][proc->CC_id];
char thread_name[100]; char thread_name[100];
#if 0 /* MultiCell: Not Required for MultiCell case */
cpu_set_t cpuset; cpu_set_t cpuset;
CPU_ZERO(&cpuset); CPU_ZERO(&cpuset);
#endif
// set default return value // set default return value
eNB_thread_rxtx_status = 0; eNB_thread_rxtx_status = 0;
sprintf(thread_name,"RXn_TXnp4_%d\n",&eNB->proc.L1_proc == proc ? 0 : 1); sprintf(thread_name,"RXn_TXnp4_%d\n",&eNB->proc.L1_proc == proc ? 0 : 1);
...@@ -467,9 +468,9 @@ static void *L1_thread( void *param ) { ...@@ -467,9 +468,9 @@ static void *L1_thread( void *param ) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX0, 0 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX0, 0 );
T(T_ENB_MASTER_TICK, T_INT(0), T_INT(proc->frame_rx), T_INT(proc->subframe_rx)); T(T_ENB_MASTER_TICK, T_INT(0), T_INT(proc->frame_rx), T_INT(proc->subframe_rx));
LOG_D(PHY,"L1RX waiting for RU RX\n"); LOG_D(PHY,"L1RX waiting for RU RX\n");
#if 0 /* MultiCell: Not Required for MultiCell case */
if (wait_on_condition(&proc->mutex,&proc->cond,&proc->instance_cnt,thread_name)<0) break; if (wait_on_condition(&proc->mutex,&proc->cond,&proc->instance_cnt,thread_name)<0) break;
#endif
LOG_D(PHY,"L1RX starting in %d.%d\n",proc->frame_rx,proc->subframe_rx); LOG_D(PHY,"L1RX starting in %d.%d\n",proc->frame_rx,proc->subframe_rx);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_CPUID_ENB_THREAD_RXTX,sched_getcpu()); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_CPUID_ENB_THREAD_RXTX,sched_getcpu());
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX0, 1 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX0, 1 );
...@@ -480,7 +481,8 @@ static void *L1_thread( void *param ) { ...@@ -480,7 +481,8 @@ static void *L1_thread( void *param ) {
if (oai_exit) break; if (oai_exit) break;
if (eNB->CC_id==0) { /* MultiCell: Condition modified for MultiCell case */
if ((eNB->CC_id==0) || (eNB->CC_id==1)) {
if (rxtx(eNB,proc,thread_name) < 0) break; if (rxtx(eNB,proc,thread_name) < 0) break;
} }
...@@ -947,6 +949,8 @@ void init_eNB_proc(int inst) { ...@@ -947,6 +949,8 @@ void init_eNB_proc(int inst) {
proc->instance_cnt_asynch_rxtx = -1; proc->instance_cnt_asynch_rxtx = -1;
proc->instance_cnt_synch = -1; proc->instance_cnt_synch = -1;
proc->CC_id = CC_id; proc->CC_id = CC_id;
L1_proc->CC_id = CC_id; /* MultiCell: Added for Multiple CC */
L1_proc_tx->CC_id = CC_id; /* MultiCell: Added for Multiple CC */
proc->first_rx =1; proc->first_rx =1;
proc->first_tx =1; proc->first_tx =1;
proc->RU_mask_tx = (1<<eNB->num_RU)-1; proc->RU_mask_tx = (1<<eNB->num_RU)-1;
......
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