Merge branch 'ru_rau_enhancement' of https://gitlab.eurecom.fr/oai/openairinterface5g into ru_rau_enhancement
This commit is contained in:
+2
-1
@@ -690,7 +690,8 @@ typedef enum {
|
|||||||
typedef enum {
|
typedef enum {
|
||||||
EMPTY = 0,
|
EMPTY = 0,
|
||||||
STOP_RU = 1,
|
STOP_RU = 1,
|
||||||
RU_FRAME_RESYNCH = 2
|
RU_FRAME_RESYNCH = 2,
|
||||||
|
WAIT_RESYNCH = 3
|
||||||
} rru_cmd_t;
|
} rru_cmd_t;
|
||||||
|
|
||||||
typedef struct RU_t_s{
|
typedef struct RU_t_s{
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
|
|||||||
|
|
||||||
// UE-specific RX processing for subframe n
|
// UE-specific RX processing for subframe n
|
||||||
if (nfapi_mode == 0 || nfapi_mode == 1) {
|
if (nfapi_mode == 0 || nfapi_mode == 1) {
|
||||||
LOG_I(PHY,"Calling RX procedures for SFNSF %d.%d\n",proc->frame_rx,proc->subframe_rx);
|
LOG_D(PHY,"Calling RX procedures for SFNSF %d.%d\n",proc->frame_rx,proc->subframe_rx);
|
||||||
phy_procedures_eNB_uespec_RX(eNB, proc, no_relay );
|
phy_procedures_eNB_uespec_RX(eNB, proc, no_relay );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -251,7 +251,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
|
|||||||
|
|
||||||
if (oai_exit) return(-1);
|
if (oai_exit) return(-1);
|
||||||
|
|
||||||
LOG_I(PHY,"Calling eNB_procedures_TX for SFN.SF %d.%d\n",proc->frame_tx,proc->subframe_tx);
|
LOG_D(PHY,"Calling eNB_procedures_TX for SFN.SF %d.%d\n",proc->frame_tx,proc->subframe_tx);
|
||||||
phy_procedures_eNB_TX(eNB, proc, no_relay, NULL, 1);
|
phy_procedures_eNB_TX(eNB, proc, no_relay, NULL, 1);
|
||||||
|
|
||||||
stop_meas( &softmodem_stats_rxtx_sf );
|
stop_meas( &softmodem_stats_rxtx_sf );
|
||||||
|
|||||||
@@ -488,10 +488,14 @@ void fh_if4p5_south_in(RU_t *ru,int *frame,int *subframe) {
|
|||||||
LOG_E(PHY,"Received Timestamp (IF4p5) doesn't correspond to the time we think it is (proc->subframe_rx %d, subframe %d)\n",proc->subframe_rx,*subframe);
|
LOG_E(PHY,"Received Timestamp (IF4p5) doesn't correspond to the time we think it is (proc->subframe_rx %d, subframe %d)\n",proc->subframe_rx,*subframe);
|
||||||
exit_fun("Exiting");
|
exit_fun("Exiting");
|
||||||
}
|
}
|
||||||
if (proc->frame_rx != *frame) {
|
if (ru->cmd != WAIT_RESYNCH && proc->frame_rx != *frame) {
|
||||||
LOG_E(PHY,"Received Timestamp (IF4p5) doesn't correspond to the time we think it is (proc->frame_rx %d frame %d)\n",proc->frame_rx,*frame);
|
LOG_E(PHY,"Received Timestamp (IF4p5) doesn't correspond to the time we think it is (proc->frame_rx %d frame %d)\n",proc->frame_rx,*frame);
|
||||||
exit_fun("Exiting");
|
exit_fun("Exiting");
|
||||||
}
|
}
|
||||||
|
else if (ru->cmd == WAIT_RESYNCH && proc->frame_rx != *frame){
|
||||||
|
ru->cmd=EMPTY;
|
||||||
|
*frame=proc->frame_rx;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
proc->first_rx = 0;
|
proc->first_rx = 0;
|
||||||
*frame = proc->frame_rx;
|
*frame = proc->frame_rx;
|
||||||
@@ -1277,7 +1281,8 @@ void wakeup_eNBs(RU_t *ru) {
|
|||||||
sprintf(string,"Incoming RU %d",ru->idx);
|
sprintf(string,"Incoming RU %d",ru->idx);
|
||||||
|
|
||||||
pthread_mutex_lock(&proc->mutex_RU);
|
pthread_mutex_lock(&proc->mutex_RU);
|
||||||
LOG_D(PHY,"Frame %d, Subframe %d: RU %d done,RU_mask[%d] %x\n",ru->proc.frame_rx,ru->proc.subframe_rx,ru->idx,ru->proc.subframe_rx,proc->RU_mask[ru->proc.subframe_rx]);
|
LOG_I(PHY,"Frame %d, Subframe %d: RU %d done (wait_cnt %d),RU_mask[%d] %x\n",
|
||||||
|
ru->proc.frame_rx,ru->proc.subframe_rx,ru->idx,ru->wait_cnt,ru->proc.subframe_rx,proc->RU_mask[ru->proc.subframe_rx]);
|
||||||
|
|
||||||
if (proc->RU_mask[ru->proc.subframe_rx] == 0)
|
if (proc->RU_mask[ru->proc.subframe_rx] == 0)
|
||||||
clock_gettime(CLOCK_MONOTONIC,&proc->t[ru->proc.subframe_rx]);
|
clock_gettime(CLOCK_MONOTONIC,&proc->t[ru->proc.subframe_rx]);
|
||||||
@@ -1295,13 +1300,13 @@ void wakeup_eNBs(RU_t *ru) {
|
|||||||
if (proc->RU_mask[ru->proc.subframe_rx] == (1<<eNB->num_RU)-1) {
|
if (proc->RU_mask[ru->proc.subframe_rx] == (1<<eNB->num_RU)-1) {
|
||||||
proc->RU_mask[ru->proc.subframe_rx] = 0;
|
proc->RU_mask[ru->proc.subframe_rx] = 0;
|
||||||
clock_gettime(CLOCK_MONOTONIC,&t);
|
clock_gettime(CLOCK_MONOTONIC,&t);
|
||||||
AssertFatal(t.tv_nsec > proc->t[ru->proc.subframe_rx].tv_nsec+500000,
|
AssertFatal(t.tv_nsec < proc->t[ru->proc.subframe_rx].tv_nsec+500000,
|
||||||
"Time difference for subframe %d => %d > 5ms\n",
|
"Time difference for subframe %d => %d > 5ms\n",
|
||||||
ru->proc.subframe_rx,t.tv_nsec - proc->t[ru->proc.subframe_rx].tv_nsec);
|
ru->proc.subframe_rx,t.tv_nsec - proc->t[ru->proc.subframe_rx].tv_nsec);
|
||||||
}
|
}
|
||||||
|
|
||||||
pthread_mutex_unlock(&proc->mutex_RU);
|
pthread_mutex_unlock(&proc->mutex_RU);
|
||||||
LOG_D(PHY,"wakeup eNB top for for subframe %d\n", ru->proc.subframe_rx);
|
LOG_I(PHY,"wakeup eNB top for for subframe %d\n", ru->proc.subframe_rx);
|
||||||
ru->eNB_top(eNB_list[0],ru->proc.frame_rx,ru->proc.subframe_rx,string);
|
ru->eNB_top(eNB_list[0],ru->proc.frame_rx,ru->proc.subframe_rx,string);
|
||||||
}
|
}
|
||||||
else { // multiple eNB case for later
|
else { // multiple eNB case for later
|
||||||
@@ -1752,6 +1757,7 @@ static void* ru_thread_control( void* param ) {
|
|||||||
LOG_I(PHY,"Received RRU_frame_resynch command\n");
|
LOG_I(PHY,"Received RRU_frame_resynch command\n");
|
||||||
ru->cmd = RU_FRAME_RESYNCH;
|
ru->cmd = RU_FRAME_RESYNCH;
|
||||||
ru->cmdval = ((uint16_t*)&rru_config_msg.msg[0])[0];
|
ru->cmdval = ((uint16_t*)&rru_config_msg.msg[0])[0];
|
||||||
|
LOG_I(PHY,"Received Frame Resynch messaage with value %d\n",ru->cmdval);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1887,12 +1893,13 @@ static void* ru_thread( void* param ) {
|
|||||||
if (ru->wait_cnt > 0) {
|
if (ru->wait_cnt > 0) {
|
||||||
ru->wait_cnt--;
|
ru->wait_cnt--;
|
||||||
|
|
||||||
if (ru->if_south!=LOCAL_RF && ru->wait_cnt <=20 && subframe == 5 && frame != RC.ru[0]->proc.frame_rx) {
|
if (ru->if_south!=LOCAL_RF && ru->wait_cnt <=10 && subframe == 5 && frame != RC.ru[0]->proc.frame_rx) {
|
||||||
// Send RRU_frame adjust
|
// Send RRU_frame adjust
|
||||||
RRU_CONFIG_msg_t rru_config_msg;
|
RRU_CONFIG_msg_t rru_config_msg;
|
||||||
rru_config_msg.type = RRU_frame_resynch;
|
rru_config_msg.type = RRU_frame_resynch;
|
||||||
rru_config_msg.len = sizeof(RRU_CONFIG_msg_t); // TODO: set to correct msg len
|
rru_config_msg.len = sizeof(RRU_CONFIG_msg_t); // TODO: set to correct msg len
|
||||||
((uint16_t*)&rru_config_msg.msg[0])[0] = RC.ru[0]->proc.frame_rx;
|
((uint16_t*)&rru_config_msg.msg[0])[0] = RC.ru[0]->proc.frame_rx;
|
||||||
|
ru->cmd=WAIT_RESYNCH;
|
||||||
LOG_I(PHY,"Sending Frame Resynch %d to RRU\n", ru->idx,RC.ru[0]->proc.frame_rx);
|
LOG_I(PHY,"Sending Frame Resynch %d to RRU\n", ru->idx,RC.ru[0]->proc.frame_rx);
|
||||||
AssertFatal((ru->ifdevice.trx_ctlsend_func(&ru->ifdevice,&rru_config_msg,rru_config_msg.len)!=-1),"Failed to send msg to RAU %d\n",ru->idx);
|
AssertFatal((ru->ifdevice.trx_ctlsend_func(&ru->ifdevice,&rru_config_msg,rru_config_msg.len)!=-1),"Failed to send msg to RAU %d\n",ru->idx);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user