testing with aw2s jaguar
This commit is contained in:
+33
-14
@@ -316,6 +316,8 @@ void fh_if4p5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp)
|
||||
/* Input Fronthaul from south RCC/RAU */
|
||||
|
||||
// Synchronous if5 from south
|
||||
|
||||
uint64_t ts_rx[20];
|
||||
void fh_if5_south_in(RU_t *ru,
|
||||
int *frame,
|
||||
int *tti)
|
||||
@@ -323,9 +325,12 @@ void fh_if5_south_in(RU_t *ru,
|
||||
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
recv_IF5(ru, &proc->timestamp_rx, *tti, IF5_RRH_GW_UL);
|
||||
proc->frame_rx = (proc->timestamp_rx / (fp->samples_per_subframe*10))&1023;
|
||||
uint32_t idx_sf = proc->timestamp_rx / fp->samples_per_subframe;
|
||||
proc->tti_rx = (idx_sf * fp->slots_per_subframe + (int)round((float)(proc->timestamp_rx % fp->samples_per_subframe) / fp->samples_per_slot0))%(fp->slots_per_frame);
|
||||
if (proc->first_rx == 1) ru->ts_offset = proc->timestamp_rx;
|
||||
proc->frame_rx = ((proc->timestamp_rx-ru->ts_offset) / (fp->samples_per_subframe*10))&1023;
|
||||
proc->tti_rx = fp->get_slot_from_timestamp(proc->timestamp_rx-ru->ts_offset,fp);
|
||||
//(idx_sf * fp->slots_per_subframe + (int)round((float)(proc->timestamp_rx % fp->samples_per_subframe) / fp->samples_per_slot0))%(fp->slots_per_frame);
|
||||
ts_rx[*tti] = proc->timestamp_rx;
|
||||
LOG_D(PHY,"IF5 %d.%d => RX %d.%d first_rx %d\n",*frame,*tti,proc->frame_rx,proc->tti_rx,proc->first_rx);
|
||||
|
||||
if (proc->first_rx == 0) {
|
||||
if (proc->tti_rx != *tti) {
|
||||
@@ -334,7 +339,7 @@ void fh_if5_south_in(RU_t *ru,
|
||||
}
|
||||
|
||||
if (proc->frame_rx != *frame) {
|
||||
LOG_E(PHY,"Received Timestamp 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 doesn't correspond to the time we think it is (proc->frame_rx %d frame %d proc->tti_rx %d tti %d)\n",proc->frame_rx,*frame,proc->tti_rx,*tti);
|
||||
exit_fun("Exiting");
|
||||
}
|
||||
} else {
|
||||
@@ -1270,22 +1275,25 @@ void *ru_thread( void *param ) {
|
||||
exit(-1);
|
||||
}
|
||||
} else {
|
||||
nr_init_frame_parms(&ru->config, fp);
|
||||
nr_dump_frame_parms(fp);
|
||||
fill_rf_config(ru,ru->rf_config_file);
|
||||
nr_phy_init_RU(ru);
|
||||
|
||||
// Start IF device if any
|
||||
if (ru->nr_start_if) {
|
||||
LOG_I(PHY,"Starting IF interface for RU %d\n",ru->idx);
|
||||
AssertFatal(ru->nr_start_if(ru,NULL) == 0, "Could not start the IF device\n");
|
||||
|
||||
if (ru->if_south == LOCAL_RF) ret = connect_rau(ru);
|
||||
else ret = attach_rru(ru);
|
||||
if (ru->has_ctrl_prt > 0) {
|
||||
if (ru->if_south == LOCAL_RF) ret = connect_rau(ru);
|
||||
else ret = attach_rru(ru);
|
||||
|
||||
AssertFatal(ret==0,"Cannot connect to remote radio\n");
|
||||
}
|
||||
|
||||
AssertFatal(ret==0,"Cannot connect to remote radio\n");
|
||||
}
|
||||
|
||||
if (ru->if_south == LOCAL_RF) { // configure RF parameters only
|
||||
nr_init_frame_parms(&ru->config, fp);
|
||||
nr_dump_frame_parms(fp);
|
||||
fill_rf_config(ru,ru->rf_config_file);
|
||||
nr_phy_init_RU(ru);
|
||||
else if (ru->if_south == LOCAL_RF) { // configure RF parameters only
|
||||
ret = openair0_device_load(&ru->rfdevice,&ru->openair0_cfg);
|
||||
AssertFatal(ret==0,"Cannot connect to local radio\n");
|
||||
}
|
||||
@@ -1453,6 +1461,11 @@ void *ru_thread( void *param ) {
|
||||
return &ru_thread_status;
|
||||
}
|
||||
|
||||
int start_streaming(RU_t *ru) {
|
||||
LOG_I(PHY,"Starting streaming on third-party RRU\n");
|
||||
return(ru->ifdevice.thirdparty_startstreaming(&ru->ifdevice));
|
||||
}
|
||||
|
||||
int nr_start_if(struct RU_t_s *ru, struct PHY_VARS_gNB_s *gNB) {
|
||||
return(ru->ifdevice.trx_start_func(&ru->ifdevice));
|
||||
}
|
||||
@@ -1801,7 +1814,7 @@ void set_function_spec_param(RU_t *ru) {
|
||||
ru->fh_south_in = fh_if5_south_in; // synchronous IF5 reception
|
||||
ru->fh_south_out = fh_if5_south_out; // synchronous IF5 transmission
|
||||
ru->fh_south_asynch_in = NULL; // no asynchronous UL
|
||||
ru->start_rf = NULL; // no local RF
|
||||
ru->start_rf = ru->eth_params.transp_preference == ETH_UDP_IF5_ECPRI_MODE ? start_streaming : NULL;
|
||||
ru->stop_rf = NULL;
|
||||
ru->start_write_thread = NULL;
|
||||
ru->nr_start_if = nr_start_if; // need to start if interface for IF5
|
||||
@@ -2077,6 +2090,12 @@ void RCconfig_RU(void)
|
||||
RC.ru[j]->if_south = REMOTE_IF5;
|
||||
RC.ru[j]->function = NGFI_RAU_IF5;
|
||||
RC.ru[j]->eth_params.transp_preference = ETH_UDP_MODE;
|
||||
} else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp_ecpri_if5") == 0) {
|
||||
RC.ru[j]->if_south = REMOTE_IF5;
|
||||
RC.ru[j]->function = NGFI_RAU_IF5;
|
||||
RC.ru[j]->eth_params.transp_preference = ETH_UDP_IF5_ECPRI_MODE;
|
||||
} else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "udp_ecpri_if5") == 0) {
|
||||
RC.ru[j]->if_south = REMOTE_IF5;
|
||||
} else if (strcmp(*(RUParamList.paramarray[j][RU_TRANSPORT_PREFERENCE_IDX].strptr), "raw") == 0) {
|
||||
RC.ru[j]->if_south = REMOTE_IF5;
|
||||
RC.ru[j]->function = NGFI_RAU_IF5;
|
||||
|
||||
Reference in New Issue
Block a user